Parse

@interface Parse : NSObject

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

  • Sets the applicationId and clientKey of your application.

    Declaration

    Objective-C

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

    Parameters

    applicationId

    The application id of your Parse application.

    clientKey

    The client key of your Parse application.

  • Sets the configuration to be used for the Parse SDK.

    Note

    Re-setting the configuration after having previously sent requests through the SDK results in undefined behavior.

    Declaration

    Objective-C

    + (void)initializeWithConfiguration:
            (nonnull ParseClientConfiguration *)configuration;

    Parameters

    configuration

    The new configuration to set for the SDK.

  • Gets the current configuration in use by the Parse SDK.

    Declaration

    Objective-C

    + (nonnull ParseClientConfiguration *)currentConfiguration;

    Return Value

    The current configuration in use by the SDK. Returns nil if the SDK has not been initialized yet.

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

    Declaration

    Objective-C

    + (nonnull NSString *)getApplicationId;
  • The current client key that was used to configure Parse framework.

    Declaration

    Objective-C

    + (nonnull NSString *)getClientKey;
  • 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:.

    Declaration

    Objective-C

    + (void)enableLocalDatastore;
  • Flag that indicates whether Local Datastore is enabled.

    Declaration

    Objective-C

    + (BOOL)isLocalDatastoreEnabled;

    Return Value

    YES if Local Datastore is enabled, otherwise NO.

  • Enables data sharing with an application group identifier.

    After enabling - Local Datastore, PFUser.+currentUser, PFInstallation.+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:.

    Declaration

    Objective-C

    + (void)enableDataSharingWithApplicationGroupIdentifier:
            (nonnull NSString *)groupIdentifier;

    Parameters

    groupIdentifier

    Application Group Identifier to share data with.

  • Enables data sharing with an application group identifier.

    After enabling - Local Datastore, PFUser.+currentUser, PFInstallation.+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.

    Declaration

    Objective-C

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

    Parameters

    groupIdentifier

    Application Group Identifier to share data with.

    bundleIdentifier

    Bundle identifier of the containing application.

  • Application Group Identifier for Data Sharing.

    Declaration

    Objective-C

    + (nonnull NSString *)applicationGroupIdentifierForDataSharing;

    Return Value

    NSString value if data sharing is enabled, otherwise nil.

  • Containing application bundle identifier for Data Sharing.

    Declaration

    Objective-C

    + (nonnull NSString *)containingApplicationBundleIdentifierForDataSharing;

    Return Value

    NSString value if data sharing is enabled, otherwise nil.

  • Set whether to show offline messages when using a Parse view or view controller related classes.

    @deprecated This method has no effect.

    Declaration

    Objective-C

    + (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.

  • 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.

    Declaration

    Objective-C

    + (void)errorMessagesEnabled:(BOOL)enabled;

    Parameters

    enabled

    Whether a UIAlertView should be shown when an error occurs.

  • Sets the level of logging to display.

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

    See

    PFLogLevel

    Declaration

    Objective-C

    + (void)setLogLevel:(PFLogLevel)logLevel;

    Parameters

    logLevel

    Log level to set.

  • Log level that will be displayed.

    By default:

  • If running inside an app that was downloaded from iOS App Store - it is set to PFLogLevelNone
  • All other cases - it is set to PFLogLevelWarning

  • See

    PFLogLevel

    Declaration

    Objective-C

    + (PFLogLevel)logLevel;

    Return Value

    A PFLogLevel value.