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

Location Push service extension is not fired
I'm trying to use the location push service extension for iOS, I have followed all the steps from the documentation: I asked Apple for the entitlement and put it in the app Created a new Target "Location Push Service Extension" in swift I implemented the methods inside the service I called startMonitoringLocationPushesWithCompletion: to receive the location apns token and i use it to send the push thanks to this demo and my p8 certificate I receive a 200 when sending the push and i can see on my device that the push is received because a small icon (location) is shown on the top but my service is never fired even though i tried to put console logs and attaching to the process Is there something I am missing?
1
0
377
Nov ’23
Wake up a terminated app using Silent Push
According to the article linked below, it is explained that apps that have been closed by the user cannot be woken up using Silent Push. https://developer.apple.com/forums/thread/714426?login=true However, what we actually saw in iOS 16 and iOS 17 is that apps that the user has closed wake up with an Silent push and start running in the background. There was confusion about which action was right. Please help me understand this behavior.
1
0
393
Nov ’23
How to use the same .p8 file on different app flavors
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?
0
0
466
Nov ’23
issues with transmitting push
We are experiencing issues with transmitting MDM push. Some are successfully transmitting, but the majority are failing. The following message occurred on the server: java.util.concurrent.ExecutionException: io.netty.channel.AbstractChannel$AnnotatedSocketException: Network is unreachable: api.push.apple.com/2620:149:208:430f:0:0:0:a:443 java.util.concurrent.ExecutionException: io.netty.channel.AbstractChannel$AnnotatedSocketException: Network is unreachable: api.push.apple.com/2620:149:208:4303:0:0:0:b:443 java.util.concurrent.ExecutionException: io.netty.channel.AbstractChannel$AnnotatedSocketException: Network is unreachable: api.push.apple.com/2620:149:208:430c:0:0:0:b:443 java.util.concurrent.ExecutionException: io.netty.channel.AbstractChannel$AnnotatedSocketException: Network is unreachable: api.push.apple.com/2620:149:208:430b:0:0:0:a:443 java.util.concurrent.ExecutionException: io.netty.channel.AbstractChannel$AnnotatedSocketException: Network is unreachable: api.push.apple.com/2620:149:208:4303:0:0:0:b:443 java.util.concurrent.ExecutionException: io.netty.channel.AbstractChannel$AnnotatedSocketException: Network is unreachable: api.push.apple.com/2620:149:208:4306:0:0:0:d:443 Apple system status was normal. Since some are successfully transmitting, we suspect that the issue may not be related to the network.
6
1
1.1k
Nov ’23
Do I have to register an app in the App Store to use Location Push Service Extension?
I'm going to apply the Location Push Service Extension function to the app I'm currently developing. It's still in the development stage, and it hasn't been uploaded to TestFlight. When request permission for the Location Push Service Extension feature, it says App Store url is required. Can this feature be added after the app is deployed to the App Store? I tried to test it through CloudKit, but the CLLocationPushServiceErrorDomainError3" error occurred in CLLocationManager's startMonitoringLocationPushes method, so I can't test it either.
0
0
305
Nov ’23
Hello, I show image url on live activity not working on Device, but it show on simulator. Help me, i miss two weeks. Thanks
struct NetworkImage: View { let url: URL? var body: some View { Group { if let url = url, let imageData = try? Data(contentsOf: url), let uiImage = UIImage(data: imageData) { Image(uiImage: uiImage) .resizable() } else { Image("league") } } } } NetworkImage(url: URL(string: context.attributes.imageGame)) .aspectRatio(contentMode: .fill) .frame(width: 35, height: 35) .clipShape(Circle())
0
0
393
Nov ’23
Local notification image attachment not displayed for App Store builds
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)") } }
1
0
713
Nov ’23
PTChannelManager Discrepancies in Documentation
Hello, I am reading up on the documentation and seems to have some discrepancies but wanted to double check. In Overview for PTChannelManager, it states "Multiple calls to channelManager(delegate:restorationDelegate:completionHandler:) result in the system returning the same shared instance, so store the channel manager in an instance variable." https://developer.apple.com/documentation/pushtotalk/ptchannelmanager However if we look at the documentation for creation of a channel manager, in the completionHandler, it states that it will return "A new channel manager instance." https://developer.apple.com/documentation/pushtotalk/ptchannelmanager/4031737-channelmanager So is it a shared instance that gets returned or will a new instance be created? Need to know if we will need to implement a multiDelegate Pattern or not for this scenario for example if someone else called this function, would they take over the callbacks or would they get their own instance? Thank you.
1
0
590
Nov ’23
App users receive multiple notifications. But, We sent once.
Hello. It seems that some customers are having a problem receiving Push notifications sent by our app. There is only one transmission history on the server. Some users receive only one notification, while others receive multiple notifications. There are no in-app notifications, and all notifications are sent from the server. Given this situation, we believe that there may be a problem on the OS side that receives the push notifications. We would appreciate any solutions or information you can provide. As an example, we will send you information on the actual push notification where the duplication occurred. This is occurring on iOS16 as well as iOS17. Thank you. regards. === Payload: { "aps": { "alert": { "title": "", "body": "{body}" } }, "nd_custom": { "tap_location_url": "{url}", } "send_no": "861917" }, } "show": "1" } Date and time of transmission: Nov 10, 2023 23:00:03 ===
1
0
326
Nov ’23
Possibility of programmatically using user's current device tone as a Notification sound.
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!
1
0
648
Nov ’23
Live activity pushTokenUpdates not emitting any token
We are using the below getPushToken() function to retrieve live activity token. However there are cases in production such that await activity.getPushToken() never finish. i.e. have logs of start event and no return or end event, the code path stuck at the guard statement. Do anyone face same issue and if can advise what can go wrong and how best to handle such cases? // log start event guard let pushToken = await activity.getPushToken(), !pushToken.isEmpty else { // log return event return } // log end event extension Activity { public func getPushToken() async -> String? { for await data in pushTokenUpdates { return data.map { String(format: "%02x", $0) }.joined() } return nil } }
0
0
323
Nov ’23
Multiply widgets updating
Hello! We have issue with updating multiply widgets of one kind. For my case we have widget with one setting (period), and it will be common case for user to use two widgets of one kind to see data for two periods. Also user need to sign in our app to see info on widget. After installing app we add 2 or 3 widgets of one kind on home screen. Now widgets saying what we need to sign in. We tap on widget, signing in, app sends WidgetCenter.shared.reloadAllTimelines(). When we going to home screen. One widget updated and showing data and another non-updated and saying what we need to sign in
0
0
329
Nov ’23
Notification Sound with iOS 17
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!
1
0
465
Nov ’23
How Do I post APN??
I want to send APN to update a pass in the Wallet app. Followed this guideline. https://developer.apple.com/documentation/walletpasses/adding_a_web_service_to_update_passes#3733254 I tried with Typescript (Firebase Functions) like this. var path = "/3/device/"+pushToken var url = "https://api.push.apple.com:443"+path const response = await fetch(url, { method: 'POST', body: null, headers: { 'apns-topic': 'com.colorfull.walletPass', 'apns-push-type': 'background', 'connection': 'keep-alive' } }); Got this error. TypeError: fetch failed Tried with Flutter like this. var path = "/3/device/$pushToken"; var url = "https://api.push.apple.com:443$path"; Response resp = await post(Uri.parse(url), headers: { 'apns-topic': 'com.colorfull.walletPass', 'apns-push-type': 'background', 'connection': 'keep-alive' }, body: {}); Got this error. ClientException: Invalid request method, uri=https://api.push.apple.com/3/device/688a3d6bf83526f00f6fb3d8dd197578f665dea0eeba7aebbe68c61f06bad198 Obviously I'm doing it all wrong, but there is no clear guideline. How can I send APN??
0
1
390
Nov ’23