EDIT: Expand old answer about writing your old config plugin
For this sort of thing, you need a config plugin.
Here’s one I wrote a while ago:
But with Expo SDK >= 47 you should change this:
const { withAndroidManifest } = require("@expo/config-plugins");
to this:
const { withAndroidManifest } = require("expo/config-plugins");
Then, you use it something like this:
Except, in your case you’d want true
instead of false
.
These days you can do this in BuildProperties:
For iOS, you’d need something like this:
And you can add the Info.plist
changes to app.json
. Something like this (based on the above answer. I haven’t tested it):
{
"expo": {
"ios": {
"infoPlist": {
"NSAppTransportSecurity": {
"NSExceptionDomains": {
"example.com": {
// Include to allow subdomains
"NSIncludesSubdomains": true,
// Include to allow HTTP requests
"NSTemporaryExceptionAllowsInsecureHTTPLoads": true,
// Include to specify minimum TLS version
"NSTemporaryExceptionMinimumTLSVersion": "TLSv1.1"
}
}
}
}
}
}
}