Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An iOS client library for ThinkNear

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Welcome to the ThinkNear iOS SDK!

Instructions for use:

1. Add this repository as a submodule of your git repo (or the equivalent).
   If you're using git:
       $ git submodule add git://
       $ git submodule update --init --recursive
   If you're not:
       $ git clone --recursive git://

   These commands will download and update all the third-party dependencies of 
   the ThinkNear SDK (OAuthConsumer, and TouchJSON), which are stored as Git 

2. Add the source files to your project.
   Drag the ThirdParty/ directory into your project.
   Then drag the ThinkNear/ directory into your project.

3. Specify the OAuth keys you were assigned by the signup process.
       * Open your project's Info.plist file in Xcode.
       * Right click and choose "Add Row".
       * Set the row key to "TNConsumerKey" and choose type "String". Set the 
         value to your OAuth key.
       * Repeat, with key "TNConsumerSecret" and your OAuth secret as the value.
       * Make sure the rows are added at the root level (not e.g. as subrows of
         "Supported interface orientations").

4. Use the SDK. It's easy to request a list of offers near the user:

       TNOfferListRequestOperation *op;
       op = [[[TNOfferListRequestOperation alloc] initWithLocation:location] autorelease];
       [op setCompletionBlock:^{
           // If you support iOS 3.x, use KVO to observe "[op isFinished]" instead of a block
           [self performSelectorOnMainThread:@selector(offerListRequestOperationFinished:) 
       [op start];

Consult the "Example" project for a good sample of how you can use ThinkNear.
Something went wrong with that request. Please try again.