Skip to content

Commit d396768

Browse files
committed
Merge pull request #732 from ParsePlatform/nlutsenko.constants
Cleanup constants in PFConstants.h
2 parents 3a79298 + cb46718 commit d396768

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Parse/Internal/Commands/PFRESTCommand.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
// Increment this when you change the format of cache values.
3030
static const int PFRESTCommandCacheKeyVersion = 1;
31+
static const int PFRESTCommandCacheKeyParseAPIVersion = 2;
3132

3233
@implementation PFRESTCommand
3334

@@ -86,7 +87,7 @@ - (NSString *)cacheKey {
8687
_cacheKey = [NSString stringWithFormat:@"PFRESTCommand.%i.%@.%@.%ld.%@",
8788
PFRESTCommandCacheKeyVersion, self.httpMethod, PFMD5HashFromString(self.httpPath),
8889
// We use MD5 instead of native hash because it collides too much.
89-
(long)PARSE_API_VERSION, PFMD5HashFromString(parametersCacheKey)];
90+
(long)PFRESTCommandCacheKeyParseAPIVersion, PFMD5HashFromString(parametersCacheKey)];
9091
return _cacheKey;
9192
}
9293

Parse/PFConstants.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,12 @@
99

1010
#import <Foundation/Foundation.h>
1111

12-
@class PFObject;
13-
@class PFUser;
14-
1512
///--------------------------------------
16-
#pragma mark - Version
13+
#pragma mark - SDK Version
1714
///--------------------------------------
1815

1916
#define PARSE_VERSION @"1.11.0"
2017

21-
extern NSInteger const PARSE_API_VERSION;
22-
2318
///--------------------------------------
2419
#pragma mark - Platform
2520
///--------------------------------------
@@ -123,6 +118,9 @@ typedef NS_ENUM(uint8_t, PFLogLevel) {
123118
#pragma mark - Errors
124119
///--------------------------------------
125120

121+
/**
122+
Error domain used for all `NSError`s in the SDK.
123+
*/
126124
extern NSString *const _Nonnull PFParseErrorDomain;
127125

128126
/**
@@ -359,6 +357,9 @@ typedef NS_ENUM(NSInteger, PFErrorCode) {
359357
#pragma mark - Blocks
360358
///--------------------------------------
361359

360+
@class PFObject;
361+
@class PFUser;
362+
362363
typedef void (^PFBooleanResultBlock)(BOOL succeeded, NSError *_Nullable error);
363364
typedef void (^PFIntegerResultBlock)(int number, NSError *_Nullable error);
364365
typedef void (^PFArrayResultBlock)(NSArray *_Nullable objects, NSError *_Nullable error);

Parse/PFConstants.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
#import "PFConstants.h"
1111

12-
NSInteger const PARSE_API_VERSION = 2;
13-
1412
#if TARGET_OS_IOS
1513
NSString *const kPFDeviceType = @"ios";
1614
#elif PF_TARGET_OS_OSX

0 commit comments

Comments
 (0)