Skip to content
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

Closed
sylver opened this issue Apr 2, 2015 · 43 comments
Closed
Labels

Comments

@sylver
Copy link

sylver commented Apr 2, 2015

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.

@sylver sylver changed the title AppEvents/FBSDKAppEvents+Internal.h file not found with 4.0 on cocoapods SDK 4.0 incompatible with cocoapods 0.36.3 and other swift dependencies Apr 2, 2015
@sylver
Copy link
Author

sylver commented Apr 2, 2015

related to :
#716
#722

@deeprnd
Copy link

deeprnd commented Apr 7, 2015

Having the same error while trying to add SDK 4 into swift project with use_frameworks!
Pods/Facebook-iOS-SDK/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h

@adamcin
Copy link

adamcin commented Apr 7, 2015

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.

@chrisp-fb
Copy link
Contributor

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?

@sylver
Copy link
Author

sylver commented Apr 8, 2015

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.
But i'm feeling like going years backward doing that and that's really unexpected from Facebook for its new major SDK version to not be compatible with cocoapods.

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 use_frameworks! flag, and now swift is here we can't do without it.

@chrisp-fb
Copy link
Contributor

We do want to support Cocoapods and I didn't have issues using 4.0 without the use_frameworks! flag. I'll take a closer look at what Cocoapods is doing with that flag to see if we can work around it or if I'm misunderstanding their documentation.

@sylver
Copy link
Author

sylver commented Apr 8, 2015

Hey again Chris,
Yes, i agree that 4.0 is working without the use_frameworks! flag, but for current projects using swift libraries, this flag is now basically mandatory to be able to use all major pods, and cocoapod isn't providing a per pod switch about this flag.

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.

@raulastu
Copy link

Waiting for this as well. Starting off a project with swift + SDK4 + cocoapods.

@chrisp-fb
Copy link
Contributor

I just pushed some new podspecs to our :dev branch, if you have time to try them out, that'd be great. it did find a bug in one of our import statements which means you'll initially get an error when compiling but you can manually fix it in your copy* (or if you know some podfile syntax that would use the dev branch code, let me know).

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'
  • see _FBSDKLoginRecoveryAttempter.h
    in 05ba49a

@sylver
Copy link
Author

sylver commented Apr 10, 2015

Hey @chrisp-fb,
Awesome ! Works perfectly.

btw, i tried the header_mappings_dir myself to fix this, but it didn't work in subspec, i didn't thought about split it up in different podspecs, congratz.

@chrisp-fb
Copy link
Contributor

Great, I'll leave this issue open until we ship 4.1 and publish the new podspecs properly.

@julien-c
Copy link

Hi @chrisp-fb : any idea when you will ship 4.1? I'm building a Swift pod that has the Facebook SDK 4.0 as a dependency, so it'd be great if this could work!

@julien-c
Copy link

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 dev branch and splitted podspecs (see above) in my module's podspec (not in a Podfile)?

Cheers!

@chrisp-fb
Copy link
Contributor

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.

@winzig
Copy link

winzig commented Apr 18, 2015

@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:

.../Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.h:19:9: 'FBSDKCoreKit+Internal.h' file not found with <angled> include; use "quotes" instead

I changed that file to use the quotes that were recommended, and it now compiles.

@evgeniyd
Copy link

I have amended Podfile and edited _FBSDKLoginRecoveryAttempter.h as suggested by @chrisp-fb in comment. I have also removed pod 'Facebook-iOS-SDK'.
Now, I'm getting these errors:

Use of private header from outside its module: '<filename>.h'

I'm using cocoapods-core-0.37.0.beta.1.gem

@eneko
Copy link

eneko commented Apr 21, 2015

I am getting the same or similar error as @evgeniyd.

Here is my Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'Alamofire', '~> 1.2'
pod "SwiftyJSON", ">= 2.2"
# Facebook SDK 4.0.1 is not yet compatible with use_frameworks! (see https://github.com/facebook/facebook-ios-sdk/issues/725 )
# pod 'Facebook-iOS-SDK'
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'

Here is the error I am getting (cocoa pods 0.37.0.beta.1)

