Created
July 16, 2024 03:08
-
-
Save rudolfolah/c4d507c03c071f7355db675c9649e896 to your computer and use it in GitHub Desktop.
custom android manifest https://github.com/expo/expo/pull/23415/files#diff-5742c09b06ac215103bec3164608e1e337e95ca94764eb5de8f03505eb9425a6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { withAndroidManifest } = require('@expo/config-plugins'); | |
const withCustomAndroidManifest = (config) => { | |
return withAndroidManifest(config, async (config) => { | |
const androidManifest = config.modResults; | |
const applicationElement = config.modResults.manifest.application; | |
// see: https://github.com/expo/expo/pull/23415/files#diff-5742c09b06ac215103bec3164608e1e337e95ca94764eb5de8f03505eb9425a6 | |
applicationElement['meta-data'] = applicationElement['meta-data'] || []; | |
applicationElement['meta-data'].push({ | |
$: { | |
'android:name': 'com.facebook.soloader.enabled', | |
'android:value': 'true', | |
'tools:replace': 'android:value' | |
} | |
}); | |
androidManifest.manifest.$['xmlns:tools'] = androidManifest.manifest.$['xmlns:tools'] || 'http://schemas.android.com/tools'; | |
return config; | |
}); | |
} | |
module.exports = withCustomAndroidManifest; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment