Getting error after pod update to FBSDK 5.0.0 in x code 10.1

2.5k Views Asked by At

I am trying to update my facebook SDK to 5.0.0 but after installing pod update, I keep getting this error in FBSDK Login Kit.

error in FBSDK Login Kit

error in FBSDK Login Kit

error in FBSDK Login Kit

This is my pod file.

pod 'FacebookSDK', '~> 5.0.0'
pod 'FacebookSDK/LoginKit', '~> 5.0.0'
pod 'FacebookSDK/ShareKit', '~> 5.0.0'
pod 'FacebookSDK/PlacesKit', '~> 5.0.0'
pod 'FBSDKLoginKit', '~> 5.0.0'

Anyone please help me to solve this problem.

2

There are 2 best solutions below

0
Min Khant Lu On BEST ANSWER

Now I got solution. First I install FBSDK kits for version 5.0.2 like

pod 'FBSDKLoginKit', '~> 5.0.2'
pod 'FBSDKCoreKit', '~> 5.0.2'
pod 'FBSDKShareKit', '~> 5.0.2'

After you would see

Bolt.h file not found 

Remove that import bolt.h line, and replace

[FBSDKBasicUtility objectForJSONString ...]

with

[FBSDKInternalUtility objectForJSONString ...]. 

When you are done change some codes that they suggest to current FBSDK version acceptable codes and it solved.

5
Sagar Chauhan On

You have getting wrong way. Sometimes pod is updated but some files may not get updated. So, you need to first uninstall FBSDK pod by removing

pod 'FacebookSDK', '~> 5.0.0'
pod 'FacebookSDK/LoginKit', '~> 5.0.0'
pod 'FacebookSDK/ShareKit', '~> 5.0.0'
pod 'FacebookSDK/PlacesKit', '~> 5.0.0'
pod 'FBSDKLoginKit', '~> 5.0.0'

from pod file, and then run following command. You can also comment above pod and run command.

pod install

This will clear your old pod files.

Again, add above pods in pod file and run same command

pod install

will fix your issues.