Is it legal to use incoming call UI for displaying a scheduled fake call? Does it conform to App Review policies?
The approach also means there's no VoIP service integration for the app one's going to distribute
PushKit
RSS for tagRespond to push notifications related to your app’s complications, file providers, and VoIP services using PushKit.
Posts under PushKit tag
45 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hey there, i created a independent Watch OS app and I configure push notification there.
so on watch simulator I am able to get push notification every time.
but today I test watch app to my real watch series 6 WatchOS 11.
I got the permission alert I allowed it, and I am able to get the device token as well now if I try to send push notification to my real watch app I get this logs.
Oct 22, 2024, 11:09:12.024 AM GMT+5
received by APNS Server
Oct 22, 2024, 11:09:12.334 AM GMT+5
discarded as application was not registered
why is that ? is there any body know's ? why i am not receiving remote notification on my real watch instead i get that my application is not register...
Hi,
Incoming calls were working fine when the app was run from Xcode in both production and debug modes. I added the APS Environment to production, but after releasing it on TestFlight, it's not working, and I am not receiving PushKit notifications.
I've spent over a day on this so I'm hoping someone on here has some idea as to what is going on for me. I've implemented push notifications in my app, but when I send a notification to a device, none of the receiving function are triggered.
When the app is in the background, the notification arrives correctly, and when tapped it correctly launches the app - but the didReceiveRemoteNotification function is never triggered, so I'm unable to handle/react to the notification.
When the app is in the foreground, neither the willLaunch or didReceive functions are triggered. I'm setting the UNUserNotificationCenterDelegate in the willFinishLaunchingWithOptions function, and when I monitor the app via the console, it shows no errors and shows willPresentNotification delivery succeeded
I have updated the Background Modes to include background fetch, background processing, and remote notifications. I have also tested this on both the Xcode simulator and a physical device with the same results. I've also tested this with push notifications coming from my server, push notifications coming from the CloudKit console, and just dropping a JSON file onto the simulator. All resulted in the same behaviour.
Does anyone have any idea why these functions might not be triggered??
Subject: Seeking Native iOS Solution for Push Notification Acknowledgement and User Interaction Tracking
I’m exploring whether there is a native solution in iOS to track the confirmation/acknowledgement of a received push notification on the device, as well as any user interaction with it (e.g., tapping or dismissing the notification). Although I’ve come across multiple discussions on this topic suggesting that it’s not possible, I’d like to know if there have been any recent updates or enhancements in iOS that provide this capability.
Has anyone found a reliable approach or workaround for this? Any insights would be appreciated!
Thanks!
PLATFORM AND VERSION
iOS
Development environment: Xcode 15.4, macOS 14.5
Run-time configuration: iOS 17.5.1
DESCRIPTION OF PROBLEM
We use PushKit to push offline messages of Voip, and use Voip notifications to bind with CallKit to implement Voip call functions.
During the test, we found that when the app is in the background or the screen is locked, Voip messages cannot reach the device stably. After several consecutive calls, the phone will not be able to receive new messages for a period of time. Only after the App is uninstalled and reinstalled can it continue to receive messages.
STEPS TO REPRODUCE
1: Open the app and log in successfully
2: Push the app to the background, kill it or lock the screen
3: Use another user to make a voip call to this device
4: Repeated calls
The app declares support for Voice-over IP (VoIP) in the UIBackgroundModes key in your Info.plist, but we are still unable to locate any VoIP services. Apps that declare support for VoIP in the UIBackgroundModes key in your Info.plist file must have features that require VoIP.
My app rejected for VOIP and the app is totally supported video call or call when app is terminated or in background how can. i solve that rejection issue
Hello,
I'm doing some test and I dowload the sample from here https://developer.apple.com/documentation/networkextension/local_push_connectivity/receiving_voice_and_text_communications_on_a_local_network
Everything works correctly and the phones are able to exchange messages without problems and the server sends pushes to the devices.
Now I would like to modify the server so that, when it sends the push to the mobile device, it can change the sound or add other information as is possible when using APN.
Now I would like to modify the server so that, when it sends the push to the mobile device, it can change the sound or add other information as is possible when using APN.
Is there any way to send a payload like for APN?
Thank's
Omar
Hello,
I have an app which I have enabled VoIP entitlement and implemented all the CallKit and PushKit registries and delegates.
I can successfully get a VoIP token.
I can successfully send VoIP push notifications (and receive them via the PushKit delegate function) and then report an incoming call via CallKit, but only while my app is in the foreground.
I have checked the entitlement in XCode and the Info.plist directly, and they both (as expected) show voip as a background mode.
The VoIP notification is being sent via AWS SNS and everything works while the app is in the foreground. I cannot understand why the app is not waking up while in the background.
This is the VoIP notification sent via SNS:
aps: {
alert: "Intercom call",
"content-available": 1
}
SNS Message Attributes:
'AWS.SNS.MOBILE.APNS.TOPIC': {
DataType: 'String',
StringValue: `${bundleId}`
},
'AWS.SNS.MOBILE.APNS.PUSH_TYPE': {
DataType: 'String',
StringValue: 'voip'
},
'AWS.SNS.MOBILE.APNS_VOIP.TTL': {
DataType: 'String',
StringValue: '0'
},
'AWS.SNS.MOBILE.APNS_VOIP_SANDBOX.TTL': {
DataType: 'String',
StringValue: '0'
},
'AWS.SNS.MOBILE.APNS.PRIORITY': {
DataType: 'String',
StringValue: '10'
}
As I say,
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType) async
works correctly when in the foreground. I cannot see any reason why it would not work from the background.
I am also receiving normal remote notifications correctly foreground and background.
Hello everyone,
I’m developing a VoIP-based application that supports both standard VoIP calls and Push-To-Talk (PTT) calls. The app does not use the unrestricted-voip entitlement since it’s not publicly documented or communicated as a standard by Apple.
Previously, I handled PTT calls using CallKit after receiving PushKit notifications, but I’m now migrating PTT functionality to the PushToTalk Framework while keeping CallKit for standard VoIP calls. I’m facing a few challenges that I’d like help with:
Handling Incoming Push-To-Talk Calls When the App Is Closed and the Device Is Locked
I considered continuing to use PushKit notifications to alert users via CallKit and using CallKit until the user brings the app into the foreground, at which point I’d switch to the PushToTalk Framework. While this could technically work, the user experience is not ideal. Are there any recommended approaches for handling PTT calls in this state?
Handling Incoming PTT Calls When the App Is in the Background
According to Apple documentation, I cannot join a PTT session unless my app is in the foreground. However, in practical scenarios, we often receive incoming PTT calls while the app is in the background. What’s the best solution for this situation? It feels odd to show notifications or use CallKit until the app is foregrounded.
Conflict Between Ongoing PushToTalk Call and Incoming Cellular Call
Currently, if there’s an ongoing PushToTalk call using the PTT framework and a cellular call comes in, if I receive a PTT transmission and call requestBeginTransmission, the cellular call is ended. I can handle this within my app, but is this expected behavior? Is this the intended conflict management for concurrent PTT and cellular calls?
Lastly, a broader question: when will the unrestricted-voip entitlement stop working? I’m contemplating using this entitlement to handle incoming PTT calls without CallKit, but I’m concerned about its longevity. Some apps have been using it for messaging and other features for over four years, and it’s still functional for them.
Any guidance or insights on these points would be greatly appreciated!
Thanks in advance!
Can I use Screentime API in CLLocationPushServiceExtension?
For example, I am curious about whether it is possible to set a managed setting in the Screentime API to limit app usage time or change the time limit.
If the implementation of the above function is impossible or causes rejection by the App Store, is there a way to use the Screentime API in the background through push notification?
When a request comes from the server, I want to set the screen time API of the requested phone or retrieve usage information. I would like to use silent push to complete that action in the background.
Is it impossible for the Screen Time API to run in the background?
Now my main app is already invoked voip callkit, I would want to invoke voip on iWatch app, but I have some issue:
1、How to deal audio data and network connect of iWatch voip ? can we depends on iPhone app?
2、How to use voip callkit on iWatch that only via bluetooth connect ?
3、If main app is already support voip callkit, how to support callkit for iwatch? Do we need to repeat and independently implement callkit, network, and audio on iWatch?
4、how to add support dial number on iWatch use by the thirdpart app? the case is the same with on the iPhone use, user can send dial by system call record .
Any help is appreciated, thanks in advance.
App getting terminated as the app enters background state. No crash logs are generated.
I have collected this log from Console(Mac app)by connecting iPhone and sending my app to background.
There is no meaningful reason or code I can get from the logs. Can you please help me with what does 'explanation:BG Kill Demo ' means ?
My app is a VoIP app. App depends on voip apns notifications to receive information about new Voip calls from server.
I am posting the logs collected from console app here.
default 14:29:55.265590-0400 audiomxd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: Sending stop command to com.myapp.bundleid with pid '2933' because client is background suspended and there is no AirPlay video session for it
default 14:29:55.265753-0400 dasd Received state update for 2933 (app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>, running-suspended-NotVisible
default 14:29:55.265908-0400 locationd Received state update for 2933 (app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>, running-suspended-NotVisible
default 14:29:55.265994-0400 locationd {"msg":"invoking applicationStateChange handler", "StateChangeData":"{\n BKSApplicationStateAppIsFrontmost = 0;\n BKSApplicationStateExtensionKey = 0;\n SBApplicationStateDisplayIDKey = "com.myapp.bundleid";\n SBApplicationStateKey = 2;\n SBApplicationStateProcessIDKey = 2933;\n SBMostElevatedStateForProcessID = 2;\n}"}
default 14:29:55.266083-0400 locationd {"msg":"Post Application State Change Notification", "notification":"BackgroundTaskSuspended", "pid":2933, "bundleId":"com.myapp.bundleid"}
default 14:29:55.267019-0400 locationd {"msg":"#CLIUA AppMonitor notification", "notification":"BackgroundTaskSuspended", "pid":2933, "bundleId":"com.myapp.bundleid", "ClientKey":"icom.myapp.bundleid:"}
default 14:29:55.267061-0400 locationd {"msg":"skip erasing #CLIUA for RunningBoard Process State. Does not exists", "bundleId":"com.myapp.bundleid"}
default 14:29:55.267678-0400 watchdogd Received state update for 2933 (app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>, running-suspended-NotVisible
default 14:29:55.267765-0400 useractivityd Received state update for 2933 (app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>, running-suspended-NotVisible
default 14:29:55.267934-0400 symptomsd Received state update for 2933 (app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>, running-suspended-NotVisible
default 14:29:55.267982-0400 wifid Received state update for 2933 (app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>, running-suspended-NotVisible
default 14:29:55.268228-0400 UserEventAgent Received state update for 2933 (app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>, running-suspended-NotVisible
default 14:29:55.268275-0400 callservicesd Received state update for 2933 (app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>, running-suspended-NotVisible
default 14:29:55.268338-0400 WirelessRadioManagerd Received state update for 2933 (app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>, running-suspended-NotVisible
default 14:29:55.269217-0400 runningboardd Acquiring assertion targeting [app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>:2933] from originator [osservice<com.apple.dasd>:76] with description <RBSAssertionDescriptor| "DAS: Application is docked." ID:33-76-44901 target:2933 attributes:[
<RBSDomainAttribute| domain:"com.apple.dasd" name:"DockApp" sourceEnvironment:"(null)">
]>
default 14:29:55.269572-0400 runningboardd Assertion 33-76-44901 (target:[app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>:2933]) will be created as active
default 14:29:55.270431-0400 runningboardd [app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>:2933] Set jetsam priority to 30 [0] flag[1]
default 14:29:55.270658-0400 runningboardd Calculated state for app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>: running-suspended (role: None) (endowments: (null))
default 14:29:55.273005-0400 runningboardd Received termination request from [osservice<com.apple.dasd>:76] on <RBSProcessPredicate <RBSProcessHandlePredicateImpl| app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>:2933>> with context <RBSTerminateContext| explanation:BG Kill Demo reportType:None maxTerminationResistance:Interactive>
default 14:29:55.274715-0400 runningboardd Executing termination request for: <RBSProcessPredicate <RBSProcessHandlePredicateImpl| app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>:2933>>
default 14:29:55.275034-0400 runningboardd [app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>:2933] Terminating with context: <RBSTerminateContext| explanation:BG Kill Demo reportType:None maxTerminationResistance:Interactive>
default 14:29:55.275122-0400 runningboardd [app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>:2933] terminate_with_reason() success
default 14:29:55.275768-0400 SpringBoard [app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>:2933] Workspace connection invalidated.
default 14:29:55.275790-0400 SpringBoard [app<com.myapp.bundleid(AD9F24FF-321B-48U6-895F-723CDA943372)>:2933] Now flagged as pending exit for reason: workspace client connection invalidated
default 14:29:55.275815-0400 backboardd Connection removed: IOHIDEventSystemConnection uuid:C2525EA6-A052-480B-B83D-4BD62C29C6EC pid:2933 process:MyApp type:Passive entitlements:0x0 caller:BackBoardServices: + 280 attributes:{
HighFrequency = 1;
bundleID = "com.myapp.bundleid";
pid = 2933;
} state:0x1 events:9 mask:0x800 dropped:0 dropStatus:0 droppedMask:0x0 lastDroppedTime:NONE
default 14:29:55.275988-0400 backboardd Removing client connection <BKHIDClientConnection: 0xd43cd1f40; IOHIDEventSystemConnectionRef: 0xd415d5800; vpid: 2933(v1C3E); taskPort: 0x84D8B; bundleID: com.myapp.bundleid> for client: IOHIDEventSystemConnection uuid:C2525EA6-A052-480B-B83D-4BD62C29C6EC pid:2933 process:MyApp type:Passive entitlements:0x0 caller:BackBoardServices: + 280 attributes:{
HighFrequency = 1;
bundleID = "com.myapp.bundleid";
pid = 2933;
} state:0x1 events:9 mask:0x800 dropped:0 dropStatus:0 droppedMask:0x0 lastDroppedTime:NONE source:HID
default 14:29:55.288098-0400 runningboardd [app<com.myapp.bundleid(AD9F24F321B-48U6C7-895F-723CDA943372)>:2933] termination reported by launchd (15, 0, 9)
default 14:29:55.289192-0400 runningboardd Removing process: [app<com.myapp.bundleid(AD9F24F321B-48U6C7-895F-723CDA943372)>:2933]
default 14:29:55.289331-0400 runningboardd Removing launch job for: [app<com.myapp.bundleid(AD9F24F321B-48U6C7-895F-723CDA943372)>:2933]
default 14:29:55.289582-0400 runningboardd Removed job for [app<com.myapp.bundleid(AD9F24F321B-48U6C7-895F-723CDA943372)>:2933]
default 14:29:55.289706-0400 runningboardd Removing assertions for terminated process: [app<com.myapp.bundleid(AD9F24F321B-48U6C7-895F-723CDA943372)>:2933]
I am working on a VoIP based PTT app. Uses 'voip' apns notification type to get to know about new incoming PTT call.
When the app is in foreground, the app gets to know about incoming VoIP PTT call through incoming push notification. After receiving notification, the app receives audio from the server. This works properly, as expected.
The app faces issues in receiving apns notifications only when the app is in background.
Issue: My app is in background and iPhone locked, the server sends apns notification to the target iPhone about a new incoming VoIP call. Server received 200 success response code from APNS. But the app in background did not receive the notification. Second time, the server sends notification about second VoIP call. App did not receive notification. Third time, server sends notification about 3rd incoming call. This list goes on. Everytime server sends a notification to the target phone, success response is received from APNS.
Now, bring the app to foreground, the app receives all the pending notifications at once. This scenario happens only in a few phones. Those customers are missing PTT calls.
Can you please provide us suggestions to solve this issue ?
My app uses unrestricted-voip entitlement
I am working on a VoIP based PTT app. Uses 'voip' apns notification type to get to know about new incoming PTT call.
When my app receives a PTT call, the app plays audio. But the call audio is not heard. While checking the phone volume, the API [[AVAudioSession sharedInstance] outputVolume] returns 0. But clearly the phone volume is not zero. On checking the phone volume by pressing side volume button, the volume is above 50%.
This behavior is observed in both app foreground and background scenario.
Why does the API return zero volume level ? Is there any other reason why the app volume is not heard ?
Users of my app have reported that they are sometimes unable to receive Voice-over-IP (VoIP) push notifications when using a SIM.
(There is no problem when using WiFi)
VoIP push notifications were not received during the following period.
Could you confirm diagnostic logs and could you please tell me why my app can't receive VoIP push?
[diagnostic logs]
https://drive.google.com/drive/folders/1gSAbr1Fy1SrjlmRXuAzoXqiaxnNbFhj8?usp=sharing
[Problem period]
2024/06/17 05:34:59 - 2024/06/17 09:04:42
Number of times that the push server pushed and it received a normal APNs response: 31
Number of times that iPhone received pushes: 0
2024/06/17 23:05:03 - 2024/06/18 09:02:16
Number of times that the push server pushed and it received a normal APNs response: 192
Number of times that iPhone received pushes: 0
2024/06/15 00:35:56 - 2024/06/15 09:55:57
Number of times that the push server pushed and it received a normal APNs response: 138
Number of times that iPhone received pushes: 0
It is received fine when the watch app is in the foreground.
Code sample:
import Foundation
import PushKit
final class PushNotificationProvider: NSObject {
let registry = PKPushRegistry(queue: nil)
override init() {
super.init()
registry.delegate = self
registry.desiredPushTypes = [.complication]
}
func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) {
Log("token received")
}
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) {
Log("push received")
completion()
}
}
Watch app:
import SwiftUI
@main
struct XX_Watch_App: App {
@WKApplicationDelegateAdaptor var appDelegate: XXWearableAppDelegate
private let push = PushNotificationProvider()
var body: some Scene {
WindowGroup {
AppView(...)
}
}
}
It is received fine when the watch app is in the foreground.
Code sample:
import Foundation
import PushKit
final class PushNotificationProvider: NSObject {
let registry = PKPushRegistry(queue: nil)
override init() {
super.init()
registry.delegate = self
registry.desiredPushTypes = [.complication]
}
func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) {
print("token recieved")
}
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) {
print("push recieved")
completion()
}
}
Watch app:
import SwiftUI
@main
struct XX_Watch_App: App {
@WKApplicationDelegateAdaptor var appDelegate: XXWearableAppDelegate
private let push = PushNotificationProvider()
var body: some Scene {
WindowGroup {
AppView(...)
}
}
}
Hi Everyone,
I am setting apns expiration in the push payload sending to apple server. push expires in 30 seconds as per the configuration using development certificates.
However the same logic does not work when I use adhoc profile but works in App store .
Any specific reason it does not work using adhoc profile?