jayy7312 / iOS

:iphone: Home Assistant for Apple platforms

Home Page:https://companion.home-assistant.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Home Assistant for Apple Platforms

TestFlight Beta invite Download on the App Store GitHub issues License Apache 2.0

Getting Started

Home Assistant uses Bundler, Homebrew and Cocoapods to manage build dependencies. You'll need Xcode 12.5 (or later) which you can download from the App Store. You can get the app running using the following commands:

git clone https://github.com/home-assistant/iOS.git
cd iOS
# if you don't have bundler already, [sudo] gem install bundler
# if you don't have homebrew already, install from https://brew.sh
brew bundle
bundle install
bundle exec pod install --repo-update

Once this completes, you can launch HomeAssistant.xcworkspace and run the App-Debug scheme onto your simulator or iOS device.

Code Signing

Although the app is set up to use Automatic provisioning for Debug builds, you'll need to customize a few of the options. This is because the app makes heavy use of entitlements that require code signing, even for simulator builds.

Edit the file Configuration/HomeAssistant.overrides.xcconfig (which will not exist by default and is ignored by git) and add the following:

DEVELOPMENT_TEAM = YourTeamID
BUNDLE_ID_PREFIX = some.bundle.prefix

Xcode should generate provisioning profiles in your Team ID and our configuration will disable features your team doesn't have like Critical Alerts. You can find your Team ID on Apple's developer portal; it looks something like ABCDEFG123.

Watch Development

To develop any of the Watch Extensions, you must remove the Launcher dependency from the App target. It's not clear what's breaking the project that necessitates this, but otherwise it will attempt to launch that target in the Watch Simulator or fail to launch and just hang.

Code style

Linters run as part of Pull Request checks. Additionally, some linting requirements can be autocorrected.

# checks for linting problems, doesn't fix
bundle exec fastlane lint
# checks for linting problems and fixes them
bundle exec fastlane autocorrect

In the Xcode project, the autocorrectable linters will not modify your source code but will provide warnings. This project uses several linters:

Continuous Integration

We use Github Actions alongside Fastlane to perform continuous integration both by unit testing and deploying to App Store Connect. Mac Developer ID builds are available as an artifact on every build of master.

Environment variables

Fastlane scripts read from the environment or .env file for configuration like team IDs. See .env.sample for available values.

Deployment

Although all the deployment is done through Github Actions, you can do it manually through Fastlane:

Deployment to App Store Connect

# creates the builds and uploads to the app store
# each save their artifacts to build/
bundle exec fastlane mac build
bundle exec fastlane ios build

Contributing

See CONTRIBUTING.md

LICENSE

Apache-2.0

Credits

The format and some content of this README.md comes from the SwipeIt project.

About

:iphone: Home Assistant for Apple platforms

https://companion.home-assistant.io

License:Other


Languages

Language:Swift 99.0%Language:Ruby 0.7%Language:Shell 0.2%Language:JavaScript 0.1%Language:Objective-C 0.0%