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.
APNS
RSS for tagSend push notifications to Mac, iOS, iPadOS, tvOS devices through your app using the Apple Push Notifications service (APNs).
Posts under APNS tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
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?
Hello all,
We are using APNs to send push notifications to mobile apps using token-based connection (using .p8 certificate) and the technical certificate signed by Apple authority (which we have included in our truststore)
The technical certificate was retrieved from push.apple server using the following commands:
Sandbox env
echo -n | openssl s_client -connect api.sandbox.push.apple.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/api.sandbox.push.apple.com.crt
PRD env
echo -n | openssl s_client -connect api.sandbox.push.apple.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/api.sandbox.push.apple.com.crt
Now, the time has come to renew the technical certificate before it expires ( validity period of 2 years), and we face the situation where we get the same certificate back from the push.apple server.
√ /tmp [09:53] # openssl x509 -noout -text -in 'api.push.apple.com.crt'
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
17:97:52:80:2d:4d:48:bb:e5:ed:25:94:49:da:6d:63
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=Apple Public Server RSA CA 12 - G1, O=Apple Inc., ST=California, C=US
Validity
Not Before: Dec 19 17:22:50 2022 GMT
Not After : Jan 18 17:22:49 2024 GMT
Subject: CN=api.push.apple.com, O=Apple Inc., ST=California, C=US
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
We all know PRD releases do take time, and we expected new certificates to already be available on the push.apple server.
Critical Problem: The PRD application will fail all our business use cases, as it will fail to successfully connect with Apple using a trusted SSL connection
How can we proceed further?
Thank you!
Hi,
I am trying to distribute my Flutter macOS app, but it fails systematically.
The application works perfectly locally (in both Debug & Release modes).
My application uses the com.apple.developer.aps-environment entitlement (Push Notifications).
I set this entitlement to "production" everywhere (DebugProfile.entitlements, Release.entitlements & RunnerProfile.entitlements).
I have macOS distribution provisioning profile.
When I am running the 'Archive', I selected as destination: "Any Mac (Apple Silicon, Intel)".
When I am trying to deliver the archive, I receive the following error:
Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on macOS. Specifically, value 'development' for key 'com.apple.developer.aps-environment' in ...
and this... for every single asset !!
My configuration is:
Flutter 3.16.2
XCode 15.0.1
Mac OS: Ventura 13.6.1
Hardware: Mac mini 2018
Any help will be more than welcome...
Thanks in advance,
This is for Google Workspace to Apple Push certificates
Finish APNS certificate setup
Upload the certificate you downloaded from Apple
File attached
MDM_ Google LLC (Ent)_Certificate (3).pem
We uploaded the certificate received from the Apple Push Certificates Portal but keep coming up with an error message:
The certificate didn't upload
Our app get strange things
Server send push once
but App get received message twice or more (same)
is APNS OK?
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??
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
===
Hi all. I'm trying to have an AHAP file start playing simultaneously for all users. My initial thought was to use a push notification to trigger this event, but not everyone receives it at the same time. Another idea is to use an HTTP server and livestream data. I would greatly appreciate any input or suggestions on how to remotely synchronize an event for all app users.
Push notification is enabled on my Mac app and the APN message is being received, didReceiveRemoteNotification being called however notification didn't show up in the notification center. And when I checked the System->Notifications, my app is not even being listed in Application Notifications. Please kindly advise.
APNs Notification Receive time on Apple Watch
Connected with iPhone
approximately 10-15 seconds
Without Connection with iPhone
Immediately (less than a single second)
Does anyone know why the situation that I've wrote above?
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.
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.
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.
I purchase apple developer program membership i enrolled for it i paid to apple for 1 year membership
they send me mail and showing my active subscription in Purchases and apple developer app also
but they didn't give me appstoreconnect access what it is mean why i buy apple developer program membership ? because i want to publish my app on appstore i attached screenshot of proof that i have active membership but i didn't get access of appstoreconnect they didn't reply me on mail and on call i contacted apple developer support on call and vie email also they didn't give me any solution
They not refunding my money they don't have me product for what i paid means Scam
UPDATE:
So I discovered that if UIScreen.main.traitCollection.userInterfaceStyle is called in a notification service extension then it doesn't detect any change to the iPhones light/dark mode unless the phone is restarted.
(I tried with other extensions, changes are detected immediately in other extensions, however not with a notification service extension nor in a notification content extension).
ORIGINAL POSTING:
I've got a notification service extension which is populating the notification with images before it's displayed.
The images are part of an image set with different images for light and dark modes.
What I've discovered is that which image is displayed in the notification depends upon whatever mode the phone was in when the app was installed or when the phone was restarted and it will stay like that for any subsequent posted notifications forever regardless of what the phone's light/dark mode setting is, unless the phone is restarted.
Here's an example to illustrate what I mean, here's an image set in the Media.xcassets for the extension, its called "Grunt".
And here's some code in the extension:
notificationContent!.title = "GRUNT"
if let url = URL(forImageResource: "Grunt") {
do {
let attachment = try UNNotificationAttachment(identifier: "imageAttachment", url: url)
notificationContent!.attachments = [attachment]
} catch {
NSLog("error")
}
}
contentHandler(notificationContent!)
When the app is installed, if the phone is set to light mode, then when a notification is posted the 2x Light image is displayed in the notification. If the phone's setting is then changed to dark, then the 2x Light image still continues to displayed in all subsequent notifications that get posted.
Conversely, if the phone is set to dark mode when the app is installed then the 2x Dark image is displayed in a notification, similarly if the phone's settings are changed to Light, the Dark image continues to be displayed for any new notifications posted.
Until the phone is restarted - then any new notification display in accordance with whatever the phone's dark mode is set to at the time the phone is restarted.
In other words, if the phone's light/dark mode setting is changed, new notifications posted don't display the appropriate light/dark image from the image set unless the phone is restarted.
(Occurs with both iOS 16 and 17)
I get a curl(7) error response when connecting to APNS and cannot send push notifications.
The transmission is sending 10000 messages at 0.1 second intervals of 500 messages each. Part of the situation is that the iPhone device is notified.
Can anyone who has experienced a similar event please advise?
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?
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.
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?