Search Issue Tracker

Fixed in 2020.2.X

Fixed in 2018.4.X, 2019.4.X, 2020.1.X

Votes

0

Found in

2018.4

2019.3.15f1

2020.2

Issue ID

1253671

Regression

No

[iOS] The status bar flashes during the splash screen display when a built project is launched on iOS

Mobile

-

How to reproduce:
1. Open a new Unity project
2. Build and deploy on iOS
3. Observe the Unity splash screen

Expected result: the Unity splash screen proceeds without the iOS status bar visible
Actual result: the status bar briefly shows up at the top of the splash screen

Reproducible with: 2018.4.23f1, 2019.3.16f1, 2020.1.0b12, 2020.2.0a14

Reproduces on:
VLNQA00160 iPhone 6S iOS 13.3.1

Does not reproduce on:
VLNQA00183 iPad mini iOS 9.3.5

Notes:
1. In some versions (2018.4, 2019.2), the status bar only shows up on initial launch; trying to open the app over and over may not help produce the bug.
2. Possible workaround:

// in: SplashScreen.mm
// in: void ShowSplashScreen(UIWindow* window) implementation
// after: _controller = [storyboard instantiateInitialViewController];
// add:
/*
UIView* storyboardView = _controller.view;
_controller.view = nil;
_controller = [[SplashScreenController alloc] init];
_controller.view = storyboardView;
_controller->_supportedOrientations = { true, true, true, true }; // quickly hardcoded but should change according to the supported orientations
*/
// Note: _supportedOrientations must be set as @public

  1. Resolution Note (fix version 2020.2):

    Fixed in 2020.2.0a16

Comments (2)

  1. allpublic

    Aug 18, 2021 19:05

    I have the issue in Version 2021.1.11f1.
    I was able to solve it to modify the Info.plist by hand with these settings:

    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>

  2. PacoLabs

    Jun 26, 2020 17:40

    Regarding the workaround. something else must be changed:
    in: UnityAppController+ViewHandling.mm
    in - (void)createUI
    [_window makeKeyAndVisible]; must be commented (since there is no rootViewController yet)
    -----------

    // [_window makeKeyAndVisible]; // COMMENT THIS LINE
    [ UIView setAnimationsEnabled: NO];
    // TODO: extract it?
    ShowSplashScreen(_window);

Add comment

Log in to post comment