cordova-plugin-statusbar icon indicating copy to clipboard operation
cordova-plugin-statusbar copied to clipboard

Add example configuration on how to hide splash screen on startup on iOS

Open milseg opened this issue 5 years ago • 6 comments

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.

milseg avatar Jan 04 '19 18:01 milseg

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

janpio avatar Jun 19 '19 14:06 janpio

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

FlorentMasson avatar May 28 '20 20:05 FlorentMasson

@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.

timbru31 avatar Jan 08 '21 16:01 timbru31

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.

jcesarmobile avatar Jan 08 '21 16:01 jcesarmobile

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.

timbru31 avatar Jan 08 '21 17:01 timbru31

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

jcesarmobile avatar Jan 08 '21 18:01 jcesarmobile