Skip to content

Commit 36ef251

Browse files
mmanflovilmart
authored andcommitted
Fix #1162 - PFSubclassing.object() class method unavailable since XCode 9 beta 4 (#1164)
* move PFSubclassing.object() class method to PFObjectPrivate.h to avoid XCode 9 error: class method object() unavailable * make sure tests have access to (now private) PFObject.object() class method
1 parent 8276355 commit 36ef251

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

Parse/Internal/Object/PFObjectPrivate.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,22 @@
140140

141141
@end
142142

143+
@interface PFObject ()
144+
145+
/**
146+
Constructs an object of the most specific class known to implement `+parseClassName`.
147+
148+
This method takes care to help `PFObject` subclasses be subclassed themselves.
149+
For example, `PFUser.+object` returns a `PFUser` by default but will return an
150+
object of a registered subclass instead if one is known.
151+
A default implementation is provided by `PFObject` which should always be sufficient.
152+
153+
@return Returns the object that is instantiated.
154+
*/
155+
+ (instancetype)object;
156+
157+
@end
158+
143159
@interface PFObject (Private)
144160

145161
/**

Parse/PFSubclassing.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,6 @@ NS_ASSUME_NONNULL_BEGIN
3232

3333
@optional
3434

35-
/**
36-
Constructs an object of the most specific class known to implement `+parseClassName`.
37-
38-
This method takes care to help `PFObject` subclasses be subclassed themselves.
39-
For example, `PFUser.+object` returns a `PFUser` by default but will return an
40-
object of a registered subclass instead if one is known.
41-
A default implementation is provided by `PFObject` which should always be sufficient.
42-
43-
@return Returns the object that is instantiated.
44-
*/
45-
+ (instancetype)object;
46-
4735
/**
4836
Creates a reference to an existing PFObject for use in creating associations between PFObjects.
4937

Tests/Unit/ProductTests.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#import "PFProduct.h"
1111
#import "PFUnitTestCase.h"
12+
#import "PFObjectPrivate.h"
1213

1314
@interface ProductTests : PFUnitTestCase
1415

Tests/Unit/PurchaseUnitTests.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#import "PFTestSKProduct.h"
2020
#import "PFUnitTestCase.h"
2121
#import "Parse_Private.h"
22+
#import "PFObjectPrivate.h"
2223

2324
@protocol PurchaseControllerDataSource <PFCommandRunnerProvider, PFFileManagerProvider>
2425

Tests/Unit/UserUnitTests.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#import "PFUnitTestCase.h"
1111
#import "PFUser.h"
12+
#import "PFObjectPrivate.h"
1213

1314
@interface UserUnitTests : PFUnitTestCase
1415

0 commit comments

Comments
 (0)