Carthage: FBSDKCoreKit, FBSDKLoginKit, FBSDKShareKit etc. Facebook SDKs support

Created on 9 Mar 2016  路  18Comments  路  Source: Carthage/Carthage

I tried the following Cartfile line, as in #734:

github "facebook/facebook-ios-sdk"

After carthage update --platform iOS, I sort of expected to see FBSDKCoreKit.frameworkm FBSDKShareKit.framework, FBSDKLoginKit.framework to be available in Carthage/Build/iOS directory. They simply weren't there.

When will these Facebook SDK's ever be supported under Carthage? And what's the syntax for it?

question

Most helpful comment

Facebook's new Swift SDK supports Carthage 馃帀

All 18 comments

What version of carthage are you using? What's the output of carthage update --platform iOS?

Yes it would super important to have Facebook SDK supported in Carthage.
Now it only works with cocoapods.

I use Carthage for all my Frameworks and I am obliged to manually install Facebook SDK due to this issue.

$ carthage update --platform iOS
*** Cloning facebook-ios-sdk
*** Checking out facebook-ios-sdk at "sdk-version-4.10.1"
*** xcodebuild output can be found in /var/folders/xj/sydx1wkd0p147x0k_7v667940000gn/T/carthage-xcodebuild.oBtH6c.log
*** Skipped building facebook-ios-sdk due to the error:
Dependency "facebook-ios-sdk" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/facebook/facebook-ios-sdk/issues/new

facebook-ios-sdk doesn't have any shared framework schemes. Instead, it has schemes that create universal (device + simulator) builds of their different frameworks. To work with Carthage, they need to have schemes for their framework targets.

I'd suggest contacting them or opening a pull request there. It should be as easy as pressing the "Autocreate Schemes Now" button and then sharing the schemes.

My current hilarious workaround to this was to create a cocoapod adapter repo which houses dependencies (such as FBSDKLoginKit) pulled in through cocoapods with use_frameworks! and then expose those frameworks schemes as shared. Then you can use that repo as a carthage dependency for those projects that seem to refuse to support frameworks natively, but have them enabled through cocoapods.

@taiheng Care to share in a little more detail how you went about doing that?

@clayellis I created a demo repo showing this here: https://github.com/tucali/ExampleAdapter

@clayellis @taiheng But the entire point of my issue is:

  • I dont want to use CocoaPods. I want to use carthage
    So creating a CocoaPods repo to enable the shared scheme, it is funny but not the solution.

It just require Facebook team to enable the shared scheme in their project and push to the repo

@racer1988 Thanks! Yeah, I've been watching this issue since it was created. It'll be nice when they finish it!

And they close the issue :(
We will never get this fixed. Same for Google Sign in. 馃憥

Pretty sure they won't fix even for Swift 3 and Package Manager.

So we are forced to use CocoaPods, which breaks everytime Xcode is updated. (frustrated)

Facebook bug closed as a "won't fix". I guess that says it all.

Facebook's new Swift SDK supports Carthage 馃帀

@dcaunt doesnt work for moi :-(

@dcaunt @sebbean

Neither for me.
Still manually installing because SDK is in Beta and doesnt work well for production app

Is there any update on this? It seems like the facebook sdk (apart from swift one which I'm reluctant to use) still does not support carthage?

@jamesone see jmrobison 's comment.

@jamesone For what it's worth, I haven't had any issues using the Swift framework. It's about time to hop on the Swift train ;)

@clayellis Great 馃槃 Does the swift SDK work with the react-native-fbsdk package? If so that'd be kickass!

@taiheng Yeah I did see that 馃槩

Was this page helpful?
0 / 5 - 0 ratings