I have an older Objective-C
application that I upgraded recently in order to add new functionalities. I'm using now AFNetworking
version 4.0. All is working now even in the newest version of iOS
except on iOS 10
. When I run it on the simulator, the application crash immediately in the splashSreen
. From the logs I know that it's in relation with NSURLSession
but can't figure out how to solve it. I've found similar issues but there solutions are not up-to-date.
This is what I have in the thread stack
when the crash happened
And this is the crash description from the console log with some previous Firebase
calls:
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