The published "Next steps for apps distributed in Texas" says "A parent or guardian in Texas can withdraw consent for any app, which will block launching of the app on the child or teen’s device."
My question is: will this also block notifications sent to that app from showing up on that device? Or will notifications still be delivered to the notification center, even though the app can't be launched? (Specifically, notifications sent from a server via Firebase topic/token).
If notifications are not blocked automatically, what is the expected flow for this scenario? My app sends notifications from a server like this.
I could implement client-side code to say "if consent is revoked, unsubscribe from notifications", but if the OS blocks launching of the app, this client-side code would never run.
Similarly, I could subscribe to the server notifications for when consent is revoked, but my app is free & accountless, so I'm not aware of any information in the server notification that I could use to identify the specific user whose notifications should be stopped. (For example my users won't have an appAccountToken because they never made a purchase).
Guidance would be much appreciated. I'm trying to comply with the law but I don't know how.
User Notifications
RSS for tagPush user-facing notifications to the user's device from a server or generate them locally from your app using User Notifications.
Posts under User Notifications tag
145 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have a script that stop working since Tahoe migration.
The script need to send a notification on the my mac.
The issue is this line:
osascript -e 'display notification "The task has been completed" with title "✅ My script"'
It doesn't fail (return 0), nothing in outputs, but doesn't show anything.
I check all my notification settings, but all seems to be right, I tested the configuration of iterm & script editor.
And the global ettongs of the notifications:
We are encountering the following issue with our VoIP application for iPhone, published on the App Store, and would appreciate your guidance on possible countermeasures.
The VoIP application (callee side) utilizes a Wi-Fi network. The sequence leading to the issue is as follows:
VoIP App (callee): Launches
iPhone (callee): Locks (e.g., by short-pressing the power button)
VoIP App (callee): Transitions to a suspended state
VoIP App (caller): Initiates a VoIP call
VoIP App (callee): Receives a local push notification
VoIP App (callee): Creates a UDP socket for call control (for SIP send/receive)
VoIP App (callee): Creates a UDP socket for audio stream (for RTP send/receive)
VoIP App (callee): Exchanges SIP messages (INVITE, 100 Trying, 180 Ringing, etc.) using the call control UDP socket
VoIP App (callee): Answers the incoming call
VoIP App (callee): Executes performAnswerCallAction()
Immediately after executing performAnswerCallAction() in the above sequence, the sendto() function for both the "UDP socket for call control (SIP send/receive)" and the "UDP socket for audio stream (RTP send/receive)" occasionally returns errno = 57 (ENOTCONN). (of course The VoIP app itself does not close the sockets in this timing)
Given that the user has performed an answer operation, the iPhone is in an active state, and the VoIP app is running, what could be the possible reasons why the sockets suddenly become unusable?
Could you please provide guidance on how to avoid such socket closures?
Our VoIP app uses SCNetworkReachabilitySetCallback to receive network change notifications, but no notifications regarding network changes were received at the time errno = 57 occurred.
Is it possible for sockets used by an application to be closed without any notification to the application itself?
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
User Notifications
PushKit
Push To Talk
We are encountering the following issue with our VoIP application for iPhone, published on the App Store, and would appreciate your guidance on possible countermeasures.
The VoIP application (callee side) utilizes a Wi-Fi network. The sequence leading to the issue is as follows:
VoIP App (callee): Launches
iPhone (callee): Locks (e.g., by short-pressing the power button)
VoIP App (callee): Transitions to a suspended state
VoIP App (caller): Initiates a VoIP call
VoIP App (callee): Receives a local push notification
VoIP App (callee): Answers the incoming call
VoIP App (callee): Executes performAnswerCallAction()
After this, the VoIP App (callee) uses "NSTimer scheduledTimerWithTimeInterval" to manage internal processing timing. However, the processing sometimes takes longer than the specified waiting time. Specifically, delays of several seconds can occur.
We understood that if the user is interacting with the screen and both the iPhone and the VoIP app are in an active state, the VoIP app's processing would not be delayed. However, can significant delays (several seconds) in application processing still occur even when the iPhone is in an active state (i.e., the user is interacting with the screen)?"
Hi,
We recently updated our app icon, but the push notification icon has not been updated on some devices. It still shows the old icon on:
• iPhone 16 Pro — iOS 26
• iPhone 14 — iOS 26
• iPad Pro 11” (M4) — iOS 18.6.2
• iPhone 16 Plus — iOS 18.5
After restarting these devices, the push notification icon is refreshed and displays the new version correctly.
Could you advise how we can ensure the push notification icon updates properly on all affected devices without requiring users to restart?
Thank you.
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
Developer Tools
iOS
User Notifications
Hi, We recently updated our app icon, but the push notification icon has not been updated on some devices. It still shows the old icon on: • iPhone 16 Pro — iOS 26 • iPhone 14 — iOS 26 • iPad Pro 11” (M4) — iOS 18.6.2 • iPhone 16 Plus — iOS 18.5
After restarting these devices, the push notification icon is refreshed and displays the new version correctly.
Could you advise how we can ensure the push notification icon updates properly on all affected devices without requiring users to restart?
Thank you.
I created a Notification Service Extension to display profile images in place for the app image (i.e. iMessage).
I send a remote push notification via Firebase Functions, and in the payload, the relevant profile image url string. The profile image url string in the payload is successfully delivered as it appears in my console log and AppDelegate didReceiveRemoteNotification function.
My problem is the profile image does not replace the default app icon image in the remote push notification.
Below is my configuration. Any guidance would be appreciated!
Main target app: the info plist contains NSUSerActivityTypes = [INSendMessageIntent]. The Communications Notifications capability is enabled and "Copy only when installing" in Build Phases Embed Foundation Extensions
Notification Service Extension plist: contains NSExtension > NSExtensionAttributes > IntentsSupported > INSendMessageIntent.
Notification Service Extension class code:
var contentHandler: ((UNNotificationContent) -> Void)?
var bestAttemptContent: UNMutableNotificationContent?
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
self.contentHandler = contentHandler
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
guard var bestAttemptContent = bestAttemptContent else { return }
guard let fcmOptions = bestAttemptContent.userInfo["fcm_options"] as? [String: Any],
let attachmentUrlAsString = fcmOptions["imageURL"] as? String else {
contentHandler(bestAttemptContent)
return
}
if let attachmentUrl = URL(string: attachmentUrlAsString) {
var senderNameComponents = PersonNameComponents()
senderNameComponents.nickname = bestAttemptContent.title
let profileImage = INImage(url: attachmentUrl)
let sender = INPerson(personHandle: INPersonHandle(value: "1233211234", type: .unknown), nameComponents: senderNameComponents, displayName: bestAttemptContent.title, image: profileImage, contactIdentifier: nil, customIdentifier: nil, isMe: false)
let receiver = INPerson(personHandle: INPersonHandle(value: "1233211234", type: .unknown), nameComponents: nil, displayName: nil, image: nil, contactIdentifier: nil, customIdentifier: nil, isMe: true)
let intent = INSendMessageIntent(
recipients: [receiver],
outgoingMessageType: .outgoingMessageText,
content: "Test",
speakableGroupName: INSpeakableString(spokenPhrase: "Sender Name"),
conversationIdentifier: "sampleConversationIdentifier",
serviceName: nil,
sender: sender,
attachments: nil
)
intent.setImage(profileImage, forParameterNamed: \.sender)
let interaction = INInteraction(intent: intent, response: nil)
interaction.direction = .incoming
interaction.donate(completion: nil)
if #available(iOSApplicationExtension 15.0, *) {
do {
bestAttemptContent = try bestAttemptContent.updating(from: intent) as! UNMutableNotificationContent
} catch {
contentHandler(bestAttemptContent)
return
}
}
contentHandler(bestAttemptContent)
} else {
contentHandler(bestAttemptContent)
return
}
}
}
Since upgrading to Xcode 26 beta 4 and using the iOS 26 simulator for testing our app, we've stopped being able to receive device tokens for the simulator from the development APNS environment.
The APNS environment is able to return meta device information (e.g. model, type, manufacturer) but there are no device tokens present. When running the same app using the iOS 18.5 simulator, we are able to register the device with the same APNS environment and receive a valid device token.
Provisioning profiles created for my App ID are not including the Push Notifications capability, even though Push Notifications is enabled in the App ID configuration in Apple Developer Portal.
I have enabled Push Notifications for my App ID (com.abc.app) in the Apple Developer Portal. The capability shows as enabled and saved. However, when provisioning profiles are generated (either manually or through third-party tools like Expo Application Services), they do not include:
The Push Notifications capability
The aps-environment entitlement
This results in build failures with the following errors:
Provisioning profile "*[expo] com.abc.app AppStore [timestamp]" doesn't support the Push Notifications capability.
Provisioning profile "*[expo] com.abc.app AppStore [timestamp]" doesn't include the aps-environment entitlement.
Steps Taken
✅ Enabled Push Notifications in App ID configuration (com.mirova.app)
✅ Saved the App ID configuration multiple times
✅ Waited for Apple's systems to sync (waited 5-10 minutes)
✅ Removed and re-added Push Notifications capability (unchecked, saved, re-checked, saved)
✅ Created Push Notification key in Apple Developer Portal
✅ Verified Push Notifications is checked and saved in App ID
❌ Provisioning profiles still created without Push Notifications capability
Expected Behavior
When Push Notifications is enabled for an App ID, any provisioning profiles created for that App ID should automatically include:
Push Notifications capability
aps-environment entitlement (set to production or development)
Actual Behavior
Provisioning profiles are created without Push Notifications capability, even though:
Push Notifications is enabled in App ID
App ID configuration is saved
Sufficient time has passed for sync
Additional Information
Push Notification Key: Created and valid (Key ID: 3YKQ7XLG9L and 747G8W2J68)
Distribution Certificate: Valid and active
Provisioning Profile Type: App Store distribution
Third-party Tool: Using Expo Application Services (EAS) for builds, but issue persists with manually created profiles as well
Questions
Is there a delay or sync issue between enabling Push Notifications in App ID and it being available for provisioning profiles?
Are there any additional steps required to ensure Push Notifications is included in provisioning profiles?
Is there a known issue with Push Notifications capability not being included in provisioning profiles?
Should I create the provisioning profile in a specific way to ensure Push Notifications is included?
Environment
Platform: iOS
Build Type: App Store distribution
Xcode Version: (via EAS cloud build)
Thank you for your assistance. I've been unable to resolve this issue and would appreciate any guidance.
iOS Deployment Target: Latest
Question based on the https://developer.apple.com/forums/thread/649172
What is the mechanics of using this entitlement?
What should be done in the UNNotificationServiceExtension in order to prevent the display of a notification for the user?
Just pass an empty UNNotificationContent object to contentHandler or something else?
we already got access to com.apple.developer.usernotifications.filtering , we have set up this special permission in our app extension entitlement and provision profile. but we are still unable to filter notification by providing empty UNNotificationContent
I’m testing remote push notifications on macOS, and although notifications are received and displayed correctly, my Notification Service Extension (NSE) never gets invoked.
The extension is properly added as a target in the same app, uses the UNNotificationServiceExtension class, and implements both didReceive(_:withContentHandler:) and serviceExtensionTimeWillExpire(). I’ve also set "mutable-content": 1 in the APNS payload, similar to how it works on iOS — where the same code correctly triggers the NSE. On macOS, however, there’s no sign that the extension process starts or the delegate methods are called.
import UserNotifications
class NotificationService: UNNotificationServiceExtension {
override func didReceive(_ request: UNNotificationRequest,
withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
let modified = (request.content.mutableCopy() as? UNMutableNotificationContent)
modified?.title = "[Modified] " + (modified?.title ?? "")
contentHandler(modified ?? request.content)
}
override func serviceExtensionTimeWillExpire() {
// Called if the extension times out before finishing
}
}
And the payload used for testing:
{
"aps": {
"alert": {
"title": "Meeting Reminder",
"body": "Join the weekly sync call"
},
"mutable-content": 1
},
"MEETING_ORGANIZER": "Alex Johnson"
}
Despite all correct setup steps, the NSE never triggers on macOS (while working fine on iOS).
Can anyone confirm whether UNNotificationServiceExtension is fully supported for remote notifications on macOS, or if additional configuration or entitlement is needed?
We are observing an weird behaviour where a user uninstalled the app back in February (more than a month ago) but APNs is still accepting push notifications are returning success responses.
We know that using APNs response codes for uninstall tracking is not reliable and that Apple will use fuzzy schedule to invalidate tokens.
However, showing successful responses for month+ old tokens seems a bit misleading and results in wasted token processing for both us and Apple.
Could you please confirm that invalidation (or fuzzy schedule) could take more than months to invalidate tokens on the APNs side? Is that expected or is this a bug somewhere?
I am using push notification in my app. User token gets properly registered and is sent to server. Notification are also sent by server and recieved on device as expected. The problem occurs when user uninstalls the app. iOS does not provide any option to handle uninstall event. On top of that when server send notification to such device token APNS feedback service sends success message. Meaning APNS sends push notifications to uninstalled app.I have an API to unregister the device on server since no event is triggered I am unable to call it.Please suggest a way out.
In didFinishLaunchingWithOptions I have this setup for getting the token to send to my server for notifications. The issue is that the delegate callback didRegisterForRemoteNotificationsWithDeviceToken gets called twice when also initializing a CKSyncEngine object.
This confuses me. Is this expected behavior? Why is the delegate callback only called twice when both are called, but not at all when only using CKSyncEngine.
See code and comments below.
/// Calling just this triggers `didRegisterForRemoteNotificationsWithDeviceToken` once.
UIApplication.shared.registerForRemoteNotifications()
/// When triggering the above function plus initializing a CKSyncEngine, `didRegisterForRemoteNotificationsWithDeviceToken` gets called twice.
/// This somewhat make sense, because CloudKit likely also registers for remote notifications itself, but why is the delegate not triggered when *only* initializing CKSyncEngine and removing the `registerForRemoteNotifications` call above?
let syncManager = SyncManager()
/// Further more, if calling `registerForRemoteNotifications` with a delay instead of directly, the delegate is only called once, as expected. For some reason, the delegate is only triggered when two entities call `registerForRemoteNotifications` at the same time?
DispatchQueue.main.asyncAfter(deadline: .now() + 4) {
UIApplication.shared.registerForRemoteNotifications()
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
print("didRegisterForRemoteNotificationsWithDeviceToken")
}
Hi, we've observed a weird behavior for a small amount of our user that we keep receiving the same token from APNs despite it's shown as Unregistered.
When we try to send push to the token, we got an Unregistered error so we remove that token from our server. However, later we would receive an add token request from the client with the same token we just removed, and when we try to send to the token it returns Unregistered again so we remove the token again. This happened 3 times for a user in an hour. The identifierForVendor remains the same for all the requests.
We also owns the client and I've checked client code that it's sending the token it received from didRegisterForRemoteNotificationsWithDeviceToken to the server.
I need to create a background notification that counts down time and uses buttons to add or subtract time. Currently, I'm developing in React Native and using Expo Go to develop my app.
I managed to display a simple notification, but I can't get it to work in real-time, so that when the time is up, it emits a sound indicating that the break is over.
How can I implement this feature?
My application now:
My goal:
The APP was not awakened by system after start a liveactivity and the liveactivity has showed on lock screen.so the updatetoken wont send to our inner server and the liveactivity can not update,often like this,but sometimes it can work.
it makes me confuse,and i don't know how should i can do,because the liveactivity like a black box,i can not analyse the data link.for example ,inner server send a start liveactivity,but it can not accept a updatetoken unless the user lanuch APP.
i hope the liveactivity can start and update on background. And i have developed it as described in the document.
Hope to get your help,thank you very much.
I a using the current RC version of iOS on both my iPhone and iPad. I and developing an iCloud based app and it works correctly on iOS 18. When I upgraded to iOS 26 the iCloud functions work correctly but the push notifications do not work.
The issue appears to be creating subscriptions. The following code should create a subscription and does not get an error, but it did to create a subscription under iOS 26.
func subscribeToNotifications(recordType: String,
subscriptionID: String, notification: CKSubscription.NotificationInfo) {
let subscriptionIDForType = "\(subscriptionID)-\(recordType)"
let predicate = NSPredicate(value: true)
let subscription = CKQuerySubscription(recordType: recordType, predicate: predicate, subscriptionID: subscriptionIDForType, options: [.firesOnRecordCreation, .firesOnRecordUpdate, .firesOnRecordDeletion])
let notification = CKSubscription.NotificationInfo()
subscription.notificationInfo = notification
CKContainer.default().publicCloudDatabase.save(subscription) { (returnedSubscription, error) in
if let error = error {
print("Error saving subscription: \(error)")
} else {
print("Successfully saved subscription: recordType: " + recordType + " subscriptionID: " + subscriptionIDForType)
}
}
}
Print results:
Successfully saved subscription: recordType: folder subscriptionID: folderName-folder
Topic:
App & System Services
SubTopic:
Notifications
Tags:
CloudKit
User Notifications
iPad and iOS apps on visionOS
UIKit
My Mac app has a launch agent (within the app bundle) that works great without the app running. There are some occasions where I need to display an alert and ask the user to launch the app to handle the issue. I thought about using UNUserNotificationCenter but I'm not able to make it work from the agent.
I'm asking for authorization as follows:
[center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge)
completionHandler:^(BOOL granted, NSError * _Nullable error) {
NSLog(@"authorization request completion. Granted: %@, error: %@ (%@)",granted?@"YES":@"NO",error, [error localizedDescription]);
}];
And I'm trying to post the notification as follows:
content.title = @"Your App Name";
content.body = @"Click the button to open the app";
content.sound = [UNNotificationSound defaultSound];
UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:[[NSUUID UUID] UUIDString]
content:content
trigger:nil];
[center addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) {
if (error) {
NSLog(@"Error showing notification: %@ %@", error, [error localizedDescription]);
}
}];
When running I'm getting asked to authorize, I authorize and all seems OK in system settings but I'm not able send any notifications. addNotificationRequest results in UNErrorCodeNotificationsNotAllowed error.
I tried this with the authorization request inside the main app, or inside the agent, with the same results.
When trying to post the notification from within the app, it does work, but that's not what I need.
Is posting notifications from within the launch agent not possible at all, or is there anything here that I'm missing.
TIA