Commit Graph

3 Commits

Author SHA1 Message Date
mat1th
97834bfd5e Update swift lint and format + appy fixes (#2585)
## Summary
Swift lint and swiftformat are outdated. This PR does update those +
applies the new formatting form swiftformat.
There is 1 swift file with a manual change:
`Sources/Vehicle/Templates/Areas/CarPlayAreasViewModel.swift`. This is
done because `swiftlint` did create the following swiftlint error:
`error: Cyclomatic Complexity Violation: Function should have complexity
10 or less; currently complexity is 11 (cyclomatic_complexity)`.

Because it does change a lot of files the question is if we want to
finetune the `swiftformat` rules.

## Screenshots
No user facing changes.

## Link to pull request in Documentation repository
NA

## Any other notes
NA
2024-02-22 13:06:39 +01:00
Zac West
d5a64e273e Move Login to an in-app WebView instead of an Authentication Session (#2187)
## Summary
Fixes issues on Mac where Safari breaks the login flow and resolves
having to 'trust' a certificate twice after selecting a server.

## Screenshots

![mac](https://user-images.githubusercontent.com/74188/185290738-9e169621-8947-42a3-8a43-7295aabdb7f4.png)

![iphone](https://user-images.githubusercontent.com/74188/185290789-ca69b486-96d9-432f-ad46-d975889d45e3.png)

## 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-15 06:34:10 +00:00
Zac West
f550199526 Add "Launch App on Login" setting (#1387)
Fixes #1383. Refs #949.

## Summary
Allows the user to choose to launch the app on startup, which toggles on a login item which launches the app.

## Screenshots
<img width="350" alt="Screen Shot 2021-01-18 at 13 03 28" src="https://user-images.githubusercontent.com/74188/104962618-aa753180-598d-11eb-8711-f3b45ded80ba.png"><img width="350" alt="Screen Shot 2021-01-18 at 13 03 23" src="https://user-images.githubusercontent.com/74188/104962622-aba65e80-598d-11eb-8c76-e6ec61fe320a.png">

## Any other notes
- Effectively this setting turns on whether to launch this Launcher app on login, and then the Launcher app launches the app whenever it's started, before terminating itself.
- Routes through the Mac Bridge to call `SMLoginItemSetEnabled` which appears to have no public API counterpart to get the current status. Various places point to `SMJobIsEnabled` which doesn't appear in any headers.
- Thanks @rudyrichter for the pointer on how to get this working.
2021-01-18 16:19:58 -08:00