ionic-team / ionic-team/ionic-cli

cordova not available when running on iPad OS on livereload

Đang mở
#4,714 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.