iPhone device vs. iPhone simulator

后端 未结 25 2252
暖寄归人
暖寄归人 2020-11-28 07:51

I have heard of apps not working properly on the simulator but working properly on the actual iPhone device. Has anyone experienced an app that runs perfectly in the simula

相关标签:
25条回答
  • 2020-11-28 07:54

    Also note that you will be compiling against the OS X frameworks (where applicable) when building for the simulator so you could be using methods and classes that aren't available on the iPhone versions of the frameworks.

    One example I can think of off the top of my head is NSPredicate. I was able to compile and run an app using NSPredicate in the simulator, but it wouldn't compile for the device since that class isn't available.

    0 讨论(0)
  • 2020-11-28 07:54

    Yes - it happened to me the other day. I'm new to the iphone, and so had deleted MainWindow.xib thinking it was unused. The app worked perfectly on the simulator - but crashed when installing on the phone.

    Another issue we ran into was our three20 dependencies, which were set to ios 3.2 instead of 4.1. Worked perfectly in the simulator, but bombed on the device (since the files were compiled for the wrong arch).

    0 讨论(0)
  • 2020-11-28 07:55

    I had a problem running a relatively simple 1/30 sec timer to do updates for a game. It runs fine in the simulator, and freezes out input on the device.

    0 讨论(0)
  • 2020-11-28 07:58

    The order in which function/constructor parameters are evaluated is different:

    int i = 0;
    
    int f() { return ++i; }
    
    int a, b;
    
    int test(int p1, int p2) {
    
        a = p1;
    
        b = p2;
    
    }
    
    test( f(), f() );
    
    //simulator: a = 2, b = 1
    
    //device: a = 1, b = 2
    
    0 讨论(0)
  • 2020-11-28 07:59

    Yeah....

    Apps compiled for 2.x will work fine on 3.0 device, but it will crash on 3.0Simulator

    Note: 1. If you compile for 3.0, app will work fine on 3.0 simulator also... 2. a)Compile for 2.x and launch the app in simulator. b)Now change the iPhone Simulator Hardware to "3.0". c)Then launch the app we installed earlier in step a). CRASH !!!!!!!!

    0 讨论(0)
  • 2020-11-28 08:00

    If your app is graphics intensive, like say a game, the performance of the simulator DOES NOT resemble at all that of the hardware. Your application will probably be smooth and work great on the simulator, but on hardware it'll likely render at a crawl unless you know what your doing. You can easily go from 60fps to 3fps between Simulator and hardware.

    0 讨论(0)
提交回复
热议问题