Skip to content

Commit

Permalink
Add debug network security config to allow http traffic.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
emiljoha committed Jan 12, 2020
1 parent f7c5f4e commit 35e7871
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain>
</domain-config>
</network-security-config>
1 change: 1 addition & 0 deletions mobile/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<!-- END OPTIONAL PERMISSIONS -->

<application
android:networkSecurityConfig="@xml/network_security_config"
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
Expand Down

0 comments on commit 35e7871

Please sign in to comment.