Get started with Apple
Install Xcode and the Ruby tooling, set up code signing, and run the Home Assistant app on a simulator or your own device.
You need a Mac. This page takes you from a fresh clone to the app running in the simulator.
- Xcode: the version the project currently requires is in the README. The project follows new Xcode releases quickly, so at times that is a beta from Apple Developer Downloads.
- Ruby: for Bundler and Fastlane, which run the linters and tests. The version is in
.ruby-version. - An Apple developer team ID, for code signing.
Third party libraries are Swift packages. Xcode resolves them on its own.
-
Fork home-assistant/iOS on GitHub.
-
Clone your fork and create a branch:
Shellgit clone https://github.com/<your-github-username>/iOS.git cd iOS git checkout -b fix-widget-refresh
Pick one way to get Ruby, then install the gems. With mise:
brew install mise
mise install
bundle installWith rbenv:
brew install rbenv ruby-build
rbenv install
bundle installThe Ruby version is in .ruby-version. If you already have a matching Ruby, bundle install is enough.
The app uses entitlements that need code signing, even in the simulator. Debug builds use automatic provisioning, but you need to tell Xcode which team and bundle IDs to use.
Create Configuration/HomeAssistant.overrides.xcconfig:
DEVELOPMENT_TEAM = YourTeamID
BUNDLE_ID_PREFIX = some.bundle.prefixDEVELOPMENT_TEAMis your team ID, from the Apple developer portal. It looks likeABCDEFG123.BUNDLE_ID_PREFIXis a prefix you control, so Xcode can create provisioning profiles for it.
Git ignores this file. Xcode generates the profiles for your team, and features your team doesn't have, like critical alerts, are turned off.
- Open
HomeAssistant.xcodeprojin Xcode. - Select the App-Debug scheme.
- Select a simulator or your device.
- Build and run.
Connect it to a test instance of Home Assistant if you can: each onboarding registers a new device on the server.
# Check formatting and lint, without changing files
bundle exec fastlane lint
# Fix what can be fixed automatically
bundle exec fastlane autocorrect
# Run the unit tests
bundle exec fastlane test
# Run autocorrect before every commit
bundle exec fastlane install_git_hooksWorking on the frontend and want to see it in the app? You don't need to build the app:
- Install Xcode, and open the simulator from Xcode > Open Developer Tool > Simulator.
- Download the
ios-simulatorartifact from a recent run of the CI workflow onmain. - Drag the
.apponto the simulator and launch it. - In Safari, turn on the Develop menu in the advanced settings. Then use Develop > Simulator to open Web Inspector on the app's web view.
The repository has instructions for AI coding tools in AGENTS.md, and skills in .agents/skills/, like ha-ios-architecture, ha-ios-testing, and ha-ios-workflow-ci. The pull request template asks whether you used AI, and how. Contribute with AI tools lists every skill, and explains what the AI policy asks of you.
- Read the architecture and the targets.
- Check the code style before your first pull request.