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

Problems with APNS (push notifications feedback)
Hello here,I am having issues to connect to 'feedback.push.apple.com:2196' for feedback push notifications. My PHP script has been working perfectly until I have renewed the push notification .pem certificate, but now it gives me this error:PHP Warning: stream_socket_client(): Failed to enable crypto in myscript.php on line 10Fact is: the new certificate works because I am able to send out push notifications to my app users, so, where is the problem??!!Here is the PHP script I am using to connect to the service ( I left out the part working on the returned data which is irrilevant for the connection issue):$passphrase = 'mypw'; $stream_context = stream_context_create(); stream_context_set_option($stream_context, 'ssl', 'local_cert', '/path/to/mycertificate.pem'); stream_context_set_option($stream_context, 'ssl', 'passphrase', $passphrase); $apns = stream_socket_client('ssl://feedback.push.apple.com:2196', $errcode, $errstr, 60, STREAM_CLIENT_CONNECT, $stream_context); if(!$apns) { echo "ERROR $errcode: $errstr\n"; return; } ///Read data here... fclose($apns);Any ideas are very welcome!Thanks to everyone in advance.Fab.
2
1
2.3k
Jan ’16
Voip Push notifications missed delay
Hi all,In our application we Use VoIP Type push notifications to give a heads-up for the mobile phone.This allows the mobile phone to:1) If the application is killed, start it in background2) If the application is in Background, start running the application statemachine3) If the Phone is in deep sleep, Wake up and start the application in BackgroundDue to the above, our application arrives in a state where we can receive an incoming voip Call.It has been observed that there is a delay in the push notification arrival at the mobile phone.Delayed arrival/delivery of Push notification has been measured of about 6 sec or sometimes never arrives.This espicially is the case when we have an iPhone without sim-card.Note :- This was tested on a controlled setup with large number of iterations with good WiFi and internet connectiviy)- We ensured during testing that the push was actually dispatched to APNS.It is unknown as to what exactly causes a variation in the arrival of the voip notification.Can someone explain why :- Voip messages arrive late depite they should be 'instant' ?- What could explain the difference in measurments with/without sim card ?Best regards.
6
0
6.4k
Jan ’18
unregisterForRemoteNotifications and isRegisteredForRemoteNotifications are working ?
Hi,i'm a newbie and need your help.I had a little old project written in object-c in which i had a switch to turn on and off push notifications directly in inside app, and it is working correctly.I'm trying now to rewrite from scratch in swift.It seems now that unregisterForRemoteNotifications, is not working and even if i execute it :1) I continue receive pushes2) isRegisteredForRemoteNotifications continue to return trueDo you have any idea ? are above command supposed to work in swift ?B. regardsFabrizio
1
1
592
Feb ’20
Application will not be launched because it failed to report an incoming call too many times (or repeatedly crashed.)
Hi,I am developing iOS app which receives VoIP Push Notifications and next calls CallKit | Apple Developer Documentation to bring Incoming Call UI panel. From time to time however the app fails to start, with error as below logged into the device console:default 10:29:04.933753+0200 callservicesd Application will not be launched because it failed to report an incoming call too many times (or repeatedly crashed.) default 10:29:04.933836+0200 callservicesd VoIP push for app dropped on the floorMy question is: does anyone know if statistics about application crashes and/or "failed to report an incoming call" are stored locally on the device? Or perhaps collected on Apple servers and used for all instances of my app on all devices out there?In case of the first scenario - does anyone know how to reset this stats on the device, so the Push Notification will be starting the app again?In case the second scenario - is there any way to flag device to Apple server as "development" and have it excluded from the stats? So it doesn't affect "production" app instances out there?Any help and suggestions very much appreciated.Regards,Chris
3
0
2.1k
Apr ’20
Impact on existing iOS App by updating to the enhanced HTTP/2 based API from server side
I have an existing iOS application available on AppStore which has push notification implemetented. Currently we are using the legacy binary protocol in Server side while sending request to the Apple Push Notification service (APNs) which will no longer support post of November 2020.We are making changes to update this with enhanced HTTP/2 based API in server side to communicate with APNS, will this impact my existing iOS application? Do I need to make any changes / code changes from client (iOS App) side to make it compatible with my existing application?
1
0
1.2k
Jun ’20
VoIP push notification without VoIP funcionality
Hello, we're currently working on an app for emergency organisations. In case of an emergency it's crucial to alert all users just in time. We've tested remote notifications. They're not really reliable for a time critical use case. Our idea is to use VoIP push notifications to alert the users. Before we start testing it, I would like to know if we'll run into an issue with the App Store approval if we just use VoIP PN without having VoIP functionality in our app. Regards, Enno
3
0
2.1k
Oct ’20
Notification Service Extension Not working
Hi Team, I was trying to add NSE to my Project to show Rich messaging. Creation of the NSE target to the project - Successful. Creation of additional provisioning profile in developer portal for NSE and mapped it in XCode - Successful The APS payload contains the content-type: 1 and attachment url to download the media content - Successful. When notification arrive the will present method gets called first - Successful. The auto execution of Notification Service 'didReceive(_ request: UNNotificationRequest,          withContentHandler contentHandler: @escaping            (UNNotificationContent) - Void)' - failure. 6. Tried running the target instead of main app - failure 7. Tried attaching a debugger to get break point - failure 8. Debug and Console logs - failure 9. Additionally tried the below option from every developer suggestion but no luck. o  https://stackoverflow.com/questions/50853503/images-in-ios-push-notification o  https://stackoverflow.com/questions/51722109/unnotificationserviceextensions-didrecieve-not-called o  https://stackoverflow.com/questions/39663903/ios10-unnotificationserviceextension-not-called o  https://stackoverflow.com/questions/46463680/notificationserviceextension-not-called o  https://stackoverflow.com/questions/45483018/unnotificationserviceextension-not-working-on-iphone-5-ios-10 Could you please assist on the same to get it working as the notification service methods cannot be called explicitly and it needs to be triggered by OS. A quick, faster response and resolution is much appreciated.
12
2
15k
Feb ’21
api.sandbox.push.apple.com:443 & api.push.apple.com:443 Push notification not receiving
We have configured the push notification service (Server-provider) to communicate with APNS with hostname: api.sandbox.push.apple.com and Port: 443. APNS request is going successfully but from APNS to device (iPhone 6S ) not coming. We have whitelisted the above port and other ports also(2195, 2197). but. still not able to receive the notification. We have also cross verified with the old gateway.sandbox.push.apple.com:2195 and it's working fine but with new api.sandbox.push.apple.com:443, not working. Could someone from Apple Community help us to get resolved this issue? Thanks in advance!!
6
0
5.4k
Mar ’21
iOS VoIP App running on M1 Mac Callkit and Pushkit not working
I took delivery of my first M1 Mac (iMac running Big Sur 11.4) and with great anticipation installed my iOS VoIP App from the AppStore. I was greatly disappointed to see that There were no VoIP Pushes to start an incoming call Callkit does not seem to work so I get no Audio. Am I missing something? Is there some permissions or configuration I might need to set? Or is it just that Callkit and Pushkit don't work even though it states on developer.apple.com that they are supported on macOS 10.15+ Any advice or guidance greatly appreciated. Very disappointed :-(
6
1
2.1k
Jul ’21
Beacon region triggered notifications no longer trigger on iOS 15
UNNotificationRequests with a UNLocationNotificationTrigger created using a CLBeaconRegion can be scheduled and are returned in the pending list when the getPendingNotificationRequests method is called on UNUserNotificationCenter. However, they never trigger based on beacon region entry or exit. This is a change in behavior from iOS 14. I can't find any reference to this change in the WWDC21 presentations. Can anyone confirm if this change is intentional and documented anywhere or likely a bug.
6
0
1.6k
Aug ’21
How to get Critical Alerts entitlement for custom alarm clock?
Hello everyone! Our team is in the middle of developing a new sleep tracking app with a bunch of additional features including a custom alarm clock. And we need Critical Alerts entitlement for this feature to work as only such notifications (critical interruption level for iOS 15) can break through Silence Ring & Do Not Disturb mode, which is necessary as users obviously won't wake up without the alarm actually going off. We've applied twice already, clearly stating the purpose of this entitlement, but both times received the same answer: "Unfortunately, this API is not designed for the use you've identified". While Apple Developer documentation on the matter is rather elusive and states that, among others, home- & health-related purposes are allowed, I couldn't find any straightforward info about our particular case. Moreover, I can easily name a few apps in the Health & Fitness category with exactly the same alarm clock functionality that works and obviously utilizes Critical Alerts entitlement. So I wonder, can anyone give a piece of advice on how to get this entitlement? Maybe we need to provide some additional info or meet some unannounced conditions? Any info will be highly appreciated.
1
0
831
Sep ’21
iOS 15 - "Keep..." button in provisional 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.
7
1
2.4k
Oct ’21
Source code for Push To Talk demo app?
I was just watching the Enhance voice communication with Push To Talk WWDC22 session video and was wondering (a few questions) -- (1) (when) will you be making the demo app available that was shown at the beginning of the video? (2) There was some detail given regarding the new APNs push type ("pushtotalk"), but it was unclear to me if that's something I need to handle manually, or if those will be sent automatically when I do channelManager.requestBeginTransmitting? (3) How does the audio data itself get routed around? Is that handled by the system between the requestBeginTransmitting and stopTransmitting calls? Or somehow part of the APNs payload? Or something we must handle? Thank you! thanks!!
6
1
2.7k
Jun ’22
Critical Alerts suppressed by Apple Watch
When an iPhone is paired with an Apple Watch and receives a critical alert, no sound is played. This makes it very easy to miss such notifications and defeats entirely the purpose of critical alerts. For context, we build an app that improves the care coordination of heart attacks. We send critical alerts to notify healthcare professionals of such emergencies. These events may occur at night, when the user does not wear the Watch, and will therefore be likely to miss the notification entirely, which can be catastrophic. I have searched online thoroughly for work-arounds but have not found anything. Others have asked this before elsewhere but have not found definitive answers: link. Is there anything we can do as developers to force critical alerts to be handled by the phone, or at least to force the phone to ring when receiving a critical alert? Edit: I am aware that in the Watch app, it is possible to prevent notifications from being mirrored by the Watch. However, this requires the end user to exit my app and navigate their settings. It is also impossible for my app to check if this was done correctly. As such, I am completely in the blind as to whether the user has set up their notifications correctly.
8
7
3.2k
Jul ’22
PushKit sometime not returning VoIP token
We are implementing PushKit/CallKit for audio video calls. When the app starts, it immediately in AppDelegate-didFinishLaunchingWithOptions create the PKPushRegistry, set the delegate and ask for the token with desiredPushTypes and upload the token to our backend when PKPushCredentials are received. Then when didReceiveIncomingPushWith is called, it directly reports the call to CallKit. That works fine on all devices, with the app in foreground, background, killed etc.. But on one slow device (iPhone 7, iOS 15.6.1) when the app has been killed for some time, the app do not receive anymore the token. Then at some point PushKit doesn't wake the app anymore, as CallKit was not notified. According to the console logs by filtering callservicesd, the time between receiving the PushKit notification being received and delivering the token changes a lot, and then can timeout: Successful call: default 15:00:58.181051+0200 callservicesd Received incoming APS message from application with bundle identifier <private> and topic <private> // ... default 15:01:00.627903+0200 callservicesd Delivering token <private> to application <private> So 2 seconds. Failing call: default 14:13:20.325371+0200 callservicesd Received incoming APS message from application with bundle identifier <private> and topic <private> // ... default 14:13:28.827702+0200 callservicesd Delivering token <private> to application <private> // ... default 14:13:32.325062+0200 callservicesd Invalidating process assertion for bundle ID <private> from timeout 8 seconds. Even if "callservicesd Delivering token" is written in the logs, the app do not receive it. Then for the failing call, as didUpdate pushCredentials and didReceiveIncomingPushWith are not called, the app get killed: default 14:13:32.326334+0200 runningboardd Invalidating assertion 33-134-19180 (target:[application<myAppId>:1363]) from originator [daemon<com.apple.telephonyutilities.callservicesd>:134] default 14:13:32.393456+0200 runningboardd Received termination request from [daemon<com.apple.telephonyutilities.callservicesd>:134] on <RBSProcessPredicate <RBSProcessIdentityPredicate| application<myAppId>>> with context <RBSTerminateContext| domain:10 code:0xBAADCA11 explanation:<no explanation given> reportType:CrashLog maxTerminationResistance:Interactive> error 14:13:32.404027+0200 callservicesd Killing VoIP app <private> because it failed to post an incoming call in time. Is there any way to make sure that the token and the VoIP push will be delivered in time and not be killed by iOS, even on slow device?
3
3
1.6k
Oct ’22
Can't update Live Activity from app with ActivityKit when app is running in the background with background audio playing.
I had a timer app, it played white noise after starting the timer. so my app is running in the background with background audio, and the timer is perfect for display with live activity. However, when I test my code with a real device, I find calling await activity.update(using: contentState) when app is running in the background does not work at all. the code executes, but the live activity won't get updated. After some experiments, I find: if the app is running in the background with background location or Picture-in-picture mode, the app can update live activity when running in the background. If the app is running in the background with audio playing, it will work on simulator, but not on a real device. I submit a feedback: FB11683922 (Can't update Live Activity from app with ActivityKit when app is running in the background with background audio playing.) My code is like: func startLiveActivity() { // Prepare content state and attributes.     do {       self.activity = try Activity.request(attributes: activityAttributes, contentState: initialContentState) // Play audio so app can keep running in the background.       try playAudio()     } catch (let error) {       print("Error requesting Live Activity \(error.localizedDescription).")     }   } private func playAudio() throws {     try AVAudioSession.sharedInstance().setCategory(.playback, options: .mixWithOthers)     try AVAudioSession.sharedInstance().setActive(true)     if self.player == nil {       if let url = Bundle.main.url(forResource: "Forest", withExtension: "m4a") {         player = try AVAudioPlayer(contentsOf: url)         player?.numberOfLoops = -1       }     }     player?.stop()     player?.currentTime = 0     player?.play()   } after the timer stops, the code will execute, but the live activity won't get updated.   func updateActivity(){     Task {       if let activity = self.activity { // Prepare content state         await activity.update(using: contentState)       }     }   }
19
7
6.2k
Oct ’22