Can I use iPhone Simulator 3.1 from Xcode 3.2.3?

Since Simulator 3.2 and 4.0 in SDK 4 DO NOT work on iPhone (iPad always comes out and does not respond at all), I ended up with two SDK installations using SDK 3.1.3 / Simulator 3.1 for modeling and SDK 4 for building on iPhone 4. (Read more here .)

I tried using the old Simulator 3.1 from SDK4-XCode 3.2.3, for example. by copying the full directory "iPhoneSimulator.platform / Developer / SDKs / iPhoneSimulator3.1.3.sdk" into the appropriate XCode3.2.3 directory and select Simulator-3.1.3 (which appears in the "Active Executable" list), but it cannot build, with more than 30 errors for example

Undefined characters:
"_OBJC_CLASS _ $ _ NSURLConnection", link: objc-class-ref-to-NSURLConnection in GRACEViewController.o
"_OBJC_CLASS _ $ _ NSString", link from: objc-class-ref-to-NSString in GRACEViewController.o

Is there a way to use Simulator 3.1 (instead of Simulator 3.2 or 4.0) when using Xcode 3.2.3 (which needs to be built into iPhone on OS 4) ???

+3
source share
2 answers

Xcode 3.2.3 really makes an iPhone. However, you must ensure that your project settings are correct. I have the following settings and this works for me:

  • Base SDK: iPhone Device 4.0
  • : iPhone
  • : iPhone OS 3.0

iPhone Simulator.

+3

, , OS3.2, 3.1.3 3.2 SDK . 3.1.3 iPhone Simulator, 3.2 iPad.

:

    #ifdef UI_USER_INTERFACE_IDIOM
        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
// iPad Only Code Goes here
            [deviceType setString:@"ipad"];
        } else {
    #endif
// iPhone Only Code Goes Here
            [deviceType setString:@"iphone"];
    #ifdef UI_USER_INTERFACE_IDIOM
        }
    #endif
0

Source: https://habr.com/ru/post/1751792/


All Articles