From dae7a80b725f40f1f7e7b0759e9863e431f0a507 Mon Sep 17 00:00:00 2001 From: Dulmandakh Date: Wed, 13 Feb 2019 21:18:31 +0800 Subject: [PATCH 1/2] improve android network security config --- template/android/app/src/debug/AndroidManifest.xml | 5 +++++ .../res/{xml => xml-v24}/network_security_config.xml | 0 template/android/app/src/main/AndroidManifest.xml | 5 +---- .../app/src/release/res/xml/network_security_config.xml | 8 -------- 4 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 template/android/app/src/debug/AndroidManifest.xml rename template/android/app/src/debug/res/{xml => xml-v24}/network_security_config.xml (100%) delete mode 100644 template/android/app/src/release/res/xml/network_security_config.xml diff --git a/template/android/app/src/debug/AndroidManifest.xml b/template/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000000000..f3bc056c8f2938 --- /dev/null +++ b/template/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/template/android/app/src/debug/res/xml/network_security_config.xml b/template/android/app/src/debug/res/xml-v24/network_security_config.xml similarity index 100% rename from template/android/app/src/debug/res/xml/network_security_config.xml rename to template/android/app/src/debug/res/xml-v24/network_security_config.xml diff --git a/template/android/app/src/main/AndroidManifest.xml b/template/android/app/src/main/AndroidManifest.xml index 1b0c20ef328804..e5e6330fbdf64d 100644 --- a/template/android/app/src/main/AndroidManifest.xml +++ b/template/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ @@ -11,9 +10,7 @@ android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" - android:theme="@style/AppTheme" - android:networkSecurityConfig="@xml/network_security_config" - tools:ignore="GoogleAppIndexingWarning,UnusedAttribute"> + android:theme="@style/AppTheme"> - - - localhost - 10.0.2.2 - 10.0.3.2 - - From 4908b5f1af0289be59277206b4a0bdc68cca10ca Mon Sep 17 00:00:00 2001 From: Dulmandakh Date: Wed, 13 Feb 2019 21:37:47 +0800 Subject: [PATCH 2/2] descriptive name for network security config: react_native_config.xml --- template/android/app/src/debug/AndroidManifest.xml | 2 +- .../react_native_config.xml} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename template/android/app/src/debug/res/{xml-v24/network_security_config.xml => xml-v28/react_native_config.xml} (100%) diff --git a/template/android/app/src/debug/AndroidManifest.xml b/template/android/app/src/debug/AndroidManifest.xml index f3bc056c8f2938..1fce564881ff37 100644 --- a/template/android/app/src/debug/AndroidManifest.xml +++ b/template/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/template/android/app/src/debug/res/xml-v24/network_security_config.xml b/template/android/app/src/debug/res/xml-v28/react_native_config.xml similarity index 100% rename from template/android/app/src/debug/res/xml-v24/network_security_config.xml rename to template/android/app/src/debug/res/xml-v28/react_native_config.xml