Elegant HTTP Networking in Swift

Overview

Alamofire: Elegant Networking in Swift

Build Status CocoaPods Compatible Carthage Compatible Platform Twitter Gitter Open Source Helpers

Alamofire is an HTTP networking library written in Swift.

Features

  • Chainable Request / Response Methods
  • Combine Support
  • URL / JSON Parameter Encoding
  • Upload File / Data / Stream / MultipartFormData
  • Download File using Request or Resume Data
  • Authentication with URLCredential
  • HTTP Response Validation
  • Upload and Download Progress Closures with Progress
  • cURL Command Output
  • Dynamically Adapt and Retry Requests
  • TLS Certificate and Public Key Pinning
  • Network Reachability
  • Comprehensive Unit and Integration Test Coverage
  • Complete Documentation

Component Libraries

In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the Alamofire Software Foundation to bring additional functionality to the Alamofire ecosystem.

  • AlamofireImage - An image library including image response serializers, UIImage and UIImageView extensions, custom image filters, an auto-purging in-memory cache, and a priority-based image downloading system.
  • AlamofireNetworkActivityIndicator - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support URLSession instances not managed by Alamofire.

Requirements

  • iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+
  • Xcode 11+
  • Swift 5.1+

Migration Guides

Communication

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Alamofire', '~> 5.2'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Alamofire into your Xcode project using Carthage, specify it in your Cartfile:

github "Alamofire/Alamofire" ~> 5.2

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 Alamofire does support its use on supported platforms.

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

dependencies: [
    .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.2.0"))
]

Manually

If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually.

Embedded Framework

  • Open up Terminal, cd into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:

    $ git init
  • Add Alamofire as a git submodule by running the following command:

    $ git submodule add https://github.com/Alamofire/Alamofire.git
  • Open the new Alamofire folder, and drag the Alamofire.xcodeproj into the Project Navigator of your application's Xcode project.

    It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter.

  • Select the Alamofire.xcodeproj in the Project Navigator and verify the deployment target matches that of your application target.

  • Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.

  • In the tab bar at the top of that window, open the "General" panel.

  • Click on the + button under the "Embedded Binaries" section.

  • You will see two different Alamofire.xcodeproj folders each with two different versions of the Alamofire.framework nested inside a Products folder.

    It does not matter which Products folder you choose from, but it does matter whether you choose the top or bottom Alamofire.framework.

  • Select the top Alamofire.framework for iOS and the bottom one for macOS.

    You can verify which one you selected by inspecting the build log for your project. The build target for Alamofire will be listed as Alamofire iOS, Alamofire macOS, Alamofire tvOS, or Alamofire watchOS.

  • And that's it!

    The Alamofire.framework is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.

Open Radars

The following radars have some effect on the current implementation of Alamofire.

  • rdar://21349340 - Compiler throwing warning due to toll-free bridging issue in the test case
  • rdar://26870455 - Background URL Session Configurations do not work in the simulator
  • rdar://26849668 - Some URLProtocol APIs do not properly handle URLRequest
  • FB7624529 - urlSession(_:task:didFinishCollecting:) never called on watchOS

Resolved Radars

The following radars have been resolved over time after being filed against the Alamofire project.

  • rdar://26761490 - Swift string interpolation causing memory leak with common usage.
    • (Resolved): 9/1/17 in Xcode 9 beta 6.
  • rdar://36082113 - URLSessionTaskMetrics failing to link on watchOS 3.0+
    • (Resolved): Just add CFNetwork to your linked frameworks.

Workarounds

  • Collection of URLSessionTaskMetrics is currently disabled on watchOS due to FB7624529.

FAQ

What's the origin of the name Alamofire?

Alamofire is named after the Alamo Fire flower, a hybrid variant of the Bluebonnet, the official state flower of Texas.

Credits

Alamofire is owned and maintained by the Alamofire Software Foundation. You can follow them on Twitter at @AlamofireSF for project updates and releases.

Security Disclosure

If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to [email protected]. Please do not post it to a public issue tracker.

Donations

The ASF is looking to raise money to officially stay registered as a federal non-profit organization. Registering will allow Foundation members to gain some legal protections and also allow us to put donations to use, tax-free. Donating to the ASF will enable us to:

  • Pay our yearly legal fees to keep the non-profit in good status
  • Pay for our mail servers to help us stay on top of all questions and security issues
  • Potentially fund test servers to make it easier for us to test the edge cases
  • Potentially fund developers to work on one of our projects full-time

The community adoption of the ASF libraries has been amazing. We are greatly humbled by your enthusiasm around the projects and want to continue to do everything we can to move the needle forward. With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. If you use any of our libraries for work, see if your employers would be interested in donating. Any amount you can donate today to help us reach our goal would be greatly appreciated.

paypal

Supporters

MacStadium provides Alamofire with a free, hosted Mac mini.

Powered by MacStadium

License

Alamofire is released under the MIT license. See LICENSE for details.

Comments
  • [WIP] Swift 3.0 Migration

    [WIP] Swift 3.0 Migration

    Alamofire - Swift 3.0

    The initial migration to Swift 3.0 has been completed, and can be found in the swift3 branch. Many thanks to the Apple Engineers in the labs at WWDC who assisted with some of the migration issues. :beers:

    Please file Github issues for any problems discovered while using this branch.

    This branch should be considered a work in progress, and will be updated as future Xcode 8 and Swift 3 seeds are released by Apple.

    Official support for Swift 3.0 and Xcode 8 will be not available until the fall when Apple releases both.

    Migration Notes

    • Many Foundation types are now value types, instead of reference types. Please audit your code to ensure all references to NSMutableURLRequest are now properly handled as var and are of type URLRequest.

    • Due to the Swift 3.0 naming conventions, many Alamofire API parameters that referenced an object in the URL Foundation loading system and began with capital letters now begin with lowercase letters. For example, URLRequest parameter names are now urlRequest to prevent confusion.

      More notes will be added as issues are discovered.

    Radars

    The following radars were filed as a result of this migration and are currently being tracked by the ASF team.

    • 26850776: CharacterSet crashes when attempting to remove an item from the set in Swift 3.0
    • 26849668: NSURLProtocol APIs still contain NSMutableURLRequest parameter types and do not support the Swift 3.0 value types
    • 26870455: NSURLSession with background configuration does not function on the iOS simulator inside of test targets

    TODO

    • [x] Update Project Recommended Settings
    • [x] Update Example
    • [x] Travis CI Support
    • [ ] Update Documentation/README
    swift 
    opened by kcharwood 85
  • dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire on my iPhone(iOS8) while debuging

    dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire on my iPhone(iOS8) while debuging

    dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
      Referenced from: /private/var/mobile/Containers/Bundle/Application/XXX/Anachronos.app/Anachronos
      Reason: image not found
    

    Xcode6 GM

    I've read all the issues about this kind of problem, but couldn't solve the problem.

    Also, there is the same issue in iOS Example project:

    dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
      Referenced from: /private/var/mobile/Containers/Bundle/Application/CEA6C4C1-C211-460C-8ECF-4FD9C66F1016/iOS Example.app/iOS Example
      Reason: image not found
    
    opened by imWildCat 58
  • iOS 13.3.1 dyld: Library not loaded

    iOS 13.3.1 dyld: Library not loaded

    I'm getting this error when trying to run my app with Alamofire 5.0.0-rc3:

    dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire Referenced from: /private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/SupremeYou Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/Frameworks/Alamofire.framework/Alamofire'

    /private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/Frameworks/Alamofire.framework/Alamofire: stat() failed with errno=25
    /private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/Frameworks/Alamofire.framework/Alamofire'
    

    I've been tested my app on an iPhone 11 Pro 13.3 and it was working fine until I decided to update the phone. So I update the iPhone 11 to the 13.3.1 version, and the error started to appear.

    it works fine on an iPhone 8 Plus with iOS version 13.3.

    Also it doesn't work on an iPhone 6s with iOS 13.3.1.

    support 
    opened by Wasa22 55
  • AlamoFire full IPv6 support

    AlamoFire full IPv6 support

    Hello,

    Due to http://9to5mac.com/2016/05/04/apple-will-require-ios-app-store-apps-to-support-ipv6-only-networks-from-june-1/

    I am opening this for raising a small issue, but also to ask a question.

    Is alamofire fully supporting IPv6? referencing the doc from Apple https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1

    I haven't found any hardcoded IP address or reference to low level api apart those:

    NetworkReachabilityManager.swift
    is using IPv4 only: AF_INET and sockaddr_in

    Apple suggest to support also IPv6 counterparts: https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW12

    If your code handles IPv4 types, make sure the IPv6 equivalents are handled too.

    IPv4 IPv6 AF_INET AF_INET6 PF_INET PF_INET6 struct in_addr struct in_addr6 struct sockaddr_in struct sockaddr_in6 kDNSServiceProtocol_IPv4 kDNSServiceProtocol_IPv6

    Thanks

    reachability 
    opened by racer1988 47
  • Xcode 13 betas: Build fails in Combine

    Xcode 13 betas: Build fails in Combine

    Facing below error: SourcePackages/checkouts/Alamofire/Source/Combine.swift:25:5: Failed to build module 'Combine'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5 (swiftlang-1300.0.24.14 clang-1300.0.25.10)', while this compiler is 'Apple Swift version 5.5 (swiftlang-1300.0.24.13 clang-1300.0.25.10)'). Please select a toolchain which matches the SDK.

    What did you expect to happen?

    it should build project successfully.

    What happened instead?

    Its throwing error. Same problem was in Kingfisher GitHub repository, They created new branch with fix, changed deployment target from v10 to 12

    Alamofire Environment

    Alamofire Version: 5.2.1 Dependency Manager: Swift Package Manager Xcode Version: Version 13.0 beta 3 (13A5192i) Swift Version: Swift 5 Platform(s) Running Alamofire: iOS macOS Version Running Xcode: 12.0 Beta (21A5284e)

    support 
    opened by phiren 45
  • Feature - MultipartFormData

    Feature - MultipartFormData

    This pull request adds support for uploading MultipartFormData to Alamofire. I would love feedback from the community to make sure everything here is in tip-top shape before rolling it in. Any feedback would be much appreciated.

    MultipartFormData

    The general idea is that you append body parts to the larger MultipartFormData object, then encode it when you want the cumulative result. Encoding can be performed in two different ways:

    1. Encoding In-Memory
    2. Encoding Data by Streaming to Disk

    Encoding In-Memory

    Encoding in-memory should only be used with small datasets. If the contentLength of the MultipartFormData is too large, you run the risk of your app being terminated due to memory usage.

    Encoding Data by Streaming to Disk

    Sometimes you need to upload a very large dataset to a server such as a bundle of large images or videos. In these cases, your dataset is too large to perform the encoding in-memory. For these cases, the MultipartFormData class supports encoding the data using a combination of input and output streams keeping the memory footprint very small.

    Uploading from Manager

    The upload methods for uploading MultipartFormData support the idea of a memory threshold. To make it as easy as possible, the memory threshold is used to determine whether the MultipartFormData can be encoded in-memory or whether it needs to be written to disk first. The default value for the memory threshold is currently set to 10MB.

    In order to make the encoding process asynchronous, the upload methods could not return a Request object directly. To handle this case, the MultipartFormDataEncodingResult enumeration was added and exposed in an encodingCompletion closure. The resulting Request object is contained as an associated value in the .Success case which can then be used to chain additional methods against. While this is a bit different than the other public APIs, it still is quite simple to use.

    Alamofire.upload(
        .POST,
        URLString: "http://httpbin.org/post",
        multipartFormData: { multipartFormData in
            multipartFormData.appendBodyPart(fileURL: unicornImageURL, name: "unicorn")
            multipartFormData.appendBodyPart(fileURL: rainbowImageURL, name: "rainbow")
        },
        encodingCompletion: { encodingResult in
            switch encodingResult {
            case .Success(let upload, _, _):
                upload.responseJSON { request, response, JSON, error in
                    println(JSON)
                }
            case .Failure(let encodingError):
                println(encodingError)
            }
        }
    )
    

    Summary

    This was a fairly complicated feature to put together, so I'd really love to gather everyone's feedback. If you have a solid grasp of RFC 2388 and 2045, then please take the time to review these changes before we merge it in.

    help wanted feature request multipart form data needs feedback 
    opened by cnoon 45
  • How to debug crash in SessionDelegate.urlSession(URLSession, dataTask : URLSessionDataTask, didReceive : Data)?

    How to debug crash in SessionDelegate.urlSession(URLSession, dataTask : URLSessionDataTask, didReceive : Data)?

    I'm seeing a fairly common EXC_BREAKPOINT crash in Crashlytics caused by a delegate handler in Alamofire. See below for the stack trace. The app in question is iOS 10 only, and the crash seems to happen on all devices and 10.x versions.

    Crashed: NSOperationQueue 0x170034f60 :: NSOperation 0x1708519a0 (QOS: DEFAULT)
    0  libswiftFoundation.dylib       0x100dc2e4c static Data._unconditionallyBridgeFromObjectiveC(NSData?) -> Data (__hidden#3516_:1698)
    1  Alamofire                      0x10061388c @objc SessionDelegate.urlSession(URLSession, dataTask : URLSessionDataTask, didReceive : Data) -> () + 184
    2  CFNetwork                      0x185672b1c __67-[NSURLSession delegate_dataTask:didReceiveData:completionHandler:]_block_invoke.242 + 36
    3  Foundation                     0x185993fb0 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
    4  Foundation                     0x1858d8aa8 -[NSBlockOperation main] + 96
    5  Foundation                     0x1858c90a4 -[__NSOperationInternal _start:] + 620
    6  Foundation                     0x18599635c __NSOQSchedule_f + 228
    7  libdispatch.dylib              0x183d2e1bc _dispatch_client_callout + 16
    8  libdispatch.dylib              0x183d3c3dc _dispatch_queue_serial_drain + 928
    9  libdispatch.dylib              0x183d319a4 _dispatch_queue_invoke + 652
    10 libdispatch.dylib              0x183d3e34c _dispatch_root_queue_drain + 572
    11 libdispatch.dylib              0x183d3e0ac _dispatch_worker_thread3 + 124
    12 libsystem_pthread.dylib        0x183f372a0 _pthread_wqthread + 1288
    13 libsystem_pthread.dylib        0x183f36d8c start_wqthread + 4
    

    Due to the crash being EXC_BREAKPOINT I'm assuming it's a failing assertion somewhere and may actually be happening in the Swift/Obj-C compatibility layer before the actual delegate code is even called. But I'm not sure how to debug this and was hoping someone on here has an idea why this would happen.

    I use Alamofire for standard HTTPS requests to a JSON backend. I have one standard session manager and one background session manager. I'm setting the backgroundCompletionHandler in the app delegate as well.

    needs investigation 
    opened by blixt 44
  • Self-Signed Certificate not accepted

    Self-Signed Certificate not accepted

    Hi,

    I'm using Alamofire for a https connection. I use a nodejs https server. When using curl and providing the CA using --cacert <ca-file> it works just fine. However when testing in Alamofire I get this error:

    Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x60c000047980>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, NSErrorPeerCertificateChainKey=<CFArray 0x60600015e840 [0x10c05b7b0]>{type = immutable, count = 1, values = (
        0 : <cert(0x61600007e680) s: localhost i: localhost>
    )}, NSUnderlyingError=0x6040000abe90 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x60c000047980>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=<CFArray 0x60600015e840 [0x10c05b7b0]>{type = immutable, count = 1, values = (
        0 : <cert(0x61600007e680) s: localhost i: localhost>
    )}}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.
    

    My source looks like this:

    class Networking {
      static let manager: Manager = {
        let serverTrustPolicies: [String: ServerTrustPolicy] = [
          "localhost": .DisableEvaluation
        ]
    
        let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
        configuration.HTTPAdditionalHeaders = Alamofire.Manager.defaultHTTPHeaders
    
        return Alamofire.Manager(configuration: configuration,
          serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies))
      }()
    
      func test() {
        Networking.manager.request(.GET, "https://localhost:3000/", parameters: nil)
          .responseJSON { (response: Response<AnyObject, NSError>) in
            // nothing interesting
        }
      }
    

    I'm using Alamofire from the xcode7.1 branch.

    security 
    opened by moritzsternemann 39
  • Multiple encoding methods in single request

    Multiple encoding methods in single request

    I need to make a POST request with an HTTP Body with a JSON object, but I also need to use url query parameters in the same request.

    POST: http://www.mysite.com/api/create?param1=value&param2=value
    HTTP Body: { foo : [ bar, foo], bar: foo}
    

    Is this supported? How would I go about doing this?

    Thanks

    opened by AnthonyMDev 37
  • Xcode 12 Beta Archive issue

    Xcode 12 Beta Archive issue

    Since Xcode 12 is available in beta I've had to give it a try. There is some issue when trying to archive Alamofire.

    Undefined symbols for architecture armv7: "type metadata for Swift._StringObject.Variant", referenced from: outlined init with take of Swift._StringObject.Variant in HTTPHeaders.o ld: symbol(s) not found for architecture armv7

    When it comes to this issue I am aware that it may be fault of new Xcode, I just would like to start the discussion on this topic.

    What did you do?

    I've tried to archive Alamofire using new Xcode12-beta

    What did you expect to happen?

    Successful archive.

    What happened instead?

    Archive failed with error Undefined symbols for architecture armv7: "type metadata for Swift._StringObject.Variant", referenced from: outlined init with take of Swift._StringObject.Variant in HTTPHeaders.o ld: symbol(s) not found for architecture armv7

    Alamofire Environment

    Alamofire version: 5.2.1 Xcode version: 12-beta Swift version: 5.3 (swiftlang-1200.0.16.9 clang-1200.0.22.5) Platform(s) running Alamofire: iOS macOS version running Xcode: 10.15.4

    swift 
    opened by kamzab95 36
  • Duplicate response when using Alamofire from 5.0.0.rc3

    Duplicate response when using Alamofire from 5.0.0.rc3

    Try to request to server

    Duplicate response from server

    Issue not happen if I try to use Alamofire 5.0.5-rc2. We also tried to check result from server by using ProxyServer. We found the result from server is correct. But data received by Alamofire was duplicated.

    Alamofire Environment

    **Alamofire version:After 5.0.0-rc2 **Xcode version:Any **Swift version:4.2 **Platform(s) running Alamofire:iOS

    Demo Project

    I tried to reproduce this issue with demo project. But I can not.

    opened by ngminhduong 35
  • closure #1 () -> Alamofire.HTTPHeader in variable initialization expression of static Alamofire.HTTPHeader.defaultAcceptEncoding : Alamofire.HTTPHeader (in EPIK) (HTTPHeaders.swift:356)

    closure #1 () -> Alamofire.HTTPHeader in variable initialization expression of static Alamofire.HTTPHeader.defaultAcceptEncoding : Alamofire.HTTPHeader (in EPIK) (HTTPHeaders.swift:356)

    Only one of our users has a crash

    企业微信20221228-165518@2x

    Alamofire Version: 5.6.2 Dependency Manager: Carthage Xcode Version: 14.1 Swift Version: 5.7.2 Platform(s) Running Alamofire: iOS macOS Version Running Xcode: 13

    Looking forward to your reply,thank you!

    opened by amarantin1 0
  • Alamofire 5, responseDecodable - The given data was not valid JSON

    Alamofire 5, responseDecodable - The given data was not valid JSON

    What did you do?

    We updated Alamofire to version 5 and replaced the deprecated methods like responseArray and responseObject with the responseDecodable as follows:

    Alamofire version 4 - working (don't mind the error from v5):

    fetchArrayResponseArray

    Alamofire version 5 - not working:

    fetchArrayResponseDecodable

    We assured that our model was conforming to Codable, this is the one we are passing to the function:

    fetchModel

    What did you expect to happen?

    We expected to receive a success response with a valid JSON mapped to our model.

    What happened instead?

    Sometimes it works, we get the response, but most of the times we get the following error:

    updatesresponseSerializationFailed(reason: Alamofire.AFError.ResponseSerializationFailureReason.decodingFailed(error: Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Garbage at end around line 1, column 34645." UserInfo={NSDebugDescription=Garbage at end around line 1, column 34645., NSJSONSerializationErrorIndex=34645})))))

    We already analysed the JSON from the server and it is valid and the same data was working before with Alamofire 4.

    Alamofire Environment

    Alamofire Version: 5.6.3 Xcode Version: 14.1 Swift Version: 5.0 Platform(s) Running Alamofire: iOS 15.6.1/16.0.2 macOS Version Running Xcode: 13.0.1

    opened by JoanaDFerreira 0
  • MultipartFormData upload not working with larger files - Message too long error

    MultipartFormData upload not working with larger files - Message too long error

    I am currently using Alamofire 5.6.2 and trying to upload one image with POST request.

    The image is 10MB size, if I upload an image around 5MB everything works fine.

    Creating the POST request from Postman everything works fine, so it's not an issue related with the server.

    This is how I'm creating the request:

    AF.upload(multipartFormData: { multipartFormData in
    multipartFormData.append(InputStream(data: imageMedia.data), // 10MB data
                             withLength: UInt64(imageMedia.data.count),
                             name: imageMedia.type.rawValue,
                             fileName: imageMedia.filename,
                             mimeType: imageMedia.mimeType)
    }, with: request).responseData { afDataResponse in
        switch afDataResponse.result {
        case .success(let data):
            completion(data)
        case .failure(let error):
            print("error with alamofire response: \(error.localizedDescription)")
            completion(nil)
        }
    } 
    

    And this is the error I am receiving in the failure case: error with alamofire response: URLSessionTask failed with error: The operation couldn’t be completed. Message too long

    If I print the error (not localizedDescription):

    sessionTaskFailed(error: Error Domain=NSPOSIXErrorDomain Code=40 "Message too long" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <8F7404DD-2947-4B18-9F23-C23F0483F440>.<1>, _kCFStreamErrorDomainKey=1, NSErrorPeerAddressKey=<CFData 0x600001068280 [0x1b9553c60]>{length = 16, capacity = 16, bytes = 0x100201bbd8ef26350000000000000000}, _kCFStreamErrorCodeKey=40, _NSURLErrorRelatedURLSessionTaskErrorKey=(
        "LocalUploadTask <8F7404DD-2947-4B18-9F23-C23F0483F440>.<1>"
    )})
    

    Any idea what's happening here?

    awaiting response 
    opened by DanielZanchi 1
  • Crash - CompositeEventMonitor.request<A>(_:didParseResponse:)

    Crash - CompositeEventMonitor.request(_:didParseResponse:)

    ℹ Please fill out this template when filing an issue. All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.

    Per our *CONTRIBUTING guidelines, we use GitHub for bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag alamofire.

    Please remove this line and everything above it before submitting.

    What did you do?

    I've created and publish an application on iOS, this application use Alamofire v5.4.3 to communicate with the restful api. We also shipped the application with Firebase Crashlytics, and I received some crash logs which related to Alamofire. I've attached the crash log below. Please check it for me.

    iPhone 12 Pro/ iOS 16.0.0

    What did you expect to happen?

    No crash

    What happened instead?

    Crash

    Alamofire Environment

    Alamofire Version: 5.4.3 Dependency Manager: Swift Package Manager Xcode Version: XCode 14.1 Swift Version: Swift 5.7 Platform(s) Running Alamofire: iOS 16.0.0 macOS Version Running Xcode: 12.6.1

    Demo Project

    Crashed: com.apple.main-thread

    0 libobjc.A.dylib 0x21f94 objc_class::isInitialized() + 36 1 libobjc.A.dylib 0x794c lookUpImpOrForward + 60 2 libobjc.A.dylib 0x20c4 _objc_msgSend_uncached + 68 3 CoreFoundation 0x7a6f8 __CFBasicHashDrain + 320 4 CoreFoundation 0x7ed20 _CFRelease + 316 5 CFNetwork 0x5da80 CFHTTPCookieStorageCreateFromFile + 4332 6 CoreFoundation 0x7ed20 _CFRelease + 316 7 CFNetwork 0x167c8 CFURLRequestSetURL + 6816 8 CoreFoundation 0x7ed20 _CFRelease + 316 9 CFNetwork 0x1070cc _CFURLConnectionCopyTimingData + 16068 10 libobjc.A.dylib 0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116 11 libobjc.A.dylib 0x621c objc_destructInstance + 80 12 libobjc.A.dylib 0xf9d0 _objc_rootDealloc + 80 13 CFNetwork 0x832fc CFURLResponseCreateWithHTTPResponse + 69584 14 CFNetwork 0x84834 CFURLResponseCreateWithHTTPResponse + 75016 15 CFNetwork 0x83e34 CFURLResponseCreateWithHTTPResponse + 72456 16 CFNetwork 0x479dc CFURLCacheRemoveAllCachedResponses + 11992 17 libobjc.A.dylib 0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116 18 libobjc.A.dylib 0x621c objc_destructInstance + 80 19 libobjc.A.dylib 0xf9d0 _objc_rootDealloc + 80 20 CoreFoundation 0x6b5b0 RELEASE_OBJECTS_IN_THE_ARRAY + 112 21 CoreFoundation 0x6b720 -[__NSArrayM dealloc] + 268 22 CFNetwork 0xe770 CFURLCacheSetMemoryCapacity + 3764 23 libobjc.A.dylib 0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116 24 libobjc.A.dylib 0x621c objc_destructInstance + 80 25 libobjc.A.dylib 0xf9d0 _objc_rootDealloc + 80 26 libobjc.A.dylib 0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116 27 libobjc.A.dylib 0x621c objc_destructInstance + 80 28 libobjc.A.dylib 0xf9d0 objc_rootDealloc + 80 29 MyApp 0x1398c8c CompositeEventMonitor.request(:didParseResponse:) + 4324576396 30 libswiftCore.dylib 0x3da1d4 _swift_release_dealloc + 56 31 MyApp 0x13a1e44 outlined init with copy of AFError? + 4324613700 32 libswiftCore.dylib 0x3da1d4 _swift_release_dealloc + 56 33 libsystem_blocks.dylib 0x2124 _call_dispose_helpers_excp + 48 34 libsystem_blocks.dylib 0x1d54 Block_release + 252 35 libdispatch.dylib 0x3fdc dispatch_client_callout + 20 36 libdispatch.dylib 0x127f4 dispatch_main_queue_drain + 928 37 libdispatch.dylib 0x12444 dispatch_main_queue_callback_4CF + 44 38 CoreFoundation 0x9aa08 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 39 CoreFoundation 0x7c368 __CFRunLoopRun + 2036 40 CoreFoundation 0x811e4 CFRunLoopRunSpecific + 612 41 GraphicsServices 0x1368 GSEventRunModal + 164 42 UIKitCore 0x3a2d88 -[UIApplication _run] + 888 43 UIKitCore 0x3a29ec UIApplicationMain + 340 44 libswiftUIKit.dylib 0x352a0 UIApplicationMain(::::) + 104 45 MyApp 0x8abc main + 4304063164 (IdeasAnalystCallScreen.swift:4304063164) 46 ??? 0x1b1609948 (Missing)

    awaiting response 
    opened by tamvutdt 1
  • Failure: org.alamofire.session.rootQueue.requestQueue SIGSEGV 0x0000ab6b47bd0dd0

    Failure: org.alamofire.session.rootQueue.requestQueue SIGSEGV 0x0000ab6b47bd0dd0

    ℹ I've read, understood, and done my best to follow the *CONTRIBUTING guidelines.

    What did you do?

    I logged into my application and started a session using AuthenticationInterceptor, and it failed.

    What did you expect to happen?

    That the app follows its default flow without failing.

    What happened instead?

    App crashed and closed

    Alamofire Environment

    Alamofire Version: 5.6.2 Dependency Manager: SPM Xcode Version: 14.1 Swift Version: 5 Platform(s) Running Alamofire: iPhone 11 iOS 15.6.1 macOS Version Running Xcode: Ventura 13.0

    The problem in question was reported by Firebase below the logs generated.

    Captura de Tela 2022-11-16 às 14 24 16

    Full error log

    I wonder how I can correct this and where I should start my analysis

    awaiting response 
    opened by joaoduartemariucio 1
  • Is there a plan to release a new version of the OC version of AFNetworking?

    Is there a plan to release a new version of the OC version of AFNetworking?

    https://github.com/AFNetworking/AFNetworking/issues/4762 I would like to ask if the oc version of AFNetworking has plans to release a new version, that community seems to be inactive.

    opened by lalogada 0
Releases(5.6.4)
  • 5.6.4(Nov 22, 2022)

    Released on 2022-11-21. All issues associated with this milestone can be found using this filter.

    Fixed

    New Contributors

    • @guidev made their first contribution in https://github.com/Alamofire/Alamofire/pull/3665

    Full Changelog: https://github.com/Alamofire/Alamofire/compare/5.6.3...5.6.4

    Source code(tar.gz)
    Source code(zip)
  • 5.6.3(Nov 21, 2022)

    Released on 2022-11-20. All issues associated with this milestone can be found using this filter.

    Updated

    • Swift package to 5.7, CI to Xcode 14.1.

    Fixed

    • Calls to deprecated cancellation handler function.
    • Unnecessary protocol conformance on Combine publishers.
    • Don't attempt retry when Request has already been cancelled.

    New Contributors

    • @tedKim5178 made their first contribution in https://github.com/Alamofire/Alamofire/pull/3650
    • @svenmuennich made their first contribution in https://github.com/Alamofire/Alamofire/pull/3657

    Full Changelog: https://github.com/Alamofire/Alamofire/compare/5.6.2...5.6.3

    Source code(tar.gz)
    Source code(zip)
  • 5.6.2(Jul 18, 2022)

    Released on 2022-07-17. All issues associated with this milestone can be found using this filter.

    Added

    • Error when object provided to JSONEcoding contains values that can't be passed through JSONSerialization.

    Updated

    • CI support for all supported Xcode, macOS, and Linux versions.
    • Support for various Xcode versions.
    • Cache-Control header tests to not require hard-coded delays.

    Fixed

    Source code(tar.gz)
    Source code(zip)
  • 5.6.1(Apr 17, 2022)

  • 5.6.0(Apr 13, 2022)

    Released on 2022-04-13. All issues associated with this milestone can be found using this filter.

    Added

    • Support for HTTPMethod.query to support the upcoming standard.
    • Compile-time Swift version check to enforce minimum supported Swift version.
    • GitHub Sponsors support. You can now sponsor Alamofire directly through GitHub.

    Updated

    • Swift version required to build [🔥 Experimental 🔥] Swift Concurrency support to 5.6.0 to avoid various Apple bugs with Xcode 13.2.0 and 13.2.1. Support now requires Xcode 13.3.1.
    • DownloadRequest to avoid producing resume data when not explicitly requested on cancellation.
    • Testing infrastructure to use XCTestPlans on Apple platforms.
    • GitHub Actions support for greater OS coverage, more SPM platforms, and Swift 5.6.

    Fixed

    Source code(tar.gz)
    Source code(zip)
  • 5.5.0(Dec 13, 2021)

    Alamofire 5.5 is the first release where we're labeling features we consider experimental. These features, while fully designed and well tested, rely on language or framework features which may change or require breaking bug fixes, and we'd rather not have to make a major release in that case. So [🔥 Experimental 🔥] features may require breaking changes in minor, rather than major, releases. This will be rare and compatibility should be preserved in most cases, but cannot be guaranteed.

    Released on 2021-12-13. All issues associated with this milestone can be found using this filter.

    Added

    • [🔥 Experimental 🔥] support for Swift Concurrency, including async-await for requests and StreamOf for streaming values.
    • Generic static accessors for various protocols types for Swift 5.5.
    • .indexInBrackets options for array encoding in query parameters.
    • RequestAdapterState and new protocol requirements for RequestAdapter to allow for additional state to be available.

    Updated

    • Session to more safely target provided custom DispatchQueues for internal use.
    • AFError message regarding unacceptable Content-Types to sort the types.
    • Base Swift language version requirement to 5.3.
    • Sample app to show proper loading state for requests.

    Deprecated

    • responseJSON and associated methods, in preference to responseDecodable.

    Fixed

    Source code(tar.gz)
    Source code(zip)
  • 5.4.4(Sep 20, 2021)

    Released on 2021-09-20. All issues associated with this milestone can be found using this filter.

    Added

    • Support for Xcode 13, including a workaround for Combine compilation on older architectures.
    • Testing on watchOS.
    • Support for building on Windows and Linux. Alamofire is unsupported on these platforms but should build correctly.

    Updated

    • Usage of .count >= 0 to !.isEmpty.

    Fixed

    Source code(tar.gz)
    Source code(zip)
  • 5.4.3(Apr 22, 2021)

  • 5.4.2(Apr 3, 2021)

    Released on 2021-04-03. All issues associated with this milestone can be found using this filter.

    Updated

    • Resume data handling for DownloadRequests to access resume data from errors as well as cancellation.
    • Project files and templates for Xcode 12.4 and GitHub templates.

    Fixed

    • MultipartUpload thread-safety.
    • Multipart body stream length handling to better handle partial streams.
    Source code(tar.gz)
    Source code(zip)
  • 5.4.1(Dec 21, 2020)

  • 5.4.0(Nov 4, 2020)

    Released on 2020-11-04. All issues associated with this milestone can be found using this filter.

    Added

    • URLResponseSerializer and attendant convenience methods so downloads can produce a non-optional URL.

    Updated

    • Handing of file:// URLs, removing error added in 5.3.0 and adding support for DownloadRequest.
    Source code(tar.gz)
    Source code(zip)
  • 5.3.0(Oct 18, 2020)

    Released on 2020-10-17. All issues associated with this milestone can be found using this filter.

    Added

    • Closure callback APIs for the production of URLRequests and URLSessionTasks.
    • URLSessionTaskMetrics gathering on watchOS 7+.

    Updated

    Fixed

    • Double lock crash in AuthenticationInterceptor caused by synchronous refresh implementations.
    • Crash when requesting file:// URLs by producing validation error.
    • Missing rethrow of error produced when writing temporary multipart files fails.
    • Objective-C module conflicts in Xcode 12 by removing Obj-C module support.
    Source code(tar.gz)
    Source code(zip)
  • 5.2.2(Jul 17, 2020)

    Released on 2020-07-17. All issues associated with this milestone can be found using this filter.

    Added

    • macOS(Catalyst) User-Agent string.

    Updated

    • debugDescription of DataRequest and DownloadRequest to better handle non-text and long content, with better formatting.
    • Code to use switch instead of if else statement.

    Fixed

    • Linking on some Apple OS versions when using Swift Package Manager.
    • Reliability issues with DataStreamRequest.
    Source code(tar.gz)
    Source code(zip)
  • 5.2.1(May 26, 2020)

  • 5.2.0(May 16, 2020)

    Released on 2020-05-16. All issues associated with this milestone can be found using this filter.

    Added

    • Combine support! DataResponsePublisher, DownloadResponsePublisher, and DataStreamPublisher to stream Alamofire responses.
    • AuthenticationInterceptor, for easier adaptation and retry of requests with credentials.

    Updated

    • Response handlers to take all serializer parameters.
    • DisabledEvaluator to DisabledTrustEvaluator, deprecating the previous name.
    • Interceptor to be initialized with multiple RequestInterceptors, in addition to RequestAdapters and RequestRetriers.

    Fixed

    • Minor documentation issues.
    • Encoding of Decimal values in URLEncodedFormEncoder.
    • Thread-safety issue in Session.
    • Memory leak in NetworkReachabilityManager.
    Source code(tar.gz)
    Source code(zip)
  • 5.1.0(Apr 5, 2020)

    Released on 2020-04-04. All issues associated with this milestone can be found using this filter.

    Added

    • RequestModifier closure to request APIs, allowing mutation of created URLRequests.
    • DataStreamRequest, for streaming HTTP responses.

    Updated

    • Various framework internals to make porting to Linux easier.
    • Project to require Swift 5.1.

    Fixed

    • Typo in ServerTrustEvaluating documentation.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.5(Mar 24, 2020)

    Released on 2020-03-23. All issues associated with this milestone can be found using this filter.

    Fixed

    • Request casting issue on retry that could lead to incomplete retry of UploadRequests.
    • Rare scenario where finish() could be called multiple times, leading to duplicate response handler calls.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.4(Mar 15, 2020)

  • 5.0.3(Mar 15, 2020)

    Released on 2020-03-14. All issues associated with this milestone can be found using this filter.

    Added

    • SwiftPM testing support.
    • Documentation around the prohibition of background URLSessionConfigurations in Alamofire 5.

    Fixed

    Source code(tar.gz)
    Source code(zip)
  • 5.0.2(Feb 23, 2020)

  • 5.0.1(Feb 23, 2020)

    Released on 2020-02-23. All issues associated with this milestone can be found using this filter.

    Updated

    • AlamofireExtension to have public properties and initializer, and conform to @dynamicMemberLookup.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0(Feb 14, 2020)

    Released on 2020-02-14. All issues associated with this milestone can be found using this filter.

    Added

    • Support for NSURLAuthenticationMethodClientCertificate when handling auth challenges using URLCredentials.
    • Migration Guide for Alamofire 5.

    Updated

    • Advanced Usage documentation for Alamofire 5.
    • AF namespace to be a reference to Session.default.

    Fixed

    • Runtime crashes due to overzealous state checking in SessionDelegate by reducing the severity of the assertions.
    • Unwanted public attribute on _URLEncodedFormEncoder.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0-rc.3(Oct 27, 2019)

    Released on 2019-10-26. All issues associated with this milestone can be found using this filter. Note: Alamofire 5 is now API stable.

    Updated

    • Automatic resume() behavior to be called after the first response handler is added instead of immediately after task creation.

    Fixed

    • Incorrect header convenience method in Usage documentation.
    • Unstable parameter ordering in URLEncodedFormEncoder.
    • Xcode build issues and precompiled binary build issues by removing the dynamic bundle identifier.
    • Build warnings for deprecated SecTrust API when building for Catalyst.
    • Regression from Alamofire 4 causing Alamofire to reject NTLM and Negotiate authentication methods.
    Source code(tar.gz)
    Source code(zip)
  • 4.9.1(Oct 26, 2019)

    Released on 2019-10-26. All issues associated with this milestone can be found using this filter.

    Added

    • Support for GitHub Actions for CI.

    Updated

    • DataResponse and DownloadResponse debugDescription to include more useful information.

    Fixed

    • Dynamic bundle identifier causing issues with Xcode and precompiled binaries by removing the dynamic behavior.
    • Compiler warnings when building for Catalyst by updating the usage of deprecated API.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0-rc.2(Sep 8, 2019)

    Released on 2019-09-08. All issues associated with this milestone can be found using this filter. Note: Alamofire 5 is now API stable.

    Fixed

    • Single remaining use of Error instead of generic Failure constraint in DataResponse API.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0-rc.1(Sep 4, 2019)

    Released on 2019-09-04. All issues associated with this milestone can be found using this filter. Note: Alamofire 5 is now API stable.

    Added

    • cancelAllRequests method on Session to cancel all in flight requests.
    • Ability to inject FileManager instance into UploadRequest.
    • DataPreprocessor protocol and implementations, allowing the preprocessing of data before serialization.
    • Internal URLRequest validation and error. GET requests with body data will now produce an error.
    • Generic Failure constraint to DataResponse and DownloadResponse, making them DataResponse<Success, Failure: Error> and DownloadResponse<Success, Failure: Error>.
    • Precondition to ensure Session can't be used with background URLSessionConfigurations. Alamofire will explicitly support such functionality at some point in the future.
    • SwiftFormat configuration and updated styling.
    • AFDataResponse<Success> and AFDownloadResponse<Success> typealiases to help deal with the doubly generic responses.

    Updated

    • All internal Result usage to use the fully qualified type instead of AFResult.
    • DataRequest and DownloadRequest functional API, renaming flatMap to tryMap.
    • HTTPMethod to be a struct rather than an enum.
    • All errors produced by Alamofire to be AFError by default. All responses will now start with an AFError Failure type.
    • NetworkReachabilityManager to simplify and modernize its API.
    • Usage.md documentation to be fully up-to-date with Alamofire 5.
    • Bundle identifiers to include the platform name, fixing ITMS-90806.

    Fixed

    • Thread-safety issue with serialization queue usage.
    Source code(tar.gz)
    Source code(zip)
  • 4.9.0(Sep 4, 2019)

    Released on 2019-09-03. All issues associated with this milestone can be found using this filter.

    Added

    • API to cancel DownloadRequests without producing resume data.

    Updated

    • Bundle identifiers to include the platform name, fixing ITMS-90806.

    Fixed

    • NetworkReachabilityManager behavior regression from 4.8.1.
    • Memory leak when using validate().
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0-beta.7(Jul 30, 2019)

    Released on 2019-07-29. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.

    Added

    • URLEncodedFormEncoder.DataEncoding and URLEncodedFormEncoder.KeyEncoding to customize the encoding of Data and CodingKeys in URLEncodedFormEncoder.
    • Asynchronous cURLDescription method to produce cURL commands for Requests which are in the process of creating their initial URLRequest.

    Updated

    • All inline API documentation.
    • Handling of response serializers appended after a Request has completed. This no longer produces an error but will instead trigger the normal Request lifetime methods.

    Fixed

    • Empty parameters being encoded as an empty String instead of nil by URLEncodedFormEncoder.
    • Handling of os_unfair_lock to prevent rare crash.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0-beta.6(Apr 24, 2019)

    Released on 2019-04-23. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.

    Updated

    • ServerTrustEvaluation logic by simplifying public key equality checks for SecKey types.
    • Request.State access to lock access and task updates using internal locking API.

    Fixed

    • Issues in DownloadRequest where some events were being duplicated and some were missing.
    • Issue with AppStore submissions where the pre-release version in the bundle short versions string was being rejected when built with Carthage or as a submodule.
    • Issue where response serializer completions were not called when appended to a completed Request.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0-beta.5(Apr 13, 2019)

    Released on 2019-04-12. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.

    Added

    • Request.didResumeTaskNotification, Request.didSuspendTaskNotification, Request.didCancelTaskNotification, and Request.didCompleteTaskNotification notifications.
    • Separate URLSessionTask lifetime events to EventMonitor.

    Updated

    • SessionStateProvider to no longer be public and renamed the file it lives in.
    • MultipartUpload to no longer be public.
    • Request, DataRequest, UploadRequest, and DownloadRequest to longer be open, as Alamofire does not support subclassing these types.
    • Names of the notifications posted by Request to include Notification.
    • httpHeaders extensions on URLRequest, HTTPURLResponse, and URLSessionConfiguration to be headers instead.

    Fixed

    • Issue in Request where calling cancel() inside a response serializer would result in the serializer running again.
    • Issue in Session where the delegate precondition would be triggered when running with a swizzled URLSessionDelegate.
    • Compiler error in the example app.
    • Issues Request where certain lifetime events could be triggered more than once by repeatedly calling resume(), suspend(), or cancel().
    • Framework version string to be compatible with TestFlight and AppStore releases.
    Source code(tar.gz)
    Source code(zip)
Owner
Alamofire
Elegant Networking in Swift
Alamofire
🏇 A Swift HTTP / HTTPS networking library just incidentally execute on machines

Thus, programs must be written for people to read, and only incidentally for machines to execute. Harold Abelson, "Structure and Interpretation of Com

John Lui 845 Oct 30, 2022
Simple asynchronous HTTP networking class for Swift

YYHRequest YYHRequest is a simple and lightweight class for loading asynchronous HTTP requests in Swift. Built on NSURLConnection and NSOperationQueue

yayuhh 77 May 18, 2022
ServiceData is an HTTP networking library written in Swift which can download different types of data.

ServiceData Package Description : ServiceData is an HTTP networking library written in Swift which can download different types of data. Features List

Mubarak Alseif 0 Nov 11, 2021
Easy HTTP Networking in Swift a NSURLSession wrapper with image caching support

Networking was born out of the necessity of having a simple networking library that doesn't have crazy programming abstractions or uses the latest rea

Nes 1.3k Dec 17, 2022
Extensible HTTP Networking for iOS

Bridge Simple Typed JSON HTTP Networking in Swift 4.0 GET GET<Dict>("http://httpbin.org/ip").execute(success: { (response) in let ip: Dict = respo

null 90 Nov 19, 2022
QwikHttp is a robust, yet lightweight and simple to use HTTP networking library for iOS, tvOS and watchOS

QwikHttp is a robust, yet lightweight and simple to use HTTP networking library. It allows you to customize every aspect of your http requests within a single line of code, using a Builder style syntax to keep your code super clean.

Logan Sease 2 Mar 20, 2022
🤵🏽‍♀️ Janet — A thin HTTP networking layer built on URLSession for simple, declarative endpoint specification leveraging the power of async/await.

????‍♀️ Janet — Just another networking kit — A thin HTTP networking layer built on URLSession for simple, declarative endpoint specification leveragi

Niklas Holloh 3 Sep 6, 2022
An elegant yet powerful iOS networking layer inspired by ActiveRecord.

Written in Swift 5 AlamoRecord is a powerful yet simple framework that eliminates the often complex networking layer that exists between your networki

Tunespeak 19 Nov 19, 2022
Http - Demo for Http Layer

http Example To run the example project, clone the repo, and run pod install fro

null 0 Jan 24, 2022
Robust Swift networking for web APIs

Conduit Conduit is a session-based Swift HTTP networking and auth library. Within each session, requests are sent through a serial pipeline before bei

Mindbody 52 Oct 26, 2022
A type-safe, high-level networking solution for Swift apps

What Type-safe network calls made easy Netswift offers an easy way to perform network calls in a structured and type-safe way. Why Networking in Swift

Dorian Grolaux 23 Apr 27, 2022
A Swift Multiplatform Single-threaded Non-blocking Web and Networking Framework

Serverside non-blocking IO in Swift Ask questions in our Slack channel! Lightning (formerly Edge) Node Lightning is an HTTP Server and TCP Client/Serv

SkyLab 316 Oct 6, 2022
RSNetworking is a networking library written entirly for the Swift programming language.

RSNetworking is a networking library written entirly for the Swift programming language.

null 18 Feb 25, 2018
A networking library for Swift

Nikka Nikka is a super simple Swift HTTP networking library that comes with many extensions to make it modular and really powerful. Installation Usage

Emilien Stremsdoerfer 29 Nov 4, 2022
Declarative and Reactive Networking for Swift.

Squid Squid is a declarative and reactive networking library for Swift. Developed for Swift 5, it aims to make use of the latest language features. Th

Oliver Borchert 69 Dec 18, 2022
AsyncHTTP - Generic networking library written using Swift async/await

Generic networking library written using Swift async/await

Laszlo Teveli 7 Aug 3, 2022
A lightweight generic networking API written purely in Swift

SwiftyNetworking SwiftyNetworking library is a generic networking library writte

Zaid Rahhawi 0 Dec 24, 2021
Swift implementation of libp2p, a modular & extensible networking stack

Swift LibP2P The Swift implementation of the libp2p networking stack Table of Contents Overview Disclaimer Install Usage Example API Contributing Cred

null 19 Dec 18, 2022
Type-safe networking abstraction layer that associates request type with response type.

APIKit APIKit is a type-safe networking abstraction layer that associates request type with response type. // SearchRepositoriesRequest conforms to Re

Yosuke Ishikawa 1.9k Dec 30, 2022