Simulator and device give different results.

Have you ever had problems when your changes were reflected only on the simulator, and not on the device?

For example, if I want to set the selected type of background image for a table cell, the selection state in the simulator will show the changes, but not on the device during testing.

This inconsistency starts to bother me, because when it is time for a production deployment, how do I know if the apps in the app store will work correctly?

thanks

+6
source share
3 answers

Have you ever had problems when your changes were reflected only on the simulator, and not on the device?

Yes, this has happened to me many times.

This inconsistency starts to bother me, because when it is time for a production deployment, how do I know if the apps in the app store will work correctly?

When I first started developing iPhone, I had to rewrite a significant part of the code, because when it worked great in Simulator, it did not work properly on the iPhone. Then I realized that Simulator is not an emulator, that is, it certainly does not copy the iPhone.

You need to test on your iOS device often to make sure your code works correctly. This is what App Store reviewers will use, and what your users will use, not the simulator.

During daily development, you can use Simulator, as well as your fastest device, for example, the 5th generation iPod Touch and iPhone 5. From time to time and at the end of your development, it is good to test older, slower and larger memory limited devices, especially the oldest ones, which will launch the version of iOS that you are targeting.

+5
source

The best you can do when this happens is to uninstall the application you are developing (extra dimension), reboot the device to clear the application caches, and finally make a clean build with Xcode. Such things often happen to me, and uninstalling my application, followed by a clean build, does the trick all the time.

+1
source

Inconsistencies occur, so you need to test on real devices (and why it's a simulator, not an emulator). In this case, most likely, this is due to the fact that Xcode was not able to correctly update the program, in particular, knives. Uninstall the application from the phone and reinstall it. The application store and iTunes use a different installation method, so you don’t have to worry about that in the store.

+1
source

All Articles