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

The Ultimate TensorFlow/Keras Cheat Sheet: How to Choose the Right Output Layer, Activation Function, Loss Function, and Label Mode

One of the most confusing topics for beginners in ...

Read more

My Code is My Future: How I Keep My PHP Clean and Powerful

In life, we often hear the phrase: “Don’t judg...

Read more

hitpath API: Read Affiliates 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 *