No such module 'FBSDKCoreKit' XCODE 7.4

﹥>﹥吖頭↗ 提交于 2019-11-28 12:11:00
user3288414

I resolved this problem by adding FacebookSDK Directory path to the "Framework Search Paths"

Go to Build Settings and search for "framework search"

I resolved No such module 'FrameworkName' issue with following steps:

1) Create a group, call it Framework (optional, best practice)

2) Drag desired SDK(s) from Original SDK path to Framework, in your case FBSDKCoreKit and FBSDKLoginKit

3) When the dialog pops 'Choose options for adding these files:', choose following:

Additional step for Facebook SDK version 4.0:

4) Select the target in the project editor and click Build Settings, change Framework Search Paths to: ~/Documents/FacebookSDKDirectoryName

I'd like to suggest one of the easiest way.

  1. put your mouse on your project ( in xcode)
  2. and right click > Add Files to...
  3. Add your framework files.
  4. you also need to change Allow Non-modular Includes In Framework Modules setting from NO to YES,

Dada! Works like a charm!

Priyanka

if you are using pods then just delete all pod file and related folders and start from the first step

init pod.

then open that pod file and add following framework   

pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'

then pod install

and import it to the swift file and enjoy :)

and if you are directly add folder to your project then make sure that 'copy if needed' is marked

It's the usual suspects. Check your Frameworks folder. Check Project -> Build Phases -> Link Binary with Libraries, and make sure FBSDKCoreKit and FBSDKLoginKit are included.

If they're there, and the error still exists, tap on each framework, and make sure Target Membership is checked under File inspector.

I have solved this problem by copying the frameworks to the application's folder. Your application does not know the path of the frameworks.

I have solved this problem by typing import FBSDKLoginKit Dont copy!! just write. Hope it Helps

What fixed it for me was removing the pods folder and running the install command again:

rm -Rf Pods 
pod install

Looks like you also have to add to the Bridging-Header.h file:

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

#import <FBSDKShareKit/FBSDKShareKit.h>

The use of Bridging-Header.h is only needed when you use the Objective-C version of the framework files. However, the Swift tutorials on the Facebook site do leave out key steps for using the Swift-built framework files, specifically the AppDelegate adjustments after importing FBSDKCoreKit there.

Ayush Dixit

In AppDelegate import:

import FacebookCore
import FacebookLogin

and add:

func application(_ application: UIApplication, didFinishLaunchingWithOptions 
launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {        
SDKApplicationDelegate.shared.application(application, 
didFinishLaunchingWithOptions: launchOptions)

    return true
}

func application(_ app: UIApplication, open url: URL, options: 
[UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
    return SDKApplicationDelegate.shared.application(app, open: url, 
            options: options)
}

This fixed it for me: Make sure to Clean and Build your project after running the Pod Install.

From menu: Product/ clean & then build.

Please try opening the project using .xcworkspce not with .xcodeproj As workspace load all the depencies.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!