Files
t3code/apps/mobile/plugins/withAndroidCleartextTraffic.cjs
Julius Marminge 702c752e3d Adopt expo-router for mobile remote navigation
- Rework the mobile app shell into route-based screens
- Add connection, new task, and thread routes with shared state
- Restore Android cleartext support via config plugin
2026-04-13 14:44:01 -07:00

19 lines
559 B
JavaScript

const { withAndroidManifest } = require("expo/config-plugins");
module.exports = function withAndroidCleartextTraffic(config) {
return withAndroidManifest(config, (nextConfig) => {
const application = nextConfig.modResults.manifest.application?.[0];
if (application == null) {
throw new Error(
"AndroidManifest.xml is missing the application element required for cleartext traffic configuration.",
);
}
application.$ ??= {};
application.$["android:usesCleartextTraffic"] = "true";
return nextConfig;
});
};