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

Enhancing 3rd Party Alarm Clock Apps on iOS: A Call for More Flexibility and User Control
Hello Apple Community, I am writing to discuss a limitation I’ve encountered with third-party alarm clock apps on iOS. As it stands, these apps are unable to function like the native Clock app, primarily due to the restrictions imposed by the operating system. Currently, third-party alarm apps rely on standard local notifications, which fire once and then cease. This means that if a user misses the initial notification, there’s no backup mechanism to ensure they are alerted. This is a significant drawback for users who rely on these apps to manage their time effectively. Moreover, some apps have found a workaround by playing a silent sound in the background to keep the app active. However, this method is not only against Apple’s guidelines but also drains the device’s battery life. I propose that Apple consider allowing third-party apps to push notifications from the background in an alarm style, with clear permissions granted by the user. This would enable users to clearly define acceptable notifications and specify an alarm-like display, providing a more personalized and effective alarm experience. By implementing this change, Apple could greatly enhance the functionality and user-friendliness of third-party alarm clock apps, ultimately benefiting the end-users and developers alike. Because this alarm feature is so important for productivity and quick responses to critical events or triggers I'm trying to see how some concepts could be reimagined if we had a little more flexibility. Apple iOS has a feature called StandBy mode that activates when an iPhone is charging and positioned on its side. This feature can be thought of as a kind of smart display for your iPhone that offers fast access to different screens of glanceable information. Always-On Display: StandBy mode can keep the display on even when the phone is locked, which is useful for an alarm app. Users can glance at the time without having to unlock their phone w/ Low-Light Adaptation Customizable Screens: StandBy mode consists of screens that can be accessed by swiping horizontally on your iPhone’s display. This could allow an alarm app to display additional information, such as route, or weather warnings. Interactive Widgets: The widget screen in StandBy mode is interactive and customizable. I look forward to hearing your thoughts on this matter. Best regards, Phil Cutting
1
3
706
Jan ’24
Can a Widget post a Local Notification?
My guess is no... but, I have to ask. I made a widget that checks our GitHub repository for new pull requests - in an attempt to make sure PRs are addressed quicker. It works great - using GitHub's API. It's on my iPhone's Lock Screen. It definitely keeps me more on top of our pull requests! Our product manager asked if we could also send a local notification when there's a new PR. I was thinking maybe from the widget - it's updating around every 15 minutes - and if there's a new PR - then maybe it could fire a local notification. However, there's the permissions. The user has to say "OK" to them. Widget can't do that. Can it inherit the notification permissions from the parent app? Anyway - I think it is way overkill - I mean we have a widget! Why a notification as well!?!?!? I thought I'd ask... Thanks, Scott iOS 17.
2
0
457
Jan ’24
APNs Pushes Failing, Device is "offline" when it's not
Hi - I'm having issuses with pushing notifications both locally and from a server to either my phone or the simulator. KEEP IN MIND I had previously had them working not an hour ago, and for some reason, after changing no code i come back to errors upon errors. I am using 17.0.2 and xcode. Here are some things i've tried: CloudKit's Push notification console - one day it just suddenly stopped working, and doing pushes that previously had worked suddenly gave the vague and very unhelpful error message "device was offline." I know my credentials and device token are all valid because it doesn't throw any other errors regarding that. AWS Pinpoint/SNS - i previously had it working sending push notifications from SNS. I get a 200 response, but it still doesn't show a push notification. I think Apple is misinterpreting "discarded as device was offline" somehow as a success? .apns drag-n-drop - i literally sometimes fail dragging and dropping into the simulator a properly configured .apns file to trigger a notification. Sometimes it works, sometimes it doesn't. The literal only thing i changed was adding the target of the user notifications extension (so i can add custom actions on a notification). Unless that target somehow broke everything, Apple seems to think my device is offline. Hopefully someone might have been experiencing this and can understand my fury.
2
0
1.3k
Jan ’24
Notification Service Extension usage time
Hello all. I noticed, that NSE living more than 30 seconds ( that described in doc ). When app receive notification, it created process NSE, and send notification to didReceive function, after this, app have 30 seconds to call contentHandler closure, after contentHandler is called, I expected that NSE process is killed, but it's not. If app using singletons in NSE, they won't dealloc after contentHandler is called, so, after new notification received, singletons still alive. Does it legal to not drop connection to websocket after contentHandler closure get called? For example, notification received, NSE process is loaded, websocket manager signleton is initialzied and started session, after few seconds contentHandler closure get called, so, system won't kill NSE because of 30 seconds timer, and my web socket connection will alive so long as possible, so, I not need to open it each 30 seconds, is that legal or not?)
3
0
529
Jan ’24
PushKit: XPC PushKit connection invalidated from client
Hi, Some of my iOS test devices do not receive PushKit notification anymore. I request and receive a VoIP token at app startup, then register it. I report any incoming PushKit notification directly to CallKit on the same thread. But some devices do not receive the PushKit/VoIP notification (app in foregroud or in background). They used to. Some other devices are receiving it with the same code, for a successful call. I tried reinstall and device restart with no success. I can see on the problematic devices at app startup in the console: callservicesd XPC PushKit connection invalidated from client <private> before seing: callservicesd Registering client process <private> with bundle identifier <private> for PushKit voip in environment <private> I could not find anything on "PushKit connection invalidated from client", anyone knows what triggers it? Thanks.
0
0
537
Jan ’24
APNS Key Vs Certificate Security
I've learned that providing an APNS “Key (Cannot expire)” instead of an APNS “Certificate (Can expire)” will provide the app "access to all topics" for all apps within the organization ‘team’ that the key is forged from. 1.) Can someone elaborate on the specifics for what that means from a security prospective? For instance, if my organization 'team' manages many applications under the same umbrella account and provides the same (or different) APNS key to each app, but one of the apps accidentally (or intentionally) wants to utilize the APNS key to affect the other apps, what are the potential consequences? And, is it possible to create a new APNS key for each app to close any security concerns for multiple apps managed under the same account, or are we stuck with every key having access to all topics?
1
1
1.1k
Jan ’24
Push to Talk framework failing state after restart
Our PTT framework app works great but we have now found an interesting scenario where you can get the PTT Framework in a state that is non functional. Here's how it can be reproduced: Start your PTT app ( With PTT framework ) Successfully joined channel and we can transmit and receive incoming transmits. Put app in background. ( PTT framework/GUI symbol present in top) Wait 1 min Restart phone by pressing volume up + right side button Wait 1 min Start phone We can now get two scenarios: "Sceanario *1": In 4 of 5 cases the PTT framework symbol will be present directly when phone is started. If we here start running our app we can see that the channel is restored and everyting works perfectly. "Sceanario *2": In 1 of 5 cases the PTT framework symbol is not present after phone is started, and will not be even if waiting. If we here start running our app we can see that the channel is also here restored (channelDescriptor(restoredChannelUUID channelUUID: UUID) -> PTChannelDescriptor) and we can successfully call "mgr.setTransmissionMode(newTransmissionMode, channelUUID: self.channelUUID)" on our channel ( PTT framework symbol still not present !!!!) If we now try to call "requestBeginTransmitting(channelUUID: UUID)" we will get the PTChannelError error channelNotFound !!!! We are then reacting to this and trying to do leave the channel "leaveChannel(channelUUID: UUID)" but also this is returning PTChannelError error channelNotFound in "channelManager(_ channelManager: PTChannelManager, failedToLeaveChannel channelUUID: UUID, error: Error))" !!!! The interesting thing here is that my log is saying the following: PTTFrameworkImpl: failedToLeaveChannel 6D5AFE96-9389-4CFB-893A-64D51D4542XX error=The operation couldn’t be completed. (com.apple.pushtotalk.channel error 1.), joined=true, activeChannelUUID is=6D5AFE96-9389-4CFB-893A-64D51D4542XX. So we are getting channelNotFound for 6D5AFE96-9389-4CFB-893A-64D51D4542XX but when at the same type checking active channel with channelManager.activeChannelUUID we are getting 6D5AFE96-9389-4CFB-893A-64D51D4542XX. After this we logout our user in our app. If we now try to login again we will get a scenario where "requestJoinChannel(channelUUID: UUID, descriptor: PTChannelDescriptor)" will result in just NO RESPONS in means of "channelManager(_ channelManager: PTChannelManager, didJoinChannel channelUUID: UUID, reason: PTChannelJoinReason)" or "channelManager(_ channelManager: PTChannelManager, failedToJoinChannel channelUUID: UUID, error: Error)" FYI: The fault are occuring on 17.3 also and the syslog I provided here is on 17.3 developer beta One interesting observation we have seen is that we only see this problem when "allow location access" is set to never for our app.
5
1
485
Jan ’24
High "Discarded - Disabled" metrics for Location Notifications
Hi everyone, I've run into an issue with push notifications in our app, specifically those related to the location push service extension. In the Push Notifications Console, there's a high number of notifications marked as “Discarded - Disabled” under Location Notifications. I'm trying to figure out what's causing this. We are seeing thousands of “Discarded - Disabled” for location but the other push types are being discarded in much smaller numbers (in the tens). Here's what I need help with: What do the different 'Discarded' categories mean in push notifications? Which are normal and which are red flags? Why are so many Location Notifications being discarded as 'Disabled'? Is this a common device setting issue? Any tips on reducing these discarded notifications, especially for location-based services? Would really appreciate your insights or any pointers towards relevant resources! Thanks! LC
0
0
266
Jan ’24
App Transfer's effect on Push Notifications
I'm in the process of preparing to receive an iOS App transferred from a 3rd party developer. It's unclear from the transfer documentation whether Push Notifications will continue to work after the transfer is complete. Could anyone provide clarity on when push notifications would begin to fail, if at all? For instance, immediately at transfer, after the first release from the new app store, or no failure until new APN tokens are created? https://developer.apple.com/help/app-store-connect/transfer-an-app/overview-of-app-transfer/
1
0
473
Jan ’24
Periodic Background Update (including force-quit)
As the title says. We have a pretty specific need for our app, and I have an idea of how to achieve it, but would like input on whether it's good practice or not. In communication apps such as Whatsapp or Discord, they need to send local notifications (and ideally update cached message data so it's fresh) anytime the user gets a new message. Conveniently for them, they control the backend, and so can just send out a silent push notification to the device(s) of user involved. In our case, we are creating a UI for someone else's backend, meaning we can't simply send a silent push on data change. What we were originally thinking was a sort of crowd-source involving a combination of silent push and background refresh, but refresh won't work if the user closes the app. I've read all the given reasons for this, and though I still disagree, there isn't anything we can do about it. So what I'm now thinking is that, at whatever interval (say 1-3hrs) some serverless function sends a silent push to every single client, which will wake them up to make a fetch and compare to the cached data and send a local notification if necessary. Downside here is it will likely incur some cost, and frankly it just feels kind of iffy as a solution, but I'm not sure what else we can do without controlling the backend API. Thoughts? Is there anything I'm missing? Any better ideas? Thanks in advance!
2
0
419
Jan ’24
SIP Client app - Push notification unavailable
Hello Team, We have developed an SIP Client application, where the connection is through SIP Server. We are unable to handle incoming calls when app is in the background. The local servers are blocked by firewall due to which the push notification is unavailable and is only available via VPN connection. Requesting you to please guide us on how we can receive incoming calls without push notification. We also would like to know how we can receive incoming calls when the app is completely terminated or closed from background and how to auto-start the app to receive incoming calls.
2
0
492
Jan ’24
Persistent Issue with Push Notifications on iPhone Devices
I understand that you are facing an issue with push notifications not being delivered to iPhone devices in your app since January 12, 2024, at 4:05 AM (Japan time). You've confirmed that the APNS authentication key is still valid, and the key itself is correct. Additionally, you mentioned that push notifications are working fine on the sending device. Despite resetting the authentication key, the problem persists, and you haven't received a specific error code; instead, you are getting a general error message. To troubleshoot and resolve this issue, you may want to consider the following steps: Check for Apple Server Status: Ensure that Apple's push notification servers are operational. Sometimes, server outages on Apple's end can affect push notification delivery. Review Apple Developer Console: Double-check the Apple Developer Console for any relevant messages or issues related to your app and push notifications. It might provide additional insights into the problem. Check Device Settings: Confirm that the affected iPhone devices have proper network connectivity and are not in a "Do Not Disturb" mode. Also, ensure that the app's notification settings on the user's device are configured correctly. Review Payload and Certificate: Examine the payload of your push notifications and ensure that it complies with Apple's guidelines. Additionally, verify that your app's push notification certificate is still valid. Update to the Latest SDK: Make sure that you are using the latest version of the SDK provided by Apple for handling push notifications. Contact Apple Developer Support: If the issue persists, consider reaching out to Apple Developer Support for further assistance. They may be able to provide specific insights into the problem and guide you through the resolution process. Implement Logging: Introduce logging mechanisms in your app to capture more detailed information about the push notification process. This can help you pinpoint the exact stage where the issue occurs. Network Firewall and Proxy: Check if there are any network firewalls or proxies that might be blocking the communication between your server and Apple's push notification servers. Remember to document any additional information or error messages you receive during the troubleshooting process, as these details will be helpful when seeking assistance from Apple or other developer communities. If the problem persists, seeking professional assistance or consulting with Apple's technical support may be necessary. 【Message content】 Auth error from APNS or web push Service
0
0
585
Jan ’24
Handle background notification in terminated status app
i have an issue when handling silent push in my app when the user close the app, here is my native code which works like charm when the app in the foreground, background or terminated status from a short time from closing the app, and after long time from closing it (+30min) it will not work anymore, it make me confuse why it does not work and other messaging app like viber, whatsapp and messanger you can still receive messages and calls even you swipe the app and close it !! is there any thing must i add !! override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -&gt; Void) { Messaging.messaging().appDidReceiveMessage(userInfo) if Auth.auth().canHandleNotification(userInfo) { completionHandler(.noData) return } // sample notification for testing let content = UNMutableNotificationContent() content.title = "Hi there" content.body = "Just test" content.sound = UNNotificationSound.default let request = UNNotificationRequest(identifier: "helloNotification", content: content, trigger: nil) UNUserNotificationCenter.current().add(request) { (error) in if let error = error { print("Error adding notification request: \(error.localizedDescription)") } } // resent to dart side let controller: FlutterViewController = window?.rootViewController as! FlutterViewController let notificationChannel = FlutterMethodChannel(name: "notificationHandler", binaryMessenger: controller.binaryMessenger) var dataToSend: [String: Any] = [:] if let text = userInfo["text"] as? String { dataToSend["text"] = text } // Convert the dictionary to NSDictionary let nsDataToSend = NSDictionary(dictionary: dataToSend) // Pass the NSDictionary to Dart notificationChannel.invokeMethod("handleRemoteMessage", arguments: nsDataToSend) } i checked : background capabilities : remote notifs, background fetching, voip, background processing
1
0
1k
Jan ’24
Need Assistance: Unintended 'webServiceURL' Callback Triggered for All Apple Passes
I have successfully created an Apple Pass wallet with a 'webServiceURL' using PHP. The pass is added to the Apple Wallet successfully. However, when I sent a push notification to update a specific pass using its serial number, it worked as expected initially. However, in the last few days, Apple has been triggering the 'webServiceURL' callback for all passes, when we trigger a push for one pass/deviceID. I'm unsure how to prevent this callback from Apple. Please provide assistance on resolving this issue.
0
0
336
Jan ’24