Skip to content

Conversation

@milseg
Copy link

@milseg milseg commented Jan 4, 2019

Extend tutorial for hiding at startup. One does not need to directly change Xcode project to hide splash screen. It can be made through config.xml

Platforms affected

What does this PR do?

What testing has been done on this change?

Checklist

  • Reported an issue in the JIRA database
  • Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
  • Added automated test coverage as appropriate for this change.

Extend tutorial for hiding at startup. One does not need to directly change Xcode project to hide splash screen. It can be made through config.xml
@janpio janpio changed the title Update README.md Add example configuration on how to hide splash screen on startup on iOS Jan 4, 2019
@janpio
Copy link
Member

janpio commented Jun 19, 2019

Could you please take a look at my comments and suggestions @milseg? Thanks.

@NiklasMerz NiklasMerz added this to the 3.0 milestone Mar 23, 2020
Copy link
Member

@NiklasMerz NiklasMerz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggested change

@NiklasMerz NiklasMerz requested a review from jcesarmobile March 23, 2020 08:04
@FlorentMasson
Copy link

Shouldn't it be edit-config?
https://stackoverflow.com/a/38013943
Also worth mentioning you need to remove/add the platform for it to work

@timbru31
Copy link
Member

timbru31 commented Jan 8, 2021

@FlorentMasson If my memory serves right, both can use XML but only config-file can parse .plist files.

Re-adding a plugin is always required if changes are made to the plugin variables and platform re-adding is always required when changing other values. If those necessities are not documented then we should improve it over at https://github.com/apache/cordova-docs.

Copy link
Member

@timbru31 timbru31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jcesarmobile
Copy link
Member

UIViewControllerBasedStatusBarAppearance set to true is required for the plugin to work, so setting it to false will prevent it from working.
Will certainly also hide it on startup as desired, but the user won't be able to show it again.

I don't think we should be recommending this on the plugin docs as we do now, nor adding this change.

@timbru31
Copy link
Member

timbru31 commented Jan 8, 2021

We are using the same two properties in production without any issues - and are able to hide/show the status bar programmatically.
The code even checks for _uiviewControllerBasedStatusBarAppearance (e.g., in https://github.com/apache/cordova-plugin-statusbar/blob/master/src/ios/CDVStatusBar.m#L395))

Maybe I'm mistaken, too - Apple's docs are always terrible.

@jcesarmobile
Copy link
Member

yeah, if not using UIViewControllerBasedStatusBarAppearance it uses setStatusBarHidden, which was deprecated on iOS 9, if you say it still works then they might have not removed it yet, I didn't try before commenting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants