ios-templates icon indicating copy to clipboard operation
ios-templates copied to clipboard

[#324] Use Moya as the main Network Layer

Open Shayokh144 opened this issue 2 years ago • 1 comments

https://github.com/nimblehq/ios-templates/issues/324

What happened

Replace Alamofire with Moya as main network layer of the template.

Insight

  • Remove Alamofire from Pod
  • Add Moya in Pod
  • Update networking code to use Moya
  • Add comments for better readability
  • Test this branch by creating a separate app from it
  • Remove common RequestConfiguration as it is not needed, developers can create their own request configuration enum extending Moya's TargetType

Proof Of Work

  • Created a demo app from this branch, request-response working fine

  • Create different configurations independently

  • Sample configuration 1: Screenshot 2022-12-01 at 5 40 35 PM

  • Sample configuration 2: Screenshot 2022-12-01 at 5 39 23 PM

  • Call using any configuration with any decodable type Screenshot 2022-12-01 at 5 45 46 PM

  • Write test with stubbed provider

Screenshot 2022-12-02 at 4 21 01 PM

Shayokh144 avatar Nov 28 '22 09:11 Shayokh144

@blyscuit @ducbm051291 I have updated the PR, please take a look

Shayokh144 avatar Dec 01 '22 11:12 Shayokh144

@Shayokh144 we will have this initiative Replace-Network-Layer-with-Moya to work on before making the change to our ios templates. So I'll close this PR. cc: @nimblehq/ios-chapter

vnntsu avatar Dec 20 '22 07:12 vnntsu