Setting Xcode's target to iPhone NOT iPad

后端 未结 10 967
栀梦
栀梦 2020-12-10 10:15

I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have not been able to get the app to launch in the iPhone simulator - it keeps launching in the iPad simulator. I

相关标签:
10条回答
  • 2020-12-10 10:41

    Update for release version of Simulator.

    First of all, the title of this question doesn't match the description: Xcode target isn't the same as the simulator hardware device.

    If you are writing an app targeting 3.2, it can run on both iPad (using OS 3.2) and lower OS versions on the iPhone. You do this by setting the Base SDK to iPhone Device 3.2, the Targeted Device Family to iPhone/iPad, and the iPhone OS Deployment Target to 3.1 (lower than 3.2).

    The iPhone simulator has a menu option for Hardware->Device, which can be set to iPhone or iPad. However, you can only run a 3.2 SDK target in iPad mode, and a Universal app that supports iPad can only use the 3.2 SDK to build.

    You can of course set the simulator to iPhone mode and launch your app from Springboard, but that will lose the debugger connection. Switching mode during installation of your app will cause it to crash.

    So the short answer is still the same: you can't run a Universal iPad app in the iPhone mode simulator while debugging.

    0 讨论(0)
  • 2020-12-10 10:42

    Go to Project Set Active Executable There are 2 options: Ipad Simulator 3.2 or Iphone Simulator 4.0. If you choose the Iphone simulator, then it will launch Iphone simulator. If you choose the Ipad simulator, then it will launch Ipad simulator.

    0 讨论(0)
  • 2020-12-10 10:44

    This was driving me nuts too, but the answer is right here:

    http://quatermain.tumblr.com/post/517122761/running-universal-ipad-iphone-apps-in-the-simulator

    In short, tell Xcode to Build for the 3.2 SDK, then switch the build menu to the 3.1 SDK and tell Xcode to Run the app. Presto, the app starts in the iPhone simulator!

    0 讨论(0)
  • 2020-12-10 10:45

    Short answer: You can change the hardware setting in the simulator. Hardware->Device

    0 讨论(0)
  • 2020-12-10 10:48

    Upper-left corner of the IDE find a dropdown list of Simulator versions - flipped to 3.2 - try to put it back to 3.1.3

    and relaunch your app.

    0 讨论(0)
  • 2020-12-10 10:57

    From Apple's documentation: "iPhone OS 3.2 does not support iPhone and iPod touch devices. It runs only on iPad." There's no way to target 3.2 for iPhone, so there's no Simulator. Ergo, you'll have to wait for iOS 4. Fortunately, that's only 4 days away now... of course it won't support the first generation of iPhone devices, but for all other iPhone users it's a free upgrade. Not sure about iPod Touches.

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