2

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?

  • 1
    From our analysis, we found that Salesforce's iOS Mobile SDK 4.2 has lines of code to perform a keychain operation. The method which is kicking this off is ‘SecItemCopyMatching’. This method has been used in the following Classes of the Salesforce SDK: SFKeychainItemWrapper.m SFUserAccountManager.m Can we get to know why and when this methods are invoked in Hybrid SDK, during the App launch process? Can we also get the confirmation on whether in recent/latest Salesforce iOS SDKs, keychain operations are not being performed on the main thread? – Vivek Balagangadharan May 9 at 18:03
0

This is not a known issue, in fact to my knowledge no one has ever reported this. Unfortunately, the version of the SDK you are using is very old so there is really no way for us to debug this issue. I suggest you upgrade to the latest version of the SDK so you can build the app in Xcode 10 for an iOS 12 device. I know this is not what you want to hear, but there have been far too many changes in our SDK and updates from Cordova in the last 3 years go though.

Thanks

  • 1
    Thanks Brandon. The recent versions of our apps use version 6.2 of the Salesforce SDK. However, the customer is on an older version of our app which uses Salesforce Mobile SDK 4.2. – Vivek Balagangadharan May 9 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.