Latest 1.0.1
Homepage https://github.com/Xinguang/AlamofireSwiftyJSON
License MIT
Platforms ios 8.0, osx 10.11, tvos 9.0, watchos 2.0, requires ARC
Dependencies Alamofire, SwiftyJSON
Authors

Build Status
Swift version
Carthage compatible
CocoaPods compatible
SwiftLint
codecov.io
GitHub release


Easy way to use both Alamofire and SwiftyJSON

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 8.1+
  • Swift 3.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 1.1.0+ is required to build AlamofireSwiftyJSON.

To integrate AlamofireSwiftyJSON into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'AlamofireSwiftyJSON'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate AlamofireSwiftyJSON into your Xcode project using Carthage, specify it in your Cartfile:

github "Xinguang/AlamofireSwiftyJSON"

Run carthage update to build the framework and drag the built AlamofireSwiftyJSON.framework into your Xcode project.

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but AlamofireSwiftyJSON does support its use on supported platforms.

Once you have your Swift package set up, adding AlamofireSwiftyJSON as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .Package(url: "https://github.com/Xinguang/AlamofireSwiftyJSON.git", majorVersion: 1)
]

Usage

let URL = "http://httpbin.org/get"
Alamofire.request(URL, method: .get, parameters: ["foo": "bar"]).responseSwiftyJSON { response in
  print("###Success: (response.result.isSuccess)")
  //now response.result.value is SwiftyJSON.JSON type
  print("###Value: (response.result.value?["args"].array)")
}

Latest podspec

{
    "name": "AlamofireSwiftyJSON",
    "version": "1.0.1",
    "summary": "Alamofire extension for serialize Data to SwiftyJSON",
    "homepage": "https://github.com/Xinguang/AlamofireSwiftyJSON",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Xinguang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Xinguang/AlamofireSwiftyJSON.git",
        "tag": "1.0.1"
    },
    "documentation_url": "http://Xinguang.github.io/AlamofireSwiftyJSON/index.html",
    "platforms": {
        "ios": "8.0",
        "osx": "10.11",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "requires_arc": true,
    "source_files": "Source/*.swift",
    "dependencies": {
        "Alamofire": [
            "~> 4.0"
        ],
        "SwiftyJSON": [
            "~> 4.0"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This