Alamofire extension for serialize NSData to SwiftyJSON

Overview

Alamofire-SwiftyJSON

An extension to make serializing Alamofire's response with SwiftyJSON easily.

⚠️ To use with Swift 3.x please ensure you are using >= 2.0.0 ⚠️

⚠️ To use with Swift 4.x please ensure you are using >= 3.0.0 ⚠️

Swift version

Alamofire-SwiftyJSON Swift version Alamofire SwiftyJSON
2.x Swift 3.x 4.x 3.x
3.x Swift 4.x 4.5.x 4.x

Requirements

  • iOS 8.0+ / Mac OS X 10.9+
  • Xcode 8.0+
  • Swift 3.0+

Install

CocoaPods:

pod 'Alamofire-SwiftyJSON'

Carthage:

github "SwiftyJSON/Alamofire-SwiftyJSON" "master"

Usage

import Alamofire_SwiftyJSON
Alamofire.request(URL, method: .get, parameters: parameters, encoding: URLEncoding.default)
         .responseSwiftyJSON { dataResponse in
                     print(dataResponse.request)
                     print(dataResponse.response)
                     print(dataResponse.error)
                     print(dataResponse.value)
                  })
Comments
  • Ambiguous use of 'responseSwiftyJSON'

    Ambiguous use of 'responseSwiftyJSON'

    Hello,

    after installing Xcode 6.3 the following code

    Alamofire .request(.POST, url, parameters: data) .responseSwiftyJSON { (_, _, json, error) in
        if (error != nil) {
            println("Error with registration: \(error?.localizedDescription)")
         } else {
            println("Success!")
        }
    }
    

    produces the problem "Ambiguous use of 'responseSwiftyJSON'".

    opened by valzevul 21
  • Push to cocoapods

    Push to cocoapods

    I see there is a podspec file but Alamofire-SwiftyJSON is not a available on cocoapods.org. It seems to be possible to have swift dependencies on cocoapods using cocoapods 0.36.0.

    Could you push it?

    opened by erkie 21
  • Cannot call value of non-function type NSHTTPURLResponse

    Cannot call value of non-function type NSHTTPURLResponse

    Hello ! I have installed Alamofire 3.0 and SwiftyJSON 2.3 via CocoaPods and then I have just brough Alamofire-SwiftyJSON manually in my XCode project.

    When I try building it I get an error on line 40 in Alamofire-SwiftyJSON.swift yelling at me like the following:

    Cannot call value of non-function type NSHTTPURLResponse

    Any idea how to fix this ?

    opened by edi 5
  • SwiftyJSON @ 11fdc5c doesn't exist

    SwiftyJSON @ 11fdc5c doesn't exist

    I'm trying to use this repo in CocoaPods but there's an error retrieving the mentioned version of SwiftyJSON. I think it's just matter of pointing to the right tree.

    opened by gabovanlugo 5
  • Allow parsing even when there was an error

    Allow parsing even when there was an error

    If there's a error with the request (e.g. 400 Bad Request, 401 Unauthorised) there still might be valid JSON in the response (e.g. an error message from the API) that has been serialised by JSONResponseSerializer.

    This code change allows a JSON object to be created, instead of using nullJSON.

    opened by rhodgkins 5
  • 'JSON' is not convertible to 'JSON'

    'JSON' is not convertible to 'JSON'

    I added the files of all the 3 Projects (alamofire, swiftyjson, alamofire-swiftyjson) to my project. When launching the app i get a compile error in:

    /Users/ABCDEF/Documents/ios/Stream/Libraries/Alamofire-SwiftyJSON/Alamofire-SwiftyJSON.swift:51:47: 'JSON' is not convertible to 'JSON'

    Does someone have any hints how to integrate the projects to a custom project?

    Thanks in advance. Greetings

    opened by escv 5
  • update cocoapods package name

    update cocoapods package name

    'Alamofire-SwiftyJSON' is deprecated.

    I found it:

    pod search Alamofire-SwiftyJSON
    Creating search index for spec repo 'master'.. Done!
    
    -> Alamofire-SwiftyJSON (0.1.1) [DEPRECATED in favor of AlamofireSwiftyJSON]
       Alamofire extension for serialize NSData to SwiftyJSON
       pod 'Alamofire-SwiftyJSON', '~> 0.1.1'
       - Homepage: https://github.com/starboychina/AlamofireSwiftyJSON
       - Source:   https://github.com/starboychina/AlamofireSwiftyJSON.git
       - Versions: 0.1.1 [master repo]
    
    opened by AknEp 4
  • No such module

    No such module "Alamofire" if I open the example project.

    When I open the example project it says no such module 'Alamofire'. I've tried a few things (restarting Xcode, adding Alarmofire.swift) but can't fix it. schermafbeelding 2014-11-05 om 08 31 45

    opened by samuelbeek 4
  • Ambigous Error in Swift 1.2

    Ambigous Error in Swift 1.2

    在 Swift 1.2中下面两个方法的签名是等价的:

       public func responseSwiftyJSON(completionHandler: (NSURLRequest, NSHTTPURLResponse?, JSON, NSError?) -> Void) -> Self 
    // VS
        public func responseSwiftyJSON(queue: dispatch_queue_t? = nil, options: NSJSONReadingOptions = .AllowFragments, completionHandler: (NSURLRequest, NSHTTPURLResponse?, JSON, NSError?) -> Void) -> Self 
    
    
    opened by codetalks-new 3
  • Add dependencies to the podspec

    Add dependencies to the podspec

    You should be able to use this library right away without adding more dependencies and without needing to know which versions of Alamofire and SwiftyJSON are required.

    opened by koraktor 3
  • Support for Carthage

    Support for Carthage

    I'm not sure if there is support, but when I add to my Cartfile the line github "SwiftyJSON/Alamofire-SwiftyJSON", I get the error:

    *** Skipped building Alamofire-SwiftyJSON due to the error:
    Dependency "Alamofire-SwiftyJSON" has no shared framework schemes
    
    If you believe this to be an error, please file an issue with the maintainers at https://github.com/SwiftyJSON/Alamofire-SwiftyJSON/issues/new
    
    opened by perryprog 2
  • Xcode 11, Swift 5.1 Alamofire 5.0.0-rc.2, SwiftyJSON 5.0.0

    Xcode 11, Swift 5.1 Alamofire 5.0.0-rc.2, SwiftyJSON 5.0.0

    • Migrated project to use Cocoapods and removed empty folders and .gitmodules
    • Migrated .swift-version file to use s.swift_version on podspec
    • Migrated project settings to Xcode 11 recommended
    • Updated Readme
    • Set the version to 4.0.0
    • Improved the code slightly
    • Updated .travis.yml
    • Added README, Podspec, and Travis to .xcodeproj
    opened by kuyazee 0
  • Can't compile with Xcode 10.2

    Can't compile with Xcode 10.2

    Xcode 10.2 was released today, which made Swift 5 the latest version, and dropped support for Swift 3. However, this project's Swift version is still set to Swift 3, so this project can't be compiled with Xcode 10.2 or be used with Swift 5 targets

    opened by raysarebest 3
  • Please update to support SwiftyJSON & Alamofire-SwiftyJSON with swift4.2 in a development pod.

    Please update to support SwiftyJSON & Alamofire-SwiftyJSON with swift4.2 in a development pod.

    Alamofire-SwiftyJSON depends on SwiftyJSON 4.0.0 so I am unable to move to SwiftyJSON 4.2.0 in my development pod.

    Can you update the podspec of Alamofire-SwiftyJSON to refrence SwiftyJSON 4.2.0?

    Thanks.

    opened by mkoorn 0
