10 #import <Foundation/Foundation.h>
12 #import <Bolts/BFTask.h>
14 #import <Parse/PFConstants.h>
15 #import <Parse/PFInstallation.h>
17 PF_TV_UNAVAILABLE_WARNING
18 PF_WATCH_UNAVAILABLE_WARNING
22 NS_ASSUME_NONNULL_BEGIN
30 PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE
@interface PFPush : NSObject<NSCopying>
33 #pragma mark - Creating a Push Notification
39 #pragma mark - Configuring a Push Notification
48 - (void)setChannel:(nullable NSString *)channel;
56 - (void)setChannels:(nullable NSArray<NSString *> *)channels;
74 - (void)setMessage:(nullable NSString *)message;
85 - (void)setData:(nullable NSDictionary *)data;
94 - (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.");
103 - (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.");
117 - (void)expireAtDate:(nullable NSDate *)date;
130 - (void)expireAfterTimeInterval:(NSTimeInterval)timeInterval;
135 - (void)clearExpiration;
144 @property (nullable, nonatomic, strong) NSDate *pushDate;
147 #pragma mark - Sending Push Notifications
159 + (
BFTask<NSNumber *> *)sendPushMessageToChannelInBackground:(NSString *)channel withMessage:(NSString *)message;
170 + (void)sendPushMessageToChannelInBackground:(NSString *)channel withMessage:(NSString *)message block:(nullable PFBooleanResultBlock)block;
181 withMessage:(NSString *)message;
193 withMessage:(NSString *)message
194 block:(nullable PFBooleanResultBlock)block;
200 - (
BFTask<NSNumber *> *)sendPushInBackground;
208 - (void)sendPushInBackgroundWithBlock:(nullable PFBooleanResultBlock)block;
221 + (
BFTask<NSNumber *> *)sendPushDataToChannelInBackground:(NSString *)channel withData:(NSDictionary *)data;
234 + (void)sendPushDataToChannelInBackground:(NSString *)channel
235 withData:(NSDictionary *)data
236 block:(nullable PFBooleanResultBlock)block;
250 withData:(NSDictionary *)data;
264 withData:(NSDictionary *)data
265 block:(nullable PFBooleanResultBlock)block;
268 #pragma mark - Handling Notifications
283 + (void)handlePush:(nullable NSDictionary *)userInfo NS_AVAILABLE_IOS(3_0) PF_EXTENSION_UNAVAILABLE("");
286 #pragma mark - Managing Channel Subscriptions
297 + (void)storeDeviceToken:(
id)deviceToken;
304 + (
BFTask<NSSet<NSString *> *> *)getSubscribedChannelsInBackground;
311 + (void)getSubscribedChannelsInBackgroundWithBlock:(PFSetResultBlock)block;
321 + (
BFTask<NSNumber *> *)subscribeToChannelInBackground:(NSString *)channel;
331 + (void)subscribeToChannelInBackground:(NSString *)channel block:(nullable PFBooleanResultBlock)block;
340 + (
BFTask<NSNumber *> *)unsubscribeFromChannelInBackground:(NSString *)channel;
349 + (void)unsubscribeFromChannelInBackground:(NSString *)channel block:(nullable PFBooleanResultBlock)block;
353 NS_ASSUME_NONNULL_END
Definition: PFObject+Subclass.h:14
Definition: PFImageView.h:32
Definition: PFInstallation.h:38