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

Possible to start a live activity on watchOS 11?
I'm excited to bring my Live Activity to Apple Watch via the .supplementalActivityFamilies([.small]) modifier. However, I'm also wondering whether it is possible for my watchOS app, separately, to initiate a Live Activity and receive updates for it via push notification. From my testing it seems like no, but the function call itself can be made, since ActivityKit is available on watchOS. Are there any other recommendations for how to go about initiating a Live Activity from a watchOS app? Would I have to communicate with a companion iOS app to start the Live Activity on the phone instead?
2
0
179
2w
Can't receive App Store Server Test Notification
I have setup my https server to receive App Store Server Notification. But I can not receive the test notification. The following is what I did and checked: Running my https server (It's a simple https server build with python) on port 11234. The server url is https://recorderplus.com:11234 Setup the sandbox server url in App Store Connect: https://recorderplus.com:11234 Use App Store Server Library(python) to request a test notification, And get a response: SendTestNotificationResponse(testNotificationToken='f6ea15ca-0f4f-4233-8ae6-6ecc8a7ab43c_1719371691827') But my https server did not receive the test notification. To make sure my https server works fine. In browser(firefox) I input "https://recorderplus.com:11234", the browser can get the result page from https server. My https server also support Post command, I run the command "curl -X POST -d "test" https://recorderplus.com:11234", my https server can get the post and print it. Did I miss anything? Is there anything I should do or check to make my server receive the test notification?
1
0
113
2w
Notification Service Extension restrictions
I have an iOS app which uses Notification Service Extension (NSE) to process incoming notifications before it displayed to user. In NSE, as part of initialization of my app, I need to iterate through a 2D array. There are roughly 65k iterations. I've noticed that this iteration fails somewhere in between and the NSE process crashes... I can say it crashes because the logs stopped in between the iterations. This results in 'unmodified notification' getting displayed immediately, whereas NSE is granted 30 sec of background execution. My question is, why does this happen? The above iteration of 2D array works in app, but fails in NSE. Is there some kind of restriction on background extensions? - the documentation only talks about a time limit of 30sec. If there is some kind of restriction (like CPU and memory), how does one know this and code for it... since Apple did not provide any documentation. Or perhaps, there is a completely different reason?
3
1
179
2w
Air drop
If receive an file by the air drop when the iPhone is unlocked only with the face id ( i mean like when you are only looking at the time or the notification) can’t accept the file also when you slide down the notification you can’t accept it also . Thx
0
0
110
2w
Receive push notification when app in foreground after disable notification permission in settings
Although I disable notification permission in setting, still receive push notification when app in foreground AppDelegate::application(_:didReceiveRemoteNotification:fetchCompletionHandler:)[L:------------------didReceiveRemoteNotification [AnyHashable("aps"): { alert = { body = "Push payload body"; subtitle = "Test push notification"; title = "Push Hero"; }; }]------------------]
3
0
238
2w
Complication PushKit is not received in the background
It is received fine when the watch app is in the foreground. Code sample: import Foundation import PushKit final class PushNotificationProvider: NSObject { let registry = PKPushRegistry(queue: nil) override init() { super.init() registry.delegate = self registry.desiredPushTypes = [.complication] } func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) { Log("token received") } func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) { Log("push received") completion() } } Watch app: import SwiftUI @main struct XX_Watch_App: App { @WKApplicationDelegateAdaptor var appDelegate: XXWearableAppDelegate private let push = PushNotificationProvider() var body: some Scene { WindowGroup { AppView(...) } } }
3
0
183
3w
PushKit is not received in the background
It is received fine when the watch app is in the foreground. Code sample: import Foundation import PushKit final class PushNotificationProvider: NSObject { let registry = PKPushRegistry(queue: nil) override init() { super.init() registry.delegate = self registry.desiredPushTypes = [.complication] } func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) { print("token recieved") } func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) { print("push recieved") completion() } } Watch app: import SwiftUI @main struct XX_Watch_App: App { @WKApplicationDelegateAdaptor var appDelegate: XXWearableAppDelegate private let push = PushNotificationProvider() var body: some Scene { WindowGroup { AppView(...) } } }
0
0
175
3w
Communication Notifications not grouping notifications by conversation
I've implemented Communication Notifications in my messaging application but am having difficulty with figuring out why notifications aren't being grouped by conversation - instead, they all collapse into a single group. I've verified that the conversationIdentifier of the INSendMessageIntent is being correctly set for my notifications, along with the speakableGroupName. Is there anything else I could be missing to achieve the desired conversation grouping behaviour?
2
0
135
2w
Silent push notification denied: pushDisallowed
Hi We are using silent push notifications in our app, these trigger our app to run code that syncs data with our server. This includes time sensitive data which the user will want to know about (which we send alerts generated on the device for). We know we are probably not using the notifications system as intended, we plan to rectify this soon using alert push notifications. To begin, we were willing to run the risk of sometimes having our code not be able to run in background, in exchange for less code complexity. However we did not expect it to be this unreliable. The app is functionally never allowed to promptly run our sync code. We believe the likelihood of promptly being able to run code has also declined significantly in the last few months. It used to perform better. There are of course many reasons that the app may be denied being able to run, battery, wifi / data, cpu. But when any of these are the reason these provide transparent rationale. The most common rationale we see is Rationale: [{[pushDisallowed]: Required:0.00, Observed:1.00}, TLDR "pushDisallowed" is a very opaque rationale, we were hoping to have some insight as what makes up the "pushDisallowed" reasoning. Presumably there are many factors that go into this, a rough list would be very helpful. We aren't necessarily seeking an answer for why our app is being denied, but why apps in general are denied with this rationale. We cannot find anything in the documentation outlining this. Full example console message default 16:16:12.710320+1200 dasd com.apple.pushLaunch.nz.co.appName.ios:7808B2:[ {name: ApplicationPolicy, policyWeight: 50.000, response: {Decision: Absolutely Must Not Proceed, Score: 0.00, Rationale: [{[pushDisallowed]: Required:0.00, Observed:1.00},]}}
1
0
177
2w
Push Notification User to User
Hello everyone, I'm getting desperate... I have built a small chat app and just can't get the other person to receive a push notification outside the app. Does anyone have a code snippet or an idea how I can solve this? I'm getting desperate! I have already tried a lot, the best would be a local solution where the message is triggered when the user receives a new message. I would be happy to receive code snippets or tips. Sending via OneSignal works, but as I said, I just can't get the user to user messages to work!
1
0
167
3w
Using Genmoji with local notifications
As per subject. Is this possible at all? The WWDC video only talks about the communication / push notifications. There doesn't seem to be any update to UNNotificationContent to allow setting of attributed strings. If your app makes use of communication notifications you can even include Genmoji and other image glyphs in your notifications with the new "UNNotificationAttributed MessageContext API". For push notifications, the payload just needs to contain a rich text representation that may contain image glyphs. We recommend that you use a Notification Service Extension to parse the rich text, download assets, create the attributed body and update the notification content
1
0
185
3w
Notification filtering entitlement - no response from apple
For a few years now, I have submitted requests for com.apple.developer.usernotifications.filtering entitlement, but never got an approval/denial response from apple. even after contacting them via email, still didn't get a response about the request status. our app is an emergency alerts app, this entitlement is crucial for our app reliability. Last request i have sent has Case-ID: 7377207
0
0
170
3w
Cannot get PushKit to register for Watch app
Here is the code: let pushRegistry = PKPushRegistry(queue: .main) func applicationDidFinishLaunching() { pushRegistry.delegate = self pushRegistry.desiredPushTypes = [.complication] } func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) { let token = pushCredentials.token.reduce("") { $0 + String(format: "%02x", $1) } print(token) } The watch extension has push notifications capability, and the delegate is never called with the pushCredentials.
10
0
331
Jun ’24
didReceiveRemoteNotification fires on Xcode build but not on .ipa builds.
Hi, We are trying to implement a system that delivers real time data updates to our apps through the Firebase Cloud Messaging system using the REST API with the relevant payload. We set content-available to 1 so that the payload delivery is silent. We use the didReceiveRemoteNotification delegate function to receive the push notification. It works seamlessly when the app is built through Xcode but when we tried it on an .ipa, the delegate function is not called. We have tried setting different parameters in apps-priority and apps-push-type but without much success. Apple documentation points out that there are some restrictions when it comes to receiving silent push notifications in this way. But in our case, it looks like Xcode builds work perfectly while ipa builds are very spotty at best. Is this not the right method to receive real time data updates? It was our impression that this is how chat apps for example are setup to receive real time text updates. If this method cannot be used, does anyone have any other suggestion as to how to go about achieving the same behaviour within our apps? Thank you! Fardin
2
0
176
3w
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
461
Jan ’24