User Notifications

RSS for tag

Push user-facing notifications to the user's device from a server or generate them locally from your app using User Notifications.

User Notifications Documentation

Posts under User Notifications tag

174 Posts
Sort by:
Post not yet marked as solved
6 Replies
6.3k Views
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.
Posted
by
Post not yet marked as solved
4 Replies
3.9k Views
I am trying to implement silent push notification in my application where I need to update some data in the server when silent notification comes. I am using Pushkit and it uses VoIP certificate for silent push notification but the app has been rejectd by Apple saying that "I can't use VoIP" certificate. It seems that apple has rejected it as I don't have any VoIP call functionality in my app. In that case how can I implement silent push notification so that my app gets activated even if it is not runnning(not even in the background) and I can update the server?
Posted
by
Post not yet marked as solved
1 Replies
552 Views
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
Posted
by
Post not yet marked as solved
3 Replies
2.0k Views
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
Posted
by
Post not yet marked as solved
1 Replies
1k Views
I have set with a wildcard in my xcode-> Associated domain -> app links:*.mydomain.comAnd I have all subdomains AASA file generated from server side correctly. When I click the shared link, the link does not take me to the app. Please let me know how could this be fixed.
Posted
by
Post not yet marked as solved
22 Replies
12k Views
Hi There, I'm experiencing some frustration with Bug Sur and I wondered if this is something anyone else has experienced.. Essentially - I've noticed that when the battery goes below 10pc, it doesn't notify you. So, you can be working away in full screen (which I do, frequently) or in the middle of work calls and the Mac just "dies". In Catalina a notification came up saying that your battery was low and to plug it in - but not Big Sur (yet) Please, put this back in - I don't want to have to keep checking my status bar all the time
Posted
by
Post not yet marked as solved
3 Replies
3.1k Views
I'm working on an app that makes use of both regular (visible) push notifications and silent push notifications. Both types are working fine on a device, but only the regular type is working in the simulator. I'm sending the same test payloads to both the device and simulator. To be more specific, I use this payload for a silent push notification: { 	"aps": { 		"content-available": 1 	}, 	"Simulator Target Bundle": "com.mycompany.MyApp" } And I try to send this payload to the simulator with this command: xcrun simctl push booted com.mycompany.MyApp silent.apns As far as I can see, the app in the simulator does not respond to this silent push notification, but the app on a device does when running both in the foreground and background. Is this a known issue? If so, has anybody been able to get this to work? Or are silent push notifications just not supported on the simulator (yet)?
Posted
by
Post not yet marked as solved
7 Replies
6.4k Views
I don't know what could be wrong but my UNNotificationServiceExtension is never getting called by any push from FCM. I call the FCM from a Python3 script and so far it works (I get a push notification but always with the default text and not the modified one). firebaseHeaders = { "Content-Type":"application/json", "Authorization":"key=MYKEY" } firebaseBody = { "to":devicetoken, "priority":"high", "mutable-content":True, "apns-priority":5, "notification": { "titlelockey":"push.goalReachedTitle", "bodylockey":"push.goalReachedContentRemote", "bodylocargs":[str(entry['value']), entry['region']], "sound":"default", "badge":1 }, "data": { "values":data, "region":entry['region'], "value":entry['value'] } } firebaseResult = requests.post("https://fcm.googleapis.com/fcm/send", data=None, json=firebaseBody, headers=firebaseHeaders) My Extension is also pretty basic (for testing) and I already tried to remove it and add it again to my main app project without success. class NotificationService: UNNotificationServiceExtension { var contentHandler: ((UNNotificationContent) -> Void)? var bestAttemptContent: UNMutableNotificationContent? override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { self.contentHandler = contentHandler bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) if let bestAttemptContent = bestAttemptContent { bestAttemptContent.title = bestAttemptContent.title + " [TEST 123]" contentHandler(bestAttemptContent) } } override func serviceExtensionTimeWillExpire() { // Called just before the extension will be terminated by the system. // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used. if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent { contentHandler(bestAttemptContent) } } } Anyone has a idea what I still can check, test or miss?
Posted
by
Post not yet marked as solved
1 Replies
1.1k Views
Hello everyone, sorry for my ignorance about it, with ANCS I managed to get all the notifications except the alarm that rings and the timer expired, where am I wrong? do they travel on other channels like gatt? if yes can someone help me understand how to receive these 2 information? the alarm goes off and the timer expired? Thanks in advance to everyone who will help me, Marco.
Posted
by
Post not yet marked as solved
5 Replies
2.9k Views
we already got access to com.apple.developer.usernotifications.filtering , we have set up this special permission in our app extension entitlement and provision profile. but we are still unable to filter notification by providing empty UNNotificationContent
Posted
by
Post not yet marked as solved
11 Replies
14k Views
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.
Posted
by
Post not yet marked as solved
6 Replies
5.2k Views
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!!
Posted
by
Post not yet marked as solved
6 Replies
1.5k Views
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.
Posted
by
Post not yet marked as solved
1 Replies
748 Views
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.
Posted
by
Post not yet marked as solved
7 Replies
2.3k Views
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.
Posted
by
Post not yet marked as solved
1 Replies
1.1k Views
since iOS 15, the notification icon doesn't work as it should. the icon has been defined: the situation happens in the same app, but in different ios versions when ios < 15 the black icon is shown in the notification (correctly) now, iOS 15 the white icon appears (I have no idea why) has anyone had a similar problem?
Posted
by
Post not yet marked as solved
1 Replies
966 Views
Hi there! For Safari Push Notifications, I'd like to know how I can listen a "notification received" event on my web site. The purpose is to execute some actions (code) when a push notification sent from my web server is received on my web page, such as counting them for statistics. Thanks
Posted
by
Post not yet marked as solved
2 Replies
1.5k Views
When I call the completion handler from the following User Notification Center delegate function and pass UNNotificationPresentationOptions.sound I still get the notification banner: override func userNotificationCenter( _ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void ) { completionHandler(.sound) } All I want is a way to just make a notification sound without showing the notification while the app is in the foreground. Any ideas? This is how I am requesting authorization: [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions: (UNAuthorizationOptionBadge | UNAuthorizationOptionSound) completionHandler: ^ (BOOL granted, NSError * _Nullable error) { }]; This is the notification request: var notification = UNMutableNotificationContent() if (notification != nil) { notification.categoryIdentifier = "id" notification.sound = .default notification.title = "title" notification.body = "body" request = UNNotificationRequest( identifier: NSUUID().uuidString, content: notification, trigger: nil ) UNUserNotificationCenter.current().add(request) { (error) in }
Posted
by
Post not yet marked as solved
2 Replies
4.3k Views
I have this error: [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:963 It is preceded by lots of this message, if it matters: [Assert] +[UIInputViewSetPlacementInvisible placementWithPlacement:]: Should not be called with an invisible placement I thought it was because I didn't include a key in Info.plist, but I put keys in there that I thought might be needed. I am using CloudKit sharing and silent push notifications for CloudKit subscriptions, and the Apple documentation says when I set the capabilities for background fetch and remote notifications, the keys would be put in Info.plist by Xcode. Does this have anything to do with the fact that when my app is run for the first time it asks the user for permission to send notifications. If it's a silent notification that I'm using, I thought the documentation meant the user is not notified at all? I have searched on the internet and on stack overflow and in Apple developer forums for a solution. Any help will be appreciated.
Posted
by