颤振致命错误:未找到模块"FBSDKCoreKit"



我正在使用flutter_facebook_login 3.0.0

我在尝试运行应用程序时收到此错误

**

构建失败 ** Xcode 的输出: ↳ 在/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m:21 包含的文件中: 在文件中包含自/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginKit+Internal.h:19: 在文件中包含自/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/../FBSDKLoginKit.h:27:/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h:24:9: 致命错误:在FBSDKCoreKit@import找不到模块"FBSDKCoreKit";

for the simulator. Error launching application on iPhone 8.

我设法通过更改 Podfile 来解决此问题

target 'Runner' do
# flutter Pod
use_frameworks!
use_modular_headers!
------

飘飘干净

删除 Podfile.lock

容器安装 --存储库更新

pod update FBSDKLoginKit

flutter clean && cd ios && sudo rm Podfile.lock && pod install --repo-update && pod update FBSDKLoginKit

打开 .xcworkspace,并在常规>部署信息中设置目标 11.0,也在 Podfile 集中设置目标 11.0

到目前为止,对我有用的唯一方法是这个

您必须使用5.8.0版本的Facebook SDK覆盖Podfile.lock。

PODS:
- FBSDKCoreKit (5.8.0):
- FBSDKCoreKit/Basics (= 5.8.0)
- FBSDKCoreKit/Core (= 5.8.0)
- FBSDKCoreKit/Basics (5.8.0)
- FBSDKCoreKit/Core (5.8.0):
- FBSDKCoreKit/Basics
- FBSDKLoginKit (5.8.0):
- FBSDKLoginKit/Login (= 5.8.0)
- FBSDKLoginKit/Login (5.8.0):
- FBSDKCoreKit (~> 5.0)
- Flutter (1.0.0)
....

我一直在房子周围,并最终让它与 iOS 上的5.13.1Podfiles 一起使用(通过工作,我的意思是编译、链接和安装到真正的 iPhone 上 - 我实际上并不使用 Facebook,但它需要作为 firebase-ui 登录包的一部分:-D

(首先,清洁豆荚,例如

Run: flutter clean
Go to ios folder, delete Podfile, Podfile.lock, Pods folder, Runner.xcworkspace
Run project again

构建后,我收到有关以下内容的错误:

fatal error: module 'FBSDKCoreKit' not found
@import FBSDKCoreKit;

然后,我将模块化标头覆盖添加到此处提到的ios/podspec文件中 https://github.com/roughike/flutter_facebook_login/issues/214#issuecomment-565166295

pod文件的开头如下所示:

platform :ios, '12.0'
use_modular_headers!

我确实注意到链接错误,关于缺少Facebook库,是由于框架部分中的虚假条目造成的。

此线程中的更多详细信息

我已经按照以下步骤解决了它,由于facebook_share插件,我遇到了这个问题,所以

1.将facebook_share插件的版本降级为。 0.0.1+1
2.在项目终端中运行命令 - Pod 缓存清理 — 所有
3.在 Podfile 中添加以下两个 pod:

target 'Runner' do
use_frameworks!
use_modular_headers!
pod 'FBSDKCoreKit', '~> 6.0.0'
pod 'FBSDKShareKit', '~> 6.0.0'

4.在项目终端中运行命令 - 在项目终端中安装
5.run 命令 - pod 更新 FBSDKShareKit

完成,错误已删除

此问题解决了我的问题"找不到FBSDKCoreKit/FBSDKCoreKit.h"文件

pod 'FBSDKCoreKit', '4.38'
pod 'FBSDKLoginKit', '4.38'
pod 'FBSDKShareKit', '4.38'

最新更新