gpt4 book ai didi

ios - 应用程序崩溃并显示 [BTAlertmissAnimated :] unrecognized selector

转载 作者:行者123 更新时间:2023-12-02 15:43:11 27 4
gpt4 key购买 nike

在我的应用程序中,我在生产中看到下面的堆栈跟踪发生了很多崩溃。

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[BTAlert dismissAnimated:]: unrecognized selector sent to instance 0x15f6d500'


Application Specific Backtrace 1:
0 CoreFoundation 0x2f57cf03 <redacted> + 130
1 libobjc.A.dylib 0x39d11ce7 _objc_exception_throw + 38
2 CoreFoundation 0x2f580837 -[NSObject doesNotRecognizeSelector:] + 202
3 CoreFoundation 0x2f57f12f <redacted> + 706
4 CoreFoundation 0x2f4ce0d8 __CF_forwarding_prep_0 + 24
5 CoreBluetooth 0x2f2a508f -[BTDevicePicker dealloc] + 358
6 libobjc.A.dylib 0x39d20b6b <redacted> + 174
7 ExternalAccessory 0x2fe93105 <redacted> + 56
8 ExternalAccessory 0x2fe8b057 <redacted> + 898
9 CoreFoundation 0x2f53ef39 <redacted> + 12
10 CoreFoundation 0x2f4b2de9 __CFXNotificationPost + 1720
11 Foundation 0x2fe9dcc5 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
12 AppSupport 0x32f7b3f7 -[CPDistributedNotificationCenter deliverNotification:userInfo:] + 62
13 AppSupport 0x32f7b511 __CPDNDeliverNotification + 276
14 AppSupport 0x32f7a8a3 <redacted> + 138
15 AppSupport 0x32f6efb3 <redacted> + 146
16 CoreFoundation 0x2f54783f <redacted> + 34
17 CoreFoundation 0x2f5477db <redacted> + 346
18 CoreFoundation 0x2f545fa7 <redacted> + 1406
19 CoreFoundation 0x2f4b07a9 _CFRunLoopRunSpecific + 524
20 CoreFoundation 0x2f4b058b _CFRunLoopRunInMode + 106
21 GraphicsServices 0x3441d6d3 _GSEventRunModal + 138
22 UIKit 0x31e0f891 _UIApplicationMain + 1136
23 myapp 0x00102647 __mh_execute_header + 30279
24 libdyld.dylib 0x3a20fab7 <redacted> + 2

在我的应用程序中,我显示一个蓝牙选择器对话框,我猜测关闭此对话框时会发生崩溃。我自己无法重现崩溃。我用来呈现对话框的代码非常简单。

[[EAAccessoryManager sharedAccessoryManager] showBluetoothAccessoryPickerWithNameFilter:
[NSPredicate predicateWithFormat:@"SELF CONTAINS 'MyDeviceName'"]
completion:^(NSError *error) {
if (error) {
DLog(@"Failed to search for blueetoh devices or user cancelled %@", [error localizedDescription]);
} else {
[self userDidConnectToBTFromInApp];
}
}];

我的猜测是,这与调用解雇方法之前释放 BTPicker 有关 - 但这只是猜测。

我在几乎所有类型的 iPhone 或 iPad 以及几乎所有版本的 iOS 6 和 7(包括 7.1)上都见过崩溃情况。

如果有人知道为什么会发生这种情况,我很乐意听到:

最佳答案

这可能与委托(delegate)函数有关,请参阅 https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/CoreBluetooth.framework/BTDevicePicker.h

它试图调用我认为的那个函数。

其他可能的情况是,您正在使用 > iOs6 的方法,并且崩溃发生在 iOs 5 上。您能检查一下吗?

关于ios - 应用程序崩溃并显示 [BTAlertmissAnimated :] unrecognized selector,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22381873/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com