Premal Khetani
Premal Khetani

Reputation: 3195

Could not build module 'FBSDKCoreKit' For FacebookSDK 4

I am having issue while updating Facebook SDK 3 to 4

when I add the framework it was added successfully. but when i add header file it's having the error that " Could not build module 'FBSDKCoreKit' ". Don't know the reason.

Error Could not build module 'FBSDKCoreKit'

Upvotes: 38

Views: 35266

Answers (14)

isuru
isuru

Reputation: 3565

And also this issue happens if you are open .xcodeproj file instead of .xworkspace file.

Upvotes: 1

Ahmad Al-Attal
Ahmad Al-Attal

Reputation: 435

As In My Case, The problem was caused by cocoapod configs, I just updated the cocoapod version to 1.5.3 (currently it's the latest version) by using the following command:

sudo gem install cocoapods

Then, I simply updated all the pods I use.

pod update

Then voalá, the error is gone.

Upvotes: 0

Raj Chavda
Raj Chavda

Reputation: 251

i have also facing same issue and i got solution. Nothing do just Remove the Module folder in. Follow simple step

step 1. go to Document/FacebookSDK folder

step 2. Go inside FBSDKCoreKit.framework folder & remove Modules folder. then drag and drop in your Xcode Project.

Resolve your issue. Enjoy .... !!!

Upvotes: 25

Gurjinder Singh
Gurjinder Singh

Reputation: 10329

I faced the same issue, but i was running project on old Xcode version. Make sure you are using latest SDK with latest Xcode version.

Upvotes: 0

Jack Diff
Jack Diff

Reputation: 71

I got the same issue and solve problem.
My solution :
1. follow the steps from https://developers.facebook.com/docs/react-native/getting-started-ios
2. check the xcode proj -> Library, find and open file RCTFBSDK.xcodeproj then update fb sdk path in build setting->Framework search path.

It works. I guess that sometime the RCTFBSDK.xcodeproj in Library can not update the framework search path from main xcodeproj so we need done manually. Hopefully my solution can help you, Thanks.

Upvotes: 1

Mick Byrne
Mick Byrne

Reputation: 14494

If you have multiple targets in your project, make sure that the "Target Membership" for the required frameworks is ticked for the target you're trying to build for.

When you drag the frameworks into XCode, you can usually choose the target, but it's an easy thing to miss.

Upvotes: 0

John Paul Manoza
John Paul Manoza

Reputation: 1735

If your using cocoapods, go to Pods Project Build Settings and change "Allow Non-modular Includes in Framework modules" to YES

Upvotes: 7

lee
lee

Reputation: 8115

With me, just download new version of Facebook SDK, then remove the old and add new fixed the problem.

Upvotes: 0

ABS
ABS

Reputation: 7732

I have tried the above solutions but did not work for me.Finally after scratching head for sometime i came across below solution:

I changed my framework search path after which my issue was resolved.

Steps to find Framework search Path

Goto build setting of the project and search for framework search path.

Then add the below line

"~/Documents/FacebookSDK"

enter image description here

.....

enter image description here I hope this will help someone .

Upvotes: 21

chinweekoh
chinweekoh

Reputation: 41

The updated FacebookSDK v4.1.0 launch on 30th April 2015 solved the following issue.

You might face a warning. Go to FBSDKCoreKit.framework/Headers/FBSDKCoreKit.h and add #import < FBSDKCoreKit/FBSDKTestUsersManager.h > to fix it.

Upvotes: 1

Premal Khetani
Premal Khetani

Reputation: 3195

In setting the "Allow Non-modular Includes in Framework modules" setting to YES in Build settings solved the problem for me. but don't know if is there any problem or issue or any side effects of it.

Its Facebook Bug you can check the solution they are providing in this link.

Update 1

Facebook said that they have fixed and will apply solution in next update see this link

Update 2

FaceBook Fixed It in Version Latest version (i.e. 4.1.0) see this link link.

Upvotes: 83

George Marmaridis
George Marmaridis

Reputation: 1940

Facebook has recognized the issue and said they're working on a fix.

In the meantime, here is the link to the available solutions depending on your project.

Upvotes: 1

KTZ
KTZ

Reputation: 139

When adding Facebook SDK (Version 4) files to the project make sure to uncheck "Copy into destination group folder".

This solved a problem for me.

Upvotes: 6

Mohit Tomar
Mohit Tomar

Reputation: 5211

change In target setting "Allow Non-modular Includes in Framework modules" to YES

Upvotes: 0

Related Questions