react-native-file-logger
react-native-file-logger copied to clipboard
Expo standalone build fails - MFMailComposeViewController symbol not found
I'm using Expo on react-native version 0.72.3 and it fails creating a standalone build for the device (iOS)... Has anyone encountered this?
This is the output from where it fails after running: npx expo run:ios --device
❌ Undefined symbols for architecture arm64 ┌─ Symbol: OBJC_CLASS$_MFMailComposeViewController └─ Referenced from: objc-class-ref in RNFileLogger(FileLogger.o)
❌ ld: symbol(s) not found for architecture arm64
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-debug' from project 'Pods') Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods') Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods') Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-utils' from project 'Pods') Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-runtimescheduler' from project 'Pods') Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ReactCommon' from project 'Pods') no rule to process file '/Users/willryan/Development/RapidTapping/rapid-tapping-expo-app/node_modules/react-native-agora-chat/native_src/objc/README.md' of type 'net.daringfireball.markdown' for architecture 'arm64' (in target 'react-native-chat-sdk' from project 'Pods') Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods') Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods') Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXUpdates' from project 'Pods') Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RapidTapping' from project 'RapidTapping') Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RapidTapping' from project 'RapidTapping') Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RapidTapping' from project 'RapidTapping') › 3 error(s), and 14 warning(s)
CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
I was also seeing this error, using the following setup:
- React Native 0.72.0
- Xcode 15
- No Expo
I solved it in Xcode by adding MessageUI to the project's 'Frameworks' folder.
In the Frameworks folder, right-click an existing Framework (i.e. JavascriptCore), and select 'Show in Finder'. Then locate the MessageUI.framework folder, and drag it into the Framework folder in Xcode.
Hello, I just updated the example app and it is working fine with react-native 0.72.6 and XCode 15.0.1. Please let me know if you reproduce the error with the example app.
Hello ! Nice catch, it seems that the library was not properly linked with MessageUI system framework, as @andygphillips pointed out.
I've updated the podspec file and landed the fix in thev.0.5.2
Please try the last version let me know if it is working for you now !