0
votes

I am trying to update my ios app dependencies(facebook ios sdk and branch) using cocoapods, my initial Podfile contents are:-

platform :ios, '8.1'
pod 'Facebook-iOS-SDK', '3.18'
pod 'BranchInvite'

which are written in

I am trying to migrate facebook ios sdk from 3.18 to 3.24.1 and branch to the latest one. I get the following error on running:

$> pod update

[!] Unable to satisfy the following requirements:

- `Facebook-iOS-SDK (= 3.18)` required by `Podfile`

when I try to increaese my facebook sdk version to 3.18 to 3.24 or any 4.x, it gives similar failure with 3.18.

Then I followed the guidelines on this page, I removed the older Facebook ios sdk dependency, ran pod update(which deleted the folder FacebookSDK) and I was left with the following build error, wherever FBSession was being used from FacebookSDK/FacebookSDK.h:

use of undeclared identifier FBSession

What is the correct way to upgrading the facebook ios sdk using Pods?

1
FBSession is no longer available in the most recent version of the SDK. - albertamg
@albertamg what should be done for the recent versions? - Mohit
@albertamg is there a single replacement which will manage what FBSession did? - Mohit
I think the FBSession class was removed in 4.0. See iOS SDK, Upgrading from 3.x to 4.x for more details. I'm sorry I cannot be of more help. - albertamg

1 Answers

2
votes

You should delete the pods and reinstall them. Delete Pods folder and Podfile.lock file. Update your pod file with

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