Apple Mach-O Linker Error on Xcode 8 when using CocoaPods and Git -


i've had happen me twice in last few months. solution obvious , easy, took me while remember since current s.o. questions , solutions found on error didn't work. hopefully, title others target specific situation have. @ least, remind me when error occurs again!

if added new library (via cocoapods or manually), , switched branch not have it, following error:

error #1: apple mach-o linker error: linker command failed exit code ... linker command failed exit code 1 (use -v see invocation)

what happening

i never git commit installed cocoapods; podfile. so, when change branches installed pods dir out of sync podfile.

the solution

simple re-run pod install or bundle exec pod install command. clean project, , run again.

update

lesson no. 2:

sometimes may forget removed framework file or did not check in. cause linker flag problem when cloning else or checking out new branch. check frameworks folder red text clue.

most importantly, right click on linker flag error , "show logs". may give clue part of project creating linker issue.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -