Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.35f1
2022.3.20f1
2023.2.12f1
2023.3.0b9
6000.0.0b11
Issue ID
UUM-64902
Regression
No
[iOS] Status Bar is not visible when using UnityFramework (UAAL) with Status Bar Hidden setting disabled
Steps to reproduce:
1. Open "Unity Project" from Uaal-example
2. Go to File > Build Settings and switch to iOS Platform
3. Go to Edit > Project Settings > Player > Resolution and Presentation
4. Disable Status Bar Hidden setting
5. By following these steps deploy to the device
6. In the Native app press Init
7. Observe the Status Bar
Actual results: Status Bar says hidden
Expected results: Status Bar is visible
Reproducible with versions: 2021.3.35f1, 2022.3.20f1, 2023.2.12f1, 2023.3.0b9
Reproducible with devices:
- VLNQA00604 - iPhone 15 Pro Max (MU773PX/A), CPU: Apple A17 Pro, OS: 17.0.2
- VLNQA00258 - iPhone Xs Max (MT502ET/A), CPU: Apple A12 Bionic, GPU: Apple designed, OS: 14.4
Notes:
- Not reproducible with simple empty project
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
Status Bar Hidden checkbox in Unity player settings writes YES/NO for key "UIStatusBarHidden" in Info.plist
https://developer.apple.com/documentation/bundleresources/information_property_list/uistatusbarhidden?language=objc
Which works in a regular Unity app because we read it from "MainBundle" to then set (BOOL)prefersStatusBarHidden (https://developer.apple.com/documentation/uikit/uiviewcontroller/1621440-prefersstatusbarhidden?language=objc)
However, when Unity is used as UAAL in another app, that native app is the "MainBundle" and does not contain such value in Info.plist (Unless the developer of the native app adds it) and so Unity fallbacks to YES (hide status bar) (Check UnityViewControllerbase+iOS.mm in Classes/UI of the generated Xcode project)
As the use of "Unity as a Library" is expected to be done by experienced native app developers, it is also expected that the developers will control the status bar themselves.
Another relevant plist setting is UIViewControllerBasedStatusBarAppearance (https://developer.apple.com/documentation/bundleresources/information_property_list/uiviewcontrollerbasedstatusbarappearance?language=objc) which will make Unity respect the status bar visibility of the main app if set to NO.
It is also possible to control the status bar visibility programatically, by setting prefersStatusBarHidden in the view controller and then calling setNeedsStatusBarAppearanceUpdate (https://developer.apple.com/documentation/uikit/uiviewcontroller/1621354-setneedsstatusbarappearanceupdat?language=objc), for example when loading or unloading UnityFramework
Also, honorable mention of childViewControllerForStatusBarHidden for even more advanced scenarios
https://developer.apple.com/documentation/uikit/uiviewcontroller/1621451-childviewcontrollerforstatusbarh?language=objc