> ## Content Index
> Fetch the complete content index at: https://developerinsider.co/llms.txt
> Use this file to discover other available public pages before exploring further.

# GoJek Address Book Problem Assignment for iOS
- URL: https://developerinsider.co/gojek-address-book-problem-assignment-for-ios/
- Published: 2020-04-04T06:29:00.000Z
- Updated: 2021-01-27T14:33:50.000Z
- Author: Guest
- Tags: Interview, GoJek, iOS, Swift

iOS Contact App build for Gojek iOS Developer interview process.

![](https://github.com/developerinsider/InterviewAssignments/blob/master/Go-Jek/GO-JEK-Assignment/docs/Screenshot.png?raw=true)

## Disclaimer

This solution is for reference purpose. Please, do not copy-paste it. Companies are smart enough to catch if you are cheating. If your solution got rejected due to this we're not responsible for it.

## GO-JEK iOS Problem Statement

In this problem, you've to build 3 screens as shown above. First one is **Contact List Screen**. This screen lists all available contacts in the app along with their photo. The contacts are fetched from the backend. Along with the list of contacts, it shows which contacts are marked favourite.

The second screen is **Contact Detail Screen**. Tapping on a contact in the Contact List Screen leads you to the Contact Detail Screen. This screen shows the details of the contact such as their phone number, name, image,  
email address, etc. You can call, message and email contact from this screen as well as mark/unmark them as a favourite.

The third screen is **Add/Edit Contact Screen**. Tapping on the edit button in the Contact Detail screen leads you to this screen. You can edit all fields of the contact in this screen including the contact's photo. Saving the contact's information should also save it on the backend. You can reuse this screen to **Add New Contact**. Tapping on the Add button in the Contact List Screen leads you to the Add Contact Screen. Here you can add a new contact to the database along with its phone number, email address, photo, etc. All fields of the new contact are mandatory in this screen.

## Solution

The solution of above problem statement is available [here](https://github.com/developerinsider/InterviewAssignments/tree/master/Go-Jek/GO-JEK-Assignment?ref=developerinsider.co). You can directly download this solution from [here](https://developerinsider.co/downloading/?download=https://github.com/developerinsider/InterviewAssignments/releases/download/v1.0/GO-JEK-Assignment.zip?raw=true&after=https://developerinsider.co/ios-insider/).

## Getting Start

- iOS 11.0+
- [Xcode 10.3](https://download.developer.apple.com/Developer%5FTools/Xcode%5F10.3/Xcode%5F10.3.xip?ref=developerinsider.co)
- [SwiftLint](https://developerinsider.co/how-to-use-swiftlint-with-xcode-to-enforce-swift-style-and-conventions/)
- [CocoaPods](https://cocoapods.org/?ref=developerinsider.co)
- [Fastlane](https://fastlane.tools/?ref=developerinsider.co) (Optional)
- Open `GJAssignment.xcworkspace` in Xcode 10.3
- Build the project

## Solution Details

This solution is build using MVVM, Swift 5 and a single 3rd party `MBProgressHUD`. Because less 3rd party means higher selection chances. This 3rd party is just to demonstrate the use of the dependency manager (cocoapods).

This project has `87.30%` code coverage with `20` Unit and `14` UI Test case. This project not using any 3rd parting to mocking and stubs the objects. This project uses custom protocol based solution by creating fake `URLSession`.  
![](https://github.com/developerinsider/InterviewAssignments/blob/master/Go-Jek/GO-JEK-Assignment/docs/XcodeTestResult.png?raw=true)

## Fastlane Commands

If you've fastlane install then you can run following commands to build and test.

- `fastlane tests` \- Runs all the tests
- `fastlane build` \- Run all the tests and build