Giter Club home page Giter Club logo

ios-sample-app's Introduction

iOS-Sample-App (Built using Clean Architecture)

Code Coverage

image

Instructions

Build a simple Twitter client with two screens:

  • Log In
    • There should be fields to type in a username and a password
    • Upon tapping a "Log In" button, the code should eventually call TwitterClient.logIn(username:, password:) with the provided credentials; i.e. there may be intermediate objects and/or method calls in between tapping the button and calling logIn(username:, password:)
    • Once TwitterClient.isLoggedIn.value goes to true, the app should show the Tweet Feed screen
  • Tweet Feed
    • Show a list of tweets (Provided by TwitterClient.shared.loadTimeline)
      • Cells should include a title with the posting user’s handle and the content of the tweet
    • Navigation bar should have a "Log Out" button. On tapping this button:
      • TwitterClient.shared.isLoggedIn.value should be set to false
      • The Log In screen should be shown

Additional Requirements:

  • If TwitterClient.isLoggedIn.value is true on app launch, the app should go straight to the Tweet Feed screen

Out of scope:

  • Any error handling for failed log in credentials. If the credentials entered are incorrect, nothing should happen and the log in screen should remain displayed
  • Any UI tests

Notes

  • TwitterClient

This class will help manage the logged in status, as well as the tweets to display. Note that the isLoggedIn property is a ReactiveKit reactive Property. In order to listen for changes to this value, we use code like:

isLoggedIn.observeNext { (isLoggedIn: Bool) -> Void in /* handle logged in status change */ }
  • TwitterClientSpec

Included in the project is a test file to ensure that TwitterClient is acting the way we expect. If the tests are failing, then we've broken the project and please let us know. The tests are written in a particular style, and use the Quick and Nimble frameworks; you are not expected to write tests in that particular style, nor are you expected to use Quick and Nimble. Use whatever comes natural to you.

This class is meant to help you in lieu of using an actual Twitter API that takes some time to set up.

ios-sample-app's People

Contributors

ethan-riback avatar feighter09 avatar jamorat avatar rayansaeed 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.