Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FBSDKCoreKit/FBSDKCoreKit.modulemap' not found while trying to Archive a react native project on XCODE

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.

like image 588
user7747472 Avatar asked Feb 07 '21 16:02

user7747472


People also ask

Why can't I get Facebook SDK to work with Xcode?

If you're working on windows/unity and then transferring your build to mac/xcode to build and having this problem with facebook sdk try: - Make sure everything is ticked, and in the dropdown select "Add cocoapods to the xcode project (important). by default its set to workspace not project (this was the issue for mine).

How to add CocoaPods to Xcode project?

- Make sure everything is ticked, and in the dropdown select "Add cocoapods to the xcode project (important). by default its set to workspace not project (this was the issue for mine). - install pod then open the "workspace" that's generated and build from there.

Is the Facebook SDK issue on GitHub closed?

Still this is quite strange, the Facebook GitHub issues are closed but this still need to be fixed manually by changing the dependencies file. At least from Unity, and I'm using the last Facebook sdk 7.18-2.1 launched in February which change log says this problem is fixed. aSayinAzerion likes this.


1 Answers

  1. make sure you open the .xcworkspace file and not .xcproject
  2. make sure all min iOS versions are the same across your Target, Project and Podfile
  3. clean project and rebuild

It might help

like image 171
YaNuSH Avatar answered Oct 26 '22 00:10

YaNuSH