Network abstraction layer written in Swift.

Last update: Jun 22, 2022

Moya 15.0.0

CircleCI codecov.io Carthage compatible Accio supported CocoaPods compatible Swift Package Manager compatible

A Chinese version of this document can be found here.

You're a smart developer. You probably use Alamofire to abstract away access to URLSession and all those nasty details you don't really care about. But then, like lots of smart developers, you write ad hoc network abstraction layers. They are probably called "APIManager" or "NetworkModel", and they always end in tears.

Moya Overview

Ad hoc network layers are common in iOS apps. They're bad for a few reasons:

  • Makes it hard to write new apps ("where do I begin?")
  • Makes it hard to maintain existing apps ("oh my god, this mess...")
  • Makes it hard to write unit tests ("how do I do this again?")

So the basic idea of Moya is that we want some network abstraction layer that sufficiently encapsulates actually calling Alamofire directly. It should be simple enough that common things are easy, but comprehensive enough that complicated things are also easy.

If you use Alamofire to abstract away URLSession, why not use something to abstract away the nitty gritty of URLs, parameters, etc?

Some awesome features of Moya:

  • Compile-time checking for correct API endpoint accesses.
  • Lets you define a clear usage of different endpoints with associated enum values.
  • Treats test stubs as first-class citizens so unit testing is super-easy.

You can check out more about the project direction in the vision document.

Sample Projects

We have provided two sample projects in the repository. To use it download the repo, run carthage update to download the required libraries and open Moya.xcodeproj. You'll see two schemes: Basic and Multi-Target - select one and then build & run! Source files for these are in the Examples directory in project navigator. Have fun!

Project Status

This project is actively under development, and is being used in Artsy's auction app. We consider it ready for production use.

Installation

Moya version vs Swift version.

Below is a table that shows which version of Moya you should use for your Swift version.

Swift Moya RxMoya ReactiveMoya
5.X >= 13.0.0 >= 13.0.0 >= 13.0.0
4.X 9.0.0 - 12.0.1 10.0.0 - 12.0.1 9.0.0 - 12.0.1
3.X 8.0.0 - 8.0.5 8.0.0 - 8.0.5 8.0.0 - 8.0.5
2.3 7.0.2 - 7.0.4 7.0.2 - 7.0.4 7.0.2 - 7.0.4
2.2 <= 7.0.1 <= 7.0.1 <= 7.0.1

Note: If you are using Swift 4.2 in your project, but you are using Xcode 10.2, Moya 13 should work correctly even though we use Swift 5.0.

Upgrading to a new major version of Moya? Check out our migration guides.

Swift Package Manager

Note: Instructions below are for using SwiftPM without the Xcode UI. It's the easiest to go to your Project Settings -> Swift Packages and add Moya from there.

To integrate using Apple's Swift package manager, without Xcode integration, add the following as a dependency to your Package.swift:

.package(url: "https://github.com/Moya/Moya.git", .upToNextMajor(from: "15.0.0"))

and then specify "Moya" as a dependency of the Target in which you wish to use Moya. If you want to use reactive extensions, add also "ReactiveMoya", "RxMoya" or "CombineMoya" as your target dependency respectively. Here's an example PackageDescription:

// swift-tools-version:5.3
import PackageDescription

let package = Package(
    name: "MyPackage",
    products: [
        .library(
            name: "MyPackage",
            targets: ["MyPackage"]),
    ],
    dependencies: [
        .package(url: "https://github.com/Moya/Moya.git", .upToNextMajor(from: "15.0.0"))
    ],
    targets: [
        .target(
            name: "MyPackage",
            dependencies: ["ReactiveMoya"])
    ]
)

Combine note: if you're using CombineMoya, make sure that you use Xcode 11.5.0 or later. With earlier versions of Xcode you will have to manually add Combine as a weakly linked framework to your application target.

Accio

Accio is a dependency manager based on SwiftPM which can build frameworks for iOS/macOS/tvOS/watchOS. Therefore the integration steps of Moya are exactly the same as described above. Once your Package.swift file is configured, run accio update instead of swift package update.

CocoaPods

For Moya, use the following entry in your Podfile:

pod 'Moya', '~> 15.0'

# or 

pod 'Moya/RxSwift', '~> 15.0'

# or

