11 Commits

Author SHA1 Message Date
Bruno Pantaleão Gonçalves
be398e866c
Revert watch changes for watchOS 26 and adapt notifications and UI in a different way (#3881) 2025-10-07 00:03:22 +02:00
Bruno Pantaleão Gonçalves
6b9780e77d
Remove default Apple Watch notifications labels (#3810)
<!-- 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 -->

## 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
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2025-09-15 01:10:51 -03:00
Bruno Pantaleão Gonçalves
d611a8914b
Avoid using hosting controller on watch App (#3801)
<!-- 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 -->
When using hosting controller on watchOS 26, none of the navigation bar
buttons works, this PR moves away from using it and declared a swiftUI
view as the main view for the app to start on.

## 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
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2025-09-09 11:33:28 -03:00
Bruno Pantaleão Gonçalves
3af34446ad
Rebuild watch home in SwiftUI (#2708)
<!-- 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 -->

## 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
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-04-11 10:24:06 +02:00
Bruno Pantaleão Gonçalves
1294991279
Update WatchOS App Icon (#2464)
<!-- 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 -->
Update WatchOS App with the new Home Assistant icons

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="719" alt="Screenshot 2023-11-30 at 13 20 29"
src="https://github.com/home-assistant/iOS/assets/5808343/f6d339d2-df50-48cd-9115-19918bae9c1e">

## 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. -->
2023-12-03 17:30:20 +00:00
Zac West
4bbad0ba04
Fix attachments in Watch notifications with dynamic actions (#1619)
## Summary
Implements a similar pipeline for notification content in the watch as the notification content extension.

## Screenshots
https://user-images.githubusercontent.com/74188/116958883-d670a600-ac50-11eb-9578-994ee594a271.mp4

(the video starts playing a bit faster when not recording/debugging)

![Simulator Screen Shot - Apple Watch Series 6 - 44mm - 2021-05-03 at 20 28 19](https://user-images.githubusercontent.com/74188/116958826-ab865200-ac50-11eb-98d4-70394cdd8344.png)
![Simulator Screen Shot - Apple Watch Series 6 - 44mm - 2021-05-03 20 22 51](https://user-images.githubusercontent.com/74188/116958827-ac1ee880-ac50-11eb-85ea-58751a0c42aa.png)
![Simulator Screen Shot - Apple Watch Series 6 - 44mm - 2021-05-03 20 22 04](https://user-images.githubusercontent.com/74188/116958828-ac1ee880-ac50-11eb-808c-5ea1f947e3a8.png)

## Any other notes
- Fixes text input notification actions failing to do anything. Unless we implement the 'suggestions' method (even to just return `[]`) it will fail to show the action, logging something about the `nil` default value being unacceptable.
- Fixes attachments downloaded by the service extension not showing up at all. By downloading them again, because Apple fails to correctly give us access to them.
- Adds support for lazily downloading attachments, either when not attached or with the lazy flag.
- Combines the notification controller (similar to the content extension) for all the various category types.
2021-05-03 22:35:18 -07:00
Zac West
81fc1144fc
Fix watch notifications not handling multi-line (#1613)
Fixes #1612.

## Summary
Sets the number of lines to 0, and to make the group prettier also hides the labels when empty.

## Screenshots
![Simulator Screen Shot - Apple Watch Series 6 - 40mm - 2021-05-01 17 48 37](https://user-images.githubusercontent.com/74188/116798602-2a8b5700-aaa6-11eb-884f-d8a4b29accad.png)
2021-05-01 18:43:31 -07:00
Zac West
1b88de68a6
Dynamic, per-notification actions (#1588)
Depends on home-assistant/mobile-apps-fcm-push#47 which allows the actions to be included in the notification data, and also on-the-fly silently sets the category to `DYNAMIC` which this requires.

## Summary
Allows for specifying the actions for a notification on-the-fly without defining a category. This should allow us to make all of the category config and setup unnecessary, so I'll probably consider marking it as deprecated in this release.

## Screenshots

For a notification that looks like…

```yaml
service: notify.mobile_app_iphone
data:
  title: title here
  message: body here
  data: 
    actions:
    - action: "id1"
      title: "id1 title"
      # this mirrors the action definition in yaml now, it just _also_ supports what android 
    - identifier: "id2"
      title: "id2 title"
```

![Simulator Screen Shot - Apple Watch Series 6 - 40mm - 2021-04-17 at 20 54 33](https://user-images.githubusercontent.com/74188/115135570-5b5f8c80-9fce-11eb-9118-0d156578d9e5.png)
![Simulator Screen Shot - iPhone 12 Pro - 2021-04-17 at 22 41 07](https://user-images.githubusercontent.com/74188/115135572-60bcd700-9fce-11eb-81b6-c908da8e204c.png)

## Link to pull request in Documentation repository
- Documentation: home-assistant/companion.home-assistant#496

## Any other notes
- Dynamic actions are visual - we provide custom UI on both iOS and watchOS for the additional actions, which does require we run the app on the given platform; for example, this doesn't yet work on macOS [I need to figure out how to make Catalyst notification content work, if it is] and if you uninstall the watch app these actions will not show up.
- Allows `map` and `camera`-esque notification content on any category. In other words, if you send a notification with `map` it'll still prefer the camera `entity_id` if present. This is largely to continue in the direction of making category deprecated; as long as the content extension launches, it'll figure out what to display.

All of the normal action configuration is allowed in these actions:
- action or identifier
- title
- authenticationRequired (default: false)
- behavior (default: default, aka not textinput)
- activationMode (default: background)
- destructive (default: false)
- textInputButtonTitle (default: nil)
- textInputPlaceholder (default: nil)

Some additional things occur to match existing Android functionality:
- `uri` (or `url`) being provided in the action makes it a 'foreground' action
- action/identifier of `REPLY` changes the behavior to textinput
- `mobile_app_notification_action` is now fired with data that looks like theirs:

```
Sending action: mobile_app_notification_action
payload: ["action": "REPLY", "reply_text": "Reply text"]
```

and

```
Sending action: mobile_app_notification_action
payload: ["action": "id1"]
```
2021-04-19 04:28:39 +00:00
Zac West
13e00abaa1
Fix crash on launch in WatchApp due to module name change (#1155) 2020-10-04 18:39:46 -07:00
Zac West
77c72785ff
Update a few more housekeeping things in the project (#1142)
- Combines all .entitlements into either: App-iOS, App-catalyst, WatchApp, Extension-iOS or Extension-catalyst.
- Cleans up and renames all the schemes to match target names
- Moves around several folders and deletes some old files.
- Converts Podfile to be hierarchical, rather than calling shared methods.
- Always runs MaterialDesignIcons script; aborts early if it's up-to-date.
- Updates all dependencies.
2020-10-03 16:05:19 -07: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