mirror of
https://github.com/home-assistant/iOS.git
synced 2026-07-02 14:29:42 -05:00
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" ```   ## 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"] ```
70 lines
2.0 KiB
Plaintext
70 lines
2.0 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>CFBundleDevelopmentRegion</key>
|
|
<string>en</string>
|
|
<key>CFBundleDisplayName</key>
|
|
<string>NotificationContentExtension</string>
|
|
<key>CFBundleExecutable</key>
|
|
<string>$(EXECUTABLE_NAME)</string>
|
|
<key>CFBundleIdentifier</key>
|
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
<key>CFBundleInfoDictionaryVersion</key>
|
|
<string>6.0</string>
|
|
<key>CFBundleName</key>
|
|
<string>$(PRODUCT_NAME)</string>
|
|
<key>CFBundlePackageType</key>
|
|
<string>XPC!</string>
|
|
<key>CFBundleShortVersionString</key>
|
|
<string>$(MARKETING_VERSION)</string>
|
|
<key>CFBundleVersion</key>
|
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
|
<key>NSAppTransportSecurity</key>
|
|
<dict>
|
|
<key>NSAllowsArbitraryLoads</key>
|
|
<true/>
|
|
</dict>
|
|
<key>NSExtension</key>
|
|
<dict>
|
|
<key>NSExtensionAttributes</key>
|
|
<dict>
|
|
<key>UNNotificationExtensionCategory</key>
|
|
<array>
|
|
<string>camera</string>
|
|
<string>camera1</string>
|
|
<string>camera2</string>
|
|
<string>camera3</string>
|
|
<string>camera4</string>
|
|
<string>map</string>
|
|
<string>map1</string>
|
|
<string>map2</string>
|
|
<string>map3</string>
|
|
<string>map4</string>
|
|
<string>map5</string>
|
|
<string>CAMERA</string>
|
|
<string>CAMERA1</string>
|
|
<string>CAMERA2</string>
|
|
<string>CAMERA3</string>
|
|
<string>CAMERA4</string>
|
|
<string>MAP</string>
|
|
<string>MAP1</string>
|
|
<string>MAP2</string>
|
|
<string>MAP3</string>
|
|
<string>MAP4</string>
|
|
<string>MAP5</string>
|
|
<string>DYNAMIC</string>
|
|
</array>
|
|
<key>UNNotificationExtensionInitialContentSizeRatio</key>
|
|
<integer>0</integer>
|
|
<key>UNNotificationExtensionUserInteractionEnabled</key>
|
|
<true/>
|
|
</dict>
|
|
<key>NSExtensionMainStoryboard</key>
|
|
<string>MainInterface</string>
|
|
<key>NSExtensionPointIdentifier</key>
|
|
<string>com.apple.usernotifications.content-extension</string>
|
|
</dict>
|
|
</dict>
|
|
</plist>
|