ld: framework not found Pods

IosXcodeCocoapods

Ios Problem Overview


I'm trying to add a framework to my IOS project but when I build I always got the same message :

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

I tried to remove my Pods directory and then run pod install I open the .xcworkspace like it is written in the logs on the pod install, I clean the project on xcode and then try to build but it won't works..

My podfile looks like this :

xcodeproj '/Users/guillaume/project/Mobile/iOS/FoodPin/FoodPin.xcodeproj'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'SwiftHTTP', '~> 0.9.2'

My version of xcode is 6.3.1

Thank you,

Ios Solutions


Solution 1 - Ios

In Project Navigator in the folder Pods I had a Pods.framework in there which was red. It was also present in Linked Frameworks and Libraries. I removed both references and the error disappeared.

TL;DR

Remove Pods.framework in:

  • Folder named Pods
  • Linked Frameworks and Libraries

Solution 2 - Ios

This is usually caused by having the .xcodeproj file open instead of .xcworkspace.

When you run 'pod install' for the first time, it will create an .xcworkspace file, which includes your original .xcodeproj and a Pods project. You'll need to close your .xcodeproj and open the .xcworkspace instead.

This is a common issue when creating a project through Xcode's new project wizard - I often forget that I'm not in a workspace, which is required to get Cocoapods to link correctly.

Solution 3 - Ios

Xcode 9, 10, 11, 11.5

install https://github.com/CocoaPods/cocoapods-deintegrate

pod deintegrate

then

pod install

Solution 4 - Ios

I cleared this error by deleting the red .framework files that were located in a folder Frameworks in the project navigator. I think this also automatically deleted corresponding red entries in the Linked Frameworks and Libraries section of the General settings.

I have been cleaning / reinstalling pods in order to fix another issue. Perhaps these red framework files and entries were just leftover from a previous pod install?

Solution 5 - Ios

I had a similar issue as

framework not found Pods_OneSignalNotificationServiceExtension

It was resolved by removing the following. Go to target OneSignalNotificationServiceExtension > Build Phases > Link Binary with Libraries and deleting Pods_OneSignalNotificationServiceExtension.framework It should be empty here. Hope this helps. Cheers.

Solution 6 - Ios

For who find this issue. I am using NativeScript and got the same error.

That happen becouse I opened the file .xcodeproj, but we must open the project by the file .xcworkspace.

Solution 7 - Ios

This happened to me after updating my Podfile and doing a pod update.

For some reason, I had a "Pods_[ProjectName]".framework file appear under my project under 'Targets' > General > Linked Frameworks and Libraries.

Deleting this and then clean/rebuilding fixed the issue.

Solution 8 - Ios

I was getting this error because i renamed my project and change the name of project in pod file too but my project was referring to old name which was not there and causing this error . I get rid of this by

pod deintegrate

followed by

pod install

Solution 9 - Ios

you should delete your project some file as this picture.

your should delete the pods.framework and pods mark red files

Solution 10 - Ios

Just Remove your .framework from the list of "Your Project->General->Linked Framework & Libraries".

Solution 11 - Ios

It's happened to me because I changed the Deployment Target in General but forgot to change the Deployment Target in Pods > General. Change the deployment target

Solution 12 - Ios

[Xcode 11.2.1]

For me it was different app target version in Podfile(platform :ios, '11.0') and in Xcode project file Xcode Deployment info.

It causing Archiving job fail in CI pipeline.

Matching both value fixed an issue! Hope this help anyone.

Solution 13 - Ios

In my case I can build it on devices and simulator but has the same errors when archiving. To solve it, I have to

  • remove Pods.framework
  • make sure Pods-<project-name>.framework is embedded

You will find the settings in TARGETS-->Linked Frameworks and Libraries.

Solution 14 - Ios

This issue was driving me crazy as it suddenly happened without doing any changes to the project. I've tried all suggested solutions in this thread (and other related) and none of them solved the problem.

The only thing that differed from my other projects (which compiled fine), was that this project name was containing an accent (a french accent, "é"). I've renamed the project and all related files, and it finally worked !

