Dansp
Dansp

Reputation: 1745

linker command failed with exit code 1 (use -v to see invocation) with cocoapods swift

I'm trying to compile my project in swift with cocoapods and I'm getting this error:

ld: warning: directory not found for option '-F/Users/platis/Library/Developer/Xcode/DerivedData/Platis-dazbrsqztcftsbapiewpxklnxdhp/Build/Products/Debug-iphonesimulator/ToastSwift'
ld: framework not found ToastSwift
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm trying to install ToastSwift from this

Upvotes: 2

Views: 1585

Answers (2)

Dansp
Dansp

Reputation: 1745

I solved the problem deleting your derived data folder, rebuilding and opening .xcworkspace instead .xcodeproj

Upvotes: 0

BaseZen
BaseZen

Reputation: 8718

When you use a CocoaPod, it creates a new launch file: Project.xcworkspace

Only this file contains the Pod configuration. Technically speaking a workspace is a collection of projects; each Pod gets its own project because every Pod has its own configuration requirements and resources. You can no longer use the .xcodeproj to launch your project, otherwise none of the Pod information will be found.

If you fail to do this, you'll get all manner of compile and link errors.

You missed this line of the docs:

https://guides.cocoapods.org/using/using-cocoapods.html

Open the MyApp.xcworkspace that was created. This should be the file you use everyday to create your app.

Upvotes: 2

Related Questions