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

Background notifications and user interaction
The (archived) Local and Remote Notifications Programming Guide contains the following: To support a background update notification, make sure that the payload’s aps dictionary includes the content-available key with a value of 1. If there are user-visible updates that go along with the background update, you can set the alert, sound, or badge keys in the aps dictionary, as appropriate. The current documentation however reads: To send a background notification, create a remote notification with an aps dictionary that includes only the content-available key, as shown in the sample code below. You may include custom keys in the payload, but the aps dictionary must not contain any keys that would trigger user interactions. What caused this change and why is no longer supported to send additional keys (e.g. an alert dictionary) in the aps dictionary of a background notification?
0
0
488
Aug ’23
Apple Web Push API doesnt work with HTTP/2
Hello, i try to send a Web Push Notification to my Safari Webbrowser and use the "http2" Module from Node.js Every other Browser is able to receive my messages. I got the message "BadJwtToken" but when i use the same Authorization Key with a HTTP/1.1 Request, i got a Message on Safari. Is there a Problem with the API when i use the HTTP/2 Protocol? Has anybody the same Problem? I send exactly the same Headers and as i said other Push APIs from Mozilla,Chrome and Microsoft e.t.c. are working with my HTTP2 Client.
0
0
658
Aug ’23
Push To Talk expected behavior when app terminated
I'm implementing Push To Talk functionality on my app. Now I have some trouble after app process is terminated by user. In my implementation, I download voice file in func channelManager(_ channelManager: PTChannelManager, didActivate audioSession: AVAudioSession) method. It works fine when app is foreground, and also ok when app is background until app process terminated. After app process terminated, system displays PTT connection status by blue icon in status bar. Then I got some PTT message from another person, func incomingPushResult(channelManager: PTChannelManager, channelUUID: UUID, pushPayload: [String : Any]) and func channelManager(_ channelManager: PTChannelManager, didActivate audioSession: AVAudioSession) are called, but download process is not finished and I cannot get voice file. What is the expected way to download voice file in such case?
1
0
546
Aug ’23
Apple Wallet Pass Autoupdate
Hi All I have successfully created an Apple pass using PHP. The pass is added to the Apple wallet successfully. Now, I have to update the pass with a new value for one of the parameters in the pass. How do we update the value? Please refer to a sample PHP script for the same. I have checked the below sites, Here, they Mentioned only the input and output, as per the document I received the push token, What should I do after getting the push token? https://developer.apple.com/library/archive/documentation/PassKit/Reference/PassKit_WebService/WebService.html
1
0
662
Aug ’23
Notification Content Extension not working in MacOS
I've set up a Notification Content Extension for my app, but it's not getting called(tried both local and remote push). I've read the Apple dev guide, and I've set up everything as it says. https://developer.apple.com/documentation/usernotificationsui/customizing_the_appearance_of_notifications I've looked over the common issues (setting proper deployment targets and setting category identifiers from the backend and in the .plist) After receiving the notification, I'm not able to get the expanded view and neither is the didReceive(_ notification: UNNotification) of my extension view controller getting invoked. Is there something I'm missing while doing the extension setup, I m not able to figure out the problem? Also, I m not able to understand this note from apple "Notification content app extensions are supported only in iOS apps" when all the Notification content Extension APIs are provided for MacOS also?
0
1
516
Aug ’23
Notification Service Extension not getting invoked in macOS
I have created a Notification service extension as target to the main MacOS application. I want to update the content of my remote notification using this extension but due to some reason the extension is not getting invoked to update my remote notification. The auto execution of the below method seems to fail for my app extension. didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) I have tried the suggested solutions in this link but it did not help. Maybe there are some differences to using Notification service for MacOS and ios that I m not aware. I am able to send normal remote notifications using the curl command, but it is not invoking the notification service extension. Below is the curl command. curl -v --header "apns-topic: $TOPIC" --header "apns-push-type: alert" --header "authorization: bearer $AUTHENTICATION_TOKEN" --data '{"aps": {"mutable-content": 1,"alert": {"title": "Encrypted title","body": "Encrypted body"}},"MEETING_ORGANIZER": "MyMeet"}' --http2 https://${APNS_HOST_NAME}/3/device/${DEVICE_TOKEN} Is there anything I m missing that is causing this problem?
0
0
407
Aug ’23
The most advanced spyware in the world
I have been researching and enduring the most unbelievable attack you have ever heard of. You won't believe me. AT&T doesn't. Apple doesn't. They have not bothered to even take a look. I have multiple screen videos and screenshots that prove that when my phone was stolen, damaged, then returned, it was infected with a very resilient virus of some sort, so that it has been cloned and is duplicated on a MAC. Now the WiFi network I use is likely the jumping off point, but I am not familiar with this level of invasion. I have restored the phone but I have not deleted the E-Sim. And I always restored from a backup. Well once. I did not and still no change. I am not a neophyte, and while I have limited knowledge of the apple code, swift or Xcode or whatever, I do have some coding knowledge from other platforms. One thing I do know though is my iPhone. I bought the first one in 2007 and watched the keynote announcing the App Store on the first iPhone. I know when it is operating as it should. For instance, whenever I reset my google password which is often, or I just look through the google account at devices, this iPhone 14 {Plus running iOS 17 is always listed as a MAC OS X from another region. Sometimes I can see this phone on there as well but it is never the (device I am using). Also, I have screen videos of very strange errors, like certain options will be shut off. Like right now I cannot turn on voice assist. During the damage when it was stolen, the Face ID was damaged. Just now it suddenly got brighter and it does that often almost as often as the volume suddenly going up. My contacts are constantly deleted and that is not because of switching accounts. As this has been occurring four over 4 months now, I have tirelessly investigated every explanation for the errors. I know it is a mac connected to the same WiFi because occasionally the font will change in size and small part of text will be highlighted and it is much smaller than the display of the phone. Everytime I login to Apple ID the password has been changed and this is with 2FA on. Also I just checked yesterday to see, on the AT&T website, and my number in just one day has (5Text messages listed that I did not get. My roommates seem to know things about me I haven't told them. At&T sent me a bill for a different number without a phone connected to it. I use an ESim. I have endless more details and screenshots and I cannot seem to get a response from apple, but my belongings have been stolen, my identity stolen, and my sanity also taken away. You begin to question reality, but just going over my body of evidence is enough to show I have something going on. I want to report this to someone but I would like to maybe get some info on how I could be sure, what is happening? MY Crash reports show interesting stuff. I am actually going to check and make sure the imei numbers in those reports match the device. But please help . This is like super high tech invisible terrorizing spyware and it will be worse for the next person. I mean when I unlock my phone it is never opened to the app I closed it on. NEVER. Email johnmichaelpowers@yahoo.com
1
0
779
Sep ’23
Changing the APNS deviceToken when reinstalling the application
Good day! We use the func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) to get the deviceToken. But when reinstalling the application, we get a new token every time. At the same time, the old tokens remain "alive" and when trying to send a message, they do not return "bad_device_token", the code 200 is returned. {"StatusCode":200,"Reason":"","ApnsID":"fc9b2cff-a0aa-40fe-8d1e-3d1edec0eeb6","Timestamp":"0001-01-01T00:00:00Z"} Why can this happen? This is important for us, because rows from the "device" table are deleted only when we receive "bad_device_token". Thus, the number of devices in the table is constantly growing.
1
1
332
Sep ’23
User Notifications Delayed on Watch
Hi, when sending notifications either via APNS remotely or locally on watchOS, they are delivered with a small but significant delay of ~12 to 20s. That doesn't sound like much, but when e.g. the notification is read on AirPods by Siri via the iOS companion app on the phone it's quite annoying having to wait for the long-look notification UI to appear on the watch to e.g. send a quick reaction. Interesting: If the watch is not connected to the phone, notifications are delivered as quick as on the iPhone (<1s delay). That makes me think that this behavior must be related to the notification forwarding feature as described here https://developer.apple.com/documentation/watchos-apps/enabling-and-receiving-notifications . For a "Dependent watchOS app with an iOS app" it is stated that "You can either send the notification just to iPhone, or send it to both devices. In either case, the system ensures that the user only receives one notification at the best destination." So the watch must somehow coordinate with the iPhone to not show a notification if the "same" (same APNS collapse id?) notification is delivered to the phone as well (?). Is there a way to disable this behavior? Thanks! Quirin
2
0
900
Sep ’23
Push token change on app upgrade
Our app has some Crashlytics & Localytics reporting to collect metrics for diagnostic and info gathering. One thing I'm noticing recently is that if a user has version m of the app installed and updates to version m+1, then for some users, the app has detected and reported that the push token obtained with version m+1 is different from that of version m (for the same handset). That's fine - if the app has detected the change to the token it can send the new one to the server so the server can update. But my question is - if the user didn't explicitly launch the app and thus present the app with the chance to send the new token to the server, then what will happen to the pushes sent by the server using the old token? Presumably they won't get delivered if the token has changed, but if the user has no need to launch the app then they're never going to receive any pushes from the server until they do launch the app. However there's not necessarily any reason why a user should repeatedly launch an app once it's been set up (depending upon what it does and how it delivers info to the user and how the user interacts with it, there's no reason why a user should have to launch the app after initial installation and launch). If so then this seems like a gap in the design of push notifications? If they can change on the same handset, or another scenario is the user backs up their device to iCloud and then restores to a different handset, then in that case the push tokens will have definitely changed, yet any apps using push don't get the chance to send the new token to the server until the user launches the app, meanwhile all pushes from the server will be dropped.
1
0
597
Sep ’23
How to integrate Live Activity into Objective C projects ?
I have a food delivery app similar to Uber Eat it was developed in Objective C now the requirement is to implement the Live activity for tracking the Active orders in live Activity. As i tried Live activity over the Swift it is working fine on all IOS Devices but when i implement that swift code into Objective C using all the standards by Bridging between Swift and Obj C copied the same code, There is no Error or Warning i am seeing in Live activity functionality in Objective C, but Live Activity UI can't seen on Lockscreen even i have checked in settings my app is showing that it supports Live Activity but no view. Can somebody help me out in that how to integrate live activity into Objective C project?
0
0
481
Sep ’23
Not receiving response from APN server while sending push notifications
Hi, I am currently using the token based protocol to send iOS push notifications to users via my application. However, there are several instances when I receive no response from the APN server and as a result the notification is not sent. For the configuration that I am relying on, I am still able to send notifications to other devices. Kindly provide assistance on how to resolve this.
1
0
326
Sep ’23
Cannot create signature for JWT for APNs
I am trying to generate the signature for a JWT using a .p8 private key from Apple for APNs in PHP. If I try to use the following command hash_hmac('sha256', $header . '.' . $payload, $key), when checking it in Apple's JSON Web Token Validator, I get that the signature is invalid. I have also tried converting the .p8 private key to a PEM file and importing it into the OpenSSL library, but I am still getting the error message openssl_sign(): Supplied key param cannot be coerced into a private key. But I generate the JWT using Apple's JSON Web Token Generator, everything goes well, even the request to APNs. Thank you in advance!
1
0
645
Sep ’23
getting TooManyProviderTokenUpdates error in production for applet wallet notifications
Hi All, Product information Our product create and update apple wallet passes per client. For example, client A will have a passtypeidentifier and devices which download the same will have its devicetoken[pushtoken] registered to our database. Same for other clients as well. We had been using legacy binary protocol-based approach till 2021, and we migrated http2 based APNS API implementation in the same year. But past few months, we are getting TooManyProviderTokenUpdates 429 in the production environment. No such error occurring in our lower environment with the same build. We use separate p8 cert,key and teamId per environment. *Implementation we have total of 5 clients, i.e: 5 pass type identifiers. In our current implementation , we create 5 connections per client. hence 5 oauth token[which refreshes only after 20 mins] are created. As we are sending push notifications to Apple wallet passes, we send apns-id as passtypeidentifier , no payload in the body and uses https://api.push.apple.com/3/devies/[pushtoken] endpoint for sending push notifications. So, each connection will have passtypeidentifier defined in the aps-id and device token sent in the URL. We initially suspected, multiple connection for a team identifier would be an issue. So, in our lower region[never reported this error], we tested a new build which implements 1 single connection for all the clients and one Oauth token is being used. In this approach , pass gets updated on the devices, but no notification banner displayed on the devices. So,we reverted to production build and sent notification to those same devices, we found passes updated and notification banner appeared. We are totally confused with the error message and behavior of APNS. Any suggestions or solution would be appreciated.
1
0
538
Sep ’23