.../Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.m:20:9: Use of private header from outside its module: 'FBSDKAppEvents+Internal.h'

Adding 'pod Facebook-iOS-SDK' together with the other pods does not work either.

.../Pods/Headers/Private/FBSDKCoreKit/FBSDKAccessToken.h:59:1: Duplicate interface definition for class 'FBSDKAccessToken'

I also get all these warnings:

Check dependencies

Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKAccessToken.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKAppEvents.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKAppLinkResolver.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKAppLinkUtility.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKApplicationDelegate.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKButton.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKConstants.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKCopying.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKCoreKit.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKGraphErrorRecoveryProcessor.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKGraphRequest.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKGraphRequestConnection.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKGraphRequestDataAttachment.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKMacros.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKMutableCopying.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKProfile.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKProfilePictureView.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKSettings.h
Warning: Multiple build commands for output file /Users/enekoalonso/Library/Developer/Xcode/DerivedData/XXXX-gmljnhauajyqjdfqyrbobqzmzlsx/Build/Products/Release-iphonesimulator/Pods-XXXX/Facebook_iOS_SDK.framework/Headers/FBSDKUtility.h

@chrisp-fb
Copy link
Contributor

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 :git param instead (to avoid having to edit the import statement manually):
pod 'FBSDKCoreKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :branch => 'dev'

@eneko
Copy link

eneko commented Apr 22, 2015

Installing the pod as mentioned (with :git) seems to solve the issue with the header files, but I cannot figure out how to import the SDK. import FacebookSDK does not work:

.../AppDelegate.swift:14:8: No such module 'FacebookSDK'

I tried importing the pod as a framework (import FBSDKCoreKit) which works, but then Xcode cannot find FBAppEvents.activateApp():

.../AppDelegate.swift:27:9: Use of unresolved identifier 'FBAppEvents'

@eneko
Copy link

eneko commented Apr 22, 2015

I've tried one more thing, installing the pod from the dev branch as follows:

pod 'Facebook-iOS-SDK', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :branch => 'dev'

Then, on my AppDelegate, I imported the SDK as import Facebook_iOS_SDK since that is the name of the framework generated by cocoa pods.

Everything was looking good, but the build failed again with the header files (cocoa pods 0.36.4):

.../Pods/Facebook-iOS-SDK/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h:23:9: 'AppEvents/FBSDKAppEvents+Internal.h' file not found

@evgeniyd
Copy link

Using cocoapods-0.36.4 it works. I still had to edit '_FBSDKLoginRecoveryAttempter.h', but it had been suggested automatically by Xcode that time.

#pod 'Facebook-iOS-SDK'
pod 'FBSDKCoreKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :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'

You also have to import FB umbrella headers into YourProject-Bridging-Header.h in order to use SDK from Swift classes.

// Facebook SDK
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import <FBSDKShareKit/FBSDKShareKit.h>

@Isuru-Nanayakkara
Copy link

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.

@chrisp-fb
Copy link
Contributor

The new podspecs in the dev branch work fine with 0.36.4; note the :git param should be applied for all the kits, so the podfile should read

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 import FBSDKCoreKit in your .swift files.

@evgeniyd
Copy link

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 YourProject-Bridging-Header.h.
Both, master and dev FB SDK branches are using Bolts 60c0d2b03596a191bddfdf87bd61e38a4790d94d

@chrisp-fb
Copy link
Contributor

@eneko - I just pushed another update to the kit podspecs in the :dev branch to remove our private_header declaration so it should work with pods 0.37 now; let me know if you see further issues.

@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.

@Isuru-Nanayakkara
Copy link

@chrisp-fb Thanks for the quick response, Chris. I added those to my Podfile and installed them. And I'm facing a new issue.

I have a UIView to show the Facebook login button. I've set its class as FBLoginView and created the following IBOutlet to my view controller.

@IBOutlet weak private var facebookLoginButton: FBLoginView!

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.

import FBSDKShareKit
import FBSDKCoreKit
import FBSDKLoginKit

But it doesn't change anything.

@chrisp-fb
Copy link
Contributor

@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

@eneko
Copy link

eneko commented Apr 22, 2015

Hi @chrisp-fb, thanks for your patience!

I just realized I was targeting FBAppEvents.activateApp() while the new SDK has FBSDKAppEvents.activateApp(). My bad.

Eneko

@julien-c
Copy link

@chrisp-fb Still not working for me in a podspec (works in a Podfile though):

Pod::Spec.new do |s|
  s.dependency 'FBSDKCoreKit', '~> 4.0'
  s.dependency 'FBSDKLoginKit', '~> 4.0'
end

I get the following error when trying to pod spec lint:

 -> FBSDKCoreKit (4.0.1)
    - ERROR | [iOS] [FBSDKCoreKit/arc] Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | [FBSDKCoreKit/arc]  clang: error: linker command failed with exit code 1 (use -v to see invocation)

[!] Unable to load a specification for the plugin `/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-release-fix-0.1.2`
 -> FBSDKLoginKit (4.0.1)
    - ERROR | [iOS] Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - ERROR | [iOS]  FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.h:19:9: error: 'FBSDKCoreKit+Internal.h' file not found with <angled> include; use "quotes" instead

Your help is appreciated as this is kind of a showstopper for me! :)

@chrisp-fb
Copy link
Contributor

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 :path override in a consuming podfile (ie., your pod and the fbsdk*kits should all have the :path override).

@evgeniyd
Copy link

@chrisp-fb after removing all pods and installing them back again, clearing out caches and so, I can confirm dev: works with import

@felixdkatt
Copy link

When is the 4.1 release a lot of developers would atleast like to know a date. We are sitting still due to this.

@GreyEcologist
Copy link

Same here... would appreciate a date.

@chrisp-fb
Copy link
Contributor

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.

@minas90
Copy link

minas90 commented May 1, 2015

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.

@nateuni
Copy link

nateuni commented May 12, 2015

I am still getting unresolved identifier error messages for: FBSession, FBAppCall, FBErrorUtility etc.

I have included the imports:

import FBSDKCoreKit
import FBSDKLoginKit

Here is my pod file:

//#Uncomment this line to define a global platform for your project
platform :ios, '8.3'
use_frameworks!

target 'myApp' do
link_with ['myApp', 'myAppTests']
pod 'CocoaLumberjack'
pod 'FMDB', :git => 'https://github.com/robertmryan/fmdb.git'
pod 'FBSDKCoreKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :branch => 'dev'
pod 'FBSDKLoginKit', :git => 'https://github.com/facebook/facebook-ios-sdk.git', :branch => 'dev'
end

I also have "allow non-modular includes in framework modules" turn on to yes in the build settings.

Any ideas what is wrong?

@chrisp-fb
Copy link
Contributor

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

@ammoqq
Copy link

ammoqq commented May 18, 2015

Ye i still have no module found FBSDKCoreKit,
tried this in the podfile:
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'
also tried with
pod 'FacebookSDK', '~> 4.1.0'
and it didnt work. Could you please post some current guide with steps, how to integrate facebookSDK through PODS right now ? its really crazy to make it work

its just like the pods libraries are completely unseen ;s

@nateuni
Copy link

nateuni commented May 18, 2015

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):

use_frameworks!

target 'myApp' do
link_with ['yourAppNameHere', 'yourAppTestNameHere']

I also had to go set "allow non-modular includes in framework modules" to yes in the build settings. So google that.

Also:
How are you accessing the pods in your code? Are you using the bridgeheader file? As if you are you shouldn't. Instead you have use "import FBSDKCoreKit" statements in the files that you are using the SDK in.

@esfoobar
Copy link

esfoobar commented Jun 8, 2015

What is the status on this? I still see the errors and I tried everything -- clearing the pods, reinstalling, etc.

This is my podfile:

platform :ios, '8.0'
xcodeproj 'xpatly.xcodeproj'
use_frameworks!

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'
pod 'Alamofire', '~> 1.2'

@nateuni
Copy link

nateuni commented Jun 9, 2015

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.

@esfoobar
Copy link

esfoobar commented Jun 9, 2015

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

@esfoobar
Copy link

esfoobar commented Jun 9, 2015

Ah! Turns out I had the wrong code in the View. Works now!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests