Send 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

New delivery metrics now available in the Push Notifications Console
The Push Notifications Console now includes metrics for notifications sent in production through the Apple Push Notification service (APNs). With the console’s intuitive interface, you’ll get an aggregated view of delivery statuses and insights into various statistics for notifications, including a detailed breakdown based on push type and priority. Introduced at WWDC23, the Push Notifications Console makes it easy to send test notifications to Apple devices through APNs. Learn more.
0
0
419
Oct ’23
Custom Push Notifications for Apple Wallet Pass Not Received
Hello everyone, I'm having trouble with sending custom push notifications for Apple Wallet passes. Here's what I've done so far: Registered a new pass: I receive a deviceToken for the pass. Enabled Push Notifications: Push notifications for the Apple Wallet app and the specific pass are enabled on my phone. Added the Key for Push Notifications: I've added the necessary key for push notifications. I use following code to send the message via APNS: const tokenKey = fs.readFileSync(options.tokenPath).toString(); jwtToken = sign({}, tokenKey, { algorithm: 'ES256', expiresIn: '1h', issuer: options.teamId, header: { alg: 'ES256', kid: options.keyId } }); const client = http2.connect('https://api.push.apple.com:443'); const notificationPayload = JSON.stringify({ aps: { "alert" : "Hello" } }); // and try //{ // "aps": { // "alert": "Your pass has been updated!", // "sound": "default" // }, // "pass-type-identifier": "pass.com.example.myPass", // "serial-number": "123456789", // "device-token": "<deviceToken>" //} const request = client.request({ ':method': 'POST', ':path': `/3/device/${deviceToken}`, 'apns-topic': topicId, 'apns-push-type': 'alert', 'authorization': `bearer ${jwtToken}`, 'apns-priority': 10, 'content-type': 'application/json', 'content-length': Buffer.byteLength(notificationPayload) }); return new Promise((resolve, reject) => { request.on('response', (headers, flags) => { for (const name in headers) { console.log(`${name}: ${headers[name]}`); } }); request.on('data', (chunk: string) => console.log(chunk)); request.on('end', () => { client.close(); resolve(); }); request.on('error', (err) => { console.error('Error sending push notification:', err); reject(err); }); request.write(notificationPayload); request.end(); }); When I send the message, I receive a :status:200 and a apns-ID, indicating that the message has been sent. However, I do not receive the custom push notifications on my phone. The pass updates are received without any issues, but the notifications are not. Has anyone encountered this issue or know if it's possible to send custom push notifications for Apple Wallet passes in this manner? Any guidance on how to resolve this issue would be greatly appreciated.
0
0
23
10h
Push notifications are not displaying when app is in foreground
I have some C++ code to embed in my Application and hence enabling the setting C++ and Objective C ++ compatibility settings to C++/objective-C++ under build settings of my project .Once I enable it I am not receiving any push notification display when I'm in foreground even though I have the required willPresent function handler in app delegate. Also observed that the code is going into didReceiveRemoteNotification function handler. But once I disable the setting or change the setting to c/objective-c,then the flow is working fine and I'm getting the push notification on foreground. Request you to please help me here
1
0
26
17h
iOS dosen't call didActivateAudioSession
PLATFORM AND VERSION iOS Development environment: Xcode 15.0, macOS 14.4.1, Objective-C Run-time configuration: iOS 17.2.1, DESCRIPTION OF PROBLEM I am developing an application that uses NetworkExtension (VoIP local push function). But iOS sometimes doesn't call didActivateAudioSession after following sequence. Would you tell me why iOS doesn't call didActivateAudioSession ? (I said "sometimes", but once it occurs, it will occur repeatedly) myApp --- CXStartCallAction --->iOS myApp <-- performStartCallAction callback --- iOS myApp --- AVAudioSession setCategory: AVAudioSessionCategoryPlayAndRecord --->iOS myApp --- AVAudioSession setMode: AVAudioSessionModeVoiceChat --->iOS myApp <-- didActivateAudioSession callback ----iOS I suspect that myApp cannot acquire an AVAudioSession if another app is already using AVAudioSession. [QUESTION1] Is my guess correct? Should I consider another cause? [QUESTION2] If my guess is correct, how can I prove if another app is already using an AVAudioSession? This issue is based on a customer complaint, but the customer said they don't use any other apps. Best Regards,
1
0
61
1d
IOS 18 Beta 2 bug fix
After a week of testing iOS 18. iPhone XS keeps randomly up and down cellular network which shows low signal /no service/ hig signal after I use it for a few minutes. second bugs is keyboard switching , sometimes don’t work auto predictive and auto capitalisation in keyboard. Reported this issue through feedback assistant. Please fix this bug in next iOS 18 beta.
4
0
689
4d
iOS Push to Talk Framework Not Working in Archive Build (Flutter)
I have developed an app using Flutter that utilizes the Push to Talk framework on iOS. The Push to Talk feature works perfectly in debug mode, but after archiving the build and installing it on an iOS 17 device, the Push to Talk functionality stops working. Here are the steps I have already taken: Enabled background modes. Enabled Push to Talk capabilities. Despite these settings, the issue persists in the archive build. Has anyone else encountered this issue? What additional steps or configurations are required to get Push to Talk working in the archive build on iOS 17? Any help or guidance would be greatly appreciated. Thank you!
1
0
113
5d
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
139
1w
App Crash on Testflight
Good day. My app crashed as i launched to testflight. when it is launched on a real devices it crashes here is my crash report. Incident Identifier: 6B2FE0C7-91F8-46D3-90B5-EB96A6809C5C Hardware Model: iPhone12,5 Process: Runner [39554] Path: /private/var/containers/Bundle/Application/D413442F-1978-4F6F-909C-A09EAE720D44/Runner.app/Runner Identifier: com.gtirides.appRide Version: 1.0.0 (1) AppStoreTools: 15F31e AppVariant: 1:iPhone12,5:16 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.gtirides.appRide [4745] Date/Time: 2024-06-20 13:07:17.1843 +0100 Launch Time: 2024-06-20 13:07:16.9994 +0100 OS Version: iPhone OS 16.5.1 (20F770750d) Release Type: User Baseband Version: 4.02.01 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 VM Region Info: 0 is not in any region. Bytes before following region: 4301684736 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 100668000-100670000 [ 32K] r-x/r-x SM=COW ...er.app/Runner Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [39554] Triggered by Thread: 0 Thread 0 Crashed: 0 Intercom 0x0000000100e94610 +[ICMIdentityStore hexTokenFromDeviceToken:] + 32 1 Intercom 0x0000000100e946bc -[ICMIdentityStore setDeviceTokenData:environment:failure:] + 80 2 Intercom 0x0000000100ebb320 +[ICMHTTPBridge registerDeviceToken:failure:] + 116 3 Intercom 0x0000000100ea7bdc +[ICMBridge registerDeviceToken:failure:] + 112
1
0
156
1w
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
132
1w
Potential Apple Pay Notification Delay in iOS 18 Developer Beta
Potential Apple Pay Notification Delay in iOS 18 Developer Beta Users are reporting a delay in receiving purchase notifications in Apple Wallet after using Apple Pay. Transactions are confirmed within the Wallet app, but the notification arrives hours later. As this issue is occurring on the iOS 18 developer beta, it's likely a software bug related to Apple Pay integration with Wallet. I have reported this to Feedback. Is anyone else having the same problem?
2
1
280
2w
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
135
2w