about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-12-12 15:40:24 -0600
committerGitHub <noreply@github.com>2023-12-12 13:40:24 -0800
commita5e25a7a16cdcde64628e942c073a119bc1d7a1e (patch)
tree3d56863a0820f5448434d8d8ac93b50dd38afb7f
parentbc427472971e936637cb650f44443ea3ae25a721 (diff)
downloadvoidsky-a5e25a7a16cdcde64628e942c073a119bc1d7a1e.tar.zst
Add largeHeap to AndroidManifest.xml (#2191)
-rw-r--r--app.config.js1
-rw-r--r--plugins/withAndroidManifestPlugin.js14
2 files changed, 15 insertions, 0 deletions
diff --git a/app.config.js b/app.config.js
index 181a67c46..e4606de6c 100644
--- a/app.config.js
+++ b/app.config.js
@@ -121,6 +121,7 @@ module.exports = function () {
             username: 'blueskysocial',
           },
         ],
+        './plugins/withAndroidManifestPlugin.js',
       ].filter(Boolean),
       extra: {
         eas: {
diff --git a/plugins/withAndroidManifestPlugin.js b/plugins/withAndroidManifestPlugin.js
new file mode 100644
index 000000000..55fd3f5ca
--- /dev/null
+++ b/plugins/withAndroidManifestPlugin.js
@@ -0,0 +1,14 @@
+const {withAndroidManifest} = require('expo/config-plugins')
+
+module.exports = function withAndroidManifestPlugin(appConfig) {
+  return withAndroidManifest(appConfig, function (decoratedAppConfig) {
+    try {
+      decoratedAppConfig.modResults.manifest.application[0].$[
+        'android:largeHeap'
+      ] = 'true'
+    } catch (e) {
+      console.error(`withAndroidManifestPlugin failed`, e)
+    }
+    return decoratedAppConfig
+  })
+}