Getting started with parse.com
Remarks#
This section provides an overview of what parse.com is, and why a developer might want to use it.
It should also mention any large subjects within parse.com, and link out to the related topics. Since the Documentation for parse.com is new, you may need to create initial versions of those related topics.
Installation or Setup
Install the SDK
- Download & unzip the SDK
Make sure you are using the latest version of Xcode (7.0+) and targeting iOS 7.0 or highe
- Add the SDKs to your app
Drag the Parse.framework
and Bolts.framework
you downloaded into your Xcode project folder target.
Make sure the Copy items to destination’s group folder checkbox is checked.
- Add the dependencies
Click on Targets → Your app name → and then the ‘Build Phases’ tab. Expand ‘Link Binary With Libraries’ as shown.
Click the + button in the bottom left of the ‘Link Binary With Libraries’ section and add the following libraries:
- AudioToolbox.framework
- CFNetwork.framework
- CoreGraphics.framework
- CoreLocation.framework
- QuartzCore.framework
- Security.framework
- StoreKit.framework
- SystemConfiguration.framework
- libz.tbd
- libsqlite3.tbd
Note: This is a comprehensive list of dependencies for a typical app. You may be able to omit some of these if you are not using the -ObjC linker flag or if you do not plan to implement Location Services or In-App Purchases, for example
Other installation options
CocoaPods
Add pod 'Parse'
to your podfile and run pod install.
Compiling for yourself
If you want to manually compile the SDK, you can find the source code on GitHub.
Connect your app to Parse Server
Open up your AppDelegate.m and add the following to it:
#import <Parse/Parse.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Initialize Parse.
[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
configuration.applicationId = @"YOUR_APP_ID";
configuration.server = @"https://YOUR_PARSE_SERVER:1337/parse";
}]];
// ...
}
// ...
Test the SDK
First make sure to include our SDK libraries from your .h
file:
#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):
PFObject *testObject = [PFObject objectWithClassName:@"TestObject"];
testObject[@"foo"] = @"bar";
[testObject saveInBackground];
Run your app. A new object of class TestObject will be sent to the Parse Server and saved.