When I am trying a React native project on the IOS simulator it works fine. But when try to Archive the project to upload to the App Store, Xcode throws an error saying
fatal error: module map file '/Users/MyMac/Library/Developer/Xcode/DerivedData/<coolapp>-gsdebkxdyslzmjaypmxjdztvchbl/Build/Intermediates.noindex/ArchiveIntermediates/coolapp/BuildProductsPath/Release-iphoneos/FBSDKCoreKit/FBSDKCoreKit.modulemap' not found
When it is clearly there in the project.
I have tried all the solutions posted on this GitHub thread, but none of those work.
https://github.com/facebook/react-native-fbsdk/issues/780
My Environment
react-native: 0.63.2
react-native-fbsdk: ^3.0.0
- Xcode 12.4 (12D4e)
Also tried on fbsdk 2.0.0
and code 11.0+ still the same issue.
Can anyone please help me.
3
Answers
It might help
I had similar issue because I was importing FBSDK at wrong place in AppDelegate.m
Point is you must import before
#ifdef FB_SONARKIT_ENABLED
Here is the correct way:By any chance you opened on Xcode .xcodeproj file instead of .xcworkspace file?