ios 在使用linphone + CallKit进行通话时,应用程序崩溃

pokxtpni  于 2023-10-21  发布在  iOS
关注(0)|答案(1)|浏览(251)

我在Flutter上有一个跨平台的应用程序。我不知道为什么,但最近(直到这个月,它肯定不是)应用程序开始崩溃,在通话中linphone和只有在iOS上。它不依赖于iOS版本,它可以在15和新的17上绘制:C错误似乎与UUID有关(从错误文本判断:D)但我不明白我做错了什么(在我的最后一次更新中,我只添加了2个隔离到我的应用程序中,我很长一段时间都没有碰过电话(
错误如下所示:

Crashed: io.flutter.1.raster
0  libsystem_kernel.dylib         0x7578 __pthread_kill + 8
1  libsystem_pthread.dylib        0x7118 pthread_kill + 268
2  libsystem_c.dylib              0x1d178 abort + 180
3  libsystem_malloc.dylib         0x1e0e4 malloc_vreport + 908
4  libsystem_malloc.dylib         0x1e38c malloc_zone_error + 104
5  libsystem_malloc.dylib         0x18658 nanov2_guard_corruption_detected + 44
6  libsystem_malloc.dylib         0x16810 nanov2_free_definite_size + 402
7  Flutter                        0x52e718 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
8  Flutter                        0x52e524 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
9  Flutter                        0x51944c (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
10 Flutter                        0x527010 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
11 Flutter                        0x5265e8 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
12 Flutter                        0x4995bc (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
13 Flutter                        0x535144 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
14 Flutter                        0x5dfdd8 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
15 Flutter                        0x493348 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
16 Flutter                        0x3d4814 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
17 Flutter                        0x3d4a68 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
18 Flutter                        0x2dfebc (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
19 Flutter                        0x3d40ac (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
20 Flutter                        0x3d595c (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
21 Flutter                        0x3d4ca0 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
22 Flutter                        0x3ec0b0 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
23 Flutter                        0x2de69c (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
24 Flutter                        0x2e1c8c (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
25 CoreFoundation                 0xcb624 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
26 CoreFoundation                 0x88f4c __CFRunLoopDoTimer + 940
27 CoreFoundation                 0x2e71c __CFRunLoopDoTimers + 288
28 CoreFoundation                 0x7a4d4 __CFRunLoopRun + 1852
29 CoreFoundation                 0x7f3ec CFRunLoopRunSpecific + 612
30 Flutter                        0x2e1d78 (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
31 Flutter                        0x2e13ec (Missing UUID 4c4c449c55553144a1909abb36b88cdf)
32 libsystem_pthread.dylib        0x16b8 _pthread_start + 148
33 libsystem_pthread.dylib        0xb88 thread_start + 8

我猜问题与这两个函数中的CXHandle示例有关。唉,我没有任何更详细的日志,因为我只能通过Firebase crashlytics捕捉到这个
代码函数

func incomingCall() {
        print("START INCOMING")
        incomingCallUUID = UUID()
        let update = CXCallUpdate()
        update.remoteHandle = CXHandle(type:.generic, value: linphoneIOS.incomingCallName)
        
        provider.reportNewIncomingCall(with: incomingCallUUID, update: update, completion: { error in })
    }

func outgoingCall(remoteAddress: String) {
        print("START OUTGOING")
        mProviderDelegate.incomingCallUUID = UUID()
        let handle = CXHandle(type: .generic, value: remoteAddress)
        let startCallAction = CXStartCallAction(call:  mProviderDelegate.incomingCallUUID, handle: handle)
        startCallAction.isVideo = false

        let transaction = CXTransaction()
        transaction.addAction(startCallAction)

        mProviderDelegate.mCallController.request(transaction) { error in
            if let error = error {
                // ERROR transaction
            } else {
                // SUCCES transaction
            }
        }
    }
oalqel3c

oalqel3c1#

问题可能与报告Callkit的位置有关。我以前遇到过类似的问题,将报告调用工具包迁移到didReceiveIncomingPushWith帮助了我。同样在文档中,Apple还报告了一个callkit in side callback。在报告了一个来电之后,你应该调用completion()块。
https://developer.apple.com/documentation/pushkit/responding_to_voip_notifications_from_pushkit

相关问题