Cocoapods: Unable to Archive Swift Project with "ld: framework not found Pods" error

Created on 3 Jul 2015  路  8Comments  路  Source: CocoaPods/CocoaPods

I'm currently unable to archive my project as it fails with this error:

ld: framework not found Pods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Everything works fine on device & in the simulator. I've tried various incarnations of build phase changes, build settings, as well as various issue solutions found here and various other StackOverflow responses. I'm still not ruling out that this is a simple id10t error, but any help would be appreciated.

Podfile below:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.3'
use_frameworks!

link_with "<project-name>"

def shared_pods
  pod "SwiftyJSON", ">= 2.2"
  pod 'Alamofire'
  pod "Charts"
  pod "Locksmith"
end

target "<project-name>" do
  shared_pods
end

target "<project-name>Tests" do
  shared_pods
  pod "OHHTTPStubs"
end

If you need anymore information, please let me know. :+1:

Edit: Important to note, I also have ran pod deintegrate then pod install again to help "clean" things out.

Version of cocoapods is 0.37.2 (I also have tried the new beta build with no luck)

> gem list | grep cocoapods 
cocoapods (0.37.2)
cocoapods-core (0.37.2)
cocoapods-deintegrate (0.2.1)
cocoapods-downloader (0.9.1)
cocoapods-plugins (0.4.2)
cocoapods-trunk (0.6.1)
cocoapods-try (0.4.5)

Most helpful comment

@segiddins I unlinked Pods.framework, made sure that Pods_<project-name>.framework was embedded as well as linked, and everything built on device, simulator and archived.

Now, testflight is saying it's currently unavailable but I don't think that's related cocoapods :dancers:

Thanks again :)

All 8 comments

Ah I think the issue here is that you have the link_with outside of any target blocks, but there are no pods that aren't inside the target blocks. Getting rid of the link_with might just do the trick!

OK replaced my podfile with:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.3'
use_frameworks!

def shared_pods
  pod "SwiftyJSON", ">= 2.2"
  pod 'Alamofire'
  pod "Charts"
  pod "Locksmith"
end

target "<project-name>" do
  shared_pods
end


target "<project-name>Tests" do
  shared_pods
  pod "OHHTTPStubs"
end

Unfortunately, still no go. Same error as before.

ld: framework not found Pods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

That's really strange -- nothing should be trying to link against the Pods framework, as it clearly won't be created. If you just remove that link step, does it compile?

@segiddins I unlinked Pods.framework, made sure that Pods_<project-name>.framework was embedded as well as linked, and everything built on device, simulator and archived.

Now, testflight is saying it's currently unavailable but I don't think that's related cocoapods :dancers:

Thanks again :)

Sorry for the issues you were having :)

@segiddins please, totally fine. Comes with the job. Hopefully, this can help someone else if they come here from google. :)

Thank you very much. I have the same trouble with you. Just do as you said and everything is ok.
It saves my life.

Same issue, already FIXed by your solution THX!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steffendsommer picture steffendsommer  路  3Comments

tlandsmancars picture tlandsmancars  路  3Comments

soleares picture soleares  路  3Comments

Mingmingmew picture Mingmingmew  路  3Comments

sonu5 picture sonu5  路  3Comments