iPod Touch 4G认为是iPad [英] iPod Touch 4G thinks it's an iPad

查看:100
本文介绍了iPod Touch 4G认为是iPad的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个通用应用程序,可以在iPad,iPhone 4G,3GS及更高版本上运行并完美运行. 3G,但是在iPod Touch 4G上运行时,它将无法正常运行.

I have a universal app built that runs and works perfectly on an iPad, iPhone 4G, 3GS & 3G, but when run on an iPod Touch 4G it won't run properly.

我没有要测试的iPod Touch,但是Beta测试仪告诉我,它可以很好地安装在设备上,但是运行时,它显示了iPad版本的应用程序的Default.png压缩到了屏幕启动时,然后从那里变黑.强制退出应用程序(使用应用程序切换器)并重新启动后,它会再次执行相同的操作.

I don't have a iPod Touch to test, but I have been told by a beta tester that it installs on the device fine, but when run it shows the Default.png from the iPad version of the app squashed into the screen when launched, then just goes black from there. When the app is force quit (using the app switcher) and re-launched it does the same thing again.

我已经仔细检查了目标设备系列是否为iPhone/iPad,并进行了干净的构建等.但是仍然没有骰子.

I have double checked that the Targeted Device Family is iPhone/iPad and done a clean build etc. but still no dice.

推荐答案

因此,经过反复试验,我弄清楚了问题所在(实际上是两个独立但相关的问题):

So after some trial and error I worked out what the problem was (actually two separate but related problems):

在我的info.plist中,我使用了两个键来分配不同的MainWindow文件:

In my info.plist I was using two keys to assign the different MainWindow files:

Main nib file base name (iPad)

Main nib file base name (iPhone)

我错误地认为第二个键也将适用于iPod Touch,因为没有Main nib file base name (iPodTouch)键.事实证明这是错误的,iPod Touch实际上正在寻找Main nib file base name键.所以现在我将其设置为:

I mistakenly thought the second key would apply to the iPod Touch also as there is no Main nib file base name (iPodTouch) key. Turns out this is wrong and the iPod Touch actually looks for the Main nib file base name key. So now I have it setup like this:

..并且在3.1.3&中运行正常4.2. (请注意,如果设备找不到要使用的MainWindow,则不会调用application:didFinishLaunchingWithOptions,这就是我解决此问题的方式.)

..and it's working fine in 3.1.3 & 4.2. (Note that application:didFinishLaunchingWithOptions is not called if the device can't find a MainWindow to use, that's how I worked out the problem).

我怀疑Launch image (iPad)Launch image (iPhone)Launch image键也是如此,这可以解释iPod Touch为什么使用iPad启动图像但还不能尝试使用它.

I suspect the same will apply to the Launch image (iPad), Launch image (iPhone) and Launch image keys, which would explain why the iPod Touch is using the iPad launch image but haven't been able to try it yet.

这篇关于iPod Touch 4G认为是iPad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