Parse 教程 框架倒入

Cloud Code now allows sending of general HTTP requests and other updates.  Learn More Close
Open
Push guide

Quick Start Guide

This step-by-step guide will get you up and running using the Parse SDK in your mobile app.
1

Choose your platform

Ios_icon

iOS

Android_icon

Android

Js_icon

JavaScript

Win_icon

Windows 8

New Project
Existing Project
2

Select your Parse app

Nanjing
3

Download & install the SDK

  1. Download the SDK:

    Down_arrow SDK files for existing iOS projects (.zip)
  2. Make sure you are using the latest version of Xcode (v4.5+) and targeting iOS 4.3 or higher.
  3. Unzip the file you downloaded and drag the Parse folder into your Xcode project folder target.
    Drag_before
  4. Make sure the "Copy items to destination's group folder" checkbox is checked. (Show Me)
  5. It should now look something like this.
    Drag_after
  6. Click on the Targets → Your app name → and then the 'Build Phases' tab and then expand 'Link Binary With Libraries' as shown.
    Link_binaries
  7. Click the plus button in the bottom left of the 'Link Binary With Libraries' section. (Show Me)
    Link_binaries_plus
  8. Add the following libraries:
    • AudioToolbox.framework (Show Me)
      Add_audiotoolbox
    • Accounts.framework
    • AdSupport.framework
    • CFNetwork.framework
    • CoreGraphics.framework
    • CoreLocation.framework
    • libsqlite3.dylib
    • libz.1.1.3.dylib
    • MobileCoreServices.framework
    • QuartzCore.framework
    • Security.framework
    • Social.framework
    • StoreKit.framework
    • SystemConfiguration.framework
  9. Open up your AppDelegate.m file and add the following import to the top of the file:

    #import <Parse/Parse.h>

    Then paste the following inside the application:didFinishLaunchingWithOptions: function:

    [Parse setApplicationId:@"B7q3ZUcn1mOISdkSCx01wR2JbZsgL3BgSveErGNL"
                  clientKey:@"wMiv55odJnH0BUmr2HbjaXsatAxKeoKneCr2wBbp"];
  10. Compile and run.
  11. If you're targeting iOS versions less than 6.0, you'll need to make AdSupport.framework, Social.framework, and Accounts.framework optionally-linked. (Show Me)
    Optional_frameworks
  12. If you're targeting iOS versions less than 5.0, you'll need to add the "-fobjc-arc" flag to the "Other Linker Flags" entry in your target build settings. (Show Me)
    Fobjc
4

Test the SDK

  • First make sure to include our SDK libraries from your .h file: (Show Me

    #import <Parse/Parse.h>
  • Then copy and paste this code into your app, for example in the viewDidLoad method (or inside another method that gets called when you run your app): (Show Me)


    PFObject *testObject = [PFObject objectWithClassName : @"TestObject" ];
    [testObject setObject : @"bar" forKey : @"foo" ];
    [testObject save ];

Run your app. A new object of class TestObject will be sent to the Parse Cloud and saved. When you're ready, click the button below to test if your data was sent.

5

Learn the SDK

Libraries

Dive into our docs

Start learning about everything you can do with Parse!

Dashboard_icon

Use the dashboard

Start controlling your apps, managing your settings, and more.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

孙启超

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值