简体   繁体   中英

phoneGap app for iOs: if application works in xCode device emulator

I've got a newbie question about phoneGap and creating apps for iOs.

If my phoneGap app runs in device emulator in xCode and everything is ok, can I be sure that it will work the same way on a real iOS device when I publish it in the appstore?

The XCode simulator does what the name suggest - 'simulates' . It is not identical to the actual hardware, for a number of reasons. Here are just a few of them:

Performance - your computer has much more memory and processing power available than the phone itself. Your app may run fine on the simulator, but quite slow on the device. This is why it's a good idea to run on the device itself, especially if you're doing stuff which could use up a lot of memory.

Missing features - the simulator doesn't allow certain things to be tested, like in app purchase or media/asset management. And obviously you're missing things like the camera, the accelerometers, compass, etc. You can from iOS 5 simulate certain things like the GPS, but nowhere near everything.

Visuals - the simulator runs at your monitor resolution, whereas the phone itself has a much higher DPI display. Things that look readable or fine on the simulator can on device look very different.

If you're not testing your app on an actual device before releasing it to the app store you're doing a disservice to your users - this is Apple's point of view, and one shared by most developers. It's not necessarily what you might want to here, but unfortunately the simulator really is just that - a simulator. You wouldn't want to be in a plane piloted by somebody who had only trained on a simulator. And you probably wouldn't want to use an app that had only been run on the iOS simulator.

Here's what Apple have to say about it in their own documentation:

Although you can do much of your debugging and testing of an iOS application using iOS Simulator, simulation cannot completely match the results of running your application on the target devices; you must test your application on actual devices to ensure that it runs as intended and to tune it for performance on actual hardware.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM