0

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)

Paulo Mattos
  • 18,845
  • 10
  • 77
  • 85

2 Answers2

1

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.

Cameron Porter
  • 801
  • 6
  • 15
0

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

Shezad
  • 756
  • 7
  • 14