pod 'Moya/ReactiveSwift', '~> 15.0'

# or

pod 'Moya/Combine', '~> 15.0'

Then run pod install.

In any file you'd like to use Moya in, don't forget to import the framework with import Moya.

Carthage

Carthage users can point to this repository and use whichever generated framework they'd like, Moya, RxMoya, ReactiveMoya, or CombineMoya.

Make the following entry in your Cartfile:

github "Moya/Moya" ~> 15.0

Then run carthage update --use-xcframeworks.

If this is your first time using Carthage in the project, you'll need to go through some additional steps as explained over at Carthage.

NOTE: At this time, Carthage does not provide a way to build only specific repository submodules. All submodules and their dependencies will be built with the above command. However, you don't need to copy frameworks you aren't using into your project. For instance, if you aren't using ReactiveSwift, feel free to delete that framework along with ReactiveMoya from the Carthage Build directory after carthage update completes. Or if you are using ReactiveSwift but not RxSwift or Combine, then RxMoya, RxTest, RxCocoa, CombineMoya etc. can safely be deleted.

Manually

  • 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 & Moya as a git submodule by running the following commands:
$ git submodule add https://github.com/Alamofire/Alamofire.git
$ git submodule add https://github.com/Moya/Moya.git
  • Open the new Alamofire folder, and drag the Alamofire.xcodeproj into the Project Navigator of your application's Xcode project. Do the same with the Moya.xcodeproj in the Moya folder.

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

  • Verify that the deployment targets of the xcodeprojs match that of your application target in the Project Navigator.
  • 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 either Alamofire iOS, Alamofire macOS, Alamofire tvOS or Alamofire watchOS.

  • Click on the + button under "Embedded Binaries" again and add the correct build target for Moya.

  • And that's it!

The three frameworks are 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.

Usage

After some setup, using Moya is really simple. You can access an API like this:

provider = MoyaProvider<GitHub>()
provider.request(.zen) { result in
    switch result {
    case let .success(moyaResponse):
        let data = moyaResponse.data
        let statusCode = moyaResponse.statusCode
        // do something with the response data or statusCode
    case let .failure(error):
        // this means there was a network failure - either the request
        // wasn't sent (connectivity), or no response was received (server
        // timed out).  If the server responds with a 4xx or 5xx error, that
        // will be sent as a ".success"-ful response.
    }
}

That's a basic example. Many API requests need parameters. Moya encodes these into the enum you use to access the endpoint, like this:

provider = MoyaProvider<GitHub>()
provider.request(.userProfile("ashfurrow")) { result in
    // do something with the result
}

No more typos in URLs. No more missing parameter values. No more messing with parameter encoding.

For more examples, see the documentation.

Reactive Extensions

Even cooler are the reactive extensions. Moya provides reactive extensions for ReactiveSwift, RxSwift, and Combine.

ReactiveSwift

ReactiveSwift extension provides both reactive.request(:callbackQueue:) and reactive.requestWithProgress(:callbackQueue:) methods that immediately return SignalProducers that you can start, bind, map, or whatever you want to do. To handle errors, for instance, we could do the following:

provider = MoyaProvider<GitHub>()
provider.reactive.request(.userProfile("ashfurrow")).start { event in
    switch event {
    case let .value(response):
        image = UIImage(data: response.data)
    case let .failed(error):
        print(error)
    default:
        break
    }
}

RxSwift

RxSwift extension also provide both rx.request(:callbackQueue:) and rx.requestWithProgress(:callbackQueue:) methods, but return type is different for both. In case of a normal rx.request(:callbackQueue), the return type is Single<Response> which emits either single element or an error. In case of a rx.requestWithProgress(:callbackQueue:), the return type is Observable<ProgressResponse>, since we may get multiple events from progress and one last event which is a response.

To handle errors, for instance, we could do the following:

provider = MoyaProvider<GitHub>()
provider.rx.request(.userProfile("ashfurrow")).subscribe { event in
    switch event {
    case let .success(response):
        image = UIImage(data: response.data)
    case let .error(error):
        print(error)
    }
}

In addition to the option of using signals instead of callback blocks, there are also a series of signal operators for RxSwift and ReactiveSwift that will attempt to map the data received from the network response into either an image, some JSON, or a string, with mapImage(), mapJSON(), and mapString(), respectively. If the mapping is unsuccessful, you'll get an error on the signal. You also get handy methods for filtering out certain status codes. This means that you can place your code for handling API errors like 400's in the same places as code for handling invalid responses.

