views:

97

answers:

1

Hi, since I started iPhone/iPod Development I have come across some differences between how the simulator and how real device react. Maybe I will come across some other differences I will have to figure out as well, maybe other people haven't met these problems here (YET) and can profit from the knowledge, and maybe you know some problems/differences that you would have been happy to know about earlier before you spent several hours or days figuring out what the heck is going on.

So here is what I came across.

  1. Simulator is not case sensitive, Devices are case sensitive.

    • This means a default.png or Icon.png will work in simulator, but not on a device where they must be named Default.png and icon.png (if it's still not working read this answer)
  2. Simulator has different codecs to play audio and video

    • If you use f.e. MPMoviePlayerController you might play certain video on the simulator while on the device it won't work (use Handbrake->presets->iPhone & iPod Touch to create playable videos for Simulator and Device).
    • If you play audio with AudioServicesPlaySystemSound(&soundID) you might here the sound on simulator but not an a device. (use Audacity to open your soundfile, export as wav and run afconvert -f caff -d LEI16@44100 -c 1 audacity.wav output.caf in terminal)
  3. Also there is this flickering on second run problem which can be resolved with an
    playerViewCtrl.initialPlaybackTime = -1.0;
    either on the end of playing or before each beginning.

  4. Simulator is mostly much faster cause it doesn't simulate the hardware but uses Mac resources, therefore f.e. sio2 Apps (OpenGL,OpenAL,etc. framework) run much better on simulator, well everything that uses more resources will run visibly better in simulator than on device.

I hope we can add some more to this.

+3  A: 

Just to clarify your first point:

Simulator is not case sensitive, Devices are case sensitive

Being case-sensitive or not in that sense is not a characteristic of simulator. It's a characteristic of the underlying filesystem. The filesystem on device is case sensitive HFS+ while the file system on the Mac is likely to be case insensitive (by default). If the application runs on a case sensitive HFS+ partition, it'll become case sensitive when it comes to loading files from disk even when it runs in the simulator.

Mehrdad Afshari
ah ok, always good to know specifics
Allisone
Strictly, the case-sensitive version is "HFSX".
tc.