【问题标题】:Universal iOS Binary doesn't run on iPod touch通用 iOS 二进制文件无法在 iPod touch 上运行
【发布时间】:2011-07-11 22:07:17
【问题描述】:

我正在制作一个通用应用程序(目标设备系列 --> iphone/ipad)。它在 iphone 和 ipad 上运行良好,但在 iPod touch 上,我没有收到任何警告或错误,我的 xcode 显示它正在运行,但我的 iPod touch 屏幕变成黑色。

我不明白它为什么会这样。有任何想法吗?

我的控制台输出是:

[Session started at 2011-03-09 17:59:01 +0500.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1510) (Fri Oct 22 04:12:10 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
Loading program into debugger…
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-25686-91
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
sharedlibrary apply-load-rules all
continue

【问题讨论】:

  • 您等了多久才点击“构建并运行”?还有,点击“停止”后点击应用图标会发生什么?
  • 它在构建和运行时的行为与普通应用程序一样。它再次变成黑屏。
  • 我建议清理构建,重新启动设备并重新启动 xcode。你使用的是 Xcode 4.0 吗?
  • 罗伯特我都做了,让我现在重新启动我的 Mac :)

标签: iphone ipod universal


【解决方案1】:

可能是您在 plistfile 中指定了两个 .nib 文件在启动时加载。一款用于 iPad,一款用于 iPhone。 ipod touch 实际上需要自己的 nib 文件来加载。

看看 iPod Touch 4G thinks it's an iPad

【讨论】:

    【解决方案2】:

    我也有这个问题。在项目的信息 plist 文件中,我有键:“主 nib 文件基本名称(iPad)”设置为“MainWindowForiPad”,“主 nib 文件基本名称(iPhone)”设置为“MainWindowForiPhone”。解决方案是添加第三个 MainWindow 键“Main nib file base name”,我也将其设置为“MainWindowForiPhone”。

    就像 Kim 在上一个答案中所说,iPodTouch 不会加载与 iPhone 键关联的 MainWindow nib,它会在通用键“Main nib file base name”下加载 MainWindow。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-14
      • 1970-01-01
      • 1970-01-01
      • 2014-04-17
      • 1970-01-01
      • 2011-08-09
      • 1970-01-01
      • 2013-01-26
      相关资源
      最近更新 更多