I updated to FirebaseUI 0.7.0 and I now have this error when building the project I am working on:
"framework not found FBSDKLoginKit for architecture x86_64"
Before updating I used to have the following pod versions:
FBSDKCoreKit 4.15.1
FBSDKLoginKit 4.15.1
FBSDKShareKit 4.15.1
and after performing pod install to update to FirebaseUI 0.7.0, the FBSDLoginKit was updated to 4.17.0 and then the errors started appearing. I updated all three pods to 4.17.0 but the error persists. Also tried to use 4.15.1 for all pods but again the error persists.
Has anyone seen something similar?
I am using Xcode 8.1 and Cocoapods 1.1.0 (was using 1.0.0 and updated to 1.1.0 to see if it helped but it didn't).
If you go into your Pods/ folder, can you find the framework there? I suspect CocoaPods is building it and dropping it in your Pods folder and then just not making it visible to xcodebuild.
The FBSDLoginKit is in the Pods/ folder alright. So, something else is wrong I guess. Any help is appreciated!
You can work around this by dropping the directory in your FRAMEWORK_SEARCH_PATHS in your xcodeproj file.
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit"
This is something we should probably put in our podspec
@morganchen12 I tried this but it doesn't seem to work. I see you committed this change, so it might be fixed when I update to the next version. Any other ideas how to fix this in the meanwhile?
I wasn't able to repro this in our sample apps or test targets, do you have a project you can share?
I'll see if it is reproduced in a project I can share. Cheers.
@morganchen12 I haven't resolved this issue yet. Unfortunately, I cannot share a project with this happening. I tried this at another computer and same exact thing happens. First, when I update the pod from 0.5.5 to 1.0.0 the same error happens for GoogleAuthUtilities, but because the pod is missing. I add it to the podfile and then next thing the same error takes place for FBSDKLoginKit.
The commit you did yesterday is not in 1.0.0, right?
Yeah, I didn't merge that commit. You're free to cherry-pick it to see if it fixes your issue.
Hi again @morganchen12 , this actually did help. I used a local podspec with your commit and that error went away! Cheers for that!
However, after now updating to FirebaseUI 1.0.0, I see that the classes are not renamed to the FUI prefix. I still have the FIR... files under the FirebaseAuth framework. Any ideas?
I know have the following pod versions:
Using Firebase (3.9.0)
Using FirebaseAnalytics (3.5.1)
Using FirebaseAuth (3.0.6)
Using FirebaseCore (3.4.4)
Using FirebaseDatabase (3.1.0)
Using FirebaseInstanceID (1.0.8)
Using FirebaseMessaging (1.1.1)
Using FirebaseStorage (1.0.4)
Using FirebaseUI (1.0.0)
FirebaseAuth is a Firebase framework, so it should be using the FIR prefix. Only the FirebaseAuthUI classes should be using FUI.
You can use the same build file setting in that commit without maintaining a separate podspec by just adding the line of xcconfig into your xcodeproj file.
@morganchen12 the reason I am saying I don't have the classes is because I am trying to use FUIAuthPickerViewController by importing the following:
@import FirebaseAuth;
@import FirebaseAuthUI;
but Xcode says FirebaseAuthUI module is not found.
About adding this line into xcodeproj, I have tried adding it to framework search path through Xcode but it didn't work. I am not sure exactly where to add it in the xcodeproj file.
Hm, if Xcode can't find the framework module after cleaning/deleting DerivedData that probably means your framework search paths are messed up again. Can you make a sample project that reproduces this? If not, try adding ${PODS_ROOT}/FirebaseUI/FirebaseUIFrameworks/** to your framework search paths.
Hi again @morganchen12 , as it turns out, for some reason I was not getting version 1.0.0 of the pod, even though it was supposed to be installing version 1.0.0. I noticed that I didn't have the latest frameworks under the FirebaseUIFrameworks folder. I ended up manually adding them in that folder, and now I have the "framework not found FBSDKLoginKit for architecture" error again. So, still struggling. Thanks for all your help.
Can you share your podfile and any xcconfigs you have?
Ok so I'm having the same issue @yorgosg did to begin with: Linker can't find the FBSDKLoginKit when it's definitely there. I've tried adding the SDK to my framework search paths manually but I'm still having issues. I know that I have the kit installed correctly via pods. I've cleared out all my derived data and no dice still. I'm using FirebaseUI 1.0
I can't really share my project but I will mention that it's a pre-existing project that I'm trying to plug FirebaseUI into... to no success. I looked at the mentioned commit and didn't see anything in it besides just a change to that one file so I'm not sure how yorgosg managed to get his build running.
Any ideas?
Can you share your podfile?
target 'BeaconWatch' do
pod 'Reachability'
pod 'CocoaAsyncSocket'
pod 'RestKit', '~> 0.20.0'
# Backend pods
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'FirebaseUI', '~> 1.0'
# Firebase dependencies
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
# Testing and Search are optional components
pod 'RestKit/Testing', '~> 0.20.0'
pod 'RestKit/Search', '~> 0.20.0'
end
I was able to repro this issue with your Podfile, thanks 馃憤
The issue goes away if you add use_frameworks! to your Podfile. If you for whatever reason are unable to use frameworks, it looks like CocoaPods is adding -framework arguments to the OTHER_LDFLAGS build setting. You can work around it at the cost of CocoaPods producing ugly warnings by avoiding inheriting settings under Other Linker Flags.
Possibly related to https://github.com/CocoaPods/CocoaPods/issues/6065, though this could also be misconfiguration on our part.
Fantastic. I had seen adding that flag was necessary for swift, good to know you need it for Obj-C as well.
This is great, it finally worked!! After adding use_frameworks! to my pod file I also had to remove all the pod libraries from the other linker flags in build settings.
@matthewbahr for your previous question, I managed to get it to work for a little while by using a local podspec for the Firebase pod, but now it is not needed.
@morganchen12 I appreciate all the help! Thanks a million! I am closing the issue.
Yeah the use_frameworks! seems to work for FirebaseUI but it's broken my RestKit. So it looks like I'll have to work around like suggested. Good to know though, thanks.
Edit: Wait I forgot I'm using firebase to get rid of RESTKit. All good again.
Pls add FBSDKCoreKit.framework
Adding just FBSDKLoginKit will give you error
Unable to avoid this problem. Have got O-C project. My Podfile:
target 'FirebaseTest' do
pod 'FirebaseCore', '~> 3.5'
pod 'FirebaseDatabase', '~> 3.1'
pod 'FirebaseUI', '~> 3.1'
pod 'Typhoon', '~> 3.5'
pod 'RamblerTyphoonUtils/AssemblyCollector', '~> 1.5'
pod 'Firebase/Auth'
pod 'FBSDKLoginKit', '~> 4.15'
pod 'FBSDKShareKit', '~> 4.17'
pod 'VK-ios-sdk', '~> 1.4'
pod 'InstagramKit', '~> 3.0'
pod 'InstagramKit/UICKeyChainStore'
pod 'AWSS3', '~> 2.4'
pod 'AWSCognito', '~> 2.4'
pod 'DBCamera', '~> 2.4'
pod 'SDWebImage', '~> 4.0'
pod 'Nimbus/Models', :git => 'https://github.com/rambler-ios/nimbus'
pod 'Fabric', '~> 1.6'
pod 'Crashlytics', '~> 3.7'
pod 'PureLayout', '~> 3.0'
pod 'CrutchKit/Proxying', :git => 'https://github.com/CognitiveDisson/CrutchKit', :tag => '0.0.10'
pod 'EasyMapping', '~> 0.18'
pod 'libextobjc', '~> 0.4'
pod 'pop', '~> 1.0'
end
use_frameworks! breaks Nimbus. Also I tried to avoid problem with -framework flag in Other linker flag build setting of Pods project, but error is still here.
What CocoaPods and Xcode versions are you using?
xcode 8.2.1, cocoapods 1.2.0
You may need to go into your project file and manually add the pods paths into your FRAMEWORK_SEARCH_PATHS.
I tried to add "{PODS_ROOT}" and "${PODS_ROOT}/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit" manually to my project file, but received the same error. Also I tried to set OTHER_LDFLAGS as -framework for FBSDKLoginKit target.
I'll have to take a closer look later--can you open a new issue regarding using FirebaseUI without use_frameworks!?
I have the same error, your solution didn't help me. any other ideas how to fix that?
@Luckygirlllll can you open a new issue with your Podfile and pod install output?
Most helpful comment
I was able to repro this issue with your Podfile, thanks 馃憤
The issue goes away if you add
use_frameworks!to your Podfile. If you for whatever reason are unable to use frameworks, it looks like CocoaPods is adding-frameworkarguments to theOTHER_LDFLAGSbuild setting. You can work around it at the cost of CocoaPods producing ugly warnings by avoiding inheriting settings under Other Linker Flags.Possibly related to https://github.com/CocoaPods/CocoaPods/issues/6065, though this could also be misconfiguration on our part.