Combine

Combine extension provides requestPublisher(:callbackQueue:) and requestWithProgressPublisher(:callbackQueue) returning AnyPublisher<Response, MoyaError> and AnyPublisher<ProgressResponse, MoyaError> respectively.

Here's an example of requestPublisher usage:

provider = MoyaProvider<GitHub>()
let cancellable = provider.requestPublisher(.userProfile("ashfurrow"))
    .sink(receiveCompletion: { completion in
        guard case let .failure(error) = completion else { return }

        print(error)
    }, receiveValue: { response in
        image = UIImage(data: response.data)
    })

Community Projects

Moya has a great community around it and some people have created some very helpful extensions.

Contributing

Hey! Do you like Moya? Awesome! We could actually really use your help!

Open source isn't just writing code. Moya could use your help with any of the following:

  • Finding (and reporting!) bugs.
  • New feature suggestions.
  • Answering questions on issues.
  • Documentation improvements.
  • Reviewing pull requests.
  • Helping to manage issue priorities.
  • Fixing bugs/new features.

If any of that sounds cool to you, send a pull request! After your first contribution, we will add you as a member to the repo so you can merge pull requests and help steer the ship 🚢 You can read more details about that in our contributor guidelines.

Moya's community has a tremendous positive energy, and the maintainers are committed to keeping things awesome. Like in the CocoaPods community, always assume positive intent. Even if a comment sounds mean-spirited, give the person the benefit of the doubt.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Adding new source files

If you add or remove a source file from Moya, a corresponding change needs to be made to the Moya.xcodeproj project at the root of this repository. This project is used for Carthage. Don't worry, you'll get an automated warning when submitting a pull request if you forget.

Help us improve Moya documentation

Whether you’re a core member or a user trying it out for the first time, you can make a valuable contribution to Moya by improving the documentation. Help us by:

  • Sending us feedback about something you thought was confusing or simply missing.
  • Suggesting better wording or ways of explaining certain topics.
  • Sending us a pull request via GitHub.
  • Improving the Chinese documentation.

License

Moya is released under an MIT license. See License.md for more information.

GitHub

