Skip to content

Commit 883fb0a

Browse files
Remove PF_GENERIC macro from the SDK.
This is no longer needed as we will not be supporting Xcode 6 in the future. Fixes #674.
1 parent 930d96a commit 883fb0a

File tree

85 files changed

+397
-413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+397
-413
lines changed

Parse/Internal/ACL/DefaultACLController/PFDefaultACLController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#import "PFCoreDataProvider.h"
1515

16-
@class BFTask PF_GENERIC(__covariant BFGenericType);
16+
@class BFTask<__covariant BFGenericType>;
1717
@class PFACL;
1818

1919
NS_ASSUME_NONNULL_BEGIN

Parse/Internal/ACL/DefaultACLController/PFDefaultACLController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ + (instancetype)controllerWithDataSource:(id<PFCurrentUserControllerProvider>)da
4747
#pragma mark - ACL
4848
///--------------------------------------
4949

50-
- (BFTask PF_GENERIC(PFACL *)*)getDefaultACLAsync {
50+
- (BFTask<PFACL *> *)getDefaultACLAsync {
5151
return [_taskQueue enqueue:^id(BFTask *task) {
5252
if (!_defaultACL || !_useCurrentUser) {
5353
return _defaultACL;
@@ -72,7 +72,7 @@ + (instancetype)controllerWithDataSource:(id<PFCurrentUserControllerProvider>)da
7272
}];
7373
}
7474

75-
- (BFTask PF_GENERIC(PFACL *)*)setDefaultACLAsync:(PFACL *)acl withCurrentUserAccess:(BOOL)accessForCurrentUser {
75+
- (BFTask<PFACL *> *)setDefaultACLAsync:(PFACL *)acl withCurrentUserAccess:(BOOL)accessForCurrentUser {
7676
return [_taskQueue enqueue:^id(BFTask *task) {
7777
_defaultACLWithCurrentUser = nil;
7878
_lastCurrentUser = nil;

Parse/Internal/Analytics/Controller/PFAnalyticsController.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#import "PFDataProvider.h"
1515
#import "PFMacros.h"
1616

17-
@class BFTask PF_GENERIC(__covariant BFGenericType);
17+
@class BFTask<__covariant BFGenericType>;
1818

1919
NS_ASSUME_NONNULL_BEGIN
2020

@@ -45,8 +45,8 @@ NS_ASSUME_NONNULL_BEGIN
4545
4646
@return `BFTask` with result set to `@YES`.
4747
*/
48-
- (BFTask PF_GENERIC(PFVoid)*)trackAppOpenedEventAsyncWithRemoteNotificationPayload:(nullable NSDictionary *)payload
49-
sessionToken:(nullable NSString *)sessionToken;
48+
- (BFTask<PFVoid> *)trackAppOpenedEventAsyncWithRemoteNotificationPayload:(nullable NSDictionary *)payload
49+
sessionToken:(nullable NSString *)sessionToken;
5050

5151
/**
5252
Tracks the occurrence of a custom event with additional dimensions.
@@ -57,9 +57,9 @@ NS_ASSUME_NONNULL_BEGIN
5757
5858
@return `BFTask` with result set to `@YES`.
5959
*/
60-
- (BFTask PF_GENERIC(PFVoid)*)trackEventAsyncWithName:(NSString *)name
61-
dimensions:(nullable NSDictionary PF_GENERIC(NSString *, NSString *)*)dimensions
62-
sessionToken:(nullable NSString *)sessionToken;
60+
- (BFTask<PFVoid> *)trackEventAsyncWithName:(NSString *)name
61+
dimensions:(nullable NSDictionary<NSString *, NSString *> *)dimensions
62+
sessionToken:(nullable NSString *)sessionToken;
6363

6464
@end
6565

Parse/Internal/Analytics/Controller/PFAnalyticsController.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ + (instancetype)controllerWithDataSource:(id<PFEventuallyQueueProvider>)dataSour
4848
#pragma mark - Track Event
4949
///--------------------------------------
5050

51-
- (BFTask PF_GENERIC(PFVoid)*)trackAppOpenedEventAsyncWithRemoteNotificationPayload:(nullable NSDictionary *)payload
52-
sessionToken:(nullable NSString *)sessionToken {
51+
- (BFTask<PFVoid> *)trackAppOpenedEventAsyncWithRemoteNotificationPayload:(nullable NSDictionary *)payload
52+
sessionToken:(nullable NSString *)sessionToken {
5353
@weakify(self);
5454
return [[BFTask taskFromExecutor:[BFExecutor defaultPriorityBackgroundExecutor] withBlock:^id{
5555
@strongify(self);
@@ -65,9 +65,9 @@ + (instancetype)controllerWithDataSource:(id<PFEventuallyQueueProvider>)dataSour
6565
}] continueWithSuccessResult:nil];
6666
}
6767

68-
- (BFTask PF_GENERIC(PFVoid)*)trackEventAsyncWithName:(NSString *)name
69-
dimensions:(nullable NSDictionary PF_GENERIC(NSString *, NSString *)*)dimensions
70-
sessionToken:(nullable NSString *)sessionToken {
68+
- (BFTask<PFVoid> *)trackEventAsyncWithName:(NSString *)name
69+
dimensions:(nullable NSDictionary<NSString *, NSString *> *)dimensions
70+
sessionToken:(nullable NSString *)sessionToken {
7171
PFParameterAssert([[name stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length],
7272
@"A name for the custom event must be provided.");
7373

Parse/Internal/CloudCode/PFCloudCodeController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#import <Parse/PFConstants.h>
1313
#import "PFDataProvider.h"
1414

15-
@class BFTask PF_GENERIC(__covariant BFGenericType);
15+
@class BFTask<__covariant BFGenericType>;
1616

1717
@interface PFCloudCodeController : NSObject
1818

Parse/Internal/Commands/CommandRunner/PFCommandRunning.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#import "PFDataProvider.h"
1515

1616
@class BFCancellationToken;
17-
@class BFTask PF_GENERIC(__covariant BFGenericType);
17+
@class BFTask<__covariant BFGenericType>;
1818
@class PFCommandResult;
1919
@class PFRESTCommand;
2020
@protocol PFNetworkCommand;

Parse/Internal/Commands/CommandRunner/URLRequestConstructor/PFCommandURLRequestConstructor.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#import "PFDataProvider.h"
1515

16-
@class BFTask PF_GENERIC(BFGenericType);
16+
@class BFTask<__covariant BFGenericType>;
1717
@class PFRESTCommand;
1818

1919
@interface PFCommandURLRequestConstructor : NSObject
@@ -32,15 +32,15 @@
3232
/// @name Data
3333
///--------------------------------------
3434

35-
- (BFTask PF_GENERIC(NSURLRequest *)*)getDataURLRequestAsyncForCommand:(PFRESTCommand *)command;
35+
- (BFTask<NSURLRequest *> *)getDataURLRequestAsyncForCommand:(PFRESTCommand *)command;
3636

3737
///--------------------------------------
3838
/// @name File Upload
3939
///--------------------------------------
4040

41-
- (BFTask PF_GENERIC(NSURLRequest *)*)getFileUploadURLRequestAsyncForCommand:(PFRESTCommand *)command
42-
withContentType:(NSString *)contentType
43-
contentSourceFilePath:(NSString *)contentFilePath;
41+
- (BFTask<NSURLRequest *> *)getFileUploadURLRequestAsyncForCommand:(PFRESTCommand *)command
42+
withContentType:(NSString *)contentType
43+
contentSourceFilePath:(NSString *)contentFilePath;
4444

4545
///--------------------------------------
4646
/// @name Headers

Parse/Internal/Commands/CommandRunner/URLRequestConstructor/PFCommandURLRequestConstructor.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ + (instancetype)constructorWithDataSource:(id<PFInstallationIdentifierStoreProvi
4949
#pragma mark - Data
5050
///--------------------------------------
5151

52-
- (BFTask PF_GENERIC(NSURLRequest *)*)getDataURLRequestAsyncForCommand:(PFRESTCommand *)command {
53-
return (BFTask *)[[self _getURLRequestHeadersAsyncForCommand:command] continueWithSuccessBlock:^id(BFTask PF_GENERIC(NSDictionary *)*task) {
52+
- (BFTask<NSURLRequest *> *)getDataURLRequestAsyncForCommand:(PFRESTCommand *)command {
53+
return (BFTask *)[[self _getURLRequestHeadersAsyncForCommand:command] continueWithSuccessBlock:^id(BFTask<NSDictionary *> *task) {
5454
NSURL *url = [PFURLConstructor URLFromAbsoluteString:self.serverURL.absoluteString
5555
path:command.httpPath
5656
query:nil];
@@ -89,10 +89,10 @@ + (instancetype)constructorWithDataSource:(id<PFInstallationIdentifierStoreProvi
8989
#pragma mark - File
9090
///--------------------------------------
9191

92-
- (BFTask PF_GENERIC(NSURLRequest *)*)getFileUploadURLRequestAsyncForCommand:(PFRESTCommand *)command
93-
withContentType:(NSString *)contentType
94-
contentSourceFilePath:(NSString *)contentFilePath {
95-
return [[self getDataURLRequestAsyncForCommand:command] continueWithSuccessBlock:^id(BFTask PF_GENERIC(NSURLRequest *)*task) {
92+
- (BFTask<NSURLRequest *> *)getFileUploadURLRequestAsyncForCommand:(PFRESTCommand *)command
93+
withContentType:(NSString *)contentType
94+
contentSourceFilePath:(NSString *)contentFilePath {
95+
return [[self getDataURLRequestAsyncForCommand:command] continueWithSuccessBlock:^id(BFTask<NSURLRequest *> *task) {
9696
NSMutableURLRequest *request = [task.result mutableCopy];
9797

9898
if (contentType) {
@@ -145,14 +145,14 @@ + (NSDictionary *)defaultURLRequestHeadersForApplicationId:(NSString *)applicati
145145
return [mutableHeaders copy];
146146
}
147147

148-
- (BFTask PF_GENERIC(NSDictionary *)*)_getURLRequestHeadersAsyncForCommand:(PFRESTCommand *)command {
148+
- (BFTask<NSDictionary *> *)_getURLRequestHeadersAsyncForCommand:(PFRESTCommand *)command {
149149
return [BFTask taskFromExecutor:[BFExecutor defaultExecutor] withBlock:^id {
150150
NSMutableDictionary *headers = [NSMutableDictionary dictionary];
151151
[headers addEntriesFromDictionary:command.additionalRequestHeaders];
152152
if (command.sessionToken) {
153153
headers[PFCommandHeaderNameSessionToken] = command.sessionToken;
154154
}
155-
return [[self.dataSource.installationIdentifierStore getInstallationIdentifierAsync] continueWithSuccessBlock:^id(BFTask PF_GENERIC(NSString *)*task) {
155+
return [[self.dataSource.installationIdentifierStore getInstallationIdentifierAsync] continueWithSuccessBlock:^id(BFTask <NSString *>*task) {
156156
headers[PFCommandHeaderNameInstallationId] = task.result;
157157
return [headers copy];
158158
}];

Parse/Internal/Commands/CommandRunner/URLSession/PFURLSessionCommandRunner.m

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ - (instancetype)initWithDataSource:(id<PFInstallationIdentifierStoreProvider>)da
6161
applicationId:applicationId
6262
clientKey:clientKey
6363
serverURL:serverURL];
64-
6564
}
6665

6766
- (instancetype)initWithDataSource:(id<PFInstallationIdentifierStoreProvider>)dataSource
@@ -145,16 +144,16 @@ - (void)dealloc {
145144
#pragma mark - Data Commands
146145
///--------------------------------------
147146

148-
- (BFTask PF_GENERIC(PFCommandResult *)*)runCommandAsync:(PFRESTCommand *)command withOptions:(PFCommandRunningOptions)options {
147+
- (BFTask<PFCommandResult *> *)runCommandAsync:(PFRESTCommand *)command withOptions:(PFCommandRunningOptions)options {
149148
return [self runCommandAsync:command withOptions:options cancellationToken:nil];
150149
}
151150

152-
- (BFTask PF_GENERIC(PFCommandResult *)*)runCommandAsync:(PFRESTCommand *)command
153-
withOptions:(PFCommandRunningOptions)options
154-
cancellationToken:(BFCancellationToken *)cancellationToken {
151+
- (BFTask<PFCommandResult *> *)runCommandAsync:(PFRESTCommand *)command
152+
withOptions:(PFCommandRunningOptions)options
153+
cancellationToken:(BFCancellationToken *)cancellationToken {
155154
return [self _performCommandRunningBlock:^id {
156155
[command resolveLocalIds];
157-
return [[self.requestConstructor getDataURLRequestAsyncForCommand:command] continueWithSuccessBlock:^id(BFTask PF_GENERIC(NSURLRequest *)*task) {
156+
return [[self.requestConstructor getDataURLRequestAsyncForCommand:command] continueWithSuccessBlock:^id(BFTask <NSURLRequest *>*task) {
158157
return [_session performDataURLRequestAsync:task.result forCommand:command cancellationToken:cancellationToken];
159158
}];
160159
} withOptions:options cancellationToken:cancellationToken];
@@ -164,20 +163,20 @@ - (void)dealloc {
164163
#pragma mark - File Commands
165164
///--------------------------------------
166165

167-
- (BFTask PF_GENERIC(PFCommandResult *)*)runFileUploadCommandAsync:(PFRESTCommand *)command
168-
withContentType:(NSString *)contentType
169-
contentSourceFilePath:(NSString *)sourceFilePath
170-
options:(PFCommandRunningOptions)options
171-
cancellationToken:(nullable BFCancellationToken *)cancellationToken
172-
progressBlock:(nullable PFProgressBlock)progressBlock {
166+
- (BFTask<PFCommandResult *> *)runFileUploadCommandAsync:(PFRESTCommand *)command
167+
withContentType:(NSString *)contentType
168+
contentSourceFilePath:(NSString *)sourceFilePath
169+
options:(PFCommandRunningOptions)options
170+
cancellationToken:(nullable BFCancellationToken *)cancellationToken
171+
progressBlock:(nullable PFProgressBlock)progressBlock {
173172
@weakify(self);
174173
return [self _performCommandRunningBlock:^id {
175174
@strongify(self);
176175

177176
[command resolveLocalIds];
178177
return [[self.requestConstructor getFileUploadURLRequestAsyncForCommand:command
179-
withContentType:contentType
180-
contentSourceFilePath:sourceFilePath] continueWithSuccessBlock:^id(BFTask PF_GENERIC(NSURLRequest *)*task) {
178+
withContentType:contentType
179+
contentSourceFilePath:sourceFilePath] continueWithSuccessBlock:^id(BFTask<NSURLRequest *> *task) {
181180
return [_session performFileUploadURLRequestAsync:task.result
182181
forCommand:command
183182
withContentSourceFilePath:sourceFilePath
@@ -187,10 +186,10 @@ - (void)dealloc {
187186
} withOptions:options cancellationToken:cancellationToken];
188187
}
189188

190-
- (BFTask PF_GENERIC(PFCommandResult *)*)runFileDownloadCommandAsyncWithFileURL:(NSURL *)url
191-
targetFilePath:(NSString *)filePath
192-
cancellationToken:(nullable BFCancellationToken *)cancellationToken
193-
progressBlock:(nullable PFProgressBlock)progressBlock {
189+
- (BFTask<PFCommandResult *> *)runFileDownloadCommandAsyncWithFileURL:(NSURL *)url
190+
targetFilePath:(NSString *)filePath
191+
cancellationToken:(nullable BFCancellationToken *)cancellationToken
192+
progressBlock:(nullable PFProgressBlock)progressBlock {
194193
return [self _performCommandRunningBlock:^id {
195194
NSURLRequest *request = [NSURLRequest requestWithURL:url];
196195
return [_session performFileDownloadURLRequestAsync:request

Parse/Internal/Commands/CommandRunner/URLSession/Session/PFURLSession.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
@class BFCancellationToken;
1515

16-
@class BFTask PF_GENERIC(__covariant BFGenericType);
16+
@class BFTask<__covariant BFGenericType>;
1717
@class PFRESTCommand;
1818

1919
NS_ASSUME_NONNULL_BEGIN

0 commit comments

Comments
 (0)