Commit Graph

70 Commits

Author SHA1 Message Date
Fábio Oliveira
c49a5b072a Migrate LocationHistoryList to SwiftUI (#3468)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
In this PR I set to migrate the LocationHistoryList to SwiftUI, to
reduce the dependency in Eureka. This screen was picked at random.

As this screen is presented from two different places, SettingsDetail
and Debug screens, also updated the code in the corresponding classes.

The LocationHistory list reacts to changes.

### LocationHistoryDetail
LocationHistoryDetailViewController also gained a SwiftUI wrapper in
order for it to be presented from the new LocationHistoryListView.
This wrapper syncs the navigation items between the wrapped View
Controller and the parent.
Move functionality also got migrated.

### Misc changes

- Support for M4 added to the Gemfile.lock (added automatically)
- New extension for safe subscripting in arrays added.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
`LocationHistoryList item`
<img width="967" alt="Screenshot 2025-02-27 at 23 39 32"
src="https://github.com/user-attachments/assets/01576ced-ef97-4340-8353-e52a6fd14fac"
/>

`Empty LocationHistoryList`
<img width="955" alt="Screenshot 2025-02-27 at 23 40 56"
src="https://github.com/user-attachments/assets/303ae7c8-5fd6-40c1-87b4-e38098a175ea"
/>
2025-03-17 10:02:08 +01:00
Bruno Pantaleão Gonçalves
866db51335 Add iOS 18 icons and update pipeline (#2923) 2024-08-28 18:34:28 +02:00
mat1th
e68bc73ab9 Update gemfile.lock to include newest fastlane version; (#2586)
## Summary
Updates gemfile to include the newest fastlane version;

## Screenshots
No user facing features

## Link to pull request in Documentation repository
NA

## Any other notes
NA
2024-02-20 11:48:13 +01:00
github-actions[bot]
65a383a629 Update Localized Strings (#2505)
Automatically created by bgoncal.

---------

Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
Co-authored-by: Bruno Pantaleão <bruno.ing879@gmail.com>
2024-01-03 23:48:30 +00:00
Bruno Pantaleão Gonçalves
9f9179178c Thread credentials sharing (#2456) 2023-12-04 07:18:41 -03:00
Bruno Pantaleão Gonçalves
0deb3916cf Navigate to default server when deeplink to the app passing "?server=default" (#2392)
## Summary
Navigate to default server when deeplink to the app passing
"?server=default".
Currently when you use deep link to navigate to one lovelace page and
you have multiple HA servers in your iOS App it always asks which server
you want to use.
With this change you are able to default to your current server by using
a query item "?server=default"

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#



https://github.com/home-assistant/iOS/assets/5808343/c29ac74e-8ea4-4d5a-93ec-53ef7c64ced6
2023-11-06 08:56:08 +01:00
Bram Kragten
68a212a42f Bump cocoapods to 1.13.0 (#2419) 2023-10-09 09:12:35 -07:00
Zac West
567ba8d832 Update dependencies (#2306)
## Summary
Updates libraries & MaterialDesignIcons.
2023-02-10 10:24:33 -08:00
Zac West
c82c5db057 Add Emerge integration (#2233)
## Summary
The nice folks at [Emerge](https://emergetools.com) have given us access
to their platform for sizing the app and doing some non-live performance
testing. This integrates it it.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
Turning off Bitcode by switching to Xcode 14 is causing our binary size
to bloat, and to investigate this best I'll fix this long-term by
keeping track of size changes.

This adds emerge to a few places:
1. Individual builds that are submitted to Apple
2. Pull requests

The PR builds do not get sent to Apple nor are they uploaded because we
do not want to allow in-development changes to go anywhere with our
official signing information.
2022-10-20 13:19:50 -07:00
Zac West
d51a2d6893 Update to Xcode 14 & dependencies (#2228)
Fixes #2214.

## Summary
Updates to building with Xcode 14 as the minimum. Updates all
dependencies (as many both require Xcode 14 to update and would not work
with it without updating).

## Any other notes
This excludes `arm64` (new in Xcode 14) from watchOS builds. This is due
to App Store Connect having a bad heuristic for file size:

> ITMS-90389: Size Limit Exceeded - The size of watch application
'/Payload/Home Assistant.app/Watch/HomeAssistant-WatchApp.app' (102MB)
has exceeded the 75MB size limit.

Our binary file is larger than 75 MB unthinned and our thinned install
size is sub-25 MB, so I don't think this is testing the right thing. In
either case, we're somehow below whatever the limit actually is with
just `arm64_32_v8` and `arm_v7k` slices.

The first build on TF using the Xcode 14 build for distribution is
2022.413.
2022-10-19 13:56:30 -07:00
Zac West
bc6282536b Bump ruby version, macOS version for distribute & upgrade all the gems (#2181)
* Bump ruby dependencies

* Bump ruby version

* Bump to macOS 12 for distribute

* Update README for ruby version

* Certificate updates for MAS too

* Disable `key: key` -> `key:` in rubocop
2022-08-15 21:09:07 -07:00
Zac West
675872bb68 Update Xcode, build dependencies (#2136) 2022-05-20 21:54:24 -07:00
Zac West
8fa149abc3 Update dependencies (#1946)
## Summary
- Updates Firebase, Realm, Sentry, SwiftFormat, SwiftLint, Eureka, Sodium.
- Updates MaterialDesignIcons to 6.5.95. Fixes #1933.
- Updates Fastlane which now supports App Store Connect API keys for things like dSYM downloading.
2021-11-29 18:48:49 -08:00
Zac West
5c104f76e9 Multi-server (#1906)
## Summary
Most, but not all, of the changes necessary to support multi-server throughout the app and all its features.

## Screenshots
| Light | Dark |
| ----- | ---- |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 24](https://user-images.githubusercontent.com/74188/143670011-9b9905ac-1b5b-4a82-b9f3-1490465c4ec5.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 26](https://user-images.githubusercontent.com/74188/143670012-0080230a-8f68-4f34-9691-db9f5e825a83.png) |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 30](https://user-images.githubusercontent.com/74188/143670015-ceeac558-e039-4639-a186-b5001ab418b8.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 29](https://user-images.githubusercontent.com/74188/143670016-d72bb69d-83f5-4197-a742-59d208467258.png) |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 47](https://user-images.githubusercontent.com/74188/143670021-6c90c40f-c2f1-4a33-aad9-da6626e99d9d.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 45](https://user-images.githubusercontent.com/74188/143670024-e99de69d-61d8-4e12-be73-a172242806a0.png) |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 53 05](https://user-images.githubusercontent.com/74188/143670033-1a41ac7e-d4d1-458b-974e-2efdaf8e2288.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 53 03](https://user-images.githubusercontent.com/74188/143670049-baf4db64-64db-4bfb-88cf-4930f9e5661b.png) |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 53 21](https://user-images.githubusercontent.com/74188/143670053-7ec794f1-857c-4ef6-a92a-5318e90ac6b6.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 53 19](https://user-images.githubusercontent.com/74188/143670056-a6a5207c-3bba-49fc-b5c6-fc6fa8141f9c.png) |

## Any other notes
- Encapsulates all connectivity, token & server-specific knowledge in a Server model object which gets passed around.
- Updates various places throughout the app to know about and use Server rather than accessing said information through non-server-specific methods.
- Visually requests/notes server in places where it's ambiguous. For example, the Open Page widget will gain a subtitle if multiple servers are set up.
- Allows switching which server is shown in the WebViews. Note that this doesn't take into account multi-window support on iPad/macOS yet.

Most things will migrate successfully however adding an additional server causes things like Shortcuts to start erroring requiring you specify which to use in the particular Shortcut.

Future work necessary:
- Model objects currently clobber each other if their identifiers match. For example, both servers having a zone named `home` means one of them wins the fight for which is known to the app.
- Being remotely logged out on any account causes the app to require onboarding again, when instead it should only do that if the last known server is logged out.
2021-11-27 12:33:46 -08:00
Zac West
cea0b16936 Update dependencies (#1883)
- Updates several dependencies
- Removes Lokalise -- if we can't do it on Catalyst, it doesn't feel worth it to do it elsewhere
- Migrates the NotificationTestCases from a Podspec that keeps having issues to a fastlane script which copies in the latest ones
2021-10-16 15:19:41 -07:00
Zac West
bb53bdd5e5 Xcode 13 (#1841) 2021-09-18 19:42:29 -07:00
Zac West
6427f16135 Update provisioning profiles after expiration (#1815)
Distribution certificate expired at the end of July. This updates build scripts to use the new one, which is already updated in secrets.
2021-08-01 23:17:38 +00:00
Zac West
640cca884b Add SwiftFormat to project (#1463)
Adds new fastlane lanes:
- `fastlane lint` which checks the linters
- `fastlane autocorrect` which applies the linters which can autocorrect (Rubocop, SwiftFormat)

Adds a build step to the Codegen abstract target which runs SwiftFormat in lint mode, pointing out what it's going to change when run.

Applies SwiftFormat to nearly all code -- exempts a few externally-sourced files and generated code.
2021-02-05 22:06:25 -08:00
Zac West
c77d4464c2 Github Actions cleanup and linting additions (#1461)
Adds some new linters: YamlLint (YAML files) and RuboCop (Ruby files). Moves SwiftLint to our own runner. All three of these have built-in GitHub Actions output formats, so we don't need to do anything special to have them work. Applies YAML and Ruby cleanup.

Adds some short-circuit logic for caching to speed up various Actions. Adds a flag to make Firebase optionally use xcframeworks for test builds so they don't need to compile them. We only need to build it for release builds since they lack the ARM Mac slices.
2021-02-04 23:27:26 -08:00
Zac West
cda081cac6 Fix Gemfile.lock (#1458)
## Summary
Fixes the Gemfile.lock being out of sync.

## Any other notes
I removed the Sentry plugin from the Fastlane plugins list, but did not re-run bundle install, thus making it inconsistent. Also updates the dependencies 'cause why not.
2021-02-04 05:05:52 +00:00
Zac West
c9830a80af Set up GitHub Actions-based automatic builds (#1442)
## Summary
- Creates a Developer ID build, notarizes it, staples and then makes a .zip out of it.
- Re-exports the same Developer ID build for the Mac App Store and uploads it.
- Creates an iOS App Store build and uploads it.
- Uploads dSYMs and other debug information to Sentry during the build.
- Builds for every push to master. Does not automatically expose to beta users, at least not yet. But for internal TestFlight this should produce the latest and greatest as it goes.

## Any other notes
- Necessitates doing an automatic incrementing number for the build number, since it must be monotonically increasing for macOS builds. Uses the format `2021.{RUN_NUMBER}`.
- Moves to use manual code signing for Release builds. It was already this way before (we were just using the Xcode UI at submission time specify), but now it doesn't require fiddling.
- Changes Firebase config to be not in a scheme. When it's in a scheme, it's after the code sign phase, which can produce issues for Fastlane.
- Changes Firebase to not be an xcframework in CI, since they do not ship ARM Mac Catalyst slices yet.
- Removes some incorrect code sign statuses in the Mac Launcher app.
2021-01-31 10:09:33 -08:00
Zac West
aaf7f26e1d Convert Lokalise task to use CLI; add upload-strings (#1430)
- Moves to calling the Lokalise2 CLI app instead of the occasionally-updated fastlane plugin wrappers.
- Adds a step to upload strings to Lokalise; performs it before downloading.
- Moves to sorting the localized strings alphabetically in their files.
- Looks like #1429 in execution.
2021-01-26 20:21:12 -08:00
Zac West
05af5b372e Update Communicator, fix a few Watch bugs (#1365)
## Summary
- Fixes a crash when saving complications due to #1360 trying to save the MaterialDesignIcons model object as a String.
- Fixes complications not updating on save on the Watch if there are no template-requiring complications.
- Fixes firing the 'success' state on actions on the Watch immediately after asking the phone to send the request, rather than when it completes. This will make it feel slower but will be more accurate since it's failable.
- Updates Communicator to 4.x (the latest) and adjust to its changes.

## Screenshots
n/a

## Link to pull request in Documentation repository
n/a

## Any other notes
As Communicator keeps diverging from how the WatchConnectivity API structures things (especially around error handling) it may be worth thinking about going back to using it directly. For now though keeping our dependencies up-to-date is more important than inaction.
2021-01-10 17:07:05 -08:00
github-actions[bot]
46c130d356 Bump Build to 2021.1 (4) (#1329) 2021-01-01 17:50:59 -08:00
Zac West
e0ae2903bc Generate Mac-specific icons (#1328)
Generates all the Mac-specific icon sizes. Apple requires this for Mac App Store submission. I'm not sure what Catalyst is using.
2021-01-01 17:26:16 -08:00
github-actions[bot]
f573c54de3 Update Localized Strings (#1303) 2020-12-20 11:46:10 -08:00
Zac West
66bd05b294 Update dependencies, fix new lint warnings (#1302)
- Updates Fastlane & its dependencies (including new Lokalise actions for their new API).
- Updates app dependencies, and fixes new lint warnings due to SwiftLint being updated.
2020-12-17 23:47:55 -08:00
Zac West
f79e95302f Update dependencies, resolve warnings (#1221) 2020-10-20 21:22:47 -07:00
Zac West
decac7dc68 Fix CI tests (#1089)
- Works around Xcode 12.0 (gm -208 and -209) and 12.2 (b1, so far) shipping without functional dylibs for its CoreNFC support in the simulator, making tests crash 100% of the time.
- Works around Xcode 12.0 and 12.2 (same ones) being unable to `git clone` from `https://github.com/catchorg/Catch2` without hitting `error: RPC failed; curl 18 transfer closed with outstanding read data remaining`. Using the system git makes this functional, however… Xcode's documented env var which controls using system git does not work; it always uses its own. The documented `-gitProvider system` command doesn't work, but `-scmProvider system` does, but there's no built-in fastlane things to get this piped down to the right levels, and the location it does SPM checkouts is so indirect that I couldn't even think of how to modify it to pass the information down. This instead links from the internal git to the system git, which works.
- Adds the source version of SPM dependencies to a cache.
- Adds the compiled version of Realm and Firebase to a cache. These are beastly dependencies that rarely change.
- Retries tests a single time if they fail; surprise, another SPM issue! It occasionally fails to order SPM dependencies correctly, making Sodium unable to see Clibsodium.
- Adds a step to upload build logs and crashes as artifacts to the test execution.
2020-09-25 13:39:40 -07:00
Zac West
5aecd16784 Downgrade Realm to 5.3.5 & fix fatal alert, update Cocoapods (#1022)
Realm 5.3.6 has a workaround for the iOS 14 b3-b6 (but reverted by Apple in b7) crash. However, this workaround also causes deadlocks/crashes restoring form the background on iOS 12 and below. This reverts to the build before the regression, which will cause us to crash on the previously-noted iOS 14 betas, but will make iOS 12 and 11 work as expected.

This also fixes the alert we present when the Realm can't be be set up, which broke for Scenes.

Fixes #1020.
2020-09-15 23:03:23 -07:00
Zac West
f6333de587 Initial support for Catalyst/macOS (#931)
- Moves Realm & Sodium to Swift Package Manager. Sodium _just_ added support and I fixed a Release issue there.
- Manually removes linking against Lokalise. Their binary distribution hasn't been updated.
- Avoids talking to things not on Mac (NotificationCenter [Today Widget], Core Telephony).
- Fixes registering fonts, which need to specify scope and also avoid complaining if registration occurs twice.
- Hides preferences like Motion, NFC, Apple Watch which are not on Mac.
- Adds a very basic update checker, which looks at the GitHub releases and does an equality check on version info.

This is, of course, not a polished product: settings still open in a form sheet, there's absolutely no useful menu items, no support for multi-window, nor a prettier NSWindow kinda thing.
2020-08-23 16:01:01 -07:00
Zac West
b978e98cb3 Update dependencies, fix warnings (#913) 2020-08-15 23:02:03 -07:00
Zac West
5250064079 Fix Xcode 12, add Widgets extension (#883)
- Upgrades the project file format from very old Xcode compatibility to 11.4+.
- Updates to Cocoapods 1.10 beta.
- Removes some overrides of the xcconfig and updates the xcconfig.
- Adds exclusions for the x86_64/64-bit watchOS simulator using new b4 format.
- Updates intents for iOS 14/Xcode 12.
- Adds an Intent-powered Perform Action widget (which does nothing and isn't styled) to make sure the flow works. It's actually not possible to define an empty set of widgets if the extension exists, so it needs something.
2020-08-10 20:33:39 -07:00
Robbie Trencheny
299048ddfb Migrate to Nabu Casa account 2020-07-27 20:22:00 -07:00
Zac West
f53ee6f60e Fix tests in CI (#747)
- Disables critical alert entitlement changes in CI (this is the only required thing)
- Updates Bundler dependencies
- Add master/beta to CI for tests so cache can be available
2020-07-04 20:23:10 -07:00
Zac West
5a72a0fe66 Update dependencies (#679)
- Removes NetworkActivityIndicatorManager -- the network activity indicator is now deprecated
- Avoids: Alamofire (many API changes), Communicator (many changes, _just_ released),
2020-06-20 12:02:16 -07:00
Robbie Trencheny
d7552a574e Initial Github Action for CI (#666) 2020-06-16 20:16:53 -07:00
Zac West
052b14561c Wrap several API operations in background tasks (#627)
- Adds a helper and tests for it which will execute a Promise along with begin/end background task methods.
- Wraps updating location from notification, location/sensors from background fetch, and location update from shortcut.
- Fixes updating location happening from notification even when the setting is off.
- Fixes tests to both execute and pass.
2020-06-11 22:13:32 -07:00
Robbie Trencheny
e52aefafcc Update Ruby deps 2020-02-11 20:41:07 -08:00
Robbie Trencheny
2c944bb208 Update fastlane 2019-11-25 13:51:53 -05:00
Robbie Trencheny
1324e99b6b 2019.1 2019-11-16 03:38:09 +01:00
Robbie Trencheny
dff387a474 Update cocoapods 2019-06-22 17:55:55 -07:00
Robbie Trencheny
f5091c90b7 Update fastlane 2019-06-17 23:17:45 -07:00
Robbie Trencheny
9a5dff0fb3 Adapt fastlane to get bundle ID out of xcconfig, removing hardcoded io.robbie stuff 2019-05-29 18:21:59 -07:00
Robbie Trencheny
13e2271821 Update fastlane 2019-05-15 13:12:18 -07:00
Robbie Trencheny
3d66e8e3ab Update fastlane 2019-05-05 21:41:21 -07:00
Robbie Trencheny
99026f836a Migrate to Swift 5 2019-03-31 20:46:16 -07:00
Robbie Trencheny
c4c442005d Update Ruby deps 2019-02-21 21:15:56 -08:00
Robbie Trencheny
f28ff3f71d Update fastlane-plugin-appicon 2019-02-13 17:34:58 -08:00
Robbie Trencheny
f44690a8e3 Merge branch 'master' into new-ios12 2018-10-07 01:58:59 -04:00