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. 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? After some setup, using Moya is really simple. Even cooler are the reactive extensions. Moya provides reactive extensions for ReactiveSwift and RxSwift.

Features

  • 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
  • In any file you’d like to use Moya in, don’t forget to import the framework with import Moya
  • Add Alamofire, Result & Moya as a git submodule
  • No more typos in URLs. No more missing parameter values. No more messing with parameter encoding

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Moya

Moya Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Moya!

Additional Project Details

Operating Systems

Apple iPhone, Mac

Programming Language

Swift

Related Categories

Swift Software Development Software, Swift Networking Software

Registered

2021-04-30