通用iOS应用程序在iPad设备/模拟器上测试iPhone目标(Universal iOS app test iPhone target on iPad device/simulator)

编程入门 行业动态 更新时间:2024-10-28 00:28:56
通用iOS应用程序在iPad设备/模拟器上测试iPhone目标(Universal iOS app test iPhone target on iPad device/simulator)

我试图在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

更多推荐

本文发布于:2023-08-04 08:30:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1413025.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   器上   目标   测试   设备

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!