I am developing a flutter project called ZTutor. While testing in Android my login was not working, my app was sending data to localhost, which is my local pc. My localhost url was http://192.168.0.105/ztutor/login.php but that url was not receiving any request from the App.
So, I changed in the android/app/src/main/AndroidManifest.xml:
I have added this below text:
————————————————————————–
<application android:usesCleartextTraffic=”true”/>
————————————————————————–
For IOS, we need to add it in ios/Runner/Info.plist file:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Now my app is happily connecting with localhost, once the app is ready, I will set real domain that is with https.
I have found the help from this url: https://flutter.dev/docs/release/breaking-changes/network-policy-ios-android
There are 0 comments