Universal iOS Binary doesn't run on iPod touch
I am making a universal application (targeted device family --> iphone/ipad). It works perfectly fine in iphone and ipad but when it comes to iPod touch, I get no warnings or errors and my xcode shows it is running, but my iPod touch's screen turns into black.
I dont understand why it is behaving like that. Any ideas?
My console output is:
[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
I had that problem, too. In the project's info plist file I had keys: "Main nib file base name (iPad)" set to "MainWindowForiPad" and "Main nib file base name (iPhone)" set to "MainWindowForiPhone". The solution was to add a third MainWindow key "Main nib file base name", which I set to "MainWindowForiPhone" also.
Like Kim said in the previous answer, the iPodTouch does not load the MainWindow nib associated with the iPhone's key, it loads the MainWindow under general key "Main nib file base name".
It is probably that you in your plistfile have designated the two .nib files to load on launch. One for the iPad and one for the iPhone. The ipod touch actually needs its own nib file to load.
Take a look at iPod Touch 4G thinks it's an iPad
精彩评论