Parse Class Reference

Inherits from NSObject
Declared in Parse.h

Overview

The Parse class contains static functions that handle global configuration for the Parse framework.

Connecting to Parse

+ setApplicationId:clientKey:

Sets the applicationId and clientKey of your application.

+ (void)setApplicationId:(NSString *)applicationId clientKey:(NSString *)clientKey

Parameters

applicationId

The application id of your Parse application.

clientKey

The client key of your Parse application.

Declared In

Parse.h

+ getApplicationId

The current application id that was used to configure Parse framework.

+ (NSString *)getApplicationId

Declared In

Parse.h

+ getClientKey

The current client key that was used to configure Parse framework.

+ (NSString *)getClientKey

Declared In

Parse.h

Enabling Local Datastore

+ enableLocalDatastore

Enable pinning in your application. This must be called before your application can use pinning. The recommended way is to call this method before setApplicationId:clientKey:.

+ (void)enableLocalDatastore

Declared In

Parse.h

+ isLocalDatastoreEnabled

Flag that indicates whether Local Datastore is enabled.

+ (BOOL)isLocalDatastoreEnabled

Return Value

YES if Local Datastore is enabled, otherwise NO.

Declared In

Parse.h

Enabling Extensions Data Sharing

+ enableDataSharingWithApplicationGroupIdentifier:

Enables data sharing with an application group identifier.

+ (void)enableDataSharingWithApplicationGroupIdentifier:(NSString *)groupIdentifier

Parameters

groupIdentifier

Application Group Identifier to share data with.

Discussion

After enabling - Local Datastore, currentUser, currentInstallation and all eventually commands are going to be available to every application/extension in a group that have the same Parse applicationId.

Warning: This method is required to be called before setApplicationId:clientKey:.

Declared In

Parse.h

+ enableDataSharingWithApplicationGroupIdentifier:containingApplication:

Enables data sharing with an application group identifier.

+ (void)enableDataSharingWithApplicationGroupIdentifier:(NSString *)groupIdentifier containingApplication:(NSString *)bundleIdentifier

Parameters

groupIdentifier

Application Group Identifier to share data with.

bundleIdentifier

Bundle identifier of the containing application.

Discussion

After enabling - Local Datastore, currentUser, currentInstallation and all eventually commands are going to be available to every application/extension in a group that have the same Parse applicationId.

Warning: This method is required to be called before setApplicationId:clientKey:. This method can only be used by application extensions.

Declared In

Parse.h

+ applicationGroupIdentifierForDataSharing

Application Group Identifier for Data Sharing

+ (NSString *)applicationGroupIdentifierForDataSharing

Return Value

NSString value if data sharing is enabled, otherwise nil.

Declared In

Parse.h

+ containingApplicationBundleIdentifierForDataSharing

Containing application bundle identifier.

+ (NSString *)containingApplicationBundleIdentifierForDataSharing

Return Value

NSString value if data sharing is enabled, otherwise nil.

Declared In

Parse.h

Configuring UI Settings

+ offlineMessagesEnabled:

Set whether to show offline messages when using a Parse view or view controller related classes. (Deprecated: This method has no effect.)

+ (void)offlineMessagesEnabled:(BOOL)enabled

Parameters

enabled

Whether a UIAlertView should be shown when the device is offline and network access is required from a view or view controller.

Declared In

Parse.h

+ errorMessagesEnabled:

Set whether to show an error message when using a Parse view or view controller related classes and a Parse error was generated via a query. (Deprecated: This method has no effect.)

+ (void)errorMessagesEnabled:(BOOL)enabled

Parameters

enabled

Whether a UIAlertView should be shown when an error occurs.

Declared In

Parse.h

Logging

+ setLogLevel:

Sets the level of logging to display.

+ (void)setLogLevel:(PFLogLevel)logLevel

Parameters

logLevel

Log level to set.

Discussion

By default: - If running inside an app that was downloaded from iOS App Store - it is set to - All other cases - it is set to

See Also

Declared In

Parse.h

+ logLevel

Log level that will be displayed.

+ (PFLogLevel)logLevel

Return Value

A PFLogLevel value.

Discussion

By default: - If running inside an app that was downloaded from iOS App Store - it is set to - All other cases - it is set to

See Also

Declared In

Parse.h