From 696dfbec612019adb1ba87a23d19348597dfc7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Mon, 14 Sep 2020 19:50:29 +0200 Subject: [PATCH] [xdl] Add expo-random to SDK39+ iOS shell apps (#2640) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Random screen currently soft crashes the standalone iOS apps on SDK39 and for a good reason — `expo-random` native module is not included. --- packages/xdl/src/detach/IosPodsTools.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/xdl/src/detach/IosPodsTools.js b/packages/xdl/src/detach/IosPodsTools.js index a5e30248a7..48b479ebb8 100644 --- a/packages/xdl/src/detach/IosPodsTools.js +++ b/packages/xdl/src/detach/IosPodsTools.js @@ -422,6 +422,11 @@ function _renderUnversionedUniversalModulesDependencies( excludedUnimodules.push('expo-splash-screen', 'expo-updates'); } + const expoModulesThatAreNotUnimodules = []; + if (sdkMajorVersion >= 39) { + expoModulesThatAreNotUnimodules.push(`pod 'EXRandom', path: '../packages/expo-random/ios'`); + } + return indentString( ` # Install unimodules @@ -431,7 +436,11 @@ use_unimodules!( exclude: [ ${excludedUnimodules.map(module => `'${module}'`).join(',\n ')} ], -)`, +) + +# Expo modules that are not unimodules +${expoModulesThatAreNotUnimodules.join('\n')} +`, 2 ); } else {