ios 无法为 FacebookSDK 4 构建模块“FBSDKCoreKit”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29466683/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 05:30:51  来源:igfitidea点击:

Could not build module 'FBSDKCoreKit' For FacebookSDK 4

iosfacebookfacebook-sdk-4.0

提问by Premal Khetani

I am having issue while updating Facebook SDK 3 to 4

我在更新 Facebook SDK 3 到 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.

当我添加框架时,它已成功添加。但是当我添加头文件时,它出现“无法构建模块‘FBSDKCoreKit’”的错误。不知道原因。

Error Could not build module 'FBSDKCoreKit'

错误无法构建模块“FBSDKCoreKit”

回答by Premal Khetani

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

在构建设置中将“允许非模块化包含在框架模块中”设置为YES为我解决了这个问题。但不知道是否有任何问题或问题或它的任何副作用。

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

它的 Facebook Bug 您可以在此链接中查看他们提供的解决方案。

Update 1

更新 1

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

Facebook 表示他们已经修复并将在下一次更新中应用解决方案,请参阅此链接

Update 2

更新 2

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

FaceBook 在最新版本(即 4.1.0)中修复了它,请参阅此链接链接

回答by Raj Chavda

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

步骤 1. 转到 Document/FacebookSDK 文件夹

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

步骤 2. 进入 FBSDKCoreKit.framework 文件夹并删除 Modules 文件夹。然后拖放到您的 Xcode 项目中。

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

解决您的问题。享受 .... !!!

回答by ABS

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 pathafter which my issue was resolved.

我更改了我的框架搜索路径,之后我的问题得到了解决。

Steps to find Framework search Path

查找框架搜索路径的步骤

Goto build settingof the project and searchfor framework search path.

转到构建设置项目和搜索框架搜索路径

Then add the below line

然后添加以下行

"~/Documents/FacebookSDK"

“〜/文件/ FacebookSDK”

enter image description here

在此处输入图片说明

.....

.....

enter image description hereI hope this will help someone .

在此处输入图片说明我希望这会帮助某人。

回答by John Paul Manoza

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

如果您使用 cocoapods,请转到 Pods Project Build Settings 并将“Allow Non-modular Includes in Framework modules”更改为 YES

回答by KTZ

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

将 Facebook SDK(版本 4)文件添加到项目时,请确保取消选中“复制到目标组文件夹”。

This solved a problem for me.

这为我解决了一个问题。

回答by George Marmaridis

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

Facebook 已经认识到这个问题,并表示他们正在努力解决。

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

同时,这里是可用解决方案链接,具体取决于您的项目。

回答by chinweekoh

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

2015 年 4 月 30 日发布的更新的 FacebookSDK v4.1.0 解决了以下问题。

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

您可能会面临警告。转到 FBSDKCoreKit.framework/Headers/FBSDKCoreKit.h 并添加 #import < FBSDKCoreKit/FBSDKTestUsersManager.h > 来修复它。

回答by Hyman Diff

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.

我遇到了同样的问题并解决了问题。
我的解决方案:
1. 按照https://developers.facebook.com/docs/react-native/getting-started-ios
2. 检查 xcode proj -> 库,找到并打开文件 RCTFBSDK.xcodeproj 然后更新 fb构建设置->框架搜索路径中的sdk路径。

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.

有用。我猜有时库中的 RCTFBSDK.xcodeproj 无法从主 xcodeproj 更新框架搜索路径,因此我们需要手动完成。希望我的解决方案能帮到你,谢谢。

回答by Gurjinder Singh

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.

我遇到了同样的问题,但我在旧的 Xcode 版本上运行项目。确保您使用最新的 SDK 和最新的 Xcode 版本。

回答by Ahmad Al-Attal

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:

就我而言,问题是由 cocoapod 配置引起的,我只是使用以下命令将 cocoapod 版本更新为 1.5.3(目前是最新版本):

sudo gem install cocoapods

Then, I simply updated all the pods I use.

然后,我只是更新了我使用的所有 pod。

pod update

Then voalá, the error is gone.

然后 voalá,错误消失了。