4

Cant import FBSDKLoginKit to my Project (i am using cocoapods with swift)

Solution tried:

  1. remove use_framework! from podfile
  2. added $(PODS_ROOT) path to user header search paths
  3. try to import in Bridging Header file (FBSDKCoreKit.h,FBSDKLoginKit.h,FBSDKShareKit.h)

Showing Error:

can't import FBSDKLoginKit to my project

My Podfile:

Podfile

Parth Dabhi
  • 192
  • 4
  • 13
  • Have you found the solution? – Utku Dalmaz May 12 '16 at 13:43
  • @UtkuDalmaz after install/update pods build your project, then try to import FBSDKLoginKit. – Parth Dabhi May 13 '16 at 04:51
  • Message for all that, like me, made the same mistake :P: Be sure to select a Device before compile your project. I also used Cocoa pods, and everything was right with my 1st build but for my next build attempts I always get the 'could not build objective-c module 'FBSDKCoreKit' error which was solved when I selected a Device or a simulator – mauricioconde Oct 31 '16 at 17:45

2 Answers2

1

You should also add the FBSDKCoreKit.Framework from Facebook.

Adding only the FBSDKLoginKit will give you this error.

Ivar
  • 6,138
  • 12
  • 49
  • 61
Alfred
  • 136
  • 8
-2

Go through the below steps and your problem will be solved:

  1. Tap on "Pods.xcodeproj" in your project
  2. Select all the pods / any of one in which you are facing the issue.
  3. Tap on "Build Settings" and change "Build Active Architecture Only" to "NO"
  4. Now try to build to build the project and your problem will be solved.

Hope this helps!

Sohil R. Memon
  • 9,404
  • 1
  • 31
  • 57