Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Mach -O Linker command failed

random issue is happening

After updating my POD install, Xcode sprouted a new issue:

like image 497
Phoenix Haroz Avatar asked Nov 05 '15 03:11

Phoenix Haroz


5 Answers

Make sure you open the .xcworkspace file rather than the project file (.xcodeproj) when working with pods. That should solve the issue with linking.

like image 159
blackops Avatar answered Nov 12 '22 13:11

blackops


Some times you need just clean build. It helped me. To clean build go Product -> Clean

like image 34
MRustamzade Avatar answered Nov 12 '22 13:11

MRustamzade


There are several cases that cause this issue. At the moment, this question has no any accepted answer and also I found another solution for the same issue, I am posting my answer/experience here.

In you application, go to Target -> Build Settings, then you will find following attributes.

  • CLANG_WARN_INFINITE_RECURSION
  • CLANG_WARN_SUSPICIOUS_MOVE
  • GCC_NO_COMMON_BLOCKS

Set values for those as NO, then clean and build the project.

like image 42
AnujAroshA Avatar answered Nov 12 '22 11:11

AnujAroshA


Following steps helped me to get rid of this problem:

  1. Go to project path and remove Pods folder and Podfile.lock file.
  2. Reinstall pods again using "pod install" command.
  3. Open xcworkspace and clean it before running.

Hope it will save someone's time like it did for me.

like image 13
CMA Avatar answered Nov 12 '22 11:11

CMA


Close you project and go to project path and select your project with .xcworkspace instead of .xcodeproj. Reason your existing project doesn't contain any library you linked.

ss

like image 11
Naveen Kumar M Avatar answered Nov 12 '22 12:11

Naveen Kumar M