[英]iPhone app works fine on iPad, but not on iPhone
I've got a problem with my universal app that I just recently ported to the iPad. 我的通用应用程序最近在移植到iPad时遇到问题。
While it works fine on the iPad, on the iPhone 3G it shows Default.png
and then goes to a black screen. 尽管它在iPad上可以正常工作,但在iPhone 3G上却显示
Default.png
,然后进入黑屏。
It even showed the home screen after Default.png
once, with all the icons messed up - and the home screen was still scrollable. 它甚至在
Default.png
之后显示一次主屏幕,所有图标都弄乱了-主屏幕仍然可以滚动。
I've tried everything to get it working - cleaning the app and deleting then reinstalling the app but they don't seem to work. 我已经尽一切努力使它正常工作-清洁应用程序并删除然后重新安装该应用程序,但它们似乎无法正常工作。
I've rebooted my Mac and my iPhone but doing so doesn't seem to work. 我已经重启了Mac和iPhone,但似乎无法正常工作。
Also - the app works fine in the iPhone simulator, so I'm wondering if it's my device. 另外-该应用程序在iPhone模拟器中运行良好,所以我想知道它是否是我的设备。
Update: 更新:
I converted the app to a universal application using Xcode's 'Upgrade current target for iPad' function so there are different XIB's for each device. 我使用Xcode的“为iPad升级当前目标”功能将该应用程序转换为通用应用程序,因此每种设备都有不同的XIB。
I also don't have any other device to test it on - just an iPhone 3G and an iPad. 我也没有任何其他设备可以测试它-只是iPhone 3G和iPad。
Problem solved. 问题解决了。 Rather easily actually - in Xcode's upgrade process, it changed an entry in the plist to not find MainWindow.
实际上,这很容易-在Xcode的升级过程中,它更改了plist中的一个条目以找不到MainWindow。 It changed the entry 'Main nib file base name' to 'Main nib file base name (iPhone)'.
它将条目“主要笔尖文件基本名称”更改为“主要笔尖文件基本名称(iPhone)”。 I don't think the iPhone knew where to look for the nib because its plist entry was changed.
我不认为iPhone知道在哪里寻找笔尖,因为其plist条目已更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.