Ionic app rejected from app store because it wouldn't load

I recently submitted my app to the Apple app store, but it was rejected…

Guideline 2.1 - Performance - App Completeness

We discovered one or more bugs in your app when reviewed on iPhone
running iOS 11.4.1 on Wi-Fi.

Upon launch, the activity indicator spins indefinitely

I’ve tested the app on multiple iPhones, from 6 to X and it works fine. It takes maybe 4-5 seconds to load past the splash screen, but that shouldn’t be a reason for rejection?

I did update my cordova-plugin-ionic-webview recently and I noticed that the launch became slower? My config.xml said I was on v ^1.1.16 but my package.json said I was on ^2.0.2, not sure if that is an issue? There’s also a v 2.1.3 out now…

But as I said, I have no idea what the problem could be as it works fine on my iPhones…

The important parts of my config.xml looks like this… not sure if it shows anything that might lead to the answer:

<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="30000" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="loadUrlTimeoutValue" value="60000" />
<preference name="target-device" value="handset" />

<platform name="ios">
    <allow-intent href="itms:*" />
    <allow-intent href="itms-apps:*" />
    ...icons/splashscreens
</platform>

<plugin name="cordova-plugin-device" spec="^2.0.1" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" />
<plugin name="cordova-sqlite-storage" spec="^2.2.1" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<allow-navigation href="http://192.168.9.77:8100" />
<allow-navigation href="http://192.168.1.27:8100" />
<allow-navigation href="http://192.168.1.5:8100" />
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
    <string>To connect you to your local university!</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
    <string>To let you upload images!</string>
</edit-config>
<plugin name="cordova-plugin-geolocation" spec="^4.11.0">
    <variable name="GEOLOCATION_USAGE_DESCRIPTION" value="To connect you to your local university!" />
</plugin>
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-firebase" spec="1.0.5" />
<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<plugin name="cordova-plugin-request-location-accuracy" spec="^2.2.3" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.2" />
<plugin name="cordova.plugins.diagnostic" spec="^4.0.8" />
<plugin name="cordova-plugin-google-analytics" spec="^1.8.6">
    <variable name="GMS_VERSION" value="16.0.3" />
</plugin>
<engine name="browser" spec="^5.0.4" />
<engine name="android" spec="^7.0.0" />
<engine name="ios" spec="^4.5.5" />

and since my <preference name="AutoHideSplashScreen" value="false" /> is false, in my app.component.ts file I have the following line of code that hides the splashscreen:

constructor(
public zone: NgZone,
private afAuth: AngularFireAuth,
public splashScreen: SplashScreen) {
this.afAuth.auth.onAuthStateChanged((user) => {
      this.zone.run(() => {
        if (user) {
          this.rootPage = HomePage
          this.splashScreen.hide();
        } else {
          this.rootPage = LoginPage
          this.splashScreen.hide();
          console.log("Not logged in")
        }
      });
    });
  }

Is there any clue in here why this might not be working? Thank you!

If you can’t reproduce the problem, start with the basics: What is your ionic info output?

@Sujan12 thanks for the reply.

My ionic info is:


$ ionic info

Ionic:

   ionic (Ionic CLI)  : 4.0.2 (C:\Users\Simon K\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0, browser 5.0.4, ios 4.5.5

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v8.11.2 (C:\Program Files\nodejs\node.exe)
   npm               : 2.15.12
   OS                : Windows 10

Environment:

   ANDROID_HOME : C:\Users\Simon K\AppData\Local\Android\Sdk

Does that look about right?

You should upgrade cordova-android, but that doesn’t seem relevant here. Otherwise looks fine.

Have you solved the issue? I have similar rejection reason