Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode linking error after updating to 8.0 version

Tags:

ios

swift

xcode8

My project isn't compiled with an error: linker command failed with exit code 1 (use -v to see invocation) and description

ld: .../Xcode/DerivedData/Acoustic-ejrjwtwpmnimpdaazezbknffdbim/Build/Products/Debug-iphonesimulator/Result.framework/Result compiled with newer version of Swift language (3.0) than previous files (2.0) for architecture x86_64 screenshot

The problem is with ReactiveCocoa framework, I think. It is added as a submodule to my project. I use only Objective-C and can't understand how to solve this problem.

like image 707
Rustam Kendzhaev Avatar asked Sep 14 '16 21:09

Rustam Kendzhaev


3 Answers

You need to update CocoaPods to a newer version supports XCode 8 (CocoaPods 1.1.0 or newer):

sudo gem install cocoapods

Then do a pod update to fix your dependencies that are not linking:

pod update

Delete the DerivedData folder for your project and rebuild, the link error should be gone.

like image 164
mbonness Avatar answered Oct 31 '22 20:10

mbonness


"You need to explicitly set the Use Legacy Swift Language Version flag on the CocoaPod target. This can be done by clicking on the Pods project, clicking on the RealmSwift target, going to the 'Build Settings' tab, and changing the flag to Yes."

To read more, go here

like image 24
Umit Kaya Avatar answered Oct 31 '22 20:10

Umit Kaya


I was facing the same issue but it was related to another framework not with Realm.

Project -> Target -> Use Legacy Swift Language Version -> Yes

enter image description here

like image 1
Dheeraj D Avatar answered Oct 31 '22 21:10

Dheeraj D