Commit Graph

5 Commits

Author SHA1 Message Date
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
David Beitey
213fa88a9b Add option to open links in Private browser tab (#2216)
<!-- 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
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
Adds the option to open links from the companion app within a private
browser tab, if the selected browser has this feature (via universal
links). The new "Open in Private Tab" UI toggle in settings only shows
up when a supported browser is selected.

This option currently only applies to Firefox as it is the only browser
to support this (Focus/Klar are private by default and Safari/Chrome
don't have a way to open a private or incognito tab at present). That
said, the code is written to be extensible should this change later.

Note that if this new option isn't selected, we can't force Firefox to
open a link in a "non-private" tab – Firefox iOS [intentionally
uses](https://github.com/mozilla-mobile/firefox-ios/blob/main/Client/Application/NavigationRouter.swift#L216-L217)
the last mode Firefox was in by default when opening URLs.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode.
-->
<img
src="https://user-images.githubusercontent.com/1002811/194757474-a0977e15-a698-4032-9085-45274bdd5698.png"
width="300" alt="Open in Private tab light screenshot"> <img
src="https://user-images.githubusercontent.com/1002811/194757484-23876b1d-8554-413e-93bb-300fbaee75fa.png"
width="300" alt="Open in Private tab dark screenshot">


## 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
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2022-10-12 17:35:12 -07:00
David Beitey
1ec949bb4e Add Firefox Focus/Klar as browsers for opening links (#2213) 2022-10-07 10:20:09 -07: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
4d9a530637 Reorganize files in repo, pull out build settings from pbxproj (#1140)
This is somewhat in prep of being able to make the project file generated, but also just organizes things into more concrete directory structures.

This pulls out _all_ of the build settings from the root level, and most from the target level, into xcconfigs.

The new directory structure looks like:

- Sources
  - App
    - (everything from HomeAssistant/)
  - WatchApp
  - Shared
  - MacBridge
  - Extensions
    - Intents
    - NotificationContent
    - NotificationService
    - Share
    - Today
    - Watch
    - Widgets
- Tests
  - App
  - UI
  - Shared

Somewhat intentionally, the file structure under these is not yet standardized/organized.

The project targets are now:

- App
- WatchApp
- Shared-iOS
- Shared-watchOS
- MacBridge
- Tests-App
- Tests-UI
- Tests-Shared
- Extension-Intents
- Extension-NotificationContent
- Extension-NotificationService
- Extension-Share
- Extension-Today
- Extension-Widget
- WatchExtension-Watch

This does not yet clean up resources vs. sources, nor does it handle some of the "it's in Sources/App but it's part of Shared" crossover directory issues.
2020-10-03 00:15:04 -07:00