22

when I run my project, I get errors like this: enter image description here

It seems that all frameworks in my cocoapods have problem. Is it my problem of my cocoapods? I have reinstalled my cocoapods, and used 'pod setup' or 'pod install' and others, but it doesn't work, and I still have the same errors... And in Xcode, red 'rd' on the 'Podfile' like this, I don't know if it is related to errors. enter image description here

pod 1.0.0 ruby 2.0.0 xcode 7.3.1 Anyone have the same problem?

Cœur
  • 37,241
  • 25
  • 195
  • 267
MeR8.
  • 223
  • 1
  • 2
  • 5
  • maybe clean derived data section of your xcode ? – Shubhank May 18 '16 at 04:18
  • something else: I can run other projects which depend on cocoapods, but my team's projects have this problem.My team's projects use my own Private Pods.This has influence on my problem? But I remove private pods from Podfile,it still have same errors... – MeR8. May 18 '16 at 04:24
  • you can try to de-integrate Pod and try to integrate it later. Here is de-integrate script: https://github.com/CocoaPods/cocoapods-deintegrate – Tien May 18 '16 at 04:24
  • @Shubhank It doesn't work, even I reinstall my OS .. – MeR8. May 18 '16 at 04:26
  • 1
    This solved it for me: https://stackoverflow.com/questions/52232100/invalid-bitcode-version-producer-902-0-39-2-0-reader-900-0-37-0 – Laith May 25 '19 at 02:24
  • In my case this was an issue with the latest Toolchain I installed, I switched back to Xcode 10 toolchain (default) everything went back to normal and error went away – Libby Lebyane Sep 26 '20 at 13:36

16 Answers16

39

This worked for me:

pod deintegrate 
pod install 
Pang
  • 9,564
  • 146
  • 81
  • 122
ashif-ismail
  • 1,037
  • 17
  • 34
37

I faced similar problem in my project. After hours of searching I found that in GENERAL settings of the project in section "Linked Frameworks and Libraries" there are two files for pods: "libPods.a" and "Pods_ProjectName.framework"

Deleting "libPods.a" helped in my case.

Linked Frameworks and Libraries

Bastek
  • 899
  • 1
  • 12
  • 27
  • just want to say thank you, this was my issue. I had yarn removed a library but i still needed to remove it from this linked frameworks tab :) – Jordan Lewallen May 07 '18 at 21:13
  • @Bastek Actually taking a out for Unity.Where to find the settings? I cant find. Using Xcode 10 – zyonneo Aug 01 '18 at 08:56
  • @zyonneo select your project file in the left pane, you should see settings – Bastek Aug 01 '18 at 09:02
  • @Bastek What do you mean by settings? Is it folder view similar to the image added by the the person who asked this question.I have the exact same view and I cant find the Pod folder – zyonneo Aug 01 '18 at 09:09
  • @zyonneo I mean general project settings. In the question example I mean click on the "Pacs" project file on top, there you should see all settings. – Bastek Aug 01 '18 at 09:12
  • @Bastek I found out the Linke Frameworks and Librabries but no luck.There is no libPods.a or Pods_Sport.framework – zyonneo Aug 01 '18 at 09:16
  • @Bastek Pls have a look...https://stackoverflow.com/questions/51629954/how-to-solve-an-error-linker-command-failed-with-exit-code-1-use-v-to-see-inv – zyonneo Aug 01 '18 at 09:37
10

Actually issue is related to dependency management for xcode project. You can refer below answer link for solving "linker issue" in xcode. That worked for me.

https://stackoverflow.com/a/38371271/6827175

Pawan Korade
  • 101
  • 1
  • 2
  • 7
8

There are can be a few different cases;

Also, it would help to know all information from your print screen :)

Have you tried to clean your delivery data ?

  1. Go to Xcode -> Preferences -> Open "Location Menu" -> Open Folder With DeliveryData

  2. Close your XCode;(even go to "Force Quit.." menu and close XCode there);

  3. Clean trash bin;

  4. And try build again.

Second case:

  1. Open your target -> Build Settings -> Build Active Architecture Only-> set "No" option
  2. Do the same with all your pods' target
Y.R.
  • 106
  • 3
6

Try to deleting Podfile.lock file and Pods folder. Then try to pods install.

Prasann
  • 135
  • 1
  • 9
Mahesh Verma
  • 174
  • 14
3

I spent 2 days to find the real culprit. It turns out that I tried to run the "Project" instead of running the "Workspace". How this will help others!

nfek
  • 31
  • 2
2

I changed Deployment target from 10.0 to 11.0, and this work !

enter image description here

  • I had this issue. In my case it was a react-native app added Firebase Analytics. As of July 2018, all apps must be built with iOS 11 per Apple: developer.apple.com/ios/submit/ Once I went to my General tab and scrolled down to Deployment Info / Deployment Target and changed it from 10.x which is what I was targeting, to 11.x - the app built/archived and I was able to submit. – bo_ Jul 31 '18 at 01:26
  • Literally spent my whole weekend banging my head over this issue. This worked. Thank you – Daniel Espina Feb 04 '19 at 18:08
1

First, you need to check your Xcode version and than check pod version which you installed. If your Xcode version under 9.0 then you should reinstall pod with but old version not latest. It will work.

M Reza
  • 18,350
  • 14
  • 66
  • 71
Prasann
  • 135
  • 1
  • 9
1

In my case, I plugged out my real device but in the simulator still it looks Generic iOS device. So I changed it with some simulator and it is fixed.

atalayasa
  • 3,310
  • 25
  • 42
1

in my case i changed run simulator to iphone x with ios 11.4 , then it compailed and run OK , then i run in iphone 4s with ios 9.3 , and it wont got error

i think probably issue is in ui test and unit testing components , i hope that apple fix them

Mohammad Reza Koohkan
  • 1,656
  • 1
  • 16
  • 36
1

I had this issue in test project just make sure that the project has valid host application enter image description here

Abdullah Tahan
  • 1,963
  • 17
  • 28
0

Same issues here. I had not made any changes other than adding some icons to the project. After a few hours of clicking around, I clicked on the pods project and changed the search path to Yes. That solved it for me. Screen shot of Xcode

Spidy
  • 1,137
  • 3
  • 28
  • 48
Belga
  • 1
  • 2
0

This happened to my project because I used Admob in my Unity project and then build it for iOS. I did not note that Unity-iPhone.xcworkspace is created to open instead of Unity-iPhone.xcodeproj. I was keep opening Unity-iPhone.xcodeproj and it was giving the error. Opening the project with Unity-iPhone.xcworkspace fixed the problem for me.

Maihan Nijat
  • 9,054
  • 11
  • 62
  • 110
0

Workspace Setting and change Build System to Legacy Build System worked for me

Thanh Cao
  • 151
  • 5
0

If you selected Legacy Build System so change that because this has deprecated from xcode so use pod deintegrate pod install

0

Quick Fix worked for me

  1. File -> New -> File

enter image description here

  1. Create a swift file

enter image description here

  1. Confirm Create Bridging Header enter image description here

  2. Go to Build Settings and set Always Embed Swift Standard Libraries to YES enter image description here

  3. pod deintegrate

  4. pod install

Answer from AlVelig answer

Wasi Sadman
  • 1,382
  • 1
  • 15
  • 27