Skip to content

Commit 0b2578d

Browse files
committed
Merge pull request #578 from ParsePlatform/nlutsenko.push.generics
Add missing generic type to PFPush.getSubscribedChannels().
2 parents 8c97bfb + 941b9b2 commit 0b2578d

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

Parse/Internal/Push/ChannelsController/PFPushChannelsController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPushChannelsController : NSO
3636
/// @name Get
3737
///--------------------------------------
3838

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

4141
///--------------------------------------
4242
/// @name Subscribe

Parse/Internal/Push/ChannelsController/PFPushChannelsController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ + (instancetype)controllerWithDataSource:(nonnull id<PFCurrentInstallationContro
4949
#pragma mark - Get
5050
///--------------------------------------
5151

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

Parse/PFPush.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPush : NSObject <NSCopying>
413413
414414
@returns Returns an `NSSet` containing all the channel names this device is subscribed to.
415415
*/
416-
+ (nullable NSSet *)getSubscribedChannels:(NSError **)error;
416+
+ (nullable NSSet PF_GENERIC(NSString *)*)getSubscribedChannels:(NSError **)error;
417417

418418
/*!
419419
@abstract *Asynchronously* get all the channels that this device is subscribed to.
@@ -437,8 +437,7 @@ PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPush : NSObject <NSCopying>
437437
It should have the following signature: `(void)callbackWithResult:(NSSet *)result error:(NSError *)error`.
438438
`error` will be `nil` on success and set if there was an error.
439439
*/
440-
+ (void)getSubscribedChannelsInBackgroundWithTarget:(id)target
441-
selector:(SEL)selector;
440+
+ (void)getSubscribedChannelsInBackgroundWithTarget:(id)target selector:(SEL)selector;
442441

443442
/*!
444443
@abstract *Synchrnously* subscribes the device to a channel of push notifications.

Parse/PFPush.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,11 @@ + (void)sendPushDataToQueryInBackground:(PFQuery *)query
316316

317317
#pragma mark Get
318318

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

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

0 commit comments

Comments
 (0)