So here's my procedure. I create a new Podfile
in the project directory, then I added the following
platform :ios, '9.0' use_frameworks! target 'CPod' do pod 'AFNetworking', '~> 2.5' pod 'ORStackView', '~> 2.0' pod 'SwiftyJSON', '~> 2.1' end
I fire off pod install
, and everything goes well, open up the xcworkspace
. I then go over to ViewController.swift
and if I try to import a pod I get No such module 'SwiftyJSON'
, if I were to do import SwiftyJSON
. Any ideas?
EDIT: SwiftyJSON is a Swift based module, not Obj-C
Cocoapods + SPM 🚀 Now your library supports both cocoa pods and SPM.
If you've used CocoaPods before, you probably know that the usual way to get started using it is by running pod init in the directory that contains the . xcproject file. Running this command creates a workspace that CocoaPods can use to manage the dependencies.
Try adding the Pods
framework to your build scheme and building the framework. After you've built it, build/run your project.
Steps:
Scheme menu > Manage Schemes > check Pods
> Close
Pods
from the scheme menu.Pods
.You must reopen project .xcworkspace file(not .xcodeproj) after install your podfile.
Happy Coding :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With