Technote (troubleshooting)
Problem(Abstract)
When an iOS application is running in the background and receives an APNs notification, the callback function registered with Worklight is not executed. In Worklight you have the option to register a callback function that executes after an notification is received by the application. However, if this callback function uses graphical elements like an 'alert view' this can cause a race condition to occur because the application view is not yet loaded when it tries to execute. The results is that the app crashes or freezes. This only happens if the application happens to be running in the background when the notification is received.
Resolving the problem
To work around this problem, use a WorkLight or Cordova API. For example, instead of alert, use navigator.notification.alert API.
This issue is resolved in fix pack 5.0.0.3.
| Segment | Product | Component | Platform | Version | Edition |
|---|---|---|---|---|---|
| Mobile- Speech and Enterprise Access | IBM Mobile Foundation | Server | Apple iOS | 5.0 | Consumer, Enterprise |
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.