我试图在iPad上测试我的通用应用程序的iPhone部分,我在Mac OSX Lion上使用Xcode 4.1
所以,我将目标构建设置中的“目标设备系列”更改为仅限iPhone。 我检查了所有配置(调试和发布)
当我连接我的iPad并运行应用程序时,应用程序在iPad上的iPhone环境中运行(我只看到黑框)然后崩溃,因为它加载了iPad的AppDelegate而不是包含UISplitViewController的iPhone,所以它崩溃了。
如何指导通用应用程序使用iPhone AppDelegate? 我应该以编程方式进行吗? 或者我必须做的目标中是否有任何其他设置。
感谢帮助。
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.
最满意答案
它似乎是解决这个问题的唯一方法,就是将info.plist文件中的属性“主nib文件基本名称(iPad)”更改为与“主nib文件基本名称”相同,两者都指向iPhone主窗口
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
更多推荐
发布评论