Skip to content
Permalink
Browse files

improve Android Network Security config (#23429)

Summary:
This PR is trying to improve Android Network Security configuration introduced in 84572c4. I found that Android merges all manifest files into a single manifest file when building an app, so this PR provides AndroidManifest.xml with network security config in debug folder, that will be used only for debug builds. Also the network security configuration will be applied to only app that target API 28. Moved security config file to xml-v28, so that it'll only visible to API 28 and above.

See https://developer.android.com/studio/build/manifest-merge

[Android] [Changed] -  Android Network Security configuration.
Pull Request resolved: #23429

Differential Revision: D14065124

Pulled By: cpojer

fbshipit-source-id: 0f5ac5addbe968ed7e5cb57f356e2572de2690a8
  • Loading branch information...
dulmandakh authored and grabbou committed Feb 13, 2019
1 parent e6d8ac8 commit 724d83a966dda7bb4d74a07270e94987c5d174e7
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:networkSecurityConfig="@xml/react_native_config" />
</manifest>
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.helloworld">

<uses-permission android:name="android.permission.INTERNET" />
@@ -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">
<activity
android:name=".MainActivity"
android:label="@string/app_name"

This file was deleted.

Oops, something went wrong.

0 comments on commit 724d83a

Please sign in to comment.
You can’t perform that action at this time.