1

我正在尝试使用 ionic 4 从服务器检索一些数据,该应用程序实际上在浏览器上运行良好,但是当我使用真实设备时它不起作用,在互联网上搜索数小时后,我找到了一个我必须安装的解决方案Cordoba 插件称为 cordova-plugin-whitelist,当我添加这个插件时,应用程序在 android 设备上运行良好,但不是 IOS 设备,我检查了电容器 DOC,然后我发现我必须运行这个命令:

ionic cap sync

执行 thise 命令后,我收到此消息:

> capacitor add ios
✔ Installing iOS dependencies in 13.50s
✔ Adding native xcode project in: /Users/assenaneyoussef/Documents/Projects/Mobile_Projects/Test/ios in 103.53ms
✔ add in 13.61s
✔ Copying web assets from www to ios/App/public in 801.08ms
✔ Copying native bridge in 7.42ms
✔ Copying capacitor.config.json in 1.46ms
✔ copy in 868.93ms
✔ Updating iOS plugins in 8.30ms
  Found 0 Capacitor plugins for ios:
✔ Updating iOS native dependencies in 13.43s
  Found 1 incompatible Cordova plugin for ios, skipped install
    cordova-plugin-whitelist (1.3.3)
✔ update ios in 13.47s

Now you can run npx cap open ios to launch Xcode
> capacitor sync ios
✔ Copying web assets from www to ios/App/public in 977.67ms
✔ Copying native bridge in 5.90ms
✔ Copying capacitor.config.json in 2.00ms
✔ copy in 1.12s
✔ Updating iOS plugins in 4.85ms
  Found 0 Capacitor plugins for ios:
✔ Updating iOS native dependencies in 5.34s
  Found 1 incompatible Cordova plugin for ios, skipped install
    cordova-plugin-whitelist (1.3.3)
✔ update ios in 5.36s
Sync finished in 6.534s
```
if you noticed on the bottom of the message you'll finde a wierd message:
Found 1 incompatible Cordova plugin for ios, skipped install, is that normal ?
4

1 回答 1

0

cordova-plugin-whitelist不支持 iOS(因为不需要它)。该消息可能有点误导。只需检查插件代码,它没有 iOS 文件夹 https://github.com/apache/cordova-plugin-whitelist/tree/master/src

于 2019-05-24T08:37:03.787 回答