Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ For instance, if you put your XML configuration under
your manifest would contain the following:

```xml
<application ...>
<application android:networkSecurityConfig="@xml/network_security_config">
...
<meta-data android:name="io.flutter.network-policy"
android:resource="@xml/network_security_config"/>
Expand All @@ -77,7 +77,19 @@ If you would like to allow HTTP connections for Android debug
builds, you can add the following snippet to your $project_path\android\app\src\debug\AndroidManifest.xml:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
builds, you can add the following snippet to your $project_path\android\app\src\debug\AndroidManifest.xml:
builds, you can add the following snippet to your
`<project_path>\android\app\src\debug\AndroidManifest.xml`:


```xml
<application android:usesCleartextTraffic="true"/>
<application android:networkSecurityConfig="@xml/network_security_config">
...
<meta-data android:name="io.flutter.network-policy"
android:resource="@xml/network_security_config"/>
</application>
```

Then, add the network configuration to your $project_path/android/app/src/debug/res/xml/network_security_config.xml:
```xml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```xml
Then, add the network configuration to your
`<project_path>/android/app/src/debug/res/xml/network_security_config.xml`:
```xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>
```

For iOS, you can follow [these instructions](/add-to-app/ios/project-setup/?tab=embed-using-cocoapods#set-local-network-privacy-permissions) to create a `Info-debug.plist` and put this in:
Expand Down
Loading