【问题标题】:iphone app blank in simulator: moved from 3.1.3 to 4.1模拟器中的 iphone 应用程序空白:从 3.1.3 移至 4.1
【发布时间】:2010-09-21 02:08:34
【问题描述】:

我有一个 3.1 xcode 项目,它在 3.1.3 版本的操作系统下运行我的应用程序很好。我一直在我的 iphone 3G(不运行 IOS 4)上测试这个应用程序。

我刚刚复制了 XCode 项目和文件,下载了带有 4.1 SDK 的最新 XCode 3.2.4。当我通过模拟器运行我的应用程序时,它只是空白而不是显示我的应用程序。我可以通过 NSLog 语句看到它实际上到达了我的 initWithFrame() 和 viewDidLoad() 方法,但它好像没有正确加载图像。 我尝试将文件复制回 xcode 项目并允许它更新引用。我还尝试使用 SDK 的 4.0 和 4.1 以及硬件下的 iphone 4 和 iphone 模拟器。

我确实从 system.log 中看到了一些错误:

Sep 20 21:59:01 s-macbook-pro-17 [0x0-0x18018].com.apple.Xcode[484]: Xcode(484,0x7fff70216c20) malloc: reference count underflow for 0x2019c0a40, break on auto_refcount_underflow_error to debug.
Sep 20 21:59:01 s-macbook-pro-17 Xcode[484]: Xcode(484,0x7fff70216c20) malloc: reference count underflow for 0x2019c0a40, break on auto_refcount_underflow_error to debug.
Sep 20 21:59:03 s-macbook-pro-17 com.apple.launchd.peruser.502[127] (com.apple.iPhoneSimulator:com.apple.managedconfiguration.profiled): Bug: launchd_core_logic.c:4598 (24108):2
Sep 20 21:59:03 s-macbook-pro-17 com.apple.launchd.peruser.502[127] (com.apple.iPhoneSimulator:com.apple.managedconfiguration.profiled): Path monitoring failed on "/Users/m/Library/Application Support/iPhone Simulator/4.1/Library/ConfigurationProfiles/profiledRunning": No such file or directory
Sep 20 21:59:03 s-macbook-pro-17 com.apple.launchd.peruser.502[127] (com.apple.iPhoneSimulator:com.apple.managedconfiguration.profiled): Bug: launchd_core_logic.c:4598 (24108):2
Sep 20 21:59:03 s-macbook-pro-17 com.apple.launchd.peruser.502[127] (com.apple.iPhoneSimulator:com.apple.managedconfiguration.profiled): Path monitoring failed on "/Users/m/Library/Application Support/iPhone Simulator/4.1/Library/ConfigurationProfiles/MCOutstandingNagComputation": No such file or directory
Sep 20 21:59:03 s-macbook-pro-17 com.apple.launchd.peruser.502[127] (com.apple.iPhoneSimulator:com.apple.managedconfiguration.mdmd): Bug: launchd_core_logic.c:4598 (24108):2
Sep 20 21:59:03 s-macbook-pro-17 com.apple.launchd.peruser.502[127] (com.apple.iPhoneSimulator:com.apple.managedconfiguration.mdmd): Path monitoring failed on "/Users/m/Library/Application Support/iPhone Simulator/4.1/Library/ConfigurationProfiles/MDMOutstandingActivities.plist": No such file or directory
Sep 20 21:59:03 s-macbook-pro-17 vot[929]: ******** AX INSPECTOR MODE ************ 
Sep 20 21:59:03 s-macbook-pro-17 vot[929]: **** Running VoiceOver Lite ****
Sep 20 21:59:06 s-macbook-pro-17 app[935]: MainView alloc
Sep 20 21:59:06 s-macbook-pro-17 app[935]: MainView alloc complete
Sep 20 21:59:06 s-macbook-pro-17 app[935]: loadView complete

【问题讨论】:

  • 我注意到 MainWindow.xib 没有出现在“NIB 文件”下。我去了“获取信息”并将“使用模式”更改为“*.[nx]ib”。 MainWindow.xib 出现了,但我的应用程序仍然是空白的,并且没有显示任何图像。

标签: iphone xcode simulator


【解决方案1】:

我通过界面生成器在主窗口上设置了“启动时可见”属性。使用 XCode 3.1 时,我的其他 macbook pro 上的 xcode 项目中没有此设置。

我遇到了这个对我有帮助的帖子:

iPhone SDK4.0 and xcode 3.2.3 issue

【讨论】:

    【解决方案2】:

    我的应用程序中的情况类似,但我的问题是,不知何故,在 IB 的 MainWindow.xib 中,文件所有者的委托不再链接到我的应用程序委托(右键单击 IB 中的文件所有者并检查委托按钮)。在 Ipad 模拟器中工作,因为我有 2 个不同的 MainWindow xib 文件,一个用于 iphone/ipod,一个用于 ipad。

    希望这有助于有人在启动时遇到空白屏幕。

    【讨论】:

      猜你喜欢
      • 2011-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-21
      • 2011-03-20
      • 1970-01-01
      • 2012-03-26
      相关资源
      最近更新 更多