Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Local Search PacktLocal > Time for action — consuming the foursquare venue A...

Time for action — consuming the foursquare venue API - categories

  1. Open Xcode, and start a new project named Hello foursquare, using the Tabbed Application template.
  2. Add a new header file (.h extension) to your project, by selecting the File | New | New File | C and C++ option from Xcode file menu. Name the new file as Configuration.h. This file will hold the foursquare client ID and client secret, and any other foursquare configuration that we might need in future. Keep the configuration in one place, make the code more robust and easy-to-extend, as anyone can start using the code by replacing the configuration values. You can define the values in the Configuration.h file as follows:
    #ifndef Hello_foursquare_Configuration_h
    #define Hello_foursquare_Configuration_h
    #define CLIENT_ID @"XXXXXXXXXXXXXXXX"
    #define CLIENT_SECRET @"YYYYYYYYYYYYYYYY"
    #endif
    

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint