Skip to content

Commit fdfda65

Browse files
kennicflovilmart
authored andcommitted
Updated to 1.17.2 (#1368)
- Fixed "Argument passed to call that takes no arguments" when declaring PFFileObject(data:contentType) (or so) - Updated pod to 1.17.2
1 parent 57dd88a commit fdfda65

File tree

9 files changed

+47
-47
lines changed

9 files changed

+47
-47
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.17.1'
3+
s.version = '1.17.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/Parse/Internal/File/PFFileObject_Private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
2020

2121
@property (nonatomic, strong, readonly) PFFileState *state;
2222

23-
+ (instancetype)fileWithName:(nullable NSString *)name url:(nullable NSString *)url;
23+
+ (instancetype)fileObjectWithName:(nullable NSString *)name url:(nullable NSString *)url;
2424

2525
- (nullable NSString *)_cachedFilePath;
2626

Parse/Parse/PFDecoder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ - (id)decodeDictionary:(NSDictionary *)dictionary {
6464
return [PFRelation relationFromDictionary:dictionary withDecoder:self];
6565

6666
} else if ([type isEqualToString:@"File"]) {
67-
return [PFFileObject fileWithName:dictionary[@"name"]
67+
return [PFFileObject fileObjectWithName:dictionary[@"name"]
6868
url:dictionary[@"url"]];
6969

7070
} else if ([type isEqualToString:@"Pointer"]) {

Parse/Parse/PFFileObject.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
3535
3636
@return A new `PFFileObject`.
3737
*/
38-
+ (nullable instancetype)fileWithData:(NSData *)data;
38+
+ (nullable instancetype)fileObjectWithData:(NSData *)data;
3939

4040
/**
4141
Creates a file with given data and name.
@@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
4747
4848
@return A new `PFFileObject` object.
4949
*/
50-
+ (nullable instancetype)fileWithName:(nullable NSString *)name data:(NSData *)data;
50+
+ (nullable instancetype)fileObjectWithName:(nullable NSString *)name data:(NSData *)data;
5151

5252
/**
5353
Creates a file with the contents of another file.
@@ -61,7 +61,7 @@ NS_ASSUME_NONNULL_BEGIN
6161
6262
@return A new `PFFileObject` instance.
6363
*/
64-
+ (nullable instancetype)fileWithName:(nullable NSString *)name
64+
+ (nullable instancetype)fileObjectWithName:(nullable NSString *)name
6565
contentsAtPath:(NSString *)path PF_SWIFT_UNAVAILABLE;
6666

6767
/**
@@ -76,7 +76,7 @@ NS_ASSUME_NONNULL_BEGIN
7676
7777
@return A new `PFFileObject` instance or `nil` if the error occured.
7878
*/
79-
+ (nullable instancetype)fileWithName:(nullable NSString *)name
79+
+ (nullable instancetype)fileObjectWithName:(nullable NSString *)name
8080
contentsAtPath:(NSString *)path
8181
error:(NSError **)error;
8282

@@ -92,7 +92,7 @@ NS_ASSUME_NONNULL_BEGIN
9292
9393
@return A new `PFFileObject` instance.
9494
*/
95-
+ (nullable instancetype)fileWithName:(nullable NSString *)name
95+
+ (nullable instancetype)fileObjectWithName:(nullable NSString *)name
9696
data:(NSData *)data
9797
contentType:(nullable NSString *)contentType PF_SWIFT_UNAVAILABLE;
9898

@@ -109,7 +109,7 @@ NS_ASSUME_NONNULL_BEGIN
109109
110110
@return A new `PFFileObject` instance or `nil` if the error occured.
111111
*/
112-
+ (nullable instancetype)fileWithName:(nullable NSString *)name
112+
+ (nullable instancetype)fileObjectWithName:(nullable NSString *)name
113113
data:(NSData *)data
114114
contentType:(nullable NSString *)contentType
115115
error:(NSError **)error;
@@ -122,7 +122,7 @@ NS_ASSUME_NONNULL_BEGIN
122122
123123
@return A new `PFFileObject` object.
124124
*/
125-
+ (instancetype)fileWithData:(NSData *)data contentType:(nullable NSString *)contentType;
125+
+ (instancetype)fileObjectWithData:(NSData *)data contentType:(nullable NSString *)contentType;
126126

127127
///--------------------------------------
128128
#pragma mark - File Properties

Parse/Parse/PFFileObject.m

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ @implementation PFFileObject
5353

5454
#pragma mark Init
5555

56-
+ (instancetype)fileWithData:(NSData *)data {
57-
return [self fileWithName:nil data:data contentType:nil];
56+
+ (instancetype)fileObjectWithData:(NSData *)data {
57+
return [self fileObjectWithName:nil data:data contentType:nil];
5858
}
5959

60-
+ (instancetype)fileWithName:(NSString *)name data:(NSData *)data {
61-
return [self fileWithName:name data:data contentType:nil];
60+
+ (instancetype)fileObjectWithName:(NSString *)name data:(NSData *)data {
61+
return [self fileObjectWithName:name data:data contentType:nil];
6262
}
6363

64-
+ (instancetype)fileWithName:(NSString *)name contentsAtPath:(NSString *)path {
64+
+ (instancetype)fileObjectWithName:(NSString *)name contentsAtPath:(NSString *)path {
6565
NSError *error = nil;
66-
PFFileObject *file = [self fileWithName:name contentsAtPath:path error:&error];
66+
PFFileObject *file = [self fileObjectWithName:name contentsAtPath:path error:&error];
6767
PFParameterAssert(!error, @"Could not access file at %@: %@", path, error);
6868
return file;
6969
}
7070

71-
+ (instancetype)fileWithName:(NSString *)name contentsAtPath:(NSString *)path error:(NSError **)error {
71+
+ (instancetype)fileObjectWithName:(NSString *)name contentsAtPath:(NSString *)path error:(NSError **)error {
7272
NSFileManager *fileManager = [NSFileManager defaultManager];
7373
BOOL directory = NO;
7474

@@ -82,23 +82,23 @@ + (instancetype)fileWithName:(NSString *)name contentsAtPath:(NSString *)path er
8282
return nil;
8383
}
8484

85-
PFFileObject *file = [self fileWithName:name url:nil];
85+
PFFileObject *file = [self fileObjectWithName:name url:nil];
8686
if (![file _stageWithPath:path error:error]) {
8787
return nil;
8888
}
8989
return file;
9090
}
9191

92-
+ (instancetype)fileWithName:(NSString *)name
92+
+ (instancetype)fileObjectWithName:(NSString *)name
9393
data:(NSData *)data
9494
contentType:(NSString *)contentType {
9595
NSError *error = nil;
96-
PFFileObject *file = [self fileWithName:name data:data contentType:contentType error:&error];
96+
PFFileObject *file = [self fileObjectWithName:name data:data contentType:contentType error:&error];
9797
PFConsistencyAssert(!error, @"Could not save file data for %@ : %@", name, error);
9898
return file;
9999
}
100100

101-
+ (instancetype)fileWithName:(NSString *)name
101+
+ (instancetype)fileObjectWithName:(NSString *)name
102102
data:(NSData *)data
103103
contentType:(NSString *)contentType
104104
error:(NSError **)error {
@@ -119,8 +119,8 @@ + (instancetype)fileWithName:(NSString *)name
119119
return file;
120120
}
121121

122-
+ (instancetype)fileWithData:(NSData *)data contentType:(NSString *)contentType {
123-
return [self fileWithName:nil data:data contentType:contentType];
122+
+ (instancetype)fileObjectWithData:(NSData *)data contentType:(NSString *)contentType {
123+
return [self fileObjectWithName:nil data:data contentType:contentType];
124124
}
125125

126126
#pragma mark Uploading
@@ -249,7 +249,7 @@ - (instancetype)initWithName:(NSString *)name urlString:(NSString *)url mimeType
249249
return self;
250250
}
251251

252-
+ (instancetype)fileWithName:(NSString *)name url:(NSString *)url {
252+
+ (instancetype)fileObjectWithName:(NSString *)name url:(NSString *)url {
253253
return [[self alloc] initWithName:name urlString:url mimeType:nil];
254254
}
255255

Parse/Tests/Unit/FileUnitTests.m

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,51 +137,51 @@ - (void)setUp {
137137

138138
- (void)testContructors {
139139
[self clearStagingAndTemporaryFiles];
140-
PFFileObject *file = [PFFileObject fileWithData:[NSData data]];
140+
PFFileObject *file = [PFFileObject fileObjectWithData:[NSData data]];
141141
XCTAssertEqualObjects(file.name, @"file");
142142
XCTAssertNil(file.url);
143143
XCTAssertTrue(file.dirty);
144144
XCTAssertTrue(file.dataAvailable);
145145

146146
[self clearStagingAndTemporaryFiles];
147-
file = [PFFileObject fileWithData:[NSData data] contentType:@"content-type"];
147+
file = [PFFileObject fileObjectWithData:[NSData data] contentType:@"content-type"];
148148
XCTAssertEqualObjects(file.name, @"file");
149149
XCTAssertNil(file.url);
150150
XCTAssertTrue(file.dirty);
151151
XCTAssertTrue(file.dataAvailable);
152152

153153
[self clearStagingAndTemporaryFiles];
154-
file = [PFFileObject fileWithName:@"name" data:[NSData data]];
154+
file = [PFFileObject fileObjectWithName:@"name" data:[NSData data]];
155155
XCTAssertEqualObjects(file.name, @"name");
156156
XCTAssertNil(file.url);
157157
XCTAssertTrue(file.dirty);
158158
XCTAssertTrue(file.dataAvailable);
159159

160160
[self clearStagingAndTemporaryFiles];
161-
file = [PFFileObject fileWithName:nil contentsAtPath:[self sampleFilePath]];
161+
file = [PFFileObject fileObjectWithName:nil contentsAtPath:[self sampleFilePath]];
162162
XCTAssertEqualObjects(file.name, @"file");
163163
XCTAssertNil(file.url);
164164
XCTAssertTrue(file.dirty);
165165
XCTAssertTrue(file.dataAvailable);
166166

167167
[self clearStagingAndTemporaryFiles];
168168
NSError *error = nil;
169-
file = [PFFileObject fileWithName:nil contentsAtPath:[self sampleFilePath] error:&error];
169+
file = [PFFileObject fileObjectWithName:nil contentsAtPath:[self sampleFilePath] error:&error];
170170
XCTAssertNil(error);
171171
XCTAssertEqualObjects(file.name, @"file");
172172
XCTAssertNil(file.url);
173173
XCTAssertTrue(file.dirty);
174174
XCTAssertTrue(file.dataAvailable);
175175

176176
[self clearStagingAndTemporaryFiles];
177-
file = [PFFileObject fileWithName:nil data:[NSData data] contentType:@"content-type"];
177+
file = [PFFileObject fileObjectWithName:nil data:[NSData data] contentType:@"content-type"];
178178
XCTAssertEqualObjects(file.name, @"file");
179179
XCTAssertNil(file.url);
180180
XCTAssertTrue(file.dirty);
181181
XCTAssertTrue(file.dataAvailable);
182182

183183
[self clearStagingAndTemporaryFiles];
184-
file = [PFFileObject fileWithName:nil data:[NSData data] contentType:@"content-type" error:&error];
184+
file = [PFFileObject fileObjectWithName:nil data:[NSData data] contentType:@"content-type" error:&error];
185185
XCTAssertNil(error);
186186
XCTAssertEqualObjects(file.name, @"file");
187187
XCTAssertNil(file.url);
@@ -193,7 +193,7 @@ - (void)testConstructorWithNilData {
193193
NSMutableData *data = nil;
194194

195195
NSError *error = nil;
196-
PFFileObject *file = [PFFileObject fileWithName:@"testFile"
196+
PFFileObject *file = [PFFileObject fileObjectWithName:@"testFile"
197197
data:data
198198
contentType:nil
199199
error:&error];
@@ -231,7 +231,7 @@ - (void)testUploading {
231231
NSError *error = nil;
232232
XCTestExpectation *expectation = nil;
233233

234-
PFFileObject *file = [PFFileObject fileWithData:[self sampleData] contentType:@"application/octet-stream"];
234+
PFFileObject *file = [PFFileObject fileObjectWithData:[self sampleData] contentType:@"application/octet-stream"];
235235

236236
XCTAssertTrue([file save]);
237237
XCTAssertTrue([file save:&error]);
@@ -325,7 +325,7 @@ - (void)testDownloading{
325325
XCTestExpectation *expectation = nil;
326326

327327
NSData *expectedData = [self sampleData];
328-
PFFileObject *file = [PFFileObject fileWithName:@"file" url:@"http://some.place"];
328+
PFFileObject *file = [PFFileObject fileObjectWithName:@"file" url:@"http://some.place"];
329329

330330
XCTAssertEqualObjects([file getData], expectedData);
331331

@@ -493,7 +493,7 @@ - (void)testCancel {
493493
});
494494

495495
XCTestExpectation *expectation = nil;
496-
PFFileObject *file = [PFFileObject fileWithName:@"file" url:@"http://some.place"];
496+
PFFileObject *file = [PFFileObject fileObjectWithName:@"file" url:@"http://some.place"];
497497

498498
[[NSFileManager defaultManager] removeItemAtPath:cachedPath error:NULL];
499499
expectation = [self currentSelectorTestExpectation];
@@ -511,7 +511,7 @@ - (void)testCancel {
511511
- (void)testClearCachedData {
512512
id mockedFileController = [Parse _currentManager].coreManager.fileController;
513513

514-
PFFileObject *file = [PFFileObject fileWithName:@"a" data:[NSData data]];
514+
PFFileObject *file = [PFFileObject fileObjectWithName:@"a" data:[NSData data]];
515515
OCMExpect([mockedFileController clearFileCacheAsyncForFileWithState:file.state]).andReturn([BFTask taskWithResult:nil]);
516516

517517
XCTestExpectation *expectation = [self currentSelectorTestExpectation];

Parse/Tests/Unit/PurchaseControllerTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ - (void)testDownloadAssetAsync {
221221
OCMStub([bundle appStoreReceiptURL]).andReturn([NSURL fileURLWithPath:receiptFile]);
222222
[[self sampleData] writeToFile:receiptFile atomically:YES];
223223

224-
PFFileObject *mockedFile = PFPartialMock([PFFileObject fileWithName:@"testData" data:[self sampleData]]);
224+
PFFileObject *mockedFile = PFPartialMock([PFFileObject fileObjectWithName:@"testData" data:[self sampleData]]);
225225

226226
// lol. Probably should just stick this in the PFFile_Private header.
227227
NSString *stagedPath = [mockedFile valueForKey:@"stagedFilePath"];

ParseUI/Generated/PFResources.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// This is an auto-generated file.
22
#import <Foundation/Foundation.h>
33
@interface PFResources : NSObject
4-
+ (NSData *)twitter_icon3x_png;//modified:2018-02-05 08:25:40 -0500
5-
+ (NSData *)facebook_icon2x_png;//modified:2018-02-05 08:25:40 -0500
6-
+ (NSData *)parse_logo_png;//modified:2018-02-05 08:25:40 -0500
7-
+ (NSData *)facebook_icon3x_png;//modified:2018-02-05 08:25:40 -0500
8-
+ (NSData *)twitter_icon2x_png;//modified:2018-02-05 08:25:40 -0500
9-
+ (NSData *)parse_logo2x_png;//modified:2018-02-05 08:25:40 -0500
10-
+ (NSData *)parse_logo3x_png;//modified:2018-02-05 08:25:40 -0500
11-
+ (NSData *)facebook_icon_png;//modified:2018-02-05 08:25:40 -0500
12-
+ (NSData *)twitter_icon_png;//modified:2018-02-05 08:25:40 -0500
4+
+ (NSData *)twitter_icon3x_png;//modified:2018-11-08 12:38:47 +0700
5+
+ (NSData *)facebook_icon2x_png;//modified:2018-11-08 12:38:47 +0700
6+
+ (NSData *)parse_logo_png;//modified:2018-11-08 12:38:47 +0700
7+
+ (NSData *)facebook_icon3x_png;//modified:2018-11-08 12:38:47 +0700
8+
+ (NSData *)twitter_icon2x_png;//modified:2018-11-08 12:38:47 +0700
9+
+ (NSData *)parse_logo2x_png;//modified:2018-11-08 12:38:47 +0700
10+
+ (NSData *)parse_logo3x_png;//modified:2018-11-08 12:38:47 +0700
11+
+ (NSData *)facebook_icon_png;//modified:2018-11-08 12:38:47 +0700
12+
+ (NSData *)twitter_icon_png;//modified:2018-11-08 12:38:47 +0700
1313
@end

ParseUI/ParseUIDemo/Classes/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ - (void)_setupTestData {
108108
NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"png"];
109109
NSData *data = [NSData dataWithContentsOfFile:path];
110110

111-
PFFileObject *file = [PFFileObject fileWithName:[path lastPathComponent] data:data];
111+
PFFileObject *file = [PFFileObject fileObjectWithName:[path lastPathComponent] data:data];
112112

113113
PFObject *object = [[PFObject alloc] initWithClassName:@"App"];
114114
object[@"icon"] = file;

0 commit comments

Comments
 (0)