Send communication and Time Sensitive notifications

RSS for tag

Discuss the WWDC21 session Send communication and Time Sensitive notifications.

Posts under wwdc21-10091 tag

9 Posts

Post

Replies

Boosts

Views

Activity

Time Sensitive Notifications Aren't Working
I am trying to add time sensitive notifications to my task/reminder app, but I am having some difficulty. Here is the code I am using currently: let center = UNUserNotificationCenter.current() let content = UNMutableNotificationContent() content.title = "Productivi" // that's the name of the app content.body = "\(taskObject.content)" //task content content.categoryIdentifier = "TASK_REMINDER" if #available(iOS 15,*) { print("Using ios 15 for set notification") content.interruptionLevel = .timeSensitive } For the adding notification request, that part works, however when the notification shows up, it isn't a time sensitive one. (I was testing in simulator and on my phone both running iOS 15.4) I can't figure out what else there is I have to do in order to enable the feature. I've done everything it says to do, is their an entitlement or capability I have to add. If so, what is it called and can some one please give me detailed steps on how to add that for local notifications in XCODE? Thank you, -Rohan
1
0
1.5k
Apr ’22
Time sensitive push only works after reinstall
I was implementing time sensitive (remote) push notifications for my app. Which works when I delete the previous version and install the new version. However, it does not work when updating the app from the older version to the newer one which supports time sensitive notifications. I have enabled Time Sensitive Notifications in the developer console and the entitlement file looks like this <?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>aps-environment</key> <string>development</string> <key>com.apple.developer.usernotifications.time-sensitive</key> <true/> </dict> </plist> This is the content of the notification {"aps":{"alert":"Reward", "sound": "default", "interruption-level": "time-sensitive"}, "type": "reward", "rewardText": "Cool dude", "rewardPoints": 200} Anyone got an idea?
2
0
1.4k
Apr ’22
iOS 15 Communication Notifications not working!
Hello, I recently wrote a Notification Service Extension to allow me to specify a "sender-url" and "attachment-url" property with urls from my backend which are then used to display the appropriate icon images in the sent push notification. Below are all the steps I have taken: Created a Notification Service Extension Added the "Push Notifications" and "Communication Notifications" abilities to my main app. Added (Dict) -> "NSUserActivityTypes" (Array) -> "INSendMessageIntent" (String) to my main app's Info.plist. Added the "NSExtensionAttributes" (Dictionary) -> "IntentsSupported" (Array) -> "INSendMessageIntent" (String) to my Notification Service Extension's Info.plist. I have double checked Apple Developer Portal to make sure that my main App has both the "Push Notifications" and "Communication Notifications" Capabilities. My Notification Service Extension works flawlessly for displaying attachment images through the "attachment-url" property but my extension is unable to properly display a Communication Notification with the custom icon. There are no errors thrown in my code and my extension runs flawlessly yet the notification comes through unchanged when attempting to send it as a Communication Notification. I would also like to add that Communication Notifications work perfectly when I send them locally from the app by following this guide: https://gist.github.com/Dexwell/dedef7389eae26c5b9db927dc5588905 so It is clear that the problem is not my code but the fact that the Communication Notification is being initialized through a Service Extension instead of the app itself. The Apple documentation for Communication Notifications is extremely confusing and thus any help regarding this matter would be appreciated. Full Logs
0
0
1.7k
Mar ’22
Multiple avatars to a intent in communication notifications
I was trying to add multiple sender avatars to a group conversation communication notifications but it's not reflecting in UI. Every Sender object has an image property which has an image value but not all images are showing up in the notification avatar. Also, tried to replicate this locally by creating a custom collage and assign it as image but the InImage doesn't take the local images to render and just showing empty avatar. How can we add multiple avatars to communication notifications? And how can we read InImage from local?
1
0
1.2k
Feb ’22
APNS Content Available Push not working in iOS 15
APNS Content available push not received in iOS 15 device when app builds with Xcode 13.0, iOS 15 SDK. Push payload data with content available:1 not working {"aps":{"content-available":1},"update":"2|1"} but normal notification message push working {"aps":{"alert":"welcome"}} is there any payload or configuration in the header field for the iOS 15 silent push message?
2
0
2.4k
Nov ’21
iOS 15 - "Keep..." button in user notifications doesn't save the settings
Hi, When receiving provisional user notifications in iOS 15 the "Turn Off..." button works fine, but the "Keep..." button doesn't save the settings. "Deliver Immediately" option doesn't do anything and "Deliver in Scheduled Summary" hides the buttons, but they appear again in next notification. I've noticed this behavior with several different apps, for example Reddit. Does anyone know anything about this? I have also submitted a bug to Apple but no response so far. select Deliver Immediately can not save , my select , nextTime has new notification , let me select Deliver Immediately or Deliver in Scheduled Summary again . xcode 13.1 iphone 15.1
0
0
1.1k
Nov ’21
Time Sensitive Notifications Aren't Working
I am trying to add time sensitive notifications to my task/reminder app, but I am having some difficulty. Here is the code I am using currently: let center = UNUserNotificationCenter.current() let content = UNMutableNotificationContent() content.title = "Productivi" // that's the name of the app content.body = "\(taskObject.content)" //task content content.categoryIdentifier = "TASK_REMINDER" if #available(iOS 15,*) { print("Using ios 15 for set notification") content.interruptionLevel = .timeSensitive } For the adding notification request, that part works, however when the notification shows up, it isn't a time sensitive one. (I was testing in simulator and on my phone both running iOS 15.4) I can't figure out what else there is I have to do in order to enable the feature. I've done everything it says to do, is their an entitlement or capability I have to add. If so, what is it called and can some one please give me detailed steps on how to add that for local notifications in XCODE? Thank you, -Rohan
Replies
1
Boosts
0
Views
1.5k
Activity
Apr ’22
Time sensitive push only works after reinstall
I was implementing time sensitive (remote) push notifications for my app. Which works when I delete the previous version and install the new version. However, it does not work when updating the app from the older version to the newer one which supports time sensitive notifications. I have enabled Time Sensitive Notifications in the developer console and the entitlement file looks like this <?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>aps-environment</key> <string>development</string> <key>com.apple.developer.usernotifications.time-sensitive</key> <true/> </dict> </plist> This is the content of the notification {"aps":{"alert":"Reward", "sound": "default", "interruption-level": "time-sensitive"}, "type": "reward", "rewardText": "Cool dude", "rewardPoints": 200} Anyone got an idea?
Replies
2
Boosts
0
Views
1.4k
Activity
Apr ’22
iOS 15 Communication Notifications not working!
Hello, I recently wrote a Notification Service Extension to allow me to specify a "sender-url" and "attachment-url" property with urls from my backend which are then used to display the appropriate icon images in the sent push notification. Below are all the steps I have taken: Created a Notification Service Extension Added the "Push Notifications" and "Communication Notifications" abilities to my main app. Added (Dict) -> "NSUserActivityTypes" (Array) -> "INSendMessageIntent" (String) to my main app's Info.plist. Added the "NSExtensionAttributes" (Dictionary) -> "IntentsSupported" (Array) -> "INSendMessageIntent" (String) to my Notification Service Extension's Info.plist. I have double checked Apple Developer Portal to make sure that my main App has both the "Push Notifications" and "Communication Notifications" Capabilities. My Notification Service Extension works flawlessly for displaying attachment images through the "attachment-url" property but my extension is unable to properly display a Communication Notification with the custom icon. There are no errors thrown in my code and my extension runs flawlessly yet the notification comes through unchanged when attempting to send it as a Communication Notification. I would also like to add that Communication Notifications work perfectly when I send them locally from the app by following this guide: https://gist.github.com/Dexwell/dedef7389eae26c5b9db927dc5588905 so It is clear that the problem is not my code but the fact that the Communication Notification is being initialized through a Service Extension instead of the app itself. The Apple documentation for Communication Notifications is extremely confusing and thus any help regarding this matter would be appreciated. Full Logs
Replies
0
Boosts
0
Views
1.7k
Activity
Mar ’22
Multiple avatars to a intent in communication notifications
I was trying to add multiple sender avatars to a group conversation communication notifications but it's not reflecting in UI. Every Sender object has an image property which has an image value but not all images are showing up in the notification avatar. Also, tried to replicate this locally by creating a custom collage and assign it as image but the InImage doesn't take the local images to render and just showing empty avatar. How can we add multiple avatars to communication notifications? And how can we read InImage from local?
Replies
1
Boosts
0
Views
1.2k
Activity
Feb ’22
APNS Content Available Push not working in iOS 15
APNS Content available push not received in iOS 15 device when app builds with Xcode 13.0, iOS 15 SDK. Push payload data with content available:1 not working {"aps":{"content-available":1},"update":"2|1"} but normal notification message push working {"aps":{"alert":"welcome"}} is there any payload or configuration in the header field for the iOS 15 silent push message?
Replies
2
Boosts
0
Views
2.4k
Activity
Nov ’21
iOS 15 - "Keep..." button in user notifications doesn't save the settings
Hi, When receiving provisional user notifications in iOS 15 the "Turn Off..." button works fine, but the "Keep..." button doesn't save the settings. "Deliver Immediately" option doesn't do anything and "Deliver in Scheduled Summary" hides the buttons, but they appear again in next notification. I've noticed this behavior with several different apps, for example Reddit. Does anyone know anything about this? I have also submitted a bug to Apple but no response so far. select Deliver Immediately can not save , my select , nextTime has new notification , let me select Deliver Immediately or Deliver in Scheduled Summary again . xcode 13.1 iphone 15.1
Replies
0
Boosts
0
Views
1.1k
Activity
Nov ’21