i hava a app using Gateway.push.apple.com to push Notifications,but it is not working sine last month, i test the api show push Notifications success but my device can't receive the Notifications ,is this api not working anymore ? but why the api show push Notifications success ?
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
Dear Apple Team,
I have two questions regarding the Push-to-Talk framework on iOS 18:
Would it be possible to disable or hide the “Leave” button in the system screen? Currently, only the “Talk” button can be disabled when using the "Listen Only" mode, but the “Leave” button remains active. It would be very helpful to have the option to control or hide this button as well, depending on the use case. At the moment, I can only detect if the user pressed the "Leave" button by checking the PTChannelLeaveReason. However, this alone is not sufficient to prevent unwanted user actions or to guide the user experience more precisely in certain scenarios.
I only receive the APNs push notification “type: voip-ptt“ once per active channel. My app is running in the background, and I frequently switch between full- and half-duplex to allow users to reply immediately. After some time, even though a new notification should be triggered, no banner is shown. When I try to talk via the framework, the active speaker is correctly updated, but no notification appears. Only after leaving and rejoining the channel do I receive a new notification – and again, just once.
Could you please let me know whether this is expected behavior or if it might be a bug?
Thank you very much in advance.
Best regards,
Eugen
Hello Everyone I am new here,
I am testing game center integration and using a development build of my IOS game. I have set up a couple of achievements in app store connect, but when I trigger them in the game then they do not unlock or show up.
Okay so i am signed into the game center with a sandbox account on a test advice. Is there anything else I need to configure, or do achievements usually only work after the game is released?.
I will appreciate any guidance…
Thanks in Advance!!!
Hello,
We are currently facing a persistent issue where Apple Push Notifications (APNs) are no longer being delivered to devices. This is not an intermittent problem — push notifications have completely stopped working. We are using PushSharp.Apple (Version 4.0.10.0) to send the notifications.
Current Behavior (Failing):
Every notification request appears to be processed successfully from the server side.
However, the APNs client receives a 0-byte response, and the server closes the connection.
Devices do not receive the notifications at all.
Logs from Current (Failing) State:
APNS-Client[1]: Connected (Batch ID=1)
APNS-Client[1]: Sent Batch, waiting for possible response...
APNS-Client[1]: Received 0 bytes response...
APNS-Client[1]: Server Closed Connection...
APNS-Client[1]: Disconnected (Batch ID=1)
For Reference – Successful Log From Earlier (When Notifications Worked):
APNS-Client[1]: Connected (Batch ID=1)
APNS-Client[1]: Sent Batch, waiting for possible response...
APNS-Client[1]: Received -1 bytes response...
Push Notification Successfully Sent to Device
Any help, suggestions, or experience with similar issues would be greatly appreciated.
Thanks!!!
We are developing an app that receives push notifications (via Firebase) from configured IoT devices. It is essential that when a specific type of notification is received, a sound is played continuously until the user interacts with the notification.
This behavior is crucial for alerting users to certain critical states of the IoT device.
We understand that Critical Alerts on iOS can bypass Do Not Disturb and silent mode. However, from our testing and available documentation, the sound from a Critical Alert seems to be limited to around 30 seconds.
Our question:
Is it possible on iOS to have a Critical Alert (or any other type of notification) continue playing sound until the user interacts with the notification or app? If so, could someone please point us to the appropriate documentation or APIs?
Thanks in advance for any guidance.
Hello,
we have a problem with fake call on iPhone device for incoming calls.
When I leave the iPhone in idle state for 30, 40 seconds and dialed voip app number the iPhone rings and there is no problem.
When I leave it in idle for longer time one minute or two minutes I get "Call Failed to Connect" on iPhone's display and after this fake call I get second call with real calling number displays on iPhone.
This first fake call is triggered by wake up push notification type 'voip'.
If I switched off this wake up push notification type 'voip' and device's token has not expired yet I don't get fake call and iPhone's directly displays calling number.
But in this situation we need to use wake up push notification type 'voip' on during a certain time to keep the device's token in our database and continuing to receive calling number without fake call.
If we switched off the wake up push notification type 'voip' on certain time we need to activate again wake up push notification type 'voip' for incoming calls to wake up the iPhone.
And in this way every time on every incoming call the iPhone's will display first fake call "Call Failed to connect" and after that the call with Calling number.
How we can eliminate this fake call and use only one wake up push notification only for incoming calls not use second type wake up push on certain time?
Thank you,
I paste here our code for this:
public ApnClient(IOptions settings)
{
var httpHandler = new HttpClientHandler()
{
ClientCertificates = { new X509Certificate2(certificate.Export(X509ContentType.Pfx)) },
};
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13;
this.httpClient = new HttpClient(httpHandler)
{
DefaultRequestVersion = HttpVersion.Version20,
DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher,
BaseAddress = new Uri(settings.Value.ApnProdBaseUri),
DefaultRequestHeaders =
{
{
"apns-topic", ApnsTopic
},
},
};
}
public async Task<bool> WakeUpDevice(string deviceToken, string callId)
{
this.requestContent = new StringContent(
$"{{\"aps\":{{\"content-available\":\"1\"}}}}",
System.Text.Encoding.UTF8,
"application/json");
var res = await this.httpClient.PostAsync($"/3/device/{deviceToken}", this.requestContent);
return res.IsSuccessStatusCode;
}
Hello, im currently developing proxy app with XrayCore trying to bypass APNs when tunnel us up and i found .excludeAPNs property in NETunnelProviderProtocol that works only when includeAllNetworks property is also TRUE.
I wonder if there is a possible way to make APNs bypass tunnel in split tunnelling mode? because we use excludedRoutes and full tunnel is not an option
Hello Team,
We are working on a requirement where the business wants to track the delivery of push notifications on iOS devices. Specifically, they want to capture the moment when the device receives the notification and it appears as a badge in the Notification Center—regardless of whether the app is in the background or not—and then send that delivery status back to APNs.
We have explored multiple approaches, but so far, we are only able to capture events when the user interacts with the notification banner.
We would like to understand:
Is it technically possible to send an event to APNs or another service upon receipt of the notification on the device without requiring user interaction?
Any guidance or recommendations would be greatly appreciated.
We are reaching out to report a critical issue we are facing with Apple Push Notification Service (APNs) for our application. Since yesterday, push notifications have stopped working, and we are consistently encountering connection reset errors when attempting to connect to Apple’s push notification servers.
The issue specifically involves the following endpoints:
gateway.push.apple.com – 17.188.170.74
feedback.push.apple.com – 17.188.178.87
These connections were functioning properly until yesterday. No changes have been made on our end, and we have verified our server configurations.
We kindly request your assistance in investigating this matter. Please confirm whether there are any known issues or restrictions related to the above IPs or endpoints that could be affecting our service.
This issue is impacting our production environment and affecting user experience, so your prompt support would be greatly appreciated.
Can I using AudioServicesPlaySystemSound for play sound os system on NotificationService?
Is there anyway that I could use AVAudioSession, AVAudioPlayer or anything similar in Notification Service Extension?
I am trying to implement Audio Playback in the Notification Service Extension to play specific audio file when receiving Notification regardless the app state(foreground, background or killed), but I am not able to activate audio session in Notification Service Extension.
NSError *sessionError = nil;
BOOL success = [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&sessionError];
success = [[AVAudioSession sharedInstance] setActive:YES error:&sessionError];
if (!success) {
NSLog(@"Error activating audio session: %@", sessionError);
}
Below is the error that I got when I am trying to run the code above in Notification Service Extension.
Error Domain=NSOSStatusErrorDomain Code=561015905 "Session activation failed" UserInfo={NSLocalizedDescription=Session activation failed}
I'm observing that when a silent push notification is sent to our app, is is started up in the background for 30 seconds before being suspended until the app is launched by the user. This causes data to persist from the silent push notification to the user app launch.
I couldn't find documentation on this behavior for silent push notifications, and was wondering if it's possible to have the app terminate after handling the silent push notification. Is there documentation on the general flow of silent push notifications as well?
I'm able to handle the edge cases if the app has to be suspended until user launch, but just want to confirm that this is the expected behavior before I go about handling it this way.
When performing the P12 certificate sending test, there was an error stating that authentication failed due to the remote party closing the transport stream. May I ask how to solve this?
Apple's push cannot receive information, use the open-source library JdSoft. Apple.Apns.Notifications
Because I am not familiar with it, I modified Tls12. Does anyone know how to modify this open-source library to achieve push functionality
apnsStream.AuthenticateAsClient(this.Host, this.certificates, System.Security.Authentication.SslProtocols.Tls12, false)
It seems our company server is sending to Apple push service the push notifications that are supposed to be transferred to devices our app is installed on – but you it seems you are blocking the request
We can see traffic going out from our server side towards the apple gateway notification server using port 2195 and we can see that the traffic gets "server-rst" meaning that the apple gateway server kills the connection
You might need to whitelist our external IP's
this is our code foe fetching the apnstoken - and registering for the FCM and snding it to our servers. - we are consistently getting apns == null
import 'dart:io';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:solaris/services/fetch_deviceId.dart';
Future initializeFCM() async {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance;
// Request notification permissions for iOS
final settings = await _firebaseMessaging.requestPermission();
print('Notifcation Permission Status: ${settings.authorizationStatus}');
String? apnsToken;
int retries = 0;
const int maxRetries = 60;
const Duration retryDelay = Duration(seconds: 2);
// Retry fetching the APNs token until it's available or max retries are reached
while (apnsToken == null && retries < maxRetries) {
print(retries);
apnsToken = await _firebaseMessaging.getAPNSToken();
if (apnsToken == null) {
await Future.delayed(retryDelay);
retries++;
}
}
if (apnsToken != null) {
// APNs token is available, proceed to get FCM token
String? fcmToken = await _firebaseMessaging.getToken();
if (fcmToken != null) {
// Register the device and token with your backend
await registerDeviceAndToken(fcmToken);
} else {
// Handle the case where FCM token is still null
print('FCM token is null.');
}
} else {
// Handle the case where APNs token is not available after retries
print('APNs token not available after retries.');
}
}
Future registerDeviceAndToken(String fcmToken) async {
//fcmToken = fcmToken;
print(fcmToken);
final user = FirebaseAuth.instance.currentUser;
if (user == null) {
print('❌ User not logged in');
return;
}
final deviceId = await DeviceInfoService.getUniqueDeviceId();
//final fcmToken = await FirebaseMessaging.instance.getToken();
print('📱 Device ID from register_fcm: $deviceId');
print('📩 FCM Token from mew getapnd function: $fcmToken');
if (deviceId == null || fcmToken == null) {
print('❌ Failed to get deviceId or fcmToken');
return;
}
final docRef = FirebaseFirestore.instance
.collection('master_users')
.doc(user.uid)
.collection('deviceId')
.doc(user.uid); // This document holds a map: { deviceId: fcmToken }
print(docRef);
try {
// Get current data, fallback to empty map
final snapshot = await docRef.get();
final data = snapshot.data() ?? <String, dynamic>{};
print(data);
// Update or add current deviceId key
data[deviceId] = fcmToken;
// Save updated map back to Firestore
await docRef.set(data);
print(data);
print('✅ Device ID and FCM token updated/stored under correct structure');
} catch (e) {
print('❌ Firestore write error: $e');
}
}
I have referred the provided link Establishing a connection to Apple Push Notification service (APNs). And wanted to highlight that although our APNs certificate is valid until 09 August 2025, we have been unable to send notifications since 22nd April 2025. The error we are encountering is:
"java.io.IOException: keystore password was incorrect".
After encountering the above APNs exception, we created a new APNs certificate, but unfortunately, we are still facing the same issue. We are receiving the following notification response, but the users are not receiving notifications on the iOS mobile application.
Message(Id=1; Token=9C105A434496F9C8E6A47819DAA4C402CF0C231F8219F22AD4FFBD5D0300D832;
Payload={"aps":{"alert":{"title":"Message from : ta785","body":"Sender Contact Number : 2341561726\nMessage : test"},"sound":"default"}})
We suspect this issue may be related to recent changes in the APNs certificate authority, specifically the transition to the USERTrust RSA Certification Authority. Given that we are still using a valid APNs certificate, we are unsure whether this transition has impacted our configuration or caused the issue.
Could you please guide us or provide support to troubleshoot this error? Any assistance in resolving this issue will be greatly appreciated.
Dear Apple Developer Support,
I am currently developing an iOS application that uses push notifications with custom .caf audio and a Notification Service Extension.
I have implemented the extension to download and play a dynamic sound file from a remote sound_url. It works well when the app is in the foreground or background.
However, when the app is force-closed (swiped up from multitasking), the Notification Service Extension does not seem to run. As a result, the custom sound is not downloaded or played.
I would like to confirm:
Is it possible to trigger the Notification Service Extension when the app is killed?
If not, what is the correct way to play a custom .caf sound when the app is terminated? Should I preload and save the .caf file in App Group storage and reference it by name in the sound field?
Are there any best practices or limitations regarding push notification customization when the app is killed?
I appreciate your help in clarifying this issue. Thank you very much!
Best regards,
Phan Van Tung
Hi everyone,
I'm working on an app for parents and kids where parents can define screen time goals or restrict usage of certain app categories (like social media or games). If the kid follows those rules—for example, by using their device less or avoiding restricted categories—they would earn points or rewards in the app.
I’ve been exploring if the Apple Screen Time API allows developers to access this kind of data (like total screen time, app usage by category, etc.) so that I can track the kid’s behavior and reward them accordingly.
Is it possible to programmatically access this data and implement such a reward system within my app? If so, what’s the best way to get started or which APIs should I look into?
Thanks in advance for your help!
Is there a way to configure the APNS notification sound volume to be louder?
I am implementing some custom sounds(narrative sentences) for APNS, it does play the custom sound, but the volume of the custom sound is not loud enough even though I had set the device's volume and "RingTone and Alerts" volume to max.
I tried to amplify the custom sound file, it does play louder but the result is minimum if I want to maintain the quality of the sound without it been distorted.
I tried to use Notification Service Extension, AVAudioPlayer and AVAudioSession to play the sound, it does play louder in max volume compare with relying on default sound payload in APNS, but the problem is AVAudioPlayer and AVAudioSession do not seems to be usable when the application is in background or killed state, is there any other alternative I could use?