Maybe this is related to updating to Xcode 10, because this project was working well before...

EDIT : it also seems to failed when using a project with - in project name…

Solution 15 - Ios

In my case, after comparing the difference between a branch I knew built correctly, I noticed this line in my Podfile:

platform :ios, '11.0'

I had inadvertently up'd my target version from 10 to 11 while my targets in Xcode remained set to 10. Reverting back to 10 solved my issue for me.

Ensure your target iOS versions are properly set.

Solution 16 - Ios

Step 1 >The first thing that you will need to do is remove the Podfile, Podfile.lock, the Pods folder, and the generated workspace.

Step 2 >Next, in the .xcodeproj, remove the references to the Pods.xcconfig files and the libPods.a file.

Step 3 >Within the Build Phases project tab, delete the Check Pods Manifest.lock section (open),Copy Pods Resources section (bottom) and Embed Pod Resources(bottom).

Step4 >Remove Pods.framework.

The only thing you may want to do is include some of the libraries that you were using before. You can do this by simply draging whatever folders where in the pods folders into your project (I prefer to put them into my Supporting Files folder).

It worked for me.

Solution 17 - Ios

Using Xcode 8.3 the accepted answer didn't work for me. I had tried many other solutions but @Elliott Davies answer is what fixed it for me. I'm adding a screenshot for clarity. For some reason, Xcode was trying to link previous podfile setups that no longer existed. All I had to do was delete the extra references and everything worked.Screenshot of Xcode Linked Frameworks and Libraries

Solution 18 - Ios

After removing and updating pod I still had same issue.

I've found that previous developer put flag in 'Build Settings -> Other Linker Flags' with Framework name (in my case -framework 'OGVKit') that made the issue.

After deleting that flag, project builds properly.

Solution 19 - Ios

You're more than likely trying to get the pods to work into you project right? The only way to do so is by creating a separate project that uses CocoaPods.

Close all work-spaces that you are using.

Next, make sure you have your Podfile completely ready to go.

In the command line, wherever your file is, type the command:

pod deintegrate

Then, install your pod agian.

pod install or pod update

Now you can use your project's new workspace to develop from. Look for a file called .workspace. Use that file!

Here is a guide on using CocoaPods

Solution 20 - Ios

This is the way i fix my problem. and it now work when i writing this answer:

Firstly, i try all the most fix way above,

remove Pods_xxx.framework from the link libraries and framework in target's build phases is helpful, and the issue will disappear, but the coming problem is i can't import the Pods.framework anymore.

And Then, i try to reinit the xcworkspace config, so that i can figure out the real problem. so i run

pod deintergate

and then install my pod again:

pod install

this work prefectly, but the problem is still in there, but i figure out the real problem is the Pods_xxx.framworks not be compiled succeed by cocoapods build script. I think this is the true way to fix the problem.

Finally, i try to edit my project's scheme:

Pods scheme is not in edited

and i add Pods scheme into manage:

enter image description here

and build this Pods.framework separately, and you will find the Pods.framework icon become truly again:

enter image description here

> and i think now you have fix your "framework not found Pods_xxxx.framework" problem > but actually i have another problem coming:

enter image description here

so i go to the build setting, and edit the "Framework Search Path" with "${inherited}", and now all the problems goes out, cheer!!!!:)

enter image description here

Solution 21 - Ios

Other thing that solved my problem is to go under Target -> Build Settings -> Other linker Flags and delete the "-framework" and your framework "name".

It happened when i tried to remove a pod.

Solution 22 - Ios

in my case, my problem was the following: ld: framework not found UserMessagingPlatform.xcframework

for me, the solution was the following:

  1. open a finder window and go to the ios folder
  2. look for the following files:

Pods-[YOUR PROJECT NAME].release.xcconfig

Pods-[YOUR PROJECT NAME].debug.xcconfig

enter image description here

  1. open those files and remove the following text: -framework "UserMessagingPlatform.xcframework" in both files

Solution 23 - Ios

