You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


Overview

I want to add a JSON Web Token llibrary to my I am Rich application.


Prerequisite

We need to install cocoapods. 


> sudo gem install cocoapods

Fetching: cocoapods-core-1.5.3.gem (100%)
Successfully installed cocoapods-core-1.5.3
Fetching: cocoapods-downloader-1.2.1.gem (100%)
Successfully installed cocoapods-downloader-1.2.1
Fetching: molinillo-0.6.6.gem (100%)
Successfully installed molinillo-0.6.6
Fetching: atomos-0.1.3.gem (100%)
Successfully installed atomos-0.1.3
Fetching: nanaimo-0.2.6.gem (100%)
Successfully installed nanaimo-0.2.6
Fetching: xcodeproj-1.6.0.gem (100%)
Successfully installed xcodeproj-1.6.0
Fetching: cocoapods-1.5.3.gem (100%)
Successfully installed cocoapods-1.5.3
Parsing documentation for cocoapods-core-1.5.3
Installing ri documentation for cocoapods-core-1.5.3
Parsing documentation for cocoapods-downloader-1.2.1
Installing ri documentation for cocoapods-downloader-1.2.1
Parsing documentation for molinillo-0.6.6
Installing ri documentation for molinillo-0.6.6
Parsing documentation for atomos-0.1.3
Installing ri documentation for atomos-0.1.3
Parsing documentation for nanaimo-0.2.6
Installing ri documentation for nanaimo-0.2.6
Parsing documentation for xcodeproj-1.6.0
Installing ri documentation for xcodeproj-1.6.0
Parsing documentation for cocoapods-1.5.3
Installing ri documentation for cocoapods-1.5.3
Done installing documentation for cocoapods-core, cocoapods-downloader, molinillo, atomos, nanaimo, xcodeproj, cocoapods after 8 seconds
7 gems installed


Defining Podfile


> pod init
> vi 

Podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'KeystoneSDKDemo' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!


  # Pods for KeystoneSDKDemo
  pod 'JSONWebToken'

end



Running 

> pod install
Analyzing dependencies
Downloading dependencies
Installing JSONWebToken (2.2.0)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `I AM Rich.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.


Notice above that it says you need to use `I AM Rich.xcworkspace` instead of the `I AM Rich.xcodeproj`.



References

ReferenceURL
Cocoapods.orghttps://cocoapods.org/





  • No labels