diff --git a/README.md b/README.md index 0f5fb6d..becfd7a 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,5 @@ -Push Notification Tutorial +Push Notification Tutorials ========================== -This project is a simple demonstration of using Push Notifications with Parse. - -How to Run - Android ----------------- - -1. Clone the repository and open the project at Android/. -2. Add your Parse application id and client key in `Application.java`. - -How to Run - iOS ----------------- - -1. Clone the repository and open the Xcode project at iOS/PushNotificationTutorial.xcodeproj. -2. Add your Parse application id and client key in `AppDelegate.m` -3. Follow the associated tutorial to create and set the appropriate provisioning profile and App ID. - -Learn More ----------- - -To learn more, take a look at the [Android Push Notifications tutorial](https://parse.com/tutorials/android-push-notifications) or the [iOS Push Notifications tutorial](https://parse.com/tutorials/push-notifications). +### iOS, OS X: [Setting up Push Notifications on iOS and OS X](https://github.com/ParsePlatform/PushTutorial/tree/master/iOS) +### Android: [Setting up Push Notifications on Android](https://parse.com/tutorials/android-push-notifications) diff --git a/iOS/Bolts.framework/Bolts b/iOS/Bolts.framework/Bolts index c3798ed..b28bf9e 100644 Binary files a/iOS/Bolts.framework/Bolts and b/iOS/Bolts.framework/Bolts differ diff --git a/iOS/Bolts.framework/Headers/BFAppLink.h b/iOS/Bolts.framework/Headers/BFAppLink.h index 5e51acd..aa89efc 100644 --- a/iOS/Bolts.framework/Headers/BFAppLink.h +++ b/iOS/Bolts.framework/Headers/BFAppLink.h @@ -21,10 +21,10 @@ FOUNDATION_EXPORT NSString *const BFAppLinkVersion; /*! Creates a BFAppLink with the given list of BFAppLinkTargets and target URL. - + Generally, this will only be used by implementers of the BFAppLinkResolving protocol, as these implementers will produce App Link metadata for a given URL. - + @param sourceURL the URL from which this App Link is derived @param targets an ordered list of BFAppLinkTargets for this platform derived from App Link metadata. diff --git a/iOS/Bolts.framework/Headers/BFAppLinkResolving.h b/iOS/Bolts.framework/Headers/BFAppLinkResolving.h index baa1451..b67bdba 100644 --- a/iOS/Bolts.framework/Headers/BFAppLinkResolving.h +++ b/iOS/Bolts.framework/Headers/BFAppLinkResolving.h @@ -21,7 +21,7 @@ /*! Asynchronously resolves App Link data for a given URL. - + @param url The URL to resolve into an App Link. @returns A BFTask that will return a BFAppLink for the given URL. */ diff --git a/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererController.h b/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererController.h index 22648d4..d19465e 100644 --- a/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererController.h +++ b/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererController.h @@ -38,7 +38,7 @@ /*! A controller class that implements default behavior for a BFAppLinkReturnToRefererView, including - the ability to display the view above the navigation bar for navigation-bsaed apps. + the ability to display the view above the navigation bar for navigation-based apps. */ @interface BFAppLinkReturnToRefererController : NSObject @@ -75,7 +75,7 @@ - (void)showViewForRefererAppLink:(BFAppLink *)refererAppLink; /*! - Shows the BFAppLinkReturnToRefererView with referer information extracted from the specified URL. + Shows the BFAppLinkReturnToRefererView with referer information extracted from the specified URL. If nil or missing referer App Link data, the view will not be displayed. */ - (void)showViewForRefererURL:(NSURL *)url; diff --git a/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererView.h b/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererView.h index e3af940..d20f73a 100644 --- a/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererView.h +++ b/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererView.h @@ -16,11 +16,11 @@ @class BFAppLinkReturnToRefererView; @class BFURL; -typedef enum BFIncludeStatusBarInSize { - BFIncludeStatusBarInSizeNever, - BFIncludeStatusBarInSizeIOS7AndLater, - BFIncludeStatusBarInSizeAlways, -} BFIncludeStatusBarInSize; +typedef NS_ENUM(NSUInteger, BFIncludeStatusBarInSize) { + BFIncludeStatusBarInSizeNever, + BFIncludeStatusBarInSizeIOS7AndLater, + BFIncludeStatusBarInSizeAlways, +}; /*! Protocol that a class can implement in order to be notified when the user has navigated back @@ -65,7 +65,7 @@ typedef enum BFIncludeStatusBarInSize { /*! Indicates whether to extend the size of the view to include the current status bar size, for use in scenarios where the view might extend under the status bar on iOS 7 and - above; this property has no effect on earlier versions of iOS. + above; this property has no effect on earlier versions of iOS. */ @property (nonatomic, assign) BFIncludeStatusBarInSize includeStatusBarInSize; @@ -74,18 +74,4 @@ typedef enum BFIncludeStatusBarInSize { */ @property (nonatomic, assign) BOOL closed; -/*! - For apps that use a navigation controller, this method allows for displaying the view as - a banner above the navigation bar of the navigation controller. It will listen for orientation - change and other events to ensure it stays properly positioned above the nevigation bar. - If this method is called from, e.g., viewDidAppear, its counterpart, detachFromMainWindow should - be called from, e.g., viewWillDisappear. - */ -//- (void)attachToMainWindowAboveNavigationController:(UINavigationController *)navigationController view:(UIView *)view; - -/*! - Indicates that the view should no longer position itself above a navigation bar. - */ -//- (void)detachFromMainWindow; - @end diff --git a/iOS/Bolts.framework/Headers/BFCancellationToken.h b/iOS/Bolts.framework/Headers/BFCancellationToken.h new file mode 100644 index 0000000..4d7dec0 --- /dev/null +++ b/iOS/Bolts.framework/Headers/BFCancellationToken.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + A block that will be called when a token is cancelled. + */ +typedef void(^BFCancellationBlock)(); + +/*! + The consumer view of a CancellationToken. + Propagates notification that operations should be canceled. + A BFCancellationToken has methods to inspect whether the token has been cancelled. + */ +@interface BFCancellationToken : NSObject + +/*! + Whether cancellation has been requested for this token source. + */ +@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested; + +/*! + Register a block to be notified when the token is cancelled. + If the token is already cancelled the delegate will be notified immediately. + */ +- (BFCancellationTokenRegistration *)registerCancellationObserverWithBlock:(BFCancellationBlock)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Bolts.framework/Headers/BFCancellationTokenRegistration.h b/iOS/Bolts.framework/Headers/BFCancellationTokenRegistration.h new file mode 100644 index 0000000..fa6090f --- /dev/null +++ b/iOS/Bolts.framework/Headers/BFCancellationTokenRegistration.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + Represents the registration of a cancellation observer with a cancellation token. + Can be used to unregister the observer at a later time. + */ +@interface BFCancellationTokenRegistration : NSObject + +/*! + Removes the cancellation observer registered with the token + and releases all resources associated with this registration. + */ +- (void)dispose; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Bolts.framework/Headers/BFCancellationTokenSource.h b/iOS/Bolts.framework/Headers/BFCancellationTokenSource.h new file mode 100644 index 0000000..4627e99 --- /dev/null +++ b/iOS/Bolts.framework/Headers/BFCancellationTokenSource.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class BFCancellationToken; + +/*! + BFCancellationTokenSource represents the producer side of a CancellationToken. + Signals to a CancellationToken that it should be canceled. + It is a cancellation token that also has methods + for changing the state of a token by cancelling it. + */ +@interface BFCancellationTokenSource : NSObject + +/*! + Creates a new cancellation token source. + */ ++ (instancetype)cancellationTokenSource; + +/*! + The cancellation token associated with this CancellationTokenSource. + */ +@property (nonatomic, strong, readonly) BFCancellationToken *token; + +/*! + Whether cancellation has been requested for this token source. + */ +@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested; + +/*! + Cancels the token if it has not already been cancelled. + */ +- (void)cancel; + +/*! + Schedules a cancel operation on this CancellationTokenSource after the specified number of milliseconds. + @param millis The number of milliseconds to wait before completing the returned task. + If delay is `0` the cancel is executed immediately. If delay is `-1` any scheduled cancellation is stopped. + */ +- (void)cancelAfterDelay:(int)millis; + +/*! + Releases all resources associated with this token source, + including disposing of all registrations. + */ +- (void)dispose; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererView_Internal.h b/iOS/Bolts.framework/Headers/BFDefines.h similarity index 60% rename from iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererView_Internal.h rename to iOS/Bolts.framework/Headers/BFDefines.h index 2624aee..cf7dcdf 100644 --- a/iOS/Bolts.framework/Headers/BFAppLinkReturnToRefererView_Internal.h +++ b/iOS/Bolts.framework/Headers/BFDefines.h @@ -8,10 +8,11 @@ * */ -#import "BFAppLinkReturnToRefererView.h" +#import -@interface BFAppLinkReturnToRefererView (Internal) - -- (CGFloat)statusBarHeight; - -@end +#if __has_feature(objc_generics) || __has_extension(objc_generics) +# define BF_GENERIC(type) +#else +# define BF_GENERIC(type) +# define BFGenericType id +#endif diff --git a/iOS/Bolts.framework/Headers/BFExecutor.h b/iOS/Bolts.framework/Headers/BFExecutor.h index 02af9ba..afa4f3d 100644 --- a/iOS/Bolts.framework/Headers/BFExecutor.h +++ b/iOS/Bolts.framework/Headers/BFExecutor.h @@ -10,6 +10,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + /*! An object that can run a given block. */ @@ -56,3 +58,5 @@ - (void)execute:(void(^)())block; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Bolts.framework/Headers/BFMeasurementEvent.h b/iOS/Bolts.framework/Headers/BFMeasurementEvent.h index 7a9948c..b3173fc 100644 --- a/iOS/Bolts.framework/Headers/BFMeasurementEvent.h +++ b/iOS/Bolts.framework/Headers/BFMeasurementEvent.h @@ -19,15 +19,14 @@ FOUNDATION_EXPORT NSString *const BFMeasurementEventNameKey; /*! The dictionary field for the arguments of the event */ FOUNDATION_EXPORT NSString *const BFMeasurementEventArgsKey; - /*! Bolts Events raised by BFMeasurementEvent for Applink */ /*! - The name of the event posted when [BFURL URLWithURL:] is called successfully. This represents the successful parsing of an app link URL. + The name of the event posted when [BFURL URLWithURL:] is called successfully. This represents the successful parsing of an app link URL. */ FOUNDATION_EXPORT NSString *const BFAppLinkParseEventName; -/*! - The name of the event posted when [BFURL URLWithInboundURL:] is called successfully. +/*! + The name of the event posted when [BFURL URLWithInboundURL:] is called successfully. This represents parsing an inbound app link URL from a different application */ FOUNDATION_EXPORT NSString *const BFAppLinkNavigateInEventName; @@ -35,9 +34,9 @@ FOUNDATION_EXPORT NSString *const BFAppLinkNavigateInEventName; /*! The event raised when the user navigates from your app to other apps */ FOUNDATION_EXPORT NSString *const BFAppLinkNavigateOutEventName; -/*! +/*! The event raised when the user navigates out from your app and back to the referrer app. - e.g when the user leaves your app after tapping the back-to-referrer navigation bar + e.g when the user leaves your app after tapping the back-to-referrer navigation bar */ FOUNDATION_EXPORT NSString *const BFAppLinkNavigateBackToReferrerEventName; diff --git a/iOS/Bolts.framework/Headers/BFTask.h b/iOS/Bolts.framework/Headers/BFTask.h index 2ac84d6..a900696 100644 --- a/iOS/Bolts.framework/Headers/BFTask.h +++ b/iOS/Bolts.framework/Headers/BFTask.h @@ -10,26 +10,41 @@ #import -@class BFExecutor; -@class BFTask; +#import +#import + +NS_ASSUME_NONNULL_BEGIN /*! - A block that can act as a continuation for a task. + Error domain used if there was multiple errors on . + */ +extern NSString *const BFTaskErrorDomain; + +/*! + An exception that is thrown if there was multiple exceptions on . */ -typedef id(^BFContinuationBlock)(BFTask *task); +extern NSString *const BFTaskMultipleExceptionsException; + +@class BFExecutor; +@class BFTask; /*! The consumer view of a Task. A BFTask has methods to inspect the state of the task, and to add continuations to be run once the task is complete. */ -@interface BFTask : NSObject +@interface BFTask BF_GENERIC(__covariant BFGenericType) : NSObject + +/*! + A block that can act as a continuation for a task. + */ +typedef __nullable id(^BFContinuationBlock)(BFTask BF_GENERIC(BFGenericType) *task); /*! Creates a task that is already completed with the given result. @param result The result for the task. */ -+ (instancetype)taskWithResult:(id)result; ++ (instancetype)taskWithResult:(nullable BFGenericType)result; /*! Creates a task that is already completed with the given error. @@ -53,7 +68,15 @@ typedef id(^BFContinuationBlock)(BFTask *task); all of the input tasks have completed. @param tasks An `NSArray` of the tasks to use as an input. */ -+ (instancetype)taskForCompletionOfAllTasks:(NSArray *)tasks; ++ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray *)tasks; + +/*! + Returns a task that will be completed once all of the input tasks have completed. + If all tasks complete successfully without being faulted or cancelled the result will be + an `NSArray` of all task results in the order they were provided. + @param tasks An `NSArray` of the tasks to use as an input. + */ ++ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray *)tasks; /*! Returns a task that will be completed a certain amount of time in the future. @@ -62,6 +85,14 @@ typedef id(^BFContinuationBlock)(BFTask *task); */ + (instancetype)taskWithDelay:(int)millis; +/*! + Returns a task that will be completed a certain amount of time in the future. + @param millis The approximate number of milliseconds to wait before the + task will be finished (with result == nil). + @param token The cancellation token (optional). + */ ++ (instancetype)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token; + /*! Returns a task that will be completed after the given block completes with the specified executor. @@ -72,36 +103,39 @@ typedef id(^BFContinuationBlock)(BFTask *task); If block returns a BFTask, then the task returned from this method will not be completed until that task is completed. */ -+ (instancetype)taskFromExecutor:(BFExecutor *)executor - withBlock:(id (^)())block; ++ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(id (^)())block; // Properties that will be set on the task once it is completed. /*! The result of a successful task. */ -@property (nonatomic, strong, readonly) id result; - +@property (nullable, nonatomic, strong, readonly) BFGenericType result; /*! The error of a failed task. */ -@property (nonatomic, strong, readonly) NSError *error; +@property (nullable, nonatomic, strong, readonly) NSError *error; /*! The exception of a failed task. */ -@property (nonatomic, strong, readonly) NSException *exception; +@property (nullable, nonatomic, strong, readonly) NSException *exception; /*! Whether this task has been cancelled. */ -@property (nonatomic, assign, readonly, getter = isCancelled) BOOL cancelled; +@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled; + +/*! + Whether this task has completed due to an error or exception. + */ +@property (nonatomic, assign, readonly, getter=isFaulted) BOOL faulted; /*! Whether this task has completed. */ -@property (nonatomic, assign, readonly, getter = isCompleted) BOOL completed; +@property (nonatomic, assign, readonly, getter=isCompleted) BOOL completed; /*! Enqueues the given block to be run once this task is complete. @@ -114,19 +148,57 @@ typedef id(^BFContinuationBlock)(BFTask *task); If block returns a BFTask, then the task returned from this method will not be completed until that task is completed. */ -- (instancetype)continueWithBlock:(BFContinuationBlock)block; +- (BFTask *)continueWithBlock:(BFContinuationBlock)block; +/*! + Enqueues the given block to be run once this task is complete. + This method uses a default execution strategy. The block will be + run on the thread where the previous task completes, unless the + the stack depth is too deep, in which case it will be run on a + dispatch queue with default priority. + @param block The block to be run once this task is complete. + @param cancellationToken The cancellation token (optional). + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken; + +/*! + Enqueues the given block to be run once this task is complete. + @param executor A BFExecutor responsible for determining how the + continuation block will be run. + @param block The block to be run once this task is complete. + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithExecutor:(BFExecutor *)executor withBlock:(BFContinuationBlock)block; /*! Enqueues the given block to be run once this task is complete. @param executor A BFExecutor responsible for determining how the continuation block will be run. @param block The block to be run once this task is complete. + @param cancellationToken The cancellation token (optional). + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + his method will not be completed until that task is completed. + */ +- (BFTask *)continueWithExecutor:(BFExecutor *)executor + block:(BFContinuationBlock)block + cancellationToken:(nullable BFCancellationToken *)cancellationToken; + +/*! + Identical to continueWithBlock:, except that the block is only run + if this task did not produce a cancellation, error, or exception. + If it did, then the failure will be propagated to the returned + task. + @param block The block to be run once this task is complete. @returns A task that will be completed after block has run. If block returns a BFTask, then the task returned from this method will not be completed until that task is completed. */ -- (instancetype)continueWithExecutor:(BFExecutor *)executor - withBlock:(BFContinuationBlock)block; +- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block; /*! Identical to continueWithBlock:, except that the block is only run @@ -134,11 +206,26 @@ typedef id(^BFContinuationBlock)(BFTask *task); If it did, then the failure will be propagated to the returned task. @param block The block to be run once this task is complete. + @param cancellationToken The cancellation token (optional). + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken; + +/*! + Identical to continueWithExecutor:withBlock:, except that the block + is only run if this task did not produce a cancellation, error, or + exception. If it did, then the failure will be propagated to the + returned task. + @param executor A BFExecutor responsible for determining how the + continuation block will be run. + @param block The block to be run once this task is complete. @returns A task that will be completed after block has run. If block returns a BFTask, then the task returned from this method will not be completed until that task is completed. */ -- (instancetype)continueWithSuccessBlock:(BFContinuationBlock)block; +- (BFTask *)continueWithExecutor:(BFExecutor *)executor withSuccessBlock:(BFContinuationBlock)block; /*! Identical to continueWithExecutor:withBlock:, except that the block @@ -148,12 +235,14 @@ typedef id(^BFContinuationBlock)(BFTask *task); @param executor A BFExecutor responsible for determining how the continuation block will be run. @param block The block to be run once this task is complete. + @param cancellationToken The cancellation token (optional). @returns A task that will be completed after block has run. If block returns a BFTask, then the task returned from this method will not be completed until that task is completed. */ -- (instancetype)continueWithExecutor:(BFExecutor *)executor - withSuccessBlock:(BFContinuationBlock)block; +- (BFTask *)continueWithExecutor:(BFExecutor *)executor + successBlock:(BFContinuationBlock)block + cancellationToken:(nullable BFCancellationToken *)cancellationToken; /*! Waits until this operation is completed. @@ -164,3 +253,5 @@ typedef id(^BFContinuationBlock)(BFTask *task); - (void)waitUntilFinished; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Bolts.framework/Headers/BFTaskCompletionSource.h b/iOS/Bolts.framework/Headers/BFTaskCompletionSource.h index d0ea545..4807a5a 100644 --- a/iOS/Bolts.framework/Headers/BFTaskCompletionSource.h +++ b/iOS/Bolts.framework/Headers/BFTaskCompletionSource.h @@ -10,14 +10,18 @@ #import -@class BFTask; +#import + +NS_ASSUME_NONNULL_BEGIN + +@class BFTask BF_GENERIC(BFGenericType); /*! A BFTaskCompletionSource represents the producer side of tasks. It is a task that also has methods for changing the state of the task by settings its completion values. */ -@interface BFTaskCompletionSource : NSObject +@interface BFTaskCompletionSource BF_GENERIC(__covariant BFGenericType) : NSObject /*! Creates a new unfinished task. @@ -27,14 +31,14 @@ /*! The task associated with this TaskCompletionSource. */ -@property (nonatomic, retain, readonly) BFTask *task; +@property (nonatomic, strong, readonly) BFTask BF_GENERIC(BFGenericType) *task; /*! Completes the task by setting the result. Attempting to set this for a completed task will raise an exception. @param result The result of the task. */ -- (void)setResult:(id)result; +- (void)setResult:(nullable BFGenericType)result; /*! Completes the task by setting the error. @@ -60,7 +64,7 @@ Sets the result of the task if it wasn't already completed. @returns whether the new value was set. */ -- (BOOL)trySetResult:(id)result; +- (BOOL)trySetResult:(nullable BFGenericType)result; /*! Sets the error of the task if it wasn't already completed. @@ -83,3 +87,5 @@ - (BOOL)trySetCancelled; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Bolts.framework/Headers/BFURL.h b/iOS/Bolts.framework/Headers/BFURL.h index f269e2d..924c91d 100644 --- a/iOS/Bolts.framework/Headers/BFURL.h +++ b/iOS/Bolts.framework/Headers/BFURL.h @@ -10,8 +10,6 @@ #import - - @class BFAppLink; /*! @@ -29,12 +27,12 @@ */ + (BFURL *)URLWithURL:(NSURL *)url; -/*! - Creates a link target from a raw URL received from an external application. This is typically called from the app delegate's +/*! + Creates a link target from a raw URL received from an external application. This is typically called from the app delegate's application:openURL:sourceApplication:annotation: and will post the BFAppLinkNavigateInEventName measurement event. @param url The instance of `NSURL` to create BFURL from. @param sourceApplication the bundle ID of the app that is requesting your app to open the URL. The same sourceApplication in application:openURL:sourceApplication:annotation: -*/ + */ + (BFURL *)URLWithInboundURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication; /*! diff --git a/iOS/Bolts.framework/Headers/BFWebViewAppLinkResolver.h b/iOS/Bolts.framework/Headers/BFWebViewAppLinkResolver.h index cffa529..3782ae2 100644 --- a/iOS/Bolts.framework/Headers/BFWebViewAppLinkResolver.h +++ b/iOS/Bolts.framework/Headers/BFWebViewAppLinkResolver.h @@ -16,7 +16,7 @@ A reference implementation for an App Link resolver that uses a hidden UIWebView to parse the HTML containing App Link metadata. */ -@interface BFWebViewAppLinkResolver : NSObject +@interface BFWebViewAppLinkResolver : NSObject /*! Gets the instance of a BFWebViewAppLinkResolver. diff --git a/iOS/Bolts.framework/Headers/Bolts.h b/iOS/Bolts.framework/Headers/Bolts.h index e22bdd5..89c7c3e 100644 --- a/iOS/Bolts.framework/Headers/Bolts.h +++ b/iOS/Bolts.framework/Headers/Bolts.h @@ -9,20 +9,28 @@ */ #import +#import +#import +#import +#import #import #import #import -#if TARGET_OS_IPHONE -#import +#if __has_include() && TARGET_OS_IPHONE && !TARGET_OS_WATCH && !TARGET_OS_TV #import -#import -#import -#import +#import +#import #import #import +#import +#import +#import +#import #endif +NS_ASSUME_NONNULL_BEGIN + /*! @abstract 80175001: There were multiple errors. */ extern NSInteger const kBFMultipleErrorsError; @@ -35,3 +43,5 @@ extern NSInteger const kBFMultipleErrorsError; + (NSString *)version; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Bolts.framework/Headers/BoltsVersion.h b/iOS/Bolts.framework/Headers/BoltsVersion.h index 24e802e..4a12412 100644 --- a/iOS/Bolts.framework/Headers/BoltsVersion.h +++ b/iOS/Bolts.framework/Headers/BoltsVersion.h @@ -1 +1 @@ -#define BOLTS_VERSION @"1.1.3" +#define BOLTS_VERSION @"1.5.0" diff --git a/iOS/ParseFacebookUtils.framework/Info.plist b/iOS/Bolts.framework/Info.plist similarity index 55% rename from iOS/ParseFacebookUtils.framework/Info.plist rename to iOS/Bolts.framework/Info.plist index 2272393..1be5166 100644 Binary files a/iOS/ParseFacebookUtils.framework/Info.plist and b/iOS/Bolts.framework/Info.plist differ diff --git a/iOS/Bolts.framework/Modules/module.modulemap b/iOS/Bolts.framework/Modules/module.modulemap new file mode 100644 index 0000000..3c92a17 --- /dev/null +++ b/iOS/Bolts.framework/Modules/module.modulemap @@ -0,0 +1,15 @@ +framework module Bolts { + umbrella header "Bolts.h" + + export * + module * { export * } + + explicit module BFAppLinkResolving { + header "BFAppLinkResolving.h" + export * + } + explicit module BFWebViewAppLinkResolver { + header "BFWebViewAppLinkResolver.h" + export * + } +} diff --git a/iOS/Bolts.framework/Versions/A/Bolts b/iOS/Bolts.framework/Versions/A/Bolts deleted file mode 100644 index c3798ed..0000000 Binary files a/iOS/Bolts.framework/Versions/A/Bolts and /dev/null differ diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFAppLink.h b/iOS/Bolts.framework/Versions/A/Headers/BFAppLink.h deleted file mode 100644 index 5e51acd..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFAppLink.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -/*! The version of the App Link protocol that this library supports */ -FOUNDATION_EXPORT NSString *const BFAppLinkVersion; - -/*! - Contains App Link metadata relevant for navigation on this device - derived from the HTML at a given URL. - */ -@interface BFAppLink : NSObject - -/*! - Creates a BFAppLink with the given list of BFAppLinkTargets and target URL. - - Generally, this will only be used by implementers of the BFAppLinkResolving protocol, - as these implementers will produce App Link metadata for a given URL. - - @param sourceURL the URL from which this App Link is derived - @param targets an ordered list of BFAppLinkTargets for this platform derived - from App Link metadata. - @param webURL the fallback web URL, if any, for the app link. - */ -+ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL - targets:(NSArray *)targets - webURL:(NSURL *)webURL; - -/*! The URL from which this BFAppLink was derived */ -@property (nonatomic, strong, readonly) NSURL *sourceURL; - -/*! - The ordered list of targets applicable to this platform that will be used - for navigation. - */ -@property (nonatomic, copy, readonly) NSArray *targets; - -/*! The fallback web URL to use if no targets are installed on this device. */ -@property (nonatomic, strong, readonly) NSURL *webURL; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkNavigation.h b/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkNavigation.h deleted file mode 100644 index d459f72..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkNavigation.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -#import - -/*! - The result of calling navigate on a BFAppLinkNavigation - */ -typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) { - /*! Indicates that the navigation failed and no app was opened */ - BFAppLinkNavigationTypeFailure, - /*! Indicates that the navigation succeeded by opening the URL in the browser */ - BFAppLinkNavigationTypeBrowser, - /*! Indicates that the navigation succeeded by opening the URL in an app on the device */ - BFAppLinkNavigationTypeApp -}; - -@protocol BFAppLinkResolving; -@class BFTask; - -/*! - Represents a pending request to navigate to an App Link. Most developers will - simply use navigateToURLInBackground: to open a URL, but developers can build - custom requests with additional navigation and app data attached to them by - creating BFAppLinkNavigations themselves. - */ -@interface BFAppLinkNavigation : NSObject - -/*! - The extras for the AppLinkNavigation. This will generally contain application-specific - data that should be passed along with the request, such as advertiser or affiliate IDs or - other such metadata relevant on this device. - */ -@property (nonatomic, copy, readonly) NSDictionary *extras; - -/*! - The al_applink_data for the AppLinkNavigation. This will generally contain data common to - navigation attempts such as back-links, user agents, and other information that may be used - in routing and handling an App Link request. - */ -@property (nonatomic, copy, readonly) NSDictionary *appLinkData; - -/*! The AppLink to navigate to */ -@property (nonatomic, strong, readonly) BFAppLink *appLink; - -/*! Creates an AppLinkNavigation with the given link, extras, and App Link data */ -+ (instancetype)navigationWithAppLink:(BFAppLink *)appLink - extras:(NSDictionary *)extras - appLinkData:(NSDictionary *)appLinkData; - -/*! Performs the navigation */ -- (BFAppLinkNavigationType)navigate:(NSError **)error; - -/*! Returns a BFAppLink for the given URL */ -+ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination; - -/*! Returns a BFAppLink for the given URL using the given App Link resolution strategy */ -+ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination resolver:(id)resolver; - -/*! Navigates to a BFAppLink and returns whether it opened in-app or in-browser */ -+ (BFAppLinkNavigationType)navigateToAppLink:(BFAppLink *)link error:(NSError **)error; - -/*! Navigates to a URL (an asynchronous action) and returns a BFNavigationType */ -+ (BFTask *)navigateToURLInBackground:(NSURL *)destination; - -/*! - Navigates to a URL (an asynchronous action) using the given App Link resolution - strategy and returns a BFNavigationType - */ -+ (BFTask *)navigateToURLInBackground:(NSURL *)destination resolver:(id)resolver; - -/*! - Gets the default resolver to be used for App Link resolution. If the developer has not set one explicitly, - a basic, built-in resolver will be used. - */ -+ (id)defaultResolver; - -/*! - Sets the default resolver to be used for App Link resolution. Setting this to nil will revert the - default resolver to the basic, built-in resolver provided by Bolts. - */ -+ (void)setDefaultResolver:(id)resolver; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkResolving.h b/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkResolving.h deleted file mode 100644 index baa1451..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkResolving.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -@class BFTask; - -/*! - Implement this protocol to provide an alternate strategy for resolving - App Links that may include pre-fetching, caching, or querying for App Link - data from an index provided by a service provider. - */ -@protocol BFAppLinkResolving - -/*! - Asynchronously resolves App Link data for a given URL. - - @param url The URL to resolve into an App Link. - @returns A BFTask that will return a BFAppLink for the given URL. - */ -- (BFTask *)appLinkFromURLInBackground:(NSURL *)url; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkReturnToRefererController.h b/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkReturnToRefererController.h deleted file mode 100644 index 22648d4..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkReturnToRefererController.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import -#import - -#import - -@class BFAppLink; -@class BFAppLinkReturnToRefererController; - -/*! - Protocol that a class can implement in order to be notified when the user has navigated back - to the referer of an App Link. - */ -@protocol BFAppLinkReturnToRefererControllerDelegate - -@optional - -/*! Called when the user has tapped to navigate, but before the navigation has been performed. */ -- (void)returnToRefererController:(BFAppLinkReturnToRefererController *)controller - willNavigateToAppLink:(BFAppLink *)appLink; - -/*! Called after the navigation has been attempted, with an indication of whether the referer - app link was successfully opened. */ -- (void)returnToRefererController:(BFAppLinkReturnToRefererController *)controller - didNavigateToAppLink:(BFAppLink *)url - type:(BFAppLinkNavigationType)type; - -@end - -/*! - A controller class that implements default behavior for a BFAppLinkReturnToRefererView, including - the ability to display the view above the navigation bar for navigation-bsaed apps. - */ -@interface BFAppLinkReturnToRefererController : NSObject - -/*! - The delegate that will be notified when the user navigates back to the referer. - */ -@property (nonatomic, weak) id delegate; - -/*! - The BFAppLinkReturnToRefererView this controller is controlling. - */ -@property (nonatomic, strong) BFAppLinkReturnToRefererView *view; - -/*! - Initializes a controller suitable for controlling a BFAppLinkReturnToRefererView that is to be displayed - contained within another UIView (i.e., not displayed above the navigation bar). - */ -- (instancetype)init; - -/*! - Initializes a controller suitable for controlling a BFAppLinkReturnToRefererView that is to be displayed - displayed above the navigation bar. - */ -- (instancetype)initForDisplayAboveNavController:(UINavigationController *)navController; - -/*! - Removes the view entirely from the navigation controller it is currently displayed in. - */ -- (void)removeFromNavController; - -/*! - Shows the BFAppLinkReturnToRefererView with the specified referer information. If nil or missing data, - the view will not be displayed. */ -- (void)showViewForRefererAppLink:(BFAppLink *)refererAppLink; - -/*! - Shows the BFAppLinkReturnToRefererView with referer information extracted from the specified URL. - If nil or missing referer App Link data, the view will not be displayed. */ -- (void)showViewForRefererURL:(NSURL *)url; - -/*! - Closes the view, possibly animating it. - */ -- (void)closeViewAnimated:(BOOL)animated; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkReturnToRefererView.h b/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkReturnToRefererView.h deleted file mode 100644 index e3af940..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkReturnToRefererView.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import -#import - -#import - -@class BFAppLinkReturnToRefererView; -@class BFURL; - -typedef enum BFIncludeStatusBarInSize { - BFIncludeStatusBarInSizeNever, - BFIncludeStatusBarInSizeIOS7AndLater, - BFIncludeStatusBarInSizeAlways, -} BFIncludeStatusBarInSize; - -/*! - Protocol that a class can implement in order to be notified when the user has navigated back - to the referer of an App Link. - */ -@protocol BFAppLinkReturnToRefererViewDelegate - -/*! - Called when the user has tapped inside the close button. - */ -- (void)returnToRefererViewDidTapInsideCloseButton:(BFAppLinkReturnToRefererView *)view; - -/*! - Called when the user has tapped inside the App Link portion of the view. - */ -- (void)returnToRefererViewDidTapInsideLink:(BFAppLinkReturnToRefererView *)view - link:(BFAppLink *)link; - -@end - -/*! - Provides a UIView that displays a button allowing users to navigate back to the - application that launched the App Link currently being handled, if the App Link - contained referer data. The user can also close the view by clicking a close button - rather than navigating away. If the view is provided an App Link that does not contain - referer data, it will have zero size and no UI will be displayed. - */ -@interface BFAppLinkReturnToRefererView : UIView - -/*! - The delegate that will be notified when the user navigates back to the referer. - */ -@property (nonatomic, weak) id delegate; - -/*! - The color of the text label and close button. - */ -@property (nonatomic, strong) UIColor *textColor; - -@property (nonatomic, strong) BFAppLink *refererAppLink; - -/*! - Indicates whether to extend the size of the view to include the current status bar - size, for use in scenarios where the view might extend under the status bar on iOS 7 and - above; this property has no effect on earlier versions of iOS. - */ -@property (nonatomic, assign) BFIncludeStatusBarInSize includeStatusBarInSize; - -/*! - Indicates whether the user has closed the view by clicking the close button. - */ -@property (nonatomic, assign) BOOL closed; - -/*! - For apps that use a navigation controller, this method allows for displaying the view as - a banner above the navigation bar of the navigation controller. It will listen for orientation - change and other events to ensure it stays properly positioned above the nevigation bar. - If this method is called from, e.g., viewDidAppear, its counterpart, detachFromMainWindow should - be called from, e.g., viewWillDisappear. - */ -//- (void)attachToMainWindowAboveNavigationController:(UINavigationController *)navigationController view:(UIView *)view; - -/*! - Indicates that the view should no longer position itself above a navigation bar. - */ -//- (void)detachFromMainWindow; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkReturnToRefererView_Internal.h b/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkReturnToRefererView_Internal.h deleted file mode 100644 index 2624aee..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkReturnToRefererView_Internal.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "BFAppLinkReturnToRefererView.h" - -@interface BFAppLinkReturnToRefererView (Internal) - -- (CGFloat)statusBarHeight; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkTarget.h b/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkTarget.h deleted file mode 100644 index 6172126..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFAppLinkTarget.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -/*! - Represents a target defined in App Link metadata, consisting of at least - a URL, and optionally an App Store ID and name. - */ -@interface BFAppLinkTarget : NSObject - -/*! Creates a BFAppLinkTarget with the given app site and target URL. */ -+ (instancetype)appLinkTargetWithURL:(NSURL *)url - appStoreId:(NSString *)appStoreId - appName:(NSString *)appName; - -/*! The URL prefix for this app link target */ -@property (nonatomic, strong, readonly) NSURL *URL; - -/*! The app ID for the app store */ -@property (nonatomic, copy, readonly) NSString *appStoreId; - -/*! The name of the app */ -@property (nonatomic, copy, readonly) NSString *appName; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFExecutor.h b/iOS/Bolts.framework/Versions/A/Headers/BFExecutor.h deleted file mode 100644 index 02af9ba..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFExecutor.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -/*! - An object that can run a given block. - */ -@interface BFExecutor : NSObject - -/*! - Returns a default executor, which runs continuations immediately until the call stack gets too - deep, then dispatches to a new GCD queue. - */ -+ (instancetype)defaultExecutor; - -/*! - Returns an executor that runs continuations on the thread where the previous task was completed. - */ -+ (instancetype)immediateExecutor; - -/*! - Returns an executor that runs continuations on the main thread. - */ -+ (instancetype)mainThreadExecutor; - -/*! - Returns a new executor that uses the given block to execute continuations. - @param block The block to use. - */ -+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block; - -/*! - Returns a new executor that runs continuations on the given queue. - @param queue The instance of `dispatch_queue_t` to dispatch all continuations onto. - */ -+ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue; - -/*! - Returns a new executor that runs continuations on the given queue. - @param queue The instance of `NSOperationQueue` to run all continuations on. - */ -+ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue; - -/*! - Runs the given block using this executor's particular strategy. - @param block The block to execute. - */ -- (void)execute:(void(^)())block; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFMeasurementEvent.h b/iOS/Bolts.framework/Versions/A/Headers/BFMeasurementEvent.h deleted file mode 100644 index 7a9948c..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFMeasurementEvent.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -/*! The name of the notification posted by BFMeasurementEvent */ -FOUNDATION_EXPORT NSString *const BFMeasurementEventNotificationName; - -/*! Defines keys in the userInfo object for the notification named BFMeasurementEventNotificationName */ -/*! The string field for the name of the event */ -FOUNDATION_EXPORT NSString *const BFMeasurementEventNameKey; -/*! The dictionary field for the arguments of the event */ -FOUNDATION_EXPORT NSString *const BFMeasurementEventArgsKey; - - -/*! Bolts Events raised by BFMeasurementEvent for Applink */ -/*! - The name of the event posted when [BFURL URLWithURL:] is called successfully. This represents the successful parsing of an app link URL. - */ -FOUNDATION_EXPORT NSString *const BFAppLinkParseEventName; - -/*! - The name of the event posted when [BFURL URLWithInboundURL:] is called successfully. - This represents parsing an inbound app link URL from a different application - */ -FOUNDATION_EXPORT NSString *const BFAppLinkNavigateInEventName; - -/*! The event raised when the user navigates from your app to other apps */ -FOUNDATION_EXPORT NSString *const BFAppLinkNavigateOutEventName; - -/*! - The event raised when the user navigates out from your app and back to the referrer app. - e.g when the user leaves your app after tapping the back-to-referrer navigation bar - */ -FOUNDATION_EXPORT NSString *const BFAppLinkNavigateBackToReferrerEventName; - -@interface BFMeasurementEvent : NSObject - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFTask.h b/iOS/Bolts.framework/Versions/A/Headers/BFTask.h deleted file mode 100644 index 2ac84d6..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFTask.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -@class BFExecutor; -@class BFTask; - -/*! - A block that can act as a continuation for a task. - */ -typedef id(^BFContinuationBlock)(BFTask *task); - -/*! - The consumer view of a Task. A BFTask has methods to - inspect the state of the task, and to add continuations to - be run once the task is complete. - */ -@interface BFTask : NSObject - -/*! - Creates a task that is already completed with the given result. - @param result The result for the task. - */ -+ (instancetype)taskWithResult:(id)result; - -/*! - Creates a task that is already completed with the given error. - @param error The error for the task. - */ -+ (instancetype)taskWithError:(NSError *)error; - -/*! - Creates a task that is already completed with the given exception. - @param exception The exception for the task. - */ -+ (instancetype)taskWithException:(NSException *)exception; - -/*! - Creates a task that is already cancelled. - */ -+ (instancetype)cancelledTask; - -/*! - Returns a task that will be completed (with result == nil) once - all of the input tasks have completed. - @param tasks An `NSArray` of the tasks to use as an input. - */ -+ (instancetype)taskForCompletionOfAllTasks:(NSArray *)tasks; - -/*! - Returns a task that will be completed a certain amount of time in the future. - @param millis The approximate number of milliseconds to wait before the - task will be finished (with result == nil). - */ -+ (instancetype)taskWithDelay:(int)millis; - -/*! - Returns a task that will be completed after the given block completes with - the specified executor. - @param executor A BFExecutor responsible for determining how the - continuation block will be run. - @param block The block to immediately schedule to run with the given executor. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -+ (instancetype)taskFromExecutor:(BFExecutor *)executor - withBlock:(id (^)())block; - -// Properties that will be set on the task once it is completed. - -/*! - The result of a successful task. - */ -@property (nonatomic, strong, readonly) id result; - - -/*! - The error of a failed task. - */ -@property (nonatomic, strong, readonly) NSError *error; - -/*! - The exception of a failed task. - */ -@property (nonatomic, strong, readonly) NSException *exception; - -/*! - Whether this task has been cancelled. - */ -@property (nonatomic, assign, readonly, getter = isCancelled) BOOL cancelled; - -/*! - Whether this task has completed. - */ -@property (nonatomic, assign, readonly, getter = isCompleted) BOOL completed; - -/*! - Enqueues the given block to be run once this task is complete. - This method uses a default execution strategy. The block will be - run on the thread where the previous task completes, unless the - the stack depth is too deep, in which case it will be run on a - dispatch queue with default priority. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (instancetype)continueWithBlock:(BFContinuationBlock)block; - -/*! - Enqueues the given block to be run once this task is complete. - @param executor A BFExecutor responsible for determining how the - continuation block will be run. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (instancetype)continueWithExecutor:(BFExecutor *)executor - withBlock:(BFContinuationBlock)block; - -/*! - Identical to continueWithBlock:, except that the block is only run - if this task did not produce a cancellation, error, or exception. - If it did, then the failure will be propagated to the returned - task. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (instancetype)continueWithSuccessBlock:(BFContinuationBlock)block; - -/*! - Identical to continueWithExecutor:withBlock:, except that the block - is only run if this task did not produce a cancellation, error, or - exception. If it did, then the failure will be propagated to the - returned task. - @param executor A BFExecutor responsible for determining how the - continuation block will be run. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (instancetype)continueWithExecutor:(BFExecutor *)executor - withSuccessBlock:(BFContinuationBlock)block; - -/*! - Waits until this operation is completed. - This method is inefficient and consumes a thread resource while - it's running. It should be avoided. This method logs a warning - message if it is used on the main thread. - */ -- (void)waitUntilFinished; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFTaskCompletionSource.h b/iOS/Bolts.framework/Versions/A/Headers/BFTaskCompletionSource.h deleted file mode 100644 index d0ea545..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFTaskCompletionSource.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -@class BFTask; - -/*! - A BFTaskCompletionSource represents the producer side of tasks. - It is a task that also has methods for changing the state of the - task by settings its completion values. - */ -@interface BFTaskCompletionSource : NSObject - -/*! - Creates a new unfinished task. - */ -+ (instancetype)taskCompletionSource; - -/*! - The task associated with this TaskCompletionSource. - */ -@property (nonatomic, retain, readonly) BFTask *task; - -/*! - Completes the task by setting the result. - Attempting to set this for a completed task will raise an exception. - @param result The result of the task. - */ -- (void)setResult:(id)result; - -/*! - Completes the task by setting the error. - Attempting to set this for a completed task will raise an exception. - @param error The error for the task. - */ -- (void)setError:(NSError *)error; - -/*! - Completes the task by setting an exception. - Attempting to set this for a completed task will raise an exception. - @param exception The exception for the task. - */ -- (void)setException:(NSException *)exception; - -/*! - Completes the task by marking it as cancelled. - Attempting to set this for a completed task will raise an exception. - */ -- (void)cancel; - -/*! - Sets the result of the task if it wasn't already completed. - @returns whether the new value was set. - */ -- (BOOL)trySetResult:(id)result; - -/*! - Sets the error of the task if it wasn't already completed. - @param error The error for the task. - @returns whether the new value was set. - */ -- (BOOL)trySetError:(NSError *)error; - -/*! - Sets the exception of the task if it wasn't already completed. - @param exception The exception for the task. - @returns whether the new value was set. - */ -- (BOOL)trySetException:(NSException *)exception; - -/*! - Sets the cancellation state of the task if it wasn't already completed. - @returns whether the new value was set. - */ -- (BOOL)trySetCancelled; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFURL.h b/iOS/Bolts.framework/Versions/A/Headers/BFURL.h deleted file mode 100644 index f269e2d..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFURL.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - - - -@class BFAppLink; - -/*! - Provides a set of utilities for working with NSURLs, such as parsing of query parameters - and handling for App Link requests. - */ -@interface BFURL : NSObject - -/*! - Creates a link target from a raw URL. - On success, this posts the BFAppLinkParseEventName measurement event. If you are constructing the BFURL within your application delegate's - application:openURL:sourceApplication:annotation:, you should instead use URLWithInboundURL:sourceApplication: - to support better BFMeasurementEvent notifications - @param url The instance of `NSURL` to create BFURL from. - */ -+ (BFURL *)URLWithURL:(NSURL *)url; - -/*! - Creates a link target from a raw URL received from an external application. This is typically called from the app delegate's - application:openURL:sourceApplication:annotation: and will post the BFAppLinkNavigateInEventName measurement event. - @param url The instance of `NSURL` to create BFURL from. - @param sourceApplication the bundle ID of the app that is requesting your app to open the URL. The same sourceApplication in application:openURL:sourceApplication:annotation: -*/ -+ (BFURL *)URLWithInboundURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication; - -/*! - Gets the target URL. If the link is an App Link, this is the target of the App Link. - Otherwise, it is the url that created the target. - */ -@property (nonatomic, strong, readonly) NSURL *targetURL; - -/*! - Gets the query parameters for the target, parsed into an NSDictionary. - */ -@property (nonatomic, strong, readonly) NSDictionary *targetQueryParameters; - -/*! - If this link target is an App Link, this is the data found in al_applink_data. - Otherwise, it is nil. - */ -@property (nonatomic, strong, readonly) NSDictionary *appLinkData; - -/*! - If this link target is an App Link, this is the data found in extras. - */ -@property (nonatomic, strong, readonly) NSDictionary *appLinkExtras; - -/*! - The App Link indicating how to navigate back to the referer app, if any. - */ -@property (nonatomic, strong, readonly) BFAppLink *appLinkReferer; - -/*! - The URL that was used to create this BFURL. - */ -@property (nonatomic, strong, readonly) NSURL *inputURL; - -/*! - The query parameters of the inputURL, parsed into an NSDictionary. - */ -@property (nonatomic, strong, readonly) NSDictionary *inputQueryParameters; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BFWebViewAppLinkResolver.h b/iOS/Bolts.framework/Versions/A/Headers/BFWebViewAppLinkResolver.h deleted file mode 100644 index cffa529..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BFWebViewAppLinkResolver.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -#import - -/*! - A reference implementation for an App Link resolver that uses a hidden UIWebView - to parse the HTML containing App Link metadata. - */ -@interface BFWebViewAppLinkResolver : NSObject - -/*! - Gets the instance of a BFWebViewAppLinkResolver. - */ -+ (instancetype)sharedInstance; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/Bolts.h b/iOS/Bolts.framework/Versions/A/Headers/Bolts.h deleted file mode 100644 index e22bdd5..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/Bolts.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import -#import -#import -#import - -#if TARGET_OS_IPHONE -#import -#import -#import -#import -#import -#import -#import -#endif - -/*! @abstract 80175001: There were multiple errors. */ -extern NSInteger const kBFMultipleErrorsError; - -@interface Bolts : NSObject - -/*! - Returns the version of the Bolts Framework as an NSString. - @returns The NSString representation of the current version. - */ -+ (NSString *)version; - -@end diff --git a/iOS/Bolts.framework/Versions/A/Headers/BoltsVersion.h b/iOS/Bolts.framework/Versions/A/Headers/BoltsVersion.h deleted file mode 100644 index 24e802e..0000000 --- a/iOS/Bolts.framework/Versions/A/Headers/BoltsVersion.h +++ /dev/null @@ -1 +0,0 @@ -#define BOLTS_VERSION @"1.1.3" diff --git a/iOS/Bolts.framework/Versions/Current/Bolts b/iOS/Bolts.framework/Versions/Current/Bolts deleted file mode 100644 index c3798ed..0000000 Binary files a/iOS/Bolts.framework/Versions/Current/Bolts and /dev/null differ diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLink.h b/iOS/Bolts.framework/Versions/Current/Headers/BFAppLink.h deleted file mode 100644 index 5e51acd..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLink.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -/*! The version of the App Link protocol that this library supports */ -FOUNDATION_EXPORT NSString *const BFAppLinkVersion; - -/*! - Contains App Link metadata relevant for navigation on this device - derived from the HTML at a given URL. - */ -@interface BFAppLink : NSObject - -/*! - Creates a BFAppLink with the given list of BFAppLinkTargets and target URL. - - Generally, this will only be used by implementers of the BFAppLinkResolving protocol, - as these implementers will produce App Link metadata for a given URL. - - @param sourceURL the URL from which this App Link is derived - @param targets an ordered list of BFAppLinkTargets for this platform derived - from App Link metadata. - @param webURL the fallback web URL, if any, for the app link. - */ -+ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL - targets:(NSArray *)targets - webURL:(NSURL *)webURL; - -/*! The URL from which this BFAppLink was derived */ -@property (nonatomic, strong, readonly) NSURL *sourceURL; - -/*! - The ordered list of targets applicable to this platform that will be used - for navigation. - */ -@property (nonatomic, copy, readonly) NSArray *targets; - -/*! The fallback web URL to use if no targets are installed on this device. */ -@property (nonatomic, strong, readonly) NSURL *webURL; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkNavigation.h b/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkNavigation.h deleted file mode 100644 index d459f72..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkNavigation.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -#import - -/*! - The result of calling navigate on a BFAppLinkNavigation - */ -typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) { - /*! Indicates that the navigation failed and no app was opened */ - BFAppLinkNavigationTypeFailure, - /*! Indicates that the navigation succeeded by opening the URL in the browser */ - BFAppLinkNavigationTypeBrowser, - /*! Indicates that the navigation succeeded by opening the URL in an app on the device */ - BFAppLinkNavigationTypeApp -}; - -@protocol BFAppLinkResolving; -@class BFTask; - -/*! - Represents a pending request to navigate to an App Link. Most developers will - simply use navigateToURLInBackground: to open a URL, but developers can build - custom requests with additional navigation and app data attached to them by - creating BFAppLinkNavigations themselves. - */ -@interface BFAppLinkNavigation : NSObject - -/*! - The extras for the AppLinkNavigation. This will generally contain application-specific - data that should be passed along with the request, such as advertiser or affiliate IDs or - other such metadata relevant on this device. - */ -@property (nonatomic, copy, readonly) NSDictionary *extras; - -/*! - The al_applink_data for the AppLinkNavigation. This will generally contain data common to - navigation attempts such as back-links, user agents, and other information that may be used - in routing and handling an App Link request. - */ -@property (nonatomic, copy, readonly) NSDictionary *appLinkData; - -/*! The AppLink to navigate to */ -@property (nonatomic, strong, readonly) BFAppLink *appLink; - -/*! Creates an AppLinkNavigation with the given link, extras, and App Link data */ -+ (instancetype)navigationWithAppLink:(BFAppLink *)appLink - extras:(NSDictionary *)extras - appLinkData:(NSDictionary *)appLinkData; - -/*! Performs the navigation */ -- (BFAppLinkNavigationType)navigate:(NSError **)error; - -/*! Returns a BFAppLink for the given URL */ -+ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination; - -/*! Returns a BFAppLink for the given URL using the given App Link resolution strategy */ -+ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination resolver:(id)resolver; - -/*! Navigates to a BFAppLink and returns whether it opened in-app or in-browser */ -+ (BFAppLinkNavigationType)navigateToAppLink:(BFAppLink *)link error:(NSError **)error; - -/*! Navigates to a URL (an asynchronous action) and returns a BFNavigationType */ -+ (BFTask *)navigateToURLInBackground:(NSURL *)destination; - -/*! - Navigates to a URL (an asynchronous action) using the given App Link resolution - strategy and returns a BFNavigationType - */ -+ (BFTask *)navigateToURLInBackground:(NSURL *)destination resolver:(id)resolver; - -/*! - Gets the default resolver to be used for App Link resolution. If the developer has not set one explicitly, - a basic, built-in resolver will be used. - */ -+ (id)defaultResolver; - -/*! - Sets the default resolver to be used for App Link resolution. Setting this to nil will revert the - default resolver to the basic, built-in resolver provided by Bolts. - */ -+ (void)setDefaultResolver:(id)resolver; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkResolving.h b/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkResolving.h deleted file mode 100644 index baa1451..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkResolving.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -@class BFTask; - -/*! - Implement this protocol to provide an alternate strategy for resolving - App Links that may include pre-fetching, caching, or querying for App Link - data from an index provided by a service provider. - */ -@protocol BFAppLinkResolving - -/*! - Asynchronously resolves App Link data for a given URL. - - @param url The URL to resolve into an App Link. - @returns A BFTask that will return a BFAppLink for the given URL. - */ -- (BFTask *)appLinkFromURLInBackground:(NSURL *)url; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkReturnToRefererController.h b/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkReturnToRefererController.h deleted file mode 100644 index 22648d4..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkReturnToRefererController.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import -#import - -#import - -@class BFAppLink; -@class BFAppLinkReturnToRefererController; - -/*! - Protocol that a class can implement in order to be notified when the user has navigated back - to the referer of an App Link. - */ -@protocol BFAppLinkReturnToRefererControllerDelegate - -@optional - -/*! Called when the user has tapped to navigate, but before the navigation has been performed. */ -- (void)returnToRefererController:(BFAppLinkReturnToRefererController *)controller - willNavigateToAppLink:(BFAppLink *)appLink; - -/*! Called after the navigation has been attempted, with an indication of whether the referer - app link was successfully opened. */ -- (void)returnToRefererController:(BFAppLinkReturnToRefererController *)controller - didNavigateToAppLink:(BFAppLink *)url - type:(BFAppLinkNavigationType)type; - -@end - -/*! - A controller class that implements default behavior for a BFAppLinkReturnToRefererView, including - the ability to display the view above the navigation bar for navigation-bsaed apps. - */ -@interface BFAppLinkReturnToRefererController : NSObject - -/*! - The delegate that will be notified when the user navigates back to the referer. - */ -@property (nonatomic, weak) id delegate; - -/*! - The BFAppLinkReturnToRefererView this controller is controlling. - */ -@property (nonatomic, strong) BFAppLinkReturnToRefererView *view; - -/*! - Initializes a controller suitable for controlling a BFAppLinkReturnToRefererView that is to be displayed - contained within another UIView (i.e., not displayed above the navigation bar). - */ -- (instancetype)init; - -/*! - Initializes a controller suitable for controlling a BFAppLinkReturnToRefererView that is to be displayed - displayed above the navigation bar. - */ -- (instancetype)initForDisplayAboveNavController:(UINavigationController *)navController; - -/*! - Removes the view entirely from the navigation controller it is currently displayed in. - */ -- (void)removeFromNavController; - -/*! - Shows the BFAppLinkReturnToRefererView with the specified referer information. If nil or missing data, - the view will not be displayed. */ -- (void)showViewForRefererAppLink:(BFAppLink *)refererAppLink; - -/*! - Shows the BFAppLinkReturnToRefererView with referer information extracted from the specified URL. - If nil or missing referer App Link data, the view will not be displayed. */ -- (void)showViewForRefererURL:(NSURL *)url; - -/*! - Closes the view, possibly animating it. - */ -- (void)closeViewAnimated:(BOOL)animated; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkReturnToRefererView.h b/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkReturnToRefererView.h deleted file mode 100644 index e3af940..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkReturnToRefererView.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import -#import - -#import - -@class BFAppLinkReturnToRefererView; -@class BFURL; - -typedef enum BFIncludeStatusBarInSize { - BFIncludeStatusBarInSizeNever, - BFIncludeStatusBarInSizeIOS7AndLater, - BFIncludeStatusBarInSizeAlways, -} BFIncludeStatusBarInSize; - -/*! - Protocol that a class can implement in order to be notified when the user has navigated back - to the referer of an App Link. - */ -@protocol BFAppLinkReturnToRefererViewDelegate - -/*! - Called when the user has tapped inside the close button. - */ -- (void)returnToRefererViewDidTapInsideCloseButton:(BFAppLinkReturnToRefererView *)view; - -/*! - Called when the user has tapped inside the App Link portion of the view. - */ -- (void)returnToRefererViewDidTapInsideLink:(BFAppLinkReturnToRefererView *)view - link:(BFAppLink *)link; - -@end - -/*! - Provides a UIView that displays a button allowing users to navigate back to the - application that launched the App Link currently being handled, if the App Link - contained referer data. The user can also close the view by clicking a close button - rather than navigating away. If the view is provided an App Link that does not contain - referer data, it will have zero size and no UI will be displayed. - */ -@interface BFAppLinkReturnToRefererView : UIView - -/*! - The delegate that will be notified when the user navigates back to the referer. - */ -@property (nonatomic, weak) id delegate; - -/*! - The color of the text label and close button. - */ -@property (nonatomic, strong) UIColor *textColor; - -@property (nonatomic, strong) BFAppLink *refererAppLink; - -/*! - Indicates whether to extend the size of the view to include the current status bar - size, for use in scenarios where the view might extend under the status bar on iOS 7 and - above; this property has no effect on earlier versions of iOS. - */ -@property (nonatomic, assign) BFIncludeStatusBarInSize includeStatusBarInSize; - -/*! - Indicates whether the user has closed the view by clicking the close button. - */ -@property (nonatomic, assign) BOOL closed; - -/*! - For apps that use a navigation controller, this method allows for displaying the view as - a banner above the navigation bar of the navigation controller. It will listen for orientation - change and other events to ensure it stays properly positioned above the nevigation bar. - If this method is called from, e.g., viewDidAppear, its counterpart, detachFromMainWindow should - be called from, e.g., viewWillDisappear. - */ -//- (void)attachToMainWindowAboveNavigationController:(UINavigationController *)navigationController view:(UIView *)view; - -/*! - Indicates that the view should no longer position itself above a navigation bar. - */ -//- (void)detachFromMainWindow; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkReturnToRefererView_Internal.h b/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkReturnToRefererView_Internal.h deleted file mode 100644 index 2624aee..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkReturnToRefererView_Internal.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "BFAppLinkReturnToRefererView.h" - -@interface BFAppLinkReturnToRefererView (Internal) - -- (CGFloat)statusBarHeight; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkTarget.h b/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkTarget.h deleted file mode 100644 index 6172126..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFAppLinkTarget.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -/*! - Represents a target defined in App Link metadata, consisting of at least - a URL, and optionally an App Store ID and name. - */ -@interface BFAppLinkTarget : NSObject - -/*! Creates a BFAppLinkTarget with the given app site and target URL. */ -+ (instancetype)appLinkTargetWithURL:(NSURL *)url - appStoreId:(NSString *)appStoreId - appName:(NSString *)appName; - -/*! The URL prefix for this app link target */ -@property (nonatomic, strong, readonly) NSURL *URL; - -/*! The app ID for the app store */ -@property (nonatomic, copy, readonly) NSString *appStoreId; - -/*! The name of the app */ -@property (nonatomic, copy, readonly) NSString *appName; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFExecutor.h b/iOS/Bolts.framework/Versions/Current/Headers/BFExecutor.h deleted file mode 100644 index 02af9ba..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFExecutor.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -/*! - An object that can run a given block. - */ -@interface BFExecutor : NSObject - -/*! - Returns a default executor, which runs continuations immediately until the call stack gets too - deep, then dispatches to a new GCD queue. - */ -+ (instancetype)defaultExecutor; - -/*! - Returns an executor that runs continuations on the thread where the previous task was completed. - */ -+ (instancetype)immediateExecutor; - -/*! - Returns an executor that runs continuations on the main thread. - */ -+ (instancetype)mainThreadExecutor; - -/*! - Returns a new executor that uses the given block to execute continuations. - @param block The block to use. - */ -+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block; - -/*! - Returns a new executor that runs continuations on the given queue. - @param queue The instance of `dispatch_queue_t` to dispatch all continuations onto. - */ -+ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue; - -/*! - Returns a new executor that runs continuations on the given queue. - @param queue The instance of `NSOperationQueue` to run all continuations on. - */ -+ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue; - -/*! - Runs the given block using this executor's particular strategy. - @param block The block to execute. - */ -- (void)execute:(void(^)())block; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFMeasurementEvent.h b/iOS/Bolts.framework/Versions/Current/Headers/BFMeasurementEvent.h deleted file mode 100644 index 7a9948c..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFMeasurementEvent.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -/*! The name of the notification posted by BFMeasurementEvent */ -FOUNDATION_EXPORT NSString *const BFMeasurementEventNotificationName; - -/*! Defines keys in the userInfo object for the notification named BFMeasurementEventNotificationName */ -/*! The string field for the name of the event */ -FOUNDATION_EXPORT NSString *const BFMeasurementEventNameKey; -/*! The dictionary field for the arguments of the event */ -FOUNDATION_EXPORT NSString *const BFMeasurementEventArgsKey; - - -/*! Bolts Events raised by BFMeasurementEvent for Applink */ -/*! - The name of the event posted when [BFURL URLWithURL:] is called successfully. This represents the successful parsing of an app link URL. - */ -FOUNDATION_EXPORT NSString *const BFAppLinkParseEventName; - -/*! - The name of the event posted when [BFURL URLWithInboundURL:] is called successfully. - This represents parsing an inbound app link URL from a different application - */ -FOUNDATION_EXPORT NSString *const BFAppLinkNavigateInEventName; - -/*! The event raised when the user navigates from your app to other apps */ -FOUNDATION_EXPORT NSString *const BFAppLinkNavigateOutEventName; - -/*! - The event raised when the user navigates out from your app and back to the referrer app. - e.g when the user leaves your app after tapping the back-to-referrer navigation bar - */ -FOUNDATION_EXPORT NSString *const BFAppLinkNavigateBackToReferrerEventName; - -@interface BFMeasurementEvent : NSObject - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFTask.h b/iOS/Bolts.framework/Versions/Current/Headers/BFTask.h deleted file mode 100644 index 2ac84d6..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFTask.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -@class BFExecutor; -@class BFTask; - -/*! - A block that can act as a continuation for a task. - */ -typedef id(^BFContinuationBlock)(BFTask *task); - -/*! - The consumer view of a Task. A BFTask has methods to - inspect the state of the task, and to add continuations to - be run once the task is complete. - */ -@interface BFTask : NSObject - -/*! - Creates a task that is already completed with the given result. - @param result The result for the task. - */ -+ (instancetype)taskWithResult:(id)result; - -/*! - Creates a task that is already completed with the given error. - @param error The error for the task. - */ -+ (instancetype)taskWithError:(NSError *)error; - -/*! - Creates a task that is already completed with the given exception. - @param exception The exception for the task. - */ -+ (instancetype)taskWithException:(NSException *)exception; - -/*! - Creates a task that is already cancelled. - */ -+ (instancetype)cancelledTask; - -/*! - Returns a task that will be completed (with result == nil) once - all of the input tasks have completed. - @param tasks An `NSArray` of the tasks to use as an input. - */ -+ (instancetype)taskForCompletionOfAllTasks:(NSArray *)tasks; - -/*! - Returns a task that will be completed a certain amount of time in the future. - @param millis The approximate number of milliseconds to wait before the - task will be finished (with result == nil). - */ -+ (instancetype)taskWithDelay:(int)millis; - -/*! - Returns a task that will be completed after the given block completes with - the specified executor. - @param executor A BFExecutor responsible for determining how the - continuation block will be run. - @param block The block to immediately schedule to run with the given executor. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -+ (instancetype)taskFromExecutor:(BFExecutor *)executor - withBlock:(id (^)())block; - -// Properties that will be set on the task once it is completed. - -/*! - The result of a successful task. - */ -@property (nonatomic, strong, readonly) id result; - - -/*! - The error of a failed task. - */ -@property (nonatomic, strong, readonly) NSError *error; - -/*! - The exception of a failed task. - */ -@property (nonatomic, strong, readonly) NSException *exception; - -/*! - Whether this task has been cancelled. - */ -@property (nonatomic, assign, readonly, getter = isCancelled) BOOL cancelled; - -/*! - Whether this task has completed. - */ -@property (nonatomic, assign, readonly, getter = isCompleted) BOOL completed; - -/*! - Enqueues the given block to be run once this task is complete. - This method uses a default execution strategy. The block will be - run on the thread where the previous task completes, unless the - the stack depth is too deep, in which case it will be run on a - dispatch queue with default priority. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (instancetype)continueWithBlock:(BFContinuationBlock)block; - -/*! - Enqueues the given block to be run once this task is complete. - @param executor A BFExecutor responsible for determining how the - continuation block will be run. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (instancetype)continueWithExecutor:(BFExecutor *)executor - withBlock:(BFContinuationBlock)block; - -/*! - Identical to continueWithBlock:, except that the block is only run - if this task did not produce a cancellation, error, or exception. - If it did, then the failure will be propagated to the returned - task. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (instancetype)continueWithSuccessBlock:(BFContinuationBlock)block; - -/*! - Identical to continueWithExecutor:withBlock:, except that the block - is only run if this task did not produce a cancellation, error, or - exception. If it did, then the failure will be propagated to the - returned task. - @param executor A BFExecutor responsible for determining how the - continuation block will be run. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a BFTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (instancetype)continueWithExecutor:(BFExecutor *)executor - withSuccessBlock:(BFContinuationBlock)block; - -/*! - Waits until this operation is completed. - This method is inefficient and consumes a thread resource while - it's running. It should be avoided. This method logs a warning - message if it is used on the main thread. - */ -- (void)waitUntilFinished; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFTaskCompletionSource.h b/iOS/Bolts.framework/Versions/Current/Headers/BFTaskCompletionSource.h deleted file mode 100644 index d0ea545..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFTaskCompletionSource.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -@class BFTask; - -/*! - A BFTaskCompletionSource represents the producer side of tasks. - It is a task that also has methods for changing the state of the - task by settings its completion values. - */ -@interface BFTaskCompletionSource : NSObject - -/*! - Creates a new unfinished task. - */ -+ (instancetype)taskCompletionSource; - -/*! - The task associated with this TaskCompletionSource. - */ -@property (nonatomic, retain, readonly) BFTask *task; - -/*! - Completes the task by setting the result. - Attempting to set this for a completed task will raise an exception. - @param result The result of the task. - */ -- (void)setResult:(id)result; - -/*! - Completes the task by setting the error. - Attempting to set this for a completed task will raise an exception. - @param error The error for the task. - */ -- (void)setError:(NSError *)error; - -/*! - Completes the task by setting an exception. - Attempting to set this for a completed task will raise an exception. - @param exception The exception for the task. - */ -- (void)setException:(NSException *)exception; - -/*! - Completes the task by marking it as cancelled. - Attempting to set this for a completed task will raise an exception. - */ -- (void)cancel; - -/*! - Sets the result of the task if it wasn't already completed. - @returns whether the new value was set. - */ -- (BOOL)trySetResult:(id)result; - -/*! - Sets the error of the task if it wasn't already completed. - @param error The error for the task. - @returns whether the new value was set. - */ -- (BOOL)trySetError:(NSError *)error; - -/*! - Sets the exception of the task if it wasn't already completed. - @param exception The exception for the task. - @returns whether the new value was set. - */ -- (BOOL)trySetException:(NSException *)exception; - -/*! - Sets the cancellation state of the task if it wasn't already completed. - @returns whether the new value was set. - */ -- (BOOL)trySetCancelled; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFURL.h b/iOS/Bolts.framework/Versions/Current/Headers/BFURL.h deleted file mode 100644 index f269e2d..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFURL.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - - - -@class BFAppLink; - -/*! - Provides a set of utilities for working with NSURLs, such as parsing of query parameters - and handling for App Link requests. - */ -@interface BFURL : NSObject - -/*! - Creates a link target from a raw URL. - On success, this posts the BFAppLinkParseEventName measurement event. If you are constructing the BFURL within your application delegate's - application:openURL:sourceApplication:annotation:, you should instead use URLWithInboundURL:sourceApplication: - to support better BFMeasurementEvent notifications - @param url The instance of `NSURL` to create BFURL from. - */ -+ (BFURL *)URLWithURL:(NSURL *)url; - -/*! - Creates a link target from a raw URL received from an external application. This is typically called from the app delegate's - application:openURL:sourceApplication:annotation: and will post the BFAppLinkNavigateInEventName measurement event. - @param url The instance of `NSURL` to create BFURL from. - @param sourceApplication the bundle ID of the app that is requesting your app to open the URL. The same sourceApplication in application:openURL:sourceApplication:annotation: -*/ -+ (BFURL *)URLWithInboundURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication; - -/*! - Gets the target URL. If the link is an App Link, this is the target of the App Link. - Otherwise, it is the url that created the target. - */ -@property (nonatomic, strong, readonly) NSURL *targetURL; - -/*! - Gets the query parameters for the target, parsed into an NSDictionary. - */ -@property (nonatomic, strong, readonly) NSDictionary *targetQueryParameters; - -/*! - If this link target is an App Link, this is the data found in al_applink_data. - Otherwise, it is nil. - */ -@property (nonatomic, strong, readonly) NSDictionary *appLinkData; - -/*! - If this link target is an App Link, this is the data found in extras. - */ -@property (nonatomic, strong, readonly) NSDictionary *appLinkExtras; - -/*! - The App Link indicating how to navigate back to the referer app, if any. - */ -@property (nonatomic, strong, readonly) BFAppLink *appLinkReferer; - -/*! - The URL that was used to create this BFURL. - */ -@property (nonatomic, strong, readonly) NSURL *inputURL; - -/*! - The query parameters of the inputURL, parsed into an NSDictionary. - */ -@property (nonatomic, strong, readonly) NSDictionary *inputQueryParameters; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BFWebViewAppLinkResolver.h b/iOS/Bolts.framework/Versions/Current/Headers/BFWebViewAppLinkResolver.h deleted file mode 100644 index cffa529..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BFWebViewAppLinkResolver.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -#import - -/*! - A reference implementation for an App Link resolver that uses a hidden UIWebView - to parse the HTML containing App Link metadata. - */ -@interface BFWebViewAppLinkResolver : NSObject - -/*! - Gets the instance of a BFWebViewAppLinkResolver. - */ -+ (instancetype)sharedInstance; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/Bolts.h b/iOS/Bolts.framework/Versions/Current/Headers/Bolts.h deleted file mode 100644 index e22bdd5..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/Bolts.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import -#import -#import -#import - -#if TARGET_OS_IPHONE -#import -#import -#import -#import -#import -#import -#import -#endif - -/*! @abstract 80175001: There were multiple errors. */ -extern NSInteger const kBFMultipleErrorsError; - -@interface Bolts : NSObject - -/*! - Returns the version of the Bolts Framework as an NSString. - @returns The NSString representation of the current version. - */ -+ (NSString *)version; - -@end diff --git a/iOS/Bolts.framework/Versions/Current/Headers/BoltsVersion.h b/iOS/Bolts.framework/Versions/Current/Headers/BoltsVersion.h deleted file mode 100644 index 24e802e..0000000 --- a/iOS/Bolts.framework/Versions/Current/Headers/BoltsVersion.h +++ /dev/null @@ -1 +0,0 @@ -#define BOLTS_VERSION @"1.1.3" diff --git a/iOS/Images/AddCertificatesToKeychain.png b/iOS/Images/AddCertificatesToKeychain.png new file mode 100644 index 0000000..5d297d1 Binary files /dev/null and b/iOS/Images/AddCertificatesToKeychain.png differ diff --git a/iOS/Images/AppServicesPush.png b/iOS/Images/AppServicesPush.png new file mode 100644 index 0000000..cf30e2f Binary files /dev/null and b/iOS/Images/AppServicesPush.png differ diff --git a/iOS/Images/CertificatesNewAppId.png b/iOS/Images/CertificatesNewAppId.png new file mode 100644 index 0000000..4964108 Binary files /dev/null and b/iOS/Images/CertificatesNewAppId.png differ diff --git a/iOS/Images/ConfigurePushNotifications.png b/iOS/Images/ConfigurePushNotifications.png new file mode 100644 index 0000000..9d2f496 Binary files /dev/null and b/iOS/Images/ConfigurePushNotifications.png differ diff --git a/iOS/Images/ConfigureXcodeProjectBundleIdentifier.png b/iOS/Images/ConfigureXcodeProjectBundleIdentifier.png new file mode 100644 index 0000000..916b8af Binary files /dev/null and b/iOS/Images/ConfigureXcodeProjectBundleIdentifier.png differ diff --git a/iOS/Images/ConfiguredForProduction.png b/iOS/Images/ConfiguredForProduction.png new file mode 100644 index 0000000..3ee177f Binary files /dev/null and b/iOS/Images/ConfiguredForProduction.png differ diff --git a/iOS/Images/EditAppId.png b/iOS/Images/EditAppId.png new file mode 100644 index 0000000..09dadb0 Binary files /dev/null and b/iOS/Images/EditAppId.png differ diff --git a/iOS/Images/ExplicitAppId.png b/iOS/Images/ExplicitAppId.png new file mode 100644 index 0000000..3fe3cb3 Binary files /dev/null and b/iOS/Images/ExplicitAppId.png differ diff --git a/iOS/Images/ExportCertificate.png b/iOS/Images/ExportCertificate.png new file mode 100644 index 0000000..8d5b731 Binary files /dev/null and b/iOS/Images/ExportCertificate.png differ diff --git a/iOS/Images/KeychainAccessCertAssist.png b/iOS/Images/KeychainAccessCertAssist.png new file mode 100644 index 0000000..0c8fb87 Binary files /dev/null and b/iOS/Images/KeychainAccessCertAssist.png differ diff --git a/iOS/Images/ParseConfig.png b/iOS/Images/ParseConfig.png new file mode 100644 index 0000000..39d05c1 Binary files /dev/null and b/iOS/Images/ParseConfig.png differ diff --git a/iOS/Parse.framework/Headers/PFACL.h b/iOS/Parse.framework/Headers/PFACL.h index aa05ebb..abcf031 100644 --- a/iOS/Parse.framework/Headers/PFACL.h +++ b/iOS/Parse.framework/Headers/PFACL.h @@ -1,17 +1,22 @@ -// -// PFACL.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import +NS_ASSUME_NONNULL_BEGIN + @class PFRole; @class PFUser; -/*! +/** The `PFACL` class is used to control which users can access or modify a particular object. - Each can have its own `PFACL`. You can grant read and write permissions separately to specific users, + Each `PFObject` can have its own `PFACL`. You can grant read and write permissions separately to specific users, to groups of users that belong to roles, or you can grant permissions to "the public" so that, for example, any user could read a particular object but only a particular set of users could write to that object. */ @@ -21,129 +26,111 @@ /// @name Creating an ACL ///-------------------------------------- -/*! - @abstract Creates an ACL with no permissions granted. +/** + Creates an ACL with no permissions granted. - @returns Returns a new `PFACL`. + @return Returns a new `PFACL`. */ -+ (PFACL *)ACL; ++ (instancetype)ACL; -/*! - @abstract Creates an ACL where only the provided user has access. +/** + Creates an ACL where only the provided user has access. @param user The user to assign access. */ -+ (PFACL *)ACLWithUser:(PFUser *)user; ++ (instancetype)ACLWithUser:(PFUser *)user; ///-------------------------------------- /// @name Controlling Public Access ///-------------------------------------- -/*! - @abstract Set whether the public is allowed to read this object. - - @param allowed Whether the public can read this object. +/** + Controls whether the public is allowed to read this object. */ -- (void)setPublicReadAccess:(BOOL)allowed; +@property (nonatomic, assign, getter=getPublicReadAccess) BOOL publicReadAccess; -/*! - @abstract Gets whether the public is allowed to read this object. - - @returns `YES` if the public read access is enabled, otherwise `NO`. +/** + Controls whether the public is allowed to write this object. */ -- (BOOL)getPublicReadAccess; - -/*! - @abstract Set whether the public is allowed to write this object. - - @param allowed Whether the public can write this object. - */ -- (void)setPublicWriteAccess:(BOOL)allowed; - -/*! - @abstract Gets whether the public is allowed to write this object. - - @returns `YES` if the public write access is enabled, otherwise `NO`. - */ -- (BOOL)getPublicWriteAccess; +@property (nonatomic, assign, getter=getPublicWriteAccess) BOOL publicWriteAccess; ///-------------------------------------- /// @name Controlling Access Per-User ///-------------------------------------- -/*! - @abstract Set whether the given user id is allowed to read this object. +/** + Set whether the given user id is allowed to read this object. @param allowed Whether the given user can write this object. - @param userId The <[PFObject objectId]> of the user to assign access. + @param userId The `PFObject.objectId` of the user to assign access. */ - (void)setReadAccess:(BOOL)allowed forUserId:(NSString *)userId; -/*! - @abstract Gets whether the given user id is *explicitly* allowed to read this object. - Even if this returns `NO`, the user may still be able to access it if returns `YES` +/** + Gets whether the given user id is *explicitly* allowed to read this object. + Even if this returns `NO`, the user may still be able to access it if `publicReadAccess` returns `YES` or if the user belongs to a role that has access. - @param userId The <[PFObject objectId]> of the user for which to retrive access. + @param userId The `PFObject.objectId` of the user for which to retrive access. - @returns `YES` if the user with this `objectId` has *explicit* read access, otherwise `NO`. + @return `YES` if the user with this `objectId` has *explicit* read access, otherwise `NO`. */ - (BOOL)getReadAccessForUserId:(NSString *)userId; -/*! - @abstract Set whether the given user id is allowed to write this object. +/** + Set whether the given user id is allowed to write this object. @param allowed Whether the given user can read this object. - @param userId The `objectId` of the user to assign access. + @param userId The `PFObject.objectId` of the user to assign access. */ - (void)setWriteAccess:(BOOL)allowed forUserId:(NSString *)userId; -/*! - @abstract Gets whether the given user id is *explicitly* allowed to write this object. - Even if this returns NO, the user may still be able to write it if returns `YES` +/** + Gets whether the given user id is *explicitly* allowed to write this object. + Even if this returns NO, the user may still be able to write it if `publicWriteAccess` returns `YES` or if the user belongs to a role that has access. - @param userId The <[PFObject objectId]> of the user for which to retrive access. + @param userId The `PFObject.objectId` of the user for which to retrive access. - @returns `YES` if the user with this `objectId` has *explicit* write access, otherwise `NO`. + @return `YES` if the user with this `PFObject.objectId` has *explicit* write access, otherwise `NO`. */ - (BOOL)getWriteAccessForUserId:(NSString *)userId; -/*! - @abstract Set whether the given user is allowed to read this object. +/** + Set whether the given user is allowed to read this object. @param allowed Whether the given user can read this object. @param user The user to assign access. */ - (void)setReadAccess:(BOOL)allowed forUser:(PFUser *)user; -/*! - @abstract Gets whether the given user is *explicitly* allowed to read this object. - Even if this returns `NO`, the user may still be able to access it if returns `YES` +/** + Gets whether the given user is *explicitly* allowed to read this object. + Even if this returns `NO`, the user may still be able to access it if `publicReadAccess` returns `YES` or if the user belongs to a role that has access. @param user The user for which to retrive access. - @returns `YES` if the user has *explicit* read access, otherwise `NO`. + @return `YES` if the user has *explicit* read access, otherwise `NO`. */ - (BOOL)getReadAccessForUser:(PFUser *)user; -/*! - @abstract Set whether the given user is allowed to write this object. +/** + Set whether the given user is allowed to write this object. @param allowed Whether the given user can write this object. @param user The user to assign access. */ - (void)setWriteAccess:(BOOL)allowed forUser:(PFUser *)user; -/*! - @abstract Gets whether the given user is *explicitly* allowed to write this object. - Even if this returns `NO`, the user may still be able to write it if returns `YES` +/** + Gets whether the given user is *explicitly* allowed to write this object. + Even if this returns `NO`, the user may still be able to write it if `publicWriteAccess` returns `YES` or if the user belongs to a role that has access. @param user The user for which to retrive access. - @returns `YES` if the user has *explicit* write access, otherwise `NO`. + @return `YES` if the user has *explicit* write access, otherwise `NO`. */ - (BOOL)getWriteAccessForUser:(PFUser *)user; @@ -151,59 +138,59 @@ /// @name Controlling Access Per-Role ///-------------------------------------- -/*! - @abstract Get whether users belonging to the role with the given name are allowed to read this object. +/** + Get whether users belonging to the role with the given name are allowed to read this object. Even if this returns `NO`, the role may still be able to read it if a parent role has read access. @param name The name of the role. - @returns `YES` if the role has read access, otherwise `NO`. + @return `YES` if the role has read access, otherwise `NO`. */ - (BOOL)getReadAccessForRoleWithName:(NSString *)name; -/*! - @abstract Set whether users belonging to the role with the given name are allowed to read this object. +/** + Set whether users belonging to the role with the given name are allowed to read this object. @param allowed Whether the given role can read this object. @param name The name of the role. */ - (void)setReadAccess:(BOOL)allowed forRoleWithName:(NSString *)name; -/*! - @abstract Get whether users belonging to the role with the given name are allowed to write this object. +/** + Get whether users belonging to the role with the given name are allowed to write this object. Even if this returns `NO`, the role may still be able to write it if a parent role has write access. @param name The name of the role. - @returns `YES` if the role has read access, otherwise `NO`. + @return `YES` if the role has read access, otherwise `NO`. */ - (BOOL)getWriteAccessForRoleWithName:(NSString *)name; -/*! - @abstract Set whether users belonging to the role with the given name are allowed to write this object. +/** + Set whether users belonging to the role with the given name are allowed to write this object. @param allowed Whether the given role can write this object. @param name The name of the role. */ - (void)setWriteAccess:(BOOL)allowed forRoleWithName:(NSString *)name; -/*! - @abstract Get whether users belonging to the given role are allowed to read this object. +/** + Get whether users belonging to the given role are allowed to read this object. Even if this returns `NO`, the role may still be able to read it if a parent role has read access. - @discussion The role must already be saved on the server and + The role must already be saved on the server and it's data must have been fetched in order to use this method. @param role The name of the role. - @returns `YES` if the role has read access, otherwise `NO`. + @return `YES` if the role has read access, otherwise `NO`. */ - (BOOL)getReadAccessForRole:(PFRole *)role; -/*! - @abstract Set whether users belonging to the given role are allowed to read this object. +/** + Set whether users belonging to the given role are allowed to read this object. - @discussion The role must already be saved on the server and + The role must already be saved on the server and it's data must have been fetched in order to use this method. @param allowed Whether the given role can read this object. @@ -211,23 +198,23 @@ */ - (void)setReadAccess:(BOOL)allowed forRole:(PFRole *)role; -/*! - @abstract Get whether users belonging to the given role are allowed to write this object. +/** + Get whether users belonging to the given role are allowed to write this object. Even if this returns `NO`, the role may still be able to write it if a parent role has write access. - @discussion The role must already be saved on the server and + The role must already be saved on the server and it's data must have been fetched in order to use this method. @param role The name of the role. - @returns `YES` if the role has write access, otherwise `NO`. + @return `YES` if the role has write access, otherwise `NO`. */ - (BOOL)getWriteAccessForRole:(PFRole *)role; -/*! - @abstract Set whether users belonging to the given role are allowed to write this object. +/** + Set whether users belonging to the given role are allowed to write this object. - @discussion The role must already be saved on the server and + The role must already be saved on the server and it's data must have been fetched in order to use this method. @param allowed Whether the given role can write this object. @@ -239,17 +226,19 @@ /// @name Setting Access Defaults ///-------------------------------------- -/*! - @abstract Sets a default ACL that will be applied to all instances of when they are created. +/** + Sets a default ACL that will be applied to all instances of `PFObject` when they are created. - @param acl The ACL to use as a template for all instance of created after this method has been called. + @param acl The ACL to use as a template for all instance of `PFObject` created after this method has been called. This value will be copied and used as a template for the creation of new ACLs, so changes to the - instance after this method has been called will not be reflected in new instance of . - @param currentUserAccess - If `YES`, the `PFACL` that is applied to newly-created instance of will - provide read and write access to the <[PFUser currentUser]> at the time of creation. + instance after this method has been called will not be reflected in new instance of `PFObject`. + @param currentUserAccess - If `YES`, the `PFACL` that is applied to newly-created instance of `PFObject` will + provide read and write access to the `PFUser.+currentUser` at the time of creation. - If `NO`, the provided `acl` will be used without modification. - If `acl` is `nil`, this value is ignored. */ -+ (void)setDefaultACL:(PFACL *)acl withAccessForCurrentUser:(BOOL)currentUserAccess; ++ (void)setDefaultACL:(nullable PFACL *)acl withAccessForCurrentUser:(BOOL)currentUserAccess; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFAnalytics.h b/iOS/Parse.framework/Headers/PFAnalytics.h index 3068a62..958d8e4 100644 --- a/iOS/Parse.framework/Headers/PFAnalytics.h +++ b/iOS/Parse.framework/Headers/PFAnalytics.h @@ -1,20 +1,21 @@ -// -// PFAnalytics.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE +#import + #import -#else -#import -#endif -@class BFTask; +NS_ASSUME_NONNULL_BEGIN -/*! +/** `PFAnalytics` provides an interface to Parse's logging and analytics backend. Methods will return immediately and cache the request (+ timestamp) to be @@ -27,27 +28,27 @@ /// @name App-Open / Push Analytics ///-------------------------------------- -/*! - @abstract Tracks this application being launched. If this happened as the result of the +/** + Tracks this application being launched. If this happened as the result of the user opening a push notification, this method sends along information to correlate this open with that push. - @discussion Pass in `nil` to track a standard "application opened" event. + Pass in `nil` to track a standard "application opened" event. @param launchOptions The `NSDictionary` indicating the reason the application was launched, if any. This value can be found as a parameter to various `UIApplicationDelegate` methods, and can be empty or `nil`. - @returns Returns the task encapsulating the work being done. + @return Returns the task encapsulating the work being done. */ -+ (BFTask *)trackAppOpenedWithLaunchOptions:(NSDictionary *)launchOptions; ++ (BFTask PF_GENERIC(NSNumber *)*)trackAppOpenedWithLaunchOptions:(nullable NSDictionary *)launchOptions; -/*! - @abstract Tracks this application being launched. +/** + Tracks this application being launched. If this happened as the result of the user opening a push notification, this method sends along information to correlate this open with that push. - @discussion Pass in `nil` to track a standard "application opened" event. + Pass in `nil` to track a standard "application opened" event. @param launchOptions The dictionary indicating the reason the application was launched, if any. This value can be found as a parameter to various @@ -55,10 +56,11 @@ @param block The block to execute on server response. It should have the following argument signature: `^(BOOL succeeded, NSError *error)` */ -+ (void)trackAppOpenedWithLaunchOptionsInBackground:(NSDictionary *)launchOptions block:(PFBooleanResultBlock)block; ++ (void)trackAppOpenedWithLaunchOptionsInBackground:(nullable NSDictionary *)launchOptions + block:(nullable PFBooleanResultBlock)block; -/*! - @abstract Tracks this application being launched. If this happened as the result of the +/** + Tracks this application being launched. If this happened as the result of the user opening a push notification, this method sends along information to correlate this open with that push. @@ -67,12 +69,12 @@ or as a parameter to `application:didReceiveRemoteNotification:`. This can be empty or `nil`. - @returns Returns the task encapsulating the work being done. + @return Returns the task encapsulating the work being done. */ -+ (BFTask *)trackAppOpenedWithRemoteNotificationPayload:(NSDictionary *)userInfo; ++ (BFTask PF_GENERIC(NSNumber *)*)trackAppOpenedWithRemoteNotificationPayload:(nullable NSDictionary *)userInfo; -/*! - @abstract Tracks this application being launched. If this happened as the result of the +/** + Tracks this application being launched. If this happened as the result of the user opening a push notification, this method sends along information to correlate this open with that push. @@ -82,26 +84,26 @@ @param block The block to execute on server response. It should have the following argument signature: `^(BOOL succeeded, NSError *error)` */ -+ (void)trackAppOpenedWithRemoteNotificationPayloadInBackground:(NSDictionary *)userInfo - block:(PFBooleanResultBlock)block; ++ (void)trackAppOpenedWithRemoteNotificationPayloadInBackground:(nullable NSDictionary *)userInfo + block:(nullable PFBooleanResultBlock)block; ///-------------------------------------- /// @name Custom Analytics ///-------------------------------------- -/*! - @abstract Tracks the occurrence of a custom event. +/** + Tracks the occurrence of a custom event. - @discussion Parse will store a data point at the time of invocation with the given event name. + Parse will store a data point at the time of invocation with the given event name. @param name The name of the custom event to report to Parse as having happened. - @returns Returns the task encapsulating the work being done. + @return Returns the task encapsulating the work being done. */ -+ (BFTask *)trackEvent:(NSString *)name; ++ (BFTask PF_GENERIC(NSNumber *)*)trackEvent:(NSString *)name; -/*! - @abstract Tracks the occurrence of a custom event. Parse will store a data point at the +/** + Tracks the occurrence of a custom event. Parse will store a data point at the time of invocation with the given event name. The event will be sent at some unspecified time in the future, even if Parse is currently inaccessible. @@ -109,13 +111,13 @@ @param block The block to execute on server response. It should have the following argument signature: `^(BOOL succeeded, NSError *error)` */ -+ (void)trackEventInBackground:(NSString *)name block:(PFBooleanResultBlock)block; ++ (void)trackEventInBackground:(NSString *)name block:(nullable PFBooleanResultBlock)block; -/*! - @abstract Tracks the occurrence of a custom event with additional dimensions. Parse will +/** + Tracks the occurrence of a custom event with additional dimensions. Parse will store a data point at the time of invocation with the given event name. - @discussion Dimensions will allow segmentation of the occurrences of this custom event. + Dimensions will allow segmentation of the occurrences of this custom event. Keys and values should be NSStrings, and will throw otherwise. To track a user signup along with additional metadata, consider the following: @@ -130,12 +132,13 @@ @param name The name of the custom event to report to Parse as having happened. @param dimensions The `NSDictionary` of information by which to segment this event. - @returns Returns the task encapsulating the work being done. + @return Returns the task encapsulating the work being done. */ -+ (BFTask *)trackEvent:(NSString *)name dimensions:(NSDictionary *)dimensions; ++ (BFTask PF_GENERIC(NSNumber *)*)trackEvent:(NSString *)name + dimensions:(nullable NSDictionary PF_GENERIC(NSString *, NSString *)*)dimensions; -/*! - @abstract Tracks the occurrence of a custom event with additional dimensions. Parse will +/** + Tracks the occurrence of a custom event with additional dimensions. Parse will store a data point at the time of invocation with the given event name. The event will be sent at some unspecified time in the future, even if Parse is currently inaccessible. @@ -155,6 +158,10 @@ @param block The block to execute on server response. It should have the following argument signature: `^(BOOL succeeded, NSError *error)` */ -+ (void)trackEventInBackground:(NSString *)name dimensions:(NSDictionary *)dimensions block:(PFBooleanResultBlock)block; ++ (void)trackEventInBackground:(NSString *)name + dimensions:(nullable NSDictionary PF_GENERIC(NSString *, NSString *)*)dimensions + block:(nullable PFBooleanResultBlock)block; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFAnonymousUtils.h b/iOS/Parse.framework/Headers/PFAnonymousUtils.h index 9322281..b111eaa 100644 --- a/iOS/Parse.framework/Headers/PFAnonymousUtils.h +++ b/iOS/Parse.framework/Headers/PFAnonymousUtils.h @@ -1,20 +1,22 @@ -// -// PFAnonymousUtils.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE +#import + #import #import -#else -#import -#import -#endif -/*! +NS_ASSUME_NONNULL_BEGIN + +/** Provides utility functions for working with Anonymously logged-in users. Anonymous users have some unique characteristics: @@ -22,15 +24,15 @@ - Once logged out, an anonymous user cannot be recovered. - When the current user is anonymous, the following methods can be used to switch to a different user or convert the anonymous user into a regular one: - - signUp converts an anonymous user to a standard user with the given username and password. - Data associated with the anonymous user is retained. - - logIn switches users without converting the anonymous user. - Data associated with the anonymous user will be lost. - - Service logIn (e.g. Facebook, Twitter) will attempt to convert - the anonymous user into a standard user by linking it to the service. - If a user already exists that is linked to the service, it will instead switch to the existing user. - - Service linking (e.g. Facebook, Twitter) will convert the anonymous user - into a standard user by linking it to the service. + - signUp converts an anonymous user to a standard user with the given username and password. + Data associated with the anonymous user is retained. + - logIn switches users without converting the anonymous user. + Data associated with the anonymous user will be lost. + - Service logIn (e.g. Facebook, Twitter) will attempt to convert + the anonymous user into a standard user by linking it to the service. + If a user already exists that is linked to the service, it will instead switch to the existing user. + - Service linking (e.g. Facebook, Twitter) will convert the anonymous user + into a standard user by linking it to the service. */ @interface PFAnonymousUtils : NSObject @@ -38,41 +40,43 @@ /// @name Creating an Anonymous User ///-------------------------------------- -/*! - @abstract Creates an anonymous user asynchronously and sets as a result to `BFTask`. +/** + Creates an anonymous user asynchronously and sets as a result to `BFTask`. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)logInInBackground; ++ (BFTask PF_GENERIC(PFUser *)*)logInInBackground; -/*! - @abstract Creates an anonymous user. +/** + Creates an anonymous user. @param block The block to execute when anonymous user creation is complete. It should have the following argument signature: `^(PFUser *user, NSError *error)`. */ -+ (void)logInWithBlock:(PFUserResultBlock)block; ++ (void)logInWithBlock:(nullable PFUserResultBlock)block; -/*! - @abstract Creates an anonymous user. +/* + Creates an anonymous user. @param target Target object for the selector. @param selector The selector that will be called when the asynchronous request is complete. It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. */ -+ (void)logInWithTarget:(id)target selector:(SEL)selector; ++ (void)logInWithTarget:(nullable id)target selector:(nullable SEL)selector; ///-------------------------------------- /// @name Determining Whether a User is Anonymous ///-------------------------------------- -/*! - @abstract Whether the object is logged in anonymously. +/** + Whether the `PFUser` object is logged in anonymously. - @param user object to check for anonymity. The user must be logged in on this device. + @param user `PFUser` object to check for anonymity. The user must be logged in on this device. - @returns `YES` if the user is anonymous. `NO` if the user is not the current user or is not anonymous. + @return `YES` if the user is anonymous. `NO` if the user is not the current user or is not anonymous. */ -+ (BOOL)isLinkedWithUser:(PFUser *)user; ++ (BOOL)isLinkedWithUser:(nullable PFUser *)user; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFCloud.h b/iOS/Parse.framework/Headers/PFCloud.h index fab56ac..c0bd9ee 100644 --- a/iOS/Parse.framework/Headers/PFCloud.h +++ b/iOS/Parse.framework/Headers/PFCloud.h @@ -1,59 +1,63 @@ -// -// PFCloud.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE +#import + #import -#else -#import -#endif -@class BFTask; +NS_ASSUME_NONNULL_BEGIN -/*! +/** The `PFCloud` class provides methods for interacting with Parse Cloud Functions. */ @interface PFCloud : NSObject -/*! - @abstract Calls the given cloud function *synchronously* with the parameters provided. +/** + Calls the given cloud function *synchronously* with the parameters provided. @param function The function name to call. @param parameters The parameters to send to the function. - @returns The response from the cloud function. + @return The response from the cloud function. */ -+ (id)callFunction:(NSString *)function withParameters:(NSDictionary *)parameters; ++ (nullable id)callFunction:(NSString *)function withParameters:(nullable NSDictionary *)parameters PF_SWIFT_UNAVAILABLE; -/*! - @abstract Calls the given cloud function *synchronously* with the parameters provided and +/** + Calls the given cloud function *synchronously* with the parameters provided and sets the error if there is one. @param function The function name to call. @param parameters The parameters to send to the function. @param error Pointer to an `NSError` that will be set if necessary. - @returns The response from the cloud function. + @return The response from the cloud function. This result could be a `NSDictionary`, an `NSArray`, `NSNumber` or `NSString`. */ -+ (id)callFunction:(NSString *)function withParameters:(NSDictionary *)parameters error:(NSError **)error; ++ (nullable id)callFunction:(NSString *)function + withParameters:(nullable NSDictionary *)parameters + error:(NSError **)error; -/*! - @abstract Calls the given cloud function *asynchronously* with the parameters provided. +/** + Calls the given cloud function *asynchronously* with the parameters provided. @param function The function name to call. @param parameters The parameters to send to the function. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)callFunctionInBackground:(NSString *)function withParameters:(NSDictionary *)parameters; ++ (BFTask PF_GENERIC(id) *)callFunctionInBackground:(NSString *)function + withParameters:(nullable NSDictionary *)parameters; -/*! - @abstract Calls the given cloud function *asynchronously* with the parameters provided +/** + Calls the given cloud function *asynchronously* with the parameters provided and executes the given block when it is done. @param function The function name to call. @@ -62,11 +66,11 @@ It should have the following argument signature: `^(id result, NSError *error)`. */ + (void)callFunctionInBackground:(NSString *)function - withParameters:(NSDictionary *)parameters - block:(PFIdResultBlock)block; + withParameters:(nullable NSDictionary *)parameters + block:(nullable PFIdResultBlock)block; -/*! - @abstract Calls the given cloud function *asynchronously* with the parameters provided +/* + Calls the given cloud function *asynchronously* with the parameters provided and then executes the given selector when it is done. @param function The function name to call. @@ -77,8 +81,10 @@ Result will be `nil` if error is set and vice versa. */ + (void)callFunctionInBackground:(NSString *)function - withParameters:(NSDictionary *)parameters - target:(id)target - selector:(SEL)selector; + withParameters:(nullable NSDictionary *)parameters + target:(nullable id)target + selector:(nullable SEL)selector; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFConfig.h b/iOS/Parse.framework/Headers/PFConfig.h index c7b89cf..c542a9f 100644 --- a/iOS/Parse.framework/Headers/PFConfig.h +++ b/iOS/Parse.framework/Headers/PFConfig.h @@ -1,32 +1,40 @@ -// -// PFConfig.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -@class BFTask; +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + @class PFConfig; -typedef void(^PFConfigResultBlock)(PFConfig *config, NSError *error); +typedef void(^PFConfigResultBlock)(PFConfig *__nullable config, NSError *__nullable error); -/*! +/** `PFConfig` is a representation of the remote configuration object. It enables you to add things like feature gating, a/b testing or simple "Message of the day". -*/ + */ @interface PFConfig : NSObject ///-------------------------------------- /// @name Current Config ///-------------------------------------- -/*! - @abstract Returns the most recently fetched config. +/** + Returns the most recently fetched config. - @discussion If there was no config fetched - this method will return an empty instance of `PFConfig`. + If there was no config fetched - this method will return an empty instance of `PFConfig`. - @returns Current, last fetched instance of PFConfig. + @return Current, last fetched instance of PFConfig. */ + (PFConfig *)currentConfig; @@ -34,54 +42,54 @@ typedef void(^PFConfigResultBlock)(PFConfig *config, NSError *error); /// @name Retrieving Config ///-------------------------------------- -/*! - @abstract Gets the `PFConfig` object *synchronously* from the server. +/** + Gets the `PFConfig` object *synchronously* from the server. - @returns Instance of `PFConfig` if the operation succeeded, otherwise `nil`. + @return Instance of `PFConfig` if the operation succeeded, otherwise `nil`. */ -+ (PFConfig *)getConfig; ++ (nullable PFConfig *)getConfig PF_SWIFT_UNAVAILABLE; -/*! - @abstract Gets the `PFConfig` object *synchronously* from the server and sets an error if it occurs. +/** + Gets the `PFConfig` object *synchronously* from the server and sets an error if it occurs. @param error Pointer to an `NSError` that will be set if necessary. @return Instance of PFConfig if the operation succeeded, otherwise `nil`. */ -+ (PFConfig *)getConfig:(NSError **)error; ++ (nullable PFConfig *)getConfig:(NSError **)error; -/*! - @abstract Gets the `PFConfig` *asynchronously* and sets it as a result of a task. +/** + Gets the `PFConfig` *asynchronously* and sets it as a result of a task. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)getConfigInBackground; ++ (BFTask PF_GENERIC(PFConfig *)*)getConfigInBackground; -/*! - @abstract Gets the `PFConfig` *asynchronously* and executes the given callback block. +/** + Gets the `PFConfig` *asynchronously* and executes the given callback block. @param block The block to execute. It should have the following argument signature: `^(PFConfig *config, NSError *error)`. */ -+ (void)getConfigInBackgroundWithBlock:(PFConfigResultBlock)block; ++ (void)getConfigInBackgroundWithBlock:(nullable PFConfigResultBlock)block; ///-------------------------------------- /// @name Parameters ///-------------------------------------- -/*! - @abstract Returns the object associated with a given key. +/** + Returns the object associated with a given key. @param key The key for which to return the corresponding configuration value. @return The value associated with `key`, or `nil` if there is no such value. */ -- (id)objectForKey:(NSString *)key; +- (nullable id)objectForKey:(NSString *)key; -/*! - @abstract Returns the object associated with a given key. +/** + Returns the object associated with a given key. - @discussion This method enables usage of literal syntax on `PFConfig`. + This method enables usage of literal syntax on `PFConfig`. E.g. `NSString *value = config[@"key"];` @see objectForKey: @@ -90,6 +98,8 @@ typedef void(^PFConfigResultBlock)(PFConfig *config, NSError *error); @return The value associated with `key`, or `nil` if there is no such value. */ -- (id)objectForKeyedSubscript:(NSString *)keyedSubscript; +- (nullable id)objectForKeyedSubscript:(NSString *)keyedSubscript; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFConstants.h b/iOS/Parse.framework/Headers/PFConstants.h index 92472fc..ed2c7b0 100644 --- a/iOS/Parse.framework/Headers/PFConstants.h +++ b/iOS/Parse.framework/Headers/PFConstants.h @@ -1,177 +1,557 @@ -// PFConstants.h -// Copyright 2011 Parse, Inc. All rights reserved. +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import @class PFObject; @class PFUser; -// Version -#define PARSE_VERSION @"1.6.0" +///-------------------------------------- +/// @name Version +///-------------------------------------- + +#define PARSE_VERSION @"1.11.0" extern NSInteger const PARSE_API_VERSION; -// Platform +///-------------------------------------- +/// @name Platform +///-------------------------------------- + #define PARSE_IOS_ONLY (TARGET_OS_IPHONE) #define PARSE_OSX_ONLY (TARGET_OS_MAC && !(TARGET_OS_IPHONE)) -extern NSString *const kPFDeviceType; +extern NSString *const __nonnull kPFDeviceType; -#if PARSE_IOS_ONLY -#import -#else -#import -@compatibility_alias UIImage NSImage; -@compatibility_alias UIColor NSColor; -@compatibility_alias UIView NSView; -#endif +///-------------------------------------- +/// @name Server +///-------------------------------------- + +extern NSString *const __nonnull kPFParseServer; + +///-------------------------------------- +/// @name Cache Policies +///-------------------------------------- + +/** + `PFCachePolicy` specifies different caching policies that could be used with `PFQuery`. + + This lets you show data when the user's device is offline, + or when the app has just started and network requests have not yet had time to complete. + Parse takes care of automatically flushing the cache when it takes up too much space. -// Server -extern NSString *const kPFParseServer; + @warning Cache policy could only be set when Local Datastore is not enabled. -// Cache policies -typedef enum { + @see PFQuery + */ +typedef NS_ENUM(uint8_t, PFCachePolicy) { + /** + The query does not load from the cache or save results to the cache. + This is the default cache policy. + */ kPFCachePolicyIgnoreCache = 0, + /** + The query only loads from the cache, ignoring the network. + If there are no cached results, this causes a `NSError` with `kPFErrorCacheMiss` code. + */ kPFCachePolicyCacheOnly, + /** + The query does not load from the cache, but it will save results to the cache. + */ kPFCachePolicyNetworkOnly, + /** + The query first tries to load from the cache, but if that fails, it loads results from the network. + If there are no cached results, this causes a `NSError` with `kPFErrorCacheMiss` code. + */ kPFCachePolicyCacheElseNetwork, + /** + The query first tries to load from the network, but if that fails, it loads results from the cache. + If there are no cached results, this causes a `NSError` with `kPFErrorCacheMiss` code. + */ kPFCachePolicyNetworkElseCache, + /** + The query first loads from the cache, then loads from the network. + The callback will be called twice - first with the cached results, then with the network results. + Since it returns two results at different times, this cache policy cannot be used with synchronous or task methods. + */ kPFCachePolicyCacheThenNetwork -} PFCachePolicy; - -// Errors - -extern NSString *const PFParseErrorDomain; - -/*! @abstract 1: Internal server error. No information available. */ -extern NSInteger const kPFErrorInternalServer; - -/*! @abstract 100: The connection to the Parse servers failed. */ -extern NSInteger const kPFErrorConnectionFailed; -/*! @abstract 101: Object doesn't exist, or has an incorrect password. */ -extern NSInteger const kPFErrorObjectNotFound; -/*! @abstract 102: You tried to find values matching a datatype that doesn't support exact database matching, like an array or a dictionary. */ -extern NSInteger const kPFErrorInvalidQuery; -/*! @abstract 103: Missing or invalid classname. Classnames are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters. */ -extern NSInteger const kPFErrorInvalidClassName; -/*! @abstract 104: Missing object id. */ -extern NSInteger const kPFErrorMissingObjectId; -/*! @abstract 105: Invalid key name. Keys are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters. */ -extern NSInteger const kPFErrorInvalidKeyName; -/*! @abstract 106: Malformed pointer. Pointers must be arrays of a classname and an object id. */ -extern NSInteger const kPFErrorInvalidPointer; -/*! @abstract 107: Malformed json object. A json dictionary is expected. */ -extern NSInteger const kPFErrorInvalidJSON; -/*! @abstract 108: Tried to access a feature only available internally. */ -extern NSInteger const kPFErrorCommandUnavailable; -/*! @abstract 111: Field set to incorrect type. */ -extern NSInteger const kPFErrorIncorrectType; -/*! @abstract 112: Invalid channel name. A channel name is either an empty string (the broadcast channel) or contains only a-zA-Z0-9_ characters and starts with a letter. */ -extern NSInteger const kPFErrorInvalidChannelName; -/*! @abstract 114: Invalid device token. */ -extern NSInteger const kPFErrorInvalidDeviceToken; -/*! @abstract 115: Push is misconfigured. See details to find out how. */ -extern NSInteger const kPFErrorPushMisconfigured; -/*! @abstract 116: The object is too large. */ -extern NSInteger const kPFErrorObjectTooLarge; -/*! @abstract 119: That operation isn't allowed for clients. */ -extern NSInteger const kPFErrorOperationForbidden; -/*! @abstract 120: The results were not found in the cache. */ -extern NSInteger const kPFErrorCacheMiss; -/*! @abstract 121: Keys in NSDictionary values may not include '$' or '.'. */ -extern NSInteger const kPFErrorInvalidNestedKey; -/*! @abstract 122: Invalid file name. A file name contains only a-zA-Z0-9_. characters and is between 1 and 36 characters. */ -extern NSInteger const kPFErrorInvalidFileName; -/*! @abstract 123: Invalid ACL. An ACL with an invalid format was saved. This should not happen if you use PFACL. */ -extern NSInteger const kPFErrorInvalidACL; -/*! @abstract 124: The request timed out on the server. Typically this indicates the request is too expensive. */ -extern NSInteger const kPFErrorTimeout; -/*! @abstract 125: The email address was invalid. */ -extern NSInteger const kPFErrorInvalidEmailAddress; -/*! @abstract 137: A unique field was given a value that is already taken. */ -extern NSInteger const kPFErrorDuplicateValue; -/*! @abstract 139: Role's name is invalid. */ -extern NSInteger const kPFErrorInvalidRoleName; -/*! @abstract 140: Exceeded an application quota. Upgrade to resolve. */ -extern NSInteger const kPFErrorExceededQuota; -/*! @abstract 141: Cloud Code script had an error. */ -extern NSInteger const kPFScriptError; -/*! @abstract 142: Cloud Code validation failed. */ -extern NSInteger const kPFValidationError; -/*! @abstract 143: Product purchase receipt is missing */ -extern NSInteger const kPFErrorReceiptMissing; -/*! @abstract 144: Product purchase receipt is invalid */ -extern NSInteger const kPFErrorInvalidPurchaseReceipt; -/*! @abstract 145: Payment is disabled on this device */ -extern NSInteger const kPFErrorPaymentDisabled; -/*! @abstract 146: The product identifier is invalid */ -extern NSInteger const kPFErrorInvalidProductIdentifier; -/*! @abstract 147: The product is not found in the App Store */ -extern NSInteger const kPFErrorProductNotFoundInAppStore; -/*! @abstract 148: The Apple server response is not valid */ -extern NSInteger const kPFErrorInvalidServerResponse; -/*! @abstract 149: Product fails to download due to file system error */ -extern NSInteger const kPFErrorProductDownloadFileSystemFailure; -/*! @abstract 150: Fail to convert data to image. */ -extern NSInteger const kPFErrorInvalidImageData; -/*! @abstract 151: Unsaved file. */ -extern NSInteger const kPFErrorUnsavedFile; -/*! @abstract 153: Fail to delete file. */ -extern NSInteger const kPFErrorFileDeleteFailure; -/*! @abstract 160: Invalid event name. */ -extern NSInteger const kPFErrorInvalidEventName; -/*! @abstract 200: Username is missing or empty */ -extern NSInteger const kPFErrorUsernameMissing; -/*! @abstract 201: Password is missing or empty */ -extern NSInteger const kPFErrorUserPasswordMissing; -/*! @abstract 202: Username has already been taken */ -extern NSInteger const kPFErrorUsernameTaken; -/*! @abstract 203: Email has already been taken */ -extern NSInteger const kPFErrorUserEmailTaken; -/*! @abstract 204: The email is missing, and must be specified */ -extern NSInteger const kPFErrorUserEmailMissing; -/*! @abstract 205: A user with the specified email was not found */ -extern NSInteger const kPFErrorUserWithEmailNotFound; -/*! @abstract 206: The user cannot be altered by a client without the session. */ -extern NSInteger const kPFErrorUserCannotBeAlteredWithoutSession; -/*! @abstract 207: Users can only be created through sign up */ -extern NSInteger const kPFErrorUserCanOnlyBeCreatedThroughSignUp; -/*! @abstract 208: An existing Facebook account already linked to another user. */ -extern NSInteger const kPFErrorFacebookAccountAlreadyLinked; -/*! @abstract 208: An existing account already linked to another user. */ -extern NSInteger const kPFErrorAccountAlreadyLinked; -/*! @abstract 209: User ID mismatch */ -extern NSInteger const kPFErrorUserIdMismatch; -/*! @abstract 250: Facebook id missing from request */ -extern NSInteger const kPFErrorFacebookIdMissing; -/*! @abstract 250: Linked id missing from request */ -extern NSInteger const kPFErrorLinkedIdMissing; -/*! @abstract 251: Invalid Facebook session */ -extern NSInteger const kPFErrorFacebookInvalidSession; -/*! @abstract 251: Invalid linked session */ -extern NSInteger const kPFErrorInvalidLinkedSession; - -typedef void (^PFBooleanResultBlock)(BOOL succeeded, NSError *error); -typedef void (^PFIntegerResultBlock)(int number, NSError *error); -typedef void (^PFArrayResultBlock)(NSArray *objects, NSError *error); -typedef void (^PFObjectResultBlock)(PFObject *object, NSError *error); -typedef void (^PFSetResultBlock)(NSSet *channels, NSError *error); -typedef void (^PFUserResultBlock)(PFUser *user, NSError *error); -typedef void (^PFDataResultBlock)(NSData *data, NSError *error); -typedef void (^PFDataStreamResultBlock)(NSInputStream *stream, NSError *error); -typedef void (^PFStringResultBlock)(NSString *string, NSError *error); -typedef void (^PFIdResultBlock)(id object, NSError *error); +}; + +///-------------------------------------- +/// @name Logging Levels +///-------------------------------------- + +/** + `PFLogLevel` enum specifies different levels of logging that could be used to limit or display more messages in logs. + + @see `Parse.+setLogLevel:` + @see `Parse.+logLevel` + */ +typedef NS_ENUM(uint8_t, PFLogLevel) { + /** + Log level that disables all logging. + */ + PFLogLevelNone = 0, + /** + Log level that if set is going to output error messages to the log. + */ + PFLogLevelError = 1, + /** + Log level that if set is going to output the following messages to log: + - Errors + - Warnings + */ + PFLogLevelWarning = 2, + /** + Log level that if set is going to output the following messages to log: + - Errors + - Warnings + - Informational messages + */ + PFLogLevelInfo = 3, + /** + Log level that if set is going to output the following messages to log: + - Errors + - Warnings + - Informational messages + - Debug messages + */ + PFLogLevelDebug = 4 +}; + +///-------------------------------------- +/// @name Errors +///-------------------------------------- + +extern NSString *const __nonnull PFParseErrorDomain; + +/** + `PFErrorCode` enum contains all custom error codes that are used as `code` for `NSError` for callbacks on all classes. + + These codes are used when `domain` of `NSError` that you receive is set to `PFParseErrorDomain`. + */ +typedef NS_ENUM(NSInteger, PFErrorCode) { + /** + Internal server error. No information available. + */ + kPFErrorInternalServer = 1, + /** + The connection to the Parse servers failed. + */ + kPFErrorConnectionFailed = 100, + /** + Object doesn't exist, or has an incorrect password. + */ + kPFErrorObjectNotFound = 101, + /** + You tried to find values matching a datatype that doesn't + support exact database matching, like an array or a dictionary. + */ + kPFErrorInvalidQuery = 102, + /** + Missing or invalid classname. Classnames are case-sensitive. + They must start with a letter, and `a-zA-Z0-9_` are the only valid characters. + */ + kPFErrorInvalidClassName = 103, + /** + Missing object id. + */ + kPFErrorMissingObjectId = 104, + /** + Invalid key name. Keys are case-sensitive. + They must start with a letter, and `a-zA-Z0-9_` are the only valid characters. + */ + kPFErrorInvalidKeyName = 105, + /** + Malformed pointer. Pointers must be arrays of a classname and an object id. + */ + kPFErrorInvalidPointer = 106, + /** + Malformed json object. A json dictionary is expected. + */ + kPFErrorInvalidJSON = 107, + /** + Tried to access a feature only available internally. + */ + kPFErrorCommandUnavailable = 108, + /** + Field set to incorrect type. + */ + kPFErrorIncorrectType = 111, + /** + Invalid channel name. A channel name is either an empty string (the broadcast channel) + or contains only `a-zA-Z0-9_` characters and starts with a letter. + */ + kPFErrorInvalidChannelName = 112, + /** + Invalid device token. + */ + kPFErrorInvalidDeviceToken = 114, + /** + Push is misconfigured. See details to find out how. + */ + kPFErrorPushMisconfigured = 115, + /** + The object is too large. + */ + kPFErrorObjectTooLarge = 116, + /** + That operation isn't allowed for clients. + */ + kPFErrorOperationForbidden = 119, + /** + The results were not found in the cache. + */ + kPFErrorCacheMiss = 120, + /** + Keys in `NSDictionary` values may not include `$` or `.`. + */ + kPFErrorInvalidNestedKey = 121, + /** + Invalid file name. + A file name can contain only `a-zA-Z0-9_.` characters and should be between 1 and 36 characters. + */ + kPFErrorInvalidFileName = 122, + /** + Invalid ACL. An ACL with an invalid format was saved. This should not happen if you use `PFACL`. + */ + kPFErrorInvalidACL = 123, + /** + The request timed out on the server. Typically this indicates the request is too expensive. + */ + kPFErrorTimeout = 124, + /** + The email address was invalid. + */ + kPFErrorInvalidEmailAddress = 125, + /** + A unique field was given a value that is already taken. + */ + kPFErrorDuplicateValue = 137, + /** + Role's name is invalid. + */ + kPFErrorInvalidRoleName = 139, + /** + Exceeded an application quota. Upgrade to resolve. + */ + kPFErrorExceededQuota = 140, + /** + Cloud Code script had an error. + */ + kPFScriptError = 141, + /** + Cloud Code validation failed. + */ + kPFValidationError = 142, + /** + Product purchase receipt is missing. + */ + kPFErrorReceiptMissing = 143, + /** + Product purchase receipt is invalid. + */ + kPFErrorInvalidPurchaseReceipt = 144, + /** + Payment is disabled on this device. + */ + kPFErrorPaymentDisabled = 145, + /** + The product identifier is invalid. + */ + kPFErrorInvalidProductIdentifier = 146, + /** + The product is not found in the App Store. + */ + kPFErrorProductNotFoundInAppStore = 147, + /** + The Apple server response is not valid. + */ + kPFErrorInvalidServerResponse = 148, + /** + Product fails to download due to file system error. + */ + kPFErrorProductDownloadFileSystemFailure = 149, + /** + Fail to convert data to image. + */ + kPFErrorInvalidImageData = 150, + /** + Unsaved file. + */ + kPFErrorUnsavedFile = 151, + /** + Fail to delete file. + */ + kPFErrorFileDeleteFailure = 153, + /** + Application has exceeded its request limit. + */ + kPFErrorRequestLimitExceeded = 155, + /** + Invalid event name. + */ + kPFErrorInvalidEventName = 160, + /** + Username is missing or empty. + */ + kPFErrorUsernameMissing = 200, + /** + Password is missing or empty. + */ + kPFErrorUserPasswordMissing = 201, + /** + Username has already been taken. + */ + kPFErrorUsernameTaken = 202, + /** + Email has already been taken. + */ + kPFErrorUserEmailTaken = 203, + /** + The email is missing, and must be specified. + */ + kPFErrorUserEmailMissing = 204, + /** + A user with the specified email was not found. + */ + kPFErrorUserWithEmailNotFound = 205, + /** + The user cannot be altered by a client without the session. + */ + kPFErrorUserCannotBeAlteredWithoutSession = 206, + /** + Users can only be created through sign up. + */ + kPFErrorUserCanOnlyBeCreatedThroughSignUp = 207, + /** + An existing Facebook account already linked to another user. + */ + kPFErrorFacebookAccountAlreadyLinked = 208, + /** + An existing account already linked to another user. + */ + kPFErrorAccountAlreadyLinked = 208, + /** + Error code indicating that the current session token is invalid. + */ + kPFErrorInvalidSessionToken = 209, + kPFErrorUserIdMismatch = 209, + /** + Facebook id missing from request. + */ + kPFErrorFacebookIdMissing = 250, + /** + Linked id missing from request. + */ + kPFErrorLinkedIdMissing = 250, + /** + Invalid Facebook session. + */ + kPFErrorFacebookInvalidSession = 251, + /** + Invalid linked session. + */ + kPFErrorInvalidLinkedSession = 251, +}; + +///-------------------------------------- +/// @name Blocks +///-------------------------------------- + +typedef void (^PFBooleanResultBlock)(BOOL succeeded, NSError *__nullable error); +typedef void (^PFIntegerResultBlock)(int number, NSError *__nullable error); +typedef void (^PFArrayResultBlock)(NSArray *__nullable objects, NSError *__nullable error); +typedef void (^PFObjectResultBlock)(PFObject *__nullable object, NSError *__nullable error); +typedef void (^PFSetResultBlock)(NSSet *__nullable channels, NSError *__nullable error); +typedef void (^PFUserResultBlock)(PFUser *__nullable user, NSError *__nullable error); +typedef void (^PFDataResultBlock)(NSData *__nullable data, NSError *__nullable error); +typedef void (^PFDataStreamResultBlock)(NSInputStream *__nullable stream, NSError *__nullable error); +typedef void (^PFFilePathResultBlock)(NSString *__nullable filePath, NSError *__nullable error); +typedef void (^PFStringResultBlock)(NSString *__nullable string, NSError *__nullable error); +typedef void (^PFIdResultBlock)(__nullable id object, NSError *__nullable error); typedef void (^PFProgressBlock)(int percentDone); -// Deprecated Macro +///-------------------------------------- +/// @name Network Notifications +///-------------------------------------- + +/** + The name of the notification that is going to be sent before any URL request is sent. + */ +extern NSString *const __nonnull PFNetworkWillSendURLRequestNotification; + +/** + The name of the notification that is going to be sent after any URL response is received. + */ +extern NSString *const __nonnull PFNetworkDidReceiveURLResponseNotification; + +/** + The key of request(NSURLRequest) in the userInfo dictionary of a notification. + @note This key is populated in userInfo, only if `PFLogLevel` on `Parse` is set to `PFLogLevelDebug`. + */ +extern NSString *const __nonnull PFNetworkNotificationURLRequestUserInfoKey; + +/** + The key of response(NSHTTPURLResponse) in the userInfo dictionary of a notification. + @note This key is populated in userInfo, only if `PFLogLevel` on `Parse` is set to `PFLogLevelDebug`. + */ +extern NSString *const __nonnull PFNetworkNotificationURLResponseUserInfoKey; + +/** + The key of repsonse body (usually `NSString` with JSON) in the userInfo dictionary of a notification. + @note This key is populated in userInfo, only if `PFLogLevel` on `Parse` is set to `PFLogLevelDebug`. + */ +extern NSString *const __nonnull PFNetworkNotificationURLResponseBodyUserInfoKey; + + +///-------------------------------------- +/// @name Deprecated Macros +///-------------------------------------- + #ifndef PARSE_DEPRECATED -#ifdef __deprecated_msg -#define PARSE_DEPRECATED(_MSG) __deprecated_msg(_MSG) -#else -#ifdef __deprecated -#define PARSE_DEPRECATED(_MSG) __attribute__((deprecated)) +# ifdef __deprecated_msg +# define PARSE_DEPRECATED(_MSG) __deprecated_msg(_MSG) +# else +# ifdef __deprecated +# define PARSE_DEPRECATED(_MSG) __attribute__((deprecated)) +# else +# define PARSE_DEPRECATED(_MSG) +# endif +# endif +#endif + +///-------------------------------------- +/// @name Extensions Macros +///-------------------------------------- + +#ifndef PF_EXTENSION_UNAVAILABLE +# if PARSE_IOS_ONLY +# ifdef NS_EXTENSION_UNAVAILABLE_IOS +# define PF_EXTENSION_UNAVAILABLE(_msg) NS_EXTENSION_UNAVAILABLE_IOS(_msg) +# else +# define PF_EXTENSION_UNAVAILABLE(_msg) +# endif +# else +# ifdef NS_EXTENSION_UNAVAILABLE_MAC +# define PF_EXTENSION_UNAVAILABLE(_msg) NS_EXTENSION_UNAVAILABLE_MAC(_msg) +# else +# define PF_EXTENSION_UNAVAILABLE(_msg) +# endif +# endif +#endif + +///-------------------------------------- +/// @name Swift Macros +///-------------------------------------- + +#ifndef PF_SWIFT_UNAVAILABLE +# ifdef NS_SWIFT_UNAVAILABLE +# define PF_SWIFT_UNAVAILABLE NS_SWIFT_UNAVAILABLE("") +# else +# define PF_SWIFT_UNAVAILABLE +# endif +#endif + +///-------------------------------------- +/// @name Obj-C Generics Macros +///-------------------------------------- + +#if __has_feature(objc_generics) || __has_extension(objc_generics) +# define PF_GENERIC(...) <__VA_ARGS__> #else -#define PARSE_DEPRECATED(_MSG) +# define PF_GENERIC(...) +# define PFGenericObject PFObject * +#endif + +///-------------------------------------- +/// @name Platform Availability Defines +///-------------------------------------- + +#ifndef TARGET_OS_IOS +# define TARGET_OS_IOS TARGET_OS_IPHONE +#endif +#ifndef TARGET_OS_WATCH +# define TARGET_OS_WATCH 0 +#endif +#ifndef TARGET_OS_TV +# define TARGET_OS_TV 0 +#endif + +#ifndef PF_TARGET_OS_OSX +# define PF_TARGET_OS_OSX TARGET_OS_MAC && !TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV +#endif + +///-------------------------------------- +/// @name Avaiability Macros +///-------------------------------------- + +#ifndef PF_IOS_UNAVAILABLE +# ifdef __IOS_UNAVILABLE +# define PF_IOS_UNAVAILABLE __IOS_UNAVAILABLE +# else +# define PF_IOS_UNAVAILABLE +# endif +#endif + +#ifndef PF_IOS_UNAVAILABLE_WARNING +# if TARGET_OS_IOS +# define PF_IOS_UNAVAILABLE_WARNING _Pragma("GCC warning \"This file is unavailable on iOS.\"") +# else +# define PF_IOS_UNAVAILABLE_WARNING +# endif +#endif + +#ifndef PF_OSX_UNAVAILABLE +# if PF_TARGET_OS_OSX +# define PF_OSX_UNAVAILABLE __OSX_UNAVAILABLE +# else +# define PF_OSX_UNAVAILABLE +# endif +#endif + +#ifndef PF_OSX_UNAVAILABLE_WARNING +# if PF_TARGET_OS_OSX +# define PF_OSX_UNAVAILABLE_WARNING _Pragma("GCC warning \"This file is unavailable on OS X.\"") +# else +# define PF_OSX_UNAVAILABLE_WARNING +# endif +#endif + +#ifndef PF_WATCH_UNAVAILABLE +# ifdef __WATCHOS_UNAVAILABLE +# define PF_WATCH_UNAVAILABLE __WATCHOS_UNAVAILABLE +# else +# define PF_WATCH_UNAVAILABLE +# endif #endif + +#ifndef PF_WATCH_UNAVAILABLE_WARNING +# if TARGET_OS_WATCH +# define PF_WATCH_UNAVAILABLE_WARNING _Pragma("GCC warning \"This file is unavailable on watchOS.\"") +# else +# define PF_WATCH_UNAVAILABLE_WARNING +# endif #endif + +#ifndef PF_TV_UNAVAILABLE +# ifdef __TVOS_PROHIBITED +# define PF_TV_UNAVAILABLE __TVOS_PROHIBITED +# else +# define PF_TV_UNAVAILABLE +# endif +#endif + +#ifndef PF_TV_UNAVAILABLE_WARNING +# if TARGET_OS_TV +# define PF_TV_UNAVAILABLE_WARNING _Pragma("GCC warning \"This file is unavailable on tvOS.\"") +# else +# define PF_TV_UNAVAILABLE_WARNING +# endif #endif diff --git a/iOS/Parse.framework/Headers/PFFile.h b/iOS/Parse.framework/Headers/PFFile.h index 2e3b06d..0c99491 100644 --- a/iOS/Parse.framework/Headers/PFFile.h +++ b/iOS/Parse.framework/Headers/PFFile.h @@ -1,20 +1,21 @@ -// -// PFFile.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE +#import + #import -#else -#import -#endif -@class BFTask; +NS_ASSUME_NONNULL_BEGIN -/*! +/** `PFFile` representes a file of binary data stored on the Parse servers. This can be a image, video, or anything else that an application needs to reference in a non-relational way. */ @@ -24,130 +25,185 @@ /// @name Creating a PFFile ///-------------------------------------- -/*! - @abstract Creates a file with given data. A name will be assigned to it by the server. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + Creates a file with given data. A name will be assigned to it by the server. @param data The contents of the new `PFFile`. - @returns A new `PFFile`. + @return A new `PFFile`. */ -+ (instancetype)fileWithData:(NSData *)data; ++ (nullable instancetype)fileWithData:(NSData *)data; -/*! - @abstract Creates a file with given data and name. +/** + Creates a file with given data and name. @param name The name of the new PFFile. The file name must begin with and alphanumeric character, and consist of alphanumeric characters, periods, spaces, underscores, or dashes. @param data The contents of the new `PFFile`. - @returns A new `PFFile` object. + @return A new `PFFile` object. */ -+ (instancetype)fileWithName:(NSString *)name data:(NSData *)data; ++ (nullable instancetype)fileWithName:(nullable NSString *)name data:(NSData *)data; -/*! - @abstract Creates a file with the contents of another file. +/** + Creates a file with the contents of another file. - @param name The name of the new `PFFile`. The file name must begin with and - alphanumeric character, and consist of alphanumeric characters, periods, - spaces, underscores, or dashes. - @param path The path to the file that will be uploaded to Parse. + @warning This method raises an exception if the file at path is not accessible + or if there is not enough disk space left. + + @param name The name of the new `PFFile`. The file name must begin with and alphanumeric character, + and consist of alphanumeric characters, periods, spaces, underscores, or dashes. + @param path The path to the file that will be uploaded to Parse. + + @return A new `PFFile` instance. */ -+ (instancetype)fileWithName:(NSString *)name - contentsAtPath:(NSString *)path; ++ (nullable instancetype)fileWithName:(nullable NSString *)name + contentsAtPath:(NSString *)path PF_SWIFT_UNAVAILABLE; -/*! - @abstract Creates a file with given data, name and content type. +/** + Creates a file with the contents of another file. - @param name The name of the new `PFFile`. The file name must begin with and - alphanumeric character, and consist of alphanumeric characters, periods, - spaces, underscores, or dashes. - @param data The contents of the new `PFFile`. + @param name The name of the new `PFFile`. The file name must begin with and alphanumeric character, + and consist of alphanumeric characters, periods, spaces, underscores, or dashes. + @param path The path to the file that will be uploaded to Parse. + @param error On input, a pointer to an error object. + If an error occurs, this pointer is set to an actual error object containing the error information. + You may specify `nil` for this parameter if you do not want the error information. + + @return A new `PFFile` instance or `nil` if the error occured. + */ ++ (nullable instancetype)fileWithName:(nullable NSString *)name + contentsAtPath:(NSString *)path + error:(NSError **)error; + +/** + Creates a file with given data, name and content type. + + @warning This method raises an exception if the data supplied is not accessible or could not be saved. + + @param name The name of the new `PFFile`. The file name must begin with and alphanumeric character, + and consist of alphanumeric characters, periods, spaces, underscores, or dashes. + @param data The contents of the new `PFFile`. + @param contentType Represents MIME type of the data. + + @return A new `PFFile` instance. + */ ++ (nullable instancetype)fileWithName:(nullable NSString *)name + data:(NSData *)data + contentType:(nullable NSString *)contentType PF_SWIFT_UNAVAILABLE; + +/** + Creates a file with given data, name and content type. + + @param name The name of the new `PFFile`. The file name must begin with and alphanumeric character, + and consist of alphanumeric characters, periods, spaces, underscores, or dashes. + @param data The contents of the new `PFFile`. @param contentType Represents MIME type of the data. + @param error On input, a pointer to an error object. + If an error occurs, this pointer is set to an actual error object containing the error information. + You may specify `nil` for this parameter if you do not want the error information. - @returns A new `PFFile` object. + @return A new `PFFile` instance or `nil` if the error occured. */ -+ (instancetype)fileWithName:(NSString *)name - data:(NSData *)data - contentType:(NSString *)contentType; ++ (nullable instancetype)fileWithName:(nullable NSString *)name + data:(NSData *)data + contentType:(nullable NSString *)contentType + error:(NSError **)error; -/*! - @abstract Creates a file with given data and content type. +/** + Creates a file with given data and content type. @param data The contents of the new `PFFile`. @param contentType Represents MIME type of the data. - @returns A new `PFFile` object. + @return A new `PFFile` object. */ -+ (instancetype)fileWithData:(NSData *)data contentType:(NSString *)contentType; ++ (instancetype)fileWithData:(NSData *)data contentType:(nullable NSString *)contentType; -/*! - @abstract The name of the file. +///-------------------------------------- +/// @name File Properties +///-------------------------------------- - @discussion Before the file is saved, this is the filename given by +/** + The name of the file. + + Before the file is saved, this is the filename given by the user. After the file is saved, that name gets prefixed with a unique identifier. */ @property (nonatomic, copy, readonly) NSString *name; -/*! - @abstract The url of the file. +/** + The url of the file. + */ +@property (nullable, nonatomic, copy, readonly) NSString *url; + +/** + Whether the file has been uploaded for the first time. */ -@property (nonatomic, copy, readonly) NSString *url; +@property (nonatomic, assign, readonly, getter=isDirty) BOOL dirty; ///-------------------------------------- /// @name Storing Data with Parse ///-------------------------------------- -/*! - @abstract Whether the file has been uploaded for the first time. - */ -@property (nonatomic, assign, readonly) BOOL isDirty; - -/*! - @abstract Saves the file *synchronously*. +/** + Saves the file *synchronously*. - @returns Returns whether the save succeeded. + @return Returns whether the save succeeded. */ -- (BOOL)save; +- (BOOL)save PF_SWIFT_UNAVAILABLE; -/*! - @abstract Saves the file *synchronously* and sets an error if it occurs. +/** + Saves the file *synchronously* and sets an error if it occurs. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns whether the save succeeded. + @return Returns whether the save succeeded. */ - (BOOL)save:(NSError **)error; -/*! - @abstract Saves the file *asynchronously*. +/** + Saves the file *asynchronously*. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -- (BFTask *)saveInBackground; +- (BFTask PF_GENERIC(NSNumber *)*)saveInBackground; -/*! - @abstract Saves the file *asynchronously* and executes the given block. +/** + Saves the file *asynchronously* + + @param progressBlock The block should have the following argument signature: `^(int percentDone)` + + @return The task, that encapsulates the work being done. + */ +- (BFTask PF_GENERIC(NSNumber *)*)saveInBackgroundWithProgressBlock:(nullable PFProgressBlock)progressBlock; + +/** + Saves the file *asynchronously* and executes the given block. @param block The block should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -- (void)saveInBackgroundWithBlock:(PFBooleanResultBlock)block; +- (void)saveInBackgroundWithBlock:(nullable PFBooleanResultBlock)block; -/*! - @abstract Saves the file *asynchronously* and executes the given block. +/** + Saves the file *asynchronously* and executes the given block. - @discussion This method will execute the progressBlock periodically with the percent progress. + This method will execute the progressBlock periodically with the percent progress. `progressBlock` will get called with `100` before `resultBlock` is called. @param block The block should have the following argument signature: `^(BOOL succeeded, NSError *error)` @param progressBlock The block should have the following argument signature: `^(int percentDone)` */ -- (void)saveInBackgroundWithBlock:(PFBooleanResultBlock)block - progressBlock:(PFProgressBlock)progressBlock; +- (void)saveInBackgroundWithBlock:(nullable PFBooleanResultBlock)block + progressBlock:(nullable PFProgressBlock)progressBlock; -/*! - @abstract Saves the file *asynchronously* and calls the given callback. +/* + Saves the file *asynchronously* and calls the given callback. @param target The object to call selector on. @param selector The selector to call. @@ -155,132 +211,234 @@ `error` will be `nil` on success and set if there was an error. `[result boolValue]` will tell you whether the call succeeded or not. */ -- (void)saveInBackgroundWithTarget:(id)target selector:(SEL)selector; +- (void)saveInBackgroundWithTarget:(nullable id)target selector:(nullable SEL)selector; ///-------------------------------------- /// @name Getting Data from Parse ///-------------------------------------- -/*! - @abstract Whether the data is available in memory or needs to be downloaded. +/** + Whether the data is available in memory or needs to be downloaded. */ -@property (assign, readonly) BOOL isDataAvailable; +@property (nonatomic, assign, readonly, getter=isDataAvailable) BOOL dataAvailable; -/*! - @abstract *Synchronously* gets the data from cache if available or fetches its contents from the network. +/** + *Synchronously* gets the data from cache if available or fetches its contents from the network. - @returns The `NSData` object containing file data. Returns `nil` if there was an error in fetching. + @return The `NSData` object containing file data. Returns `nil` if there was an error in fetching. */ -- (NSData *)getData; +- (nullable NSData *)getData PF_SWIFT_UNAVAILABLE; -/*! - @abstract This method is like but avoids ever holding the entire `PFFile` contents in memory at once. +/** + This method is like `-getData` but avoids ever holding the entire `PFFile` contents in memory at once. - @discussion This can help applications with many large files avoid memory warnings. + This can help applications with many large files avoid memory warnings. - @returns A stream containing the data. Returns `nil` if there was an error in fetching. + @return A stream containing the data. Returns `nil` if there was an error in fetching. */ -- (NSInputStream *)getDataStream; +- (nullable NSInputStream *)getDataStream PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* gets the data from cache if available or fetches its contents from the network. +/** + *Synchronously* gets the data from cache if available or fetches its contents from the network. Sets an error if it occurs. @param error Pointer to an `NSError` that will be set if necessary. - @returns The `NSData` object containing file data. Returns `nil` if there was an error in fetching. + @return The `NSData` object containing file data. Returns `nil` if there was an error in fetching. */ -- (NSData *)getData:(NSError **)error; +- (nullable NSData *)getData:(NSError **)error; -/*! - @abstract This method is like but avoids ever holding the entire `PFFile` contents in memory at once. +/** + This method is like `-getData` but avoids ever holding the entire `PFFile` contents in memory at once. @param error Pointer to an `NSError` that will be set if necessary. - @returns A stream containing the data. Returns nil if there was an error in + @return A stream containing the data. Returns nil if there was an error in fetching. */ -- (NSInputStream *)getDataStream:(NSError **)error; +- (nullable NSInputStream *)getDataStream:(NSError **)error; -/*! - @abstract This method is like but avoids ever holding the entire `PFFile` contents in memory at once. +/** + This method is like `-getData` but it fetches asynchronously to avoid blocking the current thread. - @discussion This can help applications with many large files avoid memory warnings. + @see getData + + @return The task, that encapsulates the work being done. + */ +- (BFTask PF_GENERIC(NSData *)*)getDataInBackground; + +/** + This method is like `-getData` but it fetches asynchronously to avoid blocking the current thread. + + This can help applications with many large files avoid memory warnings. @see getData - @returns A stream containing the data. Returns `nil` if there was an error in fetching. + @param progressBlock The block should have the following argument signature: ^(int percentDone) + + @return The task, that encapsulates the work being done. */ -- (BFTask *)getDataInBackground; +- (BFTask PF_GENERIC(NSData *)*)getDataInBackgroundWithProgressBlock:(nullable PFProgressBlock)progressBlock; -/*! - @abstract This method is like but avoids +/** + This method is like `-getDataInBackground` but avoids ever holding the entire `PFFile` contents in memory at once. + + This can help applications with many large files avoid memory warnings. + + @return The task, that encapsulates the work being done. + */ +- (BFTask PF_GENERIC(NSInputStream *)*)getDataStreamInBackground; + +/** + This method is like `-getDataStreamInBackground`, but yields a live-updating stream. + + Instead of `-getDataStream`, which yields a stream that can be read from only after the request has + completed, this method gives you a stream directly written to by the HTTP session. As this stream is not pre-buffered, + it is strongly advised to use the `NSStreamDelegate` methods, in combination with a run loop, to consume the data in + the stream, to do proper async file downloading. + + @note You MUST open this stream before reading from it. + @note Do NOT call `waitUntilFinished` on this task from the main thread. It may result in a deadlock. + + @return A task that produces a *live* stream that is being written to with the data from the server. + */ +- (BFTask PF_GENERIC(NSInputStream *)*)getDataDownloadStreamInBackground; + +/** + This method is like `-getDataInBackground` but avoids ever holding the entire `PFFile` contents in memory at once. - @discussion This can help applications with many large files avoid memory warnings. + This can help applications with many large files avoid memory warnings. + @param progressBlock The block should have the following argument signature: ^(int percentDone) - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -- (BFTask *)getDataStreamInBackground; +- (BFTask PF_GENERIC(NSInputStream *)*)getDataStreamInBackgroundWithProgressBlock:(nullable PFProgressBlock)progressBlock; + +/** + This method is like `-getDataStreamInBackgroundWithProgressBlock:`, but yields a live-updating stream. -/*! - @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network. + Instead of `-getDataStream`, which yields a stream that can be read from only after the request has + completed, this method gives you a stream directly written to by the HTTP session. As this stream is not pre-buffered, + it is strongly advised to use the `NSStreamDelegate` methods, in combination with a run loop, to consume the data in + the stream, to do proper async file downloading. + + @note You MUST open this stream before reading from it. + @note Do NOT call `waitUntilFinished` on this task from the main thread. It may result in a deadlock. + + @param progressBlock The block should have the following argument signature: `^(int percentDone)` + + @return A task that produces a *live* stream that is being written to with the data from the server. + */ +- (BFTask PF_GENERIC(NSInputStream *)*)getDataDownloadStreamInBackgroundWithProgressBlock:(nullable PFProgressBlock)progressBlock; + +/** + *Asynchronously* gets the data from cache if available or fetches its contents from the network. @param block The block should have the following argument signature: `^(NSData *result, NSError *error)` */ -- (void)getDataInBackgroundWithBlock:(PFDataResultBlock)block; +- (void)getDataInBackgroundWithBlock:(nullable PFDataResultBlock)block; -/*! - @abstract This method is like but avoids - ever holding the entire `PFFile` contents in memory at once. +/** + This method is like `-getDataInBackgroundWithBlock:` but avoids ever holding the entire `PFFile` contents in memory at once. - @discussion This can help applications with many large files avoid memory warnings. + This can help applications with many large files avoid memory warnings. @param block The block should have the following argument signature: `(NSInputStream *result, NSError *error)` */ -- (void)getDataStreamInBackgroundWithBlock:(PFDataStreamResultBlock)block; +- (void)getDataStreamInBackgroundWithBlock:(nullable PFDataStreamResultBlock)block; -/*! - @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network. +/** + *Asynchronously* gets the data from cache if available or fetches its contents from the network. - @discussion This method will execute the progressBlock periodically with the percent progress. + This method will execute the progressBlock periodically with the percent progress. `progressBlock` will get called with `100` before `resultBlock` is called. - @param resultBlock The block should have the following argument signature: (NSData *result, NSError *error) - @param progressBlock The block should have the following argument signature: (int percentDone) + @param resultBlock The block should have the following argument signature: ^(NSData *result, NSError *error) + @param progressBlock The block should have the following argument signature: ^(int percentDone) */ -- (void)getDataInBackgroundWithBlock:(PFDataResultBlock)resultBlock - progressBlock:(PFProgressBlock)progressBlock; +- (void)getDataInBackgroundWithBlock:(nullable PFDataResultBlock)resultBlock + progressBlock:(nullable PFProgressBlock)progressBlock; -/*! - @abstract This method is like but avoids +/** + This method is like `-getDataInBackgroundWithBlock:progressBlock:` but avoids ever holding the entire `PFFile` contents in memory at once. - @discussion This can help applications with many large files avoid memory warnings. + This can help applications with many large files avoid memory warnings. @param resultBlock The block should have the following argument signature: `^(NSInputStream *result, NSError *error)`. @param progressBlock The block should have the following argument signature: `^(int percentDone)`. */ -- (void)getDataStreamInBackgroundWithBlock:(PFDataStreamResultBlock)resultBlock - progressBlock:(PFProgressBlock)progressBlock; +- (void)getDataStreamInBackgroundWithBlock:(nullable PFDataStreamResultBlock)resultBlock + progressBlock:(nullable PFProgressBlock)progressBlock; -/*! - @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network. +/* + *Asynchronously* gets the data from cache if available or fetches its contents from the network. @param target The object to call selector on. @param selector The selector to call. It should have the following signature: `(void)callbackWithResult:(NSData *)result error:(NSError *)error`. `error` will be `nil` on success and set if there was an error. */ -- (void)getDataInBackgroundWithTarget:(id)target selector:(SEL)selector; +- (void)getDataInBackgroundWithTarget:(nullable id)target selector:(nullable SEL)selector; + +/** + *Asynchronously* gets the file path for file from cache if available or fetches its contents from the network. + + @note The file path may change between versions of SDK. + @note If you overwrite the contents of the file at returned path it will persist those change + until the file cache is cleared. + + @return The task, with the result set to `NSString` representation of a file path. + */ +- (BFTask PF_GENERIC(NSString *)*)getFilePathInBackground; + +/** + *Asynchronously* gets the file path for file from cache if available or fetches its contents from the network. + + @note The file path may change between versions of SDK. + @note If you overwrite the contents of the file at returned path it will persist those change + until the file cache is cleared. + + @param progressBlock The block should have the following argument signature: `^(int percentDone)`. + + @return The task, with the result set to `NSString` representation of a file path. + */ +- (BFTask PF_GENERIC(NSString *)*)getFilePathInBackgroundWithProgressBlock:(nullable PFProgressBlock)progressBlock; + +/** + *Asynchronously* gets the file path for file from cache if available or fetches its contents from the network. + + @note The file path may change between versions of SDK. + @note If you overwrite the contents of the file at returned path it will persist those change + until the file cache is cleared. + + @param block The block should have the following argument signature: `^(NSString *filePath, NSError *error)`. + */ +- (void)getFilePathInBackgroundWithBlock:(nullable PFFilePathResultBlock)block; + +/** + *Asynchronously* gets the file path for file from cache if available or fetches its contents from the network. + + @note The file path may change between versions of SDK. + @note If you overwrite the contents of the file at returned path it will persist those change + until the file cache is cleared. + + @param block The block should have the following argument signature: `^(NSString *filePath, NSError *error)`. + @param progressBlock The block should have the following argument signature: `^(int percentDone)`. + */ +- (void)getFilePathInBackgroundWithBlock:(nullable PFFilePathResultBlock)block + progressBlock:(nullable PFProgressBlock)progressBlock; ///-------------------------------------- /// @name Interrupting a Transfer ///-------------------------------------- -/*! - @abstract Cancels the current request (upload or download of file). +/** + Cancels the current request (upload or download of file). */ - (void)cancel; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFGeoPoint.h b/iOS/Parse.framework/Headers/PFGeoPoint.h index 0853aa5..a3b9663 100644 --- a/iOS/Parse.framework/Headers/PFGeoPoint.h +++ b/iOS/Parse.framework/Headers/PFGeoPoint.h @@ -1,17 +1,26 @@ -// -// PFGeoPoint.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ -#import #import +#import + +NS_ASSUME_NONNULL_BEGIN -/*! - `PFGeoPoint` may be used to embed a latitude / longitude point as the value for a key in a . - It could be used to perform queries in a geospatial manner using <[PFQuery whereKey:nearGeoPoint:]>. - - Currently, instances of may only have one key associated with a `PFGeoPoint` type. +@class PFGeoPoint; + +typedef void(^PFGeoPointResultBlock)(PFGeoPoint *__nullable geoPoint, NSError *__nullable error); + +/** + `PFGeoPoint` may be used to embed a latitude / longitude point as the value for a key in a `PFObject`. + It could be used to perform queries in a geospatial manner using `PFQuery.-whereKey:nearGeoPoint:`. + + Currently, instances of `PFObject` may only have one key associated with a `PFGeoPoint` type. */ @interface PFGeoPoint : NSObject @@ -19,51 +28,51 @@ /// @name Creating a Geo Point ///-------------------------------------- -/*! - @abstract Create a PFGeoPoint object. Latitude and longitude are set to `0.0`. +/** + Create a PFGeoPoint object. Latitude and longitude are set to `0.0`. - @returns Returns a new `PFGeoPoint`. + @return Returns a new `PFGeoPoint`. */ -+ (PFGeoPoint *)geoPoint; ++ (instancetype)geoPoint; -/*! - @abstract Creates a new `PFGeoPoint` object for the given `CLLocation`, set to the location's coordinates. +/** + Creates a new `PFGeoPoint` object for the given `CLLocation`, set to the location's coordinates. @param location Instace of `CLLocation`, with set latitude and longitude. - @returns Returns a new PFGeoPoint at specified location. + @return Returns a new PFGeoPoint at specified location. */ -+ (PFGeoPoint *)geoPointWithLocation:(CLLocation *)location; ++ (instancetype)geoPointWithLocation:(nullable CLLocation *)location; -/*! - @abstract Create a new `PFGeoPoint` object with the specified latitude and longitude. +/** + Create a new `PFGeoPoint` object with the specified latitude and longitude. @param latitude Latitude of point in degrees. @param longitude Longitude of point in degrees. - @returns New point object with specified latitude and longitude. + @return New point object with specified latitude and longitude. */ -+ (PFGeoPoint *)geoPointWithLatitude:(double)latitude longitude:(double)longitude; ++ (instancetype)geoPointWithLatitude:(double)latitude longitude:(double)longitude; -/*! - @abstract Fetches the current device location and executes a block with a new `PFGeoPoint` object. +/** + Fetches the current device location and executes a block with a new `PFGeoPoint` object. - @param geoPointHandler A block which takes the newly created `PFGeoPoint` as an argument. + @param resultBlock A block which takes the newly created `PFGeoPoint` as an argument. It should have the following argument signature: `^(PFGeoPoint *geoPoint, NSError *error)` */ -+ (void)geoPointForCurrentLocationInBackground:(void(^)(PFGeoPoint *geoPoint, NSError *error))geoPointHandler; ++ (void)geoPointForCurrentLocationInBackground:(nullable PFGeoPointResultBlock)resultBlock; ///-------------------------------------- /// @name Controlling Position ///-------------------------------------- -/*! - @abstract Latitude of point in degrees. Valid range is from `-90.0` to `90.0`. +/** + Latitude of point in degrees. Valid range is from `-90.0` to `90.0`. */ @property (nonatomic, assign) double latitude; -/*! - @abstract Longitude of point in degrees. Valid range is from `-180.0` to `180.0`. +/** + Longitude of point in degrees. Valid range is from `-180.0` to `180.0`. */ @property (nonatomic, assign) double longitude; @@ -71,31 +80,33 @@ /// @name Calculating Distance ///-------------------------------------- -/*! - @abstract Get distance in radians from this point to specified point. +/** + Get distance in radians from this point to specified point. @param point `PFGeoPoint` that represents the location of other point. - @returns Distance in radians between the receiver and `point`. + @return Distance in radians between the receiver and `point`. */ -- (double)distanceInRadiansTo:(PFGeoPoint *)point; +- (double)distanceInRadiansTo:(nullable PFGeoPoint *)point; -/*! - @abstract Get distance in miles from this point to specified point. +/** + Get distance in miles from this point to specified point. @param point `PFGeoPoint` that represents the location of other point. - @returns Distance in miles between the receiver and `point`. + @return Distance in miles between the receiver and `point`. */ -- (double)distanceInMilesTo:(PFGeoPoint *)point; +- (double)distanceInMilesTo:(nullable PFGeoPoint *)point; -/*! - @abstract Get distance in kilometers from this point to specified point. +/** + Get distance in kilometers from this point to specified point. @param point `PFGeoPoint` that represents the location of other point. - @returns Distance in kilometers between the receiver and `point`. + @return Distance in kilometers between the receiver and `point`. */ -- (double)distanceInKilometersTo:(PFGeoPoint *)point; +- (double)distanceInKilometersTo:(nullable PFGeoPoint *)point; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFImageView.h b/iOS/Parse.framework/Headers/PFImageView.h deleted file mode 100644 index 4ae6440..0000000 --- a/iOS/Parse.framework/Headers/PFImageView.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// PFImageView.h -// Parse -// -// Created by Qian Wang on 5/16/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import -#import "PFFile.h" - -/*! - An image view that downloads and displays remote image stored on Parse's server. - */ -@interface PFImageView : UIImageView - -/// The remote file on Parse's server that stores the image. -/// Note that the download does not start until loadInBackground: is called. -@property (nonatomic, strong) PFFile *file; - -/*! - Initiate downloading of the remote image. Once the download completes, the remote image will be displayed. - */ -- (void)loadInBackground; - -/*! - Initiate downloading of the remote image. Once the download completes, the remote image will be displayed. - @param completion the completion block. - */ -- (void)loadInBackground:(void (^)(UIImage *image, NSError *error))completion; - -@end diff --git a/iOS/Parse.framework/Headers/PFInstallation.h b/iOS/Parse.framework/Headers/PFInstallation.h index 98156c9..7a8e9f7 100644 --- a/iOS/Parse.framework/Headers/PFInstallation.h +++ b/iOS/Parse.framework/Headers/PFInstallation.h @@ -1,110 +1,115 @@ -// -// PFInstallation.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import #import #import -/*! +PF_TV_UNAVAILABLE_WARNING +PF_WATCH_UNAVAILABLE_WARNING + +NS_ASSUME_NONNULL_BEGIN + +/** A Parse Framework Installation Object that is a local representation of an installation persisted to the Parse cloud. This class is a subclass of a - , and retains the same functionality of a PFObject, but also extends + `PFObject`, and retains the same functionality of a PFObject, but also extends it with installation-specific fields and related immutability and validity checks. A valid `PFInstallation` can only be instantiated via - <[PFInstallation currentInstallation]> because the required identifier fields - are readonly. The and fields are also readonly properties which + `+currentInstallation` because the required identifier fields + are readonly. The `timeZone` and `badge` fields are also readonly properties which are automatically updated to match the device's time zone and application badge when the `PFInstallation` is saved, thus these fields might not reflect the latest device state if the installation has not recently been saved. - `PFInstallation` objects which have a valid and are saved to + `PFInstallation` objects which have a valid `deviceToken` and are saved to the Parse cloud can be used to target push notifications. - - This class is currently for iOS only. There is no `PFInstallation` for Parse - applications running on OS X, because they cannot receive push notifications. */ -@interface PFInstallation : PFObject - -/*! - @abstract The name of the Installation class in the REST API. - - @discussion This is a required PFSubclassing method. - */ -+ (NSString *)parseClassName; - -///-------------------------------------- -/// @name Targeting Installations -///-------------------------------------- - -/*! - @abstract Creates a for `PFInstallation` objects. - - @discussion The resulting query can only be used for targeting a . - Calling find methods on the resulting query will raise an exception. - */ -+ (PFQuery *)query; +PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFInstallation : PFObject ///-------------------------------------- /// @name Accessing the Current Installation ///-------------------------------------- -/*! - @abstract Gets the currently-running installation from disk and returns an instance of it. +/** + Gets the currently-running installation from disk and returns an instance of it. - @discussion If this installation is not stored on disk, returns a `PFInstallation` - with and fields set to those of the + If this installation is not stored on disk, returns a `PFInstallation` + with `deviceType` and `installationId` fields set to those of the current installation. @result Returns a `PFInstallation` that represents the currently-running installation. */ + (instancetype)currentInstallation; -/*! - @abstract Sets the device token string property from an `NSData`-encoded token. - - @param deviceTokenData A token that identifies the device. - */ -- (void)setDeviceTokenFromData:(NSData *)deviceTokenData; - ///-------------------------------------- /// @name Installation Properties ///-------------------------------------- -/*! - @abstract The device type for the `PFInstallation`. +/** + The device type for the `PFInstallation`. */ -@property (nonatomic, strong, readonly) NSString *deviceType; +@property (nonatomic, copy, readonly) NSString *deviceType; -/*! - @abstract The installationId for the `PFInstallation`. +/** + The installationId for the `PFInstallation`. */ -@property (nonatomic, strong, readonly) NSString *installationId; +@property (nonatomic, copy, readonly) NSString *installationId; -/*! - @abstract The device token for the `PFInstallation`. +/** + The device token for the `PFInstallation`. */ -@property (nonatomic, strong) NSString *deviceToken; +@property (nullable, nonatomic, copy) NSString *deviceToken; -/*! - @abstract The badge for the `PFInstallation`. +/** + The badge for the `PFInstallation`. */ @property (nonatomic, assign) NSInteger badge; -/*! - @abstract The name of the time zone for the `PFInstallation`. +/** + The name of the time zone for the `PFInstallation`. + */ +@property (nullable, nonatomic, copy, readonly) NSString *timeZone; + +/** + The channels for the `PFInstallation`. */ -@property (nonatomic, strong, readonly) NSString *timeZone; +@property (nullable, nonatomic, copy) NSArray PF_GENERIC(NSString *)*channels; -/*! - @abstract The channels for the `PFInstallation`. +/** + Sets the device token string property from an `NSData`-encoded token. + + @param deviceTokenData A token that identifies the device. */ -@property (nonatomic, strong) NSArray *channels; +- (void)setDeviceTokenFromData:(nullable NSData *)deviceTokenData; + +///-------------------------------------- +/// @name Querying for Installations +///-------------------------------------- + +/** + Creates a `PFQuery` for `PFInstallation` objects. + + Only the following types of queries are allowed for installations: + + - `[query getObjectWithId:]` + - `[query whereKey:@"installationId" equalTo:]` + - `[query whereKey:@"installationId" matchesKey: inQuery:]` + + You can add additional query conditions, but one of the above must appear as a top-level `AND` clause in the query. + */ ++ (nullable PFQuery *)query; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFLogInView.h b/iOS/Parse.framework/Headers/PFLogInView.h deleted file mode 100644 index 4f87021..0000000 --- a/iOS/Parse.framework/Headers/PFLogInView.h +++ /dev/null @@ -1,105 +0,0 @@ -// -// PFLogInView.h -// Parse -// -// Created by Qian Wang on 3/9/12. -// Copyright (c) 2012. All rights reserved. -// - -#import - -/*! - A bitmask specifying the log in elements which are enabled in the view. - @sa PFLogInViewController - @sa PFLogInView - */ -typedef NS_OPTIONS(NSInteger, PFLogInFields) { - /*! No fields. */ - PFLogInFieldsNone = 0, - /*! Username and password fields. */ - PFLogInFieldsUsernameAndPassword = 1 << 0, - /*! Forgot password button. */ - PFLogInFieldsPasswordForgotten = 1 << 1, - /*! Login button. */ - PFLogInFieldsLogInButton = 1 << 2, - /*! Button to login with Facebook. */ - PFLogInFieldsFacebook = 1 << 3, - /*! Button to login with Twitter. */ - PFLogInFieldsTwitter = 1 << 4, - /*! Signup Button. */ - PFLogInFieldsSignUpButton = 1 << 5, - /*! Dismiss Button. */ - PFLogInFieldsDismissButton = 1 << 6, - - /*! Default value. Combines Username, Password, Login, Signup, Forgot Password and Dismiss buttons. */ - PFLogInFieldsDefault = (PFLogInFieldsUsernameAndPassword | - PFLogInFieldsLogInButton | - PFLogInFieldsSignUpButton | - PFLogInFieldsPasswordForgotten | - PFLogInFieldsDismissButton) -}; - -/*! - The class provides a standard log in interface for authenticating a PFUser. - */ -@interface PFLogInView : UIView - -/*! @name Creating Log In View */ -/*! - Initializes the view with the specified log in elements. - @param fields A bitmask specifying the log in elements which are enabled in the view - */ -- (instancetype)initWithFields:(PFLogInFields)fields; - -/*! - The view controller that will present this view. - Used to lay out elements correctly when the presenting view controller has translucent elements. - */ -@property (nonatomic, strong) UIViewController *presentingViewController; - -/*! @name Customizing the Logo */ - -/// The logo. By default, it is the Parse logo. -@property (nonatomic, strong) UIView *logo; - -/*! @name Prompt for email as username. */ - -/// By default, this is set to NO. -@property (nonatomic, assign) BOOL emailAsUsername; - -/*! @name Accessing Log In Elements */ - -/// The bitmask which specifies the enabled log in elements in the view -@property (nonatomic, readonly, assign) PFLogInFields fields; - -/// The username text field. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UITextField *usernameField; - -/// The password text field. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UITextField *passwordField; - -/// The password forgotten button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *passwordForgottenButton; - -/// The log in button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *logInButton; - -/// The Facebook button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *facebookButton; - -/// The Twitter button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *twitterButton; - -/// The sign up button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *signUpButton; - -/// The dismiss button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *dismissButton; - -/// The facebook/twitter login label. It is only shown if the external login is enabled. -@property (nonatomic, strong, readonly) UILabel *externalLogInLabel; - -/// The sign up label. It is only shown if sign up button is enabled. -@property (nonatomic, strong, readonly) UILabel *signUpLabel; - -@end diff --git a/iOS/Parse.framework/Headers/PFLogInViewController.h b/iOS/Parse.framework/Headers/PFLogInViewController.h deleted file mode 100644 index 2d0c4c2..0000000 --- a/iOS/Parse.framework/Headers/PFLogInViewController.h +++ /dev/null @@ -1,127 +0,0 @@ -// -// PFLogInViewController.h -// Parse -// -// Created by Andrew Wang on 3/8/12. -// Copyright (c) 2012. All rights reserved. -// - -#import - -#import "PFLogInView.h" -#import "PFSignUpViewController.h" -#import "PFUser.h" - -@protocol PFLogInViewControllerDelegate; - -/*! - The class that presents and manages a standard authentication interface for logging in a PFUser. - */ -@interface PFLogInViewController : UIViewController - -/*! @name Configuring Log In Elements */ - -/*! - A bitmask specifying the log in elements which are enabled in the view. - - enum { - PFLogInFieldsNone = 0, - PFLogInFieldsUsernameAndPassword = 1 << 0, - PFLogInFieldsPasswordForgotten = 1 << 1, - PFLogInFieldsLogInButton = 1 << 2, - PFLogInFieldsFacebook = 1 << 3, - PFLogInFieldsTwitter = 1 << 4, - PFLogInFieldsSignUpButton = 1 << 5, - PFLogInFieldsDismissButton = 1 << 6, - PFLogInFieldsDefault = PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton | PFLogInFieldsSignUpButton | PFLogInFieldsPasswordForgotten | PFLogInFieldsDismissButton - }; - */ -@property (nonatomic, assign) PFLogInFields fields; - -/// The log in view. It contains all the enabled log in elements. -@property (nonatomic, strong, readonly) PFLogInView *logInView; - -/*! @name Configuring Log In Behaviors */ - -/// The delegate that responds to the control events of PFLogInViewController. -@property (nonatomic, weak) id delegate; - -/*! - The facebook permissions that Facebook log in requests for. - If unspecified, the default is basic facebook permissions. - */ -@property (nonatomic, strong) NSArray *facebookPermissions; - -/*! - The sign up controller if sign up is enabled. - Use this to configure the sign up view, and the transition animation to the sign up view. - The default is a sign up view with a username, a password, a dismiss button and a sign up button. - */ -@property (nonatomic, strong) PFSignUpViewController *signUpController; - -/*! - Whether to prompt for the email as username on the login view. - If set to YES, we'll prompt for the email in the username field. - This property value propagates to the attached signUpController. - By default, this is set to NO. - */ -@property (nonatomic, assign) BOOL emailAsUsername; - -@end - -/*! @name Notifications */ - -/// The notification is posted immediately after the log in succeeds. -extern NSString *const PFLogInSuccessNotification; - -/*! - The notification is posted immediately after the log in fails. - If the delegate prevents the log in from starting, the notification is not sent. - */ -extern NSString *const PFLogInFailureNotification; - -/// The notification is posted immediately after the log in is cancelled. -extern NSString *const PFLogInCancelNotification; - -/*! - The protocol defines methods a delegate of a PFLogInViewController should implement. - All methods of the protocol are optional. - */ -@protocol PFLogInViewControllerDelegate - -@optional - -/*! @name Customizing Behavior */ - -/*! - Sent to the delegate to determine whether the log in request should be submitted to the server. - @param logInController The login view controller that is requesting the data. - @param username the username the user tries to log in with. - @param password the password the user tries to log in with. - @result a boolean indicating whether the log in should proceed. - */ -- (BOOL)logInViewController:(PFLogInViewController *)logInController shouldBeginLogInWithUsername:(NSString *)username password:(NSString *)password; - -/*! @name Responding to Actions */ - -/*! - Sent to the delegate when a PFUser is logged in. - @param logInController The login view controller where login finished. - @param user PFUser object that is a result of the login. - */ -- (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user; - -/*! - Sent to the delegate when the log in attempt fails. - @param logInController The login view controller where login failed. - @param error NSError object representing the error that occured. - */ -- (void)logInViewController:(PFLogInViewController *)logInController didFailToLogInWithError:(NSError *)error; - -/*! - Sent to the delegate when the log in screen is cancelled. - @param logInController The login view controller where login was cancelled. - */ -- (void)logInViewControllerDidCancelLogIn:(PFLogInViewController *)logInController; - -@end diff --git a/iOS/Parse.framework/Headers/PFNetworkActivityIndicatorManager.h b/iOS/Parse.framework/Headers/PFNetworkActivityIndicatorManager.h index 5dbd807..24afd3b 100644 --- a/iOS/Parse.framework/Headers/PFNetworkActivityIndicatorManager.h +++ b/iOS/Parse.framework/Headers/PFNetworkActivityIndicatorManager.h @@ -1,12 +1,24 @@ -// -// PFNetworkActivityIndicatorManager.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import +#import + +#import + +PF_OSX_UNAVAILABLE_WARNING +PF_TV_UNAVAILABLE_WARNING +PF_WATCH_UNAVAILABLE_WARNING -/*! +NS_ASSUME_NONNULL_BEGIN + +/** `PFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will start managing the network activity indicator in the status bar, according to the network operations that are performed by Parse SDK. @@ -14,9 +26,9 @@ The number of active requests is incremented or decremented like a stack or a semaphore, the activity indicator will animate, as long as the number is greater than zero. */ -@interface PFNetworkActivityIndicatorManager : NSObject +PF_OSX_UNAVAILABLE PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFNetworkActivityIndicatorManager : NSObject -/*! +/** A Boolean value indicating whether the manager is enabled. If `YES` - the manager will start managing the status bar network activity indicator, according to the network operations that are performed by Parse SDK. @@ -24,37 +36,39 @@ */ @property (nonatomic, assign, getter = isEnabled) BOOL enabled; -/*! +/** A Boolean value indicating whether the network activity indicator is currently displayed in the status bar. */ @property (nonatomic, assign, readonly, getter = isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; -/*! +/** The value that indicates current network activities count. */ @property (nonatomic, assign, readonly) NSUInteger networkActivityCount; -/*! - @abstract Returns the shared network activity indicator manager object for the system. +/** + Returns the shared network activity indicator manager object for the system. - @returns The systemwide network activity indicator manager. + @return The systemwide network activity indicator manager. */ -+ (instancetype)sharedManager; ++ (PFNetworkActivityIndicatorManager *)sharedManager; -/*! - @abstract Increments the number of active network requests. +/** + Increments the number of active network requests. - @discussion If this number was zero before incrementing, + If this number was zero before incrementing, this will start animating network activity indicator in the status bar. */ - (void)incrementActivityCount; -/*! - @abstract Decrements the number of active network requests. +/** + Decrements the number of active network requests. - @discussion If this number becomes zero after decrementing, + If this number becomes zero after decrementing, this will stop animating network activity indicator in the status bar. */ - (void)decrementActivityCount; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFObject+Subclass.h b/iOS/Parse.framework/Headers/PFObject+Subclass.h index e5a7537..a5106e5 100644 --- a/iOS/Parse.framework/Headers/PFObject+Subclass.h +++ b/iOS/Parse.framework/Headers/PFObject+Subclass.h @@ -1,44 +1,45 @@ -// -// PFObject+Subclass.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE #import -#else -#import -#endif -@class PFQuery; +@class PFQuery PF_GENERIC(PFGenericObject : PFObject *); + +NS_ASSUME_NONNULL_BEGIN -/*! +/** ### Subclassing Notes - + Developers can subclass `PFObject` for a more native object-oriented class structure. - Strongly-typed subclasses of `PFObject` must conform to the protocol - and must call before <[Parse setApplicationId:clientKey:]> is called. - After this it will be returned by and other `PFObject` factories. + Strongly-typed subclasses of `PFObject` must conform to the `PFSubclassing` protocol + and must call `PFSubclassing.+registerSubclass` before `Parse.+setApplicationId:clientKey:` is called. + After this it will be returned by `PFQuery` and other `PFObject` factories. - All methods in except for <[PFSubclassing parseClassName]> - are already implemented in the `PFObject+Subclass` category. + All methods in `PFSubclassing` except for `PFSubclassing.+parseClassName` + are already implemented in the `PFObject(Subclass)` category. Including `PFObject+Subclass.h` in your implementation file provides these implementations automatically. - + Subclasses support simpler initializers, query syntax, and dynamic synthesizers. The following shows an example subclass: - + \@interface MYGame : PFObject // Accessing this property is the same as objectForKey:@"title" - @property (nonatomic, strong) NSString *title; + @property (nonatomic, copy) NSString *title; + (NSString *)parseClassName; @end - + @implementation MYGame @@ -61,17 +62,10 @@ /// @name Methods for Subclasses ///-------------------------------------- -/*! - @abstract Designated initializer for subclasses. - This method can only be called on subclasses which conform to . - This method should not be overridden. - */ -- (instancetype)init; - -/*! - @abstract Creates an instance of the registered subclass with this class's . +/** + Creates an instance of the registered subclass with this class's `PFSubclassing.+parseClassName`. - @discussion This helps a subclass ensure that it can be subclassed itself. + This helps a subclass ensure that it can be subclassed itself. For example, `[PFUser object]` will return a `MyUser` object if `MyUser` is a registered subclass of `PFUser`. For this reason, `[MyClass object]` is preferred to `[[MyClass alloc] init]`. This method can only be called on subclasses which conform to `PFSubclassing`. @@ -79,50 +73,54 @@ */ + (instancetype)object; -/*! - @abstract Creates a reference to an existing `PFObject` for use in creating associations between `PFObjects`. +/** + Creates a reference to an existing `PFObject` for use in creating associations between `PFObjects`. - @discussion Calling on this object will return `NO` until or has been called. - This method can only be called on subclasses which conform to . + Calling `dataAvailable` on this object will return `NO` until `-fetchIfNeeded` or `-fetch` has been called. + This method can only be called on subclasses which conform to `PFSubclassing`. A default implementation is provided by `PFObject` which should always be sufficient. No network request will be made. @param objectId The object id for the referenced object. - @returns An instance of `PFObject` without data. + @return An instance of `PFObject` without data. */ -+ (instancetype)objectWithoutDataWithObjectId:(NSString *)objectId; ++ (instancetype)objectWithoutDataWithObjectId:(nullable NSString *)objectId; -/*! - @abstract Registers an Objective-C class for Parse to use for representing a given Parse class. +/** + Registers an Objective-C class for Parse to use for representing a given Parse class. - @discussion Once this is called on a `PFObject` subclass, any `PFObject` Parse creates with a class name + Once this is called on a `PFObject` subclass, any `PFObject` Parse creates with a class name that matches `[self parseClassName]` will be an instance of subclass. - This method can only be called on subclasses which conform to . + This method can only be called on subclasses which conform to `PFSubclassing`. A default implementation is provided by `PFObject` which should always be sufficient. */ + (void)registerSubclass; -/*! - @abstract Returns a query for objects of type . +/** + Returns a query for objects of type `PFSubclassing.+parseClassName`. - @discussion This method can only be called on subclasses which conform to . - A default implementation is provided by which should always be sufficient. + This method can only be called on subclasses which conform to `PFSubclassing`. + A default implementation is provided by `PFObject` which should always be sufficient. + + @see `PFQuery` */ -+ (PFQuery *)query; ++ (nullable PFQuery *)query; -/*! - @abstract Returns a query for objects of type with a given predicate. +/** + Returns a query for objects of type `PFSubclassing.+parseClassName` with a given predicate. - @discussion A default implementation is provided by which should always be sufficient. - @warning This method can only be called on subclasses which conform to . + A default implementation is provided by `PFObject` which should always be sufficient. + @warning This method can only be called on subclasses which conform to `PFSubclassing`. @param predicate The predicate to create conditions from. - @return An instance of . + @return An instance of `PFQuery`. - @see [PFQuery queryWithClassName:predicate:] + @see `PFQuery.+queryWithClassName:predicate:` */ -+ (PFQuery *)queryWithPredicate:(NSPredicate *)predicate; ++ (nullable PFQuery *)queryWithPredicate:(nullable NSPredicate *)predicate; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFObject.h b/iOS/Parse.framework/Headers/PFObject.h index b1c1193..532cfe4 100644 --- a/iOS/Parse.framework/Headers/PFObject.h +++ b/iOS/Parse.framework/Headers/PFObject.h @@ -1,232 +1,243 @@ -// -// PFObject.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE +#import + #import #import -#else -#import -#import -#endif + +NS_ASSUME_NONNULL_BEGIN @protocol PFSubclassing; -@class BFTask; @class PFRelation; +/** + The name of the default pin that for PFObject local data store. + */ extern NSString *const PFObjectDefaultPin; -/*! +/** The `PFObject` class is a local representation of data persisted to the Parse cloud. This is the main class that is used to interact with objects in your app. -*/ + */ NS_REQUIRES_PROPERTY_DEFINITIONS -@interface PFObject : NSObject { - BOOL dirty; - - // An array of NSDictionary of NSString -> PFFieldOperation. - // Each dictionary has a subset of the object's keys as keys, and the - // changes to the value for that key as its value. - // There is always at least one dictionary of pending operations. - // Every time a save is started, a new dictionary is added to the end. - // Whenever a save completes, the new data is put into fetchedData, and - // a dictionary is removed from the start. - NSMutableArray *operationSetQueue; - - // Our best estimate as to what the current data is, based on - // the last fetch from the server, and the set of pending operations. - NSMutableDictionary *estimatedData; -} +@interface PFObject : NSObject ///-------------------------------------- /// @name Creating a PFObject ///-------------------------------------- -/*! - @abstract Creates a new PFObject with a class name. +/** + Initializes a new empty `PFObject` instance with a class name. - @param className A class name can be any alphanumeric string that begins with a letter. + @param newClassName A class name can be any alphanumeric string that begins with a letter. It represents an object in your app, like a 'User' or a 'Document'. - @returns Returns the object that is instantiated with the given class name. + @return Returns the object that is instantiated with the given class name. */ -+ (instancetype)objectWithClassName:(NSString *)className; - -/*! - @abstract Creates a reference to an existing PFObject for use in creating associations between PFObjects. +- (instancetype)initWithClassName:(NSString *)newClassName; - @discussion Calling on this object will return `NO` until has been called. - No network request will be made. +/** + Creates a new PFObject with a class name. - @param className The object's class. - @param objectId The object id for the referenced object. + @param className A class name can be any alphanumeric string that begins with a letter. + It represents an object in your app, like a 'User' or a 'Document'. - @returns A `PFObject` instance without data. + @return Returns the object that is instantiated with the given class name. */ -+ (instancetype)objectWithoutDataWithClassName:(NSString *)className - objectId:(NSString *)objectId; ++ (instancetype)objectWithClassName:(NSString *)className; -/*! - @abstract Creates a new `PFObject` with a class name, initialized with data +/** + Creates a new `PFObject` with a class name, initialized with data constructed from the specified set of objects and keys. @param className The object's class. @param dictionary An `NSDictionary` of keys and objects to set on the new `PFObject`. - @returns A PFObject with the given class name and set with the given data. + @return A PFObject with the given class name and set with the given data. */ -+ (PFObject *)objectWithClassName:(NSString *)className dictionary:(NSDictionary *)dictionary; ++ (instancetype)objectWithClassName:(NSString *)className dictionary:(nullable NSDictionary PF_GENERIC(NSString *, id)*)dictionary; -/*! - @abstract Initializes a new empty `PFObject` instance with a class name. +/** + Creates a reference to an existing PFObject for use in creating associations between PFObjects. - @param newClassName A class name can be any alphanumeric string that begins with a letter. - It represents an object in your app, like a 'User' or a 'Document'. + Calling `dataAvailable` on this object will return `NO` until `-fetchIfNeeded` has been called. + No network request will be made. - @returns Returns the object that is instantiated with the given class name. + @param className The object's class. + @param objectId The object id for the referenced object. + + @return A `PFObject` instance without data. */ -- (instancetype)initWithClassName:(NSString *)newClassName; ++ (instancetype)objectWithoutDataWithClassName:(NSString *)className objectId:(nullable NSString *)objectId; ///-------------------------------------- /// @name Managing Object Properties ///-------------------------------------- -/*! - @abstract The class name of the object. +/** + The class name of the object. */ -@property (strong, readonly) NSString *parseClassName; +@property (nonatomic, strong, readonly) NSString *parseClassName; -/*! - @abstract The id of the object. +/** + The id of the object. */ -@property (nonatomic, strong) NSString *objectId; +@property (nullable, nonatomic, strong) NSString *objectId; -/*! - @abstract When the object was last updated. +/** + When the object was last updated. */ -@property (nonatomic, strong, readonly) NSDate *updatedAt; +@property (nullable, nonatomic, strong, readonly) NSDate *updatedAt; -/*! - @abstract When the object was created. +/** + When the object was created. */ -@property (nonatomic, strong, readonly) NSDate *createdAt; +@property (nullable, nonatomic, strong, readonly) NSDate *createdAt; -/*! - @abstract The ACL for this object. +/** + The ACL for this object. */ -@property (nonatomic, strong) PFACL *ACL; +@property (nullable, nonatomic, strong) PFACL *ACL; -/*! - @abstract Returns an array of the keys contained in this object. +/** + Returns an array of the keys contained in this object. - @discussion This does not include `createdAt`, `updatedAt`, `authData`, or `objectId`. + This does not include `createdAt`, `updatedAt`, `authData`, or `objectId`. It does include things like username and ACL. */ -- (NSArray *)allKeys; +@property (nonatomic, copy, readonly) NSArray PF_GENERIC(NSString *)*allKeys; ///-------------------------------------- /// @name Accessors ///-------------------------------------- -/*! - @abstract Returns the value associated with a given key. +/** + Returns the value associated with a given key. @param key The key for which to return the corresponding value. + + @see -objectForKeyedSubscript: */ -- (id)objectForKey:(NSString *)key; +- (nullable id)objectForKey:(NSString *)key; -/*! - @abstract Sets the object associated with a given key. +/** + Sets the object associated with a given key. - @param object The object. - @param key The key. + @param object The object for `key`. A strong reference to the object is maintained by PFObject. + Raises an `NSInvalidArgumentException` if `object` is `nil`. + If you need to represent a `nil` value - use `NSNull`. + @param key The key for `object`. + Raises an `NSInvalidArgumentException` if `key` is `nil`. + + @see -setObject:forKeyedSubscript: */ - (void)setObject:(id)object forKey:(NSString *)key; -/*! - @abstract Unsets a key on the object. +/** + Unsets a key on the object. @param key The key. */ - (void)removeObjectForKey:(NSString *)key; -/*! - @abstract Returns the value associated with a given key. +/** + Returns the value associated with a given key. - @discussion This method enables usage of literal syntax on `PFObject`. + This method enables usage of literal syntax on `PFObject`. E.g. `NSString *value = object[@"key"];` - @see objectForKey: - @param key The key for which to return the corresponding value. + + @see -objectForKey: */ -- (id)objectForKeyedSubscript:(NSString *)key; +- (nullable id)objectForKeyedSubscript:(NSString *)key; -/*! - @abstract Returns the value associated with a given key. +/** + Returns the value associated with a given key. - @discussion This method enables usage of literal syntax on `PFObject`. + This method enables usage of literal syntax on `PFObject`. E.g. `object[@"key"] = @"value";` - @see setObject:forKey: + @param object The object for `key`. A strong reference to the object is maintained by PFObject. + Raises an `NSInvalidArgumentException` if `object` is `nil`. + If you need to represent a `nil` value - use `NSNull`. + @param key The key for `object`. + Raises an `NSInvalidArgumentException` if `key` is `nil`. - @param object The object. - @param key The key. + @see -setObject:forKey: */ - (void)setObject:(id)object forKeyedSubscript:(NSString *)key; -/*! - @abstract Returns the relation object associated with the given key. +/** + Returns the instance of `PFRelation` class associated with the given key. @param key The key that the relation is associated with. */ - (PFRelation *)relationForKey:(NSString *)key; -/*! - @abstract Returns the relation object associated with the given key. +/** + Returns the instance of `PFRelation` class associated with the given key. @param key The key that the relation is associated with. - @deprecated Please use `[PFObject relationForKey:]` instead. + @deprecated Please use `PFObject.-relationForKey:` instead. */ - (PFRelation *)relationforKey:(NSString *)key PARSE_DEPRECATED("Please use -relationForKey: instead."); +/** + Clears any changes to this object made since the last call to save and sets it back to the server state. + */ +- (void)revert; + +/** + Clears any changes to this object's key that were done after last successful save and sets it back to the + server state. + + @param key The key to revert changes for. + */ +- (void)revertObjectForKey:(NSString *)key; + ///-------------------------------------- /// @name Array Accessors ///-------------------------------------- -/*! - @abstract Adds an object to the end of the array associated with a given key. +/** + Adds an object to the end of the array associated with a given key. @param object The object to add. @param key The key. */ - (void)addObject:(id)object forKey:(NSString *)key; -/*! - @abstract Adds the objects contained in another array to the end of the array associated with a given key. +/** + Adds the objects contained in another array to the end of the array associated with a given key. @param objects The array of objects to add. @param key The key. */ - (void)addObjectsFromArray:(NSArray *)objects forKey:(NSString *)key; -/*! - @abstract Adds an object to the array associated with a given key, only if it is not already present in the array. +/** + Adds an object to the array associated with a given key, only if it is not already present in the array. - @discussion The position of the insert is not guaranteed. + The position of the insert is not guaranteed. @param object The object to add. @param key The key. */ - (void)addUniqueObject:(id)object forKey:(NSString *)key; -/*! - @abstract Adds the objects contained in another array to the array associated with a given key, +/** + Adds the objects contained in another array to the array associated with a given key, only adding elements which are not already present in the array. @dicsussion The position of the insert is not guaranteed. @@ -236,16 +247,16 @@ NS_REQUIRES_PROPERTY_DEFINITIONS */ - (void)addUniqueObjectsFromArray:(NSArray *)objects forKey:(NSString *)key; -/*! - @abstract Removes all occurrences of an object from the array associated with a given key. +/** + Removes all occurrences of an object from the array associated with a given key. @param object The object to remove. @param key The key. */ - (void)removeObject:(id)object forKey:(NSString *)key; -/*! - @abstract Removes all occurrences of the objects contained in another array from the array associated with a given key. +/** + Removes all occurrences of the objects contained in another array from the array associated with a given key. @param objects The array of objects to remove. @param key The key. @@ -256,15 +267,15 @@ NS_REQUIRES_PROPERTY_DEFINITIONS /// @name Increment ///-------------------------------------- -/*! - @abstract Increments the given key by `1`. +/** + Increments the given key by `1`. @param key The key. */ - (void)incrementKey:(NSString *)key; -/*! - @abstract Increments the given key by a number. +/** + Increments the given key by a number. @param key The key. @param amount The amount to increment. @@ -275,39 +286,39 @@ NS_REQUIRES_PROPERTY_DEFINITIONS /// @name Saving Objects ///-------------------------------------- -/*! - @abstract *Synchronously* saves the `PFObject`. +/** + *Synchronously* saves the `PFObject`. - @returns Returns whether the save succeeded. + @return Returns whether the save succeeded. */ -- (BOOL)save; +- (BOOL)save PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* saves the `PFObject` and sets an error if it occurs. +/** + *Synchronously* saves the `PFObject` and sets an error if it occurs. - @param error Pointer to an NSError that will be set if necessary. + @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns whether the save succeeded. + @return Returns whether the save succeeded. */ - (BOOL)save:(NSError **)error; -/*! - @abstract Saves the `PFObject` *asynchronously*. +/** + Saves the `PFObject` *asynchronously*. - @returns The task that encapsulates the work being done. + @return The task that encapsulates the work being done. */ -- (BFTask *)saveInBackground; +- (BFTask PF_GENERIC(NSNumber *)*)saveInBackground; -/*! - @abstract Saves the `PFObject` *asynchronously* and executes the given callback block. +/** + Saves the `PFObject` *asynchronously* and executes the given callback block. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -- (void)saveInBackgroundWithBlock:(PFBooleanResultBlock)block; +- (void)saveInBackgroundWithBlock:(nullable PFBooleanResultBlock)block; -/*! - @abstract Saves the `PFObject` asynchronously and calls the given callback. +/* + Saves the `PFObject` asynchronously and calls the given callback. @param target The object to call selector on. @param selector The selector to call. @@ -315,77 +326,91 @@ NS_REQUIRES_PROPERTY_DEFINITIONS `error` will be `nil` on success and set if there was an error. `[result boolValue]` will tell you whether the call succeeded or not. */ -- (void)saveInBackgroundWithTarget:(id)target selector:(SEL)selector; +- (void)saveInBackgroundWithTarget:(nullable id)target selector:(nullable SEL)selector; + +/** + Saves this object to the server at some unspecified time in the future, + even if Parse is currently inaccessible. + + Use this when you may not have a solid network connection, and don't need to know when the save completes. + If there is some problem with the object such that it can't be saved, it will be silently discarded. If the save + completes successfully while the object is still in memory, then callback will be called. + + Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. + They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is + available. Objects saved this way will persist even after the app is closed, in which case they will be sent the + next time the app is opened. If more than 10MB of data is waiting to be sent, subsequent calls to `-saveEventually` + will cause old saves to be silently discarded until the connection can be re-established, and the queued objects + can be saved. -/*! - @see saveEventually: + @return The task that encapsulates the work being done. */ -- (void)saveEventually; +- (BFTask PF_GENERIC(NSNumber *)*)saveEventually PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE; -/*! - @abstract Saves this object to the server at some unspecified time in the future, +/** + Saves this object to the server at some unspecified time in the future, even if Parse is currently inaccessible. - @discussion Use this when you may not have a solid network connection, and don't need to know when the save completes. + Use this when you may not have a solid network connection, and don't need to know when the save completes. If there is some problem with the object such that it can't be saved, it will be silently discarded. If the save completes successfully while the object is still in memory, then callback will be called. Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is available. Objects saved this way will persist even after the app is closed, in which case they will be sent the - next time the app is opened. If more than 10MB of data is waiting to be sent, subsequent calls to + next time the app is opened. If more than 10MB of data is waiting to be sent, subsequent calls to `-saveEventually:` will cause old saves to be silently discarded until the connection can be re-established, and the queued objects can be saved. @param callback The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -- (void)saveEventually:(PFBooleanResultBlock)callback; +- (void)saveEventually:(nullable PFBooleanResultBlock)callback PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE; ///-------------------------------------- /// @name Saving Many Objects ///-------------------------------------- -/*! - @abstract Saves a collection of objects *synchronously all at once. +/** + Saves a collection of objects *synchronously all at once. @param objects The array of objects to save. - @returns Returns whether the save succeeded. + @return Returns whether the save succeeded. */ -+ (BOOL)saveAll:(NSArray *)objects; ++ (BOOL)saveAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects PF_SWIFT_UNAVAILABLE; -/*! - @abstract Saves a collection of objects *synchronously* all at once and sets an error if necessary. +/** + Saves a collection of objects *synchronously* all at once and sets an error if necessary. @param objects The array of objects to save. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns whether the save succeeded. + @return Returns whether the save succeeded. */ -+ (BOOL)saveAll:(NSArray *)objects error:(NSError **)error; ++ (BOOL)saveAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects error:(NSError **)error; -/*! - @abstract Saves a collection of objects all at once *asynchronously*. +/** + Saves a collection of objects all at once *asynchronously*. @param objects The array of objects to save. - @returns The task that encapsulates the work being done. + @return The task that encapsulates the work being done. */ -+ (BFTask *)saveAllInBackground:(NSArray *)objects; ++ (BFTask PF_GENERIC(NSNumber *)*)saveAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects; -/*! - @abstract Saves a collection of objects all at once `asynchronously` and executes the block when done. +/** + Saves a collection of objects all at once `asynchronously` and executes the block when done. @param objects The array of objects to save. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -+ (void)saveAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; ++ (void)saveAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects + block:(nullable PFBooleanResultBlock)block; -/*! - @abstract Saves a collection of objects all at once *asynchronously* and calls a callback when done. +/* + Saves a collection of objects all at once *asynchronously* and calls a callback when done. @param objects The array of objects to save. @param target The object to call selector on. @@ -394,52 +419,52 @@ NS_REQUIRES_PROPERTY_DEFINITIONS `error` will be `nil` on success and set if there was an error. `[result boolValue]` will tell you whether the call succeeded or not. */ -+ (void)saveAllInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; ++ (void)saveAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects + target:(nullable id)target + selector:(nullable SEL)selector; ///-------------------------------------- /// @name Deleting Many Objects ///-------------------------------------- -/*! - @abstract *Synchronously* deletes a collection of objects all at once. +/** + *Synchronously* deletes a collection of objects all at once. @param objects The array of objects to delete. - @returns Returns whether the delete succeeded. + @return Returns whether the delete succeeded. */ -+ (BOOL)deleteAll:(NSArray *)objects; ++ (BOOL)deleteAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* deletes a collection of objects all at once and sets an error if necessary. +/** + *Synchronously* deletes a collection of objects all at once and sets an error if necessary. @param objects The array of objects to delete. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns whether the delete succeeded. + @return Returns whether the delete succeeded. */ -+ (BOOL)deleteAll:(NSArray *)objects error:(NSError **)error; ++ (BOOL)deleteAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects error:(NSError **)error; -/*! - @abstract Deletes a collection of objects all at once asynchronously. +/** + Deletes a collection of objects all at once asynchronously. @param objects The array of objects to delete. - @returns The task that encapsulates the work being done. + @return The task that encapsulates the work being done. */ -+ (BFTask *)deleteAllInBackground:(NSArray *)objects; ++ (BFTask PF_GENERIC(NSNumber *)*)deleteAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects; -/*! - @abstract Deletes a collection of objects all at once *asynchronously* and executes the block when done. +/** + Deletes a collection of objects all at once *asynchronously* and executes the block when done. @param objects The array of objects to delete. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -+ (void)deleteAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; ++ (void)deleteAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects + block:(nullable PFBooleanResultBlock)block; -/*! - @abstract Deletes a collection of objects all at once *asynchronously* and calls a callback when done. +/* + Deletes a collection of objects all at once *asynchronously* and calls a callback when done. @param objects The array of objects to delete. @param target The object to call selector on. @@ -448,51 +473,51 @@ NS_REQUIRES_PROPERTY_DEFINITIONS `error` will be `nil` on success and set if there was an error. `[result boolValue]` will tell you whether the call succeeded or not. */ -+ (void)deleteAllInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; ++ (void)deleteAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects + target:(nullable id)target + selector:(nullable SEL)selector; ///-------------------------------------- /// @name Getting an Object ///-------------------------------------- -/*! - @abstract Gets whether the `PFObject` has been fetched. +/** + Gets whether the `PFObject` has been fetched. - @returns `YES` if the PFObject is new or has been fetched or refreshed, otherwise `NO`. + @return `YES` if the PFObject is new or has been fetched or refreshed, otherwise `NO`. */ -- (BOOL)isDataAvailable; +@property (nonatomic, assign, readonly, getter=isDataAvailable) BOOL dataAvailable; #if PARSE_IOS_ONLY -/*! - @abstract Refreshes the PFObject with the current data from the server. +/** + Refreshes the PFObject with the current data from the server. @deprecated Please use `-fetch` instead. */ -- (void)refresh PARSE_DEPRECATED("Please use `-fetch` instead."); +- (nullable instancetype)refresh PF_SWIFT_UNAVAILABLE PARSE_DEPRECATED("Please use `-fetch` instead."); -/*! - @abstract *Synchronously* refreshes the `PFObject` with the current data from the server and sets an error if it occurs. +/** + *Synchronously* refreshes the `PFObject` with the current data from the server and sets an error if it occurs. @param error Pointer to an `NSError` that will be set if necessary. @deprecated Please use `-fetch:` instead. */ -- (void)refresh:(NSError **)error PARSE_DEPRECATED("Please use `-fetch:` instead."); +- (nullable instancetype)refresh:(NSError **)error PARSE_DEPRECATED("Please use `-fetch:` instead."); -/*! - @abstract *Asynchronously* refreshes the `PFObject` and executes the given callback block. +/** + *Asynchronously* refreshes the `PFObject` and executes the given callback block. @param block The block to execute. The block should have the following argument signature: `^(PFObject *object, NSError *error)` @deprecated Please use `-fetchInBackgroundWithBlock:` instead. */ -- (void)refreshInBackgroundWithBlock:(PFObjectResultBlock)block PARSE_DEPRECATED("Please use `-fetchInBackgroundWithBlock:` instead."); +- (void)refreshInBackgroundWithBlock:(nullable PFObjectResultBlock)block PARSE_DEPRECATED("Please use `-fetchInBackgroundWithBlock:` instead."); -/*! - @abstract *Asynchronously* refreshes the `PFObject` and calls the given callback. +/* + *Asynchronously* refreshes the `PFObject` and calls the given callback. @param target The target on which the selector will be called. @param selector The selector to call. @@ -502,51 +527,51 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @deprecated Please use `fetchInBackgroundWithTarget:selector:` instead. */ -- (void)refreshInBackgroundWithTarget:(id)target - selector:(SEL)selector PARSE_DEPRECATED("Please use `fetchInBackgroundWithTarget:selector:` instead."); +- (void)refreshInBackgroundWithTarget:(nullable id)target + selector:(nullable SEL)selector PARSE_DEPRECATED("Please use `fetchInBackgroundWithTarget:selector:` instead."); #endif -/*! - @abstract *Synchronously* fetches the PFObject with the current data from the server. +/** + *Synchronously* fetches the PFObject with the current data from the server. */ -- (void)fetch; -/*! - @abstract *Synchronously* fetches the PFObject with the current data from the server and sets an error if it occurs. +- (nullable instancetype)fetch PF_SWIFT_UNAVAILABLE; +/** + *Synchronously* fetches the PFObject with the current data from the server and sets an error if it occurs. @param error Pointer to an `NSError` that will be set if necessary. */ -- (void)fetch:(NSError **)error; +- (nullable instancetype)fetch:(NSError **)error; -/*! - @abstract *Synchronously* fetches the `PFObject` data from the server if is `NO`. +/** + *Synchronously* fetches the `PFObject` data from the server if `dataAvailable` is `NO`. */ -- (PFObject *)fetchIfNeeded; +- (nullable instancetype)fetchIfNeeded PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* fetches the `PFObject` data from the server if is `NO`. +/** + *Synchronously* fetches the `PFObject` data from the server if `dataAvailable` is `NO`. @param error Pointer to an `NSError` that will be set if necessary. */ -- (PFObject *)fetchIfNeeded:(NSError **)error; +- (nullable instancetype)fetchIfNeeded:(NSError **)error; -/*! - @abstract Fetches the `PFObject` *asynchronously* and sets it as a result for the task. +/** + Fetches the `PFObject` *asynchronously* and sets it as a result for the task. - @returns The task that encapsulates the work being done. + @return The task that encapsulates the work being done. */ -- (BFTask *)fetchInBackground; +- (BFTask PF_GENERIC(__kindof PFObject *)*)fetchInBackground; -/*! - @abstract Fetches the PFObject *asynchronously* and executes the given callback block. +/** + Fetches the `PFObject` *asynchronously* and executes the given callback block. @param block The block to execute. It should have the following argument signature: `^(PFObject *object, NSError *error)`. */ -- (void)fetchInBackgroundWithBlock:(PFObjectResultBlock)block; +- (void)fetchInBackgroundWithBlock:(nullable PFObjectResultBlock)block; -/*! - @abstract Fetches the `PFObject *asynchronously* and calls the given callback. +/* + Fetches the `PFObject *asynchronously* and calls the given callback. @param target The target on which the selector will be called. @param selector The selector to call. @@ -554,26 +579,26 @@ NS_REQUIRES_PROPERTY_DEFINITIONS `error` will be `nil` on success and set if there was an error. `refreshedObject` will be the `PFObject` with the refreshed data. */ -- (void)fetchInBackgroundWithTarget:(id)target selector:(SEL)selector; +- (void)fetchInBackgroundWithTarget:(nullable id)target selector:(nullable SEL)selector; -/*! - @abstract Fetches the `PFObject` data *asynchronously* if isDataAvailable is `NO`, +/** + Fetches the `PFObject` data *asynchronously* if `dataAvailable` is `NO`, then sets it as a result for the task. - @returns The task that encapsulates the work being done. + @return The task that encapsulates the work being done. */ -- (BFTask *)fetchIfNeededInBackground; +- (BFTask PF_GENERIC(__kindof PFObject *)*)fetchIfNeededInBackground; -/*! - @abstract Fetches the `PFObject` data *asynchronously* if is `NO`, then calls the callback block. +/** + Fetches the `PFObject` data *asynchronously* if `dataAvailable` is `NO`, then calls the callback block. @param block The block to execute. It should have the following argument signature: `^(PFObject *object, NSError *error)`. */ -- (void)fetchIfNeededInBackgroundWithBlock:(PFObjectResultBlock)block; +- (void)fetchIfNeededInBackgroundWithBlock:(nullable PFObjectResultBlock)block; -/*! - @abstract Fetches the PFObject's data asynchronously if isDataAvailable is false, then calls the callback. +/* + Fetches the PFObject's data asynchronously if `dataAvailable` is `NO`, then calls the callback. @param target The target on which the selector will be called. @param selector The selector to call. @@ -581,66 +606,67 @@ NS_REQUIRES_PROPERTY_DEFINITIONS `error` will be `nil` on success and set if there was an error. `refreshedObject` will be the `PFObject` with the refreshed data. */ -- (void)fetchIfNeededInBackgroundWithTarget:(id)target - selector:(SEL)selector; +- (void)fetchIfNeededInBackgroundWithTarget:(nullable id)target selector:(nullable SEL)selector; ///-------------------------------------- /// @name Getting Many Objects ///-------------------------------------- -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server. +/** + *Synchronously* fetches all of the `PFObject` objects with the current data from the server. @param objects The list of objects to fetch. */ -+ (void)fetchAll:(NSArray *)objects; ++ (nullable NSArray PF_GENERIC(__kindof PFObject *)*)fetchAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server +/** + *Synchronously* fetches all of the `PFObject` objects with the current data from the server and sets an error if it occurs. @param objects The list of objects to fetch. @param error Pointer to an `NSError` that will be set if necessary. */ -+ (void)fetchAll:(NSArray *)objects error:(NSError **)error; ++ (nullable NSArray PF_GENERIC(__kindof PFObject *)*)fetchAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects + error:(NSError **)error; -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server. +/** + *Synchronously* fetches all of the `PFObject` objects with the current data from the server. @param objects The list of objects to fetch. */ -+ (void)fetchAllIfNeeded:(NSArray *)objects; ++ (nullable NSArray PF_GENERIC(__kindof PFObject *)*)fetchAllIfNeeded:(nullable NSArray PF_GENERIC(PFObject *)*)objects PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server +/** + *Synchronously* fetches all of the `PFObject` objects with the current data from the server and sets an error if it occurs. @param objects The list of objects to fetch. @param error Pointer to an `NSError` that will be set if necessary. */ -+ (void)fetchAllIfNeeded:(NSArray *)objects error:(NSError **)error; ++ (nullable NSArray PF_GENERIC(__kindof PFObject *)*)fetchAllIfNeeded:(nullable NSArray PF_GENERIC(PFObject *)*)objects + error:(NSError **)error; -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously*. +/** + Fetches all of the `PFObject` objects with the current data from the server *asynchronously*. @param objects The list of objects to fetch. - @returns The task that encapsulates the work being done. + @return The task that encapsulates the work being done. */ -+ (BFTask *)fetchAllInBackground:(NSArray *)objects; ++ (BFTask PF_GENERIC(NSArray<__kindof PFObject *> *)*)fetchAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects; -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously* +/** + Fetches all of the `PFObject` objects with the current data from the server *asynchronously* and calls the given block. @param objects The list of objects to fetch. @param block The block to execute. It should have the following argument signature: `^(NSArray *objects, NSError *error)`. */ -+ (void)fetchAllInBackground:(NSArray *)objects - block:(PFArrayResultBlock)block; ++ (void)fetchAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects + block:(nullable PFArrayResultBlock)block; -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously* +/* + Fetches all of the `PFObject` objects with the current data from the server *asynchronously* and calls the given callback. @param objects The list of objects to fetch. @@ -650,32 +676,32 @@ NS_REQUIRES_PROPERTY_DEFINITIONS `error` will be `nil` on success and set if there was an error. `fetchedObjects` will the array of `PFObject` objects that were fetched. */ -+ (void)fetchAllInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; ++ (void)fetchAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects + target:(nullable id)target + selector:(nullable SEL)selector; -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously*. +/** + Fetches all of the `PFObject` objects with the current data from the server *asynchronously*. @param objects The list of objects to fetch. - @returns The task that encapsulates the work being done. + @return The task that encapsulates the work being done. */ -+ (BFTask *)fetchAllIfNeededInBackground:(NSArray *)objects; ++ (BFTask PF_GENERIC(NSArray<__kindof PFObject *> *)*)fetchAllIfNeededInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects; -/*! - @abstract Fetches all of the PFObjects with the current data from the server *asynchronously* +/** + Fetches all of the PFObjects with the current data from the server *asynchronously* and calls the given block. @param objects The list of objects to fetch. @param block The block to execute. It should have the following argument signature: `^(NSArray *objects, NSError *error)`. */ -+ (void)fetchAllIfNeededInBackground:(NSArray *)objects - block:(PFArrayResultBlock)block; ++ (void)fetchAllIfNeededInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects + block:(nullable PFArrayResultBlock)block; -/*! - @abstract Fetches all of the PFObjects with the current data from the server *asynchronously* +/* + Fetches all of the PFObjects with the current data from the server *asynchronously* and calls the given callback. @param objects The list of objects to fetch. @@ -685,85 +711,85 @@ NS_REQUIRES_PROPERTY_DEFINITIONS `error` will be `nil` on success and set if there was an error. `fetchedObjects` will the array of `PFObject` objects that were fetched. */ -+ (void)fetchAllIfNeededInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; ++ (void)fetchAllIfNeededInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects + target:(nullable id)target + selector:(nullable SEL)selector; ///-------------------------------------- /// @name Fetching From Local Datastore ///-------------------------------------- -/*! - @abstract *Synchronously* loads data from the local datastore into this object, +/** + *Synchronously* loads data from the local datastore into this object, if it has not been fetched from the server already. */ -- (void)fetchFromLocalDatastore; +- (nullable instancetype)fetchFromLocalDatastore PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* loads data from the local datastore into this object, if it has not been fetched +/** + *Synchronously* loads data from the local datastore into this object, if it has not been fetched from the server already. - @discussion If the object is not stored in the local datastore, this `error` will be set to - return kPFErrorCacheMiss. + If the object is not stored in the local datastore, this `error` will be set to + return `kPFErrorCacheMiss`. @param error Pointer to an `NSError` that will be set if necessary. */ -- (void)fetchFromLocalDatastore:(NSError **)error; +- (nullable instancetype)fetchFromLocalDatastore:(NSError **)error; -/*! - @abstract *Asynchronously* loads data from the local datastore into this object, +/** + *Asynchronously* loads data from the local datastore into this object, if it has not been fetched from the server already. @return The task that encapsulates the work being done. */ -- (BFTask *)fetchFromLocalDatastoreInBackground; +- (BFTask PF_GENERIC(__kindof PFObject *)*)fetchFromLocalDatastoreInBackground; -/*! - @abstract *Asynchronously* loads data from the local datastore into this object, +/** + *Asynchronously* loads data from the local datastore into this object, if it has not been fetched from the server already. @param block The block to execute. It should have the following argument signature: `^(PFObject *object, NSError *error)`. */ -- (void)fetchFromLocalDatastoreInBackgroundWithBlock:(PFObjectResultBlock)block; +- (void)fetchFromLocalDatastoreInBackgroundWithBlock:(nullable PFObjectResultBlock)block; ///-------------------------------------- /// @name Deleting an Object ///-------------------------------------- -/*! - @abstract *Synchronously* deletes the `PFObject`. +/** + *Synchronously* deletes the `PFObject`. - @returns Returns whether the delete succeeded. + @return Returns whether the delete succeeded. */ -- (BOOL)delete; +- (BOOL)delete PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* deletes the `PFObject` and sets an error if it occurs. +/** + *Synchronously* deletes the `PFObject` and sets an error if it occurs. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns whether the delete succeeded. + @return Returns whether the delete succeeded. */ - (BOOL)delete:(NSError **)error; -/*! - @abstract Deletes the `PFObject` *asynchronously*. +/** + Deletes the `PFObject` *asynchronously*. - @returns The task that encapsulates the work being done. + @return The task that encapsulates the work being done. */ -- (BFTask *)deleteInBackground; +- (BFTask PF_GENERIC(NSNumber *)*)deleteInBackground; -/*! - @abstract Deletes the `PFObject` *asynchronously* and executes the given callback block. +/** + Deletes the `PFObject` *asynchronously* and executes the given callback block. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -- (void)deleteInBackgroundWithBlock:(PFBooleanResultBlock)block; +- (void)deleteInBackgroundWithBlock:(nullable PFBooleanResultBlock)block; -/*! - @abstract Deletes the `PFObject` *asynchronously* and calls the given callback. +/* + Deletes the `PFObject` *asynchronously* and calls the given callback. @param target The object to call selector on. @param selector The selector to call. @@ -771,160 +797,161 @@ NS_REQUIRES_PROPERTY_DEFINITIONS `error` will be `nil` on success and set if there was an error. `[result boolValue]` will tell you whether the call succeeded or not. */ -- (void)deleteInBackgroundWithTarget:(id)target - selector:(SEL)selector; +- (void)deleteInBackgroundWithTarget:(nullable id)target + selector:(nullable SEL)selector; -/*! - @abstract Deletes this object from the server at some unspecified time in the future, +/** + Deletes this object from the server at some unspecified time in the future, even if Parse is currently inaccessible. - @discussion Use this when you may not have a solid network connection, + Use this when you may not have a solid network connection, and don't need to know when the delete completes. If there is some problem with the object such that it can't be deleted, the request will be silently discarded. Delete instructions made with this method will be stored locally in an on-disk cache until they can be transmitted to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is available. Delete requests will persist even after the app is closed, in which case they will be sent the - next time the app is opened. If more than 10MB of or commands are waiting - to be sent, subsequent calls to or will cause old requests to be silently discarded + next time the app is opened. If more than 10MB of `-saveEventually` or `-deleteEventually` commands are waiting + to be sent, subsequent calls to `-saveEventually` or `-deleteEventually` will cause old requests to be silently discarded until the connection can be re-established, and the queued requests can go through. + + @return The task that encapsulates the work being done. */ -- (void)deleteEventually; +- (BFTask PF_GENERIC(NSNumber *)*)deleteEventually PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE; ///-------------------------------------- /// @name Dirtiness ///-------------------------------------- -/*! - @abstract Gets whether any key-value pair in this object (or its children) +/** + Gets whether any key-value pair in this object (or its children) has been added/updated/removed and not saved yet. - @returns Returns whether this object has been altered and not saved yet. + @return Returns whether this object has been altered and not saved yet. */ -- (BOOL)isDirty; +@property (nonatomic, assign, readonly, getter=isDirty) BOOL dirty; -/*! - @abstract Get whether a value associated with a key has been added/updated/removed and not saved yet. +/** + Get whether a value associated with a key has been added/updated/removed and not saved yet. @param key The key to check for - @returns Returns whether this key has been altered and not saved yet. + @return Returns whether this key has been altered and not saved yet. */ - (BOOL)isDirtyForKey:(NSString *)key; - ///-------------------------------------- /// @name Pinning ///-------------------------------------- -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively, +/** + *Synchronously* stores the object and every object it points to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `-fetchFromLocalDatastore` on it. @return Returns whether the pin succeeded. - @see unpin: - @see PFObjectDefaultPin + @see `-unpin:` + @see `PFObjectDefaultPin` */ -- (BOOL)pin; +- (BOOL)pin PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively, +/** + *Synchronously* stores the object and every object it points to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `-fetchFromLocalDatastore` on it. @param error Pointer to an `NSError` that will be set if necessary. @return Returns whether the pin succeeded. - @see unpin: - @see PFObjectDefaultPin + @see `-unpin:` + @see `PFObjectDefaultPin` */ - (BOOL)pin:(NSError **)error; -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively. +/** + *Synchronously* stores the object and every object it points to in the local datastore, recursively. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `-fetchFromLocalDatastore` on it. @param name The name of the pin. @return Returns whether the pin succeeded. - @see unpinWithName: + @see `-unpinWithName:` */ -- (BOOL)pinWithName:(NSString *)name; +- (BOOL)pinWithName:(NSString *)name PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively. +/** + *Synchronously* stores the object and every object it points to in the local datastore, recursively. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `-fetchFromLocalDatastore` on it. @param name The name of the pin. @param error Pointer to an `NSError` that will be set if necessary. @return Returns whether the pin succeeded. - @see unpinWithName: + @see `-unpinWithName:` */ - (BOOL)pinWithName:(NSString *)name error:(NSError **)error; -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively, +/** + *Asynchronously* stores the object and every object it points to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `-fetchFromLocalDatastore` on it. @return The task that encapsulates the work being done. - @see unpinInBackground: - @see PFObjectDefaultPin + @see `-unpinInBackground` + @see `PFObjectDefaultPin` */ -- (BFTask *)pinInBackground; +- (BFTask PF_GENERIC(NSNumber *)*)pinInBackground; -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively, +/** + *Asynchronously* stores the object and every object it points to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `-fetchFromLocalDatastore` on it. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - @see unpinInBackgroundWithBlock: - @see PFObjectDefaultPin + @see `-unpinInBackgroundWithBlock:` + @see `PFObjectDefaultPin` */ -- (void)pinInBackgroundWithBlock:(PFBooleanResultBlock)block; +- (void)pinInBackgroundWithBlock:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively. +/** + *Asynchronously* stores the object and every object it points to in the local datastore, recursively. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `-fetchFromLocalDatastore on it. @param name The name of the pin. @@ -932,15 +959,15 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinInBackgroundWithName: */ -- (BFTask *)pinInBackgroundWithName:(NSString *)name; +- (BFTask PF_GENERIC(NSNumber *)*)pinInBackgroundWithName:(NSString *)name; -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively. +/** + *Asynchronously* stores the object and every object it points to in the local datastore, recursively. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `-fetchFromLocalDatastore` on it. @param name The name of the pin. @param block The block to execute. @@ -948,21 +975,20 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinInBackgroundWithName:block: */ -- (void)pinInBackgroundWithName:(NSString *)name - block:(PFBooleanResultBlock)block; +- (void)pinInBackgroundWithName:(NSString *)name block:(nullable PFBooleanResultBlock)block; ///-------------------------------------- /// @name Pinning Many Objects ///-------------------------------------- -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively, +/** + *Synchronously* stores the objects and every object they point to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `fetchFromLocalDatastore:` on it. @param objects The objects to be pinned. @@ -971,16 +997,16 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinAll: @see PFObjectDefaultPin */ -+ (BOOL)pinAll:(NSArray *)objects; ++ (BOOL)pinAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively, +/** + *Synchronously* stores the objects and every object they point to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `fetchFromLocalDatastore:` on it. @param objects The objects to be pinned. @param error Pointer to an `NSError` that will be set if necessary. @@ -990,15 +1016,15 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinAll:error: @see PFObjectDefaultPin */ -+ (BOOL)pinAll:(NSArray *)objects error:(NSError **)error; ++ (BOOL)pinAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects error:(NSError **)error; -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively. +/** + *Synchronously* stores the objects and every object they point to in the local datastore, recursively. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `fetchFromLocalDatastore:` on it. @param objects The objects to be pinned. @param name The name of the pin. @@ -1007,15 +1033,15 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinAll:withName: */ -+ (BOOL)pinAll:(NSArray *)objects withName:(NSString *)name; ++ (BOOL)pinAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects withName:(NSString *)name PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively. +/** + *Synchronously* stores the objects and every object they point to in the local datastore, recursively. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `fetchFromLocalDatastore:` on it. @param objects The objects to be pinned. @param name The name of the pin. @@ -1025,18 +1051,18 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinAll:withName:error: */ -+ (BOOL)pinAll:(NSArray *)objects ++ (BOOL)pinAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects withName:(NSString *)name error:(NSError **)error; -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively, +/** + *Asynchronously* stores the objects and every object they point to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `fetchFromLocalDatastore:` on it. @param objects The objects to be pinned. @@ -1045,16 +1071,16 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinAllInBackground: @see PFObjectDefaultPin */ -+ (BFTask *)pinAllInBackground:(NSArray *)objects; ++ (BFTask PF_GENERIC(NSNumber *)*)pinAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects; -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively, +/** + *Asynchronously* stores the objects and every object they point to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `fetchFromLocalDatastore:` on it. @param objects The objects to be pinned. @param block The block to execute. @@ -1063,16 +1089,15 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinAllInBackground:block: @see PFObjectDefaultPin */ -+ (void)pinAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; ++ (void)pinAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects block:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively. +/** + *Asynchronously* stores the objects and every object they point to in the local datastore, recursively. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `fetchFromLocalDatastore:` on it. @param objects The objects to be pinned. @param name The name of the pin. @@ -1081,16 +1106,15 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinAllInBackground:withName: */ -+ (BFTask *)pinAllInBackground:(NSArray *)objects - withName:(NSString *)name; ++ (BFTask PF_GENERIC(NSNumber *)*)pinAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects withName:(NSString *)name; -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively. +/** + *Asynchronously* stores the objects and every object they point to in the local datastore, recursively. - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, + If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. + use a `PFQuery` that uses `PFQuery.-fromLocalDatastore`, or you can create an unfetched pointer with + `+objectWithoutDataWithClassName:objectId:` and then call `fetchFromLocalDatastore:` on it. @param objects The objects to be pinned. @param name The name of the pin. @@ -1099,16 +1123,16 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see unpinAllInBackground:withName:block: */ -+ (void)pinAllInBackground:(NSArray *)objects ++ (void)pinAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects withName:(NSString *)name - block:(PFBooleanResultBlock)block; + block:(nullable PFBooleanResultBlock)block; ///-------------------------------------- /// @name Unpinning ///-------------------------------------- -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively, +/** + *Synchronously* removes the object and every object it points to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. @return Returns whether the unpin succeeded. @@ -1116,10 +1140,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pin: @see PFObjectDefaultPin */ -- (BOOL)unpin; +- (BOOL)unpin PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively, +/** + *Synchronously* removes the object and every object it points to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. @param error Pointer to an `NSError` that will be set if necessary. @@ -1131,8 +1155,8 @@ NS_REQUIRES_PROPERTY_DEFINITIONS */ - (BOOL)unpin:(NSError **)error; -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively. +/** + *Synchronously* removes the object and every object it points to in the local datastore, recursively. @param name The name of the pin. @@ -1140,10 +1164,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinWithName: */ -- (BOOL)unpinWithName:(NSString *)name; +- (BOOL)unpinWithName:(NSString *)name PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively. +/** + *Synchronously* removes the object and every object it points to in the local datastore, recursively. @param name The name of the pin. @param error Pointer to an `NSError` that will be set if necessary. @@ -1155,19 +1179,19 @@ NS_REQUIRES_PROPERTY_DEFINITIONS - (BOOL)unpinWithName:(NSString *)name error:(NSError **)error; -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively, +/** + *Asynchronously* removes the object and every object it points to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. @return The task that encapsulates the work being done. - @see pinInBackground: + @see pinInBackground @see PFObjectDefaultPin */ -- (BFTask *)unpinInBackground; +- (BFTask PF_GENERIC(NSNumber *)*)unpinInBackground; -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively, +/** + *Asynchronously* removes the object and every object it points to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. @param block The block to execute. @@ -1176,10 +1200,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinInBackgroundWithBlock: @see PFObjectDefaultPin */ -- (void)unpinInBackgroundWithBlock:(PFBooleanResultBlock)block; +- (void)unpinInBackgroundWithBlock:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively. +/** + *Asynchronously* removes the object and every object it points to in the local datastore, recursively. @param name The name of the pin. @@ -1187,10 +1211,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinInBackgroundWithName: */ -- (BFTask *)unpinInBackgroundWithName:(NSString *)name; +- (BFTask PF_GENERIC(NSNumber *)*)unpinInBackgroundWithName:(NSString *)name; -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively. +/** + *Asynchronously* removes the object and every object it points to in the local datastore, recursively. @param name The name of the pin. @param block The block to execute. @@ -1198,25 +1222,24 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinInBackgroundWithName:block: */ -- (void)unpinInBackgroundWithName:(NSString *)name - block:(PFBooleanResultBlock)block; +- (void)unpinInBackgroundWithName:(NSString *)name block:(nullable PFBooleanResultBlock)block; ///-------------------------------------- /// @name Unpinning Many Objects ///-------------------------------------- -/*! - @abstract *Synchronously* removes all objects in the local datastore +/** + *Synchronously* removes all objects in the local datastore using a default pin name: `PFObjectDefaultPin`. @return Returns whether the unpin succeeded. @see PFObjectDefaultPin */ -+ (BOOL)unpinAllObjects; ++ (BOOL)unpinAllObjects PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* removes all objects in the local datastore +/** + *Synchronously* removes all objects in the local datastore using a default pin name: `PFObjectDefaultPin`. @param error Pointer to an `NSError` that will be set if necessary. @@ -1227,17 +1250,17 @@ NS_REQUIRES_PROPERTY_DEFINITIONS */ + (BOOL)unpinAllObjects:(NSError **)error; -/*! - @abstract *Synchronously* removes all objects with the specified pin name. +/** + *Synchronously* removes all objects with the specified pin name. @param name The name of the pin. @return Returns whether the unpin succeeded. */ -+ (BOOL)unpinAllObjectsWithName:(NSString *)name; ++ (BOOL)unpinAllObjectsWithName:(NSString *)name PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* removes all objects with the specified pin name. +/** + *Synchronously* removes all objects with the specified pin name. @param name The name of the pin. @param error Pointer to an `NSError` that will be set if necessary. @@ -1247,18 +1270,18 @@ NS_REQUIRES_PROPERTY_DEFINITIONS + (BOOL)unpinAllObjectsWithName:(NSString *)name error:(NSError **)error; -/*! - @abstract *Asynchronously* removes all objects in the local datastore +/** + *Asynchronously* removes all objects in the local datastore using a default pin name: `PFObjectDefaultPin`. @return The task that encapsulates the work being done. @see PFObjectDefaultPin */ -+ (BFTask *)unpinAllObjectsInBackground; ++ (BFTask PF_GENERIC(NSNumber *)*)unpinAllObjectsInBackground; -/*! - @abstract *Asynchronously* removes all objects in the local datastore +/** + *Asynchronously* removes all objects in the local datastore using a default pin name: `PFObjectDefaultPin`. @param block The block to execute. @@ -1266,29 +1289,28 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see PFObjectDefaultPin */ -+ (void)unpinAllObjectsInBackgroundWithBlock:(PFBooleanResultBlock)block; ++ (void)unpinAllObjectsInBackgroundWithBlock:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* removes all objects with the specified pin name. +/** + *Asynchronously* removes all objects with the specified pin name. @param name The name of the pin. @return The task that encapsulates the work being done. */ -+ (BFTask *)unpinAllObjectsInBackgroundWithName:(NSString *)name; ++ (BFTask PF_GENERIC(NSNumber *)*)unpinAllObjectsInBackgroundWithName:(NSString *)name; -/*! - @abstract *Asynchronously* removes all objects with the specified pin name. +/** + *Asynchronously* removes all objects with the specified pin name. @param name The name of the pin. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -+ (void)unpinAllObjectsInBackgroundWithName:(NSString *)name - block:(PFBooleanResultBlock)block; ++ (void)unpinAllObjectsInBackgroundWithName:(NSString *)name block:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively, +/** + *Synchronously* removes the objects and every object they point to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. @param objects The objects. @@ -1298,10 +1320,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinAll: @see PFObjectDefaultPin */ -+ (BOOL)unpinAll:(NSArray *)objects; ++ (BOOL)unpinAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively, +/** + *Synchronously* removes the objects and every object they point to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. @param objects The objects. @@ -1312,10 +1334,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinAll:error: @see PFObjectDefaultPin */ -+ (BOOL)unpinAll:(NSArray *)objects error:(NSError **)error; ++ (BOOL)unpinAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects error:(NSError **)error; -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively. +/** + *Synchronously* removes the objects and every object they point to in the local datastore, recursively. @param objects The objects. @param name The name of the pin. @@ -1324,10 +1346,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinAll:withName: */ -+ (BOOL)unpinAll:(NSArray *)objects withName:(NSString *)name; ++ (BOOL)unpinAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects withName:(NSString *)name PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively. +/** + *Synchronously* removes the objects and every object they point to in the local datastore, recursively. @param objects The objects. @param name The name of the pin. @@ -1337,12 +1359,12 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinAll:withName:error: */ -+ (BOOL)unpinAll:(NSArray *)objects ++ (BOOL)unpinAll:(nullable NSArray PF_GENERIC(PFObject *)*)objects withName:(NSString *)name error:(NSError **)error; -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively, +/** + *Asynchronously* removes the objects and every object they point to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. @param objects The objects. @@ -1352,10 +1374,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinAllInBackground: @see PFObjectDefaultPin */ -+ (BFTask *)unpinAllInBackground:(NSArray *)objects; ++ (BFTask PF_GENERIC(NSNumber *)*)unpinAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects; -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively, +/** + *Asynchronously* removes the objects and every object they point to in the local datastore, recursively, using a default pin name: `PFObjectDefaultPin`. @param objects The objects. @@ -1365,11 +1387,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinAllInBackground:block: @see PFObjectDefaultPin */ -+ (void)unpinAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; ++ (void)unpinAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects block:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively. +/** + *Asynchronously* removes the objects and every object they point to in the local datastore, recursively. @param objects The objects. @param name The name of the pin. @@ -1378,11 +1399,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinAllInBackground:withName: */ -+ (BFTask *)unpinAllInBackground:(NSArray *)objects - withName:(NSString *)name; ++ (BFTask PF_GENERIC(NSNumber *)*)unpinAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects withName:(NSString *)name; -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively. +/** + *Asynchronously* removes the objects and every object they point to in the local datastore, recursively. @param objects The objects. @param name The name of the pin. @@ -1391,8 +1411,10 @@ NS_REQUIRES_PROPERTY_DEFINITIONS @see pinAllInBackground:withName:block: */ -+ (void)unpinAllInBackground:(NSArray *)objects ++ (void)unpinAllInBackground:(nullable NSArray PF_GENERIC(PFObject *)*)objects withName:(NSString *)name - block:(PFBooleanResultBlock)block; + block:(nullable PFBooleanResultBlock)block; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFProduct.h b/iOS/Parse.framework/Headers/PFProduct.h index cd57a25..95107db 100644 --- a/iOS/Parse.framework/Headers/PFProduct.h +++ b/iOS/Parse.framework/Headers/PFProduct.h @@ -1,76 +1,72 @@ -// -// PFProduct.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import #import #import #import -/*! +PF_OSX_UNAVAILABLE_WARNING +PF_WATCH_UNAVAILABLE_WARNING + +NS_ASSUME_NONNULL_BEGIN + +/** The `PFProduct` class represents an in-app purchase product on the Parse server. By default, products can only be created via the Data Browser. Saving a `PFProduct` will result in error. However, the products' metadata information can be queried and viewed. This class is currently for iOS only. */ -@interface PFProduct : PFObject - -/*! - @abstract The name of the Installation class in the REST API. - - @discussion This is a required PFSubclassing method. - */ -+ (NSString *)parseClassName; - -///-------------------------------------- -/// @name Querying for Products -///-------------------------------------- - -/*! - @abstract A that could be used to fetch all product instances from Parse. - */ -+ (PFQuery *)query; +PF_OSX_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFProduct : PFObject ///-------------------------------------- /// @name Product-specific Properties ///-------------------------------------- -/*! - @abstract The product identifier of the product. +/** + The product identifier of the product. - @discussion This should match the product identifier in iTunes Connect exactly. + This should match the product identifier in iTunes Connect exactly. */ -@property (nonatomic, strong) NSString *productIdentifier; +@property (nullable, nonatomic, strong) NSString *productIdentifier; -/*! - @abstract The icon of the product. +/** + The icon of the product. */ -@property (nonatomic, strong) PFFile *icon; +@property (nullable, nonatomic, strong) PFFile *icon; -/*! - @abstract The title of the product. - */ -@property (nonatomic, strong) NSString *title; +/** + The title of the product. + */ +@property (nullable, nonatomic, strong) NSString *title; -/*! - @abstract The subtitle of the product. +/** + The subtitle of the product. */ -@property (nonatomic, strong) NSString *subtitle; +@property (nullable, nonatomic, strong) NSString *subtitle; -/*! - @abstract The order in which the product information is displayed in . +/** + The order in which the product information is displayed in `PFProductTableViewController`. - @discussion The product with a smaller order is displayed earlier in the . + The product with a smaller order is displayed earlier in the `PFProductTableViewController`. */ -@property (nonatomic, strong) NSNumber *order; +@property (nullable, nonatomic, strong) NSNumber *order; -/*! - @abstract The name of the associated download. +/** + The name of the associated download. - @discussion If there is no downloadable asset, it should be `nil`. + If there is no downloadable asset, it should be `nil`. */ -@property (nonatomic, strong, readonly) NSString *downloadName; +@property (nullable, nonatomic, strong, readonly) NSString *downloadName; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFProductTableViewController.h b/iOS/Parse.framework/Headers/PFProductTableViewController.h deleted file mode 100644 index 5d8c58b..0000000 --- a/iOS/Parse.framework/Headers/PFProductTableViewController.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// PFProductsTableViewController.h -// Parse -// -// Created by Qian Wang on 5/15/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import "PFQueryTableViewController.h" - -/*! - PFProductTableViewController displays in-app purchase products stored on Parse. - In addition to setting up in-app purchases in iTunesConnect, the app developer needs - to register product information on Parse, in the Product class. - */ -@interface PFProductTableViewController : PFQueryTableViewController - -/*! - Initializes a product table view controller. - */ -- (instancetype)init; - -@end diff --git a/iOS/Parse.framework/Headers/PFPurchase.h b/iOS/Parse.framework/Headers/PFPurchase.h index 3a8e661..3952f37 100644 --- a/iOS/Parse.framework/Headers/PFPurchase.h +++ b/iOS/Parse.framework/Headers/PFPurchase.h @@ -1,73 +1,84 @@ -// -// PFPurchase.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import #import #import +PF_OSX_UNAVAILABLE_WARNING +PF_WATCH_UNAVAILABLE_WARNING + @class PFProduct; -/*! +NS_ASSUME_NONNULL_BEGIN + +typedef void (^PFPurchaseProductObservationBlock)(SKPaymentTransaction *transaction); +typedef void (^PFPurchaseBuyProductResultBlock)(NSError *__nullable error); +typedef void (^PFPurchaseDownloadAssetResultBlock)(NSString *__nullable filePath, NSError *__nullable error); + +/** `PFPurchase` provides a set of APIs for working with in-app purchases. This class is currently for iOS only. */ -@interface PFPurchase : NSObject +PF_OSX_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPurchase : NSObject -/*! - @abstract Add application logic block which is run when buying a product. +/** + Add application logic block which is run when buying a product. - @discussion This method should be called once for each product, and should be called before - calling . All invocations to should happen within + This method should be called once for each product, and should be called before + calling `+buyProduct:block:`. All invocations to `+addObserverForProduct:block:` should happen within the same method, and on the main thread. It is recommended to place all invocations of this method in `application:didFinishLaunchingWithOptions:`. @param productIdentifier the product identifier @param block The block to be run when buying a product. */ -+ (void)addObserverForProduct:(NSString *)productIdentifier - block:(void(^)(SKPaymentTransaction *transaction))block; ++ (void)addObserverForProduct:(NSString *)productIdentifier block:(PFPurchaseProductObservationBlock)block; -/*! - @abstract *Asynchronously* initiates the purchase for the product. +/** + *Asynchronously* initiates the purchase for the product. @param productIdentifier the product identifier @param block the completion block. */ -+ (void)buyProduct:(NSString *)productIdentifier block:(void(^)(NSError *error))block; ++ (void)buyProduct:(NSString *)productIdentifier block:(nullable PFPurchaseBuyProductResultBlock)block; -/*! - @abstract *Asynchronously* download the purchased asset, which is stored on Parse's server. +/** + *Asynchronously* download the purchased asset, which is stored on Parse's server. - @discussion Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. + Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. @param transaction the transaction, which contains the receipt. @param completion the completion block. */ + (void)downloadAssetForTransaction:(SKPaymentTransaction *)transaction - completion:(void(^)(NSString *filePath, NSError *error))completion; + completion:(PFPurchaseDownloadAssetResultBlock)completion; -/*! - @abstract *Asynchronously* download the purchased asset, which is stored on Parse's server. +/** + *Asynchronously* download the purchased asset, which is stored on Parse's server. - @discussion Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. + Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. @param transaction the transaction, which contains the receipt. @param completion the completion block. @param progress the progress block, which is called multiple times to reveal progress of the download. */ + (void)downloadAssetForTransaction:(SKPaymentTransaction *)transaction - completion:(void(^)(NSString *filePath, NSError *error))completion - progress:(PFProgressBlock)progress; + completion:(PFPurchaseDownloadAssetResultBlock)completion + progress:(nullable PFProgressBlock)progress; -/*! - @abstract *Asynchronously* restore completed transactions for the current user. +/** + *Asynchronously* restore completed transactions for the current user. - @discussion Only nonconsumable purchases are restored. If observers for the products have been added before + Only nonconsumable purchases are restored. If observers for the products have been added before calling this method, invoking the method reruns the application logic associated with the purchase. @warning This method is only important to developers who want to preserve purchase states across @@ -75,13 +86,15 @@ */ + (void)restore; -/* - @abstract Returns a content path of the asset of a product, if it was purchased and downloaded. +/** + Returns a content path of the asset of a product, if it was purchased and downloaded. - @discussion To download and verify purchases use . + To download and verify purchases use `+downloadAssetForTransaction:completion:`. @warning This method will return `nil`, if the purchase wasn't verified or if the asset was not downloaded. */ -+ (NSString *)assetContentPathForProduct:(PFProduct *)product; ++ (nullable NSString *)assetContentPathForProduct:(PFProduct *)product; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFPurchaseTableViewCell.h b/iOS/Parse.framework/Headers/PFPurchaseTableViewCell.h deleted file mode 100644 index c393cf7..0000000 --- a/iOS/Parse.framework/Headers/PFPurchaseTableViewCell.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// PFPurchaseTableViewCell.h -// Parse -// -// Created by Qian Wang on 5/21/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import - -#import "PFTableViewCell.h" - -/*! - An enum that represents states of the PFPurchaseTableViewCell. - @see PFPurchaseTableViewCell - */ -typedef NS_ENUM(uint8_t, PFPurchaseTableViewCellState) { - /*! Normal state of the cell. */ - PFPurchaseTableViewCellStateNormal = 0, - /*! Downloading state of the cell. */ - PFPurchaseTableViewCellStateDownloading, - /*! State of the cell, when the product was downloaded. */ - PFPurchaseTableViewCellStateDownloaded -}; - -/*! - PFPurchaseTableViewCell is a subclass PFTableViewCell that is used to show - products in a PFProductTableViewController. - @see PFProductTableViewController - */ -@interface PFPurchaseTableViewCell : PFTableViewCell - -/*! State of the cell */ -@property (nonatomic, assign) PFPurchaseTableViewCellState state; - -/*! Label where price of the product is displayed. */ -@property (nonatomic, strong, readonly) UILabel *priceLabel; - -/*! Progress view that is shown, when the product is downloading. */ -@property (nonatomic, strong, readonly) UIProgressView *progressView; - -@end diff --git a/iOS/Parse.framework/Headers/PFPush.h b/iOS/Parse.framework/Headers/PFPush.h index 0d740f7..38fd308 100644 --- a/iOS/Parse.framework/Headers/PFPush.h +++ b/iOS/Parse.framework/Headers/PFPush.h @@ -1,119 +1,125 @@ -// -// PFPush.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import +#import + #import +#import + +PF_TV_UNAVAILABLE_WARNING +PF_WATCH_UNAVAILABLE_WARNING -@class BFTask; -@class PFQuery; +@class PFQuery PF_GENERIC(PFGenericObject : PFObject *); -/*! +NS_ASSUME_NONNULL_BEGIN + +/** The `PFPush` class defines a push notification that can be sent from a client device. The preferred way of modifying or retrieving channel subscriptions is to use - the class, instead of the class methods in `PFPush`. - - This class is currently for iOS only. Parse does not handle Push Notifications - to Parse applications running on OS X. Push Notifications can be sent from OS X - applications via Cloud Code or the REST API to push-enabled devices (e.g. iOS or Android). + the `PFInstallation` class, instead of the class methods in `PFPush`. */ -@interface PFPush : NSObject +PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPush : NSObject ///-------------------------------------- /// @name Creating a Push Notification ///-------------------------------------- -+ (PFPush *)push; ++ (instancetype)push; ///-------------------------------------- /// @name Configuring a Push Notification ///-------------------------------------- -/*! - @abstract Sets the channel on which this push notification will be sent. +/** + Sets the channel on which this push notification will be sent. @param channel The channel to set for this push. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. */ -- (void)setChannel:(NSString *)channel; +- (void)setChannel:(nullable NSString *)channel; -/*! - @abstract Sets the array of channels on which this push notification will be sent. +/** + Sets the array of channels on which this push notification will be sent. @param channels The array of channels to set for this push. Each channel name must start with a letter and contain only letters, numbers, dashes, and underscores. */ -- (void)setChannels:(NSArray *)channels; +- (void)setChannels:(nullable NSArray PF_GENERIC(NSString *)*)channels; -/*! - @abstract Sets an installation query to which this push notification will be sent. +/** + Sets an installation query to which this push notification will be sent. - @discussion The query should be created via <[PFInstallation query]> and should not specify a skip, limit, or order. + The query should be created via `PFInstallation.+query` and should not specify a skip, limit, or order. @param query The installation query to set for this push. */ -- (void)setQuery:(PFQuery *)query; +- (void)setQuery:(nullable PFQuery PF_GENERIC(PFInstallation *)*)query; -/*! - @abstract Sets an alert message for this push notification. +/** + Sets an alert message for this push notification. @warning This will overwrite any data specified in setData. @param message The message to send in this push. */ -- (void)setMessage:(NSString *)message; +- (void)setMessage:(nullable NSString *)message; -/*! - @abstract Sets an arbitrary data payload for this push notification. +/** + Sets an arbitrary data payload for this push notification. - @discussion See the guide for information about the dictionary structure. + See the guide for information about the dictionary structure. @warning This will overwrite any data specified in setMessage. @param data The data to send in this push. */ -- (void)setData:(NSDictionary *)data; +- (void)setData:(nullable NSDictionary *)data; -/*! - @abstract Sets whether this push will go to Android devices. +/** + Sets whether this push will go to Android devices. @param pushToAndroid Whether this push will go to Android devices. - @deprecated Please use a `[PFInstallation query]` with a constraint on deviceType instead. + @deprecated Please use a `PFInstallation.+query` with a constraint on deviceType instead. */ -- (void)setPushToAndroid:(BOOL)pushToAndroid PARSE_DEPRECATED("Please use a [PFInstallation query] with a constraint on deviceType."); +- (void)setPushToAndroid:(BOOL)pushToAndroid PARSE_DEPRECATED("Please use a [PFInstallation query] with a constraint on deviceType. This method is deprecated and won't do anything."); -/*! - @abstract Sets whether this push will go to iOS devices. +/** + Sets whether this push will go to iOS devices. @param pushToIOS Whether this push will go to iOS devices. - @deprecated Please use a `[PFInstallation query]` with a constraint on deviceType instead. + @deprecated Please use a `PFInstallation.+query` with a constraint on deviceType instead. */ -- (void)setPushToIOS:(BOOL)pushToIOS PARSE_DEPRECATED("Please use a [PFInstallation query] with a constraint on deviceType."); +- (void)setPushToIOS:(BOOL)pushToIOS PARSE_DEPRECATED("Please use a [PFInstallation query] with a constraint on deviceType. This method is deprecated and won't do anything."); -/*! - @abstract Sets the expiration time for this notification. +/** + Sets the expiration time for this notification. - @discussion The notification will be sent to devices which are either online + The notification will be sent to devices which are either online at the time the notification is sent, or which come online before the expiration time is reached. Because device clocks are not guaranteed to be accurate, - most applications should instead use . + most applications should instead use `-expireAfterTimeInterval:`. @see expireAfterTimeInterval: @param date The time at which the notification should expire. */ -- (void)expireAtDate:(NSDate *)date; +- (void)expireAtDate:(nullable NSDate *)date; -/*! - @abstract Sets the time interval after which this notification should expire. +/** + Sets the time interval after which this notification should expire. - @discussion This notification will be sent to devices which are either online at + This notification will be sent to devices which are either online at the time the notification is sent, or which come online within the given time interval of the notification being received by Parse's server. An interval which is less than or equal to zero indicates that the @@ -123,43 +129,52 @@ */ - (void)expireAfterTimeInterval:(NSTimeInterval)timeInterval; -/*! - @abstract Clears both expiration values, indicating that the notification should never expire. +/** + Clears both expiration values, indicating that the notification should never expire. */ - (void)clearExpiration; +/** + Date at which to send this push notification. + + Push notificaitons with this date will be delivered at the local time matching the `PFInstallation.timeZone`. + + @warning The date cannot be in the past, and can be up to two weeks in the future. + */ +@property (nullable, nonatomic, strong) NSDate *pushDate; + ///-------------------------------------- /// @name Sending Push Notifications ///-------------------------------------- -/*! - @abstract *Synchronously* send a push message to a channel. +/** + *Synchronously* send a push message to a channel. @param channel The channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @param message The message to send. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns whether the send succeeded. + @return Returns whether the send succeeded. */ + (BOOL)sendPushMessageToChannel:(NSString *)channel withMessage:(NSString *)message error:(NSError **)error; -/*! - @abstract *Asynchronously* send a push message to a channel. +/** + *Asynchronously* send a push message to a channel. @param channel The channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @param message The message to send. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)sendPushMessageToChannelInBackground:(NSString *)channel - withMessage:(NSString *)message; ++ (BFTask PF_GENERIC(NSNumber *)*)sendPushMessageToChannelInBackground:(NSString *)channel + withMessage:(NSString *)message; -/*! - @abstract *Asynchronously* sends a push message to a channel and calls the given block. +/** + *Asynchronously* sends a push message to a channel and calls the given block. @param channel The channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @@ -169,10 +184,10 @@ */ + (void)sendPushMessageToChannelInBackground:(NSString *)channel withMessage:(NSString *)message - block:(PFBooleanResultBlock)block; + block:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* send a push message to a channel. +/* + *Asynchronously* send a push message to a channel. @param channel The channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @@ -185,35 +200,35 @@ */ + (void)sendPushMessageToChannelInBackground:(NSString *)channel withMessage:(NSString *)message - target:(id)target - selector:(SEL)selector; + target:(__nullable id)target + selector:(__nullable SEL)selector; -/*! - @abstract Send a push message to a query. +/** + Send a push message to a query. - @param query The query to send to. The query must be a query created with <[PFInstallation query]>. + @param query The query to send to. The query must be a `PFInstallation` query created with `PFInstallation.+query`. @param message The message to send. @param error Pointer to an NSError that will be set if necessary. - @returns Returns whether the send succeeded. + @return Returns whether the send succeeded. */ -+ (BOOL)sendPushMessageToQuery:(PFQuery *)query ++ (BOOL)sendPushMessageToQuery:(PFQuery PF_GENERIC(PFInstallation *)*)query withMessage:(NSString *)message error:(NSError **)error; -/*! - @abstract *Asynchronously* send a push message to a query. +/** + *Asynchronously* send a push message to a query. - @param query The query to send to. The query must be a query created with <[PFInstallation query]>. + @param query The query to send to. The query must be a `PFInstallation` query created with `PFInstallation.+query`. @param message The message to send. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)sendPushMessageToQueryInBackground:(PFQuery *)query - withMessage:(NSString *)message; ++ (BFTask PF_GENERIC(NSNumber *)*)sendPushMessageToQueryInBackground:(PFQuery PF_GENERIC(PFInstallation *)*)query + withMessage:(NSString *)message; -/*! - @abstract *Asynchronously* sends a push message to a query and calls the given block. +/** + *Asynchronously* sends a push message to a query and calls the given block. @param query The query to send to. The query must be a PFInstallation query created with [PFInstallation query]. @@ -221,35 +236,35 @@ @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)` */ -+ (void)sendPushMessageToQueryInBackground:(PFQuery *)query ++ (void)sendPushMessageToQueryInBackground:(PFQuery PF_GENERIC(PFInstallation *)*)query withMessage:(NSString *)message - block:(PFBooleanResultBlock)block; + block:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Synchronously* send this push message. +/** + *Synchronously* send this push message. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns whether the send succeeded. + @return Returns whether the send succeeded. */ - (BOOL)sendPush:(NSError **)error; -/*! - @abstract *Asynchronously* send this push message. - @returns The task, that encapsulates the work being done. +/** + *Asynchronously* send this push message. + @return The task, that encapsulates the work being done. */ -- (BFTask *)sendPushInBackground; +- (BFTask PF_GENERIC(NSNumber *)*)sendPushInBackground; -/*! - @abstract *Asynchronously* send this push message and executes the given callback block. +/** + *Asynchronously* send this push message and executes the given callback block. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -- (void)sendPushInBackgroundWithBlock:(PFBooleanResultBlock)block; +- (void)sendPushInBackgroundWithBlock:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* send this push message and calls the given callback. +/* + *Asynchronously* send this push message and calls the given callback. @param target The object to call selector on. @param selector The selector to call. @@ -257,42 +272,42 @@ `error` will be `nil` on success and set if there was an error. `[result boolValue]` will tell you whether the call succeeded or not. */ -- (void)sendPushInBackgroundWithTarget:(id)target selector:(SEL)selector; +- (void)sendPushInBackgroundWithTarget:(__nullable id)target selector:(__nullable SEL)selector; -/*! - @abstract *Synchronously* send a push message with arbitrary data to a channel. +/** + *Synchronously* send a push message with arbitrary data to a channel. - @discussion See the guide for information about the dictionary structure. + See the guide for information about the dictionary structure. @param channel The channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @param data The data to send. @param error Pointer to an NSError that will be set if necessary. - @returns Returns whether the send succeeded. + @return Returns whether the send succeeded. */ + (BOOL)sendPushDataToChannel:(NSString *)channel withData:(NSDictionary *)data error:(NSError **)error; -/*! - @abstract *Asynchronously* send a push message with arbitrary data to a channel. +/** + *Asynchronously* send a push message with arbitrary data to a channel. - @discussion See the guide for information about the dictionary structure. + See the guide for information about the dictionary structure. @param channel The channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @param data The data to send. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)sendPushDataToChannelInBackground:(NSString *)channel - withData:(NSDictionary *)data; ++ (BFTask PF_GENERIC(NSNumber *)*)sendPushDataToChannelInBackground:(NSString *)channel + withData:(NSDictionary *)data; -/*! - @abstract Asynchronously sends a push message with arbitrary data to a channel and calls the given block. +/** + Asynchronously sends a push message with arbitrary data to a channel and calls the given block. - @discussion See the guide for information about the dictionary structure. + See the guide for information about the dictionary structure. @param channel The channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @@ -302,12 +317,12 @@ */ + (void)sendPushDataToChannelInBackground:(NSString *)channel withData:(NSDictionary *)data - block:(PFBooleanResultBlock)block; + block:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* send a push message with arbitrary data to a channel. +/* + *Asynchronously* send a push message with arbitrary data to a channel. - @discussion See the guide for information about the dictionary structure. + See the guide for information about the dictionary structure. @param channel The channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @@ -320,139 +335,142 @@ */ + (void)sendPushDataToChannelInBackground:(NSString *)channel withData:(NSDictionary *)data - target:(id)target - selector:(SEL)selector; + target:(__nullable id)target + selector:(__nullable SEL)selector; -/*! - @abstract *Synchronously* send a push message with arbitrary data to a query. +/** + *Synchronously* send a push message with arbitrary data to a query. - @discussion See the guide for information about the dictionary structure. + See the guide for information about the dictionary structure. - @param query The query to send to. The query must be a query - created with <[PFInstallation query]>. + @param query The query to send to. The query must be a `PFInstallation` query + created with `PFInstallation.+query`. @param data The data to send. @param error Pointer to an NSError that will be set if necessary. - @returns Returns whether the send succeeded. + @return Returns whether the send succeeded. */ -+ (BOOL)sendPushDataToQuery:(PFQuery *)query ++ (BOOL)sendPushDataToQuery:(PFQuery PF_GENERIC(PFInstallation *)*)query withData:(NSDictionary *)data error:(NSError **)error; -/*! - @abstract Asynchronously send a push message with arbitrary data to a query. +/** + Asynchronously send a push message with arbitrary data to a query. - @discussion See the guide for information about the dictionary structure. + See the guide for information about the dictionary structure. - @param query The query to send to. The query must be a query - created with <[PFInstallation query]>. + @param query The query to send to. The query must be a `PFInstallation` query + created with `PFInstallation.+query`. @param data The data to send. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)sendPushDataToQueryInBackground:(PFQuery *)query - withData:(NSDictionary *)data; ++ (BFTask PF_GENERIC(NSNumber *)*)sendPushDataToQueryInBackground:(PFQuery PF_GENERIC(PFInstallation *)*)query + withData:(NSDictionary *)data; -/*! - @abstract *Asynchronously* sends a push message with arbitrary data to a query and calls the given block. +/** + *Asynchronously* sends a push message with arbitrary data to a query and calls the given block. - @discussion See the guide for information about the dictionary structure. + See the guide for information about the dictionary structure. - @param query The query to send to. The query must be a query - created with <[PFInstallation query]>. + @param query The query to send to. The query must be a `PFInstallation` query + created with `PFInstallation.+query`. @param data The data to send. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -+ (void)sendPushDataToQueryInBackground:(PFQuery *)query ++ (void)sendPushDataToQueryInBackground:(PFQuery PF_GENERIC(PFInstallation *)*)query withData:(NSDictionary *)data - block:(PFBooleanResultBlock)block; + block:(nullable PFBooleanResultBlock)block; ///-------------------------------------- /// @name Handling Notifications ///-------------------------------------- -/*! - @abstract A default handler for push notifications while the app is active that +/** + A default handler for push notifications while the app is active that could be used to mimic the behavior of iOS push notifications while the app is backgrounded or not running. - @discussion Call this from `application:didReceiveRemoteNotification:`. + Call this from `application:didReceiveRemoteNotification:`. + If push has a dictionary containing loc-key and loc-args in the alert, + we support up to 10 items in loc-args (`NSRangeException` if limit exceeded). + + @warning This method is available only on iOS. @param userInfo The userInfo dictionary you get in `appplication:didReceiveRemoteNotification:`. */ -+ (void)handlePush:(NSDictionary *)userInfo; ++ (void)handlePush:(nullable NSDictionary *)userInfo NS_AVAILABLE_IOS(3_0) PF_EXTENSION_UNAVAILABLE(""); ///-------------------------------------- /// @name Managing Channel Subscriptions ///-------------------------------------- -/*! - @abstract Store the device token locally for push notifications. +/** + Store the device token locally for push notifications. - @discussion Usually called from you main app delegate's `didRegisterForRemoteNotificationsWithDeviceToken:`. + Usually called from you main app delegate's `didRegisterForRemoteNotificationsWithDeviceToken:`. @param deviceToken Either as an `NSData` straight from `application:didRegisterForRemoteNotificationsWithDeviceToken:` or as an `NSString` if you converted it yourself. */ + (void)storeDeviceToken:(id)deviceToken; -/*! - @abstract *Synchronously* get all the channels that this device is subscribed to. +/** + *Synchronously* get all the channels that this device is subscribed to. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns an `NSSet` containing all the channel names this device is subscribed to. + @return Returns an `NSSet` containing all the channel names this device is subscribed to. */ -+ (NSSet *)getSubscribedChannels:(NSError **)error; ++ (nullable NSSet PF_GENERIC(NSString *)*)getSubscribedChannels:(NSError **)error; -/*! - @abstract *Asynchronously* get all the channels that this device is subscribed to. +/** + *Asynchronously* get all the channels that this device is subscribed to. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)getSubscribedChannelsInBackground; ++ (BFTask PF_GENERIC(NSSet *)*)getSubscribedChannelsInBackground; -/*! - @abstract *Asynchronously* get all the channels that this device is subscribed to. +/** + *Asynchronously* get all the channels that this device is subscribed to. @param block The block to execute. It should have the following argument signature: `^(NSSet *channels, NSError *error)`. */ + (void)getSubscribedChannelsInBackgroundWithBlock:(PFSetResultBlock)block; -/*! - @abstract *Asynchronously* get all the channels that this device is subscribed to. +/* + *Asynchronously* get all the channels that this device is subscribed to. @param target The object to call selector on. @param selector The selector to call. It should have the following signature: `(void)callbackWithResult:(NSSet *)result error:(NSError *)error`. `error` will be `nil` on success and set if there was an error. */ -+ (void)getSubscribedChannelsInBackgroundWithTarget:(id)target - selector:(SEL)selector; ++ (void)getSubscribedChannelsInBackgroundWithTarget:(id)target selector:(SEL)selector; -/*! - @abstract *Synchrnously* subscribes the device to a channel of push notifications. +/** + *Synchrnously* subscribes the device to a channel of push notifications. @param channel The channel to subscribe to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns whether the subscribe succeeded. + @return Returns whether the subscribe succeeded. */ + (BOOL)subscribeToChannel:(NSString *)channel error:(NSError **)error; -/*! - @abstract *Asynchronously* subscribes the device to a channel of push notifications. +/** + *Asynchronously* subscribes the device to a channel of push notifications. @param channel The channel to subscribe to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)subscribeToChannelInBackground:(NSString *)channel; ++ (BFTask PF_GENERIC(NSNumber *)*)subscribeToChannelInBackground:(NSString *)channel; -/*! - @abstract *Asynchronously* subscribes the device to a channel of push notifications and calls the given block. +/** + *Asynchronously* subscribes the device to a channel of push notifications and calls the given block. @param channel The channel to subscribe to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @@ -460,10 +478,10 @@ It should have the following argument signature: `^(BOOL succeeded, NSError *error)` */ + (void)subscribeToChannelInBackground:(NSString *)channel - block:(PFBooleanResultBlock)block; + block:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* subscribes the device to a channel of push notifications and calls the given callback. +/* + *Asynchronously* subscribes the device to a channel of push notifications and calls the given callback. @param channel The channel to subscribe to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. @@ -474,40 +492,40 @@ `[result boolValue]` will tell you whether the call succeeded or not. */ + (void)subscribeToChannelInBackground:(NSString *)channel - target:(id)target - selector:(SEL)selector; + target:(nullable id)target + selector:(nullable SEL)selector; -/*! - @abstract *Synchronously* unsubscribes the device to a channel of push notifications. +/** + *Synchronously* unsubscribes the device to a channel of push notifications. @param channel The channel to unsubscribe from. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns whether the unsubscribe succeeded. + @return Returns whether the unsubscribe succeeded. */ + (BOOL)unsubscribeFromChannel:(NSString *)channel error:(NSError **)error; -/*! - @abstract *Asynchronously* unsubscribes the device from a channel of push notifications. +/** + *Asynchronously* unsubscribes the device from a channel of push notifications. @param channel The channel to unsubscribe from. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)unsubscribeFromChannelInBackground:(NSString *)channel; ++ (BFTask PF_GENERIC(NSNumber *)*)unsubscribeFromChannelInBackground:(NSString *)channel; -/*! - @abstract *Asynchronously* unsubscribes the device from a channel of push notifications and calls the given block. +/** + *Asynchronously* unsubscribes the device from a channel of push notifications and calls the given block. @param channel The channel to unsubscribe from. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ + (void)unsubscribeFromChannelInBackground:(NSString *)channel - block:(PFBooleanResultBlock)block; + block:(nullable PFBooleanResultBlock)block; -/*! - @abstract *Asynchronously* unsubscribes the device from a channel of push notifications and calls the given callback. +/* + *Asynchronously* unsubscribes the device from a channel of push notifications and calls the given callback. @param channel The channel to unsubscribe from. @param target The object to call selector on. @@ -517,7 +535,9 @@ `[result boolValue]` will tell you whether the call succeeded or not. */ + (void)unsubscribeFromChannelInBackground:(NSString *)channel - target:(id)target - selector:(SEL)selector; + target:(nullable id)target + selector:(nullable SEL)selector; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFQuery.h b/iOS/Parse.framework/Headers/PFQuery.h index eb52f8f..d5304ac 100644 --- a/iOS/Parse.framework/Headers/PFQuery.h +++ b/iOS/Parse.framework/Headers/PFQuery.h @@ -1,47 +1,58 @@ -// -// PFQuery.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE +#import + #import #import #import #import -#else -#import -#import -#import -#import -#endif -@class BFTask; +NS_ASSUME_NONNULL_BEGIN -/*! - The `PFQuery` class defines a query that is used to query for s. +/** + The `PFQuery` class defines a query that is used to query for `PFObject`s. */ -@interface PFQuery : NSObject +@interface PFQuery PF_GENERIC(PFGenericObject : PFObject *) : NSObject + +///-------------------------------------- +/// @name Blocks +///-------------------------------------- + +typedef void (^PFQueryArrayResultBlock)(NSArray PF_GENERIC(PFGenericObject) * __nullable objects, NSError * __nullable error); ///-------------------------------------- /// @name Creating a Query for a Class ///-------------------------------------- -/*! - @abstract Returns a `PFQuery` for a given class. +/** + Initializes the query with a class name. + + @param className The class name. + */ +- (instancetype)initWithClassName:(NSString *)className; + +/** + Returns a `PFQuery` for a given class. @param className The class to query on. - @returns A `PFQuery` object. + @return A `PFQuery` object. */ -+ (PFQuery *)queryWithClassName:(NSString *)className; ++ (instancetype)queryWithClassName:(NSString *)className; -/*! - @abstract Creates a PFQuery with the constraints given by predicate. +/** + Creates a PFQuery with the constraints given by predicate. - @discussion The following types of predicates are supported: + The following types of predicates are supported: - Simple comparisons such as `=`, `!=`, `<`, `>`, `<=`, `>=`, and `BETWEEN` with a key and a constant. - Containment predicates, such as `x IN {1, 2, 3}`. @@ -60,16 +71,10 @@ @param className The class to query on. @param predicate The predicate to create conditions from. */ -+ (PFQuery *)queryWithClassName:(NSString *)className predicate:(NSPredicate *)predicate; ++ (instancetype)queryWithClassName:(NSString *)className predicate:(nullable NSPredicate *)predicate; -/*! - Initializes the query with a class name. - @param newClassName The class name. - */ -- (instancetype)initWithClassName:(NSString *)newClassName; - -/*! - The class name to query for +/** + The class name to query for. */ @property (nonatomic, strong) NSString *parseClassName; @@ -77,197 +82,241 @@ /// @name Adding Basic Constraints ///-------------------------------------- -/*! - @abstract Make the query include PFObjects that have a reference stored at the provided key. +/** + Make the query include PFObjects that have a reference stored at the provided key. - @discussion This has an effect similar to a join. You can use dot notation to specify which fields in + This has an effect similar to a join. You can use dot notation to specify which fields in the included object are also fetch. - @param key The key to load child s for. + @param key The key to load child `PFObject`s for. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)includeKey:(NSString *)key; +- (instancetype)includeKey:(NSString *)key; -/*! - @abstract Make the query restrict the fields of the returned s to include only the provided keys. +/** + Make the query restrict the fields of the returned `PFObject`s to include only the provided keys. - @discussion If this is called multiple times, then all of the keys specified in each of the calls will be included. + If this is called multiple times, then all of the keys specified in each of the calls will be included. @param keys The keys to include in the result. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)selectKeys:(NSArray *)keys; +- (instancetype)selectKeys:(NSArray PF_GENERIC(NSString *)*)keys; -/*! - @abstract Add a constraint that requires a particular key exists. +/** + Add a constraint that requires a particular key exists. @param key The key that should exist. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKeyExists:(NSString *)key; +- (instancetype)whereKeyExists:(NSString *)key; -/*! - @abstract Add a constraint that requires a key not exist. +/** + Add a constraint that requires a key not exist. @param key The key that should not exist. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKeyDoesNotExist:(NSString *)key; +- (instancetype)whereKeyDoesNotExist:(NSString *)key; -/*! - @abstract Add a constraint to the query that requires a particular key's object to be equal to the provided object. +/** + Add a constraint to the query that requires a particular key's object to be equal to the provided object. @param key The key to be constrained. @param object The object that must be equalled. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key equalTo:(id)object; +- (instancetype)whereKey:(NSString *)key equalTo:(id)object; -/*! - @abstract Add a constraint to the query that requires a particular key's object to be less than the provided object. +/** + Add a constraint to the query that requires a particular key's object to be less than the provided object. @param key The key to be constrained. @param object The object that provides an upper bound. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key lessThan:(id)object; +- (instancetype)whereKey:(NSString *)key lessThan:(id)object; -/*! - @abstractAdd a constraint to the query that requires a particular key's object +/** + Add a constraint to the query that requires a particular key's object to be less than or equal to the provided object. @param key The key to be constrained. @param object The object that must be equalled. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key lessThanOrEqualTo:(id)object; +- (instancetype)whereKey:(NSString *)key lessThanOrEqualTo:(id)object; -/*! - @abstract Add a constraint to the query that requires a particular key's object +/** + Add a constraint to the query that requires a particular key's object to be greater than the provided object. @param key The key to be constrained. @param object The object that must be equalled. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key greaterThan:(id)object; +- (instancetype)whereKey:(NSString *)key greaterThan:(id)object; -/*! - @abstract Add a constraint to the query that requires a particular key's +/** + Add a constraint to the query that requires a particular key's object to be greater than or equal to the provided object. @param key The key to be constrained. @param object The object that must be equalled. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key greaterThanOrEqualTo:(id)object; +- (instancetype)whereKey:(NSString *)key greaterThanOrEqualTo:(id)object; -/*! - @abstract Add a constraint to the query that requires a particular key's object +/** + Add a constraint to the query that requires a particular key's object to be not equal to the provided object. @param key The key to be constrained. @param object The object that must not be equalled. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key notEqualTo:(id)object; +- (instancetype)whereKey:(NSString *)key notEqualTo:(id)object; -/*! - @abstract Add a constraint to the query that requires a particular key's object +/** + Add a constraint to the query that requires a particular key's object to be contained in the provided array. @param key The key to be constrained. @param array The possible values for the key's object. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key containedIn:(NSArray *)array; +- (instancetype)whereKey:(NSString *)key containedIn:(NSArray *)array; -/*! - @abstract Add a constraint to the query that requires a particular key's object +/** + Add a constraint to the query that requires a particular key's object not be contained in the provided array. @param key The key to be constrained. @param array The list of values the key's object should not be. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key notContainedIn:(NSArray *)array; +- (instancetype)whereKey:(NSString *)key notContainedIn:(NSArray *)array; -/*! - @abstract Add a constraint to the query that requires a particular key's array +/** + Add a constraint to the query that requires a particular key's array contains every element of the provided array. @param key The key to be constrained. @param array The array of values to search for. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key containsAllObjectsInArray:(NSArray *)array; +- (instancetype)whereKey:(NSString *)key containsAllObjectsInArray:(NSArray *)array; ///-------------------------------------- /// @name Adding Location Constraints ///-------------------------------------- -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) +/** + Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`) be near a reference point. - @discussion Distance is calculated based on angular distance on a sphere. Results will be sorted by distance + Distance is calculated based on angular distance on a sphere. Results will be sorted by distance from reference point. @param key The key to be constrained. - @param geopoint The reference point represented as a . + @param geopoint The reference point represented as a `PFGeoPoint`. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint; +- (instancetype)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint; -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) +/** + Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`) be near a reference point and within the maximum distance specified (in miles). - @discussion Distance is calculated based on a spherical coordinate system. + Distance is calculated based on a spherical coordinate system. Results will be sorted by distance (nearest to farthest) from the reference point. @param key The key to be constrained. - @param geopoint The reference point represented as a . + @param geopoint The reference point represented as a `PFGeoPoint`. @param maxDistance Maximum distance in miles. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinMiles:(double)maxDistance; +- (instancetype)whereKey:(NSString *)key + nearGeoPoint:(PFGeoPoint *)geopoint + withinMiles:(double)maxDistance; -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) +/** + Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`) be near a reference point and within the maximum distance specified (in kilometers). - @discussion Distance is calculated based on a spherical coordinate system. + Distance is calculated based on a spherical coordinate system. Results will be sorted by distance (nearest to farthest) from the reference point. @param key The key to be constrained. - @param geopoint The reference point represented as a . + @param geopoint The reference point represented as a `PFGeoPoint`. @param maxDistance Maximum distance in kilometers. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinKilometers:(double)maxDistance; +- (instancetype)whereKey:(NSString *)key + nearGeoPoint:(PFGeoPoint *)geopoint + withinKilometers:(double)maxDistance; -/*! - Add a constraint to the query that requires a particular key's coordinates (specified via ) be near +/** + Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`) be near a reference point and within the maximum distance specified (in radians). Distance is calculated based on angular distance on a sphere. Results will be sorted by distance (nearest to farthest) from the reference point. @param key The key to be constrained. - @param geopoint The reference point as a . + @param geopoint The reference point as a `PFGeoPoint`. @param maxDistance Maximum distance in radians. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinRadians:(double)maxDistance; +- (instancetype)whereKey:(NSString *)key + nearGeoPoint:(PFGeoPoint *)geopoint + withinRadians:(double)maxDistance; -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) be +/** + Add a constraint to the query that requires a particular key's coordinates (specified via `PFGeoPoint`) be contained within a given rectangular geographic bounding box. @param key The key to be constrained. @param southwest The lower-left inclusive corner of the box. @param northeast The upper-right inclusive corner of the box. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key withinGeoBoxFromSouthwest:(PFGeoPoint *)southwest toNortheast:(PFGeoPoint *)northeast; +- (instancetype)whereKey:(NSString *)key withinGeoBoxFromSouthwest:(PFGeoPoint *)southwest toNortheast:(PFGeoPoint *)northeast; ///-------------------------------------- /// @name Adding String Constraints ///-------------------------------------- -/*! - @abstract Add a regular expression constraint for finding string values that match the provided regular expression. +/** + Add a regular expression constraint for finding string values that match the provided regular expression. @warning This may be slow for large datasets. @param key The key that the string to match is stored in. @param regex The regular expression pattern to match. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex; +- (instancetype)whereKey:(NSString *)key matchesRegex:(NSString *)regex; -/*! - @abstract Add a regular expression constraint for finding string values that match the provided regular expression. +/** + Add a regular expression constraint for finding string values that match the provided regular expression. @warning This may be slow for large datasets. @@ -276,184 +325,218 @@ @param modifiers Any of the following supported PCRE modifiers: - `i` - Case insensitive search - `m` - Search across multiple lines of input + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex modifiers:(NSString *)modifiers; +- (instancetype)whereKey:(NSString *)key + matchesRegex:(NSString *)regex + modifiers:(nullable NSString *)modifiers; -/*! - @abstract Add a constraint for finding string values that contain a provided substring. +/** + Add a constraint for finding string values that contain a provided substring. @warning This will be slow for large datasets. @param key The key that the string to match is stored in. @param substring The substring that the value must contain. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key containsString:(NSString *)substring; +- (instancetype)whereKey:(NSString *)key containsString:(nullable NSString *)substring; -/*! - @abstract Add a constraint for finding string values that start with a provided prefix. +/** + Add a constraint for finding string values that start with a provided prefix. - @discussion This will use smart indexing, so it will be fast for large datasets. + This will use smart indexing, so it will be fast for large datasets. @param key The key that the string to match is stored in. @param prefix The substring that the value must start with. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key hasPrefix:(NSString *)prefix; +- (instancetype)whereKey:(NSString *)key hasPrefix:(nullable NSString *)prefix; -/*! - @abstract Add a constraint for finding string values that end with a provided suffix. +/** + Add a constraint for finding string values that end with a provided suffix. @warning This will be slow for large datasets. @param key The key that the string to match is stored in. @param suffix The substring that the value must end with. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key hasSuffix:(NSString *)suffix; +- (instancetype)whereKey:(NSString *)key hasSuffix:(nullable NSString *)suffix; ///-------------------------------------- /// @name Adding Subqueries ///-------------------------------------- -/*! +/** Returns a `PFQuery` that is the `or` of the passed in queries. @param queries The list of queries to or together. - @returns An instance of `PFQuery` that is the `or` of the passed in queries. + @return An instance of `PFQuery` that is the `or` of the passed in queries. */ -+ (PFQuery *)orQueryWithSubqueries:(NSArray *)queries; ++ (instancetype)orQueryWithSubqueries:(NSArray PF_GENERIC(PFQuery *)*)queries; -/*! - @abstract Adds a constraint that requires that a key's value matches a value in another key +/** + Adds a constraint that requires that a key's value matches a value in another key in objects returned by a sub query. @param key The key that the value is stored. @param otherKey The key in objects in the returned by the sub query whose value should match. @param query The query to run. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key matchesKey:(NSString *)otherKey inQuery:(PFQuery *)query; +- (instancetype)whereKey:(NSString *)key + matchesKey:(NSString *)otherKey + inQuery:(PFQuery *)query; -/*! - @abstract Adds a constraint that requires that a key's value `NOT` match a value in another key +/** + Adds a constraint that requires that a key's value `NOT` match a value in another key in objects returned by a sub query. @param key The key that the value is stored. @param otherKey The key in objects in the returned by the sub query whose value should match. @param query The query to run. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key doesNotMatchKey:(NSString *)otherKey inQuery:(PFQuery *)query; +- (instancetype)whereKey:(NSString *)key + doesNotMatchKey:(NSString *)otherKey + inQuery:(PFQuery *)query; -/*! - @abstract Add a constraint that requires that a key's value matches a `PFQuery` constraint. +/** + Add a constraint that requires that a key's value matches a `PFQuery` constraint. - @warning This only works where the key's values are s or arrays of s. + @warning This only works where the key's values are `PFObject`s or arrays of `PFObject`s. @param key The key that the value is stored in @param query The query the value should match + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key matchesQuery:(PFQuery *)query; +- (instancetype)whereKey:(NSString *)key matchesQuery:(PFQuery *)query; -/*! - @abstract Add a constraint that requires that a key's value to not match a `PFQuery` constraint. +/** + Add a constraint that requires that a key's value to not match a `PFQuery` constraint. - @warning This only works where the key's values are s or arrays of s. + @warning This only works where the key's values are `PFObject`s or arrays of `PFObject`s. @param key The key that the value is stored in @param query The query the value should not match + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)whereKey:(NSString *)key doesNotMatchQuery:(PFQuery *)query; +- (instancetype)whereKey:(NSString *)key doesNotMatchQuery:(PFQuery *)query; ///-------------------------------------- /// @name Sorting ///-------------------------------------- -/*! - @abstract Sort the results in *ascending* order with the given key. +/** + Sort the results in *ascending* order with the given key. @param key The key to order by. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)orderByAscending:(NSString *)key; +- (instancetype)orderByAscending:(NSString *)key; -/*! - @abstract Additionally sort in *ascending* order by the given key. +/** + Additionally sort in *ascending* order by the given key. - @discussion The previous keys provided will precedence over this key. + The previous keys provided will precedence over this key. - @param key The key to order bye + @param key The key to order by. */ -- (void)addAscendingOrder:(NSString *)key; +- (instancetype)addAscendingOrder:(NSString *)key; -/*! - @abstract Sort the results in *descending* order with the given key. +/** + Sort the results in *descending* order with the given key. @param key The key to order by. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)orderByDescending:(NSString *)key; +- (instancetype)orderByDescending:(NSString *)key; -/*! - @abstract Additionally sort in *descending* order by the given key. +/** + Additionally sort in *descending* order by the given key. - @discussion The previous keys provided will precedence over this key. + The previous keys provided will precedence over this key. - @param key The key to order bye + @param key The key to order by. */ -- (void)addDescendingOrder:(NSString *)key; +- (instancetype)addDescendingOrder:(NSString *)key; + +/** + Sort the results using a given sort descriptor. -/*! - @abstract Sort the results using a given sort descriptor. + @warning If a `sortDescriptor` has custom `selector` or `comparator` - they aren't going to be used. @param sortDescriptor The `NSSortDescriptor` to use to sort the results of the query. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)orderBySortDescriptor:(NSSortDescriptor *)sortDescriptor; +- (instancetype)orderBySortDescriptor:(NSSortDescriptor *)sortDescriptor; + +/** + Sort the results using a given array of sort descriptors. -/*! - @abstract Sort the results using a given array of sort descriptors. + @warning If a `sortDescriptor` has custom `selector` or `comparator` - they aren't going to be used. @param sortDescriptors An array of `NSSortDescriptor` objects to use to sort the results of the query. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. */ -- (void)orderBySortDescriptors:(NSArray *)sortDescriptors; +- (instancetype)orderBySortDescriptors:(nullable NSArray PF_GENERIC(NSSortDescriptor *)*)sortDescriptors; ///-------------------------------------- /// @name Getting Objects by ID ///-------------------------------------- -/*! - @abstract Returns a with a given class and id. +/** + Returns a `PFObject` with a given class and id. @param objectClass The class name for the object that is being requested. @param objectId The id of the object that is being requested. - @returns The if found. Returns `nil` if the object isn't found, or if there was an error. + @return The `PFObject` if found. Returns `nil` if the object isn't found, or if there was an error. */ -+ (PFObject *)getObjectOfClass:(NSString *)objectClass - objectId:(NSString *)objectId; ++ (nullable PFGenericObject)getObjectOfClass:(NSString *)objectClass + objectId:(NSString *)objectId PF_SWIFT_UNAVAILABLE; -/*! - @abstract Returns a with a given class and id and sets an error if necessary. +/** + Returns a `PFObject` with a given class and id and sets an error if necessary. @param objectClass The class name for the object that is being requested. @param objectId The id of the object that is being requested. @param error Pointer to an `NSError` that will be set if necessary. - @returns The if found. Returns `nil` if the object isn't found, or if there was an `error`. + @return The `PFObject` if found. Returns `nil` if the object isn't found, or if there was an `error`. */ -+ (PFObject *)getObjectOfClass:(NSString *)objectClass - objectId:(NSString *)objectId - error:(NSError **)error; ++ (nullable PFGenericObject)getObjectOfClass:(NSString *)objectClass + objectId:(NSString *)objectId + error:(NSError **)error; -/*! - @abstract Returns a with the given id. +/** + Returns a `PFObject` with the given id. @warning This method mutates the query. It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. @param objectId The id of the object that is being requested. - @returns The if found. Returns nil if the object isn't found, or if there was an error. + @return The `PFObject` if found. Returns nil if the object isn't found, or if there was an error. */ -- (PFObject *)getObjectWithId:(NSString *)objectId; +- (nullable PFGenericObject)getObjectWithId:(NSString *)objectId PF_SWIFT_UNAVAILABLE; -/*! - @abstract Returns a with the given id and sets an error if necessary. +/** + Returns a `PFObject` with the given id and sets an error if necessary. @warning This method mutates the query. It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. @@ -461,24 +544,24 @@ @param objectId The id of the object that is being requested. @param error Pointer to an `NSError` that will be set if necessary. - @returns The if found. Returns nil if the object isn't found, or if there was an error. + @return The `PFObject` if found. Returns nil if the object isn't found, or if there was an error. */ -- (PFObject *)getObjectWithId:(NSString *)objectId error:(NSError **)error; +- (nullable PFGenericObject)getObjectWithId:(NSString *)objectId error:(NSError **)error; -/*! - @abstract Gets a asynchronously and calls the given block with the result. +/** + Gets a `PFObject` asynchronously and calls the given block with the result. @warning This method mutates the query. It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. @param objectId The id of the object that is being requested. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -- (BFTask *)getObjectInBackgroundWithId:(NSString *)objectId; +- (BFTask PF_GENERIC(PFGenericObject) *)getObjectInBackgroundWithId:(NSString *)objectId; -/*! - @asbtract Gets a asynchronously and calls the given block with the result. +/** + Gets a `PFObject` asynchronously and calls the given block with the result. @warning This method mutates the query. It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. @@ -488,10 +571,10 @@ The block should have the following argument signature: `^(NSArray *object, NSError *error)` */ - (void)getObjectInBackgroundWithId:(NSString *)objectId - block:(PFObjectResultBlock)block; + block:(nullable void (^)(PFGenericObject __nullable object, NSError *__nullable error))block; -/*! - @abstract Gets a asynchronously. +/* + Gets a `PFObject` asynchronously. This mutates the PFQuery. It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. @@ -502,116 +585,115 @@ Result will be `nil` if error is set and vice versa. */ - (void)getObjectInBackgroundWithId:(NSString *)objectId - target:(id)target - selector:(SEL)selector; + target:(nullable id)target + selector:(nullable SEL)selector; ///-------------------------------------- /// @name Getting User Objects ///-------------------------------------- -/*! - @asbtract Returns a with a given id. +/** + Returns a `PFUser` with a given id. @param objectId The id of the object that is being requested. - @returns The PFUser if found. Returns nil if the object isn't found, or if there was an error. + @return The PFUser if found. Returns nil if the object isn't found, or if there was an error. */ -+ (PFUser *)getUserObjectWithId:(NSString *)objectId; ++ (nullable PFUser *)getUserObjectWithId:(NSString *)objectId PF_SWIFT_UNAVAILABLE; -/*! +/** Returns a PFUser with a given class and id and sets an error if necessary. @param objectId The id of the object that is being requested. @param error Pointer to an NSError that will be set if necessary. @result The PFUser if found. Returns nil if the object isn't found, or if there was an error. */ -+ (PFUser *)getUserObjectWithId:(NSString *)objectId - error:(NSError **)error; ++ (nullable PFUser *)getUserObjectWithId:(NSString *)objectId error:(NSError **)error; -/*! +/** @deprecated Please use [PFUser query] instead. */ -+ (PFQuery *)queryForUser PARSE_DEPRECATED("Use [PFUser query] instead."); ++ (instancetype)queryForUser PARSE_DEPRECATED("Use [PFUser query] instead."); ///-------------------------------------- /// @name Getting all Matches for a Query ///-------------------------------------- -/*! - @asbtract Finds objects *synchronously* based on the constructed query. +/** + Finds objects *synchronously* based on the constructed query. - @returns Returns an array of objects that were found. + @return Returns an array of `PFObject` objects that were found. */ -- (NSArray *)findObjects; +- (nullable NSArray PF_GENERIC(PFGenericObject) *)findObjects PF_SWIFT_UNAVAILABLE; -/*! - @abstract Finds objects *synchronously* based on the constructed query and sets an error if there was one. +/** + Finds objects *synchronously* based on the constructed query and sets an error if there was one. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns an array of objects that were found. + @return Returns an array of `PFObject` objects that were found. */ -- (NSArray *)findObjects:(NSError **)error; +- (nullable NSArray PF_GENERIC(PFGenericObject) *)findObjects:(NSError **)error; -/*! - @asbtract Finds objects *asynchronously* and sets the `NSArray` of objects as a result of the task. +/** + Finds objects *asynchronously* and sets the `NSArray` of `PFObject` objects as a result of the task. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -- (BFTask *)findObjectsInBackground; +- (BFTask PF_GENERIC(NSArray *)*)findObjectsInBackground; -/*! - @abstract Finds objects *asynchronously* and calls the given block with the results. +/** + Finds objects *asynchronously* and calls the given block with the results. @param block The block to execute. It should have the following argument signature: `^(NSArray *objects, NSError *error)` */ -- (void)findObjectsInBackgroundWithBlock:(PFArrayResultBlock)block; +- (void)findObjectsInBackgroundWithBlock:(nullable PFQueryArrayResultBlock)block; -/*! - @abstract Finds objects *asynchronously* and calls the given callback with the results. +/* + Finds objects *asynchronously* and calls the given callback with the results. @param target The object to call the selector on. @param selector The selector to call. It should have the following signature: `(void)callbackWithResult:(id)result error:(NSError *)error`. Result will be `nil` if error is set and vice versa. */ -- (void)findObjectsInBackgroundWithTarget:(id)target selector:(SEL)selector; +- (void)findObjectsInBackgroundWithTarget:(nullable id)target selector:(nullable SEL)selector; ///-------------------------------------- /// @name Getting the First Match in a Query ///-------------------------------------- -/*! - @abstract Gets an object *synchronously* based on the constructed query. +/** + Gets an object *synchronously* based on the constructed query. @warning This method mutates the query. It will reset the limit to `1`. - @returns Returns a , or `nil` if none was found. + @return Returns a `PFObject`, or `nil` if none was found. */ -- (PFObject *)getFirstObject; +- (nullable PFGenericObject)getFirstObject PF_SWIFT_UNAVAILABLE; -/*! - @abstract Gets an object *synchronously* based on the constructed query and sets an error if any occurred. +/** + Gets an object *synchronously* based on the constructed query and sets an error if any occurred. @warning This method mutates the query. It will reset the limit to `1`. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns a , or `nil` if none was found. + @return Returns a `PFObject`, or `nil` if none was found. */ -- (PFObject *)getFirstObject:(NSError **)error; +- (nullable PFGenericObject)getFirstObject:(NSError **)error; -/*! - @abstract Gets an object *asynchronously* and sets it as a result of the task. +/** + Gets an object *asynchronously* and sets it as a result of the task. @warning This method mutates the query. It will reset the limit to `1`. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -- (BFTask *)getFirstObjectInBackground; +- (BFTask PF_GENERIC(PFGenericObject) *)getFirstObjectInBackground; -/*! - @abstract Gets an object *asynchronously* and calls the given block with the result. +/** + Gets an object *asynchronously* and calls the given block with the result. @warning This method mutates the query. It will reset the limit to `1`. @@ -620,10 +702,10 @@ `result` will be `nil` if `error` is set OR no object was found matching the query. `error` will be `nil` if `result` is set OR if the query succeeded, but found no results. */ -- (void)getFirstObjectInBackgroundWithBlock:(PFObjectResultBlock)block; +- (void)getFirstObjectInBackgroundWithBlock:(nullable void (^)(PFGenericObject __nullable object, NSError *__nullable error))block; -/*! - @abstract Gets an object *asynchronously* and calls the given callback with the results. +/* + Gets an object *asynchronously* and calls the given callback with the results. @warning This method mutates the query. It will reset the limit to `1`. @@ -633,58 +715,58 @@ `result` will be `nil` if `error` is set OR no object was found matching the query. `error` will be `nil` if `result` is set OR if the query succeeded, but found no results. */ -- (void)getFirstObjectInBackgroundWithTarget:(id)target selector:(SEL)selector; +- (void)getFirstObjectInBackgroundWithTarget:(nullable id)target selector:(nullable SEL)selector; ///-------------------------------------- /// @name Counting the Matches in a Query ///-------------------------------------- -/*! - @abstract Counts objects *synchronously* based on the constructed query. +/** + Counts objects *synchronously* based on the constructed query. - @returns Returns the number of objects that match the query, or `-1` if there is an error. + @return Returns the number of `PFObject` objects that match the query, or `-1` if there is an error. */ -- (NSInteger)countObjects; +- (NSInteger)countObjects PF_SWIFT_UNAVAILABLE; -/*! - @abstract Counts objects *synchronously* based on the constructed query and sets an error if there was one. +/** + Counts objects *synchronously* based on the constructed query and sets an error if there was one. @param error Pointer to an `NSError` that will be set if necessary. - @returns Returns the number of objects that match the query, or `-1` if there is an error. + @return Returns the number of `PFObject` objects that match the query, or `-1` if there is an error. */ - (NSInteger)countObjects:(NSError **)error; -/*! - @abstract Counts objects *asynchronously* and sets `NSNumber` with count as a result of the task. +/** + Counts objects *asynchronously* and sets `NSNumber` with count as a result of the task. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -- (BFTask *)countObjectsInBackground; +- (BFTask PF_GENERIC(NSNumber *)*)countObjectsInBackground; -/*! - @abstract Counts objects *asynchronously* and calls the given block with the counts. +/** + Counts objects *asynchronously* and calls the given block with the counts. @param block The block to execute. It should have the following argument signature: `^(int count, NSError *error)` */ -- (void)countObjectsInBackgroundWithBlock:(PFIntegerResultBlock)block; +- (void)countObjectsInBackgroundWithBlock:(nullable PFIntegerResultBlock)block; -/*! - @abstract Counts objects *asynchronously* and calls the given callback with the count. +/* + Counts objects *asynchronously* and calls the given callback with the count. @param target The object to call the selector on. @param selector The selector to call. It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. */ -- (void)countObjectsInBackgroundWithTarget:(id)target selector:(SEL)selector; +- (void)countObjectsInBackgroundWithTarget:(nullable id)target selector:(nullable SEL)selector; ///-------------------------------------- /// @name Cancelling a Query ///-------------------------------------- -/*! - @asbtract Cancels the current network request (if any). Ensures that callbacks won't be called. +/** + Cancels the current network request (if any). Ensures that callbacks won't be called. */ - (void)cancel; @@ -692,16 +774,16 @@ /// @name Paginating Results ///-------------------------------------- -/*! - @abstract A limit on the number of objects to return. The default limit is `100`, with a +/** + A limit on the number of objects to return. The default limit is `100`, with a maximum of 1000 results being returned at a time. @warning If you are calling `findObjects` with `limit = 1`, you may find it easier to use `getFirst` instead. */ @property (nonatomic, assign) NSInteger limit; -/*! - @abstract The number of objects to skip before returning any. +/** + The number of objects to skip before returning any. */ @property (nonatomic, assign) NSInteger skip; @@ -709,36 +791,36 @@ /// @name Controlling Caching Behavior ///-------------------------------------- -/*! - @abstract The cache policy to use for requests. +/** + The cache policy to use for requests. Not allowed when Pinning is enabled. - @see fromLocalDatastore: - @see fromPin: + @see fromLocalDatastore + @see fromPin @see fromPinWithName: */ -@property (assign, readwrite) PFCachePolicy cachePolicy; +@property (nonatomic, assign) PFCachePolicy cachePolicy; -/* ! - @asbtract The age after which a cached value will be ignored +/** + The age after which a cached value will be ignored */ -@property (assign, readwrite) NSTimeInterval maxCacheAge; +@property (nonatomic, assign) NSTimeInterval maxCacheAge; -/*! - @abstract Returns whether there is a cached result for this query. +/** + Returns whether there is a cached result for this query. @result `YES` if there is a cached result for this query, otherwise `NO`. */ - (BOOL)hasCachedResult; -/*! - @abstract Clears the cached result for this query. If there is no cached result, this is a noop. +/** + Clears the cached result for this query. If there is no cached result, this is a noop. */ - (void)clearCachedResult; -/*! - @abstract Clears the cached results for all queries. +/** + Clears the cached results for all queries. */ + (void)clearAllCachedResults; @@ -746,46 +828,65 @@ /// @name Query Source ///-------------------------------------- -/*! - @abstract Change the source of this query to all pinned objects. +/** + Change the source of this query to all pinned objects. + + @warning Requires Local Datastore to be enabled. - Requires Pinning to be enabled. + @return The same instance of `PFQuery` as the receiver. This allows method chaining. @see cachePolicy */ -- (PFQuery *)fromLocalDatastore; +- (instancetype)fromLocalDatastore; + +/** + Change the source of this query to the default group of pinned objects. -/*! - @abstract Change the source of this query to the default group of pinned objects. + @warning Requires Local Datastore to be enabled. - Requires Pinning to be enabled. + @return The same instance of `PFQuery` as the receiver. This allows method chaining. @see PFObjectDefaultPin @see cachePolicy */ -- (PFQuery *)fromPin; +- (instancetype)fromPin; -/*! - @abstract Change the source of this query to a specific group of pinned objects. +/** + Change the source of this query to a specific group of pinned objects. - Requires Pinning to be enabled. + @warning Requires Local Datastore to be enabled. @param name The pinned group. + @return The same instance of `PFQuery` as the receiver. This allows method chaining. + @see PFObjectDefaultPin @see cachePolicy */ -- (PFQuery *)fromPinWithName:(NSString *)name; +- (instancetype)fromPinWithName:(nullable NSString *)name; + +/** + Ignore ACLs when querying from the Local Datastore. + + This is particularly useful when querying for objects with Role based ACLs set on them. + + @warning Requires Local Datastore to be enabled. + + @return The same instance of `PFQuery` as the receiver. This allows method chaining. + */ +- (instancetype)ignoreACLs; ///-------------------------------------- /// @name Advanced Settings ///-------------------------------------- -/*! - @abstract Whether or not performance tracing should be done on the query. +/** + Whether or not performance tracing should be done on the query. @warning This should not be set to `YES` in most cases. */ @property (nonatomic, assign) BOOL trace; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFQueryTableViewController.h b/iOS/Parse.framework/Headers/PFQueryTableViewController.h deleted file mode 100644 index 27c6f2c..0000000 --- a/iOS/Parse.framework/Headers/PFQueryTableViewController.h +++ /dev/null @@ -1,182 +0,0 @@ -// -// PFUITableViewController.h -// Parse -// -// Created by James Yu on 11/20/11. -// Copyright (c) 2011 Parse, LLC. All rights reserved. -// - -#import - -#import "PFQuery.h" -#import "PFTableViewCell.h" - -/*! - This class allows you to think about a one-to-one mapping between a PFObject and a UITableViewCell, - rather than having to juggle index paths. - - You also get the following features out of the box: - - - Pagination with a cell that can be tapped to load the next page. - - Pull-to-refresh table view header. - - Automatic downloading and displaying of remote images in cells. - - Loading screen, shown before any data is loaded. - - Automatic loading and management of the objects array. - - Various methods that can be overridden to customize behavior at major events in the data cycle. - */ -@interface PFQueryTableViewController : UITableViewController - -/*! @name Creating a PFQueryTableViewController */ - -/*! - The designated initializer. - Initializes with a class name of the PFObjects that will be associated with this table. - @param style The UITableViewStyle for the table - @param aClassName The class name of the PFObjects that this table will display - @result The initialized PFQueryTableViewController - */ -- (instancetype)initWithStyle:(UITableViewStyle)style className:(NSString *)aClassName; - -/*! - Initializes with a class name of the PFObjects that will be associated with this table. - @param aClassName The class name of the PFObjects that this table will display - @result The initialized PFQueryTableViewController - */ -- (instancetype)initWithClassName:(NSString *)aClassName; - -/*! @name Configuring Behavior */ - -/*! - The class of the PFObject this table will use as a datasource - */ -@property (nonatomic, strong) NSString *parseClassName; - -/*! - The key to use to display for the cell text label. - This won't apply if you override tableView:cellForRowAtIndexPath:object: - */ -@property (nonatomic, strong) NSString *textKey; - -/*! - The key to use to display for the cell image view. - This won't apply if you override tableView:cellForRowAtIndexPath:object: - */ -@property (nonatomic, strong) NSString *imageKey; - -/*! - The image to use as a placeholder for the cell images. - This won't apply if you override tableView:cellForRowAtIndexPath:object: - */ -@property (nonatomic, strong) UIImage *placeholderImage; - -/// Whether the table should use the default loading view (default:YES) -@property (nonatomic, assign) BOOL loadingViewEnabled; - -/// Whether the table should use the built-in pull-to-refresh feature (default: `YES`) -@property (nonatomic, assign) BOOL pullToRefreshEnabled; - -/*! - Whether the table should use the built-in pagination feature (default: `YES`) - */ -@property (nonatomic, assign) BOOL paginationEnabled; - -/*! - The number of objects to show per page (default: `25`) - */ -@property (nonatomic, assign) NSUInteger objectsPerPage; - -/*! - Whether the table is actively loading new data from the server - */ -@property (nonatomic, assign) BOOL isLoading; - -/*! @name Responding to Events */ - -/*! - Called when objects have loaded from Parse. If you override this method, you must - call [super objectsDidLoad:] in your implementation. - @param error The Parse error from running the PFQuery, if there was any. - */ -- (void)objectsDidLoad:(NSError *)error; - -/*! - Called when objects will loaded from Parse. If you override this method, you must - call [super objectsWillLoad] in your implementation. - */ -- (void)objectsWillLoad; - -/*! @name Accessing Results */ - -/// The array of PFObjects that is the UITableView data source -@property (nonatomic, strong, readonly) NSArray *objects; - -/*! - Returns an object at a particular indexPath. The default impementation returns - the object at indexPath.row. If you want to return objects in a different - indexPath order, like for sections, override this method. - @param indexPath The indexPath - @result The object at the specified index - */ -- (PFObject *)objectAtIndexPath:(NSIndexPath *)indexPath; - -/*! @name Querying */ - -/*! - Override to construct your own custom PFQuery to get the objects. - @result PFQuery that loadObjects will use to the objects for this table. - */ -- (PFQuery *)queryForTable; - -/*! - Clears the table of all objects. - */ -- (void)clear; - -/*! - Clears the table and loads the first page of objects. - */ -- (void)loadObjects; - -/*! - Loads the objects of the className at the specified page and appends it to the - objects already loaded and refreshes the table. - @param page The page of objects to load. - @param clear Whether to clear the table after receiving the objects. - */ -- (void)loadObjects:(NSInteger)page clear:(BOOL)clear; - -/*! - Loads the next page of objects, appends to table, and refreshes. - */ -- (void)loadNextPage; - -/*! @name Data Source Methods */ - -/*! - Override this method to customize each cell given a PFObject that is loaded. If you - don't override this method, it will use a default style cell and display either - the first data key from the object, or it will display the key as specified - with keyToDisplay. - - The cell should inherit from PFTableViewCell which is a subclass of UITableViewCell. - - @param tableView The table view object associated with this controller. - @param indexPath The indexPath of the cell. - @param object The PFObject that is associated with the cell. - @result The cell that represents this object. - */ -- (PFTableViewCell *)tableView:(UITableView *)tableView - cellForRowAtIndexPath:(NSIndexPath *)indexPath - object:(PFObject *)object; - -/*! - Override this method to customize the cell that allows the user to load the - next page when pagination is turned on. - @param tableView The table view object associated with this controller. - @param indexPath The indexPath of the cell. - @result The cell that allows the user to paginate. - */ -- (PFTableViewCell *)tableView:(UITableView *)tableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath; - - -@end diff --git a/iOS/Parse.framework/Headers/PFRelation.h b/iOS/Parse.framework/Headers/PFRelation.h index f4254a1..6b3c863 100644 --- a/iOS/Parse.framework/Headers/PFRelation.h +++ b/iOS/Parse.framework/Headers/PFRelation.h @@ -1,36 +1,36 @@ -// -// PFRelation.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE #import #import -#else -#import -#import -#endif -/*! +NS_ASSUME_NONNULL_BEGIN + +/** The `PFRelation` class that is used to access all of the children of a many-to-many relationship. Each instance of `PFRelation` is associated with a particular parent object and key. */ @interface PFRelation : NSObject -/*! - @abstract The name of the class of the target child objects. +/** + The name of the class of the target child objects. */ -@property (nonatomic, strong) NSString *targetClass; +@property (nullable, nonatomic, copy) NSString *targetClass; ///-------------------------------------- /// @name Accessing Objects ///-------------------------------------- -/*! - @abstract Returns a object that can be used to get objects in this relation. +/** + Returns a `PFQuery` object that can be used to get objects in this relation. */ - (PFQuery *)query; @@ -38,18 +38,20 @@ /// @name Modifying Relations ///-------------------------------------- -/*! - @abstract Adds a relation to the passed in object. +/** + Adds a relation to the passed in object. - @param object A object to add relation to. + @param object A `PFObject` object to add relation to. */ - (void)addObject:(PFObject *)object; -/*! - @abstract Removes a relation to the passed in object. +/** + Removes a relation to the passed in object. - @param object A object to add relation to. + @param object A `PFObject` object to add relation to. */ - (void)removeObject:(PFObject *)object; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFRole.h b/iOS/Parse.framework/Headers/PFRole.h index 3afa87c..86c6981 100644 --- a/iOS/Parse.framework/Headers/PFRole.h +++ b/iOS/Parse.framework/Headers/PFRole.h @@ -1,106 +1,99 @@ -// -// PFRole.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE #import #import -#else -#import -#import -#endif -/*! +NS_ASSUME_NONNULL_BEGIN + +/** The `PFRole` class represents a Role on the Parse server. - `PFRoles` represent groupings of objects for the purposes of granting permissions - (e.g. specifying a for a ). + `PFRoles` represent groupings of `PFUser` objects for the purposes of granting permissions + (e.g. specifying a `PFACL` for a `PFObject`). Roles are specified by their sets of child users and child roles, all of which are granted any permissions that the parent role has. Roles must have a name (which cannot be changed after creation of the role), and must specify an ACL. */ -@interface PFRole : PFObject +@interface PFRole : PFObject ///-------------------------------------- /// @name Creating a New Role ///-------------------------------------- -/*! - @abstract Constructs a new `PFRole` with the given name. +/** + Constructs a new `PFRole` with the given name. If no default ACL has been specified, you must provide an ACL for the role. - + @param name The name of the Role to create. */ - (instancetype)initWithName:(NSString *)name; -/*! - @abstract Constructs a new `PFRole` with the given name. - +/** + Constructs a new `PFRole` with the given name. + @param name The name of the Role to create. @param acl The ACL for this role. Roles must have an ACL. */ -- (instancetype)initWithName:(NSString *)name acl:(PFACL *)acl; +- (instancetype)initWithName:(NSString *)name acl:(nullable PFACL *)acl; -/*! - @abstract Constructs a new `PFRole` with the given name. +/** + Constructs a new `PFRole` with the given name. + + If no default ACL has been specified, you must provide an ACL for the role. - @discussion If no default ACL has been specified, you must provide an ACL for the role. - @param name The name of the Role to create. */ + (instancetype)roleWithName:(NSString *)name; -/*! - @abstract Constructs a new `PFRole` with the given name. - +/** + Constructs a new `PFRole` with the given name. + @param name The name of the Role to create. @param acl The ACL for this role. Roles must have an ACL. */ -+ (instancetype)roleWithName:(NSString *)name acl:(PFACL *)acl; ++ (instancetype)roleWithName:(NSString *)name acl:(nullable PFACL *)acl; ///-------------------------------------- /// @name Role-specific Properties ///-------------------------------------- -/*! - @abstract Gets or sets the name for a role. +/** + Gets or sets the name for a role. - @discussion This value must be set before the role has been saved to the server, + This value must be set before the role has been saved to the server, and cannot be set once the role has been saved. @warning A role's name can only contain alphanumeric characters, `_`, `-`, and spaces. */ @property (nonatomic, copy) NSString *name; -/*! - @abstract Gets the for the objects that are direct children of this role. +/** + Gets the `PFRelation` for the `PFUser` objects that are direct children of this role. - @discussion These users are granted any privileges that this role has been granted + These users are granted any privileges that this role has been granted (e.g. read or write access through ACLs). You can add or remove users from the role through this relation. */ @property (nonatomic, strong, readonly) PFRelation *users; -/*! - @abstract Gets the for the `PFRole` objects that are direct children of this role. +/** + Gets the `PFRelation` for the `PFRole` objects that are direct children of this role. - @discussion These roles' users are granted any privileges that this role has been granted + These roles' users are granted any privileges that this role has been granted (e.g. read or write access through ACLs). You can add or remove child roles from this role through this relation. */ @property (nonatomic, strong, readonly) PFRelation *roles; -///-------------------------------------- -/// @name Querying for Roles -///-------------------------------------- - -/*! - @abstract Creates a for `PFRole` objects. - */ -+ (PFQuery *)query; - @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFSession.h b/iOS/Parse.framework/Headers/PFSession.h new file mode 100644 index 0000000..ff9e271 --- /dev/null +++ b/iOS/Parse.framework/Headers/PFSession.h @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class PFSession; + +typedef void(^PFSessionResultBlock)(PFSession *__nullable session, NSError *__nullable error); + +/** + `PFSession` is a local representation of a session. + This class is a subclass of a `PFObject`, + and retains the same functionality as any other subclass of `PFObject`. + */ +@interface PFSession : PFObject + +/** + The session token string for this session. + */ +@property (nullable, nonatomic, copy, readonly) NSString *sessionToken; + +/** + *Asynchronously* fetches a `PFSession` object related to the current user. + + @return A task that is `completed` with an instance of `PFSession` class or is `faulted` if the operation fails. + */ ++ (BFTask PF_GENERIC(PFSession *)*)getCurrentSessionInBackground; + +/** + *Asynchronously* fetches a `PFSession` object related to the current user. + + @param block The block to execute when the operation completes. + It should have the following argument signature: `^(PFSession *session, NSError *error)`. + */ ++ (void)getCurrentSessionInBackgroundWithBlock:(nullable PFSessionResultBlock)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFSignUpView.h b/iOS/Parse.framework/Headers/PFSignUpView.h deleted file mode 100644 index 52f07c6..0000000 --- a/iOS/Parse.framework/Headers/PFSignUpView.h +++ /dev/null @@ -1,88 +0,0 @@ -// -// PFLogInView.h -// Parse -// -// Created by Qian Wang on 3/9/12. -// Copyright (c) 2012. All rights reserved. -// - -#import - -/*! - A bitmask specifying the sign up elements which are enabled in the view. - @see PFSignUpViewController - @see PFSignUpView - */ -typedef NS_OPTIONS(NSInteger, PFSignUpFields) { - /*! Username and password fields. */ - PFSignUpFieldsUsernameAndPassword = 0, - /*! Email field. */ - PFSignUpFieldsEmail = 1 << 0, - /*! This field can be used for something else. */ - PFSignUpFieldsAdditional = 1 << 1, - /*! Sign Up Button */ - PFSignUpFieldsSignUpButton = 1 << 2, - /*! Dismiss Button */ - PFSignUpFieldsDismissButton = 1 << 3, - /*! Default value. Combines Username, Password, Email, Sign Up and Dismiss Buttons. */ - PFSignUpFieldsDefault = (PFSignUpFieldsUsernameAndPassword | - PFSignUpFieldsEmail | - PFSignUpFieldsSignUpButton | - PFSignUpFieldsDismissButton) -}; - -/*! - The class provides a standard sign up interface for authenticating a PFUser. - */ -@interface PFSignUpView : UIScrollView - -/*! @name Creating Sign Up View */ - -/*! - Initializes the view with the specified sign up elements. - @param fields A bitmask specifying the sign up elements which are enabled in the view - @see PFSignUpFields - */ -- (instancetype)initWithFields:(PFSignUpFields)fields; - -/*! - The view controller that will present this view. - Used to lay out elements correctly when the presenting view controller has translucent elements. - */ -@property (nonatomic, strong) UIViewController *presentingViewController; - -/*! @name Customizing the Logo */ - -/// The logo. By default, it is the Parse logo. -@property (nonatomic, strong) UIView *logo; - -/*! @name Prompt for email as username. */ - -/// By default, this is set to NO. -@property (nonatomic, assign) BOOL emailAsUsername; - -/*! @name Accessing Sign Up Elements */ - -/// The bitmask which specifies the enabled sign up elements in the view -@property (nonatomic, assign, readonly) PFSignUpFields fields; - -/// The username text field. -@property (nonatomic, strong, readonly) UITextField *usernameField; - -/// The password text field. -@property (nonatomic, strong, readonly) UITextField *passwordField; - -/// The email text field. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UITextField *emailField; - -/// The additional text field. It is nil if the element is not enabled. -/// This field is intended to be customized. -@property (nonatomic, strong, readonly) UITextField *additionalField; - -/// The sign up button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *signUpButton; - -/// The dismiss button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *dismissButton; - -@end diff --git a/iOS/Parse.framework/Headers/PFSignUpViewController.h b/iOS/Parse.framework/Headers/PFSignUpViewController.h deleted file mode 100644 index 21c298f..0000000 --- a/iOS/Parse.framework/Headers/PFSignUpViewController.h +++ /dev/null @@ -1,117 +0,0 @@ -// -// PFLogInViewController.h -// Parse -// -// Created by Andrew Wang on 3/8/12. -// Copyright (c) 2012. All rights reserved. -// - -#import -#import "PFSignUpView.h" -#import "PFUser.h" - -@protocol PFSignUpViewControllerDelegate; - -/*! - The class that presents and manages a standard authentication interface for signing up a PFUser. - */ -@interface PFSignUpViewController : UIViewController - -/*! @name Configuring Sign Up Elements */ - -/*! - A bitmask specifying the sign up elements which are enabled in the view. - - enum { - PFSignUpFieldsUsernameAndPassword = 0, - PFSignUpFieldsEmail = 1 << 0, - PFSignUpFieldsAdditional = 1 << 1, // this field can be used for something else - PFSignUpFieldsSignUpButton = 1 << 2, - PFSignUpFieldsDismissButton = 1 << 3, - PFSignUpFieldsDefault = PFSignUpFieldsUsernameAndPassword | PFSignUpFieldsEmail | PFSignUpFieldsSignUpButton | PFSignUpFieldsDismissButton - }; - */ -@property (nonatomic, assign) PFSignUpFields fields; - -/// The sign up view. It contains all the enabled log in elements. -@property (nonatomic, strong, readonly) PFSignUpView *signUpView; - -/*! @name Configuring Sign Up Behaviors */ - -/*! - The delegate that responds to the control events of PFSignUpViewController. - */ -@property (nonatomic, weak) id delegate; - -/*! - Minimum required password length for user signups, defaults to 0. - */ -@property (nonatomic, assign) NSUInteger minPasswordLength; - -/*! - Whether to use the email as username on the attached signUpView. - If set to YES, we'll hide the email field, prompt for the email in - the username field, and save the email into both username and email - fields on the new PFUser object. By default, this is set to NO. - */ -@property (nonatomic, assign) BOOL emailAsUsername; - -@end - -/*! @name Notifications */ - -/*! - The notification is posted immediately after the sign up succeeds. - */ -extern NSString *const PFSignUpSuccessNotification; - -/*! - The notification is posted immediately after the sign up fails. - If the delegate prevents the sign up to start, the notification is not sent. - */ -extern NSString *const PFSignUpFailureNotification; - -/*! - The notification is posted immediately after the user cancels sign up. - */ -extern NSString *const PFSignUpCancelNotification; - -/*! - The protocol defines methods a delegate of a PFSignUpViewController should implement. - All methods of the protocol are optional. - */ -@protocol PFSignUpViewControllerDelegate - -@optional - -/*! @name Customizing Behavior */ - -/*! - Sent to the delegate to determine whether the sign up request should be submitted to the server. - @param signUpController The signup view controller that is requesting the data. - @param info a dictionary which contains all sign up information that the user entered. - @result a boolean indicating whether the sign up should proceed. - */ -- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary *)info; - -/*! - Sent to the delegate when a PFUser is signed up. - @param signUpController The signup view controller where signup finished. - @param user PFUser object that is a result of the sign up. - */ -- (void)signUpViewController:(PFSignUpViewController *)signUpController didSignUpUser:(PFUser *)user; - -/*! - Sent to the delegate when the sign up attempt fails. - @param signUpController The signup view controller where signup failed. - @param error NSError object representing the error that occured. - */ -- (void)signUpViewController:(PFSignUpViewController *)signUpController didFailToSignUpWithError:(NSError *)error; - -/*! - Sent to the delegate when the sign up screen is cancelled. - @param signUpController The signup view controller where signup was cancelled. - */ -- (void)signUpViewControllerDidCancelSignUp:(PFSignUpViewController *)signUpController; - -@end diff --git a/iOS/Parse.framework/Headers/PFSubclassing.h b/iOS/Parse.framework/Headers/PFSubclassing.h index adcebbd..6ccc3c5 100644 --- a/iOS/Parse.framework/Headers/PFSubclassing.h +++ b/iOS/Parse.framework/Headers/PFSubclassing.h @@ -1,78 +1,89 @@ -// -// PFSubclassing.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -@class PFQuery; +@class PFQuery PF_GENERIC(PFGenericObject : PFObject *); + +NS_ASSUME_NONNULL_BEGIN -/*! - If a subclass of conforms to `PFSubclassing` and calls , +/** + If a subclass of `PFObject` conforms to `PFSubclassing` and calls `PFObject.+registerSubclass`, Parse framework will be able to use that class as the native class for a Parse cloud object. - - Classes conforming to this protocol should subclass and + + Classes conforming to this protocol should subclass `PFObject` and include `PFObject+Subclass.h` in their implementation file. - This ensures the methods in the Subclass category of are exposed in its subclasses only. + This ensures the methods in the Subclass category of `PFObject` are exposed in its subclasses only. */ @protocol PFSubclassing -/*! - @abstract Constructs an object of the most specific class known to implement . +@required + +/** + The name of the class as seen in the REST API. + */ ++ (NSString *)parseClassName; - @discussion This method takes care to help subclasses be subclassed themselves. - For example, `[PFUser object]` returns a by default but will return an +@optional + +/** + Constructs an object of the most specific class known to implement `+parseClassName`. + + This method takes care to help `PFObject` subclasses be subclassed themselves. + For example, `PFUser.+object` returns a `PFUser` by default but will return an object of a registered subclass instead if one is known. - A default implementation is provided by which should always be sufficient. + A default implementation is provided by `PFObject` which should always be sufficient. - @returns Returns the object that is instantiated. + @return Returns the object that is instantiated. */ + (instancetype)object; -/*! - @abstract Creates a reference to an existing PFObject for use in creating associations between PFObjects. +/** + Creates a reference to an existing PFObject for use in creating associations between PFObjects. - @discussion Calling <[PFObject isDataAvailable]> on this object will return `NO` - until <[PFObject fetchIfNeeded]> has been called. No network request will be made. - A default implementation is provided by PFObject which should always be sufficient. + Calling `PFObject.dataAvailable` on this object will return `NO` + until `PFObject.-fetchIfNeeded` has been called. No network request will be made. + A default implementation is provided by `PFObject` which should always be sufficient. @param objectId The object id for the referenced object. - @returns A new without data. - */ -+ (instancetype)objectWithoutDataWithObjectId:(NSString *)objectId; - -/*! - @abstract The name of the class as seen in the REST API. + @return A new `PFObject` without data. */ -+ (NSString *)parseClassName; ++ (instancetype)objectWithoutDataWithObjectId:(nullable NSString *)objectId; -/*! - @abstract Create a query which returns objects of this type. +/** + Create a query which returns objects of this type. - @discussion A default implementation is provided by which should always be sufficient. + A default implementation is provided by `PFObject` which should always be sufficient. */ -+ (PFQuery *)query; ++ (nullable PFQuery *)query; -/*! - @abstract Returns a query for objects of this type with a given predicate. +/** + Returns a query for objects of this type with a given predicate. - @discussion A default implementation is provided by which should always be sufficient. + A default implementation is provided by `PFObject` which should always be sufficient. @param predicate The predicate to create conditions from. - @return An instance of . + @return An instance of `PFQuery`. @see [PFQuery queryWithClassName:predicate:] */ -+ (PFQuery *)queryWithPredicate:(NSPredicate *)predicate; ++ (nullable PFQuery *)queryWithPredicate:(nullable NSPredicate *)predicate; -/*! - @abstract Lets Parse know this class should be used to instantiate all objects with class type . +/** + Lets Parse know this class should be used to instantiate all objects with class type `parseClassName`. - @warning This method must be called before <[Parse setApplicationId:clientKey:]> + @warning This method must be called before `Parse.+setApplicationId:clientKey:`. */ + (void)registerSubclass; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFTableViewCell.h b/iOS/Parse.framework/Headers/PFTableViewCell.h deleted file mode 100644 index d457c7f..0000000 --- a/iOS/Parse.framework/Headers/PFTableViewCell.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// PFImageViewCell.h -// Parse -// -// Created by Qian Wang on 5/16/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import -#import "PFImageView.h" - -/*! - The PFTableViewCell is a table view cell which can download and display remote images stored on Parse. - - When used in a PFQueryTableViewController - downloading and displaying of the remote images - are automatically managed by the PFQueryTableViewController. - */ -@interface PFTableViewCell : UITableViewCell - -/*! - The imageView of the table view cell. - PFImageView supports remote image downloading. - */ -@property (nonatomic, strong, readonly) PFImageView *imageView; - -@end diff --git a/iOS/Parse.framework/Headers/PFTwitterUtils.h b/iOS/Parse.framework/Headers/PFTwitterUtils.h deleted file mode 100644 index f0c844e..0000000 --- a/iOS/Parse.framework/Headers/PFTwitterUtils.h +++ /dev/null @@ -1,319 +0,0 @@ -// -// PFTwitterUtils.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import -#import -#import - -@class BFTask; - -/*! - The `PFTwitterUtils` class provides utility functions for working with Twitter in a Parse application. - - This class is currently for iOS only. - */ -@interface PFTwitterUtils : NSObject - -///-------------------------------------- -/// @name Interacting With Twitter -///-------------------------------------- - -/*! - @abstract Gets the instance of the object that Parse uses. - - @returns An instance of object. - */ -+ (PF_Twitter *)twitter; - -/*! - @abstract Initializes the Twitter singleton. - - @warning You must invoke this in order to use the Twitter functionality in Parse. - - @param consumerKey Your Twitter application's consumer key. - @param consumerSecret Your Twitter application's consumer secret. - */ -+ (void)initializeWithConsumerKey:(NSString *)consumerKey - consumerSecret:(NSString *)consumerSecret; - -/*! - @abstract Whether the user has their account linked to Twitter. - - @param user User to check for a Twitter link. The user must be logged in on this device. - - @returns `YES` if the user has their account linked to Twitter, otherwise `NO`. - */ -+ (BOOL)isLinkedWithUser:(PFUser *)user; - -///-------------------------------------- -/// @name Logging In & Creating Twitter-Linked Users -///-------------------------------------- - -/*! - @abstract *Asynchronously* logs in a user using Twitter. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInInBackground; - -/*! - @abstract *Asynchronously* logs in a user using Twitter. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) . - - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithBlock:(PFUserResultBlock)block; - -/*! - @abstract *Asynchronously* Logs in a user using Twitter. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @param target Target object for the selector - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError **)error`. - */ -+ (void)logInWithTarget:(id)target selector:(SEL)selector; - -/*! - @abstract *Asynchronously* logs in a user using Twitter. - - @discussion Allows you to handle user login to Twitter, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithTwitterIdInBackground:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret; - -/*! - @abstract Logs in a user using Twitter. - - @discussion Allows you to handle user login to Twitter, then provide authentication data - to log in (or create, in the case where it is a new user) the . - - @param twitterId The id of the Twitter user being linked - @param screenName The screen name of the Twitter user being linked - @param authToken The auth token for the user's session - @param authTokenSecret The auth token secret for the user's session - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithTwitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - block:(PFUserResultBlock)block; - -/*! - @abstract Logs in a user using Twitter. - - @discussion Allows you to handle user login to Twitter, then provide authentication data - to log in (or create, in the case where it is a new user) the . - - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithTwitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Linking Users with Twitter -///-------------------------------------- - -/*! - @abstract *Asynchronously* links Twitter to an existing PFUser. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - - @deprecated Please use `[PFTwitterUtils linkUserInBackground:]` instead. - */ -+ (void)linkUser:(PFUser *)user PARSE_DEPRECATED("Please use +linkUserInBackground: instead."); - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user; - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - @param block The block to execute. - It should have the following argument signature: `^(BOOL *success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - @param target Target object for the selector - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user - target:(id)target - selector:(SEL)selector; - -/*! - @abstract *Asynchronously* links Twitter to an existing PFUser asynchronously. - - @discussion Allows you to handle user login to Twitter, - then provide authentication data to link the account to the . - - @param user User to link to Twitter. - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user - twitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret; - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussionAllows you to handle user login to Twitter, - then provide authentication data to link the account to the . - - @param user User to link to Twitter. - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @param block The block to execute. - It should have the following argument signature: `^(BOOL *success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user - twitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - block:(PFBooleanResultBlock)block; - -/*! - @abstract Links Twitter to an existing . - - @discussion This method allows you to handle user login to Twitter, - then provide authentication data to link the account to the . - - @param user User to link to Twitter. - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user - twitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Unlinking Users from Twitter -///-------------------------------------- - -/*! - @abstract *Synchronously* unlinks the from a Twitter account. - - @param user User to unlink from Twitter. - - @returns Returns true if the unlink was successful. - */ -+ (BOOL)unlinkUser:(PFUser *)user; - -/*! - @abstract *Synchronously* unlinks the PFUser from a Twitter account. - - @param user User to unlink from Twitter. - @param error Error object to set on error. - - @returns Returns `YES` if the unlink was successful, otherwise `NO`. - */ -+ (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; - -/*! - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. - - @param user User to unlink from Twitter. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)unlinkUserInBackground:(PFUser *)user; - -/*! - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. - - @param user User to unlink from Twitter. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unlinkUserInBackground:(PFUser *)user - block:(PFBooleanResultBlock)block; - -/*! - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. - - @param user User to unlink from Twitter - @param target Target object for the selector - @param selector The selector that will be called when the asynchrounous request is complete. - */ -+ (void)unlinkUserInBackground:(PFUser *)user - target:(id)target - selector:(SEL)selector; - -@end diff --git a/iOS/Parse.framework/Headers/PFUser.h b/iOS/Parse.framework/Headers/PFUser.h index 3cf9041..34cd890 100644 --- a/iOS/Parse.framework/Headers/PFUser.h +++ b/iOS/Parse.framework/Headers/PFUser.h @@ -1,168 +1,164 @@ -// -// PFUser.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE +#import + #import #import #import -#else -#import -#import -#import -#endif -@class PFQuery; +NS_ASSUME_NONNULL_BEGIN + +typedef void(^PFUserSessionUpgradeResultBlock)(NSError *__nullable error); +typedef void(^PFUserLogoutResultBlock)(NSError *__nullable error); -/*! +@class PFQuery PF_GENERIC(PFGenericObject : PFObject *); +@protocol PFUserAuthenticationDelegate; + +/** The `PFUser` class is a local representation of a user persisted to the Parse Data. - This class is a subclass of a , and retains the same functionality of a , + This class is a subclass of a `PFObject`, and retains the same functionality of a `PFObject`, but also extends it with various user specific methods, like authentication, signing up, and validation uniqueness. - + Many APIs responsible for linking a `PFUser` with Facebook or Twitter have been deprecated in favor of dedicated - utilities for each social network. See , and for more information. + utilities for each social network. See `PFFacebookUtils`, `PFTwitterUtils` and `PFAnonymousUtils` for more information. */ -@interface PFUser : PFObject - -/*! - @abstract The name of the `PFUser` class in the REST API. - - @discussion This is a required method. - */ -+ (NSString *)parseClassName; +@interface PFUser : PFObject ///-------------------------------------- /// @name Accessing the Current User ///-------------------------------------- -/*! - @abstract Gets the currently logged in user from disk and returns an instance of it. +/** + Gets the currently logged in user from disk and returns an instance of it. - @returns Returns a `PFUser` that is the currently logged in user. If there is none, returns `nil`. + @return Returns a `PFUser` that is the currently logged in user. If there is none, returns `nil`. */ -+ (instancetype)currentUser; ++ (nullable instancetype)currentUser; -/*! - @abstract The session token for the `PFUser`. +/** + The session token for the `PFUser`. - @discussion This is set by the server upon successful authentication. + This is set by the server upon successful authentication. */ -@property (nonatomic, strong) NSString *sessionToken; +@property (nullable, nonatomic, copy, readonly) NSString *sessionToken; -/*! - @abstract Whether the `PFUser` was just created from a request. +/** + Whether the `PFUser` was just created from a request. - @discussion This is only set after a Facebook or Twitter login. + This is only set after a Facebook or Twitter login. */ -@property (assign, readonly) BOOL isNew; +@property (nonatomic, assign, readonly) BOOL isNew; -/*! - @abstract Whether the user is an authenticated object for the device. +/** + Whether the user is an authenticated object for the device. - @discussion An authenticated `PFUser` is one that is obtained via a or method. + An authenticated `PFUser` is one that is obtained via a `-signUp:` or `+logInWithUsername:password:` method. An authenticated object is required in order to save (with altered values) or delete it. - - @returns Returns whether the user is authenticated. */ -- (BOOL)isAuthenticated; +@property (nonatomic, assign, readonly, getter=isAuthenticated) BOOL authenticated; ///-------------------------------------- /// @name Creating a New User ///-------------------------------------- -/*! - @abstract Creates a new `PFUser` object. +/** + Creates a new `PFUser` object. - @returns Returns a new `PFUser` object. + @return Returns a new `PFUser` object. */ -+ (PFUser *)user; ++ (instancetype)user; -/*! - @abstract Enables automatic creation of anonymous users. - - @discussion After calling this method, will always have a value. +/** + Enables automatic creation of anonymous users. + + After calling this method, `+currentUser` will always have a value. The user will only be created on the server once the user has been saved, or once an object with a relation to that user or an ACL that refers to the user has been saved. - @warning <[PFObject saveEventually]> will not work on if an item being saved has a relation + @warning `PFObject.-saveEventually` will not work on if an item being saved has a relation to an automatic user that has never been saved. */ + (void)enableAutomaticUser; -/*! - @abstract The username for the `PFUser`. +/** + The username for the `PFUser`. */ -@property (nonatomic, strong) NSString *username; +@property (nullable, nonatomic, strong) NSString *username; /**! - @abstract The password for the `PFUser`. + The password for the `PFUser`. - @discussion This will not be filled in from the server with the password. + This will not be filled in from the server with the password. It is only meant to be set. */ -@property (nonatomic, strong) NSString *password; +@property (nullable, nonatomic, strong) NSString *password; -/*! - @abstract The email for the `PFUser`. +/** + The email for the `PFUser`. */ -@property (nonatomic, strong) NSString *email; +@property (nullable, nonatomic, strong) NSString *email; -/*! - @abstract Signs up the user *synchronously*. +/** + Signs up the user *synchronously*. - @discussion This will also enforce that the username isn't already taken. + This will also enforce that the username isn't already taken. @warning Make sure that password and username are set before calling this method. - @returns Returns `YES` if the sign up was successful, otherwise `NO`. + @return Returns `YES` if the sign up was successful, otherwise `NO`. */ -- (BOOL)signUp; +- (BOOL)signUp PF_SWIFT_UNAVAILABLE; -/*! - @abstract Signs up the user *synchronously*. +/** + Signs up the user *synchronously*. - @discussion This will also enforce that the username isn't already taken. + This will also enforce that the username isn't already taken. @warning Make sure that password and username are set before calling this method. - @param error Error object to set on error. + @param error Error object to set on error. - @returns Returns whether the sign up was successful. + @return Returns whether the sign up was successful. */ - (BOOL)signUp:(NSError **)error; -/*! - @abstract Signs up the user *asynchronously*. +/** + Signs up the user *asynchronously*. - @discussion This will also enforce that the username isn't already taken. + This will also enforce that the username isn't already taken. @warning Make sure that password and username are set before calling this method. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -- (BFTask *)signUpInBackground; +- (BFTask PF_GENERIC(NSNumber *)*)signUpInBackground; -/*! - @abstract Signs up the user *asynchronously*. +/** + Signs up the user *asynchronously*. - @discussion This will also enforce that the username isn't already taken. + This will also enforce that the username isn't already taken. @warning Make sure that password and username are set before calling this method. @param block The block to execute. It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ -- (void)signUpInBackgroundWithBlock:(PFBooleanResultBlock)block; +- (void)signUpInBackgroundWithBlock:(nullable PFBooleanResultBlock)block; -/*! - @abstract Signs up the user *asynchronously*. +/** + Signs up the user *asynchronously*. - @discussion This will also enforce that the username isn't already taken. + This will also enforce that the username isn't already taken. @warning Make sure that password and username are set before calling this method. @@ -172,63 +168,63 @@ `error` will be `nil` on success and set if there was an error. `[result boolValue]` will tell you whether the call succeeded or not. */ -- (void)signUpInBackgroundWithTarget:(id)target selector:(SEL)selector; +- (void)signUpInBackgroundWithTarget:(nullable id)target selector:(nullable SEL)selector; ///-------------------------------------- /// @name Logging In ///-------------------------------------- -/*! - @abstract Makes a *synchronous* request to login a user with specified credentials. +/** + Makes a *synchronous* request to login a user with specified credentials. - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. + Returns an instance of the successfully logged in `PFUser`. + This also caches the user locally so that calls to `+currentUser` will use the latest logged in user. @param username The username of the user. @param password The password of the user. - @returns Returns an instance of the `PFUser` on success. + @return Returns an instance of the `PFUser` on success. If login failed for either wrong password or wrong username, returns `nil`. */ -+ (instancetype)logInWithUsername:(NSString *)username - password:(NSString *)password; ++ (nullable instancetype)logInWithUsername:(NSString *)username + password:(NSString *)password PF_SWIFT_UNAVAILABLE; -/*! - @abstract Makes a *synchronous* request to login a user with specified credentials. +/** + Makes a *synchronous* request to login a user with specified credentials. - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. + Returns an instance of the successfully logged in `PFUser`. + This also caches the user locally so that calls to `+currentUser` will use the latest logged in user. @param username The username of the user. @param password The password of the user. @param error The error object to set on error. - @returns Returns an instance of the `PFUser` on success. + @return Returns an instance of the `PFUser` on success. If login failed for either wrong password or wrong username, returns `nil`. */ -+ (instancetype)logInWithUsername:(NSString *)username - password:(NSString *)password - error:(NSError **)error; ++ (nullable instancetype)logInWithUsername:(NSString *)username + password:(NSString *)password + error:(NSError **)error; -/*! - @abstract Makes an *asynchronous* request to login a user with specified credentials. +/** + Makes an *asynchronous* request to login a user with specified credentials. - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. + Returns an instance of the successfully logged in `PFUser`. + This also caches the user locally so that calls to `+currentUser` will use the latest logged in user. @param username The username of the user. @param password The password of the user. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)logInWithUsernameInBackground:(NSString *)username - password:(NSString *)password; ++ (BFTask PF_GENERIC(__kindof PFUser *)*)logInWithUsernameInBackground:(NSString *)username + password:(NSString *)password; -/*! - @abstract Makes an *asynchronous* request to login a user with specified credentials. +/** + Makes an *asynchronous* request to login a user with specified credentials. - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. + Returns an instance of the successfully logged in `PFUser`. + This also caches the user locally so that calls to `+currentUser` will use the latest logged in user. @param username The username of the user. @param password The password of the user. @@ -238,14 +234,14 @@ */ + (void)logInWithUsernameInBackground:(NSString *)username password:(NSString *)password - target:(id)target - selector:(SEL)selector; + target:(nullable id)target + selector:(nullable SEL)selector; -/*! - @abstract Makes an *asynchronous* request to log in a user with specified credentials. +/** + Makes an *asynchronous* request to log in a user with specified credentials. - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. + Returns an instance of the successfully logged in `PFUser`. + This also caches the user locally so that calls to `+currentUser` will use the latest logged in user. @param username The username of the user. @param password The password of the user. @@ -254,57 +250,68 @@ */ + (void)logInWithUsernameInBackground:(NSString *)username password:(NSString *)password - block:(PFUserResultBlock)block; + block:(nullable PFUserResultBlock)block; ///-------------------------------------- /// @name Becoming a User ///-------------------------------------- -/*! - @abstract Makes a *synchronous* request to become a user with the given session token. +/** + Makes a *synchronous* request to become a user with the given session token. - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. + Returns an instance of the successfully logged in `PFUser`. + This also caches the user locally so that calls to `+currentUser` will use the latest logged in user. @param sessionToken The session token for the user. - @returns Returns an instance of the `PFUser` on success. + @return Returns an instance of the `PFUser` on success. If becoming a user fails due to incorrect token, it returns `nil`. */ -+ (instancetype)become:(NSString *)sessionToken; ++ (nullable instancetype)become:(NSString *)sessionToken PF_SWIFT_UNAVAILABLE; -/*! - @abstract Makes a *synchronous* request to become a user with the given session token. +/** + Makes a *synchronous* request to become a user with the given session token. - @discussion Returns an instance of the successfully logged in `PFUser`. - This will also cache the user locally so that calls to will use the latest logged in user. + Returns an instance of the successfully logged in `PFUser`. + This will also cache the user locally so that calls to `+currentUser` will use the latest logged in user. @param sessionToken The session token for the user. @param error The error object to set on error. - @returns Returns an instance of the `PFUser` on success. + @return Returns an instance of the `PFUser` on success. If becoming a user fails due to incorrect token, it returns `nil`. */ -+ (instancetype)become:(NSString *)sessionToken - error:(NSError **)error; ++ (nullable instancetype)become:(NSString *)sessionToken error:(NSError **)error; -/*! - @abstract Makes an *asynchronous* request to become a user with the given session token. +/** + Makes an *asynchronous* request to become a user with the given session token. - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. + Returns an instance of the successfully logged in `PFUser`. + This also caches the user locally so that calls to `+currentUser` will use the latest logged in user. @param sessionToken The session token for the user. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)becomeInBackground:(NSString *)sessionToken; ++ (BFTask PF_GENERIC(__kindof PFUser *)*)becomeInBackground:(NSString *)sessionToken; -/*! - @abstract Makes an *asynchronous* request to become a user with the given session token. +/** + Makes an *asynchronous* request to become a user with the given session token. - @discussion Returns an instance of the successfully logged in `PFUser`. This also caches the user locally - so that calls to will use the latest logged in user. + Returns an instance of the successfully logged in `PFUser`. This also caches the user locally + so that calls to `+currentUser` will use the latest logged in user. + + @param sessionToken The session token for the user. + @param block The block to execute. + The block should have the following argument signature: `^(PFUser *user, NSError *error)`. + */ ++ (void)becomeInBackground:(NSString *)sessionToken block:(nullable PFUserResultBlock)block; + +/** + Makes an *asynchronous* request to become a user with the given session token. + + Returns an instance of the successfully logged in `PFUser`. This also caches the user locally + so that calls to `+currentUser` will use the latest logged in user. @param sessionToken The session token for the user. @param target Target object for the selector. @@ -312,105 +319,201 @@ It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. */ + (void)becomeInBackground:(NSString *)sessionToken - target:(id)target - selector:(SEL)selector; + target:(__nullable id)target + selector:(__nullable SEL)selector; + +///-------------------------------------- +/// @name Revocable Session +///-------------------------------------- -/*! - @abstract Makes an *asynchronous* request to become a user with the given session token. +/** + Enables revocable sessions and migrates the currentUser session token to use revocable session if needed. - @discussion Returns an instance of the successfully logged in `PFUser`. This also caches the user locally - so that calls to will use the latest logged in user. + This method is required if you want to use `PFSession` APIs + and your application's 'Require Revocable Session' setting is turned off on `http://parse.com` app settings. + After returned `BFTask` completes - `PFSession` class and APIs will be available for use. - @param sessionToken The session token for the user. - @param block The block to execute. The block should have the following argument signature: (PFUser *user, NSError *error) + @return An instance of `BFTask` that is completed when revocable + sessions are enabled and currentUser token is migrated. */ -+ (void)becomeInBackground:(NSString *)sessionToken - block:(PFUserResultBlock)block; ++ (BFTask *)enableRevocableSessionInBackground; + +/** + Enables revocable sessions and upgrades the currentUser session token to use revocable session if needed. + + This method is required if you want to use `PFSession` APIs + and legacy sessions are enabled in your application settings on `http://parse.com/`. + After returned `BFTask` completes - `PFSession` class and APIs will be available for use. + + @param block Block that will be called when revocable sessions are enabled and currentUser token is migrated. + */ ++ (void)enableRevocableSessionInBackgroundWithBlock:(nullable PFUserSessionUpgradeResultBlock)block; ///-------------------------------------- /// @name Logging Out ///-------------------------------------- -/*! - @abstract *Synchronously* logs out the currently logged in user on disk. +/** + *Synchronously* logs out the currently logged in user on disk. */ + (void)logOut; +/** + *Asynchronously* logs out the currently logged in user. + + This will also remove the session from disk, log out of linked services + and all future calls to `+currentUser` will return `nil`. This is preferrable to using `-logOut`, + unless your code is already running from a background thread. + + @return An instance of `BFTask`, that is resolved with `nil` result when logging out completes. + */ ++ (BFTask *)logOutInBackground; + +/** + *Asynchronously* logs out the currently logged in user. + + This will also remove the session from disk, log out of linked services + and all future calls to `+currentUser` will return `nil`. This is preferrable to using `-logOut`, + unless your code is already running from a background thread. + + @param block A block that will be called when logging out completes or fails. + */ ++ (void)logOutInBackgroundWithBlock:(nullable PFUserLogoutResultBlock)block; + ///-------------------------------------- /// @name Requesting a Password Reset ///-------------------------------------- -/*! - @abstract *Synchronously* Send a password reset request for a specified email. +/** + *Synchronously* Send a password reset request for a specified email. - @discussion If a user account exists with that email, an email will be sent to that address + If a user account exists with that email, an email will be sent to that address with instructions on how to reset their password. @param email Email of the account to send a reset password request. - @returns Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address. + @return Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address. */ -+ (BOOL)requestPasswordResetForEmail:(NSString *)email; ++ (BOOL)requestPasswordResetForEmail:(NSString *)email PF_SWIFT_UNAVAILABLE; -/*! - @abstract *Synchronously* send a password reset request for a specified email and sets an error object. +/** + *Synchronously* send a password reset request for a specified email and sets an error object. - @discussion If a user account exists with that email, an email will be sent to that address + If a user account exists with that email, an email will be sent to that address with instructions on how to reset their password. @param email Email of the account to send a reset password request. @param error Error object to set on error. - @returns Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address. + @return Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address. */ -+ (BOOL)requestPasswordResetForEmail:(NSString *)email - error:(NSError **)error; ++ (BOOL)requestPasswordResetForEmail:(NSString *)email error:(NSError **)error; -/*! - @abstract Send a password reset request asynchronously for a specified email and sets an - error object. If a user account exists with that email, an email will be sent to +/** + Send a password reset request asynchronously for a specified email and sets an + error object. If a user account exists with that email, an email will be sent to that address with instructions on how to reset their password. @param email Email of the account to send a reset password request. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -+ (BFTask *)requestPasswordResetForEmailInBackground:(NSString *)email; ++ (BFTask PF_GENERIC(NSNumber *)*)requestPasswordResetForEmailInBackground:(NSString *)email; -/*! - @abstract Send a password reset request *asynchronously* for a specified email and sets an error object. +/** + Send a password reset request *asynchronously* for a specified email. - @discussion If a user account exists with that email, an email will be sent to that address + If a user account exists with that email, an email will be sent to that address with instructions on how to reset their password. @param email Email of the account to send a reset password request. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. + @param block The block to execute. + It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. */ + (void)requestPasswordResetForEmailInBackground:(NSString *)email - target:(id)target - selector:(SEL)selector; + block:(nullable PFBooleanResultBlock)block; -/*! - @abstract Send a password reset request *asynchronously* for a specified email. +/** + Send a password reset request *asynchronously* for a specified email and sets an error object. - @discussion If a user account exists with that email, an email will be sent to that address + If a user account exists with that email, an email will be sent to that address with instructions on how to reset their password. @param email Email of the account to send a reset password request. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. + @param target Target object for the selector. + @param selector The selector that will be called when the asynchronous request is complete. + It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. + `error` will be `nil` on success and set if there was an error. + `[result boolValue]` will tell you whether the call succeeded or not. */ + (void)requestPasswordResetForEmailInBackground:(NSString *)email - block:(PFBooleanResultBlock)block; + target:(__nullable id)target + selector:(__nullable SEL)selector; ///-------------------------------------- -/// @name Querying for Users +/// @name Third-party Authentication ///-------------------------------------- -/*! - @abstract Creates a for `PFUser` objects. +/** + Registers a third party authentication delegate. + + @note This method shouldn't be invoked directly unless developing a third party authentication library. + @see PFUserAuthenticationDelegate + + @param delegate The third party authenticaiton delegate to be registered. + @param authType The name of the type of third party authentication source. */ -+ (PFQuery *)query; ++ (void)registerAuthenticationDelegate:(id)delegate forAuthType:(NSString *)authType; + +/** + Logs in a user with third party authentication credentials. + + @note This method shouldn't be invoked directly unless developing a third party authentication library. + @see PFUserAuthenticationDelegate + + @param authType The name of the type of third party authentication source. + @param authData The user credentials of the third party authentication source. + + @return A `BFTask` that is resolved to `PFUser` when logging in completes. + */ ++ (BFTask PF_GENERIC(PFUser *)*)logInWithAuthTypeInBackground:(NSString *)authType + authData:(NSDictionary PF_GENERIC(NSString *, NSString *)*)authData; + +/** + Links this user to a third party authentication library. + + @note This method shouldn't be invoked directly unless developing a third party authentication library. + @see PFUserAuthenticationDelegate + + @param authType The name of the type of third party authentication source. + @param authData The user credentials of the third party authentication source. + + @return A `BFTask` that is resolved to `@YES` if linking succeeds. + */ +- (BFTask PF_GENERIC(NSNumber *)*)linkWithAuthTypeInBackground:(NSString *)authType + authData:(NSDictionary PF_GENERIC(NSString *, NSString *)*)authData; + +/** + Unlinks this user from a third party authentication library. + + @note This method shouldn't be invoked directly unless developing a third party authentication library. + @see PFUserAuthenticationDelegate + + @param authType The name of the type of third party authentication source. + + @return A `BFTask` that is resolved to `@YES` if unlinking succeeds. + */ +- (BFTask PF_GENERIC(NSNumber *)*)unlinkWithAuthTypeInBackground:(NSString *)authType; + +/** + Indicates whether this user is linked with a third party authentication library of a specific type. + + @note This method shouldn't be invoked directly unless developing a third party authentication library. + @see PFUserAuthenticationDelegate + + @param authType The name of the type of third party authentication source. + + @return `YES` if the user is linked with a provider, otherwise `NO`. + */ +- (BOOL)isLinkedWithAuthType:(NSString *)authType; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PFUserAuthenticationDelegate.h b/iOS/Parse.framework/Headers/PFUserAuthenticationDelegate.h new file mode 100644 index 0000000..9c1eea7 --- /dev/null +++ b/iOS/Parse.framework/Headers/PFUserAuthenticationDelegate.h @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + Provides a general interface for delegation of third party authentication with `PFUser`s. + */ +@protocol PFUserAuthenticationDelegate + +/** + Called when restoring third party authentication credentials that have been serialized, + such as session keys, user id, etc. + + @note This method will be executed on a background thread. + + @param authData The auth data for the provider. This value may be `nil` when unlinking an account. + + @return `YES` - if the `authData` was succesfully synchronized, + or `NO` if user should not longer be associated because of bad `authData`. + */ +- (BOOL)restoreAuthenticationWithAuthData:(nullable NSDictionary PF_GENERIC(NSString *, NSString *)*)authData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Headers/PF_MBProgressHUD.h b/iOS/Parse.framework/Headers/PF_MBProgressHUD.h deleted file mode 100755 index 42080df..0000000 --- a/iOS/Parse.framework/Headers/PF_MBProgressHUD.h +++ /dev/null @@ -1,348 +0,0 @@ -// -// MBProgressHUD.h -// Version 0.4 -// Created by Matej Bukovinski on 2.4.09. -// - -// This code is distributed under the terms and conditions of the MIT license. - -// Copyright (c) 2011 Matej Bukovinski -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -#import "PFConstants.h" - -@protocol PF_MBProgressHUDDelegate; - -///////////////////////////////////////////////////////////////////////////////////////////// - -typedef enum { - /** Progress is shown using an UIActivityIndicatorView. This is the default. */ - PF_MBProgressHUDModeIndeterminate, - /** Progress is shown using a MBRoundProgressView. */ - PF_MBProgressHUDModeDeterminate, - /** Shows a custom view */ - PF_MBProgressHUDModeCustomView -} PF_MBProgressHUDMode; - -typedef enum { - /** Opacity animation */ - PF_MBProgressHUDAnimationFade, - /** Opacity + scale animation */ - PF_MBProgressHUDAnimationZoom -} PF_MBProgressHUDAnimation; - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. - * - * This is a simple drop-in class for displaying a progress HUD view similar to Apples private UIProgressHUD class. - * The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all - * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is - * drawn centered as a rounded semi-transparent view witch resizes depending on the user specified content. - * - * This view supports three modes of operation: - * - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView - * - MBProgressHUDModeDeterminate - shows a custom round progress indicator (MBRoundProgressView) - * - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (@see customView) - * - * All three modes can have optional labels assigned: - * - If the labelText property is set and non-empty then a label containing the provided content is placed below the - * indicator view. - * - If also the detailsLabelText property is set then another label is placed below the first label. - */ -@interface PF_MBProgressHUD : UIView { - PF_MBProgressHUDMode mode; - -#if __has_feature(objc_arc) - id __weak delegate; -#else - id delegate; -#endif - - SEL methodForExecution; - id targetForExecution; - id objectForExecution; - BOOL useAnimation; - - UILabel *label; - UILabel *detailsLabel; - - float progress; - - NSString *labelText; - NSString *detailsLabelText; - - BOOL isFinished; - - CGAffineTransform rotationTransform; -} - -/** - * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. - * - * @param view The view that the HUD will be added to - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return A reference to the created HUD. - * - * @see hideHUDForView:animated: - */ -+ (PF_MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; - -/** - * Finds a HUD sibview and hides it. The counterpart to this method is showHUDAddedTo:animated:. - * - * @param view The view that is going to be searched for a HUD subview. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return YES if a HUD was found and removed, NO otherwise. - * - * @see hideHUDForView:animated: - */ -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; - -/** - * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with - * window.bounds as the parameter. - * - * @param window The window instance that will provide the bounds for the HUD. Should probably be the same instance as - * the HUD's superview (i.e., the window that the HUD will be added to). - */ -- (id)initWithWindow:(UIWindow *)window; - -/** - * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with - * view.bounds as the parameter - * - * @param view The view instance that will provide the bounds for the HUD. Should probably be the same instance as - * the HUD's superview (i.e., the view that the HUD will be added to). - */ -- (id)initWithView:(UIView *)view; - -/** - * The UIView (i.g., a UIIMageView) to be shown when the HUD is in MBProgressHUDModeCustomView. - * For best results use a 37 by 37 pixel view (so the bounds match the build in indicator bounds). - */ -@property (strong) UIView *customView; - -/** - * MBProgressHUD operation mode. Switches between indeterminate (MBProgressHUDModeIndeterminate) and determinate - * progress (MBProgressHUDModeDeterminate). The default is MBProgressHUDModeIndeterminate. - * - * @see MBProgressHUDMode - */ -@property (assign) PF_MBProgressHUDMode mode; - -/** - * The animation type that should be used when the HUD is shown and hidden. - * - * @see MBProgressHUDAnimation - */ -@property (assign) PF_MBProgressHUDAnimation animationType; - -/** - * The HUD delegate object. If set the delegate will receive hudWasHidden callbacks when the HUD was hidden. The - * delegate should conform to the MBProgressHUDDelegate protocol and implement the hudWasHidden method. The delegate - * object will not be retained. - */ -@property (weak) id delegate; - -/** - * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit - * the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or - * set to @"", then no message is displayed. - */ -@property (copy) NSString *labelText; - -/** - * An optional details message displayed below the labelText message. This message is displayed only if the labelText - * property is also set and is different from an empty string (@""). - */ -@property (copy) NSString *detailsLabelText; - -/** - * The opacity of the HUD window. Defaults to 0.9 (90% opacity). - */ -@property (assign) float opacity; - -/** - * The x-axis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float xOffset; - -/** - * The y-ayis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float yOffset; - -/** - * The amounth of space between the HUD edge and the HUD elements (labels, indicators or custom views). - * - * Defaults to 20.0 - */ -@property (assign) float margin; - -/** - * Cover the HUD background view with a radial gradient. - */ -@property (assign) BOOL dimBackground; - -/* - * Grace period is the time (in seconds) that the invoked method may be run without - * showing the HUD. If the task finishes befor the grace time runs out, the HUD will - * not be shown at all. - * This may be used to prevent HUD display for very short tasks. - * Defaults to 0 (no grace time). - * Grace time functionality is only supported when the task status is known! - * @see taskInProgress - */ -@property (assign) float graceTime; - - -/** - * The minimum time (in seconds) that the HUD is shown. - * This avoids the problem of the HUD being shown and than instantly hidden. - * Defaults to 0 (no minimum show time). - */ -@property (assign) float minShowTime; - -/** - * Indicates that the executed operation is in progress. Needed for correct graceTime operation. - * If you don't set a graceTime (different than 0.0) this does nothing. - * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:. - * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly), - * you need to set this property when your task starts and completes in order to have normal graceTime - * functunality. - */ -@property (assign) BOOL taskInProgress; - -/** - * Removes the HUD from it's parent view when hidden. - * Defaults to NO. - */ -@property (assign) BOOL removeFromSuperViewOnHide; - -/** - * Font to be used for the main label. Set this property if the default is not adequate. - */ -@property (strong) UIFont* labelFont; - -/** - * Font to be used for the details label. Set this property if the default is not adequate. - */ -@property (strong) UIFont* detailsLabelFont; - -/** - * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. - */ -@property (assign) float progress; - - -/** - * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so - * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread - * (e.g., when using something like NSOperation or calling an asynchronous call like NSUrlRequest). - * - * If you need to perform a blocking thask on the main thread, you can try spining the run loop imeidiately after calling this - * method by using: - * - * [[NSRunLoop currentRunLoop] runUntilDate:[NSDate distantPast]]; - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - */ -- (void)show:(BOOL)animated; - -/** - * Hide the HUD. This still calls the hudWasHidden delegate. This is the counterpart of the hide: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - */ -- (void)hide:(BOOL)animated; - -/** - * Hide the HUD after a delay. This still calls the hudWasHidden delegate. This is the counterpart of the hide: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @param delay Delay in secons until the HUD is hidden. - */ -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay; - -/** - * Shows the HUD while a background task is executing in a new thread, then hides the HUD. - * - * This method also takes care of NSAutoreleasePools so your method does not have to be concerned with setting up a - * pool. - * - * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread. - * @param target The object that the target method belongs to. - * @param object An optional object to be passed to the method. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - */ -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated; - -@end - -///////////////////////////////////////////////////////////////////////////////////////////// - -@protocol PF_MBProgressHUDDelegate - -@optional - -/** - * Called after the HUD was fully hidden from the screen. - */ -- (void)hudWasHidden:(PF_MBProgressHUD *)hud; - -/** - * @deprecated use hudWasHidden: instead - * @see hudWasHidden: - */ -- (void)hudWasHidden PARSE_DEPRECATED("Use -hudWasHidden: instead."); - -@end - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** - * A progress view for showing definite progress by filling up a circle (pie chart). - */ -@interface PF_MBRoundProgressView : UIView { -@private - float _progress; -} - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -@end - -///////////////////////////////////////////////////////////////////////////////////////////// - diff --git a/iOS/Parse.framework/Headers/PF_Twitter.h b/iOS/Parse.framework/Headers/PF_Twitter.h deleted file mode 100644 index e2a27fb..0000000 --- a/iOS/Parse.framework/Headers/PF_Twitter.h +++ /dev/null @@ -1,85 +0,0 @@ -// -// PF_Twitter.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -@class BFTask; - -/*! - The `PF_Twitter` class is a simple interface for interacting with the Twitter REST API, - automating sign-in and OAuth signing of requests against the API. - */ -@interface PF_Twitter : NSObject { -@private - NSString *consumerKey; - NSString *consumerSecret; - NSString *authToken; - NSString *authTokenSecret; - NSString *userId; - NSString *screenName; -} - -/*! - @abstract Consumer key of the application that is used to authorize with Twitter. - */ -@property (nonatomic, copy) NSString *consumerKey; - -/*! - @abstract Consumer secret of the application that is used to authorize with Twitter. - */ -@property (nonatomic, copy) NSString *consumerSecret; - -/*! - @abstract Auth token for the current user. - */ -@property (nonatomic, copy) NSString *authToken; - -/*! - @abstract Auth token secret for the current user. - */ -@property (nonatomic, copy) NSString *authTokenSecret; - -/*! - @abstract Twitter user id of the currently signed in user. - */ -@property (nonatomic, copy) NSString *userId; - -/*! - @abstract Twitter screen name of the currently signed in user. - */ -@property (nonatomic, copy) NSString *screenName; - -/*! - @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties - if the Twitter user grants permission to the application. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)authorizeInBackground; - -/*! - @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties - if the Twitter user grants permission to the application. - - @param success Invoked upon successful authorization. - @param failure Invoked upon an error occurring in the authorization process. - @param cancel Invoked when the user cancels authorization. - */ -- (void)authorizeWithSuccess:(void (^)(void))success - failure:(void (^)(NSError *error))failure - cancel:(void (^)(void))cancel; - -/*! - @abstract Adds a 3-legged OAuth signature to an `NSMutableURLRequest` based - upon the properties set for the Twitter object. - - @discussion Use this function to sign requests being made to the Twitter API. - - @param request Request to sign. - */ -- (void)signRequest:(NSMutableURLRequest *)request; - -@end diff --git a/iOS/Parse.framework/Headers/Parse.h b/iOS/Parse.framework/Headers/Parse.h index 36910d3..8783589 100644 --- a/iOS/Parse.framework/Headers/Parse.h +++ b/iOS/Parse.framework/Headers/Parse.h @@ -1,13 +1,14 @@ -// -// Parse.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import -#if TARGET_OS_IPHONE - #import #import #import @@ -21,36 +22,34 @@ #import #import #import +#import #import #import +#import + +#if TARGET_OS_IOS + #import #import +#import #import #import + +#elif PF_TARGET_OS_OSX + +#import #import -#import - -#else - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import + +#elif TARGET_OS_TV + +#import +#import #endif -/*! +NS_ASSUME_NONNULL_BEGIN + +/** The `Parse` class contains static functions that handle global configuration for the Parse framework. */ @interface Parse : NSObject @@ -59,21 +58,21 @@ /// @name Connecting to Parse ///-------------------------------------- -/*! - @abstract Sets the applicationId and clientKey of your application. +/** + Sets the applicationId and clientKey of your application. @param applicationId The application id of your Parse application. @param clientKey The client key of your Parse application. */ + (void)setApplicationId:(NSString *)applicationId clientKey:(NSString *)clientKey; -/*! - @abstract The current application id that was used to configure Parse framework. +/** + The current application id that was used to configure Parse framework. */ + (NSString *)getApplicationId; -/*! - @abstract The current client key that was used to configure Parse framework. +/** + The current client key that was used to configure Parse framework. */ + (NSString *)getClientKey; @@ -81,11 +80,63 @@ /// @name Enabling Local Datastore ///-------------------------------------- -/*! - @abstract 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:`. +/** + 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 PF_TV_UNAVAILABLE; + +/** + Flag that indicates whether Local Datastore is enabled. + + @return `YES` if Local Datastore is enabled, otherwise `NO`. + */ ++ (BOOL)isLocalDatastoreEnabled PF_TV_UNAVAILABLE; + +///-------------------------------------- +/// @name Enabling Extensions Data Sharing +///-------------------------------------- + +/** + 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:`. + + @param groupIdentifier Application Group Identifier to share data with. + */ ++ (void)enableDataSharingWithApplicationGroupIdentifier:(NSString *)groupIdentifier PF_EXTENSION_UNAVAILABLE("Use `enableDataSharingWithApplicationGroupIdentifier:containingApplication:`.") PF_WATCH_UNAVAILABLE PF_TV_UNAVAILABLE; + +/** + 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. + + @param groupIdentifier Application Group Identifier to share data with. + @param bundleIdentifier Bundle identifier of the containing application. + */ ++ (void)enableDataSharingWithApplicationGroupIdentifier:(NSString *)groupIdentifier + containingApplication:(NSString *)bundleIdentifier PF_WATCH_UNAVAILABLE PF_TV_UNAVAILABLE; + +/** + Application Group Identifier for Data Sharing. + + @return `NSString` value if data sharing is enabled, otherwise `nil`. */ -+ (void)enableLocalDatastore; ++ (NSString *)applicationGroupIdentifierForDataSharing PF_WATCH_UNAVAILABLE PF_TV_UNAVAILABLE; + +/** + Containing application bundle identifier for Data Sharing. + + @return `NSString` value if data sharing is enabled, otherwise `nil`. + */ ++ (NSString *)containingApplicationBundleIdentifierForDataSharing PF_WATCH_UNAVAILABLE PF_TV_UNAVAILABLE; #if PARSE_IOS_ONLY @@ -93,22 +144,57 @@ /// @name Configuring UI Settings ///-------------------------------------- -/*! - @abstract Set whether to show offline messages when using a Parse view or view controller related classes. +/** + Set whether to show offline messages when using a Parse view or view controller related classes. @param enabled Whether a `UIAlertView` should be shown when the device is offline and network access is required from a view or view controller. + + @deprecated This method has no effect. */ -+ (void)offlineMessagesEnabled:(BOOL)enabled; ++ (void)offlineMessagesEnabled:(BOOL)enabled PARSE_DEPRECATED("This method is deprecated and has no effect."); -/*! - @abstract Set whether to show an error message when using a Parse view or view controller related classes +/** + 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. @param enabled Whether a `UIAlertView` should be shown when an error occurs. + + @deprecated This method has no effect. */ -+ (void)errorMessagesEnabled:(BOOL)enabled; ++ (void)errorMessagesEnabled:(BOOL)enabled PARSE_DEPRECATED("This method is deprecated and has no effect."); #endif +///-------------------------------------- +/// @name Logging +///-------------------------------------- + +/** + 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` + + @param logLevel Log level to set. + @see PFLogLevel + */ ++ (void)setLogLevel:(PFLogLevel)logLevel; + +/** + 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` + + @return A `PFLogLevel` value. + @see PFLogLevel + */ ++ (PFLogLevel)logLevel; + @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/Parse.framework/Info.plist b/iOS/Parse.framework/Info.plist index 0e8676f..11d33c7 100644 Binary files a/iOS/Parse.framework/Info.plist and b/iOS/Parse.framework/Info.plist differ diff --git a/iOS/Parse.framework/Parse b/iOS/Parse.framework/Parse index dac3b0e..6273572 100644 Binary files a/iOS/Parse.framework/Parse and b/iOS/Parse.framework/Parse differ diff --git a/iOS/Parse.framework/Resources/Info.plist b/iOS/Parse.framework/Resources/Info.plist deleted file mode 100644 index 5d39d5f..0000000 --- a/iOS/Parse.framework/Resources/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Parse - CFBundleIdentifier - com.parse.Parse - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.4.0 - CFBundleSignature - ???? - CFBundleVersion - 1.4.0 - - diff --git a/iOS/Parse.framework/Resources/Localizable.strings b/iOS/Parse.framework/Resources/Localizable.strings deleted file mode 100644 index 5248130..0000000 Binary files a/iOS/Parse.framework/Resources/Localizable.strings and /dev/null differ diff --git a/iOS/Parse.framework/Versions/A/Headers/PFACL.h b/iOS/Parse.framework/Versions/A/Headers/PFACL.h deleted file mode 100644 index aa05ebb..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFACL.h +++ /dev/null @@ -1,255 +0,0 @@ -// -// PFACL.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -@class PFRole; -@class PFUser; - -/*! - The `PFACL` class is used to control which users can access or modify a particular object. - Each can have its own `PFACL`. You can grant read and write permissions separately to specific users, - to groups of users that belong to roles, or you can grant permissions to "the public" so that, - for example, any user could read a particular object but only a particular set of users could write to that object. - */ -@interface PFACL : NSObject - -///-------------------------------------- -/// @name Creating an ACL -///-------------------------------------- - -/*! - @abstract Creates an ACL with no permissions granted. - - @returns Returns a new `PFACL`. - */ -+ (PFACL *)ACL; - -/*! - @abstract Creates an ACL where only the provided user has access. - - @param user The user to assign access. - */ -+ (PFACL *)ACLWithUser:(PFUser *)user; - -///-------------------------------------- -/// @name Controlling Public Access -///-------------------------------------- - -/*! - @abstract Set whether the public is allowed to read this object. - - @param allowed Whether the public can read this object. - */ -- (void)setPublicReadAccess:(BOOL)allowed; - -/*! - @abstract Gets whether the public is allowed to read this object. - - @returns `YES` if the public read access is enabled, otherwise `NO`. - */ -- (BOOL)getPublicReadAccess; - -/*! - @abstract Set whether the public is allowed to write this object. - - @param allowed Whether the public can write this object. - */ -- (void)setPublicWriteAccess:(BOOL)allowed; - -/*! - @abstract Gets whether the public is allowed to write this object. - - @returns `YES` if the public write access is enabled, otherwise `NO`. - */ -- (BOOL)getPublicWriteAccess; - -///-------------------------------------- -/// @name Controlling Access Per-User -///-------------------------------------- - -/*! - @abstract Set whether the given user id is allowed to read this object. - - @param allowed Whether the given user can write this object. - @param userId The <[PFObject objectId]> of the user to assign access. - */ -- (void)setReadAccess:(BOOL)allowed forUserId:(NSString *)userId; - -/*! - @abstract Gets whether the given user id is *explicitly* allowed to read this object. - Even if this returns `NO`, the user may still be able to access it if returns `YES` - or if the user belongs to a role that has access. - - @param userId The <[PFObject objectId]> of the user for which to retrive access. - - @returns `YES` if the user with this `objectId` has *explicit* read access, otherwise `NO`. - */ -- (BOOL)getReadAccessForUserId:(NSString *)userId; - -/*! - @abstract Set whether the given user id is allowed to write this object. - - @param allowed Whether the given user can read this object. - @param userId The `objectId` of the user to assign access. - */ -- (void)setWriteAccess:(BOOL)allowed forUserId:(NSString *)userId; - -/*! - @abstract Gets whether the given user id is *explicitly* allowed to write this object. - Even if this returns NO, the user may still be able to write it if returns `YES` - or if the user belongs to a role that has access. - - @param userId The <[PFObject objectId]> of the user for which to retrive access. - - @returns `YES` if the user with this `objectId` has *explicit* write access, otherwise `NO`. - */ -- (BOOL)getWriteAccessForUserId:(NSString *)userId; - -/*! - @abstract Set whether the given user is allowed to read this object. - - @param allowed Whether the given user can read this object. - @param user The user to assign access. - */ -- (void)setReadAccess:(BOOL)allowed forUser:(PFUser *)user; - -/*! - @abstract Gets whether the given user is *explicitly* allowed to read this object. - Even if this returns `NO`, the user may still be able to access it if returns `YES` - or if the user belongs to a role that has access. - - @param user The user for which to retrive access. - - @returns `YES` if the user has *explicit* read access, otherwise `NO`. - */ -- (BOOL)getReadAccessForUser:(PFUser *)user; - -/*! - @abstract Set whether the given user is allowed to write this object. - - @param allowed Whether the given user can write this object. - @param user The user to assign access. - */ -- (void)setWriteAccess:(BOOL)allowed forUser:(PFUser *)user; - -/*! - @abstract Gets whether the given user is *explicitly* allowed to write this object. - Even if this returns `NO`, the user may still be able to write it if returns `YES` - or if the user belongs to a role that has access. - - @param user The user for which to retrive access. - - @returns `YES` if the user has *explicit* write access, otherwise `NO`. - */ -- (BOOL)getWriteAccessForUser:(PFUser *)user; - -///-------------------------------------- -/// @name Controlling Access Per-Role -///-------------------------------------- - -/*! - @abstract Get whether users belonging to the role with the given name are allowed to read this object. - Even if this returns `NO`, the role may still be able to read it if a parent role has read access. - - @param name The name of the role. - - @returns `YES` if the role has read access, otherwise `NO`. - */ -- (BOOL)getReadAccessForRoleWithName:(NSString *)name; - -/*! - @abstract Set whether users belonging to the role with the given name are allowed to read this object. - - @param allowed Whether the given role can read this object. - @param name The name of the role. - */ -- (void)setReadAccess:(BOOL)allowed forRoleWithName:(NSString *)name; - -/*! - @abstract Get whether users belonging to the role with the given name are allowed to write this object. - Even if this returns `NO`, the role may still be able to write it if a parent role has write access. - - @param name The name of the role. - - @returns `YES` if the role has read access, otherwise `NO`. - */ -- (BOOL)getWriteAccessForRoleWithName:(NSString *)name; - -/*! - @abstract Set whether users belonging to the role with the given name are allowed to write this object. - - @param allowed Whether the given role can write this object. - @param name The name of the role. - */ -- (void)setWriteAccess:(BOOL)allowed forRoleWithName:(NSString *)name; - -/*! - @abstract Get whether users belonging to the given role are allowed to read this object. - Even if this returns `NO`, the role may still be able to read it if a parent role has read access. - - @discussion The role must already be saved on the server and - it's data must have been fetched in order to use this method. - - @param role The name of the role. - - @returns `YES` if the role has read access, otherwise `NO`. - */ -- (BOOL)getReadAccessForRole:(PFRole *)role; - -/*! - @abstract Set whether users belonging to the given role are allowed to read this object. - - @discussion The role must already be saved on the server and - it's data must have been fetched in order to use this method. - - @param allowed Whether the given role can read this object. - @param role The role to assign access. - */ -- (void)setReadAccess:(BOOL)allowed forRole:(PFRole *)role; - -/*! - @abstract Get whether users belonging to the given role are allowed to write this object. - Even if this returns `NO`, the role may still be able to write it if a parent role has write access. - - @discussion The role must already be saved on the server and - it's data must have been fetched in order to use this method. - - @param role The name of the role. - - @returns `YES` if the role has write access, otherwise `NO`. - */ -- (BOOL)getWriteAccessForRole:(PFRole *)role; - -/*! - @abstract Set whether users belonging to the given role are allowed to write this object. - - @discussion The role must already be saved on the server and - it's data must have been fetched in order to use this method. - - @param allowed Whether the given role can write this object. - @param role The role to assign access. - */ -- (void)setWriteAccess:(BOOL)allowed forRole:(PFRole *)role; - -///-------------------------------------- -/// @name Setting Access Defaults -///-------------------------------------- - -/*! - @abstract Sets a default ACL that will be applied to all instances of when they are created. - - @param acl The ACL to use as a template for all instance of created after this method has been called. - This value will be copied and used as a template for the creation of new ACLs, so changes to the - instance after this method has been called will not be reflected in new instance of . - @param currentUserAccess - If `YES`, the `PFACL` that is applied to newly-created instance of will - provide read and write access to the <[PFUser currentUser]> at the time of creation. - - If `NO`, the provided `acl` will be used without modification. - - If `acl` is `nil`, this value is ignored. - */ -+ (void)setDefaultACL:(PFACL *)acl withAccessForCurrentUser:(BOOL)currentUserAccess; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFAnalytics.h b/iOS/Parse.framework/Versions/A/Headers/PFAnalytics.h deleted file mode 100644 index 3068a62..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFAnalytics.h +++ /dev/null @@ -1,160 +0,0 @@ -// -// PFAnalytics.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -@class BFTask; - -/*! - `PFAnalytics` provides an interface to Parse's logging and analytics backend. - - Methods will return immediately and cache the request (+ timestamp) to be - handled "eventually." That is, the request will be sent immediately if possible - or the next time a network connection is available. - */ -@interface PFAnalytics : NSObject - -///-------------------------------------- -/// @name App-Open / Push Analytics -///-------------------------------------- - -/*! - @abstract Tracks this application being launched. If this happened as the result of the - user opening a push notification, this method sends along information to - correlate this open with that push. - - @discussion Pass in `nil` to track a standard "application opened" event. - - @param launchOptions The `NSDictionary` indicating the reason the application was - launched, if any. This value can be found as a parameter to various - `UIApplicationDelegate` methods, and can be empty or `nil`. - - @returns Returns the task encapsulating the work being done. - */ -+ (BFTask *)trackAppOpenedWithLaunchOptions:(NSDictionary *)launchOptions; - -/*! - @abstract Tracks this application being launched. - If this happened as the result of the user opening a push notification, - this method sends along information to correlate this open with that push. - - @discussion Pass in `nil` to track a standard "application opened" event. - - @param launchOptions The dictionary indicating the reason the application was - launched, if any. This value can be found as a parameter to various - `UIApplicationDelegate` methods, and can be empty or `nil`. - @param block The block to execute on server response. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)trackAppOpenedWithLaunchOptionsInBackground:(NSDictionary *)launchOptions block:(PFBooleanResultBlock)block; - -/*! - @abstract Tracks this application being launched. If this happened as the result of the - user opening a push notification, this method sends along information to - correlate this open with that push. - - @param userInfo The Remote Notification payload, if any. This value can be - found either under `UIApplicationLaunchOptionsRemoteNotificationKey` on `launchOptions`, - or as a parameter to `application:didReceiveRemoteNotification:`. - This can be empty or `nil`. - - @returns Returns the task encapsulating the work being done. - */ -+ (BFTask *)trackAppOpenedWithRemoteNotificationPayload:(NSDictionary *)userInfo; - -/*! - @abstract Tracks this application being launched. If this happened as the result of the - user opening a push notification, this method sends along information to - correlate this open with that push. - - @param userInfo The Remote Notification payload, if any. This value can be - found either under `UIApplicationLaunchOptionsRemoteNotificationKey` on `launchOptions`, - or as a parameter to `application:didReceiveRemoteNotification:`. This can be empty or `nil`. - @param block The block to execute on server response. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)trackAppOpenedWithRemoteNotificationPayloadInBackground:(NSDictionary *)userInfo - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Custom Analytics -///-------------------------------------- - -/*! - @abstract Tracks the occurrence of a custom event. - - @discussion Parse will store a data point at the time of invocation with the given event name. - - @param name The name of the custom event to report to Parse as having happened. - - @returns Returns the task encapsulating the work being done. - */ -+ (BFTask *)trackEvent:(NSString *)name; - -/*! - @abstract Tracks the occurrence of a custom event. Parse will store a data point at the - time of invocation with the given event name. The event will be sent at some - unspecified time in the future, even if Parse is currently inaccessible. - - @param name The name of the custom event to report to Parse as having happened. - @param block The block to execute on server response. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)trackEventInBackground:(NSString *)name block:(PFBooleanResultBlock)block; - -/*! - @abstract Tracks the occurrence of a custom event with additional dimensions. Parse will - store a data point at the time of invocation with the given event name. - - @discussion Dimensions will allow segmentation of the occurrences of this custom event. - Keys and values should be NSStrings, and will throw otherwise. - - To track a user signup along with additional metadata, consider the following: - - NSDictionary *dimensions = @{ @"gender": @"m", - @"source": @"web", - @"dayType": @"weekend" }; - [PFAnalytics trackEvent:@"signup" dimensions:dimensions]; - - @warning There is a default limit of 8 dimensions per event tracked. - - @param name The name of the custom event to report to Parse as having happened. - @param dimensions The `NSDictionary` of information by which to segment this event. - - @returns Returns the task encapsulating the work being done. - */ -+ (BFTask *)trackEvent:(NSString *)name dimensions:(NSDictionary *)dimensions; - -/*! - @abstract Tracks the occurrence of a custom event with additional dimensions. Parse will - store a data point at the time of invocation with the given event name. The - event will be sent at some unspecified time in the future, even if Parse is currently inaccessible. - - @discussionDimensions will allow segmentation of the occurrences of this custom event. - Keys and values should be NSStrings, and will throw otherwise. - - To track a user signup along with additional metadata, consider the following: - NSDictionary *dimensions = @{ @"gender": @"m", - @"source": @"web", - @"dayType": @"weekend" }; - [PFAnalytics trackEvent:@"signup" dimensions:dimensions]; - - There is a default limit of 8 dimensions per event tracked. - - @param name The name of the custom event to report to Parse as having happened. - @param dimensions The `NSDictionary` of information by which to segment this event. - @param block The block to execute on server response. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)trackEventInBackground:(NSString *)name dimensions:(NSDictionary *)dimensions block:(PFBooleanResultBlock)block; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFAnonymousUtils.h b/iOS/Parse.framework/Versions/A/Headers/PFAnonymousUtils.h deleted file mode 100644 index 9322281..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFAnonymousUtils.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// PFAnonymousUtils.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#else -#import -#import -#endif - -/*! - Provides utility functions for working with Anonymously logged-in users. - Anonymous users have some unique characteristics: - - - Anonymous users don't need a user name or password. - - Once logged out, an anonymous user cannot be recovered. - - When the current user is anonymous, the following methods can be used to switch - to a different user or convert the anonymous user into a regular one: - - signUp converts an anonymous user to a standard user with the given username and password. - Data associated with the anonymous user is retained. - - logIn switches users without converting the anonymous user. - Data associated with the anonymous user will be lost. - - Service logIn (e.g. Facebook, Twitter) will attempt to convert - the anonymous user into a standard user by linking it to the service. - If a user already exists that is linked to the service, it will instead switch to the existing user. - - Service linking (e.g. Facebook, Twitter) will convert the anonymous user - into a standard user by linking it to the service. - */ -@interface PFAnonymousUtils : NSObject - -///-------------------------------------- -/// @name Creating an Anonymous User -///-------------------------------------- - -/*! - @abstract Creates an anonymous user asynchronously and sets as a result to `BFTask`. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInInBackground; - -/*! - @abstract Creates an anonymous user. - - @param block The block to execute when anonymous user creation is complete. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithBlock:(PFUserResultBlock)block; - -/*! - @abstract Creates an anonymous user. - - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Determining Whether a User is Anonymous -///-------------------------------------- - -/*! - @abstract Whether the object is logged in anonymously. - - @param user object to check for anonymity. The user must be logged in on this device. - - @returns `YES` if the user is anonymous. `NO` if the user is not the current user or is not anonymous. - */ -+ (BOOL)isLinkedWithUser:(PFUser *)user; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFCloud.h b/iOS/Parse.framework/Versions/A/Headers/PFCloud.h deleted file mode 100644 index fab56ac..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFCloud.h +++ /dev/null @@ -1,84 +0,0 @@ -// -// PFCloud.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -@class BFTask; - -/*! - The `PFCloud` class provides methods for interacting with Parse Cloud Functions. - */ -@interface PFCloud : NSObject - -/*! - @abstract Calls the given cloud function *synchronously* with the parameters provided. - - @param function The function name to call. - @param parameters The parameters to send to the function. - - @returns The response from the cloud function. - */ -+ (id)callFunction:(NSString *)function withParameters:(NSDictionary *)parameters; - -/*! - @abstract Calls the given cloud function *synchronously* with the parameters provided and - sets the error if there is one. - - @param function The function name to call. - @param parameters The parameters to send to the function. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns The response from the cloud function. - This result could be a `NSDictionary`, an `NSArray`, `NSNumber` or `NSString`. - */ -+ (id)callFunction:(NSString *)function withParameters:(NSDictionary *)parameters error:(NSError **)error; - -/*! - @abstract Calls the given cloud function *asynchronously* with the parameters provided. - - @param function The function name to call. - @param parameters The parameters to send to the function. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)callFunctionInBackground:(NSString *)function withParameters:(NSDictionary *)parameters; - -/*! - @abstract Calls the given cloud function *asynchronously* with the parameters provided - and executes the given block when it is done. - - @param function The function name to call. - @param parameters The parameters to send to the function. - @param block The block to execute when the function call finished. - It should have the following argument signature: `^(id result, NSError *error)`. - */ -+ (void)callFunctionInBackground:(NSString *)function - withParameters:(NSDictionary *)parameters - block:(PFIdResultBlock)block; - -/*! - @abstract Calls the given cloud function *asynchronously* with the parameters provided - and then executes the given selector when it is done. - - @param function The function name to call. - @param parameters The parameters to send to the function. - @param target The object to call the selector on. - @param selector The selector to call when the function call finished. - It should have the following signature: `(void)callbackWithResult:(id)result error:(NSError *)error`. - Result will be `nil` if error is set and vice versa. - */ -+ (void)callFunctionInBackground:(NSString *)function - withParameters:(NSDictionary *)parameters - target:(id)target - selector:(SEL)selector; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFConfig.h b/iOS/Parse.framework/Versions/A/Headers/PFConfig.h deleted file mode 100644 index c7b89cf..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFConfig.h +++ /dev/null @@ -1,95 +0,0 @@ -// -// PFConfig.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -@class BFTask; -@class PFConfig; - -typedef void(^PFConfigResultBlock)(PFConfig *config, NSError *error); - -/*! - `PFConfig` is a representation of the remote configuration object. - It enables you to add things like feature gating, a/b testing or simple "Message of the day". -*/ -@interface PFConfig : NSObject - -///-------------------------------------- -/// @name Current Config -///-------------------------------------- - -/*! - @abstract Returns the most recently fetched config. - - @discussion If there was no config fetched - this method will return an empty instance of `PFConfig`. - - @returns Current, last fetched instance of PFConfig. - */ -+ (PFConfig *)currentConfig; - -///-------------------------------------- -/// @name Retrieving Config -///-------------------------------------- - -/*! - @abstract Gets the `PFConfig` object *synchronously* from the server. - - @returns Instance of `PFConfig` if the operation succeeded, otherwise `nil`. - */ -+ (PFConfig *)getConfig; - -/*! - @abstract Gets the `PFConfig` object *synchronously* from the server and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @return Instance of PFConfig if the operation succeeded, otherwise `nil`. - */ -+ (PFConfig *)getConfig:(NSError **)error; - -/*! - @abstract Gets the `PFConfig` *asynchronously* and sets it as a result of a task. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)getConfigInBackground; - -/*! - @abstract Gets the `PFConfig` *asynchronously* and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(PFConfig *config, NSError *error)`. - */ -+ (void)getConfigInBackgroundWithBlock:(PFConfigResultBlock)block; - -///-------------------------------------- -/// @name Parameters -///-------------------------------------- - -/*! - @abstract Returns the object associated with a given key. - - @param key The key for which to return the corresponding configuration value. - - @return The value associated with `key`, or `nil` if there is no such value. - */ -- (id)objectForKey:(NSString *)key; - -/*! - @abstract Returns the object associated with a given key. - - @discussion This method enables usage of literal syntax on `PFConfig`. - E.g. `NSString *value = config[@"key"];` - - @see objectForKey: - - @param keyedSubscript The keyed subscript for which to return the corresponding configuration value. - - @return The value associated with `key`, or `nil` if there is no such value. - */ -- (id)objectForKeyedSubscript:(NSString *)keyedSubscript; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFConstants.h b/iOS/Parse.framework/Versions/A/Headers/PFConstants.h deleted file mode 100644 index 92472fc..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFConstants.h +++ /dev/null @@ -1,177 +0,0 @@ -// PFConstants.h -// Copyright 2011 Parse, Inc. All rights reserved. - -#import - -@class PFObject; -@class PFUser; - -// Version -#define PARSE_VERSION @"1.6.0" - -extern NSInteger const PARSE_API_VERSION; - -// Platform -#define PARSE_IOS_ONLY (TARGET_OS_IPHONE) -#define PARSE_OSX_ONLY (TARGET_OS_MAC && !(TARGET_OS_IPHONE)) - -extern NSString *const kPFDeviceType; - -#if PARSE_IOS_ONLY -#import -#else -#import -@compatibility_alias UIImage NSImage; -@compatibility_alias UIColor NSColor; -@compatibility_alias UIView NSView; -#endif - -// Server -extern NSString *const kPFParseServer; - -// Cache policies -typedef enum { - kPFCachePolicyIgnoreCache = 0, - kPFCachePolicyCacheOnly, - kPFCachePolicyNetworkOnly, - kPFCachePolicyCacheElseNetwork, - kPFCachePolicyNetworkElseCache, - kPFCachePolicyCacheThenNetwork -} PFCachePolicy; - -// Errors - -extern NSString *const PFParseErrorDomain; - -/*! @abstract 1: Internal server error. No information available. */ -extern NSInteger const kPFErrorInternalServer; - -/*! @abstract 100: The connection to the Parse servers failed. */ -extern NSInteger const kPFErrorConnectionFailed; -/*! @abstract 101: Object doesn't exist, or has an incorrect password. */ -extern NSInteger const kPFErrorObjectNotFound; -/*! @abstract 102: You tried to find values matching a datatype that doesn't support exact database matching, like an array or a dictionary. */ -extern NSInteger const kPFErrorInvalidQuery; -/*! @abstract 103: Missing or invalid classname. Classnames are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters. */ -extern NSInteger const kPFErrorInvalidClassName; -/*! @abstract 104: Missing object id. */ -extern NSInteger const kPFErrorMissingObjectId; -/*! @abstract 105: Invalid key name. Keys are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters. */ -extern NSInteger const kPFErrorInvalidKeyName; -/*! @abstract 106: Malformed pointer. Pointers must be arrays of a classname and an object id. */ -extern NSInteger const kPFErrorInvalidPointer; -/*! @abstract 107: Malformed json object. A json dictionary is expected. */ -extern NSInteger const kPFErrorInvalidJSON; -/*! @abstract 108: Tried to access a feature only available internally. */ -extern NSInteger const kPFErrorCommandUnavailable; -/*! @abstract 111: Field set to incorrect type. */ -extern NSInteger const kPFErrorIncorrectType; -/*! @abstract 112: Invalid channel name. A channel name is either an empty string (the broadcast channel) or contains only a-zA-Z0-9_ characters and starts with a letter. */ -extern NSInteger const kPFErrorInvalidChannelName; -/*! @abstract 114: Invalid device token. */ -extern NSInteger const kPFErrorInvalidDeviceToken; -/*! @abstract 115: Push is misconfigured. See details to find out how. */ -extern NSInteger const kPFErrorPushMisconfigured; -/*! @abstract 116: The object is too large. */ -extern NSInteger const kPFErrorObjectTooLarge; -/*! @abstract 119: That operation isn't allowed for clients. */ -extern NSInteger const kPFErrorOperationForbidden; -/*! @abstract 120: The results were not found in the cache. */ -extern NSInteger const kPFErrorCacheMiss; -/*! @abstract 121: Keys in NSDictionary values may not include '$' or '.'. */ -extern NSInteger const kPFErrorInvalidNestedKey; -/*! @abstract 122: Invalid file name. A file name contains only a-zA-Z0-9_. characters and is between 1 and 36 characters. */ -extern NSInteger const kPFErrorInvalidFileName; -/*! @abstract 123: Invalid ACL. An ACL with an invalid format was saved. This should not happen if you use PFACL. */ -extern NSInteger const kPFErrorInvalidACL; -/*! @abstract 124: The request timed out on the server. Typically this indicates the request is too expensive. */ -extern NSInteger const kPFErrorTimeout; -/*! @abstract 125: The email address was invalid. */ -extern NSInteger const kPFErrorInvalidEmailAddress; -/*! @abstract 137: A unique field was given a value that is already taken. */ -extern NSInteger const kPFErrorDuplicateValue; -/*! @abstract 139: Role's name is invalid. */ -extern NSInteger const kPFErrorInvalidRoleName; -/*! @abstract 140: Exceeded an application quota. Upgrade to resolve. */ -extern NSInteger const kPFErrorExceededQuota; -/*! @abstract 141: Cloud Code script had an error. */ -extern NSInteger const kPFScriptError; -/*! @abstract 142: Cloud Code validation failed. */ -extern NSInteger const kPFValidationError; -/*! @abstract 143: Product purchase receipt is missing */ -extern NSInteger const kPFErrorReceiptMissing; -/*! @abstract 144: Product purchase receipt is invalid */ -extern NSInteger const kPFErrorInvalidPurchaseReceipt; -/*! @abstract 145: Payment is disabled on this device */ -extern NSInteger const kPFErrorPaymentDisabled; -/*! @abstract 146: The product identifier is invalid */ -extern NSInteger const kPFErrorInvalidProductIdentifier; -/*! @abstract 147: The product is not found in the App Store */ -extern NSInteger const kPFErrorProductNotFoundInAppStore; -/*! @abstract 148: The Apple server response is not valid */ -extern NSInteger const kPFErrorInvalidServerResponse; -/*! @abstract 149: Product fails to download due to file system error */ -extern NSInteger const kPFErrorProductDownloadFileSystemFailure; -/*! @abstract 150: Fail to convert data to image. */ -extern NSInteger const kPFErrorInvalidImageData; -/*! @abstract 151: Unsaved file. */ -extern NSInteger const kPFErrorUnsavedFile; -/*! @abstract 153: Fail to delete file. */ -extern NSInteger const kPFErrorFileDeleteFailure; -/*! @abstract 160: Invalid event name. */ -extern NSInteger const kPFErrorInvalidEventName; -/*! @abstract 200: Username is missing or empty */ -extern NSInteger const kPFErrorUsernameMissing; -/*! @abstract 201: Password is missing or empty */ -extern NSInteger const kPFErrorUserPasswordMissing; -/*! @abstract 202: Username has already been taken */ -extern NSInteger const kPFErrorUsernameTaken; -/*! @abstract 203: Email has already been taken */ -extern NSInteger const kPFErrorUserEmailTaken; -/*! @abstract 204: The email is missing, and must be specified */ -extern NSInteger const kPFErrorUserEmailMissing; -/*! @abstract 205: A user with the specified email was not found */ -extern NSInteger const kPFErrorUserWithEmailNotFound; -/*! @abstract 206: The user cannot be altered by a client without the session. */ -extern NSInteger const kPFErrorUserCannotBeAlteredWithoutSession; -/*! @abstract 207: Users can only be created through sign up */ -extern NSInteger const kPFErrorUserCanOnlyBeCreatedThroughSignUp; -/*! @abstract 208: An existing Facebook account already linked to another user. */ -extern NSInteger const kPFErrorFacebookAccountAlreadyLinked; -/*! @abstract 208: An existing account already linked to another user. */ -extern NSInteger const kPFErrorAccountAlreadyLinked; -/*! @abstract 209: User ID mismatch */ -extern NSInteger const kPFErrorUserIdMismatch; -/*! @abstract 250: Facebook id missing from request */ -extern NSInteger const kPFErrorFacebookIdMissing; -/*! @abstract 250: Linked id missing from request */ -extern NSInteger const kPFErrorLinkedIdMissing; -/*! @abstract 251: Invalid Facebook session */ -extern NSInteger const kPFErrorFacebookInvalidSession; -/*! @abstract 251: Invalid linked session */ -extern NSInteger const kPFErrorInvalidLinkedSession; - -typedef void (^PFBooleanResultBlock)(BOOL succeeded, NSError *error); -typedef void (^PFIntegerResultBlock)(int number, NSError *error); -typedef void (^PFArrayResultBlock)(NSArray *objects, NSError *error); -typedef void (^PFObjectResultBlock)(PFObject *object, NSError *error); -typedef void (^PFSetResultBlock)(NSSet *channels, NSError *error); -typedef void (^PFUserResultBlock)(PFUser *user, NSError *error); -typedef void (^PFDataResultBlock)(NSData *data, NSError *error); -typedef void (^PFDataStreamResultBlock)(NSInputStream *stream, NSError *error); -typedef void (^PFStringResultBlock)(NSString *string, NSError *error); -typedef void (^PFIdResultBlock)(id object, NSError *error); -typedef void (^PFProgressBlock)(int percentDone); - -// Deprecated Macro -#ifndef PARSE_DEPRECATED -#ifdef __deprecated_msg -#define PARSE_DEPRECATED(_MSG) __deprecated_msg(_MSG) -#else -#ifdef __deprecated -#define PARSE_DEPRECATED(_MSG) __attribute__((deprecated)) -#else -#define PARSE_DEPRECATED(_MSG) -#endif -#endif -#endif diff --git a/iOS/Parse.framework/Versions/A/Headers/PFFile.h b/iOS/Parse.framework/Versions/A/Headers/PFFile.h deleted file mode 100644 index 2e3b06d..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFFile.h +++ /dev/null @@ -1,286 +0,0 @@ -// -// PFFile.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -@class BFTask; - -/*! - `PFFile` representes a file of binary data stored on the Parse servers. - This can be a image, video, or anything else that an application needs to reference in a non-relational way. - */ -@interface PFFile : NSObject - -///-------------------------------------- -/// @name Creating a PFFile -///-------------------------------------- - -/*! - @abstract Creates a file with given data. A name will be assigned to it by the server. - - @param data The contents of the new `PFFile`. - - @returns A new `PFFile`. - */ -+ (instancetype)fileWithData:(NSData *)data; - -/*! - @abstract Creates a file with given data and name. - - @param name The name of the new PFFile. The file name must begin with and - alphanumeric character, and consist of alphanumeric characters, periods, - spaces, underscores, or dashes. - @param data The contents of the new `PFFile`. - - @returns A new `PFFile` object. - */ -+ (instancetype)fileWithName:(NSString *)name data:(NSData *)data; - -/*! - @abstract Creates a file with the contents of another file. - - @param name The name of the new `PFFile`. The file name must begin with and - alphanumeric character, and consist of alphanumeric characters, periods, - spaces, underscores, or dashes. - @param path The path to the file that will be uploaded to Parse. - */ -+ (instancetype)fileWithName:(NSString *)name - contentsAtPath:(NSString *)path; - -/*! - @abstract Creates a file with given data, name and content type. - - @param name The name of the new `PFFile`. The file name must begin with and - alphanumeric character, and consist of alphanumeric characters, periods, - spaces, underscores, or dashes. - @param data The contents of the new `PFFile`. - @param contentType Represents MIME type of the data. - - @returns A new `PFFile` object. - */ -+ (instancetype)fileWithName:(NSString *)name - data:(NSData *)data - contentType:(NSString *)contentType; - -/*! - @abstract Creates a file with given data and content type. - - @param data The contents of the new `PFFile`. - @param contentType Represents MIME type of the data. - - @returns A new `PFFile` object. - */ -+ (instancetype)fileWithData:(NSData *)data contentType:(NSString *)contentType; - -/*! - @abstract The name of the file. - - @discussion Before the file is saved, this is the filename given by - the user. After the file is saved, that name gets prefixed with a unique - identifier. - */ -@property (nonatomic, copy, readonly) NSString *name; - -/*! - @abstract The url of the file. - */ -@property (nonatomic, copy, readonly) NSString *url; - -///-------------------------------------- -/// @name Storing Data with Parse -///-------------------------------------- - -/*! - @abstract Whether the file has been uploaded for the first time. - */ -@property (nonatomic, assign, readonly) BOOL isDirty; - -/*! - @abstract Saves the file *synchronously*. - - @returns Returns whether the save succeeded. - */ -- (BOOL)save; - -/*! - @abstract Saves the file *synchronously* and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the save succeeded. - */ -- (BOOL)save:(NSError **)error; - -/*! - @abstract Saves the file *asynchronously*. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)saveInBackground; - -/*! - @abstract Saves the file *asynchronously* and executes the given block. - - @param block The block should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)saveInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract Saves the file *asynchronously* and executes the given block. - - @discussion This method will execute the progressBlock periodically with the percent progress. - `progressBlock` will get called with `100` before `resultBlock` is called. - - @param block The block should have the following argument signature: `^(BOOL succeeded, NSError *error)` - @param progressBlock The block should have the following argument signature: `^(int percentDone)` - */ -- (void)saveInBackgroundWithBlock:(PFBooleanResultBlock)block - progressBlock:(PFProgressBlock)progressBlock; - -/*! - @abstract Saves the file *asynchronously* and calls the given callback. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)saveInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting Data from Parse -///-------------------------------------- - -/*! - @abstract Whether the data is available in memory or needs to be downloaded. - */ -@property (assign, readonly) BOOL isDataAvailable; - -/*! - @abstract *Synchronously* gets the data from cache if available or fetches its contents from the network. - - @returns The `NSData` object containing file data. Returns `nil` if there was an error in fetching. - */ -- (NSData *)getData; - -/*! - @abstract This method is like but avoids ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @returns A stream containing the data. Returns `nil` if there was an error in fetching. - */ -- (NSInputStream *)getDataStream; - -/*! - @abstract *Synchronously* gets the data from cache if available or fetches its contents from the network. - Sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns The `NSData` object containing file data. Returns `nil` if there was an error in fetching. - */ -- (NSData *)getData:(NSError **)error; - -/*! - @abstract This method is like but avoids ever holding the entire `PFFile` contents in memory at once. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns A stream containing the data. Returns nil if there was an error in - fetching. - */ -- (NSInputStream *)getDataStream:(NSError **)error; - -/*! - @abstract This method is like but avoids ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @see getData - - @returns A stream containing the data. Returns `nil` if there was an error in fetching. - */ -- (BFTask *)getDataInBackground; - -/*! - @abstract This method is like but avoids - ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)getDataStreamInBackground; - -/*! - @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network. - - @param block The block should have the following argument signature: `^(NSData *result, NSError *error)` - */ -- (void)getDataInBackgroundWithBlock:(PFDataResultBlock)block; - -/*! - @abstract This method is like but avoids - ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @param block The block should have the following argument signature: `(NSInputStream *result, NSError *error)` - */ -- (void)getDataStreamInBackgroundWithBlock:(PFDataStreamResultBlock)block; - -/*! - @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network. - - @discussion This method will execute the progressBlock periodically with the percent progress. - `progressBlock` will get called with `100` before `resultBlock` is called. - - @param resultBlock The block should have the following argument signature: (NSData *result, NSError *error) - @param progressBlock The block should have the following argument signature: (int percentDone) - */ -- (void)getDataInBackgroundWithBlock:(PFDataResultBlock)resultBlock - progressBlock:(PFProgressBlock)progressBlock; - -/*! - @abstract This method is like but avoids - ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @param resultBlock The block should have the following argument signature: `^(NSInputStream *result, NSError *error)`. - @param progressBlock The block should have the following argument signature: `^(int percentDone)`. - */ -- (void)getDataStreamInBackgroundWithBlock:(PFDataStreamResultBlock)resultBlock - progressBlock:(PFProgressBlock)progressBlock; - -/*! - @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSData *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - */ -- (void)getDataInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Interrupting a Transfer -///-------------------------------------- - -/*! - @abstract Cancels the current request (upload or download of file). - */ -- (void)cancel; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFGeoPoint.h b/iOS/Parse.framework/Versions/A/Headers/PFGeoPoint.h deleted file mode 100644 index 0853aa5..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFGeoPoint.h +++ /dev/null @@ -1,101 +0,0 @@ -// -// PFGeoPoint.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import -#import - -/*! - `PFGeoPoint` may be used to embed a latitude / longitude point as the value for a key in a . - It could be used to perform queries in a geospatial manner using <[PFQuery whereKey:nearGeoPoint:]>. - - Currently, instances of may only have one key associated with a `PFGeoPoint` type. - */ -@interface PFGeoPoint : NSObject - -///-------------------------------------- -/// @name Creating a Geo Point -///-------------------------------------- - -/*! - @abstract Create a PFGeoPoint object. Latitude and longitude are set to `0.0`. - - @returns Returns a new `PFGeoPoint`. - */ -+ (PFGeoPoint *)geoPoint; - -/*! - @abstract Creates a new `PFGeoPoint` object for the given `CLLocation`, set to the location's coordinates. - - @param location Instace of `CLLocation`, with set latitude and longitude. - - @returns Returns a new PFGeoPoint at specified location. - */ -+ (PFGeoPoint *)geoPointWithLocation:(CLLocation *)location; - -/*! - @abstract Create a new `PFGeoPoint` object with the specified latitude and longitude. - - @param latitude Latitude of point in degrees. - @param longitude Longitude of point in degrees. - - @returns New point object with specified latitude and longitude. - */ -+ (PFGeoPoint *)geoPointWithLatitude:(double)latitude longitude:(double)longitude; - -/*! - @abstract Fetches the current device location and executes a block with a new `PFGeoPoint` object. - - @param geoPointHandler A block which takes the newly created `PFGeoPoint` as an argument. - It should have the following argument signature: `^(PFGeoPoint *geoPoint, NSError *error)` - */ -+ (void)geoPointForCurrentLocationInBackground:(void(^)(PFGeoPoint *geoPoint, NSError *error))geoPointHandler; - -///-------------------------------------- -/// @name Controlling Position -///-------------------------------------- - -/*! - @abstract Latitude of point in degrees. Valid range is from `-90.0` to `90.0`. - */ -@property (nonatomic, assign) double latitude; - -/*! - @abstract Longitude of point in degrees. Valid range is from `-180.0` to `180.0`. - */ -@property (nonatomic, assign) double longitude; - -///-------------------------------------- -/// @name Calculating Distance -///-------------------------------------- - -/*! - @abstract Get distance in radians from this point to specified point. - - @param point `PFGeoPoint` that represents the location of other point. - - @returns Distance in radians between the receiver and `point`. - */ -- (double)distanceInRadiansTo:(PFGeoPoint *)point; - -/*! - @abstract Get distance in miles from this point to specified point. - - @param point `PFGeoPoint` that represents the location of other point. - - @returns Distance in miles between the receiver and `point`. - */ -- (double)distanceInMilesTo:(PFGeoPoint *)point; - -/*! - @abstract Get distance in kilometers from this point to specified point. - - @param point `PFGeoPoint` that represents the location of other point. - - @returns Distance in kilometers between the receiver and `point`. - */ -- (double)distanceInKilometersTo:(PFGeoPoint *)point; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFImageView.h b/iOS/Parse.framework/Versions/A/Headers/PFImageView.h deleted file mode 100644 index 4ae6440..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFImageView.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// PFImageView.h -// Parse -// -// Created by Qian Wang on 5/16/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import -#import "PFFile.h" - -/*! - An image view that downloads and displays remote image stored on Parse's server. - */ -@interface PFImageView : UIImageView - -/// The remote file on Parse's server that stores the image. -/// Note that the download does not start until loadInBackground: is called. -@property (nonatomic, strong) PFFile *file; - -/*! - Initiate downloading of the remote image. Once the download completes, the remote image will be displayed. - */ -- (void)loadInBackground; - -/*! - Initiate downloading of the remote image. Once the download completes, the remote image will be displayed. - @param completion the completion block. - */ -- (void)loadInBackground:(void (^)(UIImage *image, NSError *error))completion; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFInstallation.h b/iOS/Parse.framework/Versions/A/Headers/PFInstallation.h deleted file mode 100644 index 98156c9..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFInstallation.h +++ /dev/null @@ -1,110 +0,0 @@ -// -// PFInstallation.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import -#import - -/*! - A Parse Framework Installation Object that is a local representation of an - installation persisted to the Parse cloud. This class is a subclass of a - , and retains the same functionality of a PFObject, but also extends - it with installation-specific fields and related immutability and validity - checks. - - A valid `PFInstallation` can only be instantiated via - <[PFInstallation currentInstallation]> because the required identifier fields - are readonly. The and fields are also readonly properties which - are automatically updated to match the device's time zone and application badge - when the `PFInstallation` is saved, thus these fields might not reflect the - latest device state if the installation has not recently been saved. - - `PFInstallation` objects which have a valid and are saved to - the Parse cloud can be used to target push notifications. - - This class is currently for iOS only. There is no `PFInstallation` for Parse - applications running on OS X, because they cannot receive push notifications. - */ - -@interface PFInstallation : PFObject - -/*! - @abstract The name of the Installation class in the REST API. - - @discussion This is a required PFSubclassing method. - */ -+ (NSString *)parseClassName; - -///-------------------------------------- -/// @name Targeting Installations -///-------------------------------------- - -/*! - @abstract Creates a for `PFInstallation` objects. - - @discussion The resulting query can only be used for targeting a . - Calling find methods on the resulting query will raise an exception. - */ -+ (PFQuery *)query; - -///-------------------------------------- -/// @name Accessing the Current Installation -///-------------------------------------- - -/*! - @abstract Gets the currently-running installation from disk and returns an instance of it. - - @discussion If this installation is not stored on disk, returns a `PFInstallation` - with and fields set to those of the - current installation. - - @result Returns a `PFInstallation` that represents the currently-running installation. - */ -+ (instancetype)currentInstallation; - -/*! - @abstract Sets the device token string property from an `NSData`-encoded token. - - @param deviceTokenData A token that identifies the device. - */ -- (void)setDeviceTokenFromData:(NSData *)deviceTokenData; - -///-------------------------------------- -/// @name Installation Properties -///-------------------------------------- - -/*! - @abstract The device type for the `PFInstallation`. - */ -@property (nonatomic, strong, readonly) NSString *deviceType; - -/*! - @abstract The installationId for the `PFInstallation`. - */ -@property (nonatomic, strong, readonly) NSString *installationId; - -/*! - @abstract The device token for the `PFInstallation`. - */ -@property (nonatomic, strong) NSString *deviceToken; - -/*! - @abstract The badge for the `PFInstallation`. - */ -@property (nonatomic, assign) NSInteger badge; - -/*! - @abstract The name of the time zone for the `PFInstallation`. - */ -@property (nonatomic, strong, readonly) NSString *timeZone; - -/*! - @abstract The channels for the `PFInstallation`. - */ -@property (nonatomic, strong) NSArray *channels; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFLogInView.h b/iOS/Parse.framework/Versions/A/Headers/PFLogInView.h deleted file mode 100644 index 4f87021..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFLogInView.h +++ /dev/null @@ -1,105 +0,0 @@ -// -// PFLogInView.h -// Parse -// -// Created by Qian Wang on 3/9/12. -// Copyright (c) 2012. All rights reserved. -// - -#import - -/*! - A bitmask specifying the log in elements which are enabled in the view. - @sa PFLogInViewController - @sa PFLogInView - */ -typedef NS_OPTIONS(NSInteger, PFLogInFields) { - /*! No fields. */ - PFLogInFieldsNone = 0, - /*! Username and password fields. */ - PFLogInFieldsUsernameAndPassword = 1 << 0, - /*! Forgot password button. */ - PFLogInFieldsPasswordForgotten = 1 << 1, - /*! Login button. */ - PFLogInFieldsLogInButton = 1 << 2, - /*! Button to login with Facebook. */ - PFLogInFieldsFacebook = 1 << 3, - /*! Button to login with Twitter. */ - PFLogInFieldsTwitter = 1 << 4, - /*! Signup Button. */ - PFLogInFieldsSignUpButton = 1 << 5, - /*! Dismiss Button. */ - PFLogInFieldsDismissButton = 1 << 6, - - /*! Default value. Combines Username, Password, Login, Signup, Forgot Password and Dismiss buttons. */ - PFLogInFieldsDefault = (PFLogInFieldsUsernameAndPassword | - PFLogInFieldsLogInButton | - PFLogInFieldsSignUpButton | - PFLogInFieldsPasswordForgotten | - PFLogInFieldsDismissButton) -}; - -/*! - The class provides a standard log in interface for authenticating a PFUser. - */ -@interface PFLogInView : UIView - -/*! @name Creating Log In View */ -/*! - Initializes the view with the specified log in elements. - @param fields A bitmask specifying the log in elements which are enabled in the view - */ -- (instancetype)initWithFields:(PFLogInFields)fields; - -/*! - The view controller that will present this view. - Used to lay out elements correctly when the presenting view controller has translucent elements. - */ -@property (nonatomic, strong) UIViewController *presentingViewController; - -/*! @name Customizing the Logo */ - -/// The logo. By default, it is the Parse logo. -@property (nonatomic, strong) UIView *logo; - -/*! @name Prompt for email as username. */ - -/// By default, this is set to NO. -@property (nonatomic, assign) BOOL emailAsUsername; - -/*! @name Accessing Log In Elements */ - -/// The bitmask which specifies the enabled log in elements in the view -@property (nonatomic, readonly, assign) PFLogInFields fields; - -/// The username text field. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UITextField *usernameField; - -/// The password text field. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UITextField *passwordField; - -/// The password forgotten button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *passwordForgottenButton; - -/// The log in button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *logInButton; - -/// The Facebook button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *facebookButton; - -/// The Twitter button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *twitterButton; - -/// The sign up button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *signUpButton; - -/// The dismiss button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *dismissButton; - -/// The facebook/twitter login label. It is only shown if the external login is enabled. -@property (nonatomic, strong, readonly) UILabel *externalLogInLabel; - -/// The sign up label. It is only shown if sign up button is enabled. -@property (nonatomic, strong, readonly) UILabel *signUpLabel; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFLogInViewController.h b/iOS/Parse.framework/Versions/A/Headers/PFLogInViewController.h deleted file mode 100644 index 2d0c4c2..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFLogInViewController.h +++ /dev/null @@ -1,127 +0,0 @@ -// -// PFLogInViewController.h -// Parse -// -// Created by Andrew Wang on 3/8/12. -// Copyright (c) 2012. All rights reserved. -// - -#import - -#import "PFLogInView.h" -#import "PFSignUpViewController.h" -#import "PFUser.h" - -@protocol PFLogInViewControllerDelegate; - -/*! - The class that presents and manages a standard authentication interface for logging in a PFUser. - */ -@interface PFLogInViewController : UIViewController - -/*! @name Configuring Log In Elements */ - -/*! - A bitmask specifying the log in elements which are enabled in the view. - - enum { - PFLogInFieldsNone = 0, - PFLogInFieldsUsernameAndPassword = 1 << 0, - PFLogInFieldsPasswordForgotten = 1 << 1, - PFLogInFieldsLogInButton = 1 << 2, - PFLogInFieldsFacebook = 1 << 3, - PFLogInFieldsTwitter = 1 << 4, - PFLogInFieldsSignUpButton = 1 << 5, - PFLogInFieldsDismissButton = 1 << 6, - PFLogInFieldsDefault = PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton | PFLogInFieldsSignUpButton | PFLogInFieldsPasswordForgotten | PFLogInFieldsDismissButton - }; - */ -@property (nonatomic, assign) PFLogInFields fields; - -/// The log in view. It contains all the enabled log in elements. -@property (nonatomic, strong, readonly) PFLogInView *logInView; - -/*! @name Configuring Log In Behaviors */ - -/// The delegate that responds to the control events of PFLogInViewController. -@property (nonatomic, weak) id delegate; - -/*! - The facebook permissions that Facebook log in requests for. - If unspecified, the default is basic facebook permissions. - */ -@property (nonatomic, strong) NSArray *facebookPermissions; - -/*! - The sign up controller if sign up is enabled. - Use this to configure the sign up view, and the transition animation to the sign up view. - The default is a sign up view with a username, a password, a dismiss button and a sign up button. - */ -@property (nonatomic, strong) PFSignUpViewController *signUpController; - -/*! - Whether to prompt for the email as username on the login view. - If set to YES, we'll prompt for the email in the username field. - This property value propagates to the attached signUpController. - By default, this is set to NO. - */ -@property (nonatomic, assign) BOOL emailAsUsername; - -@end - -/*! @name Notifications */ - -/// The notification is posted immediately after the log in succeeds. -extern NSString *const PFLogInSuccessNotification; - -/*! - The notification is posted immediately after the log in fails. - If the delegate prevents the log in from starting, the notification is not sent. - */ -extern NSString *const PFLogInFailureNotification; - -/// The notification is posted immediately after the log in is cancelled. -extern NSString *const PFLogInCancelNotification; - -/*! - The protocol defines methods a delegate of a PFLogInViewController should implement. - All methods of the protocol are optional. - */ -@protocol PFLogInViewControllerDelegate - -@optional - -/*! @name Customizing Behavior */ - -/*! - Sent to the delegate to determine whether the log in request should be submitted to the server. - @param logInController The login view controller that is requesting the data. - @param username the username the user tries to log in with. - @param password the password the user tries to log in with. - @result a boolean indicating whether the log in should proceed. - */ -- (BOOL)logInViewController:(PFLogInViewController *)logInController shouldBeginLogInWithUsername:(NSString *)username password:(NSString *)password; - -/*! @name Responding to Actions */ - -/*! - Sent to the delegate when a PFUser is logged in. - @param logInController The login view controller where login finished. - @param user PFUser object that is a result of the login. - */ -- (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user; - -/*! - Sent to the delegate when the log in attempt fails. - @param logInController The login view controller where login failed. - @param error NSError object representing the error that occured. - */ -- (void)logInViewController:(PFLogInViewController *)logInController didFailToLogInWithError:(NSError *)error; - -/*! - Sent to the delegate when the log in screen is cancelled. - @param logInController The login view controller where login was cancelled. - */ -- (void)logInViewControllerDidCancelLogIn:(PFLogInViewController *)logInController; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFNetworkActivityIndicatorManager.h b/iOS/Parse.framework/Versions/A/Headers/PFNetworkActivityIndicatorManager.h deleted file mode 100644 index 5dbd807..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFNetworkActivityIndicatorManager.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// PFNetworkActivityIndicatorManager.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -/*! - `PFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. - When enabled, it will start managing the network activity indicator in the status bar, - according to the network operations that are performed by Parse SDK. - - The number of active requests is incremented or decremented like a stack or a semaphore, - the activity indicator will animate, as long as the number is greater than zero. - */ -@interface PFNetworkActivityIndicatorManager : NSObject - -/*! - A Boolean value indicating whether the manager is enabled. - If `YES` - the manager will start managing the status bar network activity indicator, - according to the network operations that are performed by Parse SDK. - The default value is `YES`. - */ -@property (nonatomic, assign, getter = isEnabled) BOOL enabled; - -/*! - A Boolean value indicating whether the network activity indicator is currently displayed in the status bar. - */ -@property (nonatomic, assign, readonly, getter = isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; - -/*! - The value that indicates current network activities count. - */ -@property (nonatomic, assign, readonly) NSUInteger networkActivityCount; - -/*! - @abstract Returns the shared network activity indicator manager object for the system. - - @returns The systemwide network activity indicator manager. - */ -+ (instancetype)sharedManager; - -/*! - @abstract Increments the number of active network requests. - - @discussion If this number was zero before incrementing, - this will start animating network activity indicator in the status bar. - */ -- (void)incrementActivityCount; - -/*! - @abstract Decrements the number of active network requests. - - @discussion If this number becomes zero after decrementing, - this will stop animating network activity indicator in the status bar. - */ -- (void)decrementActivityCount; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFObject+Subclass.h b/iOS/Parse.framework/Versions/A/Headers/PFObject+Subclass.h deleted file mode 100644 index e5a7537..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFObject+Subclass.h +++ /dev/null @@ -1,128 +0,0 @@ -// -// PFObject+Subclass.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -@class PFQuery; - -/*! - ### Subclassing Notes - - Developers can subclass `PFObject` for a more native object-oriented class structure. - Strongly-typed subclasses of `PFObject` must conform to the protocol - and must call before <[Parse setApplicationId:clientKey:]> is called. - After this it will be returned by and other `PFObject` factories. - - All methods in except for <[PFSubclassing parseClassName]> - are already implemented in the `PFObject+Subclass` category. - - Including `PFObject+Subclass.h` in your implementation file provides these implementations automatically. - - Subclasses support simpler initializers, query syntax, and dynamic synthesizers. - The following shows an example subclass: - - \@interface MYGame : PFObject - - // Accessing this property is the same as objectForKey:@"title" - @property (nonatomic, strong) NSString *title; - - + (NSString *)parseClassName; - - @end - - - @implementation MYGame - - @dynamic title; - - + (NSString *)parseClassName { - return @"Game"; - } - - @end - - - MYGame *game = [[MYGame alloc] init]; - game.title = @"Bughouse"; - [game saveInBackground]; - */ -@interface PFObject (Subclass) - -///-------------------------------------- -/// @name Methods for Subclasses -///-------------------------------------- - -/*! - @abstract Designated initializer for subclasses. - This method can only be called on subclasses which conform to . - This method should not be overridden. - */ -- (instancetype)init; - -/*! - @abstract Creates an instance of the registered subclass with this class's . - - @discussion This helps a subclass ensure that it can be subclassed itself. - For example, `[PFUser object]` will return a `MyUser` object if `MyUser` is a registered subclass of `PFUser`. - For this reason, `[MyClass object]` is preferred to `[[MyClass alloc] init]`. - This method can only be called on subclasses which conform to `PFSubclassing`. - A default implementation is provided by `PFObject` which should always be sufficient. - */ -+ (instancetype)object; - -/*! - @abstract Creates a reference to an existing `PFObject` for use in creating associations between `PFObjects`. - - @discussion Calling on this object will return `NO` until or has been called. - This method can only be called on subclasses which conform to . - A default implementation is provided by `PFObject` which should always be sufficient. - No network request will be made. - - @param objectId The object id for the referenced object. - - @returns An instance of `PFObject` without data. - */ -+ (instancetype)objectWithoutDataWithObjectId:(NSString *)objectId; - -/*! - @abstract Registers an Objective-C class for Parse to use for representing a given Parse class. - - @discussion Once this is called on a `PFObject` subclass, any `PFObject` Parse creates with a class name - that matches `[self parseClassName]` will be an instance of subclass. - This method can only be called on subclasses which conform to . - A default implementation is provided by `PFObject` which should always be sufficient. - */ -+ (void)registerSubclass; - -/*! - @abstract Returns a query for objects of type . - - @discussion This method can only be called on subclasses which conform to . - A default implementation is provided by which should always be sufficient. - */ -+ (PFQuery *)query; - -/*! - @abstract Returns a query for objects of type with a given predicate. - - @discussion A default implementation is provided by which should always be sufficient. - @warning This method can only be called on subclasses which conform to . - - @param predicate The predicate to create conditions from. - - @return An instance of . - - @see [PFQuery queryWithClassName:predicate:] - */ -+ (PFQuery *)queryWithPredicate:(NSPredicate *)predicate; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFObject.h b/iOS/Parse.framework/Versions/A/Headers/PFObject.h deleted file mode 100644 index b1c1193..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFObject.h +++ /dev/null @@ -1,1398 +0,0 @@ -// -// PFObject.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#else -#import -#import -#endif - -@protocol PFSubclassing; -@class BFTask; -@class PFRelation; - -extern NSString *const PFObjectDefaultPin; - -/*! - The `PFObject` class is a local representation of data persisted to the Parse cloud. - This is the main class that is used to interact with objects in your app. -*/ -NS_REQUIRES_PROPERTY_DEFINITIONS -@interface PFObject : NSObject { - BOOL dirty; - - // An array of NSDictionary of NSString -> PFFieldOperation. - // Each dictionary has a subset of the object's keys as keys, and the - // changes to the value for that key as its value. - // There is always at least one dictionary of pending operations. - // Every time a save is started, a new dictionary is added to the end. - // Whenever a save completes, the new data is put into fetchedData, and - // a dictionary is removed from the start. - NSMutableArray *operationSetQueue; - - // Our best estimate as to what the current data is, based on - // the last fetch from the server, and the set of pending operations. - NSMutableDictionary *estimatedData; -} - -///-------------------------------------- -/// @name Creating a PFObject -///-------------------------------------- - -/*! - @abstract Creates a new PFObject with a class name. - - @param className A class name can be any alphanumeric string that begins with a letter. - It represents an object in your app, like a 'User' or a 'Document'. - - @returns Returns the object that is instantiated with the given class name. - */ -+ (instancetype)objectWithClassName:(NSString *)className; - -/*! - @abstract Creates a reference to an existing PFObject for use in creating associations between PFObjects. - - @discussion Calling on this object will return `NO` until has been called. - No network request will be made. - - @param className The object's class. - @param objectId The object id for the referenced object. - - @returns A `PFObject` instance without data. - */ -+ (instancetype)objectWithoutDataWithClassName:(NSString *)className - objectId:(NSString *)objectId; - -/*! - @abstract Creates a new `PFObject` with a class name, initialized with data - constructed from the specified set of objects and keys. - - @param className The object's class. - @param dictionary An `NSDictionary` of keys and objects to set on the new `PFObject`. - - @returns A PFObject with the given class name and set with the given data. - */ -+ (PFObject *)objectWithClassName:(NSString *)className dictionary:(NSDictionary *)dictionary; - -/*! - @abstract Initializes a new empty `PFObject` instance with a class name. - - @param newClassName A class name can be any alphanumeric string that begins with a letter. - It represents an object in your app, like a 'User' or a 'Document'. - - @returns Returns the object that is instantiated with the given class name. - */ -- (instancetype)initWithClassName:(NSString *)newClassName; - -///-------------------------------------- -/// @name Managing Object Properties -///-------------------------------------- - -/*! - @abstract The class name of the object. - */ -@property (strong, readonly) NSString *parseClassName; - -/*! - @abstract The id of the object. - */ -@property (nonatomic, strong) NSString *objectId; - -/*! - @abstract When the object was last updated. - */ -@property (nonatomic, strong, readonly) NSDate *updatedAt; - -/*! - @abstract When the object was created. - */ -@property (nonatomic, strong, readonly) NSDate *createdAt; - -/*! - @abstract The ACL for this object. - */ -@property (nonatomic, strong) PFACL *ACL; - -/*! - @abstract Returns an array of the keys contained in this object. - - @discussion This does not include `createdAt`, `updatedAt`, `authData`, or `objectId`. - It does include things like username and ACL. - */ -- (NSArray *)allKeys; - -///-------------------------------------- -/// @name Accessors -///-------------------------------------- - -/*! - @abstract Returns the value associated with a given key. - - @param key The key for which to return the corresponding value. - */ -- (id)objectForKey:(NSString *)key; - -/*! - @abstract Sets the object associated with a given key. - - @param object The object. - @param key The key. - */ -- (void)setObject:(id)object forKey:(NSString *)key; - -/*! - @abstract Unsets a key on the object. - - @param key The key. - */ -- (void)removeObjectForKey:(NSString *)key; - -/*! - @abstract Returns the value associated with a given key. - - @discussion This method enables usage of literal syntax on `PFObject`. - E.g. `NSString *value = object[@"key"];` - - @see objectForKey: - - @param key The key for which to return the corresponding value. - */ -- (id)objectForKeyedSubscript:(NSString *)key; - -/*! - @abstract Returns the value associated with a given key. - - @discussion This method enables usage of literal syntax on `PFObject`. - E.g. `object[@"key"] = @"value";` - - @see setObject:forKey: - - @param object The object. - @param key The key. - */ -- (void)setObject:(id)object forKeyedSubscript:(NSString *)key; - -/*! - @abstract Returns the relation object associated with the given key. - - @param key The key that the relation is associated with. - */ -- (PFRelation *)relationForKey:(NSString *)key; - -/*! - @abstract Returns the relation object associated with the given key. - - @param key The key that the relation is associated with. - - @deprecated Please use `[PFObject relationForKey:]` instead. - */ -- (PFRelation *)relationforKey:(NSString *)key PARSE_DEPRECATED("Please use -relationForKey: instead."); - -///-------------------------------------- -/// @name Array Accessors -///-------------------------------------- - -/*! - @abstract Adds an object to the end of the array associated with a given key. - - @param object The object to add. - @param key The key. - */ -- (void)addObject:(id)object forKey:(NSString *)key; - -/*! - @abstract Adds the objects contained in another array to the end of the array associated with a given key. - - @param objects The array of objects to add. - @param key The key. - */ -- (void)addObjectsFromArray:(NSArray *)objects forKey:(NSString *)key; - -/*! - @abstract Adds an object to the array associated with a given key, only if it is not already present in the array. - - @discussion The position of the insert is not guaranteed. - - @param object The object to add. - @param key The key. - */ -- (void)addUniqueObject:(id)object forKey:(NSString *)key; - -/*! - @abstract Adds the objects contained in another array to the array associated with a given key, - only adding elements which are not already present in the array. - - @dicsussion The position of the insert is not guaranteed. - - @param objects The array of objects to add. - @param key The key. - */ -- (void)addUniqueObjectsFromArray:(NSArray *)objects forKey:(NSString *)key; - -/*! - @abstract Removes all occurrences of an object from the array associated with a given key. - - @param object The object to remove. - @param key The key. - */ -- (void)removeObject:(id)object forKey:(NSString *)key; - -/*! - @abstract Removes all occurrences of the objects contained in another array from the array associated with a given key. - - @param objects The array of objects to remove. - @param key The key. - */ -- (void)removeObjectsInArray:(NSArray *)objects forKey:(NSString *)key; - -///-------------------------------------- -/// @name Increment -///-------------------------------------- - -/*! - @abstract Increments the given key by `1`. - - @param key The key. - */ -- (void)incrementKey:(NSString *)key; - -/*! - @abstract Increments the given key by a number. - - @param key The key. - @param amount The amount to increment. - */ -- (void)incrementKey:(NSString *)key byAmount:(NSNumber *)amount; - -///-------------------------------------- -/// @name Saving Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* saves the `PFObject`. - - @returns Returns whether the save succeeded. - */ -- (BOOL)save; - -/*! - @abstract *Synchronously* saves the `PFObject` and sets an error if it occurs. - - @param error Pointer to an NSError that will be set if necessary. - - @returns Returns whether the save succeeded. - */ -- (BOOL)save:(NSError **)error; - -/*! - @abstract Saves the `PFObject` *asynchronously*. - - @returns The task that encapsulates the work being done. - */ -- (BFTask *)saveInBackground; - -/*! - @abstract Saves the `PFObject` *asynchronously* and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)saveInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract Saves the `PFObject` asynchronously and calls the given callback. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)saveInBackgroundWithTarget:(id)target selector:(SEL)selector; - -/*! - @see saveEventually: - */ -- (void)saveEventually; - -/*! - @abstract Saves this object to the server at some unspecified time in the future, - even if Parse is currently inaccessible. - - @discussion Use this when you may not have a solid network connection, and don't need to know when the save completes. - If there is some problem with the object such that it can't be saved, it will be silently discarded. If the save - completes successfully while the object is still in memory, then callback will be called. - - Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. - They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is - available. Objects saved this way will persist even after the app is closed, in which case they will be sent the - next time the app is opened. If more than 10MB of data is waiting to be sent, subsequent calls to - will cause old saves to be silently discarded until the connection can be re-established, and the queued objects - can be saved. - - @param callback The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)saveEventually:(PFBooleanResultBlock)callback; - -///-------------------------------------- -/// @name Saving Many Objects -///-------------------------------------- - -/*! - @abstract Saves a collection of objects *synchronously all at once. - - @param objects The array of objects to save. - - @returns Returns whether the save succeeded. - */ -+ (BOOL)saveAll:(NSArray *)objects; - -/*! - @abstract Saves a collection of objects *synchronously* all at once and sets an error if necessary. - - @param objects The array of objects to save. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the save succeeded. - */ -+ (BOOL)saveAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract Saves a collection of objects all at once *asynchronously*. - - @param objects The array of objects to save. - - @returns The task that encapsulates the work being done. - */ -+ (BFTask *)saveAllInBackground:(NSArray *)objects; - -/*! - @abstract Saves a collection of objects all at once `asynchronously` and executes the block when done. - - @param objects The array of objects to save. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)saveAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; - -/*! - @abstract Saves a collection of objects all at once *asynchronously* and calls a callback when done. - - @param objects The array of objects to save. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)number error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)saveAllInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Deleting Many Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* deletes a collection of objects all at once. - - @param objects The array of objects to delete. - - @returns Returns whether the delete succeeded. - */ -+ (BOOL)deleteAll:(NSArray *)objects; - -/*! - @abstract *Synchronously* deletes a collection of objects all at once and sets an error if necessary. - - @param objects The array of objects to delete. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the delete succeeded. - */ -+ (BOOL)deleteAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract Deletes a collection of objects all at once asynchronously. - @param objects The array of objects to delete. - @returns The task that encapsulates the work being done. - */ -+ (BFTask *)deleteAllInBackground:(NSArray *)objects; - -/*! - @abstract Deletes a collection of objects all at once *asynchronously* and executes the block when done. - - @param objects The array of objects to delete. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)deleteAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; - -/*! - @abstract Deletes a collection of objects all at once *asynchronously* and calls a callback when done. - - @param objects The array of objects to delete. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)number error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)deleteAllInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting an Object -///-------------------------------------- - -/*! - @abstract Gets whether the `PFObject` has been fetched. - - @returns `YES` if the PFObject is new or has been fetched or refreshed, otherwise `NO`. - */ -- (BOOL)isDataAvailable; - -#if PARSE_IOS_ONLY - -/*! - @abstract Refreshes the PFObject with the current data from the server. - - @deprecated Please use `-fetch` instead. - */ -- (void)refresh PARSE_DEPRECATED("Please use `-fetch` instead."); - -/*! - @abstract *Synchronously* refreshes the `PFObject` with the current data from the server and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @deprecated Please use `-fetch:` instead. - */ -- (void)refresh:(NSError **)error PARSE_DEPRECATED("Please use `-fetch:` instead."); - -/*! - @abstract *Asynchronously* refreshes the `PFObject` and executes the given callback block. - - @param block The block to execute. - The block should have the following argument signature: `^(PFObject *object, NSError *error)` - - @deprecated Please use `-fetchInBackgroundWithBlock:` instead. - */ -- (void)refreshInBackgroundWithBlock:(PFObjectResultBlock)block PARSE_DEPRECATED("Please use `-fetchInBackgroundWithBlock:` instead."); - -/*! - @abstract *Asynchronously* refreshes the `PFObject` and calls the given callback. - - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(PFObject *)refreshedObject error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `refreshedObject` will be the `PFObject` with the refreshed data. - - @deprecated Please use `fetchInBackgroundWithTarget:selector:` instead. - */ -- (void)refreshInBackgroundWithTarget:(id)target - selector:(SEL)selector PARSE_DEPRECATED("Please use `fetchInBackgroundWithTarget:selector:` instead."); - -#endif - -/*! - @abstract *Synchronously* fetches the PFObject with the current data from the server. - */ -- (void)fetch; -/*! - @abstract *Synchronously* fetches the PFObject with the current data from the server and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - */ -- (void)fetch:(NSError **)error; - -/*! - @abstract *Synchronously* fetches the `PFObject` data from the server if is `NO`. - */ -- (PFObject *)fetchIfNeeded; - -/*! - @abstract *Synchronously* fetches the `PFObject` data from the server if is `NO`. - - @param error Pointer to an `NSError` that will be set if necessary. - */ -- (PFObject *)fetchIfNeeded:(NSError **)error; - -/*! - @abstract Fetches the `PFObject` *asynchronously* and sets it as a result for the task. - - @returns The task that encapsulates the work being done. - */ -- (BFTask *)fetchInBackground; - -/*! - @abstract Fetches the PFObject *asynchronously* and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(PFObject *object, NSError *error)`. - */ -- (void)fetchInBackgroundWithBlock:(PFObjectResultBlock)block; - -/*! - @abstract Fetches the `PFObject *asynchronously* and calls the given callback. - - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(PFObject *)refreshedObject error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `refreshedObject` will be the `PFObject` with the refreshed data. - */ -- (void)fetchInBackgroundWithTarget:(id)target selector:(SEL)selector; - -/*! - @abstract Fetches the `PFObject` data *asynchronously* if isDataAvailable is `NO`, - then sets it as a result for the task. - - @returns The task that encapsulates the work being done. - */ -- (BFTask *)fetchIfNeededInBackground; - -/*! - @abstract Fetches the `PFObject` data *asynchronously* if is `NO`, then calls the callback block. - - @param block The block to execute. - It should have the following argument signature: `^(PFObject *object, NSError *error)`. - */ -- (void)fetchIfNeededInBackgroundWithBlock:(PFObjectResultBlock)block; - -/*! - @abstract Fetches the PFObject's data asynchronously if isDataAvailable is false, then calls the callback. - - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(PFObject *)fetchedObject error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `refreshedObject` will be the `PFObject` with the refreshed data. - */ -- (void)fetchIfNeededInBackgroundWithTarget:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting Many Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server. - - @param objects The list of objects to fetch. - */ -+ (void)fetchAll:(NSArray *)objects; - -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server - and sets an error if it occurs. - - @param objects The list of objects to fetch. - @param error Pointer to an `NSError` that will be set if necessary. - */ -+ (void)fetchAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server. - @param objects The list of objects to fetch. - */ -+ (void)fetchAllIfNeeded:(NSArray *)objects; - -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server - and sets an error if it occurs. - - @param objects The list of objects to fetch. - @param error Pointer to an `NSError` that will be set if necessary. - */ -+ (void)fetchAllIfNeeded:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously*. - - @param objects The list of objects to fetch. - - @returns The task that encapsulates the work being done. - */ -+ (BFTask *)fetchAllInBackground:(NSArray *)objects; - -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously* - and calls the given block. - - @param objects The list of objects to fetch. - @param block The block to execute. - It should have the following argument signature: `^(NSArray *objects, NSError *error)`. - */ -+ (void)fetchAllInBackground:(NSArray *)objects - block:(PFArrayResultBlock)block; - -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously* - and calls the given callback. - - @param objects The list of objects to fetch. - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSArray *)fetchedObjects error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `fetchedObjects` will the array of `PFObject` objects that were fetched. - */ -+ (void)fetchAllInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously*. - - @param objects The list of objects to fetch. - - @returns The task that encapsulates the work being done. - */ -+ (BFTask *)fetchAllIfNeededInBackground:(NSArray *)objects; - -/*! - @abstract Fetches all of the PFObjects with the current data from the server *asynchronously* - and calls the given block. - - @param objects The list of objects to fetch. - @param block The block to execute. - It should have the following argument signature: `^(NSArray *objects, NSError *error)`. - */ -+ (void)fetchAllIfNeededInBackground:(NSArray *)objects - block:(PFArrayResultBlock)block; - -/*! - @abstract Fetches all of the PFObjects with the current data from the server *asynchronously* - and calls the given callback. - - @param objects The list of objects to fetch. - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSArray *)fetchedObjects error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `fetchedObjects` will the array of `PFObject` objects that were fetched. - */ -+ (void)fetchAllIfNeededInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Fetching From Local Datastore -///-------------------------------------- - -/*! - @abstract *Synchronously* loads data from the local datastore into this object, - if it has not been fetched from the server already. - */ -- (void)fetchFromLocalDatastore; - -/*! - @abstract *Synchronously* loads data from the local datastore into this object, if it has not been fetched - from the server already. - - @discussion If the object is not stored in the local datastore, this `error` will be set to - return kPFErrorCacheMiss. - - @param error Pointer to an `NSError` that will be set if necessary. - */ -- (void)fetchFromLocalDatastore:(NSError **)error; - -/*! - @abstract *Asynchronously* loads data from the local datastore into this object, - if it has not been fetched from the server already. - - @return The task that encapsulates the work being done. - */ -- (BFTask *)fetchFromLocalDatastoreInBackground; - -/*! - @abstract *Asynchronously* loads data from the local datastore into this object, - if it has not been fetched from the server already. - - @param block The block to execute. - It should have the following argument signature: `^(PFObject *object, NSError *error)`. - */ -- (void)fetchFromLocalDatastoreInBackgroundWithBlock:(PFObjectResultBlock)block; - -///-------------------------------------- -/// @name Deleting an Object -///-------------------------------------- - -/*! - @abstract *Synchronously* deletes the `PFObject`. - - @returns Returns whether the delete succeeded. - */ -- (BOOL)delete; - -/*! - @abstract *Synchronously* deletes the `PFObject` and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the delete succeeded. - */ -- (BOOL)delete:(NSError **)error; - -/*! - @abstract Deletes the `PFObject` *asynchronously*. - - @returns The task that encapsulates the work being done. - */ -- (BFTask *)deleteInBackground; - -/*! - @abstract Deletes the `PFObject` *asynchronously* and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)deleteInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract Deletes the `PFObject` *asynchronously* and calls the given callback. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)deleteInBackgroundWithTarget:(id)target - selector:(SEL)selector; - -/*! - @abstract Deletes this object from the server at some unspecified time in the future, - even if Parse is currently inaccessible. - - @discussion Use this when you may not have a solid network connection, - and don't need to know when the delete completes. If there is some problem with the object - such that it can't be deleted, the request will be silently discarded. - - Delete instructions made with this method will be stored locally in an on-disk cache until they can be transmitted - to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection - is available. Delete requests will persist even after the app is closed, in which case they will be sent the - next time the app is opened. If more than 10MB of or commands are waiting - to be sent, subsequent calls to or will cause old requests to be silently discarded - until the connection can be re-established, and the queued requests can go through. - */ -- (void)deleteEventually; - -///-------------------------------------- -/// @name Dirtiness -///-------------------------------------- - -/*! - @abstract Gets whether any key-value pair in this object (or its children) - has been added/updated/removed and not saved yet. - - @returns Returns whether this object has been altered and not saved yet. - */ -- (BOOL)isDirty; - -/*! - @abstract Get whether a value associated with a key has been added/updated/removed and not saved yet. - - @param key The key to check for - - @returns Returns whether this key has been altered and not saved yet. - */ -- (BOOL)isDirtyForKey:(NSString *)key; - - -///-------------------------------------- -/// @name Pinning -///-------------------------------------- - -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @return Returns whether the pin succeeded. - - @see unpin: - @see PFObjectDefaultPin - */ -- (BOOL)pin; - -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the pin succeeded. - - @see unpin: - @see PFObjectDefaultPin - */ -- (BOOL)pin:(NSError **)error; - -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param name The name of the pin. - - @return Returns whether the pin succeeded. - - @see unpinWithName: - */ -- (BOOL)pinWithName:(NSString *)name; - -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the pin succeeded. - - @see unpinWithName: - */ -- (BOOL)pinWithName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @return The task that encapsulates the work being done. - - @see unpinInBackground: - @see PFObjectDefaultPin - */ -- (BFTask *)pinInBackground; - -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see unpinInBackgroundWithBlock: - @see PFObjectDefaultPin - */ -- (void)pinInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param name The name of the pin. - - @return The task that encapsulates the work being done. - - @see unpinInBackgroundWithName: - */ -- (BFTask *)pinInBackgroundWithName:(NSString *)name; - -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see unpinInBackgroundWithName:block: - */ -- (void)pinInBackgroundWithName:(NSString *)name - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Pinning Many Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - - @return Returns whether the pin succeeded. - - @see unpinAll: - @see PFObjectDefaultPin - */ -+ (BOOL)pinAll:(NSArray *)objects; - -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the pin succeeded. - - @see unpinAll:error: - @see PFObjectDefaultPin - */ -+ (BOOL)pinAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param name The name of the pin. - - @return Returns whether the pin succeeded. - - @see unpinAll:withName: - */ -+ (BOOL)pinAll:(NSArray *)objects withName:(NSString *)name; - -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the pin succeeded. - - @see unpinAll:withName:error: - */ -+ (BOOL)pinAll:(NSArray *)objects - withName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - - @return The task that encapsulates the work being done. - - @see unpinAllInBackground: - @see PFObjectDefaultPin - */ -+ (BFTask *)pinAllInBackground:(NSArray *)objects; - -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see unpinAllInBackground:block: - @see PFObjectDefaultPin - */ -+ (void)pinAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param name The name of the pin. - - @return The task that encapsulates the work being done. - - @see unpinAllInBackground:withName: - */ -+ (BFTask *)pinAllInBackground:(NSArray *)objects - withName:(NSString *)name; - -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see unpinAllInBackground:withName:block: - */ -+ (void)pinAllInBackground:(NSArray *)objects - withName:(NSString *)name - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Unpinning -///-------------------------------------- - -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @return Returns whether the unpin succeeded. - - @see pin: - @see PFObjectDefaultPin - */ -- (BOOL)unpin; - -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see pin: - @see PFObjectDefaultPin - */ -- (BOOL)unpin:(NSError **)error; - -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively. - - @param name The name of the pin. - - @return Returns whether the unpin succeeded. - - @see pinWithName: - */ -- (BOOL)unpinWithName:(NSString *)name; - -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively. - - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see pinWithName:error: - */ -- (BOOL)unpinWithName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @return The task that encapsulates the work being done. - - @see pinInBackground: - @see PFObjectDefaultPin - */ -- (BFTask *)unpinInBackground; - -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see pinInBackgroundWithBlock: - @see PFObjectDefaultPin - */ -- (void)unpinInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively. - - @param name The name of the pin. - - @return The task that encapsulates the work being done. - - @see pinInBackgroundWithName: - */ -- (BFTask *)unpinInBackgroundWithName:(NSString *)name; - -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively. - - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see pinInBackgroundWithName:block: - */ -- (void)unpinInBackgroundWithName:(NSString *)name - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Unpinning Many Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* removes all objects in the local datastore - using a default pin name: `PFObjectDefaultPin`. - - @return Returns whether the unpin succeeded. - - @see PFObjectDefaultPin - */ -+ (BOOL)unpinAllObjects; - -/*! - @abstract *Synchronously* removes all objects in the local datastore - using a default pin name: `PFObjectDefaultPin`. - - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see PFObjectDefaultPin - */ -+ (BOOL)unpinAllObjects:(NSError **)error; - -/*! - @abstract *Synchronously* removes all objects with the specified pin name. - - @param name The name of the pin. - - @return Returns whether the unpin succeeded. - */ -+ (BOOL)unpinAllObjectsWithName:(NSString *)name; - -/*! - @abstract *Synchronously* removes all objects with the specified pin name. - - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - */ -+ (BOOL)unpinAllObjectsWithName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* removes all objects in the local datastore - using a default pin name: `PFObjectDefaultPin`. - - @return The task that encapsulates the work being done. - - @see PFObjectDefaultPin - */ -+ (BFTask *)unpinAllObjectsInBackground; - -/*! - @abstract *Asynchronously* removes all objects in the local datastore - using a default pin name: `PFObjectDefaultPin`. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see PFObjectDefaultPin - */ -+ (void)unpinAllObjectsInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* removes all objects with the specified pin name. - - @param name The name of the pin. - - @return The task that encapsulates the work being done. - */ -+ (BFTask *)unpinAllObjectsInBackgroundWithName:(NSString *)name; - -/*! - @abstract *Asynchronously* removes all objects with the specified pin name. - - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unpinAllObjectsInBackgroundWithName:(NSString *)name - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param objects The objects. - - @return Returns whether the unpin succeeded. - - @see pinAll: - @see PFObjectDefaultPin - */ -+ (BOOL)unpinAll:(NSArray *)objects; - -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param objects The objects. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see pinAll:error: - @see PFObjectDefaultPin - */ -+ (BOOL)unpinAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively. - - @param objects The objects. - @param name The name of the pin. - - @return Returns whether the unpin succeeded. - - @see pinAll:withName: - */ -+ (BOOL)unpinAll:(NSArray *)objects withName:(NSString *)name; - -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively. - - @param objects The objects. - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see pinAll:withName:error: - */ -+ (BOOL)unpinAll:(NSArray *)objects - withName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param objects The objects. - - @return The task that encapsulates the work being done. - - @see pinAllInBackground: - @see PFObjectDefaultPin - */ -+ (BFTask *)unpinAllInBackground:(NSArray *)objects; - -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param objects The objects. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see pinAllInBackground:block: - @see PFObjectDefaultPin - */ -+ (void)unpinAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively. - - @param objects The objects. - @param name The name of the pin. - - @return The task that encapsulates the work being done. - - @see pinAllInBackground:withName: - */ -+ (BFTask *)unpinAllInBackground:(NSArray *)objects - withName:(NSString *)name; - -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively. - - @param objects The objects. - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see pinAllInBackground:withName:block: - */ -+ (void)unpinAllInBackground:(NSArray *)objects - withName:(NSString *)name - block:(PFBooleanResultBlock)block; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFProduct.h b/iOS/Parse.framework/Versions/A/Headers/PFProduct.h deleted file mode 100644 index cd57a25..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFProduct.h +++ /dev/null @@ -1,76 +0,0 @@ -// -// PFProduct.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import -#import -#import - -/*! - The `PFProduct` class represents an in-app purchase product on the Parse server. - By default, products can only be created via the Data Browser. Saving a `PFProduct` will result in error. - However, the products' metadata information can be queried and viewed. - - This class is currently for iOS only. - */ -@interface PFProduct : PFObject - -/*! - @abstract The name of the Installation class in the REST API. - - @discussion This is a required PFSubclassing method. - */ -+ (NSString *)parseClassName; - -///-------------------------------------- -/// @name Querying for Products -///-------------------------------------- - -/*! - @abstract A that could be used to fetch all product instances from Parse. - */ -+ (PFQuery *)query; - -///-------------------------------------- -/// @name Product-specific Properties -///-------------------------------------- - -/*! - @abstract The product identifier of the product. - - @discussion This should match the product identifier in iTunes Connect exactly. - */ -@property (nonatomic, strong) NSString *productIdentifier; - -/*! - @abstract The icon of the product. - */ -@property (nonatomic, strong) PFFile *icon; - -/*! - @abstract The title of the product. - */ -@property (nonatomic, strong) NSString *title; - -/*! - @abstract The subtitle of the product. - */ -@property (nonatomic, strong) NSString *subtitle; - -/*! - @abstract The order in which the product information is displayed in . - - @discussion The product with a smaller order is displayed earlier in the . - */ -@property (nonatomic, strong) NSNumber *order; - -/*! - @abstract The name of the associated download. - - @discussion If there is no downloadable asset, it should be `nil`. - */ -@property (nonatomic, strong, readonly) NSString *downloadName; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFProductTableViewController.h b/iOS/Parse.framework/Versions/A/Headers/PFProductTableViewController.h deleted file mode 100644 index 5d8c58b..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFProductTableViewController.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// PFProductsTableViewController.h -// Parse -// -// Created by Qian Wang on 5/15/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import "PFQueryTableViewController.h" - -/*! - PFProductTableViewController displays in-app purchase products stored on Parse. - In addition to setting up in-app purchases in iTunesConnect, the app developer needs - to register product information on Parse, in the Product class. - */ -@interface PFProductTableViewController : PFQueryTableViewController - -/*! - Initializes a product table view controller. - */ -- (instancetype)init; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFPurchase.h b/iOS/Parse.framework/Versions/A/Headers/PFPurchase.h deleted file mode 100644 index 3a8e661..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFPurchase.h +++ /dev/null @@ -1,87 +0,0 @@ -// -// PFPurchase.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import -#import - -#import - -@class PFProduct; - -/*! - `PFPurchase` provides a set of APIs for working with in-app purchases. - - This class is currently for iOS only. - */ -@interface PFPurchase : NSObject - -/*! - @abstract Add application logic block which is run when buying a product. - - @discussion This method should be called once for each product, and should be called before - calling . All invocations to should happen within - the same method, and on the main thread. It is recommended to place all invocations of this method - in `application:didFinishLaunchingWithOptions:`. - - @param productIdentifier the product identifier - @param block The block to be run when buying a product. - */ -+ (void)addObserverForProduct:(NSString *)productIdentifier - block:(void(^)(SKPaymentTransaction *transaction))block; - -/*! - @abstract *Asynchronously* initiates the purchase for the product. - - @param productIdentifier the product identifier - @param block the completion block. - */ -+ (void)buyProduct:(NSString *)productIdentifier block:(void(^)(NSError *error))block; - -/*! - @abstract *Asynchronously* download the purchased asset, which is stored on Parse's server. - - @discussion Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. - - @param transaction the transaction, which contains the receipt. - @param completion the completion block. - */ -+ (void)downloadAssetForTransaction:(SKPaymentTransaction *)transaction - completion:(void(^)(NSString *filePath, NSError *error))completion; - -/*! - @abstract *Asynchronously* download the purchased asset, which is stored on Parse's server. - - @discussion Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. - - @param transaction the transaction, which contains the receipt. - @param completion the completion block. - @param progress the progress block, which is called multiple times to reveal progress of the download. - */ -+ (void)downloadAssetForTransaction:(SKPaymentTransaction *)transaction - completion:(void(^)(NSString *filePath, NSError *error))completion - progress:(PFProgressBlock)progress; - -/*! - @abstract *Asynchronously* restore completed transactions for the current user. - - @discussion Only nonconsumable purchases are restored. If observers for the products have been added before - calling this method, invoking the method reruns the application logic associated with the purchase. - - @warning This method is only important to developers who want to preserve purchase states across - different installations of the same app. - */ -+ (void)restore; - -/* - @abstract Returns a content path of the asset of a product, if it was purchased and downloaded. - - @discussion To download and verify purchases use . - - @warning This method will return `nil`, if the purchase wasn't verified or if the asset was not downloaded. - */ -+ (NSString *)assetContentPathForProduct:(PFProduct *)product; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFPurchaseTableViewCell.h b/iOS/Parse.framework/Versions/A/Headers/PFPurchaseTableViewCell.h deleted file mode 100644 index c393cf7..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFPurchaseTableViewCell.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// PFPurchaseTableViewCell.h -// Parse -// -// Created by Qian Wang on 5/21/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import - -#import "PFTableViewCell.h" - -/*! - An enum that represents states of the PFPurchaseTableViewCell. - @see PFPurchaseTableViewCell - */ -typedef NS_ENUM(uint8_t, PFPurchaseTableViewCellState) { - /*! Normal state of the cell. */ - PFPurchaseTableViewCellStateNormal = 0, - /*! Downloading state of the cell. */ - PFPurchaseTableViewCellStateDownloading, - /*! State of the cell, when the product was downloaded. */ - PFPurchaseTableViewCellStateDownloaded -}; - -/*! - PFPurchaseTableViewCell is a subclass PFTableViewCell that is used to show - products in a PFProductTableViewController. - @see PFProductTableViewController - */ -@interface PFPurchaseTableViewCell : PFTableViewCell - -/*! State of the cell */ -@property (nonatomic, assign) PFPurchaseTableViewCellState state; - -/*! Label where price of the product is displayed. */ -@property (nonatomic, strong, readonly) UILabel *priceLabel; - -/*! Progress view that is shown, when the product is downloading. */ -@property (nonatomic, strong, readonly) UIProgressView *progressView; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFPush.h b/iOS/Parse.framework/Versions/A/Headers/PFPush.h deleted file mode 100644 index 0d740f7..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFPush.h +++ /dev/null @@ -1,523 +0,0 @@ -// -// PFPush.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import - -@class BFTask; -@class PFQuery; - -/*! - The `PFPush` class defines a push notification that can be sent from a client device. - - The preferred way of modifying or retrieving channel subscriptions is to use - the class, instead of the class methods in `PFPush`. - - This class is currently for iOS only. Parse does not handle Push Notifications - to Parse applications running on OS X. Push Notifications can be sent from OS X - applications via Cloud Code or the REST API to push-enabled devices (e.g. iOS or Android). - */ -@interface PFPush : NSObject - -///-------------------------------------- -/// @name Creating a Push Notification -///-------------------------------------- - -+ (PFPush *)push; - -///-------------------------------------- -/// @name Configuring a Push Notification -///-------------------------------------- - -/*! - @abstract Sets the channel on which this push notification will be sent. - - @param channel The channel to set for this push. - The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. - */ -- (void)setChannel:(NSString *)channel; - -/*! - @abstract Sets the array of channels on which this push notification will be sent. - - @param channels The array of channels to set for this push. - Each channel name must start with a letter and contain only letters, numbers, dashes, and underscores. - */ -- (void)setChannels:(NSArray *)channels; - -/*! - @abstract Sets an installation query to which this push notification will be sent. - - @discussion The query should be created via <[PFInstallation query]> and should not specify a skip, limit, or order. - - @param query The installation query to set for this push. - */ -- (void)setQuery:(PFQuery *)query; - -/*! - @abstract Sets an alert message for this push notification. - - @warning This will overwrite any data specified in setData. - - @param message The message to send in this push. - */ -- (void)setMessage:(NSString *)message; - -/*! - @abstract Sets an arbitrary data payload for this push notification. - - @discussion See the guide for information about the dictionary structure. - - @warning This will overwrite any data specified in setMessage. - - @param data The data to send in this push. - */ -- (void)setData:(NSDictionary *)data; - -/*! - @abstract Sets whether this push will go to Android devices. - - @param pushToAndroid Whether this push will go to Android devices. - - @deprecated Please use a `[PFInstallation query]` with a constraint on deviceType instead. - */ -- (void)setPushToAndroid:(BOOL)pushToAndroid PARSE_DEPRECATED("Please use a [PFInstallation query] with a constraint on deviceType."); - -/*! - @abstract Sets whether this push will go to iOS devices. - - @param pushToIOS Whether this push will go to iOS devices. - - @deprecated Please use a `[PFInstallation query]` with a constraint on deviceType instead. - */ -- (void)setPushToIOS:(BOOL)pushToIOS PARSE_DEPRECATED("Please use a [PFInstallation query] with a constraint on deviceType."); - -/*! - @abstract Sets the expiration time for this notification. - - @discussion The notification will be sent to devices which are either online - at the time the notification is sent, or which come online before the expiration time is reached. - Because device clocks are not guaranteed to be accurate, - most applications should instead use . - - @see expireAfterTimeInterval: - - @param date The time at which the notification should expire. - */ -- (void)expireAtDate:(NSDate *)date; - -/*! - @abstract Sets the time interval after which this notification should expire. - - @discussion This notification will be sent to devices which are either online at - the time the notification is sent, or which come online within the given - time interval of the notification being received by Parse's server. - An interval which is less than or equal to zero indicates that the - message should only be sent to devices which are currently online. - - @param timeInterval The interval after which the notification should expire. - */ -- (void)expireAfterTimeInterval:(NSTimeInterval)timeInterval; - -/*! - @abstract Clears both expiration values, indicating that the notification should never expire. - */ -- (void)clearExpiration; - -///-------------------------------------- -/// @name Sending Push Notifications -///-------------------------------------- - -/*! - @abstract *Synchronously* send a push message to a channel. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param message The message to send. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -+ (BOOL)sendPushMessageToChannel:(NSString *)channel - withMessage:(NSString *)message - error:(NSError **)error; - -/*! - @abstract *Asynchronously* send a push message to a channel. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param message The message to send. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)sendPushMessageToChannelInBackground:(NSString *)channel - withMessage:(NSString *)message; - -/*! - @abstract *Asynchronously* sends a push message to a channel and calls the given block. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param message The message to send. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)sendPushMessageToChannelInBackground:(NSString *)channel - withMessage:(NSString *)message - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* send a push message to a channel. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param message The message to send. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)sendPushMessageToChannelInBackground:(NSString *)channel - withMessage:(NSString *)message - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Send a push message to a query. - - @param query The query to send to. The query must be a query created with <[PFInstallation query]>. - @param message The message to send. - @param error Pointer to an NSError that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -+ (BOOL)sendPushMessageToQuery:(PFQuery *)query - withMessage:(NSString *)message - error:(NSError **)error; - -/*! - @abstract *Asynchronously* send a push message to a query. - - @param query The query to send to. The query must be a query created with <[PFInstallation query]>. - @param message The message to send. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)sendPushMessageToQueryInBackground:(PFQuery *)query - withMessage:(NSString *)message; - -/*! - @abstract *Asynchronously* sends a push message to a query and calls the given block. - - @param query The query to send to. The query must be a PFInstallation query - created with [PFInstallation query]. - @param message The message to send. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)sendPushMessageToQueryInBackground:(PFQuery *)query - withMessage:(NSString *)message - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Synchronously* send this push message. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -- (BOOL)sendPush:(NSError **)error; - -/*! - @abstract *Asynchronously* send this push message. - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)sendPushInBackground; - -/*! - @abstract *Asynchronously* send this push message and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)sendPushInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* send this push message and calls the given callback. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)sendPushInBackgroundWithTarget:(id)target selector:(SEL)selector; - -/*! - @abstract *Synchronously* send a push message with arbitrary data to a channel. - - @discussion See the guide for information about the dictionary structure. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param data The data to send. - @param error Pointer to an NSError that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -+ (BOOL)sendPushDataToChannel:(NSString *)channel - withData:(NSDictionary *)data - error:(NSError **)error; - -/*! - @abstract *Asynchronously* send a push message with arbitrary data to a channel. - - @discussion See the guide for information about the dictionary structure. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param data The data to send. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)sendPushDataToChannelInBackground:(NSString *)channel - withData:(NSDictionary *)data; - -/*! - @abstract Asynchronously sends a push message with arbitrary data to a channel and calls the given block. - - @discussion See the guide for information about the dictionary structure. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param data The data to send. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)sendPushDataToChannelInBackground:(NSString *)channel - withData:(NSDictionary *)data - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* send a push message with arbitrary data to a channel. - - @discussion See the guide for information about the dictionary structure. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param data The data to send. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)sendPushDataToChannelInBackground:(NSString *)channel - withData:(NSDictionary *)data - target:(id)target - selector:(SEL)selector; - -/*! - @abstract *Synchronously* send a push message with arbitrary data to a query. - - @discussion See the guide for information about the dictionary structure. - - @param query The query to send to. The query must be a query - created with <[PFInstallation query]>. - @param data The data to send. - @param error Pointer to an NSError that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -+ (BOOL)sendPushDataToQuery:(PFQuery *)query - withData:(NSDictionary *)data - error:(NSError **)error; - -/*! - @abstract Asynchronously send a push message with arbitrary data to a query. - - @discussion See the guide for information about the dictionary structure. - - @param query The query to send to. The query must be a query - created with <[PFInstallation query]>. - @param data The data to send. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)sendPushDataToQueryInBackground:(PFQuery *)query - withData:(NSDictionary *)data; - -/*! - @abstract *Asynchronously* sends a push message with arbitrary data to a query and calls the given block. - - @discussion See the guide for information about the dictionary structure. - - @param query The query to send to. The query must be a query - created with <[PFInstallation query]>. - @param data The data to send. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)sendPushDataToQueryInBackground:(PFQuery *)query - withData:(NSDictionary *)data - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Handling Notifications -///-------------------------------------- - -/*! - @abstract A default handler for push notifications while the app is active that - could be used to mimic the behavior of iOS push notifications while the app is backgrounded or not running. - - @discussion Call this from `application:didReceiveRemoteNotification:`. - - @param userInfo The userInfo dictionary you get in `appplication:didReceiveRemoteNotification:`. - */ -+ (void)handlePush:(NSDictionary *)userInfo; - -///-------------------------------------- -/// @name Managing Channel Subscriptions -///-------------------------------------- - -/*! - @abstract Store the device token locally for push notifications. - - @discussion Usually called from you main app delegate's `didRegisterForRemoteNotificationsWithDeviceToken:`. - - @param deviceToken Either as an `NSData` straight from `application:didRegisterForRemoteNotificationsWithDeviceToken:` - or as an `NSString` if you converted it yourself. - */ -+ (void)storeDeviceToken:(id)deviceToken; - -/*! - @abstract *Synchronously* get all the channels that this device is subscribed to. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns an `NSSet` containing all the channel names this device is subscribed to. - */ -+ (NSSet *)getSubscribedChannels:(NSError **)error; - -/*! - @abstract *Asynchronously* get all the channels that this device is subscribed to. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)getSubscribedChannelsInBackground; - -/*! - @abstract *Asynchronously* get all the channels that this device is subscribed to. - @param block The block to execute. - It should have the following argument signature: `^(NSSet *channels, NSError *error)`. - */ -+ (void)getSubscribedChannelsInBackgroundWithBlock:(PFSetResultBlock)block; - -/*! - @abstract *Asynchronously* get all the channels that this device is subscribed to. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSSet *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - */ -+ (void)getSubscribedChannelsInBackgroundWithTarget:(id)target - selector:(SEL)selector; - -/*! - @abstract *Synchrnously* subscribes the device to a channel of push notifications. - - @param channel The channel to subscribe to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the subscribe succeeded. - */ -+ (BOOL)subscribeToChannel:(NSString *)channel error:(NSError **)error; - -/*! - @abstract *Asynchronously* subscribes the device to a channel of push notifications. - - @param channel The channel to subscribe to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)subscribeToChannelInBackground:(NSString *)channel; - -/*! - @abstract *Asynchronously* subscribes the device to a channel of push notifications and calls the given block. - - @param channel The channel to subscribe to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)subscribeToChannelInBackground:(NSString *)channel - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* subscribes the device to a channel of push notifications and calls the given callback. - - @param channel The channel to subscribe to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)subscribeToChannelInBackground:(NSString *)channel - target:(id)target - selector:(SEL)selector; - -/*! - @abstract *Synchronously* unsubscribes the device to a channel of push notifications. - - @param channel The channel to unsubscribe from. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the unsubscribe succeeded. - */ -+ (BOOL)unsubscribeFromChannel:(NSString *)channel error:(NSError **)error; - -/*! - @abstract *Asynchronously* unsubscribes the device from a channel of push notifications. - - @param channel The channel to unsubscribe from. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)unsubscribeFromChannelInBackground:(NSString *)channel; - -/*! - @abstract *Asynchronously* unsubscribes the device from a channel of push notifications and calls the given block. - - @param channel The channel to unsubscribe from. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unsubscribeFromChannelInBackground:(NSString *)channel - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* unsubscribes the device from a channel of push notifications and calls the given callback. - - @param channel The channel to unsubscribe from. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)unsubscribeFromChannelInBackground:(NSString *)channel - target:(id)target - selector:(SEL)selector; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFQuery.h b/iOS/Parse.framework/Versions/A/Headers/PFQuery.h deleted file mode 100644 index eb52f8f..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFQuery.h +++ /dev/null @@ -1,791 +0,0 @@ -// -// PFQuery.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#import -#import -#else -#import -#import -#import -#import -#endif - -@class BFTask; - -/*! - The `PFQuery` class defines a query that is used to query for s. - */ -@interface PFQuery : NSObject - -///-------------------------------------- -/// @name Creating a Query for a Class -///-------------------------------------- - -/*! - @abstract Returns a `PFQuery` for a given class. - - @param className The class to query on. - - @returns A `PFQuery` object. - */ -+ (PFQuery *)queryWithClassName:(NSString *)className; - -/*! - @abstract Creates a PFQuery with the constraints given by predicate. - - @discussion The following types of predicates are supported: - - - Simple comparisons such as `=`, `!=`, `<`, `>`, `<=`, `>=`, and `BETWEEN` with a key and a constant. - - Containment predicates, such as `x IN {1, 2, 3}`. - - Key-existence predicates, such as `x IN SELF`. - - BEGINSWITH expressions. - - Compound predicates with `AND`, `OR`, and `NOT`. - - SubQueries with `key IN %@`, subquery. - - The following types of predicates are NOT supported: - - - Aggregate operations, such as `ANY`, `SOME`, `ALL`, or `NONE`. - - Regular expressions, such as `LIKE`, `MATCHES`, `CONTAINS`, or `ENDSWITH`. - - Predicates comparing one key to another. - - Complex predicates with many ORed clauses. - - @param className The class to query on. - @param predicate The predicate to create conditions from. - */ -+ (PFQuery *)queryWithClassName:(NSString *)className predicate:(NSPredicate *)predicate; - -/*! - Initializes the query with a class name. - @param newClassName The class name. - */ -- (instancetype)initWithClassName:(NSString *)newClassName; - -/*! - The class name to query for - */ -@property (nonatomic, strong) NSString *parseClassName; - -///-------------------------------------- -/// @name Adding Basic Constraints -///-------------------------------------- - -/*! - @abstract Make the query include PFObjects that have a reference stored at the provided key. - - @discussion This has an effect similar to a join. You can use dot notation to specify which fields in - the included object are also fetch. - - @param key The key to load child s for. - */ -- (void)includeKey:(NSString *)key; - -/*! - @abstract Make the query restrict the fields of the returned s to include only the provided keys. - - @discussion If this is called multiple times, then all of the keys specified in each of the calls will be included. - - @param keys The keys to include in the result. - */ -- (void)selectKeys:(NSArray *)keys; - -/*! - @abstract Add a constraint that requires a particular key exists. - - @param key The key that should exist. - */ -- (void)whereKeyExists:(NSString *)key; - -/*! - @abstract Add a constraint that requires a key not exist. - - @param key The key that should not exist. - */ -- (void)whereKeyDoesNotExist:(NSString *)key; - -/*! - @abstract Add a constraint to the query that requires a particular key's object to be equal to the provided object. - - @param key The key to be constrained. - @param object The object that must be equalled. - */ -- (void)whereKey:(NSString *)key equalTo:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's object to be less than the provided object. - - @param key The key to be constrained. - @param object The object that provides an upper bound. - */ -- (void)whereKey:(NSString *)key lessThan:(id)object; - -/*! - @abstractAdd a constraint to the query that requires a particular key's object - to be less than or equal to the provided object. - - @param key The key to be constrained. - @param object The object that must be equalled. - */ -- (void)whereKey:(NSString *)key lessThanOrEqualTo:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's object - to be greater than the provided object. - - @param key The key to be constrained. - @param object The object that must be equalled. - */ -- (void)whereKey:(NSString *)key greaterThan:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's - object to be greater than or equal to the provided object. - - @param key The key to be constrained. - @param object The object that must be equalled. - */ -- (void)whereKey:(NSString *)key greaterThanOrEqualTo:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's object - to be not equal to the provided object. - - @param key The key to be constrained. - @param object The object that must not be equalled. - */ -- (void)whereKey:(NSString *)key notEqualTo:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's object - to be contained in the provided array. - - @param key The key to be constrained. - @param array The possible values for the key's object. - */ -- (void)whereKey:(NSString *)key containedIn:(NSArray *)array; - -/*! - @abstract Add a constraint to the query that requires a particular key's object - not be contained in the provided array. - - @param key The key to be constrained. - @param array The list of values the key's object should not be. - */ -- (void)whereKey:(NSString *)key notContainedIn:(NSArray *)array; - -/*! - @abstract Add a constraint to the query that requires a particular key's array - contains every element of the provided array. - - @param key The key to be constrained. - @param array The array of values to search for. - */ -- (void)whereKey:(NSString *)key containsAllObjectsInArray:(NSArray *)array; - -///-------------------------------------- -/// @name Adding Location Constraints -///-------------------------------------- - -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) - be near a reference point. - - @discussion Distance is calculated based on angular distance on a sphere. Results will be sorted by distance - from reference point. - - @param key The key to be constrained. - @param geopoint The reference point represented as a . - */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint; - -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) - be near a reference point and within the maximum distance specified (in miles). - - @discussion Distance is calculated based on a spherical coordinate system. - Results will be sorted by distance (nearest to farthest) from the reference point. - - @param key The key to be constrained. - @param geopoint The reference point represented as a . - @param maxDistance Maximum distance in miles. - */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinMiles:(double)maxDistance; - -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) - be near a reference point and within the maximum distance specified (in kilometers). - - @discussion Distance is calculated based on a spherical coordinate system. - Results will be sorted by distance (nearest to farthest) from the reference point. - - @param key The key to be constrained. - @param geopoint The reference point represented as a . - @param maxDistance Maximum distance in kilometers. - */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinKilometers:(double)maxDistance; - -/*! - Add a constraint to the query that requires a particular key's coordinates (specified via ) be near - a reference point and within the maximum distance specified (in radians). Distance is calculated based on - angular distance on a sphere. Results will be sorted by distance (nearest to farthest) from the reference point. - - @param key The key to be constrained. - @param geopoint The reference point as a . - @param maxDistance Maximum distance in radians. - */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinRadians:(double)maxDistance; - -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) be - contained within a given rectangular geographic bounding box. - - @param key The key to be constrained. - @param southwest The lower-left inclusive corner of the box. - @param northeast The upper-right inclusive corner of the box. - */ -- (void)whereKey:(NSString *)key withinGeoBoxFromSouthwest:(PFGeoPoint *)southwest toNortheast:(PFGeoPoint *)northeast; - -///-------------------------------------- -/// @name Adding String Constraints -///-------------------------------------- - -/*! - @abstract Add a regular expression constraint for finding string values that match the provided regular expression. - - @warning This may be slow for large datasets. - - @param key The key that the string to match is stored in. - @param regex The regular expression pattern to match. - */ -- (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex; - -/*! - @abstract Add a regular expression constraint for finding string values that match the provided regular expression. - - @warning This may be slow for large datasets. - - @param key The key that the string to match is stored in. - @param regex The regular expression pattern to match. - @param modifiers Any of the following supported PCRE modifiers: - - `i` - Case insensitive search - - `m` - Search across multiple lines of input - */ -- (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex modifiers:(NSString *)modifiers; - -/*! - @abstract Add a constraint for finding string values that contain a provided substring. - - @warning This will be slow for large datasets. - - @param key The key that the string to match is stored in. - @param substring The substring that the value must contain. - */ -- (void)whereKey:(NSString *)key containsString:(NSString *)substring; - -/*! - @abstract Add a constraint for finding string values that start with a provided prefix. - - @discussion This will use smart indexing, so it will be fast for large datasets. - - @param key The key that the string to match is stored in. - @param prefix The substring that the value must start with. - */ -- (void)whereKey:(NSString *)key hasPrefix:(NSString *)prefix; - -/*! - @abstract Add a constraint for finding string values that end with a provided suffix. - - @warning This will be slow for large datasets. - - @param key The key that the string to match is stored in. - @param suffix The substring that the value must end with. - */ -- (void)whereKey:(NSString *)key hasSuffix:(NSString *)suffix; - -///-------------------------------------- -/// @name Adding Subqueries -///-------------------------------------- - -/*! - Returns a `PFQuery` that is the `or` of the passed in queries. - - @param queries The list of queries to or together. - - @returns An instance of `PFQuery` that is the `or` of the passed in queries. - */ -+ (PFQuery *)orQueryWithSubqueries:(NSArray *)queries; - -/*! - @abstract Adds a constraint that requires that a key's value matches a value in another key - in objects returned by a sub query. - - @param key The key that the value is stored. - @param otherKey The key in objects in the returned by the sub query whose value should match. - @param query The query to run. - */ -- (void)whereKey:(NSString *)key matchesKey:(NSString *)otherKey inQuery:(PFQuery *)query; - -/*! - @abstract Adds a constraint that requires that a key's value `NOT` match a value in another key - in objects returned by a sub query. - - @param key The key that the value is stored. - @param otherKey The key in objects in the returned by the sub query whose value should match. - @param query The query to run. - */ -- (void)whereKey:(NSString *)key doesNotMatchKey:(NSString *)otherKey inQuery:(PFQuery *)query; - -/*! - @abstract Add a constraint that requires that a key's value matches a `PFQuery` constraint. - - @warning This only works where the key's values are s or arrays of s. - - @param key The key that the value is stored in - @param query The query the value should match - */ -- (void)whereKey:(NSString *)key matchesQuery:(PFQuery *)query; - -/*! - @abstract Add a constraint that requires that a key's value to not match a `PFQuery` constraint. - - @warning This only works where the key's values are s or arrays of s. - - @param key The key that the value is stored in - @param query The query the value should not match - */ -- (void)whereKey:(NSString *)key doesNotMatchQuery:(PFQuery *)query; - -///-------------------------------------- -/// @name Sorting -///-------------------------------------- - -/*! - @abstract Sort the results in *ascending* order with the given key. - - @param key The key to order by. - */ -- (void)orderByAscending:(NSString *)key; - -/*! - @abstract Additionally sort in *ascending* order by the given key. - - @discussion The previous keys provided will precedence over this key. - - @param key The key to order bye - */ -- (void)addAscendingOrder:(NSString *)key; - -/*! - @abstract Sort the results in *descending* order with the given key. - - @param key The key to order by. - */ -- (void)orderByDescending:(NSString *)key; - -/*! - @abstract Additionally sort in *descending* order by the given key. - - @discussion The previous keys provided will precedence over this key. - - @param key The key to order bye - */ -- (void)addDescendingOrder:(NSString *)key; - -/*! - @abstract Sort the results using a given sort descriptor. - - @param sortDescriptor The `NSSortDescriptor` to use to sort the results of the query. - */ -- (void)orderBySortDescriptor:(NSSortDescriptor *)sortDescriptor; - -/*! - @abstract Sort the results using a given array of sort descriptors. - - @param sortDescriptors An array of `NSSortDescriptor` objects to use to sort the results of the query. - */ -- (void)orderBySortDescriptors:(NSArray *)sortDescriptors; - -///-------------------------------------- -/// @name Getting Objects by ID -///-------------------------------------- - -/*! - @abstract Returns a with a given class and id. - - @param objectClass The class name for the object that is being requested. - @param objectId The id of the object that is being requested. - - @returns The if found. Returns `nil` if the object isn't found, or if there was an error. - */ -+ (PFObject *)getObjectOfClass:(NSString *)objectClass - objectId:(NSString *)objectId; - -/*! - @abstract Returns a with a given class and id and sets an error if necessary. - - @param objectClass The class name for the object that is being requested. - @param objectId The id of the object that is being requested. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns The if found. Returns `nil` if the object isn't found, or if there was an `error`. - */ -+ (PFObject *)getObjectOfClass:(NSString *)objectClass - objectId:(NSString *)objectId - error:(NSError **)error; - -/*! - @abstract Returns a with the given id. - - @warning This method mutates the query. - It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object that is being requested. - - @returns The if found. Returns nil if the object isn't found, or if there was an error. - */ -- (PFObject *)getObjectWithId:(NSString *)objectId; - -/*! - @abstract Returns a with the given id and sets an error if necessary. - - @warning This method mutates the query. - It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object that is being requested. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns The if found. Returns nil if the object isn't found, or if there was an error. - */ -- (PFObject *)getObjectWithId:(NSString *)objectId error:(NSError **)error; - -/*! - @abstract Gets a asynchronously and calls the given block with the result. - - @warning This method mutates the query. - It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object that is being requested. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)getObjectInBackgroundWithId:(NSString *)objectId; - -/*! - @asbtract Gets a asynchronously and calls the given block with the result. - - @warning This method mutates the query. - It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object that is being requested. - @param block The block to execute. - The block should have the following argument signature: `^(NSArray *object, NSError *error)` - */ -- (void)getObjectInBackgroundWithId:(NSString *)objectId - block:(PFObjectResultBlock)block; - -/*! - @abstract Gets a asynchronously. - - This mutates the PFQuery. It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object being requested. - @param target The target for the callback selector. - @param selector The selector for the callback. - It should have the following signature: `(void)callbackWithResult:(id)result error:(NSError *)error`. - Result will be `nil` if error is set and vice versa. - */ -- (void)getObjectInBackgroundWithId:(NSString *)objectId - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting User Objects -///-------------------------------------- - -/*! - @asbtract Returns a with a given id. - - @param objectId The id of the object that is being requested. - - @returns The PFUser if found. Returns nil if the object isn't found, or if there was an error. - */ -+ (PFUser *)getUserObjectWithId:(NSString *)objectId; - -/*! - Returns a PFUser with a given class and id and sets an error if necessary. - @param objectId The id of the object that is being requested. - @param error Pointer to an NSError that will be set if necessary. - @result The PFUser if found. Returns nil if the object isn't found, or if there was an error. - */ -+ (PFUser *)getUserObjectWithId:(NSString *)objectId - error:(NSError **)error; - -/*! - @deprecated Please use [PFUser query] instead. - */ -+ (PFQuery *)queryForUser PARSE_DEPRECATED("Use [PFUser query] instead."); - -///-------------------------------------- -/// @name Getting all Matches for a Query -///-------------------------------------- - -/*! - @asbtract Finds objects *synchronously* based on the constructed query. - - @returns Returns an array of objects that were found. - */ -- (NSArray *)findObjects; - -/*! - @abstract Finds objects *synchronously* based on the constructed query and sets an error if there was one. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns an array of objects that were found. - */ -- (NSArray *)findObjects:(NSError **)error; - -/*! - @asbtract Finds objects *asynchronously* and sets the `NSArray` of objects as a result of the task. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)findObjectsInBackground; - -/*! - @abstract Finds objects *asynchronously* and calls the given block with the results. - - @param block The block to execute. - It should have the following argument signature: `^(NSArray *objects, NSError *error)` - */ -- (void)findObjectsInBackgroundWithBlock:(PFArrayResultBlock)block; - -/*! - @abstract Finds objects *asynchronously* and calls the given callback with the results. - - @param target The object to call the selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(id)result error:(NSError *)error`. - Result will be `nil` if error is set and vice versa. - */ -- (void)findObjectsInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting the First Match in a Query -///-------------------------------------- - -/*! - @abstract Gets an object *synchronously* based on the constructed query. - - @warning This method mutates the query. It will reset the limit to `1`. - - @returns Returns a , or `nil` if none was found. - */ -- (PFObject *)getFirstObject; - -/*! - @abstract Gets an object *synchronously* based on the constructed query and sets an error if any occurred. - - @warning This method mutates the query. It will reset the limit to `1`. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns a , or `nil` if none was found. - */ -- (PFObject *)getFirstObject:(NSError **)error; - -/*! - @abstract Gets an object *asynchronously* and sets it as a result of the task. - - @warning This method mutates the query. It will reset the limit to `1`. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)getFirstObjectInBackground; - -/*! - @abstract Gets an object *asynchronously* and calls the given block with the result. - - @warning This method mutates the query. It will reset the limit to `1`. - - @param block The block to execute. - It should have the following argument signature: `^(PFObject *object, NSError *error)`. - `result` will be `nil` if `error` is set OR no object was found matching the query. - `error` will be `nil` if `result` is set OR if the query succeeded, but found no results. - */ -- (void)getFirstObjectInBackgroundWithBlock:(PFObjectResultBlock)block; - -/*! - @abstract Gets an object *asynchronously* and calls the given callback with the results. - - @warning This method mutates the query. It will reset the limit to `1`. - - @param target The object to call the selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(PFObject *)result error:(NSError *)error`. - `result` will be `nil` if `error` is set OR no object was found matching the query. - `error` will be `nil` if `result` is set OR if the query succeeded, but found no results. - */ -- (void)getFirstObjectInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Counting the Matches in a Query -///-------------------------------------- - -/*! - @abstract Counts objects *synchronously* based on the constructed query. - - @returns Returns the number of objects that match the query, or `-1` if there is an error. - */ -- (NSInteger)countObjects; - -/*! - @abstract Counts objects *synchronously* based on the constructed query and sets an error if there was one. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns the number of objects that match the query, or `-1` if there is an error. - */ -- (NSInteger)countObjects:(NSError **)error; - -/*! - @abstract Counts objects *asynchronously* and sets `NSNumber` with count as a result of the task. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)countObjectsInBackground; - -/*! - @abstract Counts objects *asynchronously* and calls the given block with the counts. - - @param block The block to execute. - It should have the following argument signature: `^(int count, NSError *error)` - */ -- (void)countObjectsInBackgroundWithBlock:(PFIntegerResultBlock)block; - -/*! - @abstract Counts objects *asynchronously* and calls the given callback with the count. - - @param target The object to call the selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -- (void)countObjectsInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Cancelling a Query -///-------------------------------------- - -/*! - @asbtract Cancels the current network request (if any). Ensures that callbacks won't be called. - */ -- (void)cancel; - -///-------------------------------------- -/// @name Paginating Results -///-------------------------------------- - -/*! - @abstract A limit on the number of objects to return. The default limit is `100`, with a - maximum of 1000 results being returned at a time. - - @warning If you are calling `findObjects` with `limit = 1`, you may find it easier to use `getFirst` instead. - */ -@property (nonatomic, assign) NSInteger limit; - -/*! - @abstract The number of objects to skip before returning any. - */ -@property (nonatomic, assign) NSInteger skip; - -///-------------------------------------- -/// @name Controlling Caching Behavior -///-------------------------------------- - -/*! - @abstract The cache policy to use for requests. - - Not allowed when Pinning is enabled. - - @see fromLocalDatastore: - @see fromPin: - @see fromPinWithName: - */ -@property (assign, readwrite) PFCachePolicy cachePolicy; - -/* ! - @asbtract The age after which a cached value will be ignored - */ -@property (assign, readwrite) NSTimeInterval maxCacheAge; - -/*! - @abstract Returns whether there is a cached result for this query. - - @result `YES` if there is a cached result for this query, otherwise `NO`. - */ -- (BOOL)hasCachedResult; - -/*! - @abstract Clears the cached result for this query. If there is no cached result, this is a noop. - */ -- (void)clearCachedResult; - -/*! - @abstract Clears the cached results for all queries. - */ -+ (void)clearAllCachedResults; - -///-------------------------------------- -/// @name Query Source -///-------------------------------------- - -/*! - @abstract Change the source of this query to all pinned objects. - - Requires Pinning to be enabled. - - @see cachePolicy - */ -- (PFQuery *)fromLocalDatastore; - -/*! - @abstract Change the source of this query to the default group of pinned objects. - - Requires Pinning to be enabled. - - @see PFObjectDefaultPin - @see cachePolicy - */ -- (PFQuery *)fromPin; - -/*! - @abstract Change the source of this query to a specific group of pinned objects. - - Requires Pinning to be enabled. - - @param name The pinned group. - - @see PFObjectDefaultPin - @see cachePolicy - */ -- (PFQuery *)fromPinWithName:(NSString *)name; - -///-------------------------------------- -/// @name Advanced Settings -///-------------------------------------- - -/*! - @abstract Whether or not performance tracing should be done on the query. - - @warning This should not be set to `YES` in most cases. - */ -@property (nonatomic, assign) BOOL trace; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFQueryTableViewController.h b/iOS/Parse.framework/Versions/A/Headers/PFQueryTableViewController.h deleted file mode 100644 index 27c6f2c..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFQueryTableViewController.h +++ /dev/null @@ -1,182 +0,0 @@ -// -// PFUITableViewController.h -// Parse -// -// Created by James Yu on 11/20/11. -// Copyright (c) 2011 Parse, LLC. All rights reserved. -// - -#import - -#import "PFQuery.h" -#import "PFTableViewCell.h" - -/*! - This class allows you to think about a one-to-one mapping between a PFObject and a UITableViewCell, - rather than having to juggle index paths. - - You also get the following features out of the box: - - - Pagination with a cell that can be tapped to load the next page. - - Pull-to-refresh table view header. - - Automatic downloading and displaying of remote images in cells. - - Loading screen, shown before any data is loaded. - - Automatic loading and management of the objects array. - - Various methods that can be overridden to customize behavior at major events in the data cycle. - */ -@interface PFQueryTableViewController : UITableViewController - -/*! @name Creating a PFQueryTableViewController */ - -/*! - The designated initializer. - Initializes with a class name of the PFObjects that will be associated with this table. - @param style The UITableViewStyle for the table - @param aClassName The class name of the PFObjects that this table will display - @result The initialized PFQueryTableViewController - */ -- (instancetype)initWithStyle:(UITableViewStyle)style className:(NSString *)aClassName; - -/*! - Initializes with a class name of the PFObjects that will be associated with this table. - @param aClassName The class name of the PFObjects that this table will display - @result The initialized PFQueryTableViewController - */ -- (instancetype)initWithClassName:(NSString *)aClassName; - -/*! @name Configuring Behavior */ - -/*! - The class of the PFObject this table will use as a datasource - */ -@property (nonatomic, strong) NSString *parseClassName; - -/*! - The key to use to display for the cell text label. - This won't apply if you override tableView:cellForRowAtIndexPath:object: - */ -@property (nonatomic, strong) NSString *textKey; - -/*! - The key to use to display for the cell image view. - This won't apply if you override tableView:cellForRowAtIndexPath:object: - */ -@property (nonatomic, strong) NSString *imageKey; - -/*! - The image to use as a placeholder for the cell images. - This won't apply if you override tableView:cellForRowAtIndexPath:object: - */ -@property (nonatomic, strong) UIImage *placeholderImage; - -/// Whether the table should use the default loading view (default:YES) -@property (nonatomic, assign) BOOL loadingViewEnabled; - -/// Whether the table should use the built-in pull-to-refresh feature (default: `YES`) -@property (nonatomic, assign) BOOL pullToRefreshEnabled; - -/*! - Whether the table should use the built-in pagination feature (default: `YES`) - */ -@property (nonatomic, assign) BOOL paginationEnabled; - -/*! - The number of objects to show per page (default: `25`) - */ -@property (nonatomic, assign) NSUInteger objectsPerPage; - -/*! - Whether the table is actively loading new data from the server - */ -@property (nonatomic, assign) BOOL isLoading; - -/*! @name Responding to Events */ - -/*! - Called when objects have loaded from Parse. If you override this method, you must - call [super objectsDidLoad:] in your implementation. - @param error The Parse error from running the PFQuery, if there was any. - */ -- (void)objectsDidLoad:(NSError *)error; - -/*! - Called when objects will loaded from Parse. If you override this method, you must - call [super objectsWillLoad] in your implementation. - */ -- (void)objectsWillLoad; - -/*! @name Accessing Results */ - -/// The array of PFObjects that is the UITableView data source -@property (nonatomic, strong, readonly) NSArray *objects; - -/*! - Returns an object at a particular indexPath. The default impementation returns - the object at indexPath.row. If you want to return objects in a different - indexPath order, like for sections, override this method. - @param indexPath The indexPath - @result The object at the specified index - */ -- (PFObject *)objectAtIndexPath:(NSIndexPath *)indexPath; - -/*! @name Querying */ - -/*! - Override to construct your own custom PFQuery to get the objects. - @result PFQuery that loadObjects will use to the objects for this table. - */ -- (PFQuery *)queryForTable; - -/*! - Clears the table of all objects. - */ -- (void)clear; - -/*! - Clears the table and loads the first page of objects. - */ -- (void)loadObjects; - -/*! - Loads the objects of the className at the specified page and appends it to the - objects already loaded and refreshes the table. - @param page The page of objects to load. - @param clear Whether to clear the table after receiving the objects. - */ -- (void)loadObjects:(NSInteger)page clear:(BOOL)clear; - -/*! - Loads the next page of objects, appends to table, and refreshes. - */ -- (void)loadNextPage; - -/*! @name Data Source Methods */ - -/*! - Override this method to customize each cell given a PFObject that is loaded. If you - don't override this method, it will use a default style cell and display either - the first data key from the object, or it will display the key as specified - with keyToDisplay. - - The cell should inherit from PFTableViewCell which is a subclass of UITableViewCell. - - @param tableView The table view object associated with this controller. - @param indexPath The indexPath of the cell. - @param object The PFObject that is associated with the cell. - @result The cell that represents this object. - */ -- (PFTableViewCell *)tableView:(UITableView *)tableView - cellForRowAtIndexPath:(NSIndexPath *)indexPath - object:(PFObject *)object; - -/*! - Override this method to customize the cell that allows the user to load the - next page when pagination is turned on. - @param tableView The table view object associated with this controller. - @param indexPath The indexPath of the cell. - @result The cell that allows the user to paginate. - */ -- (PFTableViewCell *)tableView:(UITableView *)tableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath; - - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFRelation.h b/iOS/Parse.framework/Versions/A/Headers/PFRelation.h deleted file mode 100644 index f4254a1..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFRelation.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// PFRelation.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#else -#import -#import -#endif - -/*! - The `PFRelation` class that is used to access all of the children of a many-to-many relationship. - Each instance of `PFRelation` is associated with a particular parent object and key. - */ -@interface PFRelation : NSObject - -/*! - @abstract The name of the class of the target child objects. - */ -@property (nonatomic, strong) NSString *targetClass; - -///-------------------------------------- -/// @name Accessing Objects -///-------------------------------------- - -/*! - @abstract Returns a object that can be used to get objects in this relation. - */ -- (PFQuery *)query; - -///-------------------------------------- -/// @name Modifying Relations -///-------------------------------------- - -/*! - @abstract Adds a relation to the passed in object. - - @param object A object to add relation to. - */ -- (void)addObject:(PFObject *)object; - -/*! - @abstract Removes a relation to the passed in object. - - @param object A object to add relation to. - */ -- (void)removeObject:(PFObject *)object; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFRole.h b/iOS/Parse.framework/Versions/A/Headers/PFRole.h deleted file mode 100644 index 3afa87c..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFRole.h +++ /dev/null @@ -1,106 +0,0 @@ -// -// PFRole.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#else -#import -#import -#endif - -/*! - The `PFRole` class represents a Role on the Parse server. - `PFRoles` represent groupings of objects for the purposes of granting permissions - (e.g. specifying a for a ). - Roles are specified by their sets of child users and child roles, - all of which are granted any permissions that the parent role has. - - Roles must have a name (which cannot be changed after creation of the role), and must specify an ACL. - */ -@interface PFRole : PFObject - -///-------------------------------------- -/// @name Creating a New Role -///-------------------------------------- - -/*! - @abstract Constructs a new `PFRole` with the given name. - If no default ACL has been specified, you must provide an ACL for the role. - - @param name The name of the Role to create. - */ -- (instancetype)initWithName:(NSString *)name; - -/*! - @abstract Constructs a new `PFRole` with the given name. - - @param name The name of the Role to create. - @param acl The ACL for this role. Roles must have an ACL. - */ -- (instancetype)initWithName:(NSString *)name acl:(PFACL *)acl; - -/*! - @abstract Constructs a new `PFRole` with the given name. - - @discussion If no default ACL has been specified, you must provide an ACL for the role. - - @param name The name of the Role to create. - */ -+ (instancetype)roleWithName:(NSString *)name; - -/*! - @abstract Constructs a new `PFRole` with the given name. - - @param name The name of the Role to create. - @param acl The ACL for this role. Roles must have an ACL. - */ -+ (instancetype)roleWithName:(NSString *)name acl:(PFACL *)acl; - -///-------------------------------------- -/// @name Role-specific Properties -///-------------------------------------- - -/*! - @abstract Gets or sets the name for a role. - - @discussion This value must be set before the role has been saved to the server, - and cannot be set once the role has been saved. - - @warning A role's name can only contain alphanumeric characters, `_`, `-`, and spaces. - */ -@property (nonatomic, copy) NSString *name; - -/*! - @abstract Gets the for the objects that are direct children of this role. - - @discussion These users are granted any privileges that this role has been granted - (e.g. read or write access through ACLs). You can add or remove users from - the role through this relation. - */ -@property (nonatomic, strong, readonly) PFRelation *users; - -/*! - @abstract Gets the for the `PFRole` objects that are direct children of this role. - - @discussion These roles' users are granted any privileges that this role has been granted - (e.g. read or write access through ACLs). You can add or remove child roles - from this role through this relation. - */ -@property (nonatomic, strong, readonly) PFRelation *roles; - -///-------------------------------------- -/// @name Querying for Roles -///-------------------------------------- - -/*! - @abstract Creates a for `PFRole` objects. - */ -+ (PFQuery *)query; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFSignUpView.h b/iOS/Parse.framework/Versions/A/Headers/PFSignUpView.h deleted file mode 100644 index 52f07c6..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFSignUpView.h +++ /dev/null @@ -1,88 +0,0 @@ -// -// PFLogInView.h -// Parse -// -// Created by Qian Wang on 3/9/12. -// Copyright (c) 2012. All rights reserved. -// - -#import - -/*! - A bitmask specifying the sign up elements which are enabled in the view. - @see PFSignUpViewController - @see PFSignUpView - */ -typedef NS_OPTIONS(NSInteger, PFSignUpFields) { - /*! Username and password fields. */ - PFSignUpFieldsUsernameAndPassword = 0, - /*! Email field. */ - PFSignUpFieldsEmail = 1 << 0, - /*! This field can be used for something else. */ - PFSignUpFieldsAdditional = 1 << 1, - /*! Sign Up Button */ - PFSignUpFieldsSignUpButton = 1 << 2, - /*! Dismiss Button */ - PFSignUpFieldsDismissButton = 1 << 3, - /*! Default value. Combines Username, Password, Email, Sign Up and Dismiss Buttons. */ - PFSignUpFieldsDefault = (PFSignUpFieldsUsernameAndPassword | - PFSignUpFieldsEmail | - PFSignUpFieldsSignUpButton | - PFSignUpFieldsDismissButton) -}; - -/*! - The class provides a standard sign up interface for authenticating a PFUser. - */ -@interface PFSignUpView : UIScrollView - -/*! @name Creating Sign Up View */ - -/*! - Initializes the view with the specified sign up elements. - @param fields A bitmask specifying the sign up elements which are enabled in the view - @see PFSignUpFields - */ -- (instancetype)initWithFields:(PFSignUpFields)fields; - -/*! - The view controller that will present this view. - Used to lay out elements correctly when the presenting view controller has translucent elements. - */ -@property (nonatomic, strong) UIViewController *presentingViewController; - -/*! @name Customizing the Logo */ - -/// The logo. By default, it is the Parse logo. -@property (nonatomic, strong) UIView *logo; - -/*! @name Prompt for email as username. */ - -/// By default, this is set to NO. -@property (nonatomic, assign) BOOL emailAsUsername; - -/*! @name Accessing Sign Up Elements */ - -/// The bitmask which specifies the enabled sign up elements in the view -@property (nonatomic, assign, readonly) PFSignUpFields fields; - -/// The username text field. -@property (nonatomic, strong, readonly) UITextField *usernameField; - -/// The password text field. -@property (nonatomic, strong, readonly) UITextField *passwordField; - -/// The email text field. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UITextField *emailField; - -/// The additional text field. It is nil if the element is not enabled. -/// This field is intended to be customized. -@property (nonatomic, strong, readonly) UITextField *additionalField; - -/// The sign up button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *signUpButton; - -/// The dismiss button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *dismissButton; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFSignUpViewController.h b/iOS/Parse.framework/Versions/A/Headers/PFSignUpViewController.h deleted file mode 100644 index 21c298f..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFSignUpViewController.h +++ /dev/null @@ -1,117 +0,0 @@ -// -// PFLogInViewController.h -// Parse -// -// Created by Andrew Wang on 3/8/12. -// Copyright (c) 2012. All rights reserved. -// - -#import -#import "PFSignUpView.h" -#import "PFUser.h" - -@protocol PFSignUpViewControllerDelegate; - -/*! - The class that presents and manages a standard authentication interface for signing up a PFUser. - */ -@interface PFSignUpViewController : UIViewController - -/*! @name Configuring Sign Up Elements */ - -/*! - A bitmask specifying the sign up elements which are enabled in the view. - - enum { - PFSignUpFieldsUsernameAndPassword = 0, - PFSignUpFieldsEmail = 1 << 0, - PFSignUpFieldsAdditional = 1 << 1, // this field can be used for something else - PFSignUpFieldsSignUpButton = 1 << 2, - PFSignUpFieldsDismissButton = 1 << 3, - PFSignUpFieldsDefault = PFSignUpFieldsUsernameAndPassword | PFSignUpFieldsEmail | PFSignUpFieldsSignUpButton | PFSignUpFieldsDismissButton - }; - */ -@property (nonatomic, assign) PFSignUpFields fields; - -/// The sign up view. It contains all the enabled log in elements. -@property (nonatomic, strong, readonly) PFSignUpView *signUpView; - -/*! @name Configuring Sign Up Behaviors */ - -/*! - The delegate that responds to the control events of PFSignUpViewController. - */ -@property (nonatomic, weak) id delegate; - -/*! - Minimum required password length for user signups, defaults to 0. - */ -@property (nonatomic, assign) NSUInteger minPasswordLength; - -/*! - Whether to use the email as username on the attached signUpView. - If set to YES, we'll hide the email field, prompt for the email in - the username field, and save the email into both username and email - fields on the new PFUser object. By default, this is set to NO. - */ -@property (nonatomic, assign) BOOL emailAsUsername; - -@end - -/*! @name Notifications */ - -/*! - The notification is posted immediately after the sign up succeeds. - */ -extern NSString *const PFSignUpSuccessNotification; - -/*! - The notification is posted immediately after the sign up fails. - If the delegate prevents the sign up to start, the notification is not sent. - */ -extern NSString *const PFSignUpFailureNotification; - -/*! - The notification is posted immediately after the user cancels sign up. - */ -extern NSString *const PFSignUpCancelNotification; - -/*! - The protocol defines methods a delegate of a PFSignUpViewController should implement. - All methods of the protocol are optional. - */ -@protocol PFSignUpViewControllerDelegate - -@optional - -/*! @name Customizing Behavior */ - -/*! - Sent to the delegate to determine whether the sign up request should be submitted to the server. - @param signUpController The signup view controller that is requesting the data. - @param info a dictionary which contains all sign up information that the user entered. - @result a boolean indicating whether the sign up should proceed. - */ -- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary *)info; - -/*! - Sent to the delegate when a PFUser is signed up. - @param signUpController The signup view controller where signup finished. - @param user PFUser object that is a result of the sign up. - */ -- (void)signUpViewController:(PFSignUpViewController *)signUpController didSignUpUser:(PFUser *)user; - -/*! - Sent to the delegate when the sign up attempt fails. - @param signUpController The signup view controller where signup failed. - @param error NSError object representing the error that occured. - */ -- (void)signUpViewController:(PFSignUpViewController *)signUpController didFailToSignUpWithError:(NSError *)error; - -/*! - Sent to the delegate when the sign up screen is cancelled. - @param signUpController The signup view controller where signup was cancelled. - */ -- (void)signUpViewControllerDidCancelSignUp:(PFSignUpViewController *)signUpController; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFSubclassing.h b/iOS/Parse.framework/Versions/A/Headers/PFSubclassing.h deleted file mode 100644 index adcebbd..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFSubclassing.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// PFSubclassing.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -@class PFQuery; - -/*! - If a subclass of conforms to `PFSubclassing` and calls , - Parse framework will be able to use that class as the native class for a Parse cloud object. - - Classes conforming to this protocol should subclass and - include `PFObject+Subclass.h` in their implementation file. - This ensures the methods in the Subclass category of are exposed in its subclasses only. - */ -@protocol PFSubclassing - -/*! - @abstract Constructs an object of the most specific class known to implement . - - @discussion This method takes care to help subclasses be subclassed themselves. - For example, `[PFUser object]` returns a by default but will return an - object of a registered subclass instead if one is known. - A default implementation is provided by which should always be sufficient. - - @returns Returns the object that is instantiated. - */ -+ (instancetype)object; - -/*! - @abstract Creates a reference to an existing PFObject for use in creating associations between PFObjects. - - @discussion Calling <[PFObject isDataAvailable]> on this object will return `NO` - until <[PFObject fetchIfNeeded]> has been called. No network request will be made. - A default implementation is provided by PFObject which should always be sufficient. - - @param objectId The object id for the referenced object. - - @returns A new without data. - */ -+ (instancetype)objectWithoutDataWithObjectId:(NSString *)objectId; - -/*! - @abstract The name of the class as seen in the REST API. - */ -+ (NSString *)parseClassName; - -/*! - @abstract Create a query which returns objects of this type. - - @discussion A default implementation is provided by which should always be sufficient. - */ -+ (PFQuery *)query; - -/*! - @abstract Returns a query for objects of this type with a given predicate. - - @discussion A default implementation is provided by which should always be sufficient. - - @param predicate The predicate to create conditions from. - - @return An instance of . - - @see [PFQuery queryWithClassName:predicate:] - */ -+ (PFQuery *)queryWithPredicate:(NSPredicate *)predicate; - -/*! - @abstract Lets Parse know this class should be used to instantiate all objects with class type . - - @warning This method must be called before <[Parse setApplicationId:clientKey:]> - */ -+ (void)registerSubclass; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFTableViewCell.h b/iOS/Parse.framework/Versions/A/Headers/PFTableViewCell.h deleted file mode 100644 index d457c7f..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFTableViewCell.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// PFImageViewCell.h -// Parse -// -// Created by Qian Wang on 5/16/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import -#import "PFImageView.h" - -/*! - The PFTableViewCell is a table view cell which can download and display remote images stored on Parse. - - When used in a PFQueryTableViewController - downloading and displaying of the remote images - are automatically managed by the PFQueryTableViewController. - */ -@interface PFTableViewCell : UITableViewCell - -/*! - The imageView of the table view cell. - PFImageView supports remote image downloading. - */ -@property (nonatomic, strong, readonly) PFImageView *imageView; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFTwitterUtils.h b/iOS/Parse.framework/Versions/A/Headers/PFTwitterUtils.h deleted file mode 100644 index f0c844e..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFTwitterUtils.h +++ /dev/null @@ -1,319 +0,0 @@ -// -// PFTwitterUtils.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import -#import -#import - -@class BFTask; - -/*! - The `PFTwitterUtils` class provides utility functions for working with Twitter in a Parse application. - - This class is currently for iOS only. - */ -@interface PFTwitterUtils : NSObject - -///-------------------------------------- -/// @name Interacting With Twitter -///-------------------------------------- - -/*! - @abstract Gets the instance of the object that Parse uses. - - @returns An instance of object. - */ -+ (PF_Twitter *)twitter; - -/*! - @abstract Initializes the Twitter singleton. - - @warning You must invoke this in order to use the Twitter functionality in Parse. - - @param consumerKey Your Twitter application's consumer key. - @param consumerSecret Your Twitter application's consumer secret. - */ -+ (void)initializeWithConsumerKey:(NSString *)consumerKey - consumerSecret:(NSString *)consumerSecret; - -/*! - @abstract Whether the user has their account linked to Twitter. - - @param user User to check for a Twitter link. The user must be logged in on this device. - - @returns `YES` if the user has their account linked to Twitter, otherwise `NO`. - */ -+ (BOOL)isLinkedWithUser:(PFUser *)user; - -///-------------------------------------- -/// @name Logging In & Creating Twitter-Linked Users -///-------------------------------------- - -/*! - @abstract *Asynchronously* logs in a user using Twitter. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInInBackground; - -/*! - @abstract *Asynchronously* logs in a user using Twitter. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) . - - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithBlock:(PFUserResultBlock)block; - -/*! - @abstract *Asynchronously* Logs in a user using Twitter. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @param target Target object for the selector - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError **)error`. - */ -+ (void)logInWithTarget:(id)target selector:(SEL)selector; - -/*! - @abstract *Asynchronously* logs in a user using Twitter. - - @discussion Allows you to handle user login to Twitter, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithTwitterIdInBackground:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret; - -/*! - @abstract Logs in a user using Twitter. - - @discussion Allows you to handle user login to Twitter, then provide authentication data - to log in (or create, in the case where it is a new user) the . - - @param twitterId The id of the Twitter user being linked - @param screenName The screen name of the Twitter user being linked - @param authToken The auth token for the user's session - @param authTokenSecret The auth token secret for the user's session - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithTwitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - block:(PFUserResultBlock)block; - -/*! - @abstract Logs in a user using Twitter. - - @discussion Allows you to handle user login to Twitter, then provide authentication data - to log in (or create, in the case where it is a new user) the . - - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithTwitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Linking Users with Twitter -///-------------------------------------- - -/*! - @abstract *Asynchronously* links Twitter to an existing PFUser. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - - @deprecated Please use `[PFTwitterUtils linkUserInBackground:]` instead. - */ -+ (void)linkUser:(PFUser *)user PARSE_DEPRECATED("Please use +linkUserInBackground: instead."); - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user; - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - @param block The block to execute. - It should have the following argument signature: `^(BOOL *success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - @param target Target object for the selector - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user - target:(id)target - selector:(SEL)selector; - -/*! - @abstract *Asynchronously* links Twitter to an existing PFUser asynchronously. - - @discussion Allows you to handle user login to Twitter, - then provide authentication data to link the account to the . - - @param user User to link to Twitter. - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user - twitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret; - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussionAllows you to handle user login to Twitter, - then provide authentication data to link the account to the . - - @param user User to link to Twitter. - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @param block The block to execute. - It should have the following argument signature: `^(BOOL *success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user - twitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - block:(PFBooleanResultBlock)block; - -/*! - @abstract Links Twitter to an existing . - - @discussion This method allows you to handle user login to Twitter, - then provide authentication data to link the account to the . - - @param user User to link to Twitter. - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user - twitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Unlinking Users from Twitter -///-------------------------------------- - -/*! - @abstract *Synchronously* unlinks the from a Twitter account. - - @param user User to unlink from Twitter. - - @returns Returns true if the unlink was successful. - */ -+ (BOOL)unlinkUser:(PFUser *)user; - -/*! - @abstract *Synchronously* unlinks the PFUser from a Twitter account. - - @param user User to unlink from Twitter. - @param error Error object to set on error. - - @returns Returns `YES` if the unlink was successful, otherwise `NO`. - */ -+ (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; - -/*! - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. - - @param user User to unlink from Twitter. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)unlinkUserInBackground:(PFUser *)user; - -/*! - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. - - @param user User to unlink from Twitter. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unlinkUserInBackground:(PFUser *)user - block:(PFBooleanResultBlock)block; - -/*! - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. - - @param user User to unlink from Twitter - @param target Target object for the selector - @param selector The selector that will be called when the asynchrounous request is complete. - */ -+ (void)unlinkUserInBackground:(PFUser *)user - target:(id)target - selector:(SEL)selector; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PFUser.h b/iOS/Parse.framework/Versions/A/Headers/PFUser.h deleted file mode 100644 index 3cf9041..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PFUser.h +++ /dev/null @@ -1,416 +0,0 @@ -// -// PFUser.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#import -#else -#import -#import -#import -#endif - -@class PFQuery; - -/*! - The `PFUser` class is a local representation of a user persisted to the Parse Data. - This class is a subclass of a , and retains the same functionality of a , - but also extends it with various user specific methods, like authentication, signing up, and validation uniqueness. - - Many APIs responsible for linking a `PFUser` with Facebook or Twitter have been deprecated in favor of dedicated - utilities for each social network. See , and for more information. - */ - -@interface PFUser : PFObject - -/*! - @abstract The name of the `PFUser` class in the REST API. - - @discussion This is a required method. - */ -+ (NSString *)parseClassName; - -///-------------------------------------- -/// @name Accessing the Current User -///-------------------------------------- - -/*! - @abstract Gets the currently logged in user from disk and returns an instance of it. - - @returns Returns a `PFUser` that is the currently logged in user. If there is none, returns `nil`. - */ -+ (instancetype)currentUser; - -/*! - @abstract The session token for the `PFUser`. - - @discussion This is set by the server upon successful authentication. - */ -@property (nonatomic, strong) NSString *sessionToken; - -/*! - @abstract Whether the `PFUser` was just created from a request. - - @discussion This is only set after a Facebook or Twitter login. - */ -@property (assign, readonly) BOOL isNew; - -/*! - @abstract Whether the user is an authenticated object for the device. - - @discussion An authenticated `PFUser` is one that is obtained via a or method. - An authenticated object is required in order to save (with altered values) or delete it. - - @returns Returns whether the user is authenticated. - */ -- (BOOL)isAuthenticated; - -///-------------------------------------- -/// @name Creating a New User -///-------------------------------------- - -/*! - @abstract Creates a new `PFUser` object. - - @returns Returns a new `PFUser` object. - */ -+ (PFUser *)user; - -/*! - @abstract Enables automatic creation of anonymous users. - - @discussion After calling this method, will always have a value. - The user will only be created on the server once the user has been saved, - or once an object with a relation to that user or an ACL that refers to the user has been saved. - - @warning <[PFObject saveEventually]> will not work on if an item being saved has a relation - to an automatic user that has never been saved. - */ -+ (void)enableAutomaticUser; - -/*! - @abstract The username for the `PFUser`. - */ -@property (nonatomic, strong) NSString *username; - -/**! - @abstract The password for the `PFUser`. - - @discussion This will not be filled in from the server with the password. - It is only meant to be set. - */ -@property (nonatomic, strong) NSString *password; - -/*! - @abstract The email for the `PFUser`. - */ -@property (nonatomic, strong) NSString *email; - -/*! - @abstract Signs up the user *synchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @returns Returns `YES` if the sign up was successful, otherwise `NO`. - */ -- (BOOL)signUp; - -/*! - @abstract Signs up the user *synchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @param error Error object to set on error. - - @returns Returns whether the sign up was successful. - */ -- (BOOL)signUp:(NSError **)error; - -/*! - @abstract Signs up the user *asynchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)signUpInBackground; - -/*! - @abstract Signs up the user *asynchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)signUpInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract Signs up the user *asynchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @param target Target object for the selector. - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)signUpInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Logging In -///-------------------------------------- - -/*! - @abstract Makes a *synchronous* request to login a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - - @returns Returns an instance of the `PFUser` on success. - If login failed for either wrong password or wrong username, returns `nil`. - */ -+ (instancetype)logInWithUsername:(NSString *)username - password:(NSString *)password; - -/*! - @abstract Makes a *synchronous* request to login a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - @param error The error object to set on error. - - @returns Returns an instance of the `PFUser` on success. - If login failed for either wrong password or wrong username, returns `nil`. - */ -+ (instancetype)logInWithUsername:(NSString *)username - password:(NSString *)password - error:(NSError **)error; - -/*! - @abstract Makes an *asynchronous* request to login a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithUsernameInBackground:(NSString *)username - password:(NSString *)password; - -/*! - @abstract Makes an *asynchronous* request to login a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithUsernameInBackground:(NSString *)username - password:(NSString *)password - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Makes an *asynchronous* request to log in a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithUsernameInBackground:(NSString *)username - password:(NSString *)password - block:(PFUserResultBlock)block; - -///-------------------------------------- -/// @name Becoming a User -///-------------------------------------- - -/*! - @abstract Makes a *synchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - - @returns Returns an instance of the `PFUser` on success. - If becoming a user fails due to incorrect token, it returns `nil`. - */ -+ (instancetype)become:(NSString *)sessionToken; - -/*! - @abstract Makes a *synchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This will also cache the user locally so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - @param error The error object to set on error. - - @returns Returns an instance of the `PFUser` on success. - If becoming a user fails due to incorrect token, it returns `nil`. - */ -+ (instancetype)become:(NSString *)sessionToken - error:(NSError **)error; - -/*! - @abstract Makes an *asynchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)becomeInBackground:(NSString *)sessionToken; - -/*! - @abstract Makes an *asynchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. This also caches the user locally - so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)becomeInBackground:(NSString *)sessionToken - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Makes an *asynchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. This also caches the user locally - so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - @param block The block to execute. The block should have the following argument signature: (PFUser *user, NSError *error) - */ -+ (void)becomeInBackground:(NSString *)sessionToken - block:(PFUserResultBlock)block; - -///-------------------------------------- -/// @name Logging Out -///-------------------------------------- - -/*! - @abstract *Synchronously* logs out the currently logged in user on disk. - */ -+ (void)logOut; - -///-------------------------------------- -/// @name Requesting a Password Reset -///-------------------------------------- - -/*! - @abstract *Synchronously* Send a password reset request for a specified email. - - @discussion If a user account exists with that email, an email will be sent to that address - with instructions on how to reset their password. - - @param email Email of the account to send a reset password request. - - @returns Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address. - */ -+ (BOOL)requestPasswordResetForEmail:(NSString *)email; - -/*! - @abstract *Synchronously* send a password reset request for a specified email and sets an error object. - - @discussion If a user account exists with that email, an email will be sent to that address - with instructions on how to reset their password. - - @param email Email of the account to send a reset password request. - @param error Error object to set on error. - @returns Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address. - */ -+ (BOOL)requestPasswordResetForEmail:(NSString *)email - error:(NSError **)error; - -/*! - @abstract Send a password reset request asynchronously for a specified email and sets an - error object. If a user account exists with that email, an email will be sent to - that address with instructions on how to reset their password. - @param email Email of the account to send a reset password request. - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)requestPasswordResetForEmailInBackground:(NSString *)email; - -/*! - @abstract Send a password reset request *asynchronously* for a specified email and sets an error object. - - @discussion If a user account exists with that email, an email will be sent to that address - with instructions on how to reset their password. - - @param email Email of the account to send a reset password request. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)requestPasswordResetForEmailInBackground:(NSString *)email - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Send a password reset request *asynchronously* for a specified email. - - @discussion If a user account exists with that email, an email will be sent to that address - with instructions on how to reset their password. - - @param email Email of the account to send a reset password request. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)requestPasswordResetForEmailInBackground:(NSString *)email - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Querying for Users -///-------------------------------------- - -/*! - @abstract Creates a for `PFUser` objects. - */ -+ (PFQuery *)query; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/PF_MBProgressHUD.h b/iOS/Parse.framework/Versions/A/Headers/PF_MBProgressHUD.h deleted file mode 100755 index 42080df..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PF_MBProgressHUD.h +++ /dev/null @@ -1,348 +0,0 @@ -// -// MBProgressHUD.h -// Version 0.4 -// Created by Matej Bukovinski on 2.4.09. -// - -// This code is distributed under the terms and conditions of the MIT license. - -// Copyright (c) 2011 Matej Bukovinski -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -#import "PFConstants.h" - -@protocol PF_MBProgressHUDDelegate; - -///////////////////////////////////////////////////////////////////////////////////////////// - -typedef enum { - /** Progress is shown using an UIActivityIndicatorView. This is the default. */ - PF_MBProgressHUDModeIndeterminate, - /** Progress is shown using a MBRoundProgressView. */ - PF_MBProgressHUDModeDeterminate, - /** Shows a custom view */ - PF_MBProgressHUDModeCustomView -} PF_MBProgressHUDMode; - -typedef enum { - /** Opacity animation */ - PF_MBProgressHUDAnimationFade, - /** Opacity + scale animation */ - PF_MBProgressHUDAnimationZoom -} PF_MBProgressHUDAnimation; - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. - * - * This is a simple drop-in class for displaying a progress HUD view similar to Apples private UIProgressHUD class. - * The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all - * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is - * drawn centered as a rounded semi-transparent view witch resizes depending on the user specified content. - * - * This view supports three modes of operation: - * - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView - * - MBProgressHUDModeDeterminate - shows a custom round progress indicator (MBRoundProgressView) - * - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (@see customView) - * - * All three modes can have optional labels assigned: - * - If the labelText property is set and non-empty then a label containing the provided content is placed below the - * indicator view. - * - If also the detailsLabelText property is set then another label is placed below the first label. - */ -@interface PF_MBProgressHUD : UIView { - PF_MBProgressHUDMode mode; - -#if __has_feature(objc_arc) - id __weak delegate; -#else - id delegate; -#endif - - SEL methodForExecution; - id targetForExecution; - id objectForExecution; - BOOL useAnimation; - - UILabel *label; - UILabel *detailsLabel; - - float progress; - - NSString *labelText; - NSString *detailsLabelText; - - BOOL isFinished; - - CGAffineTransform rotationTransform; -} - -/** - * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. - * - * @param view The view that the HUD will be added to - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return A reference to the created HUD. - * - * @see hideHUDForView:animated: - */ -+ (PF_MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; - -/** - * Finds a HUD sibview and hides it. The counterpart to this method is showHUDAddedTo:animated:. - * - * @param view The view that is going to be searched for a HUD subview. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return YES if a HUD was found and removed, NO otherwise. - * - * @see hideHUDForView:animated: - */ -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; - -/** - * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with - * window.bounds as the parameter. - * - * @param window The window instance that will provide the bounds for the HUD. Should probably be the same instance as - * the HUD's superview (i.e., the window that the HUD will be added to). - */ -- (id)initWithWindow:(UIWindow *)window; - -/** - * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with - * view.bounds as the parameter - * - * @param view The view instance that will provide the bounds for the HUD. Should probably be the same instance as - * the HUD's superview (i.e., the view that the HUD will be added to). - */ -- (id)initWithView:(UIView *)view; - -/** - * The UIView (i.g., a UIIMageView) to be shown when the HUD is in MBProgressHUDModeCustomView. - * For best results use a 37 by 37 pixel view (so the bounds match the build in indicator bounds). - */ -@property (strong) UIView *customView; - -/** - * MBProgressHUD operation mode. Switches between indeterminate (MBProgressHUDModeIndeterminate) and determinate - * progress (MBProgressHUDModeDeterminate). The default is MBProgressHUDModeIndeterminate. - * - * @see MBProgressHUDMode - */ -@property (assign) PF_MBProgressHUDMode mode; - -/** - * The animation type that should be used when the HUD is shown and hidden. - * - * @see MBProgressHUDAnimation - */ -@property (assign) PF_MBProgressHUDAnimation animationType; - -/** - * The HUD delegate object. If set the delegate will receive hudWasHidden callbacks when the HUD was hidden. The - * delegate should conform to the MBProgressHUDDelegate protocol and implement the hudWasHidden method. The delegate - * object will not be retained. - */ -@property (weak) id delegate; - -/** - * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit - * the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or - * set to @"", then no message is displayed. - */ -@property (copy) NSString *labelText; - -/** - * An optional details message displayed below the labelText message. This message is displayed only if the labelText - * property is also set and is different from an empty string (@""). - */ -@property (copy) NSString *detailsLabelText; - -/** - * The opacity of the HUD window. Defaults to 0.9 (90% opacity). - */ -@property (assign) float opacity; - -/** - * The x-axis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float xOffset; - -/** - * The y-ayis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float yOffset; - -/** - * The amounth of space between the HUD edge and the HUD elements (labels, indicators or custom views). - * - * Defaults to 20.0 - */ -@property (assign) float margin; - -/** - * Cover the HUD background view with a radial gradient. - */ -@property (assign) BOOL dimBackground; - -/* - * Grace period is the time (in seconds) that the invoked method may be run without - * showing the HUD. If the task finishes befor the grace time runs out, the HUD will - * not be shown at all. - * This may be used to prevent HUD display for very short tasks. - * Defaults to 0 (no grace time). - * Grace time functionality is only supported when the task status is known! - * @see taskInProgress - */ -@property (assign) float graceTime; - - -/** - * The minimum time (in seconds) that the HUD is shown. - * This avoids the problem of the HUD being shown and than instantly hidden. - * Defaults to 0 (no minimum show time). - */ -@property (assign) float minShowTime; - -/** - * Indicates that the executed operation is in progress. Needed for correct graceTime operation. - * If you don't set a graceTime (different than 0.0) this does nothing. - * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:. - * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly), - * you need to set this property when your task starts and completes in order to have normal graceTime - * functunality. - */ -@property (assign) BOOL taskInProgress; - -/** - * Removes the HUD from it's parent view when hidden. - * Defaults to NO. - */ -@property (assign) BOOL removeFromSuperViewOnHide; - -/** - * Font to be used for the main label. Set this property if the default is not adequate. - */ -@property (strong) UIFont* labelFont; - -/** - * Font to be used for the details label. Set this property if the default is not adequate. - */ -@property (strong) UIFont* detailsLabelFont; - -/** - * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. - */ -@property (assign) float progress; - - -/** - * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so - * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread - * (e.g., when using something like NSOperation or calling an asynchronous call like NSUrlRequest). - * - * If you need to perform a blocking thask on the main thread, you can try spining the run loop imeidiately after calling this - * method by using: - * - * [[NSRunLoop currentRunLoop] runUntilDate:[NSDate distantPast]]; - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - */ -- (void)show:(BOOL)animated; - -/** - * Hide the HUD. This still calls the hudWasHidden delegate. This is the counterpart of the hide: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - */ -- (void)hide:(BOOL)animated; - -/** - * Hide the HUD after a delay. This still calls the hudWasHidden delegate. This is the counterpart of the hide: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @param delay Delay in secons until the HUD is hidden. - */ -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay; - -/** - * Shows the HUD while a background task is executing in a new thread, then hides the HUD. - * - * This method also takes care of NSAutoreleasePools so your method does not have to be concerned with setting up a - * pool. - * - * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread. - * @param target The object that the target method belongs to. - * @param object An optional object to be passed to the method. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - */ -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated; - -@end - -///////////////////////////////////////////////////////////////////////////////////////////// - -@protocol PF_MBProgressHUDDelegate - -@optional - -/** - * Called after the HUD was fully hidden from the screen. - */ -- (void)hudWasHidden:(PF_MBProgressHUD *)hud; - -/** - * @deprecated use hudWasHidden: instead - * @see hudWasHidden: - */ -- (void)hudWasHidden PARSE_DEPRECATED("Use -hudWasHidden: instead."); - -@end - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** - * A progress view for showing definite progress by filling up a circle (pie chart). - */ -@interface PF_MBRoundProgressView : UIView { -@private - float _progress; -} - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -@end - -///////////////////////////////////////////////////////////////////////////////////////////// - diff --git a/iOS/Parse.framework/Versions/A/Headers/PF_Twitter.h b/iOS/Parse.framework/Versions/A/Headers/PF_Twitter.h deleted file mode 100644 index e2a27fb..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/PF_Twitter.h +++ /dev/null @@ -1,85 +0,0 @@ -// -// PF_Twitter.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -@class BFTask; - -/*! - The `PF_Twitter` class is a simple interface for interacting with the Twitter REST API, - automating sign-in and OAuth signing of requests against the API. - */ -@interface PF_Twitter : NSObject { -@private - NSString *consumerKey; - NSString *consumerSecret; - NSString *authToken; - NSString *authTokenSecret; - NSString *userId; - NSString *screenName; -} - -/*! - @abstract Consumer key of the application that is used to authorize with Twitter. - */ -@property (nonatomic, copy) NSString *consumerKey; - -/*! - @abstract Consumer secret of the application that is used to authorize with Twitter. - */ -@property (nonatomic, copy) NSString *consumerSecret; - -/*! - @abstract Auth token for the current user. - */ -@property (nonatomic, copy) NSString *authToken; - -/*! - @abstract Auth token secret for the current user. - */ -@property (nonatomic, copy) NSString *authTokenSecret; - -/*! - @abstract Twitter user id of the currently signed in user. - */ -@property (nonatomic, copy) NSString *userId; - -/*! - @abstract Twitter screen name of the currently signed in user. - */ -@property (nonatomic, copy) NSString *screenName; - -/*! - @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties - if the Twitter user grants permission to the application. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)authorizeInBackground; - -/*! - @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties - if the Twitter user grants permission to the application. - - @param success Invoked upon successful authorization. - @param failure Invoked upon an error occurring in the authorization process. - @param cancel Invoked when the user cancels authorization. - */ -- (void)authorizeWithSuccess:(void (^)(void))success - failure:(void (^)(NSError *error))failure - cancel:(void (^)(void))cancel; - -/*! - @abstract Adds a 3-legged OAuth signature to an `NSMutableURLRequest` based - upon the properties set for the Twitter object. - - @discussion Use this function to sign requests being made to the Twitter API. - - @param request Request to sign. - */ -- (void)signRequest:(NSMutableURLRequest *)request; - -@end diff --git a/iOS/Parse.framework/Versions/A/Headers/Parse.h b/iOS/Parse.framework/Versions/A/Headers/Parse.h deleted file mode 100644 index 36910d3..0000000 --- a/iOS/Parse.framework/Versions/A/Headers/Parse.h +++ /dev/null @@ -1,114 +0,0 @@ -// -// Parse.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -#else - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -#endif - -/*! - The `Parse` class contains static functions that handle global configuration for the Parse framework. - */ -@interface Parse : NSObject - -///-------------------------------------- -/// @name Connecting to Parse -///-------------------------------------- - -/*! - @abstract Sets the applicationId and clientKey of your application. - - @param applicationId The application id of your Parse application. - @param clientKey The client key of your Parse application. - */ -+ (void)setApplicationId:(NSString *)applicationId clientKey:(NSString *)clientKey; - -/*! - @abstract The current application id that was used to configure Parse framework. - */ -+ (NSString *)getApplicationId; - -/*! - @abstract The current client key that was used to configure Parse framework. - */ -+ (NSString *)getClientKey; - -///-------------------------------------- -/// @name Enabling Local Datastore -///-------------------------------------- - -/*! - @abstract 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; - -#if PARSE_IOS_ONLY - -///-------------------------------------- -/// @name Configuring UI Settings -///-------------------------------------- - -/*! - @abstract Set whether to show offline messages when using a Parse view or view controller related classes. - - @param enabled Whether a `UIAlertView` should be shown when the device is offline - and network access is required from a view or view controller. - */ -+ (void)offlineMessagesEnabled:(BOOL)enabled; - -/*! - @abstract 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. - - @param enabled Whether a `UIAlertView` should be shown when an error occurs. - */ -+ (void)errorMessagesEnabled:(BOOL)enabled; - -#endif - -@end diff --git a/iOS/Parse.framework/Versions/A/Parse b/iOS/Parse.framework/Versions/A/Parse deleted file mode 100644 index f8df528..0000000 Binary files a/iOS/Parse.framework/Versions/A/Parse and /dev/null differ diff --git a/iOS/Parse.framework/Versions/A/Resources/Info.plist b/iOS/Parse.framework/Versions/A/Resources/Info.plist deleted file mode 100644 index 5d39d5f..0000000 --- a/iOS/Parse.framework/Versions/A/Resources/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Parse - CFBundleIdentifier - com.parse.Parse - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.4.0 - CFBundleSignature - ???? - CFBundleVersion - 1.4.0 - - diff --git a/iOS/Parse.framework/Versions/A/Resources/Localizable.strings b/iOS/Parse.framework/Versions/A/Resources/Localizable.strings deleted file mode 100644 index 5248130..0000000 Binary files a/iOS/Parse.framework/Versions/A/Resources/Localizable.strings and /dev/null differ diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFACL.h b/iOS/Parse.framework/Versions/Current/Headers/PFACL.h deleted file mode 100644 index aa05ebb..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFACL.h +++ /dev/null @@ -1,255 +0,0 @@ -// -// PFACL.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -@class PFRole; -@class PFUser; - -/*! - The `PFACL` class is used to control which users can access or modify a particular object. - Each can have its own `PFACL`. You can grant read and write permissions separately to specific users, - to groups of users that belong to roles, or you can grant permissions to "the public" so that, - for example, any user could read a particular object but only a particular set of users could write to that object. - */ -@interface PFACL : NSObject - -///-------------------------------------- -/// @name Creating an ACL -///-------------------------------------- - -/*! - @abstract Creates an ACL with no permissions granted. - - @returns Returns a new `PFACL`. - */ -+ (PFACL *)ACL; - -/*! - @abstract Creates an ACL where only the provided user has access. - - @param user The user to assign access. - */ -+ (PFACL *)ACLWithUser:(PFUser *)user; - -///-------------------------------------- -/// @name Controlling Public Access -///-------------------------------------- - -/*! - @abstract Set whether the public is allowed to read this object. - - @param allowed Whether the public can read this object. - */ -- (void)setPublicReadAccess:(BOOL)allowed; - -/*! - @abstract Gets whether the public is allowed to read this object. - - @returns `YES` if the public read access is enabled, otherwise `NO`. - */ -- (BOOL)getPublicReadAccess; - -/*! - @abstract Set whether the public is allowed to write this object. - - @param allowed Whether the public can write this object. - */ -- (void)setPublicWriteAccess:(BOOL)allowed; - -/*! - @abstract Gets whether the public is allowed to write this object. - - @returns `YES` if the public write access is enabled, otherwise `NO`. - */ -- (BOOL)getPublicWriteAccess; - -///-------------------------------------- -/// @name Controlling Access Per-User -///-------------------------------------- - -/*! - @abstract Set whether the given user id is allowed to read this object. - - @param allowed Whether the given user can write this object. - @param userId The <[PFObject objectId]> of the user to assign access. - */ -- (void)setReadAccess:(BOOL)allowed forUserId:(NSString *)userId; - -/*! - @abstract Gets whether the given user id is *explicitly* allowed to read this object. - Even if this returns `NO`, the user may still be able to access it if returns `YES` - or if the user belongs to a role that has access. - - @param userId The <[PFObject objectId]> of the user for which to retrive access. - - @returns `YES` if the user with this `objectId` has *explicit* read access, otherwise `NO`. - */ -- (BOOL)getReadAccessForUserId:(NSString *)userId; - -/*! - @abstract Set whether the given user id is allowed to write this object. - - @param allowed Whether the given user can read this object. - @param userId The `objectId` of the user to assign access. - */ -- (void)setWriteAccess:(BOOL)allowed forUserId:(NSString *)userId; - -/*! - @abstract Gets whether the given user id is *explicitly* allowed to write this object. - Even if this returns NO, the user may still be able to write it if returns `YES` - or if the user belongs to a role that has access. - - @param userId The <[PFObject objectId]> of the user for which to retrive access. - - @returns `YES` if the user with this `objectId` has *explicit* write access, otherwise `NO`. - */ -- (BOOL)getWriteAccessForUserId:(NSString *)userId; - -/*! - @abstract Set whether the given user is allowed to read this object. - - @param allowed Whether the given user can read this object. - @param user The user to assign access. - */ -- (void)setReadAccess:(BOOL)allowed forUser:(PFUser *)user; - -/*! - @abstract Gets whether the given user is *explicitly* allowed to read this object. - Even if this returns `NO`, the user may still be able to access it if returns `YES` - or if the user belongs to a role that has access. - - @param user The user for which to retrive access. - - @returns `YES` if the user has *explicit* read access, otherwise `NO`. - */ -- (BOOL)getReadAccessForUser:(PFUser *)user; - -/*! - @abstract Set whether the given user is allowed to write this object. - - @param allowed Whether the given user can write this object. - @param user The user to assign access. - */ -- (void)setWriteAccess:(BOOL)allowed forUser:(PFUser *)user; - -/*! - @abstract Gets whether the given user is *explicitly* allowed to write this object. - Even if this returns `NO`, the user may still be able to write it if returns `YES` - or if the user belongs to a role that has access. - - @param user The user for which to retrive access. - - @returns `YES` if the user has *explicit* write access, otherwise `NO`. - */ -- (BOOL)getWriteAccessForUser:(PFUser *)user; - -///-------------------------------------- -/// @name Controlling Access Per-Role -///-------------------------------------- - -/*! - @abstract Get whether users belonging to the role with the given name are allowed to read this object. - Even if this returns `NO`, the role may still be able to read it if a parent role has read access. - - @param name The name of the role. - - @returns `YES` if the role has read access, otherwise `NO`. - */ -- (BOOL)getReadAccessForRoleWithName:(NSString *)name; - -/*! - @abstract Set whether users belonging to the role with the given name are allowed to read this object. - - @param allowed Whether the given role can read this object. - @param name The name of the role. - */ -- (void)setReadAccess:(BOOL)allowed forRoleWithName:(NSString *)name; - -/*! - @abstract Get whether users belonging to the role with the given name are allowed to write this object. - Even if this returns `NO`, the role may still be able to write it if a parent role has write access. - - @param name The name of the role. - - @returns `YES` if the role has read access, otherwise `NO`. - */ -- (BOOL)getWriteAccessForRoleWithName:(NSString *)name; - -/*! - @abstract Set whether users belonging to the role with the given name are allowed to write this object. - - @param allowed Whether the given role can write this object. - @param name The name of the role. - */ -- (void)setWriteAccess:(BOOL)allowed forRoleWithName:(NSString *)name; - -/*! - @abstract Get whether users belonging to the given role are allowed to read this object. - Even if this returns `NO`, the role may still be able to read it if a parent role has read access. - - @discussion The role must already be saved on the server and - it's data must have been fetched in order to use this method. - - @param role The name of the role. - - @returns `YES` if the role has read access, otherwise `NO`. - */ -- (BOOL)getReadAccessForRole:(PFRole *)role; - -/*! - @abstract Set whether users belonging to the given role are allowed to read this object. - - @discussion The role must already be saved on the server and - it's data must have been fetched in order to use this method. - - @param allowed Whether the given role can read this object. - @param role The role to assign access. - */ -- (void)setReadAccess:(BOOL)allowed forRole:(PFRole *)role; - -/*! - @abstract Get whether users belonging to the given role are allowed to write this object. - Even if this returns `NO`, the role may still be able to write it if a parent role has write access. - - @discussion The role must already be saved on the server and - it's data must have been fetched in order to use this method. - - @param role The name of the role. - - @returns `YES` if the role has write access, otherwise `NO`. - */ -- (BOOL)getWriteAccessForRole:(PFRole *)role; - -/*! - @abstract Set whether users belonging to the given role are allowed to write this object. - - @discussion The role must already be saved on the server and - it's data must have been fetched in order to use this method. - - @param allowed Whether the given role can write this object. - @param role The role to assign access. - */ -- (void)setWriteAccess:(BOOL)allowed forRole:(PFRole *)role; - -///-------------------------------------- -/// @name Setting Access Defaults -///-------------------------------------- - -/*! - @abstract Sets a default ACL that will be applied to all instances of when they are created. - - @param acl The ACL to use as a template for all instance of created after this method has been called. - This value will be copied and used as a template for the creation of new ACLs, so changes to the - instance after this method has been called will not be reflected in new instance of . - @param currentUserAccess - If `YES`, the `PFACL` that is applied to newly-created instance of will - provide read and write access to the <[PFUser currentUser]> at the time of creation. - - If `NO`, the provided `acl` will be used without modification. - - If `acl` is `nil`, this value is ignored. - */ -+ (void)setDefaultACL:(PFACL *)acl withAccessForCurrentUser:(BOOL)currentUserAccess; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFAnalytics.h b/iOS/Parse.framework/Versions/Current/Headers/PFAnalytics.h deleted file mode 100644 index 3068a62..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFAnalytics.h +++ /dev/null @@ -1,160 +0,0 @@ -// -// PFAnalytics.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -@class BFTask; - -/*! - `PFAnalytics` provides an interface to Parse's logging and analytics backend. - - Methods will return immediately and cache the request (+ timestamp) to be - handled "eventually." That is, the request will be sent immediately if possible - or the next time a network connection is available. - */ -@interface PFAnalytics : NSObject - -///-------------------------------------- -/// @name App-Open / Push Analytics -///-------------------------------------- - -/*! - @abstract Tracks this application being launched. If this happened as the result of the - user opening a push notification, this method sends along information to - correlate this open with that push. - - @discussion Pass in `nil` to track a standard "application opened" event. - - @param launchOptions The `NSDictionary` indicating the reason the application was - launched, if any. This value can be found as a parameter to various - `UIApplicationDelegate` methods, and can be empty or `nil`. - - @returns Returns the task encapsulating the work being done. - */ -+ (BFTask *)trackAppOpenedWithLaunchOptions:(NSDictionary *)launchOptions; - -/*! - @abstract Tracks this application being launched. - If this happened as the result of the user opening a push notification, - this method sends along information to correlate this open with that push. - - @discussion Pass in `nil` to track a standard "application opened" event. - - @param launchOptions The dictionary indicating the reason the application was - launched, if any. This value can be found as a parameter to various - `UIApplicationDelegate` methods, and can be empty or `nil`. - @param block The block to execute on server response. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)trackAppOpenedWithLaunchOptionsInBackground:(NSDictionary *)launchOptions block:(PFBooleanResultBlock)block; - -/*! - @abstract Tracks this application being launched. If this happened as the result of the - user opening a push notification, this method sends along information to - correlate this open with that push. - - @param userInfo The Remote Notification payload, if any. This value can be - found either under `UIApplicationLaunchOptionsRemoteNotificationKey` on `launchOptions`, - or as a parameter to `application:didReceiveRemoteNotification:`. - This can be empty or `nil`. - - @returns Returns the task encapsulating the work being done. - */ -+ (BFTask *)trackAppOpenedWithRemoteNotificationPayload:(NSDictionary *)userInfo; - -/*! - @abstract Tracks this application being launched. If this happened as the result of the - user opening a push notification, this method sends along information to - correlate this open with that push. - - @param userInfo The Remote Notification payload, if any. This value can be - found either under `UIApplicationLaunchOptionsRemoteNotificationKey` on `launchOptions`, - or as a parameter to `application:didReceiveRemoteNotification:`. This can be empty or `nil`. - @param block The block to execute on server response. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)trackAppOpenedWithRemoteNotificationPayloadInBackground:(NSDictionary *)userInfo - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Custom Analytics -///-------------------------------------- - -/*! - @abstract Tracks the occurrence of a custom event. - - @discussion Parse will store a data point at the time of invocation with the given event name. - - @param name The name of the custom event to report to Parse as having happened. - - @returns Returns the task encapsulating the work being done. - */ -+ (BFTask *)trackEvent:(NSString *)name; - -/*! - @abstract Tracks the occurrence of a custom event. Parse will store a data point at the - time of invocation with the given event name. The event will be sent at some - unspecified time in the future, even if Parse is currently inaccessible. - - @param name The name of the custom event to report to Parse as having happened. - @param block The block to execute on server response. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)trackEventInBackground:(NSString *)name block:(PFBooleanResultBlock)block; - -/*! - @abstract Tracks the occurrence of a custom event with additional dimensions. Parse will - store a data point at the time of invocation with the given event name. - - @discussion Dimensions will allow segmentation of the occurrences of this custom event. - Keys and values should be NSStrings, and will throw otherwise. - - To track a user signup along with additional metadata, consider the following: - - NSDictionary *dimensions = @{ @"gender": @"m", - @"source": @"web", - @"dayType": @"weekend" }; - [PFAnalytics trackEvent:@"signup" dimensions:dimensions]; - - @warning There is a default limit of 8 dimensions per event tracked. - - @param name The name of the custom event to report to Parse as having happened. - @param dimensions The `NSDictionary` of information by which to segment this event. - - @returns Returns the task encapsulating the work being done. - */ -+ (BFTask *)trackEvent:(NSString *)name dimensions:(NSDictionary *)dimensions; - -/*! - @abstract Tracks the occurrence of a custom event with additional dimensions. Parse will - store a data point at the time of invocation with the given event name. The - event will be sent at some unspecified time in the future, even if Parse is currently inaccessible. - - @discussionDimensions will allow segmentation of the occurrences of this custom event. - Keys and values should be NSStrings, and will throw otherwise. - - To track a user signup along with additional metadata, consider the following: - NSDictionary *dimensions = @{ @"gender": @"m", - @"source": @"web", - @"dayType": @"weekend" }; - [PFAnalytics trackEvent:@"signup" dimensions:dimensions]; - - There is a default limit of 8 dimensions per event tracked. - - @param name The name of the custom event to report to Parse as having happened. - @param dimensions The `NSDictionary` of information by which to segment this event. - @param block The block to execute on server response. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)trackEventInBackground:(NSString *)name dimensions:(NSDictionary *)dimensions block:(PFBooleanResultBlock)block; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFAnonymousUtils.h b/iOS/Parse.framework/Versions/Current/Headers/PFAnonymousUtils.h deleted file mode 100644 index 9322281..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFAnonymousUtils.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// PFAnonymousUtils.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#else -#import -#import -#endif - -/*! - Provides utility functions for working with Anonymously logged-in users. - Anonymous users have some unique characteristics: - - - Anonymous users don't need a user name or password. - - Once logged out, an anonymous user cannot be recovered. - - When the current user is anonymous, the following methods can be used to switch - to a different user or convert the anonymous user into a regular one: - - signUp converts an anonymous user to a standard user with the given username and password. - Data associated with the anonymous user is retained. - - logIn switches users without converting the anonymous user. - Data associated with the anonymous user will be lost. - - Service logIn (e.g. Facebook, Twitter) will attempt to convert - the anonymous user into a standard user by linking it to the service. - If a user already exists that is linked to the service, it will instead switch to the existing user. - - Service linking (e.g. Facebook, Twitter) will convert the anonymous user - into a standard user by linking it to the service. - */ -@interface PFAnonymousUtils : NSObject - -///-------------------------------------- -/// @name Creating an Anonymous User -///-------------------------------------- - -/*! - @abstract Creates an anonymous user asynchronously and sets as a result to `BFTask`. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInInBackground; - -/*! - @abstract Creates an anonymous user. - - @param block The block to execute when anonymous user creation is complete. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithBlock:(PFUserResultBlock)block; - -/*! - @abstract Creates an anonymous user. - - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Determining Whether a User is Anonymous -///-------------------------------------- - -/*! - @abstract Whether the object is logged in anonymously. - - @param user object to check for anonymity. The user must be logged in on this device. - - @returns `YES` if the user is anonymous. `NO` if the user is not the current user or is not anonymous. - */ -+ (BOOL)isLinkedWithUser:(PFUser *)user; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFCloud.h b/iOS/Parse.framework/Versions/Current/Headers/PFCloud.h deleted file mode 100644 index fab56ac..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFCloud.h +++ /dev/null @@ -1,84 +0,0 @@ -// -// PFCloud.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -@class BFTask; - -/*! - The `PFCloud` class provides methods for interacting with Parse Cloud Functions. - */ -@interface PFCloud : NSObject - -/*! - @abstract Calls the given cloud function *synchronously* with the parameters provided. - - @param function The function name to call. - @param parameters The parameters to send to the function. - - @returns The response from the cloud function. - */ -+ (id)callFunction:(NSString *)function withParameters:(NSDictionary *)parameters; - -/*! - @abstract Calls the given cloud function *synchronously* with the parameters provided and - sets the error if there is one. - - @param function The function name to call. - @param parameters The parameters to send to the function. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns The response from the cloud function. - This result could be a `NSDictionary`, an `NSArray`, `NSNumber` or `NSString`. - */ -+ (id)callFunction:(NSString *)function withParameters:(NSDictionary *)parameters error:(NSError **)error; - -/*! - @abstract Calls the given cloud function *asynchronously* with the parameters provided. - - @param function The function name to call. - @param parameters The parameters to send to the function. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)callFunctionInBackground:(NSString *)function withParameters:(NSDictionary *)parameters; - -/*! - @abstract Calls the given cloud function *asynchronously* with the parameters provided - and executes the given block when it is done. - - @param function The function name to call. - @param parameters The parameters to send to the function. - @param block The block to execute when the function call finished. - It should have the following argument signature: `^(id result, NSError *error)`. - */ -+ (void)callFunctionInBackground:(NSString *)function - withParameters:(NSDictionary *)parameters - block:(PFIdResultBlock)block; - -/*! - @abstract Calls the given cloud function *asynchronously* with the parameters provided - and then executes the given selector when it is done. - - @param function The function name to call. - @param parameters The parameters to send to the function. - @param target The object to call the selector on. - @param selector The selector to call when the function call finished. - It should have the following signature: `(void)callbackWithResult:(id)result error:(NSError *)error`. - Result will be `nil` if error is set and vice versa. - */ -+ (void)callFunctionInBackground:(NSString *)function - withParameters:(NSDictionary *)parameters - target:(id)target - selector:(SEL)selector; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFConfig.h b/iOS/Parse.framework/Versions/Current/Headers/PFConfig.h deleted file mode 100644 index c7b89cf..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFConfig.h +++ /dev/null @@ -1,95 +0,0 @@ -// -// PFConfig.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -@class BFTask; -@class PFConfig; - -typedef void(^PFConfigResultBlock)(PFConfig *config, NSError *error); - -/*! - `PFConfig` is a representation of the remote configuration object. - It enables you to add things like feature gating, a/b testing or simple "Message of the day". -*/ -@interface PFConfig : NSObject - -///-------------------------------------- -/// @name Current Config -///-------------------------------------- - -/*! - @abstract Returns the most recently fetched config. - - @discussion If there was no config fetched - this method will return an empty instance of `PFConfig`. - - @returns Current, last fetched instance of PFConfig. - */ -+ (PFConfig *)currentConfig; - -///-------------------------------------- -/// @name Retrieving Config -///-------------------------------------- - -/*! - @abstract Gets the `PFConfig` object *synchronously* from the server. - - @returns Instance of `PFConfig` if the operation succeeded, otherwise `nil`. - */ -+ (PFConfig *)getConfig; - -/*! - @abstract Gets the `PFConfig` object *synchronously* from the server and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @return Instance of PFConfig if the operation succeeded, otherwise `nil`. - */ -+ (PFConfig *)getConfig:(NSError **)error; - -/*! - @abstract Gets the `PFConfig` *asynchronously* and sets it as a result of a task. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)getConfigInBackground; - -/*! - @abstract Gets the `PFConfig` *asynchronously* and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(PFConfig *config, NSError *error)`. - */ -+ (void)getConfigInBackgroundWithBlock:(PFConfigResultBlock)block; - -///-------------------------------------- -/// @name Parameters -///-------------------------------------- - -/*! - @abstract Returns the object associated with a given key. - - @param key The key for which to return the corresponding configuration value. - - @return The value associated with `key`, or `nil` if there is no such value. - */ -- (id)objectForKey:(NSString *)key; - -/*! - @abstract Returns the object associated with a given key. - - @discussion This method enables usage of literal syntax on `PFConfig`. - E.g. `NSString *value = config[@"key"];` - - @see objectForKey: - - @param keyedSubscript The keyed subscript for which to return the corresponding configuration value. - - @return The value associated with `key`, or `nil` if there is no such value. - */ -- (id)objectForKeyedSubscript:(NSString *)keyedSubscript; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFConstants.h b/iOS/Parse.framework/Versions/Current/Headers/PFConstants.h deleted file mode 100644 index 92472fc..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFConstants.h +++ /dev/null @@ -1,177 +0,0 @@ -// PFConstants.h -// Copyright 2011 Parse, Inc. All rights reserved. - -#import - -@class PFObject; -@class PFUser; - -// Version -#define PARSE_VERSION @"1.6.0" - -extern NSInteger const PARSE_API_VERSION; - -// Platform -#define PARSE_IOS_ONLY (TARGET_OS_IPHONE) -#define PARSE_OSX_ONLY (TARGET_OS_MAC && !(TARGET_OS_IPHONE)) - -extern NSString *const kPFDeviceType; - -#if PARSE_IOS_ONLY -#import -#else -#import -@compatibility_alias UIImage NSImage; -@compatibility_alias UIColor NSColor; -@compatibility_alias UIView NSView; -#endif - -// Server -extern NSString *const kPFParseServer; - -// Cache policies -typedef enum { - kPFCachePolicyIgnoreCache = 0, - kPFCachePolicyCacheOnly, - kPFCachePolicyNetworkOnly, - kPFCachePolicyCacheElseNetwork, - kPFCachePolicyNetworkElseCache, - kPFCachePolicyCacheThenNetwork -} PFCachePolicy; - -// Errors - -extern NSString *const PFParseErrorDomain; - -/*! @abstract 1: Internal server error. No information available. */ -extern NSInteger const kPFErrorInternalServer; - -/*! @abstract 100: The connection to the Parse servers failed. */ -extern NSInteger const kPFErrorConnectionFailed; -/*! @abstract 101: Object doesn't exist, or has an incorrect password. */ -extern NSInteger const kPFErrorObjectNotFound; -/*! @abstract 102: You tried to find values matching a datatype that doesn't support exact database matching, like an array or a dictionary. */ -extern NSInteger const kPFErrorInvalidQuery; -/*! @abstract 103: Missing or invalid classname. Classnames are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters. */ -extern NSInteger const kPFErrorInvalidClassName; -/*! @abstract 104: Missing object id. */ -extern NSInteger const kPFErrorMissingObjectId; -/*! @abstract 105: Invalid key name. Keys are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters. */ -extern NSInteger const kPFErrorInvalidKeyName; -/*! @abstract 106: Malformed pointer. Pointers must be arrays of a classname and an object id. */ -extern NSInteger const kPFErrorInvalidPointer; -/*! @abstract 107: Malformed json object. A json dictionary is expected. */ -extern NSInteger const kPFErrorInvalidJSON; -/*! @abstract 108: Tried to access a feature only available internally. */ -extern NSInteger const kPFErrorCommandUnavailable; -/*! @abstract 111: Field set to incorrect type. */ -extern NSInteger const kPFErrorIncorrectType; -/*! @abstract 112: Invalid channel name. A channel name is either an empty string (the broadcast channel) or contains only a-zA-Z0-9_ characters and starts with a letter. */ -extern NSInteger const kPFErrorInvalidChannelName; -/*! @abstract 114: Invalid device token. */ -extern NSInteger const kPFErrorInvalidDeviceToken; -/*! @abstract 115: Push is misconfigured. See details to find out how. */ -extern NSInteger const kPFErrorPushMisconfigured; -/*! @abstract 116: The object is too large. */ -extern NSInteger const kPFErrorObjectTooLarge; -/*! @abstract 119: That operation isn't allowed for clients. */ -extern NSInteger const kPFErrorOperationForbidden; -/*! @abstract 120: The results were not found in the cache. */ -extern NSInteger const kPFErrorCacheMiss; -/*! @abstract 121: Keys in NSDictionary values may not include '$' or '.'. */ -extern NSInteger const kPFErrorInvalidNestedKey; -/*! @abstract 122: Invalid file name. A file name contains only a-zA-Z0-9_. characters and is between 1 and 36 characters. */ -extern NSInteger const kPFErrorInvalidFileName; -/*! @abstract 123: Invalid ACL. An ACL with an invalid format was saved. This should not happen if you use PFACL. */ -extern NSInteger const kPFErrorInvalidACL; -/*! @abstract 124: The request timed out on the server. Typically this indicates the request is too expensive. */ -extern NSInteger const kPFErrorTimeout; -/*! @abstract 125: The email address was invalid. */ -extern NSInteger const kPFErrorInvalidEmailAddress; -/*! @abstract 137: A unique field was given a value that is already taken. */ -extern NSInteger const kPFErrorDuplicateValue; -/*! @abstract 139: Role's name is invalid. */ -extern NSInteger const kPFErrorInvalidRoleName; -/*! @abstract 140: Exceeded an application quota. Upgrade to resolve. */ -extern NSInteger const kPFErrorExceededQuota; -/*! @abstract 141: Cloud Code script had an error. */ -extern NSInteger const kPFScriptError; -/*! @abstract 142: Cloud Code validation failed. */ -extern NSInteger const kPFValidationError; -/*! @abstract 143: Product purchase receipt is missing */ -extern NSInteger const kPFErrorReceiptMissing; -/*! @abstract 144: Product purchase receipt is invalid */ -extern NSInteger const kPFErrorInvalidPurchaseReceipt; -/*! @abstract 145: Payment is disabled on this device */ -extern NSInteger const kPFErrorPaymentDisabled; -/*! @abstract 146: The product identifier is invalid */ -extern NSInteger const kPFErrorInvalidProductIdentifier; -/*! @abstract 147: The product is not found in the App Store */ -extern NSInteger const kPFErrorProductNotFoundInAppStore; -/*! @abstract 148: The Apple server response is not valid */ -extern NSInteger const kPFErrorInvalidServerResponse; -/*! @abstract 149: Product fails to download due to file system error */ -extern NSInteger const kPFErrorProductDownloadFileSystemFailure; -/*! @abstract 150: Fail to convert data to image. */ -extern NSInteger const kPFErrorInvalidImageData; -/*! @abstract 151: Unsaved file. */ -extern NSInteger const kPFErrorUnsavedFile; -/*! @abstract 153: Fail to delete file. */ -extern NSInteger const kPFErrorFileDeleteFailure; -/*! @abstract 160: Invalid event name. */ -extern NSInteger const kPFErrorInvalidEventName; -/*! @abstract 200: Username is missing or empty */ -extern NSInteger const kPFErrorUsernameMissing; -/*! @abstract 201: Password is missing or empty */ -extern NSInteger const kPFErrorUserPasswordMissing; -/*! @abstract 202: Username has already been taken */ -extern NSInteger const kPFErrorUsernameTaken; -/*! @abstract 203: Email has already been taken */ -extern NSInteger const kPFErrorUserEmailTaken; -/*! @abstract 204: The email is missing, and must be specified */ -extern NSInteger const kPFErrorUserEmailMissing; -/*! @abstract 205: A user with the specified email was not found */ -extern NSInteger const kPFErrorUserWithEmailNotFound; -/*! @abstract 206: The user cannot be altered by a client without the session. */ -extern NSInteger const kPFErrorUserCannotBeAlteredWithoutSession; -/*! @abstract 207: Users can only be created through sign up */ -extern NSInteger const kPFErrorUserCanOnlyBeCreatedThroughSignUp; -/*! @abstract 208: An existing Facebook account already linked to another user. */ -extern NSInteger const kPFErrorFacebookAccountAlreadyLinked; -/*! @abstract 208: An existing account already linked to another user. */ -extern NSInteger const kPFErrorAccountAlreadyLinked; -/*! @abstract 209: User ID mismatch */ -extern NSInteger const kPFErrorUserIdMismatch; -/*! @abstract 250: Facebook id missing from request */ -extern NSInteger const kPFErrorFacebookIdMissing; -/*! @abstract 250: Linked id missing from request */ -extern NSInteger const kPFErrorLinkedIdMissing; -/*! @abstract 251: Invalid Facebook session */ -extern NSInteger const kPFErrorFacebookInvalidSession; -/*! @abstract 251: Invalid linked session */ -extern NSInteger const kPFErrorInvalidLinkedSession; - -typedef void (^PFBooleanResultBlock)(BOOL succeeded, NSError *error); -typedef void (^PFIntegerResultBlock)(int number, NSError *error); -typedef void (^PFArrayResultBlock)(NSArray *objects, NSError *error); -typedef void (^PFObjectResultBlock)(PFObject *object, NSError *error); -typedef void (^PFSetResultBlock)(NSSet *channels, NSError *error); -typedef void (^PFUserResultBlock)(PFUser *user, NSError *error); -typedef void (^PFDataResultBlock)(NSData *data, NSError *error); -typedef void (^PFDataStreamResultBlock)(NSInputStream *stream, NSError *error); -typedef void (^PFStringResultBlock)(NSString *string, NSError *error); -typedef void (^PFIdResultBlock)(id object, NSError *error); -typedef void (^PFProgressBlock)(int percentDone); - -// Deprecated Macro -#ifndef PARSE_DEPRECATED -#ifdef __deprecated_msg -#define PARSE_DEPRECATED(_MSG) __deprecated_msg(_MSG) -#else -#ifdef __deprecated -#define PARSE_DEPRECATED(_MSG) __attribute__((deprecated)) -#else -#define PARSE_DEPRECATED(_MSG) -#endif -#endif -#endif diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFFile.h b/iOS/Parse.framework/Versions/Current/Headers/PFFile.h deleted file mode 100644 index 2e3b06d..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFFile.h +++ /dev/null @@ -1,286 +0,0 @@ -// -// PFFile.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -@class BFTask; - -/*! - `PFFile` representes a file of binary data stored on the Parse servers. - This can be a image, video, or anything else that an application needs to reference in a non-relational way. - */ -@interface PFFile : NSObject - -///-------------------------------------- -/// @name Creating a PFFile -///-------------------------------------- - -/*! - @abstract Creates a file with given data. A name will be assigned to it by the server. - - @param data The contents of the new `PFFile`. - - @returns A new `PFFile`. - */ -+ (instancetype)fileWithData:(NSData *)data; - -/*! - @abstract Creates a file with given data and name. - - @param name The name of the new PFFile. The file name must begin with and - alphanumeric character, and consist of alphanumeric characters, periods, - spaces, underscores, or dashes. - @param data The contents of the new `PFFile`. - - @returns A new `PFFile` object. - */ -+ (instancetype)fileWithName:(NSString *)name data:(NSData *)data; - -/*! - @abstract Creates a file with the contents of another file. - - @param name The name of the new `PFFile`. The file name must begin with and - alphanumeric character, and consist of alphanumeric characters, periods, - spaces, underscores, or dashes. - @param path The path to the file that will be uploaded to Parse. - */ -+ (instancetype)fileWithName:(NSString *)name - contentsAtPath:(NSString *)path; - -/*! - @abstract Creates a file with given data, name and content type. - - @param name The name of the new `PFFile`. The file name must begin with and - alphanumeric character, and consist of alphanumeric characters, periods, - spaces, underscores, or dashes. - @param data The contents of the new `PFFile`. - @param contentType Represents MIME type of the data. - - @returns A new `PFFile` object. - */ -+ (instancetype)fileWithName:(NSString *)name - data:(NSData *)data - contentType:(NSString *)contentType; - -/*! - @abstract Creates a file with given data and content type. - - @param data The contents of the new `PFFile`. - @param contentType Represents MIME type of the data. - - @returns A new `PFFile` object. - */ -+ (instancetype)fileWithData:(NSData *)data contentType:(NSString *)contentType; - -/*! - @abstract The name of the file. - - @discussion Before the file is saved, this is the filename given by - the user. After the file is saved, that name gets prefixed with a unique - identifier. - */ -@property (nonatomic, copy, readonly) NSString *name; - -/*! - @abstract The url of the file. - */ -@property (nonatomic, copy, readonly) NSString *url; - -///-------------------------------------- -/// @name Storing Data with Parse -///-------------------------------------- - -/*! - @abstract Whether the file has been uploaded for the first time. - */ -@property (nonatomic, assign, readonly) BOOL isDirty; - -/*! - @abstract Saves the file *synchronously*. - - @returns Returns whether the save succeeded. - */ -- (BOOL)save; - -/*! - @abstract Saves the file *synchronously* and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the save succeeded. - */ -- (BOOL)save:(NSError **)error; - -/*! - @abstract Saves the file *asynchronously*. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)saveInBackground; - -/*! - @abstract Saves the file *asynchronously* and executes the given block. - - @param block The block should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)saveInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract Saves the file *asynchronously* and executes the given block. - - @discussion This method will execute the progressBlock periodically with the percent progress. - `progressBlock` will get called with `100` before `resultBlock` is called. - - @param block The block should have the following argument signature: `^(BOOL succeeded, NSError *error)` - @param progressBlock The block should have the following argument signature: `^(int percentDone)` - */ -- (void)saveInBackgroundWithBlock:(PFBooleanResultBlock)block - progressBlock:(PFProgressBlock)progressBlock; - -/*! - @abstract Saves the file *asynchronously* and calls the given callback. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)saveInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting Data from Parse -///-------------------------------------- - -/*! - @abstract Whether the data is available in memory or needs to be downloaded. - */ -@property (assign, readonly) BOOL isDataAvailable; - -/*! - @abstract *Synchronously* gets the data from cache if available or fetches its contents from the network. - - @returns The `NSData` object containing file data. Returns `nil` if there was an error in fetching. - */ -- (NSData *)getData; - -/*! - @abstract This method is like but avoids ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @returns A stream containing the data. Returns `nil` if there was an error in fetching. - */ -- (NSInputStream *)getDataStream; - -/*! - @abstract *Synchronously* gets the data from cache if available or fetches its contents from the network. - Sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns The `NSData` object containing file data. Returns `nil` if there was an error in fetching. - */ -- (NSData *)getData:(NSError **)error; - -/*! - @abstract This method is like but avoids ever holding the entire `PFFile` contents in memory at once. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns A stream containing the data. Returns nil if there was an error in - fetching. - */ -- (NSInputStream *)getDataStream:(NSError **)error; - -/*! - @abstract This method is like but avoids ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @see getData - - @returns A stream containing the data. Returns `nil` if there was an error in fetching. - */ -- (BFTask *)getDataInBackground; - -/*! - @abstract This method is like but avoids - ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)getDataStreamInBackground; - -/*! - @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network. - - @param block The block should have the following argument signature: `^(NSData *result, NSError *error)` - */ -- (void)getDataInBackgroundWithBlock:(PFDataResultBlock)block; - -/*! - @abstract This method is like but avoids - ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @param block The block should have the following argument signature: `(NSInputStream *result, NSError *error)` - */ -- (void)getDataStreamInBackgroundWithBlock:(PFDataStreamResultBlock)block; - -/*! - @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network. - - @discussion This method will execute the progressBlock periodically with the percent progress. - `progressBlock` will get called with `100` before `resultBlock` is called. - - @param resultBlock The block should have the following argument signature: (NSData *result, NSError *error) - @param progressBlock The block should have the following argument signature: (int percentDone) - */ -- (void)getDataInBackgroundWithBlock:(PFDataResultBlock)resultBlock - progressBlock:(PFProgressBlock)progressBlock; - -/*! - @abstract This method is like but avoids - ever holding the entire `PFFile` contents in memory at once. - - @discussion This can help applications with many large files avoid memory warnings. - - @param resultBlock The block should have the following argument signature: `^(NSInputStream *result, NSError *error)`. - @param progressBlock The block should have the following argument signature: `^(int percentDone)`. - */ -- (void)getDataStreamInBackgroundWithBlock:(PFDataStreamResultBlock)resultBlock - progressBlock:(PFProgressBlock)progressBlock; - -/*! - @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSData *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - */ -- (void)getDataInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Interrupting a Transfer -///-------------------------------------- - -/*! - @abstract Cancels the current request (upload or download of file). - */ -- (void)cancel; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFGeoPoint.h b/iOS/Parse.framework/Versions/Current/Headers/PFGeoPoint.h deleted file mode 100644 index 0853aa5..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFGeoPoint.h +++ /dev/null @@ -1,101 +0,0 @@ -// -// PFGeoPoint.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import -#import - -/*! - `PFGeoPoint` may be used to embed a latitude / longitude point as the value for a key in a . - It could be used to perform queries in a geospatial manner using <[PFQuery whereKey:nearGeoPoint:]>. - - Currently, instances of may only have one key associated with a `PFGeoPoint` type. - */ -@interface PFGeoPoint : NSObject - -///-------------------------------------- -/// @name Creating a Geo Point -///-------------------------------------- - -/*! - @abstract Create a PFGeoPoint object. Latitude and longitude are set to `0.0`. - - @returns Returns a new `PFGeoPoint`. - */ -+ (PFGeoPoint *)geoPoint; - -/*! - @abstract Creates a new `PFGeoPoint` object for the given `CLLocation`, set to the location's coordinates. - - @param location Instace of `CLLocation`, with set latitude and longitude. - - @returns Returns a new PFGeoPoint at specified location. - */ -+ (PFGeoPoint *)geoPointWithLocation:(CLLocation *)location; - -/*! - @abstract Create a new `PFGeoPoint` object with the specified latitude and longitude. - - @param latitude Latitude of point in degrees. - @param longitude Longitude of point in degrees. - - @returns New point object with specified latitude and longitude. - */ -+ (PFGeoPoint *)geoPointWithLatitude:(double)latitude longitude:(double)longitude; - -/*! - @abstract Fetches the current device location and executes a block with a new `PFGeoPoint` object. - - @param geoPointHandler A block which takes the newly created `PFGeoPoint` as an argument. - It should have the following argument signature: `^(PFGeoPoint *geoPoint, NSError *error)` - */ -+ (void)geoPointForCurrentLocationInBackground:(void(^)(PFGeoPoint *geoPoint, NSError *error))geoPointHandler; - -///-------------------------------------- -/// @name Controlling Position -///-------------------------------------- - -/*! - @abstract Latitude of point in degrees. Valid range is from `-90.0` to `90.0`. - */ -@property (nonatomic, assign) double latitude; - -/*! - @abstract Longitude of point in degrees. Valid range is from `-180.0` to `180.0`. - */ -@property (nonatomic, assign) double longitude; - -///-------------------------------------- -/// @name Calculating Distance -///-------------------------------------- - -/*! - @abstract Get distance in radians from this point to specified point. - - @param point `PFGeoPoint` that represents the location of other point. - - @returns Distance in radians between the receiver and `point`. - */ -- (double)distanceInRadiansTo:(PFGeoPoint *)point; - -/*! - @abstract Get distance in miles from this point to specified point. - - @param point `PFGeoPoint` that represents the location of other point. - - @returns Distance in miles between the receiver and `point`. - */ -- (double)distanceInMilesTo:(PFGeoPoint *)point; - -/*! - @abstract Get distance in kilometers from this point to specified point. - - @param point `PFGeoPoint` that represents the location of other point. - - @returns Distance in kilometers between the receiver and `point`. - */ -- (double)distanceInKilometersTo:(PFGeoPoint *)point; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFImageView.h b/iOS/Parse.framework/Versions/Current/Headers/PFImageView.h deleted file mode 100644 index 4ae6440..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFImageView.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// PFImageView.h -// Parse -// -// Created by Qian Wang on 5/16/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import -#import "PFFile.h" - -/*! - An image view that downloads and displays remote image stored on Parse's server. - */ -@interface PFImageView : UIImageView - -/// The remote file on Parse's server that stores the image. -/// Note that the download does not start until loadInBackground: is called. -@property (nonatomic, strong) PFFile *file; - -/*! - Initiate downloading of the remote image. Once the download completes, the remote image will be displayed. - */ -- (void)loadInBackground; - -/*! - Initiate downloading of the remote image. Once the download completes, the remote image will be displayed. - @param completion the completion block. - */ -- (void)loadInBackground:(void (^)(UIImage *image, NSError *error))completion; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFInstallation.h b/iOS/Parse.framework/Versions/Current/Headers/PFInstallation.h deleted file mode 100644 index 98156c9..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFInstallation.h +++ /dev/null @@ -1,110 +0,0 @@ -// -// PFInstallation.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import -#import - -/*! - A Parse Framework Installation Object that is a local representation of an - installation persisted to the Parse cloud. This class is a subclass of a - , and retains the same functionality of a PFObject, but also extends - it with installation-specific fields and related immutability and validity - checks. - - A valid `PFInstallation` can only be instantiated via - <[PFInstallation currentInstallation]> because the required identifier fields - are readonly. The and fields are also readonly properties which - are automatically updated to match the device's time zone and application badge - when the `PFInstallation` is saved, thus these fields might not reflect the - latest device state if the installation has not recently been saved. - - `PFInstallation` objects which have a valid and are saved to - the Parse cloud can be used to target push notifications. - - This class is currently for iOS only. There is no `PFInstallation` for Parse - applications running on OS X, because they cannot receive push notifications. - */ - -@interface PFInstallation : PFObject - -/*! - @abstract The name of the Installation class in the REST API. - - @discussion This is a required PFSubclassing method. - */ -+ (NSString *)parseClassName; - -///-------------------------------------- -/// @name Targeting Installations -///-------------------------------------- - -/*! - @abstract Creates a for `PFInstallation` objects. - - @discussion The resulting query can only be used for targeting a . - Calling find methods on the resulting query will raise an exception. - */ -+ (PFQuery *)query; - -///-------------------------------------- -/// @name Accessing the Current Installation -///-------------------------------------- - -/*! - @abstract Gets the currently-running installation from disk and returns an instance of it. - - @discussion If this installation is not stored on disk, returns a `PFInstallation` - with and fields set to those of the - current installation. - - @result Returns a `PFInstallation` that represents the currently-running installation. - */ -+ (instancetype)currentInstallation; - -/*! - @abstract Sets the device token string property from an `NSData`-encoded token. - - @param deviceTokenData A token that identifies the device. - */ -- (void)setDeviceTokenFromData:(NSData *)deviceTokenData; - -///-------------------------------------- -/// @name Installation Properties -///-------------------------------------- - -/*! - @abstract The device type for the `PFInstallation`. - */ -@property (nonatomic, strong, readonly) NSString *deviceType; - -/*! - @abstract The installationId for the `PFInstallation`. - */ -@property (nonatomic, strong, readonly) NSString *installationId; - -/*! - @abstract The device token for the `PFInstallation`. - */ -@property (nonatomic, strong) NSString *deviceToken; - -/*! - @abstract The badge for the `PFInstallation`. - */ -@property (nonatomic, assign) NSInteger badge; - -/*! - @abstract The name of the time zone for the `PFInstallation`. - */ -@property (nonatomic, strong, readonly) NSString *timeZone; - -/*! - @abstract The channels for the `PFInstallation`. - */ -@property (nonatomic, strong) NSArray *channels; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFLogInView.h b/iOS/Parse.framework/Versions/Current/Headers/PFLogInView.h deleted file mode 100644 index 4f87021..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFLogInView.h +++ /dev/null @@ -1,105 +0,0 @@ -// -// PFLogInView.h -// Parse -// -// Created by Qian Wang on 3/9/12. -// Copyright (c) 2012. All rights reserved. -// - -#import - -/*! - A bitmask specifying the log in elements which are enabled in the view. - @sa PFLogInViewController - @sa PFLogInView - */ -typedef NS_OPTIONS(NSInteger, PFLogInFields) { - /*! No fields. */ - PFLogInFieldsNone = 0, - /*! Username and password fields. */ - PFLogInFieldsUsernameAndPassword = 1 << 0, - /*! Forgot password button. */ - PFLogInFieldsPasswordForgotten = 1 << 1, - /*! Login button. */ - PFLogInFieldsLogInButton = 1 << 2, - /*! Button to login with Facebook. */ - PFLogInFieldsFacebook = 1 << 3, - /*! Button to login with Twitter. */ - PFLogInFieldsTwitter = 1 << 4, - /*! Signup Button. */ - PFLogInFieldsSignUpButton = 1 << 5, - /*! Dismiss Button. */ - PFLogInFieldsDismissButton = 1 << 6, - - /*! Default value. Combines Username, Password, Login, Signup, Forgot Password and Dismiss buttons. */ - PFLogInFieldsDefault = (PFLogInFieldsUsernameAndPassword | - PFLogInFieldsLogInButton | - PFLogInFieldsSignUpButton | - PFLogInFieldsPasswordForgotten | - PFLogInFieldsDismissButton) -}; - -/*! - The class provides a standard log in interface for authenticating a PFUser. - */ -@interface PFLogInView : UIView - -/*! @name Creating Log In View */ -/*! - Initializes the view with the specified log in elements. - @param fields A bitmask specifying the log in elements which are enabled in the view - */ -- (instancetype)initWithFields:(PFLogInFields)fields; - -/*! - The view controller that will present this view. - Used to lay out elements correctly when the presenting view controller has translucent elements. - */ -@property (nonatomic, strong) UIViewController *presentingViewController; - -/*! @name Customizing the Logo */ - -/// The logo. By default, it is the Parse logo. -@property (nonatomic, strong) UIView *logo; - -/*! @name Prompt for email as username. */ - -/// By default, this is set to NO. -@property (nonatomic, assign) BOOL emailAsUsername; - -/*! @name Accessing Log In Elements */ - -/// The bitmask which specifies the enabled log in elements in the view -@property (nonatomic, readonly, assign) PFLogInFields fields; - -/// The username text field. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UITextField *usernameField; - -/// The password text field. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UITextField *passwordField; - -/// The password forgotten button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *passwordForgottenButton; - -/// The log in button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *logInButton; - -/// The Facebook button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *facebookButton; - -/// The Twitter button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *twitterButton; - -/// The sign up button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *signUpButton; - -/// The dismiss button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *dismissButton; - -/// The facebook/twitter login label. It is only shown if the external login is enabled. -@property (nonatomic, strong, readonly) UILabel *externalLogInLabel; - -/// The sign up label. It is only shown if sign up button is enabled. -@property (nonatomic, strong, readonly) UILabel *signUpLabel; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFLogInViewController.h b/iOS/Parse.framework/Versions/Current/Headers/PFLogInViewController.h deleted file mode 100644 index 2d0c4c2..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFLogInViewController.h +++ /dev/null @@ -1,127 +0,0 @@ -// -// PFLogInViewController.h -// Parse -// -// Created by Andrew Wang on 3/8/12. -// Copyright (c) 2012. All rights reserved. -// - -#import - -#import "PFLogInView.h" -#import "PFSignUpViewController.h" -#import "PFUser.h" - -@protocol PFLogInViewControllerDelegate; - -/*! - The class that presents and manages a standard authentication interface for logging in a PFUser. - */ -@interface PFLogInViewController : UIViewController - -/*! @name Configuring Log In Elements */ - -/*! - A bitmask specifying the log in elements which are enabled in the view. - - enum { - PFLogInFieldsNone = 0, - PFLogInFieldsUsernameAndPassword = 1 << 0, - PFLogInFieldsPasswordForgotten = 1 << 1, - PFLogInFieldsLogInButton = 1 << 2, - PFLogInFieldsFacebook = 1 << 3, - PFLogInFieldsTwitter = 1 << 4, - PFLogInFieldsSignUpButton = 1 << 5, - PFLogInFieldsDismissButton = 1 << 6, - PFLogInFieldsDefault = PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton | PFLogInFieldsSignUpButton | PFLogInFieldsPasswordForgotten | PFLogInFieldsDismissButton - }; - */ -@property (nonatomic, assign) PFLogInFields fields; - -/// The log in view. It contains all the enabled log in elements. -@property (nonatomic, strong, readonly) PFLogInView *logInView; - -/*! @name Configuring Log In Behaviors */ - -/// The delegate that responds to the control events of PFLogInViewController. -@property (nonatomic, weak) id delegate; - -/*! - The facebook permissions that Facebook log in requests for. - If unspecified, the default is basic facebook permissions. - */ -@property (nonatomic, strong) NSArray *facebookPermissions; - -/*! - The sign up controller if sign up is enabled. - Use this to configure the sign up view, and the transition animation to the sign up view. - The default is a sign up view with a username, a password, a dismiss button and a sign up button. - */ -@property (nonatomic, strong) PFSignUpViewController *signUpController; - -/*! - Whether to prompt for the email as username on the login view. - If set to YES, we'll prompt for the email in the username field. - This property value propagates to the attached signUpController. - By default, this is set to NO. - */ -@property (nonatomic, assign) BOOL emailAsUsername; - -@end - -/*! @name Notifications */ - -/// The notification is posted immediately after the log in succeeds. -extern NSString *const PFLogInSuccessNotification; - -/*! - The notification is posted immediately after the log in fails. - If the delegate prevents the log in from starting, the notification is not sent. - */ -extern NSString *const PFLogInFailureNotification; - -/// The notification is posted immediately after the log in is cancelled. -extern NSString *const PFLogInCancelNotification; - -/*! - The protocol defines methods a delegate of a PFLogInViewController should implement. - All methods of the protocol are optional. - */ -@protocol PFLogInViewControllerDelegate - -@optional - -/*! @name Customizing Behavior */ - -/*! - Sent to the delegate to determine whether the log in request should be submitted to the server. - @param logInController The login view controller that is requesting the data. - @param username the username the user tries to log in with. - @param password the password the user tries to log in with. - @result a boolean indicating whether the log in should proceed. - */ -- (BOOL)logInViewController:(PFLogInViewController *)logInController shouldBeginLogInWithUsername:(NSString *)username password:(NSString *)password; - -/*! @name Responding to Actions */ - -/*! - Sent to the delegate when a PFUser is logged in. - @param logInController The login view controller where login finished. - @param user PFUser object that is a result of the login. - */ -- (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user; - -/*! - Sent to the delegate when the log in attempt fails. - @param logInController The login view controller where login failed. - @param error NSError object representing the error that occured. - */ -- (void)logInViewController:(PFLogInViewController *)logInController didFailToLogInWithError:(NSError *)error; - -/*! - Sent to the delegate when the log in screen is cancelled. - @param logInController The login view controller where login was cancelled. - */ -- (void)logInViewControllerDidCancelLogIn:(PFLogInViewController *)logInController; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFNetworkActivityIndicatorManager.h b/iOS/Parse.framework/Versions/Current/Headers/PFNetworkActivityIndicatorManager.h deleted file mode 100644 index 5dbd807..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFNetworkActivityIndicatorManager.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// PFNetworkActivityIndicatorManager.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -/*! - `PFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. - When enabled, it will start managing the network activity indicator in the status bar, - according to the network operations that are performed by Parse SDK. - - The number of active requests is incremented or decremented like a stack or a semaphore, - the activity indicator will animate, as long as the number is greater than zero. - */ -@interface PFNetworkActivityIndicatorManager : NSObject - -/*! - A Boolean value indicating whether the manager is enabled. - If `YES` - the manager will start managing the status bar network activity indicator, - according to the network operations that are performed by Parse SDK. - The default value is `YES`. - */ -@property (nonatomic, assign, getter = isEnabled) BOOL enabled; - -/*! - A Boolean value indicating whether the network activity indicator is currently displayed in the status bar. - */ -@property (nonatomic, assign, readonly, getter = isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; - -/*! - The value that indicates current network activities count. - */ -@property (nonatomic, assign, readonly) NSUInteger networkActivityCount; - -/*! - @abstract Returns the shared network activity indicator manager object for the system. - - @returns The systemwide network activity indicator manager. - */ -+ (instancetype)sharedManager; - -/*! - @abstract Increments the number of active network requests. - - @discussion If this number was zero before incrementing, - this will start animating network activity indicator in the status bar. - */ -- (void)incrementActivityCount; - -/*! - @abstract Decrements the number of active network requests. - - @discussion If this number becomes zero after decrementing, - this will stop animating network activity indicator in the status bar. - */ -- (void)decrementActivityCount; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFObject+Subclass.h b/iOS/Parse.framework/Versions/Current/Headers/PFObject+Subclass.h deleted file mode 100644 index e5a7537..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFObject+Subclass.h +++ /dev/null @@ -1,128 +0,0 @@ -// -// PFObject+Subclass.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -@class PFQuery; - -/*! - ### Subclassing Notes - - Developers can subclass `PFObject` for a more native object-oriented class structure. - Strongly-typed subclasses of `PFObject` must conform to the protocol - and must call before <[Parse setApplicationId:clientKey:]> is called. - After this it will be returned by and other `PFObject` factories. - - All methods in except for <[PFSubclassing parseClassName]> - are already implemented in the `PFObject+Subclass` category. - - Including `PFObject+Subclass.h` in your implementation file provides these implementations automatically. - - Subclasses support simpler initializers, query syntax, and dynamic synthesizers. - The following shows an example subclass: - - \@interface MYGame : PFObject - - // Accessing this property is the same as objectForKey:@"title" - @property (nonatomic, strong) NSString *title; - - + (NSString *)parseClassName; - - @end - - - @implementation MYGame - - @dynamic title; - - + (NSString *)parseClassName { - return @"Game"; - } - - @end - - - MYGame *game = [[MYGame alloc] init]; - game.title = @"Bughouse"; - [game saveInBackground]; - */ -@interface PFObject (Subclass) - -///-------------------------------------- -/// @name Methods for Subclasses -///-------------------------------------- - -/*! - @abstract Designated initializer for subclasses. - This method can only be called on subclasses which conform to . - This method should not be overridden. - */ -- (instancetype)init; - -/*! - @abstract Creates an instance of the registered subclass with this class's . - - @discussion This helps a subclass ensure that it can be subclassed itself. - For example, `[PFUser object]` will return a `MyUser` object if `MyUser` is a registered subclass of `PFUser`. - For this reason, `[MyClass object]` is preferred to `[[MyClass alloc] init]`. - This method can only be called on subclasses which conform to `PFSubclassing`. - A default implementation is provided by `PFObject` which should always be sufficient. - */ -+ (instancetype)object; - -/*! - @abstract Creates a reference to an existing `PFObject` for use in creating associations between `PFObjects`. - - @discussion Calling on this object will return `NO` until or has been called. - This method can only be called on subclasses which conform to . - A default implementation is provided by `PFObject` which should always be sufficient. - No network request will be made. - - @param objectId The object id for the referenced object. - - @returns An instance of `PFObject` without data. - */ -+ (instancetype)objectWithoutDataWithObjectId:(NSString *)objectId; - -/*! - @abstract Registers an Objective-C class for Parse to use for representing a given Parse class. - - @discussion Once this is called on a `PFObject` subclass, any `PFObject` Parse creates with a class name - that matches `[self parseClassName]` will be an instance of subclass. - This method can only be called on subclasses which conform to . - A default implementation is provided by `PFObject` which should always be sufficient. - */ -+ (void)registerSubclass; - -/*! - @abstract Returns a query for objects of type . - - @discussion This method can only be called on subclasses which conform to . - A default implementation is provided by which should always be sufficient. - */ -+ (PFQuery *)query; - -/*! - @abstract Returns a query for objects of type with a given predicate. - - @discussion A default implementation is provided by which should always be sufficient. - @warning This method can only be called on subclasses which conform to . - - @param predicate The predicate to create conditions from. - - @return An instance of . - - @see [PFQuery queryWithClassName:predicate:] - */ -+ (PFQuery *)queryWithPredicate:(NSPredicate *)predicate; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFObject.h b/iOS/Parse.framework/Versions/Current/Headers/PFObject.h deleted file mode 100644 index b1c1193..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFObject.h +++ /dev/null @@ -1,1398 +0,0 @@ -// -// PFObject.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#else -#import -#import -#endif - -@protocol PFSubclassing; -@class BFTask; -@class PFRelation; - -extern NSString *const PFObjectDefaultPin; - -/*! - The `PFObject` class is a local representation of data persisted to the Parse cloud. - This is the main class that is used to interact with objects in your app. -*/ -NS_REQUIRES_PROPERTY_DEFINITIONS -@interface PFObject : NSObject { - BOOL dirty; - - // An array of NSDictionary of NSString -> PFFieldOperation. - // Each dictionary has a subset of the object's keys as keys, and the - // changes to the value for that key as its value. - // There is always at least one dictionary of pending operations. - // Every time a save is started, a new dictionary is added to the end. - // Whenever a save completes, the new data is put into fetchedData, and - // a dictionary is removed from the start. - NSMutableArray *operationSetQueue; - - // Our best estimate as to what the current data is, based on - // the last fetch from the server, and the set of pending operations. - NSMutableDictionary *estimatedData; -} - -///-------------------------------------- -/// @name Creating a PFObject -///-------------------------------------- - -/*! - @abstract Creates a new PFObject with a class name. - - @param className A class name can be any alphanumeric string that begins with a letter. - It represents an object in your app, like a 'User' or a 'Document'. - - @returns Returns the object that is instantiated with the given class name. - */ -+ (instancetype)objectWithClassName:(NSString *)className; - -/*! - @abstract Creates a reference to an existing PFObject for use in creating associations between PFObjects. - - @discussion Calling on this object will return `NO` until has been called. - No network request will be made. - - @param className The object's class. - @param objectId The object id for the referenced object. - - @returns A `PFObject` instance without data. - */ -+ (instancetype)objectWithoutDataWithClassName:(NSString *)className - objectId:(NSString *)objectId; - -/*! - @abstract Creates a new `PFObject` with a class name, initialized with data - constructed from the specified set of objects and keys. - - @param className The object's class. - @param dictionary An `NSDictionary` of keys and objects to set on the new `PFObject`. - - @returns A PFObject with the given class name and set with the given data. - */ -+ (PFObject *)objectWithClassName:(NSString *)className dictionary:(NSDictionary *)dictionary; - -/*! - @abstract Initializes a new empty `PFObject` instance with a class name. - - @param newClassName A class name can be any alphanumeric string that begins with a letter. - It represents an object in your app, like a 'User' or a 'Document'. - - @returns Returns the object that is instantiated with the given class name. - */ -- (instancetype)initWithClassName:(NSString *)newClassName; - -///-------------------------------------- -/// @name Managing Object Properties -///-------------------------------------- - -/*! - @abstract The class name of the object. - */ -@property (strong, readonly) NSString *parseClassName; - -/*! - @abstract The id of the object. - */ -@property (nonatomic, strong) NSString *objectId; - -/*! - @abstract When the object was last updated. - */ -@property (nonatomic, strong, readonly) NSDate *updatedAt; - -/*! - @abstract When the object was created. - */ -@property (nonatomic, strong, readonly) NSDate *createdAt; - -/*! - @abstract The ACL for this object. - */ -@property (nonatomic, strong) PFACL *ACL; - -/*! - @abstract Returns an array of the keys contained in this object. - - @discussion This does not include `createdAt`, `updatedAt`, `authData`, or `objectId`. - It does include things like username and ACL. - */ -- (NSArray *)allKeys; - -///-------------------------------------- -/// @name Accessors -///-------------------------------------- - -/*! - @abstract Returns the value associated with a given key. - - @param key The key for which to return the corresponding value. - */ -- (id)objectForKey:(NSString *)key; - -/*! - @abstract Sets the object associated with a given key. - - @param object The object. - @param key The key. - */ -- (void)setObject:(id)object forKey:(NSString *)key; - -/*! - @abstract Unsets a key on the object. - - @param key The key. - */ -- (void)removeObjectForKey:(NSString *)key; - -/*! - @abstract Returns the value associated with a given key. - - @discussion This method enables usage of literal syntax on `PFObject`. - E.g. `NSString *value = object[@"key"];` - - @see objectForKey: - - @param key The key for which to return the corresponding value. - */ -- (id)objectForKeyedSubscript:(NSString *)key; - -/*! - @abstract Returns the value associated with a given key. - - @discussion This method enables usage of literal syntax on `PFObject`. - E.g. `object[@"key"] = @"value";` - - @see setObject:forKey: - - @param object The object. - @param key The key. - */ -- (void)setObject:(id)object forKeyedSubscript:(NSString *)key; - -/*! - @abstract Returns the relation object associated with the given key. - - @param key The key that the relation is associated with. - */ -- (PFRelation *)relationForKey:(NSString *)key; - -/*! - @abstract Returns the relation object associated with the given key. - - @param key The key that the relation is associated with. - - @deprecated Please use `[PFObject relationForKey:]` instead. - */ -- (PFRelation *)relationforKey:(NSString *)key PARSE_DEPRECATED("Please use -relationForKey: instead."); - -///-------------------------------------- -/// @name Array Accessors -///-------------------------------------- - -/*! - @abstract Adds an object to the end of the array associated with a given key. - - @param object The object to add. - @param key The key. - */ -- (void)addObject:(id)object forKey:(NSString *)key; - -/*! - @abstract Adds the objects contained in another array to the end of the array associated with a given key. - - @param objects The array of objects to add. - @param key The key. - */ -- (void)addObjectsFromArray:(NSArray *)objects forKey:(NSString *)key; - -/*! - @abstract Adds an object to the array associated with a given key, only if it is not already present in the array. - - @discussion The position of the insert is not guaranteed. - - @param object The object to add. - @param key The key. - */ -- (void)addUniqueObject:(id)object forKey:(NSString *)key; - -/*! - @abstract Adds the objects contained in another array to the array associated with a given key, - only adding elements which are not already present in the array. - - @dicsussion The position of the insert is not guaranteed. - - @param objects The array of objects to add. - @param key The key. - */ -- (void)addUniqueObjectsFromArray:(NSArray *)objects forKey:(NSString *)key; - -/*! - @abstract Removes all occurrences of an object from the array associated with a given key. - - @param object The object to remove. - @param key The key. - */ -- (void)removeObject:(id)object forKey:(NSString *)key; - -/*! - @abstract Removes all occurrences of the objects contained in another array from the array associated with a given key. - - @param objects The array of objects to remove. - @param key The key. - */ -- (void)removeObjectsInArray:(NSArray *)objects forKey:(NSString *)key; - -///-------------------------------------- -/// @name Increment -///-------------------------------------- - -/*! - @abstract Increments the given key by `1`. - - @param key The key. - */ -- (void)incrementKey:(NSString *)key; - -/*! - @abstract Increments the given key by a number. - - @param key The key. - @param amount The amount to increment. - */ -- (void)incrementKey:(NSString *)key byAmount:(NSNumber *)amount; - -///-------------------------------------- -/// @name Saving Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* saves the `PFObject`. - - @returns Returns whether the save succeeded. - */ -- (BOOL)save; - -/*! - @abstract *Synchronously* saves the `PFObject` and sets an error if it occurs. - - @param error Pointer to an NSError that will be set if necessary. - - @returns Returns whether the save succeeded. - */ -- (BOOL)save:(NSError **)error; - -/*! - @abstract Saves the `PFObject` *asynchronously*. - - @returns The task that encapsulates the work being done. - */ -- (BFTask *)saveInBackground; - -/*! - @abstract Saves the `PFObject` *asynchronously* and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)saveInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract Saves the `PFObject` asynchronously and calls the given callback. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)saveInBackgroundWithTarget:(id)target selector:(SEL)selector; - -/*! - @see saveEventually: - */ -- (void)saveEventually; - -/*! - @abstract Saves this object to the server at some unspecified time in the future, - even if Parse is currently inaccessible. - - @discussion Use this when you may not have a solid network connection, and don't need to know when the save completes. - If there is some problem with the object such that it can't be saved, it will be silently discarded. If the save - completes successfully while the object is still in memory, then callback will be called. - - Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. - They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is - available. Objects saved this way will persist even after the app is closed, in which case they will be sent the - next time the app is opened. If more than 10MB of data is waiting to be sent, subsequent calls to - will cause old saves to be silently discarded until the connection can be re-established, and the queued objects - can be saved. - - @param callback The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)saveEventually:(PFBooleanResultBlock)callback; - -///-------------------------------------- -/// @name Saving Many Objects -///-------------------------------------- - -/*! - @abstract Saves a collection of objects *synchronously all at once. - - @param objects The array of objects to save. - - @returns Returns whether the save succeeded. - */ -+ (BOOL)saveAll:(NSArray *)objects; - -/*! - @abstract Saves a collection of objects *synchronously* all at once and sets an error if necessary. - - @param objects The array of objects to save. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the save succeeded. - */ -+ (BOOL)saveAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract Saves a collection of objects all at once *asynchronously*. - - @param objects The array of objects to save. - - @returns The task that encapsulates the work being done. - */ -+ (BFTask *)saveAllInBackground:(NSArray *)objects; - -/*! - @abstract Saves a collection of objects all at once `asynchronously` and executes the block when done. - - @param objects The array of objects to save. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)saveAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; - -/*! - @abstract Saves a collection of objects all at once *asynchronously* and calls a callback when done. - - @param objects The array of objects to save. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)number error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)saveAllInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Deleting Many Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* deletes a collection of objects all at once. - - @param objects The array of objects to delete. - - @returns Returns whether the delete succeeded. - */ -+ (BOOL)deleteAll:(NSArray *)objects; - -/*! - @abstract *Synchronously* deletes a collection of objects all at once and sets an error if necessary. - - @param objects The array of objects to delete. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the delete succeeded. - */ -+ (BOOL)deleteAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract Deletes a collection of objects all at once asynchronously. - @param objects The array of objects to delete. - @returns The task that encapsulates the work being done. - */ -+ (BFTask *)deleteAllInBackground:(NSArray *)objects; - -/*! - @abstract Deletes a collection of objects all at once *asynchronously* and executes the block when done. - - @param objects The array of objects to delete. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)deleteAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; - -/*! - @abstract Deletes a collection of objects all at once *asynchronously* and calls a callback when done. - - @param objects The array of objects to delete. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)number error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)deleteAllInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting an Object -///-------------------------------------- - -/*! - @abstract Gets whether the `PFObject` has been fetched. - - @returns `YES` if the PFObject is new or has been fetched or refreshed, otherwise `NO`. - */ -- (BOOL)isDataAvailable; - -#if PARSE_IOS_ONLY - -/*! - @abstract Refreshes the PFObject with the current data from the server. - - @deprecated Please use `-fetch` instead. - */ -- (void)refresh PARSE_DEPRECATED("Please use `-fetch` instead."); - -/*! - @abstract *Synchronously* refreshes the `PFObject` with the current data from the server and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @deprecated Please use `-fetch:` instead. - */ -- (void)refresh:(NSError **)error PARSE_DEPRECATED("Please use `-fetch:` instead."); - -/*! - @abstract *Asynchronously* refreshes the `PFObject` and executes the given callback block. - - @param block The block to execute. - The block should have the following argument signature: `^(PFObject *object, NSError *error)` - - @deprecated Please use `-fetchInBackgroundWithBlock:` instead. - */ -- (void)refreshInBackgroundWithBlock:(PFObjectResultBlock)block PARSE_DEPRECATED("Please use `-fetchInBackgroundWithBlock:` instead."); - -/*! - @abstract *Asynchronously* refreshes the `PFObject` and calls the given callback. - - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(PFObject *)refreshedObject error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `refreshedObject` will be the `PFObject` with the refreshed data. - - @deprecated Please use `fetchInBackgroundWithTarget:selector:` instead. - */ -- (void)refreshInBackgroundWithTarget:(id)target - selector:(SEL)selector PARSE_DEPRECATED("Please use `fetchInBackgroundWithTarget:selector:` instead."); - -#endif - -/*! - @abstract *Synchronously* fetches the PFObject with the current data from the server. - */ -- (void)fetch; -/*! - @abstract *Synchronously* fetches the PFObject with the current data from the server and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - */ -- (void)fetch:(NSError **)error; - -/*! - @abstract *Synchronously* fetches the `PFObject` data from the server if is `NO`. - */ -- (PFObject *)fetchIfNeeded; - -/*! - @abstract *Synchronously* fetches the `PFObject` data from the server if is `NO`. - - @param error Pointer to an `NSError` that will be set if necessary. - */ -- (PFObject *)fetchIfNeeded:(NSError **)error; - -/*! - @abstract Fetches the `PFObject` *asynchronously* and sets it as a result for the task. - - @returns The task that encapsulates the work being done. - */ -- (BFTask *)fetchInBackground; - -/*! - @abstract Fetches the PFObject *asynchronously* and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(PFObject *object, NSError *error)`. - */ -- (void)fetchInBackgroundWithBlock:(PFObjectResultBlock)block; - -/*! - @abstract Fetches the `PFObject *asynchronously* and calls the given callback. - - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(PFObject *)refreshedObject error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `refreshedObject` will be the `PFObject` with the refreshed data. - */ -- (void)fetchInBackgroundWithTarget:(id)target selector:(SEL)selector; - -/*! - @abstract Fetches the `PFObject` data *asynchronously* if isDataAvailable is `NO`, - then sets it as a result for the task. - - @returns The task that encapsulates the work being done. - */ -- (BFTask *)fetchIfNeededInBackground; - -/*! - @abstract Fetches the `PFObject` data *asynchronously* if is `NO`, then calls the callback block. - - @param block The block to execute. - It should have the following argument signature: `^(PFObject *object, NSError *error)`. - */ -- (void)fetchIfNeededInBackgroundWithBlock:(PFObjectResultBlock)block; - -/*! - @abstract Fetches the PFObject's data asynchronously if isDataAvailable is false, then calls the callback. - - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(PFObject *)fetchedObject error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `refreshedObject` will be the `PFObject` with the refreshed data. - */ -- (void)fetchIfNeededInBackgroundWithTarget:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting Many Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server. - - @param objects The list of objects to fetch. - */ -+ (void)fetchAll:(NSArray *)objects; - -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server - and sets an error if it occurs. - - @param objects The list of objects to fetch. - @param error Pointer to an `NSError` that will be set if necessary. - */ -+ (void)fetchAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server. - @param objects The list of objects to fetch. - */ -+ (void)fetchAllIfNeeded:(NSArray *)objects; - -/*! - @abstract *Synchronously* fetches all of the `PFObject` objects with the current data from the server - and sets an error if it occurs. - - @param objects The list of objects to fetch. - @param error Pointer to an `NSError` that will be set if necessary. - */ -+ (void)fetchAllIfNeeded:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously*. - - @param objects The list of objects to fetch. - - @returns The task that encapsulates the work being done. - */ -+ (BFTask *)fetchAllInBackground:(NSArray *)objects; - -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously* - and calls the given block. - - @param objects The list of objects to fetch. - @param block The block to execute. - It should have the following argument signature: `^(NSArray *objects, NSError *error)`. - */ -+ (void)fetchAllInBackground:(NSArray *)objects - block:(PFArrayResultBlock)block; - -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously* - and calls the given callback. - - @param objects The list of objects to fetch. - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSArray *)fetchedObjects error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `fetchedObjects` will the array of `PFObject` objects that were fetched. - */ -+ (void)fetchAllInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Fetches all of the `PFObject` objects with the current data from the server *asynchronously*. - - @param objects The list of objects to fetch. - - @returns The task that encapsulates the work being done. - */ -+ (BFTask *)fetchAllIfNeededInBackground:(NSArray *)objects; - -/*! - @abstract Fetches all of the PFObjects with the current data from the server *asynchronously* - and calls the given block. - - @param objects The list of objects to fetch. - @param block The block to execute. - It should have the following argument signature: `^(NSArray *objects, NSError *error)`. - */ -+ (void)fetchAllIfNeededInBackground:(NSArray *)objects - block:(PFArrayResultBlock)block; - -/*! - @abstract Fetches all of the PFObjects with the current data from the server *asynchronously* - and calls the given callback. - - @param objects The list of objects to fetch. - @param target The target on which the selector will be called. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSArray *)fetchedObjects error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `fetchedObjects` will the array of `PFObject` objects that were fetched. - */ -+ (void)fetchAllIfNeededInBackground:(NSArray *)objects - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Fetching From Local Datastore -///-------------------------------------- - -/*! - @abstract *Synchronously* loads data from the local datastore into this object, - if it has not been fetched from the server already. - */ -- (void)fetchFromLocalDatastore; - -/*! - @abstract *Synchronously* loads data from the local datastore into this object, if it has not been fetched - from the server already. - - @discussion If the object is not stored in the local datastore, this `error` will be set to - return kPFErrorCacheMiss. - - @param error Pointer to an `NSError` that will be set if necessary. - */ -- (void)fetchFromLocalDatastore:(NSError **)error; - -/*! - @abstract *Asynchronously* loads data from the local datastore into this object, - if it has not been fetched from the server already. - - @return The task that encapsulates the work being done. - */ -- (BFTask *)fetchFromLocalDatastoreInBackground; - -/*! - @abstract *Asynchronously* loads data from the local datastore into this object, - if it has not been fetched from the server already. - - @param block The block to execute. - It should have the following argument signature: `^(PFObject *object, NSError *error)`. - */ -- (void)fetchFromLocalDatastoreInBackgroundWithBlock:(PFObjectResultBlock)block; - -///-------------------------------------- -/// @name Deleting an Object -///-------------------------------------- - -/*! - @abstract *Synchronously* deletes the `PFObject`. - - @returns Returns whether the delete succeeded. - */ -- (BOOL)delete; - -/*! - @abstract *Synchronously* deletes the `PFObject` and sets an error if it occurs. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the delete succeeded. - */ -- (BOOL)delete:(NSError **)error; - -/*! - @abstract Deletes the `PFObject` *asynchronously*. - - @returns The task that encapsulates the work being done. - */ -- (BFTask *)deleteInBackground; - -/*! - @abstract Deletes the `PFObject` *asynchronously* and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)deleteInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract Deletes the `PFObject` *asynchronously* and calls the given callback. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)deleteInBackgroundWithTarget:(id)target - selector:(SEL)selector; - -/*! - @abstract Deletes this object from the server at some unspecified time in the future, - even if Parse is currently inaccessible. - - @discussion Use this when you may not have a solid network connection, - and don't need to know when the delete completes. If there is some problem with the object - such that it can't be deleted, the request will be silently discarded. - - Delete instructions made with this method will be stored locally in an on-disk cache until they can be transmitted - to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection - is available. Delete requests will persist even after the app is closed, in which case they will be sent the - next time the app is opened. If more than 10MB of or commands are waiting - to be sent, subsequent calls to or will cause old requests to be silently discarded - until the connection can be re-established, and the queued requests can go through. - */ -- (void)deleteEventually; - -///-------------------------------------- -/// @name Dirtiness -///-------------------------------------- - -/*! - @abstract Gets whether any key-value pair in this object (or its children) - has been added/updated/removed and not saved yet. - - @returns Returns whether this object has been altered and not saved yet. - */ -- (BOOL)isDirty; - -/*! - @abstract Get whether a value associated with a key has been added/updated/removed and not saved yet. - - @param key The key to check for - - @returns Returns whether this key has been altered and not saved yet. - */ -- (BOOL)isDirtyForKey:(NSString *)key; - - -///-------------------------------------- -/// @name Pinning -///-------------------------------------- - -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @return Returns whether the pin succeeded. - - @see unpin: - @see PFObjectDefaultPin - */ -- (BOOL)pin; - -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the pin succeeded. - - @see unpin: - @see PFObjectDefaultPin - */ -- (BOOL)pin:(NSError **)error; - -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param name The name of the pin. - - @return Returns whether the pin succeeded. - - @see unpinWithName: - */ -- (BOOL)pinWithName:(NSString *)name; - -/*! - @abstract *Synchronously* stores the object and every object it points to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the pin succeeded. - - @see unpinWithName: - */ -- (BOOL)pinWithName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @return The task that encapsulates the work being done. - - @see unpinInBackground: - @see PFObjectDefaultPin - */ -- (BFTask *)pinInBackground; - -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see unpinInBackgroundWithBlock: - @see PFObjectDefaultPin - */ -- (void)pinInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param name The name of the pin. - - @return The task that encapsulates the work being done. - - @see unpinInBackgroundWithName: - */ -- (BFTask *)pinInBackgroundWithName:(NSString *)name; - -/*! - @abstract *Asynchronously* stores the object and every object it points to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - <[PFObject objectWithoutDataWithClassName:objectId]> and then call on it. - - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see unpinInBackgroundWithName:block: - */ -- (void)pinInBackgroundWithName:(NSString *)name - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Pinning Many Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - - @return Returns whether the pin succeeded. - - @see unpinAll: - @see PFObjectDefaultPin - */ -+ (BOOL)pinAll:(NSArray *)objects; - -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the pin succeeded. - - @see unpinAll:error: - @see PFObjectDefaultPin - */ -+ (BOOL)pinAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param name The name of the pin. - - @return Returns whether the pin succeeded. - - @see unpinAll:withName: - */ -+ (BOOL)pinAll:(NSArray *)objects withName:(NSString *)name; - -/*! - @abstract *Synchronously* stores the objects and every object they point to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the pin succeeded. - - @see unpinAll:withName:error: - */ -+ (BOOL)pinAll:(NSArray *)objects - withName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - - @return The task that encapsulates the work being done. - - @see unpinAllInBackground: - @see PFObjectDefaultPin - */ -+ (BFTask *)pinAllInBackground:(NSArray *)objects; - -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see unpinAllInBackground:block: - @see PFObjectDefaultPin - */ -+ (void)pinAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param name The name of the pin. - - @return The task that encapsulates the work being done. - - @see unpinAllInBackground:withName: - */ -+ (BFTask *)pinAllInBackground:(NSArray *)objects - withName:(NSString *)name; - -/*! - @abstract *Asynchronously* stores the objects and every object they point to in the local datastore, recursively. - - @discussion If those other objects have not been fetched from Parse, they will not be stored. However, - if they have changed data, all the changes will be retained. To get the objects back later, you can - use a that uses <[PFQuery fromLocalDatastore]>, or you can create an unfetched pointer with - `[PFObject objectWithoutDataWithClassName:objectId:]` and then call `fetchFromLocalDatastore:` on it. - - @param objects The objects to be pinned. - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see unpinAllInBackground:withName:block: - */ -+ (void)pinAllInBackground:(NSArray *)objects - withName:(NSString *)name - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Unpinning -///-------------------------------------- - -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @return Returns whether the unpin succeeded. - - @see pin: - @see PFObjectDefaultPin - */ -- (BOOL)unpin; - -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see pin: - @see PFObjectDefaultPin - */ -- (BOOL)unpin:(NSError **)error; - -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively. - - @param name The name of the pin. - - @return Returns whether the unpin succeeded. - - @see pinWithName: - */ -- (BOOL)unpinWithName:(NSString *)name; - -/*! - @abstract *Synchronously* removes the object and every object it points to in the local datastore, recursively. - - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see pinWithName:error: - */ -- (BOOL)unpinWithName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @return The task that encapsulates the work being done. - - @see pinInBackground: - @see PFObjectDefaultPin - */ -- (BFTask *)unpinInBackground; - -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see pinInBackgroundWithBlock: - @see PFObjectDefaultPin - */ -- (void)unpinInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively. - - @param name The name of the pin. - - @return The task that encapsulates the work being done. - - @see pinInBackgroundWithName: - */ -- (BFTask *)unpinInBackgroundWithName:(NSString *)name; - -/*! - @abstract *Asynchronously* removes the object and every object it points to in the local datastore, recursively. - - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see pinInBackgroundWithName:block: - */ -- (void)unpinInBackgroundWithName:(NSString *)name - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Unpinning Many Objects -///-------------------------------------- - -/*! - @abstract *Synchronously* removes all objects in the local datastore - using a default pin name: `PFObjectDefaultPin`. - - @return Returns whether the unpin succeeded. - - @see PFObjectDefaultPin - */ -+ (BOOL)unpinAllObjects; - -/*! - @abstract *Synchronously* removes all objects in the local datastore - using a default pin name: `PFObjectDefaultPin`. - - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see PFObjectDefaultPin - */ -+ (BOOL)unpinAllObjects:(NSError **)error; - -/*! - @abstract *Synchronously* removes all objects with the specified pin name. - - @param name The name of the pin. - - @return Returns whether the unpin succeeded. - */ -+ (BOOL)unpinAllObjectsWithName:(NSString *)name; - -/*! - @abstract *Synchronously* removes all objects with the specified pin name. - - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - */ -+ (BOOL)unpinAllObjectsWithName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* removes all objects in the local datastore - using a default pin name: `PFObjectDefaultPin`. - - @return The task that encapsulates the work being done. - - @see PFObjectDefaultPin - */ -+ (BFTask *)unpinAllObjectsInBackground; - -/*! - @abstract *Asynchronously* removes all objects in the local datastore - using a default pin name: `PFObjectDefaultPin`. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see PFObjectDefaultPin - */ -+ (void)unpinAllObjectsInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* removes all objects with the specified pin name. - - @param name The name of the pin. - - @return The task that encapsulates the work being done. - */ -+ (BFTask *)unpinAllObjectsInBackgroundWithName:(NSString *)name; - -/*! - @abstract *Asynchronously* removes all objects with the specified pin name. - - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unpinAllObjectsInBackgroundWithName:(NSString *)name - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param objects The objects. - - @return Returns whether the unpin succeeded. - - @see pinAll: - @see PFObjectDefaultPin - */ -+ (BOOL)unpinAll:(NSArray *)objects; - -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param objects The objects. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see pinAll:error: - @see PFObjectDefaultPin - */ -+ (BOOL)unpinAll:(NSArray *)objects error:(NSError **)error; - -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively. - - @param objects The objects. - @param name The name of the pin. - - @return Returns whether the unpin succeeded. - - @see pinAll:withName: - */ -+ (BOOL)unpinAll:(NSArray *)objects withName:(NSString *)name; - -/*! - @abstract *Synchronously* removes the objects and every object they point to in the local datastore, recursively. - - @param objects The objects. - @param name The name of the pin. - @param error Pointer to an `NSError` that will be set if necessary. - - @return Returns whether the unpin succeeded. - - @see pinAll:withName:error: - */ -+ (BOOL)unpinAll:(NSArray *)objects - withName:(NSString *)name - error:(NSError **)error; - -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param objects The objects. - - @return The task that encapsulates the work being done. - - @see pinAllInBackground: - @see PFObjectDefaultPin - */ -+ (BFTask *)unpinAllInBackground:(NSArray *)objects; - -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively, - using a default pin name: `PFObjectDefaultPin`. - - @param objects The objects. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see pinAllInBackground:block: - @see PFObjectDefaultPin - */ -+ (void)unpinAllInBackground:(NSArray *)objects - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively. - - @param objects The objects. - @param name The name of the pin. - - @return The task that encapsulates the work being done. - - @see pinAllInBackground:withName: - */ -+ (BFTask *)unpinAllInBackground:(NSArray *)objects - withName:(NSString *)name; - -/*! - @abstract *Asynchronously* removes the objects and every object they point to in the local datastore, recursively. - - @param objects The objects. - @param name The name of the pin. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - - @see pinAllInBackground:withName:block: - */ -+ (void)unpinAllInBackground:(NSArray *)objects - withName:(NSString *)name - block:(PFBooleanResultBlock)block; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFProduct.h b/iOS/Parse.framework/Versions/Current/Headers/PFProduct.h deleted file mode 100644 index cd57a25..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFProduct.h +++ /dev/null @@ -1,76 +0,0 @@ -// -// PFProduct.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import -#import -#import - -/*! - The `PFProduct` class represents an in-app purchase product on the Parse server. - By default, products can only be created via the Data Browser. Saving a `PFProduct` will result in error. - However, the products' metadata information can be queried and viewed. - - This class is currently for iOS only. - */ -@interface PFProduct : PFObject - -/*! - @abstract The name of the Installation class in the REST API. - - @discussion This is a required PFSubclassing method. - */ -+ (NSString *)parseClassName; - -///-------------------------------------- -/// @name Querying for Products -///-------------------------------------- - -/*! - @abstract A that could be used to fetch all product instances from Parse. - */ -+ (PFQuery *)query; - -///-------------------------------------- -/// @name Product-specific Properties -///-------------------------------------- - -/*! - @abstract The product identifier of the product. - - @discussion This should match the product identifier in iTunes Connect exactly. - */ -@property (nonatomic, strong) NSString *productIdentifier; - -/*! - @abstract The icon of the product. - */ -@property (nonatomic, strong) PFFile *icon; - -/*! - @abstract The title of the product. - */ -@property (nonatomic, strong) NSString *title; - -/*! - @abstract The subtitle of the product. - */ -@property (nonatomic, strong) NSString *subtitle; - -/*! - @abstract The order in which the product information is displayed in . - - @discussion The product with a smaller order is displayed earlier in the . - */ -@property (nonatomic, strong) NSNumber *order; - -/*! - @abstract The name of the associated download. - - @discussion If there is no downloadable asset, it should be `nil`. - */ -@property (nonatomic, strong, readonly) NSString *downloadName; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFProductTableViewController.h b/iOS/Parse.framework/Versions/Current/Headers/PFProductTableViewController.h deleted file mode 100644 index 5d8c58b..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFProductTableViewController.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// PFProductsTableViewController.h -// Parse -// -// Created by Qian Wang on 5/15/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import "PFQueryTableViewController.h" - -/*! - PFProductTableViewController displays in-app purchase products stored on Parse. - In addition to setting up in-app purchases in iTunesConnect, the app developer needs - to register product information on Parse, in the Product class. - */ -@interface PFProductTableViewController : PFQueryTableViewController - -/*! - Initializes a product table view controller. - */ -- (instancetype)init; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFPurchase.h b/iOS/Parse.framework/Versions/Current/Headers/PFPurchase.h deleted file mode 100644 index 3a8e661..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFPurchase.h +++ /dev/null @@ -1,87 +0,0 @@ -// -// PFPurchase.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import -#import - -#import - -@class PFProduct; - -/*! - `PFPurchase` provides a set of APIs for working with in-app purchases. - - This class is currently for iOS only. - */ -@interface PFPurchase : NSObject - -/*! - @abstract Add application logic block which is run when buying a product. - - @discussion This method should be called once for each product, and should be called before - calling . All invocations to should happen within - the same method, and on the main thread. It is recommended to place all invocations of this method - in `application:didFinishLaunchingWithOptions:`. - - @param productIdentifier the product identifier - @param block The block to be run when buying a product. - */ -+ (void)addObserverForProduct:(NSString *)productIdentifier - block:(void(^)(SKPaymentTransaction *transaction))block; - -/*! - @abstract *Asynchronously* initiates the purchase for the product. - - @param productIdentifier the product identifier - @param block the completion block. - */ -+ (void)buyProduct:(NSString *)productIdentifier block:(void(^)(NSError *error))block; - -/*! - @abstract *Asynchronously* download the purchased asset, which is stored on Parse's server. - - @discussion Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. - - @param transaction the transaction, which contains the receipt. - @param completion the completion block. - */ -+ (void)downloadAssetForTransaction:(SKPaymentTransaction *)transaction - completion:(void(^)(NSString *filePath, NSError *error))completion; - -/*! - @abstract *Asynchronously* download the purchased asset, which is stored on Parse's server. - - @discussion Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. - - @param transaction the transaction, which contains the receipt. - @param completion the completion block. - @param progress the progress block, which is called multiple times to reveal progress of the download. - */ -+ (void)downloadAssetForTransaction:(SKPaymentTransaction *)transaction - completion:(void(^)(NSString *filePath, NSError *error))completion - progress:(PFProgressBlock)progress; - -/*! - @abstract *Asynchronously* restore completed transactions for the current user. - - @discussion Only nonconsumable purchases are restored. If observers for the products have been added before - calling this method, invoking the method reruns the application logic associated with the purchase. - - @warning This method is only important to developers who want to preserve purchase states across - different installations of the same app. - */ -+ (void)restore; - -/* - @abstract Returns a content path of the asset of a product, if it was purchased and downloaded. - - @discussion To download and verify purchases use . - - @warning This method will return `nil`, if the purchase wasn't verified or if the asset was not downloaded. - */ -+ (NSString *)assetContentPathForProduct:(PFProduct *)product; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFPurchaseTableViewCell.h b/iOS/Parse.framework/Versions/Current/Headers/PFPurchaseTableViewCell.h deleted file mode 100644 index c393cf7..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFPurchaseTableViewCell.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// PFPurchaseTableViewCell.h -// Parse -// -// Created by Qian Wang on 5/21/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import - -#import "PFTableViewCell.h" - -/*! - An enum that represents states of the PFPurchaseTableViewCell. - @see PFPurchaseTableViewCell - */ -typedef NS_ENUM(uint8_t, PFPurchaseTableViewCellState) { - /*! Normal state of the cell. */ - PFPurchaseTableViewCellStateNormal = 0, - /*! Downloading state of the cell. */ - PFPurchaseTableViewCellStateDownloading, - /*! State of the cell, when the product was downloaded. */ - PFPurchaseTableViewCellStateDownloaded -}; - -/*! - PFPurchaseTableViewCell is a subclass PFTableViewCell that is used to show - products in a PFProductTableViewController. - @see PFProductTableViewController - */ -@interface PFPurchaseTableViewCell : PFTableViewCell - -/*! State of the cell */ -@property (nonatomic, assign) PFPurchaseTableViewCellState state; - -/*! Label where price of the product is displayed. */ -@property (nonatomic, strong, readonly) UILabel *priceLabel; - -/*! Progress view that is shown, when the product is downloading. */ -@property (nonatomic, strong, readonly) UIProgressView *progressView; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFPush.h b/iOS/Parse.framework/Versions/Current/Headers/PFPush.h deleted file mode 100644 index 0d740f7..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFPush.h +++ /dev/null @@ -1,523 +0,0 @@ -// -// PFPush.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import - -@class BFTask; -@class PFQuery; - -/*! - The `PFPush` class defines a push notification that can be sent from a client device. - - The preferred way of modifying or retrieving channel subscriptions is to use - the class, instead of the class methods in `PFPush`. - - This class is currently for iOS only. Parse does not handle Push Notifications - to Parse applications running on OS X. Push Notifications can be sent from OS X - applications via Cloud Code or the REST API to push-enabled devices (e.g. iOS or Android). - */ -@interface PFPush : NSObject - -///-------------------------------------- -/// @name Creating a Push Notification -///-------------------------------------- - -+ (PFPush *)push; - -///-------------------------------------- -/// @name Configuring a Push Notification -///-------------------------------------- - -/*! - @abstract Sets the channel on which this push notification will be sent. - - @param channel The channel to set for this push. - The channel name must start with a letter and contain only letters, numbers, dashes, and underscores. - */ -- (void)setChannel:(NSString *)channel; - -/*! - @abstract Sets the array of channels on which this push notification will be sent. - - @param channels The array of channels to set for this push. - Each channel name must start with a letter and contain only letters, numbers, dashes, and underscores. - */ -- (void)setChannels:(NSArray *)channels; - -/*! - @abstract Sets an installation query to which this push notification will be sent. - - @discussion The query should be created via <[PFInstallation query]> and should not specify a skip, limit, or order. - - @param query The installation query to set for this push. - */ -- (void)setQuery:(PFQuery *)query; - -/*! - @abstract Sets an alert message for this push notification. - - @warning This will overwrite any data specified in setData. - - @param message The message to send in this push. - */ -- (void)setMessage:(NSString *)message; - -/*! - @abstract Sets an arbitrary data payload for this push notification. - - @discussion See the guide for information about the dictionary structure. - - @warning This will overwrite any data specified in setMessage. - - @param data The data to send in this push. - */ -- (void)setData:(NSDictionary *)data; - -/*! - @abstract Sets whether this push will go to Android devices. - - @param pushToAndroid Whether this push will go to Android devices. - - @deprecated Please use a `[PFInstallation query]` with a constraint on deviceType instead. - */ -- (void)setPushToAndroid:(BOOL)pushToAndroid PARSE_DEPRECATED("Please use a [PFInstallation query] with a constraint on deviceType."); - -/*! - @abstract Sets whether this push will go to iOS devices. - - @param pushToIOS Whether this push will go to iOS devices. - - @deprecated Please use a `[PFInstallation query]` with a constraint on deviceType instead. - */ -- (void)setPushToIOS:(BOOL)pushToIOS PARSE_DEPRECATED("Please use a [PFInstallation query] with a constraint on deviceType."); - -/*! - @abstract Sets the expiration time for this notification. - - @discussion The notification will be sent to devices which are either online - at the time the notification is sent, or which come online before the expiration time is reached. - Because device clocks are not guaranteed to be accurate, - most applications should instead use . - - @see expireAfterTimeInterval: - - @param date The time at which the notification should expire. - */ -- (void)expireAtDate:(NSDate *)date; - -/*! - @abstract Sets the time interval after which this notification should expire. - - @discussion This notification will be sent to devices which are either online at - the time the notification is sent, or which come online within the given - time interval of the notification being received by Parse's server. - An interval which is less than or equal to zero indicates that the - message should only be sent to devices which are currently online. - - @param timeInterval The interval after which the notification should expire. - */ -- (void)expireAfterTimeInterval:(NSTimeInterval)timeInterval; - -/*! - @abstract Clears both expiration values, indicating that the notification should never expire. - */ -- (void)clearExpiration; - -///-------------------------------------- -/// @name Sending Push Notifications -///-------------------------------------- - -/*! - @abstract *Synchronously* send a push message to a channel. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param message The message to send. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -+ (BOOL)sendPushMessageToChannel:(NSString *)channel - withMessage:(NSString *)message - error:(NSError **)error; - -/*! - @abstract *Asynchronously* send a push message to a channel. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param message The message to send. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)sendPushMessageToChannelInBackground:(NSString *)channel - withMessage:(NSString *)message; - -/*! - @abstract *Asynchronously* sends a push message to a channel and calls the given block. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param message The message to send. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)sendPushMessageToChannelInBackground:(NSString *)channel - withMessage:(NSString *)message - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* send a push message to a channel. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param message The message to send. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)sendPushMessageToChannelInBackground:(NSString *)channel - withMessage:(NSString *)message - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Send a push message to a query. - - @param query The query to send to. The query must be a query created with <[PFInstallation query]>. - @param message The message to send. - @param error Pointer to an NSError that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -+ (BOOL)sendPushMessageToQuery:(PFQuery *)query - withMessage:(NSString *)message - error:(NSError **)error; - -/*! - @abstract *Asynchronously* send a push message to a query. - - @param query The query to send to. The query must be a query created with <[PFInstallation query]>. - @param message The message to send. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)sendPushMessageToQueryInBackground:(PFQuery *)query - withMessage:(NSString *)message; - -/*! - @abstract *Asynchronously* sends a push message to a query and calls the given block. - - @param query The query to send to. The query must be a PFInstallation query - created with [PFInstallation query]. - @param message The message to send. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)sendPushMessageToQueryInBackground:(PFQuery *)query - withMessage:(NSString *)message - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Synchronously* send this push message. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -- (BOOL)sendPush:(NSError **)error; - -/*! - @abstract *Asynchronously* send this push message. - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)sendPushInBackground; - -/*! - @abstract *Asynchronously* send this push message and executes the given callback block. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)sendPushInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* send this push message and calls the given callback. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)sendPushInBackgroundWithTarget:(id)target selector:(SEL)selector; - -/*! - @abstract *Synchronously* send a push message with arbitrary data to a channel. - - @discussion See the guide for information about the dictionary structure. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param data The data to send. - @param error Pointer to an NSError that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -+ (BOOL)sendPushDataToChannel:(NSString *)channel - withData:(NSDictionary *)data - error:(NSError **)error; - -/*! - @abstract *Asynchronously* send a push message with arbitrary data to a channel. - - @discussion See the guide for information about the dictionary structure. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param data The data to send. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)sendPushDataToChannelInBackground:(NSString *)channel - withData:(NSDictionary *)data; - -/*! - @abstract Asynchronously sends a push message with arbitrary data to a channel and calls the given block. - - @discussion See the guide for information about the dictionary structure. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param data The data to send. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)sendPushDataToChannelInBackground:(NSString *)channel - withData:(NSDictionary *)data - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* send a push message with arbitrary data to a channel. - - @discussion See the guide for information about the dictionary structure. - - @param channel The channel to send to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param data The data to send. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)sendPushDataToChannelInBackground:(NSString *)channel - withData:(NSDictionary *)data - target:(id)target - selector:(SEL)selector; - -/*! - @abstract *Synchronously* send a push message with arbitrary data to a query. - - @discussion See the guide for information about the dictionary structure. - - @param query The query to send to. The query must be a query - created with <[PFInstallation query]>. - @param data The data to send. - @param error Pointer to an NSError that will be set if necessary. - - @returns Returns whether the send succeeded. - */ -+ (BOOL)sendPushDataToQuery:(PFQuery *)query - withData:(NSDictionary *)data - error:(NSError **)error; - -/*! - @abstract Asynchronously send a push message with arbitrary data to a query. - - @discussion See the guide for information about the dictionary structure. - - @param query The query to send to. The query must be a query - created with <[PFInstallation query]>. - @param data The data to send. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)sendPushDataToQueryInBackground:(PFQuery *)query - withData:(NSDictionary *)data; - -/*! - @abstract *Asynchronously* sends a push message with arbitrary data to a query and calls the given block. - - @discussion See the guide for information about the dictionary structure. - - @param query The query to send to. The query must be a query - created with <[PFInstallation query]>. - @param data The data to send. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)sendPushDataToQueryInBackground:(PFQuery *)query - withData:(NSDictionary *)data - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Handling Notifications -///-------------------------------------- - -/*! - @abstract A default handler for push notifications while the app is active that - could be used to mimic the behavior of iOS push notifications while the app is backgrounded or not running. - - @discussion Call this from `application:didReceiveRemoteNotification:`. - - @param userInfo The userInfo dictionary you get in `appplication:didReceiveRemoteNotification:`. - */ -+ (void)handlePush:(NSDictionary *)userInfo; - -///-------------------------------------- -/// @name Managing Channel Subscriptions -///-------------------------------------- - -/*! - @abstract Store the device token locally for push notifications. - - @discussion Usually called from you main app delegate's `didRegisterForRemoteNotificationsWithDeviceToken:`. - - @param deviceToken Either as an `NSData` straight from `application:didRegisterForRemoteNotificationsWithDeviceToken:` - or as an `NSString` if you converted it yourself. - */ -+ (void)storeDeviceToken:(id)deviceToken; - -/*! - @abstract *Synchronously* get all the channels that this device is subscribed to. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns an `NSSet` containing all the channel names this device is subscribed to. - */ -+ (NSSet *)getSubscribedChannels:(NSError **)error; - -/*! - @abstract *Asynchronously* get all the channels that this device is subscribed to. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)getSubscribedChannelsInBackground; - -/*! - @abstract *Asynchronously* get all the channels that this device is subscribed to. - @param block The block to execute. - It should have the following argument signature: `^(NSSet *channels, NSError *error)`. - */ -+ (void)getSubscribedChannelsInBackgroundWithBlock:(PFSetResultBlock)block; - -/*! - @abstract *Asynchronously* get all the channels that this device is subscribed to. - - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSSet *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - */ -+ (void)getSubscribedChannelsInBackgroundWithTarget:(id)target - selector:(SEL)selector; - -/*! - @abstract *Synchrnously* subscribes the device to a channel of push notifications. - - @param channel The channel to subscribe to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the subscribe succeeded. - */ -+ (BOOL)subscribeToChannel:(NSString *)channel error:(NSError **)error; - -/*! - @abstract *Asynchronously* subscribes the device to a channel of push notifications. - - @param channel The channel to subscribe to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)subscribeToChannelInBackground:(NSString *)channel; - -/*! - @abstract *Asynchronously* subscribes the device to a channel of push notifications and calls the given block. - - @param channel The channel to subscribe to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)` - */ -+ (void)subscribeToChannelInBackground:(NSString *)channel - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* subscribes the device to a channel of push notifications and calls the given callback. - - @param channel The channel to subscribe to. The channel name must start with - a letter and contain only letters, numbers, dashes, and underscores. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)subscribeToChannelInBackground:(NSString *)channel - target:(id)target - selector:(SEL)selector; - -/*! - @abstract *Synchronously* unsubscribes the device to a channel of push notifications. - - @param channel The channel to unsubscribe from. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns whether the unsubscribe succeeded. - */ -+ (BOOL)unsubscribeFromChannel:(NSString *)channel error:(NSError **)error; - -/*! - @abstract *Asynchronously* unsubscribes the device from a channel of push notifications. - - @param channel The channel to unsubscribe from. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)unsubscribeFromChannelInBackground:(NSString *)channel; - -/*! - @abstract *Asynchronously* unsubscribes the device from a channel of push notifications and calls the given block. - - @param channel The channel to unsubscribe from. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unsubscribeFromChannelInBackground:(NSString *)channel - block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* unsubscribes the device from a channel of push notifications and calls the given callback. - - @param channel The channel to unsubscribe from. - @param target The object to call selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)unsubscribeFromChannelInBackground:(NSString *)channel - target:(id)target - selector:(SEL)selector; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFQuery.h b/iOS/Parse.framework/Versions/Current/Headers/PFQuery.h deleted file mode 100644 index eb52f8f..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFQuery.h +++ /dev/null @@ -1,791 +0,0 @@ -// -// PFQuery.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#import -#import -#else -#import -#import -#import -#import -#endif - -@class BFTask; - -/*! - The `PFQuery` class defines a query that is used to query for s. - */ -@interface PFQuery : NSObject - -///-------------------------------------- -/// @name Creating a Query for a Class -///-------------------------------------- - -/*! - @abstract Returns a `PFQuery` for a given class. - - @param className The class to query on. - - @returns A `PFQuery` object. - */ -+ (PFQuery *)queryWithClassName:(NSString *)className; - -/*! - @abstract Creates a PFQuery with the constraints given by predicate. - - @discussion The following types of predicates are supported: - - - Simple comparisons such as `=`, `!=`, `<`, `>`, `<=`, `>=`, and `BETWEEN` with a key and a constant. - - Containment predicates, such as `x IN {1, 2, 3}`. - - Key-existence predicates, such as `x IN SELF`. - - BEGINSWITH expressions. - - Compound predicates with `AND`, `OR`, and `NOT`. - - SubQueries with `key IN %@`, subquery. - - The following types of predicates are NOT supported: - - - Aggregate operations, such as `ANY`, `SOME`, `ALL`, or `NONE`. - - Regular expressions, such as `LIKE`, `MATCHES`, `CONTAINS`, or `ENDSWITH`. - - Predicates comparing one key to another. - - Complex predicates with many ORed clauses. - - @param className The class to query on. - @param predicate The predicate to create conditions from. - */ -+ (PFQuery *)queryWithClassName:(NSString *)className predicate:(NSPredicate *)predicate; - -/*! - Initializes the query with a class name. - @param newClassName The class name. - */ -- (instancetype)initWithClassName:(NSString *)newClassName; - -/*! - The class name to query for - */ -@property (nonatomic, strong) NSString *parseClassName; - -///-------------------------------------- -/// @name Adding Basic Constraints -///-------------------------------------- - -/*! - @abstract Make the query include PFObjects that have a reference stored at the provided key. - - @discussion This has an effect similar to a join. You can use dot notation to specify which fields in - the included object are also fetch. - - @param key The key to load child s for. - */ -- (void)includeKey:(NSString *)key; - -/*! - @abstract Make the query restrict the fields of the returned s to include only the provided keys. - - @discussion If this is called multiple times, then all of the keys specified in each of the calls will be included. - - @param keys The keys to include in the result. - */ -- (void)selectKeys:(NSArray *)keys; - -/*! - @abstract Add a constraint that requires a particular key exists. - - @param key The key that should exist. - */ -- (void)whereKeyExists:(NSString *)key; - -/*! - @abstract Add a constraint that requires a key not exist. - - @param key The key that should not exist. - */ -- (void)whereKeyDoesNotExist:(NSString *)key; - -/*! - @abstract Add a constraint to the query that requires a particular key's object to be equal to the provided object. - - @param key The key to be constrained. - @param object The object that must be equalled. - */ -- (void)whereKey:(NSString *)key equalTo:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's object to be less than the provided object. - - @param key The key to be constrained. - @param object The object that provides an upper bound. - */ -- (void)whereKey:(NSString *)key lessThan:(id)object; - -/*! - @abstractAdd a constraint to the query that requires a particular key's object - to be less than or equal to the provided object. - - @param key The key to be constrained. - @param object The object that must be equalled. - */ -- (void)whereKey:(NSString *)key lessThanOrEqualTo:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's object - to be greater than the provided object. - - @param key The key to be constrained. - @param object The object that must be equalled. - */ -- (void)whereKey:(NSString *)key greaterThan:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's - object to be greater than or equal to the provided object. - - @param key The key to be constrained. - @param object The object that must be equalled. - */ -- (void)whereKey:(NSString *)key greaterThanOrEqualTo:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's object - to be not equal to the provided object. - - @param key The key to be constrained. - @param object The object that must not be equalled. - */ -- (void)whereKey:(NSString *)key notEqualTo:(id)object; - -/*! - @abstract Add a constraint to the query that requires a particular key's object - to be contained in the provided array. - - @param key The key to be constrained. - @param array The possible values for the key's object. - */ -- (void)whereKey:(NSString *)key containedIn:(NSArray *)array; - -/*! - @abstract Add a constraint to the query that requires a particular key's object - not be contained in the provided array. - - @param key The key to be constrained. - @param array The list of values the key's object should not be. - */ -- (void)whereKey:(NSString *)key notContainedIn:(NSArray *)array; - -/*! - @abstract Add a constraint to the query that requires a particular key's array - contains every element of the provided array. - - @param key The key to be constrained. - @param array The array of values to search for. - */ -- (void)whereKey:(NSString *)key containsAllObjectsInArray:(NSArray *)array; - -///-------------------------------------- -/// @name Adding Location Constraints -///-------------------------------------- - -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) - be near a reference point. - - @discussion Distance is calculated based on angular distance on a sphere. Results will be sorted by distance - from reference point. - - @param key The key to be constrained. - @param geopoint The reference point represented as a . - */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint; - -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) - be near a reference point and within the maximum distance specified (in miles). - - @discussion Distance is calculated based on a spherical coordinate system. - Results will be sorted by distance (nearest to farthest) from the reference point. - - @param key The key to be constrained. - @param geopoint The reference point represented as a . - @param maxDistance Maximum distance in miles. - */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinMiles:(double)maxDistance; - -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) - be near a reference point and within the maximum distance specified (in kilometers). - - @discussion Distance is calculated based on a spherical coordinate system. - Results will be sorted by distance (nearest to farthest) from the reference point. - - @param key The key to be constrained. - @param geopoint The reference point represented as a . - @param maxDistance Maximum distance in kilometers. - */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinKilometers:(double)maxDistance; - -/*! - Add a constraint to the query that requires a particular key's coordinates (specified via ) be near - a reference point and within the maximum distance specified (in radians). Distance is calculated based on - angular distance on a sphere. Results will be sorted by distance (nearest to farthest) from the reference point. - - @param key The key to be constrained. - @param geopoint The reference point as a . - @param maxDistance Maximum distance in radians. - */ -- (void)whereKey:(NSString *)key nearGeoPoint:(PFGeoPoint *)geopoint withinRadians:(double)maxDistance; - -/*! - @abstract Add a constraint to the query that requires a particular key's coordinates (specified via ) be - contained within a given rectangular geographic bounding box. - - @param key The key to be constrained. - @param southwest The lower-left inclusive corner of the box. - @param northeast The upper-right inclusive corner of the box. - */ -- (void)whereKey:(NSString *)key withinGeoBoxFromSouthwest:(PFGeoPoint *)southwest toNortheast:(PFGeoPoint *)northeast; - -///-------------------------------------- -/// @name Adding String Constraints -///-------------------------------------- - -/*! - @abstract Add a regular expression constraint for finding string values that match the provided regular expression. - - @warning This may be slow for large datasets. - - @param key The key that the string to match is stored in. - @param regex The regular expression pattern to match. - */ -- (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex; - -/*! - @abstract Add a regular expression constraint for finding string values that match the provided regular expression. - - @warning This may be slow for large datasets. - - @param key The key that the string to match is stored in. - @param regex The regular expression pattern to match. - @param modifiers Any of the following supported PCRE modifiers: - - `i` - Case insensitive search - - `m` - Search across multiple lines of input - */ -- (void)whereKey:(NSString *)key matchesRegex:(NSString *)regex modifiers:(NSString *)modifiers; - -/*! - @abstract Add a constraint for finding string values that contain a provided substring. - - @warning This will be slow for large datasets. - - @param key The key that the string to match is stored in. - @param substring The substring that the value must contain. - */ -- (void)whereKey:(NSString *)key containsString:(NSString *)substring; - -/*! - @abstract Add a constraint for finding string values that start with a provided prefix. - - @discussion This will use smart indexing, so it will be fast for large datasets. - - @param key The key that the string to match is stored in. - @param prefix The substring that the value must start with. - */ -- (void)whereKey:(NSString *)key hasPrefix:(NSString *)prefix; - -/*! - @abstract Add a constraint for finding string values that end with a provided suffix. - - @warning This will be slow for large datasets. - - @param key The key that the string to match is stored in. - @param suffix The substring that the value must end with. - */ -- (void)whereKey:(NSString *)key hasSuffix:(NSString *)suffix; - -///-------------------------------------- -/// @name Adding Subqueries -///-------------------------------------- - -/*! - Returns a `PFQuery` that is the `or` of the passed in queries. - - @param queries The list of queries to or together. - - @returns An instance of `PFQuery` that is the `or` of the passed in queries. - */ -+ (PFQuery *)orQueryWithSubqueries:(NSArray *)queries; - -/*! - @abstract Adds a constraint that requires that a key's value matches a value in another key - in objects returned by a sub query. - - @param key The key that the value is stored. - @param otherKey The key in objects in the returned by the sub query whose value should match. - @param query The query to run. - */ -- (void)whereKey:(NSString *)key matchesKey:(NSString *)otherKey inQuery:(PFQuery *)query; - -/*! - @abstract Adds a constraint that requires that a key's value `NOT` match a value in another key - in objects returned by a sub query. - - @param key The key that the value is stored. - @param otherKey The key in objects in the returned by the sub query whose value should match. - @param query The query to run. - */ -- (void)whereKey:(NSString *)key doesNotMatchKey:(NSString *)otherKey inQuery:(PFQuery *)query; - -/*! - @abstract Add a constraint that requires that a key's value matches a `PFQuery` constraint. - - @warning This only works where the key's values are s or arrays of s. - - @param key The key that the value is stored in - @param query The query the value should match - */ -- (void)whereKey:(NSString *)key matchesQuery:(PFQuery *)query; - -/*! - @abstract Add a constraint that requires that a key's value to not match a `PFQuery` constraint. - - @warning This only works where the key's values are s or arrays of s. - - @param key The key that the value is stored in - @param query The query the value should not match - */ -- (void)whereKey:(NSString *)key doesNotMatchQuery:(PFQuery *)query; - -///-------------------------------------- -/// @name Sorting -///-------------------------------------- - -/*! - @abstract Sort the results in *ascending* order with the given key. - - @param key The key to order by. - */ -- (void)orderByAscending:(NSString *)key; - -/*! - @abstract Additionally sort in *ascending* order by the given key. - - @discussion The previous keys provided will precedence over this key. - - @param key The key to order bye - */ -- (void)addAscendingOrder:(NSString *)key; - -/*! - @abstract Sort the results in *descending* order with the given key. - - @param key The key to order by. - */ -- (void)orderByDescending:(NSString *)key; - -/*! - @abstract Additionally sort in *descending* order by the given key. - - @discussion The previous keys provided will precedence over this key. - - @param key The key to order bye - */ -- (void)addDescendingOrder:(NSString *)key; - -/*! - @abstract Sort the results using a given sort descriptor. - - @param sortDescriptor The `NSSortDescriptor` to use to sort the results of the query. - */ -- (void)orderBySortDescriptor:(NSSortDescriptor *)sortDescriptor; - -/*! - @abstract Sort the results using a given array of sort descriptors. - - @param sortDescriptors An array of `NSSortDescriptor` objects to use to sort the results of the query. - */ -- (void)orderBySortDescriptors:(NSArray *)sortDescriptors; - -///-------------------------------------- -/// @name Getting Objects by ID -///-------------------------------------- - -/*! - @abstract Returns a with a given class and id. - - @param objectClass The class name for the object that is being requested. - @param objectId The id of the object that is being requested. - - @returns The if found. Returns `nil` if the object isn't found, or if there was an error. - */ -+ (PFObject *)getObjectOfClass:(NSString *)objectClass - objectId:(NSString *)objectId; - -/*! - @abstract Returns a with a given class and id and sets an error if necessary. - - @param objectClass The class name for the object that is being requested. - @param objectId The id of the object that is being requested. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns The if found. Returns `nil` if the object isn't found, or if there was an `error`. - */ -+ (PFObject *)getObjectOfClass:(NSString *)objectClass - objectId:(NSString *)objectId - error:(NSError **)error; - -/*! - @abstract Returns a with the given id. - - @warning This method mutates the query. - It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object that is being requested. - - @returns The if found. Returns nil if the object isn't found, or if there was an error. - */ -- (PFObject *)getObjectWithId:(NSString *)objectId; - -/*! - @abstract Returns a with the given id and sets an error if necessary. - - @warning This method mutates the query. - It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object that is being requested. - @param error Pointer to an `NSError` that will be set if necessary. - - @returns The if found. Returns nil if the object isn't found, or if there was an error. - */ -- (PFObject *)getObjectWithId:(NSString *)objectId error:(NSError **)error; - -/*! - @abstract Gets a asynchronously and calls the given block with the result. - - @warning This method mutates the query. - It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object that is being requested. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)getObjectInBackgroundWithId:(NSString *)objectId; - -/*! - @asbtract Gets a asynchronously and calls the given block with the result. - - @warning This method mutates the query. - It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object that is being requested. - @param block The block to execute. - The block should have the following argument signature: `^(NSArray *object, NSError *error)` - */ -- (void)getObjectInBackgroundWithId:(NSString *)objectId - block:(PFObjectResultBlock)block; - -/*! - @abstract Gets a asynchronously. - - This mutates the PFQuery. It will reset limit to `1`, skip to `0` and remove all conditions, leaving only `objectId`. - - @param objectId The id of the object being requested. - @param target The target for the callback selector. - @param selector The selector for the callback. - It should have the following signature: `(void)callbackWithResult:(id)result error:(NSError *)error`. - Result will be `nil` if error is set and vice versa. - */ -- (void)getObjectInBackgroundWithId:(NSString *)objectId - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting User Objects -///-------------------------------------- - -/*! - @asbtract Returns a with a given id. - - @param objectId The id of the object that is being requested. - - @returns The PFUser if found. Returns nil if the object isn't found, or if there was an error. - */ -+ (PFUser *)getUserObjectWithId:(NSString *)objectId; - -/*! - Returns a PFUser with a given class and id and sets an error if necessary. - @param objectId The id of the object that is being requested. - @param error Pointer to an NSError that will be set if necessary. - @result The PFUser if found. Returns nil if the object isn't found, or if there was an error. - */ -+ (PFUser *)getUserObjectWithId:(NSString *)objectId - error:(NSError **)error; - -/*! - @deprecated Please use [PFUser query] instead. - */ -+ (PFQuery *)queryForUser PARSE_DEPRECATED("Use [PFUser query] instead."); - -///-------------------------------------- -/// @name Getting all Matches for a Query -///-------------------------------------- - -/*! - @asbtract Finds objects *synchronously* based on the constructed query. - - @returns Returns an array of objects that were found. - */ -- (NSArray *)findObjects; - -/*! - @abstract Finds objects *synchronously* based on the constructed query and sets an error if there was one. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns an array of objects that were found. - */ -- (NSArray *)findObjects:(NSError **)error; - -/*! - @asbtract Finds objects *asynchronously* and sets the `NSArray` of objects as a result of the task. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)findObjectsInBackground; - -/*! - @abstract Finds objects *asynchronously* and calls the given block with the results. - - @param block The block to execute. - It should have the following argument signature: `^(NSArray *objects, NSError *error)` - */ -- (void)findObjectsInBackgroundWithBlock:(PFArrayResultBlock)block; - -/*! - @abstract Finds objects *asynchronously* and calls the given callback with the results. - - @param target The object to call the selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(id)result error:(NSError *)error`. - Result will be `nil` if error is set and vice versa. - */ -- (void)findObjectsInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Getting the First Match in a Query -///-------------------------------------- - -/*! - @abstract Gets an object *synchronously* based on the constructed query. - - @warning This method mutates the query. It will reset the limit to `1`. - - @returns Returns a , or `nil` if none was found. - */ -- (PFObject *)getFirstObject; - -/*! - @abstract Gets an object *synchronously* based on the constructed query and sets an error if any occurred. - - @warning This method mutates the query. It will reset the limit to `1`. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns a , or `nil` if none was found. - */ -- (PFObject *)getFirstObject:(NSError **)error; - -/*! - @abstract Gets an object *asynchronously* and sets it as a result of the task. - - @warning This method mutates the query. It will reset the limit to `1`. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)getFirstObjectInBackground; - -/*! - @abstract Gets an object *asynchronously* and calls the given block with the result. - - @warning This method mutates the query. It will reset the limit to `1`. - - @param block The block to execute. - It should have the following argument signature: `^(PFObject *object, NSError *error)`. - `result` will be `nil` if `error` is set OR no object was found matching the query. - `error` will be `nil` if `result` is set OR if the query succeeded, but found no results. - */ -- (void)getFirstObjectInBackgroundWithBlock:(PFObjectResultBlock)block; - -/*! - @abstract Gets an object *asynchronously* and calls the given callback with the results. - - @warning This method mutates the query. It will reset the limit to `1`. - - @param target The object to call the selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(PFObject *)result error:(NSError *)error`. - `result` will be `nil` if `error` is set OR no object was found matching the query. - `error` will be `nil` if `result` is set OR if the query succeeded, but found no results. - */ -- (void)getFirstObjectInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Counting the Matches in a Query -///-------------------------------------- - -/*! - @abstract Counts objects *synchronously* based on the constructed query. - - @returns Returns the number of objects that match the query, or `-1` if there is an error. - */ -- (NSInteger)countObjects; - -/*! - @abstract Counts objects *synchronously* based on the constructed query and sets an error if there was one. - - @param error Pointer to an `NSError` that will be set if necessary. - - @returns Returns the number of objects that match the query, or `-1` if there is an error. - */ -- (NSInteger)countObjects:(NSError **)error; - -/*! - @abstract Counts objects *asynchronously* and sets `NSNumber` with count as a result of the task. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)countObjectsInBackground; - -/*! - @abstract Counts objects *asynchronously* and calls the given block with the counts. - - @param block The block to execute. - It should have the following argument signature: `^(int count, NSError *error)` - */ -- (void)countObjectsInBackgroundWithBlock:(PFIntegerResultBlock)block; - -/*! - @abstract Counts objects *asynchronously* and calls the given callback with the count. - - @param target The object to call the selector on. - @param selector The selector to call. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -- (void)countObjectsInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Cancelling a Query -///-------------------------------------- - -/*! - @asbtract Cancels the current network request (if any). Ensures that callbacks won't be called. - */ -- (void)cancel; - -///-------------------------------------- -/// @name Paginating Results -///-------------------------------------- - -/*! - @abstract A limit on the number of objects to return. The default limit is `100`, with a - maximum of 1000 results being returned at a time. - - @warning If you are calling `findObjects` with `limit = 1`, you may find it easier to use `getFirst` instead. - */ -@property (nonatomic, assign) NSInteger limit; - -/*! - @abstract The number of objects to skip before returning any. - */ -@property (nonatomic, assign) NSInteger skip; - -///-------------------------------------- -/// @name Controlling Caching Behavior -///-------------------------------------- - -/*! - @abstract The cache policy to use for requests. - - Not allowed when Pinning is enabled. - - @see fromLocalDatastore: - @see fromPin: - @see fromPinWithName: - */ -@property (assign, readwrite) PFCachePolicy cachePolicy; - -/* ! - @asbtract The age after which a cached value will be ignored - */ -@property (assign, readwrite) NSTimeInterval maxCacheAge; - -/*! - @abstract Returns whether there is a cached result for this query. - - @result `YES` if there is a cached result for this query, otherwise `NO`. - */ -- (BOOL)hasCachedResult; - -/*! - @abstract Clears the cached result for this query. If there is no cached result, this is a noop. - */ -- (void)clearCachedResult; - -/*! - @abstract Clears the cached results for all queries. - */ -+ (void)clearAllCachedResults; - -///-------------------------------------- -/// @name Query Source -///-------------------------------------- - -/*! - @abstract Change the source of this query to all pinned objects. - - Requires Pinning to be enabled. - - @see cachePolicy - */ -- (PFQuery *)fromLocalDatastore; - -/*! - @abstract Change the source of this query to the default group of pinned objects. - - Requires Pinning to be enabled. - - @see PFObjectDefaultPin - @see cachePolicy - */ -- (PFQuery *)fromPin; - -/*! - @abstract Change the source of this query to a specific group of pinned objects. - - Requires Pinning to be enabled. - - @param name The pinned group. - - @see PFObjectDefaultPin - @see cachePolicy - */ -- (PFQuery *)fromPinWithName:(NSString *)name; - -///-------------------------------------- -/// @name Advanced Settings -///-------------------------------------- - -/*! - @abstract Whether or not performance tracing should be done on the query. - - @warning This should not be set to `YES` in most cases. - */ -@property (nonatomic, assign) BOOL trace; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFQueryTableViewController.h b/iOS/Parse.framework/Versions/Current/Headers/PFQueryTableViewController.h deleted file mode 100644 index 27c6f2c..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFQueryTableViewController.h +++ /dev/null @@ -1,182 +0,0 @@ -// -// PFUITableViewController.h -// Parse -// -// Created by James Yu on 11/20/11. -// Copyright (c) 2011 Parse, LLC. All rights reserved. -// - -#import - -#import "PFQuery.h" -#import "PFTableViewCell.h" - -/*! - This class allows you to think about a one-to-one mapping between a PFObject and a UITableViewCell, - rather than having to juggle index paths. - - You also get the following features out of the box: - - - Pagination with a cell that can be tapped to load the next page. - - Pull-to-refresh table view header. - - Automatic downloading and displaying of remote images in cells. - - Loading screen, shown before any data is loaded. - - Automatic loading and management of the objects array. - - Various methods that can be overridden to customize behavior at major events in the data cycle. - */ -@interface PFQueryTableViewController : UITableViewController - -/*! @name Creating a PFQueryTableViewController */ - -/*! - The designated initializer. - Initializes with a class name of the PFObjects that will be associated with this table. - @param style The UITableViewStyle for the table - @param aClassName The class name of the PFObjects that this table will display - @result The initialized PFQueryTableViewController - */ -- (instancetype)initWithStyle:(UITableViewStyle)style className:(NSString *)aClassName; - -/*! - Initializes with a class name of the PFObjects that will be associated with this table. - @param aClassName The class name of the PFObjects that this table will display - @result The initialized PFQueryTableViewController - */ -- (instancetype)initWithClassName:(NSString *)aClassName; - -/*! @name Configuring Behavior */ - -/*! - The class of the PFObject this table will use as a datasource - */ -@property (nonatomic, strong) NSString *parseClassName; - -/*! - The key to use to display for the cell text label. - This won't apply if you override tableView:cellForRowAtIndexPath:object: - */ -@property (nonatomic, strong) NSString *textKey; - -/*! - The key to use to display for the cell image view. - This won't apply if you override tableView:cellForRowAtIndexPath:object: - */ -@property (nonatomic, strong) NSString *imageKey; - -/*! - The image to use as a placeholder for the cell images. - This won't apply if you override tableView:cellForRowAtIndexPath:object: - */ -@property (nonatomic, strong) UIImage *placeholderImage; - -/// Whether the table should use the default loading view (default:YES) -@property (nonatomic, assign) BOOL loadingViewEnabled; - -/// Whether the table should use the built-in pull-to-refresh feature (default: `YES`) -@property (nonatomic, assign) BOOL pullToRefreshEnabled; - -/*! - Whether the table should use the built-in pagination feature (default: `YES`) - */ -@property (nonatomic, assign) BOOL paginationEnabled; - -/*! - The number of objects to show per page (default: `25`) - */ -@property (nonatomic, assign) NSUInteger objectsPerPage; - -/*! - Whether the table is actively loading new data from the server - */ -@property (nonatomic, assign) BOOL isLoading; - -/*! @name Responding to Events */ - -/*! - Called when objects have loaded from Parse. If you override this method, you must - call [super objectsDidLoad:] in your implementation. - @param error The Parse error from running the PFQuery, if there was any. - */ -- (void)objectsDidLoad:(NSError *)error; - -/*! - Called when objects will loaded from Parse. If you override this method, you must - call [super objectsWillLoad] in your implementation. - */ -- (void)objectsWillLoad; - -/*! @name Accessing Results */ - -/// The array of PFObjects that is the UITableView data source -@property (nonatomic, strong, readonly) NSArray *objects; - -/*! - Returns an object at a particular indexPath. The default impementation returns - the object at indexPath.row. If you want to return objects in a different - indexPath order, like for sections, override this method. - @param indexPath The indexPath - @result The object at the specified index - */ -- (PFObject *)objectAtIndexPath:(NSIndexPath *)indexPath; - -/*! @name Querying */ - -/*! - Override to construct your own custom PFQuery to get the objects. - @result PFQuery that loadObjects will use to the objects for this table. - */ -- (PFQuery *)queryForTable; - -/*! - Clears the table of all objects. - */ -- (void)clear; - -/*! - Clears the table and loads the first page of objects. - */ -- (void)loadObjects; - -/*! - Loads the objects of the className at the specified page and appends it to the - objects already loaded and refreshes the table. - @param page The page of objects to load. - @param clear Whether to clear the table after receiving the objects. - */ -- (void)loadObjects:(NSInteger)page clear:(BOOL)clear; - -/*! - Loads the next page of objects, appends to table, and refreshes. - */ -- (void)loadNextPage; - -/*! @name Data Source Methods */ - -/*! - Override this method to customize each cell given a PFObject that is loaded. If you - don't override this method, it will use a default style cell and display either - the first data key from the object, or it will display the key as specified - with keyToDisplay. - - The cell should inherit from PFTableViewCell which is a subclass of UITableViewCell. - - @param tableView The table view object associated with this controller. - @param indexPath The indexPath of the cell. - @param object The PFObject that is associated with the cell. - @result The cell that represents this object. - */ -- (PFTableViewCell *)tableView:(UITableView *)tableView - cellForRowAtIndexPath:(NSIndexPath *)indexPath - object:(PFObject *)object; - -/*! - Override this method to customize the cell that allows the user to load the - next page when pagination is turned on. - @param tableView The table view object associated with this controller. - @param indexPath The indexPath of the cell. - @result The cell that allows the user to paginate. - */ -- (PFTableViewCell *)tableView:(UITableView *)tableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath; - - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFRelation.h b/iOS/Parse.framework/Versions/Current/Headers/PFRelation.h deleted file mode 100644 index f4254a1..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFRelation.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// PFRelation.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#else -#import -#import -#endif - -/*! - The `PFRelation` class that is used to access all of the children of a many-to-many relationship. - Each instance of `PFRelation` is associated with a particular parent object and key. - */ -@interface PFRelation : NSObject - -/*! - @abstract The name of the class of the target child objects. - */ -@property (nonatomic, strong) NSString *targetClass; - -///-------------------------------------- -/// @name Accessing Objects -///-------------------------------------- - -/*! - @abstract Returns a object that can be used to get objects in this relation. - */ -- (PFQuery *)query; - -///-------------------------------------- -/// @name Modifying Relations -///-------------------------------------- - -/*! - @abstract Adds a relation to the passed in object. - - @param object A object to add relation to. - */ -- (void)addObject:(PFObject *)object; - -/*! - @abstract Removes a relation to the passed in object. - - @param object A object to add relation to. - */ -- (void)removeObject:(PFObject *)object; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFRole.h b/iOS/Parse.framework/Versions/Current/Headers/PFRole.h deleted file mode 100644 index 3afa87c..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFRole.h +++ /dev/null @@ -1,106 +0,0 @@ -// -// PFRole.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#else -#import -#import -#endif - -/*! - The `PFRole` class represents a Role on the Parse server. - `PFRoles` represent groupings of objects for the purposes of granting permissions - (e.g. specifying a for a ). - Roles are specified by their sets of child users and child roles, - all of which are granted any permissions that the parent role has. - - Roles must have a name (which cannot be changed after creation of the role), and must specify an ACL. - */ -@interface PFRole : PFObject - -///-------------------------------------- -/// @name Creating a New Role -///-------------------------------------- - -/*! - @abstract Constructs a new `PFRole` with the given name. - If no default ACL has been specified, you must provide an ACL for the role. - - @param name The name of the Role to create. - */ -- (instancetype)initWithName:(NSString *)name; - -/*! - @abstract Constructs a new `PFRole` with the given name. - - @param name The name of the Role to create. - @param acl The ACL for this role. Roles must have an ACL. - */ -- (instancetype)initWithName:(NSString *)name acl:(PFACL *)acl; - -/*! - @abstract Constructs a new `PFRole` with the given name. - - @discussion If no default ACL has been specified, you must provide an ACL for the role. - - @param name The name of the Role to create. - */ -+ (instancetype)roleWithName:(NSString *)name; - -/*! - @abstract Constructs a new `PFRole` with the given name. - - @param name The name of the Role to create. - @param acl The ACL for this role. Roles must have an ACL. - */ -+ (instancetype)roleWithName:(NSString *)name acl:(PFACL *)acl; - -///-------------------------------------- -/// @name Role-specific Properties -///-------------------------------------- - -/*! - @abstract Gets or sets the name for a role. - - @discussion This value must be set before the role has been saved to the server, - and cannot be set once the role has been saved. - - @warning A role's name can only contain alphanumeric characters, `_`, `-`, and spaces. - */ -@property (nonatomic, copy) NSString *name; - -/*! - @abstract Gets the for the objects that are direct children of this role. - - @discussion These users are granted any privileges that this role has been granted - (e.g. read or write access through ACLs). You can add or remove users from - the role through this relation. - */ -@property (nonatomic, strong, readonly) PFRelation *users; - -/*! - @abstract Gets the for the `PFRole` objects that are direct children of this role. - - @discussion These roles' users are granted any privileges that this role has been granted - (e.g. read or write access through ACLs). You can add or remove child roles - from this role through this relation. - */ -@property (nonatomic, strong, readonly) PFRelation *roles; - -///-------------------------------------- -/// @name Querying for Roles -///-------------------------------------- - -/*! - @abstract Creates a for `PFRole` objects. - */ -+ (PFQuery *)query; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFSignUpView.h b/iOS/Parse.framework/Versions/Current/Headers/PFSignUpView.h deleted file mode 100644 index 52f07c6..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFSignUpView.h +++ /dev/null @@ -1,88 +0,0 @@ -// -// PFLogInView.h -// Parse -// -// Created by Qian Wang on 3/9/12. -// Copyright (c) 2012. All rights reserved. -// - -#import - -/*! - A bitmask specifying the sign up elements which are enabled in the view. - @see PFSignUpViewController - @see PFSignUpView - */ -typedef NS_OPTIONS(NSInteger, PFSignUpFields) { - /*! Username and password fields. */ - PFSignUpFieldsUsernameAndPassword = 0, - /*! Email field. */ - PFSignUpFieldsEmail = 1 << 0, - /*! This field can be used for something else. */ - PFSignUpFieldsAdditional = 1 << 1, - /*! Sign Up Button */ - PFSignUpFieldsSignUpButton = 1 << 2, - /*! Dismiss Button */ - PFSignUpFieldsDismissButton = 1 << 3, - /*! Default value. Combines Username, Password, Email, Sign Up and Dismiss Buttons. */ - PFSignUpFieldsDefault = (PFSignUpFieldsUsernameAndPassword | - PFSignUpFieldsEmail | - PFSignUpFieldsSignUpButton | - PFSignUpFieldsDismissButton) -}; - -/*! - The class provides a standard sign up interface for authenticating a PFUser. - */ -@interface PFSignUpView : UIScrollView - -/*! @name Creating Sign Up View */ - -/*! - Initializes the view with the specified sign up elements. - @param fields A bitmask specifying the sign up elements which are enabled in the view - @see PFSignUpFields - */ -- (instancetype)initWithFields:(PFSignUpFields)fields; - -/*! - The view controller that will present this view. - Used to lay out elements correctly when the presenting view controller has translucent elements. - */ -@property (nonatomic, strong) UIViewController *presentingViewController; - -/*! @name Customizing the Logo */ - -/// The logo. By default, it is the Parse logo. -@property (nonatomic, strong) UIView *logo; - -/*! @name Prompt for email as username. */ - -/// By default, this is set to NO. -@property (nonatomic, assign) BOOL emailAsUsername; - -/*! @name Accessing Sign Up Elements */ - -/// The bitmask which specifies the enabled sign up elements in the view -@property (nonatomic, assign, readonly) PFSignUpFields fields; - -/// The username text field. -@property (nonatomic, strong, readonly) UITextField *usernameField; - -/// The password text field. -@property (nonatomic, strong, readonly) UITextField *passwordField; - -/// The email text field. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UITextField *emailField; - -/// The additional text field. It is nil if the element is not enabled. -/// This field is intended to be customized. -@property (nonatomic, strong, readonly) UITextField *additionalField; - -/// The sign up button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *signUpButton; - -/// The dismiss button. It is nil if the element is not enabled. -@property (nonatomic, strong, readonly) UIButton *dismissButton; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFSignUpViewController.h b/iOS/Parse.framework/Versions/Current/Headers/PFSignUpViewController.h deleted file mode 100644 index 21c298f..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFSignUpViewController.h +++ /dev/null @@ -1,117 +0,0 @@ -// -// PFLogInViewController.h -// Parse -// -// Created by Andrew Wang on 3/8/12. -// Copyright (c) 2012. All rights reserved. -// - -#import -#import "PFSignUpView.h" -#import "PFUser.h" - -@protocol PFSignUpViewControllerDelegate; - -/*! - The class that presents and manages a standard authentication interface for signing up a PFUser. - */ -@interface PFSignUpViewController : UIViewController - -/*! @name Configuring Sign Up Elements */ - -/*! - A bitmask specifying the sign up elements which are enabled in the view. - - enum { - PFSignUpFieldsUsernameAndPassword = 0, - PFSignUpFieldsEmail = 1 << 0, - PFSignUpFieldsAdditional = 1 << 1, // this field can be used for something else - PFSignUpFieldsSignUpButton = 1 << 2, - PFSignUpFieldsDismissButton = 1 << 3, - PFSignUpFieldsDefault = PFSignUpFieldsUsernameAndPassword | PFSignUpFieldsEmail | PFSignUpFieldsSignUpButton | PFSignUpFieldsDismissButton - }; - */ -@property (nonatomic, assign) PFSignUpFields fields; - -/// The sign up view. It contains all the enabled log in elements. -@property (nonatomic, strong, readonly) PFSignUpView *signUpView; - -/*! @name Configuring Sign Up Behaviors */ - -/*! - The delegate that responds to the control events of PFSignUpViewController. - */ -@property (nonatomic, weak) id delegate; - -/*! - Minimum required password length for user signups, defaults to 0. - */ -@property (nonatomic, assign) NSUInteger minPasswordLength; - -/*! - Whether to use the email as username on the attached signUpView. - If set to YES, we'll hide the email field, prompt for the email in - the username field, and save the email into both username and email - fields on the new PFUser object. By default, this is set to NO. - */ -@property (nonatomic, assign) BOOL emailAsUsername; - -@end - -/*! @name Notifications */ - -/*! - The notification is posted immediately after the sign up succeeds. - */ -extern NSString *const PFSignUpSuccessNotification; - -/*! - The notification is posted immediately after the sign up fails. - If the delegate prevents the sign up to start, the notification is not sent. - */ -extern NSString *const PFSignUpFailureNotification; - -/*! - The notification is posted immediately after the user cancels sign up. - */ -extern NSString *const PFSignUpCancelNotification; - -/*! - The protocol defines methods a delegate of a PFSignUpViewController should implement. - All methods of the protocol are optional. - */ -@protocol PFSignUpViewControllerDelegate - -@optional - -/*! @name Customizing Behavior */ - -/*! - Sent to the delegate to determine whether the sign up request should be submitted to the server. - @param signUpController The signup view controller that is requesting the data. - @param info a dictionary which contains all sign up information that the user entered. - @result a boolean indicating whether the sign up should proceed. - */ -- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary *)info; - -/*! - Sent to the delegate when a PFUser is signed up. - @param signUpController The signup view controller where signup finished. - @param user PFUser object that is a result of the sign up. - */ -- (void)signUpViewController:(PFSignUpViewController *)signUpController didSignUpUser:(PFUser *)user; - -/*! - Sent to the delegate when the sign up attempt fails. - @param signUpController The signup view controller where signup failed. - @param error NSError object representing the error that occured. - */ -- (void)signUpViewController:(PFSignUpViewController *)signUpController didFailToSignUpWithError:(NSError *)error; - -/*! - Sent to the delegate when the sign up screen is cancelled. - @param signUpController The signup view controller where signup was cancelled. - */ -- (void)signUpViewControllerDidCancelSignUp:(PFSignUpViewController *)signUpController; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFSubclassing.h b/iOS/Parse.framework/Versions/Current/Headers/PFSubclassing.h deleted file mode 100644 index adcebbd..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFSubclassing.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// PFSubclassing.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -@class PFQuery; - -/*! - If a subclass of conforms to `PFSubclassing` and calls , - Parse framework will be able to use that class as the native class for a Parse cloud object. - - Classes conforming to this protocol should subclass and - include `PFObject+Subclass.h` in their implementation file. - This ensures the methods in the Subclass category of are exposed in its subclasses only. - */ -@protocol PFSubclassing - -/*! - @abstract Constructs an object of the most specific class known to implement . - - @discussion This method takes care to help subclasses be subclassed themselves. - For example, `[PFUser object]` returns a by default but will return an - object of a registered subclass instead if one is known. - A default implementation is provided by which should always be sufficient. - - @returns Returns the object that is instantiated. - */ -+ (instancetype)object; - -/*! - @abstract Creates a reference to an existing PFObject for use in creating associations between PFObjects. - - @discussion Calling <[PFObject isDataAvailable]> on this object will return `NO` - until <[PFObject fetchIfNeeded]> has been called. No network request will be made. - A default implementation is provided by PFObject which should always be sufficient. - - @param objectId The object id for the referenced object. - - @returns A new without data. - */ -+ (instancetype)objectWithoutDataWithObjectId:(NSString *)objectId; - -/*! - @abstract The name of the class as seen in the REST API. - */ -+ (NSString *)parseClassName; - -/*! - @abstract Create a query which returns objects of this type. - - @discussion A default implementation is provided by which should always be sufficient. - */ -+ (PFQuery *)query; - -/*! - @abstract Returns a query for objects of this type with a given predicate. - - @discussion A default implementation is provided by which should always be sufficient. - - @param predicate The predicate to create conditions from. - - @return An instance of . - - @see [PFQuery queryWithClassName:predicate:] - */ -+ (PFQuery *)queryWithPredicate:(NSPredicate *)predicate; - -/*! - @abstract Lets Parse know this class should be used to instantiate all objects with class type . - - @warning This method must be called before <[Parse setApplicationId:clientKey:]> - */ -+ (void)registerSubclass; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFTableViewCell.h b/iOS/Parse.framework/Versions/Current/Headers/PFTableViewCell.h deleted file mode 100644 index d457c7f..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFTableViewCell.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// PFImageViewCell.h -// Parse -// -// Created by Qian Wang on 5/16/12. -// Copyright (c) 2012 Parse Inc. All rights reserved. -// - -#import -#import "PFImageView.h" - -/*! - The PFTableViewCell is a table view cell which can download and display remote images stored on Parse. - - When used in a PFQueryTableViewController - downloading and displaying of the remote images - are automatically managed by the PFQueryTableViewController. - */ -@interface PFTableViewCell : UITableViewCell - -/*! - The imageView of the table view cell. - PFImageView supports remote image downloading. - */ -@property (nonatomic, strong, readonly) PFImageView *imageView; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFTwitterUtils.h b/iOS/Parse.framework/Versions/Current/Headers/PFTwitterUtils.h deleted file mode 100644 index f0c844e..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFTwitterUtils.h +++ /dev/null @@ -1,319 +0,0 @@ -// -// PFTwitterUtils.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import -#import -#import - -@class BFTask; - -/*! - The `PFTwitterUtils` class provides utility functions for working with Twitter in a Parse application. - - This class is currently for iOS only. - */ -@interface PFTwitterUtils : NSObject - -///-------------------------------------- -/// @name Interacting With Twitter -///-------------------------------------- - -/*! - @abstract Gets the instance of the object that Parse uses. - - @returns An instance of object. - */ -+ (PF_Twitter *)twitter; - -/*! - @abstract Initializes the Twitter singleton. - - @warning You must invoke this in order to use the Twitter functionality in Parse. - - @param consumerKey Your Twitter application's consumer key. - @param consumerSecret Your Twitter application's consumer secret. - */ -+ (void)initializeWithConsumerKey:(NSString *)consumerKey - consumerSecret:(NSString *)consumerSecret; - -/*! - @abstract Whether the user has their account linked to Twitter. - - @param user User to check for a Twitter link. The user must be logged in on this device. - - @returns `YES` if the user has their account linked to Twitter, otherwise `NO`. - */ -+ (BOOL)isLinkedWithUser:(PFUser *)user; - -///-------------------------------------- -/// @name Logging In & Creating Twitter-Linked Users -///-------------------------------------- - -/*! - @abstract *Asynchronously* logs in a user using Twitter. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInInBackground; - -/*! - @abstract *Asynchronously* logs in a user using Twitter. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) . - - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithBlock:(PFUserResultBlock)block; - -/*! - @abstract *Asynchronously* Logs in a user using Twitter. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @param target Target object for the selector - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError **)error`. - */ -+ (void)logInWithTarget:(id)target selector:(SEL)selector; - -/*! - @abstract *Asynchronously* logs in a user using Twitter. - - @discussion Allows you to handle user login to Twitter, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithTwitterIdInBackground:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret; - -/*! - @abstract Logs in a user using Twitter. - - @discussion Allows you to handle user login to Twitter, then provide authentication data - to log in (or create, in the case where it is a new user) the . - - @param twitterId The id of the Twitter user being linked - @param screenName The screen name of the Twitter user being linked - @param authToken The auth token for the user's session - @param authTokenSecret The auth token secret for the user's session - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithTwitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - block:(PFUserResultBlock)block; - -/*! - @abstract Logs in a user using Twitter. - - @discussion Allows you to handle user login to Twitter, then provide authentication data - to log in (or create, in the case where it is a new user) the . - - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithTwitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Linking Users with Twitter -///-------------------------------------- - -/*! - @abstract *Asynchronously* links Twitter to an existing PFUser. - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - - @deprecated Please use `[PFTwitterUtils linkUserInBackground:]` instead. - */ -+ (void)linkUser:(PFUser *)user PARSE_DEPRECATED("Please use +linkUserInBackground: instead."); - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user; - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - @param block The block to execute. - It should have the following argument signature: `^(BOOL *success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user block:(PFBooleanResultBlock)block; - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . - - @param user User to link to Twitter. - @param target Target object for the selector - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user - target:(id)target - selector:(SEL)selector; - -/*! - @abstract *Asynchronously* links Twitter to an existing PFUser asynchronously. - - @discussion Allows you to handle user login to Twitter, - then provide authentication data to link the account to the . - - @param user User to link to Twitter. - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user - twitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret; - -/*! - @abstract *Asynchronously* links Twitter to an existing . - - @discussionAllows you to handle user login to Twitter, - then provide authentication data to link the account to the . - - @param user User to link to Twitter. - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @param block The block to execute. - It should have the following argument signature: `^(BOOL *success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user - twitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - block:(PFBooleanResultBlock)block; - -/*! - @abstract Links Twitter to an existing . - - @discussion This method allows you to handle user login to Twitter, - then provide authentication data to link the account to the . - - @param user User to link to Twitter. - @param twitterId The id of the Twitter user being linked. - @param screenName The screen name of the Twitter user being linked. - @param authToken The auth token for the user's session. - @param authTokenSecret The auth token secret for the user's session. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user - twitterId:(NSString *)twitterId - screenName:(NSString *)screenName - authToken:(NSString *)authToken - authTokenSecret:(NSString *)authTokenSecret - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Unlinking Users from Twitter -///-------------------------------------- - -/*! - @abstract *Synchronously* unlinks the from a Twitter account. - - @param user User to unlink from Twitter. - - @returns Returns true if the unlink was successful. - */ -+ (BOOL)unlinkUser:(PFUser *)user; - -/*! - @abstract *Synchronously* unlinks the PFUser from a Twitter account. - - @param user User to unlink from Twitter. - @param error Error object to set on error. - - @returns Returns `YES` if the unlink was successful, otherwise `NO`. - */ -+ (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; - -/*! - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. - - @param user User to unlink from Twitter. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)unlinkUserInBackground:(PFUser *)user; - -/*! - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. - - @param user User to unlink from Twitter. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unlinkUserInBackground:(PFUser *)user - block:(PFBooleanResultBlock)block; - -/*! - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. - - @param user User to unlink from Twitter - @param target Target object for the selector - @param selector The selector that will be called when the asynchrounous request is complete. - */ -+ (void)unlinkUserInBackground:(PFUser *)user - target:(id)target - selector:(SEL)selector; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PFUser.h b/iOS/Parse.framework/Versions/Current/Headers/PFUser.h deleted file mode 100644 index 3cf9041..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PFUser.h +++ /dev/null @@ -1,416 +0,0 @@ -// -// PFUser.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#import -#import -#else -#import -#import -#import -#endif - -@class PFQuery; - -/*! - The `PFUser` class is a local representation of a user persisted to the Parse Data. - This class is a subclass of a , and retains the same functionality of a , - but also extends it with various user specific methods, like authentication, signing up, and validation uniqueness. - - Many APIs responsible for linking a `PFUser` with Facebook or Twitter have been deprecated in favor of dedicated - utilities for each social network. See , and for more information. - */ - -@interface PFUser : PFObject - -/*! - @abstract The name of the `PFUser` class in the REST API. - - @discussion This is a required method. - */ -+ (NSString *)parseClassName; - -///-------------------------------------- -/// @name Accessing the Current User -///-------------------------------------- - -/*! - @abstract Gets the currently logged in user from disk and returns an instance of it. - - @returns Returns a `PFUser` that is the currently logged in user. If there is none, returns `nil`. - */ -+ (instancetype)currentUser; - -/*! - @abstract The session token for the `PFUser`. - - @discussion This is set by the server upon successful authentication. - */ -@property (nonatomic, strong) NSString *sessionToken; - -/*! - @abstract Whether the `PFUser` was just created from a request. - - @discussion This is only set after a Facebook or Twitter login. - */ -@property (assign, readonly) BOOL isNew; - -/*! - @abstract Whether the user is an authenticated object for the device. - - @discussion An authenticated `PFUser` is one that is obtained via a or method. - An authenticated object is required in order to save (with altered values) or delete it. - - @returns Returns whether the user is authenticated. - */ -- (BOOL)isAuthenticated; - -///-------------------------------------- -/// @name Creating a New User -///-------------------------------------- - -/*! - @abstract Creates a new `PFUser` object. - - @returns Returns a new `PFUser` object. - */ -+ (PFUser *)user; - -/*! - @abstract Enables automatic creation of anonymous users. - - @discussion After calling this method, will always have a value. - The user will only be created on the server once the user has been saved, - or once an object with a relation to that user or an ACL that refers to the user has been saved. - - @warning <[PFObject saveEventually]> will not work on if an item being saved has a relation - to an automatic user that has never been saved. - */ -+ (void)enableAutomaticUser; - -/*! - @abstract The username for the `PFUser`. - */ -@property (nonatomic, strong) NSString *username; - -/**! - @abstract The password for the `PFUser`. - - @discussion This will not be filled in from the server with the password. - It is only meant to be set. - */ -@property (nonatomic, strong) NSString *password; - -/*! - @abstract The email for the `PFUser`. - */ -@property (nonatomic, strong) NSString *email; - -/*! - @abstract Signs up the user *synchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @returns Returns `YES` if the sign up was successful, otherwise `NO`. - */ -- (BOOL)signUp; - -/*! - @abstract Signs up the user *synchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @param error Error object to set on error. - - @returns Returns whether the sign up was successful. - */ -- (BOOL)signUp:(NSError **)error; - -/*! - @abstract Signs up the user *asynchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)signUpInBackground; - -/*! - @abstract Signs up the user *asynchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -- (void)signUpInBackgroundWithBlock:(PFBooleanResultBlock)block; - -/*! - @abstract Signs up the user *asynchronously*. - - @discussion This will also enforce that the username isn't already taken. - - @warning Make sure that password and username are set before calling this method. - - @param target Target object for the selector. - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -- (void)signUpInBackgroundWithTarget:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Logging In -///-------------------------------------- - -/*! - @abstract Makes a *synchronous* request to login a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - - @returns Returns an instance of the `PFUser` on success. - If login failed for either wrong password or wrong username, returns `nil`. - */ -+ (instancetype)logInWithUsername:(NSString *)username - password:(NSString *)password; - -/*! - @abstract Makes a *synchronous* request to login a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - @param error The error object to set on error. - - @returns Returns an instance of the `PFUser` on success. - If login failed for either wrong password or wrong username, returns `nil`. - */ -+ (instancetype)logInWithUsername:(NSString *)username - password:(NSString *)password - error:(NSError **)error; - -/*! - @abstract Makes an *asynchronous* request to login a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithUsernameInBackground:(NSString *)username - password:(NSString *)password; - -/*! - @abstract Makes an *asynchronous* request to login a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithUsernameInBackground:(NSString *)username - password:(NSString *)password - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Makes an *asynchronous* request to log in a user with specified credentials. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param username The username of the user. - @param password The password of the user. - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithUsernameInBackground:(NSString *)username - password:(NSString *)password - block:(PFUserResultBlock)block; - -///-------------------------------------- -/// @name Becoming a User -///-------------------------------------- - -/*! - @abstract Makes a *synchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - - @returns Returns an instance of the `PFUser` on success. - If becoming a user fails due to incorrect token, it returns `nil`. - */ -+ (instancetype)become:(NSString *)sessionToken; - -/*! - @abstract Makes a *synchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This will also cache the user locally so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - @param error The error object to set on error. - - @returns Returns an instance of the `PFUser` on success. - If becoming a user fails due to incorrect token, it returns `nil`. - */ -+ (instancetype)become:(NSString *)sessionToken - error:(NSError **)error; - -/*! - @abstract Makes an *asynchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. - This also caches the user locally so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)becomeInBackground:(NSString *)sessionToken; - -/*! - @abstract Makes an *asynchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. This also caches the user locally - so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchrounous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)becomeInBackground:(NSString *)sessionToken - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Makes an *asynchronous* request to become a user with the given session token. - - @discussion Returns an instance of the successfully logged in `PFUser`. This also caches the user locally - so that calls to will use the latest logged in user. - - @param sessionToken The session token for the user. - @param block The block to execute. The block should have the following argument signature: (PFUser *user, NSError *error) - */ -+ (void)becomeInBackground:(NSString *)sessionToken - block:(PFUserResultBlock)block; - -///-------------------------------------- -/// @name Logging Out -///-------------------------------------- - -/*! - @abstract *Synchronously* logs out the currently logged in user on disk. - */ -+ (void)logOut; - -///-------------------------------------- -/// @name Requesting a Password Reset -///-------------------------------------- - -/*! - @abstract *Synchronously* Send a password reset request for a specified email. - - @discussion If a user account exists with that email, an email will be sent to that address - with instructions on how to reset their password. - - @param email Email of the account to send a reset password request. - - @returns Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address. - */ -+ (BOOL)requestPasswordResetForEmail:(NSString *)email; - -/*! - @abstract *Synchronously* send a password reset request for a specified email and sets an error object. - - @discussion If a user account exists with that email, an email will be sent to that address - with instructions on how to reset their password. - - @param email Email of the account to send a reset password request. - @param error Error object to set on error. - @returns Returns `YES` if the reset email request is successful. `NO` - if no account was found for the email address. - */ -+ (BOOL)requestPasswordResetForEmail:(NSString *)email - error:(NSError **)error; - -/*! - @abstract Send a password reset request asynchronously for a specified email and sets an - error object. If a user account exists with that email, an email will be sent to - that address with instructions on how to reset their password. - @param email Email of the account to send a reset password request. - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)requestPasswordResetForEmailInBackground:(NSString *)email; - -/*! - @abstract Send a password reset request *asynchronously* for a specified email and sets an error object. - - @discussion If a user account exists with that email, an email will be sent to that address - with instructions on how to reset their password. - - @param email Email of the account to send a reset password request. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - `error` will be `nil` on success and set if there was an error. - `[result boolValue]` will tell you whether the call succeeded or not. - */ -+ (void)requestPasswordResetForEmailInBackground:(NSString *)email - target:(id)target - selector:(SEL)selector; - -/*! - @abstract Send a password reset request *asynchronously* for a specified email. - - @discussion If a user account exists with that email, an email will be sent to that address - with instructions on how to reset their password. - - @param email Email of the account to send a reset password request. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)requestPasswordResetForEmailInBackground:(NSString *)email - block:(PFBooleanResultBlock)block; - -///-------------------------------------- -/// @name Querying for Users -///-------------------------------------- - -/*! - @abstract Creates a for `PFUser` objects. - */ -+ (PFQuery *)query; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/PF_MBProgressHUD.h b/iOS/Parse.framework/Versions/Current/Headers/PF_MBProgressHUD.h deleted file mode 100755 index 42080df..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PF_MBProgressHUD.h +++ /dev/null @@ -1,348 +0,0 @@ -// -// MBProgressHUD.h -// Version 0.4 -// Created by Matej Bukovinski on 2.4.09. -// - -// This code is distributed under the terms and conditions of the MIT license. - -// Copyright (c) 2011 Matej Bukovinski -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -#import "PFConstants.h" - -@protocol PF_MBProgressHUDDelegate; - -///////////////////////////////////////////////////////////////////////////////////////////// - -typedef enum { - /** Progress is shown using an UIActivityIndicatorView. This is the default. */ - PF_MBProgressHUDModeIndeterminate, - /** Progress is shown using a MBRoundProgressView. */ - PF_MBProgressHUDModeDeterminate, - /** Shows a custom view */ - PF_MBProgressHUDModeCustomView -} PF_MBProgressHUDMode; - -typedef enum { - /** Opacity animation */ - PF_MBProgressHUDAnimationFade, - /** Opacity + scale animation */ - PF_MBProgressHUDAnimationZoom -} PF_MBProgressHUDAnimation; - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. - * - * This is a simple drop-in class for displaying a progress HUD view similar to Apples private UIProgressHUD class. - * The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all - * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is - * drawn centered as a rounded semi-transparent view witch resizes depending on the user specified content. - * - * This view supports three modes of operation: - * - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView - * - MBProgressHUDModeDeterminate - shows a custom round progress indicator (MBRoundProgressView) - * - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (@see customView) - * - * All three modes can have optional labels assigned: - * - If the labelText property is set and non-empty then a label containing the provided content is placed below the - * indicator view. - * - If also the detailsLabelText property is set then another label is placed below the first label. - */ -@interface PF_MBProgressHUD : UIView { - PF_MBProgressHUDMode mode; - -#if __has_feature(objc_arc) - id __weak delegate; -#else - id delegate; -#endif - - SEL methodForExecution; - id targetForExecution; - id objectForExecution; - BOOL useAnimation; - - UILabel *label; - UILabel *detailsLabel; - - float progress; - - NSString *labelText; - NSString *detailsLabelText; - - BOOL isFinished; - - CGAffineTransform rotationTransform; -} - -/** - * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. - * - * @param view The view that the HUD will be added to - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return A reference to the created HUD. - * - * @see hideHUDForView:animated: - */ -+ (PF_MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; - -/** - * Finds a HUD sibview and hides it. The counterpart to this method is showHUDAddedTo:animated:. - * - * @param view The view that is going to be searched for a HUD subview. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return YES if a HUD was found and removed, NO otherwise. - * - * @see hideHUDForView:animated: - */ -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; - -/** - * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with - * window.bounds as the parameter. - * - * @param window The window instance that will provide the bounds for the HUD. Should probably be the same instance as - * the HUD's superview (i.e., the window that the HUD will be added to). - */ -- (id)initWithWindow:(UIWindow *)window; - -/** - * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with - * view.bounds as the parameter - * - * @param view The view instance that will provide the bounds for the HUD. Should probably be the same instance as - * the HUD's superview (i.e., the view that the HUD will be added to). - */ -- (id)initWithView:(UIView *)view; - -/** - * The UIView (i.g., a UIIMageView) to be shown when the HUD is in MBProgressHUDModeCustomView. - * For best results use a 37 by 37 pixel view (so the bounds match the build in indicator bounds). - */ -@property (strong) UIView *customView; - -/** - * MBProgressHUD operation mode. Switches between indeterminate (MBProgressHUDModeIndeterminate) and determinate - * progress (MBProgressHUDModeDeterminate). The default is MBProgressHUDModeIndeterminate. - * - * @see MBProgressHUDMode - */ -@property (assign) PF_MBProgressHUDMode mode; - -/** - * The animation type that should be used when the HUD is shown and hidden. - * - * @see MBProgressHUDAnimation - */ -@property (assign) PF_MBProgressHUDAnimation animationType; - -/** - * The HUD delegate object. If set the delegate will receive hudWasHidden callbacks when the HUD was hidden. The - * delegate should conform to the MBProgressHUDDelegate protocol and implement the hudWasHidden method. The delegate - * object will not be retained. - */ -@property (weak) id delegate; - -/** - * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit - * the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or - * set to @"", then no message is displayed. - */ -@property (copy) NSString *labelText; - -/** - * An optional details message displayed below the labelText message. This message is displayed only if the labelText - * property is also set and is different from an empty string (@""). - */ -@property (copy) NSString *detailsLabelText; - -/** - * The opacity of the HUD window. Defaults to 0.9 (90% opacity). - */ -@property (assign) float opacity; - -/** - * The x-axis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float xOffset; - -/** - * The y-ayis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float yOffset; - -/** - * The amounth of space between the HUD edge and the HUD elements (labels, indicators or custom views). - * - * Defaults to 20.0 - */ -@property (assign) float margin; - -/** - * Cover the HUD background view with a radial gradient. - */ -@property (assign) BOOL dimBackground; - -/* - * Grace period is the time (in seconds) that the invoked method may be run without - * showing the HUD. If the task finishes befor the grace time runs out, the HUD will - * not be shown at all. - * This may be used to prevent HUD display for very short tasks. - * Defaults to 0 (no grace time). - * Grace time functionality is only supported when the task status is known! - * @see taskInProgress - */ -@property (assign) float graceTime; - - -/** - * The minimum time (in seconds) that the HUD is shown. - * This avoids the problem of the HUD being shown and than instantly hidden. - * Defaults to 0 (no minimum show time). - */ -@property (assign) float minShowTime; - -/** - * Indicates that the executed operation is in progress. Needed for correct graceTime operation. - * If you don't set a graceTime (different than 0.0) this does nothing. - * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:. - * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly), - * you need to set this property when your task starts and completes in order to have normal graceTime - * functunality. - */ -@property (assign) BOOL taskInProgress; - -/** - * Removes the HUD from it's parent view when hidden. - * Defaults to NO. - */ -@property (assign) BOOL removeFromSuperViewOnHide; - -/** - * Font to be used for the main label. Set this property if the default is not adequate. - */ -@property (strong) UIFont* labelFont; - -/** - * Font to be used for the details label. Set this property if the default is not adequate. - */ -@property (strong) UIFont* detailsLabelFont; - -/** - * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. - */ -@property (assign) float progress; - - -/** - * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so - * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread - * (e.g., when using something like NSOperation or calling an asynchronous call like NSUrlRequest). - * - * If you need to perform a blocking thask on the main thread, you can try spining the run loop imeidiately after calling this - * method by using: - * - * [[NSRunLoop currentRunLoop] runUntilDate:[NSDate distantPast]]; - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - */ -- (void)show:(BOOL)animated; - -/** - * Hide the HUD. This still calls the hudWasHidden delegate. This is the counterpart of the hide: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - */ -- (void)hide:(BOOL)animated; - -/** - * Hide the HUD after a delay. This still calls the hudWasHidden delegate. This is the counterpart of the hide: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @param delay Delay in secons until the HUD is hidden. - */ -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay; - -/** - * Shows the HUD while a background task is executing in a new thread, then hides the HUD. - * - * This method also takes care of NSAutoreleasePools so your method does not have to be concerned with setting up a - * pool. - * - * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread. - * @param target The object that the target method belongs to. - * @param object An optional object to be passed to the method. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - */ -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated; - -@end - -///////////////////////////////////////////////////////////////////////////////////////////// - -@protocol PF_MBProgressHUDDelegate - -@optional - -/** - * Called after the HUD was fully hidden from the screen. - */ -- (void)hudWasHidden:(PF_MBProgressHUD *)hud; - -/** - * @deprecated use hudWasHidden: instead - * @see hudWasHidden: - */ -- (void)hudWasHidden PARSE_DEPRECATED("Use -hudWasHidden: instead."); - -@end - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** - * A progress view for showing definite progress by filling up a circle (pie chart). - */ -@interface PF_MBRoundProgressView : UIView { -@private - float _progress; -} - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -@end - -///////////////////////////////////////////////////////////////////////////////////////////// - diff --git a/iOS/Parse.framework/Versions/Current/Headers/PF_Twitter.h b/iOS/Parse.framework/Versions/Current/Headers/PF_Twitter.h deleted file mode 100644 index e2a27fb..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/PF_Twitter.h +++ /dev/null @@ -1,85 +0,0 @@ -// -// PF_Twitter.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -@class BFTask; - -/*! - The `PF_Twitter` class is a simple interface for interacting with the Twitter REST API, - automating sign-in and OAuth signing of requests against the API. - */ -@interface PF_Twitter : NSObject { -@private - NSString *consumerKey; - NSString *consumerSecret; - NSString *authToken; - NSString *authTokenSecret; - NSString *userId; - NSString *screenName; -} - -/*! - @abstract Consumer key of the application that is used to authorize with Twitter. - */ -@property (nonatomic, copy) NSString *consumerKey; - -/*! - @abstract Consumer secret of the application that is used to authorize with Twitter. - */ -@property (nonatomic, copy) NSString *consumerSecret; - -/*! - @abstract Auth token for the current user. - */ -@property (nonatomic, copy) NSString *authToken; - -/*! - @abstract Auth token secret for the current user. - */ -@property (nonatomic, copy) NSString *authTokenSecret; - -/*! - @abstract Twitter user id of the currently signed in user. - */ -@property (nonatomic, copy) NSString *userId; - -/*! - @abstract Twitter screen name of the currently signed in user. - */ -@property (nonatomic, copy) NSString *screenName; - -/*! - @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties - if the Twitter user grants permission to the application. - - @returns The task, that encapsulates the work being done. - */ -- (BFTask *)authorizeInBackground; - -/*! - @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties - if the Twitter user grants permission to the application. - - @param success Invoked upon successful authorization. - @param failure Invoked upon an error occurring in the authorization process. - @param cancel Invoked when the user cancels authorization. - */ -- (void)authorizeWithSuccess:(void (^)(void))success - failure:(void (^)(NSError *error))failure - cancel:(void (^)(void))cancel; - -/*! - @abstract Adds a 3-legged OAuth signature to an `NSMutableURLRequest` based - upon the properties set for the Twitter object. - - @discussion Use this function to sign requests being made to the Twitter API. - - @param request Request to sign. - */ -- (void)signRequest:(NSMutableURLRequest *)request; - -@end diff --git a/iOS/Parse.framework/Versions/Current/Headers/Parse.h b/iOS/Parse.framework/Versions/Current/Headers/Parse.h deleted file mode 100644 index 36910d3..0000000 --- a/iOS/Parse.framework/Versions/Current/Headers/Parse.h +++ /dev/null @@ -1,114 +0,0 @@ -// -// Parse.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -#else - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -#endif - -/*! - The `Parse` class contains static functions that handle global configuration for the Parse framework. - */ -@interface Parse : NSObject - -///-------------------------------------- -/// @name Connecting to Parse -///-------------------------------------- - -/*! - @abstract Sets the applicationId and clientKey of your application. - - @param applicationId The application id of your Parse application. - @param clientKey The client key of your Parse application. - */ -+ (void)setApplicationId:(NSString *)applicationId clientKey:(NSString *)clientKey; - -/*! - @abstract The current application id that was used to configure Parse framework. - */ -+ (NSString *)getApplicationId; - -/*! - @abstract The current client key that was used to configure Parse framework. - */ -+ (NSString *)getClientKey; - -///-------------------------------------- -/// @name Enabling Local Datastore -///-------------------------------------- - -/*! - @abstract 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; - -#if PARSE_IOS_ONLY - -///-------------------------------------- -/// @name Configuring UI Settings -///-------------------------------------- - -/*! - @abstract Set whether to show offline messages when using a Parse view or view controller related classes. - - @param enabled Whether a `UIAlertView` should be shown when the device is offline - and network access is required from a view or view controller. - */ -+ (void)offlineMessagesEnabled:(BOOL)enabled; - -/*! - @abstract 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. - - @param enabled Whether a `UIAlertView` should be shown when an error occurs. - */ -+ (void)errorMessagesEnabled:(BOOL)enabled; - -#endif - -@end diff --git a/iOS/Parse.framework/Versions/Current/Parse b/iOS/Parse.framework/Versions/Current/Parse deleted file mode 100644 index f8df528..0000000 Binary files a/iOS/Parse.framework/Versions/Current/Parse and /dev/null differ diff --git a/iOS/Parse.framework/Versions/Current/Resources/Info.plist b/iOS/Parse.framework/Versions/Current/Resources/Info.plist deleted file mode 100644 index 5d39d5f..0000000 --- a/iOS/Parse.framework/Versions/Current/Resources/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Parse - CFBundleIdentifier - com.parse.Parse - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.4.0 - CFBundleSignature - ???? - CFBundleVersion - 1.4.0 - - diff --git a/iOS/Parse.framework/Versions/Current/Resources/Localizable.strings b/iOS/Parse.framework/Versions/Current/Resources/Localizable.strings deleted file mode 100644 index 5248130..0000000 Binary files a/iOS/Parse.framework/Versions/Current/Resources/Localizable.strings and /dev/null differ diff --git a/iOS/Parse.framework/en.lproj/Parse.strings b/iOS/Parse.framework/en.lproj/Parse.strings new file mode 100644 index 0000000..815195a Binary files /dev/null and b/iOS/Parse.framework/en.lproj/Parse.strings differ diff --git a/iOS/Parse.framework/third_party_licenses.txt b/iOS/Parse.framework/third_party_licenses.txt index dcea806..a49d8d1 100644 --- a/iOS/Parse.framework/third_party_licenses.txt +++ b/iOS/Parse.framework/third_party_licenses.txt @@ -1,92 +1,68 @@ -THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE PARSE PRODUCT. - ------ - -The following software may be included in this product: AFNetworking. This software contains the following license and notice below: - -Copyright (c) 2011 Gowalla (http://gowalla.com/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: OAuthCore. This software contains the following license and notice below: - -Copyright (C) 2012 Loren Brichter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: google-breakpad. This software contains the following license and notice below: - -Copyright (c) 2006, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. -* Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------- - -Copyright 2001-2004 Unicode, Inc. - -Disclaimer - -This source code is provided as is by Unicode, Inc. No claims are -made as to fitness for any particular purpose. No warranties of any -kind are expressed or implied. The recipient agrees to determine -applicability of information provided. If this file has been -purchased on magnetic or optical media from Unicode, Inc., the -sole remedy for any claim will be exchange of defective media -within 90 days of receipt. - -Limitations on Rights to Redistribute This Code - -Unicode, Inc. hereby grants the right to freely use the information -supplied in this file in the creation of products supporting the -Unicode Standard, and to make copies of this file in any form -for internal or external distribution as long as this notice -remains attached. +THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE PARSE PRODUCT. + +----- + +The following software may be included in this product: OAuthCore. This software contains the following license and notice below: + +Copyright (C) 2012 Loren Brichter + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: google-breakpad. This software contains the following license and notice below: + +Copyright (c) 2006, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- + +Copyright 2001-2004 Unicode, Inc. + +Disclaimer + +This source code is provided as is by Unicode, Inc. No claims are +made as to fitness for any particular purpose. No warranties of any +kind are expressed or implied. The recipient agrees to determine +applicability of information provided. If this file has been +purchased on magnetic or optical media from Unicode, Inc., the +sole remedy for any claim will be exchange of defective media +within 90 days of receipt. + +Limitations on Rights to Redistribute This Code + +Unicode, Inc. hereby grants the right to freely use the information +supplied in this file in the creation of products supporting the +Unicode Standard, and to make copies of this file in any form +for internal or external distribution as long as this notice +remains attached. diff --git a/iOS/ParseCrashReporting.framework/Headers/ParseCrashReporting.h b/iOS/ParseCrashReporting.framework/Headers/ParseCrashReporting.h deleted file mode 100644 index 6c4c6a0..0000000 --- a/iOS/ParseCrashReporting.framework/Headers/ParseCrashReporting.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// ParseCrashReporting.h -// Parse -// -// Created by Nikita Lutsenko on 8/6/14. -// Copyright (c) 2014 Parse Inc. All rights reserved. -// - -#import - -/*! - The `ParseCrashReporting` class is responsible for enabling crash reporting in your application. -*/ -@interface ParseCrashReporting : NSObject - -/* - @name Crash Reporting - */ - -/*! - Enables crash reporting for your app. - This must be called before you set Application ID and Client Key on Parse. - */ -+ (void)enable; - -/*! - Indicates whether crash reporting is currently enabled. - @return `YES` if crash reporting is enabled, `NO` - otherwise. - */ -+ (BOOL)isCrashReportingEnabled; - -@end diff --git a/iOS/ParseCrashReporting.framework/Info.plist b/iOS/ParseCrashReporting.framework/Info.plist deleted file mode 100644 index e4cadae..0000000 Binary files a/iOS/ParseCrashReporting.framework/Info.plist and /dev/null differ diff --git a/iOS/ParseCrashReporting.framework/Modules/module.modulemap b/iOS/ParseCrashReporting.framework/Modules/module.modulemap deleted file mode 100644 index 05c6588..0000000 --- a/iOS/ParseCrashReporting.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module ParseCrashReporting { - umbrella header "ParseCrashReporting.h" - - export * - module * { export * } -} diff --git a/iOS/ParseCrashReporting.framework/ParseCrashReporting b/iOS/ParseCrashReporting.framework/ParseCrashReporting deleted file mode 100644 index dbd3724..0000000 Binary files a/iOS/ParseCrashReporting.framework/ParseCrashReporting and /dev/null differ diff --git a/iOS/ParseCrashReporting.framework/third_party_licenses.txt b/iOS/ParseCrashReporting.framework/third_party_licenses.txt deleted file mode 100644 index dcea806..0000000 --- a/iOS/ParseCrashReporting.framework/third_party_licenses.txt +++ /dev/null @@ -1,92 +0,0 @@ -THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE PARSE PRODUCT. - ------ - -The following software may be included in this product: AFNetworking. This software contains the following license and notice below: - -Copyright (c) 2011 Gowalla (http://gowalla.com/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: OAuthCore. This software contains the following license and notice below: - -Copyright (C) 2012 Loren Brichter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: google-breakpad. This software contains the following license and notice below: - -Copyright (c) 2006, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. -* Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------- - -Copyright 2001-2004 Unicode, Inc. - -Disclaimer - -This source code is provided as is by Unicode, Inc. No claims are -made as to fitness for any particular purpose. No warranties of any -kind are expressed or implied. The recipient agrees to determine -applicability of information provided. If this file has been -purchased on magnetic or optical media from Unicode, Inc., the -sole remedy for any claim will be exchange of defective media -within 90 days of receipt. - -Limitations on Rights to Redistribute This Code - -Unicode, Inc. hereby grants the right to freely use the information -supplied in this file in the creation of products supporting the -Unicode Standard, and to make copies of this file in any form -for internal or external distribution as long as this notice -remains attached. diff --git a/iOS/ParseFacebookUtils.framework/Headers/PFFacebookUtils.h b/iOS/ParseFacebookUtils.framework/Headers/PFFacebookUtils.h deleted file mode 100644 index b7d4e12..0000000 --- a/iOS/ParseFacebookUtils.framework/Headers/PFFacebookUtils.h +++ /dev/null @@ -1,428 +0,0 @@ -// -// PFFacebookUtils.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import - -#import -#import - -@class BFTask; - -/*! - The `PFFacebookUtils` class provides utility functions for working with Facebook in a Parse application. - - This class is currently for iOS only. - */ -@interface PFFacebookUtils : NSObject - -///-------------------------------------- -/// @name Interacting With Facebook -///-------------------------------------- - -/*! - @abstract Gets the Facebook session for the current user. - */ -+ (FBSession *)session; - -/*! - @abstract Initializes the Facebook singleton. - - @warning You must invoke this in order to use the Facebook functionality in Parse. - - @param appId The Facebook application id that you are using with your Parse application. - - @deprecated Please use `[PFFacebookUtils initializeFacebook]` instead. - */ -+ (void)initializeWithApplicationId:(NSString *)appId PARSE_DEPRECATED("Use [PFFacebookUtils initializeFacebook] instead."); - -/*! - @abstract Initializes the Facebook singleton. - - @warning You must invoke this in order to use the Facebook functionality in Parse. - - @param appId The Facebook application id that you are using with your Parse application. - @param urlSchemeSuffix The URL suffix for this application - used when multiple applications with the same - - @deprecated Please use `[PFFacebookUtils initializeFacebookWithUrlShemeSuffix:]` instead. - */ -+ (void)initializeWithApplicationId:(NSString *)appId - urlSchemeSuffix:(NSString *)urlSchemeSuffix PARSE_DEPRECATED("Use [PFFacebookUtils initializeFacebookWithUrlShemeSuffix:] instead."); - -/*! - @abstract Initializes the Facebook singleton. - - @discussion You must provide your Facebook application ID as the value for FacebookAppID in your bundle's plist file - as described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/ - - @warning You must invoke this in order to use the Facebook functionality in Parse. - */ -+ (void)initializeFacebook; - -/*! - @abstract Initializes the Facebook singleton. - - @discussion You must provide your Facebook application ID as the value for FacebookAppID in your bundle's plist file - as described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/ - - @warning You must invoke this in order to use the Facebook functionality in Parse. - - @param urlSchemeSuffix The URL suffix for this application - used when multiple applications with the same - Facebook application ID may be on the same device. - */ -+ (void)initializeFacebookWithUrlShemeSuffix:(NSString *)urlSchemeSuffix; - -/*! - @abstract Whether the user has their account linked to Facebook. - - @param user User to check for a facebook link. The user must be logged in on this device. - - @returns `YES` if the user has their account linked to Facebook, otherwise `NO`. - */ -+ (BOOL)isLinkedWithUser:(PFUser *)user; - -///-------------------------------------- -/// @name Logging In & Creating Facebook-Linked Users -///-------------------------------------- - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithPermissionsInBackground:(NSArray *)permissions; - -/*! - @abstract Logs in a user using Facebook. This method delegates to the Facebook SDK to authenticate - the user, and then automatically logs in (or creates, in the case where it is a new user) a . - - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithPermissions:(NSArray *)permissions block:(PFUserResultBlock)block; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithPermissions:(NSArray *)permissions target:(id)target selector:(SEL)selector; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion Allows you to handle user login to Facebook, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithFacebookIdInBackground:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion Allows you to handle user login to Facebook, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithFacebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - block:(PFUserResultBlock)block; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion Allows you to handle user login to Facebook, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithFacebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Linking Users with Facebook -///-------------------------------------- - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. - This passed to the authorize method on the Facebook instance. - - @deprecated Please use `[PFFacebookUtils linkUserInBackground:permissions:]` instead. - */ -+ (void)linkUser:(PFUser *)user permissions:(NSArray *)permissions PARSE_DEPRECATED("Please use `[PFFacebookUtils linkUserInBackground:permissions:]` instead."); - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. - This passed to the authorize method on the Facebook instance. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user permissions:(NSArray *)permissions; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. - This passed to the authorize method on the Facebook instance. - @param block The block to execute. - It should have the following argument signature: `^(BOOL *success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user permissions:(NSArray *)permissions block:(PFBooleanResultBlock)block; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user permissions:(NSArray *)permissions target:(id)target selector:(SEL)selector; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion Allows you to handle user login to Facebook, - then provide authentication data to link the account to the . - - @param user User to link to Facebook. - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user - facebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion Allows you to handle user login to Facebook, - then provide authentication data to link the account to the . - - @param user User to link to Facebook. - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param block The block to execute. - It should have the following argument signature: `^(BOOL success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user - facebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - block:(PFBooleanResultBlock)block; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion Allows you to handle user login to Facebook, - then provide authentication data to link the account to the . - - @param user User to link to Facebook. - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user - facebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Unlinking Users from Facebook -///-------------------------------------- - -/*! - @abstract Unlinks the from a Facebook account *synchronously*. - - @param user User to unlink from Facebook. - - @returns Returns `YES` if the unlink was successful, otherwise `NO`. - */ -+ (BOOL)unlinkUser:(PFUser *)user; - -/*! - @abstract Unlinks the from a Facebook account *synchronously*. - - @param user User to unlink from Facebook. - @param error Error object to set on error. - - @returns Returns `YES` if the unlink was successful, otherwise `NO`. - */ -+ (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; - -/*! - @abstract Unlinks the from a Facebook account *asynchronously*. - - @param user User to unlink from Facebook. - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)unlinkUserInBackground:(PFUser *)user; - -/*! - @abstract Unlinks the from a Facebook account *asynchronously*. - - @param user User to unlink from Facebook. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unlinkUserInBackground:(PFUser *)user block:(PFBooleanResultBlock)block; - -/*! - @abstract Unlinks the from a Facebook account *asynchronously*. - - @param user User to unlink from Facebook - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)unlinkUserInBackground:(PFUser *)user target:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Obtaining New Permissions -///-------------------------------------- - -/*! - @abstract Requests new Facebook publish permissions for the given user *asynchronously*. - - @discussion The user will be saved as part of this operation. - - @warning This may prompt the user to reauthorize the application. - - @param user User to request new permissions for. The user must be linked to Facebook. - @param permissions The new publishing permissions to request. - @param audience The default audience for publishing permissions to request. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)reauthorizeUserInBackground:(PFUser *)user - withPublishPermissions:(NSArray *)permissions - audience:(FBSessionDefaultAudience)audience; - -/*! - @abstract Requests new Facebook publish permissions for the given user *asynchronously*. - - @discussion The user will be saved as part of this operation. - - @warning This may prompt the user to reauthorize the application. - - @param user User to request new permissions for. The user must be linked to Facebook. - @param permissions The new publishing permissions to request. - @param audience The default audience for publishing permissions to request. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)reauthorizeUser:(PFUser *)user - withPublishPermissions:(NSArray *)permissions - audience:(FBSessionDefaultAudience)audience - block:(PFBooleanResultBlock)block; - -/*! - @abstract Requests new Facebook publish permissions for the given user *asynchronously*. - - @discussion The user will be saved as part of this operation. - - @warning This may prompt the user to reauthorize the application. - - @param user User to request new permissions for. The user must be linked to Facebook. - @param permissions The new publishing permissions to request. - @param audience The default audience for publishing permissions to request. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)reauthorizeUser:(PFUser *)user - withPublishPermissions:(NSArray *)permissions - audience:(FBSessionDefaultAudience)audience - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Delegating URL Actions -///-------------------------------------- - -/*! - @abstractHandles URLs being opened by your AppDelegate. Invoke and return this from application:handleOpenURL: - or application:openURL:sourceApplication:annotation in your AppDelegate. - - @param url URL being opened by your application. - @returns `YES` if Facebook will handle this URL, otherwise `NO`. - - @deprecated Please use - `[FBAppCall handleOpenURL:url - sourceApplication:sourceApplication - withSession:[PFFacebookUtils session]];` instead. - */ -+ (BOOL)handleOpenURL:(NSURL *)url PARSE_DEPRECATED("Use [FBAppCall handleOpenURL:sourceApplication:withSession:] instead."); - -@end diff --git a/iOS/ParseFacebookUtils.framework/ParseFacebookUtils b/iOS/ParseFacebookUtils.framework/ParseFacebookUtils deleted file mode 100644 index e88fb00..0000000 Binary files a/iOS/ParseFacebookUtils.framework/ParseFacebookUtils and /dev/null differ diff --git a/iOS/ParseFacebookUtils.framework/Resources/Info.plist b/iOS/ParseFacebookUtils.framework/Resources/Info.plist deleted file mode 100644 index 6622437..0000000 --- a/iOS/ParseFacebookUtils.framework/Resources/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ParseFacebookUtils - CFBundleIdentifier - com.parse.ParseFacebookUtils - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.4.0 - CFBundleSignature - ???? - CFBundleVersion - 1.4.0 - - diff --git a/iOS/ParseFacebookUtils.framework/Resources/Localizable.strings b/iOS/ParseFacebookUtils.framework/Resources/Localizable.strings deleted file mode 100644 index 5248130..0000000 Binary files a/iOS/ParseFacebookUtils.framework/Resources/Localizable.strings and /dev/null differ diff --git a/iOS/ParseFacebookUtils.framework/Versions/A/Headers/PFFacebookUtils.h b/iOS/ParseFacebookUtils.framework/Versions/A/Headers/PFFacebookUtils.h deleted file mode 100644 index b7d4e12..0000000 --- a/iOS/ParseFacebookUtils.framework/Versions/A/Headers/PFFacebookUtils.h +++ /dev/null @@ -1,428 +0,0 @@ -// -// PFFacebookUtils.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import - -#import -#import - -@class BFTask; - -/*! - The `PFFacebookUtils` class provides utility functions for working with Facebook in a Parse application. - - This class is currently for iOS only. - */ -@interface PFFacebookUtils : NSObject - -///-------------------------------------- -/// @name Interacting With Facebook -///-------------------------------------- - -/*! - @abstract Gets the Facebook session for the current user. - */ -+ (FBSession *)session; - -/*! - @abstract Initializes the Facebook singleton. - - @warning You must invoke this in order to use the Facebook functionality in Parse. - - @param appId The Facebook application id that you are using with your Parse application. - - @deprecated Please use `[PFFacebookUtils initializeFacebook]` instead. - */ -+ (void)initializeWithApplicationId:(NSString *)appId PARSE_DEPRECATED("Use [PFFacebookUtils initializeFacebook] instead."); - -/*! - @abstract Initializes the Facebook singleton. - - @warning You must invoke this in order to use the Facebook functionality in Parse. - - @param appId The Facebook application id that you are using with your Parse application. - @param urlSchemeSuffix The URL suffix for this application - used when multiple applications with the same - - @deprecated Please use `[PFFacebookUtils initializeFacebookWithUrlShemeSuffix:]` instead. - */ -+ (void)initializeWithApplicationId:(NSString *)appId - urlSchemeSuffix:(NSString *)urlSchemeSuffix PARSE_DEPRECATED("Use [PFFacebookUtils initializeFacebookWithUrlShemeSuffix:] instead."); - -/*! - @abstract Initializes the Facebook singleton. - - @discussion You must provide your Facebook application ID as the value for FacebookAppID in your bundle's plist file - as described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/ - - @warning You must invoke this in order to use the Facebook functionality in Parse. - */ -+ (void)initializeFacebook; - -/*! - @abstract Initializes the Facebook singleton. - - @discussion You must provide your Facebook application ID as the value for FacebookAppID in your bundle's plist file - as described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/ - - @warning You must invoke this in order to use the Facebook functionality in Parse. - - @param urlSchemeSuffix The URL suffix for this application - used when multiple applications with the same - Facebook application ID may be on the same device. - */ -+ (void)initializeFacebookWithUrlShemeSuffix:(NSString *)urlSchemeSuffix; - -/*! - @abstract Whether the user has their account linked to Facebook. - - @param user User to check for a facebook link. The user must be logged in on this device. - - @returns `YES` if the user has their account linked to Facebook, otherwise `NO`. - */ -+ (BOOL)isLinkedWithUser:(PFUser *)user; - -///-------------------------------------- -/// @name Logging In & Creating Facebook-Linked Users -///-------------------------------------- - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithPermissionsInBackground:(NSArray *)permissions; - -/*! - @abstract Logs in a user using Facebook. This method delegates to the Facebook SDK to authenticate - the user, and then automatically logs in (or creates, in the case where it is a new user) a . - - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithPermissions:(NSArray *)permissions block:(PFUserResultBlock)block; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithPermissions:(NSArray *)permissions target:(id)target selector:(SEL)selector; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion Allows you to handle user login to Facebook, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithFacebookIdInBackground:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion Allows you to handle user login to Facebook, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithFacebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - block:(PFUserResultBlock)block; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion Allows you to handle user login to Facebook, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithFacebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Linking Users with Facebook -///-------------------------------------- - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. - This passed to the authorize method on the Facebook instance. - - @deprecated Please use `[PFFacebookUtils linkUserInBackground:permissions:]` instead. - */ -+ (void)linkUser:(PFUser *)user permissions:(NSArray *)permissions PARSE_DEPRECATED("Please use `[PFFacebookUtils linkUserInBackground:permissions:]` instead."); - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. - This passed to the authorize method on the Facebook instance. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user permissions:(NSArray *)permissions; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. - This passed to the authorize method on the Facebook instance. - @param block The block to execute. - It should have the following argument signature: `^(BOOL *success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user permissions:(NSArray *)permissions block:(PFBooleanResultBlock)block; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user permissions:(NSArray *)permissions target:(id)target selector:(SEL)selector; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion Allows you to handle user login to Facebook, - then provide authentication data to link the account to the . - - @param user User to link to Facebook. - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user - facebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion Allows you to handle user login to Facebook, - then provide authentication data to link the account to the . - - @param user User to link to Facebook. - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param block The block to execute. - It should have the following argument signature: `^(BOOL success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user - facebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - block:(PFBooleanResultBlock)block; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion Allows you to handle user login to Facebook, - then provide authentication data to link the account to the . - - @param user User to link to Facebook. - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user - facebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Unlinking Users from Facebook -///-------------------------------------- - -/*! - @abstract Unlinks the from a Facebook account *synchronously*. - - @param user User to unlink from Facebook. - - @returns Returns `YES` if the unlink was successful, otherwise `NO`. - */ -+ (BOOL)unlinkUser:(PFUser *)user; - -/*! - @abstract Unlinks the from a Facebook account *synchronously*. - - @param user User to unlink from Facebook. - @param error Error object to set on error. - - @returns Returns `YES` if the unlink was successful, otherwise `NO`. - */ -+ (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; - -/*! - @abstract Unlinks the from a Facebook account *asynchronously*. - - @param user User to unlink from Facebook. - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)unlinkUserInBackground:(PFUser *)user; - -/*! - @abstract Unlinks the from a Facebook account *asynchronously*. - - @param user User to unlink from Facebook. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unlinkUserInBackground:(PFUser *)user block:(PFBooleanResultBlock)block; - -/*! - @abstract Unlinks the from a Facebook account *asynchronously*. - - @param user User to unlink from Facebook - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)unlinkUserInBackground:(PFUser *)user target:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Obtaining New Permissions -///-------------------------------------- - -/*! - @abstract Requests new Facebook publish permissions for the given user *asynchronously*. - - @discussion The user will be saved as part of this operation. - - @warning This may prompt the user to reauthorize the application. - - @param user User to request new permissions for. The user must be linked to Facebook. - @param permissions The new publishing permissions to request. - @param audience The default audience for publishing permissions to request. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)reauthorizeUserInBackground:(PFUser *)user - withPublishPermissions:(NSArray *)permissions - audience:(FBSessionDefaultAudience)audience; - -/*! - @abstract Requests new Facebook publish permissions for the given user *asynchronously*. - - @discussion The user will be saved as part of this operation. - - @warning This may prompt the user to reauthorize the application. - - @param user User to request new permissions for. The user must be linked to Facebook. - @param permissions The new publishing permissions to request. - @param audience The default audience for publishing permissions to request. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)reauthorizeUser:(PFUser *)user - withPublishPermissions:(NSArray *)permissions - audience:(FBSessionDefaultAudience)audience - block:(PFBooleanResultBlock)block; - -/*! - @abstract Requests new Facebook publish permissions for the given user *asynchronously*. - - @discussion The user will be saved as part of this operation. - - @warning This may prompt the user to reauthorize the application. - - @param user User to request new permissions for. The user must be linked to Facebook. - @param permissions The new publishing permissions to request. - @param audience The default audience for publishing permissions to request. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)reauthorizeUser:(PFUser *)user - withPublishPermissions:(NSArray *)permissions - audience:(FBSessionDefaultAudience)audience - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Delegating URL Actions -///-------------------------------------- - -/*! - @abstractHandles URLs being opened by your AppDelegate. Invoke and return this from application:handleOpenURL: - or application:openURL:sourceApplication:annotation in your AppDelegate. - - @param url URL being opened by your application. - @returns `YES` if Facebook will handle this URL, otherwise `NO`. - - @deprecated Please use - `[FBAppCall handleOpenURL:url - sourceApplication:sourceApplication - withSession:[PFFacebookUtils session]];` instead. - */ -+ (BOOL)handleOpenURL:(NSURL *)url PARSE_DEPRECATED("Use [FBAppCall handleOpenURL:sourceApplication:withSession:] instead."); - -@end diff --git a/iOS/ParseFacebookUtils.framework/Versions/A/ParseFacebookUtils b/iOS/ParseFacebookUtils.framework/Versions/A/ParseFacebookUtils deleted file mode 100644 index 5dbc811..0000000 Binary files a/iOS/ParseFacebookUtils.framework/Versions/A/ParseFacebookUtils and /dev/null differ diff --git a/iOS/ParseFacebookUtils.framework/Versions/A/Resources/Info.plist b/iOS/ParseFacebookUtils.framework/Versions/A/Resources/Info.plist deleted file mode 100644 index 6622437..0000000 --- a/iOS/ParseFacebookUtils.framework/Versions/A/Resources/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ParseFacebookUtils - CFBundleIdentifier - com.parse.ParseFacebookUtils - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.4.0 - CFBundleSignature - ???? - CFBundleVersion - 1.4.0 - - diff --git a/iOS/ParseFacebookUtils.framework/Versions/A/Resources/Localizable.strings b/iOS/ParseFacebookUtils.framework/Versions/A/Resources/Localizable.strings deleted file mode 100644 index 5248130..0000000 Binary files a/iOS/ParseFacebookUtils.framework/Versions/A/Resources/Localizable.strings and /dev/null differ diff --git a/iOS/ParseFacebookUtils.framework/Versions/Current/Headers/PFFacebookUtils.h b/iOS/ParseFacebookUtils.framework/Versions/Current/Headers/PFFacebookUtils.h deleted file mode 100644 index b7d4e12..0000000 --- a/iOS/ParseFacebookUtils.framework/Versions/Current/Headers/PFFacebookUtils.h +++ /dev/null @@ -1,428 +0,0 @@ -// -// PFFacebookUtils.h -// -// Copyright 2011-present Parse Inc. All rights reserved. -// - -#import - -#import - -#import -#import - -@class BFTask; - -/*! - The `PFFacebookUtils` class provides utility functions for working with Facebook in a Parse application. - - This class is currently for iOS only. - */ -@interface PFFacebookUtils : NSObject - -///-------------------------------------- -/// @name Interacting With Facebook -///-------------------------------------- - -/*! - @abstract Gets the Facebook session for the current user. - */ -+ (FBSession *)session; - -/*! - @abstract Initializes the Facebook singleton. - - @warning You must invoke this in order to use the Facebook functionality in Parse. - - @param appId The Facebook application id that you are using with your Parse application. - - @deprecated Please use `[PFFacebookUtils initializeFacebook]` instead. - */ -+ (void)initializeWithApplicationId:(NSString *)appId PARSE_DEPRECATED("Use [PFFacebookUtils initializeFacebook] instead."); - -/*! - @abstract Initializes the Facebook singleton. - - @warning You must invoke this in order to use the Facebook functionality in Parse. - - @param appId The Facebook application id that you are using with your Parse application. - @param urlSchemeSuffix The URL suffix for this application - used when multiple applications with the same - - @deprecated Please use `[PFFacebookUtils initializeFacebookWithUrlShemeSuffix:]` instead. - */ -+ (void)initializeWithApplicationId:(NSString *)appId - urlSchemeSuffix:(NSString *)urlSchemeSuffix PARSE_DEPRECATED("Use [PFFacebookUtils initializeFacebookWithUrlShemeSuffix:] instead."); - -/*! - @abstract Initializes the Facebook singleton. - - @discussion You must provide your Facebook application ID as the value for FacebookAppID in your bundle's plist file - as described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/ - - @warning You must invoke this in order to use the Facebook functionality in Parse. - */ -+ (void)initializeFacebook; - -/*! - @abstract Initializes the Facebook singleton. - - @discussion You must provide your Facebook application ID as the value for FacebookAppID in your bundle's plist file - as described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/ - - @warning You must invoke this in order to use the Facebook functionality in Parse. - - @param urlSchemeSuffix The URL suffix for this application - used when multiple applications with the same - Facebook application ID may be on the same device. - */ -+ (void)initializeFacebookWithUrlShemeSuffix:(NSString *)urlSchemeSuffix; - -/*! - @abstract Whether the user has their account linked to Facebook. - - @param user User to check for a facebook link. The user must be logged in on this device. - - @returns `YES` if the user has their account linked to Facebook, otherwise `NO`. - */ -+ (BOOL)isLinkedWithUser:(PFUser *)user; - -///-------------------------------------- -/// @name Logging In & Creating Facebook-Linked Users -///-------------------------------------- - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithPermissionsInBackground:(NSArray *)permissions; - -/*! - @abstract Logs in a user using Facebook. This method delegates to the Facebook SDK to authenticate - the user, and then automatically logs in (or creates, in the case where it is a new user) a . - - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithPermissions:(NSArray *)permissions block:(PFUserResultBlock)block; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . - - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithPermissions:(NSArray *)permissions target:(id)target selector:(SEL)selector; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion Allows you to handle user login to Facebook, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)logInWithFacebookIdInBackground:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion Allows you to handle user login to Facebook, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param block The block to execute. - It should have the following argument signature: `^(PFUser *user, NSError *error)`. - */ -+ (void)logInWithFacebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - block:(PFUserResultBlock)block; - -/*! - @abstract Logs in a user using Facebook *asynchronously*. - - @discussion Allows you to handle user login to Facebook, then provide authentication - data to log in (or create, in the case where it is a new user) the . - - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithUser:(PFUser *)user error:(NSError *)error`. - */ -+ (void)logInWithFacebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Linking Users with Facebook -///-------------------------------------- - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. - This passed to the authorize method on the Facebook instance. - - @deprecated Please use `[PFFacebookUtils linkUserInBackground:permissions:]` instead. - */ -+ (void)linkUser:(PFUser *)user permissions:(NSArray *)permissions PARSE_DEPRECATED("Please use `[PFFacebookUtils linkUserInBackground:permissions:]` instead."); - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. - This passed to the authorize method on the Facebook instance. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user permissions:(NSArray *)permissions; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. - This passed to the authorize method on the Facebook instance. - @param block The block to execute. - It should have the following argument signature: `^(BOOL *success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user permissions:(NSArray *)permissions block:(PFBooleanResultBlock)block; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion This method delegates to the Facebook SDK to authenticate - the user, and then automatically links the account to the . - - @param user User to link to Facebook. - @param permissions The permissions required for Facebook log in. This passed to the authorize method on - the Facebook instance. - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user permissions:(NSArray *)permissions target:(id)target selector:(SEL)selector; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion Allows you to handle user login to Facebook, - then provide authentication data to link the account to the . - - @param user User to link to Facebook. - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)linkUserInBackground:(PFUser *)user - facebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion Allows you to handle user login to Facebook, - then provide authentication data to link the account to the . - - @param user User to link to Facebook. - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param block The block to execute. - It should have the following argument signature: `^(BOOL success, NSError *error)`. - */ -+ (void)linkUser:(PFUser *)user - facebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - block:(PFBooleanResultBlock)block; - -/*! - @abstract Links Facebook to an existing *asynchronously*. - - @discussion Allows you to handle user login to Facebook, - then provide authentication data to link the account to the . - - @param user User to link to Facebook. - @param facebookId The id of the Facebook user being linked - @param accessToken The access token for the user's session - @param expirationDate The expiration date for the access token - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)linkUser:(PFUser *)user - facebookId:(NSString *)facebookId - accessToken:(NSString *)accessToken - expirationDate:(NSDate *)expirationDate - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Unlinking Users from Facebook -///-------------------------------------- - -/*! - @abstract Unlinks the from a Facebook account *synchronously*. - - @param user User to unlink from Facebook. - - @returns Returns `YES` if the unlink was successful, otherwise `NO`. - */ -+ (BOOL)unlinkUser:(PFUser *)user; - -/*! - @abstract Unlinks the from a Facebook account *synchronously*. - - @param user User to unlink from Facebook. - @param error Error object to set on error. - - @returns Returns `YES` if the unlink was successful, otherwise `NO`. - */ -+ (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; - -/*! - @abstract Unlinks the from a Facebook account *asynchronously*. - - @param user User to unlink from Facebook. - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)unlinkUserInBackground:(PFUser *)user; - -/*! - @abstract Unlinks the from a Facebook account *asynchronously*. - - @param user User to unlink from Facebook. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)unlinkUserInBackground:(PFUser *)user block:(PFBooleanResultBlock)block; - -/*! - @abstract Unlinks the from a Facebook account *asynchronously*. - - @param user User to unlink from Facebook - @param target Target object for the selector - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)unlinkUserInBackground:(PFUser *)user target:(id)target selector:(SEL)selector; - -///-------------------------------------- -/// @name Obtaining New Permissions -///-------------------------------------- - -/*! - @abstract Requests new Facebook publish permissions for the given user *asynchronously*. - - @discussion The user will be saved as part of this operation. - - @warning This may prompt the user to reauthorize the application. - - @param user User to request new permissions for. The user must be linked to Facebook. - @param permissions The new publishing permissions to request. - @param audience The default audience for publishing permissions to request. - - @returns The task, that encapsulates the work being done. - */ -+ (BFTask *)reauthorizeUserInBackground:(PFUser *)user - withPublishPermissions:(NSArray *)permissions - audience:(FBSessionDefaultAudience)audience; - -/*! - @abstract Requests new Facebook publish permissions for the given user *asynchronously*. - - @discussion The user will be saved as part of this operation. - - @warning This may prompt the user to reauthorize the application. - - @param user User to request new permissions for. The user must be linked to Facebook. - @param permissions The new publishing permissions to request. - @param audience The default audience for publishing permissions to request. - @param block The block to execute. - It should have the following argument signature: `^(BOOL succeeded, NSError *error)`. - */ -+ (void)reauthorizeUser:(PFUser *)user - withPublishPermissions:(NSArray *)permissions - audience:(FBSessionDefaultAudience)audience - block:(PFBooleanResultBlock)block; - -/*! - @abstract Requests new Facebook publish permissions for the given user *asynchronously*. - - @discussion The user will be saved as part of this operation. - - @warning This may prompt the user to reauthorize the application. - - @param user User to request new permissions for. The user must be linked to Facebook. - @param permissions The new publishing permissions to request. - @param audience The default audience for publishing permissions to request. - @param target Target object for the selector. - @param selector The selector that will be called when the asynchronous request is complete. - It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`. - */ -+ (void)reauthorizeUser:(PFUser *)user - withPublishPermissions:(NSArray *)permissions - audience:(FBSessionDefaultAudience)audience - target:(id)target - selector:(SEL)selector; - -///-------------------------------------- -/// @name Delegating URL Actions -///-------------------------------------- - -/*! - @abstractHandles URLs being opened by your AppDelegate. Invoke and return this from application:handleOpenURL: - or application:openURL:sourceApplication:annotation in your AppDelegate. - - @param url URL being opened by your application. - @returns `YES` if Facebook will handle this URL, otherwise `NO`. - - @deprecated Please use - `[FBAppCall handleOpenURL:url - sourceApplication:sourceApplication - withSession:[PFFacebookUtils session]];` instead. - */ -+ (BOOL)handleOpenURL:(NSURL *)url PARSE_DEPRECATED("Use [FBAppCall handleOpenURL:sourceApplication:withSession:] instead."); - -@end diff --git a/iOS/ParseFacebookUtils.framework/Versions/Current/ParseFacebookUtils b/iOS/ParseFacebookUtils.framework/Versions/Current/ParseFacebookUtils deleted file mode 100644 index 5dbc811..0000000 Binary files a/iOS/ParseFacebookUtils.framework/Versions/Current/ParseFacebookUtils and /dev/null differ diff --git a/iOS/ParseFacebookUtils.framework/Versions/Current/Resources/Info.plist b/iOS/ParseFacebookUtils.framework/Versions/Current/Resources/Info.plist deleted file mode 100644 index 6622437..0000000 --- a/iOS/ParseFacebookUtils.framework/Versions/Current/Resources/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ParseFacebookUtils - CFBundleIdentifier - com.parse.ParseFacebookUtils - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.4.0 - CFBundleSignature - ???? - CFBundleVersion - 1.4.0 - - diff --git a/iOS/ParseFacebookUtils.framework/Versions/Current/Resources/Localizable.strings b/iOS/ParseFacebookUtils.framework/Versions/Current/Resources/Localizable.strings deleted file mode 100644 index 5248130..0000000 Binary files a/iOS/ParseFacebookUtils.framework/Versions/Current/Resources/Localizable.strings and /dev/null differ diff --git a/iOS/ParseFacebookUtils.framework/third_party_licenses.txt b/iOS/ParseFacebookUtils.framework/third_party_licenses.txt deleted file mode 100644 index dcea806..0000000 --- a/iOS/ParseFacebookUtils.framework/third_party_licenses.txt +++ /dev/null @@ -1,92 +0,0 @@ -THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE PARSE PRODUCT. - ------ - -The following software may be included in this product: AFNetworking. This software contains the following license and notice below: - -Copyright (c) 2011 Gowalla (http://gowalla.com/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: OAuthCore. This software contains the following license and notice below: - -Copyright (C) 2012 Loren Brichter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: google-breakpad. This software contains the following license and notice below: - -Copyright (c) 2006, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. -* Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------- - -Copyright 2001-2004 Unicode, Inc. - -Disclaimer - -This source code is provided as is by Unicode, Inc. No claims are -made as to fitness for any particular purpose. No warranties of any -kind are expressed or implied. The recipient agrees to determine -applicability of information provided. If this file has been -purchased on magnetic or optical media from Unicode, Inc., the -sole remedy for any claim will be exchange of defective media -within 90 days of receipt. - -Limitations on Rights to Redistribute This Code - -Unicode, Inc. hereby grants the right to freely use the information -supplied in this file in the creation of products supporting the -Unicode Standard, and to make copies of this file in any form -for internal or external distribution as long as this notice -remains attached. diff --git a/iOS/ParseUI.framework/Headers/PFCollectionViewCell.h b/iOS/ParseUI.framework/Headers/PFCollectionViewCell.h new file mode 100644 index 0000000..9abb31e --- /dev/null +++ b/iOS/ParseUI.framework/Headers/PFCollectionViewCell.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2014, Parse, LLC. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Parse. + * + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class PFImageView; +@class PFObject; + +/** + The `PFCollectionViewCell` class represents a collection view cell which can + download and display remote images stored on Parse as well as has a default simple text label. + */ +@interface PFCollectionViewCell : UICollectionViewCell + +/** + A simple lazy-loaded label for the collection view cell. + */ +@property (nonatomic, strong, readonly) UILabel *textLabel; + +/** + The lazy-loaded imageView of the collection view cell. + + @see PFImageView + */ +@property (nonatomic, strong, readonly) PFImageView *imageView; + +/** + This method should update all the relevant information inside a subclass of `PFCollectionViewCell`. + + This method is automatically called by `PFQueryCollectionViewController` whenever the cell + should display new information. By default this method does nothing. + + @param object An instance of `PFObject` to update from. + */ +- (void)updateFromObject:(nullable PFObject *)object; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFImageView.h b/iOS/ParseUI.framework/Headers/PFImageView.h index 65cc94e..adabf56 100644 --- a/iOS/ParseUI.framework/Headers/PFImageView.h +++ b/iOS/ParseUI.framework/Headers/PFImageView.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -21,37 +21,59 @@ #import -@class BFTask; +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void(^PFImageViewImageResultBlock)(UIImage *__nullable image, NSError *__nullable error); + +@class BFTask PF_GENERIC(__covariant BFGenericType); @class PFFile; -/*! +/** An image view that downloads and displays remote image stored on Parse's server. */ @interface PFImageView : UIImageView -/*! - @abstract The remote file on Parse's server that stores the image. +/** + The remote file on Parse's server that stores the image. - @warning Note that the download does not start until is called. + @warning Note that the download does not start until `-loadInBackground:` is called. */ -@property (nonatomic, strong) PFFile *file; +@property (nullable, nonatomic, strong) PFFile *file; -/*! - @abstract Initiate downloading of the remote image. +/** + Initiate downloading of the remote image. - @discussion Once the download completes, the remote image will be displayed. + Once the download completes, the remote image will be displayed. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ -- (BFTask *)loadInBackground; +- (BFTask PF_GENERIC(UIImage *)*)loadInBackground; -/*! - @abstract Initiate downloading of the remote image. +/** + Initiate downloading of the remote image. - @discussion Once the download completes, the remote image will be displayed. + Once the download completes, the remote image will be displayed. @param completion the completion block. */ -- (void)loadInBackground:(void (^)(UIImage *image, NSError *error))completion; +- (void)loadInBackground:(nullable PFImageViewImageResultBlock)completion; + +/** + Initiate downloading of the remote image. + + Once the download completes, the remote image will be displayed. + + @param completion the completion block. + @param progressBlock called with the download progress as the image is being downloaded. + Will be called with a value of 100 before the completion block is called. + */ +- (void)loadInBackground:(nullable PFImageViewImageResultBlock)completion + progressBlock:(nullable void (^)(int percentDone))progressBlock; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFLogInView.h b/iOS/ParseUI.framework/Headers/PFLogInView.h index ee1a7f4..a2bce3d 100644 --- a/iOS/ParseUI.framework/Headers/PFLogInView.h +++ b/iOS/ParseUI.framework/Headers/PFLogInView.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -23,31 +23,33 @@ #import -/*! +NS_ASSUME_NONNULL_BEGIN + +/** `PFLogInFields` bitmask specifies the log in elements which are enabled in the view. @see PFLogInViewController @see PFLogInView */ typedef NS_OPTIONS(NSInteger, PFLogInFields) { - /*! No fields. */ + /** No fields. */ PFLogInFieldsNone = 0, - /*! Username and password fields. */ + /** Username and password fields. */ PFLogInFieldsUsernameAndPassword = 1 << 0, - /*! Forgot password button. */ + /** Forgot password button. */ PFLogInFieldsPasswordForgotten = 1 << 1, - /*! Login button. */ + /** Login button. */ PFLogInFieldsLogInButton = 1 << 2, - /*! Button to login with Facebook. */ + /** Button to login with Facebook. */ PFLogInFieldsFacebook = 1 << 3, - /*! Button to login with Twitter. */ + /** Button to login with Twitter. */ PFLogInFieldsTwitter = 1 << 4, - /*! Signup Button. */ + /** Signup Button. */ PFLogInFieldsSignUpButton = 1 << 5, - /*! Dismiss Button. */ + /** Dismiss Button. */ PFLogInFieldsDismissButton = 1 << 6, - /*! Default value. Combines Username, Password, Login, Signup, Forgot Password and Dismiss buttons. */ + /** Default value. Combines Username, Password, Login, Signup, Forgot Password and Dismiss buttons. */ PFLogInFieldsDefault = (PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton | PFLogInFieldsSignUpButton | @@ -55,8 +57,24 @@ typedef NS_OPTIONS(NSInteger, PFLogInFields) { PFLogInFieldsDismissButton) }; -/*! - The `PFLogInView` class provides a standard log in interface for authenticating a . +/** + `PFLoginFields`'s accessibility label identifiers + + @see PFLogInView + */ +extern NSString *const PFLogInViewUsernameFieldAccessibilityIdentifier; +extern NSString *const PFLogInViewPasswordFieldAccessibilityIdentifier; +extern NSString *const PFLogInViewLogInButtonAccessibilityIdentifier; +extern NSString *const PFLogInViewSignUpButtonAccessibilityIdentifier; +extern NSString *const PFLogInViewPasswordForgottenButtonAccessibilityIdentifier; +extern NSString *const PFLogInViewTwitterButtonAccessibilityIdentifier; +extern NSString *const PFLogInViewFacebookButtonAccessibilityIdentifier; +extern NSString *const PFLogInViewDismissButtonAccessibilityIdentifier; + +@class PFTextField; + +/** + The `PFLogInView` class provides a standard log in interface for authenticating a `PFUser`. */ @interface PFLogInView : UIScrollView @@ -64,39 +82,39 @@ typedef NS_OPTIONS(NSInteger, PFLogInFields) { /// @name Creating Log In View ///-------------------------------------- -/*! - @abstract Initializes the view with the specified log in elements. +/** + Initializes the view with the specified log in elements. @param fields A bitmask specifying the log in elements which are enabled in the view - @returns An initialized `PFLogInView` object or `nil` if the object couldn't be created. + @return An initialized `PFLogInView` object or `nil` if the object couldn't be created. @see PFLogInFields */ - (instancetype)initWithFields:(PFLogInFields)fields; -/*! - @abstract The view controller that will present this view. +/** + The view controller that will present this view. - @discussion Used to lay out elements correctly when the presenting view controller has translucent elements. + Used to lay out elements correctly when the presenting view controller has translucent elements. */ -@property (nonatomic, weak) UIViewController *presentingViewController; +@property (nullable, nonatomic, weak) UIViewController *presentingViewController; ///-------------------------------------- /// @name Customizing the Logo ///-------------------------------------- /// The logo. By default, it is the Parse logo. -@property (nonatomic, strong) UIView *logo; +@property (nullable, nonatomic, strong) UIView *logo; ///-------------------------------------- /// @name Configure Username Behaviour ///-------------------------------------- -/*! - @abstract If email should be used to log in, instead of username +/** + If email should be used to log in, instead of username - @discussion By default, this is set to `NO`. + By default, this is set to `NO`. */ @property (nonatomic, assign) BOOL emailAsUsername; @@ -104,63 +122,65 @@ typedef NS_OPTIONS(NSInteger, PFLogInFields) { /// @name Log In Elements ///-------------------------------------- -/*! - @abstract The bitmask which specifies the enabled log in elements in the view. +/** + The bitmask which specifies the enabled log in elements in the view. */ @property (nonatomic, assign, readonly) PFLogInFields fields; -/*! - @abstract The username text field. It is `nil` if the element is not enabled. +/** + The username text field. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UITextField *usernameField; +@property (nullable, nonatomic, strong, readonly) PFTextField *usernameField; -/*! - @abstract The password text field. It is `nil` if the element is not enabled. +/** + The password text field. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UITextField *passwordField; +@property (nullable, nonatomic, strong, readonly) PFTextField *passwordField; -/*! - @abstract The password forgotten button. It is `nil` if the element is not enabled. +/** + The password forgotten button. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UIButton *passwordForgottenButton; +@property (nullable, nonatomic, strong, readonly) UIButton *passwordForgottenButton; -/*! - @abstract The log in button. It is `nil` if the element is not enabled. +/** + The log in button. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UIButton *logInButton; +@property (nullable, nonatomic, strong, readonly) UIButton *logInButton; -/*! - @abstract The Facebook button. It is `nil` if the element is not enabled. +/** + The Facebook button. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UIButton *facebookButton; +@property (nullable, nonatomic, strong, readonly) UIButton *facebookButton; -/*! - @abstract The Twitter button. It is `nil` if the element is not enabled. +/** + The Twitter button. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UIButton *twitterButton; +@property (nullable, nonatomic, strong, readonly) UIButton *twitterButton; -/*! - @abstract The sign up button. It is `nil` if the element is not enabled. +/** + The sign up button. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UIButton *signUpButton; +@property (nullable, nonatomic, strong, readonly) UIButton *signUpButton; -/*! - @abstract It is `nil` if the element is not enabled. +/** + It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UIButton *dismissButton; +@property (nullable, nonatomic, strong, readonly) UIButton *dismissButton; -/*! - @abstract The facebook/twitter login label. +/** + The facebook/twitter login label. @deprecated This property is deprecated and will always be nil. */ -@property (nonatomic, strong, readonly) UILabel *externalLogInLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil.")); +@property (nullable, nonatomic, strong, readonly) UILabel *externalLogInLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil.")); -/*! - @abstract The sign up label. +/** + The sign up label. @deprecated This property is deprecated and will always be nil. */ -@property (nonatomic, strong, readonly) UILabel *signUpLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil.")); +@property (nullable, nonatomic, strong, readonly) UILabel *signUpLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil.")); @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFLogInViewController.h b/iOS/ParseUI.framework/Headers/PFLogInViewController.h index e37be08..0c63fcb 100644 --- a/iOS/ParseUI.framework/Headers/PFLogInViewController.h +++ b/iOS/ParseUI.framework/Headers/PFLogInViewController.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -21,14 +21,19 @@ #import +#import + +#import #import +NS_ASSUME_NONNULL_BEGIN + @class PFSignUpViewController; @class PFUser; @protocol PFLogInViewControllerDelegate; -/*! - The `PFLogInViewController` class presents and manages a standard authentication interface for logging in a . +/** + The `PFLogInViewController` class presents and manages a standard authentication interface for logging in a `PFUser`. */ @interface PFLogInViewController : UIViewController @@ -36,52 +41,52 @@ /// @name Configuring Log In Elements ///-------------------------------------- -/*! - @abstract A bitmask specifying the log in elements which are enabled in the view. +/** + A bitmask specifying the log in elements which are enabled in the view. @see PFLogInFields */ @property (nonatomic, assign) PFLogInFields fields; -/*! - @abstract The log in view. It contains all the enabled log in elements. +/** + The log in view. It contains all the enabled log in elements. @see PFLogInView */ -@property (nonatomic, strong, readonly) PFLogInView *logInView; +@property (nullable, nonatomic, strong, readonly) PFLogInView *logInView; ///-------------------------------------- /// @name Configuring Log In Behaviors ///-------------------------------------- -/*! - @abstract The delegate that responds to the control events of `PFLogInViewController`. +/** + The delegate that responds to the control events of `PFLogInViewController`. @see PFLogInViewControllerDelegate */ -@property (nonatomic, weak) id delegate; +@property (nullable, nonatomic, weak) id delegate; -/*! - @abstract The facebook permissions that Facebook log in requests for. +/** + The facebook permissions that Facebook log in requests for. - @discussion If unspecified, the default is basic facebook permissions. + If unspecified, the default is basic facebook permissions. */ -@property (nonatomic, copy) NSArray *facebookPermissions; +@property (nullable, nonatomic, copy) NSArray PF_GENERIC(NSString *)*facebookPermissions; -/*! - @abstract The sign up controller if sign up is enabled. +/** + The sign up controller if sign up is enabled. - @discussion Use this to configure the sign up view, and the transition animation to the sign up view. + Use this to configure the sign up view, and the transition animation to the sign up view. The default is a sign up view with a username, a password, a dismiss button and a sign up button. */ -@property (nonatomic, strong) PFSignUpViewController *signUpController; +@property (nullable, nonatomic, strong) PFSignUpViewController *signUpController; -/*! - @abstract Whether to prompt for the email as username on the login view. +/** + Whether to prompt for the email as username on the login view. - @discussion If set to `YES`, we'll prompt for the email in the username field. - This property value propagates to the attached . + If set to `YES`, we'll prompt for the email in the username field. + This property value propagates to the attached `signUpController`. By default, this is set to `NO`. */ @property (nonatomic, assign) BOOL emailAsUsername; @@ -92,19 +97,19 @@ /// @name Notifications ///-------------------------------------- -/*! - @abstract The notification is posted immediately after the log in succeeds. +/** + The notification is posted immediately after the log in succeeds. */ extern NSString *const PFLogInSuccessNotification; -/*! - @abstract The notification is posted immediately after the log in fails. - @discussion If the delegate prevents the log in from starting, the notification is not sent. +/** + The notification is posted immediately after the log in fails. + If the delegate prevents the log in from starting, the notification is not sent. */ extern NSString *const PFLogInFailureNotification; -/*! - @abstract The notification is posted immediately after the log in is cancelled. +/** + The notification is posted immediately after the log in is cancelled. */ extern NSString *const PFLogInCancelNotification; @@ -112,8 +117,8 @@ extern NSString *const PFLogInCancelNotification; /// @name PFLogInViewControllerDelegate ///-------------------------------------- -/*! - The `PFLogInViewControllerDelegate` protocol defines methods a delegate of a should implement. +/** + The `PFLogInViewControllerDelegate` protocol defines methods a delegate of a `PFLogInViewController` should implement. All methods of this protocol are optional. */ @protocol PFLogInViewControllerDelegate @@ -124,14 +129,14 @@ extern NSString *const PFLogInCancelNotification; /// @name Customizing Behavior ///-------------------------------------- -/*! - @abstract Sent to the delegate to determine whether the log in request should be submitted to the server. +/** + Sent to the delegate to determine whether the log in request should be submitted to the server. @param logInController The login view controller that is requesting the data. @param username the username the user tries to log in with. @param password the password the user tries to log in with. - @returns A `BOOL` indicating whether the log in should proceed. + @return A `BOOL` indicating whether the log in should proceed. */ - (BOOL)logInViewController:(PFLogInViewController *)logInController shouldBeginLogInWithUsername:(NSString *)username @@ -141,27 +146,32 @@ shouldBeginLogInWithUsername:(NSString *)username /// @name Responding to Actions ///-------------------------------------- -/*! - @abstract Sent to the delegate when a is logged in. +/** + Sent to the delegate when a `PFUser` is logged in. @param logInController The login view controller where login finished. - @param user object that is a result of the login. + @param user `PFUser` object that is a result of the login. */ - (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user; -/*! - @abstract Sent to the delegate when the log in attempt fails. +/** + Sent to the delegate when the log in attempt fails. + + If you implement this method, PFLoginViewController will not automatically show its default + login failure alert view. Instead, you should show your custom alert view in your implementation. @param logInController The login view controller where login failed. @param error `NSError` object representing the error that occured. */ -- (void)logInViewController:(PFLogInViewController *)logInController didFailToLogInWithError:(NSError *)error; +- (void)logInViewController:(PFLogInViewController *)logInController didFailToLogInWithError:(nullable NSError *)error; -/*! - @abstract Sent to the delegate when the log in screen is cancelled. +/** + Sent to the delegate when the log in screen is cancelled. @param logInController The login view controller where login was cancelled. */ - (void)logInViewControllerDidCancelLogIn:(PFLogInViewController *)logInController; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFProductTableViewController.h b/iOS/ParseUI.framework/Headers/PFProductTableViewController.h index b96eec6..6ee0849 100644 --- a/iOS/ParseUI.framework/Headers/PFProductTableViewController.h +++ b/iOS/ParseUI.framework/Headers/PFProductTableViewController.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -19,22 +19,29 @@ * */ +#import + +#import #import -/*! +NS_ASSUME_NONNULL_BEGIN + +/** `PFProductTableViewController` displays in-app purchase products stored on Parse. In addition to setting up in-app purchases in iTunes Connect, the app developer needs to register product information on Parse, in the Product class. */ @interface PFProductTableViewController : PFQueryTableViewController -/*! - @abstract Initializes a product table view controller. +/** + Initializes a product table view controller. @param style The UITableViewStyle for the table - @returns An initialized `PFProductTableViewController` object or `nil` if the object couldn't be created. + @return An initialized `PFProductTableViewController` object or `nil` if the object couldn't be created. */ - (instancetype)initWithStyle:(UITableViewStyle)style NS_DESIGNATED_INITIALIZER; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFPurchaseTableViewCell.h b/iOS/ParseUI.framework/Headers/PFPurchaseTableViewCell.h index 85c6900..88e0e85 100644 --- a/iOS/ParseUI.framework/Headers/PFPurchaseTableViewCell.h +++ b/iOS/ParseUI.framework/Headers/PFPurchaseTableViewCell.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -21,43 +21,48 @@ #import +#import #import -/*! - An enum that represents states of the PFPurchaseTableViewCell. - @see PFPurchaseTableViewCell +NS_ASSUME_NONNULL_BEGIN + +/** + An enum that represents states of the `PFPurchaseTableViewCell`. + @see `PFPurchaseTableViewCell` */ typedef NS_ENUM(uint8_t, PFPurchaseTableViewCellState) { - /*! Normal state of the cell. */ + /** Normal state of the cell. */ PFPurchaseTableViewCellStateNormal = 0, - /*! Downloading state of the cell. */ + /** Downloading state of the cell. */ PFPurchaseTableViewCellStateDownloading, - /*! State of the cell, when the product was downloaded. */ + /** State of the cell, when the product was downloaded. */ PFPurchaseTableViewCellStateDownloaded }; -/*! - `PFPurchaseTableViewCell` is a subclass that is used to show - products in a . +/** + `PFPurchaseTableViewCell` is a subclass `PFTableViewCell` that is used to show + products in a `PFProductTableViewController`. - @see PFProductTableViewController + @see `PFProductTableViewController` */ @interface PFPurchaseTableViewCell : PFTableViewCell -/*! - @abstract State of the cell. - @see PFPurchaseTableViewCellState +/** + State of the cell. + @see `PFPurchaseTableViewCellState` */ @property (nonatomic, assign) PFPurchaseTableViewCellState state; -/*! - @abstract Label where price of the product is displayed. +/** + Label where price of the product is displayed. */ -@property (nonatomic, strong, readonly) UILabel *priceLabel; +@property (nullable, nonatomic, strong, readonly) UILabel *priceLabel; -/*! - @abstract Progress view that is shown, when the product is downloading. +/** + Progress view that is shown, when the product is downloading. */ -@property (nonatomic, strong, readonly) UIProgressView *progressView; +@property (nullable, nonatomic, strong, readonly) UIProgressView *progressView; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFQueryCollectionViewController.h b/iOS/ParseUI.framework/Headers/PFQueryCollectionViewController.h new file mode 100644 index 0000000..1c0b73a --- /dev/null +++ b/iOS/ParseUI.framework/Headers/PFQueryCollectionViewController.h @@ -0,0 +1,228 @@ +/* + * Copyright (c) 2014, Parse, LLC. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Parse. + * + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class BFTask PF_GENERIC(__covariant BFGenericType); +@class PFCollectionViewCell; +@class PFObject; +@class PFQuery; + +/** + This class allows you to think about a one-to-one mapping between a `PFObject` and a `UICollectionViewCell`, + rather than having to juggle index paths. + + You also get the following features out of the box: + + - Pagination with a cell that can be tapped to load the next page. + - Pull-to-refresh collection view header. + - Automatic downloading and displaying of remote images in cells. + - Loading screen, shown before any data is loaded. + - Automatic loading and management of the objects array. + - Various methods that can be overridden to customize behavior at major events in the data cycle. + + @see `PFCollectionViewCell` + */ +@interface PFQueryCollectionViewController : UICollectionViewController + +/** + The class name of the `PFObject` this collection will use as a datasource. + */ +@property (nullable, nonatomic, copy) IBInspectable NSString *parseClassName; + +/** + Whether the collection should use the default loading view. Default - `YES`. + */ +@property (nonatomic, assign) IBInspectable BOOL loadingViewEnabled; + +/** + Whether the collection should use the built-in pull-to-refresh feature. Default - `YES`. + */ +@property (nonatomic, assign) IBInspectable BOOL pullToRefreshEnabled; + +/** + Whether the collection should use the built-in pagination feature. Default - `YES`. + */ +@property (nonatomic, assign) IBInspectable BOOL paginationEnabled; + +/** + The number of objects to show per page. Default - `25`. + */ +@property (nonatomic, assign) IBInspectable NSUInteger objectsPerPage; + +/** + Whether the collection is actively loading new data from the server. + */ +@property (nonatomic, assign, getter=isLoading) BOOL loading; + +///-------------------------------------- +/// @name Creating a PFQueryCollectionViewController +///-------------------------------------- + +/** + Initializes a view controller with a `UICollectionViewFlowLayout` and a class name + of `PFObject` that will be associated with this collection. + + @param className The class name of the instances of `PFObject` that this table will display. + + @return An initialized `PFQueryCollectionViewController` object or `nil` if the object couldn't be created. + */ +- (instancetype)initWithClassName:(nullable NSString *)className; + +/** + Initializes a view controller with a class name of `PFObject` that will be associated with this collection. + + @param layout Layout for collection view to use. + @param className The class name of the instances of `PFObject` that this table will display. + + @return An initialized `PFQueryCollectionViewController` object or `nil` if the object couldn't be created. + */ +- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout + className:(nullable NSString *)className NS_DESIGNATED_INITIALIZER; + +///-------------------------------------- +/// @name Responding to Events +///-------------------------------------- + +/** + Called when objects will be loaded from Parse. If you override this method, you must + call [super objectsWillLoad] in your implementation. + */ +- (void)objectsWillLoad NS_REQUIRES_SUPER; + +/** + Called when objects have loaded from Parse. If you override this method, you must + call [super objectsDidLoad:] in your implementation. + @param error The Parse error from running the PFQuery, if there was any. + */ +- (void)objectsDidLoad:(nullable NSError *)error NS_REQUIRES_SUPER; + +///-------------------------------------- +/// @name Accessing Results +///-------------------------------------- + +/** + The array of instances of `PFObject` that is used as a data source. + */ +@property (nonatomic, copy, readonly) NSArray PF_GENERIC(__kindof PFObject *)*objects; + +/** + Returns an object at a particular indexPath. + + The default impementation returns the object at `indexPath.item`. + If you want to return objects in a different indexPath order, like for sections, override this method. + + @param indexPath An instance of `NSIndexPath`. + + @return The object at the specified indexPath. + */ +- (nullable PFObject *)objectAtIndexPath:(nullable NSIndexPath *)indexPath; + +/** + Removes an object at the specified index path, animated. + */ +- (void)removeObjectAtIndexPath:(nullable NSIndexPath *)indexPath; + +/** + Removes all objects at the specified index paths, animated. + */ +- (void)removeObjectsAtIndexPaths:(nullable NSArray PF_GENERIC(NSIndexPath *)*)indexes; + +///-------------------------------------- +/// @name Loading Data +///-------------------------------------- + +/** + Clears the collection view and loads the first page of objects. + + @return An awaitable task that completes when the reload succeeds + */ +- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects; + +/** + Loads the objects of the `PFObject.parseClassName` at the specified page and appends it to the + objects already loaded and refreshes the collection. + + @param page The page of objects to load. + @param clear Whether to clear the collection view after receiving the objects. + + @return An awaitable task that completes when the reload succeeds + */ +- (BFTask PF_GENERIC(NSArray<__kindof PFObject *>*)*)loadObjects:(NSInteger)page clear:(BOOL)clear; + +/** + Loads the next page of objects, appends to table, and refreshes. + */ +- (void)loadNextPage; + +/** + Clears the collection view of all objects. + */ +- (void)clear; + +///-------------------------------------- +/// @name Querying +///-------------------------------------- + +/** + Override to construct your own custom `PFQuery` to get the objects. + + @return An instance of `PFQuery` that `-loadObjects` method will use to the objects for this collection. + */ +- (PFQuery *)queryForCollection; + +///-------------------------------------- +/// @name Data Source Methods +///-------------------------------------- + +/** + Override this method to customize each cell given a `PFObject` that is loaded. + + @warning The cell should inherit from `PFCollectionViewCell` which is a subclass of `UICollectionViewCell`. + + @param collectionView The collection view object associated with this controller. + @param indexPath The indexPath of the cell. + @param object The `PFObject` that is associated with the cell. + + @return The cell that represents this object. + */ +- (nullable PFCollectionViewCell *)collectionView:(UICollectionView *)collectionView + cellForItemAtIndexPath:(NSIndexPath *)indexPath + object:(nullable PFObject *)object; + +/** + Override this method to customize the view that allows the user to load the + next page when pagination is turned on. + + @param collectionView The collection view object associated with this controller. + + @return The view that allows the user to paginate. + */ +- (nullable UICollectionReusableView *)collectionViewReusableViewForNextPageAction:(UICollectionView *)collectionView; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFQueryTableViewController.h b/iOS/ParseUI.framework/Headers/PFQueryTableViewController.h index c6428fc..917b102 100644 --- a/iOS/ParseUI.framework/Headers/PFQueryTableViewController.h +++ b/iOS/ParseUI.framework/Headers/PFQueryTableViewController.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -21,12 +21,18 @@ #import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class BFTask PF_GENERIC(__covariant BFGenericType); @class PFObject; @class PFQuery; @class PFTableViewCell; -/*! - This class allows you to think about a one-to-one mapping between a and a `UITableViewCell`, +/** + This class allows you to think about a one-to-one mapping between a `PFObject` and a `UITableViewCell`, rather than having to juggle index paths. You also get the following features out of the box: @@ -44,77 +50,78 @@ /// @name Creating a PFQueryTableViewController ///-------------------------------------- -/*! - @abstract Initializes with a class name of the that will be associated with this table. +/** + Initializes with a class name of the `PFObject` that will be associated with this table. @param style The UITableViewStyle for the table - @param className The class name of the instances of that this table will display. + @param className The class name of the instances of `PFObject` that this table will display. - @returns An initialized `PFQueryTableViewController` object or `nil` if the object couldn't be created. + @return An initialized `PFQueryTableViewController` object or `nil` if the object couldn't be created. */ -- (instancetype)initWithStyle:(UITableViewStyle)style className:(NSString *)className NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithStyle:(UITableViewStyle)style + className:(nullable NSString *)className NS_DESIGNATED_INITIALIZER; -/*! - @abstract Initializes with a class name of the PFObjects that will be associated with this table. +/** + Initializes with a class name of the PFObjects that will be associated with this table. - @param className The class name of the instances of that this table will display. + @param className The class name of the instances of `PFObject` that this table will display. - @returns An initialized `PFQueryTableViewController` object or `nil` if the object couldn't be created. + @return An initialized `PFQueryTableViewController` object or `nil` if the object couldn't be created. */ -- (instancetype)initWithClassName:(NSString *)className; +- (instancetype)initWithClassName:(nullable NSString *)className; ///-------------------------------------- /// @name Configuring Behavior ///-------------------------------------- -/*! - @abstract The class name of the this table will use as a datasource. +/** + The class name of the `PFObject` this table will use as a datasource. */ -@property (nonatomic, copy) NSString *parseClassName; +@property (nullable, nonatomic, copy) IBInspectable NSString *parseClassName; -/*! - @abstract The key to use to display for the cell text label. +/** + The key to use to display for the cell text label. - @discussion This won't apply if you override + This won't apply if you override `-tableView:cellForRowAtIndexPath:object:` */ -@property (nonatomic, copy) NSString *textKey; +@property (nullable, nonatomic, copy) IBInspectable NSString *textKey; -/*! - @abstract The key to use to display for the cell image view. +/** + The key to use to display for the cell image view. - @discussion This won't apply if you override + This won't apply if you override `-tableView:cellForRowAtIndexPath:object:` */ -@property (nonatomic, copy) NSString *imageKey; +@property (nullable, nonatomic, copy) IBInspectable NSString *imageKey; -/*! - @abstract The image to use as a placeholder for the cell images. +/** + The image to use as a placeholder for the cell images. - @discussion This won't apply if you override + This won't apply if you override `-tableView:cellForRowAtIndexPath:object:` */ -@property (nonatomic, strong) UIImage *placeholderImage; +@property (nullable, nonatomic, strong) IBInspectable UIImage *placeholderImage; -/*! - @abstract Whether the table should use the default loading view. Default - `YES`. +/** + Whether the table should use the default loading view. Default - `YES`. */ -@property (nonatomic, assign) BOOL loadingViewEnabled; +@property (nonatomic, assign) IBInspectable BOOL loadingViewEnabled; -/*! - @abstract Whether the table should use the built-in pull-to-refresh feature. Defualt - `YES`. +/** + Whether the table should use the built-in pull-to-refresh feature. Default - `YES`. */ -@property (nonatomic, assign) BOOL pullToRefreshEnabled; +@property (nonatomic, assign) IBInspectable BOOL pullToRefreshEnabled; -/*! - @abstract Whether the table should use the built-in pagination feature. Default - `YES`. +/** + Whether the table should use the built-in pagination feature. Default - `YES`. */ -@property (nonatomic, assign) BOOL paginationEnabled; +@property (nonatomic, assign) IBInspectable BOOL paginationEnabled; -/*! - @abstract The number of objects to show per page. Default - `25`. +/** + The number of objects to show per page. Default - `25`. */ -@property (nonatomic, assign) NSUInteger objectsPerPage; +@property (nonatomic, assign) IBInspectable NSUInteger objectsPerPage; -/*! - @abstract Whether the table is actively loading new data from the server. +/** + Whether the table is actively loading new data from the server. */ @property (nonatomic, assign, getter=isLoading) BOOL loading; @@ -122,61 +129,85 @@ /// @name Responding to Events ///-------------------------------------- -/*! +/** Called when objects will loaded from Parse. If you override this method, you must call [super objectsWillLoad] in your implementation. */ - (void)objectsWillLoad; -/*! +/** Called when objects have loaded from Parse. If you override this method, you must call [super objectsDidLoad:] in your implementation. @param error The Parse error from running the PFQuery, if there was any. */ -- (void)objectsDidLoad:(NSError *)error; +- (void)objectsDidLoad:(nullable NSError *)error; ///-------------------------------------- /// @name Accessing Results ///-------------------------------------- -/*! - @abstract The array of instances of that is used as a data source. +/** + The array of instances of `PFObject` that is used as a data source. */ -@property (nonatomic, copy, readonly) NSArray *objects; +@property (nullable, nonatomic, copy, readonly) NSArray PF_GENERIC(__kindof PFObject *)*objects; -/*! - @abstract Returns an object at a particular indexPath. +/** + Returns an object at a particular indexPath. - @discussion The default impementation returns the object at `indexPath.row`. + The default impementation returns the object at `indexPath.row`. If you want to return objects in a different indexPath order, like for sections, override this method. @param indexPath The indexPath. - @returns The object at the specified index + @return The object at the specified index + */ +- (nullable PFObject *)objectAtIndexPath:(nullable NSIndexPath *)indexPath; + +/** + Removes an object at the specified index path, animated. + */ +- (void)removeObjectAtIndexPath:(nullable NSIndexPath *)indexPath; + +/** + Removes an object at the specified index path, with or without animation. + */ +- (void)removeObjectAtIndexPath:(nullable NSIndexPath *)indexPath animated:(BOOL)animated; + +/** + Removes all objects at the specified index paths, animated. + */ +- (void)removeObjectsAtIndexPaths:(nullable NSArray PF_GENERIC(NSIndexPath *)*)indexPaths; + +/** + Removes all objects at the specified index paths, with or without animation. */ -- (PFObject *)objectAtIndexPath:(NSIndexPath *)indexPath; +- (void)removeObjectsAtIndexPaths:(nullable NSArray PF_GENERIC(NSIndexPath *)*)indexPaths animated:(BOOL)animated; -/*! - @abstract Clears the table of all objects. +/** + Clears the table of all objects. */ - (void)clear; -/*! - @abstract Clears the table and loads the first page of objects. +/** + Clears the table and loads the first page of objects. + + @return An awaitable task that completes when the reload succeeds */ -- (void)loadObjects; +- (BFTask PF_GENERIC(NSArray<__kindof PFObject *> *)*)loadObjects; -/*! - @abstract Loads the objects of the className at the specified page and appends it to the +/** + Loads the objects of the className at the specified page and appends it to the objects already loaded and refreshes the table. @param page The page of objects to load. - @param clear Whether to clear the table after receiving the objects. + @param clear Whether to clear the table after receiving the objects + + @return An awaitable task that completes when the reload succeeds */ -- (void)loadObjects:(NSInteger)page clear:(BOOL)clear; +- (BFTask PF_GENERIC(NSArray<__kindof PFObject *> *)*)loadObjects:(NSInteger)page clear:(BOOL)clear; -/*! - @abstract Loads the next page of objects, appends to table, and refreshes. +/** + Loads the next page of objects, appends to table, and refreshes. */ - (void)loadNextPage; @@ -184,7 +215,7 @@ /// @name Querying ///-------------------------------------- -/*! +/** Override to construct your own custom PFQuery to get the objects. @result PFQuery that loadObjects will use to the objects for this table. */ @@ -194,34 +225,35 @@ /// @name Data Source Methods ///-------------------------------------- -/*! - @abstract Override this method to customize each cell given a PFObject that is loaded. +/** + Override this method to customize each cell given a PFObject that is loaded. - @discussion If you don't override this method, it will use a default style cell and display either + If you don't override this method, it will use a default style cell and display either the first data key from the object, or it will display the key as specified with `textKey`, `imageKey`. - @warning The cell should inherit from which is a subclass of `UITableViewCell`. + @warning The cell should inherit from `PFTableViewCell` which is a subclass of `UITableViewCell`. @param tableView The table view object associated with this controller. @param indexPath The indexPath of the cell. @param object The PFObject that is associated with the cell. - @returns The cell that represents this object. + @return The cell that represents this object. */ -- (PFTableViewCell *)tableView:(UITableView *)tableView - cellForRowAtIndexPath:(NSIndexPath *)indexPath - object:(PFObject *)object; +- (nullable PFTableViewCell *)tableView:(UITableView *)tableView + cellForRowAtIndexPath:(NSIndexPath *)indexPath + object:(nullable PFObject *)object; -/*! - @discussion Override this method to customize the cell that allows the user to load the +/** + Override this method to customize the cell that allows the user to load the next page when pagination is turned on. @param tableView The table view object associated with this controller. @param indexPath The indexPath of the cell. - @returns The cell that allows the user to paginate. + @return The cell that allows the user to paginate. */ -- (PFTableViewCell *)tableView:(UITableView *)tableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath; - +- (nullable PFTableViewCell *)tableView:(UITableView *)tableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFSignUpView.h b/iOS/ParseUI.framework/Headers/PFSignUpView.h index d38b614..e203515 100644 --- a/iOS/ParseUI.framework/Headers/PFSignUpView.h +++ b/iOS/ParseUI.framework/Headers/PFSignUpView.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -21,32 +21,50 @@ #import -/*! +#import + +NS_ASSUME_NONNULL_BEGIN + +/** `PFSignUpFields` bitmask specifies the sign up elements which are enabled in the view. @see PFSignUpViewController @see PFSignUpView */ typedef NS_OPTIONS(NSInteger, PFSignUpFields) { - /*! Username and password fields. */ + /** Username and password fields. */ PFSignUpFieldsUsernameAndPassword = 0, - /*! Email field. */ + /** Email field. */ PFSignUpFieldsEmail = 1 << 0, - /*! This field can be used for something else. */ + /** This field can be used for something else. */ PFSignUpFieldsAdditional = 1 << 1, - /*! Sign Up Button */ + /** Sign Up Button */ PFSignUpFieldsSignUpButton = 1 << 2, - /*! Dismiss Button */ + /** Dismiss Button */ PFSignUpFieldsDismissButton = 1 << 3, - /*! Default value. Combines Username, Password, Email, Sign Up and Dismiss Buttons. */ + /** Default value. Combines Username, Password, Email, Sign Up and Dismiss Buttons. */ PFSignUpFieldsDefault = (PFSignUpFieldsUsernameAndPassword | PFSignUpFieldsEmail | PFSignUpFieldsSignUpButton | PFSignUpFieldsDismissButton) }; -/*! - The `PFSignUpView` class provides a standard sign up interface for authenticating a . +/** + `PFSignUpFields`'s accessibity identifiers + + @see PFSignUpView + */ +extern NSString *const PFSignUpViewUsernameFieldAccessibilityIdentifier; +extern NSString *const PFSignUpViewEmailFieldAccessibilityIdentifier; +extern NSString *const PFSignUpViewPasswordFieldAccessibilityIdentifier; +extern NSString *const PFSignUpViewAdditionalFieldAccessibilityIdentifier; +extern NSString *const PFSignUpViewSignUpButtonAccessibilityIdentifier; +extern NSString *const PFSignUpViewDismissButtonAccessibilityIdentifier; + +@class PFTextField; + +/** + The `PFSignUpView` class provides a standard sign up interface for authenticating a `PFUser`. */ @interface PFSignUpView : UIScrollView @@ -54,41 +72,41 @@ typedef NS_OPTIONS(NSInteger, PFSignUpFields) { /// @name Creating SignUp View ///-------------------------------------- -/*! - @abstract Initializes the view with the specified sign up elements. +/** + Initializes the view with the specified sign up elements. @param fields A bitmask specifying the sign up elements which are enabled in the view - @returns An initialized `PFSignUpView` object or `nil` if the object couldn't be created. + @return An initialized `PFSignUpView` object or `nil` if the object couldn't be created. @see PFSignUpFields */ - (instancetype)initWithFields:(PFSignUpFields)fields; -/*! - @abstract The view controller that will present this view. +/** + The view controller that will present this view. - @discussion Used to lay out elements correctly when the presenting view controller has translucent elements. + Used to lay out elements correctly when the presenting view controller has translucent elements. */ -@property (nonatomic, weak) UIViewController *presentingViewController; +@property (nullable, nonatomic, weak) UIViewController *presentingViewController; ///-------------------------------------- /// @name Customizing the Logo ///-------------------------------------- -/*! - @abstract The logo. By default, it is the Parse logo. +/** + The logo. By default, it is the Parse logo. */ -@property (nonatomic, strong) UIView *logo; +@property (nullable, nonatomic, strong) UIView *logo; ///-------------------------------------- /// @name Configure Username Behaviour ///-------------------------------------- -/*! - @abstract If email should be used to log in, instead of username +/** + If email should be used to log in, instead of username - @discussion By default, this is set to `NO`. + By default, this is set to `NO`. */ @property (nonatomic, assign) BOOL emailAsUsername; @@ -96,41 +114,43 @@ typedef NS_OPTIONS(NSInteger, PFSignUpFields) { /// @name Sign Up Elements ///-------------------------------------- -/*! - @abstract The bitmask which specifies the enabled sign up elements in the view +/** + The bitmask which specifies the enabled sign up elements in the view */ @property (nonatomic, assign, readonly) PFSignUpFields fields; -/*! - @abstract The username text field. +/** + The username text field. */ -@property (nonatomic, strong, readonly) UITextField *usernameField; +@property (nullable, nonatomic, strong, readonly) PFTextField *usernameField; -/*! - @abstract The password text field. +/** + The password text field. */ -@property (nonatomic, strong, readonly) UITextField *passwordField; +@property (nullable, nonatomic, strong, readonly) PFTextField *passwordField; -/*! - @abstract The email text field. It is `nil` if the element is not enabled. +/** + The email text field. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UITextField *emailField; +@property (nullable, nonatomic, strong, readonly) PFTextField *emailField; -/*! - @abstract The additional text field. It is `nil` if the element is not enabled. +/** + The additional text field. It is `nil` if the element is not enabled. - @discussion This field is intended to be customized. + This field is intended to be customized. */ -@property (nonatomic, strong, readonly) UITextField *additionalField; +@property (nullable, nonatomic, strong, readonly) PFTextField *additionalField; -/*! - @abstract The sign up button. It is `nil` if the element is not enabled. +/** + The sign up button. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UIButton *signUpButton; +@property (nullable, nonatomic, strong, readonly) UIButton *signUpButton; -/*! - @abstract The dismiss button. It is `nil` if the element is not enabled. +/** + The dismiss button. It is `nil` if the element is not enabled. */ -@property (nonatomic, strong, readonly) UIButton *dismissButton; +@property (nullable, nonatomic, strong, readonly) UIButton *dismissButton; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFSignUpViewController.h b/iOS/ParseUI.framework/Headers/PFSignUpViewController.h index 370c894..e9baf62 100644 --- a/iOS/ParseUI.framework/Headers/PFSignUpViewController.h +++ b/iOS/ParseUI.framework/Headers/PFSignUpViewController.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -21,14 +21,19 @@ #import +#import + +#import #import @class PFUser; @protocol PFSignUpViewControllerDelegate; -/*! +NS_ASSUME_NONNULL_BEGIN + +/** The `PFSignUpViewController` class that presents and manages - a standard authentication interface for signing up a . + a standard authentication interface for signing up a `PFUser`. */ @interface PFSignUpViewController : UIViewController @@ -36,42 +41,42 @@ /// @name Configuring Sign Up Elements ///-------------------------------------- -/*! - @abstract A bitmask specifying the log in elements which are enabled in the view. +/** + A bitmask specifying the log in elements which are enabled in the view. @see PFSignUpFields */ @property (nonatomic, assign) PFSignUpFields fields; -/*! - @abstract The sign up view. It contains all the enabled log in elements. +/** + The sign up view. It contains all the enabled log in elements. @see PFSignUpView */ -@property (nonatomic, strong, readonly) PFSignUpView *signUpView; +@property (nullable, nonatomic, strong, readonly) PFSignUpView *signUpView; ///-------------------------------------- /// @name Configuring Sign Up Behaviors ///-------------------------------------- -/*! - @abstract The delegate that responds to the control events of `PFSignUpViewController`. +/** + The delegate that responds to the control events of `PFSignUpViewController`. @see PFSignUpViewControllerDelegate */ -@property (nonatomic, weak) id delegate; +@property (nullable, nonatomic, weak) id delegate; -/*! - @abstract Minimum required password length for user signups, defaults to `0`. +/** + Minimum required password length for user signups, defaults to `0`. */ @property (nonatomic, assign) NSUInteger minPasswordLength; -/*! - @abstract Whether to use the email as username on the attached . +/** + Whether to use the email as username on the attached `signUpView`. - @discussion If set to `YES`, we'll hide the email field, prompt for the email in + If set to `YES`, we'll hide the email field, prompt for the email in the username field, and save the email into both username and email - fields on the new object. By default, this is set to `NO`. + fields on the new `PFUser` object. By default, this is set to `NO`. */ @property (nonatomic, assign) BOOL emailAsUsername; @@ -81,20 +86,20 @@ /// @name Notifications ///-------------------------------------- -/*! - @abstract The notification is posted immediately after the sign up succeeds. +/** + The notification is posted immediately after the sign up succeeds. */ extern NSString *const PFSignUpSuccessNotification; -/*! - @abstract The notification is posted immediately after the sign up fails. +/** + The notification is posted immediately after the sign up fails. - @discussion If the delegate prevents the sign up to start, the notification is not sent. + If the delegate prevents the sign up to start, the notification is not sent. */ extern NSString *const PFSignUpFailureNotification; -/*! - @abstract The notification is posted immediately after the user cancels sign up. +/** + The notification is posted immediately after the user cancels sign up. */ extern NSString *const PFSignUpCancelNotification; @@ -102,8 +107,8 @@ extern NSString *const PFSignUpCancelNotification; /// @name PFSignUpViewControllerDelegate ///-------------------------------------- -/*! - The `PFLogInViewControllerDelegate` protocol defines methods a delegate of a should implement. +/** + The `PFLogInViewControllerDelegate` protocol defines methods a delegate of a `PFSignUpViewController` should implement. All methods of this protocol are optional. */ @protocol PFSignUpViewControllerDelegate @@ -114,41 +119,43 @@ extern NSString *const PFSignUpCancelNotification; /// @name Customizing Behavior ///-------------------------------------- -/*! - @abstract Sent to the delegate to determine whether the sign up request should be submitted to the server. +/** + Sent to the delegate to determine whether the sign up request should be submitted to the server. @param signUpController The signup view controller that is requesting the data. @param info An `NSDictionary` instance which contains all sign up information that the user entered. - @returns A `BOOL` indicating whether the sign up should proceed. + @return A `BOOL` indicating whether the sign up should proceed. */ -- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary *)info; +- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary PF_GENERIC(NSString *,NSString *)*)info; ///-------------------------------------- /// @name Responding to Actions ///-------------------------------------- -/*! - @abstract Sent to the delegate when a is signed up. +/** + Sent to the delegate when a `PFUser` is signed up. @param signUpController The signup view controller where signup finished. - @param user object that is a result of the sign up. + @param user `PFUser` object that is a result of the sign up. */ - (void)signUpViewController:(PFSignUpViewController *)signUpController didSignUpUser:(PFUser *)user; -/*! - @abstract Sent to the delegate when the sign up attempt fails. +/** + Sent to the delegate when the sign up attempt fails. @param signUpController The signup view controller where signup failed. @param error `NSError` object representing the error that occured. */ -- (void)signUpViewController:(PFSignUpViewController *)signUpController didFailToSignUpWithError:(NSError *)error; +- (void)signUpViewController:(PFSignUpViewController *)signUpController didFailToSignUpWithError:(nullable NSError *)error; -/*! - @abstract Sent to the delegate when the sign up screen is cancelled. +/** + Sent to the delegate when the sign up screen is cancelled. @param signUpController The signup view controller where signup was cancelled. */ - (void)signUpViewControllerDidCancelSignUp:(PFSignUpViewController *)signUpController; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFTableViewCell.h b/iOS/ParseUI.framework/Headers/PFTableViewCell.h index 1d2aa71..fe62c78 100644 --- a/iOS/ParseUI.framework/Headers/PFTableViewCell.h +++ b/iOS/ParseUI.framework/Headers/PFTableViewCell.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -21,21 +21,26 @@ #import +#import #import -/*! +NS_ASSUME_NONNULL_BEGIN + +/** The `PFTableViewCell` class represents a table view cell which can download and display remote images stored on Parse. - When used in a - downloading and displaying of the remote images - are automatically managed by the . + When used in a `PFQueryTableViewController` - downloading and + displaying of the remote images are automatically managed by the controller. */ @interface PFTableViewCell : UITableViewCell -/*! - @abstract The imageView of the table view cell. +/** + The imageView of the table view cell. - @see PFImageView + @see `PFImageView` */ -@property (nonatomic, strong, readonly) PFImageView *imageView; +@property (nullable, nonatomic, strong, readonly) PFImageView *imageView; @end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/PFTextField.h b/iOS/ParseUI.framework/Headers/PFTextField.h new file mode 100644 index 0000000..4e6f878 --- /dev/null +++ b/iOS/ParseUI.framework/Headers/PFTextField.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2014, Parse, LLC. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Parse. + * + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + `PFTextFieldSeparatorStyle` bitmask specifies the style of the separators, + that should be used for a given `PFTextField`. + + @see PFTextField + */ +typedef NS_OPTIONS(uint8_t, PFTextFieldSeparatorStyle){ + /** No separators are visible. */ + PFTextFieldSeparatorStyleNone = 0, + /** Separator on top of the text field. */ + PFTextFieldSeparatorStyleTop = 1 << 0, + /** Separator at the bottom of the text field. */ + PFTextFieldSeparatorStyleBottom = 1 << 1 +}; + +/** + `PFTextField` class serves as a stylable subclass of `UITextField`. + It includes styles that are specific to `ParseUI` framework and allows advanced customization. + */ +@interface PFTextField : UITextField + +/** + Separator style bitmask that should be applied to this textfield. + + Default: `PFTextFieldSeparatorStyleNone` + + @see PFTextFieldSeparatorStyle + */ +@property (nonatomic, assign) PFTextFieldSeparatorStyle separatorStyle; + +/** + Color that should be used for the separators, if they are visible. + + Default: `227,227,227,1.0`. + */ +@property (nullable, nonatomic, strong) UIColor *separatorColor UI_APPEARANCE_SELECTOR; + +/** + This method is a convenience initializer that sets both `frame` and `separatorStyle` for an instance of `PFTextField.` + + @param frame The frame rectangle for the view, measured in points. + @param separatorStyle Initial separator style to use. + + @return An initialized instance of `PFTextField` or `nil` if it couldn't be created. + */ +- (instancetype)initWithFrame:(CGRect)frame separatorStyle:(PFTextFieldSeparatorStyle)separatorStyle; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS/ParseUI.framework/Headers/ParseUI.h b/iOS/ParseUI.framework/Headers/ParseUI.h index 3be9d5d..788a4b0 100644 --- a/iOS/ParseUI.framework/Headers/ParseUI.h +++ b/iOS/ParseUI.framework/Headers/ParseUI.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -19,13 +19,16 @@ * */ +#import #import #import #import #import #import +#import #import #import #import #import +#import #import diff --git a/iOS/ParseUI.framework/Headers/ParseUIConstants.h b/iOS/ParseUI.framework/Headers/ParseUIConstants.h index d7e1659..edd970a 100644 --- a/iOS/ParseUI.framework/Headers/ParseUIConstants.h +++ b/iOS/ParseUI.framework/Headers/ParseUIConstants.h @@ -1,13 +1,13 @@ /* - * Copyright (c) 2014, Facebook, Inc. All rights reserved. + * Copyright (c) 2014, Parse, LLC. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. + * in connection with the web services and APIs provided by Parse. * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be + * As with any software that integrates with the Parse platform, your use of + * this software is subject to the Parse Terms of Service + * [https://www.parse.com/about/terms]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR @@ -19,19 +19,26 @@ * */ +#import +#import + #ifndef ParseUI_ParseUIConstants_h #define ParseUI_ParseUIConstants_h +///-------------------------------------- +/// @name Deprecated Macros +///-------------------------------------- + #ifndef PARSE_UI_DEPRECATED - #ifdef __deprecated_msg - #define PARSE_UI_DEPRECATED(_MSG) (deprecated(_MSG)) - #else - #ifdef __deprecated - #define PARSE_UI_DEPRECATED(_MSG) (deprecated) - #else - #define PARSE_UI_DEPRECATED(_MSG) - #endif - #endif +# ifdef __deprecated_msg +# define PARSE_UI_DEPRECATED(_MSG) (deprecated(_MSG)) +# else +# ifdef __deprecated +# define PARSE_UI_DEPRECATED(_MSG) (deprecated) +# else +# define PARSE_UI_DEPRECATED(_MSG) +# endif +# endif #endif #endif diff --git a/iOS/ParseUI.framework/Info.plist b/iOS/ParseUI.framework/Info.plist index c9b898c..4c91534 100644 Binary files a/iOS/ParseUI.framework/Info.plist and b/iOS/ParseUI.framework/Info.plist differ diff --git a/iOS/ParseUI.framework/ParseUI b/iOS/ParseUI.framework/ParseUI index 1cbc555..4eef377 100644 Binary files a/iOS/ParseUI.framework/ParseUI and b/iOS/ParseUI.framework/ParseUI differ diff --git a/iOS/PushNotificationTutorial.xcodeproj/project.pbxproj b/iOS/PushNotificationTutorial.xcodeproj/project.pbxproj index d33e1ed..ffc5420 100644 --- a/iOS/PushNotificationTutorial.xcodeproj/project.pbxproj +++ b/iOS/PushNotificationTutorial.xcodeproj/project.pbxproj @@ -30,8 +30,8 @@ D4F41A0114D9152D00D02120 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4F419FA14D9152D00D02120 /* Security.framework */; }; D4F41A0214D9152D00D02120 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4F419FB14D9152D00D02120 /* SystemConfiguration.framework */; }; D4F41A0414D9154500D02120 /* Parse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4F41A0314D9154500D02120 /* Parse.framework */; }; + E7273C0D1C33664E00B1F9D2 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = E7273C0B1C33664E00B1F9D2 /* MainWindow.xib */; }; E762021519CCF83500D726F2 /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E762021319CCF83500D726F2 /* Bolts.framework */; }; - E762021619CCF83500D726F2 /* ParseFacebookUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E762021419CCF83500D726F2 /* ParseFacebookUtils.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -63,8 +63,8 @@ D4F419FA14D9152D00D02120 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; D4F419FB14D9152D00D02120 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; D4F41A0314D9154500D02120 /* Parse.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Parse.framework; sourceTree = ""; }; + E7273C0C1C33664E00B1F9D2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; E762021319CCF83500D726F2 /* Bolts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Bolts.framework; sourceTree = ""; }; - E762021419CCF83500D726F2 /* ParseFacebookUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ParseFacebookUtils.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -77,7 +77,6 @@ C44D5FA8161FA226007044A5 /* AdSupport.framework in Frameworks */, C44D5FAB161FA226007044A5 /* Social.framework in Frameworks */, C44D5FA9161FA226007044A5 /* libsqlite3.dylib in Frameworks */, - E762021619CCF83500D726F2 /* ParseFacebookUtils.framework in Frameworks */, C44D5FAA161FA226007044A5 /* libz.dylib in Frameworks */, C44D5FAC161FA226007044A5 /* StoreKit.framework in Frameworks */, D4F419FC14D9152D00D02120 /* AudioToolbox.framework in Frameworks */, @@ -117,25 +116,9 @@ D4F419D314D90FFB00D02120 /* Frameworks */ = { isa = PBXGroup; children = ( + E7273C0E1C336D6100B1F9D2 /* System Frameworks */, E762021319CCF83500D726F2 /* Bolts.framework */, - E762021419CCF83500D726F2 /* ParseFacebookUtils.framework */, - 6D10F48416DD714F00690A0F /* CoreLocation.framework */, - C44D5FA1161FA226007044A5 /* Accounts.framework */, - C44D5FA2161FA226007044A5 /* AdSupport.framework */, - D4F419F514D9152D00D02120 /* AudioToolbox.framework */, - D4F419F614D9152D00D02120 /* CFNetwork.framework */, - D4F419D814D90FFB00D02120 /* CoreGraphics.framework */, - D4F419D614D90FFB00D02120 /* Foundation.framework */, - C44D5FA3161FA226007044A5 /* libsqlite3.dylib */, - C44D5FA4161FA226007044A5 /* libz.dylib */, - D4F419F814D9152D00D02120 /* MobileCoreServices.framework */, D4F41A0314D9154500D02120 /* Parse.framework */, - D4F419F914D9152D00D02120 /* QuartzCore.framework */, - D4F419FA14D9152D00D02120 /* Security.framework */, - C44D5FA5161FA226007044A5 /* Social.framework */, - C44D5FA6161FA226007044A5 /* StoreKit.framework */, - D4F419FB14D9152D00D02120 /* SystemConfiguration.framework */, - D4F419D414D90FFB00D02120 /* UIKit.framework */, ); name = Frameworks; sourceTree = ""; @@ -145,6 +128,7 @@ children = ( D4F419E314D90FFB00D02120 /* AppDelegate.h */, D4F419E414D90FFB00D02120 /* AppDelegate.m */, + E7273C0B1C33664E00B1F9D2 /* MainWindow.xib */, D4F419E614D90FFB00D02120 /* ViewController.h */, D4F419E714D90FFB00D02120 /* ViewController.m */, D4F419E914D90FFB00D02120 /* ViewController.xib */, @@ -165,6 +149,29 @@ name = "Supporting Files"; sourceTree = ""; }; + E7273C0E1C336D6100B1F9D2 /* System Frameworks */ = { + isa = PBXGroup; + children = ( + C44D5FA3161FA226007044A5 /* libsqlite3.dylib */, + C44D5FA4161FA226007044A5 /* libz.dylib */, + D4F419F914D9152D00D02120 /* QuartzCore.framework */, + D4F419FA14D9152D00D02120 /* Security.framework */, + C44D5FA5161FA226007044A5 /* Social.framework */, + C44D5FA6161FA226007044A5 /* StoreKit.framework */, + D4F419FB14D9152D00D02120 /* SystemConfiguration.framework */, + D4F419D414D90FFB00D02120 /* UIKit.framework */, + D4F419F814D9152D00D02120 /* MobileCoreServices.framework */, + 6D10F48416DD714F00690A0F /* CoreLocation.framework */, + C44D5FA1161FA226007044A5 /* Accounts.framework */, + C44D5FA2161FA226007044A5 /* AdSupport.framework */, + D4F419F514D9152D00D02120 /* AudioToolbox.framework */, + D4F419F614D9152D00D02120 /* CFNetwork.framework */, + D4F419D814D90FFB00D02120 /* CoreGraphics.framework */, + D4F419D614D90FFB00D02120 /* Foundation.framework */, + ); + name = "System Frameworks"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -192,6 +199,16 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 0720; + TargetAttributes = { + D4F419CF14D90FFB00D02120 = { + DevelopmentTeam = 56ZZM6JHSL; + SystemCapabilities = { + com.apple.Push = { + enabled = 1; + }; + }; + }; + }; }; buildConfigurationList = D4F419CA14D90FFB00D02120 /* Build configuration list for PBXProject "PushNotificationTutorial" */; compatibilityVersion = "Xcode 3.2"; @@ -215,6 +232,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + E7273C0D1C33664E00B1F9D2 /* MainWindow.xib in Resources */, D4F419DF14D90FFB00D02120 /* InfoPlist.strings in Resources */, D4F419EB14D90FFB00D02120 /* ViewController.xib in Resources */, 6D2CA81916E01A8300B2695E /* Default-568h@2x.png in Resources */, @@ -253,6 +271,14 @@ name = ViewController.xib; sourceTree = ""; }; + E7273C0B1C33664E00B1F9D2 /* MainWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + E7273C0C1C33664E00B1F9D2 /* en */, + ); + name = MainWindow.xib; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -338,6 +364,7 @@ buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)", @@ -347,7 +374,7 @@ GCC_PREFIX_HEADER = "PushNotificationTutorial/PushNotificationTutorial-Prefix.pch"; INFOPLIST_FILE = "PushNotificationTutorial/PushNotificationTutorial-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PRODUCT_BUNDLE_IDENTIFIER = com.parse.AdvancedPushTutorial; + PRODUCT_BUNDLE_IDENTIFIER = com.example.MyParsePushApp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; @@ -360,6 +387,7 @@ buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)", @@ -369,7 +397,7 @@ GCC_PREFIX_HEADER = "PushNotificationTutorial/PushNotificationTutorial-Prefix.pch"; INFOPLIST_FILE = "PushNotificationTutorial/PushNotificationTutorial-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PRODUCT_BUNDLE_IDENTIFIER = com.parse.AdvancedPushTutorial; + PRODUCT_BUNDLE_IDENTIFIER = com.example.MyParsePushApp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; diff --git a/iOS/PushNotificationTutorial/AppDelegate.h b/iOS/PushNotificationTutorial/AppDelegate.h index 63603e0..fdc51fc 100644 --- a/iOS/PushNotificationTutorial/AppDelegate.h +++ b/iOS/PushNotificationTutorial/AppDelegate.h @@ -1,15 +1,20 @@ -// -// Copyright (c) 2013 Parse. All rights reserved. +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ -#import -#import "ViewController.h" +#import -@class AppDelegate; +@class ViewController; -@interface AppDelegate : UIResponder +@interface AppDelegate : NSObject -@property (strong, nonatomic) UIWindow *window; +@property (nonatomic, strong) IBOutlet UIWindow *window; -@property (strong, nonatomic) ViewController *viewController; +@property (nonatomic, strong) IBOutlet ViewController *viewController; @end diff --git a/iOS/PushNotificationTutorial/AppDelegate.m b/iOS/PushNotificationTutorial/AppDelegate.m index 8ba0812..8b95441 100644 --- a/iOS/PushNotificationTutorial/AppDelegate.m +++ b/iOS/PushNotificationTutorial/AppDelegate.m @@ -1,5 +1,12 @@ -// -// Copyright (c) 2013 Parse. All rights reserved. +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + #import "AppDelegate.h" #import "ViewController.h" @@ -10,12 +17,11 @@ @implementation AppDelegate #pragma mark - UIApplicationDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - // **************************************************************************** // Uncomment and fill in with your Parse credentials: // [Parse setApplicationId:@"your_application_id" clientKey:@"your_client_key"]; // **************************************************************************** + // Override point for customization after application launch. @@ -26,10 +32,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( categories:nil]; [application registerUserNotificationSettings:settings]; [application registerForRemoteNotifications]; - - self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; - self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:self.viewController]; + + self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; + return YES; } @@ -51,6 +57,20 @@ - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotif - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { [PFPush handlePush:userInfo]; + + if (application.applicationState == UIApplicationStateInactive) { + [PFAnalytics trackAppOpenedWithRemoteNotificationPayload:userInfo]; + } } +/////////////////////////////////////////////////////////// +// Uncomment this method if you want to use Push Notifications with Background App Refresh +/////////////////////////////////////////////////////////// +//- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { +// if (application.applicationState == UIApplicationStateInactive) { +// [PFAnalytics trackAppOpenedWithRemoteNotificationPayload:userInfo]; +// } +//} + + @end diff --git a/iOS/PushNotificationTutorial/PushNotificationTutorial-Info.plist b/iOS/PushNotificationTutorial/PushNotificationTutorial-Info.plist index 013ebbf..8904dae 100644 --- a/iOS/PushNotificationTutorial/PushNotificationTutorial-Info.plist +++ b/iOS/PushNotificationTutorial/PushNotificationTutorial-Info.plist @@ -26,6 +26,8 @@ 1.0 LSRequiresIPhoneOS + NSMainNibFile + MainWindow UISupportedInterfaceOrientations UIInterfaceOrientationPortrait diff --git a/iOS/PushNotificationTutorial/ViewController.h b/iOS/PushNotificationTutorial/ViewController.h index 9a807d3..df5aa9d 100644 --- a/iOS/PushNotificationTutorial/ViewController.h +++ b/iOS/PushNotificationTutorial/ViewController.h @@ -1,7 +1,13 @@ -// -// Copyright (c) 2013 Parse. All rights reserved. +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ -#import +#import @interface ViewController : UIViewController diff --git a/iOS/PushNotificationTutorial/ViewController.m b/iOS/PushNotificationTutorial/ViewController.m index c521171..2389563 100644 --- a/iOS/PushNotificationTutorial/ViewController.m +++ b/iOS/PushNotificationTutorial/ViewController.m @@ -1,5 +1,11 @@ -// -// Copyright (c) 2013 Parse. All rights reserved. +/** + * Copyright (c) 2015-present, Parse, LLC. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ #import "ViewController.h" #import @@ -26,7 +32,19 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface /* Touch handler for the button */ - (IBAction)broadcastPushNotification:(id)sender { - [PFPush sendPushMessageToChannelInBackground:@"global" withMessage:@"Hello World!"]; + [PFPush sendPushMessageToChannelInBackground:@"global" withMessage:@"Hello World!" block:^(BOOL succeeded, NSError *error) { + if (error) { + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Send Push Failed" + message:@"Check the console for more information." + preferredStyle:UIAlertControllerStyleAlert]; + + [alertController addAction:[UIAlertAction actionWithTitle:@"OK" + style:UIAlertActionStyleCancel + handler:nil]]; + + [self presentViewController:alertController animated:YES completion:nil]; + } + }]; } - (IBAction)updateInstallation:(id)sender { diff --git a/iOS/PushNotificationTutorial/en.lproj/MainWindow.xib b/iOS/PushNotificationTutorial/en.lproj/MainWindow.xib new file mode 100644 index 0000000..6e4a9b2 --- /dev/null +++ b/iOS/PushNotificationTutorial/en.lproj/MainWindow.xib @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/PushNotificationTutorial/en.lproj/ViewController.xib b/iOS/PushNotificationTutorial/en.lproj/ViewController.xib index 4b32d53..a51bbd8 100644 --- a/iOS/PushNotificationTutorial/en.lproj/ViewController.xib +++ b/iOS/PushNotificationTutorial/en.lproj/ViewController.xib @@ -1,8 +1,8 @@ - + - - + + @@ -24,10 +24,10 @@ - + -