https://github.com/ashfurrow/Moya
Comments
  • 1. Carthage error with RxSwift

    i installed Moya with Carthage and i get a error in xcode when building because i don't have RxSwift, maybe to have a another branch or something for RxSwift?

    this is the error i get

    dyld: Library not loaded: @rpath/RxSwift.framework/RxSwift
    Referenced from: /Users/marvinnazari/Library/Developer/CoreSimulator/Devices/9A8009C8-48F2-47FD-86A8-7E6251DF5B60/data/Containers/Bundle/Application/CB3D1236-77FF-4664-8EEF-D94DD08CE55D/X.app/Frameworks/Moya.framework/Moya
    Reason: image not found
    
    Reviewed by MarvinNazari at 2015-06-22 12:15
  • 2. [Swift 3.0] Update for Xcode GM Seed.

    Hey guys! 🎉 I tried to update Moya to the latest Swift 3.0 shipped with Xcode GM Seed. As there is work that still needs to be done, I would use some help with:

    I think together we can make it better 👊Cheers!

    Reviewed by sunshinejr at 2016-09-08 15:01
  • 3. Migrate Moya to a swift package manager compatible layout

    Picks off where #698 left off. Closes #870.

    My concerns:

    • [x] Test to make sure the project is still CocoaPods compatible I'm not familiar with Cocoapods, so the new layout is done to Carthage & SPM best practices, but it would be awesome to have a cocoapods person test it and make sure everything still woks :)
    • [x] Update README: I'm sure some of the instructions will have changed, locations of Demos & Tests, pulling down dependencies for Demos, etc.
    • [x] Update CI for new test locations: The tests are currently failing because the tests CircleCI is expecting are no longer in the same. I also have them setup to pull dependencies down with Carthage instead, so we need to set that up. @BasThomas: I remember you offering to take a look

    Future enhancements:

    • Use swift test once #643 is merged
    • [x] Implement the Carthage caching strategy @scottrhoyt & I discussed in #870
    Reviewed by AndrewSB at 2017-01-02 04:28
  • 4. [RFC]: extend MoyaBot to automatically follow up with issues & PRs where we're waiting for author response

    I recently saw @KrauseFx's talk on scaling open source communities (great talk, I'd recommend it to everyone who's doing anything at all in open source). https://news.realm.io/news/tryswift-felix-krause-scaling-open-source-communities-github-management

    One of my big take aways was fastlane's fastlane-bot. Which would automatically follow up with issues and close them if there was no response. Right now, a couple of contributors have been manually doing that, but I think it would be awesome if we could add some of fastlane-bot's functionality to our bot so we don't have to politely close stale issues

    Any thoughts from other contributors? Does anyone want to take a shot at implementing that for MoyaBot?

    Reviewed by AndrewSB at 2017-05-04 00:36
  • 5. Multipart upload

    This the same implementation as #481 but is based on master branch.

    I need to support file upload using Moya and after look at #114 discussion, I decided to implement my own solution.

    I just added a MultipartTargetType protocol and made some extensions to MoyaProvider where the Target matches the new type.

    Here is an example:

    enum MyAwesomeAPI {
      case EndpointWithImageUpload(NSURL)
    }
    // Extend from MultipartTargetType
    extension MyAwesomeAPI: MultipartTargetType {
       var path: ...
       var parameters: ...
       var method: ...
       var sampleData: ...
       var multipartBody:[MultipartFormData] {
            switch self {
            case .EndpointWithImageUpload(let imageUrl):
                    return [MultipartFormData(provider: .File(contentFile), name: "files", mimeType:"image/jpeg", fileName: "photo.jpg")]
            default:
                return []
            }
        }
    }
    // Call the api
    RxMoyaProvider<MyAwesomeAPI>()
        .requestWithProgress(MyAwesomeAPI.CallWithImageUpload(fileUrl))
        .filterCompleted()
        .mapToJSON().....
    

    requestWithProgress method returns a ProgressResponse that contains the progress and the response result when the http call is completed. Use the method filterCompleted() to get the actual Response and filterProgress() to get the progress of the Upload.

    I had some trouble to compile and test the project. I can create some tests and add to this PR if some one help me with that.

    Thank you and enjoy!

    Reviewed by leonereveel at 2016-05-12 16:14
  • 6. Updated project to support Carthage

    This PR adds full support for Carthage, and a solution to using RxSwift and ReactiveCocoa without mandating it for those who wish to use pure Moya.

    • Adds ReactiveMoya and RxMoya targets
    • Adds RAC 3.0 support to ReactiveCocoaMoyaProvider
    • Expands the example project to include demonstrations using reactive extensions
    Reviewed by justinmakaila at 2015-07-16 00:47
  • 7. Not able to get URLEncoding working correctly when there is "?" and the method is "POST"

    I am using the last version of Moya and Alamofire with Swift 3

    I am having trouble when the method is "POST" and there is url encoding

    The url must be: products?id_category=28

    but it is converted to be: products%3Fid_category=28

    which is not working and giving 400 error on the server

    where can I find this conversion and stop it for the requests ?

    Here is the code i used:

    enum MyService {
    	case products(categorytId: Int)
    }
    
    extension MyService : TargetType {
        
        var base: String { return Constants.MyServiceURL }
        var baseURL: URL { return URL(string: base)! }
        
        public var task: Task {
            return .request
        }
    
        var path : String {
            switch self {
            // i tried with and without them, changing the parameters down below
            case .products(let id_category): 
                return "products?id_category=\(id_category)"
            }
        }
    
        var parameterEncoding: ParameterEncoding {
    	    switch self {
    	        case .products:
    	        	//return MyURLEncoding.queryString
    	            return URLEncoding.queryString
    	        default:
    	            return JSONEncoding.default 
    	    }
        }
    
        var parameters : [String : Any]? {
            switch self {
            // here I tried to add them for Testing purpose, i tried with and without them
            case .products(let id_category):
                var params: [String: Any] = [:]
                params["id_category"] = id_category
                return params
            default:
                return nil
            }
        }
    
        // The method must be always post always
        var method : Moya.Method {
            return .post;
        }
    
        var sampleDate : Data {
                return Data()
            }
        }
     }
    
    Reviewed by iballan at 2017-03-27 19:11
  • 8. Create and use MoyaError type for SignalProducers.

    I took a blind stab at the change I was talking about in #288, mostly as an exercise for myself. I think this preserves the data presented previously in the NSErrors' userInfo, while providing a more swift-friendly interface for retrieving it.

    As I said in the issue, I have no idea what I'm doing, but I'd love to hear your thoughts!

    Reviewed by tomburns at 2015-11-08 19:49
  • 9. Status code 405 returned for the first POST call of the app even when POST is an allowed method on the API.

    Moya version ->10.0.1

    I am made a LoginAPI class with following method implementation.

    public var method: Moya.Method {
            return .post
        }
    

    The Login Service allows only POST HTTP method. The issue is even after specifying Moya method as POST, the service response returns 405 status code in service call first time. If I retry the same call, status code 200 is returned.

    Logs with 405 status code: Request: https://myURL/login Moya_Logger: [07/01/2018 21:08:54] Request Headers: ["Content-Type": "application/json"] Moya_Logger: [07/01/2018 21:08:54] HTTP Request Method: POST Moya_Logger: [07/01/2018 21:08:54] Request Body: {"password”:”password”,”email”:”[email protected]"} Moya_Logger: [07/01/2018 21:08:54] Response: <NSHTTPURLResponse: 0x608000038ac0> { URL: Request: https://myURL/login } { Status Code: 405, Headers { Allow = ( POST ); Date = ( "Sun, 07 Jan 2018 15:35:42 GMT" ); "Transfer-Encoding" = ( Identity ); } }

    Logs with 200 Status code: Request: https://myURL/login Moya_Logger: [07/01/2018 21:12:35] Request Headers: ["Content-Type": "application/json"] Moya_Logger: [07/01/2018 21:12:35] HTTP Request Method: POST Moya_Logger: [07/01/2018 21:12:35] Request Body: {"password”:”password”,”email”:”[email protected]"} Moya_Logger: [07/01/2018 21:12:38] Response: <NSHTTPURLResponse: 0x60400043ab80> { URL: Request: https://myURL/login } { Status Code: 200, Headers { "Content-Type" = ( "application/json;charset=UTF-8" ); Date = ( "Sun, 07 Jan 2018 15:39:26 GMT" ); "Transfer-Encoding" = ( Identity ); } }

    Points to note:

    1. This url works perfectly in Postman everytime with 200 status code with POST method.
    2. On simulator, this is the behavior first time I run the app (fresh launch of the app). On next run or on retrying , it works.
    3. Tested the api call by refactoring it to an Alamofire call, it works.

    Could someone please help with what could be the possible cause for this?

    Reviewed by shwetachitlangia at 2018-01-07 16:08
  • 10. Add optional queue parameter to Reactive providers

    Hello, i implemented callback queue propagation for reactive providers(which address https://github.com/Moya/Moya/issues/1032 https://github.com/Moya/Moya/issues/1048 https://github.com/Moya/Moya/pull/762). I have same complains, that should be resolved before merge.

    Queue vs Scheduler

    I saw several suggestions to use Schedulers instead of queue for RxSwift(and whatever abstraction ReactiveSwift has), but I’m still believe this queue is not what rx provider responsible for, this is Alamofire threading stuff, users may be confused why they should pass scheduler instead of subscribe/observe on(and maybe this moment should be reflected at method comment).

    

We can’t use SchedulerType, case we need DispatchQueue, which unnecessary for abstract scheduler, so we have to constraint which scheduler type user can pass(so, instead of reuse his scheduler, user may be forced to create new just to pass queue).

    RxSwift do several optimizations for Schedulers(and i’m believe ReactiveSwift too), for example it “converts” Concurrent queue to serial(creating new serial queue with old queue as target), which queue should we use in this case(and even, can we still access concurrent queue)? Not sure we can rely on internal queue in future "optimizations" 😄

    Everything previously said was my own thoughts, but the fact Schedulers configuration is internal(which means we can’t access it outside of module and 3 paragraphs above has no sense) indicates that Krunoslav Zaher don’t want us to use internal queue :)

    Comments

    Maybe we should add reacher comments to method, explicitly indicating that we nor observe, nor subscribe on this queue, we just pass it to Alamofire as a callback queue. If user really want subscription(request method call) to run on queue - he should subscribe on caller side. 
