Skip to content

LunarLogic/RubyTimeExample

Repository files navigation

RubyTime example

This is an example application created in order to show how you can write a simple iOS app that connects to an external API and displays downloaded JSON data. It connects to a demo installation of RubyTime, our time tracking system, and displays a list of projects and each project's activities.

Contents

  • AppDelegate – the entry point to the app; creates a window, main view controller, shows a login form popup
  • LoginViewController – asks the user for username and password and then sends them to the server to check if they're correct
  • MasterViewController – loads all projects from the API and displays them on the list
  • DetailViewController – loads a selected project's activities from the API and displays them
  • ServerConnector – a shared singleton object that handles all connections to the API and returns data to view controllers
  • Activity, Project – model objects built from JSON hashes downloaded from the API

Some non-standard things you might see that come from LunarToolkit (basically anything that starts with "LL" comes from there):

  • LLArray – this is a macro that saves you some typing while creating an array
  • LLFormat – a macro which simplifies creating strings, works just like printf
  • LLReleaseOnDealloc – a macro that lets you write a dealloc method that releases 4 objects in 1 line instead of 7
  • LLAccount – lets you store a username and password, save them into settings and load them back
  • LLConnector – simplifies building network connection classes like ServerConnector
  • llWrapInNavigationController – returns a new UINavigationController having given controller at the root of the stack
  • llShowErrorWithMessage – show a UIAlertView with title "Error" and given message

License

Copyright by Jakub Suder <jakub.suder at gmail.com> & Lunar Logic Polska. Licensed under WTFPL license.

This app uses ASIHTTPRequest by Ben Copsey for making network connections, JSONKit by John Engelhart for JSON parsing, SFHFKeychainUtils by Buzz Andersen to store user's credentials, and our own library LunarToolkit to make various things easier.

About

Example app that connects to the RubyTime API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published