I did experience this problem because I did not set the platform correctly.

So in my macOS app I had the platform set to:

platform :ios

instead of

platform :osx

Solution 24 - Ios

In my case, there was a reference to the library I removed on

> Targets > Build Settings > Runpath Search Paths

Removing the library from Podfile and updating it obviously didn't remove it, so I had to do it manually and now everything works.

Solution 25 - Ios

None of the previous answers pointed out the root problem in my situation. So I hope this may be useful to someone else.

In my case I ended up having to edit my podfile at the root of my project. When I first created my podfile, swift static libraries were not supported. So I had been using use_frameworks! in my podfile under each of my targets as such:

BEFORE

...
target 'targetName' do
   use_frameworks!
   pod 'podName', '~> 0.2'
end

AFTER

...
target 'targetName' do
   pod 'podName', '~> 0.2'
end

I removed use_frameworks! from my podfile which kept installing the frameworks every time I ran pod install. After removing this line, make sure to run pod install again and remove any of the red .framework references from your Frameworks folder in Xcode. (Though mine appeared differently as attached below.)

Image of Removing .framework files that are no longer necessary

You can also read more about use_framework! here.

Solution 26 - Ios

I have resolved this issue.

delete these three files.

  1. Podfile.lock
  2. Pods folder
  3. .xcworkspace

Then open your project in terminal and run pod deintegrate command, and after then run pod install command

Solution 27 - Ios

I resolved this issue by selecting the project which downloaded from CocoaPods and built it, you can click Manage Schemes so that it can be appeared in Run bar. Then you can rebuild your project. Hope it help.

Solution 28 - Ios

I tried every answer on here and none of them worked. I ended up getting it working by upping the deployment target from 10.0 to 11.0. I have no idea why that fixed it, but I suspect it has to do with upgrading to Xcode 10.2.1.

Solution 29 - Ios

For me, the problem was about changing the deployment target. I changed it to 9.0+ but changing it to 11.0+ worked.

Solution 30 - Ios

I had the same issue after removing some pods from my project. First I have used pod deintegrate after that pod install in the terminal but didn't work for me. So I went to the second step inside my project Build Setting and on the Other Linker Flags option, I have found that the deleted frameworks are not removed so I removed them manually.

Solution 31 - Ios

If you opened .xcworkspace file and you still got the same error, delete all the contents of Pods directory and from command line write pod install to resolve the issue.

Solution 32 - Ios

Delete the frameworks folder created after pod install or update

Solution 33 - Ios

I resolved this by dragging .framework file to the Linked Framework and Libraries

Let say I was having this problem due to error FIRAnalyticsConnector not found and I just drag FIRAnalyticsConnector.framwork file to Linked Framework and Libraries and my problem solved

Solution 34 - Ios

maybe you suddenly open the wrong file of .xcodprj and you should open .xcworkspace

Solution 35 - Ios

Please check your Executable file inside .Framework like enter image description here

  1. The executable file name should like this without any extension.

  2. Some frameworks showing like this enter image description here

  3. Using Terminal goto .framework directory use below command lipo -create FrameworkName-x86_64 FrameworkName-armv7 FrameworkName-armv7s FrameworkName-i386 FrameworkName-arm64 -output FrameworkName

after creating single executable file delete this files enter image description here

Solution 36 - Ios

another great things is using this rule to disable the input & output paths of the CocoaPods script phases (Copy Frameworks & Copy Resources):

 install! 'cocoapods',
        :disable_input_output_paths => true

Solution 37 - Ios

In my case, I created the workspace before installing the pods, so when I installed the pods, the workspace included my project only, add the Pods project to your workspace, clean and rebuild solved the issue in my case

Solution 38 - Ios

For me, the problem was that in my main project, the build setting Build Active Architecture Only was set to NO, and in the Pods project, it was set to YES.

After setting both to be the same, it worked!

Solution 39 - Ios

In my case, I faced this problem because I used non-English character in project name.

Problem solved when I changed the project name and run install pod again.

Solution 40 - Ios