User may create provider with queue and forget about it, which leads to unexpected element generation queue. In current implementation there is no way to pass nil queue to Alamofire, if provider has default queue, and I don’t know is it okay.

    Other stuff

    As far as I understand, I should update Readme(as at this PR). Maybe I shouldn't use ?? operator? Seems it can affect compilation time, so maybe we should sacrifice readability in favour of compilation speed?

    Reviewed by haritowa at 2017-04-16 20:01
  • 11. Flatten enums & parameters into extended Task type

    This solution was dicussed starting here: https://github.com/Moya/Moya/issues/1135#issuecomment-310913115

    Specifically this PR does the following:

    • [x] Remove parameters and parameterEncoding from everywhere
    • [x] Extend Task with different types of request data (e.g. data & compositeEncoded)
    • [x] Flatten the DownloadType and UploadType enums into the Task type
    • [x] Use those new task cases to set url params & http body appropriately
    • [x] Update Tests
    • [x] Update Docs
    • [x] Write a migration guide
    • [x] Add Changelog entry
    • [x] Handle the TODO: comments (exception handling) appropriately

    This solves the most apparent part of #1135 and it probably also solves #314.

    Reviewed by Jeehut at 2017-06-28 05:52
  • 12. Missing Headers in MultipartFormData

    Moya version 14.0.1 What i do

    let formData = MultipartFormData(provider: .data(data), name: name, mimeType: "text/plain")
    

    What I expect

    Name: parentObjType
    Headers: content-disposition: form-data; name="parentObjType"
    content-type: text/plain
    content-transfer-encoding: 8bit
    Data: 
    INTERACTION
    

    What i get

    Name: parentObjType
    Headers: content-disposition: form-data; name="parentObjType"
    content-type: text/plain
    Data: 
    INTERACTION
    

    The question is - How to add missing header ? content-transfer-encoding: 8bit

    Reviewed by msnazarow at 2022-05-30 16:11
  • 13. Add RedirectHandler to TargetType

    Alamofire supports setting a RedirectHandler per Session and per Request

    When using Moya, I can already inject a custom Session to setup a global RedirectHandler for all requests. But to implement a RedirectHandler per request, it's unnecessarily complicated because Moya hides Alamofire's Request from in public API, there is no way Moya's users can customise Alamofire's Request easily.

    I have tested by adding an optional RedirectHandler to TargetType protocol so that Moya's users can customise a redirect handler for each Target. By default, the value is nil, which means Alamofire will use the default handling mechanism for redirection.

    I'm aware of this discussion but I don't agree with it. We basically hide an useful feature of Alamofire from Moya's users.

    If this approach is ok, I'll add more tests to this PR to make it mergeable.

    Reviewed by antranapp at 2022-04-15 02:50
  • 14. Bump cocoapods-downloader from 1.4.0 to 1.6.3

    Bumps cocoapods-downloader from 1.4.0 to 1.6.3.

    Release notes

    Sourced from cocoapods-downloader's releases.

    1.6.3

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.2

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.1

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.0

    Enhancements
    • None.
    Bug Fixes
    • Adds a check for command injections in the input for hg and git.
      orta #124

    1.5.1

    Enhancements
    • None.
    Bug Fixes
    • Fix "can't modify frozen string" errors when pods are integrated using the branch option
      buju77 #10920

    1.5.0

    ... (truncated)

    Changelog

    Sourced from cocoapods-downloader's changelog.

    1.6.3 (2022-04-01)

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.2 (2022-03-28)

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.1 (2022-03-23)

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.0 (2022-03-22)

    Enhancements
    • None.
    Bug Fixes
    • Adds a check for command injections in the input for hg and git.
      orta #124

    1.5.1 (2021-09-07)

    Enhancements
    • None.

    ... (truncated)

    Commits
    • c03e2ed Release 1.6.3
    • f75bccc Disable Bazaar tests due to macOS 12.3 not including python2
    • 52a0d54 Merge pull request #128 from CocoaPods/validate_before_dl
    • d27c983 Ensure that the git pre-processor doesn't accidentally bail also
    • 3adfe1f [CHANGELOG] Add empty Master section
    • 591167a Release 1.6.2
    • d2564c3 Merge pull request #127 from CocoaPods/validate_before_dl
    • 99fec61 Switches where we check for invalid input, to move it inside the download fun...
    • 96679f2 [CHANGELOG] Add empty Master section
    • 3a7c54b Release 1.6.1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    Reviewed by dependabot[bot] at 2022-04-05 22:21
  • 15. Please provider Equatable conformance for MoyaError

    Hi all,

    I would like to suggest an improvement to MoyaError. Currently, I'm using your MoyaError helper from the tests (linked here) and I noticed that when I test different scenarios in code, that the MoyaError would erroneously report being "equalish", instead of equal.

    For example, a MoyaError.statusCode(401) is equalish to MoyaError.statusCode(404), while that isn't correct behaviour.

    Reviewed by jbehrens94 at 2022-04-04 07:09
