-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDK 4.0 incompatible with cocoapods 0.36.3 and other swift dependencies #725
Comments
Having the same error while trying to add SDK 4 into swift project with use_frameworks! |
I have also been pounding my head against the wall with this problem. I'm starting a new project, and I'd prefer to begin prototyping with the new SDK, rather than the old one. |
Hey, I've been looking into it and it seems cocoapods does not support mixed frameworks and libraries: CocoaPods/guides.cocoapods.org#53. The Facebook SDK is a static library and does not need the use_frameworks! flag. Are you somehow able to use other static libraries with swift frameworks in your project? |
Hello @chrisp-fb, sure we can use the traditional method of linking your downloadable frameworks, i did that since i have no other choices right now to use your last SDK, which is better than the previous one. I think you should update your documentation to state explicitly you're not supporting cocoapods anymore with your 4.x version. Your previous SDK was compatible with |
We do want to support Cocoapods and I didn't have issues using 4.0 without the |
Hey again Chris, I hope you would be able to find a quick workaround to use it in cocoapod again, i've tried but found nothing so far. |
Waiting for this as well. Starting off a project with swift + SDK4 + cocoapods. |
I just pushed some new podspecs to our If it all looks good I'll make these official for our next 4.1 release. pod 'FBSDKCoreKit', :podspec => 'https://raw.githubusercontent.com/facebook/facebook-ios-sdk/dev/FBSDKCoreKit.podspec', :branch => 'dev' pod 'FBSDKShareKit', :podspec => 'https://raw.githubusercontent.com/facebook/facebook-ios-sdk/dev/FBSDKShareKit.podspec', :branch => 'dev' pod 'FBSDKLoginKit', :podspec => 'https://raw.githubusercontent.com/facebook/facebook-ios-sdk/dev/FBSDKLoginKit.podspec', :branch => 'dev'
|
Hey @chrisp-fb, btw, i tried the |
Great, I'll leave this issue open until we ship 4.1 and publish the new podspecs properly. |
Hi @chrisp-fb : any idea when you will ship |
In the meantime @Sylv3r, do you have any idea how I would link the SDK as a framework (not a pod dependency) in my own module? Is this even possible? Cheers! Or is @chrisp-fb is there a way to way to reference your Cheers! |
Hi @julien-c - as far as I know, that's not possible : http://stackoverflow.com/questions/22447062/how-do-i-create-a-cocoapods-podspec-that-has-a-dependency-that-exists-outside-of That said, I did push the FBSDKCoreKit and FBSDKShareKit podspecs to the public pod trunk so those are available already. And just now I added a custom tag for the fix in the :dev branch and pushed a FBSDKLoginKit podspec to the public pod trunk so that should be available as soon as Cocoapods updates their trunk. |
@chrisp-fb I'm trying to use the new pod spec references you mentioned above in #725 (comment) in a Swift 1.2 / Xcode 6.3 project, and am getting this error:
I changed that file to use the quotes that were recommended, and it now compiles. |
I have amended
I'm using |
I am getting the same or similar error as @evgeniyd. Here is my
Here is the error I am getting (cocoa pods 0.37.0.beta.1)
Adding 'pod Facebook-iOS-SDK' together with the other pods does not work either.
I also get all these warnings:
|
it looks like the next pod version changes some behavior regarding private headers in the modules, can you use 0.36.3 in the meantime. Also, I used the wrong syntax to specify the dev branch, use the |
Installing the pod as mentioned (with
I tried importing the pod as a framework (
|
I've tried one more thing, installing the pod from the dev branch as follows:
Then, on my AppDelegate, I imported the SDK as Everything was looking good, but the build failed again with the header files (cocoa pods 0.36.4):
|
Using
You also have to import FB umbrella headers into
|
I get the same issue with the latest Facebook iOS SDK but a different error message. 'AppEvents/FBSDKAppEvents+Internal.h' file not found I have CocoaPods version 0.36.4 installed. |
The new podspecs in the dev branch work fine with 0.36.4; note the pod 'FBSDKCoreKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :branch => 'dev' pod 'FBSDKShareKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :branch => 'dev' pod 'FBSDKLoginKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :branch => 'dev' Do not use the Facebook-iOS-SDK podspec. We'll deprecate it officially in the next release coming soon. If you're using Swift, bridging headers should not be necessary either as each kit defines a module, so you can simply |
It seems that Bolts.framework module map issue that has been fixed in f92b5200c5aaadd0be12a4432ee068f7b2558892 does not allow us to get rid of importing FB umbrella headers into |
@eneko - I just pushed another update to the kit podspecs in the @evgeniyd - right, the Bolts module map issue is still present if you're not using Pods, but will be resolved in the next 4.1 release. |
@chrisp-fb Thanks for the quick response, Chris. I added those to my I have a
I get the following two errors at this line. Use of undeclared type 'FBLoginView' 'weak' cannot be applied to non-class type '<>' I imported all three frameworks.
But it doesn't change anything. |
@Isuru-Nanayakkara - FBLoginView is not available in v4 of the SDK, use FBSDKLoginButton instead (all types are now prefixed with FBSDK). Let's keep this thread focused on pods issues; feel free to open new thread for other issues |
Hi @chrisp-fb, thanks for your patience! I just realized I was targeting Eneko |
@chrisp-fb Still not working for me in a Pod::Spec.new do |s|
s.dependency 'FBSDKCoreKit', '~> 4.0'
s.dependency 'FBSDKLoginKit', '~> 4.0'
end I get the following error when trying to
Your help is appreciated as this is kind of a showstopper for me! :) |
hey @julien-c , the corekit error is because the fbsdks are intended as static libraries so you should pass the --use-libraries flag (though I don't know for sure if that works transitively). the loginkit error is because of a code bug that is only not yet pushed to master and unfortunately you cannot specify a branch when describing a dependency in a podspec; however, for your local development you can still try adding the |
@chrisp-fb after removing all pods and installing them back again, clearing out caches and so, I can confirm |
When is the 4.1 release a lot of developers would atleast like to know a date. We are sitting still due to this. |
Same here... would appreciate a date. |
The date is today! :) The new podspecs for each kit for v4.1 have been pushed; let me know if you see any more problems. |
Thanks! The 4.1 version works fine when you import directly in swift ( import FBSDKLoginKit ), with bridging header some stuff is undeclared ( e.g. FBSDKLoginButtonDelegate). That is not an issue at all :) just good to know. |
I am still getting unresolved identifier error messages for: FBSession, FBAppCall, FBErrorUtility etc. I have included the imports: import FBSDKCoreKit Here is my pod file: //#Uncomment this line to define a global platform for your project target 'myApp' do I also have "allow non-modular includes in framework modules" turn on to yes in the build settings. Any ideas what is wrong? |
FBSession, FBAppCall, FBErrorUtility are defined in v3.x of the SDK. FBSDKCoreKit is part of v4.x of the SDK and is a breaking change. Take a look at https://developers.facebook.com/docs/ios/upgrading-4.x#3to4 |
Ye i still have no module found FBSDKCoreKit, its just like the pods libraries are completely unseen ;s |
It took me awhile to get all my pods working but that is what I did: Firstly look at my pod file above.. I have these included (which I found after reading around):
I also had to go set "allow non-modular includes in framework modules" to yes in the build settings. So google that. Also: |
What is the status on this? I still see the errors and I tried everything -- clearing the pods, reinstalling, etc. This is my podfile:
|
jorge-3 be specific bud.. what errors specifically? Look at my post above which states: Did you: set "allow non-modular includes in framework modules" to yes in the build settings? Also make sure you use Swift import statements specifically in each class where you are using the pod: eg "import FBSDKCoreKit" as opposed to using Obj-C imports in the bridging header. |
Hi @nateuni, I did everything except the importing, and effectively the errors went away (a good sign) but alas, the FB login button doesn't appear even though no errors appear. I am basically following this tutorial but adding the Alamofire piece. You can see my iOS project code here. Thanks! -- Jorge |
Ah! Turns out I had the wrong code in the View. Works now! Thanks! |
After a few try and reading other issues here, the new version of the SDK is not working with cocoapods and the
use_frameworks!
option needed by swift dependencies.Since this option is mandatory for swift dependencies, it's impossible to do without it and the 4.0 version of Facebook-iOS-SDK is unable to build with it, while the last one (3.23.2) was.
It seems related to the split in 3 frameworks of the SDK, the subfolders dependencies (ie Internal/* in FBSDKCoreKit) are not resolved by the generated pod, leading to 'file not found' errors during the build.
The text was updated successfully, but these errors were encountered: