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

170 Posts
Sort by:
Post not yet marked as solved
0 Replies
539 Views
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
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.1k Views
Some users couldn't receive push notifications, and APNS returned a 'DeviceTokenNotForTopic' error. Upon validation using Apple's tool, I found that some tokens are identified as VoIP push tokens, and some as Live Activity (LA) push tokens. When attempting to send a normal alert push using these VoIP/LA push tokens, it didn't work and returned a 'DeviceTokenNotForTopic' error. These tokens were obtained from Apple's delegate function 'didRegisterForRemoteNotificationsWithDeviceToken.' It's unexpected to receive VoIP/LA push tokens from this event, but this issue is occurring, and I've observed it specifically in iOS 17 users. This problem is not universal and is happening only for some users. Please take note that our app support VoIP Push, Live Activity Push and Normal Push notification. Could this be an iOS 17 bug? Any advice on this matter would be appreciated. Thanks.
Posted
by sundee.
Last updated
.
Post not yet marked as solved
0 Replies
482 Views
Hi there, There might be something obvious I'm overlooking, but I can't for the life of me figure it out. Any help or guidance would be much appreciated! I've enabled push notifications for one of my app identifiers (developer portal and provisioning profile appear to be correct, as does the entitlements file). On a simulator, when I call registerForRemoteNotifications(), I immediately get a callback from didRegisterForRemoteNotificationsWithDeviceToken. However, when I run my app on any of my physical devices, this method is never called. Nor is didFailToRegisterForRemoteNotificationsWithError. If I manually remove the aps-environment key and deploy to my device, then didFailToRegisterForRemoteNotificationsWithError is invoked with an expected error message. Any idea what I may have done wrong here? I'm using Xcode 15.0.1 and have tried an iPhone 12 (iOS 15.5) and iPhone 13 Pro Max (iOS 16.7.2). My development environment requires a VPN, but I've tried disabling the VPN in case that was an issue. I've also tried restarting the devices and toggling Wi-Fi, airplane mode, etc. My app does integrate with Firebase (not FCM though), but I added the FirebaseAppDelegateProxyEnabled NO option, just in case (this wouldn't explain why it works on Simulator though). Thanks for your help!
Posted Last updated
.
Post not yet marked as solved
1 Replies
472 Views
I'm currently facing an issue with APNS token registration on iOS 16.7.1 specifically for iPhone 8+. I'm working on integrating Firebase into my iOS app for push notifications. Problem: The problem I'm encountering is that the didRegisterForRemoteNotificationsWithDeviceToken and didFailToRegisterForRemoteNotificationsWithError delegates are not being called at all, despite Firebase successfully generating the FCM token. Environment: Device: iPhone 8+ iOS Version: 16.7.1 Xcode Version: latest Swift Version: latest Firebase SDK Version: latest Observations: Firebase successfully generates the FCM token, indicating that the device is able to connect to Firebase Cloud Messaging. However, the standard APNS delegate methods (didRegisterForRemoteNotificationsWithDeviceToken and didFailToRegisterForRemoteNotificationsWithError) are not being triggered. This issue seems specific to iOS 16.7.1 on the iPhone 8+. I already tested on other iphone its work normaly. Steps Taken: 1.Ensured that APNS is properly configured in the Apple Developer Console. 2.Firebase is set up correctly, as evidenced by the successful generation of FCM tokens. 3. No relevant errors or warnings in the Xcode console. Question: Has anyone else experienced a similar issue on iOS 16.7.1 or with iPhone 8+ devices? Any insights or suggestions on how to troubleshoot and resolve this issue would be greatly appreciated. Thank you in advance for your time and assistance! Additional Information: If you need more information or code snippets, please let me know. If there's a more appropriate place to post this issue or if it has already been addressed, kindly guide me.
Posted
by duoblack.
Last updated
.
Post not yet marked as solved
0 Replies
405 Views
Hello! Currently we are reviewing an issue whereby our users were obtaining Live Activities update, but somehow at the end, there were Live Activity updates that were not properly received by the device. For example: 20 Live Activity updates sent to device, 17 were properly received, however the last 3 were not properly received (as can be seen by the UI of it not updating). So far we have looked into a few root causes highlighted on the forums and on stackoverflow: Timestamp of APNS (every one of the APNS has a different timestamp) 200 is seen from the APNS side, which is why we were confused by the push notification did not arrive on the device side Looking into our logs, its unfortunately not covered enough to tell us when this had been received Some questions here: Is there a way we could log every Live Activity / Push Notification received from APNS? (for all scenario, app on lock screen, app in background) Anyway to track a push notification's lifecycle? I know the Push Notification Console tool is useful for debug usage, but we wanted to see if there's something similar for production usage as well.
Posted Last updated
.
Post not yet marked as solved
73 Replies
40k Views
iOS 17, the default notification tone is changed to - rebound instead of tri-tone. And now, it is too quite. Also, it can't be changed or replaced. Is it possible that it will be replaced/fixed ????
Posted
by BYELIK.
Last updated
.
Post not yet marked as solved
0 Replies
286 Views
I've got a code that was making a successful registration for remote messages a few weeks ago. Here's how it was looking like: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { registerForRemoteNotifications(application: application) return true } func registerForRemoteNotifications(application: UIApplication) { UNUserNotificationCenter.current().delegate = self let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] UNUserNotificationCenter.current().requestAuthorization( options: authOptions, completionHandler: { _, _ in } ) application.registerForRemoteNotifications() } func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { print(deviceToken) } A few weeks ago the didRegisterForRemoteNotificationsWithDeviceToken method was calling after registration, but now neither didRegisterForRemoteNotificationsWithDeviceToken or didFailToRegisterForRemoteNotification methods are called. Why could this happen?
Posted Last updated
.
Post not yet marked as solved
1 Replies
588 Views
I created an application and initially I wasn't going to use it to send notifications, but then I realised that I needed to. So quite naturally, I changed the settings in "Certificates, Identifiers & Profiles". I activated : Communication Notifications Time Sensitive Notifications But not: Push Notifications Because it's a local application. However, when I transfer a new build to TestFlight, the notification settings are not present in "Settings" on my iPhone: Same thing, in the notifications settings, it doesn't show up :/. So my question is this: How can I get my notification settings to be "activated", knowing that they weren't originally authorised in my "Certificates, Identifiers & Profiles" settings?
Posted Last updated
.
Post not yet marked as solved
1 Replies
418 Views
Why did Apple change the sound for Notifications in iOS 17??? I just finally upgraded today from iOS 16.7.2 to iOS 17.1.1 and among other things I don't like, this one makes no sense whatsoever! Why can't user select the sound we want for Notifications? At least when I had the Tri-Tone sound I could hear it. The new sound is way too quiet, causing me to miss notifications now. PLEASE FIX THIS ASAP!
Posted
by RColgrove.
Last updated
.
Post not yet marked as solved
0 Replies
502 Views
I've noticed there are certain apps which seem to track that I'm using my iOS device, and then send me push notifications based on my usage. For example, I may pick up my phone in the middle of the night, unlock it, check my email, and minutes later, this app will send me a push notification attempting to sell me something. Is an actually app permitted to track my activity/usage on my iPhone, outside of my activity and usage within that app? If so, where can I learn more about this? Or is this app in violation of some rule in the ToU?
Posted
by IosDevAZ.
Last updated
.
Post not yet marked as solved
1 Replies
514 Views
Is it possible to pick the user's current device tone/sound as the Push Notification sound for my app programmatically. So that s/he does not miss out any notification just because of unsustainable sound. I have gone through the UNNotificationSound Class, it provides the option to opt either the default or the custom sound. But, my concern is to auto pick the sound which user is using on his/her mobile. Thanks in advance!
Posted
by YR23.
Last updated
.
Post not yet marked as solved
0 Replies
222 Views
Hi. Anyone knownn if there is some update or something APPLE done so that i cant get notifications and sound when i try so send information to my app, it has worked until two days ago.
Posted Last updated
.
Post not yet marked as solved
0 Replies
366 Views
I have made an app to test flight, and I am using Push Notifications Console by apple, and all I need it how to get the hexadecimal bytes that identify the recipient's device. (Device Token) to be able to send push notifications. I just want to send it to all users at the same time.
Posted
by noahhchan.
Last updated
.
Post not yet marked as solved
1 Replies
406 Views
Dear Apple, The decision to NOT allow us to change the notification tone and to NOT allow us to increase the volume so that we can hear it means that as a stock trader I’m NOT getting the ACTIONABLE ALERTS I need during the day. PLEASE CHANGE THIS SO THAT I CAN: 1) increase the volume and 2) assign different notification tones to different applications and 3) make it so that I have the option of including VIBRATION with my notification. THANK YOU.
Posted
by turbostar.
Last updated
.
Post not yet marked as solved
0 Replies
613 Views
I have an app that schedules a handful of local notifications with trigger dates 1 to 4 weeks in the future. Each notification has a single image attachment with a JPEG sourced from the app's main bundle. In development builds via Xcode, or builds via TestFlight, the notifications do appear in the notification center and they do display an image. However, in App Store builds, the notifications appear, but they do not display an image. I have ruled out the following: Images may not be included in the bundle Images may be too large or unsupported (they are ~50KB 480x480 JPEGs, and the docs say validation happens at scheduling time) The iOS device may have no free disk space I'm leaning towards either: Differences in file protection in App Store builds (though the docs say the app process must have access to the image and images in the bundle are copied) The notifications are scheduled too far in the future and if the image is copied from the bundle to temporary storage, it gets wiped before display Does anyone have any insight? Sample code to schedule the notification below: let dateComponents = // Some date in the future let content = UNMutableNotificationContent() content.title = // Some title string content.body = // Some body string content.userInfo = // Some app-specific dict if let path = Bundle.main.path(forResource: "my-image-file-name", ofType: "jpg") { let url = URL(fileURLWithPath: path) do { let imageAttachment = try UNNotificationAttachment(identifier: "", url: url) // Note the empty string identifier - the docs say one will be provided. content.attachments = [imageAttachment] } catch { print("Failed to add image to local notification") } } let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: false) let request = UNNotificationRequest( identifier: "my-notification-id-here", content: content, trigger: trigger) UNUserNotificationCenter.current().add(request) { error in if let error = error { print("Failed to add notification request: \(error)") } }
Posted
by j_ptron.
Last updated
.
Post not yet marked as solved
0 Replies
317 Views
Hey everyone, I'm currently programming a chat app with SwiftUI, Firestore & optionally OneSignal. But I'm currently having the problem that I don't receive push notifications when I'm not in the app. External push messages that are triggered, for example, via the OneSignal website are also displayed in the backround. I just can't get it triggered in the app, does anyone have a code or a suggestion for me? Best regards Max
Posted Last updated
.
Post not yet marked as solved
1 Replies
574 Views
Hi everyone, I have two questions regarding some issues with the new iOS 17 interactive widgets and live activities. Question 1: How can I update other Widgets and/or Live Activities, based on an AppIntent interaction in either one? I have several widgets that is displaying the same information, but in different sizes (Small, Medium, Large and Lockscreen). Most of our users are using many of them together on their Lockscreen and Home Screen. When they are interacting with the AppIntent button in either the Widget og LiveActivity it does not update and vice-versa. Based on the documentation it's pretty clear that interacting with a Widget it will update the timeline for that specific widget after the .perform() in the AppIntent is returned. Unfortunately, I also need to update the LiveActivity and the other TimeLines for the rest of the widgets. I have tried to use the WidgetCenter.shared.reloadAllTimelines() but it seems like it does not update the LiveActivity or the LockScreen widgets correctly. Question 2: How can I update and reschedule the local notifications based on the interaction in the Widget and Live Activity? The app sends a local notification whenever an activity starts or stops (e.g like a pomodoro timer with intervals). Let's assume the user have setup a 30 minute activity in the app, but now decides to pause the activity from either the widget or live activity. I then want to remove the scheduled local notification that was supposed to be fired in 30 minutes. I haven't been able to read from the documentation if this is possible, but would like to know if there is any way this can be performed. Looking forward to hear if anyone have encountered the same challenges :)
Posted
by JMCPH.
Last updated
.
Post not yet marked as solved
0 Replies
405 Views
Hey everyone, I'm facing the following issue: I'm using one signal as a push notification service, and I want to create two projects: staging (especially to test some backend notifications) and production. For production, I can attach the .p8 file and then we're good. For staging, if I attach the same .p8 file, I would be in trouble because I can send a notifications to a real user even being on staging environment. How should I proceed in this situation?
Posted Last updated
.