- Home /
black screen when simulating
Hey guys=)
I'm rather new to ios so forgive me for my lack of knowledge in this area.
Here's my problem: I have a game... although the game doesn't matter because I attempted using the free ios project files for unity. Well, I exported them into xcode and changed the target simulator (which I found was necessary for the build to be successful online) but when it opens up in the simulator, all I see is a black screen. Now, I'm not sure if it has anything to do with this problem but all the frameworks in my project window in xcode are red... could this be the problem?
In xcode all my frameworks show up red... as if they don't exist or something...
Maybe this will help:
GNU gdb 6.3.50-20050815 (Apple version gdb-1511) (Mon Nov 1 07:33:53 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 "x86_64-apple-darwin".Attaching to process 17739.
2011-02-27 14:27:38.624 new[17739:207] Unknown class Unity_iPhoneAppDelegate in Interface Builder file. 2011-02-27 14:27:38.666 new[17739:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UICustomObject 0x4e0c550> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key glView.'
*** Call stack at first throw: ( 0 CoreFoundation 0x00f22be9 __exceptionPreprocess + 185 1 libobjc.A.dylib 0x010775c2 objc_exception_throw + 47 2 CoreFoundation 0x00f22b21 -[NSException raise] + 17 3 Foundation 0x0077d6cf _NSSetUsingKeyValueSetter + 135 4 Foundation 0x0077d63d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285 5 UIKit 0x0020d8d6 -[UIRuntimeOutletConnection connect] + 112 6 CoreFoundation 0x00e992cf -[NSArray makeObjectsPerformSelector:] + 239 7 UIKit 0x0020c2ed -[UINib instantiateWithOwnerptions:] + 1041 8 UIKit 0x0020e081 -[NSBundle(UINSBundleAdditions) loadNibNamedwnerptions:] + 168 9 UIKit 0x00018943 -[UIApplication loadMainNibFile] + 172 10 UIKit 0x000194ca -[UIApplication runWithURLayload:launchOrientation:statusBarStyle:statusBarH idden:] + 291 11 UIKit 0x00023db2 -[UIApplication handleEvent:withNewEvent:] + 1533 12 UIKit 0x0001c202 -[UIApplication sendEvent:] + 71 13 UIKit 0x00021732 UIApplicationHandleEvent + 7576 14 GraphicsServices 0x01197a36 PurpleEventCallback + 1550 15 CoreFoundation 0x00f04064 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FU NCTION + 52 16 CoreFoundation 0x00e646f7 CFRunLoopDoSource1 + 215 17 CoreFoundation 0x00e61983 _CFRunLoopRun + 979 18 CoreFoundation 0x00e61240 CFRunLoopRunSpecific + 208 19 CoreFoundation 0x00e61161 CFRunLoopRunInMode + 97 20 UIKit 0x00018fa8 -[UIApplication _run] + 636 21 UIKit 0x0002542e UIApplicationMain + 1160 22 new 0x00001ccc main + 102 23 new 0x00001c5d start + 53 ) terminate called after throwing an instance of 'NSException' sharedlibrary apply-load-rules all (gdb)
thank you for your help! cheers, Matt
You usually should be building to a device. Did you choose simulator in Unity as the desired setting as well as in xCode?
what do you mean? as i said I'm new to this... I built it in unity for ios. That made an xcode project. There where two 'run' settings i could use 1# unity iphone 2# Unity - simulator iphone I tried both but they gave me a failed build. I added a new target for a build and that made the build successful but that's when i'd get the black screen
Answer by rejj · Apr 28, 2011 at 01:46 PM
Try the following:
- Delete the dir you are outputting the build to, if it exists - just to make sure you are starting fresh.
- In unity - Edit -> Project Settings -> Player Settings.
- Make sure you are looking at the iOS per-platform settings. Should be the 3rd icon in the toolbar/menubar thing in the Inspector
- Set the SDK Version to iOS Simulator Latest
- Build (not build & run - I can't get that to work)
- Open the .xcodeproj file with XCode and make sure you have the Unity-iPhone-Simulator target selected, and are building for the simulator. (eg, Unity-iPhone-Simulator | iPhone 4.3 Simulator)
- Build and Run in XCode
Your answer
Follow this Question
Related Questions
Black screen while running in iOS 4 Answers
Screen width problem with iPhone game (Xcode) 0 Answers
black screen after the first play on android 0 Answers
OpenGLES error 0x0502 in iOS 0 Answers
AWS in iOS not working 2 Answers