LuxChat  2.0
Instant messenger for iOS
Instance Methods | Class Methods | List of all members
PFPush(Synchronous) Category Reference

#import <PFPush+Synchronous.h>

Instance Methods

(BOOL) - sendPush:
 
More...
 

Class Methods

(BOOL) + sendPushMessageToChannel:withMessage:error:
 
(BOOL) + sendPushMessageToQuery:withMessage:error:
 
(BOOL) + sendPushDataToChannel:withData:error:
 
(BOOL) + sendPushDataToQuery:withData:error:
 
(nullable NSSet< NSString * > *) + getSubscribedChannels:
 
More...
 
(BOOL) + subscribeToChannel:error:
 
(BOOL) + unsubscribeFromChannel:error:
 

Detailed Description

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. This category lists all methods of PFPush class that are synchronous, but have asynchronous counterpart, Calling one of these synchronous methods could potentially block the current thread for a large amount of time, since it might be fetching from network or saving/loading data from disk.

Method Documentation

+ (nullable NSSet<NSString *> *) getSubscribedChannels: (NSError **)  error



Synchronously* get all the channels that this device is subscribed to.

Parameters
errorPointer to an NSError that will be set if necessary.
Returns
Returns an NSSet containing all the channel names this device is subscribed to.
- (BOOL) sendPush: (NSError **)  error



Synchronously* send this push message.

Parameters
errorPointer 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 

Synchronously* send a push message with arbitrary data to a channel.

See the guide for information about the dictionary structure.

Parameters
channelThe channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores.
dataThe data to send.
errorPointer to an NSError that will be set if necessary.
Returns
Returns whether the send succeeded.
+ (BOOL) sendPushDataToQuery: (PFQuery< PFInstallation * > *)  query
withData: (NSDictionary *)  data
error: (NSError **)  error 

Synchronously* send a push message with arbitrary data to a query.

See the guide for information about the dictionary structure.

Parameters
queryThe query to send to. The query must be a PFInstallation query created with PFInstallation.+query.
dataThe data to send.
errorPointer 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 

Synchronously* send a push message to a channel.

Parameters
channelThe channel to send to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores.
messageThe message to send.
errorPointer to an NSError that will be set if necessary.
Returns
Returns whether the send succeeded.
+ (BOOL) sendPushMessageToQuery: (PFQuery< PFInstallation * > *)  query
withMessage: (NSString *)  message
error: (NSError **)  error 

Send a push message to a query.

Parameters
queryThe query to send to. The query must be a PFInstallation query created with PFInstallation.+query.
messageThe message to send.
errorPointer to an NSError that will be set if necessary.
Returns
Returns whether the send succeeded.
+ (BOOL) subscribeToChannel: (NSString *)  channel
error: (NSError **)  error 

Synchrnously* subscribes the device to a channel of push notifications.

Parameters
channelThe channel to subscribe to. The channel name must start with a letter and contain only letters, numbers, dashes, and underscores.
errorPointer to an NSError that will be set if necessary.
Returns
Returns whether the subscribe succeeded.
+ (BOOL) unsubscribeFromChannel: (NSString *)  channel
error: (NSError **)  error 

Synchronously* unsubscribes the device to a channel of push notifications.

Parameters
channelThe channel to unsubscribe from.
errorPointer to an NSError that will be set if necessary.
Returns
Returns whether the unsubscribe succeeded.

The documentation for this category was generated from the following file: