Swiftpack.co - Package - Moya/Moya

404: Not Found

Github

link
Stars: 12252

Releases

15.0.0-alpha.1 - 2020-07-07 17:10:47

This is an early-release version of Moya 15. This includes minimum Swift version bump to 5.1 as well as bringing back Combine support! It's an alpha release since there might be slight breaking changes to the Combine extensions if we find some problems and also there might be improvements that are waiting in PRs.

Thanks to @MaxDesiatov @BasThomas @LucianoPAlmeida @amaurydavid and everyone else that helped in the newest release! 🚀

Changelog

Added

Changed

14.0.0 - 2020-02-15 12:12:38

Moya 14.0.0 is finally released! 🚀 This is a huge amount of work and so I wanted to thank all contributors, especially @amaurydavid, @LucianoPAlmeida, @larryonoff, @hasankose and @fredpi!

TL;DR Changelog

  • Bumped dependency versions: Alamofire to 5.0, RxSwift to 5.0, ReactiveSwift to 6.0
  • Minimum target version are now in line with Alamofire 5. iOS: 10.0, tvOS: 10.0, macOS: 10.12, watchOS: 3.0
  • Removed Result dependency in favor of Result type introduced in Swift 5
  • NetworkLoggerPlugin have been reworked to allow more customization about the logged request's components
  • RequestType now has sessionHeaders property! These are the headers that are added when the request is added to a session
  • In AccessTokenPlugin the token closure now takes an AuthorizationType as parameter and AuthorizationType.none has been removed in favor of using AuthorizationType?
  • MultiTarget now implements AccessTokenAuthorizable so that the inner target's authorizationType is correctly returned to the AccessTokenPlugin when requested
  • Added SwiftPM testing using swift test and releasing using swift run rocket which allows us to remove testing dependencies for SwiftPM releases
  • and a lot more!

See migration guides or create an issue and let us help you out :)

14.0.0-beta.6 - 2019-12-09 16:17:54

Another update while we wait for Alamofire to be stable. This time one fix, one small update - hope you will like it! 🚀

Note: Unfortunately we introduced the breaking change with the update, but this was a pretty big gain in terms of the plugin usage so we decided to move forward with it. Make sure you see the migration guide to see how you can migrate easily.

Changelog

Changed

  • Breaking Change In AccessTokenPlugin, the token closure now takes a AuthorizationType as parameter and AuthorizationType.none has been removed in favor of using AuthorizationType?. #1969 by @amaurydavid.

Fixed

  • Fixed a data race condition issue and enable TSAN on the test action and CI. #1952 by @LucianoPAlmeida.

14.0.0-beta.5 - 2019-10-27 15:17:05

Only bumping Alamofire version, no changes to code this time 👍

Changelog

  • Breaking Change Minimum version of Alamofire is now 5.0.0-rc.3. #1944 by @sunshinejr.

14.0.0-beta.4 - 2019-10-05 10:03:33

Unfortunately we had to remove Combine for now to keep Xcode 10 compatibility 😭 You might want to update to that version ASAP as it's fixing crashes on release builds...

Changelog

  • Removed Combine extensions for now. Due to problems with weak-linking the framework, it's too difficult to support it with ease using all package managers and also without breaking backwards-compatibility. Probably gonna introduce it once we only support Xcode 11. #1933 by @sunshinejr

14.0.0-beta.3 - 2019-09-27 15:52:11

A lot of fixes in this one! 👷

Changelog

  • Fixed an issue with displaying cURL-formatted request in NetworkLoggerPlugin. #1916 by @sunshinejr.
  • Fixed an issue that wouldn't display stubbed response body in NetworkLoggerPlugin. #1916 by @sunshinejr.
  • Fixed an issue where Carthage users using Xcode 11 couldn't install Moya 14. We added weak-linking for the xcodeproj so you might need additional steps for Xcode 10 + Carthage + Moya 14.* users. #1920 by @fredpi and @sunshinejr.
  • Fixed an issue that wouldn't persist URLRequest changes (created by plugins) when stubbed. #1921 by @sunshinejr.
  • Fixed an issue with SPM integration - it no longer fetches testing libraries and also doesn't create runtime/Xcode Preview crashes. #1923 by @sunshinejr.

