Display the system-calling UI for your app’s VoIP services and coordinate your calling services with other apps and the system using CallKit.

Posts under CallKit tag

156 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

APNS is delivering expired voip push notification.
I have tried setting a 'apns-expiration' to current time + 30 seconds and also a value '0'. But still my voip app receives the voip push notification after 2-3 minutes. Till this time, caller has already hung up the call. But the receivers phone still rings on receiving the push notification as we have to report it to CallKit. Am I missing something or there is no way and even 'apns-expiration' does not guarantee timely delivery of Voip push notifications or discard if it is expired. I have set 'apns-priority' to 10 already as recommended.
3
0
330
Mar ’25
Live Caller ID Lookup & PIRService blocking inconsistent
I've successfully started the Live Caller ID Lookup example and initialized the PIRService. I added several identities to the input.txtpb file, some with block: true and others with block: false. Here is the file but modified phone digits: identities { key: "+40790123123" value { name: "Blocking 1" cache_expiry_minutes: 7 block: true } } identities { key: "+972526111111" value { name: "Blocking 2" cache_expiry_minutes: 7 block: true } } identities { key: "+123" value { name: "Adam" cache_expiry_minutes: 8 block: false category: IDENTITY_CATEGORY_PERSON } } identities { key: "+972526111112" value { name: "Identified Business Name 1" cache_expiry_minutes: 1 block: false category: IDENTITY_CATEGORY_BUSINESS } } identities { key: "+972526111113" value { name: "Identified Business Name 2" cache_expiry_minutes: 1 block: false category: IDENTITY_CATEGORY_BUSINESS } } The main issue is that only the number marked as +40790123123 was actually blocked, while "Blocking 2" appeared as identified contacts with their assigned name displayed. Notably, the only blocked number was a foreign number with a different country code than the number being called. The other numbers belonged to the same country. Can someone clarify whether this is a bug in the example project or an issue with the data file?
1
0
243
Mar ’25
CXCallUpdate not working for outgoing calls
I try to update remoteHandle using CXCallUpdate for outgoing call, but this works only on iOS 15 but not on 17 or 18 (16 didn't test). This problem actual only for outgoing calls, but for incoming calls update works fine. func startOutgoingCall(with callID: UUID, userID: String) { let handle = CXHandle(type: .generic, value: userID) let action = CXStartCallAction(call: callID, handle: handle) callController.requestTransaction(with: action) { [weak self] error in // ... } } func updateOutgoingCall(with callID: UUID, groupID: String) { let update = CXCallUpdate() update.remoteHandle = CXHandle(type: .generic, value: groupID) provider.reportCall(with: callID, updated: update) } I also tried phoneNumber type but it seems initial handle that I set to CXStartCallAction not possible to change (value or even type). I use this handle value to implement recall by tap on call in Recents tab of system address book. But since my calls can transform from p2p to group call, I need to update handle value or find some another way to pass call identification info.
0
0
231
Mar ’25
iOS Phone app bug: Long verdict text incorrectly truncated on call details screen
I've discovered a bug in the Phone app on iOS related to how long verdicts are displayed. When a call is identified by a third-party Caller ID app, long verdicts display correctly during the call (they auto-scroll) and in the call log (with an ellipsis at the end). However, on the call details screen, the text is strangely truncated - showing only the beginning of the string and the last word. For testing, I used this verdict: "Musclemen grow on trees. They can tense their muscles and look good in a mirror. So what? I'm interested in practical strength that's going to help me run, jump, twist, punch." I'll attach a screenshots demonstrating the problem:
0
0
254
Mar ’25
how can i get the LiveCommunicationKit events
i have codes looks like: import UIKit import LiveCommunicationKit @available(iOS 17.4, *) class LiveCallKit: NSObject, ConversationManagerDelegate { @available(iOS 17.4, *) func conversationManager(_ manager: ConversationManager, conversationChanged conversation: Conversation) { } @available(iOS 17.4, *) func conversationManagerDidBegin(_ manager: ConversationManager) { } @available(iOS 17.4, *) func conversationManagerDidReset(_ manager: ConversationManager) { } @available(iOS 17.4, *) func conversationManager(_ manager: ConversationManager, perform action: ConversationAction) { } @available(iOS 17.4, *) func conversationManager(_ manager: ConversationManager, timedOutPerforming action: ConversationAction) { } @available(iOS 17.4, *) func conversationManager(_ manager: ConversationManager, didActivate audioSession: AVAudioSession) { } @available(iOS 17.4, *) func conversationManager(_ manager: ConversationManager, didDeactivate audioSession: AVAudioSession) { } @objc public enum InterfaceKind : Int, Sendable, Codable, Hashable { /// 拒绝/挂断 case reject /// 接听. case answer } var sessoin: ConversationManager var callId: UUID var completionHandler: ((_ actionType: InterfaceKind,_ payload: [AnyHashable : Any]) -> Void)? var payload: [AnyHashable : Any]? @objc init(icon: UIImage!) { let data:Data = icon.pngData()!; let cfg: ConversationManager.Configuration = ConversationManager.Configuration(ringtoneName: "ring.mp3", iconTemplateImageData: data, maximumConversationGroups: 1, maximumConversationsPerConversationGroup: 1, includesConversationInRecents: false, supportsVideo: false, supportedHandleTypes: Set([Handle.Kind.generic])) self.sessoin = ConversationManager(configuration: cfg) self.callId = UUID() super.init() self.sessoin.delegate = self } @objc func toIncoming(_ payload: [AnyHashable : Any], displayName: String,actBlock: @escaping(_ actionType: InterfaceKind,_ payload: [AnyHashable : Any])->Void) async { self.completionHandler = actBlock do { self.payload = payload self.callId = UUID() var update = Conversation.Update(members: [Handle(type: .generic, value: displayName, displayName: displayName)]) let actNumber = Handle(type: .generic, value: displayName, displayName: displayName) update.activeRemoteMembers = Set([actNumber]) update.localMember = Handle(type: .generic, value: displayName, displayName: displayName); update.capabilities = [ .playingTones ]; try await self.sessoin.reportNewIncomingConversation(uuid: self.callId, update: update) try await Task.sleep(nanoseconds: 2000000000); } catch { } } } i want to listen the button event,but i can't find the solutions!please give me a code demo
0
0
156
Mar ’25
Default Calling App on vehicle (Bluetooth)
I have a question about the default calling function that is supported by third-party apps on iOS from 18.2. In most cases, it works normally with the default calling app setting, but the problem occurs when connected to the vehicle via Bluetooth. Install the app that sets the default calling app on the device. Keep the phone locked. Connect the Bluetooth to the vehicle. Try to make a call using the phone button on the vehicle's steering wheel. When trying to make a call from the vehicle, the call fails (It seems that the app cannot be opened when the phone is locked even if the default calling app setting is on.) When you unlock the phone and turn on the app, the call is made. As far as I understand, if the app scheme is called with tel:// when set as the default calling app, it only proceeds with the intent connection to the app set as the default calling app, and the permissions that Apple's default call app has cannot be used. Accordingly, my questions are as follows: Is there a way to make a call with an external phone call input when locked on device? If 1 is not possible, can you provide a branch to Apple's default call app (telephony://) in the above situation?
1
0
175
Apr ’25
Using `com.apple.developer.usernotifications.filtering` for developement
Ref: https://developer.apple.com/documentation/bundleresources/entitlements/com.apple.developer.usernotifications.filtering?language=objc Currently, it seems impossible to enable this entitlement for local development and testing without first going through Apple’s approval process. I would like to be able to test how it works on a side project without having to submit the form which seems designed for real app. There is any trick I can use?
1
0
218
Mar ’25
Getting VoIP notifications to work and use iOS call UI when phone is locked/app is in background/Not running
Hey there my application allows users to have video calls with each other using Agora. I have successfully set up incoming call functionality on Android but on iOS I am struggling to get the call ui to appear when the app is not running/in background/locked. To my knowledge this is because there is much stricter security on iOS which is limiting me from calling this. When i initially set it up it worked at first when the app was in the background but I think I was failing to report the call to call kit in time and now it's not working. I'm not sure if I need access to this entitlement: com.apple.developer.pushkit.unrestricted-voip Which i believe is only for the big boys or if I make sure I'm reporting the call to call kit fast enough that I won't encounter this issue and it will consistently work in the background.
0
0
182
Mar ’25
VOIP is not receiving calls
Hello, I am developing a calling service using CallKit and VOIP push. I have occasionally encountered a strange issue. The issue is that VOIP permanently fails to receive calls. I was previously informed that even if the device is blocked, it can receive calls again after 24 hours. Also, when I checked the device logic, it complied with the policy requirements set by Apple, including correctly calling CallKit's reportNewIncomingCall method. Once the issue occurs, no matter how many times I try, VOIP does not receive calls, and neither a device reboot nor checking the Device Console Log shows any logs related to CallKit or VOIP. I suspect this might be an issue with the VOIP token, and I believe that the only way to get a new one is to reinstall the app. Is that correct? Of course, after reinstalling, it works fine again, but this is very inconvenient. I don't think this is the right solution. Is there anyone who can share their insights on this issue? Thank you.
0
0
183
Mar ’25
Push Notification
Hello. We're developing an app with Flutter that receives VoIP calls. However, when the app is in the background or closed, the push notification arrives, but the call doesn't. It works perfectly when the app is open. We use Firebase, Flutter, and JANUS WebRTC. We need to know what type of permissions or actions we should consider so that the app opens when it receives a call. How can we resolve this issue? Thank you very much.
0
0
82
Mar ’25
NSUserActivity in application(_:continue:restorationHandler:) not recognized as INStartCallIntent
Hello, experts! I'm working on a VOIP application that handles audio calls and integrates with CallKit. The problem occurs when attempting to redial a previously made audio call from the system's call history. When I try to handle the NSUserActivity in the application(_:continue:restorationHandler:) method, it intercepts the INStartAudioCallIntent instead of the expected INStartCallIntent. Background Deprecation Warnings: I'm encountering deprecation warnings when using INStartAudioCallIntent and INStartVideoCallIntent: 'INStartAudioCallIntent' was deprecated in iOS 13.0: INStartAudioCallIntent is deprecated. Please adopt INStartCallIntent instead. 'INStartVideoCallIntent' was deprecated in iOS 13.0: INStartVideoCallIntent is deprecated. Please adopt INStartCallIntent instead. As a result, I need to migrate to INStartCallIntent instead, but the issue is that when trying to redial a call from the system’s call history, INStartAudioCallIntent is still being triggered. Working with Deprecated Intents: If I use INStartAudioCallIntent or INStartVideoCallIntent, everything works as expected, but I want to adopt INStartCallIntent to align with the current iOS recommendations. Configuration: CXProvider Configuration: The CXProvider is configured as follows: let configuration = CXProviderConfiguration() configuration.supportsVideo = true configuration.maximumCallsPerCallGroup = 1 configuration.maximumCallGroups = 1 configuration.supportedHandleTypes = [.generic] configuration.iconTemplateImageData = UIImage(asset: .callKitLogo)?.pngData() let provider = CXProvider(configuration: configuration) Outgoing Call Handle: When making an outgoing call, the CXHandle is created like this: let handle = CXHandle(type: .generic, value: callId) Info.plist Configuration: In the info.plist, the following key is defined: <key>NSUserActivityTypes</key> <array> <string>INStartCallIntent</string> </array> Problem: When trying to redial the audio call from the system's call history, the NSUserActivity received in the application(_:continue:restorationHandler:) method is an instance of INStartAudioCallIntent instead of INStartCallIntent. This happens even though INStartCallIntent is listed in NSUserActivityTypes in the info.plist and I want to migrate to the newer intent as recommended in iOS 13+. Device: iPhone 13 mini iOS version 17.6.1
0
0
182
Mar ’25
Push Notification don't wake up my app
Hi everyone, We're experiencing an issue with our Flutter app that uses PushKit, CallKit, and Janus for handling VoIP calls. Everything works fine when the app is in the foreground, but when the app is in the background or completely closed (terminated state), the behavior is inconsistent: Sometimes, incoming calls are received as expected. Other times, the app does nothing, and the call is not delivered at all. Upon checking the console logs, we noticed that our app is being canceled (terminated by the system), which seems to be the reason why calls are not coming through. This happens randomly, making it difficult to reproduce consistently. Additional Details: The app is configured to handle VoIP notifications correctly. We are using PushKit to wake up the app and trigger CallKit for the incoming call UI. When the app is active, calls are handled correctly via Janus WebRTC signaling. We have verified that background modes for VoIP are enabled in the Info.plist. We suspect that iOS may be aggressively killing the app in the background, preventing incoming call notifications from reaching it. Questions: Has anyone experienced similar behavior with PushKit + CallKit on recent iOS versions? Could iOS be terminating the app due to background execution policies? Are there recommended best practices to ensure reliable delivery of VoIP notifications when the app is closed? Any insights or suggestions would be greatly appreciated! Thanks! Addional Information: this is the cancellation information at console: Received incoming message on topic hiperme.app at priority 10 por omisión 17:10:18.462084-0300 dasd CANCELED: com.apple.pushLaunch.hiperme.app:E8BACD at priority 10
0
0
71
Mar ’25
Call Tracking with CallKit Works in Debug Mode but Not in Release (TestFlight) – iOS
I am working on an iOS app using Flutter that tracks outgoing calls using CallKit. The call tracking functionality works perfectly in Debug mode but does not work when the app is published to TestFlight. I have already added Background Modes (voip, audio, processing, fetch) in Info.plist. I have added CallKit.framework in Xcode under Link Binary With Libraries (set to Optional). <?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> </dict> </plist> These are the necessary permission which I used in info.plist: <?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>BGTaskSchedulerPermittedIdentifiers</key> <array> <string>com.agent.mygenie</string> </array> <key>CADisableMinimumFrameDurationOnPhone</key> <true/> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleDisplayName</key> <string>MyGenie</string> <key>CFBundleDocumentTypes</key> <array/> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>mygenie</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>$(FLUTTER_BUILD_NAME)</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>$(FLUTTER_BUILD_NUMBER)</string> <key>LSRequiresIPhoneOS</key> <true/> <key>NSCallKitUsageDescription</key> <string>This app needs access to CallKit for call handling</string> <key>NSContactsUsageDescription</key> <string>This app needs access to your contacts for calls</string> <key>NSMicrophoneUsageDescription</key> <string>This app needs access to microphone for calls</string> <key>NSPhotoLibraryUsageDescription</key> <string>This app needs access to photo library for profile picture updation</string> <key>UIApplicationSupportsIndirectInputEvents</key> <true/> <key>UIBackgroundModes</key> <array> <string>voip</string> <string>processing</string> <string>fetch</string> <string>audio</string> </array> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> [code.txt](https://developer.apple.com/forums/content/attachment/0a327dbd-652e-41d5-8811-c462d09e0567) </dict> </plist> And below is the file are AppDelegate.swift, call_tracking_mixin.dart, & main_call.dart file for full knowledge
0
0
74
Mar ’25
Incoming call notifications problems
Good day We developed a simple swift code to make the device ringing when a certain type of notifications arrives from our backend. This is the code: let phoneNumber = CXHandle(type: .generic, value: (self.userInfoForPluginCall!["data"] as! [String:Any]) ["caller"] as! String) callUpdate.remoteHandle = phoneNumber let configuration = CXProviderConfiguration(localizedName: "Trec Conf") configuration.maximumCallGroups = 1 configuration.maximumCallsPerCallGroup = 1 configuration.supportsVideo = false configuration.supportedHandleTypes = [.generic] configuration.iconTemplateImageData = UIImage(named: "callkit-icon")?.pngData() let callProvider = CXProvider(configuration: configuration) callProvider.setDelegate(self, queue: nil) callProvider.reportNewIncomingCall(with: callUUID!, update: callUpdate, completion: {error in}) We are noticing some problems on the call screen: on certain devices (iOS 18.4RC) the normal call screen appears and the user can answer or decline the call, on other devices (iOS 18.3, especially with dynamic island) only a phone icon appears in the upper right corner and no possibility to answer or deny call. Any idea on why we are encountering that behavior? Thanks
0
0
103
Mar ’25
Issue related to APNS is delivering expired voip push notification.
Hi, am facing an issue related to voip push notifications getting delivered 1-2 hours after apns-expiration to 0 and apns-priority to 10. I had raised a similar post got a reply that it may be due to network delay. But network delay can cause the delivery of voip push to be delayed only by few seconds or minutes. But in our case voip push is getting delivered hours after the voip call was attempted. Steps to reproduce: Put our voip app in background and lock iPhone. As app is put in background, socket connections gets disconnected from server. Now if a caller makes call to this app, the call should be delivered through voip push. 2) Voip push should ideally be received even if app is in background and iPhone is locked. It is connected to a good wifi network. But it does not receive the voip push. 3) After 1-2 hours user unlocks iPhone and opens voip app. As soon as user opens app, the voip push is received and phone starts ringing.
3
0
120
Apr ’25
Can APNs handle large numbers of VoIP requests in real time?
I am developing a system to send VoIP notifications to terminals with APNs. I understand that the maximum JSON Payload for VoIP is 5kb. If I want to send VoIP notifications to 3000 terminals, I am considering sending 3000 requests in parallel from the system to the APNs, will the APNs guarantee that the notifications will be sent to each terminal without a significant time lag when receiving 3000 requests simultaneously?
4
0
67
Apr ’25
LiveCommunicationKit
What I want to achieve now is that when the app is not running, upon receiving a notification, it displays an interface similar to CallKit with accept and decline buttons. Here is part of my code: @available(iOS 17.4, *) class LiveCommunicationManager: NSObject, ConversationManagerDelegate { static let shared = LiveCommunicationManager() var isInvalidate:Bool = false var configuration: ConversationManager! override init() { let config = ConversationManager.Configuration( ringtoneName: "notes_of_the_optimistic", iconTemplateImageData: UIImage(named: "AppIcon")?.pngData(), // 图标的 PNG 数据 maximumConversationGroups: 1, // 最大对话组数 maximumConversationsPerConversationGroup: 1, // 每个对话组内最大对话数 includesConversationInRecents: false, // 是否在通话记录中显示 supportsVideo: false, // 是否支持视频 supportedHandleTypes: [.generic,.phoneNumber,.emailAddress] // 支持的通话类型 ) configuration = ConversationManager.init(configuration: config) } func reportIncomingCall(uuid: UUID, callerName: String) { configuration.delegate = self let local = Handle(type: .generic, value: callerName, displayName: callerName) let update = Conversation.Update(localMember: local,members: [local],activeRemoteMembers: [local]) Task{ do { try await configuration.reportNewIncomingConversation(uuid: uuid, update: update) print("成功报告新来电") } catch { print("报告新来电失败: \(error.localizedDescription)") } } } func conversationManager(_ manager: ConversationManager, conversationChanged conversation: Conversation) { print("会话状态改变了") } func conversationManagerDidBegin(_ manager: ConversationManager) { print("会话已经开始了") manager.delegate = self } func conversationManagerDidReset(_ manager: ConversationManager) { print("会话将要清除了") } func conversationManager(_ manager: ConversationManager, perform action: ConversationAction) { print("会话接听了") configuration.invalidate() } func conversationManager(_ manager: ConversationManager, timedOutPerforming action: ConversationAction) { print("会话超时了") } func conversationManager(_ manager: ConversationManager, didActivate audioSession: AVAudioSession) { print("会话激活了") } func conversationManager(_ manager: ConversationManager, didDeactivate audioSession: AVAudioSession) { print("会话死亡了") } } 在Appdelegate里设置了这些: func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -&gt; Void) { // 在这里处理离线推送通知 completionHandler(.noData) // 返回后台任务完成 if let aps = userInfo["aps"] as? [String: Any], let alert = aps["alert"] as? [String : Any]{ // 静默推送的处理逻辑 if #available(iOS 17.4, *) { let manager = LiveCommunicationManager.shared if manager.isInvalidate { return } if let msgType = userInfo["msgType"] as? Int{ if msgType == 5{ manager.configuration.invalidate() }else{ let callerName = alert["title"] as? String ?? "Fanvil" manager.reportIncomingCall(uuid: UUID(), callerName: callerName) } } } } } Xcode has been configured with the necessary capabilities, such as Background Fetch, Voice over IP, Background Processing, and Push Notification. The issue now is that sometimes the code works as expected, allowing the app to wake up when not running and displaying the system interface with accept and decline buttons. However, after a few successful attempts, the app stops waking up, and no notification appears. But when I manually open the app, the didReceiveRemoteNotification method gets triggered. I’d like to know why this stops working after a few times.
0
1
141
Apr ’25
Not Receiving Incoming VoIP Push Notifications on iOS 18.4 (React Native App)
Hi Apple Dev Team, We have a React Native application that includes call functionality using PushKit and VoIP notifications. We are using APNS to send the VoIP notifications, and everything has been working smoothly on iOS versions up to 18.3.1. However, after updating to iOS 18.4, we are no longer receiving incoming VoIP push notifications on the device. There have been no code changes related to our PushKit or notification logic — the exact same build continues to work correctly on devices running iOS 18.3.1 and earlier. We're trying to understand if anything has changed in iOS 18.4 that affects VoIP push delivery or registration behavior. Would appreciate any guidance, and happy to share code snippets or configuration if needed. Thanks in advance!
1
1
97
Apr ’25