2011-03-09 47 views
0

我正在製作一個通用應用程序(目標設備系列 - > iphone/ipad)。它在iphone和ipad上運行得非常好,但當涉及到iPod touch時,我不會收到任何警告或錯誤,並且我的xcode顯示它正在運行,但是我的iPod touch的屏幕變爲黑色。Universal iOS Binary無法在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 
+0

您等待擊中「Build and Run」多久?另外,點擊「停止」後點擊應用程序圖標會發生什麼? – Moshe 2011-03-09 13:47:50

+0

它在構建和運行時表現得像一個普通的應用程序。它又變成黑屏。 – 2011-03-09 14:13:43

+0

我會建議清理版本,重新啓動設備並重新啓動xcode。你在使用Xcode 4.0嗎? – Robert 2011-03-09 16:35:49

回答

0

這可能是您在plistfile已指定兩個筆尖文件在啓動加載。一個用於iPad,一個用於iPhone。 iPod touch實際上需要自己的nib文件來加載。

iPod Touch 4G thinks it's an iPad

1

看看我有這個問題了。在項目的信息plist文件中,我將鍵設置爲「MainWindowForiPhone」的鍵爲「主筆尖文件基本名稱(iPad)」設置爲「MainWindowForiPad」和「主筆尖文件基本名稱(iPhone)」。解決方案是添加第三個MainWindow鍵「Main nib文件基本名稱」,我也將其設置爲「MainWindowForiPhone」。

金一樣在前面回答說,在iPodTouch上不加載與iPhone的鍵相關聯的主窗口筆尖,它加載在通用密鑰「主筆尖文件基本名」的主窗口。

相關問題