Skip to content
This repository was archived by the owner on Apr 2, 2021. It is now read-only.

FBSDKCoreKit/FBSDKCoreKit.modulemap' not found #780

Open
sudeepjainn opened this issue Jul 22, 2020 · 39 comments
Open

FBSDKCoreKit/FBSDKCoreKit.modulemap' not found #780

sudeepjainn opened this issue Jul 22, 2020 · 39 comments

Comments

@sudeepjainn
Copy link

FBSDKCoreKit.modulemap' not found

I am creating a IOS build but i am getting an error:fatal error: module map file '/Users/pmarshall/Library/Developer/Xcode/DerivedData/tvderby_app-ctaepyojeedweaeatsjuuzaicdaj/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/FBSDKCoreKit.modulemap' not found

1 error generated.

I updated POD and Imported

#ifdef BUCK

#import <FBSDKCoreKit/FBSDKCoreKit.h>

#else

u/import FBSDKCoreKit;

#endif

but still getting same error. Anyone have any solution for this.how can I solve this issue????

@belgamo
Copy link

belgamo commented Jul 28, 2020

I have the same issue but it works on the simulator. I'm using xcode 11.5. Any solution?

@vlanemcev
Copy link

same problem (((

@vlanemcev
Copy link

@sudeepjainn do you resolve this issues?

@winstromming
Copy link

I was able to solve by doing imports in my AppDelegate.m file:

#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import <FBSDKShareKit/FBSDKShareKit.h>

Podfile has these lines:

  pod 'FBSDKCoreKit', :modular_headers => true
  pod 'FBSDKLoginKit', :modular_headers => true
  pod 'FBSDKShareKit', :modular_headers => true

Which then threw up some Swift errors, which I solved by following these instructions: mxcl/PromiseKit#1059 (comment)

@cefalo-chanchal
Copy link

I am getting the same error. using Xcode 11.6 (11E708), react-native 0.63.0 and react-native-fbsdk 2.0.0

@cefalo-chanchal
Copy link

@vassilmladenov @belgamo By any chance you opened on Xcode .xcodeproj file instead of .xcworkspace file?

@oularrea
Copy link

Any solutions for this issue?

@BogdanRad
Copy link

@oularrea do you resolve this problem?

@BogdanRad
Copy link

BogdanRad commented Aug 28, 2020

Hey @janicduplessis, do you know how can i fix this problem ? :( on emulator is ok, the problem is when i try to run from xCode on release
image

@oularrea
Copy link

Yes, in my case I get the error when I update the ios sdk to 11.0 and just when I compiled to release, but in the end I solved in the xcode putting the target to 11 as before I had it in 9.0

@joaom182
Copy link

joaom182 commented Sep 19, 2020

Same issue here.

Steps to reproduce:

npx react-native init fbsdkexample
cd fbsdkexample
yarn add react-native-fbsdk
cd ios && pod install && cd ../
npx react-native run-ios

@joaom182
Copy link

@sudeepjainn have you tried to build your project with XCode instead of react-native-cli?

@davichoso
Copy link

same issue with xcode Version 12.0

@davichoso
Copy link

I had to downgrade xcode to make it work with xcode Version 11.7 (11E801a)
the problem for me was xcode 12 I think is a problem related to cocoapods
https://developer.apple.com/forums/thread/660864

@diogoaltoe
Copy link

diogoaltoe commented Sep 28, 2020

Same issue here.
I tried everything that was mentioned above, including the suggestions on this thread (facebook/react-native#28503), but so far without success ...
I am 4 days trying to solve this problem and nothing yet.

I'm using: Xcode 11.7 and React Native: 0.63.2.

@diogoaltoe
Copy link

diogoaltoe commented Sep 29, 2020

I build the app.

I don't know exactly which change is responsible for making it work, but I will list what I did.

  1. I removed Xcode 12 completely, according to this thread: https://stackoverflow.com/questions/31011062/how-to-completely-uninstall-xcode-and-clear-all-settings (I used the second answer).
  2. And I installed Xcode 11.7.
  3. In Xcode, I went to File > Workspace Settings, and change Build System to Legacy Build System (in both option, "Shared Workspace Settings" and "Per-User Workspace Settings").
  4. So I received a different error and resolved it according to this thread: https://stackoverflow.com/questions/55361057/this-copy-of-libswiftcore-dylib-requires-an-os-version-prior-to-12-2-0

PS.: Remember when your project builds, go to "Show the Issue navigator" and click on the Warning that says something like: "change/migrate to Swift 5".

Now I am trying to solve some errors when the application loads in the simulator.
I am getting the following error in React Native: "Unhandled JS Exception: Invariant Violation: Native module cannot be null."

The saga continues ...

@benoitvallon
Copy link

I went through many Xcode upgrades (12.2 Beta) and downgrades (11.7) for half a day and then I restarted my computer for a completely different reason and it worked (with Xcode 12)... Hope it can help some of you

@zxcpoiu
Copy link

zxcpoiu commented Sep 30, 2020

I'm trying to build on RN 63.3 + xcode 12 and encounter the same issue. ( Debug-IPhone/FBSDKCoreKit/FBSDKCoreKit.modulemap' not found )

To me, I believe it's an xcode 12 issue.
I could successfully build from xcode directly, but have this issue if I use xcodebuild or react-native run-iosfrom terminal command line.

My whole process to make it work are like below:

  1. follow After updating to Xcode 12 I get The linked library 'libPods-*****.a' is missing one or more architectures required by this target: arm64. facebook/react-native#29984, which redirect to a link: https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-object-file-built-for-ios
    to exclude arm64 arch. I just add the simple one like this: https://stackoverflow.com/a/63622570/5436231 rather than the accepted answer.

  2. Since I just upgraded to xcode 12, so make sure system using correct executable.
    on terminal sudo xcode-select --switch /Applications/Xcode.app
    ( from: xcode 11.4 build fatal error: module map file xxx/Build/Products/Debug-iphoneos/YogaKit/YogaKit.modulemap' not found facebook/react-native#28503 (comment) )

  3. clear all installed pods. rm -rf ios/Pods, rm ios/Podfile.lock

  4. make sure you have matching deployment ios target both in xcode and Podfile, like 9.0 or 10.0 or 11.0, but should match.
    I personally using 10.0.

  5. close everything and restart/reboot mac, to make sure system does not have any cache issue.

  6. after reboot, cd ios; pod repo update; pod install;

Then the xcodebuildworked. ( I'm not using lagacy build system, I'm using the default modern build system both for xcode and xcodebuild )

hope it helps someone.

@cylim
Copy link

cylim commented Oct 8, 2020

I was having the same issues with Xcode 12.

I got lucky by upgrade my .xcodeproj with the warning update to recommended settings, then it works.

@pierre-fribourg-context

@sudeepjainn have you tried to build your project with XCode instead of react-native-cli?

I did this, and I have this issue also now

@owenr88
Copy link

owenr88 commented Oct 12, 2020

I managed to solve this issue in the end (RN 0.63.3) by including the below in the Podfile and installing. I'm sure there's a better way to do it (like this by @winstromming), but it worked for now!

  pod 'FBSDKCoreKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :tag => 'v7.1.1'
  pod 'FBSDKLoginKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :tag => 'v7.1.1'
  pod 'FBSDKShareKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :tag => 'v7.1.1'

And then changing the location to 'Relative to Workspace' in Xcode as below. This included the .modulemap file as needed when archiving.

Screenshot 2020-10-12 at 13 35 12

@ahtisham09
Copy link

I tried all solution but still same error

My Environment
Xcode 12 react native 0.63 fbsdk 2.0.0

@nahuelb
Copy link

nahuelb commented Oct 21, 2020

Similar to @oularrea, recently upgraded the IOS deployment target to 11.0 and started getting this error, I realized I forgot to change the IOS target also on the Project Deployment Target, that solved the issue.
Screen Shot 2020-10-20 at 23 10 42
Check that you have the same IOS target on the Podfile, Target and Project.

Before realizing I had that target mismatch I tried downgrading the npm package from 2.0.0 to 1.1.2, that also fixed the issue.
yarn add react-native-fbsdk@1.1.2 & rm -rf ios/Pods & cd ios & pod install

@duspada
Copy link

duspada commented Nov 19, 2020

didn't make it work here... tried every solutions here...

@arjunkomath
Copy link

Adding arm64 to excluded architectures (for both project and Pods build settings) fixed the issue for me.

Screen Shot 2020-11-21 at 10 01 04 pm

@sanguineman91
Copy link

sanguineman91 commented Dec 8, 2020

Please someone solve this problem thanks very much

@samparmenter
Copy link

Fixed using @nahuelb suggestion above. Any deployment target under 11 was failing but 11 fixed the issue for me and allowed me to archive for a release.

@aryanagarwal15
Copy link

Stuck on this as well. Requesting maintainers to address this issue.

@shawwal
Copy link

shawwal commented Dec 15, 2020

I also having same issues and try every single solution here with no result, I'm using macOS Big Sur version 11.0.1 and Xcode version 12.2 (12B45b).

@DrSwad
Copy link

DrSwad commented Dec 23, 2020

@vassilmladenov @belgamo By any chance you opened on Xcode .xcodeproj file instead of .xcworkspace file?

Thanks! I never built a native iOS app before. Both of these files opened up the project in XCode, so didn't realise this could be the issue. Running the build command from .xcworkspace solved it for me.

@Fortidude
Copy link

I have the same issue with bigsur and Xcode 12.3, but ONLY in cli.

building with Xcode works perfectly. CLI Xcode version the same, 12.3.

Not sure yet why is that.

@ipuris
Copy link

ipuris commented Jan 15, 2021

I had the same issue with BigSur and Xcode 12.3 after I updated in Podfile to platform :ios, '11.0', and I solved the issue finally.
I tried many approaches so I'm not sure, but I think below three things are the key.

  • Go to Project setting -> Info tab -> Deployment section -> iOS Development Target -> set proper version (in my case, 11.0)

image

  • Go to Project setting -> Build Settings tab -> Deployment section -> iOS Development Target -> set proper version (in my case, iOS 11.0)

image

  • Go to Targets setting -> Build Settings tab -> Deployment section -> iOS Development Target -> set proper version (in my case, iOS 11.0)

image

In my case, I changed the first and second settings above right after I had changed Podfile and had gotten the error, but I missed the third settings (= Targets setting).
I hope my experience helps other developers.

@dsouksavatd
Copy link

I faced the same issue on build release, please make sure your platform ios version is the same with xcode project

Screen Shot 2021-01-22 at 21 41 37

Screen Shot 2021-01-22 at 21 41 58

in my case it was solved the issue, hope it help

@kesha-antonov
Copy link
Contributor

Fixed it by setting same iOS version in all places.
Thanks guys.

Screenshot 2021-01-27 at 22 13 14

Screenshot 2021-01-27 at 22 12 45

Screenshot 2021-01-27 at 22 08 49

@DirleiDionisio
Copy link

Thank you @nahuelb! Following your solution worked out. 🤜🤛

@KasTasElis
Copy link

@vassilmladenov @belgamo By any chance you opened on Xcode .xcodeproj file instead of .xcworkspace file?

I am not sure why, but this was a game changer for me! App was not building in .xcodeproj but .xcworkspace built just fine!

@jkz27
Copy link

jkz27 commented Feb 16, 2021

@zxcpoiu solution worked for me <3
It seems Rebooting is actually necessary
What I did, personally using deployment stage IOS 10

  1. rm -rf ios/Pods, rm ios/Podfile.lock
  2. cd ios, pod cache clean --all
  3. Reboot
  4. pod repo update, pod install

@Liviu-Icedo-web
Copy link

In my case was because of ios/APPNAME/Info.plist.
Please check also if your .plist file is as you wanted it to be.

@lavajeff
Copy link

@zxcpoiu solution worked for me <3
It seems Rebooting is actually necessary
What I did, personally using deployment stage IOS 10

  1. rm -rf ios/Pods, rm ios/Podfile.lock
  2. cd ios, pod cache clean --all
  3. Reboot
  4. pod repo update, pod install

This worked for me. Thank you so much for saving me from hours of fixing this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests