Skip to content

Commit ff5da6e

Browse files
committed
Merge commit '37aee695cf654c519243adc2945161a089855029' into release/1.15.2
* commit '37aee695cf654c519243adc2945161a089855029': ⚡ Release 1.15.2 Fixes issue related to heap corruption (parse-community#1170) Fix parse-community#1162 - PFSubclassing.object() class method unavailable since XCode 9 beta 4 (parse-community#1164)
2 parents 7827c85 + 37aee69 commit ff5da6e

15 files changed

+38
-31
lines changed

Parse.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Parse'
3-
s.version = '1.15.1'
3+
s.version = '1.15.2'
44
s.license = { :type => 'BSD', :file => 'LICENSE' }
55
s.homepage = 'http://parseplatform.org/'
66
s.summary = 'A library that gives you access to the powerful Parse cloud platform from your iOS/OS X/watchOS/tvOS app.'

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/Internal/PFEventuallyQueue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ extern NSTimeInterval const PFEventuallyQueueDefaultTimeoutRetryInterval;
6767
- (void)start NS_REQUIRES_SUPER;
6868
- (void)resume NS_REQUIRES_SUPER;
6969
- (void)pause NS_REQUIRES_SUPER;
70-
- (void)stop NS_REQUIRES_SUPER;
70+
- (void)terminate NS_REQUIRES_SUPER;
7171
- (void)removeAllCommands NS_REQUIRES_SUPER;
7272

7373
@end

Parse/Internal/PFEventuallyQueue.m

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ - (instancetype)initWithDataSource:(id<PFCommandRunnerProvider>)dataSource
8080
return self;
8181
}
8282

83-
- (void)dealloc {
84-
[self _stopMonitoringNetworkReachability];
85-
}
86-
8783
///--------------------------------------
8884
#pragma mark - Enqueueing Commands
8985
///--------------------------------------
@@ -197,7 +193,8 @@ - (void)pause {
197193
dispatch_suspend(_processingQueueSource);
198194
}
199195

200-
- (void)stop {
196+
- (void)terminate {
197+
[self _stopMonitoringNetworkReachability];
201198
dispatch_source_cancel(_processingQueueSource);
202199
}
203200

@@ -383,7 +380,6 @@ - (void)_stopMonitoringNetworkReachability {
383380
[[PFReachability sharedParseReachability] removeListener:self];
384381

385382
self.monitorsReachability = NO;
386-
self.connected = YES;
387383
#endif
388384
}
389385

@@ -393,9 +389,11 @@ - (void)_stopMonitoringNetworkReachability {
393389

394390
/** Manually sets the network connection status. */
395391
- (void)setConnected:(BOOL)connected {
392+
@weakify(self);
396393
BFTaskCompletionSource *barrier = [BFTaskCompletionSource taskCompletionSource];
397394
dispatch_async(_processingQueue, ^{
398395
dispatch_sync(_synchronizationQueue, ^{
396+
@strongify(self);
399397
if (self.connected != connected) {
400398
_connected = connected;
401399
if (connected) {

Parse/Internal/PFReachability.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ - (void)addListener:(id<PFReachabilityListener>)listener {
130130
}
131131

132132
- (void)removeListener:(id<PFReachabilityListener>)listener {
133+
@weakify(listener);
133134
dispatch_barrier_sync(_synchronizationQueue, ^{
135+
@strongify(listener);
134136
[_listenersArray filterUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) {
135137
id weakObject = [evaluatedObject weakObject];
136138
return (weakObject == nil || weakObject == listener);

Parse/Internal/ParseManager.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ - (PFEventuallyQueue *)eventuallyQueue {
181181
if (commandCache.commandCount > 0) {
182182
[commandCache removeAllCommands];
183183
}
184-
// we won't need it after stop everything...
185-
[commandCache stop];
184+
// we won't need it after, terminate...
185+
[commandCache terminate];
186186
}
187187
}
188188
#endif

Parse/PFConstants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#pragma mark - SDK Version
1414
///--------------------------------------
1515

16-
#define PARSE_VERSION @"1.15.1"
16+
#define PARSE_VERSION @"1.15.2"
1717

1818
///--------------------------------------
1919
#pragma mark - Platform

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

Parse/Resources/Parse-OSX.Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
<key>CFBundlePackageType</key>
1414
<string>FMWK</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>1.15.1</string>
16+
<string>1.15.2</string>
1717
<key>CFBundleSignature</key>
1818
<string>????</string>
1919
<key>CFBundleVersion</key>
20-
<string>1.15.1</string>
20+
<string>1.15.2</string>
2121
</dict>
2222
</plist>

Parse/Resources/Parse-iOS.Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundlePackageType</key>
1414
<string>FMWK</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>1.15.1</string>
16+
<string>1.15.2</string>
1717
<key>CFBundleSignature</key>
1818
<string>????</string>
1919
<key>CFBundleSupportedPlatforms</key>
@@ -22,7 +22,7 @@
2222
<string>iPhoneOS</string>
2323
</array>
2424
<key>CFBundleVersion</key>
25-
<string>1.15.1</string>
25+
<string>1.15.2</string>
2626
<key>MinimumOSVersion</key>
2727
<string>6.0</string>
2828
</dict>

Parse/Resources/Parse-tvOS.Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.15.1</string>
18+
<string>1.15.2</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>1.15.1</string>
22+
<string>1.15.2</string>
2323
<key>NSPrincipalClass</key>
2424
<string></string>
2525
</dict>

Parse/Resources/Parse-watchOS.Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.15.1</string>
18+
<string>1.15.2</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>1.15.1</string>
22+
<string>1.15.2</string>
2323
<key>NSPrincipalClass</key>
2424
<string></string>
2525
</dict>

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)