本文介绍了找不到模块FBSDKCoreKit Cocoapods的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用CocoaPods将facebook整合到我的应用程序中,使用use_frameworks!标签,并且根据Facebook的,还包括pod螺栓。当我尝试在我的appdelegate中使用导入FBSDKCoreKit 时,我得到一个没有这样的模块'FBSDKCoreKit错误。我在下面包含了我的podfile:

I'm trying to integrate facebook into my app using CocoaPods, using the use_frameworks! tag, and according to facebook's instructions here, also included the pod bolts. When I try use import FBSDKCoreKit in my appdelegate, I get a no such module 'FBSDKCoreKit error. I've included my podfile below:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.2'
use_frameworks!
pod 'Bolts'
pod 'Alamofire', '~> 3.0'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'

此外,在我的Pods文件夹中,在Bolts,FBSDKCoreKit和FBSDKSharekit旁边有一个问号,但是我以前一直在使用的alamofire旁边没有问号。在我的Pods项目的框架文件夹中,FBSDKCoreKit和Bolts列在那里,但都是红色的。
任何想法?我已经尝试清理我的项目,并重新安装和更新pod。

Additionally, in my Pods folder, there is a question mark next to Bolts, FBSDKCoreKit, and FBSDKSharekit, but not one next to alamofire, which I had been using previously. In the Frameworks folder in my Pods project, FBSDKCoreKit and Bolts are listed there, but are both red.Any ideas? I've tried cleaning my project, and reinstalling and updating the pods.

推荐答案

我通过


  1. 卸下桥接头。在4.1版本之后,Facebook SDK不需要它们。

  2. 将所有的.frameworks添加到项目构建阶段 - >使用库链接二进制文件

  3. 选择每个框架并构建它。您可以通过在运行箭头旁边选择项目名称来执行此操作。

  4. 清理项目并重新启动计算机。

  1. Removing the Bridging Header. Facebook SDK doesn't need them anymore after version 4.1
  2. Adding all of the .frameworks to the Projects Build Phases -> Link Binary With Libraries
  3. Selecting each framework and building it. You can do this by selecting your project name next to the run arrow.
  4. Cleaning the project and restarting my computer.

这篇关于找不到模块FBSDKCoreKit Cocoapods的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 18:00