ionic-team / ionic-team/ionic-cli

cordova not available when running on iPad OS on livereload

Abierto
#4,714 0 comentarios 1 reacción 0 asignados Ver en GitHub
triage
Lenguaje dominante
TypeScript
Estrellas
2k
Forks
682
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Description:**

I am trying to debug my app written in Ionic 3 on an iPad. The app is an universal app. Whenever I tried running the app in livereload, it will be stuck at the splash screen with error message indicating cordova is not available.

The logs
```
console.warn: Ionic Native: tried calling StatusBar.backgroundColorByHexString, but Cordova is not
[npm] available. Make sure to a) run in a real device or simulator and b) include cordova.js in your index.html
[npm] [09:42:54] console.warn: Ionic Native: tried calling SplashScreen.hide, but Cordova is not available. Make sure to a)
[npm] run in a real device or simulator and b) include cordova.js in your index.html
```

I have double checked and `` is in my `index.html`

However, it works fine with livereload on an iPhone simulator

If I turn off livereload however, all my css will disappear, my app ends up looking like this
![Simulator Screen Shot - iPad Pro (12 9-inch) (5th generation) - 2021-06-09 at 09 34 17](https://user-images.githubusercontent.com/5347725/121278953-3f110980-c906-11eb-9ecc-5b6e2b6c1d1a.png)

**Steps to Reproduce:**

1. Run command `ionic cordova run ios -c -l --buildConfig=_build.json --target=xxx` <-- target is iPad

**Output:**

**My `ionic info`:**

```
Ionic:

Ionic CLI : 5.2.3
Ionic Framework : ionic-angular 3.9.10
@ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : ios 6.2.0
Cordova Plugins : cordova-plugin-ionic-webview 5.0.0, (and 32 other plugins)

Utility:

cordova-res : not installed
native-run : 1.3.0 (update available: 1.4.0)

System:

Android SDK Tools : 26.1.1 (/Users/kelokchan/Library/Android/sdk)
ios-sim : 8.0.2
NodeJS : v12.22.1 (/Users/kelokchan/.nvm/versions/node/v12.22.1/bin/node)
npm : 6.14.12
OS : macOS Big Sur
Xcode : Xcode 12.5 Build version 12E262
```

**Other Information:**

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.