I recently upgraded to Xcode 8, and the app crashes on the
configureSDKWithAppID in the simulator with any of the 9.3 or 8.4 iOS versions. I'm using JB4ASDK 4.5.0.
It dumps me in the debugger with something like this:
0x1021a4ade <+2544>: movl %eax, %r15d 0x1021a4ae1 <+2547>: movq %r12, %rdi 0x1021a4ae4 <+2550>: callq *0x461dae(%rip) ; (void *)0x00000001074999b0: objc_release 0x1021a4aea <+2556>: movq %r13, %rdi 0x1021a4aed <+2559>: movq 0x461da4(%rip), %r13 ; (void *)0x00000001074999b0: objc_release 0x1021a4af4 <+2566>: callq *%r13 0x1021a4af7 <+2569>: cmpq $0x0, 0x28(%rbp) 0x1021a4afc <+2574>: je 0x1021a4e2a ; <+3388> at ETPush.m:718 0x1021a4b02 <+2580>: testl %r15d, %r15d 0x1021a4b05 <+2583>: je 0x1021a4e2a ; <+3388> at ETPush.m:718 0x1021a4b0b <+2589>: movq 0x5e74fe(%rip), %rdi ; (void *)0x00000001048438e0: NSString 0x1021a4b12 <+2596>: movl %r15d, (%rsp) 0x1021a4b16 <+2600>: leaq 0x496333(%rip), %rdx ; @"%@\n%s [Line %d] error = %d" 0x1021a4b1d <+2607>: leaq 0x49636c(%rip), %rcx ; @"CCKeyDerivationPBKDF Failure" 0x1021a4b24 <+2614>: leaq 0x3db218(%rip), %r8 ; "-[ETPush configureSDKWithAppID:andAccessToken:withAnalytics:andLocationServices:andProximityServices:andCloudPages:withPIAnalytics:error:]"
If I use the iOS 10 simulator, it works fine in the simulator. I can do something like not call this if we're in the simulator or on a lower iOS version with preprocessor macros, but I'm a little concerned, since we don't necessarily have older iOS devices to test on.
Also, this could be an Xcode or simulator bug, but I'm not sure how to tell where the problem is. The exception is
EXC_BAD_ACCESS (code=1, address=0x84a).
Per the response, here is the code from the offending line:
[[ETPush pushManager] configureSDKWithAppID:@"myappid" andAccessToken:@"myaccesstoken" withAnalytics:YES andLocationServices:NO andProximityServices:NO andCloudPages:NO withPIAnalytics:NO error:&error];
I'm not sure how this is off topic, because it crashes on the Salesforce SDK line.
This looks like a problem specifically with JB4ASDK 4.5.0. I can reproduce with Xcode 7.3, Xcode 8.0, and Xcode 8.1 beta. With JB4ASDK 4.4.0, it works fine in the simulator for those Xcode versions. So, I believe this is a bug with the Salesforce mobile push SDK or an interactivity problem with it and the simulator.