From 33bbc740c3fab4b4bb0b0ec71402e6069e568a9d Mon Sep 17 00:00:00 2001 From: rbflurry Date: Sun, 24 Sep 2017 04:20:19 -0400 Subject: [PATCH] add example (#3427) * add example adds a example of a camera content message with actions. This is possible in version 0.54.0 * Remove blank line --- .../notifications/content_extensions.markdown | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/_docs/ecosystem/ios/notifications/content_extensions.markdown b/source/_docs/ecosystem/ios/notifications/content_extensions.markdown index 8f70fcb8ef6..b22dca31a8f 100644 --- a/source/_docs/ecosystem/ios/notifications/content_extensions.markdown +++ b/source/_docs/ecosystem/ios/notifications/content_extensions.markdown @@ -79,6 +79,27 @@ data: As you can see the `category` key is used to tell the device what kind of content extension to use. You can use the same category identifiers in your own custom [actions](/ecosystem/ios/notifications/actions/) to add actions to the content extension. +For example this configuration adds actions to a camera content message. + +```yaml +ios: + push: + categories: + - name: Camera With Actions + identifier: 'camera' + actions: + - identifier: 'OPEN_COVER' + title: 'Open Cover' + activationMode: 'background' + authenticationRequired: yes + destructive: no + - identifier: 'CLOSE_COVER' + title: 'Close Cover' + activationMode: 'background' + authenticationRequired: yes + destructive: yes +``` + # Troubleshooting If you are having problems with receiving these special notifications try restarting your phone first. The extensions somewhat often fail to register properly until a restart.