Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 35e7871

Browse files
committed
Add debug network security config to allow http traffic.
Android api level 28+ seems to not allow http traffic by default. This breaks react-native debugging that relies on fetching artifacts over http for quick iteration. See react native github isse facebook/react-native#22375 for more details.
1 parent f7c5f4e commit 35e7871

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<network-security-config>
3+
<domain-config cleartextTrafficPermitted="true">
4+
<domain includeSubdomains="true">localhost</domain>
5+
</domain-config>
6+
</network-security-config>

mobile/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<!-- END OPTIONAL PERMISSIONS -->
1919

2020
<application
21+
android:networkSecurityConfig="@xml/network_security_config"
2122
android:name=".MainApplication"
2223
android:label="@string/app_name"
2324
android:icon="@mipmap/ic_launcher"

0 commit comments

Comments
 (0)