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

Other Useful Business Software
Build Securely on Azure with Proven Frameworks Icon
Build Securely on Azure with Proven Frameworks

Lay a foundation for success with Tested Reference Architectures developed by Fortinet’s experts. Learn more in this white paper.

Moving to the cloud brings new challenges. How can you manage a larger attack surface while ensuring great network performance? Turn to Fortinet’s Tested Reference Architectures, blueprints for designing and securing cloud environments built by cybersecurity experts. Learn more and explore use cases in this white paper.
Download 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