A colleague has given me a Flutter project to try to build the app in iOS (I use a Mac, we both use Android Studio). Everything is ok except for this error:
Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: ok(handshake.cc:363))
If I use HTTP instead of HTTPS it works obviously. My colleague said he solved by adding this line of code:
client.badCertificateCallback = (X509Certificate cert, String host, int port) => true;
This line of code is also in my project because the source is the same. So why does it work on Android, but not on iOS?