开发者

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.

T开发者_如何学Pythonhanks 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..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