Closed adblanc closed 7 months ago
Hi,
When building the example app on my mac m1, I get the following error :
6 | */ 7 | > 8 | import ExpoModulesCore | ^ could not find module 'ExpoModulesCore' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator
I need to manually remove "arm64" in the project excluded architectures done in
setExcludedArchitectures
by the plugin.Steps to reproduce :
yarn ios
in example app
Hi @adblanc, you can use this patch i made with patch-package, and rebuild your app with expo prebuild
diff --git a/node_modules/@morrowdigital/watermelondb-expo-plugin/build/withWatermelon.js b/node_modules/@morrowdigital/watermelondb-expo-plugin/build/withWatermelon.js
index 4b6fbdc..5187275 100644
--- a/node_modules/@morrowdigital/watermelondb-expo-plugin/build/withWatermelon.js
+++ b/node_modules/@morrowdigital/watermelondb-expo-plugin/build/withWatermelon.js
@@ -98,7 +98,14 @@ const withCocoaPods = (config) => {
pod 'WatermelonDB', :path => '../node_modules/@nozbe/watermelondb'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi', :modular_headers => true
pod 'simdjson', path: '../node_modules/@nozbe/simdjson', :modular_headers => true\n\n `;
- await fs.writeFile(filePath, slicedContent.join(patchKey));
+ const newContent = slicedContent.join(patchKey);
+ await fs.writeFile(filePath, newContent);
+ const postPatchKey = "target_installation_result.resource_bundle_targets.each do |resource_bundle_target|";
+ const postPatchSlicedContent = newContent.split(postPatchKey);
+ postPatchSlicedContent[0] += `target_installation_result.native_target.build_configurations.each do |config|
+ config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
+ end\n `;
+ await fs.writeFile(filePath, postPatchSlicedContent.join(postPatchKey));
}
else {
throw new Error("Please make sure you have watermelondb installed");
removing amr64 in Excluded architecture(EXCLUDED_ARCHS) fixed the issue for me
Closing as it was dealt with in version 2.3.1 https://github.com/morrowdigital/watermelondb-expo-plugin/pull/33
Hi,
When building the example app on my mac m1, I get the following error :
I need to manually remove "arm64" in the project excluded architectures done in
setExcludedArchitectures
by the plugin.Steps to reproduce :
yarn ios
in example app