IPhone App Internals: Difference between revisions

From C-Aware Project Wiki
Jump to navigationJump to search
(Created page with "== 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 arra...")
 
Line 12: Line 12:


The app will communicate with any endpoint configured to accept [http://en.wikipedia.org/wiki/POST_(HTTP) HTTP POST] requests, and will attempt to send a [http://www.json.org/ 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://en.wikipedia.org/wiki/Basic_access_authentication HTTP Basic Access Authentication.]
The app will communicate with any endpoint configured to accept [http://en.wikipedia.org/wiki/POST_(HTTP) HTTP POST] requests, and will attempt to send a [http://www.json.org/ 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://en.wikipedia.org/wiki/Basic_access_authentication 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 [[Carbon_Commute#Locker_Push_API|Locker Push API]]

Revision as of 15:42, 28 January 2013

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