Lightweight network abstraction layer, written on top of Alamofire
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-

Jun 17, 2022
Elegant network abstraction layer in Swift.
Elegant network abstraction layer in Swift.

Elegant network abstraction layer in Swift. 中文 Design Features Requirements Communication Installation Usage Base Usage - Target - Request - Download

Jan 29, 2022
Dratini is a neat network abstraction layer.

Dratini Dratini is a neat network abstraction layer. If you are looking for a solution to make your network layer neat, Dratini is your choice. Dratin

Jan 29, 2022
NSURLSession network abstraction layer, using Codable and Decodable for response and Encodable for request. ⚙️🚀
NSURLSession network abstraction layer, using Codable and Decodable for response and Encodable for request. ⚙️🚀

SONetworking NSURLSession network abstraction layer, using Codable and Decodable for response and Encodable for request. Project Folder and File Struc

Jan 28, 2022
Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.
Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.

Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application. Install Carthage

Jan 21, 2022
Say goodbye to the Fat ugly singleton Network Manager with this Network Layer

MHNetwork Protocol Oriented Network Layer Aim to avoid having bloated singleton NetworkManager Philosophy the main philosophy behind MHNetwork is to h

Apr 6, 2022
Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder
Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder

Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder

Jun 7, 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

Jun 14, 2022
DBNetworkStack is a network abstraction for fetching request and mapping them to model objects

