If the application is not started and the request to open the application comes from a APNS message, wlCommonInit() in main.js never gets called.
The strange part is, when I add an alert("xxx...");
message in initOptions.js before the MobileFirst generated (if(WL.Client.getEnvironment()...
statement), wlCommonInit()
in main.js gets called and everything functions correctly.
The code that controls this flow appears to be worklight.js.
If the application is already running in the background, the application get's the focus correctly, even without the alert("xxx...");
to initOptions.js.
Current Environment:
- iPhone 5 with iOS 9.2.1(13D15) - for testing
- Xcode 7.2(7C68)
- MobileFirst 7.1.0.00-20151227-1725