Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simulator and device give different results

Have any of you ever ran into issues where the changes you've made are only being reflected on the simulator and not on the device?

Example, if i want to set the selected background image view for a table cell, the selection state in the simulator will show the changes but not on the device during testing.

This inconsistency is starting to worry me because when it's time to deploy to production, how do i know that the apps in the app store will work correctly?

Thanks

like image 458
ryan Avatar asked Nov 02 '12 01:11

ryan


People also ask

What is the difference between emulator and simulator in mobile testing?

Simulators are only meant to mimic the traditional internal behavior of devices, not the hardware. However, the trade-off is fine for testers who don't need to test app performance accurately under perfect conditions in an ideal environment. On the other hand, emulators replicate the entire experience of devices.

What is the difference between emulator and simulator in Android?

Emulators enable a computer system (the host) to mimic the hardware and software, while simulators model an environment to mimic the behavior and configuration of another target device.

What is a simulator in mobile testing?

A simulator in mobile testing is a virtual device for iOS devices, such as iPhones and iPads. It allows you to test your app by simulating the behavior of a real device on a Mac host.

What is device simulator?

Device Simulator is a package you can install as an alternative to the default Game view. It allows us to get a preview of how an app will look at various different aspect ratios and resolutions.


3 Answers

Have any of you ever ran into issues where the changes you've made are only being reflected on the simulator and not on the device?

Yes, this has happened to me many times.

This inconsistency is starting to worry me because when it's time to deploy to production, how do i know that the apps in the app store will work correctly?

When I first started developing for iPhone, I once had to rewrite a significant portion of code because while it worked perfectly in the Simulator, it did not work properly on the iPhone. I realized then that the Simulator is not an Emulator, that is, it does not replicate an iPhone exactly.

You need to test on an iOS device frequently to ensure that your code is working properly. That is what the App Store reviewers will be using and what your users will be using, not the Simulator.

During your daily development, you can use the Simulator and also your fastest device, like the 5th gen iPod Touch and iPhone 5. Periodically and towards the end of your development, it is good to test on older, slower, more memory limited devices, especially the oldest available that will run the iOS version that you are targeting.

like image 64
louielouie Avatar answered Oct 26 '22 09:10

louielouie


The best thing you can do when this happens is to uninstall the app your're developing, (extra measure) restart the device to clean any app caches, and finally do a clean build from XCode. Things like this tend to happen to me frequently and uninstalling my app followed by a clean build seems to do the trick all the time.

like image 36
Andy Ibanez Avatar answered Oct 26 '22 08:10

Andy Ibanez


Inconsistencies happen, that's why you need to test on actual devices (and why it's a simulator, not an emulator). In this case, it's most likely being caused by XCode failing to properly update the program, in particular the nibs. Delete your app from the phone and reinstall it fresh. The app store and iTunes use a different method of installation, so you shouldn't have to worry about it in the store.

like image 1
Kevin Avatar answered Oct 26 '22 09:10

Kevin