I used step -> go to the build setting of your target, and edit the "Framework Search Path" with "${inherited}", and now problems goes for FBLPromises.framework not found.

Solution 41 - Ios

My solution was

  1. delete the actually via pods removed and still error generating Framework in Xcode Target > Build Settings > Other linking flags (in the section linking)

  2. Close Xcode and after that run pod update

  3. Reopen Xcode and then run Product > Clean Build Folder in the menu

After that my project is running and compiling again!

Solution 42 - Ios

In my case just deleting Pods folder and running pod install solved the issue.

Solution 43 - Ios

In my case I added the new pod entry in pod file using double quote ( pod "xposd" ) which was causing issue. Try adding pod entry using single quotes just like this ( pod 'xpod' ) in your pod file.

Solution 44 - Ios

  1. pod init
  2. close current xcode project
  3. reopen xcode project with the xcworkspace suffix

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKa&#235;risView Question on Stackoverflow
Solution 1 - IosArbiturView Answer on Stackoverflow
Solution 2 - IosChris TrevarthenView Answer on Stackoverflow
Solution 3 - IosTedView Answer on Stackoverflow
Solution 4 - IostheblangView Answer on Stackoverflow
Solution 5 - IosSharukh MastanView Answer on Stackoverflow
Solution 6 - IoscalebeairesView Answer on Stackoverflow
Solution 7 - IosElliott DaviesView Answer on Stackoverflow
Solution 8 - IososamaView Answer on Stackoverflow
Solution 9 - IoslingyfhView Answer on Stackoverflow
Solution 10 - IosMd. IbrahimView Answer on Stackoverflow
Solution 11 - IosPenggunaView Answer on Stackoverflow
Solution 12 - IosHemantView Answer on Stackoverflow
Solution 13 - IosSeanChenseView Answer on Stackoverflow
Solution 14 - IosAnthoPakView Answer on Stackoverflow
Solution 15 - IosjoelsView Answer on Stackoverflow
Solution 16 - IosAlvin GeorgeView Answer on Stackoverflow
Solution 17 - IosjbryantView Answer on Stackoverflow
Solution 18 - IosBabacView Answer on Stackoverflow
Solution 19 - IosEmmanuel MbabaView Answer on Stackoverflow
Solution 20 - IosLevine VeblenView Answer on Stackoverflow
Solution 21 - Iosatacand1920View Answer on Stackoverflow
Solution 22 - IosDeysonView Answer on Stackoverflow
Solution 23 - IosBesiView Answer on Stackoverflow
Solution 24 - IosMarina AguilarView Answer on Stackoverflow
Solution 25 - Iosthe.giologistView Answer on Stackoverflow
Solution 26 - IosAkbar KhanView Answer on Stackoverflow
Solution 27 - IosvinhstevenView Answer on Stackoverflow
Solution 28 - IosSwindlerView Answer on Stackoverflow
Solution 29 - IosJoseph FrancisView Answer on Stackoverflow
Solution 30 - IosAli QaderiView Answer on Stackoverflow
Solution 31 - IosAlp AltunelView Answer on Stackoverflow
Solution 32 - IosXcoderView Answer on Stackoverflow
Solution 33 - IosSultan AliView Answer on Stackoverflow
Solution 34 - IosamirtutunchiView Answer on Stackoverflow
Solution 35 - IosPurnachandar Rao VoletiView Answer on Stackoverflow
Solution 36 - IosAlessio CampanelliView Answer on Stackoverflow
Solution 37 - IosYamanView Answer on Stackoverflow
Solution 38 - IosNoah NueblingView Answer on Stackoverflow
Solution 39 - IostorunView Answer on Stackoverflow
Solution 40 - IosRam G.View Answer on Stackoverflow
Solution 41 - IosCGNView Answer on Stackoverflow
Solution 42 - IosDavid ChanturiaView Answer on Stackoverflow
Solution 43 - IosAli NawazView Answer on Stackoverflow
Solution 44 - IoscaoyangleeView Answer on Stackoverflow