Skip to content

Instantly share code, notes, and snippets.

@rudolfolah
Created July 16, 2024 03:08
Show Gist options
  • Save rudolfolah/c4d507c03c071f7355db675c9649e896 to your computer and use it in GitHub Desktop.
Save rudolfolah/c4d507c03c071f7355db675c9649e896 to your computer and use it in GitHub Desktop.
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