ios - iOS - Objective-C:库升级后 iOS 10 上的应用程序崩溃
问题描述
我最近升级了一个较旧的Objective-C
应用程序以添加新功能。我现在使用的是AFNetworking
4.0 版。iOS
即使在最新版本的except on中,一切现在都可以正常工作iOS 10
。当我在模拟器上运行它时,应用程序立即在splashSreen
. 从日志中我知道它与NSURLSession
但无法弄清楚如何解决它有关。我发现了类似的问题,但解决方案不是最新的。
这就是我在thread stack
坠机发生时所拥有的
这是控制台日志中的崩溃描述以及之前的一些Firebase
调用:
2020-11-19 18:48:11.257 myApp[63563:2715840] Appdelegate, applicationDidBecomeActive
Nov 19 18:48:11 myApp[63563] <Warning>: 6.34.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
Nov 19 18:48:11 myApp[63563] <Notice>: 6.34.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled
Nov 19 18:48:11 myApp[63563] <Notice>: 6.34.0 - [Firebase/Analytics][I-ACS023220] Analytics screen reporting is enabled. Call +[FIRAnalytics logEventWithName:FIREventScreenView parameters:] to log a screen view event. To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO (boolean) in the Info.plist
2020-11-19 18:48:11.645 myApp[63563:2715921] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7fa48d318df0 of class __NSCFLocalDataTask was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x600000031ce0> ( <NSKeyValueObservance 0x60000024a200: Observer: 0x6080000f5980, Key path: state, Options: <New: NO, Old: NO, Prior: NO> Context: 0x0, Property: 0x608000253ad0> )'
*** First throw call stack: (
1 libobjc.A.dylib 0x0000000112558141 objc_exception_throw + 48
2 CoreFoundation 0x0000000112b5c625 +[NSException raise:format:] + 197
3 Foundation 0x000000010fb52b53 NSKVODeallocate + 294
4 libobjc.A.dylib 0x000000011256cb8e _ZN11objc_object17sidetable_releaseEb + 202
5 libsystem_blocks.dylib 0x0000000113ff799d _Block_release + 111
6 libdispatch.dylib 0x0000000113f6405c _dispatch_client_callout + 8
7 libdispatch.dylib 0x0000000113f40c6e _dispatch_continuation_pop + 1020
8 libdispatch.dylib 0x0000000113f4e5db _dispatch_source_invoke + 1401
9 libdispatch.dylib 0x0000000113f42c47 _dispatch_queue_serial_drain + 981
10 libdispatch.dylib 0x0000000113f43669 _dispatch_queue_invoke + 1084
11 libdispatch.dylib 0x0000000113f45ec4 _dispatch_root_queue_drain + 634
12 libdispatch.dylib 0x0000000113f45bef _dispatch_worker_thread3 + 123
13 libsystem_pthread.dylib 0x000000011430d6d5 _pthread_wqthread + 220
14 libsystem_pthread.dylib 0x000000011430d57b start_wqthread + 15 ) libc++abi.dylib: terminating with uncaught exception of type NSException
解决方案
推荐阅读
- pandas - 如何在 Pandas 中将各种快照下采样到每月平均值
- javascript - Javascript 正则表达式概念
- c++ - 如何在生成的 foo-config.cmake 文件中引入 find_dependency 调用?
- c# - 在 _Header 部分中,如何从 db 查询到呈现菜单?
- javascript - 当从顶部或底部滚动到视图中时,使用 Intersection Observer 向元素添加不同的类
- c++ - 子字符串不应该存在于操作数中导致 std::string 通过 + 运算符连接返回空字符串
- reactjs - Gulp-Watchify 没有检测到对子模块文件夹的更改
- multithreading - krb5_cc_destroy 和 krb5_cc_cache_match 之间的死锁
- ios - 在iOS13上使用secureTextEntry,键盘闪烁
- python - 如果 logger = logging.getLogger(__name__) 存储日志的位置