14.0.0-beta.2 - 2019-09-09 11:57:09

This beta just updates Alamofire to version 5.0.0-rc.2.

14.0.0-beta.1 - 2019-09-06 13:51:30

🚀🚀🚀

✅ Combine extensions ✅ NetworkLoggerPlugin rewrite ✅ Alamofire 5.0.0-rc.1

For NetworkLoggerPlugin, see our migration guide!

Changelog

Added

  • Combine support! #1904 by @sunshinejr.
  • Very raw SPM testing support! Thanks to the work on OHHTTPStubs, we can finally start using swift test again. #1896 by @sunshinejr.

Changed

  • Breaking Change Minimum version of Alamofire is now 5.0.0-rc.1. #1909 by @sunshinejr.
  • Breaking Change The NetworkLoggerPlugin have been reworked to allow more customization about the logged request's components. #1894 by @amaurydavid.
  • Breaking Change Bumped ReactiveSwift version to 6.1.0. This should only affect Carthage users, but you'll probably want to use 6.1.0 in all of your Xcode 11 projects. #1896 by @sunshinejr.
  • NetworkLoggerPlugin now logs error when available (using LogOptions.verbose or specyfing errorResponseBody in your LogOptions). #1880 by @amaurydavid.

14.0.0-alpha.2 - 2019-08-01 15:32:37