DBNetworkStack Main Features ?? Typed network resources ?? Value oriented architecture ?? Exchangeable implementations ?? Extendable API ?? Composable

Jan 10, 2022
A generic network layer written in swift

SwiftyNet 1.0.0 A generic network layer written in swift. you can use it as an abstraction layer above Alamofire with generic returned types. Installa

Oct 11, 2021
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

Jun 25, 2022
Generic Network Layer created using Swift.

Generic-Network-Layer_iOS Generic Network Layer created using URLSession. Networking is an essential element in app development, and you'll need API c

Jun 16, 2022
Alamofire network layer

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

Nov 19, 2021
Async network layer with Combine
Async network layer with Combine

Version 1.0.10 Currently Available Platform Version iOS 12.0 tvOS 10.0 macOS 10.15 watchOS 3.0 macCatalyst 13.0 Hover is a Network layer which uses Ap

Jun 16, 2022
iOS 15, MVVM, Async Await, Core Data, Abstract Network Layer, Repository & DAO design patterns, SwiftUI and Combine
iOS 15, MVVM, Async Await, Core Data, Abstract Network Layer, Repository & DAO design patterns, SwiftUI and Combine

iOS 15, MVVM, Async Await, Core Data, Abstract Network Layer, Repository & DAO design patterns, SwiftUI and Combine

Jun 16, 2022
VFNetwork is a protocol-oriented network layer that will help you assemble your requests in just a few steps.
VFNetwork is a protocol-oriented network layer that will help you assemble your requests in just a few steps.

Simple, Fast and Easy. Introduction VFNetwork is a protocol-oriented network layer that will help you assemble your requests in just a few steps. How

Jun 14, 2022
NWReachability - a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

NWReachability is a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

Mar 4, 2022
A network extension app to block a user input URI. Meant as a network extension filter proof of concept.
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

Nov 19, 2021
Elegant API Abstraction for Swift

Endpoint (Deprecated) ⚠️ This project has been deprecated. Consider using Moya and MoyaSugar instead. ?? Elegant API Abstraction for Swift. At a Glanc

Mar 29, 2019