13

I've been trying to migrate my project to cocoapods.

I feel like i'm almost there but I'm stuck in:

ld: framework not found Firebase for architecture x86_64 error: linker command failed with exit code 1 (use -v to see invocation)

I'm trying to compile using my "app.xcworkspace" and the project looks like this:

project navigator

Also:

libraries

I've tried starting other projects and firebase works there so it's a problem with THIS project settings... Any idea?

My podfile looks like this:

# Uncomment this line to define a global platform for your project
# platform :ios, ‘8.0’
target 'Parti' do
 # Comment this line if you're not using Swift and don't want to use dynamic frameworks
 use_frameworks!
 # Pods for Parti
 pod 'Firebase'
 pod 'Firebase/Storage'
 pod 'Firebase/Auth'
 pod 'Firebase/Database'
 target 'PartiTests' do
 inherit! :search_paths
 # Pods for testing
 end
 target 'PartiUITests' do
 inherit! :search_paths
 # Pods for testing
 end
end

It might be relevant to add that the error happens when xcode tries to "Link /Users/myname/Library/Developer/Xcode/DerivedData/Parti-gsdsljzobcnqjkgutfpjasgrsfck/Build/Products/Debug-iphonesimulator/Parti.app/Parti"

asked Jul 7, 2016 at 12:45

6 Answers 6

13

I know it sounds far fetch, but:

  1. Clean the project. Product -> Clean
  2. Restart XCode (not always needed)
  3. Run pod update & pod installfrom the project folder

Update: The Podfile should more like:

 use_frameworks!
 target 'Parti' do
 pod 'Firebase'
 pod 'Firebase/Storage'
 pod 'Firebase/Auth'
 pod 'Firebase/Database'
 end
 target 'PartiUITests' do
 pod 'Firebase'
 pod 'Firebase/Storage'
 pod 'Firebase/Auth'
 pod 'Firebase/Database'
 end
answered Jul 7, 2016 at 13:00
Sign up to request clarification or add additional context in comments.

2 Comments

Try and this Podfile and repeat step 3
pod update && pod install worked for me, thanks :)
5

Make sure you have added $(inherited) in your Header Search Paths, Framework Search Paths and Library Search Paths for your project target.

Also make sure that in frameworks folder in your project file(Not in your Pods, click on the Project Name in the Project Navigator), the "libPods-YourProjectName.a" is not red. If yes, delete it and build again.

answered Jul 7, 2016 at 13:01

Comments

3

add $PROJECT_DIR/Pods (make it recursive)

to Framework search paths

for whatever reason only this helped me, maybe you too

answered Dec 1, 2016 at 20:52

Comments

1

Just found the answer. Seems like I had an old geofire version and the new one is not available as a Pod yet...

Github Issue link

Thank you for your answers.

answered Jul 13, 2016 at 18:19

Comments

0

Some hints :

  • Make sure that your Podfile is correct (did you forget to uncomment the use_frameworks! line ? Have you correctly added the pod ?)

  • Have you forgotten to run "pod install" ?

  • Have you tried cleaning the project and the build folder ?

answered Jul 7, 2016 at 13:01

1 Comment

Tried everything you said but cleaning of the build folder. Just did that and no luck.
0

Another possibility is your project name is not ASCII. For example, you may have Chinese characters in the name.

In such case, In "general" -> "Frameworks, Libraries, and Embedded Content", remove "Pods___.framework", and add the one with the right name under "Pods/" would help.

answered Mar 5, 2021 at 8:29

1 Comment

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.