This is a pre-release version of Moya 14. This includes removal of Result dependency (now using Swift's Result), upgrade to Alamofire 5 (currently 5.0.0-beta.7) and few more adjustments.

Changelog

Added

  • RequestType now has sessionHeaders! These are the headers that are added when the request is added to a session. #1878 by @sunshinejr.

Changed

  • Breaking Change Minimum target version are now in line with Alamofire 5. iOS: 10.0, tvOS: 10.0, macOS: 10.12, watchOS: 3.0. #1810 by @sunshinejr.
  • Breaking Change Minimum version of Alamofire is now 5.0.0-beta.7. #1810 by @sunshinejr.
  • Breaking Change Removed Result dependency in favor of Result introduced in Swift 5. #1858 by @larryonoff.
  • Breaking Change Added TargetType parameter in the output of NetworkLoggerPlugin. #1866 by @hasankose.
  • NetworkoLoggerPlugin uses the newly added sessionHeaders and now logs all the headers that the request will produce. #1878 by @sunshinejr.

14.0.0-alpha.1 - 2019-05-14 16:08:01

This is an early pre-release version of Moya 14. This includes newest RxSwift & ReactiveSwift versions. Next pre-releases would have new version of Alamofire and potentially removed Result dependency.

Changelog

Changed

13.0.1 - 2019-05-01 10:53:26

Changelog

Fixed

  • Fixed a problem where, while using stubbed responses, Moya would generate weird cancellation errors in the console. #1841 by @sunshinejr.

13.0.0 - 2019-04-10 16:21:55

Xcode 10.2, Swift 5.0 and more! 🚀

Full Changelog for Moya 13.0:

Note: there are no changes between 13.0.0-beta.1 and 13.0.0.

Changed

  • Breaking Change .mapImage() extension on Single and Observable now returns non-optional image. #1789, #1799 by @bjarkehs and @sunshinejr.
  • Breaking Change Minimum version of ReactiveSwift is now 5.0. #1817 by @larryonoff.
  • Breaking Change Minimum version of Result is now 4.1. #1817 by @larryonoff.
  • Breaking Change Updated project to Swift 5.0. #1827 by @sunshinejr.
  • Updated project to support Xcode 10.2. #1826 by @larsschwegmann.
  • MoyaError now conforms to CustomNSError protocol, makes underlying errors available in its user-info dictionary. #1783 by @dpoggi.

Fixed

  • Fixed Progress object on responses that did not specify correct Content-Length header. Now, whenever there is no valid header, the progress will be 0.0 until the completion of the request. Also, the completed property is now true only when the response was serialized, we do not rely on progress being 1.0 anymore. #1815 by @sunshinejr.

Removed

  • Breaking change Removed validate on TargetType. It was deprecated in Moya 11, use validationType instead. #1828 by @sunshinejr.

13.0.0-beta.1 - 2019-03-31 19:03:55

Xcode 10.2, Swift 5.0 and more! 🚀

Changed

  • Breaking Change .mapImage() extension on Single and Observable now returns non-optional image. #1789, #1799 by @bjarkehs and @sunshinejr.
  • Breaking Change Minimum version of ReactiveSwift is now 5.0. #1817 by @larryonoff.
  • Breaking Change Minimum version of Result is now 4.1. #1817 by @larryonoff.
  • Breaking Change Updated project to Swift 5.0. #1827 by @sunshinejr.
  • Updated project to support Xcode 10.2. #1826 by @larsschwegmann.
  • MoyaError now conforms to CustomNSError protocol, makes underlying errors available in its user-info dictionary. #1783 by @dpoggi.

Fixed

  • Fixed Progress object on responses that did not specify correct Content-Length header. Now, whenever there is no valid header, the progress will be 0.0 until the completion of the request. Also, the completed property is now true only when the response was serialized, we do not rely on progress being 1.0 anymore. #1815 by @sunshinejr.

Removed

  • Breaking change Removed validate on TargetType. It was deprecated in Moya 11, use validationType instead. #1828 by @sunshinejr.

12.0.1 - 2018-11-19 07:06:18

This release fixes the installation issues for the Moya/RxSwift and Moya/ReactiveSwift subspecs via CocoaPods (#1768). Please use this as the minimum version for 12.x releases.

12.0.0 - 2018-11-19 01:10:04

This release is long overdue but Moya 12.0 is finally here! 🎉 The latest version of Moya now supports Swift 4.2 as well as version 4.X of RxSwift and 4.X of ReactiveSwift. Additionally, we've made a highly requested addition to the AccessTokenPlugin - the ability to set a header token in a custom format 👏

Thanks to all the contributors to this release, @SeRG1k17, @sunshinejr, @simonrice, @LucianoPAlmeida, @lexorus, as well as everyone else who makes this project possible ❤️

Full Changelog for Moya 12.0:

Added

  • Breaking Change Added .custom(String) authorization case to AuthorizationType inside AccessTokenPlugin. #1611 by @SeRG1k17.

Changed

  • Breaking Change watchOS deployment target for RxMoya is now 3.0. #1758 by @simonrice.

  • Breaking Change Minimum version of ReactiveSwift is now 4.0. #1668 by @sunshinejr.

  • Breaking Change Minimum version of Result is now 4.0. #1668 by @sunshinejr.

  • Breaking Change Changed Responses filter method parameter to use a generic RangeExpression that accepts any range type. #1624 by @LucianoPAlmeida.

  • Breaking Change Changed AccessTokenPlugin's initializer to no longer use an @autoclosure for the tokenClosure parameter. #1611 by @SeRG1k17.

Fixed

  • Fix warnings generated by Xcode 10. Updated project to Swift 4.2 #1740 by @lexorus

12.0.0-beta.1 - 2018-08-07 17:18:00

Added

  • Breaking Change Added .custom(String) authorization case to AuthorizationType inside AccessTokenPlugin. #1611 by @SeRG1k17.

Changed

  • Breaking Change Minimum version of ReactiveSwift is now 4.0. #1668 by @sunshinejr.

  • Breaking Change Minimum version of Result is now 4.0. #1668 by @sunshinejr.

  • Breaking Change Changed Responses filter method parameter to use a generic RangeExpression that accepts any range type. #1624 by @LucianoPAlmeida.

  • Breaking Change Changed AccessTokenPlugin's initializer to no longer use an @autoclosure for the tokenClosure parameter. #1611 by @SeRG1k17.

11.0.2 - 2018-04-01 05:19:24

This release is a small patch to fix Moya's Carthage compatibility.

Fixed

  • Fixed Carthage compatibility by disabling the SwiftLint build phase in release builds. #1619 by @Dschee.

11.0.1 - 2018-02-26 06:29:12

This release fixes a few bugs regarding Alamofire validation not being performed on requests.

Fixed

  • Fixed Alamofire validation not being performed on .uploadMultipart requests. #1591 by @SD10.
  • Fixed Alamofire validation not being performed on stubbed requests. #1593 by @SD10.

11.0.0 - 2018-02-08 04:28:47

This release brings support for ReactiveSwift 3.0. Thank you to all the contributors making it possible! ❤️

Full Changelog for Moya 11.0:

Added

  • Breaking Change Added a .requestCustomJSONEncodable case to Task. #1443 by @evgeny-sureev.
  • Breaking Change Added failsOnEmptyData boolean support for the Decodable map functions. #1508 by @jeroenbb94.

Changed

  • Breaking Change Updated minimum version of ReactiveSwift to 3.0. #1470 by @larryonoff.
  • Breaking Change Changed the validate property of TargetType to use new ValidationType enum representing valid status codes. #1505 by @SD10, @amaurydavid.
  • Breaking Change Removed generic from Endpoint. See #1524 for discussion. #1529 by @zhongwuzw.

11.0.0-beta.2 - 2018-01-27 18:27:19

Changed

  • Breaking Change Removed generic from Endpoint. See #1524 for discussion. #1529 by @zhongwuzw.

10.0.2 - 2018-01-26 16:27:49

Fixed

  • Fixed a bug where modifying .uploadMultipart, .uploadCompositeMultipart, .uploadFile, .downloadDestination, and .downloadParameters tasks through an endpointClosure has no effect on the final request. #1550 by @SD10, @sunshinejr.
  • Fixed a bug where URLEncoding.httpBody wasn't allowed as bodyEncoding in Task.requestCompositeParameters(). #1557 by @sunshinejr.

11.0.0-beta.1 - 2018-01-10 21:40:09

This release brings full ReactiveSwift 3.0 support and minor enhancements. Thanks to all contributors that made it possible!

Added

  • Breaking Change Added a .requestCustomJSONEncodable case to Task. #1443 by @evgeny-sureev.
  • Breaking Change Added failsOnEmptyData boolean support for the Decodable map functions. #1508 by @jeroenbb94.

Changed

  • Breaking Change Updated minimum version of ReactiveSwift to 3.0. #1470 by @larryonoff.
  • Breaking Change Changed the validate property of TargetType to use new ValidationType enum representing valid status codes. #1505 by @SD10, @amaurydavid.

10.0.1 - 2017-11-23 19:11:24

Nothing better than a few bug fixes after the major release 😉

Fixed

  • Fixed a bug that Decodable mapping to object other than Array and Dictionary in a key path cause crash. #1405 by @ufosky.
  • Fixed a bug with missing Content-Type header when using .requestJSONEncodable #1410 by @Vict0rS.
  • Fixed linker settings, enabling RxMoya and ReactiveMoya to be used in app extensions #1417 by @spookyvision.
  • Fixed carthage OS X not targeting 10.10 #1444 by @lucas34.

- 2017-10-21 20:02:56

Full Swift 4.0, RxSwift 4.0 support and more! Thanks to all contributors that made it possible:

@devxoul @SD10 @LeLuckyVint @afonsograca @AndrewSB @BasThomas @pedrovereza @sunshinejr

Big ❤️ to all of you!

Changes since 10.0.0-beta.1:

Fixed

  • Fixed a bug that Decodable mapping won't decode nested JSON array in a key path #1382 by @devxoul.

Full changelog for Moya 10.0.0:

Added

Changed

  • Breaking Change Changed Endpoint.init so it doesn't have any default arguments (removing default argument .get for method parameter and nil for httpHeaderFields parameter). #1289 by @sunshinejr.
  • Breaking Change Changed NetworkActivityPlugin so its networkActivityClosure has now target: TargetType argument in addition to change: NetworkActivityChangeType. #1290 by @sunshinejr.
  • Breaking Change Changed Endpoint's urlRequest property to urlRequest() a throwing method. #1248 by @SD10.

Removed

  • Breaking Change Removed RxMoyaProvider and ReactiveSwiftMoyaProvider. #1320 by @SD10

Fixed

  • Fixed a MoyaProvider+Rx self-retaining bug in requestWithProgress. #1311 by @AndrewSB.

10.0.0-beta.1 - 2017-10-08 19:50:59

Full Swift 4.0 support and more! RxSwift 4.0.0-rc.0 needed for RxSwift 4.0. Thanks to all contributors that made it possible!

Added

Changed

  • Breaking Change Changed Endpoint.init so it doesn't have any default arguments (removing default argument .get for method parameter and nil for httpHeaderFields parameter). #1289 by @sunshinejr.
  • Breaking Change Changed NetworkActivityPlugin so its networkActivityClosure has now target: TargetType argument in addition to change: NetworkActivityChangeType. #1290 by @sunshinejr.
  • Breaking Change Changed Endpoint's urlRequest property to urlRequest() a throwing method. #1248 by @SD10.

Removed

  • Breaking Change Removed RxMoyaProvider and ReactiveSwiftMoyaProvider. #1320 by @SD10

Fixed

  • Fixed a MoyaProvider+Rx self-retaining bug in requestWithProgress. #1311 by @AndrewSB.

9.0.0 - 2017-09-04 18:50:41

This is a big major release and thanks to everyone involved! 🎉 🎉 🎉

In this release there were two big changes:

  1. We deprecated reactive providers and started using rx and reactive namespaces.
  2. We removed parameters, parameterEncoding and expanded task.

We also added Swift 4.0 support to Moya core (and preliminary for ReactiveSwift) where support for RxSwift will be in a next major release. We improved our test coverage from 76% up to 83%, added callbackQueues as an option for all requests (reactive or not!), headers to TargetType, improved AccessTokenPlugin, started using Single<Response> instead of Observable<Response> for RxSwift normal requests and many, many more! Checkout the changelog below and have fun! 🎉 There is also a migration guide to help you make it through!

Oh, and if you find anything you are concerned about, make a new Issue - or better yet, make a PR with the fix! 😉

Changes since 9.0.0-beta.1:

  • Removed default value for task from Endpoint initializer.

Full changelog for Moya 9.0.0:

  • Breaking Change Added support to get the response (if any) from MoyaError.
  • Breaking Change Added headers to TargetType.
  • Breaking Change Updated RxMoyaProvider.request to return a Single<Request>.
  • Breaking Change Updated Moya.Response's responseto use an HTTPURLResponse instead of a URLResponse.
  • Breaking Change Updated TargetTypes so it no longer receives the Authorization: Bearer <token> header by default when using AccessTokenPlugin.
  • Breaking Change Renamed all occurrences of queue to callbackQueue.
  • Breaking Change Deprecated ReactiveSwiftMoyaProvider and RxSwiftMoyaProvider. Use MoyaProvider with reactive properties now: provider.reactive._, provider.rx._. In case you were subclassing reactive providers, please take a look at this PR from Eidolon. It covers migration from subclassing given providers, to usage by composition.
  • Breaking Change Removed parameter name in requestWithProgress for ReactiveSwiftMoyaProvider.
  • Breaking Change Removed deprecated in Moya 8.0.0: Moya.Error, endpointByAddingParameters(parameters:), endpointByAddingHttpHeaderFields(httpHeaderFields:), endpointByAddingParameterEncoding(newParameterEncoding:), endpointByAdding(parameters:httpHeaderFields:parameterEncoding), StructTarget, filterStatusCodes(range:), filterStatusCode(code:), willSendRequest(request:target:), didReceiveResponse(result:target:), ReactiveCocoaMoyaProvider, ReactiveSwiftMoyaProvider.request(token:).
  • Breaking Change Replaced parameters & parameterEncoding in TargetType with extended Task cases.
  • Breaking Change Replaced shouldAuthorize: Bool in AccessTokenAuthorizable with authorizationType: AuthorizationType.
  • Breaking Change Replaced token in AccessTokenPlugin with tokenClosure.
  • Breaking Change Flattened UploadType and DownloadType into Task cases.
  • Added optional callback queue parameter to reactive providers.
  • Added public URL(target:) initializator that creates url from TargetType.
  • Added an optional requestDataFormatterin NetworkLoggerPlugin to allow the client to interact with the request data before logging it.
  • Added Swift 4.0 support for Moya core (without RxSwift/ReactiveSwift extensions for now).
  • Added all the filter/map operators that were available for Observable<Response> to Single<Response> as well.
  • Added AuthorizationType to AccessTokenAuthorizable representing request headers of .none, .basic, and .bearer.
  • Added tests for Single<Response> operators.
  • Added Progress object into the response when calling progress callback on completion.
  • Added tests for creating URLRequest from Task.
  • Updated minimum version of RxSwift to 3.3.
  • Updated minimum version of ReactiveSwift to 2.0.
  • Fixed a bug where you would have two response events in requestWithProgress method on ReactiveSwift module.
  • Fixed a bug where you weren't notified on progress callback for data request.
  • Enabled the "Allow app extension API only" flag.
  • Removed default value for task from Endpoint initializer.

9.0.0-beta.1 - 2017-08-26 15:38:29

9.0.0-beta.1

  • Breaking Change Replaced parameters & parameterEncoding in TargetType with extended Task cases.
  • Breaking Change Flattened UploadType and DownloadType into Task cases.
  • Breaking Change Replaced shouldAuthorize: Bool in AccessTokenAuthorizable with authorizationType: AuthorizationType.
  • Breaking Change Replaced token in AccessTokenPlugin with tokenClosure.
  • Breaking Change TargetTypes no longer receive the Authorization: Bearer <token> header by default when using AccessTokenPlugin.
  • Added Swift 4.0 support for Moya core (without RxSwift/ReactiveSwift extensions for now).
  • Added all the filter/map operators that were available for Observable<Response> to Single<Response> as well.
  • Added AuthorizationType to AccessTokenAuthorizable representing request headers of .none, .basic, and .bearer.
  • Added tests for Single<Response> operators.
  • Added Progress object into the response when calling progress callback on completion.
  • Added tests for creating URLRequest from Task.
  • Fixed a bug where you weren't notified on progress callback for data request.

9.0.0-alpha.1 - 2017-07-29 17:11:17

9.0.0-alpha.1

  • Breaking Change Added support to get the response (if any) from MoyaError.
  • Breaking Change Added headers to TargetType.
  • Breaking Change Updated RxMoyaProvider.request to return a Single<Request>.
  • Breaking Change Updated Moya.Response's responseto use an HTTPURLResponse instead of a URLResponse.
  • Breaking Change Renamed all occurrences of queue to callbackQueue.
  • Breaking Change Deprecated ReactiveSwiftMoyaProvider and RxSwiftMoyaProvider. Use MoyaProvider with reactive properties now: provider.reactive._, provider.rx._. In case you were subclassing reactive providers, please take a look at this PR from Eidolon. It covers migration from subclassing given providers, to usage by composition.
  • Breaking Change Removed parameter name in requestWithProgress for ReactiveSwiftMoyaProvider.
  • Breaking Change Removed deprecated in Moya 8.0.0: Moya.Error, endpointByAddingParameters(parameters:), endpointByAddingHttpHeaderFields(httpHeaderFields:), endpointByAddingParameterEncoding(newParameterEncoding:), endpointByAdding(parameters:httpHeaderFields:parameterEncoding), StructTarget, filterStatusCodes(range:), filterStatusCode(code:), willSendRequest(request:target:), didReceiveResponse(result:target:), ReactiveCocoaMoyaProvider, ReactiveSwiftMoyaProvider.request(token:).
  • Added optional callback queue parameter to reactive providers.
  • Added public URL(target:) initializator that creates url from TargetType.
  • Added an optional requestDataFormatterin NetworkLoggerPlugin to allow the client to interact with the request data before logging it.
  • Updated minimum version of RxSwift to 3.3.
  • Updated minimum version of ReactiveSwift to 2.0.
  • Fixed a bug where you would have two response events in requestWithProgress method on ReactiveSwift module.
  • Enabled the "Allow app extension API only" flag.

8.0.5 - 2017-05-26 14:25:12

8.0.5

  • Fixed a bug where you would have two response events in requestWithProgress method on RxMoya module.

8.0.4 - 2017-05-09 18:27:05

8.0.4

  • Bumped minimum version of ReactiveSwift to 1.1.
  • Changed use of deprecated DateSchedulerProtocol to DateScheduler.
  • Move project to using a single target for all platforms.
  • Changed default endpoint creation to only append path to baseURL when path is not empty.