Releases(3.0.0)
  • 3.0.0(May 22, 2018)

  • 2.0.0-beta.1(Feb 25, 2017)

    This is the first beta pre-release version of Alamofire-SwiftyJSON 2.0.0.

    Compatible with Swift 3.0.2, SwiftyJSON 3.0+ and Alamofire 4.0+.

    Much special thanks @jregnauld, @rokgregoric and @wongzigii for their works. 🎉🎉

    Source code(tar.gz)
    Source code(zip)
Owner
SwiftyJSON
SwiftyJSON
Bamboots - Extension 4 Alamofire

Bamboots is a network request framework based on Alamofire , aiming at making network request easier for business development. Protocols Features Requ

mmoaay 442 Dec 22, 2022
An Alamofire extension which converts JSON response data into swift objects using EVReflection

AlamofireJsonToObjects ?? This is now a subspec of EVReflection and the code is maintained there. ?? You can install it as a subspec like this: use_fr

Edwin Vermeer 161 Sep 29, 2022
A network extension app to block a user input URI. Meant as a network extension filter proof of concept.

URIBlockNE A network extension app to block a user input URI. Meant as a network extension filter proof of concept. This is just a research effort to

Charles Edge 5 Oct 17, 2022
Lightweight network abstraction layer, written on top of Alamofire

