我试图使用ionic 4从服务器中检索一些数据,该应用程序实际上在浏览器上可以正常工作,但是当我使用真实设备无法正常工作时,经过数小时的互联网搜索,我找到了一个解决方案安装名为Cordova-plugin-whitelist的Cordoba插件,当我添加此插件时,该应用程序在android设备上运行正常,但不是IOS设备,我检查了电容DOC,然后发现我必须运行以下命令:
ionic cap sync
执行此命令后,我收到此消息:
> 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 ?
答案 0 :(得分:0)
cordova-plugin-whitelist
不支持iOS(因为不需要)。该消息可能会有点误导。
只需检查插件代码,它没有iOS文件夹
https://github.com/apache/cordova-plugin-whitelist/tree/master/src