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

How to detect always-on display in Swiftui?
According to apple On devices that include an Always-On display, the system dims the screen to preserve battery life and renders Live Activities on the Lock Screen as if in Dark Mode. Use SwiftUI’s isLuminanceReduced environment value to detect reduced luminance on devices with an Always-On display and use images that look great for reduced luminance. But it seems to have no effect in live activities when displayed in the lock screen with AOD @Environment(\.isLuminanceReduced) var isLuminanceReduced Image("background1") .resizable() .aspectRatio(contentMode: .fit) .frame(height: 400) .offset(y:-40) .brightness(isLuminanceReduced ? -0.5 : 0)
1
0
820
Jul ’23
Best first-party way to stream audio on iOS
Hi, I am currently using the third-party audio library to play audio in my app. It's worth noting that my app deals exclusively with network audio, so the audio that is stored on the network. I deal with Shoutcast streams and just remote MP3 files. Is there a way to do this with native APple APIs? My motivation is that I want to adopt Share Play, lock screen player support and other native goodies. I use Swift UI.P.S. Sorry for random tags, I am blind and the interface for choosing tags cannot be used with VoiceOver
0
0
804
Jul ’23
CloudKit Console: JSON Web Token Validator shows Unrecognizable claims found (Token Generated with Python)
Hello guys I am getting this error Unrecognizable claims found when trying to validate my JWT Token for push notifications. I don't understand what it means. Can someone tell me how to resolve this issue? I am using python, and using the time module to generate the epoch. I guess, this is where the issue is coming from, but I am not sure. import time epoch = time.time() Thanks in advance.
1
1
813
Jul ’23
Issue with VoIP Push Not Received in Certain Conditions - Seeking Cause and Countermeasures
Dear Apple Developer Forum members, We recently encountered a situation where VoIP Push notifications were not being received under specific conditions. We would greatly appreciate any insights or information regarding the potential cause of this issue and possible countermeasures. Incident Details: Problem: VoIP Push notifications are not being received. Device Information: iPad Air (9th generation) OS version: 16.1 Prerequisites for the Issue to Occur: Device is operating without a SIM card, using only Wi-Fi connectivity. Auto-lock feature in Settings is disabled. Low-security Wi-Fi network is being used (specifically, a pocket Wi-Fi device with a low-security label). Procedure to Reproduce the Issue: Leave the app running in the foreground without any user interaction for approximately 5-6 minutes. Send a VoIP Push notification to the target device. No notification appears on the device. Investigation Details and Findings: No apsd (Apple Push Notification Service daemon) log output was generated at the time the VoIP Push notification was sent. We suspect the apsd process may have been stopped for some reason. Is it possible that the apsd process, configured as a wake-on-WAN client, fails to start when the packet is received? Additional information from the macOS Console: Following the log output below, notifications stopped being received: Default 18:26:12.416462+0900 apsd <private> _disconnectStream for interface: WWAN with reason: 2 Default 18:26:12.416574+0900 apsd <private>: Setting is connected 0 on interface WWAN with reason 2 Default 18:26:12.416681+0900 apsd Connection closed development WWAN Default 18:26:12.416783+0900 apsd <private> canUseProxy: NO isNearby: NO Default 18:26:12.416886+0900 apsd <private> received courierConnectionStatusDidChange from <private>. Default 18:26:12.416986+0900 apsd <private> canUseProxy: NO isNearby: NO Default 18:26:12.417090+0900 apsd <private> canUseProxy: NO isNearby: NO Default 18:26:12.417193+0900 apsd <private> updating network guidance isConnected? YES Default 18:26:12.417296+0900 apsd <private> canUseProxy: NO isNearby: NO Default 18:26:12.417396+0900 apsd <private> canUseProxy: NO isNearby: NO Default 18:26:12.417506+0900 apsd Attempting to roll activity presence salt Default 18:26:12.417606+0900 apsd It has not been long enough since the last roll Additional information from the Wi-Fi daemon (wifid) log: The following entry was found: "wifid apsd[122] is a wow client." Additionally, we noticed the following recurring log entry: ERROR: __WiFiLQAMgrIsIntervalChangeAllowed: Too frequent LQM interval change not allowed. Thank you in advance for any assistance, suggestions, or information you can provide. We are eager to understand the cause of this problem and explore potential remedies. Best regards,
0
0
783
Jul ’23
Push payload is not present on notification tap
I am checking if the user taps on the firebase push notification and get the payload. override func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { let userInfo = response.notification.request.content.userInfo os_log("notification tapped %{public}@", log: OSLog.push, type: .info, userInfo) handleNotificationPayload(userInfo as! [String: AnyObject]) setFlutterLinkClickedVariable() } My use case is in app terminated state when push notification is tapped, get the link from payload and navigate to corresponding screen based on the link. This is working when there is only one push notification. When there are multiple push notifications with different links in the payload, only the first notification I tap works. Rest of the notifications just launches the app and does not navigate because the link is not set. I am getting the link from the payload and invoking flutter code which sets the link in the user defaults (shared preferences) and when the app launches in the home screen it checks for this variable and navigates accordingly. func handleNotificationPayload(_ payload: [String: AnyObject]) { if let link = payload["link"] as? String { setFlutterLinkVariable(link) } } override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { os_log("app did receive remote notification %{public}@", log: OSLog.push, type: .info, userInfo) handleNotificationPayload(userInfo as! [String : AnyObject]) completionHandler(.newData) } Currently when there is only one push notification it works because the link is set from the above method. The click delegate is not calling. I did set the delegate in application(:didFinishLaunchingWithOptions). UNUserNotificationCenter.current().delegate = self application.registerForRemoteNotifications() How to solve this issue? Thanks.
1
0
453
Jul ’23
Notification Service Extension in iOS works sometimes but stops working other times. User needs to restart device to get it working again.
We have an app where the notification service extension works well most of the time. However, sometimes we have noticed that the extension completely stops working even when the notification is sent successfully via the APNS server in production. We do not see even the log from the didReceive() function in that case. The only way we can get the extension working again is after restarting the iPhone. Trying to understand when this might happen? Is it something that is throttled by iOS? Would it happen when the device memory is low or the app is using too much memory? We have seen the extension crash sometimes due to hitting memory limits, however, the extension process is spawned again when a new notification comes in. Any kind of help or guidance would be greatly appreciated. Thanks We have setup acknowledgment API calls in the notification service extension processing to be notified when the notifications reach the device. So based on that we know how often the devices stop responding with the ACK to sent notifications. It happens seldom with some users and we have to ask them to restart their device to get the extension functional again.
4
1
1.5k
Jul ’23
About "ITMS-90078: Missing Push Notification Entitlement" that comes when using Firebase Unity SDK
Questions When I installed the Firebase DynamicLinks Unity SDK and uploaded it to TestFlight, I have received an email from AppleStoreConnect stating "ITMS-90078: Missing Push Notification Entitlement". Q1. is there any chance that leaving this situation unresolved will lead to rejection or suspension of distribution at the time of AppStore release? Q2. if anyone knows of a solution to this problem, please let me know. Background We are developing with Unity, a game development engine, outputting an Xcode project, and uploading it to TestFlight from Xcode. We have enabled Push Notification in the Capabilities setting of AppID, but we do not use this feature in our app, and we do not use a certificate for Push Notification. The same AppID setting did not send the same email until now, but when the Unity SDK for Firebase Dynamic Links was installed, the above email started to arrive. We believe that it is difficult to solve the problem at present, because there is a report on the Github issue of the SDK provider that the same email is received even if the Capabilities of Push Notification is turned off. (https://github.com/firebase/firebase-unity-sdk/issues/375) Thank you.
0
0
825
Jul ’23
PTChannelDescriptor is not changing when I leave and then join another channel
I am using the same ChannelManager, however when switching to another channel, I leave the channel and then requestToJoin a new channel with the new inputted ChannelName and PTDescriptor however the name and image are not changing when I go to background to see the Native UI. Am I missing something to call for an update for the PTDescriptor?
1
0
718
Jul ’23
Widget Refresh through Silent Push Notification
I am trying to refresh my widget through Silent Push Notifications. I have the background value as well as content-value = 1. However 99% of the time if the app is in the background or has been fully terminated/exited, the silent push notification won't start the app. I also tried logging the method that runs when the notification is received and it seems like it only gets called once the app is re-launched manually. Do I need to do anything to get it to get my widget to refresh when some events happen on the backend? Android is really smooth when it comes to implementing similar logic.
0
0
560
Jul ’23
How to dismiss live activity notification from Watch?
If you update live activity with alertConfiguration: argument, iPhone shows a notification (or expands dynamic island): await runningActivity.update(content, alertConfiguration: .init(title: "Alert", body: "Done!", sound: .default)) Paired Watch presents a notification as well: I cannot find a way to dismiss that live activity notification from Watch. Is there a way to remove it similarly to UNUserNotifications? UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: [notificationID])
0
0
699
Jul ’23
MDM CSR vendor certificate renewal
Our Vendor MDM CSR certificate will expire in a month. We are trying to renew/update it, but we are unsuccessful. We keep getting the message "Certificate signature Verification failed because the signature is invalid." Has anyone dealt with the renewal, or can anyone advise? We do everything according to the Apple documentation, but unfortunately there is not as much about renewal the certificate as there is about initially creating it. Can anyone help? Thank you
1
0
594
Aug ’23