Skip to content
项目

gooichi/foursquare-ios-api

在 GitHub 查看

关于

Foursquare API v2 for iOS

网站与应用开发

这些数字如何统计

可以做什么

  • Simple, small and easy to use
  • Authentication using Safari (see Future Plans below)
  • Asynchronous requests support
  • Open source BSD license

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Foursquare API v2 for iOS

A simple Objective-C wrapper for the foursquare API v2. It allows you to integrate foursquare into your iOS application.

Features

  • Simple, small and easy to use
  • Authentication using Safari (see Future Plans below)
  • Asynchronous requests support
  • Open source BSD license

Requirements

  • Xcode 5 or later
  • Base SDK: iOS 7.0 or later
  • Deployment Target: iOS 5.0 or later

This library requires your app to link against the following frameworks:

  • Foundation.framework
  • MobileCoreServices.framework
  • UIKit.framework

Getting Started

  1. Register for an API consumer key

    In order to obtain an oAuth access token, this library uses Safari and a custom URL scheme that brings the user back to your app. For example, FSQDemo app uses the fsqdemo URL scheme.

    FSQ Demo

    The client ID and callback URL are required when creating the BZFoursquare object.

     BZFoursquare *foursquare = [[BZFoursquare alloc] initWithClientID:@"YOUR_CLIENT_ID" callbackURL:@"YOUR_CALLBACK_URL"];
    
  2. Installation

    Copy all the files from the BZFoursquare folder to your project.

    Automatic Reference Counting (ARC)

    If you are including this library in your project that uses Objective-C Automatic Reference Counting (ARC) enabled, you will need to set the -fno-objc-arc compiler flag on all of the BZFoursquare source files. To do this in Xcode, go to your active target and select the "Build Phases" tab. In the "Compiler Flags" column, set -fno-objc-arc for each of the BZFoursquare source files. The following is the setting of the FSQDemo project.

    Compile Sources

    MobileCoreServices

    You will need to add the MobileCoreServices library to your project. To do this in Xcode, go to your active target and select the "Build Phases" tab. In the "Link Binary with Libraries" section, click the plus button and select MobileCoreServices from the dialog box that is presented.

    Mobile Core Services

  3. Set up your custom URL scheme

    Add your custom URL scheme to your project. The following is the setting of the FSQDemo project.

    URL Types

Sample Applications

This library comes with FSQDemo app that demonstrates authorization, making API calls to guide you in development.

To build and run FSQDemo app, open the FSQDemo project with Xcode 5 or later and set FOURSQURE_CLIENT_ID to your client ID.

FOURSQURE_CLIENT_ID

License

Foursquare API v2 for iOS is available under the 2-clause BSD license. See the LICENSE file for more info.

Future Plans

  • Foursquare native authentication support

探索相关项目

加载中…