ionic-team / ionic-team/ionic-cli

cordova not available when running on iPad OS on livereload

未关闭
#4,714 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
triage
主要语言
TypeScript
星标
2k
派生
682
PR 合并指标
30 天内没有已合并 PR

描述

**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:**

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。