I added a WatchKit Extension to my project (already using cocoapods).
Then I updated the podfile to fit the new target:
platform:ios, '8.0'
use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
link_with 'my-team-ios', 'My Team WatchKit Extension'
def shared_pods
pod 'DOSingleton'
pod 'JSONModel'
pod 'MagicalRecord'
end
target :'My App' do
shared_pods
pod 'Facebook-iOS-SDK', '~> 3.23.1'
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
... some more pods here...
end
target :'My Team WatchKit Extension' do
shared_pods
end
But when I then try to build the project, I get this error:
ld: framework not found Pods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here you can find a stackoverflow question about this problem:
http://stackoverflow.com/questions/29519536/cocoa-pods-and-watchkit-extesion?noredirect=1#comment47207676_29519536
This might be a problem with deintegration of the old targets - can you try running cocoapods-deintegrate and then pod install again?
I tried this, but the result keeps the same :(
I think, that I solved this...
There was an old entry in "Linked Frameworks and Libraries". I removed this entry and this error is gone...
But the next one arrived :(
Now I have a lot "redefinition" errors for all pods, that I defined in "shared_pods"...
Any Ides, what this could be?
@Urkman does getting rid of that link_with line fix anything for you?
Also with removing link_with no changes :(
I found a "temporally solution" for me:
Switch back to CocoaPods 0.35
Now everything is working fine, with our any changes to my project / pod file (except removing the 'use_frameworks!')
I think, that should not be the final solution here...
A short test by upgrading again to 0.36 raises the same problem as before...
So, I've tried to reproduce the problem with an empty project that has your target setup and the Podfile you have shared. Unfortunately, this did not yield any of the errors you are getting.
There has to be additional settings done either by you or older versions of CocoaPods which contribute here. You will have to give us a project which reproduces this to go further.
I also tried to reproduce it using am empty project with no luck :(
So there seems to be some settings in my pp, that could cause this...
Do you have any suggestions, where I can look?
would start by making sure OTHER_LDFLAGS isn't overwritten with unnecessary things, both in the project and the targets.
Anyways, since this is not a CocoaPods issue, we can close it.
I think, that this _is_ an CocoaPods Issue, as the problems only exits in files, that are included via CocoaPods. And when I move back to 0.35.x the problems are solved...
It sounds more like a configuration issue that is affecting CP's project settings.
In any case, we need to be able to reproduce it to fix. We can reopen it if you find anything more.
I just ran into the same issue. I did everything you said, plus delete the pod.lock and workspace file. I needed to edit the project.pbxproj and remove Pod references. This started to happen when I moved my pods outside of the target in my Podfile and then back in. Then I was getting this:
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Starter App` to `Pods/Target Support Files/Pods/Pods.debug.xcconfig` or include the `Pods/Target Support Files/Pods/Pods.debug.xcconfig` in your build configuration.
Then I had added the link_with stuff and things got more screwed up. So nuking my pods and editing the project.pdxproj was the only solution, I also removed the link_with. I tried to reproduce this and then I got a different error:
Pods/Target Support Files/Pods/Pods-frameworks.sh: No such file or directory
What I meant by moving a pod outside a target was this:
platform :ios, '8.0'
use_frameworks!
pod 'Quick', '~> 0.3'
target 'Starter App' do
pod 'TPKeyboardAvoiding', '~> 1.2'
end
target 'Starter AppTests' do
pod 'Mockingjay', '~> 0.2'
end
Then after I moved it back it would seem find until I tried testing or doing a clean.
Running into same issue with 0.36. Going back to 0.35 fixed it. Did not try with 0.37 yet.
I have a similar problem. Trying to add EasyMapping through CocoaPods, have 3 watchkit extensions targets that are complaining that
Same issue here!
See https://github.com/CocoaPods/CocoaPods/issues/3382#issuecomment-93221301
It won't help anyone if you post that you are having the same problem without giving additional information on how to reproduce it.
Also problems with WatchKit Extension on a working app using cocoapods and Spark-SDK (in pods library). This is an Objective C SDK for accessing the Particle.io cloud service. All was working fine with a straight up IOS Swift app on iPhone.
Added a watch kit extension
I get three errors. they are:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SparkCloud", referenced from:
__TMaCSo10SparkCloud in InterfaceController.o
"_OBJC_CLASS_$_SparkDevice", referenced from:
__TMaCSo11SparkDevice in InterfaceController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone have a suggestion for further steps that may allow the project to compile?
I have created a bridging header file for both the watchkit extension and the watchkit app and have linked libPods.a in Linked Frameworks and Libraries for each, and run pod update successfully.
I hope that is enough information to get some help with WatchKit.
For what it's worth...
I got this error after I had added target ... do with use_frameworks! in my Podfile, and then removed it. It had added the framework into the Build Phases of my project and I guess cocoapods didn't remove it when I removed that target code from my Podfile.
i don't know why i got such error:
Pods-frameworks.sh: No such file or directory
this is my Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'XiaoDuanTest' do
pod 'Alamofire', '~> 1.3'
pod 'TagListView'
end
target 'XiaoDuanTestTests' do
end
i have try 0.38.2, 0.37, 0.36 versions, but the error never give up.....
You are editing with a text editor so the single quotes are the wrong ascii character. Use the excise editor to create a new file. Do not use that file.
Bendrix Bailey
508 314-7772
On Sep 18, 2015, at 4:19 AM, zhonghh13 [email protected] wrote:
i don't know why i got such error:
Pods-frameworks.sh: No such file or directory
this is my Podfilesource 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!target 'XiaoDuanTest' do
pod 'Alamofire', '~> 1.3'
pod 'TagListView'end
target 'XiaoDuanTestTests' do
end
i have try 0.38.2, 0.37, 0.36 versions, but the error never give up.....—
Reply to this email directly or view it on GitHub.
I was confused by this error, "Library not found for -lAFNetworking Error" all day long,
I had tried kinds of pod version , finally, i solved it by using version 0.35.0.
Hello,
I have one question regarding use pod library in watch app extension. I would be very grateful if I could get help from you.
I want to add MMWormhole pod library in the watch extension.
My pod file is similar to the above pod file.
I also add libMMWormhole.a in the Link Binary with libraries of Watch extension target.
But it is still showing NO SUCHMODULE 'MMWormhole' error in the InterfaceController of watch app.
Thanks
Just Remove def end, use link_with alone will solve the problem
eg :
link_with 'Project','ProjectTests'
pod 'Alamofire'
target 'Project' do
end
target 'ProjectTests' do
end
Hope this will Helps !!
Getting this error
ld: framework not found Alamofire
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Trying cocoapods for the first time this morning.
sudo gem install cocoapods
pod setup
My Podfile looks like this:
xcodeproj '/Users/adamek/Development/xCode/Swift_2015/Foody16/Foody16.xcodeproj'
platform :ios, '8.0'
use_frameworks!
pod 'SwiftyDropbox', :git => '[email protected]:dropbox/SwiftyDropbox.git', :tag => '0.5'
link_with 'Foody16'
pod 'Alamofire'
target 'Foody16' do
end
The last few lines I added based on the previous comment in this thread.
pod install returns this:
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using Alamofire (2.0.2)
Using SwiftyDropbox (0.5)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
Any suggestions?
I am having exactly the same trouble integrating MMWormhole into my project. I am using pod 0.39
platform :ios, '8.0'
use_frameworks!
target 'Sloth' do
pod 'MMWormhole'
... more pods ...
end
target 'Watch Extension' do
pod 'MMWormhole'
end
ld: framework not found MMWormhole
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I think this is a cocoapod issue.
No sloth
@KinaMarie Thanks but I've checked that already. My target is called "Watch Extension" without sloth. Also cocoapod would not update/install if it detects invalid target name.
Ok just an update I've managed to get everything working after clean, remove the xcworkspace and .lock file. @KinaMarie Thanks for the help anyway.
Same issue here. It is simple to reproduce within 2 minutes:
I created a plain test-project and published it on github if anyone is interested.
@itinance Thanks for the reproducible example, we are tracking some required changes regarding application extensions (including the ones for watch apps) in #4203
The same issue here when I used watch app extension.
target 'Watchapp Extension' do
use_frameworks!
platform :watchos, '3.1'
pod 'Kingfisher', '~> 3.0'
end
some one got it how to resolve that issue?
@Radunani, I faced the same issue and found this thread.
What helped in my case was to add a "platform" parameter with corresponding value to my WatchKit Extension target in Podfile:

Thanks, vmalyi. Just encountered this problem with cocoapods 1.5.3
The following did not work:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
use_frameworks!
target 'TVRemote' do
pod 'Alamofire'
pod 'EPCSpinnerView'
pod "AsyncSwift"
end
target 'TVRemoteWatch Extension' do
pod 'Alamofire'
end
but the following indeed does:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'TVRemote' do
platform :ios, '11.0'
pod 'Alamofire'
pod 'EPCSpinnerView'
pod "AsyncSwift"
end
target 'TVRemoteWatch Extension' do
platform :watchos, '4.3'
pod 'Alamofire'
end
@Dan2552 thank you so much. Solved problem for my project defining platform for each individual target, deleting workspace and lock file
@Dan2552 Thanks so much for your solution. I fought this problem for hours before stumbling upon your post. It solved my issue perfectly.
Most helpful comment
@Radunani, I faced the same issue and found this thread.
What helped in my case was to add a "platform" parameter with corresponding value to my WatchKit Extension target in Podfile: