Notifications

RSS for tag

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

Notifications Documentation

Posts under Notifications subtopic

Post

Replies

Boosts

Views

Activity

Critical Messages Allow messages to
I am creating an app that uses critical messages, I have been granted this entitlement and I am adding the certificate and in the info.plist. In the app I request authorization to send messages to specific numbers. When I try the app in production from Xcode this works fine and I can send the critical messages. However, when I am using the app in the test flight the authorization does not seem to be remembered on the background. Moreover, I go to security/privacy settings and I grant permission to the selected number (I see that it only shows one number even when I have to granted, its like it removes the previous one) however when I exit the setting page the permission is reset (and therefore denied), I think this is a bug. Can you look into that. Both this removing granted permission (HIGH PRIORITY, this message can only be sent in the background, therefore the user can not grant it and why the maximum telephone number to be granted to send messages is reset also to a single one LOWER PRIORITY). Thanks
2
0
55
May ’25
Not receiving apple server notification v2 on production URL
Hello, previously i have tested the purchase via test flight and the server notification was sent to my sandbox url. Now when I made the purchase from live app, my server did not receive any notification even though the production url was the same as the sandbox url. The purchase was for a consumable product. Please help, thanks.
2
0
474
May ’25
[App Store Server Notifications] ONE_TIME_CHARGE production release...
Dear Apple! During WWDC24 you announced that ONE_TIME_CHARGE notification is available on the sandbox environment and will be available "it will be available in production later this year" - it's March 2025 and there is still no production release of this feature. Could you share some timeline and plans for when we can expect that feature deployed to production? Thanks in advance!
1
0
64
May ’25
push notifications for VOIP app Max UC
Hello, we have a problem with fake call on iPhone device for incoming calls. When I leave the iPhone in idle state for 30, 40 seconds and dialed voip app number the iPhone rings and there is no problem. When I leave it in idle for longer time one minute or two minutes I get "Call Failed to Connect" on iPhone's display and after this fake call I get second call with real calling number displays on iPhone. This first fake call is triggered by wake up push notification type 'voip'. If I switched off this wake up push notification type 'voip' and device's token has not expired yet I don't get fake call and iPhone's directly displays calling number. But in this situation we need to use wake up push notification type 'voip' on during a certain time to keep the device's token in our database and continuing to receive calling number without fake call. If we switched off the wake up push notification type 'voip' on certain time we need to activate again wake up push notification type 'voip' for incoming calls to wake up the iPhone. And in this way every time on every incoming call the iPhone's will display first fake call "Call Failed to connect" and after that the call with Calling number. How we can eliminate this fake call and use only one wake up push notification only for incoming calls not use second type wake up push on certain time? Thank you, I paste here our code for this: public ApnClient(IOptions settings) { var httpHandler = new HttpClientHandler() { ClientCertificates = { new X509Certificate2(certificate.Export(X509ContentType.Pfx)) }, }; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13; this.httpClient = new HttpClient(httpHandler) { DefaultRequestVersion = HttpVersion.Version20, DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher, BaseAddress = new Uri(settings.Value.ApnProdBaseUri), DefaultRequestHeaders = { { "apns-topic", ApnsTopic }, }, }; } public async Task<bool> WakeUpDevice(string deviceToken, string callId) { this.requestContent = new StringContent( $"{{\"aps\":{{\"content-available\":\"1\"}}}}", System.Text.Encoding.UTF8, "application/json"); var res = await this.httpClient.PostAsync($"/3/device/{deviceToken}", this.requestContent); return res.IsSuccessStatusCode; }
1
0
77
May ’25
APNs Notifications Always Failing – 0-Byte Response
Hello, We are currently facing a persistent issue where Apple Push Notifications (APNs) are no longer being delivered to devices. This is not an intermittent problem — push notifications have completely stopped working. We are using PushSharp.Apple (Version 4.0.10.0) to send the notifications. Current Behavior (Failing): Every notification request appears to be processed successfully from the server side. However, the APNs client receives a 0-byte response, and the server closes the connection. Devices do not receive the notifications at all. Logs from Current (Failing) State: APNS-Client[1]: Connected (Batch ID=1) APNS-Client[1]: Sent Batch, waiting for possible response... APNS-Client[1]: Received 0 bytes response... APNS-Client[1]: Server Closed Connection... APNS-Client[1]: Disconnected (Batch ID=1) For Reference – Successful Log From Earlier (When Notifications Worked): APNS-Client[1]: Connected (Batch ID=1) APNS-Client[1]: Sent Batch, waiting for possible response... APNS-Client[1]: Received -1 bytes response... Push Notification Successfully Sent to Device Any help, suggestions, or experience with similar issues would be greatly appreciated. Thanks!!!
1
0
108
May ’25
Can Critical Alerts Play Sound Continuously Until User Interaction?
We are developing an app that receives push notifications (via Firebase) from configured IoT devices. It is essential that when a specific type of notification is received, a sound is played continuously until the user interacts with the notification. This behavior is crucial for alerting users to certain critical states of the IoT device. We understand that Critical Alerts on iOS can bypass Do Not Disturb and silent mode. However, from our testing and available documentation, the sound from a Critical Alert seems to be limited to around 30 seconds. Our question: Is it possible on iOS to have a Critical Alert (or any other type of notification) continue playing sound until the user interacts with the notification or app? If so, could someone please point us to the appropriate documentation or APIs? Thanks in advance for any guidance.
2
0
56
May ’25
Carplay not read incoming chat message like whats app.
We have implemented Carplay in our voip based project and in this we have implemented Incoming call and chat notification feature for Carplay. For Carplay we implemented siri. Siri Object donated Successfully in Notification service Extension when notification didreceive method called. Donation Code :- func donateIncomingMessageIntent(sender: String, senderId: String, message: String, messageId: String, userInfo: [AnyHashable: Any],destination:String) { // Create proper name components clearAllinteraction() var nameComponents = PersonNameComponents() nameComponents.givenName = sender //unknown let senderPerson = INPerson( personHandle: INPersonHandle(value: senderId, type: .unknown), nameComponents: nameComponents, displayName: sender, image: nil, contactIdentifier: senderId, customIdentifier: "sender_\(senderId)" ) let recipientPerson = INPerson( personHandle: INPersonHandle(value: "me@example.com", type: .emailAddress), nameComponents: nil, displayName: "Me", image: nil, contactIdentifier: "me_id", customIdentifier: "user_id" ) let inMessage = INMessage( identifier: messageId, conversationIdentifier: "conversation_\(senderId)", content: message, dateSent: Date(), sender: senderPerson, recipients: [recipientPerson], groupName: nil, messageType: .text ) let intent = INSearchForMessagesIntent( recipients: [recipientPerson], senders: [senderPerson], searchTerms: [message], attributes: .unread, dateTime: nil, identifiers: [messageId], notificationIdentifiers: [messageId], groupNames: ["Messages"] ) let interaction = INInteraction(intent: intent, response: nil) interaction.identifier = "message_\(messageId)" interaction.direction = .incoming // Add direction DispatchQueue.global(qos: .userInitiated).async { interaction.donate { error in if let error = error { print("❌ Failed to donate INSearchForMessagesIntent: \(error.localizedDescription)") } else { print("✅ Donated INSearchForMessagesIntent successfully!") let intentData: [String: Any] = [ "senderName": sender, "senderId": senderId, "message": message, "messageId": messageId, "timestamp": Date().timeIntervalSince1970, "conversationId": "conversation_\(senderId)", // Add conversationId "destination":destination ] let defaults = UserDefaults(suiteName: "group.com.chatapp") // 🔁 Use your App Group ID defaults?.removeObject(forKey: "lastCarPlayIntentData") defaults?.set(intentData, forKey: "lastCarPlayIntentData") defaults?.synchronize() } } } } Here SenderID is like 3000@abc,2000@abc etc. In siri ,When we handle INSearchForMessagesIntent at that time all data getting from Userdefaults because without Userdefaults INSearchForMessagesIntent value nil. Even we enabled announcement using .allowAnnouncement. We also tried to save same sender in contact Book because sometime siri search contact and not found then may be raise this type of issue. So we need code level support for read incoming message in carplay when notification comes. Thank you.
0
0
73
May ’25
track PushNotification delivery
Hello Team, We are working on a requirement where the business wants to track the delivery of push notifications on iOS devices. Specifically, they want to capture the moment when the device receives the notification and it appears as a badge in the Notification Center—regardless of whether the app is in the background or not—and then send that delivery status back to APNs. We have explored multiple approaches, but so far, we are only able to capture events when the user interacts with the notification banner. We would like to understand: Is it technically possible to send an event to APNs or another service upon receipt of the notification on the device without requiring user interaction? Any guidance or recommendations would be greatly appreciated.
8
0
73
May ’25
App notifications are failing to trigger
Facing issue while sending push notification through the application. The APNs certificate is valid. Below is the error log. System.AggregateException: One or more errors occurred. ---> PushSharp.Apple.ApnsNotificationException: Apns notification error: 'ConnectionError' ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult) at System.Net.Sockets.NetworkStream.EndWrite(IAsyncResult asyncResult) --- End of inner exception stack trace --- at System.Net.Security._SslStream.EndWrite(IAsyncResult asyncResult) at System.Net.Security.SslStream.EndWrite(IAsyncResult asyncResult) at System.IO.Stream.<>c.b__53_1(Stream stream, IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncTrimPromise1.Complete(TInstance thisRef, Func3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at PushSharp.Apple.ApnsConnection.<SendBatch>d__21.MoveNext() --- End of inner exception stack trace --- at PushSharp.Apple.ApnsServiceConnection.<Send>d__2.MoveNext() --- End of inner exception stack trace --- ---> (Inner Exception #0) PushSharp.Apple.ApnsNotificationException: Apns notification error: 'ConnectionError' ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult) at System.Net.Sockets.NetworkStream.EndWrite(IAsyncResult asyncResult) --- End of inner exception stack trace --- at System.Net.Security._SslStream.EndWrite(IAsyncResult asyncResult) at System.Net.Security.SslStream.EndWrite(IAsyncResult asyncResult) at System.IO.Stream.<>c.<BeginEndWriteAsync>b__53_1(Stream stream, IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncTrimPromise1.Complete(TInstance thisRef, Func3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at PushSharp.Apple.ApnsConnection.d__21.MoveNext() --- End of inner exception stack trace --- at PushSharp.Apple.ApnsServiceConnection.d__2.MoveNext()<---
1
1
132
May ’25
Audio Session in Notification Service Extension
Is there anyway that I could use AVAudioSession, AVAudioPlayer or anything similar in Notification Service Extension? I am trying to implement Audio Playback in the Notification Service Extension to play specific audio file when receiving Notification regardless the app state(foreground, background or killed), but I am not able to activate audio session in Notification Service Extension. NSError *sessionError = nil; BOOL success = [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&sessionError]; success = [[AVAudioSession sharedInstance] setActive:YES error:&sessionError]; if (!success) { NSLog(@"Error activating audio session: %@", sessionError); } Below is the error that I got when I am trying to run the code above in Notification Service Extension. Error Domain=NSOSStatusErrorDomain Code=561015905 "Session activation failed" UserInfo={NSLocalizedDescription=Session activation failed}
1
0
65
May ’25
Push notification volume for custom sound
Is there a way to configure the APNS notification sound volume to be louder? I am implementing some custom sounds(narrative sentences) for APNS, it does play the custom sound, but the volume of the custom sound is not loud enough even though I had set the device's volume and "RingTone and Alerts" volume to max. I tried to amplify the custom sound file, it does play louder but the result is minimum if I want to maintain the quality of the sound without it been distorted. I tried to use Notification Service Extension, AVAudioPlayer and AVAudioSession to play the sound, it does play louder in max volume compare with relying on default sound payload in APNS, but the problem is AVAudioPlayer and AVAudioSession do not seems to be usable when the application is in background or killed state, is there any other alternative I could use?
3
0
80
Apr ’25
Push notifications - Traffic gets "server-rst"
It seems our company server is sending to Apple push service the push notifications that are supposed to be transferred to devices our app is installed on – but you it seems you are blocking the request We can see traffic going out from our server side towards the apple gateway notification server using port 2195 and we can see that the traffic gets "server-rst" meaning that the apple gateway server kills the connection You might need to whitelist our external IP's
3
0
85
Apr ’25
Can I listen to user choice when asked for update permissions on Live Activity?
We would like to better understand the discrepancy between a Push To Start and the subsequent Updates where I see a number of recipients drop greatly. Our assumption is that this is a result of the end user not clicking the "Allow" prompt when a push to start widget is shown on the screen for the first time, but we currently do not have a way to listen to the user's choice when prompted. Is there any way of tapping into this, to determine if this is in fact where the variance is coming from, or if there is actually just a problem with the request to retrieve the update token from our end?
1
0
44
Apr ’25
Silent Push Notification Handling Behavior
I'm observing that when a silent push notification is sent to our app, is is started up in the background for 30 seconds before being suspended until the app is launched by the user. This causes data to persist from the silent push notification to the user app launch. I couldn't find documentation on this behavior for silent push notifications, and was wondering if it's possible to have the app terminate after handling the silent push notification. Is there documentation on the general flow of silent push notifications as well? I'm able to handle the edge cases if the app has to be suspended until user launch, but just want to confirm that this is the expected behavior before I go about handling it this way.
1
0
69
Apr ’25
/The notifications/test request was successful, but there were no notification messages from the Apple Store
requestUrl:https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/test method:Post responseCode:200 testNotificationToken:06beba6c-7587-44f6-a4b8-f12b11db6061_1745832671126 Request environment: ①APP from: TestFlight ②Apple acount : Sandbox account ③Apple originalTransactionId: 2000000907966801 App Store sandbox server notification configuration is fine(https://*.com/v2/apple_refund_notify), I have tried many times, but have not received any notification from Apple. Is this API not working?
2
0
79
Apr ’25