Notifications

RSS for tag

Learn about the technical aspects of notification delivery on device, including notification types, priorities, and notification center management.

Notifications Documentation

Post

Replies

Boosts

Views

Activity

PushKit (fileProvider) calling didInvalidatePushTokenFor instead of didUpdate (credentials)
I think I've got all the keys and entitlements set up ok. I have no problem receiving normal alerts via the UNUserNotifications framework. Now I'm trying to use PushKit (for fileProvider). I have the following in my AppDelegate fileProvider = PKPushRegistry(queue: nil) fileProvider.delegate = self fileProvider.desiredPushTypes = [.fileProvider] along with the required delegate functions. I am never provided with credentials, only an immediate call to the didInvalidatePushToken delegate. Any suggestions appreciated.
0
0
326
Apr ’24
Encountering 400 TopicDisallowed Error with APNS for Specific App
Hello Apple Developer Community, I am reaching out for insights regarding an issue we're facing with Apple Push Notification Service (APNS). Despite successful implementation and functioning for other apps, we are consistently receiving a 400 TopicDisallowed error when trying to send push notifications to one specific app. Here's a detailed overview: Issue Summary: Push notifications sent from our server to a specific app result in a 400 TopicDisallowed error from APNS. This problem is unique to this app; notifications to other apps with similar configurations are successful. Successful Tests via Apple CloudKit Console: Notably, when using the Apple CloudKit Push Notification Console, push notifications to the problematic app are sent successfully, indicating the app's basic setup is configured correctly. Key Details: The topic field in the push notification request matches the app's bundle ID exactly. The app is downloaded from the App Store, and we are using the production environment on our server. Payload structure, APNS endpoint, and APNS Auth Key are consistent across all apps we manage. Device tokens for the problematic app validate successfully using the tool in the push notification console. Detailed server-side logging has not revealed significant differences between successful and unsuccessful push notification requests. Given these factors, we are struggling to identify the root cause of this specific issue. I am wondering if anyone in the community has faced a similar problem or could offer any insights. Any help or guidance would be immensely appreciated. Thank you in advance!
1
0
522
Apr ’24
Can p8 Key be shared in anyway?
Hello. I have a very practical problem. A company would like me to develop an iOS app for them, and my counterpart is their company's marketing team. They want me to use their Firebase account for multiple purposes, but as they are marketing team, not IT team, they do not have Apple Developer account. So in this peculiar case, as I am the developer of the app, it seems they will need my p8 key to be placed in their Firebase account in order for Push notification to work. But I have concern as p8 key sounds like something private which I should not share with others. Can anyone share with me what I should do in this very practical case? Is p8 key supposed to be sharable to others? I have tried to google this topic but I don't have any answers. I have even tried to ask on stackoverflow but admin over there said this question is opinion-based and closed my thread.
1
0
259
Apr ’24
Starting Live Activity with push notification
Hello all, I am trying to start Live Activity from remote push notification with the new ActivityKit api. The documentation for starting live activity from a push notification says: When the system receives the ActivityKit push notification on a device, it starts a new Live Activity, wakes up your app, and grants it background run time to allow you to download assets that the Live Activity needs. While the system starts the new Live Activity and wakes up your app, you receive the push token you use for updates. To update and end the Live Activity, use this update push token as if you obtained it by starting a Live Activity from within your app. Is there any information on how to get access to the background runtime and the push token, when the app is in background when the Live Activity is started? I can get the pushToStartTokenUpdates if the app is already running and push notification arrives (and starts the Live Activity), but not in the background, which makes getting updates not possible unless user launches the app. Thanks!
2
0
496
Apr ’24
How to handle Push To Start Live Activity background run time
In iOS 17.2 we can start a live activity by push, and the document says: When the system receives the ActivityKit push notification on a device, it starts a new Live Activity, wakes up your app, and grants it background run time to allow you to download assets that the Live Activity needs. My problem is, in which callback can I be notified a live activity will be start by a push, so I can download some web contents such as images before the live activity be rendered.
2
0
513
Apr ’24
Mac OS LSUIElement app does not display notifications
I made a simple applescript app to run a shell script and display a notification when it ends, it runs pretty well but I did't want the app appearing in the dock, so I added LSUIElement = true in the info.plist, and now the script runs but the app does not notify. Is there a way to have a background app (does not appear in the dock) with the ability to display notifications?
0
0
345
Apr ’24
APNS key download issue
Has anyone had problems downloading a newly created APNS key? The first key I made downloaded fine. I realised I had made it on the wrong team, so I revoked it, changed team and made a new key. The first time I clicked Download, it said the key had already been downloaded. I suspected the problem was that I had named it the same as the one I had made in error, so I revoked that new key, and made a new one with a different name, but it still wouldn't download. Has anyone had this? Any workarounds? Thx.
4
1
611
Apr ’24
live activity with push notification custom sound
在项目中用到live activity,并且使用pushnotification来更新,其中sound是用自定义的,音频差不多5秒导入主工程中main bundle ,然后测试远程推送的Payload格式如下 { "aps": { "timestamp": 1712964986737, "event": "update", "sound": "socReminder10.mp3", "content-state": { "bindTime": 1712963986737, "soc": 38, "status": 1, "updateTime": 1712963986737 }, "alert": { "title": "电量低提示", "body": "您的电量已经低于40,请尽快换电" }, "mutable-content": 1, "badge": 0 } } 虽然收到推送的消息并更新但是声音还是默认的声音,不是我定义的声音,请问这个有没有什么解决方案 对了在正常的推送中是可以播放自定义的声音,唯独是live activity 的推送不行,希望能解决我这个问题,感谢,thanks
0
0
230
Apr ’24
Is there a way for the app currently playing music or voice in the background to know when a Critical Alert or push comes?
Is there a way for the app currently playing music or voice in the background to know when a Critical Alert or push comes? Currently, my app contains code that stops playback when a call comes in while music or voice is playing in the background. So, if a call comes in during playback, it stops normally. However, there is a phenomenon in which playback cannot be stopped when a Critical Alert or push comes. When a Critical Alert or push comes to the device, is there a way in the code for the app currently playing music or voice in the background or foreground to know at that moment? We are not sending out Critical Alerts or pushes. I would like to know how to resolve the situation when receiving a Critical Alert or push sent to all users in one country.
1
0
450
Mar ’24
"Get device information" command is not working.
Hello Forum, If I send the device the "DeviceInformationCommand.Command.RequestType= DeviceInformation" command and "InstalledApplicationListCommand.Command.RequestType = InstalledApplicationList" command , it can be sent successfully, but I don't get a response from the device. https://developer.apple.com/documentation/devicemanagement/get_device_information ------------- our log ---------------------- general.log.5:[2024/03/27 13:23:30] (172.31.54.87) I #TaskUpdateInformationHandler - did:14379, udid:63a6d7edc9f1128808aaee49d80e9539b5fd9cdd, mdm_task_uuids:['0aa5f838-1891-4a9b-b4fd-9d7c0aa365d3', '3f401ea8-be87-499b-a4be-fea2b1dab379'], result:ok, cid:117 general.log.5:[2024/03/28 03:06:34] (172.31.76.98) I #TaskUpdateInformationHandler - did:14379, udid:63a6d7edc9f1128808aaee49d80e9539b5fd9cdd, mdm_task_uuids:['c46b8523-40cd-4c7e-8a5d-0e49c9d26106', '8a99b664-df27-4bc9-8f41-fe39e3a7f3bc'], result:ok, cid:117 It is transmitted successfully to the Apple MDM server, but there is no response from the device. However, policy distribution such as PushSetting works normally. I would like to get some document or help that I can refer to. Thank you.
0
0
366
Mar ’24
Push to talk block Audio session
I'm facing an issue where I can't play an audio file stored in my project after receiving a push-to-talk notification. Strangely, I'm able to play the audio file by tapping on a button before receiving the push notification, but it doesn't work afterward without any error messages. I've ensured that I've set up everything correctly in my project's capabilities. Any insights on what might be causing this issue would be greatly appreciated. I set everything in capabilities Set permission in .plist Request permission in app delegate I make connection to the room when app becomes active and received succes Then I setup .halfDuplex for this channel In restoredChannelUUID I activate AVAudioSession After sending the ppt push, I parse speaker and make it activeRemoteParticipant. I see than delegate function channelManager didActivate works good Where I tried to play audio from my player I see this prints in console, but no sound play
3
0
464
Mar ’24
Is there a way to find out whether an app installed on a device is removable?
background I want to know whether an installed app has added the "Removable" option that value is true reference We used InstallApplicationCommand with the Removable option to install the app to a managed device. https://developer.apple.com/documentation/devicemanagement/installapplicationcommand/command/attributes?language=objc Question matters I checked the following items, but no items could be obtained. https://developer.apple.com/documentation/devicemanagement/installedapplicationlistresponse?language=objc https://developer.apple.com/documentation/devicemanagement/installedapplicationlistresponse/installedapplicationlistitem?language=objc Is there any other way to determine whether an app installed on a device is removable?
0
0
221
Mar ’24
Management of APNS cert in softphone voip
I had post my app after a long develpment period, I don't know why. but in some devices works well, but in others is difficult to notice what is going on. First: my app is a softphone voip, but keep app open or in background for our register be active is not effective because of battery safety. Then is when apns coming in, we just need that or app come back to be active, even in background, to our call shows up. and this happens well in our development enviroment, exacly like I describe. but in some devices doesn't work at all. We are using apns and firebase tokens to identify our registers and devices, and keeping together in our server/DB. I will share a image to explain better the flux that I implemented: Yes, I followed all instructions to insert apns, p12 and p8 certifies in the project, I just don't know why is working only in some devices. If anybody try test this function in my app, doesn't will work because I put some rules about IP address.
0
0
212
Mar ’24