Testing on the Xcode simulator is nice, but you should always test on the platform you’re actually developing for. In addition, some features cannot be simulated in the emulator, such as the accelerometer, and will need to be tested on a physical device. Here are the steps to setting up your device for testing.
While trying to fix a broken/unfinished app I was given at work today, I kept getting a “whitelist rejection” error. I was using PhoneGap to display some html files which were added to the project. It turns out you need to add a key to the “ExternalHosts” section of the PhoneGap.plist file. The safest method would be to just add each host individually, but you can also add the value “*” to allow any external host as seen in the screenshot below.