- Home /
How to make "Splash Screen" auto rotate on IPhone ?
Someone said Apple will reject for non-rotating Unity splash screen. So I find ways to solve it, but there is seldom infomation about this.
Now I have already solved IPad "Splash Screen" rotate, but not work on IPhone, Hope someone can help me.
My IPad method is to update UISupportedInterfaceOrientations/(IPad) at XCode plist file. Set UIInterfaceOrientationLandscapeLeft and UIInterfaceOrientationLandscapeRight, then the IPad will rotate OK. However, I tried the same way on UISupportedInterfaceOrientations/(IPhone), But UISupportedInterfaceOrientations/(IPhone) not work on IPhone.
My unity version is 3.5.6
I mean "Splash Screen" before game start, $$anonymous$$y game rotate ok after the game start, just the "Splash Screen" not rotate.
$$anonymous$$y game is LandscapeRight and LandscapeLeft, just this two side rotate.
Answer by DannyB · Jun 20, 2013 at 01:37 PM
Where are you getting your information from?
You do not need to code anything. Let Unity handle it for you and set orientation to Auto Rotate in player settings.
See this answer
I mean "Splash Screen" before game start, $$anonymous$$y game rotate ok after the game start, just the "Splash Screen" not rotate.
$$anonymous$$y game is LandscapeRight and LandscapeLeft, just this two side rotate.
Ok, this thread is a pile of mess. Your splash screen does not need to autorotate. It does need to start in the correct orientation, and this is automatically handled by Unity.
Stop worrying about it, use the Unity setup as described above, remove any other orientation code, and go back to coding your game.
Your mean "set orientation to Auto Rotate"? I have set this, but it doesn't work on iphone. I select AutoRotate + LandscapeRight + LandscapeLeft. Not in the correct orientation when game start every time.
Answer by slippdouglas · Apr 12, 2014 at 08:55 PM
It's not possible on iPhone/iPod touch. The issue is that there is only one supported launch image orientation for iPhone and iPod touch, Portrait, as shown in this table within the iOS App Programming Guide (https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html#//apple_ref/doc/uid/TP40007072-CH6-SW17):
If you look at the Default.png
(below), Default@2x.png
, and Default-568h@2x.png
images Unity generates when you build for iOS, you'll see that the mitigation for the portrait-only restriction is to bake rotation into the image so that it appears to the user to have a landscape-right orientation. If you have Unity Pro, you could easily rotate these to have the app appear to launch in landscape-left1 instead of right, but still adjusting at runtime to the device's orientation pre-`application:didFinishLaunchingWithOptions:` on non-iPad devices seems to be out of the question.
Default.png
:
Orientations, for reference:
1: You many also need to change the order of the UISupportedInterfaceOrientations key's values within Info.plist and/or update SplashScreenController
to accommodate the alternate orientation. I don't have Unity Pro, so I can't devise and test a specific solution for you. My apologies.