I am working on a Cordova iOS app using Ionic and the Salesforce Mobile SDK. On an iPad, if you return from a pause event (e.g. opening Control Center or going to the home screen and then returning to the app) while in landscape mode the app goes black. However, if you do the same thing in portrait, the app returns to normal operation.
This doesn't happen in an iPhone 6. What happens instead in an iPhone 6 is if you open the Control Center while in landscape, it tries to force the phone into portrait orientation and then goes back to landscape and the Control Center doesn't open.
Are these two things related? Is there a fix for them or is it just a known issue?
VERSIONS:
Cordova iOS: 4.3.0
Salesforce SDK Plugin: 5.0.1
Cordova Plugin Device Oriention: 1.0.5
iOS: 10.2.1
Update We are also seeing this issue when deeplinking into our app while its in landscape on an iPad.
I finally figured out a fix to this by disabling the Snapshot View that hides whats in the app when its in background mode (e.g. double clicking the home button swiping through the open apps). Do do this go to the AppDelegate+SalesforceHybridSDK.m
file and add this line inside the (AppDelegate *)sfsdk_swizzled_init
method (you'll see other references to [SalesforceSDKManager sharedManager]
there as well):
[SalesforceSDKManager sharedManager].useSnapshotView = NO;
It won't have that Snapshot view when its in the background anymore but that wasn't necessary for our app. If it is necessary you'd have to look deeper into the bug. The iPhone issues also mentioned above were fixed by this.