Post not yet marked as solved
Hello,
I'm using CallKit to manage the AudioSession. When I deactivate it with the notifyOthersOnDeactivation option, interruptions don't seem to be working correctly when checking other apps. Can anyone assist me? This issue is unique to my app. Should I follow a specific timing for deactivation?
Post not yet marked as solved
I can't debug my VOIP app using simulator (latest Xcode and iOS simulator version) with CallKit framework.
I want to know if this is Apple's policy, or is it my development issue? If it's my development issue, I will add my code and hope you can check it.
Post not yet marked as solved
Description:
The crash happens only when I end a call.And then get the pendingTransactions, then you know , the app crashed.
Reproduce:
Only happens once
From the crash frame, it seems that the pointer has been released.
Launch Time: 2024-04-21 21:45:32.8840 +0800
OS Version: iPhone OS 17.0.1 (21A340)
Release Type: User
Baseband Version: 5.00.00
Report Version: 104(?)
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x4000000000000000 -> 0x0000000000000000 (possible pointer authentication failure)
Exception Codes: 0x0000000000000001, 0x4000000000000000
Exception Note: EXC_CORPSE_NOTIFY(?)
VM Region Info: 0 is not in any region. Bytes before following region: 4306255872
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 100ac4000-1096dc000 [140.1M] r-x/r-x SM=COW ...e.rc.app/Glip
Termination Reason: SIGNAL;[11] Segmentation fault: 11
Terminating Process: exc handler [892]
Triggered by Thread: 0
Kernel Triage:
None
Thread 0 name: com.apple.callkit.callprovider
Thread 0 Crashed:
0 None 0x0 0x0 + 0
1 CallKit 0x1bfd19978 -[CXTransaction updateCopy:withZone:] + 80
2 CallKit 0x1bfd19ab0 -[CXTransaction copyWithZone:] + 64
3 CoreFoundation 0x19f1b6dac -[NSArray initWithArray:range:copyItems:] + 276
4 CoreFoundation 0x19f1b6c68 -[__NSPlaceholderArray initWithArray:copyItems:] + 108
5 CallKit 0x1bfd181a8 __41-[CXAbstractProvider pendingTransactions]_block_invoke + 72
6 libdispatch.dylib 0x1a70a3300 _dispatch_client_callout + 20
7 libdispatch.dylib 0x1a70b26b4 _dispatch_lane_barrier_sync_invoke_and_complete + 56
8 CallKit 0x1bfd180e0 -[CXAbstractProvider pendingTransactions] + 180
9 CallKit 0x1bfd4b040 -[CXProvider pendingTransactions] + 32
10 Glip 0x103179a30 specialized AudioCallKitManager.isCallEndAndAccept(_:) + 51
11 Glip 0x1031760b4 AudioCallKitManager.isCallEndAndAccept(_:) + 27 (<compiler-generated>:0) [inlined]
12 Glip 0x1031760b4 AudioCallKitManager.provider(_:perform:) + 1227 (AudioCallKitManager+CXAction2InAppActions.swift:65)
13 Glip 0x103179068 @objc AudioCallKitManager.provider(_:perform:) + 87
14 Glip 0x1038bd04c thunk for @escaping @callee_guaranteed (@unowned CXProvider, @unowned CXEndCallAction) -> () + 19 (<compiler-generated>:0) [inlined]
15 Glip 0x1038bd04c CallKitController.provider(_:perform:) + 727 (CallKitController.swift:174)
16 Glip 0x1038bcd48 @objc CallKitController.provider(_:perform:) + 87
17 CallKit 0x1bfd4a4c4 -[CXProvider performAction:] + 440
18 CallKit 0x1bfd18e04 __49-[CXAbstractProvider provider:commitTransaction:]_block_invoke.7 + 452
19 libdispatch.dylib 0x1a70a16a8 _dispatch_call_block_and_release + 32
20 libdispatch.dylib 0x1a70a3300 _dispatch_client_callout + 20
21 libdispatch.dylib 0x1a70b1998 _dispatch_main_queue_drain + 984
22 libdispatch.dylib 0x1a70b15b0 _dispatch_main_queue_callback_4CF + 44
23 CoreFoundation 0x19f1ac9bc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
24 CoreFoundation 0x19f1a96c8 __CFRunLoopRun + 1996
25 CoreFoundation 0x19f1a8e18 CFRunLoopRunSpecific + 608
26 GraphicsServices 0x1e1c695ec GSEventRunModal + 164
27 UIKitCore 0x1a15b7350 -[UIApplication _run] + 888
28 UIKitCore 0x1a15b698c UIApplicationMain + 340
29 Glip 0x100b61ec8 main + 203 (main.swift:13)
30 dyld 0x1c198fd44 start + 2104
Post not yet marked as solved
Hello,
I'm trying to test a call in the Simulator using CallKit. However, after the CXStartCallAction of CallKit is called, the CXEndCallAction is immediately invoked.
I conducted the test using Xcode 15.2 and iOS 17.2 Simulator. When I searched because I couldn't test it on the Simulator, I found a similar issue on the following link.
https://stackoverflow.com/questions/78291725/callkit-invokes-cxendcallaction-after-starting-the-call-resulting-in-hangup-on
The person who asked the question in the link tested it with the previous version iOS 15.5 Simulator and it worked fine. Why isn't it working in the latest version? Is it a bug? Or has the policy been updated? If there are any documents available to check regarding this matter, please share them.
Post not yet marked as solved
I am using Xcode Version 15.3 (15E204a) and different versions of Simulator runtimes (17.x, 16.x, 15.0)
The app makes outgoing calls and can respond to incoming calls.
After starting the call, ~2s pass before a hangup occurs. In the Console logs I see that CXEndCallAction was invoked by CallKit and the last suspicious log before invoking the CXEndCallAction is
callservicesd Disconnecting call because there wont be a UI to host the call: <CSDProviderCall 0x107054300 type=PhoneNumber, value=sdsddsdds, stat=Sending tStat=0, model=<TUCallModel 0x103f661e0 hold=1 grp=1 ungrp=1> ...
This used to work before, but since upgrading to Xcode 15 and iOS 17.x it happens constantly on simulator versions 17.x, and sometimes on 16.x, whereas I wasn't able to reproduce it on 15.0 version.
Can someone help me understand why this happens and how to fix it?
I provided some logs down below, and I don't see similar logs in the cases when the call is okay and CallKit doesn't hangup it.
Also, this does not happen on real devices
From the time CXStartCallAction is invoked until the CallKit invokes CXEndCallAction, these are some of the error or warn logs that appear:
callservicesd -AVSystemController- +[AVSystemController sharedInstance]: Failed to allocate AVSystemController, numberOfAttempts=3
callservicesd [WARN] +[AVSystemController sharedAVSystemController] returned nil value
callservicesd [WARN] Not allowing requested start call action because a call with same UUID already exists callWithUUID: (omitted)
callservicesd Error while determining process action for callSource: (omitted)
callservicesd Determined that callSource: <CXXPCCallSource 0x103d060a0, ...>, should process action: <CXStartCallAction 0x107232760 UUID=8D34853F-55DD-4DEC-97A7-551BFD27C924, error: Error Domain=com.apple.CallKit.error.requesttransaction Code=5 "(null)"
callservicesd [0x103e417a0] invalidated after the last release of the connection object
callservicesd [WARN] No paired device, so unable to send message UpdateCallContext
callservicesd FaceTime caller ID (null) is not a valid outgoing relay caller ID
callservicesd Attempting to find a valid outgoing caller ID in set of available outgoing caller IDs {(
)}
callservicesd Could not automatically select an outgoing caller ID; multiple telephone numbers are listed in the set of available outgoing caller IDs {(
)}
callservicesd Adding call <CSDProviderCall 0x107054300 ...> to dirty calls pool
callservicesd Entitlement check: ... entitlementCapabilities={(
"access-call-providers",
"modify-calls",
"access-call-capabilities",
"access-calls"
)}> lacks capability 'access-screen-calls'
callservicesd [WARN] ... but no dynamic identifier could be found (1) or no handoff user info exists (1). Not broadcasting frontmost call
error com.apple.CallKit.CallDirectoryUnable to initialize CXCallDirectoryStore for reading: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CallDirectory” in the folder “Library”." ... {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
The logs provided are in order in which they are logged, but some of them are recurring
After these logs there is still a message that CXStartCallAction is fullfilled:
callservicesd Start call action fulfilled: <CXStartCallAction 0x107231fe0 UUID=8D34853F-55DD-4DEC-97A7-551BFD27C924 ...>
After which the last suspicious log is logged before CXEndCallAction is invoked by CallKit:
Disconnecting call because there wont be a UI to host the call: <CSDProviderCall 0x107054300 ...>
Post not yet marked as solved
Hello,
I am trying to develop an app , using Flutter. My app has its own database which it contains the customer info such as name, address and phone number. I need to get the caller's phone number then I use the phone number and search in my database and if the phone# exist in our DB , I extract customer info and show it on pop up screen. How can I get the phone number of the person who is calling? i tried this, it didnt work:
let networkInfo = CTTelephonyNetworkInfo()
guard let carrier = networkInfo.serviceSubscriberCellularProviders?.first?.value else {
return nil
}
return carrier.mobileNetworkCode
Is there any way to get caller's number while he/she is calling?
Thanks
P.
Post not yet marked as solved
In my application, I use CallKit and have supportsHolding = true set. During my phone call, another call comes in (e.g., GSM). I accept the incoming call and put the current call on hold.
If I end the active call myself, everything is fine, and CallKit calls the
method provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession).
However, if the other party ends the call, the second call remains on hold. In the application, the user clicks on unhold, and I notify CallKit that the hold has ended.
But in this case, the didActivate method is not called at all. If I try to activate the audio myself after unhold, I receive the error:
Domain=NSOSStatusErrorDomain Code=561017449 "Session activation failed" UserInfo={NSLocalizedDescription=Session activation failed}
AVAudioSessionErrorInsufficientPriority == NSOSStatusErrorDomain Code: 561017449
What needs to be done for CallKit to activate my audio?
Post not yet marked as solved
I'm working with CXCallObserver and before iOS 17, CXCall.hasConnected was only true if the user accepted the incoming phone call. Now it seems that in iOS 17 that declining or ignoring the incoming phone call also sets CXCall.hasConnected to true.
I've also noticed that when the call is declined or ignored, CXCall.hasEnded doesn't get set to true until the person calling hangs up (either before or after leaving a voicemail).
I need to know how to differentiate between an accepted, declined, or ignored phone call in iOS 17. Does anyone have any advice?
Thanks
Post not yet marked as solved
I am facing a strange problem with PushKit/CallKit when compiling with SDK 17.x. The app behaves normally on iOS 16 and iOS 17 devices but PushKit does not seem to work properly anymore with VoIP Push messages.
The behavior is as follows:
when the screen is unlocked, everything works as expected (app gets automatically started when not running and the call notification is displayed)
when the screen is locked and the app is already running, everything works as expected (CallKit call screen is shown)
when the app is not running and the screen is locked, nothing happens... but as soon as I unlock the screen the app gets started and CallKit can be informed about the call. After this the call notification is properly displayed. In the logs of the app I can see that the app didn't get started/informed about the VoIP Push notification before unlocking the screen
Now the second problem is: as iOS doesn't start the app properly when the screen is locked, the app can't display the call via CallKit. Because of that the app will get blacklisted after a while (and for a while). Before using iOS SDK 17 the app was working without any issues on iOS 15 devices. Is this a known issue?
Post not yet marked as solved
I need to implement functionality in my iOS app to make cellular call without user interaction. is it possible or not in iOS. I am making app for Enterprise Account. Thanks
Post not yet marked as solved
Hi,
I have implemented VOIP calling feature in my application using OpenTok SDK and CallKit framework. Calling feature is working most of the time. But there is one strange issue I have come across.
During a call, if any external cellular call appears and if I decline that external call then my running voip call also disconnects. This is happening some of the iPhone devices.
iPhone config:
Model: iPhone 11
iOS Version: 17.3
I have added loggers CXEndCallAction and -provider:performEndCallAction and debugged at my end. I found that CXEndCallAction is not executing from my end but still -provider:performEndCallAction is triggered by iOS along with my ongoing callUUID.
This is very strange behaviour I am observing in one of my iPhone device. I have tested this in 4 iPhone devices but i am facing this issue only in 1 iPhone.
Thanks,
Post not yet marked as solved
Hi,
I have implemented VOIP calling feature in my application using OpenTok SDK and CallKit framework. Calling feature is working most of the time. But there is one strange issue I have come across.
During a call, if any external cellular call appears and if I decline that external call then my running voip call also disconnects. This is happening some of the iPhone devices.
iPhone config is as follows
Model : iPhone 11
iOS Version : 17.3
I have added loggers CXEndCallAction and -provider:performEndCallAction and debugged at my end . I found that CXEndCallAction is not executing from my end but still -provider:performEndCallAction is triggered by iOS along with my ongoing callUUID
This is very strange behaviour I am observing in one of my iPhone device. I have tested this in around 3-4 iPhone devices but i am facing this issue only in 1 iPhone .
Kindly help me here if anyone has solution around it .
Thanks
Post not yet marked as solved
My requirement is here-
1- We need to implement functionality in my iOS app to do call (cellular call) without user interaction.
2- We need to implement functionality in my iOS app to send normal message to particular phone number without user interaction.
3- Fetch OS log (NOT MY APPLICATION LOG). we need to fetch OS log when cellular call going on in device this log need to collect in my iOS app for identify the network strength and other things like call is connected and disconnect etc. Thanks
Post not yet marked as solved
Dear Appple Dev Team,
we have developed an app to identify incoming phone calls via CallKit (https://developer.apple.com/documentation/callkit/cxcalldirectoryextensioncontext). This function works great. However, we are missing a similar function for SMS/iMessage sender identification. Is it possible to integrate this function into iOS.
Thanks
Markus
Post not yet marked as solved
Hi there! As Developer, wondering if there is a way to distinguish between an actual call and a Live Voicemail?
https://support.apple.com/en-us/105066
Post not yet marked as solved
Hello,
I would like get advice about the time-sensitive notification ‘interruption-level’ set to ‘time-sensitive’ in the push payload. I’m wondering if this setting applies to VOIP push notifications. I tried to find information in Apple’s documentation, but it doesn’t specify whether it is applicable for VOIP push notifications.
{
"aps": {
"interruption-level": "time-sensitive"
}
}
https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification#:~:text=ContentIdentifier%[…]terruption%2Dlevel,-String
Post not yet marked as solved
When use callkit, video button in callkit pannel is abnormal. Here are some case:
iOS117 & incoming call: video button disable
iOS17 & outgoing call: video button disable
iOS16 & incoming call: video button enable
iOS16 & outgoing call: video button disable
will appricate for help!
Core code:
private func configureCallKit() {
let configuration = CXProviderConfiguration(localizedName: "CallkitTesting")
configuration.supportsVideo = true // 是否支持视频通话
configuration.supportedHandleTypes = [.generic]
configuration.maximumCallGroups = 1
configuration.maximumCallsPerCallGroup = 1
provider = CXProvider(configuration: configuration)
provider.setDelegate(self, queue: nil)
}
func startOutgoing() {
let handle = CXHandle(type: .generic, value: "!!!!!!")
let startCallAction = CXStartCallAction(call: UUID(), handle: handle)
let transaction = CXTransaction(action: startCallAction)
CXCallController().request(transaction) { error in
if let error = error {
print("Error requesting transaction: \(error.localizedDescription)")
} else {
print("Transaction requested successfully")
}
}
}
Post not yet marked as solved
Hi Team,
We are facing issues about VOIP call for some users in USA who used the Wi-Fi network of some service provider. They are not receiving the calls on Wi-Fi but able to receive the call when connected to SIM/Data Connection. We implemented the VOIP services of apple and VOIP notification received and call kit UI displayed. Its working fine on public network mostly but not working on some Wi-Fi network in USA.
iPhone 12
Latest iOS version
VOIP notification not received
Call kit not display
App Name=> Owwll
Post not yet marked as solved
I'm trying to integrate Callkit into a Flutter app that uses webRTC for calls and I have an issue with taking calls on locked screen. CXAnswerCallAction requires to have the action.fulfill() method called after the connection is established. Here is a pice of code without waiting for establishment of the connection:
guard let call = self.callManager?.callWithUUID(uuid: action.callUUID) else{
action.fail()
return
}
call.data.isAccepted = true
self.answerCall = call
self.callManager?.updateCall(call)
sendEvent(SwiftCallKeepPlugin.ACTION_CALL_ACCEPT, call.data.toJSON())
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1200)) {
self.configureAudioSession()
}
action.fulfill()
}
This causes the connection time counter to be immediately visible on the screen, but the user still has to wait for connection establishment and can't hear anything.
Here is the code that waits for the establishment of the connection before calling action.fulfill():
if(self.awaitedConnection.uuid != uuid) {
action.fail()
} else if(self.awaitedConnection.isConnected) {
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1200)) {
self.configureAudioSession()
}
action.fulfill()
} else {
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1000)) {
self.waitForConnection(uuid: uuid, action: action)
}
}
}
public func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
guard let call = self.callManager?.callWithUUID(uuid: action.callUUID) else{
action.fail()
return
}
call.data.isAccepted = true
self.answerCall = call
self.callManager?.updateCall(call)
self.awaitedConnection.uuid = action.callUUID
self.awaitedConnection.isConnected = false
sendEvent(wiftCallKeepPlugin.ACTION_CALL_ACCEPT, call.data.toJSON())
waitForConnection(uuid: action.callUUID, action: action)
}
Unfortunately, though it works great on iOS 15.7, on 17.3 it causes lack of audio, no sound and no recording. I also can't enable it later when the call is ongoing. For reference:
let session = AVAudioSession.sharedInstance()
do{
try session.setCategory(AVAudioSession.Category.playAndRecord, options: AVAudioSession.CategoryOptions.allowBluetooth)
try session.setMode(self.getAudioSessionMode(data?.audioSessionMode ?? "voiceChat"))
try session.setActive(data?.audioSessionActive ?? true)
try session.setPreferredSampleRate(data?.audioSessionPreferredSampleRate ?? 44100.0)
try session.setPreferredIOBufferDuration(data?.audioSessionPreferredIOBufferDuration ?? 0.005)
}catch{
print(error)
}
}
I can see in the docs of action.fulfill() that "You should only call this method from the implementation of a CXProviderDelegate method". I this the reason for the issue? But how can I do it if I need to wait for the connection asynchronously and the provider method is synchronous?
Post not yet marked as solved
Hello,
I am developing a service using Voip Push.
Recently, it seems that Voip Push notifications are occasionally arriving late.
Does anyone have information regarding this issue?
Sometimes, when the delay is prolonged, notifications from a few days ago also seem to be received.
Thank you.