I'm trying to retrieve some data from server, using ionic 4, the app actually works fine on browser but when I use a real device it doesnt work, after hours searching on the internet, I found a solution that I have to install a Cordoba pluging called cordova-plugin-whitelist,when I added this plugin the app worked fine on android device but not is IOS device, I checked capacitor DOC, then I found that I have to run this command :
ionic cap sync
after thise commande is executed,I got this message :
> 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 ?
cordova-plugin-whitelist
doesn't support iOS (because it's not needed). The message might be a bit missleading.
Just check the plugin code, it doesn't have an iOS folder
https://github.com/apache/cordova-plugin-whitelist/tree/master/src