diff --git a/GJNetWorking/GJHTTPManager.m b/GJNetWorking/GJHTTPManager.m
index 12db7c4..d06dbe9 100644
--- a/GJNetWorking/GJHTTPManager.m
+++ b/GJNetWorking/GJHTTPManager.m
@@ -12,7 +12,7 @@
@interface GJHTTPManager ()
-@property (nonatomic, strong) AFHTTPRequestOperationManager *manager;
+@property (nonatomic, strong) AFHTTPSessionManager *manager;
@end
@@ -31,7 +31,7 @@ - (instancetype)init{
self = [super init];
if (!self) return nil;
- self.manager = [AFHTTPRequestOperationManager manager];
+ self.manager = [AFHTTPSessionManager manager];
self.manager.responseSerializer.acceptableContentTypes = [GJNetworkingConfig acceptableContentTypes];
self.manager.securityPolicy.allowInvalidCertificates = [GJNetworkingConfig allowInvalidCertificates];
self.manager.securityPolicy.validatesDomainName = [GJNetworkingConfig validatesDomainName];
@@ -96,74 +96,84 @@ - (void)requestWithUrl:(NSString *)url
parameters:(NSDictionary *)parameters
request:(GJBaseRequest *)request {
- AFHTTPRequestOperation *startOperation = nil;
+ NSURLSessionDataTask *startOperation = nil;
switch (method) {
case GJRequestGET:
{
- startOperation = [self.manager GET:url
- parameters:parameters
- success:^(AFHTTPRequestOperation *operation, id responseObject) {
- [self requestFinishedWithOperation:operation request:request];
- } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
- [self requestFinishedWithOperation:operation request:request];
-; }];
+
+
+ startOperation = [self.manager GET:url parameters:parameters success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
+ [self requestFinishedWithOperation:task request:request resonseObj:responseObject];
+
+ } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
+ [self requestFinishedWithOperation:task request:request resonseObj:nil];
+
+ }];
+
}
break;
case GJRequestPOST:
{
- startOperation = [self.manager POST:url
- parameters:parameters
- success:^(AFHTTPRequestOperation *operation, id responseObject) {
- [self requestFinishedWithOperation:operation request:request];
- } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
- [self requestFinishedWithOperation:operation request:request];
- }];
+
+ startOperation = [self.manager POST:url parameters:parameters success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
+ [self requestFinishedWithOperation:task request:request resonseObj:responseObject];
+
+ } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
+ [self requestFinishedWithOperation:task request:request resonseObj:nil];
+
+ }];
}
break;
case GJRequestDELET:
{
- startOperation = [self.manager DELETE:url
- parameters:parameters
- success:^(AFHTTPRequestOperation *operation, id responseObject) {
- [self requestFinishedWithOperation:operation request:request];
- } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
- [self requestFinishedWithOperation:operation request:request];
- }];
+
+ startOperation = [self.manager DELETE:url parameters:parameters success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
+ [self requestFinishedWithOperation:task request:request resonseObj:responseObject];
+
+ } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
+ [self requestFinishedWithOperation:task request:request resonseObj:nil];
+
+ }];
+
+
}
break;
case GJRequestHEAD:
{
- startOperation = [self.manager HEAD:url
- parameters:parameters
- success:^(AFHTTPRequestOperation *operation) {
- [self requestFinishedWithOperation:operation request:request];
- } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
- [self requestFinishedWithOperation:operation request:request];
- }];
+
+
+ startOperation = [self.manager HEAD:url parameters:parameters success:^(NSURLSessionDataTask * _Nonnull task) {
+ [self requestFinishedWithOperation:task request:request resonseObj:nil];
+
+ } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
+ [self requestFinishedWithOperation:task request:request resonseObj:nil];
+
+ }];
}
break;
case GJRequestPUT:
{
- startOperation = [self.manager PUT:url
- parameters:parameters
- success:^(AFHTTPRequestOperation *operation, id responseObject) {
- [self requestFinishedWithOperation:operation request:request];
- } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
- [self requestFinishedWithOperation:operation request:request];
- }];
+
+ startOperation = [self.manager PUT:url parameters:parameters success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
+ [self requestFinishedWithOperation:task request:request resonseObj:responseObject];
+
+ } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
+ [self requestFinishedWithOperation:task request:request resonseObj:nil];
+
+ }];
}
break;
case GJRequestPATCH:
{
- startOperation = [self.manager PATCH:url
- parameters:parameters
- success:^(AFHTTPRequestOperation *operation, id responseObject) {
- [self requestFinishedWithOperation:operation request:request];
- } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
- [self requestFinishedWithOperation:operation request:request];
- }];
+ startOperation = [self.manager PATCH:url parameters:parameters success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
+ [self requestFinishedWithOperation:task request:request resonseObj:responseObject];
+
+ } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
+ [self requestFinishedWithOperation:task request:request resonseObj:nil];
+
+ }];
}
break;
default:
@@ -174,8 +184,8 @@ - (void)requestWithUrl:(NSString *)url
}
-- (void)requestFinishedWithOperation:(AFHTTPRequestOperation*)operation
- request:(GJBaseRequest *)request {
+- (void)requestFinishedWithOperation:(NSURLSessionTask*)operation
+ request:(GJBaseRequest *)request resonseObj:(id)obj{
GJBaseRequest *strongRequest = request;
BOOL success = operation.error ? NO : YES;
@@ -187,16 +197,22 @@ - (void)requestFinishedWithOperation:(AFHTTPRequestOperation*)operation
}
//没有重试则请求完成
- [strongRequest requestTerminate];
+ [strongRequest requestCompletedWithObj:obj andModelObjBlock:^(id model) {
+ [strongRequest requestCompletedWithModel:model];
+ }];
}
- (BOOL)cancelRequest:(GJBaseRequest *)request{
if (request.task) {
- AFHTTPRequestOperation *operation = (AFHTTPRequestOperation *)request.task;
- if (operation && !operation.isCancelled) {
- [operation cancel];
- return YES;
- }
+ NSURLSessionDataTask *operation = (NSURLSessionDataTask *)request.task;
+// if (operation && !operation.isCancelled) {
+// [operation cancel];
+// return YES;
+// }
+ if (operation) {
+ [operation cancel];
+ return YES;
+ }
}
return NO;
}
diff --git a/GJNetWorking/Request/GJAPICacheRequest.m b/GJNetWorking/Request/GJAPICacheRequest.m
index c720f7c..a439d31 100644
--- a/GJNetWorking/Request/GJAPICacheRequest.m
+++ b/GJNetWorking/Request/GJAPICacheRequest.m
@@ -42,10 +42,8 @@ - (NSError *)error {
}
- (id)responseObject {
- if (self.cacheObject) {
- return self.cacheObject;
- }
- return [super responseObject];
+
+ return nil;
}
- (void)start {
@@ -74,15 +72,16 @@ - (void)start {
self.cacheObject = cacheObject;
NSLog(@"use cache data %@",cacheObject);
+ [self requestCompletedWithObj:cacheObject andModelObjBlock:^(id model) {
+ [self requestCompletedWithModel:model];
+ }];
- [self requestTerminate];
+ // self.state = GJRequestStateFinished;
+ // [self requestCompleted];
+ //
+ // !self.successBlock ? : self.successBlock(self.responseObject , nil, nil);
+ // !self.completedBlock ? : self.completedBlock(self);
-// self.state = GJRequestStateFinished;
-// [self requestCompleted];
-//
-// !self.successBlock ? : self.successBlock(self.responseObject , nil, nil);
-// !self.completedBlock ? : self.completedBlock(self);
-
}
//网络请求结束后,callback前调用,
@@ -100,9 +99,9 @@ - (void)requestCompleted {
self.cacheObject = cacheJsonDic;
return;
}
-
+
}
-
+
}
}
diff --git a/GJNetWorking/Request/GJBaseRequest.h b/GJNetWorking/Request/GJBaseRequest.h
index 3b17a2c..614e038 100644
--- a/GJNetWorking/Request/GJBaseRequest.h
+++ b/GJNetWorking/Request/GJBaseRequest.h
@@ -9,7 +9,7 @@
#import
@@ -86,7 +86,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); +(void)setTimeoutInSeconds:(int)seconds; /** - * A method to set the default conent type of the request body + * A method to set the default content type of the request body * By default the content type is set to kContentTypeAutomatic * which checks the body request and decides between "application/json" * and "application/x-www-form-urlencoded" @@ -94,9 +94,9 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); +(void)setRequestContentType:(NSString*)contentTypeString; ///////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - GET asynchronious JSON calls +#pragma mark - GET asynchronous JSON calls -/** @name Making asynchronious HTTP requests */ +/** @name Making asynchronous HTTP requests */ /** * Makes GET request to the given URL address and fetches a JSON response. * @param urlString the URL as a string @@ -145,7 +145,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary *)params orBodyData:(NSData*)bodyData headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock; ///////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - POST synchronious JSON calls +#pragma mark - POST asynchronous JSON calls /** * Makes POST request to the given URL address and fetches a JSON response. Sends the bodyString param as the POST request body. diff --git a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONHTTPClient.m index 18147c0..b3499a5 100644 --- a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -1,21 +1,23 @@ // // JSONModelHTTPClient.m // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @version 1.2 +// @author Marin Todorov (http://www.underplot.com) and contributors // -// Copyright (c) 2012-2014 Marin Todorov, Underplot ltd. +// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. // This code is distributed under the terms and conditions of the MIT license. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -// The MIT License in plain English: http://www.touch-code-magazine.com/JSONModel/MITLicense + #import "JSONHTTPClient.h" +typedef void (^RequestResultBlock)(NSData *data, JSONModelError *error); + #pragma mark - constants NSString* const kHTTPMethodGET = @"GET"; NSString* const kHTTPMethodPOST = @"POST"; @@ -118,17 +120,24 @@ +(NSString*)urlEncode:(id)value } NSAssert([value isKindOfClass:[NSString class]], @"request parameters can be only of NSString or NSNumber classes. '%@' is of class %@.", value, [value class]); - + + NSString *str = (NSString *)value; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9 + return [str stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; + +#else return (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes( NULL, - (__bridge CFStringRef) value, + (__bridge CFStringRef)str, NULL, (CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8)); +#endif } #pragma mark - networking worker methods -+(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSData*)bodyData headers:(NSDictionary*)headers etag:(NSString**)etag error:(JSONModelError**)err ++(void)requestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSData*)bodyData headers:(NSDictionary*)headers handler:(RequestResultBlock)handler { NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: url cachePolicy: defaultCachePolicy @@ -160,50 +169,54 @@ +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBod [request setHTTPBody: bodyData]; [request setValue:[NSString stringWithFormat:@"%lu", (unsigned long)bodyData.length] forHTTPHeaderField:@"Content-Length"]; } - - //prepare output - NSHTTPURLResponse* response = nil; - - //fire the request - NSData *responseData = [NSURLConnection sendSynchronousRequest: request - returningResponse: &response - error: err]; - //convert an NSError to a JSONModelError - if (*err != nil) { - NSError* errObj = *err; - *err = [JSONModelError errorWithDomain:errObj.domain code:errObj.code userInfo:errObj.userInfo]; - } - - //special case for http error code 401 - if ([*err code] == kCFURLErrorUserCancelledAuthentication) { - response = [[NSHTTPURLResponse alloc] initWithURL:url - statusCode:401 - HTTPVersion:@"HTTP/1.1" - headerFields:@{}]; - } - - //if not OK status set the err to a JSONModelError instance - if (response.statusCode >= 300 || response.statusCode < 200) { - //create a new error - if (*err==nil) *err = [JSONModelError errorBadResponse]; - } - - //if there was an error, include the HTTP response and return - if (*err) { - //assign the response to the JSONModel instance - [*err setHttpResponse: [response copy]]; + + void (^completionHandler)(NSData *, NSURLResponse *, NSError *) = ^(NSData *data, NSURLResponse *origResponse, NSError *origError) { + NSHTTPURLResponse *response = (NSHTTPURLResponse *)origResponse; + JSONModelError *error = nil; + + //convert an NSError to a JSONModelError + if (origError) { + error = [JSONModelError errorWithDomain:origError.domain code:origError.code userInfo:origError.userInfo]; + } + + //special case for http error code 401 + if (error.code == NSURLErrorUserCancelledAuthentication) { + response = [[NSHTTPURLResponse alloc] initWithURL:url statusCode:401 HTTPVersion:@"HTTP/1.1" headerFields:@{}]; + } + + //if not OK status set the err to a JSONModelError instance + if (!error && (response.statusCode >= 300 || response.statusCode < 200)) { + error = [JSONModelError errorBadResponse]; + } + + //if there was an error, assign the response to the JSONModel instance + if (error) { + error.httpResponse = [response copy]; + } //empty respone, return nil instead - if ([responseData length]<1) { - return nil; + if (!data.length) { + data = nil; } - } - - //return the data fetched from web - return responseData; + + handler(data, error); + }; + + //fire the request + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 + NSURLSessionTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:completionHandler]; + [task resume]; +#else + NSOperationQueue *queue = [NSOperationQueue new]; + + [NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { + completionHandler(data, response, error); + }]; +#endif } -+(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method params:(NSDictionary*)params headers:(NSDictionary*)headers etag:(NSString**)etag error:(JSONModelError**)err ++(void)requestDataFromURL:(NSURL*)url method:(NSString*)method params:(NSDictionary*)params headers:(NSDictionary*)headers handler:(RequestResultBlock)handler { //create the request body NSMutableString* paramsString = nil; @@ -231,12 +244,11 @@ +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method params:(NS } //call the more general synq request method - return [self syncRequestDataFromURL: url - method: method - requestBody: [method isEqualToString:kHTTPMethodPOST]?[paramsString dataUsingEncoding:NSUTF8StringEncoding]:nil - headers: headers - etag: etag - error: err]; + [self requestDataFromURL: url + method: method + requestBody: [method isEqualToString:kHTTPMethodPOST]?[paramsString dataUsingEncoding:NSUTF8StringEncoding]:nil + headers: headers + handler:handler]; } #pragma mark - Async network request @@ -262,36 +274,9 @@ +(void)JSONFromURLWithString:(NSString *)urlString method:(NSString *)method par +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary *)params orBodyData:(NSData*)bodyData headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock { - NSDictionary* customHeaders = headers; - - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - + RequestResultBlock handler = ^(NSData *responseData, JSONModelError *error) { id jsonObject = nil; - JSONModelError* error = nil; - NSData* responseData = nil; - NSString* etag = nil; - - @try { - if (bodyData) { - responseData = [self syncRequestDataFromURL: [NSURL URLWithString:urlString] - method: method - requestBody: bodyData - headers: customHeaders - etag: &etag - error: &error]; - } else { - responseData = [self syncRequestDataFromURL: [NSURL URLWithString:urlString] - method: method - params: params - headers: customHeaders - etag: &etag - error: &error]; - } - } - @catch (NSException *exception) { - error = [JSONModelError errorBadResponse]; - } - + //step 3: if there's no response so far, return a basic error if (!responseData && !error) { //check for false response, but no network error @@ -310,8 +295,10 @@ +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method param } //step 4.5: cover an edge case in which meaningful content is return along an error HTTP status code else if (error && responseData && jsonObject==nil) { - //try to get the JSON object, while preserving the origianl error object + //try to get the JSON object, while preserving the original error object jsonObject = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:nil]; + //keep responseData just in case it contains error information + error.responseData = responseData; } //step 5: invoke the complete block @@ -320,7 +307,15 @@ +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method param completeBlock(jsonObject, error); } }); - }); + }; + + NSURL *url = [NSURL URLWithString:urlString]; + + if (bodyData) { + [self requestDataFromURL:url method:method requestBody:bodyData headers:headers handler:handler]; + } else { + [self requestDataFromURL:url method:method params:params headers:headers handler:handler]; + } } #pragma mark - request aliases diff --git a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONModel+networking.h b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONModel+networking.h index 88e329e..9529d77 100644 --- a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -1,18 +1,18 @@ // // JSONModel+networking.h // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @version 1.2 +// @author Marin Todorov (http://www.underplot.com) and contributors // -// Copyright (c) 2012-2014 Marin Todorov, Underplot ltd. +// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. // This code is distributed under the terms and conditions of the MIT license. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -// The MIT License in plain English: http://www.touch-code-magazine.com/JSONModel/MITLicense + #import "JSONModel.h" #import "JSONHTTPClient.h" @@ -28,9 +28,9 @@ typedef void (^JSONModelBlock)(id model, JSONModelError* err); @interface JSONModel(Networking) @property (assign, nonatomic) BOOL isLoading; -/** @name Asynchroniously create a model over the network */ +/** @name Asynchronously create a model over the network */ /** - * Asynchroniously create a model over the network. Create a new model instance and initialize it with the JSON fetched from the given URL + * Asynchronously create a model over the network. Create a new model instance and initialize it with the JSON fetched from the given URL * @param urlString the absolute URL address of the JSON feed as a string * @param completeBlock JSONModelBlock executed upon completion. The JSONModelBlock type is defined as: void (^JSONModelBlock)(JSONModel* model, JSONModelError* e); the first parameter is the initialized model or nil, * and second parameter holds the model initialization error, if any diff --git a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONModel+networking.m b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONModel+networking.m index 7d4d1ff..bb070c4 100644 --- a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -1,18 +1,18 @@ // // JSONModel+networking.m // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @version 1.2 +// @author Marin Todorov (http://www.underplot.com) and contributors // -// Copyright (c) 2012-2014 Marin Todorov, Underplot ltd. +// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. // This code is distributed under the terms and conditions of the MIT license. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -// The MIT License in plain English: http://www.touch-code-magazine.com/JSONModel/MITLicense + #import "JSONModel+networking.h" #import "JSONHTTPClient.h" diff --git a/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 75822c6..e022e5b 100644 --- a/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -1,18 +1,18 @@ // // JSONKeyMapper.h // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @version 1.2 +// @author Marin Todorov (http://www.underplot.com) and contributors // -// Copyright (c) 2012-2014 Marin Todorov, Underplot ltd. +// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. // This code is distributed under the terms and conditions of the MIT license. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -// The MIT License in plain English: http://www.touch-code-magazine.com/JSONModel/MITLicense + #import @@ -50,14 +50,14 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); */ @interface JSONKeyMapper : NSObject -/** @name Name convertors */ +/** @name Name converters */ /** Block, which takes in a JSON key and converts it to the corresponding property name */ @property (readonly, nonatomic) JSONModelKeyMapBlock JSONToModelKeyBlock; /** Block, which takes in a property name and converts it to the corresponding JSON key name */ @property (readonly, nonatomic) JSONModelKeyMapBlock modelToJSONKeyBlock; -/** Combined convertor method +/** Combined converter method * @param value the source name * @param importing YES invokes JSONToModelKeyBlock, NO - modelToJSONKeyBlock * @return JSONKeyMapper instance @@ -92,4 +92,11 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); +(instancetype)mapperFromUnderscoreCaseToCamelCase; +(instancetype)mapperFromUpperCaseToLowerCase; + +/** + * Creates a JSONKeyMapper based on a built-in JSONKeyMapper, with specific exceptions. + * Use the original JSON key names as keys, and your JSONModel property names as values. + */ ++ (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions; + @end diff --git a/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONKeyMapper.m index d2ca303..ee10794 100644 --- a/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -1,24 +1,26 @@ // // JSONKeyMapper.m // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @version 1.2 +// @author Marin Todorov (http://www.underplot.com) and contributors // -// Copyright (c) 2012-2014 Marin Todorov, Underplot ltd. +// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. // This code is distributed under the terms and conditions of the MIT license. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -// The MIT License in plain English: http://www.touch-code-magazine.com/JSONModel/MITLicense + #import "JSONKeyMapper.h" +#import @interface JSONKeyMapper() @property (nonatomic, strong) NSMutableDictionary *toModelMap; @property (nonatomic, strong) NSMutableDictionary *toJSONMap; +@property (nonatomic, assign) OSSpinLock lock; @end @implementation JSONKeyMapper @@ -40,30 +42,48 @@ -(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel self = [self init]; if (self) { - __weak JSONKeyMapper *myself = self; - //the json to model convertion block - _JSONToModelKeyBlock = ^NSString*(NSString* keyName) { + + __weak JSONKeyMapper* weakSelf = self; + + _JSONToModelKeyBlock = [^NSString* (NSString* keyName) { + + __strong JSONKeyMapper* strongSelf = weakSelf; //try to return cached transformed key - if (myself.toModelMap[keyName]) return myself.toModelMap[keyName]; + if (strongSelf.toModelMap[keyName]) { + return strongSelf.toModelMap[keyName]; + } //try to convert the key, and store in the cache NSString* result = toModel(keyName); - myself.toModelMap[keyName] = result; + + OSSpinLockLock(&strongSelf->_lock); + strongSelf.toModelMap[keyName] = result; + OSSpinLockUnlock(&strongSelf->_lock); + return result; - }; + + } copy]; - _modelToJSONKeyBlock = ^NSString*(NSString* keyName) { + _modelToJSONKeyBlock = [^NSString* (NSString* keyName) { + + __strong JSONKeyMapper *strongSelf = weakSelf; //try to return cached transformed key - if (myself.toJSONMap[keyName]) return myself.toJSONMap[keyName]; + if (strongSelf.toJSONMap[keyName]) { + return strongSelf.toJSONMap[keyName]; + } //try to convert the key, and store in the cache NSString* result = toJSON(keyName); - myself.toJSONMap[keyName] = result; + + OSSpinLockLock(&strongSelf->_lock); + strongSelf.toJSONMap[keyName] = result; + OSSpinLockUnlock(&strongSelf->_lock); + return result; - }; + } copy]; } @@ -183,4 +203,35 @@ +(instancetype)mapperFromUpperCaseToLowerCase } ++ (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions +{ + NSArray *keys = exceptions.allKeys; + NSArray *values = [exceptions objectsForKeys:keys notFoundMarker:[NSNull null]]; + + NSDictionary *toModelMap = [NSDictionary dictionaryWithObjects:values forKeys:keys]; + NSDictionary *toJsonMap = [NSDictionary dictionaryWithObjects:keys forKeys:values]; + + JSONModelKeyMapBlock toModel = ^NSString *(NSString *keyName) { + if (!keyName) + return nil; + + if (toModelMap[keyName]) + return toModelMap[keyName]; + + return baseKeyMapper.JSONToModelKeyBlock(keyName); + }; + + JSONModelKeyMapBlock toJson = ^NSString *(NSString *keyName) { + if (!keyName) + return nil; + + if (toJsonMap[keyName]) + return toJsonMap[keyName]; + + return baseKeyMapper.modelToJSONKeyBlock(keyName); + }; + + return [[self alloc] initWithJSONToModelBlock:toModel modelToJSONBlock:toJson]; +} + @end diff --git a/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONValueTransformer.h index 8c40ce8..71728a9 100644 --- a/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -1,25 +1,25 @@ // // JSONValueTransformer.h // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @version 1.2 +// @author Marin Todorov (http://www.underplot.com) and contributors // -// Copyright (c) 2012-2014 Marin Todorov, Underplot ltd. +// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. // This code is distributed under the terms and conditions of the MIT license. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -// The MIT License in plain English: http://www.touch-code-magazine.com/JSONModel/MITLicense + #import #import "JSONModelArray.h" ///////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - extern definitons +#pragma mark - extern definitions /** * Boolean function to check for null values. Handy when you need to both check * for nil and [NSNUll null] @@ -48,10 +48,10 @@ extern BOOL isNull(id value); /** @name Resolving cluster class names */ /** - * This method returns the ubmrella class for any standard class cluster members. + * This method returns the umbrella class for any standard class cluster members. * For example returns NSString when given as input NSString, NSMutableString, __CFString and __CFConstantString * The method currently looksup a pre-defined list. - * @param sourceClass the class to get the umrella class for + * @param sourceClass the class to get the umbrella class for * @return Class */ +(Class)classByResolvingClusterClasses:(Class)sourceClass; @@ -59,7 +59,7 @@ extern BOOL isNull(id value); #pragma mark - NSMutableString <-> NSString /** @name Transforming to Mutable copies */ /** - * Trasnforms a string value to a mutable string value + * Transforms a string value to a mutable string value * @param string incoming string * @return mutable string */ @@ -67,7 +67,7 @@ extern BOOL isNull(id value); #pragma mark - NSMutableArray <-> NSArray /** - * Trasnforms an array to a mutable array + * Transforms an array to a mutable array * @param array incoming array * @return mutable array */ @@ -75,7 +75,7 @@ extern BOOL isNull(id value); #pragma mark - NS(Mutable)Array <- JSONModelArray /** - * Trasnforms an array to a JSONModelArray + * Transforms an array to a JSONModelArray * @param array incoming array * @return JSONModelArray */ @@ -84,7 +84,7 @@ extern BOOL isNull(id value); #pragma mark - NSMutableDictionary <-> NSDictionary /** - * Trasnforms a dictionary to a mutable dictionary + * Transforms a dictionary to a mutable dictionary * @param dict incoming dictionary * @return mutable dictionary */ diff --git a/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 4e5bc4a..cf04d11 100644 --- a/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/Pods/JSONModel/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -1,18 +1,18 @@ // // JSONValueTransformer.m // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @version 1.2 +// @author Marin Todorov (http://www.underplot.com) and contributors // -// Copyright (c) 2012-2014 Marin Todorov, Underplot ltd. +// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. // This code is distributed under the terms and conditions of the MIT license. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -// The MIT License in plain English: http://www.touch-code-magazine.com/JSONModel/MITLicense + #import "JSONValueTransformer.h" #import "JSONModelArray.h" @@ -33,7 +33,7 @@ -(id)init self = [super init]; if (self) { _primitivesNames = @{@"f":@"float", @"i":@"int", @"d":@"double", @"l":@"long", @"c":@"BOOL", @"s":@"short", @"q":@"long", - //and some famos aliases of primitive types + //and some famous aliases of primitive types // BOOL is now "B" on iOS __LP64 builds @"I":@"NSInteger", @"Q":@"NSUInteger", @"B":@"BOOL", @@ -200,7 +200,9 @@ -(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number #pragma mark - string <-> url -(NSURL*)NSURLFromNSString:(NSString*)string { - return [NSURL URLWithString:[string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + // do not change this behavior - there are other ways of overriding it + // see: https://github.com/icanzilb/JSONModel/pull/119 + return [NSURL URLWithString:string]; } -(NSString*)JSONObjectFromNSURL:(NSURL*)url diff --git a/Pods/JSONModel/README.md b/Pods/JSONModel/README.md index 61f25fa..a0d041f 100644 --- a/Pods/JSONModel/README.md +++ b/Pods/JSONModel/README.md @@ -1,13 +1,13 @@ ## Magical Data Modelling Framework for JSON -### Version 1.1.2 +### Version 1.2.0 #####NB: Swift works in a different way under the hood than Objective-C. Therefore I can't find a way to re-create JSONModel in Swift. JSONModel in Objective-C works in Swift apps through CocoaPods or as an imported Objective-C library. --- If you like JSONModel and use it, could you please: - * star this repo + * star this repo * send me some feedback. Thanks! @@ -46,6 +46,14 @@ pod 'JSONModel' ``` If you want to read more about CocoaPods, have a look at [this short tutorial](http://www.raywenderlich.com/12139/introduction-to-cocoapods). +#### or 3) via Carthage + +In your project's **Cartfile** add the JSONModel: + +```ruby +github "icanzilb/JSONModel" +``` + #### Source code documentation The source code includes class docs, which you can build yourself and import into Xcode: @@ -62,7 +70,7 @@ Consider you have a JSON like this: {"id":"10", "country":"Germany", "dialCode": 49, "isInEurope":true} ``` - * Create a new Objective-C class for your data model and make it inherit the JSONModel class. + * Create a new Objective-C class for your data model and make it inherit the JSONModel class. * Declare properties in your header file with the name of the JSON keys: ```objective-c @@ -85,7 +93,7 @@ There's no need to do anything in the **.m** file. #import "CountryModel.h" ... -NSString* json = (fetch here JSON from Internet) ... +NSString* json = (fetch here JSON from Internet) ... NSError* err = nil; CountryModel* country = [[CountryModel alloc] initWithString:json error:&err]; @@ -95,7 +103,7 @@ If the validation of the JSON passes you have all the corresponding properties i * convert "id" from string (in the JSON) to an int for your class * just copy country's value -* convert dialCode from number (in the JSON) to an NSString value +* convert dialCode from number (in the JSON) to an NSString value * finally convert isInEurope to a BOOL for your BOOL property And the good news is all you had to do is define the properties and their expected types. @@ -110,7 +118,7 @@ Class docs online: [http://jsonmodel.com/docs/](http://jsonmodel.com/docs/) Step-by-step tutorials: - * [How to fetch and parse JSON by using data models](http://www.touch-code-magazine.com/how-to-fetch-and-parse-json-by-using-data-models/) + * [How to fetch and parse JSON by using data models](http://www.touch-code-magazine.com/how-to-fetch-and-parse-json-by-using-data-models/) * [Performance optimisation for working with JSON feeds via JSONModel](http://www.touch-code-magazine.com/performance-optimisation-for-working-with-json-feeds-via-jsonmodel/) @@ -455,9 +463,9 @@ Examples [JSONHTTPClient postJSONFromURLWithString:@"http://mydomain.com/api" params:@{@"postParam1":@"value1"} completion:^(id json, JSONModelError *err) { - + //check err, process json ... - + }]; ``` @@ -544,7 +552,7 @@ Change log : [https://github.com/icanzilb/JSONModel/blob/master/Changelog.md](ht ------- #### License -This code is distributed under the terms and conditions of the MIT license. +This code is distributed under the terms and conditions of the MIT license. ------- #### Contribution guidelines diff --git a/Pods/MJExtension/MJExtension/MJDictionaryCache.h b/Pods/MJExtension/MJExtension/MJDictionaryCache.h deleted file mode 100644 index 8d2b015..0000000 --- a/Pods/MJExtension/MJExtension/MJDictionaryCache.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// MJDictionaryCache.h -// MJExtensionExample -// -// Created by MJ Lee on 15/8/22. -// Copyright (c) 2015年 小码哥. All rights reserved. -// - -#import - -@interface MJDictionaryCache : NSObject -/** - * 缓存数据 - * - * @param dictId 字典标识 - * - * @return 缓存的字典 - */ -+ (id)setObject:(id)object forKey:(id )key forDictId:(const void *)dictId; - -/** - * 获得缓存的数据 - * - * @param dictId 字典标识 - */ -+ (id)objectForKey:(id )key forDictId:(const void *)dictId; - -/** - * 获得缓存的字典 - * - * @param dictId 字典标识 - */ -+ (id)dictWithDictId:(const void *)dictId; -@end diff --git a/Pods/MJExtension/MJExtension/MJDictionaryCache.m b/Pods/MJExtension/MJExtension/MJDictionaryCache.m deleted file mode 100644 index e12870a..0000000 --- a/Pods/MJExtension/MJExtension/MJDictionaryCache.m +++ /dev/null @@ -1,37 +0,0 @@ -// -// MJDictionaryCache.m -// MJExtensionExample -// -// Created by MJ Lee on 15/8/22. -// Copyright (c) 2015年 小码哥. All rights reserved. -// - -#import "MJDictionaryCache.h" -#import - -@implementation MJDictionaryCache -+ (id)setObject:(id)object forKey:(id )key forDictId:(const void *)dictId -{ - // 获得字典 - NSMutableDictionary *dict = [self dictWithDictId:dictId]; - if (dict == nil) { - dict = [NSMutableDictionary dictionary]; - objc_setAssociatedObject(self, dictId, dict, OBJC_ASSOCIATION_RETAIN_NONATOMIC); - } - - // 存储数据 - dict[key] = object; - - return dict; -} - -+ (id)objectForKey:(id )key forDictId:(const void *)dictId -{ - return [self dictWithDictId:dictId][key]; -} - -+ (id)dictWithDictId:(const void *)dictId -{ - return objc_getAssociatedObject(self, dictId); -} -@end \ No newline at end of file diff --git a/Pods/MJExtension/MJExtension/MJPropertyType.m b/Pods/MJExtension/MJExtension/MJPropertyType.m index 1fd0488..b78b202 100755 --- a/Pods/MJExtension/MJExtension/MJPropertyType.m +++ b/Pods/MJExtension/MJExtension/MJPropertyType.m @@ -10,21 +10,24 @@ #import "MJExtension.h" #import "MJFoundation.h" #import "MJExtensionConst.h" -#import "MJDictionaryCache.h" @implementation MJPropertyType +static NSMutableDictionary *types_; ++ (void)initialize +{ + types_ = [NSMutableDictionary dictionary]; +} + + (instancetype)cachedTypeWithCode:(NSString *)code { MJExtensionAssertParamNotNil2(code, nil); - static const char MJCachedTypesKey = '\0'; - - MJPropertyType *type = [MJDictionaryCache objectForKey:code forDictId:&MJCachedTypesKey]; + MJPropertyType *type = types_[code]; if (type == nil) { type = [[self alloc] init]; type.code = code; - [MJDictionaryCache setObject:type forKey:code forDictId:&MJCachedTypesKey]; + types_[code] = type; } return type; } diff --git a/Pods/MJExtension/MJExtension/NSObject+MJClass.m b/Pods/MJExtension/MJExtension/NSObject+MJClass.m index 0320cb6..789b9a8 100644 --- a/Pods/MJExtension/MJExtension/NSObject+MJClass.m +++ b/Pods/MJExtension/MJExtension/NSObject+MJClass.m @@ -11,15 +11,36 @@ #import "NSObject+MJKeyValue.h" #import "MJFoundation.h" #import -#import "MJDictionaryCache.h" static const char MJAllowedPropertyNamesKey = '\0'; static const char MJIgnoredPropertyNamesKey = '\0'; static const char MJAllowedCodingPropertyNamesKey = '\0'; static const char MJIgnoredCodingPropertyNamesKey = '\0'; +static NSMutableDictionary *allowedPropertyNamesDict_; +static NSMutableDictionary *ignoredPropertyNamesDict_; +static NSMutableDictionary *allowedCodingPropertyNamesDict_; +static NSMutableDictionary *ignoredCodingPropertyNamesDict_; + @implementation NSObject (MJClass) ++ (void)load +{ + allowedPropertyNamesDict_ = [NSMutableDictionary dictionary]; + ignoredPropertyNamesDict_ = [NSMutableDictionary dictionary]; + allowedCodingPropertyNamesDict_ = [NSMutableDictionary dictionary]; + ignoredCodingPropertyNamesDict_ = [NSMutableDictionary dictionary]; +} + ++ (NSMutableDictionary *)dictForKey:(const void *)key +{ + if (key == &MJAllowedPropertyNamesKey) return allowedPropertyNamesDict_; + if (key == &MJIgnoredPropertyNamesKey) return ignoredPropertyNamesDict_; + if (key == &MJAllowedCodingPropertyNamesKey) return allowedCodingPropertyNamesDict_; + if (key == &MJIgnoredCodingPropertyNamesKey) return ignoredCodingPropertyNamesDict_; + return nil; +} + + (void)mj_enumerateClasses:(MJClassesEnumeration)enumeration { // 1.没有block就直接返回 @@ -117,16 +138,16 @@ + (void)mj_setupBlockReturnValue:(id (^)())block key:(const char *)key } // 清空数据 - [[MJDictionaryCache dictWithDictId:key] removeAllObjects]; + [[self dictForKey:key] removeAllObjects]; } + (NSMutableArray *)mj_totalObjectsWithSelector:(SEL)selector key:(const char *)key { - NSMutableArray *array = [MJDictionaryCache objectForKey:NSStringFromClass(self) forDictId:key]; + NSMutableArray *array = [self dictForKey:key][NSStringFromClass(self)]; if (array) return array; // 创建、存储 - [MJDictionaryCache setObject:array = [NSMutableArray array] forKey:NSStringFromClass(self) forDictId:key]; + [self dictForKey:key][NSStringFromClass(self)] = array = [NSMutableArray array]; if ([self respondsToSelector:selector]) { #pragma clang diagnostic push diff --git a/Pods/MJExtension/MJExtension/NSObject+MJKeyValue.m b/Pods/MJExtension/MJExtension/NSObject+MJKeyValue.m index d0cf13e..5635e29 100755 --- a/Pods/MJExtension/MJExtension/NSObject+MJKeyValue.m +++ b/Pods/MJExtension/MJExtension/NSObject+MJKeyValue.m @@ -159,7 +159,11 @@ - (instancetype)mj_setKeyValues:(id)keyValues context:(NSManagedObjectContext *) NSString *oldValue = value; // NSString -> NSNumber - value = [numberFormatter_ numberFromString:oldValue]; + if (type.typeClass == [NSDecimalNumber class]) { + value = [NSDecimalNumber decimalNumberWithString:oldValue]; + } else { + value = [numberFormatter_ numberFromString:oldValue]; + } // 如果是BOOL if (type.isBoolType) { @@ -465,8 +469,11 @@ - (instancetype)setKeyValues:(id)keyValues - (instancetype)setKeyValues:(id)keyValues error:(NSError **)error { id value = [self mj_setKeyValues:keyValues]; + if (error != NULL) { *error = [self.class mj_error]; + } return value; + } - (instancetype)setKeyValues:(id)keyValues context:(NSManagedObjectContext *)context @@ -477,7 +484,9 @@ - (instancetype)setKeyValues:(id)keyValues context:(NSManagedObjectContext *)con - (instancetype)setKeyValues:(id)keyValues context:(NSManagedObjectContext *)context error:(NSError **)error { id value = [self mj_setKeyValues:keyValues context:context]; + if (error != NULL) { *error = [self.class mj_error]; + } return value; } @@ -494,7 +503,9 @@ - (NSMutableDictionary *)keyValues - (NSMutableDictionary *)keyValuesWithError:(NSError **)error { id value = [self mj_keyValues]; + if (error != NULL) { *error = [self.class mj_error]; + } return value; } @@ -506,7 +517,9 @@ - (NSMutableDictionary *)keyValuesWithKeys:(NSArray *)keys - (NSMutableDictionary *)keyValuesWithKeys:(NSArray *)keys error:(NSError **)error { id value = [self mj_keyValuesWithKeys:keys]; + if (error != NULL) { *error = [self.class mj_error]; + } return value; } @@ -518,7 +531,9 @@ - (NSMutableDictionary *)keyValuesWithIgnoredKeys:(NSArray *)ignoredKeys - (NSMutableDictionary *)keyValuesWithIgnoredKeys:(NSArray *)ignoredKeys error:(NSError **)error { id value = [self mj_keyValuesWithIgnoredKeys:ignoredKeys]; + if (error != NULL) { *error = [self.class mj_error]; + } return value; } @@ -530,7 +545,9 @@ + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray error:(NSError **)error { id value = [self mj_keyValuesArrayWithObjectArray:objectArray]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -542,7 +559,9 @@ + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray keys:(N + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray keys:(NSArray *)keys error:(NSError **)error { id value = [self mj_keyValuesArrayWithObjectArray:objectArray keys:keys]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -554,7 +573,9 @@ + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray ignored + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray ignoredKeys:(NSArray *)ignoredKeys error:(NSError **)error { id value = [self mj_keyValuesArrayWithObjectArray:objectArray ignoredKeys:ignoredKeys]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -566,7 +587,9 @@ + (instancetype)objectWithKeyValues:(id)keyValues + (instancetype)objectWithKeyValues:(id)keyValues error:(NSError **)error { id value = [self mj_objectWithKeyValues:keyValues]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -578,7 +601,9 @@ + (instancetype)objectWithKeyValues:(id)keyValues context:(NSManagedObjectContex + (instancetype)objectWithKeyValues:(id)keyValues context:(NSManagedObjectContext *)context error:(NSError **)error { id value = [self mj_objectWithKeyValues:keyValues context:context]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -590,7 +615,9 @@ + (instancetype)objectWithFilename:(NSString *)filename + (instancetype)objectWithFilename:(NSString *)filename error:(NSError **)error { id value = [self mj_objectWithFilename:filename]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -602,7 +629,9 @@ + (instancetype)objectWithFile:(NSString *)file + (instancetype)objectWithFile:(NSString *)file error:(NSError **)error { id value = [self mj_objectWithFile:file]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -614,7 +643,9 @@ + (NSMutableArray *)objectArrayWithKeyValuesArray:(id)keyValuesArray + (NSMutableArray *)objectArrayWithKeyValuesArray:(id)keyValuesArray error:(NSError **)error { id value = [self mj_objectArrayWithKeyValuesArray:keyValuesArray]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -626,7 +657,9 @@ + (NSMutableArray *)objectArrayWithKeyValuesArray:(id)keyValuesArray context:(NS + (NSMutableArray *)objectArrayWithKeyValuesArray:(id)keyValuesArray context:(NSManagedObjectContext *)context error:(NSError **)error { id value = [self mj_objectArrayWithKeyValuesArray:keyValuesArray context:context]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -638,7 +671,9 @@ + (NSMutableArray *)objectArrayWithFilename:(NSString *)filename + (NSMutableArray *)objectArrayWithFilename:(NSString *)filename error:(NSError **)error { id value = [self mj_objectArrayWithFilename:filename]; + if (error != NULL) { *error = [self mj_error]; + } return value; } @@ -650,7 +685,9 @@ + (NSMutableArray *)objectArrayWithFile:(NSString *)file + (NSMutableArray *)objectArrayWithFile:(NSString *)file error:(NSError **)error { id value = [self mj_objectArrayWithFile:file]; + if (error != NULL) { *error = [self mj_error]; + } return value; } diff --git a/Pods/MJExtension/MJExtension/NSObject+MJProperty.m b/Pods/MJExtension/MJExtension/NSObject+MJProperty.m index 22280a7..9ac6134 100644 --- a/Pods/MJExtension/MJExtension/NSObject+MJProperty.m +++ b/Pods/MJExtension/MJExtension/NSObject+MJProperty.m @@ -13,14 +13,11 @@ #import "MJProperty.h" #import "MJFoundation.h" #import -#import "MJDictionaryCache.h" #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wundeclared-selector" #pragma clang diagnostic ignored "-Warc-performSelector-leaks" -@implementation NSObject (Property) - static const char MJReplacedKeyFromPropertyNameKey = '\0'; static const char MJReplacedKeyFromPropertyName121Key = '\0'; static const char MJNewValueFromOldValueKey = '\0'; @@ -28,6 +25,33 @@ @implementation NSObject (Property) static const char MJCachedPropertiesKey = '\0'; +@implementation NSObject (Property) + +static NSMutableDictionary *replacedKeyFromPropertyNameDict_; +static NSMutableDictionary *replacedKeyFromPropertyName121Dict_; +static NSMutableDictionary *newValueFromOldValueDict_; +static NSMutableDictionary *objectClassInArrayDict_; +static NSMutableDictionary *cachedPropertiesDict_; + ++ (void)load +{ + replacedKeyFromPropertyNameDict_ = [NSMutableDictionary dictionary]; + replacedKeyFromPropertyName121Dict_ = [NSMutableDictionary dictionary]; + newValueFromOldValueDict_ = [NSMutableDictionary dictionary]; + objectClassInArrayDict_ = [NSMutableDictionary dictionary]; + cachedPropertiesDict_ = [NSMutableDictionary dictionary]; +} + ++ (NSMutableDictionary *)dictForKey:(const void *)key +{ + if (key == &MJReplacedKeyFromPropertyNameKey) return replacedKeyFromPropertyNameDict_; + if (key == &MJReplacedKeyFromPropertyName121Key) return replacedKeyFromPropertyName121Dict_; + if (key == &MJNewValueFromOldValueKey) return newValueFromOldValueDict_; + if (key == &MJObjectClassInArrayKey) return objectClassInArrayDict_; + if (key == &MJCachedPropertiesKey) return cachedPropertiesDict_; + return nil; +} + #pragma mark - --私有方法-- + (NSString *)propertyKey:(NSString *)propertyName { @@ -124,7 +148,7 @@ + (void)mj_enumerateProperties:(MJPropertiesEnumeration)enumeration #pragma mark - 公共方法 + (NSMutableArray *)properties { - NSMutableArray *cachedProperties = [MJDictionaryCache objectForKey:NSStringFromClass(self) forDictId:&MJCachedPropertiesKey]; + NSMutableArray *cachedProperties = [self dictForKey:&MJCachedPropertiesKey][NSStringFromClass(self)]; if (cachedProperties == nil) { cachedProperties = [NSMutableArray array]; @@ -154,7 +178,7 @@ + (NSMutableArray *)properties free(properties); }]; - [MJDictionaryCache setObject:cachedProperties forKey:NSStringFromClass(self) forDictId:&MJCachedPropertiesKey]; + [self dictForKey:&MJCachedPropertiesKey][NSStringFromClass(self)] = cachedProperties; } return cachedProperties; @@ -193,7 +217,7 @@ + (void)mj_setupObjectClassInArray:(MJObjectClassInArray)objectClassInArray { [self mj_setupBlockReturnValue:objectClassInArray key:&MJObjectClassInArrayKey]; - [[MJDictionaryCache dictWithDictId:&MJCachedPropertiesKey] removeAllObjects]; + [[self dictForKey:&MJCachedPropertiesKey] removeAllObjects]; } #pragma mark - key配置 @@ -201,14 +225,14 @@ + (void)mj_setupReplacedKeyFromPropertyName:(MJReplacedKeyFromPropertyName)repla { [self mj_setupBlockReturnValue:replacedKeyFromPropertyName key:&MJReplacedKeyFromPropertyNameKey]; - [[MJDictionaryCache dictWithDictId:&MJCachedPropertiesKey] removeAllObjects]; + [[self dictForKey:&MJCachedPropertiesKey] removeAllObjects]; } + (void)mj_setupReplacedKeyFromPropertyName121:(MJReplacedKeyFromPropertyName121)replacedKeyFromPropertyName121 { objc_setAssociatedObject(self, &MJReplacedKeyFromPropertyName121Key, replacedKeyFromPropertyName121, OBJC_ASSOCIATION_COPY_NONATOMIC); - [[MJDictionaryCache dictWithDictId:&MJCachedPropertiesKey] removeAllObjects]; + [[self dictForKey:&MJCachedPropertiesKey] removeAllObjects]; } @end diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index dfe29b8..916161d 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -1,44 +1,33 @@ PODS: - - AFNetworking (2.5.4): - - AFNetworking/NSURLConnection (= 2.5.4) - - AFNetworking/NSURLSession (= 2.5.4) - - AFNetworking/Reachability (= 2.5.4) - - AFNetworking/Security (= 2.5.4) - - AFNetworking/Serialization (= 2.5.4) - - AFNetworking/UIKit (= 2.5.4) - - AFNetworking/NSURLConnection (2.5.4): + - AFNetworking (3.0.4): + - AFNetworking/NSURLSession (= 3.0.4) + - AFNetworking/Reachability (= 3.0.4) + - AFNetworking/Security (= 3.0.4) + - AFNetworking/Serialization (= 3.0.4) + - AFNetworking/UIKit (= 3.0.4) + - AFNetworking/NSURLSession (3.0.4): - AFNetworking/Reachability - AFNetworking/Security - AFNetworking/Serialization - - AFNetworking/NSURLSession (2.5.4): - - AFNetworking/Reachability - - AFNetworking/Security - - AFNetworking/Serialization - - AFNetworking/Reachability (2.5.4) - - AFNetworking/Security (2.5.4) - - AFNetworking/Serialization (2.5.4) - - AFNetworking/UIKit (2.5.4): - - AFNetworking/NSURLConnection + - AFNetworking/Reachability (3.0.4) + - AFNetworking/Security (3.0.4) + - AFNetworking/Serialization (3.0.4) + - AFNetworking/UIKit (3.0.4): - AFNetworking/NSURLSession - - JSONModel (1.1.2) - - Mantle (2.0.6): - - Mantle/extobjc (= 2.0.6) - - Mantle/extobjc (2.0.6) - - MJExtension (3.0.7) - - YYModel (0.9.7) + - JSONModel (1.2.0) + - MJExtension (3.0.10) + - YYModel (1.0.1) DEPENDENCIES: - - AFNetworking + - AFNetworking (~> 3.0.4) - JSONModel - - Mantle - MJExtension - YYModel SPEC CHECKSUMS: - AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e - JSONModel: 216584d0311b053ff714f1d6cb700dbf890847bc - Mantle: 299966b00759634931699f69cb6a30b9239b944d - MJExtension: 290cc966f0f849b12b6391a38e296e0004ae8e5e - YYModel: 88f4bdec25975a8f642daa0bb572b039a3ab1db1 + AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93 + JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c + MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548 + YYModel: 794f0820a9a9703615bc166aa8e336abaf422c2b COCOAPODS: 0.39.0 diff --git a/Pods/Mantle/LICENSE.md b/Pods/Mantle/LICENSE.md deleted file mode 100644 index 4e9825a..0000000 --- a/Pods/Mantle/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -**Copyright (c) GitHub, Inc.** -**All rights reserved.** - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- - -**This project uses portions of code from the Proton framework.** -**Proton is copyright (c) 2012, Bitswift, Inc.** -**All rights reserved.** - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Neither the name of the Bitswift, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Pods/Mantle/Mantle/MTLJSONAdapter.h b/Pods/Mantle/Mantle/MTLJSONAdapter.h deleted file mode 100644 index d23fbda..0000000 --- a/Pods/Mantle/Mantle/MTLJSONAdapter.h +++ /dev/null @@ -1,277 +0,0 @@ -// -// MTLJSONAdapter.h -// Mantle -// -// Created by Justin Spahr-Summers on 2013-02-12. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import - -@protocol MTLModel; -@protocol MTLTransformerErrorHandling; - -/// A MTLModel object that supports being parsed from and serialized to JSON. -@protocol MTLJSONSerializing -@required - -/// Specifies how to map property keys to different key paths in JSON. -/// -/// Subclasses overriding this method should combine their values with those of -/// `super`. -/// -/// Values in the dictionary can either be key paths in the JSON representation -/// of the receiver or an array of such key paths. If an array is used, the -/// deserialized value will be a dictionary containing all of the keys in the -/// array. -/// -/// Any keys omitted will not participate in JSON serialization. -/// -/// Examples -/// -/// + (NSDictionary *)JSONKeyPathsByPropertyKey { -/// return @{ -/// @"name": @"POI.name", -/// @"point": @[ @"latitude", @"longitude" ], -/// @"starred": @"starred" -/// }; -/// } -/// -/// This will map the `starred` property to `JSONDictionary[@"starred"]`, `name` -/// to `JSONDictionary[@"POI"][@"name"]` and `point` to a dictionary equivalent -/// to: -/// -/// @{ -/// @"latitude": JSONDictionary[@"latitude"], -/// @"longitude": JSONDictionary[@"longitude"] -/// } -/// -/// Returns a dictionary mapping property keys to one or multiple JSON key paths -/// (as strings or arrays of strings). -+ (NSDictionary *)JSONKeyPathsByPropertyKey; - -@optional - -/// Specifies how to convert a JSON value to the given property key. If -/// reversible, the transformer will also be used to convert the property value -/// back to JSON. -/// -/// If the receiver implements a `+ JSONTransformer` method, MTLJSONAdapter -/// will use the result of that method instead. -/// -/// Returns a value transformer, or nil if no transformation should be performed. -+ (NSValueTransformer *)JSONTransformerForKey:(NSString *)key; - -/// Overridden to parse the receiver as a different class, based on information -/// in the provided dictionary. -/// -/// This is mostly useful for class clusters, where the abstract base class would -/// be passed into -[MTLJSONAdapter initWithJSONDictionary:modelClass:], but -/// a subclass should be instantiated instead. -/// -/// JSONDictionary - The JSON dictionary that will be parsed. -/// -/// Returns the class that should be parsed (which may be the receiver), or nil -/// to abort parsing (e.g., if the data is invalid). -+ (Class)classForParsingJSONDictionary:(NSDictionary *)JSONDictionary; - -@end - -/// The domain for errors originating from MTLJSONAdapter. -extern NSString * const MTLJSONAdapterErrorDomain; - -/// +classForParsingJSONDictionary: returned nil for the given dictionary. -extern const NSInteger MTLJSONAdapterErrorNoClassFound; - -/// The provided JSONDictionary is not valid. -extern const NSInteger MTLJSONAdapterErrorInvalidJSONDictionary; - -/// The model's implementation of +JSONKeyPathsByPropertyKey included a key which -/// does not actually exist in +propertyKeys. -extern const NSInteger MTLJSONAdapterErrorInvalidJSONMapping; - -/// Converts a MTLModel object to and from a JSON dictionary. -@interface MTLJSONAdapter : NSObject - -/// Attempts to parse a JSON dictionary into a model object. -/// -/// modelClass - The MTLModel subclass to attempt to parse from the JSON. -/// This class must conform to . This -/// argument must not be nil. -/// JSONDictionary - A dictionary representing JSON data. This should match the -/// format returned by NSJSONSerialization. If this argument is -/// nil, the method returns nil. -/// error - If not NULL, this may be set to an error that occurs during -/// parsing or initializing an instance of `modelClass`. -/// -/// Returns an instance of `modelClass` upon success, or nil if a parsing error -/// occurred. -+ (id)modelOfClass:(Class)modelClass fromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)error; - -/// Attempts to parse an array of JSON dictionary objects into a model objects -/// of a specific class. -/// -/// modelClass - The MTLModel subclass to attempt to parse from the JSON. This -/// class must conform to . This argument must -/// not be nil. -/// JSONArray - A array of dictionaries representing JSON data. This should -/// match the format returned by NSJSONSerialization. If this -/// argument is nil, the method returns nil. -/// error - If not NULL, this may be set to an error that occurs during -/// parsing or initializing an any of the instances of -/// `modelClass`. -/// -/// Returns an array of `modelClass` instances upon success, or nil if a parsing -/// error occurred. -+ (NSArray *)modelsOfClass:(Class)modelClass fromJSONArray:(NSArray *)JSONArray error:(NSError **)error; - -/// Converts a model into a JSON representation. -/// -/// model - The model to use for JSON serialization. This argument must not be -/// nil. -/// error - If not NULL, this may be set to an error that occurs during -/// serializing. -/// -/// Returns a JSON dictionary, or nil if a serialization error occurred. -+ (NSDictionary *)JSONDictionaryFromModel:(id )model error:(NSError **)error; - -/// Converts a array of models into a JSON representation. -/// -/// models - The array of models to use for JSON serialization. This argument -/// must not be nil. -/// error - If not NULL, this may be set to an error that occurs during -/// serializing. -/// -/// Returns a JSON array, or nil if a serialization error occurred for any -/// model. -+ (NSArray *)JSONArrayFromModels:(NSArray *)models error:(NSError **)error; - -/// Initializes the receiver with a given model class. -/// -/// modelClass - The MTLModel subclass to attempt to parse from the JSON and -/// back. This class must conform to . This -/// argument must not be nil. -/// -/// Returns an initialized adapter. -- (id)initWithModelClass:(Class)modelClass; - -/// Deserializes a model from a JSON dictionary. -/// -/// The adapter will call -validate: on the model and consider it an error if the -/// validation fails. -/// -/// JSONDictionary - A dictionary representing JSON data. This should match the -/// format returned by NSJSONSerialization. This argument must -/// not be nil. -/// error - If not NULL, this may be set to an error that occurs during -/// deserializing or validation. -/// -/// Returns a model object, or nil if a deserialization error occurred or the -/// model did not validate successfully. -- (id)modelFromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)error; - -/// Serializes a model into JSON. -/// -/// model - The model to use for JSON serialization. This argument must not be -/// nil. -/// error - If not NULL, this may be set to an error that occurs during -/// serializing. -/// -/// Returns a model object, or nil if a serialization error occurred. -- (NSDictionary *)JSONDictionaryFromModel:(id )model error:(NSError **)error; - -/// Filters the property keys used to serialize a given model. -/// -/// propertyKeys - The property keys for which `model` provides a mapping. -/// model - The model being serialized. -/// -/// Subclasses may override this method to determine which property keys should -/// be used when serializing `model`. For instance, this method can be used to -/// create more efficient updates of server-side resources. -/// -/// The default implementation simply returns `propertyKeys`. -/// -/// Returns a subset of propertyKeys that should be serialized for a given -/// model. -- (NSSet *)serializablePropertyKeys:(NSSet *)propertyKeys forModel:(id )model; - -/// An optional value transformer that should be used for properties of the given -/// class. -/// -/// A value transformer returned by the model's +JSONTransformerForKey: method -/// is given precedence over the one returned by this method. -/// -/// The default implementation invokes `+ JSONTransformer` on the -/// receiver if it's implemented. It supports NSURL conversion through -/// +NSURLJSONTransformer. -/// -/// modelClass - The class of the property to serialize. This property must not be -/// nil. -/// -/// Returns a value transformer or nil if no transformation should be used. -+ (NSValueTransformer *)transformerForModelPropertiesOfClass:(Class)modelClass; - -/// A value transformer that should be used for a properties of the given -/// primitive type. -/// -/// If `objCType` matches @encode(id), the value transformer returned by -/// +transformerForModelPropertiesOfClass: is used instead. -/// -/// The default implementation transforms properties that match @encode(BOOL) -/// using the MTLBooleanValueTransformerName transformer. -/// -/// objCType - The type encoding for the value of this property. This is the type -/// as it would be returned by the @encode() directive. -/// -/// Returns a value transformer or nil if no transformation should be used. -+ (NSValueTransformer *)transformerForModelPropertiesOfObjCType:(const char *)objCType; - -@end - -@interface MTLJSONAdapter (ValueTransformers) - -/// Creates a reversible transformer to convert a JSON dictionary into a MTLModel -/// object, and vice-versa. -/// -/// modelClass - The MTLModel subclass to attempt to parse from the JSON. This -/// class must conform to . This argument must -/// not be nil. -/// -/// Returns a reversible transformer which uses the class of the receiver for -/// transforming values back and forth. -+ (NSValueTransformer *)dictionaryTransformerWithModelClass:(Class)modelClass; - -/// Creates a reversible transformer to convert an array of JSON dictionaries -/// into an array of MTLModel objects, and vice-versa. -/// -/// modelClass - The MTLModel subclass to attempt to parse from each JSON -/// dictionary. This class must conform to . -/// This argument must not be nil. -/// -/// Returns a reversible transformer which uses the class of the receiver for -/// transforming array elements back and forth. -+ (NSValueTransformer *)arrayTransformerWithModelClass:(Class)modelClass; - -/// This value transformer is used by MTLJSONAdapter to automatically convert -/// NSURL properties to JSON strings and vice versa. -+ (NSValueTransformer *)NSURLJSONTransformer; - -@end - -@class MTLModel; - -@interface MTLJSONAdapter (Deprecated) - -@property (nonatomic, strong, readonly) id model __attribute__((unavailable("Replaced by -modelFromJSONDictionary:error:"))); - -+ (NSArray *)JSONArrayFromModels:(NSArray *)models __attribute__((deprecated("Replaced by +JSONArrayFromModels:error:"))); - -+ (NSDictionary *)JSONDictionaryFromModel:(MTLModel *)model __attribute__((deprecated("Replaced by +JSONDictionaryFromModel:error:"))); - -- (NSDictionary *)JSONDictionary __attribute__((unavailable("Replaced by -JSONDictionaryFromModel:error:"))); -- (NSString *)JSONKeyPathForPropertyKey:(NSString *)key __attribute__((unavailable("Replaced by -serializablePropertyKeys:forModel:"))); -- (id)initWithJSONDictionary:(NSDictionary *)JSONDictionary modelClass:(Class)modelClass error:(NSError **)error __attribute__((unavailable("Replaced by -initWithModelClass:"))); -- (id)initWithModel:(id )model __attribute__((unavailable("Replaced by -initWithModelClass:"))); -- (NSDictionary *)serializeToJSONDictionary:(NSError **)error __attribute__((unavailable("Replaced by -JSONDictionaryFromModel:error:"))); - -@end diff --git a/Pods/Mantle/Mantle/MTLJSONAdapter.m b/Pods/Mantle/Mantle/MTLJSONAdapter.m deleted file mode 100644 index 298aee4..0000000 --- a/Pods/Mantle/Mantle/MTLJSONAdapter.m +++ /dev/null @@ -1,662 +0,0 @@ -// -// MTLJSONAdapter.m -// Mantle -// -// Created by Justin Spahr-Summers on 2013-02-12. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import - -#import "NSDictionary+MTLJSONKeyPath.h" - -#import -#import -#import "MTLJSONAdapter.h" -#import "MTLModel.h" -#import "MTLTransformerErrorHandling.h" -#import "MTLReflection.h" -#import "NSValueTransformer+MTLPredefinedTransformerAdditions.h" -#import "MTLValueTransformer.h" - -NSString * const MTLJSONAdapterErrorDomain = @"MTLJSONAdapterErrorDomain"; -const NSInteger MTLJSONAdapterErrorNoClassFound = 2; -const NSInteger MTLJSONAdapterErrorInvalidJSONDictionary = 3; -const NSInteger MTLJSONAdapterErrorInvalidJSONMapping = 4; - -// An exception was thrown and caught. -const NSInteger MTLJSONAdapterErrorExceptionThrown = 1; - -// Associated with the NSException that was caught. -static NSString * const MTLJSONAdapterThrownExceptionErrorKey = @"MTLJSONAdapterThrownException"; - -@interface MTLJSONAdapter () - -// The MTLModel subclass being parsed, or the class of `model` if parsing has -// completed. -@property (nonatomic, strong, readonly) Class modelClass; - -// A cached copy of the return value of +JSONKeyPathsByPropertyKey. -@property (nonatomic, copy, readonly) NSDictionary *JSONKeyPathsByPropertyKey; - -// A cached copy of the return value of -valueTransformersForModelClass: -@property (nonatomic, copy, readonly) NSDictionary *valueTransformersByPropertyKey; - -// Used to cache the JSON adapters returned by -JSONAdapterForModelClass:error:. -@property (nonatomic, strong, readonly) NSMapTable *JSONAdaptersByModelClass; - -// If +classForParsingJSONDictionary: returns a model class different from the -// one this adapter was initialized with, use this method to obtain a cached -// instance of a suitable adapter instead. -// -// modelClass - The class from which to parse the JSON. This class must conform -// to . This argument must not be nil. -// error - If not NULL, this may be set to an error that occurs during -// initializing the adapter. -// -// Returns a JSON adapter for modelClass, creating one of necessary. If no -// adapter could be created, nil is returned. -- (MTLJSONAdapter *)JSONAdapterForModelClass:(Class)modelClass error:(NSError **)error; - -// Collect all value transformers needed for a given class. -// -// modelClass - The class from which to parse the JSON. This class must conform -// to . This argument must not be nil. -// -// Returns a dictionary with the properties of modelClass that need -// transformation as keys and the value transformers as values. -+ (NSDictionary *)valueTransformersForModelClass:(Class)modelClass; - -@end - -@implementation MTLJSONAdapter - -#pragma mark Convenience methods - -+ (id)modelOfClass:(Class)modelClass fromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)error { - MTLJSONAdapter *adapter = [[self alloc] initWithModelClass:modelClass]; - - return [adapter modelFromJSONDictionary:JSONDictionary error:error]; -} - -+ (NSArray *)modelsOfClass:(Class)modelClass fromJSONArray:(NSArray *)JSONArray error:(NSError **)error { - if (JSONArray == nil || ![JSONArray isKindOfClass:NSArray.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Missing JSON array", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"%@ could not be created because an invalid JSON array was provided: %@", @""), NSStringFromClass(modelClass), JSONArray.class], - }; - *error = [NSError errorWithDomain:MTLJSONAdapterErrorDomain code:MTLJSONAdapterErrorInvalidJSONDictionary userInfo:userInfo]; - } - return nil; - } - - NSMutableArray *models = [NSMutableArray arrayWithCapacity:JSONArray.count]; - for (NSDictionary *JSONDictionary in JSONArray){ - MTLModel *model = [self modelOfClass:modelClass fromJSONDictionary:JSONDictionary error:error]; - - if (model == nil) return nil; - - [models addObject:model]; - } - - return models; -} - -+ (NSDictionary *)JSONDictionaryFromModel:(id )model error:(NSError **)error { - MTLJSONAdapter *adapter = [[self alloc] initWithModelClass:model.class]; - - return [adapter JSONDictionaryFromModel:model error:error]; -} - -+ (NSArray *)JSONArrayFromModels:(NSArray *)models error:(NSError **)error { - NSParameterAssert(models != nil); - NSParameterAssert([models isKindOfClass:NSArray.class]); - - NSMutableArray *JSONArray = [NSMutableArray arrayWithCapacity:models.count]; - for (MTLModel *model in models) { - NSDictionary *JSONDictionary = [self JSONDictionaryFromModel:model error:error]; - if (JSONDictionary == nil) return nil; - - [JSONArray addObject:JSONDictionary]; - } - - return JSONArray; -} - -#pragma mark Lifecycle - -- (id)init { - NSAssert(NO, @"%@ must be initialized with a model class", self.class); - return nil; -} - -- (id)initWithModelClass:(Class)modelClass { - NSParameterAssert(modelClass != nil); - NSParameterAssert([modelClass conformsToProtocol:@protocol(MTLJSONSerializing)]); - - self = [super init]; - if (self == nil) return nil; - - _modelClass = modelClass; - - _JSONKeyPathsByPropertyKey = [modelClass JSONKeyPathsByPropertyKey]; - - NSSet *propertyKeys = [self.modelClass propertyKeys]; - - for (NSString *mappedPropertyKey in _JSONKeyPathsByPropertyKey) { - if (![propertyKeys containsObject:mappedPropertyKey]) { - NSAssert(NO, @"%@ is not a property of %@.", mappedPropertyKey, modelClass); - return nil; - } - - id value = _JSONKeyPathsByPropertyKey[mappedPropertyKey]; - - if ([value isKindOfClass:NSArray.class]) { - for (NSString *keyPath in value) { - if ([keyPath isKindOfClass:NSString.class]) continue; - - NSAssert(NO, @"%@ must either map to a JSON key path or a JSON array of key paths, got: %@.", mappedPropertyKey, value); - return nil; - } - } else if (![value isKindOfClass:NSString.class]) { - NSAssert(NO, @"%@ must either map to a JSON key path or a JSON array of key paths, got: %@.",mappedPropertyKey, value); - return nil; - } - } - - _valueTransformersByPropertyKey = [self.class valueTransformersForModelClass:modelClass]; - - _JSONAdaptersByModelClass = [NSMapTable strongToStrongObjectsMapTable]; - - return self; -} - -#pragma mark Serialization - -- (NSDictionary *)JSONDictionaryFromModel:(id )model error:(NSError **)error { - NSParameterAssert(model != nil); - NSParameterAssert([model isKindOfClass:self.modelClass]); - - if (self.modelClass != model.class) { - MTLJSONAdapter *otherAdapter = [self JSONAdapterForModelClass:model.class error:error]; - - return [otherAdapter JSONDictionaryFromModel:model error:error]; - } - - NSSet *propertyKeysToSerialize = [self serializablePropertyKeys:[NSSet setWithArray:self.JSONKeyPathsByPropertyKey.allKeys] forModel:model]; - - NSDictionary *dictionaryValue = [model.dictionaryValue dictionaryWithValuesForKeys:propertyKeysToSerialize.allObjects]; - NSMutableDictionary *JSONDictionary = [[NSMutableDictionary alloc] initWithCapacity:dictionaryValue.count]; - - __block BOOL success = YES; - __block NSError *tmpError = nil; - - [dictionaryValue enumerateKeysAndObjectsUsingBlock:^(NSString *propertyKey, id value, BOOL *stop) { - id JSONKeyPaths = self.JSONKeyPathsByPropertyKey[propertyKey]; - - if (JSONKeyPaths == nil) return; - - NSValueTransformer *transformer = self.valueTransformersByPropertyKey[propertyKey]; - if ([transformer.class allowsReverseTransformation]) { - // Map NSNull -> nil for the transformer, and then back for the - // dictionaryValue we're going to insert into. - if ([value isEqual:NSNull.null]) value = nil; - - if ([transformer respondsToSelector:@selector(reverseTransformedValue:success:error:)]) { - id errorHandlingTransformer = (id)transformer; - - value = [errorHandlingTransformer reverseTransformedValue:value success:&success error:&tmpError]; - - if (!success) { - *stop = YES; - return; - } - } else { - value = [transformer reverseTransformedValue:value] ?: NSNull.null; - } - } - - void (^createComponents)(id, NSString *) = ^(id obj, NSString *keyPath) { - NSArray *keyPathComponents = [keyPath componentsSeparatedByString:@"."]; - - // Set up dictionaries at each step of the key path. - for (NSString *component in keyPathComponents) { - if ([obj valueForKey:component] == nil) { - // Insert an empty mutable dictionary at this spot so that we - // can set the whole key path afterward. - [obj setValue:[NSMutableDictionary dictionary] forKey:component]; - } - - obj = [obj valueForKey:component]; - } - }; - - if ([JSONKeyPaths isKindOfClass:NSString.class]) { - createComponents(JSONDictionary, JSONKeyPaths); - - [JSONDictionary setValue:value forKeyPath:JSONKeyPaths]; - } - - if ([JSONKeyPaths isKindOfClass:NSArray.class]) { - for (NSString *JSONKeyPath in JSONKeyPaths) { - createComponents(JSONDictionary, JSONKeyPath); - - [JSONDictionary setValue:value[JSONKeyPath] forKeyPath:JSONKeyPath]; - } - } - }]; - - if (success) { - return JSONDictionary; - } else { - if (error != NULL) *error = tmpError; - - return nil; - } -} - -- (id)modelFromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)error { - if ([self.modelClass respondsToSelector:@selector(classForParsingJSONDictionary:)]) { - Class class = [self.modelClass classForParsingJSONDictionary:JSONDictionary]; - if (class == nil) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not parse JSON", @""), - NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"No model class could be found to parse the JSON dictionary.", @"") - }; - - *error = [NSError errorWithDomain:MTLJSONAdapterErrorDomain code:MTLJSONAdapterErrorNoClassFound userInfo:userInfo]; - } - - return nil; - } - - if (class != self.modelClass) { - NSAssert([class conformsToProtocol:@protocol(MTLJSONSerializing)], @"Class %@ returned from +classForParsingJSONDictionary: does not conform to ", class); - - MTLJSONAdapter *otherAdapter = [self JSONAdapterForModelClass:class error:error]; - - return [otherAdapter modelFromJSONDictionary:JSONDictionary error:error]; - } - } - - NSMutableDictionary *dictionaryValue = [[NSMutableDictionary alloc] initWithCapacity:JSONDictionary.count]; - - for (NSString *propertyKey in [self.modelClass propertyKeys]) { - id JSONKeyPaths = self.JSONKeyPathsByPropertyKey[propertyKey]; - - if (JSONKeyPaths == nil) continue; - - id value; - - if ([JSONKeyPaths isKindOfClass:NSArray.class]) { - NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; - - for (NSString *keyPath in JSONKeyPaths) { - BOOL success = NO; - id value = [JSONDictionary mtl_valueForJSONKeyPath:keyPath success:&success error:error]; - - if (!success) return nil; - - if (value != nil) dictionary[keyPath] = value; - } - - value = dictionary; - } else { - BOOL success = NO; - value = [JSONDictionary mtl_valueForJSONKeyPath:JSONKeyPaths success:&success error:error]; - - if (!success) return nil; - } - - if (value == nil) continue; - - @try { - NSValueTransformer *transformer = self.valueTransformersByPropertyKey[propertyKey]; - if (transformer != nil) { - // Map NSNull -> nil for the transformer, and then back for the - // dictionary we're going to insert into. - if ([value isEqual:NSNull.null]) value = nil; - - if ([transformer respondsToSelector:@selector(transformedValue:success:error:)]) { - id errorHandlingTransformer = (id)transformer; - - BOOL success = YES; - value = [errorHandlingTransformer transformedValue:value success:&success error:error]; - - if (!success) return nil; - } else { - value = [transformer transformedValue:value]; - } - - if (value == nil) value = NSNull.null; - } - - dictionaryValue[propertyKey] = value; - } @catch (NSException *ex) { - NSLog(@"*** Caught exception %@ parsing JSON key path \"%@\" from: %@", ex, JSONKeyPaths, JSONDictionary); - - // Fail fast in Debug builds. - #if DEBUG - @throw ex; - #else - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: ex.description, - NSLocalizedFailureReasonErrorKey: ex.reason, - MTLJSONAdapterThrownExceptionErrorKey: ex - }; - - *error = [NSError errorWithDomain:MTLJSONAdapterErrorDomain code:MTLJSONAdapterErrorExceptionThrown userInfo:userInfo]; - } - - return nil; - #endif - } - } - - id model = [self.modelClass modelWithDictionary:dictionaryValue error:error]; - - return [model validate:error] ? model : nil; -} - -+ (NSDictionary *)valueTransformersForModelClass:(Class)modelClass { - NSParameterAssert(modelClass != nil); - NSParameterAssert([modelClass conformsToProtocol:@protocol(MTLJSONSerializing)]); - - NSMutableDictionary *result = [NSMutableDictionary dictionary]; - - for (NSString *key in [modelClass propertyKeys]) { - SEL selector = MTLSelectorWithKeyPattern(key, "JSONTransformer"); - if ([modelClass respondsToSelector:selector]) { - IMP imp = [modelClass methodForSelector:selector]; - NSValueTransformer * (*function)(id, SEL) = (__typeof__(function))imp; - NSValueTransformer *transformer = function(modelClass, selector); - - if (transformer != nil) result[key] = transformer; - - continue; - } - - if ([modelClass respondsToSelector:@selector(JSONTransformerForKey:)]) { - NSValueTransformer *transformer = [modelClass JSONTransformerForKey:key]; - - if (transformer != nil) result[key] = transformer; - - continue; - } - - objc_property_t property = class_getProperty(modelClass, key.UTF8String); - - if (property == NULL) continue; - - mtl_propertyAttributes *attributes = mtl_copyPropertyAttributes(property); - @onExit { - free(attributes); - }; - - NSValueTransformer *transformer = nil; - - if (*(attributes->type) == *(@encode(id))) { - Class propertyClass = attributes->objectClass; - - if (propertyClass != nil) { - transformer = [self transformerForModelPropertiesOfClass:propertyClass]; - } - - - // For user-defined MTLModel, try parse it with dictionaryTransformer. - if (nil == transformer && [propertyClass conformsToProtocol:@protocol(MTLJSONSerializing)]) { - transformer = [self dictionaryTransformerWithModelClass:propertyClass]; - } - - if (transformer == nil) transformer = [NSValueTransformer mtl_validatingTransformerForClass:propertyClass ?: NSObject.class]; - } else { - transformer = [self transformerForModelPropertiesOfObjCType:attributes->type] ?: [NSValueTransformer mtl_validatingTransformerForClass:NSValue.class]; - } - - if (transformer != nil) result[key] = transformer; - } - - return result; -} - -- (MTLJSONAdapter *)JSONAdapterForModelClass:(Class)modelClass error:(NSError **)error { - NSParameterAssert(modelClass != nil); - NSParameterAssert([modelClass conformsToProtocol:@protocol(MTLJSONSerializing)]); - - @synchronized(self) { - MTLJSONAdapter *result = [self.JSONAdaptersByModelClass objectForKey:modelClass]; - - if (result != nil) return result; - - result = [[self.class alloc] initWithModelClass:modelClass]; - - if (result != nil) { - [self.JSONAdaptersByModelClass setObject:result forKey:modelClass]; - } - - return result; - } -} - -- (NSSet *)serializablePropertyKeys:(NSSet *)propertyKeys forModel:(id )model { - return propertyKeys; -} - -+ (NSValueTransformer *)transformerForModelPropertiesOfClass:(Class)modelClass { - NSParameterAssert(modelClass != nil); - - SEL selector = MTLSelectorWithKeyPattern(NSStringFromClass(modelClass), "JSONTransformer"); - if (![self respondsToSelector:selector]) return nil; - - IMP imp = [self methodForSelector:selector]; - NSValueTransformer * (*function)(id, SEL) = (__typeof__(function))imp; - NSValueTransformer *result = function(self, selector); - - return result; -} - -+ (NSValueTransformer *)transformerForModelPropertiesOfObjCType:(const char *)objCType { - NSParameterAssert(objCType != NULL); - - if (strcmp(objCType, @encode(BOOL)) == 0) { - return [NSValueTransformer valueTransformerForName:MTLBooleanValueTransformerName]; - } - - return nil; -} - -@end - -@implementation MTLJSONAdapter (ValueTransformers) - -+ (NSValueTransformer *)dictionaryTransformerWithModelClass:(Class)modelClass { - NSParameterAssert([modelClass isSubclassOfClass:MTLModel.class]); - NSParameterAssert([modelClass conformsToProtocol:@protocol(MTLJSONSerializing)]); - __block MTLJSONAdapter *adapter; - - return [MTLValueTransformer - transformerUsingForwardBlock:^ id (id JSONDictionary, BOOL *success, NSError **error) { - if (JSONDictionary == nil) return nil; - - if (![JSONDictionary isKindOfClass:NSDictionary.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert JSON dictionary to model object", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected an NSDictionary, got: %@", @""), JSONDictionary], - MTLTransformerErrorHandlingInputValueErrorKey : JSONDictionary - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - if (!adapter) { - adapter = [[self alloc] initWithModelClass:modelClass]; - } - id model = [adapter modelFromJSONDictionary:JSONDictionary error:error]; - if (model == nil) { - *success = NO; - } - - return model; - } - reverseBlock:^ NSDictionary * (id model, BOOL *success, NSError **error) { - if (model == nil) return nil; - - if (![model isKindOfClass:MTLModel.class] || ![model conformsToProtocol:@protocol(MTLJSONSerializing)]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert model object to JSON dictionary", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected a MTLModel object conforming to , got: %@.", @""), model], - MTLTransformerErrorHandlingInputValueErrorKey : model - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - if (!adapter) { - adapter = [[self alloc] initWithModelClass:modelClass]; - } - NSDictionary *result = [adapter JSONDictionaryFromModel:model error:error]; - if (result == nil) { - *success = NO; - } - - return result; - }]; -} - -+ (NSValueTransformer *)arrayTransformerWithModelClass:(Class)modelClass { - id dictionaryTransformer = [self dictionaryTransformerWithModelClass:modelClass]; - - return [MTLValueTransformer - transformerUsingForwardBlock:^ id (NSArray *dictionaries, BOOL *success, NSError **error) { - if (dictionaries == nil) return nil; - - if (![dictionaries isKindOfClass:NSArray.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert JSON array to model array", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected an NSArray, got: %@.", @""), dictionaries], - MTLTransformerErrorHandlingInputValueErrorKey : dictionaries - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - NSMutableArray *models = [NSMutableArray arrayWithCapacity:dictionaries.count]; - for (id JSONDictionary in dictionaries) { - if (JSONDictionary == NSNull.null) { - [models addObject:NSNull.null]; - continue; - } - - if (![JSONDictionary isKindOfClass:NSDictionary.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert JSON array to model array", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected an NSDictionary or an NSNull, got: %@.", @""), JSONDictionary], - MTLTransformerErrorHandlingInputValueErrorKey : JSONDictionary - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - id model = [dictionaryTransformer transformedValue:JSONDictionary success:success error:error]; - - if (*success == NO) return nil; - - if (model == nil) continue; - - [models addObject:model]; - } - - return models; - } - reverseBlock:^ id (NSArray *models, BOOL *success, NSError **error) { - if (models == nil) return nil; - - if (![models isKindOfClass:NSArray.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert model array to JSON array", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected an NSArray, got: %@.", @""), models], - MTLTransformerErrorHandlingInputValueErrorKey : models - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - NSMutableArray *dictionaries = [NSMutableArray arrayWithCapacity:models.count]; - for (id model in models) { - if (model == NSNull.null) { - [dictionaries addObject:NSNull.null]; - continue; - } - - if (![model isKindOfClass:MTLModel.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert JSON array to model array", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected a MTLModel or an NSNull, got: %@.", @""), model], - MTLTransformerErrorHandlingInputValueErrorKey : model - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - NSDictionary *dict = [dictionaryTransformer reverseTransformedValue:model success:success error:error]; - - if (*success == NO) return nil; - - if (dict == nil) continue; - - [dictionaries addObject:dict]; - } - - return dictionaries; - }]; -} - -+ (NSValueTransformer *)NSURLJSONTransformer { - return [NSValueTransformer valueTransformerForName:MTLURLValueTransformerName]; -} - -@end - -@implementation MTLJSONAdapter (Deprecated) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-implementations" - -+ (NSArray *)JSONArrayFromModels:(NSArray *)models { - return [self JSONArrayFromModels:models error:NULL]; -} - -+ (NSDictionary *)JSONDictionaryFromModel:(MTLModel *)model { - return [self JSONDictionaryFromModel:model error:NULL]; -} - -#pragma clang diagnostic pop - -@end diff --git a/Pods/Mantle/Mantle/MTLModel+NSCoding.h b/Pods/Mantle/Mantle/MTLModel+NSCoding.h deleted file mode 100644 index 86e140a..0000000 --- a/Pods/Mantle/Mantle/MTLModel+NSCoding.h +++ /dev/null @@ -1,128 +0,0 @@ -// -// MTLModel+NSCoding.h -// Mantle -// -// Created by Justin Spahr-Summers on 2013-02-12. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import "MTLModel.h" - -/// Defines how a MTLModel property key should be encoded into an archive. -/// -/// MTLModelEncodingBehaviorExcluded - The property should never be encoded. -/// MTLModelEncodingBehaviorUnconditional - The property should always be -/// encoded. -/// MTLModelEncodingBehaviorConditional - The object should be encoded only -/// if unconditionally encoded elsewhere. -/// This should only be used for object -/// properties. -typedef enum : NSUInteger { - MTLModelEncodingBehaviorExcluded = 0, - MTLModelEncodingBehaviorUnconditional, - MTLModelEncodingBehaviorConditional, -} MTLModelEncodingBehavior; - -/// Implements default archiving and unarchiving behaviors for MTLModel. -@interface MTLModel (NSCoding) - -/// Initializes the receiver from an archive. -/// -/// This will decode the original +modelVersion of the archived object, then -/// invoke -decodeValueForKey:withCoder:modelVersion: for each of the receiver's -/// +propertyKeys. -/// -/// Returns an initialized model object, or nil if a decoding error occurred. -- (id)initWithCoder:(NSCoder *)coder; - -/// Archives the receiver using the given coder. -/// -/// This will encode the receiver's +modelVersion, then the receiver's properties -/// according to the behaviors specified in +encodingBehaviorsByPropertyKey. -- (void)encodeWithCoder:(NSCoder *)coder; - -/// Determines how the +propertyKeys of the class are encoded into an archive. -/// The values of this dictionary should be boxed MTLModelEncodingBehavior -/// values. -/// -/// Any keys not present in the dictionary will be excluded from the archive. -/// -/// Subclasses overriding this method should combine their values with those of -/// `super`. -/// -/// Returns a dictionary mapping the receiver's +propertyKeys to default encoding -/// behaviors. If a property is an object with `weak` semantics, the default -/// behavior is MTLModelEncodingBehaviorConditional; otherwise, the default is -/// MTLModelEncodingBehaviorUnconditional. -+ (NSDictionary *)encodingBehaviorsByPropertyKey; - -/// Determines the classes that are allowed to be decoded for each of the -/// receiver's properties when using . The values of this -/// dictionary should be NSArrays of Class objects. -/// -/// If any encodable keys (as determined by +encodingBehaviorsByPropertyKey) are -/// not present in the dictionary, an exception will be thrown during secure -/// encoding or decoding. -/// -/// Subclasses overriding this method should combine their values with those of -/// `super`. -/// -/// Returns a dictionary mapping the receiver's encodable keys (as determined by -/// +encodingBehaviorsByPropertyKey) to default allowed classes, based on the -/// type that each property is declared as. If type of an encodable property -/// cannot be determined (e.g., it is declared as `id`), it will be omitted from -/// the dictionary, and subclasses must provide a valid value to prevent an -/// exception being thrown during encoding/decoding. -+ (NSDictionary *)allowedSecureCodingClassesByPropertyKey; - -/// Decodes the value of the given property key from an archive. -/// -/// By default, this method looks for a `-decode WithCoder:modelVersion:` -/// method on the receiver, and invokes it if found. -/// -/// If the custom method is not implemented and `coder` does not require secure -/// coding, `-[NSCoder decodeObjectForKey:]` will be invoked with the given -/// `key`. -/// -/// If the custom method is not implemented and `coder` requires secure coding, -/// `-[NSCoder decodeObjectOfClasses:forKey:]` will be invoked with the -/// information from +allowedSecureCodingClassesByPropertyKey and the given `key`. The -/// receiver must conform to for this to work correctly. -/// -/// key - The property key to decode the value for. This argument cannot -/// be nil. -/// coder - The NSCoder representing the archive being decoded. This -/// argument cannot be nil. -/// modelVersion - The version of the original model object that was encoded. -/// -/// Returns the decoded and boxed value, or nil if the key was not present. -- (id)decodeValueForKey:(NSString *)key withCoder:(NSCoder *)coder modelVersion:(NSUInteger)modelVersion; - -/// The version of this MTLModel subclass. -/// -/// This version number is saved in archives so that later model changes can be -/// made backwards-compatible with old versions. -/// -/// Subclasses should override this method to return a higher version number -/// whenever a breaking change is made to the model. -/// -/// Returns 0. -+ (NSUInteger)modelVersion; - -@end - -/// This method must be overridden to support archives created by older versions -/// of Mantle (before the `MTLModel+NSCoding` interface existed). -@interface MTLModel (OldArchiveSupport) - -/// Converts an archived external representation to a dictionary suitable for -/// passing to -initWithDictionary:. -/// -/// externalRepresentation - The decoded external representation of the receiver. -/// fromVersion - The model version at the time the external -/// representation was encoded. -/// -/// Returns nil by default, indicating that conversion failed. -+ (NSDictionary *)dictionaryValueFromArchivedExternalRepresentation:(NSDictionary *)externalRepresentation version:(NSUInteger)fromVersion; - -@end diff --git a/Pods/Mantle/Mantle/MTLModel+NSCoding.m b/Pods/Mantle/Mantle/MTLModel+NSCoding.m deleted file mode 100644 index 69a8b6f..0000000 --- a/Pods/Mantle/Mantle/MTLModel+NSCoding.m +++ /dev/null @@ -1,261 +0,0 @@ -// -// MTLModel+NSCoding.m -// Mantle -// -// Created by Justin Spahr-Summers on 2013-02-12. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import "MTLModel+NSCoding.h" -#import -#import -#import "MTLReflection.h" - -// Used in archives to store the modelVersion of the archived instance. -static NSString * const MTLModelVersionKey = @"MTLModelVersion"; - -// Used to cache the reflection performed in +allowedSecureCodingClassesByPropertyKey. -static void *MTLModelCachedAllowedClassesKey = &MTLModelCachedAllowedClassesKey; - -// Returns whether the given NSCoder requires secure coding. -static BOOL coderRequiresSecureCoding(NSCoder *coder) { - SEL requiresSecureCodingSelector = @selector(requiresSecureCoding); - - // Only invoke the method if it's implemented (i.e., only on OS X 10.8+ and - // iOS 6+). - if (![coder respondsToSelector:requiresSecureCodingSelector]) return NO; - - BOOL (*requiresSecureCodingIMP)(NSCoder *, SEL) = (__typeof__(requiresSecureCodingIMP))[coder methodForSelector:requiresSecureCodingSelector]; - if (requiresSecureCodingIMP == NULL) return NO; - - return requiresSecureCodingIMP(coder, requiresSecureCodingSelector); -} - -// Returns all of the given class' encodable property keys (those that will not -// be excluded from archives). -static NSSet *encodablePropertyKeysForClass(Class modelClass) { - return [[modelClass encodingBehaviorsByPropertyKey] keysOfEntriesPassingTest:^ BOOL (NSString *propertyKey, NSNumber *behavior, BOOL *stop) { - return behavior.unsignedIntegerValue != MTLModelEncodingBehaviorExcluded; - }]; -} - -// Verifies that all of the specified class' encodable property keys are present -// in +allowedSecureCodingClassesByPropertyKey, and throws an exception if not. -static void verifyAllowedClassesByPropertyKey(Class modelClass) { - NSDictionary *allowedClasses = [modelClass allowedSecureCodingClassesByPropertyKey]; - - NSMutableSet *specifiedPropertyKeys = [[NSMutableSet alloc] initWithArray:allowedClasses.allKeys]; - [specifiedPropertyKeys minusSet:encodablePropertyKeysForClass(modelClass)]; - - if (specifiedPropertyKeys.count > 0) { - [NSException raise:NSInvalidArgumentException format:@"Cannot encode %@ securely, because keys are missing from +allowedSecureCodingClassesByPropertyKey: %@", modelClass, specifiedPropertyKeys]; - } -} - -@implementation MTLModel (NSCoding) - -#pragma mark Versioning - -+ (NSUInteger)modelVersion { - return 0; -} - -#pragma mark Encoding Behaviors - -+ (NSDictionary *)encodingBehaviorsByPropertyKey { - NSSet *propertyKeys = self.propertyKeys; - NSMutableDictionary *behaviors = [[NSMutableDictionary alloc] initWithCapacity:propertyKeys.count]; - - for (NSString *key in propertyKeys) { - objc_property_t property = class_getProperty(self, key.UTF8String); - NSAssert(property != NULL, @"Could not find property \"%@\" on %@", key, self); - - mtl_propertyAttributes *attributes = mtl_copyPropertyAttributes(property); - @onExit { - free(attributes); - }; - - MTLModelEncodingBehavior behavior = (attributes->weak ? MTLModelEncodingBehaviorConditional : MTLModelEncodingBehaviorUnconditional); - behaviors[key] = @(behavior); - } - - return behaviors; -} - -+ (NSDictionary *)allowedSecureCodingClassesByPropertyKey { - NSDictionary *cachedClasses = objc_getAssociatedObject(self, MTLModelCachedAllowedClassesKey); - if (cachedClasses != nil) return cachedClasses; - - // Get all property keys that could potentially be encoded. - NSSet *propertyKeys = [self.encodingBehaviorsByPropertyKey keysOfEntriesPassingTest:^ BOOL (NSString *propertyKey, NSNumber *behavior, BOOL *stop) { - return behavior.unsignedIntegerValue != MTLModelEncodingBehaviorExcluded; - }]; - - NSMutableDictionary *allowedClasses = [[NSMutableDictionary alloc] initWithCapacity:propertyKeys.count]; - - for (NSString *key in propertyKeys) { - objc_property_t property = class_getProperty(self, key.UTF8String); - NSAssert(property != NULL, @"Could not find property \"%@\" on %@", key, self); - - mtl_propertyAttributes *attributes = mtl_copyPropertyAttributes(property); - @onExit { - free(attributes); - }; - - // If the property is not of object or class type, assume that it's - // a primitive which would be boxed into an NSValue. - if (attributes->type[0] != '@' && attributes->type[0] != '#') { - allowedClasses[key] = @[ NSValue.class ]; - continue; - } - - // Omit this property from the dictionary if its class isn't known. - if (attributes->objectClass != nil) { - allowedClasses[key] = @[ attributes->objectClass ]; - } - } - - // It doesn't really matter if we replace another thread's work, since we do - // it atomically and the result should be the same. - objc_setAssociatedObject(self, MTLModelCachedAllowedClassesKey, allowedClasses, OBJC_ASSOCIATION_COPY); - - return allowedClasses; -} - -- (id)decodeValueForKey:(NSString *)key withCoder:(NSCoder *)coder modelVersion:(NSUInteger)modelVersion { - NSParameterAssert(key != nil); - NSParameterAssert(coder != nil); - - SEL selector = MTLSelectorWithCapitalizedKeyPattern("decode", key, "WithCoder:modelVersion:"); - if ([self respondsToSelector:selector]) { - IMP imp = [self methodForSelector:selector]; - id (*function)(id, SEL, NSCoder *, NSUInteger) = (__typeof__(function))imp; - id result = function(self, selector, coder, modelVersion); - - return result; - } - - @try { - if (coderRequiresSecureCoding(coder)) { - NSArray *allowedClasses = self.class.allowedSecureCodingClassesByPropertyKey[key]; - NSAssert(allowedClasses != nil, @"No allowed classes specified for securely decoding key \"%@\" on %@", key, self.class); - - return [coder decodeObjectOfClasses:[NSSet setWithArray:allowedClasses] forKey:key]; - } else { - return [coder decodeObjectForKey:key]; - } - } @catch (NSException *ex) { - NSLog(@"*** Caught exception decoding value for key \"%@\" on class %@: %@", key, self.class, ex); - @throw ex; - } -} - -#pragma mark NSCoding - -- (instancetype)initWithCoder:(NSCoder *)coder { - BOOL requiresSecureCoding = coderRequiresSecureCoding(coder); - NSNumber *version = nil; - if (requiresSecureCoding) { - version = [coder decodeObjectOfClass:NSNumber.class forKey:MTLModelVersionKey]; - } else { - version = [coder decodeObjectForKey:MTLModelVersionKey]; - } - - if (version == nil) { - NSLog(@"Warning: decoding an archive of %@ without a version, assuming 0", self.class); - } else if (version.unsignedIntegerValue > self.class.modelVersion) { - // Don't try to decode newer versions. - return nil; - } - - if (requiresSecureCoding) { - verifyAllowedClassesByPropertyKey(self.class); - } else { - // Handle the old archive format. - NSDictionary *externalRepresentation = [coder decodeObjectForKey:@"externalRepresentation"]; - if (externalRepresentation != nil) { - NSAssert([self.class methodForSelector:@selector(dictionaryValueFromArchivedExternalRepresentation:version:)] != [MTLModel methodForSelector:@selector(dictionaryValueFromArchivedExternalRepresentation:version:)], @"Decoded an old archive of %@ that contains an externalRepresentation, but +dictionaryValueFromArchivedExternalRepresentation:version: is not overridden to handle it", self.class); - - NSDictionary *dictionaryValue = [self.class dictionaryValueFromArchivedExternalRepresentation:externalRepresentation version:version.unsignedIntegerValue]; - if (dictionaryValue == nil) return nil; - - NSError *error = nil; - self = [self initWithDictionary:dictionaryValue error:&error]; - if (self == nil) NSLog(@"*** Could not decode old %@ archive: %@", self.class, error); - - return self; - } - } - - NSSet *propertyKeys = self.class.propertyKeys; - NSMutableDictionary *dictionaryValue = [[NSMutableDictionary alloc] initWithCapacity:propertyKeys.count]; - - for (NSString *key in propertyKeys) { - id value = [self decodeValueForKey:key withCoder:coder modelVersion:version.unsignedIntegerValue]; - if (value == nil) continue; - - dictionaryValue[key] = value; - } - - NSError *error = nil; - self = [self initWithDictionary:dictionaryValue error:&error]; - if (self == nil) NSLog(@"*** Could not unarchive %@: %@", self.class, error); - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)coder { - if (coderRequiresSecureCoding(coder)) verifyAllowedClassesByPropertyKey(self.class); - - [coder encodeObject:@(self.class.modelVersion) forKey:MTLModelVersionKey]; - - NSDictionary *encodingBehaviors = self.class.encodingBehaviorsByPropertyKey; - [self.dictionaryValue enumerateKeysAndObjectsUsingBlock:^(NSString *key, id value, BOOL *stop) { - @try { - // Skip nil values. - if ([value isEqual:NSNull.null]) return; - - switch ([encodingBehaviors[key] unsignedIntegerValue]) { - // This will also match a nil behavior. - case MTLModelEncodingBehaviorExcluded: - break; - - case MTLModelEncodingBehaviorUnconditional: - [coder encodeObject:value forKey:key]; - break; - - case MTLModelEncodingBehaviorConditional: - [coder encodeConditionalObject:value forKey:key]; - break; - - default: - NSAssert(NO, @"Unrecognized encoding behavior %@ on class %@ for key \"%@\"", self.class, encodingBehaviors[key], key); - } - } @catch (NSException *ex) { - NSLog(@"*** Caught exception encoding value for key \"%@\" on class %@: %@", key, self.class, ex); - @throw ex; - } - }]; -} - -#pragma mark NSSecureCoding - -+ (BOOL)supportsSecureCoding { - // Disable secure coding support by default, so subclasses are forced to - // opt-in by conforming to the protocol and overriding this method. - // - // We only implement this method because XPC complains if a subclass tries - // to implement it but does not override -initWithCoder:. See - // https://github.com/github/Mantle/issues/74. - return NO; -} - -@end - -@implementation MTLModel (OldArchiveSupport) - -+ (NSDictionary *)dictionaryValueFromArchivedExternalRepresentation:(NSDictionary *)externalRepresentation version:(NSUInteger)fromVersion { - return nil; -} - -@end diff --git a/Pods/Mantle/Mantle/MTLModel.h b/Pods/Mantle/Mantle/MTLModel.h deleted file mode 100644 index 96042b4..0000000 --- a/Pods/Mantle/Mantle/MTLModel.h +++ /dev/null @@ -1,179 +0,0 @@ -// -// MTLModel.h -// Mantle -// -// Created by Justin Spahr-Summers on 2012-09-11. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import - -/// Defines a property's storage behavior, which affects how it will be copied, -/// compared, and persisted. -/// -/// MTLPropertyStorageNone - This property is not included in -description, -/// -hash, or anything else. -/// MTLPropertyStorageTransitory - This property is included in one-off -/// operations like -copy and -dictionaryValue but -/// does not affect -isEqual: or -hash. -/// It may disappear at any time. -/// MTLPropertyStoragePermanent - The property is included in serialization -/// (like `NSCoding`) and equality, since it can -/// be expected to stick around. -typedef enum : NSUInteger { - MTLPropertyStorageNone, - MTLPropertyStorageTransitory, - MTLPropertyStoragePermanent, -} MTLPropertyStorage; - -/// This protocol defines the minimal interface that classes need to implement to -/// interact with Mantle adapters. -/// -/// It is intended for scenarios where inheriting from MTLModel is not feasible. -/// However, clients are encouraged to subclass the MTLModel class if they can. -/// -/// Clients that wish to implement their own adapters should target classes -/// conforming to this protocol rather than subclasses of MTLModel to ensure -/// maximum compatibility. -@protocol MTLModel - -/// Initializes a new instance of the receiver using key-value coding, setting -/// the keys and values in the given dictionary. -/// -/// dictionaryValue - Property keys and values to set on the instance. Any NSNull -/// values will be converted to nil before being used. KVC -/// validation methods will automatically be invoked for all of -/// the properties given. -/// error - If not NULL, this may be set to any error that occurs -/// (like a KVC validation error). -/// -/// Returns an initialized model object, or nil if validation failed. -+ (instancetype)modelWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error; - -/// A dictionary representing the properties of the receiver. -/// -/// Combines the values corresponding to all +propertyKeys into a dictionary, -/// with any nil values represented by NSNull. -/// -/// This property must never be nil. -@property (nonatomic, copy, readonly) NSDictionary *dictionaryValue; - -/// Initializes the receiver using key-value coding, setting the keys and values -/// in the given dictionary. -/// -/// Subclass implementations may override this method, calling the super -/// implementation, in order to perform further processing and initialization -/// after deserialization. -/// -/// dictionaryValue - Property keys and values to set on the receiver. Any NSNull -/// values will be converted to nil before being used. KVC -/// validation methods will automatically be invoked for all of -/// the properties given. If nil, this method is equivalent to -/// -init. -/// error - If not NULL, this may be set to any error that occurs -/// (like a KVC validation error). -/// -/// Returns an initialized model object, or nil if validation failed. -- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error; - -/// Merges the value of the given key on the receiver with the value of the same -/// key from the given model object, giving precedence to the other model object. -- (void)mergeValueForKey:(NSString *)key fromModel:(id )model; - -/// Returns the keys for all @property declarations, except for `readonly` -/// properties without ivars, or properties on MTLModel itself. -+ (NSSet *)propertyKeys; - -/// Validates the model. -/// -/// error - If not NULL, this may be set to any error that occurs during -/// validation -/// -/// Returns YES if the model is valid, or NO if the validation failed. -- (BOOL)validate:(NSError **)error; - -@end - -/// An abstract base class for model objects, using reflection to provide -/// sensible default behaviors. -/// -/// The default implementations of , -hash, and -isEqual: make use of -/// the +propertyKeys method. -@interface MTLModel : NSObject - -/// Initializes the receiver using key-value coding, setting the keys and values -/// in the given dictionary. -/// -/// dictionaryValue - Property keys and values to set on the receiver. Any NSNull -/// values will be converted to nil before being used. KVC -/// validation methods will automatically be invoked for all of -/// the properties given. If nil, this method is equivalent to -/// -init. -/// error - If not NULL, this may be set to any error that occurs -/// (like a KVC validation error). -/// -/// Returns an initialized model object, or nil if validation failed. -- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error; - -/// Initializes the receiver with default values. -/// -/// This is the designated initializer for this class. -- (instancetype)init; - -/// By default, this method looks for a `-merge FromModel:` method on the -/// receiver, and invokes it if found. If not found, and `model` is not nil, the -/// value for the given key is taken from `model`. -- (void)mergeValueForKey:(NSString *)key fromModel:(id )model; - -/// Merges the values of the given model object into the receiver, using -/// -mergeValueForKey:fromModel: for each key in +propertyKeys. -/// -/// `model` must be an instance of the receiver's class or a subclass thereof. -- (void)mergeValuesForKeysFromModel:(id )model; - -/// The storage behavior of a given key. -/// -/// The default implementation returns MTLPropertyStorageNone for properties that -/// are readonly and not backed by an instance variable and -/// MTLPropertyStoragePermanent otherwise. -/// -/// Subclasses can use this method to prevent MTLModel from resolving circular -/// references by returning MTLPropertyStorageTransitory. -/// -/// Returns the storage behavior for a given key on the receiver. -+ (MTLPropertyStorage)storageBehaviorForPropertyWithKey:(NSString *)propertyKey; - -/// Compares the receiver with another object for equality. -/// -/// The default implementation is equivalent to comparing all properties of both -/// models for which +storageBehaviorForPropertyWithKey: returns -/// MTLPropertyStoragePermanent. -/// -/// Returns YES if the two models are considered equal, NO otherwise. -- (BOOL)isEqual:(id)object; - -/// A string that describes the contents of the receiver. -/// -/// The default implementation is based on the receiver's class and all its -/// properties for which +storageBehaviorForPropertyWithKey: returns -/// MTLPropertyStoragePermanent. -- (NSString *)description; - -@end - -/// Implements validation logic for MTLModel. -@interface MTLModel (Validation) - -/// Validates the model. -/// -/// The default implementation simply invokes -validateValue:forKey:error: with -/// all +propertyKeys and their current value. If -validateValue:forKey:error: -/// returns a new value, the property is set to that new value. -/// -/// error - If not NULL, this may be set to any error that occurs during -/// validation -/// -/// Returns YES if the model is valid, or NO if the validation failed. -- (BOOL)validate:(NSError **)error; - -@end diff --git a/Pods/Mantle/Mantle/MTLModel.m b/Pods/Mantle/Mantle/MTLModel.m deleted file mode 100644 index 4b4c774..0000000 --- a/Pods/Mantle/Mantle/MTLModel.m +++ /dev/null @@ -1,334 +0,0 @@ -// -// MTLModel.m -// Mantle -// -// Created by Justin Spahr-Summers on 2012-09-11. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import "NSError+MTLModelException.h" -#import "MTLModel.h" -#import -#import -#import "MTLReflection.h" -#import - -// Used to cache the reflection performed in +propertyKeys. -static void *MTLModelCachedPropertyKeysKey = &MTLModelCachedPropertyKeysKey; - -// Associated in +generateAndCachePropertyKeys with a set of all transitory -// property keys. -static void *MTLModelCachedTransitoryPropertyKeysKey = &MTLModelCachedTransitoryPropertyKeysKey; - -// Associated in +generateAndCachePropertyKeys with a set of all permanent -// property keys. -static void *MTLModelCachedPermanentPropertyKeysKey = &MTLModelCachedPermanentPropertyKeysKey; - -// Validates a value for an object and sets it if necessary. -// -// obj - The object for which the value is being validated. This value -// must not be nil. -// key - The name of one of `obj`s properties. This value must not be -// nil. -// value - The new value for the property identified by `key`. -// forceUpdate - If set to `YES`, the value is being updated even if validating -// it did not change it. -// error - If not NULL, this may be set to any error that occurs during -// validation -// -// Returns YES if `value` could be validated and set, or NO if an error -// occurred. -static BOOL MTLValidateAndSetValue(id obj, NSString *key, id value, BOOL forceUpdate, NSError **error) { - // Mark this as being autoreleased, because validateValue may return - // a new object to be stored in this variable (and we don't want ARC to - // double-free or leak the old or new values). - __autoreleasing id validatedValue = value; - - @try { - if (![obj validateValue:&validatedValue forKey:key error:error]) return NO; - - if (forceUpdate || value != validatedValue) { - [obj setValue:validatedValue forKey:key]; - } - - return YES; - } @catch (NSException *ex) { - NSLog(@"*** Caught exception setting key \"%@\" : %@", key, ex); - - // Fail fast in Debug builds. - #if DEBUG - @throw ex; - #else - if (error != NULL) { - *error = [NSError mtl_modelErrorWithException:ex]; - } - - return NO; - #endif - } -} - -@interface MTLModel () - -// Inspects all properties of returned by +propertyKeys using -// +storageBehaviorForPropertyWithKey and caches the results. -+ (void)generateAndCacheStorageBehaviors; - -// Returns a set of all property keys for which -// +storageBehaviorForPropertyWithKey returned MTLPropertyStorageTransitory. -+ (NSSet *)transitoryPropertyKeys; - -// Returns a set of all property keys for which -// +storageBehaviorForPropertyWithKey returned MTLPropertyStoragePermanent. -+ (NSSet *)permanentPropertyKeys; - -// Enumerates all properties of the receiver's class hierarchy, starting at the -// receiver, and continuing up until (but not including) MTLModel. -// -// The given block will be invoked multiple times for any properties declared on -// multiple classes in the hierarchy. -+ (void)enumeratePropertiesUsingBlock:(void (^)(objc_property_t property, BOOL *stop))block; - -@end - -@implementation MTLModel - -#pragma mark Lifecycle - -+ (void)generateAndCacheStorageBehaviors { - NSMutableSet *transitoryKeys = [NSMutableSet set]; - NSMutableSet *permanentKeys = [NSMutableSet set]; - - for (NSString *propertyKey in self.propertyKeys) { - switch ([self storageBehaviorForPropertyWithKey:propertyKey]) { - case MTLPropertyStorageNone: - break; - - case MTLPropertyStorageTransitory: - [transitoryKeys addObject:propertyKey]; - break; - - case MTLPropertyStoragePermanent: - [permanentKeys addObject:propertyKey]; - break; - } - } - - // It doesn't really matter if we replace another thread's work, since we do - // it atomically and the result should be the same. - objc_setAssociatedObject(self, MTLModelCachedTransitoryPropertyKeysKey, transitoryKeys, OBJC_ASSOCIATION_COPY); - objc_setAssociatedObject(self, MTLModelCachedPermanentPropertyKeysKey, permanentKeys, OBJC_ASSOCIATION_COPY); -} - -+ (instancetype)modelWithDictionary:(NSDictionary *)dictionary error:(NSError **)error { - return [[self alloc] initWithDictionary:dictionary error:error]; -} - -- (instancetype)init { - // Nothing special by default, but we have a declaration in the header. - return [super init]; -} - -- (instancetype)initWithDictionary:(NSDictionary *)dictionary error:(NSError **)error { - self = [self init]; - if (self == nil) return nil; - - for (NSString *key in dictionary) { - // Mark this as being autoreleased, because validateValue may return - // a new object to be stored in this variable (and we don't want ARC to - // double-free or leak the old or new values). - __autoreleasing id value = [dictionary objectForKey:key]; - - if ([value isEqual:NSNull.null]) value = nil; - - BOOL success = MTLValidateAndSetValue(self, key, value, YES, error); - if (!success) return nil; - } - - return self; -} - -#pragma mark Reflection - -+ (void)enumeratePropertiesUsingBlock:(void (^)(objc_property_t property, BOOL *stop))block { - Class cls = self; - BOOL stop = NO; - - while (!stop && ![cls isEqual:MTLModel.class]) { - unsigned count = 0; - objc_property_t *properties = class_copyPropertyList(cls, &count); - - cls = cls.superclass; - if (properties == NULL) continue; - - @onExit { - free(properties); - }; - - for (unsigned i = 0; i < count; i++) { - block(properties[i], &stop); - if (stop) break; - } - } -} - -+ (NSSet *)propertyKeys { - NSSet *cachedKeys = objc_getAssociatedObject(self, MTLModelCachedPropertyKeysKey); - if (cachedKeys != nil) return cachedKeys; - - NSMutableSet *keys = [NSMutableSet set]; - - [self enumeratePropertiesUsingBlock:^(objc_property_t property, BOOL *stop) { - NSString *key = @(property_getName(property)); - - if ([self storageBehaviorForPropertyWithKey:key] != MTLPropertyStorageNone) { - [keys addObject:key]; - } - }]; - - // It doesn't really matter if we replace another thread's work, since we do - // it atomically and the result should be the same. - objc_setAssociatedObject(self, MTLModelCachedPropertyKeysKey, keys, OBJC_ASSOCIATION_COPY); - - return keys; -} - -+ (NSSet *)transitoryPropertyKeys { - NSSet *transitoryPropertyKeys = objc_getAssociatedObject(self, MTLModelCachedTransitoryPropertyKeysKey); - - if (transitoryPropertyKeys == nil) { - [self generateAndCacheStorageBehaviors]; - transitoryPropertyKeys = objc_getAssociatedObject(self, MTLModelCachedTransitoryPropertyKeysKey); - } - - return transitoryPropertyKeys; -} - -+ (NSSet *)permanentPropertyKeys { - NSSet *permanentPropertyKeys = objc_getAssociatedObject(self, MTLModelCachedPermanentPropertyKeysKey); - - if (permanentPropertyKeys == nil) { - [self generateAndCacheStorageBehaviors]; - permanentPropertyKeys = objc_getAssociatedObject(self, MTLModelCachedPermanentPropertyKeysKey); - } - - return permanentPropertyKeys; -} - -- (NSDictionary *)dictionaryValue { - NSSet *keys = [self.class.transitoryPropertyKeys setByAddingObjectsFromSet:self.class.permanentPropertyKeys]; - - return [self dictionaryWithValuesForKeys:keys.allObjects]; -} - -+ (MTLPropertyStorage)storageBehaviorForPropertyWithKey:(NSString *)propertyKey { - objc_property_t property = class_getProperty(self.class, propertyKey.UTF8String); - - if (property == NULL) return MTLPropertyStorageNone; - - mtl_propertyAttributes *attributes = mtl_copyPropertyAttributes(property); - @onExit { - free(attributes); - }; - - BOOL hasGetter = [self instancesRespondToSelector:attributes->getter]; - BOOL hasSetter = [self instancesRespondToSelector:attributes->setter]; - if (!attributes->dynamic && attributes->ivar == NULL && !hasGetter && !hasSetter) { - return MTLPropertyStorageNone; - } else if (attributes->readonly && attributes->ivar == NULL) { - if ([self isEqual:MTLModel.class]) { - return MTLPropertyStorageNone; - } else { - // Check superclass in case the subclass redeclares a property that - // falls through - return [self.superclass storageBehaviorForPropertyWithKey:propertyKey]; - } - } else { - return MTLPropertyStoragePermanent; - } -} - -#pragma mark Merging - -- (void)mergeValueForKey:(NSString *)key fromModel:(NSObject *)model { - NSParameterAssert(key != nil); - - SEL selector = MTLSelectorWithCapitalizedKeyPattern("merge", key, "FromModel:"); - if (![self respondsToSelector:selector]) { - if (model != nil) { - [self setValue:[model valueForKey:key] forKey:key]; - } - - return; - } - - IMP imp = [self methodForSelector:selector]; - void (*function)(id, SEL, id ) = (__typeof__(function))imp; - function(self, selector, model); -} - -- (void)mergeValuesForKeysFromModel:(id )model { - NSSet *propertyKeys = model.class.propertyKeys; - - for (NSString *key in self.class.propertyKeys) { - if (![propertyKeys containsObject:key]) continue; - - [self mergeValueForKey:key fromModel:model]; - } -} - -#pragma mark Validation - -- (BOOL)validate:(NSError **)error { - for (NSString *key in self.class.propertyKeys) { - id value = [self valueForKey:key]; - - BOOL success = MTLValidateAndSetValue(self, key, value, NO, error); - if (!success) return NO; - } - - return YES; -} - -#pragma mark NSCopying - -- (instancetype)copyWithZone:(NSZone *)zone { - MTLModel *copy = [[self.class allocWithZone:zone] init]; - [copy setValuesForKeysWithDictionary:self.dictionaryValue]; - return copy; -} - -#pragma mark NSObject - -- (NSString *)description { - NSDictionary *permanentProperties = [self dictionaryWithValuesForKeys:self.class.permanentPropertyKeys.allObjects]; - - return [NSString stringWithFormat:@"<%@: %p> %@", self.class, self, permanentProperties]; -} - -- (NSUInteger)hash { - NSUInteger value = 0; - - for (NSString *key in self.class.permanentPropertyKeys) { - value ^= [[self valueForKey:key] hash]; - } - - return value; -} - -- (BOOL)isEqual:(MTLModel *)model { - if (self == model) return YES; - if (![model isMemberOfClass:self.class]) return NO; - - for (NSString *key in self.class.permanentPropertyKeys) { - id selfValue = [self valueForKey:key]; - id modelValue = [model valueForKey:key]; - - BOOL valuesEqual = ((selfValue == nil && modelValue == nil) || [selfValue isEqual:modelValue]); - if (!valuesEqual) return NO; - } - - return YES; -} - -@end diff --git a/Pods/Mantle/Mantle/MTLReflection.h b/Pods/Mantle/Mantle/MTLReflection.h deleted file mode 100644 index 52c920b..0000000 --- a/Pods/Mantle/Mantle/MTLReflection.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// MTLReflection.h -// Mantle -// -// Created by Justin Spahr-Summers on 2013-03-12. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import - -/// Creates a selector from a key and a constant string. -/// -/// key - The key to insert into the generated selector. This key should be in -/// its natural case. -/// suffix - A string to append to the key as part of the selector. -/// -/// Returns a selector, or NULL if the input strings cannot form a valid -/// selector. -SEL MTLSelectorWithKeyPattern(NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2))); - -/// Creates a selector from a key and a constant prefix and suffix. -/// -/// prefix - A string to prepend to the key as part of the selector. -/// key - The key to insert into the generated selector. This key should be in -/// its natural case, and will have its first letter capitalized when -/// inserted. -/// suffix - A string to append to the key as part of the selector. -/// -/// Returns a selector, or NULL if the input strings cannot form a valid -/// selector. -SEL MTLSelectorWithCapitalizedKeyPattern(const char *prefix, NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2, 3))); diff --git a/Pods/Mantle/Mantle/MTLReflection.m b/Pods/Mantle/Mantle/MTLReflection.m deleted file mode 100644 index 923e9e2..0000000 --- a/Pods/Mantle/Mantle/MTLReflection.m +++ /dev/null @@ -1,50 +0,0 @@ -// -// MTLReflection.m -// Mantle -// -// Created by Justin Spahr-Summers on 2013-03-12. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import "MTLReflection.h" -#import - -SEL MTLSelectorWithKeyPattern(NSString *key, const char *suffix) { - NSUInteger keyLength = [key maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding]; - NSUInteger suffixLength = strlen(suffix); - - char selector[keyLength + suffixLength + 1]; - - BOOL success = [key getBytes:selector maxLength:keyLength usedLength:&keyLength encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, key.length) remainingRange:NULL]; - if (!success) return NULL; - - memcpy(selector + keyLength, suffix, suffixLength); - selector[keyLength + suffixLength] = '\0'; - - return sel_registerName(selector); -} - -SEL MTLSelectorWithCapitalizedKeyPattern(const char *prefix, NSString *key, const char *suffix) { - NSUInteger prefixLength = strlen(prefix); - NSUInteger suffixLength = strlen(suffix); - - NSString *initial = [key substringToIndex:1].uppercaseString; - NSUInteger initialLength = [initial maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding]; - - NSString *rest = [key substringFromIndex:1]; - NSUInteger restLength = [rest maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding]; - - char selector[prefixLength + initialLength + restLength + suffixLength + 1]; - memcpy(selector, prefix, prefixLength); - - BOOL success = [initial getBytes:selector + prefixLength maxLength:initialLength usedLength:&initialLength encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, initial.length) remainingRange:NULL]; - if (!success) return NULL; - - success = [rest getBytes:selector + prefixLength + initialLength maxLength:restLength usedLength:&restLength encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, rest.length) remainingRange:NULL]; - if (!success) return NULL; - - memcpy(selector + prefixLength + initialLength + restLength, suffix, suffixLength); - selector[prefixLength + initialLength + restLength + suffixLength] = '\0'; - - return sel_registerName(selector); -} diff --git a/Pods/Mantle/Mantle/MTLTransformerErrorHandling.h b/Pods/Mantle/Mantle/MTLTransformerErrorHandling.h deleted file mode 100644 index 2726d91..0000000 --- a/Pods/Mantle/Mantle/MTLTransformerErrorHandling.h +++ /dev/null @@ -1,66 +0,0 @@ -// -// MTLTransformerErrorHandling.h -// Mantle -// -// Created by Robert Böhnke on 10/6/13. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import - -/// The domain for errors originating from the MTLTransformerErrorHandling -/// protocol. -/// -/// Transformers conforming to this protocol are expected to use this error -/// domain if the transformation fails. -extern NSString * const MTLTransformerErrorHandlingErrorDomain; - -/// Used to indicate that the input value was illegal. -/// -/// Transformers conforming to this protocol are expected to use this error code -/// if the transformation fails due to an invalid input value. -extern const NSInteger MTLTransformerErrorHandlingErrorInvalidInput; - -/// Associated with the invalid input value. -/// -/// Transformers conforming to this protocol are expected to associate this key -/// with the invalid input in the userInfo dictionary. -extern NSString * const MTLTransformerErrorHandlingInputValueErrorKey; - -/// This protocol can be implemented by NSValueTransformer subclasses to -/// communicate errors that occur during transformation. -@protocol MTLTransformerErrorHandling -@required - -/// Transforms a value, returning any error that occurred during transformation. -/// -/// value - The value to transform. -/// success - If not NULL, this will be set to a boolean indicating whether the -/// transformation was successful. -/// error - If not NULL, this may be set to an error that occurs during -/// transforming the value. -/// -/// Returns the result of the transformation which may be nil. Clients should -/// inspect the success parameter to decide how to proceed with the result. -- (id)transformedValue:(id)value success:(BOOL *)success error:(NSError **)error; - -@optional - -/// Reverse-transforms a value, returning any error that occurred during -/// transformation. -/// -/// Transformers conforming to this protocol are expected to implemented this -/// method if they support reverse transformation. -/// -/// value - The value to transform. -/// success - If not NULL, this will be set to a boolean indicating whether the -/// transformation was successful. -/// error - If not NULL, this may be set to an error that occurs during -/// transforming the value. -/// -/// Returns the result of the reverse transformation which may be nil. Clients -/// should inspect the success parameter to decide how to proceed with the -/// result. -- (id)reverseTransformedValue:(id)value success:(BOOL *)success error:(NSError **)error; - -@end diff --git a/Pods/Mantle/Mantle/MTLTransformerErrorHandling.m b/Pods/Mantle/Mantle/MTLTransformerErrorHandling.m deleted file mode 100644 index 962e2c0..0000000 --- a/Pods/Mantle/Mantle/MTLTransformerErrorHandling.m +++ /dev/null @@ -1,15 +0,0 @@ -// -// MTLTransformerErrorHandling.h -// Mantle -// -// Created by Robert Böhnke on 10/6/13. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import "MTLTransformerErrorHandling.h" - -NSString * const MTLTransformerErrorHandlingErrorDomain = @"MTLTransformerErrorHandlingErrorDomain"; - -const NSInteger MTLTransformerErrorHandlingErrorInvalidInput = 1; - -NSString * const MTLTransformerErrorHandlingInputValueErrorKey = @"MTLTransformerErrorHandlingInputValueErrorKey"; diff --git a/Pods/Mantle/Mantle/MTLValueTransformer.h b/Pods/Mantle/Mantle/MTLValueTransformer.h deleted file mode 100644 index 5deda94..0000000 --- a/Pods/Mantle/Mantle/MTLValueTransformer.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// MTLValueTransformer.h -// Mantle -// -// Created by Justin Spahr-Summers on 2012-09-11. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import - -#import "MTLTransformerErrorHandling.h" - -/// A block that represents a transformation. -/// -/// value - The value to transform. -/// success - The block must set this parameter to indicate whether the -/// transformation was successful. -/// MTLValueTransformer will always call this block with *success -/// initialized to YES. -/// error - If not NULL, this may be set to an error that occurs during -/// transforming the value. -/// -/// Returns the result of the transformation, which may be nil. -typedef id (^MTLValueTransformerBlock)(id value, BOOL *success, NSError **error); - -/// -/// A value transformer supporting block-based transformation. -/// -@interface MTLValueTransformer : NSValueTransformer - -/// Returns a transformer which transforms values using the given block. Reverse -/// transformations will not be allowed. -+ (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)transformation; - -/// Returns a transformer which transforms values using the given block, for -/// forward or reverse transformations. -+ (instancetype)transformerUsingReversibleBlock:(MTLValueTransformerBlock)transformation; - -/// Returns a transformer which transforms values using the given blocks. -+ (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)forwardTransformation reverseBlock:(MTLValueTransformerBlock)reverseTransformation; - -@end - -@interface MTLValueTransformer (Deprecated) - -+ (NSValueTransformer *)transformerWithBlock:(id (^)(id))transformationBlock __attribute__((deprecated("Replaced by +transformerUsingForwardBlock:"))); - -+ (NSValueTransformer *)reversibleTransformerWithBlock:(id (^)(id))transformationBlock __attribute__((deprecated("Replaced by +transformerUsingReversibleBlock:"))); - -+ (NSValueTransformer *)reversibleTransformerWithForwardBlock:(id (^)(id))forwardBlock reverseBlock:(id (^)(id))reverseBlock __attribute__((deprecated("Replaced by +transformerUsingForwardBlock:reverseBlock:"))); - -@end diff --git a/Pods/Mantle/Mantle/MTLValueTransformer.m b/Pods/Mantle/Mantle/MTLValueTransformer.m deleted file mode 100644 index 701627b..0000000 --- a/Pods/Mantle/Mantle/MTLValueTransformer.m +++ /dev/null @@ -1,150 +0,0 @@ -// -// MTLValueTransformer.m -// Mantle -// -// Created by Justin Spahr-Summers on 2012-09-11. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import "MTLValueTransformer.h" - -// -// Any MTLValueTransformer supporting reverse transformation. Necessary because -// +allowsReverseTransformation is a class method. -// -@interface MTLReversibleValueTransformer : MTLValueTransformer -@end - -@interface MTLValueTransformer () - -@property (nonatomic, copy, readonly) MTLValueTransformerBlock forwardBlock; -@property (nonatomic, copy, readonly) MTLValueTransformerBlock reverseBlock; - -@end - -@implementation MTLValueTransformer - -#pragma mark Lifecycle - -+ (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)forwardBlock { - return [[self alloc] initWithForwardBlock:forwardBlock reverseBlock:nil]; -} - -+ (instancetype)transformerUsingReversibleBlock:(MTLValueTransformerBlock)reversibleBlock { - return [self transformerUsingForwardBlock:reversibleBlock reverseBlock:reversibleBlock]; -} - -+ (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)forwardBlock reverseBlock:(MTLValueTransformerBlock)reverseBlock { - return [[MTLReversibleValueTransformer alloc] initWithForwardBlock:forwardBlock reverseBlock:reverseBlock]; -} - -- (id)initWithForwardBlock:(MTLValueTransformerBlock)forwardBlock reverseBlock:(MTLValueTransformerBlock)reverseBlock { - NSParameterAssert(forwardBlock != nil); - - self = [super init]; - if (self == nil) return nil; - - _forwardBlock = [forwardBlock copy]; - _reverseBlock = [reverseBlock copy]; - - return self; -} - -#pragma mark NSValueTransformer - -+ (BOOL)allowsReverseTransformation { - return NO; -} - -+ (Class)transformedValueClass { - return NSObject.class; -} - -- (id)transformedValue:(id)value { - NSError *error = nil; - BOOL success = YES; - - return self.forwardBlock(value, &success, &error); -} - -- (id)transformedValue:(id)value success:(BOOL *)outerSuccess error:(NSError **)outerError { - NSError *error = nil; - BOOL success = YES; - - id transformedValue = self.forwardBlock(value, &success, &error); - - if (outerSuccess != NULL) *outerSuccess = success; - if (outerError != NULL) *outerError = error; - - return transformedValue; -} - -@end - -@implementation MTLReversibleValueTransformer - -#pragma mark Lifecycle - -- (id)initWithForwardBlock:(MTLValueTransformerBlock)forwardBlock reverseBlock:(MTLValueTransformerBlock)reverseBlock { - NSParameterAssert(reverseBlock != nil); - return [super initWithForwardBlock:forwardBlock reverseBlock:reverseBlock]; -} - -#pragma mark NSValueTransformer - -+ (BOOL)allowsReverseTransformation { - return YES; -} - -- (id)reverseTransformedValue:(id)value { - NSError *error = nil; - BOOL success = YES; - - return self.reverseBlock(value, &success, &error); -} - -- (id)reverseTransformedValue:(id)value success:(BOOL *)outerSuccess error:(NSError **)outerError { - NSError *error = nil; - BOOL success = YES; - - id transformedValue = self.reverseBlock(value, &success, &error); - - if (outerSuccess != NULL) *outerSuccess = success; - if (outerError != NULL) *outerError = error; - - return transformedValue; -} - -@end - - -@implementation MTLValueTransformer (Deprecated) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-implementations" - -+ (instancetype)transformerWithBlock:(id (^)(id))transformationBlock { - return [self transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) { - return transformationBlock(value); - }]; -} - -+ (instancetype)reversibleTransformerWithBlock:(id (^)(id))transformationBlock { - return [self transformerUsingReversibleBlock:^(id value, BOOL *success, NSError **error) { - return transformationBlock(value); - }]; -} - -+ (instancetype)reversibleTransformerWithForwardBlock:(id (^)(id))forwardBlock reverseBlock:(id (^)(id))reverseBlock { - return [self - transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) { - return forwardBlock(value); - } - reverseBlock:^(id value, BOOL *success, NSError **error) { - return reverseBlock(value); - }]; -} - -#pragma clang diagnostic pop - -@end diff --git a/Pods/Mantle/Mantle/Mantle.h b/Pods/Mantle/Mantle/Mantle.h deleted file mode 100644 index 102b7ad..0000000 --- a/Pods/Mantle/Mantle/Mantle.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Mantle.h -// Mantle -// -// Created by Justin Spahr-Summers on 2012-09-04. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import - -//! Project version number for Mantle. -FOUNDATION_EXPORT double MantleVersionNumber; - -//! Project version string for Mantle. -FOUNDATION_EXPORT const unsigned char MantleVersionString[]; - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import diff --git a/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.h b/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.h deleted file mode 100644 index b8c2b56..0000000 --- a/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// NSArray+MTLManipulationAdditions.h -// Mantle -// -// Created by Josh Abernathy on 9/19/12. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import - -@interface NSArray (MTLManipulationAdditions) - -/// The first object in the array or nil if the array is empty. -/// Forwards to `firstObject` which has been first declared in iOS7, but works with iOS4/10.6. -@property (nonatomic, readonly, strong) id mtl_firstObject; - -/// Returns a new array without all instances of the given object. -- (NSArray *)mtl_arrayByRemovingObject:(id)object; - -/// Returns a new array without the first object. If the array is empty, it -/// returns the empty array. -- (NSArray *)mtl_arrayByRemovingFirstObject; - -/// Returns a new array without the last object. If the array is empty, it -/// returns the empty array. -- (NSArray *)mtl_arrayByRemovingLastObject; - -@end diff --git a/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.m b/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.m deleted file mode 100644 index e6932c9..0000000 --- a/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// NSArray+MTLManipulationAdditions.m -// Mantle -// -// Created by Josh Abernathy on 9/19/12. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import "NSArray+MTLManipulationAdditions.h" - -@interface NSArray (MTLDeclarations) - -// This declaration is needed so Mantle can be compiled with SDK 6 / 10.8. -- (id)firstObject; - -@end - -@implementation NSArray (MTLManipulationAdditions) - -- (id)mtl_firstObject { - return self.firstObject; -} - -- (instancetype)mtl_arrayByRemovingObject:(id)object { - NSMutableArray *result = [self mutableCopy]; - [result removeObject:object]; - return result; -} - -- (instancetype)mtl_arrayByRemovingFirstObject { - if (self.count == 0) return self; - - return [self subarrayWithRange:NSMakeRange(1, self.count - 1)]; -} - -- (instancetype)mtl_arrayByRemovingLastObject { - if (self.count == 0) return self; - - return [self subarrayWithRange:NSMakeRange(0, self.count - 1)]; -} - -@end diff --git a/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h b/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h deleted file mode 100644 index eb70151..0000000 --- a/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// NSDictionary+MTLJSONKeyPath.h -// Mantle -// -// Created by Robert Böhnke on 19/03/14. -// Copyright (c) 2014 GitHub. All rights reserved. -// - -#import - -@interface NSDictionary (MTLJSONKeyPath) - -/// Looks up the value of a key path in the receiver. -/// -/// JSONKeyPath - The key path that should be resolved. Every element along this -/// key path needs to be an instance of NSDictionary for the -/// resolving to be successful. -/// success - If not NULL, this will be set to a boolean indicating whether -/// the key path was resolved successfully. -/// error - If not NULL, this may be set to an error that occurs during -/// resolving the value. -/// -/// Returns the value for the key path which may be nil. Clients should inspect -/// the success parameter to decide how to proceed with the result. -- (id)mtl_valueForJSONKeyPath:(NSString *)JSONKeyPath success:(BOOL *)success error:(NSError **)error; - -@end diff --git a/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.m b/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.m deleted file mode 100644 index 03ee2ad..0000000 --- a/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.m +++ /dev/null @@ -1,47 +0,0 @@ -// -// NSDictionary+MTLJSONKeyPath.m -// Mantle -// -// Created by Robert Böhnke on 19/03/14. -// Copyright (c) 2014 GitHub. All rights reserved. -// - -#import "NSDictionary+MTLJSONKeyPath.h" - -#import "MTLJSONAdapter.h" - -@implementation NSDictionary (MTLJSONKeyPath) - -- (id)mtl_valueForJSONKeyPath:(NSString *)JSONKeyPath success:(BOOL *)success error:(NSError **)error { - NSArray *components = [JSONKeyPath componentsSeparatedByString:@"."]; - - id result = self; - for (NSString *component in components) { - // Check the result before resolving the key path component to not - // affect the last value of the path. - if (result == nil || result == NSNull.null) break; - - if (![result isKindOfClass:NSDictionary.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid JSON dictionary", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"JSON key path %1$@ could not resolved because an incompatible JSON dictionary was supplied: \"%2$@\"", @""), JSONKeyPath, self] - }; - - *error = [NSError errorWithDomain:MTLJSONAdapterErrorDomain code:MTLJSONAdapterErrorInvalidJSONDictionary userInfo:userInfo]; - } - - if (success != NULL) *success = NO; - - return nil; - } - - result = result[component]; - } - - if (success != NULL) *success = YES; - - return result; -} - -@end diff --git a/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h b/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h deleted file mode 100644 index 6126293..0000000 --- a/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// NSDictionary+MTLManipulationAdditions.h -// Mantle -// -// Created by Justin Spahr-Summers on 2012-09-24. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import - -@interface NSDictionary (MTLManipulationAdditions) - -/// Merges the keys and values from the given dictionary into the receiver. If -/// both the receiver and `dictionary` have a given key, the value from -/// `dictionary` is used. -/// -/// Returns a new dictionary containing the entries of the receiver combined with -/// those of `dictionary`. -- (NSDictionary *)mtl_dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary; - -/// Creates a new dictionary with all the entries for the given keys removed from -/// the receiver. -- (NSDictionary *)mtl_dictionaryByRemovingValuesForKeys:(NSArray *)keys; - -@end - -@interface NSDictionary (MTLManipulationAdditions_Deprecated) - -- (NSDictionary *)mtl_dictionaryByRemovingEntriesWithKeys:(NSSet *)keys __attribute__((deprecated("Replaced by -mtl_dictionaryByRemovingValuesForKeys:"))); - -@end diff --git a/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.m b/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.m deleted file mode 100644 index a7a1d7a..0000000 --- a/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.m +++ /dev/null @@ -1,38 +0,0 @@ -// -// NSDictionary+MTLManipulationAdditions.m -// Mantle -// -// Created by Justin Spahr-Summers on 2012-09-24. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import "NSDictionary+MTLManipulationAdditions.h" - -@implementation NSDictionary (MTLManipulationAdditions) - -- (NSDictionary *)mtl_dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary { - NSMutableDictionary *result = [self mutableCopy]; - [result addEntriesFromDictionary:dictionary]; - return result; -} - -- (NSDictionary *)mtl_dictionaryByRemovingValuesForKeys:(NSArray *)keys { - NSMutableDictionary *result = [self mutableCopy]; - [result removeObjectsForKeys:keys]; - return result; -} - -@end - -@implementation NSDictionary (MTLManipulationAdditions_Deprecated) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated" - -- (NSDictionary *)mtl_dictionaryByRemovingEntriesWithKeys:(NSSet *)keys { - return [self mtl_dictionaryByRemovingValuesForKeys:keys.allObjects]; -} - -#pragma clang diagnostic pop - -@end diff --git a/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.h b/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.h deleted file mode 100644 index 1d908c4..0000000 --- a/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// NSDictionary+MTLMappingAdditions.h -// Mantle -// -// Created by Robert Böhnke on 10/31/13. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import - -@interface NSDictionary (MTLMappingAdditions) - -/// Creates an identity mapping for serialization. -/// -/// class - A subclass of MTLModel. -/// -/// Returns a dictionary that maps all properties of the given class to -/// themselves. -+ (NSDictionary *)mtl_identityPropertyMapWithModel:(Class)modelClass; - -@end diff --git a/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.m b/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.m deleted file mode 100644 index 5ebdabc..0000000 --- a/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// NSDictionary+MTLMappingAdditions.m -// Mantle -// -// Created by Robert Böhnke on 10/31/13. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import "MTLModel.h" - -#import "NSDictionary+MTLMappingAdditions.h" - -@implementation NSDictionary (MTLMappingAdditions) - -+ (NSDictionary *)mtl_identityPropertyMapWithModel:(Class)modelClass { - NSCParameterAssert([modelClass isSubclassOfClass:MTLModel.class]); - - NSArray *propertyKeys = [modelClass propertyKeys].allObjects; - - return [NSDictionary dictionaryWithObjects:propertyKeys forKeys:propertyKeys]; -} - -@end diff --git a/Pods/Mantle/Mantle/NSError+MTLModelException.h b/Pods/Mantle/Mantle/NSError+MTLModelException.h deleted file mode 100644 index 852fbdb..0000000 --- a/Pods/Mantle/Mantle/NSError+MTLModelException.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// NSError+MTLModelException.h -// Mantle -// -// Created by Robert Böhnke on 7/6/13. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import - -@interface NSError (MTLModelException) - -/// Creates a new error for an exception that occurred during updating an -/// MTLModel. -/// -/// exception - The exception that was thrown while updating the model. -/// This argument must not be nil. -/// -/// Returns an error that takes its localized description and failure reason -/// from the exception. -+ (instancetype)mtl_modelErrorWithException:(NSException *)exception; - -@end diff --git a/Pods/Mantle/Mantle/NSError+MTLModelException.m b/Pods/Mantle/Mantle/NSError+MTLModelException.m deleted file mode 100644 index 8b71e06..0000000 --- a/Pods/Mantle/Mantle/NSError+MTLModelException.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// NSError+MTLModelException.m -// Mantle -// -// Created by Robert Böhnke on 7/6/13. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import "MTLModel.h" - -#import "NSError+MTLModelException.h" - -// The domain for errors originating from MTLModel. -static NSString * const MTLModelErrorDomain = @"MTLModelErrorDomain"; - -// An exception was thrown and caught. -static const NSInteger MTLModelErrorExceptionThrown = 1; - -// Associated with the NSException that was caught. -static NSString * const MTLModelThrownExceptionErrorKey = @"MTLModelThrownException"; - -@implementation NSError (MTLModelException) - -+ (instancetype)mtl_modelErrorWithException:(NSException *)exception { - NSParameterAssert(exception != nil); - - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: exception.description, - NSLocalizedFailureReasonErrorKey: exception.reason, - MTLModelThrownExceptionErrorKey: exception - }; - - return [NSError errorWithDomain:MTLModelErrorDomain code:MTLModelErrorExceptionThrown userInfo:userInfo]; -} - -@end diff --git a/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.h b/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.h deleted file mode 100644 index 0ca13e6..0000000 --- a/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// NSObject+MTLComparisonAdditions.h -// Mantle -// -// Created by Josh Vera on 10/26/12. -// Copyright (c) 2012 GitHub. All rights reserved. -// -// Portions copyright (c) 2011 Bitswift. All rights reserved. -// See the LICENSE file for more information. -// - -#import - -/// Returns whether both objects are identical or equal via -isEqual: -BOOL MTLEqualObjects(id obj1, id obj2); diff --git a/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.m b/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.m deleted file mode 100644 index 3b77b35..0000000 --- a/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// NSObject+MTLComparisonAdditions.m -// Mantle -// -// Created by Josh Vera on 10/26/12. -// Copyright (c) 2012 GitHub. All rights reserved. -// -// Portions copyright (c) 2011 Bitswift. All rights reserved. -// See the LICENSE file for more information. -// - -#import "NSObject+MTLComparisonAdditions.h" - -BOOL MTLEqualObjects(id obj1, id obj2) { - return (obj1 == obj2 || [obj1 isEqual:obj2]); -} diff --git a/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h b/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h deleted file mode 100644 index ca29b98..0000000 --- a/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// NSValueTransformer+MTLInversionAdditions.h -// Mantle -// -// Created by Justin Spahr-Summers on 2013-05-18. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import - -@interface NSValueTransformer (MTLInversionAdditions) - -/// Flips the direction of the receiver's transformation, such that -/// -transformedValue: will become -reverseTransformedValue:, and vice-versa. -/// -/// The receiver must allow reverse transformation. -/// -/// Returns an inverted transformer. -- (NSValueTransformer *)mtl_invertedTransformer; - -@end diff --git a/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.m b/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.m deleted file mode 100644 index 2e536d6..0000000 --- a/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.m +++ /dev/null @@ -1,37 +0,0 @@ -// -// NSValueTransformer+MTLInversionAdditions.m -// Mantle -// -// Created by Justin Spahr-Summers on 2013-05-18. -// Copyright (c) 2013 GitHub. All rights reserved. -// - -#import "NSValueTransformer+MTLInversionAdditions.h" -#import "MTLTransformerErrorHandling.h" -#import "MTLValueTransformer.h" - -@implementation NSValueTransformer (MTLInversionAdditions) - -- (NSValueTransformer *)mtl_invertedTransformer { - NSParameterAssert(self.class.allowsReverseTransformation); - - if ([self conformsToProtocol:@protocol(MTLTransformerErrorHandling)]) { - NSParameterAssert([self respondsToSelector:@selector(reverseTransformedValue:success:error:)]); - - id errorHandlingSelf = (id)self; - - return [MTLValueTransformer transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) { - return [errorHandlingSelf reverseTransformedValue:value success:success error:error]; - } reverseBlock:^(id value, BOOL *success, NSError **error) { - return [errorHandlingSelf transformedValue:value success:success error:error]; - }]; - } else { - return [MTLValueTransformer transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) { - return [self reverseTransformedValue:value]; - } reverseBlock:^(id value, BOOL *success, NSError **error) { - return [self transformedValue:value]; - }]; - } -} - -@end diff --git a/Pods/Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h b/Pods/Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h deleted file mode 100644 index 0ec87ac..0000000 --- a/Pods/Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h +++ /dev/null @@ -1,79 +0,0 @@ -// -// NSValueTransformer+MTLPredefinedTransformerAdditions.h -// Mantle -// -// Created by Justin Spahr-Summers on 2012-09-27. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import - -#import "MTLTransformerErrorHandling.h" - -/// The name for a value transformer that converts strings into URLs and back. -extern NSString * const MTLURLValueTransformerName; - -/// Ensure an NSNumber is backed by __NSCFBoolean/CFBooleanRef -/// -/// NSJSONSerialization, and likely other serialization libraries, ordinarily -/// serialize NSNumbers as numbers, and thus booleans would be serialized as -/// 0/1. The exception is when the NSNumber is backed by __NSCFBoolean, which, -/// though very much an implementation detail, is detected and serialized as a -/// proper boolean. -extern NSString * const MTLBooleanValueTransformerName; - -@interface NSValueTransformer (MTLPredefinedTransformerAdditions) - -/// An optionally reversible transformer which applies the given transformer to -/// each element of an array. -/// -/// transformer - The transformer to apply to each element. If the transformer -/// is reversible, the transformer returned by this method will be -/// reversible. This argument must not be nil. -/// -/// Returns a transformer which applies a transformation to each element of an -/// array. -+ (NSValueTransformer *)mtl_arrayMappingTransformerWithTransformer:(NSValueTransformer *)transformer; - -/// A reversible value transformer to transform between the keys and objects of a -/// dictionary. -/// -/// dictionary - The dictionary whose keys and values should be -/// transformed between. This argument must not be nil. -/// defaultValue - The result to fall back to, in case no key matching the -/// input value was found during a forward transformation. -/// reverseDefaultValue - The result to fall back to, in case no value matching -/// the input value was found during a reverse -/// transformation. -/// -/// Can for example be used for transforming between enum values and their string -/// representation. -/// -/// NSValueTransformer *valueTransformer = [NSValueTransformer mtl_valueMappingTransformerWithDictionary:@{ -/// @"foo": @(EnumDataTypeFoo), -/// @"bar": @(EnumDataTypeBar), -/// } defaultValue: @(EnumDataTypeUndefined) reverseDefaultValue: @"undefined"]; -/// -/// Returns a transformer which will map from keys to objects for forward -/// transformations, and from objects to keys for reverse transformations. -+ (NSValueTransformer *)mtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary defaultValue:(id)defaultValue reverseDefaultValue:(id)reverseDefaultValue; - -/// Returns a value transformer created by calling -/// `+mtl_valueMappingTransformerWithDictionary:defaultValue:reverseDefaultValue:` -/// with a default value of `nil` and a reverse default value of `nil`. -+ (NSValueTransformer *)mtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary; - -/// A value transformer that errors if the transformed value are not of the given -/// class. -/// -/// class - The expected class. This argument must not be nil. -/// -/// Returns a transformer which will return an error if the transformed in value -/// is not a member of class. Otherwise, the value is simply passed through. -+ (NSValueTransformer *)mtl_validatingTransformerForClass:(Class)modelClass; - -+ (NSValueTransformer *)mtl_JSONDictionaryTransformerWithModelClass:(Class)modelClass __attribute__((deprecated("Replaced by +[MTLJSONAdapter dictionaryTransformerWithModelClass:]"))); - -+ (NSValueTransformer *)mtl_JSONArrayTransformerWithModelClass:(Class)modelClass __attribute__((deprecated("Replaced by +[MTLJSONAdapter arrayTransformerWithModelClass:]"))); - -@end diff --git a/Pods/Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.m b/Pods/Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.m deleted file mode 100644 index 97ce529..0000000 --- a/Pods/Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.m +++ /dev/null @@ -1,291 +0,0 @@ -// -// NSValueTransformer+MTLPredefinedTransformerAdditions.m -// Mantle -// -// Created by Justin Spahr-Summers on 2012-09-27. -// Copyright (c) 2012 GitHub. All rights reserved. -// - -#import "NSValueTransformer+MTLPredefinedTransformerAdditions.h" -#import "MTLJSONAdapter.h" -#import "MTLModel.h" -#import "MTLValueTransformer.h" - -NSString * const MTLURLValueTransformerName = @"MTLURLValueTransformerName"; -NSString * const MTLBooleanValueTransformerName = @"MTLBooleanValueTransformerName"; - -@implementation NSValueTransformer (MTLPredefinedTransformerAdditions) - -#pragma mark Category Loading - -+ (void)load { - @autoreleasepool { - MTLValueTransformer *URLValueTransformer = [MTLValueTransformer - transformerUsingForwardBlock:^ id (NSString *str, BOOL *success, NSError **error) { - if (str == nil) return nil; - - if (![str isKindOfClass:NSString.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert string to URL", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected an NSString, got: %@.", @""), str], - MTLTransformerErrorHandlingInputValueErrorKey : str - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - NSURL *result = [NSURL URLWithString:str]; - - if (result == nil) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert string to URL", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Input URL string %@ was malformed", @""), str], - MTLTransformerErrorHandlingInputValueErrorKey : str - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - return result; - } - reverseBlock:^ id (NSURL *URL, BOOL *success, NSError **error) { - if (URL == nil) return nil; - - if (![URL isKindOfClass:NSURL.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert URL to string", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected an NSURL, got: %@.", @""), URL], - MTLTransformerErrorHandlingInputValueErrorKey : URL - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - return URL.absoluteString; - }]; - - [NSValueTransformer setValueTransformer:URLValueTransformer forName:MTLURLValueTransformerName]; - - MTLValueTransformer *booleanValueTransformer = [MTLValueTransformer - transformerUsingReversibleBlock:^ id (NSNumber *boolean, BOOL *success, NSError **error) { - if (boolean == nil) return nil; - - if (![boolean isKindOfClass:NSNumber.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not convert number to boolean-backed number or vice-versa", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected an NSNumber, got: %@.", @""), boolean], - MTLTransformerErrorHandlingInputValueErrorKey : boolean - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - return (NSNumber *)(boolean.boolValue ? kCFBooleanTrue : kCFBooleanFalse); - }]; - - [NSValueTransformer setValueTransformer:booleanValueTransformer forName:MTLBooleanValueTransformerName]; - } -} - -#pragma mark Customizable Transformers - -+ (NSValueTransformer *)mtl_arrayMappingTransformerWithTransformer:(NSValueTransformer *)transformer { - NSParameterAssert(transformer != nil); - - id (^forwardBlock)(NSArray *values, BOOL *success, NSError **error) = ^ id (NSArray *values, BOOL *success, NSError **error) { - if (values == nil) return nil; - - if (![values isKindOfClass:NSArray.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not transform non-array type", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected an NSArray, got: %@.", @""), values], - MTLTransformerErrorHandlingInputValueErrorKey: values - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - NSMutableArray *transformedValues = [NSMutableArray arrayWithCapacity:values.count]; - NSInteger index = -1; - for (id value in values) { - index++; - if (value == NSNull.null) { - [transformedValues addObject:NSNull.null]; - continue; - } - - id transformedValue = nil; - if ([transformer conformsToProtocol:@protocol(MTLTransformerErrorHandling)]) { - NSError *underlyingError = nil; - transformedValue = [(id )transformer transformedValue:value success:success error:&underlyingError]; - - if (*success == NO) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not transform array", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Could not transform value at index %d", @""), index], - NSUnderlyingErrorKey: underlyingError, - MTLTransformerErrorHandlingInputValueErrorKey: values - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - return nil; - } - } else { - transformedValue = [transformer transformedValue:value]; - } - - if (transformedValue == nil) continue; - - [transformedValues addObject:transformedValue]; - } - - return transformedValues; - }; - - id (^reverseBlock)(NSArray *values, BOOL *success, NSError **error) = nil; - if (transformer.class.allowsReverseTransformation) { - reverseBlock = ^ id (NSArray *values, BOOL *success, NSError **error) { - if (values == nil) return nil; - - if (![values isKindOfClass:NSArray.class]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not transform non-array type", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected an NSArray, got: %@.", @""), values], - MTLTransformerErrorHandlingInputValueErrorKey: values - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - NSMutableArray *transformedValues = [NSMutableArray arrayWithCapacity:values.count]; - NSInteger index = -1; - for (id value in values) { - index++; - if (value == NSNull.null) { - [transformedValues addObject:NSNull.null]; - - continue; - } - - id transformedValue = nil; - if ([transformer respondsToSelector:@selector(reverseTransformedValue:success:error:)]) { - NSError *underlyingError = nil; - transformedValue = [(id )transformer reverseTransformedValue:value success:success error:&underlyingError]; - - if (*success == NO) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not transform array", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Could not transform value at index %d", @""), index], - NSUnderlyingErrorKey: underlyingError, - MTLTransformerErrorHandlingInputValueErrorKey: values - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - return nil; - } - } else { - transformedValue = [transformer reverseTransformedValue:value]; - } - - if (transformedValue == nil) continue; - - [transformedValues addObject:transformedValue]; - } - - return transformedValues; - }; - } - if (reverseBlock != nil) { - return [MTLValueTransformer transformerUsingForwardBlock:forwardBlock reverseBlock:reverseBlock]; - } else { - return [MTLValueTransformer transformerUsingForwardBlock:forwardBlock]; - } -} - -+ (NSValueTransformer *)mtl_validatingTransformerForClass:(Class)modelClass { - NSParameterAssert(modelClass != nil); - - return [MTLValueTransformer transformerUsingForwardBlock:^ id (id value, BOOL *success, NSError **error) { - if (value != nil && ![value isKindOfClass:modelClass]) { - if (error != NULL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Value did not match expected type", @""), - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"Expected %1$@ to be of class %2$@ but got %3$@", @""), value, modelClass, [value class]], - MTLTransformerErrorHandlingInputValueErrorKey : value - }; - - *error = [NSError errorWithDomain:MTLTransformerErrorHandlingErrorDomain code:MTLTransformerErrorHandlingErrorInvalidInput userInfo:userInfo]; - } - *success = NO; - return nil; - } - - return value; - }]; -} - -+ (NSValueTransformer *)mtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary defaultValue:(id)defaultValue reverseDefaultValue:(id)reverseDefaultValue { - NSParameterAssert(dictionary != nil); - NSParameterAssert(dictionary.count == [[NSSet setWithArray:dictionary.allValues] count]); - - return [MTLValueTransformer - transformerUsingForwardBlock:^ id (id key, BOOL *success, NSError **error) { - return dictionary[key ?: NSNull.null] ?: defaultValue; - } - reverseBlock:^ id (id value, BOOL *success, NSError **error) { - __block id result = nil; - [dictionary enumerateKeysAndObjectsUsingBlock:^(id key, id anObject, BOOL *stop) { - if ([value isEqual:anObject]) { - result = key; - *stop = YES; - } - }]; - - return result ?: reverseDefaultValue; - }]; -} - -+ (NSValueTransformer *)mtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary { - return [self mtl_valueMappingTransformerWithDictionary:dictionary defaultValue:nil reverseDefaultValue:nil]; -} - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-implementations" - -+ (NSValueTransformer *)mtl_JSONDictionaryTransformerWithModelClass:(Class)modelClass { - return [MTLJSONAdapter dictionaryTransformerWithModelClass:modelClass]; -} - -+ (NSValueTransformer *)mtl_JSONArrayTransformerWithModelClass:(Class)modelClass { - return [MTLJSONAdapter arrayTransformerWithModelClass:modelClass]; -} - -#pragma clang diagnostic pop - -@end diff --git a/Pods/Mantle/Mantle/extobjc/EXTKeyPathCoding.h b/Pods/Mantle/Mantle/extobjc/EXTKeyPathCoding.h deleted file mode 100644 index 8474c5d..0000000 --- a/Pods/Mantle/Mantle/extobjc/EXTKeyPathCoding.h +++ /dev/null @@ -1,68 +0,0 @@ -// -// EXTKeyPathCoding.h -// extobjc -// -// Created by Justin Spahr-Summers on 19.06.12. -// Copyright (C) 2012 Justin Spahr-Summers. -// Released under the MIT license. -// - -#import -#import "metamacros.h" - -/** - * \@keypath allows compile-time verification of key paths. Given a real object - * receiver and key path: - * - * @code - -NSString *UTF8StringPath = @keypath(str.lowercaseString.UTF8String); -// => @"lowercaseString.UTF8String" - -NSString *versionPath = @keypath(NSObject, version); -// => @"version" - -NSString *lowercaseStringPath = @keypath(NSString.new, lowercaseString); -// => @"lowercaseString" - - * @endcode - * - * ... the macro returns an \c NSString containing all but the first path - * component or argument (e.g., @"lowercaseString.UTF8String", @"version"). - * - * In addition to simply creating a key path, this macro ensures that the key - * path is valid at compile-time (causing a syntax error if not), and supports - * refactoring, such that changing the name of the property will also update any - * uses of \@keypath. - */ -#define keypath(...) \ - metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__))(keypath1(__VA_ARGS__))(keypath2(__VA_ARGS__)) - -#define keypath1(PATH) \ - (((void)(NO && ((void)PATH, NO)), strchr(# PATH, '.') + 1)) - -#define keypath2(OBJ, PATH) \ - (((void)(NO && ((void)OBJ.PATH, NO)), # PATH)) - -/** - * \@collectionKeypath allows compile-time verification of key paths across collections NSArray/NSSet etc. Given a real object - * receiver, collection object receiver and related keypaths: - * - * @code - - NSString *employeesFirstNamePath = @collectionKeypath(department.employees, Employee.new, firstName) - // => @"employees.firstName" - - NSString *employeesFirstNamePath = @collectionKeypath(Department.new, employees, Employee.new, firstName) - // => @"employees.firstName" - - * @endcode - * - */ -#define collectionKeypath(...) \ - metamacro_if_eq(3, metamacro_argcount(__VA_ARGS__))(collectionKeypath3(__VA_ARGS__))(collectionKeypath4(__VA_ARGS__)) - -#define collectionKeypath3(PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String]) - -#define collectionKeypath4(OBJ, PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(OBJ, PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String]) - diff --git a/Pods/Mantle/Mantle/extobjc/EXTRuntimeExtensions.h b/Pods/Mantle/Mantle/extobjc/EXTRuntimeExtensions.h deleted file mode 100644 index 191d749..0000000 --- a/Pods/Mantle/Mantle/extobjc/EXTRuntimeExtensions.h +++ /dev/null @@ -1,113 +0,0 @@ -// -// EXTRuntimeExtensions.h -// extobjc -// -// Created by Justin Spahr-Summers on 2011-03-05. -// Copyright (C) 2012 Justin Spahr-Summers. -// Released under the MIT license. -// - -#import - -/** - * Describes the memory management policy of a property. - */ -typedef enum { - /** - * The value is assigned. - */ - mtl_propertyMemoryManagementPolicyAssign = 0, - - /** - * The value is retained. - */ - mtl_propertyMemoryManagementPolicyRetain, - - /** - * The value is copied. - */ - mtl_propertyMemoryManagementPolicyCopy -} mtl_propertyMemoryManagementPolicy; - -/** - * Describes the attributes and type information of a property. - */ -typedef struct { - /** - * Whether this property was declared with the \c readonly attribute. - */ - BOOL readonly; - - /** - * Whether this property was declared with the \c nonatomic attribute. - */ - BOOL nonatomic; - - /** - * Whether the property is a weak reference. - */ - BOOL weak; - - /** - * Whether the property is eligible for garbage collection. - */ - BOOL canBeCollected; - - /** - * Whether this property is defined with \c \@dynamic. - */ - BOOL dynamic; - - /** - * The memory management policy for this property. This will always be - * #mtl_propertyMemoryManagementPolicyAssign if #readonly is \c YES. - */ - mtl_propertyMemoryManagementPolicy memoryManagementPolicy; - - /** - * The selector for the getter of this property. This will reflect any - * custom \c getter= attribute provided in the property declaration, or the - * inferred getter name otherwise. - */ - SEL getter; - - /** - * The selector for the setter of this property. This will reflect any - * custom \c setter= attribute provided in the property declaration, or the - * inferred setter name otherwise. - * - * @note If #readonly is \c YES, this value will represent what the setter - * \e would be, if the property were writable. - */ - SEL setter; - - /** - * The backing instance variable for this property, or \c NULL if \c - * \c @synthesize was not used, and therefore no instance variable exists. This - * would also be the case if the property is implemented dynamically. - */ - const char *ivar; - - /** - * If this property is defined as being an instance of a specific class, - * this will be the class object representing it. - * - * This will be \c nil if the property was defined as type \c id, if the - * property is not of an object type, or if the class could not be found at - * runtime. - */ - Class objectClass; - - /** - * The type encoding for the value of this property. This is the type as it - * would be returned by the \c \@encode() directive. - */ - char type[]; -} mtl_propertyAttributes; - -/** - * Returns a pointer to a structure containing information about \a property. - * You must \c free() the returned pointer. Returns \c NULL if there is an error - * obtaining information from \a property. - */ -mtl_propertyAttributes *mtl_copyPropertyAttributes (objc_property_t property); diff --git a/Pods/Mantle/Mantle/extobjc/EXTRuntimeExtensions.m b/Pods/Mantle/Mantle/extobjc/EXTRuntimeExtensions.m deleted file mode 100644 index 6a034b0..0000000 --- a/Pods/Mantle/Mantle/extobjc/EXTRuntimeExtensions.m +++ /dev/null @@ -1,211 +0,0 @@ -// -// EXTRuntimeExtensions.m -// extobjc -// -// Created by Justin Spahr-Summers on 2011-03-05. -// Copyright (C) 2012 Justin Spahr-Summers. -// Released under the MIT license. -// - -#import "EXTRuntimeExtensions.h" - -#import - -mtl_propertyAttributes *mtl_copyPropertyAttributes (objc_property_t property) { - const char * const attrString = property_getAttributes(property); - if (!attrString) { - fprintf(stderr, "ERROR: Could not get attribute string from property %s\n", property_getName(property)); - return NULL; - } - - if (attrString[0] != 'T') { - fprintf(stderr, "ERROR: Expected attribute string \"%s\" for property %s to start with 'T'\n", attrString, property_getName(property)); - return NULL; - } - - const char *typeString = attrString + 1; - const char *next = NSGetSizeAndAlignment(typeString, NULL, NULL); - if (!next) { - fprintf(stderr, "ERROR: Could not read past type in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); - return NULL; - } - - size_t typeLength = next - typeString; - if (!typeLength) { - fprintf(stderr, "ERROR: Invalid type in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); - return NULL; - } - - // allocate enough space for the structure and the type string (plus a NUL) - mtl_propertyAttributes *attributes = calloc(1, sizeof(mtl_propertyAttributes) + typeLength + 1); - if (!attributes) { - fprintf(stderr, "ERROR: Could not allocate mtl_propertyAttributes structure for attribute string \"%s\" for property %s\n", attrString, property_getName(property)); - return NULL; - } - - // copy the type string - strncpy(attributes->type, typeString, typeLength); - attributes->type[typeLength] = '\0'; - - // if this is an object type, and immediately followed by a quoted string... - if (typeString[0] == *(@encode(id)) && typeString[1] == '"') { - // we should be able to extract a class name - const char *className = typeString + 2; - next = strchr(className, '"'); - - if (!next) { - fprintf(stderr, "ERROR: Could not read class name in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); - return NULL; - } - - if (className != next) { - size_t classNameLength = next - className; - char trimmedName[classNameLength + 1]; - - strncpy(trimmedName, className, classNameLength); - trimmedName[classNameLength] = '\0'; - - // attempt to look up the class in the runtime - attributes->objectClass = objc_getClass(trimmedName); - } - } - - if (*next != '\0') { - // skip past any junk before the first flag - next = strchr(next, ','); - } - - while (next && *next == ',') { - char flag = next[1]; - next += 2; - - switch (flag) { - case '\0': - break; - - case 'R': - attributes->readonly = YES; - break; - - case 'C': - attributes->memoryManagementPolicy = mtl_propertyMemoryManagementPolicyCopy; - break; - - case '&': - attributes->memoryManagementPolicy = mtl_propertyMemoryManagementPolicyRetain; - break; - - case 'N': - attributes->nonatomic = YES; - break; - - case 'G': - case 'S': - { - const char *nextFlag = strchr(next, ','); - SEL name = NULL; - - if (!nextFlag) { - // assume that the rest of the string is the selector - const char *selectorString = next; - next = ""; - - name = sel_registerName(selectorString); - } else { - size_t selectorLength = nextFlag - next; - if (!selectorLength) { - fprintf(stderr, "ERROR: Found zero length selector name in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); - goto errorOut; - } - - char selectorString[selectorLength + 1]; - - strncpy(selectorString, next, selectorLength); - selectorString[selectorLength] = '\0'; - - name = sel_registerName(selectorString); - next = nextFlag; - } - - if (flag == 'G') - attributes->getter = name; - else - attributes->setter = name; - } - - break; - - case 'D': - attributes->dynamic = YES; - attributes->ivar = NULL; - break; - - case 'V': - // assume that the rest of the string (if present) is the ivar name - if (*next == '\0') { - // if there's nothing there, let's assume this is dynamic - attributes->ivar = NULL; - } else { - attributes->ivar = next; - next = ""; - } - - break; - - case 'W': - attributes->weak = YES; - break; - - case 'P': - attributes->canBeCollected = YES; - break; - - case 't': - fprintf(stderr, "ERROR: Old-style type encoding is unsupported in attribute string \"%s\" for property %s\n", attrString, property_getName(property)); - - // skip over this type encoding - while (*next != ',' && *next != '\0') - ++next; - - break; - - default: - fprintf(stderr, "ERROR: Unrecognized attribute string flag '%c' in attribute string \"%s\" for property %s\n", flag, attrString, property_getName(property)); - } - } - - if (next && *next != '\0') { - fprintf(stderr, "Warning: Unparsed data \"%s\" in attribute string \"%s\" for property %s\n", next, attrString, property_getName(property)); - } - - if (!attributes->getter) { - // use the property name as the getter by default - attributes->getter = sel_registerName(property_getName(property)); - } - - if (!attributes->setter) { - const char *propertyName = property_getName(property); - size_t propertyNameLength = strlen(propertyName); - - // we want to transform the name to setProperty: style - size_t setterLength = propertyNameLength + 4; - - char setterName[setterLength + 1]; - strncpy(setterName, "set", 3); - strncpy(setterName + 3, propertyName, propertyNameLength); - - // capitalize property name for the setter - setterName[3] = (char)toupper(setterName[3]); - - setterName[setterLength - 1] = ':'; - setterName[setterLength] = '\0'; - - attributes->setter = sel_registerName(setterName); - } - - return attributes; - -errorOut: - free(attributes); - return NULL; -} diff --git a/Pods/Mantle/Mantle/extobjc/EXTScope.h b/Pods/Mantle/Mantle/extobjc/EXTScope.h deleted file mode 100644 index 7548b81..0000000 --- a/Pods/Mantle/Mantle/extobjc/EXTScope.h +++ /dev/null @@ -1,99 +0,0 @@ -// -// EXTScope.h -// extobjc -// -// Created by Justin Spahr-Summers on 2011-05-04. -// Copyright (C) 2012 Justin Spahr-Summers. -// Released under the MIT license. -// - -#import "metamacros.h" - -/** - * \@onExit defines some code to be executed when the current scope exits. The - * code must be enclosed in braces and terminated with a semicolon, and will be - * executed regardless of how the scope is exited, including from exceptions, - * \c goto, \c return, \c break, and \c continue. - * - * Provided code will go into a block to be executed later. Keep this in mind as - * it pertains to memory management, restrictions on assignment, etc. Because - * the code is used within a block, \c return is a legal (though perhaps - * confusing) way to exit the cleanup block early. - * - * Multiple \@onExit statements in the same scope are executed in reverse - * lexical order. This helps when pairing resource acquisition with \@onExit - * statements, as it guarantees teardown in the opposite order of acquisition. - * - * @note This statement cannot be used within scopes defined without braces - * (like a one line \c if). In practice, this is not an issue, since \@onExit is - * a useless construct in such a case anyways. - */ -#define onExit \ - try {} @finally {} \ - __strong mtl_cleanupBlock_t metamacro_concat(mtl_exitBlock_, __LINE__) __attribute__((cleanup(mtl_executeCleanupBlock), unused)) = ^ - -/** - * Creates \c __weak shadow variables for each of the variables provided as - * arguments, which can later be made strong again with #strongify. - * - * This is typically used to weakly reference variables in a block, but then - * ensure that the variables stay alive during the actual execution of the block - * (if they were live upon entry). - * - * See #strongify for an example of usage. - */ -#define weakify(...) \ - try {} @finally {} \ - metamacro_foreach_cxt(mtl_weakify_,, __weak, __VA_ARGS__) - -/** - * Like #weakify, but uses \c __unsafe_unretained instead, for targets or - * classes that do not support weak references. - */ -#define unsafeify(...) \ - try {} @finally {} \ - metamacro_foreach_cxt(mtl_weakify_,, __unsafe_unretained, __VA_ARGS__) - -/** - * Strongly references each of the variables provided as arguments, which must - * have previously been passed to #weakify. - * - * The strong references created will shadow the original variable names, such - * that the original names can be used without issue (and a significantly - * reduced risk of retain cycles) in the current scope. - * - * @code - - id foo = [[NSObject alloc] init]; - id bar = [[NSObject alloc] init]; - - @weakify(foo, bar); - - // this block will not keep 'foo' or 'bar' alive - BOOL (^matchesFooOrBar)(id) = ^ BOOL (id obj){ - // but now, upon entry, 'foo' and 'bar' will stay alive until the block has - // finished executing - @strongify(foo, bar); - - return [foo isEqual:obj] || [bar isEqual:obj]; - }; - - * @endcode - */ -#define strongify(...) \ - try {} @finally {} \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wshadow\"") \ - metamacro_foreach(mtl_strongify_,, __VA_ARGS__) \ - _Pragma("clang diagnostic pop") - -/*** implementation details follow ***/ -typedef void (^mtl_cleanupBlock_t)(); - -void mtl_executeCleanupBlock (__strong mtl_cleanupBlock_t *block); - -#define mtl_weakify_(INDEX, CONTEXT, VAR) \ - CONTEXT __typeof__(VAR) metamacro_concat(VAR, _weak_) = (VAR); - -#define mtl_strongify_(INDEX, VAR) \ - __strong __typeof__(VAR) VAR = metamacro_concat(VAR, _weak_); diff --git a/Pods/Mantle/Mantle/extobjc/EXTScope.m b/Pods/Mantle/Mantle/extobjc/EXTScope.m deleted file mode 100644 index b34c1c6..0000000 --- a/Pods/Mantle/Mantle/extobjc/EXTScope.m +++ /dev/null @@ -1,15 +0,0 @@ -// -// EXTScope.m -// extobjc -// -// Created by Justin Spahr-Summers on 2011-05-04. -// Copyright (C) 2012 Justin Spahr-Summers. -// Released under the MIT license. -// - -#import "EXTScope.h" - -void mtl_executeCleanupBlock (__strong mtl_cleanupBlock_t *block) { - (*block)(); -} - diff --git a/Pods/Mantle/Mantle/extobjc/metamacros.h b/Pods/Mantle/Mantle/extobjc/metamacros.h deleted file mode 100644 index 77a77b5..0000000 --- a/Pods/Mantle/Mantle/extobjc/metamacros.h +++ /dev/null @@ -1,666 +0,0 @@ -/** - * Macros for metaprogramming - * ExtendedC - * - * Copyright (C) 2012 Justin Spahr-Summers - * Released under the MIT license - */ - -#ifndef EXTC_METAMACROS_H -#define EXTC_METAMACROS_H - -/** - * Executes one or more expressions (which may have a void type, such as a call - * to a function that returns no value) and always returns true. - */ -#define metamacro_exprify(...) \ - ((__VA_ARGS__), true) - -/** - * Returns a string representation of VALUE after full macro expansion. - */ -#define metamacro_stringify(VALUE) \ - metamacro_stringify_(VALUE) - -/** - * Returns A and B concatenated after full macro expansion. - */ -#define metamacro_concat(A, B) \ - metamacro_concat_(A, B) - -/** - * Returns the Nth variadic argument (starting from zero). At least - * N + 1 variadic arguments must be given. N must be between zero and twenty, - * inclusive. - */ -#define metamacro_at(N, ...) \ - metamacro_concat(metamacro_at, N)(__VA_ARGS__) - -/** - * Returns the number of arguments (up to twenty) provided to the macro. At - * least one argument must be provided. - * - * Inspired by P99: http://p99.gforge.inria.fr - */ -#define metamacro_argcount(...) \ - metamacro_at(20, __VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) - -/** - * Identical to #metamacro_foreach_cxt, except that no CONTEXT argument is - * given. Only the index and current argument will thus be passed to MACRO. - */ -#define metamacro_foreach(MACRO, SEP, ...) \ - metamacro_foreach_cxt(metamacro_foreach_iter, SEP, MACRO, __VA_ARGS__) - -/** - * For each consecutive variadic argument (up to twenty), MACRO is passed the - * zero-based index of the current argument, CONTEXT, and then the argument - * itself. The results of adjoining invocations of MACRO are then separated by - * SEP. - * - * Inspired by P99: http://p99.gforge.inria.fr - */ -#define metamacro_foreach_cxt(MACRO, SEP, CONTEXT, ...) \ - metamacro_concat(metamacro_foreach_cxt, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) - -/** - * Identical to #metamacro_foreach_cxt. This can be used when the former would - * fail due to recursive macro expansion. - */ -#define metamacro_foreach_cxt_recursive(MACRO, SEP, CONTEXT, ...) \ - metamacro_concat(metamacro_foreach_cxt_recursive, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) - -/** - * In consecutive order, appends each variadic argument (up to twenty) onto - * BASE. The resulting concatenations are then separated by SEP. - * - * This is primarily useful to manipulate a list of macro invocations into instead - * invoking a different, possibly related macro. - */ -#define metamacro_foreach_concat(BASE, SEP, ...) \ - metamacro_foreach_cxt(metamacro_foreach_concat_iter, SEP, BASE, __VA_ARGS__) - -/** - * Iterates COUNT times, each time invoking MACRO with the current index - * (starting at zero) and CONTEXT. The results of adjoining invocations of MACRO - * are then separated by SEP. - * - * COUNT must be an integer between zero and twenty, inclusive. - */ -#define metamacro_for_cxt(COUNT, MACRO, SEP, CONTEXT) \ - metamacro_concat(metamacro_for_cxt, COUNT)(MACRO, SEP, CONTEXT) - -/** - * Returns the first argument given. At least one argument must be provided. - * - * This is useful when implementing a variadic macro, where you may have only - * one variadic argument, but no way to retrieve it (for example, because \c ... - * always needs to match at least one argument). - * - * @code - -#define varmacro(...) \ - metamacro_head(__VA_ARGS__) - - * @endcode - */ -#define metamacro_head(...) \ - metamacro_head_(__VA_ARGS__, 0) - -/** - * Returns every argument except the first. At least two arguments must be - * provided. - */ -#define metamacro_tail(...) \ - metamacro_tail_(__VA_ARGS__) - -/** - * Returns the first N (up to twenty) variadic arguments as a new argument list. - * At least N variadic arguments must be provided. - */ -#define metamacro_take(N, ...) \ - metamacro_concat(metamacro_take, N)(__VA_ARGS__) - -/** - * Removes the first N (up to twenty) variadic arguments from the given argument - * list. At least N variadic arguments must be provided. - */ -#define metamacro_drop(N, ...) \ - metamacro_concat(metamacro_drop, N)(__VA_ARGS__) - -/** - * Decrements VAL, which must be a number between zero and twenty, inclusive. - * - * This is primarily useful when dealing with indexes and counts in - * metaprogramming. - */ -#define metamacro_dec(VAL) \ - metamacro_at(VAL, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) - -/** - * Increments VAL, which must be a number between zero and twenty, inclusive. - * - * This is primarily useful when dealing with indexes and counts in - * metaprogramming. - */ -#define metamacro_inc(VAL) \ - metamacro_at(VAL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) - -/** - * If A is equal to B, the next argument list is expanded; otherwise, the - * argument list after that is expanded. A and B must be numbers between zero - * and twenty, inclusive. Additionally, B must be greater than or equal to A. - * - * @code - -// expands to true -metamacro_if_eq(0, 0)(true)(false) - -// expands to false -metamacro_if_eq(0, 1)(true)(false) - - * @endcode - * - * This is primarily useful when dealing with indexes and counts in - * metaprogramming. - */ -#define metamacro_if_eq(A, B) \ - metamacro_concat(metamacro_if_eq, A)(B) - -/** - * Identical to #metamacro_if_eq. This can be used when the former would fail - * due to recursive macro expansion. - */ -#define metamacro_if_eq_recursive(A, B) \ - metamacro_concat(metamacro_if_eq_recursive, A)(B) - -/** - * Returns 1 if N is an even number, or 0 otherwise. N must be between zero and - * twenty, inclusive. - * - * For the purposes of this test, zero is considered even. - */ -#define metamacro_is_even(N) \ - metamacro_at(N, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1) - -/** - * Returns the logical NOT of B, which must be the number zero or one. - */ -#define metamacro_not(B) \ - metamacro_at(B, 1, 0) - -// IMPLEMENTATION DETAILS FOLLOW! -// Do not write code that depends on anything below this line. -#define metamacro_stringify_(VALUE) # VALUE -#define metamacro_concat_(A, B) A ## B -#define metamacro_foreach_iter(INDEX, MACRO, ARG) MACRO(INDEX, ARG) -#define metamacro_head_(FIRST, ...) FIRST -#define metamacro_tail_(FIRST, ...) __VA_ARGS__ -#define metamacro_consume_(...) -#define metamacro_expand_(...) __VA_ARGS__ - -// implemented from scratch so that metamacro_concat() doesn't end up nesting -#define metamacro_foreach_concat_iter(INDEX, BASE, ARG) metamacro_foreach_concat_iter_(BASE, ARG) -#define metamacro_foreach_concat_iter_(BASE, ARG) BASE ## ARG - -// metamacro_at expansions -#define metamacro_at0(...) metamacro_head(__VA_ARGS__) -#define metamacro_at1(_0, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at2(_0, _1, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at3(_0, _1, _2, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at4(_0, _1, _2, _3, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at5(_0, _1, _2, _3, _4, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at6(_0, _1, _2, _3, _4, _5, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at7(_0, _1, _2, _3, _4, _5, _6, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at8(_0, _1, _2, _3, _4, _5, _6, _7, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at9(_0, _1, _2, _3, _4, _5, _6, _7, _8, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at10(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at11(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at12(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at13(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at14(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at15(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at17(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at18(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at19(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, ...) metamacro_head(__VA_ARGS__) -#define metamacro_at20(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, ...) metamacro_head(__VA_ARGS__) - -// metamacro_foreach_cxt expansions -#define metamacro_foreach_cxt0(MACRO, SEP, CONTEXT) -#define metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) - -#define metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ - metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) \ - SEP \ - MACRO(1, CONTEXT, _1) - -#define metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ - metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ - SEP \ - MACRO(2, CONTEXT, _2) - -#define metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ - metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ - SEP \ - MACRO(3, CONTEXT, _3) - -#define metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ - metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ - SEP \ - MACRO(4, CONTEXT, _4) - -#define metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ - metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ - SEP \ - MACRO(5, CONTEXT, _5) - -#define metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ - metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ - SEP \ - MACRO(6, CONTEXT, _6) - -#define metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ - metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ - SEP \ - MACRO(7, CONTEXT, _7) - -#define metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ - metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ - SEP \ - MACRO(8, CONTEXT, _8) - -#define metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ - metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ - SEP \ - MACRO(9, CONTEXT, _9) - -#define metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ - metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ - SEP \ - MACRO(10, CONTEXT, _10) - -#define metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ - metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ - SEP \ - MACRO(11, CONTEXT, _11) - -#define metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ - metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ - SEP \ - MACRO(12, CONTEXT, _12) - -#define metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ - metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ - SEP \ - MACRO(13, CONTEXT, _13) - -#define metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ - metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ - SEP \ - MACRO(14, CONTEXT, _14) - -#define metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ - metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ - SEP \ - MACRO(15, CONTEXT, _15) - -#define metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ - metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ - SEP \ - MACRO(16, CONTEXT, _16) - -#define metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ - metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ - SEP \ - MACRO(17, CONTEXT, _17) - -#define metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ - metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ - SEP \ - MACRO(18, CONTEXT, _18) - -#define metamacro_foreach_cxt20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ - metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ - SEP \ - MACRO(19, CONTEXT, _19) - -// metamacro_foreach_cxt_recursive expansions -#define metamacro_foreach_cxt_recursive0(MACRO, SEP, CONTEXT) -#define metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) - -#define metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ - metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) \ - SEP \ - MACRO(1, CONTEXT, _1) - -#define metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ - metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ - SEP \ - MACRO(2, CONTEXT, _2) - -#define metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ - metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ - SEP \ - MACRO(3, CONTEXT, _3) - -#define metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ - metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ - SEP \ - MACRO(4, CONTEXT, _4) - -#define metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ - metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ - SEP \ - MACRO(5, CONTEXT, _5) - -#define metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ - metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ - SEP \ - MACRO(6, CONTEXT, _6) - -#define metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ - metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ - SEP \ - MACRO(7, CONTEXT, _7) - -#define metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ - metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ - SEP \ - MACRO(8, CONTEXT, _8) - -#define metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ - metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ - SEP \ - MACRO(9, CONTEXT, _9) - -#define metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ - metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ - SEP \ - MACRO(10, CONTEXT, _10) - -#define metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ - metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ - SEP \ - MACRO(11, CONTEXT, _11) - -#define metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ - metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ - SEP \ - MACRO(12, CONTEXT, _12) - -#define metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ - metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ - SEP \ - MACRO(13, CONTEXT, _13) - -#define metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ - metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ - SEP \ - MACRO(14, CONTEXT, _14) - -#define metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ - metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ - SEP \ - MACRO(15, CONTEXT, _15) - -#define metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ - metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ - SEP \ - MACRO(16, CONTEXT, _16) - -#define metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ - metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ - SEP \ - MACRO(17, CONTEXT, _17) - -#define metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ - metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ - SEP \ - MACRO(18, CONTEXT, _18) - -#define metamacro_foreach_cxt_recursive20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ - metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ - SEP \ - MACRO(19, CONTEXT, _19) - -// metamacro_for_cxt expansions -#define metamacro_for_cxt0(MACRO, SEP, CONTEXT) -#define metamacro_for_cxt1(MACRO, SEP, CONTEXT) MACRO(0, CONTEXT) - -#define metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt1(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(1, CONTEXT) - -#define metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(2, CONTEXT) - -#define metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(3, CONTEXT) - -#define metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(4, CONTEXT) - -#define metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(5, CONTEXT) - -#define metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(6, CONTEXT) - -#define metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(7, CONTEXT) - -#define metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(8, CONTEXT) - -#define metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(9, CONTEXT) - -#define metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(10, CONTEXT) - -#define metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(11, CONTEXT) - -#define metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(12, CONTEXT) - -#define metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(13, CONTEXT) - -#define metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(14, CONTEXT) - -#define metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(15, CONTEXT) - -#define metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(16, CONTEXT) - -#define metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(17, CONTEXT) - -#define metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(18, CONTEXT) - -#define metamacro_for_cxt20(MACRO, SEP, CONTEXT) \ - metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ - SEP \ - MACRO(19, CONTEXT) - -// metamacro_if_eq expansions -#define metamacro_if_eq0(VALUE) \ - metamacro_concat(metamacro_if_eq0_, VALUE) - -#define metamacro_if_eq0_0(...) __VA_ARGS__ metamacro_consume_ -#define metamacro_if_eq0_1(...) metamacro_expand_ -#define metamacro_if_eq0_2(...) metamacro_expand_ -#define metamacro_if_eq0_3(...) metamacro_expand_ -#define metamacro_if_eq0_4(...) metamacro_expand_ -#define metamacro_if_eq0_5(...) metamacro_expand_ -#define metamacro_if_eq0_6(...) metamacro_expand_ -#define metamacro_if_eq0_7(...) metamacro_expand_ -#define metamacro_if_eq0_8(...) metamacro_expand_ -#define metamacro_if_eq0_9(...) metamacro_expand_ -#define metamacro_if_eq0_10(...) metamacro_expand_ -#define metamacro_if_eq0_11(...) metamacro_expand_ -#define metamacro_if_eq0_12(...) metamacro_expand_ -#define metamacro_if_eq0_13(...) metamacro_expand_ -#define metamacro_if_eq0_14(...) metamacro_expand_ -#define metamacro_if_eq0_15(...) metamacro_expand_ -#define metamacro_if_eq0_16(...) metamacro_expand_ -#define metamacro_if_eq0_17(...) metamacro_expand_ -#define metamacro_if_eq0_18(...) metamacro_expand_ -#define metamacro_if_eq0_19(...) metamacro_expand_ -#define metamacro_if_eq0_20(...) metamacro_expand_ - -#define metamacro_if_eq1(VALUE) metamacro_if_eq0(metamacro_dec(VALUE)) -#define metamacro_if_eq2(VALUE) metamacro_if_eq1(metamacro_dec(VALUE)) -#define metamacro_if_eq3(VALUE) metamacro_if_eq2(metamacro_dec(VALUE)) -#define metamacro_if_eq4(VALUE) metamacro_if_eq3(metamacro_dec(VALUE)) -#define metamacro_if_eq5(VALUE) metamacro_if_eq4(metamacro_dec(VALUE)) -#define metamacro_if_eq6(VALUE) metamacro_if_eq5(metamacro_dec(VALUE)) -#define metamacro_if_eq7(VALUE) metamacro_if_eq6(metamacro_dec(VALUE)) -#define metamacro_if_eq8(VALUE) metamacro_if_eq7(metamacro_dec(VALUE)) -#define metamacro_if_eq9(VALUE) metamacro_if_eq8(metamacro_dec(VALUE)) -#define metamacro_if_eq10(VALUE) metamacro_if_eq9(metamacro_dec(VALUE)) -#define metamacro_if_eq11(VALUE) metamacro_if_eq10(metamacro_dec(VALUE)) -#define metamacro_if_eq12(VALUE) metamacro_if_eq11(metamacro_dec(VALUE)) -#define metamacro_if_eq13(VALUE) metamacro_if_eq12(metamacro_dec(VALUE)) -#define metamacro_if_eq14(VALUE) metamacro_if_eq13(metamacro_dec(VALUE)) -#define metamacro_if_eq15(VALUE) metamacro_if_eq14(metamacro_dec(VALUE)) -#define metamacro_if_eq16(VALUE) metamacro_if_eq15(metamacro_dec(VALUE)) -#define metamacro_if_eq17(VALUE) metamacro_if_eq16(metamacro_dec(VALUE)) -#define metamacro_if_eq18(VALUE) metamacro_if_eq17(metamacro_dec(VALUE)) -#define metamacro_if_eq19(VALUE) metamacro_if_eq18(metamacro_dec(VALUE)) -#define metamacro_if_eq20(VALUE) metamacro_if_eq19(metamacro_dec(VALUE)) - -// metamacro_if_eq_recursive expansions -#define metamacro_if_eq_recursive0(VALUE) \ - metamacro_concat(metamacro_if_eq_recursive0_, VALUE) - -#define metamacro_if_eq_recursive0_0(...) __VA_ARGS__ metamacro_consume_ -#define metamacro_if_eq_recursive0_1(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_2(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_3(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_4(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_5(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_6(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_7(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_8(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_9(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_10(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_11(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_12(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_13(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_14(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_15(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_16(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_17(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_18(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_19(...) metamacro_expand_ -#define metamacro_if_eq_recursive0_20(...) metamacro_expand_ - -#define metamacro_if_eq_recursive1(VALUE) metamacro_if_eq_recursive0(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive2(VALUE) metamacro_if_eq_recursive1(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive3(VALUE) metamacro_if_eq_recursive2(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive4(VALUE) metamacro_if_eq_recursive3(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive5(VALUE) metamacro_if_eq_recursive4(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive6(VALUE) metamacro_if_eq_recursive5(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive7(VALUE) metamacro_if_eq_recursive6(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive8(VALUE) metamacro_if_eq_recursive7(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive9(VALUE) metamacro_if_eq_recursive8(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive10(VALUE) metamacro_if_eq_recursive9(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive11(VALUE) metamacro_if_eq_recursive10(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive12(VALUE) metamacro_if_eq_recursive11(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive13(VALUE) metamacro_if_eq_recursive12(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive14(VALUE) metamacro_if_eq_recursive13(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive15(VALUE) metamacro_if_eq_recursive14(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive16(VALUE) metamacro_if_eq_recursive15(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive17(VALUE) metamacro_if_eq_recursive16(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive18(VALUE) metamacro_if_eq_recursive17(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive19(VALUE) metamacro_if_eq_recursive18(metamacro_dec(VALUE)) -#define metamacro_if_eq_recursive20(VALUE) metamacro_if_eq_recursive19(metamacro_dec(VALUE)) - -// metamacro_take expansions -#define metamacro_take0(...) -#define metamacro_take1(...) metamacro_head(__VA_ARGS__) -#define metamacro_take2(...) metamacro_head(__VA_ARGS__), metamacro_take1(metamacro_tail(__VA_ARGS__)) -#define metamacro_take3(...) metamacro_head(__VA_ARGS__), metamacro_take2(metamacro_tail(__VA_ARGS__)) -#define metamacro_take4(...) metamacro_head(__VA_ARGS__), metamacro_take3(metamacro_tail(__VA_ARGS__)) -#define metamacro_take5(...) metamacro_head(__VA_ARGS__), metamacro_take4(metamacro_tail(__VA_ARGS__)) -#define metamacro_take6(...) metamacro_head(__VA_ARGS__), metamacro_take5(metamacro_tail(__VA_ARGS__)) -#define metamacro_take7(...) metamacro_head(__VA_ARGS__), metamacro_take6(metamacro_tail(__VA_ARGS__)) -#define metamacro_take8(...) metamacro_head(__VA_ARGS__), metamacro_take7(metamacro_tail(__VA_ARGS__)) -#define metamacro_take9(...) metamacro_head(__VA_ARGS__), metamacro_take8(metamacro_tail(__VA_ARGS__)) -#define metamacro_take10(...) metamacro_head(__VA_ARGS__), metamacro_take9(metamacro_tail(__VA_ARGS__)) -#define metamacro_take11(...) metamacro_head(__VA_ARGS__), metamacro_take10(metamacro_tail(__VA_ARGS__)) -#define metamacro_take12(...) metamacro_head(__VA_ARGS__), metamacro_take11(metamacro_tail(__VA_ARGS__)) -#define metamacro_take13(...) metamacro_head(__VA_ARGS__), metamacro_take12(metamacro_tail(__VA_ARGS__)) -#define metamacro_take14(...) metamacro_head(__VA_ARGS__), metamacro_take13(metamacro_tail(__VA_ARGS__)) -#define metamacro_take15(...) metamacro_head(__VA_ARGS__), metamacro_take14(metamacro_tail(__VA_ARGS__)) -#define metamacro_take16(...) metamacro_head(__VA_ARGS__), metamacro_take15(metamacro_tail(__VA_ARGS__)) -#define metamacro_take17(...) metamacro_head(__VA_ARGS__), metamacro_take16(metamacro_tail(__VA_ARGS__)) -#define metamacro_take18(...) metamacro_head(__VA_ARGS__), metamacro_take17(metamacro_tail(__VA_ARGS__)) -#define metamacro_take19(...) metamacro_head(__VA_ARGS__), metamacro_take18(metamacro_tail(__VA_ARGS__)) -#define metamacro_take20(...) metamacro_head(__VA_ARGS__), metamacro_take19(metamacro_tail(__VA_ARGS__)) - -// metamacro_drop expansions -#define metamacro_drop0(...) __VA_ARGS__ -#define metamacro_drop1(...) metamacro_tail(__VA_ARGS__) -#define metamacro_drop2(...) metamacro_drop1(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop3(...) metamacro_drop2(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop4(...) metamacro_drop3(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop5(...) metamacro_drop4(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop6(...) metamacro_drop5(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop7(...) metamacro_drop6(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop8(...) metamacro_drop7(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop9(...) metamacro_drop8(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop10(...) metamacro_drop9(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop11(...) metamacro_drop10(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop12(...) metamacro_drop11(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop13(...) metamacro_drop12(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop14(...) metamacro_drop13(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop15(...) metamacro_drop14(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop16(...) metamacro_drop15(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop17(...) metamacro_drop16(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop18(...) metamacro_drop17(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop19(...) metamacro_drop18(metamacro_tail(__VA_ARGS__)) -#define metamacro_drop20(...) metamacro_drop19(metamacro_tail(__VA_ARGS__)) - -#endif diff --git a/Pods/Mantle/README.md b/Pods/Mantle/README.md deleted file mode 100644 index 33cc76f..0000000 --- a/Pods/Mantle/README.md +++ /dev/null @@ -1,502 +0,0 @@ -# Mantle [](https://github.com/Carthage/Carthage) - -Mantle makes it easy to write a simple model layer for your Cocoa or Cocoa Touch -application. - -## The Typical Model Object - -What's wrong with the way model objects are usually written in Objective-C? - -Let's use the [GitHub API](http://developer.github.com) for demonstration. How -would one typically represent a [GitHub -issue](http://developer.github.com/v3/issues/#get-a-single-issue) in -Objective-C? - -```objc -typedef enum : NSUInteger { - GHIssueStateOpen, - GHIssueStateClosed -} GHIssueState; - -@interface GHIssue : NSObject - -@property (nonatomic, copy, readonly) NSURL *URL; -@property (nonatomic, copy, readonly) NSURL *HTMLURL; -@property (nonatomic, copy, readonly) NSNumber *number; -@property (nonatomic, assign, readonly) GHIssueState state; -@property (nonatomic, copy, readonly) NSString *reporterLogin; -@property (nonatomic, copy, readonly) NSDate *updatedAt; -@property (nonatomic, strong, readonly) GHUser *assignee; -@property (nonatomic, copy, readonly) NSDate *retrievedAt; - -@property (nonatomic, copy) NSString *title; -@property (nonatomic, copy) NSString *body; - -- (id)initWithDictionary:(NSDictionary *)dictionary; - -@end -``` - -```objc -@implementation GHIssue - -+ (NSDateFormatter *)dateFormatter { - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; - dateFormatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss'Z'"; - return dateFormatter; -} - -- (id)initWithDictionary:(NSDictionary *)dictionary { - self = [self init]; - if (self == nil) return nil; - - _URL = [NSURL URLWithString:dictionary[@"url"]]; - _HTMLURL = [NSURL URLWithString:dictionary[@"html_url"]]; - _number = dictionary[@"number"]; - - if ([dictionary[@"state"] isEqualToString:@"open"]) { - _state = GHIssueStateOpen; - } else if ([dictionary[@"state"] isEqualToString:@"closed"]) { - _state = GHIssueStateClosed; - } - - _title = [dictionary[@"title"] copy]; - _retrievedAt = [NSDate date]; - _body = [dictionary[@"body"] copy]; - _reporterLogin = [dictionary[@"user"][@"login"] copy]; - _assignee = [[GHUser alloc] initWithDictionary:dictionary[@"assignee"]]; - - _updatedAt = [self.class.dateFormatter dateFromString:dictionary[@"updated_at"]]; - - return self; -} - -- (id)initWithCoder:(NSCoder *)coder { - self = [self init]; - if (self == nil) return nil; - - _URL = [coder decodeObjectForKey:@"URL"]; - _HTMLURL = [coder decodeObjectForKey:@"HTMLURL"]; - _number = [coder decodeObjectForKey:@"number"]; - _state = [coder decodeUnsignedIntegerForKey:@"state"]; - _title = [coder decodeObjectForKey:@"title"]; - _retrievedAt = [NSDate date]; - _body = [coder decodeObjectForKey:@"body"]; - _reporterLogin = [coder decodeObjectForKey:@"reporterLogin"]; - _assignee = [coder decodeObjectForKey:@"assignee"]; - _updatedAt = [coder decodeObjectForKey:@"updatedAt"]; - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)coder { - if (self.URL != nil) [coder encodeObject:self.URL forKey:@"URL"]; - if (self.HTMLURL != nil) [coder encodeObject:self.HTMLURL forKey:@"HTMLURL"]; - if (self.number != nil) [coder encodeObject:self.number forKey:@"number"]; - if (self.title != nil) [coder encodeObject:self.title forKey:@"title"]; - if (self.body != nil) [coder encodeObject:self.body forKey:@"body"]; - if (self.reporterLogin != nil) [coder encodeObject:self.reporterLogin forKey:@"reporterLogin"]; - if (self.assignee != nil) [coder encodeObject:self.assignee forKey:@"assignee"]; - if (self.updatedAt != nil) [coder encodeObject:self.updatedAt forKey:@"updatedAt"]; - - [coder encodeUnsignedInteger:self.state forKey:@"state"]; -} - -- (id)copyWithZone:(NSZone *)zone { - GHIssue *issue = [[self.class allocWithZone:zone] init]; - issue->_URL = self.URL; - issue->_HTMLURL = self.HTMLURL; - issue->_number = self.number; - issue->_state = self.state; - issue->_reporterLogin = self.reporterLogin; - issue->_assignee = self.assignee; - issue->_updatedAt = self.updatedAt; - - issue.title = self.title; - issue->_retrievedAt = [NSDate date]; - issue.body = self.body; - - return issue; -} - -- (NSUInteger)hash { - return self.number.hash; -} - -- (BOOL)isEqual:(GHIssue *)issue { - if (![issue isKindOfClass:GHIssue.class]) return NO; - - return [self.number isEqual:issue.number] && [self.title isEqual:issue.title] && [self.body isEqual:issue.body]; -} - -@end -``` - -Whew, that's a lot of boilerplate for something so simple! And, even then, there -are some problems that this example doesn't address: - - * There's no way to update a `GHIssue` with new data from the server. - * There's no way to turn a `GHIssue` _back_ into JSON. - * `GHIssueState` shouldn't be encoded as-is. If the enum changes in the future, - existing archives might break. - * If the interface of `GHIssue` changes down the road, existing archives might - break. - -## Why Not Use Core Data? - -Core Data solves certain problems very well. If you need to execute complex -queries across your data, handle a huge object graph with lots of relationships, -or support undo and redo, Core Data is an excellent fit. - -It does, however, come with a couple of pain points: - - * **There's still a lot of boilerplate.** Managed objects reduce some of the - boilerplate seen above, but Core Data has plenty of its own. Correctly - setting up a Core Data stack (with a persistent store and persistent store - coordinator) and executing fetches can take many lines of code. - * **It's hard to get right.** Even experienced developers can make mistakes - when using Core Data, and the framework is not forgiving. - -If you're just trying to access some JSON objects, Core Data can be a lot of -work for little gain. - -Nonetheless, if you're using or want to use Core Data in your app already, -Mantle can still be a convenient translation layer between the API and your -managed model objects. - -## MTLModel - -Enter -**[MTLModel](https://github.com/github/Mantle/blob/master/Mantle/MTLModel.h)**. -This is what `GHIssue` looks like inheriting from `MTLModel`: - -```objc -typedef enum : NSUInteger { - GHIssueStateOpen, - GHIssueStateClosed -} GHIssueState; - -@interface GHIssue : MTLModel - -@property (nonatomic, copy, readonly) NSURL *URL; -@property (nonatomic, copy, readonly) NSURL *HTMLURL; -@property (nonatomic, copy, readonly) NSNumber *number; -@property (nonatomic, assign, readonly) GHIssueState state; -@property (nonatomic, copy, readonly) NSString *reporterLogin; -@property (nonatomic, strong, readonly) GHUser *assignee; -@property (nonatomic, copy, readonly) NSDate *updatedAt; - -@property (nonatomic, copy) NSString *title; -@property (nonatomic, copy) NSString *body; - -@property (nonatomic, copy, readonly) NSDate *retrievedAt; - -@end -``` - -```objc -@implementation GHIssue - -+ (NSDateFormatter *)dateFormatter { - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; - dateFormatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss'Z'"; - return dateFormatter; -} - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"URL": @"url", - @"HTMLURL": @"html_url", - @"number": @"number", - @"state": @"state", - @"reporterLogin": @"user.login", - @"assignee": @"assignee", - @"updatedAt": @"updated_at" - }; -} - -+ (NSValueTransformer *)URLJSONTransformer { - return [NSValueTransformer valueTransformerForName:MTLURLValueTransformerName]; -} - -+ (NSValueTransformer *)HTMLURLJSONTransformer { - return [NSValueTransformer valueTransformerForName:MTLURLValueTransformerName]; -} - -+ (NSValueTransformer *)stateJSONTransformer { - return [NSValueTransformer mtl_valueMappingTransformerWithDictionary:@{ - @"open": @(GHIssueStateOpen), - @"closed": @(GHIssueStateClosed) - }]; -} - -+ (NSValueTransformer *)assigneeJSONTransformer { - return [MTLJSONAdapter dictionaryTransformerWithModelClass:GHUser.class]; -} - -+ (NSValueTransformer *)updatedAtJSONTransformer { - return [MTLValueTransformer transformerUsingForwardBlock:^id(NSString *dateString, BOOL *success, NSError *__autoreleasing *error) { - return [self.dateFormatter dateFromString:dateString]; - } reverseBlock:^id(NSDate *date, BOOL *success, NSError *__autoreleasing *error) { - return [self.dateFormatter stringFromDate:date]; - }]; -} - -- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error { - self = [super initWithDictionary:dictionaryValue error:error]; - if (self == nil) return nil; - - // Store a value that needs to be determined locally upon initialization. - _retrievedAt = [NSDate date]; - - return self; -} - -@end -``` - -Notably absent from this version are implementations of ` `, -` `, `-isEqual:`, and `-hash`. By inspecting the `@property` -declarations you have in your subclass, `MTLModel` can provide default -implementations for all these methods. - -The problems with the original example all happen to be fixed as well: - -> There's no way to update a `GHIssue` with new data from the server. - -`MTLModel` has an extensible `-mergeValuesForKeysFromModel:` method, which makes -it easy to specify how new model data should be integrated. - -> There's no way to turn a `GHIssue` _back_ into JSON. - -This is where reversible transformers really come in handy. `+[MTLJSONAdapter -JSONDictionaryFromModel:error:]` can transform any model object conforming to -` ` back into a JSON dictionary. `+[MTLJSONAdapter -JSONArrayFromModels:error:]` is the same but turns an array of model objects into an JSON array of dictionaries. - -> If the interface of `GHIssue` changes down the road, existing archives might break. - -`MTLModel` automatically saves the version of the model object that was used for -archival. When unarchiving, `-decodeValueForKey:withCoder:modelVersion:` will -be invoked if overridden, giving you a convenient hook to upgrade old data. - -## MTLJSONSerializing - -In order to serialize your model objects from or into JSON, you need to -implement ` ` in your `MTLModel` subclass. This allows you to -use `MTLJSONAdapter` to convert your model objects from JSON and back: - -```objc -NSError *error = nil; -XYUser *user = [MTLJSONAdapter modelOfClass:XYUser.class fromJSONDictionary:JSONDictionary error:&error]; -``` - -```objc -NSError *error = nil; -NSDictionary *JSONDictionary = [MTLJSONAdapter JSONDictionaryFromModel:user error:&error]; -``` - -### `+JSONKeyPathsByPropertyKey` - -The dictionary returned by this method specifies how your model object's -properties map to the keys in the JSON representation, for example: - -```objc - -@interface XYUser : MTLModel - -@property (readonly, nonatomic, copy) NSString *name; -@property (readonly, nonatomic, strong) NSDate *createdAt; - -@property (readonly, nonatomic, assign, getter = isMeUser) BOOL meUser; -@property (readonly, nonatomic, strong) XYHelper *helper; - -@end - -@implementation XYUser - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"name": @"name", - @"createdAt": @"created_at" - }; -} - -- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error { - self = [super initWithDictionary:dictionaryValue error:error]; - if (self == nil) return nil; - - _helper = [XYHelper helperWithName:self.name createdAt:self.createdAt]; - - return self; -} - -@end -``` - -In this example, the `XYUser` class declares four properties that Mantle -handles in different ways: - -- `name` is mapped to a key of the same name in the JSON representation. -- `createdAt` is converted to its snake case equivalent. -- `meUser` is not serialized into JSON. -- `helper` is initialized exactly once after JSON deserialization. - -Use `-[NSDictionary mtl_dictionaryByAddingEntriesFromDictionary:]` if your -model's superclass also implements `MTLJSONSerializing` to merge their mappings. - -If you'd like to map all properties of a Model class to themselves, you can use -the `+[NSDictionary mtl_identityPropertyMapWithModel:]` helper method. - -When deserializing JSON using -`+[MTLJSONAdapter modelOfClass:fromJSONDictionary:error:]`, JSON keys that don't -correspond to a property name or have an explicit mapping are ignored: - -```objc -NSDictionary *JSONDictionary = @{ - @"name": @"john", - @"created_at": @"2013/07/02 16:40:00 +0000", - @"plan": @"lite" -}; - -XYUser *user = [MTLJSONAdapter modelOfClass:XYUser.class fromJSONDictionary:JSONDictionary error:&error]; -``` - -Here, the `plan` would be ignored since it neither matches a property name of -`XYUser` nor is it otherwise mapped in `+JSONKeyPathsByPropertyKey`. - -### `+JSONTransformerForKey:` - -Implement this optional method to convert a property from a different type when -deserializing from JSON. - -``` -+ (NSValueTransformer *)JSONTransformerForKey:(NSString *)key { - if ([key isEqualToString:@"createdAt"]) { - return [NSValueTransformer valueTransformerForName:XYDateValueTransformerName]; - } - - return nil; -} -``` - -For added convenience, if you implement `+ JSONTransformer`, -`MTLJSONAdapter` will use the result of that method instead. For example, dates -that are commonly represented as strings in JSON can be transformed to `NSDate`s -like so: - -```objc - return [MTLValueTransformer transformerUsingForwardBlock:^id(NSString *dateString, BOOL *success, NSError *__autoreleasing *error) { - return [self.dateFormatter dateFromString:dateString]; - } reverseBlock:^id(NSDate *date, BOOL *success, NSError *__autoreleasing *error) { - return [self.dateFormatter stringFromDate:date]; - }]; -} -``` - -If the transformer is reversible, it will also be used when serializing the -object into JSON. - -### `+classForParsingJSONDictionary:` - -If you are implementing a class cluster, implement this optional method to -determine which subclass of your base class should be used when deserializing an -object from JSON. - -```objc -@interface XYMessage : MTLModel - -@end - -@interface XYTextMessage: XYMessage - -@property (readonly, nonatomic, copy) NSString *body; - -@end - -@interface XYPictureMessage : XYMessage - -@property (readonly, nonatomic, strong) NSURL *imageURL; - -@end - -@implementation XYMessage - -+ (Class)classForParsingJSONDictionary:(NSDictionary *)JSONDictionary { - if (JSONDictionary[@"image_url"] != nil) { - return XYPictureMessage.class; - } - - if (JSONDictionary[@"body"] != nil) { - return XYTextMessage.class; - } - - NSAssert(NO, @"No matching class for the JSON dictionary '%@'.", JSONDictionary); - return self; -} - -@end -``` - -`MTLJSONAdapter` will then pick the class based on the JSON dictionary you pass -in: - -```objc -NSDictionary *textMessage = @{ - @"id": @1, - @"body": @"Hello World!" -}; - -NSDictionary *pictureMessage = @{ - @"id": @2, - @"image_url": @"http://example.com/lolcat.gif" -}; - -XYTextMessage *messageA = [MTLJSONAdapter modelOfClass:XYMessage.class fromJSONDictionary:textMessage error:NULL]; - -XYPictureMessage *messageB = [MTLJSONAdapter modelOfClass:XYMessage.class fromJSONDictionary:pictureMessage error:NULL]; -``` - -## Persistence - -Mantle doesn't automatically persist your objects for you. However, `MTLModel` -does conform to ` `, so model objects can be archived to disk using -`NSKeyedArchiver`. - -If you need something more powerful, or want to avoid keeping your whole model -in memory at once, Core Data may be a better choice. - -## System Requirements - -Mantle supports OS X 10.9+ and iOS 8.0+. - -## Importing Mantle - -To add Mantle to your application: - - 1. Add the Mantle repository as a submodule of your application's repository. - 1. Run `script/bootstrap` from within the Mantle folder. - 1. Drag and drop `Mantle.xcodeproj` into your application's Xcode project. Unfortunately, an [Xcode bug](http://www.openradar.appspot.com/19676555) means you should probably not add it to a workspace. - 1. On the "General" tab of your application target, add `Mantle.framework` to the "Embedded Binaries". - -[Carthage](https://github.com/Carthage/Carthage) users can simply add Mantle to their `Cartfile`: -``` -github "Mantle/Mantle" -``` - -If you would prefer to use [CocoaPods](http://cocoapods.org), there are some -[Mantle podspecs](https://github.com/CocoaPods/Specs/tree/master/Specs/Mantle) that -have been generously contributed by third parties. - -If you’re instead developing Mantle on its own, use the `Mantle.xcworkspace` file. - -## License - -Mantle is released under the MIT license. See -[LICENSE.md](https://github.com/github/Mantle/blob/master/LICENSE.md). - -## More Info - -Have a question? Please [open an issue](https://github.com/Mantle/Mantle/issues/new)! diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 432c416..e209fa1 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -7,387 +7,283 @@ objects = { /* Begin PBXBuildFile section */ - 034A0BC8D482F341468FB07AA8547F30 /* NSObject+YYModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7044A8D4DEB32AE1FA59742A904E261E /* NSObject+YYModel.m */; }; - 04A416BF54F937DAE3D19FE50DA72202 /* UIButton+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 6AFE8F4319CD04A43C5F9F851D4D1AE5 /* UIButton+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04A4FE6BC333B1FC7D35EADA8F59FAD6 /* MTLJSONAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 42FBDAB19198DA5E8A6A3B448FD556E9 /* MTLJSONAdapter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 04E0EFD308A39DA6783F9004C5689973 /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E464569961AF11674198443B94636B /* JSONValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0563227B6D480B862CA5EF8C36DF51A4 /* MTLModel+NSCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = FFDF7671CC822F08C6B0EE507E27F989 /* MTLModel+NSCoding.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0659C55D67614156ACE73EF681E30DC7 /* UIRefreshControl+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = B56AFC45F43DE6CACFF0F1D3895F77BD /* UIRefreshControl+AFNetworking.m */; }; - 06B93267BE4B80B2B4B91E5EFCE386D2 /* MTLModel.m in Sources */ = {isa = PBXBuildFile; fileRef = DED5C6E3D1B56EB65D8D732EB4A3DCF7 /* MTLModel.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 0AFABD28B2E5C3292603A36599055EA7 /* MJDictionaryCache.h in Headers */ = {isa = PBXBuildFile; fileRef = F376B0AD431DE9EC2C768F4164E34554 /* MJDictionaryCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0C2B33BE64F0CF1C6ED2B2200953568E /* MJExtensionConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 90C054DEF8692887256ADE1349AA8187 /* MJExtensionConst.m */; }; - 0CCB6B307EBF17E2D0E3A6AD52F6F51E /* EXTScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E20A5EA56DAA20CB23ED97E3A4114B /* EXTScope.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 0E4FD75ECCFD6A179057653D9BA711CD /* AFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 87F27AB9477FB2BF28FB99D27E248FC2 /* AFURLRequestSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1050F5E599DEA3C0FA7990B9C56E4073 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9656F51F4F66896775CFCEF013C09396 /* Security.framework */; }; - 10B5AA3FFC425BAFB7A81C4B1C19CC1A /* NSObject+MJCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = B15AE9442D0520B46513D5F6C0989C9A /* NSObject+MJCoding.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 11BD5AE4F92EFD5DB5772947204A678C /* NSObject+MJKeyValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AD8C5D8E09BBD5A4AC2D3690AC606B3 /* NSObject+MJKeyValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 128993FF267CC0FA8EE6889C6AEC2EC3 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = D58F7CF62CECDDCFFB2CE8DB8ED95FFD /* JSONModelArray.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 136FB41CEB8D026BA1B0E0C514CD90F7 /* AFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = EA23824EA0DCACBB83504576391BA94B /* AFURLResponseSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F67635944C4C8A9A87FDD7CD101A2A /* NSObject+MJCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D69A13A6EB2072FBC53D4512340BD40 /* NSObject+MJCoding.m */; }; - 16A189CC65DC66678D3D637ED8B5B5FF /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CB1AA1881672BAF9306471FC500786C /* JSONModel+networking.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 17A59C9B4F5727FAF9E3A6D92A9FFABD /* EXTRuntimeExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = E1218B003261203A4479CAEAC42EA6C3 /* EXTRuntimeExtensions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 17D8C9D90B9DCDE1B8B9D5ECF8DADCEC /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C304F8FED1D085E22FD1280B5D77586 /* JSONModelError.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 19D81E345715F41ED29349DBFF389D55 /* NSDictionary+MTLMappingAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E9E935EA1107C516DB16A8664A7E0D /* NSDictionary+MTLMappingAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1AB882D96B82AD38881CF0BC68862326 /* YYClassInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 18934327AC3301B847335FA1F1FBB9D0 /* YYClassInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 205F51216177E22CD1AE443745B8A119 /* AFNetworking-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B3023923DDE19B5616A2B21AB3C9CF7 /* AFNetworking-dummy.m */; }; - 216E5A12ACFD64B84DC1A2E253336D9B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF74AE1072D0E171334111EA616EA075 /* Foundation.framework */; }; - 23F5B559815FF24B03A7D5D76F19E740 /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AEC3111A0670EB53B0463B74BEDB19E /* AFURLConnectionOperation.m */; }; - 263D08D54C23AAE447AC8A0E6BD02B39 /* UIKit+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 50BB70C4556B3F723DDAAA0213E95D42 /* UIKit+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 270D0D7DCF78170B1F481DDF511C07D6 /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 18DEA72C2B159355B25C191C6F786D26 /* AFURLResponseSerialization.m */; }; - 27AFE404AA450432596D55D44B871E62 /* UIProgressView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 2324798C1C23B3EFF005584C90BA4ED7 /* UIProgressView+AFNetworking.m */; }; - 28D5E64861C74DB483E72DE4E35E4AA0 /* NSObject+MJClass.h in Headers */ = {isa = PBXBuildFile; fileRef = 69C2DE584C3AD077A68993237076BAAE /* NSObject+MJClass.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2B91954D1D8469415E1164E83DD3D3F1 /* NSValueTransformer+MTLInversionAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = A0E773A406D82CE685D20902217024D3 /* NSValueTransformer+MTLInversionAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D097F9B47E61A2F9ED4053728DA7AE6 /* NSDictionary+MTLJSONKeyPath.m in Sources */ = {isa = PBXBuildFile; fileRef = 699433929DA24984E6664239D76549FD /* NSDictionary+MTLJSONKeyPath.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 2EDB111B41EBA9F2B002DAD15CB26687 /* MJExtensionConst.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4CCE6EF81633E4755F9E4DDDD07233 /* MJExtensionConst.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3940747A9B6BDD5DC55DFD9ECD8DC300 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 61CD7B93F7501CF8250CB25B85298E03 /* UIWebView+AFNetworking.m */; }; - 3A60E1AA43C09B68A26EF2579E98D725 /* AFHTTPRequestOperationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 755387304D50A7D9245D238969B53A54 /* AFHTTPRequestOperationManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3B1575769C2E1566036FFF2F22917E72 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2985156A5BB2598BF675A22BA9351ECD /* CoreGraphics.framework */; }; - 3C43032339841F7D1D94EF12903A2272 /* MTLJSONAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = B90460F20E9AB8D92EF393C4C0A81800 /* MTLJSONAdapter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3CAB03CE944BBD5BD312744F4DC4ED0A /* NSObject+MJProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 00F1E40D981E220793DCAF65895410AF /* NSObject+MJProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3CE08E61AA9A53953E30A442440E4D8F /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 344EFDC737CD472CB761BA5FB6C63D82 /* AFURLRequestSerialization.m */; }; - 41C46F19A2CE1E29840F226638A10678 /* metamacros.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E9937A5D52CD8C5B4390D1EFB5B057 /* metamacros.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 43E2B22CDD34DC9E3AC42491D4E0C7B6 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 46B794A5FA49A6717D143C72F716EC4D /* AFHTTPRequestOperation.m */; }; - 48BF475E818BD005DDCF7AF07202607D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF74AE1072D0E171334111EA616EA075 /* Foundation.framework */; }; - 495E27E8D0F85F4008E237D0F29EA8AC /* NSError+MTLModelException.h in Headers */ = {isa = PBXBuildFile; fileRef = 018C3BF90CF91C5E46FCE493CF5EED33 /* NSError+MTLModelException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4980C203311F9A91EF1A1FCAEC09EBD2 /* EXTRuntimeExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E2C574EA250AFF37FC2AB81324C8133 /* EXTRuntimeExtensions.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 4A4DCF231CE4F0B8916A5FA4590C3343 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B434EF2C52EA7AE302FD6F16B86700 /* JSONModel.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 4AD68C44057762C862EB902673B98C56 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF74AE1072D0E171334111EA616EA075 /* Foundation.framework */; }; - 4BABB4C716353500FDF75187D35DAACF /* MTLModel.h in Headers */ = {isa = PBXBuildFile; fileRef = C479DE3A22634423C37795A0222AD192 /* MTLModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4BDE97C783ED286933A60CAE9292B775 /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = E8B07C2F01394779D77C956001C69B15 /* JSONKeyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4DE36D4B16AB5BD257BDBA97DE1BD733 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 4606B084C0E1ED087ABEC2363E728606 /* JSONModelClassProperty.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 52B96AC796E60DBF61A11151FD25CEE8 /* NSObject+MTLComparisonAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = C8240BCF6AC273CD3334B14A0CA5F70F /* NSObject+MTLComparisonAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 52B9F1F399DEADDDFBE3F17BAA8D6D14 /* JSONModelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AFB853F6C2BC5C69E8A61B5719A183E /* JSONModelArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 53E42D87DFE481987214194A79FCDB7C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55E3A84F5844EC5439D62626CF3F2C9D /* UIKit.framework */; }; - 542A74473DEBCC4A4A8EFD7219D2957B /* MTLValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = FF32639C51955295435F7451FA380ED6 /* MTLValueTransformer.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 5675E7169016543A92985F6EBC0C1411 /* AFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E0BCA33AECB8E80716EF2AC296F046C /* AFURLSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 57C6D7D4CE5563FB7F6864E2D3A09383 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92C189A8ABB894FCF9709C280DE44269 /* CoreFoundation.framework */; }; - 58B3A1ECCB7C9B804E6E041C7D5FBFAC /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 6378162CD23C56E8A48F19D3BD11728B /* UIImageView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5CB847381DE56E2B338F95A8FC79E620 /* NSObject+MJProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 237C643C239FF1A2B9227CE8FE5CC02A /* NSObject+MJProperty.m */; }; - 5DFB5A46A57DE37A4FEAD5E01C998A05 /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 747E6D04C111E27692C52F33A0DC2804 /* AFHTTPSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5E6AD069AEFAE5E8E3538B532F09674E /* NSObject+MJClass.m in Sources */ = {isa = PBXBuildFile; fileRef = 129FBF4CCAB4D5C8E3EFE23EE5F15153 /* NSObject+MJClass.m */; }; - 61D3D263146EF150595EAD54ACEEAC4F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF74AE1072D0E171334111EA616EA075 /* Foundation.framework */; }; - 630E7EB6AA410EB4E3F0AE39B187CF52 /* MJPropertyType.m in Sources */ = {isa = PBXBuildFile; fileRef = B18808FB8D0C431518C27E74BA43E0C7 /* MJPropertyType.m */; }; - 6672A2EFC9413A1DE45CAF0A950CCAAE /* MTLTransformerErrorHandling.m in Sources */ = {isa = PBXBuildFile; fileRef = 4346CF8A65CA74345B8FD5C8B6EE2C49 /* MTLTransformerErrorHandling.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 669FAFC1DA77D8FF3171FA45F80A0AB8 /* Mantle-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CBA8E46B6265E5A6613EAD13327A2D3 /* Mantle-dummy.m */; }; - 6B45ADBBD4925214FD239E8C25214C87 /* NSDictionary+MTLManipulationAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 258D73F4F7A0E6DC4DB934070E3B3E83 /* NSDictionary+MTLManipulationAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6B6012E259B1804C7CC8D36A07252B07 /* NSError+MTLModelException.m in Sources */ = {isa = PBXBuildFile; fileRef = E43B61027789A5A43625808E7BFA32B4 /* NSError+MTLModelException.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 70F80E780DA0D521E2007C1AF9EE1C64 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF74AE1072D0E171334111EA616EA075 /* Foundation.framework */; }; - 740B64AC8CA44CDC54A3A2CCB396A0EB /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = E8EC7DCCDCA113456DD757C1CAF427D9 /* JSONModelClassProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7632A90850BF21261FD1585914D71E98 /* NSObject+MTLComparisonAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D3EFD38A56800F0DA70A7D6A246AC60 /* NSObject+MTLComparisonAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 764A917183297280E7F02642D7C8047C /* MJPropertyKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 62482B5149F22F9C76A90080B92736DF /* MJPropertyKey.m */; }; - 784E07C8B9704257D10696DD47E2A3B4 /* NSValueTransformer+MTLPredefinedTransformerAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6378941E9F301A2F6AE18FB013E5862D /* NSValueTransformer+MTLPredefinedTransformerAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7E5C71195CF0F35F44FDA4D355CFE73C /* NSArray+MTLManipulationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 46CCD50F7C0336C0C3820F8409363988 /* NSArray+MTLManipulationAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8359F80C2C3D1FD1DEC6C0151338B4B6 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */; }; - 85AC21BC7BD345D84F489F7A52D39E44 /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE51061E32E1AE4F36EBD905650AC1AC /* JSONAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 86A345B686DF337CC22C577DFD08F6D6 /* AFNetworkReachabilityManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B05C5BCC73FC07CDDFA770F4521DC51 /* AFNetworkReachabilityManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8B6B4FB5A92E1EEDAFC98E6DD1E81CA7 /* MJDictionaryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 33AE35A56CE6E3824D96FE55C4869095 /* MJDictionaryCache.m */; }; - 8F11ABA0C553B18981097015226E5748 /* NSArray+JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A10588801822F70C68D111FE9302B8D /* NSArray+JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 944BC5B32BE8AFDE9A1E1B88C7F7E86D /* NSDictionary+MTLManipulationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FF4F980BB24C89557FDFBA3F64B9634 /* NSDictionary+MTLManipulationAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 9543DC81B3F035E8C5768FB50B7146F1 /* MTLModel+NSCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = CEE1E60538AA84193A987BF8B5E08060 /* MTLModel+NSCoding.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 95E69A233A1D42F7E36D4D4C79E5AF46 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 153842FACD0B322932EE55A33B6F68F0 /* SystemConfiguration.framework */; }; - 96C7E8AA9881FF1B1EC3EED102DF287D /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 66EF01084753F8DB45166F8CA5639720 /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9734B73DB91553CC9279C5DEF98B973F /* MJPropertyKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 81A94E4E5F08A61D2AA27A47A9D968EA /* MJPropertyKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 98D00CD3E197EAA6C7450281537CD79C /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A1BD08B4DB7EEEB6C073709959446BA /* AFSecurityPolicy.m */; }; - 9BB66BC3A3E2C0AB0BA3ACE98373EF30 /* MTLReflection.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF898DFB9464BC29A8AEF36B20DD5A6 /* MTLReflection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9C5A2CD706CA4688C9F4BC6D63BAB935 /* UIAlertView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 820BD9320EDC55FA84AC92F397FF9854 /* UIAlertView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9ECCBA3A8092E326BE8CAD2075001BB2 /* UIRefreshControl+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 3406C17F0D62CF638EA4CB0692C96119 /* UIRefreshControl+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9F56B2A232106CEC99383ADACDC85C4A /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = F11F3B7C3853679BB2440391507EEC84 /* UIImageView+AFNetworking.m */; }; - A044BDEEC463D3CB278C383FA8BABEC6 /* MJProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = D58B2A28EF037B1C43966EA747D5A18C /* MJProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AAF2E61730FAA37AF5A03D4571D30E8B /* UIActivityIndicatorView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 09C146E8AC24239C6737FA7C09655738 /* UIActivityIndicatorView+AFNetworking.m */; }; - ABC9A1F8D86F932BEE6C28A8849048A6 /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E95CED2A425248DF80AA104E7140CF7 /* JSONKeyMapper.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - ACF42F60DB38312D939C3817F3AECE32 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F47B5F8393E9034BF186913597866E6 /* JSONHTTPClient.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - AED2BAD1D43745DD69F82C134A985AB3 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = DF86A5F9C917556FD0AEA6A2CA64F307 /* JSONAPI.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - B685C45C6BF1321FC17F0F03AC635E4C /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1611F255389A21670BDCDD3EB778FEAC /* NSArray+JSONModel.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - B6E1E26869BC3BFBEAD1B6F35F5A670D /* NSValueTransformer+MTLInversionAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = D0C6948DC2ECA684D01A7701D2A81F6D /* NSValueTransformer+MTLInversionAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - B82A170962598E7EAE9A8752574B7B74 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = A01A01B9B0E7C18C9CE55A3D240E4559 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BAE29EFF696E9062CE0DFB3887FF9806 /* EXTScope.m in Sources */ = {isa = PBXBuildFile; fileRef = 21AB592366EDBD9FDD40E409253CE8CF /* EXTScope.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - BFE1D87E9D4D58C95CEAF1737F70C956 /* MJFoundation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F94F9D09008555558898DE3D9A40948 /* MJFoundation.m */; }; - C0B7827E6FEB64AEA58656D1DE343E63 /* NSDictionary+MTLMappingAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 693AB91C68CD9AD4EB6FA079432375B1 /* NSDictionary+MTLMappingAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C2D9B8F82D04BDD22AE84A18C08A19C9 /* UIActivityIndicatorView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 13FEB7BC8AF257FFBFEB3C80FDA11DD1 /* UIActivityIndicatorView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C3E942A24436AFAE47C0F265F0CA369A /* MJExtension-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 337C2EFC61D990AB6618EB201A4D4CF0 /* MJExtension-dummy.m */; }; - C3EB1AF50203F4E383BB02AA9EAA2539 /* NSObject+MJKeyValue.m in Sources */ = {isa = PBXBuildFile; fileRef = 08F736C3571E7513172F75BD1853F320 /* NSObject+MJKeyValue.m */; }; - C4D34910F4D6673E3B9E99D7A781DC6C /* UIWebView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = C42CDD287DF20EF3E287445607A1D09D /* UIWebView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C591CE6B9FA1950409E543A70B3ECABE /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CA885863747DAF430B451F5819C9A53 /* JSONModelLib.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C59584009765D8E13DBD8C23AFC54E2B /* AFHTTPRequestOperationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 36588BCEFE1D7E0A4107B673FB227DDD /* AFHTTPRequestOperationManager.m */; }; - CD0E87EA8A39BBC280379886EBDF18FF /* NSObject+YYModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 812FA1FB893E768781BC5D5573FAD0C7 /* NSObject+YYModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D1A08D7B676CB358664FE1A7EE3472E3 /* NSArray+MTLManipulationAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 81D478E76465C2A7351BCAC0D621CB2A /* NSArray+MTLManipulationAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D227CEAB5B8A915D6E65EA6DD91F51D6 /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCE5E454DF60B24D5EA93556E869EB0 /* AFNetworkActivityIndicatorManager.m */; }; - D2429C7E2299F5727080E880D8A72949 /* YYModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92B0C6E96833E03BE1835E1B18DDC907 /* YYModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D2718FB5214DA8A524CE735932323F82 /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E3384E81663101B2F54EA9FFD3F852C8 /* JSONHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D34140627AA9906F84A524AB1A22748E /* MJPropertyType.h in Headers */ = {isa = PBXBuildFile; fileRef = F7CC08D44967AF4EC66DB3F0F7E7E017 /* MJPropertyType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D4110838F297CB76E9BFABBC1463004B /* NSString+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 8224BFE306F6013C9F8FE410E22E92BC /* NSString+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D4EF11B8928C1374360A67C3BC22AD13 /* JSONModel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E7A8605E692E730F26F9E326C41B041E /* JSONModel-dummy.m */; }; - D53D346EDA02176B05B3EB0BC617354B /* UIButton+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B1FC1AA50B49519B86163979CB8A669 /* UIButton+AFNetworking.m */; }; - D6475D5E613BCB8DA0C6FCF40D4B8566 /* YYModel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DD247EEBC8F689FDE4391C68DBD399A /* YYModel-dummy.m */; }; - D6D9125049BC87CDA2D57020C0153E75 /* UIAlertView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CE7518943ACF62538D905B41A52A67A /* UIAlertView+AFNetworking.m */; }; - DAD5C4333A7FA2DECFF4BEA4F17FEC6B /* MJFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 74B431BAC2D298913655B42A8D46A5E4 /* MJFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DBC399A4B8E6521B2A885EA52612BFB0 /* MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 2213B19AF53EF208646BB7EE335E1BEF /* MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DCB74D72FE0E9C8C8E23B49C8CE52276 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A52824CECC3C2F076DC9785BEC7D984 /* JSONValueTransformer.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - DEA1065191A84F4399632F5DC5E5358B /* AFNetworkActivityIndicatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 84DB5B311AFF4ECE63B6F937BCB4018F /* AFNetworkActivityIndicatorManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DF180E88C3E1BF35D93F31300FA4BC65 /* AFHTTPRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1AF724CC974597A0B74E3C6DFBD9FB /* AFHTTPRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E38C00106AD769DAA4E938F8878B7A7D /* UIProgressView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = BEE462F260358EA9E4C77AB8CDFC2BEC /* UIProgressView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E4213D476018C8B58166DF22722C0463 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 517F066A4E21937B80C1F8D49C4BAFF8 /* AFURLSessionManager.m */; }; - E43F5D7E2C48C315DDA216F87E47B50B /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6869A684A9A5BFA5D34D6D04FD7F8114 /* MobileCoreServices.framework */; }; - E5FDED1F3CFC60D892F02046B8F4FB91 /* MJProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 5286910528DF78F0B0343CCA6AB09F09 /* MJProperty.m */; }; - E6E2E57ADE1578E3ED86B1387009F3F8 /* AFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = B0FA4CEED6A4A71D262BB4340300358A /* AFSecurityPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E72FE1FA640F108A9769E9661E34F3BF /* NSDictionary+MTLJSONKeyPath.h in Headers */ = {isa = PBXBuildFile; fileRef = C602EF86A679370BF44CE261B81E0A32 /* NSDictionary+MTLJSONKeyPath.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E9FF6786EDCF303B455D928C19A94B23 /* NSString+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = D0ED8E585586D557C343E95938CDDEA9 /* NSString+MJExtension.m */; }; - EAC33FF21DBF26381F425381F18B9965 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DA509BF18EADB9B060D72AAB1DF8D5A /* AFNetworkReachabilityManager.m */; }; - EEF2248467AB8464AB72CB730C7FE178 /* NSValueTransformer+MTLPredefinedTransformerAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 764F13F69DD94DF68A6DE4179E5214E4 /* NSValueTransformer+MTLPredefinedTransformerAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F0D2DF741E4223975FD166C5C101479F /* MTLValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = B8FD905D61FA0F0B0A34CB4CACFB151E /* MTLValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F3B32DA5C47A34B5B2609E632FFA8557 /* AFURLConnectionOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC05F6DD346D91012CE8C31DDF60F7F /* AFURLConnectionOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F4D2A0918C2C064F1A16B4CA2D42089A /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F08F383BECC6CD5088A2A6B8032D690 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F7B5D2658B77049DDEC0AAA88E6FCEA7 /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = C00322F1FE64C27DDBA42C6C22892BEC /* JSONModel+networking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F7B7585021FEDC680689A7B49F8BA3ED /* MTLTransformerErrorHandling.h in Headers */ = {isa = PBXBuildFile; fileRef = E0DB9304D24AF0303E86EE178207EF7A /* MTLTransformerErrorHandling.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F8FF07D76760D6A2FF269061E11A8B31 /* EXTKeyPathCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = A7ADA8C752C529E44B54E7FB92EE7CDF /* EXTKeyPathCoding.h */; settings = {ATTRIBUTES = (Private, ); }; }; - FB13976159230EA492199199181C64AC /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D44B4170B9B0ADEC5CF3153CE766FFE5 /* AFHTTPSessionManager.m */; }; - FD913ECF18E91FD4D8EE34BA8170DB4F /* MTLReflection.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B13275C0DED9CE1601BA930BCF0EAC7 /* MTLReflection.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - FD9A84D4F9CD61B073685A40A8C4DAF8 /* YYClassInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 02434DFDE40D6DAAFFE5CA56A70AF52F /* YYClassInfo.m */; }; - FE983ADC2960099312AF536D2916BC7A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF74AE1072D0E171334111EA616EA075 /* Foundation.framework */; }; - FF3D94F730A96F1B9FAF43E8DB68E702 /* Mantle.h in Headers */ = {isa = PBXBuildFile; fileRef = F3197E61E2AB5AB6171C369AFBAC7DF3 /* Mantle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 00F09DB5E05D1208F27161E2F016FE36 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9324D39DB35A688FF68D4BB1B2C8A96 /* MobileCoreServices.framework */; }; + 022B549F10007177A43FAB1DD5114F7D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72A3070877E2EDE3412BC35DADA16664 /* Security.framework */; }; + 026CCF569A2125FCB0EE8F152731259E /* NSObject+MJClass.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B383E314994657BBF9B1CE8651A1E9D /* NSObject+MJClass.m */; }; + 04E0EFD308A39DA6783F9004C5689973 /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = C22C1BC853172E422FEF5EF93570D8E7 /* JSONValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0A08FC71C4E3B8E0F8734BCDA7CCA7CB /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FBF1C35E4FE511CBD674E6B75C711C8 /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0F7EC02E944F8719A5EBDC9D29F9E99F /* MJExtensionConst.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BBDEF65A9F924C4C8BD9095702FAE5B /* MJExtensionConst.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 118227C43F283C87130BEE2BFABC7EBD /* NSObject+MJCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C6078130D3FD4382AFBBF5BBF6F148 /* NSObject+MJCoding.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 13695CE9BF36F26CA806C5CD2D6ADECA /* MJFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = F1215BC9A793FB17C066FE391E6EA50F /* MJFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14CD3DFB4A25BAEFB205730FA6750025 /* AFAutoPurgingImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 3380E1498452AD6D302CFF6C4E9CECBE /* AFAutoPurgingImageCache.m */; }; + 15460ABD372C937E2A07A2FCDF98C473 /* UIActivityIndicatorView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = D866A4F9683B952C4632B6900399C1CA /* UIActivityIndicatorView+AFNetworking.m */; }; + 19A2AEA6F18B93212006AFB2A7A25AF8 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 26D091EA82DC6C228C5967981D8A947C /* JSONModel.m */; }; + 19E6319F6ECED7539AABBD9A211F7AEC /* AFAutoPurgingImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3FA45D43C9C8FCA9EC4B3C9F7AEFC5 /* AFAutoPurgingImageCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1D5AFB312B9E1998E07482EE22ECF18D /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CF934BFEEA5FA3615572D22E4CF4648B /* CoreFoundation.framework */; }; + 2053D71CF543C3A3CC47C5409D61923C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C212172B3D7D18D7C61117B4EDDEBCD5 /* CoreGraphics.framework */; }; + 216E5A12ACFD64B84DC1A2E253336D9B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B6DE56F84D65424347CC9D56EC5370B /* Foundation.framework */; }; + 23415204AA48A02959E4E5245CF96037 /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5736DF98F0742D3818C94976D85354EF /* AFHTTPSessionManager.m */; }; + 2359387620C5E815BF0594BC40311734 /* AFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 95739C032898627373FB604DC150D252 /* AFURLRequestSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24484B9729D5A17AF22E036A40D4229B /* YYClassInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = DFE1348BB15D6AA58C3F99AC8D1269D7 /* YYClassInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2CC27528C64733F5C0AB4B1B6EE35E8C /* MJExtension-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 79F23D3EBFB558E7650521B9D0E5D7EE /* MJExtension-dummy.m */; }; + 2DB87F0B08ACF244F156C584AB77B6E6 /* NSObject+YYModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E7C541D5DBF5773D1A719F64A2C02FD9 /* NSObject+YYModel.m */; }; + 2F8D135BE069298B3FE7C13988B2CF08 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = C011FAFEF5F72BD91B8A7457C6A5BC51 /* JSONModelClassProperty.m */; }; + 2F8E5AE787864956A700F252954FA910 /* YYClassInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 56FA46B010CEBE49ECAA163589A161AD /* YYClassInfo.m */; }; + 30ADD2DFE00481F01BC0DB9C865C37F0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B6DE56F84D65424347CC9D56EC5370B /* Foundation.framework */; }; + 311E5200832E4AE174A193851A2C6317 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DD5E425BB86A0DED2EDE70C1C319945 /* AFSecurityPolicy.m */; }; + 326A543AD4E39A2DAECA1CD385E3AEA2 /* AFImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = D72CDCE204D482B05EA1B80D8B34ACF4 /* AFImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3511AE7ADBB71D05565854F0E70B7D08 /* AFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 8ED525C57A27F45647D49FB32C45E674 /* AFURLSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 366A613AE07EAA35B5789F6123FB48AF /* MJPropertyKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F16E49B40D463D28F84C5FC3AE1D65D /* MJPropertyKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 38EEA9ED6B922946C54AD6BAC93B73AD /* UIProgressView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 07A6952D5983395906DA6CF1AF8852C5 /* UIProgressView+AFNetworking.m */; }; + 3939531EB270B4145C7ADFBAB2E5695F /* AFNetworkActivityIndicatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1214A3E358F782D81F7CFC707E8B1C72 /* AFNetworkActivityIndicatorManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 393E2E501D0B38AE7DD535362026926D /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = A8A0939EA5EE600F60DDE7CB862C46DF /* JSONAPI.m */; }; + 43098B12DF5546CB576986E68DBCAFCA /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC888124383F31FABAD2DBCA0258E4C0 /* AFNetworkReachabilityManager.m */; }; + 4330562BA1A299CBD37F4602B1A4C95A /* NSObject+MJKeyValue.h in Headers */ = {isa = PBXBuildFile; fileRef = B67DC869DDEDBE2850A11E2929E0BD82 /* NSObject+MJKeyValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4BA19F7DD8F9FDA648137B2CE89E7588 /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 570014AD954196698AC88C9ECB9D7BA7 /* AFNetworkActivityIndicatorManager.m */; }; + 4BDE97C783ED286933A60CAE9292B775 /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 78ADF25BFDEA7B435BFBC3289EA0F685 /* JSONKeyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4C61B999DF40B1B00449A7AFCBB61D5E /* MJPropertyType.m in Sources */ = {isa = PBXBuildFile; fileRef = E95E92B6FE793A66B9896C713B3FD432 /* MJPropertyType.m */; }; + 52B9F1F399DEADDDFBE3F17BAA8D6D14 /* JSONModelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 606D7D0847B4FB963BDBD947601FA6C6 /* JSONModelArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 59DFAF46993F71E88A7336D2A8A3731D /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = B7A7F4C024C31B3443763BF2AC8A220F /* JSONHTTPClient.m */; }; + 5D52DB6DF2E6C24CECB0015A9177A2E1 /* UIProgressView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 79829287BCBCC690C7FCE131DC126CE1 /* UIProgressView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6083580C462930E006F0FD618DEF018A /* NSObject+YYModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 18DA3BEF587E6A26A30D88E05C80BDE2 /* NSObject+YYModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6083F51989A0009C740D92767F4DC1FC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B6DE56F84D65424347CC9D56EC5370B /* Foundation.framework */; }; + 6EC97BDB3FC508526F9E388095A7DDCC /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 605DF30C9166350543DFE255238CCEDA /* UIImageView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7010A5470E849DDCF43C386E942E2802 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B6DE56F84D65424347CC9D56EC5370B /* Foundation.framework */; }; + 710DA5E9C44A1BC56CD13FC1F2D6E099 /* MJFoundation.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A0598857874FC5B3F904AD70F874325 /* MJFoundation.m */; }; + 740B64AC8CA44CDC54A3A2CCB396A0EB /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 762C637B05C8420EE066D9D4089BDA20 /* JSONModelClassProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 78940A6980F359C4304C695EF6E67C5D /* UIButton+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = E5FCE11A818E00B7170F16C89C741BB8 /* UIButton+AFNetworking.m */; }; + 7EC57A971BC81BEFCD4D52ACF58BB517 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = CCBC929C9E59A1135390CE347E32968E /* JSONValueTransformer.m */; }; + 7F0578A0258E02384F6229C678E60D31 /* UIRefreshControl+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = C9BA894149C19F87CB96CEE950D360BC /* UIRefreshControl+AFNetworking.m */; }; + 7FDE91216511338E9117E9AFDA47C856 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */; }; + 830050886B18F54E17F117FD8EFC717B /* UIActivityIndicatorView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 94B8A461A67B37B6C20F8EE94AC88C1E /* UIActivityIndicatorView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8572EA2DB7894989FDA4C085E70D96C8 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 12700C8E34E43360A4B8A009316EC656 /* NSArray+JSONModel.m */; }; + 85AC21BC7BD345D84F489F7A52D39E44 /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = FEC2AE555ABD0E86EBEA5445EE9AC671 /* JSONAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 85FAB6F1D2FE0598BF2E61D7BB084B8D /* UIKit+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = A15E16D7614431788C53003DAEE065BB /* UIKit+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 86D3C675657C8AFE6F73E5D0F209E990 /* NSString+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = C6C57CE34C9E2C2822BAA82F4992D134 /* NSString+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 87E1452814A23210667EE6E16FD6A054 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B6DE56F84D65424347CC9D56EC5370B /* Foundation.framework */; }; + 880C99DF50E8C41EBE032934BE7F9905 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FEF7A1ED9EEE822067486386BC961C0 /* JSONModelArray.m */; }; + 891A5DA07C60C95DAD969B542CCDE442 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EE57AF8BE9E222A9D3BB35E9C401DC8 /* JSONModel+networking.m */; }; + 8CD001B0217CFDD1F5D8A3A6C3A8A5DC /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D242CEE0CA2BC7695783E88BF8312A7 /* JSONKeyMapper.m */; }; + 8E82178CC9BD8BE3DBF2C10E33807AEB /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 96AF26095E6CC2BF6F911ED1CEE3742E /* AFURLRequestSerialization.m */; }; + 8F11ABA0C553B18981097015226E5748 /* NSArray+JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 0403F039E3E50220C6BAF6DFDF78065A /* NSArray+JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 91CAC2B69903F5F3D7C25A95CA77A600 /* MJPropertyType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F45A7067F29BC663CC9450001F8B814 /* MJPropertyType.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A049B322C75DF1C944935D7D0D7F1E7E /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = A0B544ED7C1030605D2D1A5A6B45DA46 /* JSONModelError.m */; }; + A0AD231A11A54F59BC8D486946D2928B /* MJProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9EE7B9220EAFF520C793DA70E7E41C0F /* MJProperty.m */; }; + A60A4B3054017180C0B6C7B24E651E0A /* MJPropertyKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C2D2A962D0939A6AA9197643DF51EF5 /* MJPropertyKey.m */; }; + A7CA8B5657D905776E74716A35A14A09 /* YYModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 772086E7A720BEE07E74BE9A73B6F9B3 /* YYModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A8FC6A53F6C1CB4DEFD972664E1AF3B1 /* AFNetworking-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6976E680B55994F52B52A304AB853DE0 /* AFNetworking-dummy.m */; }; + ACE9C1A6E8D5121C6C5F907C7A9CFCC9 /* UIRefreshControl+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 41217946E91010813B76690C9DFC1105 /* UIRefreshControl+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AD359A96DD4AA2C962E50A5CD5524F54 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DF914E58CA0AEBF93A05C26920E21C2 /* UIWebView+AFNetworking.m */; }; + B0BE398350F83A7B0102C3BBAFC51428 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0ABF05F7A4FE382E97682A0D79E6B6 /* UIImageView+AFNetworking.m */; }; + B51AA1F7701DCDBCC9B88A15320F9C2C /* AFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D47B1ECCE791AA32D9032ECEEBE9F7F /* AFURLResponseSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B5CF67F7870BAB70A76E57479B706B42 /* UIWebView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = F500D47A6BA8F1BD53546191FF7BBFA6 /* UIWebView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B82A170962598E7EAE9A8752574B7B74 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 89999F3254566BA6BAAB83FC901C18C3 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B9C36A50069E553B4B8538E291864BB5 /* NSObject+MJKeyValue.m in Sources */ = {isa = PBXBuildFile; fileRef = 21503577811075171479CA9DC58BE711 /* NSObject+MJKeyValue.m */; }; + C16442D25F534C602780E6FD44C6A698 /* NSObject+MJProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AAFAD7F1D7566D3AFC19B5112F065E0 /* NSObject+MJProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C1B65C3D849FEE4FB5298A8135A765DA /* UIImage+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 95E31C6339B6FF746D8B1E8A3C403476 /* UIImage+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C2201E34603B014192F0967473518496 /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 568FF1FD83746C878127BCAC4589A917 /* AFURLResponseSerialization.m */; }; + C37D2F9A62232C28DAF2E51CF1364F21 /* MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = F74CAE0F7916433AC14ED64284CC56E1 /* MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C591CE6B9FA1950409E543A70B3ECABE /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EF2D16B1D7A2D59AB8B64476669DA69 /* JSONModelLib.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CA1EB1DB5C89E63A19ED05C55E35AF23 /* NSObject+MJClass.h in Headers */ = {isa = PBXBuildFile; fileRef = A06C5C8DBE28531332E9E8C5C44C4BEE /* NSObject+MJClass.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CD4CF5F1389281BCE40DF30AD1945D03 /* NSObject+MJProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EBB821533A344C34D19E1733F7F9A8D /* NSObject+MJProperty.m */; }; + CDA4DB994BAC351F4CD71EC283055E57 /* NSObject+MJCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = E2566ABB3855D6A96B37F3462DA072AD /* NSObject+MJCoding.m */; }; + CE8965366A3B07A6C0615055A31B8B83 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5DB84379C661F19696BD0A90AEBCF6 /* SystemConfiguration.framework */; }; + D1D1F11808DACCA88C55636F85A58FD8 /* NSString+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C5E49AA1C5846BAC6A6D8B8A754FDFD /* NSString+MJExtension.m */; }; + D2718FB5214DA8A524CE735932323F82 /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AE56F69183875C9707391B56CED09B /* JSONHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D31FEE51AF4BE2A6CC059F80B983CD3B /* AFImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 7768F1CE57584E28E3CDEF3560814CB0 /* AFImageDownloader.m */; }; + DAF1CE8756287B465E0DE48A6133FB79 /* MJProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 03FF46035379319020BE1062C07401FD /* MJProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DFDAC8245626953C4BCE5A2DA6BE2A5B /* AFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 694CB19852BE17F2C26C5D73A4CE5803 /* AFSecurityPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E212C2AA95E8F6EFB69A5F1455F291F8 /* UIButton+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 09231B77614F8302E0872D8555BA5567 /* UIButton+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EAEDC97E58D7D11BC72EFDBA87922D2B /* YYModel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9758E552171AF9F7D972581E28F81CB9 /* YYModel-dummy.m */; }; + ED69D9B5A342FE9BD3F170D5CDDEC948 /* AFNetworkReachabilityManager.h in Headers */ = {isa = PBXBuildFile; fileRef = EE775111EAE322796A4538E35771BBBB /* AFNetworkReachabilityManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EE27B8D800BD5CBC5A23FACF87210920 /* JSONModel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B10E3C58BA72DDEA3175AFF7A4CDA5E9 /* JSONModel-dummy.m */; }; + F3774B1449FCE5B3CA3E1B336E11D284 /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D8909276CAABD303D581898C413593E /* AFHTTPSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F4D2A0918C2C064F1A16B4CA2D42089A /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 53825EEF93A513DD30E6715170C64BB4 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F7B5D2658B77049DDEC0AAA88E6FCEA7 /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6CC063ACC1F6FE00EF71234311F58A /* JSONModel+networking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FCDDD3BC67EA205C87238A2A87D5C36C /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 683ED099B8DC4F9ED207255EF899E5B3 /* AFURLSessionManager.m */; }; + FDF30F97BDF167F0B956DED0F2C8DA69 /* MJExtensionConst.m in Sources */ = {isa = PBXBuildFile; fileRef = C071C02114CA941F64C49AAF09814027 /* MJExtensionConst.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 1CE9B78EF12EF230E0D812BD87D80BB7 /* PBXContainerItemProxy */ = { + 23EF1693CC42D1A25F4AF23075E313FD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = BFF917EB51EEA40133D67E15EB66AE74; + remoteGlobalIDString = 3E2BA6702CDB283F0780C4B47A59E791; remoteInfo = YYModel; }; - 3CDADA51E4F48F1BD4E9D1BD062F3A8D /* PBXContainerItemProxy */ = { + 93EB7DA60B06D8562F3E82665280C486 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = B23B3D15FFC0FC9893968F478086D58D; - remoteInfo = MJExtension; - }; - 712E7F2B7442228DB6DEBDD8B98C418A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 426BC4549A625B5E1E4200D5261A98BF; - remoteInfo = Mantle; + remoteGlobalIDString = 09FA060F1A0492FB25232F489AC4E573; + remoteInfo = JSONModel; }; - 88D7E302238C412F9FB1295E599A0317 /* PBXContainerItemProxy */ = { + A95F771819A639C0C6FD8ACCB88F2727 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 2602F3D0DAC534568B6AD7EEA0DD1959; + remoteGlobalIDString = 928353533005A4198EBDA5B700D37B64; remoteInfo = AFNetworking; }; - 9D0CB74D9A073B05F7AEFF12FC2296B9 /* PBXContainerItemProxy */ = { + E1B4B798F4893C07FFFF6CC50567DE79 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 09FA060F1A0492FB25232F489AC4E573; - remoteInfo = JSONModel; + remoteGlobalIDString = 9EAB3E42EF957541E6C3C76D35FD008E; + remoteInfo = MJExtension; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 00F1E40D981E220793DCAF65895410AF /* NSObject+MJProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJProperty.h"; path = "MJExtension/NSObject+MJProperty.h"; sourceTree = " "; }; - 018C3BF90CF91C5E46FCE493CF5EED33 /* NSError+MTLModelException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSError+MTLModelException.h"; path = "Mantle/NSError+MTLModelException.h"; sourceTree = " "; }; - 02434DFDE40D6DAAFFE5CA56A70AF52F /* YYClassInfo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYClassInfo.m; path = YYModel/YYClassInfo.m; sourceTree = " "; }; - 04B434EF2C52EA7AE302FD6F16B86700 /* JSONModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModel.m; path = JSONModel/JSONModel/JSONModel.m; sourceTree = " "; }; - 08F736C3571E7513172F75BD1853F320 /* NSObject+MJKeyValue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJKeyValue.m"; path = "MJExtension/NSObject+MJKeyValue.m"; sourceTree = " "; }; - 09C146E8AC24239C6737FA7C09655738 /* UIActivityIndicatorView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIActivityIndicatorView+AFNetworking.m"; path = "UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m"; sourceTree = " "; }; - 0A1BD08B4DB7EEEB6C073709959446BA /* AFSecurityPolicy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFSecurityPolicy.m; path = AFNetworking/AFSecurityPolicy.m; sourceTree = " "; }; - 0B13275C0DED9CE1601BA930BCF0EAC7 /* MTLReflection.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MTLReflection.m; path = Mantle/MTLReflection.m; sourceTree = " "; }; - 0BCE5E454DF60B24D5EA93556E869EB0 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFNetworkActivityIndicatorManager.m; path = "UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m"; sourceTree = " "; }; - 0D69A13A6EB2072FBC53D4512340BD40 /* NSObject+MJCoding.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJCoding.m"; path = "MJExtension/NSObject+MJCoding.m"; sourceTree = " "; }; - 0E0BCA33AECB8E80716EF2AC296F046C /* AFURLSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLSessionManager.h; path = AFNetworking/AFURLSessionManager.h; sourceTree = " "; }; - 0FF4F980BB24C89557FDFBA3F64B9634 /* NSDictionary+MTLManipulationAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+MTLManipulationAdditions.m"; path = "Mantle/NSDictionary+MTLManipulationAdditions.m"; sourceTree = " "; }; + 018FAA69CDEAE009F427656EE0F9264E /* JSONModel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JSONModel-prefix.pch"; sourceTree = " "; }; + 03FF46035379319020BE1062C07401FD /* MJProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJProperty.h; path = MJExtension/MJProperty.h; sourceTree = " "; }; + 0403F039E3E50220C6BAF6DFDF78065A /* NSArray+JSONModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+JSONModel.h"; path = "JSONModel/JSONModelCategories/NSArray+JSONModel.h"; sourceTree = " "; }; + 04D8ADC28CE66AA6064AFA3095238FCE /* libYYModel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libYYModel.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 07A6952D5983395906DA6CF1AF8852C5 /* UIProgressView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIProgressView+AFNetworking.m"; path = "UIKit+AFNetworking/UIProgressView+AFNetworking.m"; sourceTree = " "; }; + 09231B77614F8302E0872D8555BA5567 /* UIButton+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIButton+AFNetworking.h"; path = "UIKit+AFNetworking/UIButton+AFNetworking.h"; sourceTree = " "; }; + 0955D9C5A396274E68A24F02996829F7 /* MJExtension.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MJExtension.xcconfig; sourceTree = " "; }; + 0C5E49AA1C5846BAC6A6D8B8A754FDFD /* NSString+MJExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+MJExtension.m"; path = "MJExtension/NSString+MJExtension.m"; sourceTree = " "; }; + 0D8909276CAABD303D581898C413593E /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPSessionManager.h; path = AFNetworking/AFHTTPSessionManager.h; sourceTree = " "; }; + 0DF914E58CA0AEBF93A05C26920E21C2 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIWebView+AFNetworking.m"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.m"; sourceTree = " "; }; + 0F45A7067F29BC663CC9450001F8B814 /* MJPropertyType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJPropertyType.h; path = MJExtension/MJPropertyType.h; sourceTree = " "; }; 10834806BD7B412BC24F347361FA2C8E /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = " "; }; - 129FBF4CCAB4D5C8E3EFE23EE5F15153 /* NSObject+MJClass.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJClass.m"; path = "MJExtension/NSObject+MJClass.m"; sourceTree = " "; }; - 13FEB7BC8AF257FFBFEB3C80FDA11DD1 /* UIActivityIndicatorView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIActivityIndicatorView+AFNetworking.h"; path = "UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h"; sourceTree = " "; }; - 153842FACD0B322932EE55A33B6F68F0 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; - 1611F255389A21670BDCDD3EB778FEAC /* NSArray+JSONModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+JSONModel.m"; path = "JSONModel/JSONModelCategories/NSArray+JSONModel.m"; sourceTree = " "; }; - 18934327AC3301B847335FA1F1FBB9D0 /* YYClassInfo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYClassInfo.h; path = YYModel/YYClassInfo.h; sourceTree = " "; }; - 18DEA72C2B159355B25C191C6F786D26 /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLResponseSerialization.m; path = AFNetworking/AFURLResponseSerialization.m; sourceTree = " "; }; - 1C6723A0E9DD678B6B2F1E44DEDD6DC6 /* YYModel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYModel.xcconfig; sourceTree = " "; }; - 1CA885863747DAF430B451F5819C9A53 /* JSONModelLib.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelLib.h; path = JSONModel/JSONModelLib.h; sourceTree = " "; }; - 1E95CED2A425248DF80AA104E7140CF7 /* JSONKeyMapper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONKeyMapper.m; path = JSONModel/JSONModelTransformations/JSONKeyMapper.m; sourceTree = " "; }; - 1F1AF724CC974597A0B74E3C6DFBD9FB /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPRequestOperation.h; path = AFNetworking/AFHTTPRequestOperation.h; sourceTree = " "; }; - 1F47B5F8393E9034BF186913597866E6 /* JSONHTTPClient.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONHTTPClient.m; path = JSONModel/JSONModelNetworking/JSONHTTPClient.m; sourceTree = " "; }; - 21AB592366EDBD9FDD40E409253CE8CF /* EXTScope.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EXTScope.m; path = Mantle/extobjc/EXTScope.m; sourceTree = " "; }; - 2213B19AF53EF208646BB7EE335E1BEF /* MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJExtension.h; path = MJExtension/MJExtension.h; sourceTree = " "; }; - 2324798C1C23B3EFF005584C90BA4ED7 /* UIProgressView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIProgressView+AFNetworking.m"; path = "UIKit+AFNetworking/UIProgressView+AFNetworking.m"; sourceTree = " "; }; - 237C643C239FF1A2B9227CE8FE5CC02A /* NSObject+MJProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJProperty.m"; path = "MJExtension/NSObject+MJProperty.m"; sourceTree = " "; }; - 258D73F4F7A0E6DC4DB934070E3B3E83 /* NSDictionary+MTLManipulationAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+MTLManipulationAdditions.h"; path = "Mantle/NSDictionary+MTLManipulationAdditions.h"; sourceTree = "