I recently up-graded the codebase to Xcode11.3, getting this error on launch without detailed logs:
2019-12-18 15:18:40.461627+0530 XXXXX[2485:622148] +[_LSDefaults sharedInstance]: unrecognized selector sent to class 0x20cbf3aa0
2019-12-18 15:18:40.462868+0530 XXXXX[2485:622148] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[_LSDefaults sharedInstance]: unrecognized selector sent to class 0x20cbf3aa0'
*** First throw call stack:
(0x1c512498c 0x1c4e4d0a4 0x1c502ccc8 0x1c578f50c 0x1c53df908 0x1c512ad90 0x1c4ffabd0 0x10c717cf8 0x10c71abc0 0x10c7242e4 0x10c723e78 0x10c7239d0 0x10c71f55c 0x10c77b5e4 0x10c7740f0 0x10c7ed5cc 0x10c7740f0 0x10c7b2f78 0x10c7d69b4 0x10c7b9f48 0x10c776e5c 0x10c7433bc 0x1c4e411ec 0x1c4e44aec)
libc++abi.dylib: terminating with uncaught exception of type NSException
Not sure what is wrong here, Is there any way I can get the actual class in code for this '0x20cbf3aa0'?
Note: This is only happening on Physical devices running iOS > 13
I found the root cause:
Added
NSSetUncaughtExceptionHandlerto find the following stack trace.Observing the crash log at line 7 indicates that it's using
ONIMethodId's methodinvokeWithTargetAfter that I inspected symbols (command -
nm frameworkBinary) for all my 3rd party frameworks, I got to know one of my framework was using this method which was eventually calling_LSDefaultsprivate method. And that method has been deleted from iOS >= 13.0 SDK.I raised this to my 3rd party vendor and they'll provide an updated framework for the same.
Thanks to everyone for comments and watching the issue, posting the answer so that it can help anyone else facing the same issue in future.