iOS tips to boost my productivity
Tags: ios, tip, beginners, debugging
Published: 2019-05-04 08:13:45

---
title: iOS tips to boost my productivity
published: true
description: 
tags: iOS, tip, beginner, debugging
---

It's the first time I've written this technical blog on Dev.to. 

This tip will list all useful libraries and tools, which my team and I use every day.

Hopefully, this tip can increase your productivity during iOS development 😍

### [Moya](https://github.com/Moya/Moya)
Moya is a convenient library to help me to categorize the networking route easily. Rather than introducing big Networking class, I define the `AppEndpoint` enum and introduce all route here.

```swift
public enum AppEndpoint {
    case login(LoginParam)
    case signup(SignupParam)
    case fetchUserInfo(UserParam)
}

provider = MoyaProvider<AppEndpoint>()
provider.request(.login(param)) { result in
    switch result {
    case let .success(moyaResponse):
        // Handle data
    case let .failure(error):
       // Error
}
```

### Pros
- Abstract the Networking Layer
- Hide the Business logic 
- Easily categorize the API route
- Beautiful Result.

### [TinyConstraints](https://github.com/roberthein/TinyConstraints)
One of the lightweight class to help me overcome the pain in my ass when working with NSConstraintLayout.

It's just a one-line code to attach the subview to fill out the parent ;D 
```swift
view.edgesToSuperView()
```

## [Reveal](https://revealapp.com/)
Reveal is one of the important apps for me to implement pixel perfect. Most of the time I inspect the view layers, the Xcode tool isn't sufficient for me since I have to calculate the off pixel. Reveal is my rescuer. 

![Reveal](https://thepracticaldev.s3.amazonaws.com/i/3vsrg46bm8ba4q9nc3k1.png)

### Pros
- Easily inspect the complex view hierarchy
- Don't need to debug directly from Xcode
- Native app

## [Proxyman](https://proxyman.io/)
Proxyman is one of must-use tool for the QA and iOS team in my company.

It helps me to see the HTTPS response and easier to catch the bug. In the past, we used to use Charles, but my team prefers Proxyman since the UI is nicer
![Proxyman](https://thepracticaldev.s3.amazonaws.com/i/qpl8mtn7hkejl4oh5yhr.jpg)

- The request and response content are so sweet
![Proxyman](https://thepracticaldev.s3.amazonaws.com/i/2p0mmgjjwhfg4qefc483.png)

- Easy to edit the bug request and try again with new param
![Repeat](https://thepracticaldev.s3.amazonaws.com/i/28qn2fwteuk20a8icrha.png)

- Able to export the session for QA team - it's great for reproducing the bug later
![Debug](https://thepracticaldev.s3.amazonaws.com/i/bxkgvc9d280u3vr7w6fm.png)

### Pros
- Modern and native app
- Easily reproduce the bug from QA team
- Work with iOS simulator and iPhone too, which is awesome 😮

### Other
+ [SwiftLint](https://github.com/realm/SwiftLint) for enforcing the Syntax
+ [Danger](https://github.com/danger/danger): It's accompanied with SwiftLint to inform my teammate automatically in Github.
+ [Fastlane](https://github.com/fastlane/fastlane) and Bitrise for CI/CD
+ [Realm](https://realm.io/) is the best candidate for Database storage and lightweight [MMKV Key-Value storage](https://github.com/Tencent/MMKV)
+ [IGListKit](https://github.com/Instagram/IGListKit) for high-performance listing.
+ Diff Algorithm for reloading huge UITableView efficiently.

If you know any useful iOS libraries or tools, please share with me 👏