PLATFORM AND VERSION iOS cordova v6.3.1, Salesforce Mobile SDK 4.2.0
Devices:
- App is built to install only on iPad devices.
- All iPad devices in the enterprise are enrolled under Apple’s Device Enrollment Program.
DESCRIPTION OF PROBLEM
- We have deployed the application for one of our enterprise customers. Some users within the enterprise are running into an unusual problem. On launching the app on the iPad, the app opens and crashes immediately.
- About the app: iOS app developed only for iPad devices, and distributed using Enterprise distribution using MobileIron.
- Impacted users: This does not happen with all users. Only 4% of the total users have reported this issue so far, but this percentage is only going high.
What we know so far: - On the affected devices, majority of the users are having iPads running on iOS 12.1.1 or 12.1.4 - Most of the affected devices are iPad Pros. - The issue reports started coming in December 2018. - On the affected devices, there are 150+ other applications distributed through MobileIron, but only our app seems to be having this problem.Uninstalling the application, and re-installing again, does not solve the problem.This issue is very hard to reproduce within the enterprise.
Workaround suggested:
We are asking the users to “Reset all Settings”, and this is solving the issue temporarily. That is, the app works for a few days before stopping again for them.
We have also got the end users to share the crash logs with us. We can upload the entire file, but here's an excerpt:
Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d Termination Description: SPRINGBOARD, scene-create watchdog transgression: app exhausted real (wall clock) time allowance of 19.86 seconds |ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 5.740 (user 5.740, system 0.000), 14% CPU", | "Elapsedapplication CPU time (seconds): 0.087, 0% CPU" | ) Triggered by Thread: 0
STEPS TO REPRODUCE We are unable to reproduce the issue at our end. However, we got the crash logs from devices experiencing this issue. (Excerpt pasted in description above)
We have also contacted the Apple Support and they suspect that some Security framework related operation (SecItemCopyMatching method) is causing the timeout. Apple support has suggested to move the synchronous operations from main thread to background thread. But we have no control on the code while launching of the app as it just opens the Salesforce login page from SalesforceMobileSDK v4.2.0 (Hybrid SDK).
For the end users of the app, what is happening is that they get a prompt to enter device passcode which pops up behind the app (users don't see this). The users don't realise they need to enter a passcode, and they wait for the app to load and iOS Watchdog kills the app as there is no input on the passcode prompt. Now one mystery which we are trying to solve is that why does this happen for a particular build of the app, and also on select few iPad devices. We are continuing to pursue this with Apple DTS team.
Is there a way to move synchronous operations from the main thread? Is there a fix in the v4.2.0 SDK?
The issue we face happens only on iOS 12.X. Is this a known issue? And is there any change in latest Salesforce iOS Mobile SDK 7.0 with respect to the operation moving from Main thread to Background thread while launching the application to address such issues?
Could you please help us on this?