简体   繁体   中英

Universal iOS app test iPhone target on iPad device/simulator

I am trying to test the iPhone part of my universal app on an iPad, i am using Xcode 4.1 on Mac OSX Lion

so, i changed "Targeted Device Family" in the targets build settings to be iPhone only. and i checked it to be on all configurations (debug & release)

When i connect my iPad and run the app, the app runs in the iPhone environment on iPad (i only see the black frame) and then it crashes, because its loading the AppDelegate of the iPad not the iPhone which contains an UISplitViewController so it crashes.

How to direct the universal app to use the iPhone AppDelegate? should i do it programmatically? or is there any other settings in the targets i have to do.

Thanks for help.

it seems the only solution to this problem, is to change the property "Main nib file base name (iPad)" in the info.plist file to be the same as "Main nib file base name" both are pointing to the iPhone Main Window

you should set the Targeted Device Family for both project and target to the iphone/ipad and when you are running the app select the current device family which you are going to run from the drop down..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM