Home Assistant for Apple Platforms

Overview

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 13.1 (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

# you must do one of the following, but you do not need to do all of them:

## install cocoapods via homebrew, use that
brew install cocoapods
pod install --repo-update

## install ruby via homebrew, use that
brew install [email protected]
/usr/local/opt/[email protected]/bin/bundle install
/usr/local/opt/[email protected]/bin/bundle exec pod install --repo-update

## install ruby via rbenv, use that
brew install rbenv ruby-build
rbenv install
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.

Testing just the frontend

To just test the frontend, you can use a simulator version built by our GitHub actions.

  1. Install Xcode from the App Store making sure it's at least the version noted above. You do not need to install or run anything else.
  2. Launch the simulator at /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app or in Xcode under the Xcode menu > Open Developer Tool.
  3. Open a simulator under File > Open Simulator. You can install older versions of iOS in Xcode's Components preferences.
  4. Download a simulator build from the the GitHub action under "Artifacts."
  5. Drag the result .app on drop it on top of the simulator.
  6. Locate the app on the home screen and click it to launch.

The simulator behaves different than you might expect:

Action Effect
Click Tap
Click & drag Scroll
Hold ⌥ Add a second touch point
Hold ⇧⌥ Move both touch points
⌘←, ⌘→ Rotate
⌘S Take screenshot
⌘R Record video
⌘K Toggle software keyboard

You can now debug the WebView in this simulator build using Safari's Web Inspector:

  1. Make sure "Show Develop menu in menu bar" is enabled in Safari's Advanced preferences.
  2. Under the Develop menu, expand the "Simulator" menu for the simulator you've opened.
  3. Choose the WebView you want to inspect. A new window will open.

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.

You might also like...
Restaurant - Educational application from the Apple Mobile Development Course for MDA
Restaurant - Educational application from the Apple Mobile Development Course for MDA

Restaurant Educational application from the Apple Mobile Development Course for

Apple SMC library & tool

SMCKit An Apple System Management Controller (SMC) library & command line tool in Swift for Intel based Macs. The library works by talking to the Appl

Appwrite playground - a simple way to explore the Appwrite API & Appwrite Apple SDK

Appwrite's Apple Playground 🎮 Appwrite playground is a simple way to explore the Appwrite API & Appwrite Apple SDK. Use the source code of this repos

SwiftyXPC - a wrapper for Apple’s XPC interprocess communication library that gives it an easy-to-use, idiomatic Swift interface.

SwiftyXPC is a wrapper for Apple’s XPC interprocess communication library that gives it an easy-to-use, idiomatic Swift interface.

Provides some Apple Wallet functionality, like adding passes, removing passes and checking passises for existing.
Provides some Apple Wallet functionality, like adding passes, removing passes and checking passises for existing.

react-native-wallet-manager Provides some Apple Wallet's functionality, like adding passes, removing passes and checking passises for existing. Instal

Apple Developer Academy @ POSTECH Afternoon Session Team 13 MC2
Apple Developer Academy @ POSTECH Afternoon Session Team 13 MC2

📱 Project Title A brief description of what this project does and who it's for 📌 Features Light/dark mode toggle Live previews Fullscreen mode Cross

SwiftPizza App for Apple ActivityKit & WidgetKit
SwiftPizza App for Apple ActivityKit & WidgetKit

iOS16 Live Activities ( ActivityKit Demo) SwiftPizza 🍕 👨🏻‍🍳 App for Apple ActivityKit & WidgetKit This is the first project example referring to

☎️ NextcloudKit Apple library

NextcloudKit Installation Carthage Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary framework

A Swift cross-platform (Apple and Linux) networking library.

KippleNetworking A Swift library that offers cross-platform (Apple and Linux) networking support, intended for the creation of cross-platform SDKs to

Owner
null
Storm: iOS home task project

iOS home task project About this repository This repository contains brand new iOS project with Storyboards removed and ready to write the UI programa

Storm Ideas 0 Nov 23, 2021
C-41 is an application to help people develop film at home by providing a series of "recipes" for photographers to use

C-41 C-41 is an application to help people develop film at home by providing a series of "recipes" for photographers to use. The app demonstrates how

Ash Furrow 2.1k Jan 5, 2023
Take home assignment for an iOS developer role interview process.

Cocktails My solution to a take home assignment I was given as a step of an interview process for an iOS developer role. The task I was asked to write

Johan Forsell 14 Dec 31, 2022
Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone.

scrcpy-mobile Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone. Currently only supports control

Ethan 140 Jan 2, 2023
A Swift library for Discord REST/Gateway API in all platforms.

swift-discord main develop A Swift library for Discord API. Package Products Discord, alias library that contains DiscordREST, DiscordGateway. Discord

swift-discord 3 Sep 30, 2022
Mimicrated views and controls to native Apple appearance.

Mimicrated views and controls to native Apple appearance. If you have any ideas of what elements can be added, let me know. Below you will see previews of all the elements and how to use them.

Ivan Vorobei 85 Dec 3, 2022
A apple search ads attribution plugin for flutter

A apple search ads attribution plugin for flutter

liam 0 Oct 27, 2021
A collection of Swift Tutorials built with Apple's DocC.

Swift Tutorials This is not a package, it's just a bunch of tutorials This project uses Apple's DocC (Documentation Compiler) to create a set of Swift

Swift Innovators Network 11 Aug 9, 2022
An Apple Watch remake of the Poketch from Pokemon Diamond and Pearl made with SwiftUI

Apple Watch Poketch What is it? It's an Apple Watch remake of the "Poketch" from Pokemon Diamond and Pearl made with SwiftUI! Check out the YouTube vi

André Arko 1 Nov 19, 2021
Open-source implementation of Apple's Combine for processing values over time

CombineX 简体中文 Open-source implementation of Apple's Combine for processing values over time. Though CombineX have implemented all the Combine interfac

Luo Xiu 1 Dec 30, 2021