Skip to content

Commit 67b3a1a

Browse files
committed
Merge pull request #333 from ParsePlatform/nlutsenko.generic.push
Add ObjC generics to collections/queries in PFPush public header.
2 parents 8f81fb6 + 087cda1 commit 67b3a1a

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Parse/PFPush.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
#import <Bolts/BFTask.h>
1313

1414
#import <Parse/PFConstants.h>
15+
#import <Parse/PFInstallation.h>
1516

16-
@class PFQuery;
17+
@class PFQuery PF_GENERIC(PFGenericObject : PFObject *);
1718

1819
PF_ASSUME_NONNULL_BEGIN
1920

@@ -49,7 +50,7 @@ PF_ASSUME_NONNULL_BEGIN
4950
@param channels The array of channels to set for this push.
5051
Each channel name must start with a letter and contain only letters, numbers, dashes, and underscores.
5152
*/
52-
- (void)setChannels:(PF_NULLABLE NSArray *)channels;
53+
- (void)setChannels:(PF_NULLABLE NSArray PF_GENERIC(NSString *) *)channels;
5354

5455
/*!
5556
@abstract Sets an installation query to which this push notification will be sent.
@@ -58,7 +59,7 @@ PF_ASSUME_NONNULL_BEGIN
5859
5960
@param query The installation query to set for this push.
6061
*/
61-
- (void)setQuery:(PF_NULLABLE PFQuery *)query;
62+
- (void)setQuery:(PF_NULLABLE PFQuery PF_GENERIC(PFInstallation *) *)query;
6263

6364
/*!
6465
@abstract Sets an alert message for this push notification.
@@ -199,7 +200,7 @@ PF_ASSUME_NONNULL_BEGIN
199200
200201
@returns Returns whether the send succeeded.
201202
*/
202-
+ (BOOL)sendPushMessageToQuery:(PFQuery *)query
203+
+ (BOOL)sendPushMessageToQuery:(PFQuery PF_GENERIC(PFInstallation *) *)query
203204
withMessage:(NSString *)message
204205
error:(NSError **)error;
205206

@@ -211,7 +212,7 @@ PF_ASSUME_NONNULL_BEGIN
211212
212213
@returns The task, that encapsulates the work being done.
213214
*/
214-
+ (BFTask PF_GENERIC(NSNumber *)*)sendPushMessageToQueryInBackground:(PFQuery *)query
215+
+ (BFTask PF_GENERIC(NSNumber *)*)sendPushMessageToQueryInBackground:(PFQuery PF_GENERIC(PFInstallation *) *)query
215216
withMessage:(NSString *)message;
216217

217218
/*!
@@ -223,7 +224,7 @@ PF_ASSUME_NONNULL_BEGIN
223224
@param block The block to execute.
224225
It should have the following argument signature: `^(BOOL succeeded, NSError *error)`
225226
*/
226-
+ (void)sendPushMessageToQueryInBackground:(PFQuery *)query
227+
+ (void)sendPushMessageToQueryInBackground:(PFQuery PF_GENERIC(PFInstallation *) *)query
227228
withMessage:(NSString *)message
228229
block:(PF_NULLABLE PFBooleanResultBlock)block;
229230

@@ -337,7 +338,7 @@ PF_ASSUME_NONNULL_BEGIN
337338
338339
@returns Returns whether the send succeeded.
339340
*/
340-
+ (BOOL)sendPushDataToQuery:(PFQuery *)query
341+
+ (BOOL)sendPushDataToQuery:(PFQuery PF_GENERIC(PFInstallation *) *)query
341342
withData:(NSDictionary *)data
342343
error:(NSError **)error;
343344

@@ -352,7 +353,7 @@ PF_ASSUME_NONNULL_BEGIN
352353
353354
@returns The task, that encapsulates the work being done.
354355
*/
355-
+ (BFTask PF_GENERIC(NSNumber *)*)sendPushDataToQueryInBackground:(PFQuery *)query
356+
+ (BFTask PF_GENERIC(NSNumber *)*)sendPushDataToQueryInBackground:(PFQuery PF_GENERIC(PFInstallation *) *)query
356357
withData:(NSDictionary *)data;
357358

358359
/*!
@@ -366,7 +367,7 @@ PF_ASSUME_NONNULL_BEGIN
366367
@param block The block to execute.
367368
It should have the following argument signature: `^(BOOL succeeded, NSError *error)`.
368369
*/
369-
+ (void)sendPushDataToQueryInBackground:(PFQuery *)query
370+
+ (void)sendPushDataToQueryInBackground:(PFQuery PF_GENERIC(PFInstallation *) *)query
370371
withData:(NSDictionary *)data
371372
block:(PF_NULLABLE PFBooleanResultBlock)block;
372373

Parse/PFPush.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@interface PFPush ()
3535

3636
@property (nonatomic, strong) PFMutablePushState *state;
37-
@property (nonatomic, strong) PFQuery *query;
37+
@property (nonatomic, strong) PFQuery PF_GENERIC(PFInstallation *) *query;
3838

3939
@end
4040

0 commit comments

Comments
 (0)