0

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
  • Your question is not very clear. Are you saying that , if the application is not running and tapping the notification in the notification center, launches the application but does not execute wlCommonInit() ? – Vivin K Jan 29 '16 at 18:07
  • Yes, that is correct. Also, when the push notification message comes in, slide the message to the right, then log into the iPhone. It should open the application. – Raymond Yee Jan 29 '16 at 18:49
  • @RaymondYee, If you're doing this with the sample push notifications provided as part of the mfp tutorials. Is it also failing the same way? – Idan Adar Feb 20 '16 at 10:38

1 Answers1

0

This seems to work correctly with the push notifications sample provided with the tutorial. Please try it on your end as well and compare the implementation.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89