Git Product home page Git Product logo

ios-travel-app's Introduction

iOS travel app tech test

screenshot

About

This is an iOS travel app tech test built with Swift 3.0

Prerequisites

  • Cocoapods
  • Xcode >= 8.0

To Install

  • Make sure Cocoapods is installed and set up
  • Note: to install cocoapods run $ gem install cocoapods
  • Note: to set up cocoapods run $ pod setup
  • Run $ pod install from the directory to install dependencies
  • Open the .xcworkspace file with Xcode
  • Run simulator or run tests
  • Enjoy!

Challenge Briefing:

We would like you to develop the following app to display a list of holiday deals.

We’re in the process of migrating our codebase to Swift, so please complete this exercise using Swift (2.x or 3). Feel free to use any libraries or frameworks that you prefer (and be prepared to explain your choices of course).

The app will use a UITabBar containing two options. One for showing the settings and one for the home screen (not necessarily in this order). Each of these options should contain a UINavigationController.


The home screen should show a list of holiday deals for various destinations.

The deals will be retrieved by calling an API. You can either mock this API or make use of our real live one. If you choose to mock the API call, you can use the following data:

"HotelsByChildDestination": { "10|10030": { "Title": "Majorca, Ibiza & Menorca", "Count": 178, "MinPrice": 428.96, "Position": 1 // Use this field to order the list. }, "10|10031": { "Title": "Canary Islands", "Count": 106, "MinPrice": 555, "Position": 0 }, "10|10049": { "Title": "Spain", "Count": 99, "MinPrice": 49.99, "Position": 2 } }

If you prefer to make a real API call you can use the following URL:

[Hidden for privacy]

and POST the following JSON request in the body using Content-Type of application/json:

{"CheckInDate":"2017-01-10T00:00:00.000Z", "Flexibility":3, "Duration":7, "Adults":2, "DomainId":1, "CultureCode":"en-gb", "CurrencyCode":"GBP", "OriginAirports":["LHR","LCY","LGW","LTN","STN","SEN"], "FieldFlags":8143571, "IncludeAggregates":true}

You should receive JSON in that same structure as described above.

Each item in the list should look like this one:

item

Please notice that HotelsByChildDestination is a dictionary where the key takes the format of type|id. The two numbers in the key (for example 10|10030) are used to retrieve the background image using the following URL format:

[Hidden for privacy]

While retrieving the list of deals, show a loading indicator. Dismiss it when the call returns.

In case the API returns an error show an alert to show the error and allow the user to retry.

The settings screen can be empty.

TODO

  • More robust error handling with more coverage
  • More testing for more complete test coverage
  • View layout refinements
  • UITesting
  • Refactoring

ios-travel-app's People

Contributors

jonnypickard avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.