Skip to content

Commit

Permalink
Merge pull request #578 from ParsePlatform/nlutsenko.push.generics
Browse files Browse the repository at this point in the history
Add missing generic type to PFPush.getSubscribedChannels().
  • Loading branch information
nlutsenko committed Nov 18, 2015
2 parents 8c97bfb + 941b9b2 commit 0b2578d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPushChannelsController : NSO
/// @name Get
///--------------------------------------

- (BFTask *)getSubscribedChannelsAsync;
- (BFTask PF_GENERIC(NSSet<NSString *> *)*)getSubscribedChannelsAsync;

///--------------------------------------
/// @name Subscribe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ + (instancetype)controllerWithDataSource:(nonnull id<PFCurrentInstallationContro
#pragma mark - Get
///--------------------------------------

- (BFTask *)getSubscribedChannelsAsync {
- (BFTask PF_GENERIC(NSSet<NSString *> *)*)getSubscribedChannelsAsync {
return [[self _getCurrentObjectAsync] continueWithSuccessBlock:^id(BFTask *task) {
PFInstallation *installation = task.result;

Expand Down
5 changes: 2 additions & 3 deletions Parse/PFPush.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPush : NSObject <NSCopying>
@returns Returns an `NSSet` containing all the channel names this device is subscribed to.
*/
+ (nullable NSSet *)getSubscribedChannels:(NSError **)error;
+ (nullable NSSet PF_GENERIC(NSString *)*)getSubscribedChannels:(NSError **)error;

/*!
@abstract *Asynchronously* get all the channels that this device is subscribed to.
Expand All @@ -437,8 +437,7 @@ PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPush : NSObject <NSCopying>
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.
Expand Down
4 changes: 2 additions & 2 deletions Parse/PFPush.m
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ + (void)sendPushDataToQueryInBackground:(PFQuery *)query

#pragma mark Get

+ (NSSet *)getSubscribedChannels:(NSError **)error {
+ (NSSet PF_GENERIC(NSString *)*)getSubscribedChannels:(NSError **)error {
return [[self getSubscribedChannelsInBackground] waitForResult:error];
}

+ (BFTask *)getSubscribedChannelsInBackground {
+ (BFTask PF_GENERIC(NSSet<NSString *> *)*)getSubscribedChannelsInBackground {
return [[self channelsController] getSubscribedChannelsAsync];
}

Expand Down

0 comments on commit 0b2578d

Please sign in to comment.