-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot disable splashscreen in standalone CDVViewController #929
Comments
A Launch storyboard is a required part of every iOS app. It's not possible to disable entirely. The default behaviour for Cordova is intended to show a blank screen until the web content loads. |
Okay - Looks like the Cordova documentation is stale then? I'm using Cordova as part of a broader native iOS project; that code manages the appearance of the splash screen. Is there a better way to disable the Cordova splash screen code that you'd recommend? |
I believe the default behaviour is a splashscreen is shown for 3 seconds (in addition to however long it takes for the OS to launch the app). The documentation you linked just disables the delay, but not the splashscreen. Did you mean disabling the delay no longer works in 6.x? |
Here's what I'm readin in the documentation that I linked to:
I'm interpreting "disable" as "the cordova code won't show the splash screen, period". I've been using Cordova inside a native app for the past year, and I hadn't seen any contention over the splash screen until the upgrade from 5.0.0 to 6.1.0. Of course I can fork the 6.1.0 code but I'd really like to avoid that for obvious reasons. Another approach I'd considered is subclassing |
yeah, I think this is a valid issue when using None of those existing preferences sound like they properly capture what you're actually trying to do here, so we might want to add a new one specific to this use case. |
Thanks, that would be a big help. Let me know if there's anything I can do to make this happen. |
I mentioned this issue in passing in a CDVViewController-leak bug report (920). Glad the issue is being addressed, guess I should have reported this as a separate issue. I have an ugly workaround that I'll use if a fix doesn't come out before I ship. Since "private" isn't really private in Objective-C, I exposed “launchView” which I replace in my subclassed ViewController “viewDidLoad”. |
When using CDVViewController via CordovaLib as a library, the app might already be loaded and not need to show the launch storyboard again. Rather than unconditionally showing the splashscreen until the webview content has loaded, make it initially invisible. Then in the project template, make it visible so that it continues working as expected for apps using the Cordova CLI. Closes apache#929.
When using CDVViewController via CordovaLib as a library, the app might already be loaded and not need to show the launch storyboard again. Rather than unconditionally showing the splashscreen until the webview content has loaded, make it initially invisible. Then in the project template, make it visible so that it continues working as expected for apps using the Cordova CLI. Closes #929.
Bug Report
Problem
According to the Cordova Splashscreen documentation, iOS apps should be able to disable the Cordova-provided launch splashscreen by setting SplashScreenDelay to 0 and FadeSplashScreenDuration to 0. As of 6.1.0, these settings no longer have that effect.
createLaunchView
inCDVViewController.m
does not inspect these settings before instantiating the launch storyboard.Reference:
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/index.html#launch-storyboard-images
5.1.x...6.1.x#diff-3d962b8f101cacedea7abce2ca246eac
Checklist
The text was updated successfully, but these errors were encountered: