ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
192 stars 187 forks source link

Splashscreen issue with cordova iOS 4.4.0 (Takes too long to disappear) #289

Open jgw96 opened 7 years ago

jgw96 commented 7 years ago

From @Sletheren on July 20, 2017 16:4

Hello , I have been struggling with the splashscreen plugin to get it to work, I have made several apps before and haven't had any problem setting up the splashscreen thing. But this time it took me 5 days so far without being able to know what is the problem, The app is working flawlessly on Android, but not on iOS

The splashscreen is stuck until 1 minute and some seconds...then the view shows up I've basically read every post that contains "splashscreen with ionic" on the internet.

I've tried:

But nothing seems to work! :confused: Also I tried to debug the app so I included an alert inside the .run function but the alert doesn't show until the next page is shown.

I really need help here! Thanks everyone.

My config.xml

<content src="index.html"/>
  <access origin="*"/>
  <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="android-minSdkVersion" value="14"/>
  <preference name="BackupWebStorage" value="none"/>

  <preference name="SplashScreen" value="screen"/>
  <preference name="AutoHideSplashScreen" value="0"/>
  <preference name="FadeSplashScreen" value="false"/>
  <preference name="ShowSplashScreenSpinner" value="false"/>
  <preference name="SplashScreenDelay" value="1000"/>
  <preference name="SplashShowOnlyFirstTime" value="false"/>
  <preference name="FadeSplashScreenDuration" value="1000"/>

  <preference name="orientation" value="portrait"/>
  <preference name="fullscreen" value="false"/>

  <preference name="android-windowSoftInputMode" value="adjustPan|stateAlwaysHidden"/>
  <preference name="KeyboardDisplayRequiresUserAction" value="true"/>

My ready function inside app.js

$ionicPlatform.ready(function () {
        ionic.Platform.isFullScreen = true;
        $rootScope.baseURL = baseURL;
        $timeout(function() {
            navigator.splashscreen.hide();
        }, 1000);

        if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
            cordova.plugins.Keyboard.disableScroll(true);
        }
        if (window.StatusBar) {
            StatusBar.styleDefault();
        }
});

Copied from original issue: ionic-team/ionic#12425

Sletheren commented 7 years ago

Finally solved it, for anyone who's encountering this problem

rof20004 commented 6 years ago

Add this what?