iPod Touch 4G 认为它是 iPad

发布于 2024-10-08 08:56:35 字数 297 浏览 0 评论 0原文

我构建了一个通用应用程序,可以在 iPad、iPhone 4G、3GS 和 iPad 上完美运行和工作。 3G,但在 iPod Touch 4G 上运行时无法正常运行。

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

我已经仔细检查过目标设备系列是 iPhone/iPad 并完成了干净的构建等,但仍然没有骰子。

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.

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.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

注定孤独终老 2024-10-15 08:56:35

因此,经过一番尝试和错误后,我找出了问题所在(实际上是两个独立但相关的问题):

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

Main nib 文件基本名称 (iPad)

主 nib 文件基本名称 (iPhone)

我错误地认为第二个键也适用于 iPod Touch,因为没有 主 nib 文件基本名称 (iPodTouch) 键。事实证明这是错误的,iPod Touch 实际上会查找 Main nib file base name 键。所以现在我的设置如下:

alt text

..并且它在 3.1.3 和 3.1.3 中运行良好。 4.2. (请注意,如果设备找不到要使用的主窗口,则不会调用 application:didFinishLaunchingWithOptions ,这就是我解决问题的方法)。

我怀疑同样的情况也适用于 Launch image (iPad)Launch image (iPhone)Launch image 键,这可以解释为什么iPod Touch 正在使用 iPad 启动图像,但尚未能够尝试。

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

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

Main nib file base name (iPad)

and

Main nib file base name (iPhone)

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:

alt text

..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).

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.

つ可否回来 2024-10-15 08:56:35

确保 Default.png 的命名正确:

  • Default.png(默认)
  • Default~iphone.png(iPhone 或 iPod touch)
  • < code>Default~ipad.png (iPad)

对于 iPad 资源,您还可以为每个方向指定某些默认 PNG。

Make sure the Default.pngs are correctly named:

  • Default.png (Default)
  • Default~iphone.png (iPhone or iPod touch)
  • Default~ipad.png (iPad)

For the iPad resources you can also specify certain default PNGs for each orientation.

橘香 2024-10-15 08:56:35

目前有一种越狱技术可以使用某些 iPad 固件来安装在 iPhone 或 iPod Touch 上。理论上它不会影响任何事情,但我自己从来没有这样做过,所以我不能保证这一点。您可能会问此测试仪是否在越狱设备上,如果是,请尝试在非越狱设备上。

There's currently a jailbreak technique that uses some of the iPad firmware to install on an iPhone or iPod Touch. In theory it shouldn't affect anything, but I've never done it myself so I can't vouch for that. You might ask if this tester is on a jailbroken device, and if so try on a non-jailbroken device.

平生欢 2024-10-15 08:56:35

我不确定它会起作用,但它可能对你有帮助。

确保在 InterfaceBuilder 中选中主窗口中的属性(visibleAtLaunch)。

有时如果不检查,就会显示黑屏。

I am not sure it will work, but it may help you.

Make sure that, in the InterfaceBuilder, the attribute(visibleAtLaunch) in main window is checked.

Some times if it doesn't checked then it will show black screen.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文