So I've read that to clear notifications out of the notification center, you simply use setApplicationIconBadgeNumber and set the value to 0. What if we wanted to clear the badge count without clearing the notification center messages? Is there a way to clear the badge count without removing the notifications?
Post not yet marked as solved
I'm trying to implement UNNotificationServiceExtension, but my code seems to fail often, simply stating the "Program ended with exit code: 0". I am trying to use the FMDB Sqlite3 module in the extension and it seems as though I may be running into memory limits inside the extension. Are there any documented limits for memory in these extensions? Are there any strategies to help me take them into account, or am I just going to have to accept that I can't put complex functionality into the extension?
Post not yet marked as solved
Hi,I am trying to process Remote Notifications (content-available = 1) on my iOS application. I have enabled both Push Notifications and Background Modes (Remote Notifications) in my XCode project. This is what I observe:1) If my application had been launched since the previous reboot and has not been swiped up: The application:didReceiveRemoteNotification:fetchCompletionHandler: gets called when the notification arrives - as expected.2) If my application had not been launched explicitly since the previous reboot: The application:didReceiveRemoteNotification:fetchCompletionHandler: function does not get called. However, Apple documentation seems to indicate that my application should be launched when a notification does come in. To quote the documentation: "...In addition, if you enabled the remote notifications background mode, the system launches your app (or wakes it from the suspended state) and puts it in the background state when a remote notification arrives..." One important thign to note is that the system alert is displayed when the remote notification arrives in both cases. The problem in case 2 is only with the code not getting executed. Has anyone ever experienced this problem? Is what I am seeing the expected behavior?
Post not yet marked as solved
I have multiple hand held servers talks with APNS and send notification to dedictate apps based on the token registered on individual hand held servers. As the AppID is the same the hand held server use the same cert to talk to the APNS, the cert is stored in the hand held server for the connection to the APNS.My question is: will Apple treats this as abormal usage and block the connection, if I have quite a lot (e.g. more than 1000) hand held server running concurrently, each with different IP address, with the same cert and sending notification to APNS concurrently? The notification usage on each server will not be high, at most 1 to 2 notification per minute.Thank you for the help!
Post not yet marked as solved
inhi , evry one!today, we want to setup our cPanel/WHM server to enable IOS Push for Mail support feature, we enrolled on APNS cert in Apple Developer Account and use it to setup this, we got the error:The SSL certificate update failed.iOS Push for Mail(XID xabqa2) The certificate userId field (0.9.2342.19200300.100.1.1) must begin with “com.apple.mail.”we tried to type the App ID as com.apple.mail. in Apple Developer Account -> new App to deploy one new App, but we got error:There were errors in the data supplied. Please correct and re-submit.An App ID with Identifier 'com.apple.mail.qiaokr90.eee' is not available. Please enter a different string.so, does someone here can help us?thanks so much!
Post not yet marked as solved
Hi,We've been using APNS via auth key/JWT authentication successfully for some time. My understanding is that this should allow us to send push notifications to any app linked to our team.I'm trying to enable Push Notifications for a new App ID and to do so, I'm required to create an SSL cert (dev or prod) for the App ID.Why is this required?Thanks...
Post not yet marked as solved
Hi,I was testing the push notification tokens, and I uninstall the app from the device after token was generated.Then I tried to send push notification with that token which I expect to be invalidated/unregistered.However, I'm still getting a success message with that token.When will tokens get invalidated after uninstall? Thanks!
Post not yet marked as solved
HiWe are receiving myriad complaints from members that our app is now missing from Settings -> Notifications, and so our members cannot receive push notifications any longer.Previously we thought that this was related to users denying us notification permissions during first run, but we are now seeing this reported from long-time users who recently auto-upgraded.We are telling them to delete and reinstall and that (generally) fixes the issue. However, we would like this issue never to happen -- what is causing this, and/or what work-arounds can we implement to ensure we continue to appear in the notifications center?Thanks,Eric
Post not yet marked as solved
I am trying to retrieve all delivered notifications still showing in the notification center but UNUserNotificationCenter getDeliveredNotifications(completionHandler:)just doesn't work. I can get all the pending notifications with UNUserNotificationCenter getPendingNotificationRequests(completionHandler:)but getDeliveredNotificationswill simply always return a 0 count even though there are notifications on the notification center.I have noticed that this works in iOS 10 but not in iOS 11. Anyone has found a way to fix this?
Post not yet marked as solved
we create an app for iPhones (iOS 11.x). The app recieves remote push notifications and plays an alarm sound on recieveing a notification.The sound is played from an mp3 file delivered with the app.As long as there is no apple watch paired to the iphone the sound is played correctly at the iphone right after recieving the notification and the banner is shown at the iphone screen. But if an apple watch is connected, the sound is not played at the iphone. The apple watch shows the notification but plays only the default sound.The app is made for alerting rescue forces. Is there a way to get around the notification being catched by apple watch so that the alarm sound is played by the iphone? Is there some kind of configuration or are there settings we can use to have the iphone playing the alarm sound also if an apple watch is connected?RegardsJens
Post not yet marked as solved
I have my remote push notifications managed by cloud messaging in Firebase. When I build my appliation from Xcode, remote push notifications display perfectly on my device. However, any devices that have installed the app through TestFlight will not get the notifications. Will my remote push notifications work once it is launched on the AppStore?
Post not yet marked as solved
I am working on an app that uses many local notifications. They are essential to the app. However, I have run into the 64 local notifications per app limit, which really limits the functionality of the app. I have thought about using Push Notifications, but I would prefer for the app to be able to work offline. I need to be able to schedule many notifications at a time with differing content.Is there any way to get an exemption from this limit or to increase it? If not, does anyone have any ideas to counteract this limit?I have explored scheduling more local notifications whenever the app opens or using a Push Notification to allow the app to work in the background.Thank you so much for your help.
Post not yet marked as solved
If am using the new HTTP2 based APNS requests with provider tokens do I still need to be calling the push feedback service to get unistalled devices? and if so do I need to use a certificate based request for the feedback service call?thanks
Post not yet marked as solved
Hi,We have a service, which is spanned across servers in multiple regions. We are using Token-based Authentication to communicate to APNS to send notifications to our clients. As per Apple Documentation, the authToken is a combination of KeyId, TeamId, issuedAt fieldd and a signing key used to sign the JSON data. We use the same authToken properties(KeyId, TeamID) to contact APNS via HTTP2 in all of these servers, except that these servers generate the token on their own once every 59 minutes, by adding issuedAt field.As per Apple Documentation,Refresh Your Token RegularlyFor security, APNs requires you to refresh your token regularly. Refresh your token no more than once every 20 minutes and no less than once every 60 minutes. APNs rejects any request whose token contains a timestamp that is more than one hour old. Similarly, APNs reports an error if you recreate your tokens more than once every 20 minutes.On your provider server, set up a recurring task to recreate your token with a current timestamp. Encrypt the token again and attach it to subsequent notification requests.Currently, what we are observing is that we are receiving '429 TooManyProviderTokenUpdates' error very often. I am updating the token in each machine once every 59 minutes. What I am suspecting is that we are updating the authToken simultaneously (closer than 20 mins) in multiple machines which are making calls to APNS, and therefore we are getting this error. Can someone please confirm if this is the case?Also any suggestions to how to solve this issue?One solution could be to have all the machines in sync and only one machine update the token and store in some database for other machines to fetch. I tried another solution where in all the machines I am just using current UTC time and rounding down to the latest hour, as UTC will be globally unique time and so all machines will send the same token in sync. But this solution did not work. My code is in C#. Posting code sample below. ///
/// We are rounding down time to 0 and 30 min mark, so that we do not end up changing token every 20 mins across machines
///
///
private DateTime RoundDownUTCNowTimeStamp()
{
DateTime roundTime;
DateTime currTime = DateTime.UtcNow;
if (currTime.Minute <= 30)
{
roundTime = new DateTime(currTime.Year, currTime.Month, currTime.Day, currTime.Hour, 0, 0, DateTimeKind.Utc);
}
else
{
roundTime = new DateTime(currTime.Year, currTime.Month, currTime.Day, currTime.Hour, 30, 0, DateTimeKind.Utc);
}
return roundTime;
}
Post not yet marked as solved
Been using critical alerts and its been working fine since setup. Currently using a service that handles the alarm sound.Noticed that the critical alert will blast full volume even if the user was in a call which can be pretty harmful for the ear(I feel like this should not be allowed to happen and needs a fix?).To counter this I used the notificationservice to set the volume if a phone call is detected.This works fine except the volume itself differs alot between the models, iPhone X can be on the point to for loud for the ear if in phone call where the iPhone 8 would be close to inaudible. One way is to set volume after device but doesnt seem future proof at all.I looked a bit at this then decided that maybe I should introduce a repetetive vibration feedback instead. Along with the sound.So I implemented the vibration and made it vibrate 5 times to begin with. It worked with the iPhone 8, it made notification sound and vibrated but on the iPhone x it would not vibrate unless I muted it during the sound.Tried dispatch to other thread but still did not work.
Post not yet marked as solved
I'm developing a VoIP app using CallKit and PushKit framworks and I’m facing a strange issue that happens only sometimes and more consistently in older devices, moreover it seems to happen only when the app is closed and the iPhone is locked. The problem is that when someone tries to call me, I receive the “incoming call” VoIP push but the CallKit UI do not show up until a second push is received (e.g. “hang up” notification). So, what happens is that the iPhone starts ringing when it receives the “hang up” notification and of course the caller has already hanged up.My guess is that when the iPhone receives a push notification has only a limited amount of cpu time to report the incoming call and in certain circumstances the app exceeds this time and gets stopped, so when the second push arrives (“hang up” notification) the app continues the execution from where it left off and shows the incoming call UI. Is that possible?Any help would be much appreciated!
I am trying to implement the push notifications with APN for my website and keep running into problems with the push package signature. I have followed the instructions as provided by Apple and was able to succesfully run the .php script (after updating it to account for the required intermediate certificate) to compose my push package. Creation of the push package .zip file is succesful and a signature file is generated.On asking the user for permission to send push notifications and when serving the push package I encounter the 'Signature verification of push package failed' error. After several attemps of trying to regenerate the push package as per Apple's instructions I am unable to determine exactly what the cause might be or what is wrong with the push package or signature.Any suggestions as to what I may be doing wrong?
Post not yet marked as solved
Hi,I try to send push notification to watchOS 6.I can get device token for apple watch.But if I send a push notification to my watch from my server, I get invalid token error.Has anyone gotten same error?
Post not yet marked as solved
Hi, I sent a network request in Notification Service Extension, But causing a crash due to a memory warnings.The log from the extension: "Program ended with exit code: 0".Can I send the network request in Notification Service Extension?Looking forward to reply.
Post not yet marked as solved
I'm trying to create remote notifications but I'm unable to create the push notification key / .p8 file needed for the server on my developer account. The page that I'm using is https://developer.apple.com/account/resources/authkeys/list But it does not show a "plus sign" beside the keys title to create the push notification cert/key. Has anybody run into this issue? How could this be fixed? I did submit a ticket with apple tech support.Thanks