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

Rich Notification
Is There Anyone Who implemented Rich Notification Recently I tried To Implement it but its not working, I Have went through blogs and tut which are Available On on internet but They are not working, Please let me know if there is someone who Can Help Me With That.
1
0
158
1w
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
149
2w
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
136
2w
Push notification no longer receiving on iPhone after upgrade sonoma MacOS for development
We are using sonoma OS for generating device token for iPhone real devices, we are using certificate authentication mechanism for APNs cloud server to send the push notification to the actual device. Actual mobile device not receiving push messages, i am using my own client to send request APNs cloud. some how my actual device is not receiving push messages
1
0
153
2w
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.
6
2
1.8k
2w
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
202
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
197
3w
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
213
3w
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
185
3w
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
353
4w
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
355
Jun ’24