Greetings Phonegap users,
Please note that Phonegap API and our guides were recently changed.
Due to the support of the Windows Phone Phonegap we had to change the API for the Phonegap plugin starting with v3.1.0. Now the onDeviceReady function accepts PW_APPID as a parameter. Missing this parameter will lead to receiving the following error:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array’
The function call should be as follows:
We strongly advise updating you project according to the updated guide, please refer to the [Phonegap guide](https://pushwoosh.gitbook.io/platform-docs/pushwoosh-sdk/cross-platform-frameworks/phonegap-build), the only changed functions are **onDeviceReady** and **registerDevice**.
**IMPORTANT:** These changes apply to the *Phonegap CLI* only, not Phonegap Build.