Search code examples
iosswiftxcodeios13

Crash on iOS 13 devices related to NSClassFromString


I am getting crash on iOS13 devices with a following crash log

Crashed: BSXPCCnx:com.apple.frontboard.systemappservices (BSCnx:client:com.apple.frontboard.workspace-service)
EXC_BAD_ACCESS 0x0000000104a1c458

App has Firebase, Facebook and Realm SDK which uses NSClassFromString. 96% crashes have occurred when app is in the background state.

We used NSFileProtectionComplete for data protection

One solution suggested on Apple Forum is, if NSFileProtectionComplete in entitlements, use NSFileProtectionCompleteUntilFirstUserAuthentication, then locking specific directories with NSFileProtectionComplete. But not sure this solution will work or not as not able to reproduce the crash. Any help will be really appreciated

enter image description here


Solution

  • With iOS 13.2 beta 3, the crash is not reproducible with above-mentioned step. Looks like the issue was from Apple and they have taken care in 13.2 release