user8797533
user8797533

Reputation:

Linker command failed with exit code 1 (use -v to see invocation) after pod install in swift3

I want use the AFNetworking and SwiftyJSON libraries in my project

This is my pod file:

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'Kids' do

  pod 'GoogleMaps'
  pod 'GooglePlaces'
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
  pod 'SwiftyJSON'
  pod 'AFNetworking'
end 

After installing the pod file, I opened the .xcworkspace and added the framework target->linked framework and libraries. in swift file import the frameworks like:

import AFNetworking
import SwiftyJSON

when I build the project am getting the this error:

Linker command failed with exit code 1 (use -v to see invocation)

Upvotes: 0

Views: 337

Answers (2)

Cameron Porter
Cameron Porter

Reputation: 939

As a general rule, first thing to do when getting build errors is delete derived data:

Xcode -> Preferences -> Locations

click the grey arrow and remove the folder with your project name.

Also do a clean, Cmd+shift+k

In the past I've had pod errors that got solved by reinstalling the pod file using

pod install --repo-update 

Try that as well.

Upvotes: 1

Shezad
Shezad

Reputation: 756

try removing workspace,podfile.lock and pods folder and re-install pod.

Upvotes: 0

Related Questions