IPhone App Internals: Difference between revisions

From C-Aware Project Wiki
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
< [[Main Page]] < [[Carbon Commute]]
----
== Overview ==
== Overview ==
The application is a standard iPhone application, which makes use of the Core Location framework to gather location information and store it in an array. This array is then turned into a JSON object and uploaded.
The application is a standard iPhone application, which makes use of the Core Location framework to gather location information and store it in an array. This array is then turned into a JSON object and uploaded.

Revision as of 17:12, 29 January 2013

< Main Page < Carbon Commute


Overview

The application is a standard iPhone application, which makes use of the Core Location framework to gather location information and store it in an array. This array is then turned into a JSON object and uploaded.

The location information is stored as an array of CLLocation objects. The initial item in the array at index 0 is a NSDictionary used to store statistics about the commute as well as the status. This array is then stored inside another array, each item representing a different commute.


Application Design

API

The app will communicate with any endpoint configured to accept HTTP POST requests, and will attempt to send a JSON array representation of the commute data to the URL specified in the app's settings. The user name and password are used to authenticate to the remote server using HTTP Basic Access Authentication.

When working with a locker it uses the push endpoints which allows the push of any JSON object. For more information on this see Locker Push API