- Home /
LaunchScreen.xib causes crash
I'm using Unity 4.6.5 and my game is targeting iOS8 and above so I've elected to use a LaunchScreen.xib file for my splash screen.
In theory it should work well - it's just two UIImageViews and a UILabel text and a few constraints. I've added the images manually to the project, and selected the LaunchScreen.xib file in the Unity player settings. So far so good.
It builds fine and displays correctly when I run the project. But then it crashes before the first scene appears. If I switch back to "default" splash screen instead of "Launch Screen" then the game loads ok (but does't use the specified Launch Screen).
The game crashes on line 45 on main.nm (a call to UIApplicationMain). Here's the error I'm getting in Xcode:
2015-09-22 18:11:30.665 bee[1017:428085] -[UIViewController superview]: unrecognized selector sent to instance 0x14f03ef0
2015-09-22 18:11:30.760 bee[1017:428085] Uncaught exception: NSInvalidArgumentException: -[UIViewController superview]: unrecognized selector sent to instance 0x14f03ef0
(
0 CoreFoundation 0x25351883 <redacted> + 150
1 libobjc.A.dylib 0x36dbedff objc_exception_throw + 38
2 CoreFoundation 0x25357035 <redacted> + 0
3 CoreFoundation 0x25354c8f <redacted> + 702
4 CoreFoundation 0x252842b8 _CF_forwarding_prep_0 + 24
5 UIKit 0x2946a821 <redacted> + 128
6 UIKit 0x2946a79b <redacted> + 30
7 bee 0x000bed74 -[SplashScreen updateOrientation:] + 864
8 bee 0x000c04ac -[SplashScreenController create:] + 2476
9 bee 0x000c0908 _Z16ShowSplashScreenP8UIWindow + 396
10 bee 0x000db9d4 -[UnityAppController(ViewHandling) createViewHierarchy] + 2620
11 bee 0x000d9ac0 -[UnityAppController application:didFinishLaunchingWithOptions:] + 1348
12 UIKit 0x294d5f7f <redacted> + 394
13 UIKit 0x296f7563 <redacted> + 3086
14 UIKit 0x296fb3f7 <redacted> + 1554
15 UIKit 0x2970e381 <redacted> + 36
16 UIKit 0x296f891f <redacted> + 134
17 FrontBoardServices 0x2d47bccd <redacted> + 232
18 FrontBoardServices 0x2d47bfb9 <redacted> + 44
19 CoreFoundation 0x25314827 <redacted> + 14
20 CoreFoundation 0x25314417 <redacted> + 454
21 CoreFoundation 0x2531277f <redacted> + 806
22 CoreFoundation 0x252651e9 CFRunLoopRunSpecific + 516
23 CoreFoundation 0x25264fdd CFRunLoopRunInMode + 108
24 UIKit 0x294cf43f <redacted> + 526
25 UIKit 0x294ca18d UIApplicationMain + 144
26 bee 0x000b7ce0 main + 304
27 libdyld.dylib 0x374e9873 <redacted> + 2
)
2015-09-22 18:11:30.760 bee[1017:428085] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController superview]: unrecognized selector sent to instance 0x14f03ef0'
*** First throw call stack:
(0x2535186b 0x36dbedff 0x25357035 0x25354c8f 0x252842b8 0x2946a821 0x2946a79b 0xbed74 0xc04ac 0xc0908 0xdb9d4 0xd9ac0 0x294d5f7f 0x296f7563 0x296fb3f7 0x2970e381 0x296f891f 0x2d47bccd 0x2d47bfb9 0x25314827 0x25314417 0x2531277f 0x252651e9 0x25264fdd 0x294cf43f 0x294ca18d 0xb7ce0 0x374e9873)
libc++abi.dylib: terminating with uncaught exception of type NSException
Any ideas?
Your answer
Follow this Question
Related Questions
Android GAME Crashes After Splash Screen 2 Answers
WP8 - Changing splash screen from default causes app to crash after splash screen 0 Answers
Installed Android SDK, Java Dev Kit, Unity 4.6.2 - why does Unity crash? 1 Answer
Xcode Crashes on Launch: SplashScreen updateOrientation 1 Answer
Issues With Scene Transition 1 Answer