Respond to push notifications related to your app’s complications, file providers, and VoIP services using PushKit.

Posts under PushKit tag

200 Posts

Post

Replies

Boosts

Views

Activity

VoIP Notification expiration is not working
We are using VoIP Notification for generating Video Call. Below is the demo cURL that we are using  curl --location --request POST 'https://api.push.apple.com/3/device/{DEVICE_TOKEN}' \--header 'apns-priority: 10' \--header 'apns-expiration: 1667281936' \--header 'apns-push-type: voip' \--header 'apns-topic: {BUNDLE_ID}.voip' \--header 'Content-Type: application/x-www-form-urlencoded' \--header 'Authorization: Bearer {BEARER_TOKEN}’ \--data-raw '{ "pushType": "push_video_chat",  "extraInfo": {   "callerID": 415 }}' The scenario is coming for production url, if user is in Airplane Mode and he receives a VoIP notification. Now even if we have set the apns-expiration to current EPOCH_TIME + 50 then after 1 minute if we disable airplane mode even then user receives the VoIP notification. The same scenario works fine when we are checking it on sandbox environment.  Please help if anyone has encountered this issue previously.
2
0
1.4k
Apr ’23
Push api /notification support in IOS PWA app
Hi team , We are developing a new PWA app for one of our products . The main blocker right now is that that PWA app doesn't support push notifications in IOS applications . I see couple of threads where people have already posted these queries, yet wanted to know If there is any tentative ETA on the push api support for IOS ? Is this feature request tracked anywhere by the team , if yes whats the tracking reference and how could we expedite the feature delivery- do you have any process for the same? If the team has decided to not support this feature , Is it documented anywhere ? Are there any alternatives /workarounds available to enable push notifications or similar feature in IOS PWA apps.
1
0
2.3k
Mar ’23
Incoming VoIP call MacOS 13.0+ (designed for iPad)
I creating application for VoIP calls on iOS all is working well, but after I try to migrate this app into MacOS I have some troubles with incoming calls, I don't receive call notification. Using CallKit which support MacOS from 13 version my current MacOS version is 13.1 (22C65) Device MacBook Air M2 2022 MacOS 13.1 (22C65) Xcode 14.2 (14C18)
1
1
968
Mar ’23
GSM call after VoIP call results in unresponsive CallKit banner
I have noticed a strange behaviour in my VoIP app which uses CallKit. I wasn't able to produce this with earlier iOS versions, so it might be a CallKit bug in iOS 16.x. The bug is not always reproducible even on iOS 16.x. The steps to reproduce are: Start a VoIP call from phone A to phone B and let B answer the call. While being in this call, make a GSM call from phone C to phone A. The strange behaviour would start to happen now on phone A: First a CallKit banner would appear on the top of the screen about the running VoIP call (which is strange, but OK for me). Then immediately also another CallKit banner would appear on the top of the screen about the incoming GSM call, covering up the previous banner. The big problem here is that the two button it provides (accept and decline) are not responsive. The only thing that can be done is to tap on the banner itself to make it go full-screen. Then those two main buttons will become slightly different: "end call" and "end current call and accept the new call". These buttons will now be responsive.   I was only able to produce this behaviour on iOS 16.x devices until now. After being able to get this behaviour, I am usually able to reproduce it a handful of times. But after that this bug can not be reproduced, because CallKit starts to always appear in full screen in the above scenario. It happened, that days later I was able to produce the issue again. Is this a bug in CallKit and if so, is there a workaround? Or am I doing something wrong and if so, what could be the source of the issue? Thanks!
2
0
1k
Mar ’23
How to show VoIP calls on Apple Watch (WatchOS9) with CallKit?
Hi, With the release of WatchOS9, support for CallKit was added for the Apple Watch. As we are a VoIP telephony provider, we want to make it possible for our customers to answer or decline any incoming VoIP calls with their Apple Watch. Also, being able to manage an ongoing call would be the logical next step, similar to how one can handle native calls on the Apple Watch. It's possible on the iPhone thanks to CallKit, however it is unclear what is necessary to enable this on the Apple Watch. Are there any written requirements on how to make this possible? Do we need to create a separate Watch app? None of this is mentioned in the Developer documentation. Any help is appreciated, thanks in advance.
1
0
3.1k
Mar ’23
iOS 15 issues with background VoIP notifications
I was doing some searching trying to get some answers on what could be causing this issue and saw an answer that said to use a serial queue to get past this issue. I am using a serial queue but still facing issues with getting VoIP notifications to come through while app is in background or in a killed state. While it is in the foreground everything runs great and as expected. I referred to this documentation and a post on here about the serial queue. https://developer.apple.com/documentation/pushkit/pkpushregistry/1614494-init (In the Parameters section it very briefly states that you need a serial queue). Any help would be much appreciated. The most difficult part is that there aren't any logs for me to follow on this issue. Here is relevant code var voipRegistry = PKPushRegistry.init(queue: DispatchQueue(label: "voipQueue")) self.pushKitEventDelegate = notificationHandler self.voipRegistry.delegate = self self.voipRegistry.desiredPushTypes = [PKPushType.voIP] Relevant outputs: -Running from foreground pushRegistry:didReceiveIncomingPushWithPayload:forType:completion: -Running from background -Running from Killed state
3
1
3.8k
Feb ’23
VoIP push notifications not delivered to device
Hello, We have implemented CallKit in our application to make voip calls. In our user investigations, we saw that some of our users have a strange timeline. The user makes one or two successful voip calls. So it seems our pushkit and callkit integrations are correct. But after these few successful calls, the user doesn't get any other voip pushes for the recent calls. We are certain of that because we send an ack to our backend after the client receives the voip push. But the user doesn't send "push_received" ack to our backend for days. Apple seems to return 200 after the voip push released from our backend, so no error on that side. We have verified that the user has a valid voip token and doesn't remove the application. Because we can see recent API calls from the client to our backend in our logs, user is still using the app. Does anybody have any suggestions? We are out of ideas really.
0
1
779
Feb ’23
GameKit Push Notifications for GKTurnBasedMatch
I'm trying to add badges to my app icon when GameCenter provides a notification from a GKTurnBasedMatch. There isn't much information about how to do this. One old post suggests implementing an AppDelegate method: https://developer.apple.com/forums/thread/54056 Since my project is in SwiftUI, I tried creating a UIApplicationDelegateAdaptor to support an AppDelegate, and implementing the func application(: didFinishLaunchingWithOptions:) method as follows, attempting to update it to support the newer notification object: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {         application.registerForRemoteNotifications()         UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .alert, .sound]) { success, error in             // not sure what to do here         }         return true     } This method does seem to get called when the app opens, but badges still do not appear on my app's icon.
0
0
826
Feb ’23
Location extension Push Issue
I wanted to integrate location push extension to my app I followed the documentations and applied for the entitlement. I followed these steps: I added com.apple.developer.location.push to my app entitlement as follows <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict>     <key>aps-environment</key>     <string>production</string>     <key>com.apple.developer.location.push</key>     <true/> </dict> </plist> I got the location push token and formatted it to string locationManager.startMonitoringLocationPushes(completion: { data, error in if let error = error { print(error) return } guard let data = data else { return } let token = data.reduce("", {$0 + String(format: "%02X", $1)}) print(token) }) I exported the APNS push certificate after enabling additional capabilities from the app store connect and keychain. then converted to pem format openssl x509 -in aps_development.cer -inform der -out PushCert.pem openssl pkcs12 -nocerts -out PushChatKey.pem -in PushChatKey.p12 Tried to send push using command line TOPIC="com.myapp.location-query" CERTIFICATE_FILE_NAME="./test.p12:1234" CERTIFICATE_KEY_FILE_NAME="./new2k.pem" APNS_HOST_NAME="api.sandbox.push.apple.com" DEVICE_TOKEN="FE979AB7DAC975DD19E2F977EDB9BCD13C870AFD97D8D20955039666AA5DXXXX" curl -v \ -d '{}' \ --header "apns-topic: $TOPIC" \ --header "apns-push-type: location" \ --http2 \ --cert $CERTIFICATE_FILE_NAME \ --cert-type P12 \ --http2 https://$APNS_HOST_NAME/3/device/$DEVICE_TOKEN and the response is * Trying 17.188.138.70:443... * Connected to api.sandbox.push.apple.com (17.188.138.70) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/cert.pem * CApath: none * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Request CERT (13): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Certificate (11): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS handshake, CERT verify (15): * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS change cipher, Change cipher spec (1): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384 * ALPN, server accepted to use h2 * Server certificate: * subject: CN=api.development.push.apple.com; OU=management:idms.group.533599; O=Apple Inc.; ST=California; C=US * start date: Dec 10 00:29:46 2021 GMT * expire date: Jan 9 00:29:45 2023 GMT * subjectAltName: host "api.sandbox.push.apple.com" matched cert's "api.sandbox.push.apple.com" * issuer: CN=Apple Public Server RSA CA 12 - G1; O=Apple Inc.; ST=California; C=US * SSL certificate verify ok. * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 * Using Stream ID: 1 (easy handle 0x11c80ce00) > POST /3/device/FE979AB7DAC975DD19E2F977EDB9BCD13C870AFD97D8D20955039666AA5DXXXX HTTP/2 > Host: api.sandbox.push.apple.com > user-agent: curl/7.77.0 > accept: */* > apns-topic: com.myapp.location-query > apns-push-type: location > content-length: 2 > content-type: application/x-www-form-urlencoded > * Connection state changed (MAX_CONCURRENT_STREAMS == 1000)! * We are completely uploaded and fine < HTTP/2 400 < apns-id: CA7EC88D-E839-318B-D9DC-DCB533F50808 < * Connection #0 to host api.sandbox.push.apple.com left intact {"reason":"TopicDisallowed"}% But I always get TopicDisallowed response Did I miss something?
4
1
2.4k
Jan ’23
Push notifications do not work for Apple Store's app version
Hello fellow devs; This was already somewhat covered here. My situation is slightly different. https://developer.apple.com/forums/thread/117022 I've been working on my app for a while and got push notifications to work. When I uploaded to the App Store, I noticed that any copy of the app that came from the store was unable to receive a push notification. I see this in the logs... ERR! parse-server-push-adapter APNS APNS error transmitting to device [foo] with status 400 and reason BadDeviceToken It's specific to a device. My dev devices all receive notifications. I'm using the Parse Platform's parse-server-push-adapter to send the request. The difference between my situation and the one mentioned above is that I'm using the Key method as opposed to the Cert method. When I generate a Key via my Apple Dev account, there is no place where I'd select development vs production as is the case when generating a cert. If the Key method is used, does that mean a user can never receive a notification if downloaded from the App Store? I see no such warning in the docs, and that wouldn't make sense anyway. I set APS Entitlement to "production" instead of "development". It still made no difference. I changed the way my app is signed. I had been using automatic signing with a dev cert for the app itself, and that was distributed to the App Store. I changed to a Prod cert and created a profile. Not sure if app signing has any effect on receiving a notification. I have yet to see if this change fixed anything as my app is in review. What does downloading the app from the App Store change that would have an effect on receiving remote notifications? Is there a guide someplace, a checklist, for altering your remote notifications config for use in the App Store. Thanks in advance; -Chris
1
0
2.1k
Jan ’23
VoIP App closes after 10 seconds in background, although the microphone is being used.
I have an app where a user can talk with other people. If the user is currently in a call with someone else and then exits the app, the app closes after exactly 10 seconds. Even though the app uses the microphone and I have turned on Voice over IP in Background Modes, the app closes after this time. Before it closes it shows the orange icon in the top left corner, which indicates that the microphone is being used. How can I prevent the app from closing when the user is in an active voice call? I am using Swift and Xcode 13.1.
1
0
1.4k
Jan ’23
How to maintain the badge count in push notification?
Hello team, We have implemented push notification in our app. We are not supporting the in app badge count but we are showing the app icon badge count.  We are trying to increase the badge count for the received notifications count parallely it should decrease while opening the app by clicking on the notification or it should decrease while clearing the notification.  Also we are trying to achieve the overall badge count to reset to zero while clearing the notification from the notification center… Please let us know the possible way to achieve this. Thanks In Advance!!
0
0
1.4k
Nov ’22
How can a notification service extension receive a VoIP push? (as opposed to receiving a non-VoIP push)
0 If a voip push (i.e. a push with a topic of com.company.app.voip as the push topic) is sent to a handset then it is delivered directly to the app via: pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler: If the app has a notification service extension, and the push payload contains mutable-content, and if the app is terminated, then the app gets launched in the background and the push still is delivered directly to the app, it does not get delivered to the extension. If the push topic is changed to be just com.company.app (and provided the payload contains the mutable-content flag) then in that case it gets delivered to the extension. However now it's no longer a voip push, it's just a regular push, because the topic no longer contains the .voip suffix. So how can things be configured whereby a voip push gets delivered to a notification service extension? Because that's what the Apple documentation says: Call this method when your notification service extension receives an encrypted VoIP call request. From: https://developer.apple.com/documentation/callkit/cxprovider/3727263-reportnewincomingvoippushpayload How is that possible, how can a notification service extension receive an encrypted VoIP call request like it mentions in the documentation?
1
0
1.6k
Nov ’22
Equivalent of Android's SipAudioCall, SipManager etc.
I'm trying to find what/if the iOS equivalent to Android's Sip range of APIs is. For example SipAudioCall is for handling the audio calls, SipManager for initiating SIP connections. I'm aware of iOS's CallKit component and have read its documentation, however all it seems to provide basically is a listening mechanism for Voip Pushes indicating a Voip call request and a means of integrating Voip Calls with the native call screens/system. I can't see anything in the Callkit documentation or tutorials to do things like initiate a SIP connection, or register SIP identify/IP, or start a VoIP call, or actually manage an incomming VoIP call. Could somebody point me to the documentation for those APIs if they exist, if they don't, does that mean if you want to develop a VoIP app you have to implement a load of stuff from scratch?
0
0
1.4k
Nov ’22
Music/Cast Access upon Remote Push Notification
My app is getting Push Notifications. What I want to do is...as soon as I get a Notification, Phone should Cast a audio file to Local Google Nest Mini Speaker (Within LAN). Currently my users need to Tap on the notification to trigger the audio file. I want to Automate it. I tried to apply the Login on "DidReceiveRemoteNotification" Event. However it plays audio file only when user Opens the App. Any advise would be helpfull. Thanks
1
0
925
Nov ’22
Test Background modes without Xcode.
Good day, developers and experts. I'm developing a VoIP application with using of CallKit and PushKit. Relative that frameworks everything work just fine and as expected. But here is problem. My SIP server has account expiration time, so after that time is expires no more call can reach user. So if it was not user decision we have to send the registration data. One of suitable capabilities for that is Background fetch. From docs I've learned that it runs ones a day task for 30 seconds. When I've implement that and test with Xcode it seems that it works correct. But when I try to test it with build from TestFlight my SIP server not receiving any data from application in couple of days. So may you suggest some tips or tricks how I can test it as like I'm just a user, not developer?
2
0
1.1k
Nov ’22
VoIP Notification expiration is not working
We are using VoIP Notification for generating Video Call. Below is the demo cURL that we are using  curl --location --request POST 'https://api.push.apple.com/3/device/{DEVICE_TOKEN}' \--header 'apns-priority: 10' \--header 'apns-expiration: 1667281936' \--header 'apns-push-type: voip' \--header 'apns-topic: {BUNDLE_ID}.voip' \--header 'Content-Type: application/x-www-form-urlencoded' \--header 'Authorization: Bearer {BEARER_TOKEN}’ \--data-raw '{ "pushType": "push_video_chat",  "extraInfo": {   "callerID": 415 }}' The scenario is coming for production url, if user is in Airplane Mode and he receives a VoIP notification. Now even if we have set the apns-expiration to current EPOCH_TIME + 50 then after 1 minute if we disable airplane mode even then user receives the VoIP notification. The same scenario works fine when we are checking it on sandbox environment.  Please help if anyone has encountered this issue previously.
Replies
2
Boosts
0
Views
1.4k
Activity
Apr ’23
Push api /notification support in IOS PWA app
Hi team , We are developing a new PWA app for one of our products . The main blocker right now is that that PWA app doesn't support push notifications in IOS applications . I see couple of threads where people have already posted these queries, yet wanted to know If there is any tentative ETA on the push api support for IOS ? Is this feature request tracked anywhere by the team , if yes whats the tracking reference and how could we expedite the feature delivery- do you have any process for the same? If the team has decided to not support this feature , Is it documented anywhere ? Are there any alternatives /workarounds available to enable push notifications or similar feature in IOS PWA apps.
Replies
1
Boosts
0
Views
2.3k
Activity
Mar ’23
Incoming VoIP call MacOS 13.0+ (designed for iPad)
I creating application for VoIP calls on iOS all is working well, but after I try to migrate this app into MacOS I have some troubles with incoming calls, I don't receive call notification. Using CallKit which support MacOS from 13 version my current MacOS version is 13.1 (22C65) Device MacBook Air M2 2022 MacOS 13.1 (22C65) Xcode 14.2 (14C18)
Replies
1
Boosts
1
Views
968
Activity
Mar ’23
GSM call after VoIP call results in unresponsive CallKit banner
I have noticed a strange behaviour in my VoIP app which uses CallKit. I wasn't able to produce this with earlier iOS versions, so it might be a CallKit bug in iOS 16.x. The bug is not always reproducible even on iOS 16.x. The steps to reproduce are: Start a VoIP call from phone A to phone B and let B answer the call. While being in this call, make a GSM call from phone C to phone A. The strange behaviour would start to happen now on phone A: First a CallKit banner would appear on the top of the screen about the running VoIP call (which is strange, but OK for me). Then immediately also another CallKit banner would appear on the top of the screen about the incoming GSM call, covering up the previous banner. The big problem here is that the two button it provides (accept and decline) are not responsive. The only thing that can be done is to tap on the banner itself to make it go full-screen. Then those two main buttons will become slightly different: "end call" and "end current call and accept the new call". These buttons will now be responsive.   I was only able to produce this behaviour on iOS 16.x devices until now. After being able to get this behaviour, I am usually able to reproduce it a handful of times. But after that this bug can not be reproduced, because CallKit starts to always appear in full screen in the above scenario. It happened, that days later I was able to produce the issue again. Is this a bug in CallKit and if so, is there a workaround? Or am I doing something wrong and if so, what could be the source of the issue? Thanks!
Replies
2
Boosts
0
Views
1k
Activity
Mar ’23
How to show VoIP calls on Apple Watch (WatchOS9) with CallKit?
Hi, With the release of WatchOS9, support for CallKit was added for the Apple Watch. As we are a VoIP telephony provider, we want to make it possible for our customers to answer or decline any incoming VoIP calls with their Apple Watch. Also, being able to manage an ongoing call would be the logical next step, similar to how one can handle native calls on the Apple Watch. It's possible on the iPhone thanks to CallKit, however it is unclear what is necessary to enable this on the Apple Watch. Are there any written requirements on how to make this possible? Do we need to create a separate Watch app? None of this is mentioned in the Developer documentation. Any help is appreciated, thanks in advance.
Replies
1
Boosts
0
Views
3.1k
Activity
Mar ’23
VoIP only answer incoming call
I want to create an app that use VoIP feature but user cannot make a call, user can only answer incoming call from server. is that possible? if not, how can I make that feature possible to implement? Thanks
Replies
0
Boosts
0
Views
535
Activity
Mar ’23
iOS 15 issues with background VoIP notifications
I was doing some searching trying to get some answers on what could be causing this issue and saw an answer that said to use a serial queue to get past this issue. I am using a serial queue but still facing issues with getting VoIP notifications to come through while app is in background or in a killed state. While it is in the foreground everything runs great and as expected. I referred to this documentation and a post on here about the serial queue. https://developer.apple.com/documentation/pushkit/pkpushregistry/1614494-init (In the Parameters section it very briefly states that you need a serial queue). Any help would be much appreciated. The most difficult part is that there aren't any logs for me to follow on this issue. Here is relevant code var voipRegistry = PKPushRegistry.init(queue: DispatchQueue(label: "voipQueue")) self.pushKitEventDelegate = notificationHandler self.voipRegistry.delegate = self self.voipRegistry.desiredPushTypes = [PKPushType.voIP] Relevant outputs: -Running from foreground pushRegistry:didReceiveIncomingPushWithPayload:forType:completion: -Running from background -Running from Killed state
Replies
3
Boosts
1
Views
3.8k
Activity
Feb ’23
VoIP push notifications not delivered to device
Hello, We have implemented CallKit in our application to make voip calls. In our user investigations, we saw that some of our users have a strange timeline. The user makes one or two successful voip calls. So it seems our pushkit and callkit integrations are correct. But after these few successful calls, the user doesn't get any other voip pushes for the recent calls. We are certain of that because we send an ack to our backend after the client receives the voip push. But the user doesn't send "push_received" ack to our backend for days. Apple seems to return 200 after the voip push released from our backend, so no error on that side. We have verified that the user has a valid voip token and doesn't remove the application. Because we can see recent API calls from the client to our backend in our logs, user is still using the app. Does anybody have any suggestions? We are out of ideas really.
Replies
0
Boosts
1
Views
779
Activity
Feb ’23
GameKit Push Notifications for GKTurnBasedMatch
I'm trying to add badges to my app icon when GameCenter provides a notification from a GKTurnBasedMatch. There isn't much information about how to do this. One old post suggests implementing an AppDelegate method: https://developer.apple.com/forums/thread/54056 Since my project is in SwiftUI, I tried creating a UIApplicationDelegateAdaptor to support an AppDelegate, and implementing the func application(: didFinishLaunchingWithOptions:) method as follows, attempting to update it to support the newer notification object: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {         application.registerForRemoteNotifications()         UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .alert, .sound]) { success, error in             // not sure what to do here         }         return true     } This method does seem to get called when the app opens, but badges still do not appear on my app's icon.
Replies
0
Boosts
0
Views
826
Activity
Feb ’23
Location extension Push Issue
I wanted to integrate location push extension to my app I followed the documentations and applied for the entitlement. I followed these steps: I added com.apple.developer.location.push to my app entitlement as follows <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict>     <key>aps-environment</key>     <string>production</string>     <key>com.apple.developer.location.push</key>     <true/> </dict> </plist> I got the location push token and formatted it to string locationManager.startMonitoringLocationPushes(completion: { data, error in if let error = error { print(error) return } guard let data = data else { return } let token = data.reduce("", {$0 + String(format: "%02X", $1)}) print(token) }) I exported the APNS push certificate after enabling additional capabilities from the app store connect and keychain. then converted to pem format openssl x509 -in aps_development.cer -inform der -out PushCert.pem openssl pkcs12 -nocerts -out PushChatKey.pem -in PushChatKey.p12 Tried to send push using command line TOPIC="com.myapp.location-query" CERTIFICATE_FILE_NAME="./test.p12:1234" CERTIFICATE_KEY_FILE_NAME="./new2k.pem" APNS_HOST_NAME="api.sandbox.push.apple.com" DEVICE_TOKEN="FE979AB7DAC975DD19E2F977EDB9BCD13C870AFD97D8D20955039666AA5DXXXX" curl -v \ -d '{}' \ --header "apns-topic: $TOPIC" \ --header "apns-push-type: location" \ --http2 \ --cert $CERTIFICATE_FILE_NAME \ --cert-type P12 \ --http2 https://$APNS_HOST_NAME/3/device/$DEVICE_TOKEN and the response is * Trying 17.188.138.70:443... * Connected to api.sandbox.push.apple.com (17.188.138.70) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/cert.pem * CApath: none * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Request CERT (13): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Certificate (11): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS handshake, CERT verify (15): * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS change cipher, Change cipher spec (1): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384 * ALPN, server accepted to use h2 * Server certificate: * subject: CN=api.development.push.apple.com; OU=management:idms.group.533599; O=Apple Inc.; ST=California; C=US * start date: Dec 10 00:29:46 2021 GMT * expire date: Jan 9 00:29:45 2023 GMT * subjectAltName: host "api.sandbox.push.apple.com" matched cert's "api.sandbox.push.apple.com" * issuer: CN=Apple Public Server RSA CA 12 - G1; O=Apple Inc.; ST=California; C=US * SSL certificate verify ok. * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 * Using Stream ID: 1 (easy handle 0x11c80ce00) > POST /3/device/FE979AB7DAC975DD19E2F977EDB9BCD13C870AFD97D8D20955039666AA5DXXXX HTTP/2 > Host: api.sandbox.push.apple.com > user-agent: curl/7.77.0 > accept: */* > apns-topic: com.myapp.location-query > apns-push-type: location > content-length: 2 > content-type: application/x-www-form-urlencoded > * Connection state changed (MAX_CONCURRENT_STREAMS == 1000)! * We are completely uploaded and fine < HTTP/2 400 < apns-id: CA7EC88D-E839-318B-D9DC-DCB533F50808 < * Connection #0 to host api.sandbox.push.apple.com left intact {"reason":"TopicDisallowed"}% But I always get TopicDisallowed response Did I miss something?
Replies
4
Boosts
1
Views
2.4k
Activity
Jan ’23
Push notifications do not work for Apple Store's app version
Hello fellow devs; This was already somewhat covered here. My situation is slightly different. https://developer.apple.com/forums/thread/117022 I've been working on my app for a while and got push notifications to work. When I uploaded to the App Store, I noticed that any copy of the app that came from the store was unable to receive a push notification. I see this in the logs... ERR! parse-server-push-adapter APNS APNS error transmitting to device [foo] with status 400 and reason BadDeviceToken It's specific to a device. My dev devices all receive notifications. I'm using the Parse Platform's parse-server-push-adapter to send the request. The difference between my situation and the one mentioned above is that I'm using the Key method as opposed to the Cert method. When I generate a Key via my Apple Dev account, there is no place where I'd select development vs production as is the case when generating a cert. If the Key method is used, does that mean a user can never receive a notification if downloaded from the App Store? I see no such warning in the docs, and that wouldn't make sense anyway. I set APS Entitlement to "production" instead of "development". It still made no difference. I changed the way my app is signed. I had been using automatic signing with a dev cert for the app itself, and that was distributed to the App Store. I changed to a Prod cert and created a profile. Not sure if app signing has any effect on receiving a notification. I have yet to see if this change fixed anything as my app is in review. What does downloading the app from the App Store change that would have an effect on receiving remote notifications? Is there a guide someplace, a checklist, for altering your remote notifications config for use in the App Store. Thanks in advance; -Chris
Replies
1
Boosts
0
Views
2.1k
Activity
Jan ’23
VoIP App closes after 10 seconds in background, although the microphone is being used.
I have an app where a user can talk with other people. If the user is currently in a call with someone else and then exits the app, the app closes after exactly 10 seconds. Even though the app uses the microphone and I have turned on Voice over IP in Background Modes, the app closes after this time. Before it closes it shows the orange icon in the top left corner, which indicates that the microphone is being used. How can I prevent the app from closing when the user is in an active voice call? I am using Swift and Xcode 13.1.
Replies
1
Boosts
0
Views
1.4k
Activity
Jan ’23
"com.apple.developer.pushkit.unrestricted-voip"
I've been working on the open source code of the Signal-iOS project recently. I want to add some functionality to Signal. But I found that I can't add "com.apple.developer.pushkit.unrestricted-voip" in entitlements. How can I solve this problem please.
Replies
1
Boosts
0
Views
1.5k
Activity
Dec ’22
is there any deadline regarding VOIP PTT entitlement?
We are using com.apple.developer.pushkit.unrestricted-voip.ptt and com.apple.developer.pushkit.unrestricted-voip entitlement in our application. Is there any plan from apple to revoke this permission or any deadline to remove that? It will be helpful for the developer if we get the update, it will be helpful for us to plan commercial release.
Replies
1
Boosts
0
Views
1.7k
Activity
Dec ’22
How to maintain the badge count in push notification?
Hello team, We have implemented push notification in our app. We are not supporting the in app badge count but we are showing the app icon badge count.  We are trying to increase the badge count for the received notifications count parallely it should decrease while opening the app by clicking on the notification or it should decrease while clearing the notification.  Also we are trying to achieve the overall badge count to reset to zero while clearing the notification from the notification center… Please let us know the possible way to achieve this. Thanks In Advance!!
Replies
0
Boosts
0
Views
1.4k
Activity
Nov ’22
How can a notification service extension receive a VoIP push? (as opposed to receiving a non-VoIP push)
0 If a voip push (i.e. a push with a topic of com.company.app.voip as the push topic) is sent to a handset then it is delivered directly to the app via: pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler: If the app has a notification service extension, and the push payload contains mutable-content, and if the app is terminated, then the app gets launched in the background and the push still is delivered directly to the app, it does not get delivered to the extension. If the push topic is changed to be just com.company.app (and provided the payload contains the mutable-content flag) then in that case it gets delivered to the extension. However now it's no longer a voip push, it's just a regular push, because the topic no longer contains the .voip suffix. So how can things be configured whereby a voip push gets delivered to a notification service extension? Because that's what the Apple documentation says: Call this method when your notification service extension receives an encrypted VoIP call request. From: https://developer.apple.com/documentation/callkit/cxprovider/3727263-reportnewincomingvoippushpayload How is that possible, how can a notification service extension receive an encrypted VoIP call request like it mentions in the documentation?
Replies
1
Boosts
0
Views
1.6k
Activity
Nov ’22
Equivalent of Android's SipAudioCall, SipManager etc.
I'm trying to find what/if the iOS equivalent to Android's Sip range of APIs is. For example SipAudioCall is for handling the audio calls, SipManager for initiating SIP connections. I'm aware of iOS's CallKit component and have read its documentation, however all it seems to provide basically is a listening mechanism for Voip Pushes indicating a Voip call request and a means of integrating Voip Calls with the native call screens/system. I can't see anything in the Callkit documentation or tutorials to do things like initiate a SIP connection, or register SIP identify/IP, or start a VoIP call, or actually manage an incomming VoIP call. Could somebody point me to the documentation for those APIs if they exist, if they don't, does that mean if you want to develop a VoIP app you have to implement a load of stuff from scratch?
Replies
0
Boosts
0
Views
1.4k
Activity
Nov ’22
Music/Cast Access upon Remote Push Notification
My app is getting Push Notifications. What I want to do is...as soon as I get a Notification, Phone should Cast a audio file to Local Google Nest Mini Speaker (Within LAN). Currently my users need to Tap on the notification to trigger the audio file. I want to Automate it. I tried to apply the Login on "DidReceiveRemoteNotification" Event. However it plays audio file only when user Opens the App. Any advise would be helpfull. Thanks
Replies
1
Boosts
0
Views
925
Activity
Nov ’22
Test Background modes without Xcode.
Good day, developers and experts. I'm developing a VoIP application with using of CallKit and PushKit. Relative that frameworks everything work just fine and as expected. But here is problem. My SIP server has account expiration time, so after that time is expires no more call can reach user. So if it was not user decision we have to send the registration data. One of suitable capabilities for that is Background fetch. From docs I've learned that it runs ones a day task for 30 seconds. When I've implement that and test with Xcode it seems that it works correct. But when I try to test it with build from TestFlight my SIP server not receiving any data from application in couple of days. So may you suggest some tips or tricks how I can test it as like I'm just a user, not developer?
Replies
2
Boosts
0
Views
1.1k
Activity
Nov ’22
Firebase Duplicate Notification.
After changing from normal to business Membership developer im facing an error on firebase notifications. When sending a notification ONLY on ios it will duplicate the notification. What shoud be the problem?
Replies
0
Boosts
0
Views
1.4k
Activity
Sep ’22