TRON is a lightweight network abstraction layer, built on top of Alamofire. It can be used to dramatically simplify interacting with RESTful JSON web-

MLSDev 528 Dec 26, 2022
Restofire is a protocol oriented networking client for Alamofire

Restofire is a protocol oriented networking client for Alamofire. Features Requirements Installation Usage License Features Global Configuration for h

Restofire 381 Sep 29, 2022
A progressive download manager for Alamofire

ALDownloadManager A progressive download manager for Alamofire (Alamofire下载器) The default support breakpoint continues. Sequential Download(顺序下载 ) Dow

null 48 May 1, 2022
Alamofire network layer

NVNetworkRequest Alamofire network layer Installation Add this to your Package dependencies: dependencies: [ .package(url: "https://github.com/vin

Vinh Nguyen 0 Nov 19, 2021
Advanced Networking Layer Using Alamofire with Unit Testing

Advanced Networking Layer Using Alamofire with Unit Testing

Ali Fayed 8 May 23, 2022
Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing)

⚠ Important Notice: Farewell ws... hello Networking ! Networking is the next generation of the ws project. Think of it as ws 2.0 built for iOS13. It u

Fresh 351 Oct 2, 2022
Simple REST Client based on RxSwift and Alamofire.

RxRestClient Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 10.0+ tvOS 10.

STDev 16 Nov 19, 2022
EasyImplementationAlamoFire - An iOS project to demonstrate the usage of Alamofire in an efficient and organised way.

EasyImplementationAlamoFire Tutorial to demonstrate an efficient way of handling the APIs structure for your iOS Applications. Prerequisites Swift 5 X

null 0 Jan 3, 2022
Simple REST Client based on RxSwift and Alamofire.

RxRestClient Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 10.0+ tvOS 10.

STDev 16 Nov 19, 2022
Alamofire Network Layer written in swift 5 using the protocol oriented, combine, UIKit, MVVM.

CoreAPI-iOS This project Contains Alamofire Network layer Based on Protocol Oriented Concept and Combine Framework. It is created with UIKit, Alamofir

Mehran Kamalifard 27 Nov 11, 2022
A frida tool that capture GET/POST HTTP requests of iOS Swift library 'Alamofire' and disable SSL Pinning.

FridaHookSwiftAlamofire A frida tool that capture GET/POST HTTP requests of iOS Swift library 'Alamofire' and disable SSL Pinning. 中文文档及过程 Features Ca

neilwu 69 Dec 16, 2022
A toolkit for Network Extension Framework

NEKit NEKit is deprecated. It should still work but I'm not intent on maintaining it anymore. It has many flaws and needs a revamp to be a high-qualit

zhuhaow 2.8k Jan 2, 2023
Extension URLRequest With Swift

JHURLRequest extension URLRequest Example func test1() { let url = "https://httpbin.org/get" let dic: [String: Any] = [ "name": "Lilei

HaoCold 1 Dec 16, 2021
A Codable extension to decode arrays and to catch & log all decoding failures

SafeDecoder A Codable extension to decode arrays and to catch & log all decoding failures Features SafeDecoder makes two improvements for Codable mode

Idle Hands Apps 5 May 29, 2022
Swift library that makes easier to serialize the user's preferences (app's settings) with system User Defaults or Property List file on disk.

PersistentStorageSerializable PersistentStorageSerializable is a protocol for automatic serialization and deserialization of Swift class, struct or NS

Ivan Rublev 163 Jun 3, 2021
Monaka convert custom struct to NSData.

Monaka Overview Monaka convert custom struct and fundamental values to NSData (also nested array and dictionary). Purpose You can persistent store of

Naruki Chigira 22 Oct 29, 2020
A protocol to serialize Swift structs and classes for encoding and decoding.

Serpent (previously known as Serializable) is a framework made for creating model objects or structs that can be easily serialized and deserialized fr

Nodes - iOS 287 Nov 11, 2022