Flutter Programming
Flutter Project: Insecure URL is not working in Android / IOS
April 14, 2021
0
, , , ,

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

About author

ZERIN

CEO & Founder (BdBooking.com - Online Hotel Booking System), CEO & Founder (TaskGum.com - Task Managment Software), CEO & Founder (InnKeyPro.com - Hotel ERP), Software Engineer & Solution Architect

hitpath API: Read Affiliates Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

hitpath API: Read Campaigns Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

hitpath API: Read Advertisers Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

There are 0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *