Skip to content

Commit 91e9d36

Browse files
committed
[futurepress#86] README: Cleartext traffic on Android
1 parent 339dca3 commit 91e9d36

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,21 @@ and [old][Old Architecture] RN architectures.
109109
- For **Android**:
110110
- In the `build.gradle` file set `minSdkVersion` equal `28`
111111
([SDK 28 — Android 9](https://developer.android.com/studio/releases/platforms#9.0),
112-
released in August 2018), or larger.
113-
112+
released in August 2018), or larger. \
114113
**Note:** _Support of older SDKs is technically possible, but it is not
115114
a priority now._
116115
116+
- Android SDK 28 and above
117+
[forbids Cleartext / Plaintext HTTP](https://developer.android.com/privacy-and-security/risks/cleartext)
118+
by default. Thus, to access locally running server over HTTP from within
119+
your app, you should either allow all uses of HTTP in your app by adding
120+
`android:usesCleartextTraffic="true"` attribute to `<application>` element
121+
in the `AndroidManifest.xml`
122+
([see how it is done in the example app](https://github.com/birdofpreyru/react-native-static-server/blob/master/example/android/app/src/main/AndroidManifest.xml));
123+
or alternatively you should use
124+
[network security configuration](https://developer.android.com/privacy-and-security/security-config)
125+
to permit cleartext HTTP for selected domains only.
126+
117127
- For **iOS**:
118128
- After installing the package, enter `ios` folder of the app's codebase
119129
and execute

0 commit comments

Comments
 (0)