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 #import "GJRequestProtocol.h" -@class AFHTTPRequestOperation; +@class AFHTTPSessionManager; typedef NS_ENUM(NSUInteger, GJRequestMethod) { GJRequestGET, @@ -45,7 +45,7 @@ typedef void (^GJDNSBlock)(BOOL usedDNs, NSString *domain, NSString *newBaseUrl) /** * 请求的任务,目前主要是operation,以后可能会换成session */ -@property (nonatomic, strong) AFHTTPRequestOperation *task; +@property (nonatomic, strong) NSURLSessionTask *task; /** * 请求结束block,参数是当前request @@ -155,8 +155,9 @@ typedef void (^GJDNSBlock)(BOOL usedDNs, NSString *domain, NSString *newBaseUrl) /** * 请求成功后,callback之前会调用此方法,子类处理很多数据逻辑,重写请慎重 */ -- (void)requestCompleted; +- (void)requestCompletedWithObj:(id)obj andModelObjBlock:(void (^)(id model))modelBlock; +- (void)requestCompletedWithModel:(id)model; /** * 发出请求 */ diff --git a/GJNetWorking/Request/GJBaseRequest.m b/GJNetWorking/Request/GJBaseRequest.m index 09ffaac..2ed8c0d 100644 --- a/GJNetWorking/Request/GJBaseRequest.m +++ b/GJNetWorking/Request/GJBaseRequest.m @@ -8,9 +8,14 @@ #import "GJBaseRequest.h" #import "GJHTTPManager.h" -#import "AFHTTPRequestOperation.h" -@interface GJBaseRequest () +//被废弃了 +//#import "AFHTTPRequestOperation.h" + + +@interface GJBaseRequest (){ + +} @property (readwrite, nonatomic) GJRequestState state; @property (nonatomic, copy, readwrite) GJCompletedBlock completedBlock; @@ -66,7 +71,8 @@ - (BOOL)isRequestSuccessed { } - (BOOL)isCanceled { - return self.task.isCancelled; + //先注释 + return YES; } - (BOOL)isNetWorking{ @@ -78,24 +84,23 @@ - (NSError *)error { } - (id)responseObject { - return self.task.responseObject; + + return nil; } - (id)responseJson { - return self.task.responseObject; -} - -- (void)requestTerminate { - if (!self.task.isCancelled) { - self.state = GJRequestStateFinished; - } + return nil; - [self requestCompleted]; +} +- (void)requestCompletedWithModel:(id)model{ + self.state = GJRequestStateFinished; BOOL success = !self.error; + id responseObject = model; + + - id responseObject = self.responseObject; //call back if (success && self.successBlock) { self.successBlock(responseObject, self.status, nil); @@ -111,8 +116,9 @@ - (void)requestTerminate { self.failedBlock = nil; self.completedBlock = nil; } - -- (void)requestCompleted { +- (void)requestCompletedWithObj:(id)obj andModelObjBlock:(void (^)(id model))modelBlock{ + } + @end diff --git a/GJNetWorking/Request/GJModelRequest.m b/GJNetWorking/Request/GJModelRequest.m index a4498cf..372d031 100644 --- a/GJNetWorking/Request/GJModelRequest.m +++ b/GJNetWorking/Request/GJModelRequest.m @@ -19,20 +19,18 @@ @interface GJModelRequest () @implementation GJModelRequest - (id)responseObject { - if (self.responseModel) { - return self.responseModel; - } - return [super responseObject]; + + return nil; } -- (void)requestCompleted{ - - [super requestCompleted]; +- (void)requestCompletedWithObj:(id)obj andModelObjBlock:(void (^)(id model))modelBlock{ + + [super requestCompletedWithObj:obj andModelObjBlock:modelBlock]; BOOL success = !self.error; id responseStatus; - id responseObject = self.responseObject; + id responseObject = obj; //if request success and request implement modelClass, //when request or default modelMaker implement the delegate , @@ -50,9 +48,11 @@ - (void)requestCompleted{ } if (modelMaker) { - self.responseModel = [modelMaker makeModelWithJSON:responseObject + id model = [modelMaker makeModelWithJSON:responseObject class:[self modelClass] status:&responseStatus]; + + modelBlock(model); self.status = responseStatus; } diff --git a/GJNetWorkingDemo.xcodeproj/project.pbxproj b/GJNetWorkingDemo.xcodeproj/project.pbxproj index bced4ef..134f853 100644 --- a/GJNetWorkingDemo.xcodeproj/project.pbxproj +++ b/GJNetWorkingDemo.xcodeproj/project.pbxproj @@ -9,20 +9,19 @@ /* Begin PBXBuildFile section */ 420DFA101C17254B007743E6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA0F1C17254B007743E6 /* main.m */; }; 420DFA131C17254B007743E6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA121C17254B007743E6 /* AppDelegate.m */; }; - 420DFA161C17254B007743E6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA151C17254B007743E6 /* ViewController.m */; }; 420DFA191C17254B007743E6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 420DFA171C17254B007743E6 /* Main.storyboard */; }; 420DFA1B1C17254B007743E6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 420DFA1A1C17254B007743E6 /* Assets.xcassets */; }; 420DFA1E1C17254B007743E6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 420DFA1C1C17254B007743E6 /* LaunchScreen.storyboard */; }; - 420DFA341C172644007743E6 /* GJHTTPManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA271C172644007743E6 /* GJHTTPManager.m */; }; - 420DFA351C172644007743E6 /* GJNetworkingConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA2B1C172644007743E6 /* GJNetworkingConfig.m */; }; - 420DFA361C172644007743E6 /* GJAPICacheRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA2F1C172644007743E6 /* GJAPICacheRequest.m */; }; - 420DFA371C172644007743E6 /* GJBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA311C172644007743E6 /* GJBaseRequest.m */; }; - 420DFA381C172644007743E6 /* GJModelRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA331C172644007743E6 /* GJModelRequest.m */; }; - 420DFA431C17268D007743E6 /* MantleModelMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA3B1C17268D007743E6 /* MantleModelMaker.m */; }; 420DFA441C17268D007743E6 /* MJModelMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA3D1C17268D007743E6 /* MJModelMaker.m */; }; - 420DFA451C17268D007743E6 /* GCStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA401C17268D007743E6 /* GCStatus.m */; }; - 420DFA461C17268D007743E6 /* GCTestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA421C17268D007743E6 /* GCTestModel.m */; }; - 420DFA491C17269C007743E6 /* MYRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 420DFA481C17269C007743E6 /* MYRequest.m */; }; + 5F9301FB1CDC77E20081AAAC /* GCStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F9301F81CDC77E20081AAAC /* GCStatus.m */; }; + 5F9301FC1CDC77E20081AAAC /* Retdata.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F9301FA1CDC77E20081AAAC /* Retdata.m */; }; + 5F9301FF1CDC77FB0081AAAC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F9301FE1CDC77FB0081AAAC /* ViewController.m */; }; + 5F9302021CDC79880081AAAC /* MYRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F9302011CDC79880081AAAC /* MYRequest.m */; }; + 5F9302151CDC8AAE0081AAAC /* GJHTTPManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F9302101CDC8AAE0081AAAC /* GJHTTPManager.m */; }; + 5F9302161CDC8AAE0081AAAC /* GJNetworkingConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F9302131CDC8AAE0081AAAC /* GJNetworkingConfig.m */; }; + 5F93021D1CDC8ABE0081AAAC /* GJAPICacheRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F9302181CDC8ABE0081AAAC /* GJAPICacheRequest.m */; }; + 5F93021E1CDC8ABE0081AAAC /* GJBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F93021A1CDC8ABE0081AAAC /* GJBaseRequest.m */; }; + 5F93021F1CDC8ABE0081AAAC /* GJModelRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F93021C1CDC8ABE0081AAAC /* GJModelRequest.m */; }; C5C4F1B97FC09CAC1C92C1D3 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B718924360312AC476C45A4 /* libPods.a */; }; /* End PBXBuildFile section */ @@ -31,35 +30,33 @@ 420DFA0F1C17254B007743E6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 420DFA111C17254B007743E6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 420DFA121C17254B007743E6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 420DFA141C17254B007743E6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 420DFA151C17254B007743E6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 420DFA181C17254B007743E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 420DFA1A1C17254B007743E6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 420DFA1D1C17254B007743E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 420DFA1F1C17254B007743E6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 420DFA261C172644007743E6 /* GJHTTPManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJHTTPManager.h; sourceTree = ""; }; - 420DFA271C172644007743E6 /* GJHTTPManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJHTTPManager.m; sourceTree = ""; }; - 420DFA281C172644007743E6 /* GJModelMakerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJModelMakerDelegate.h; sourceTree = ""; }; - 420DFA2A1C172644007743E6 /* GJNetworkingConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJNetworkingConfig.h; sourceTree = ""; }; - 420DFA2B1C172644007743E6 /* GJNetworkingConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJNetworkingConfig.m; sourceTree = ""; }; - 420DFA2C1C172644007743E6 /* GJRequestProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJRequestProtocol.h; sourceTree = ""; }; - 420DFA2E1C172644007743E6 /* GJAPICacheRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJAPICacheRequest.h; sourceTree = ""; }; - 420DFA2F1C172644007743E6 /* GJAPICacheRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJAPICacheRequest.m; sourceTree = ""; }; - 420DFA301C172644007743E6 /* GJBaseRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJBaseRequest.h; sourceTree = ""; }; - 420DFA311C172644007743E6 /* GJBaseRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJBaseRequest.m; sourceTree = ""; }; - 420DFA321C172644007743E6 /* GJModelRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJModelRequest.h; sourceTree = ""; }; - 420DFA331C172644007743E6 /* GJModelRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJModelRequest.m; sourceTree = ""; }; - 420DFA3A1C17268D007743E6 /* MantleModelMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MantleModelMaker.h; sourceTree = ""; }; - 420DFA3B1C17268D007743E6 /* MantleModelMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MantleModelMaker.m; sourceTree = ""; }; 420DFA3C1C17268D007743E6 /* MJModelMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJModelMaker.h; sourceTree = ""; }; 420DFA3D1C17268D007743E6 /* MJModelMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MJModelMaker.m; sourceTree = ""; }; - 420DFA3F1C17268D007743E6 /* GCStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCStatus.h; sourceTree = ""; }; - 420DFA401C17268D007743E6 /* GCStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCStatus.m; sourceTree = ""; }; - 420DFA411C17268D007743E6 /* GCTestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCTestModel.h; sourceTree = ""; }; - 420DFA421C17268D007743E6 /* GCTestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCTestModel.m; sourceTree = ""; }; - 420DFA471C17269C007743E6 /* MYRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MYRequest.h; sourceTree = ""; }; - 420DFA481C17269C007743E6 /* MYRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MYRequest.m; sourceTree = ""; }; 5B718924360312AC476C45A4 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 5F9301F71CDC77E20081AAAC /* GCStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCStatus.h; sourceTree = ""; }; + 5F9301F81CDC77E20081AAAC /* GCStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCStatus.m; sourceTree = ""; }; + 5F9301F91CDC77E20081AAAC /* Retdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Retdata.h; sourceTree = ""; }; + 5F9301FA1CDC77E20081AAAC /* Retdata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Retdata.m; sourceTree = ""; }; + 5F9301FD1CDC77FB0081AAAC /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 5F9301FE1CDC77FB0081AAAC /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 5F9302001CDC79880081AAAC /* MYRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MYRequest.h; sourceTree = ""; }; + 5F9302011CDC79880081AAAC /* MYRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MYRequest.m; sourceTree = ""; }; + 5F93020F1CDC8AAE0081AAAC /* GJHTTPManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJHTTPManager.h; sourceTree = ""; }; + 5F9302101CDC8AAE0081AAAC /* GJHTTPManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJHTTPManager.m; sourceTree = ""; }; + 5F9302111CDC8AAE0081AAAC /* GJModelMakerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJModelMakerDelegate.h; sourceTree = ""; }; + 5F9302121CDC8AAE0081AAAC /* GJNetworkingConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJNetworkingConfig.h; sourceTree = ""; }; + 5F9302131CDC8AAE0081AAAC /* GJNetworkingConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJNetworkingConfig.m; sourceTree = ""; }; + 5F9302141CDC8AAE0081AAAC /* GJRequestProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJRequestProtocol.h; sourceTree = ""; }; + 5F9302171CDC8ABE0081AAAC /* GJAPICacheRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJAPICacheRequest.h; sourceTree = ""; }; + 5F9302181CDC8ABE0081AAAC /* GJAPICacheRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJAPICacheRequest.m; sourceTree = ""; }; + 5F9302191CDC8ABE0081AAAC /* GJBaseRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJBaseRequest.h; sourceTree = ""; }; + 5F93021A1CDC8ABE0081AAAC /* GJBaseRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJBaseRequest.m; sourceTree = ""; }; + 5F93021B1CDC8ABE0081AAAC /* GJModelRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJModelRequest.h; sourceTree = ""; }; + 5F93021C1CDC8ABE0081AAAC /* GJModelRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJModelRequest.m; sourceTree = ""; }; 8E09056B53E975BA31F42123 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; D16D00A329CCD66D2C7DC0EF /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -102,10 +99,10 @@ 420DFA3E1C17268D007743E6 /* Models */, 420DFA111C17254B007743E6 /* AppDelegate.h */, 420DFA121C17254B007743E6 /* AppDelegate.m */, - 420DFA141C17254B007743E6 /* ViewController.h */, - 420DFA151C17254B007743E6 /* ViewController.m */, - 420DFA471C17269C007743E6 /* MYRequest.h */, - 420DFA481C17269C007743E6 /* MYRequest.m */, + 5F9302001CDC79880081AAAC /* MYRequest.h */, + 5F9302011CDC79880081AAAC /* MYRequest.m */, + 5F9301FD1CDC77FB0081AAAC /* ViewController.h */, + 5F9301FE1CDC77FB0081AAAC /* ViewController.m */, 420DFA171C17254B007743E6 /* Main.storyboard */, 420DFA1A1C17254B007743E6 /* Assets.xcassets */, 420DFA1C1C17254B007743E6 /* LaunchScreen.storyboard */, @@ -126,12 +123,12 @@ 420DFA251C172644007743E6 /* GJNetWorking */ = { isa = PBXGroup; children = ( - 420DFA261C172644007743E6 /* GJHTTPManager.h */, - 420DFA271C172644007743E6 /* GJHTTPManager.m */, - 420DFA281C172644007743E6 /* GJModelMakerDelegate.h */, - 420DFA2A1C172644007743E6 /* GJNetworkingConfig.h */, - 420DFA2B1C172644007743E6 /* GJNetworkingConfig.m */, - 420DFA2C1C172644007743E6 /* GJRequestProtocol.h */, + 5F93020F1CDC8AAE0081AAAC /* GJHTTPManager.h */, + 5F9302101CDC8AAE0081AAAC /* GJHTTPManager.m */, + 5F9302111CDC8AAE0081AAAC /* GJModelMakerDelegate.h */, + 5F9302121CDC8AAE0081AAAC /* GJNetworkingConfig.h */, + 5F9302131CDC8AAE0081AAAC /* GJNetworkingConfig.m */, + 5F9302141CDC8AAE0081AAAC /* GJRequestProtocol.h */, 420DFA2D1C172644007743E6 /* Request */, ); path = GJNetWorking; @@ -140,12 +137,12 @@ 420DFA2D1C172644007743E6 /* Request */ = { isa = PBXGroup; children = ( - 420DFA2E1C172644007743E6 /* GJAPICacheRequest.h */, - 420DFA2F1C172644007743E6 /* GJAPICacheRequest.m */, - 420DFA301C172644007743E6 /* GJBaseRequest.h */, - 420DFA311C172644007743E6 /* GJBaseRequest.m */, - 420DFA321C172644007743E6 /* GJModelRequest.h */, - 420DFA331C172644007743E6 /* GJModelRequest.m */, + 5F9302171CDC8ABE0081AAAC /* GJAPICacheRequest.h */, + 5F9302181CDC8ABE0081AAAC /* GJAPICacheRequest.m */, + 5F9302191CDC8ABE0081AAAC /* GJBaseRequest.h */, + 5F93021A1CDC8ABE0081AAAC /* GJBaseRequest.m */, + 5F93021B1CDC8ABE0081AAAC /* GJModelRequest.h */, + 5F93021C1CDC8ABE0081AAAC /* GJModelRequest.m */, ); path = Request; sourceTree = ""; @@ -153,8 +150,6 @@ 420DFA391C17268D007743E6 /* ModelMakers */ = { isa = PBXGroup; children = ( - 420DFA3A1C17268D007743E6 /* MantleModelMaker.h */, - 420DFA3B1C17268D007743E6 /* MantleModelMaker.m */, 420DFA3C1C17268D007743E6 /* MJModelMaker.h */, 420DFA3D1C17268D007743E6 /* MJModelMaker.m */, ); @@ -164,10 +159,10 @@ 420DFA3E1C17268D007743E6 /* Models */ = { isa = PBXGroup; children = ( - 420DFA3F1C17268D007743E6 /* GCStatus.h */, - 420DFA401C17268D007743E6 /* GCStatus.m */, - 420DFA411C17268D007743E6 /* GCTestModel.h */, - 420DFA421C17268D007743E6 /* GCTestModel.m */, + 5F9301F71CDC77E20081AAAC /* GCStatus.h */, + 5F9301F81CDC77E20081AAAC /* GCStatus.m */, + 5F9301F91CDC77E20081AAAC /* Retdata.h */, + 5F9301FA1CDC77E20081AAAC /* Retdata.m */, ); path = Models; sourceTree = ""; @@ -310,18 +305,17 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 420DFA361C172644007743E6 /* GJAPICacheRequest.m in Sources */, - 420DFA161C17254B007743E6 /* ViewController.m in Sources */, - 420DFA431C17268D007743E6 /* MantleModelMaker.m in Sources */, - 420DFA461C17268D007743E6 /* GCTestModel.m in Sources */, + 5F93021D1CDC8ABE0081AAAC /* GJAPICacheRequest.m in Sources */, + 5F9302021CDC79880081AAAC /* MYRequest.m in Sources */, + 5F9302161CDC8AAE0081AAAC /* GJNetworkingConfig.m in Sources */, + 5F9301FB1CDC77E20081AAAC /* GCStatus.m in Sources */, + 5F9302151CDC8AAE0081AAAC /* GJHTTPManager.m in Sources */, + 5F93021E1CDC8ABE0081AAAC /* GJBaseRequest.m in Sources */, 420DFA131C17254B007743E6 /* AppDelegate.m in Sources */, - 420DFA341C172644007743E6 /* GJHTTPManager.m in Sources */, 420DFA441C17268D007743E6 /* MJModelMaker.m in Sources */, - 420DFA451C17268D007743E6 /* GCStatus.m in Sources */, - 420DFA351C172644007743E6 /* GJNetworkingConfig.m in Sources */, - 420DFA371C172644007743E6 /* GJBaseRequest.m in Sources */, - 420DFA381C172644007743E6 /* GJModelRequest.m in Sources */, - 420DFA491C17269C007743E6 /* MYRequest.m in Sources */, + 5F9301FF1CDC77FB0081AAAC /* ViewController.m in Sources */, + 5F9301FC1CDC77E20081AAAC /* Retdata.m in Sources */, + 5F93021F1CDC8ABE0081AAAC /* GJModelRequest.m in Sources */, 420DFA101C17254B007743E6 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/GJNetWorkingDemo/AppDelegate.m b/GJNetWorkingDemo/AppDelegate.m index aa6b02a..c1e729a 100644 --- a/GJNetWorkingDemo/AppDelegate.m +++ b/GJNetWorkingDemo/AppDelegate.m @@ -8,7 +8,7 @@ #import "AppDelegate.h" #import "GJNetworkingConfig.h" -#import "MantleModelMaker.h" +#import "MJModelMaker.h" @interface AppDelegate () @@ -18,13 +18,13 @@ @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GJNetworkingConfig setDefaultBaseUrl:@"http://10.106.4.154:7070/" + [GJNetworkingConfig setDefaultBaseUrl:@"http://apistore.baidu.com/" acceptableContentTypes:[NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/html", nil] allowInvalidCertificates:YES validatesDomainName:NO maxOperationCount:4 timeOutInterval:20 - modelMaker:[MantleModelMaker class]]; + modelMaker:[MJModelMaker class]]; [GJNetworkingConfig setCacheDirectory:@"apiCache"]; return YES; } diff --git a/GJNetWorkingDemo/MYRequest.h b/GJNetWorkingDemo/MYRequest.h old mode 100644 new mode 100755 diff --git a/GJNetWorkingDemo/MYRequest.m b/GJNetWorkingDemo/MYRequest.m old mode 100644 new mode 100755 index 84ca800..4e48e9c --- a/GJNetWorkingDemo/MYRequest.m +++ b/GJNetWorkingDemo/MYRequest.m @@ -7,26 +7,25 @@ // #import "MYRequest.h" -#import "GCTestModel.h" +#import "Retdata.h" @implementation MYRequest - (NSString *)path{ - return @"p2pInitController/getInitData.action"; + return @"microservice/cityinfo"; } - (NSDictionary *)parameters{ - return @{@"channelId":@"E66C5A44DE9841CC70C3DBD51560EC2B", - @"clientType":@"1", - @"sign":@"b28e3b36bf836b8176b583538ea3f406"}; + return @{@"cityname":@"北京", + }; } - (GJRequestMethod)method{ - return GJRequestPOST; + return GJRequestGET; } - (Class)modelClass{ - return [GCTestModel class]; + return [Retdata class]; } - (GJAPICachePolicy)cachePolicy { diff --git a/GJNetWorkingDemo/ModelMakers/MJModelMaker.m b/GJNetWorkingDemo/ModelMakers/MJModelMaker.m index 0d26f84..7542b3d 100644 --- a/GJNetWorkingDemo/ModelMakers/MJModelMaker.m +++ b/GJNetWorkingDemo/ModelMakers/MJModelMaker.m @@ -16,7 +16,7 @@ + (id)makeModelWithJSON:(NSDictionary *)json class:(Class)modelClass status:(__a GCStatus *sta = [GCStatus mj_objectWithKeyValues:json]; *status = sta; - id dataJson = json[@"data"]; + id dataJson = json[@"retData"]; if ([dataJson isKindOfClass:[NSDictionary class]]) { id model = [modelClass mj_objectWithKeyValues:dataJson]; return model; diff --git a/GJNetWorkingDemo/ModelMakers/MantleModelMaker.h b/GJNetWorkingDemo/ModelMakers/MantleModelMaker.h deleted file mode 100644 index 7871554..0000000 --- a/GJNetWorkingDemo/ModelMakers/MantleModelMaker.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// MantleModelMaker.h -// GJNetWorking -// -// Created by wangyutao on 15/11/17. -// Copyright © 2015年 wangyutao. All rights reserved. -// - -#import -#import "GJModelMakerDelegate.h" - -@interface MantleModelMaker : NSObject - -@end diff --git a/GJNetWorkingDemo/ModelMakers/MantleModelMaker.m b/GJNetWorkingDemo/ModelMakers/MantleModelMaker.m deleted file mode 100644 index 19a3b90..0000000 --- a/GJNetWorkingDemo/ModelMakers/MantleModelMaker.m +++ /dev/null @@ -1,37 +0,0 @@ -// -// MantleModelMaker.m -// GJNetWorking -// -// Created by wangyutao on 15/11/17. -// Copyright © 2015年 wangyutao. All rights reserved. -// - -#import "MantleModelMaker.h" -#import "GCStatus.h" - -@implementation MantleModelMaker - -+ (id)makeModelWithJSON:(NSDictionary *)json - class:(Class)modelClass - status:(id __autoreleasing *)status{ - - MTLJSONAdapter *adapter = [[MTLJSONAdapter alloc] initWithModelClass:[GCStatus class]]; - GCStatus *sta = [adapter modelFromJSONDictionary:json error:nil]; - *status = sta; - - id dataJson = json[@"data"]; - if ([dataJson isKindOfClass:[NSDictionary class]]) { - adapter = [[MTLJSONAdapter alloc] initWithModelClass:modelClass]; - id model = [adapter modelFromJSONDictionary:dataJson error:nil]; - return model; - } - else if ([dataJson isKindOfClass:[NSArray class]]){ - NSArray *array = [MTLJSONAdapter modelsOfClass:modelClass fromJSONArray:dataJson error:nil]; - return array; - } - - NSLog(@"unavailable json!"); - return nil; -} - -@end diff --git a/GJNetWorkingDemo/Models/GCStatus.h b/GJNetWorkingDemo/Models/GCStatus.h old mode 100644 new mode 100755 index 7198091..5552cef --- a/GJNetWorkingDemo/Models/GCStatus.h +++ b/GJNetWorkingDemo/Models/GCStatus.h @@ -7,12 +7,11 @@ // #import -#import "Mantle.h" -@interface GCStatus : MTLModel +@interface GCStatus : NSObject -@property (nonatomic, copy) NSString *errorCode; -@property (nonatomic, copy) NSString *message; -@property (nonatomic, copy) NSString *result; +@property (nonatomic, copy) NSNumber *errNum; +@property (nonatomic, copy) NSString *retMsg; +//@property (nonatomic, copy) NSDictionary *retData; @end diff --git a/GJNetWorkingDemo/Models/GCStatus.m b/GJNetWorkingDemo/Models/GCStatus.m old mode 100644 new mode 100755 index 572c310..a2ca691 --- a/GJNetWorkingDemo/Models/GCStatus.m +++ b/GJNetWorkingDemo/Models/GCStatus.m @@ -10,17 +10,4 @@ @implementation GCStatus -//mantle -+ (NSDictionary *)JSONKeyPathsByPropertyKey{ - return @{@"errorCode":@"errorCode", - @"message":@"msg", - @"result":@"result"}; -} - -//mj -+ (NSDictionary *)replacedKeyFromPropertyName { - return @{@"errorCode":@"errorCode", - @"message":@"msg", - @"result":@"result"}; -} @end diff --git a/GJNetWorkingDemo/Models/GCTestModel.h b/GJNetWorkingDemo/Models/GCTestModel.h deleted file mode 100644 index d905251..0000000 --- a/GJNetWorkingDemo/Models/GCTestModel.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// GCTestModel.h -// GJNetWorking -// -// Created by wangyutao on 15/11/18. -// Copyright © 2015年 wangyutao. All rights reserved. -// - -#import -#import "Mantle.h" - -@interface GCTestModel : MTLModel - -@property (nonatomic, copy) NSDictionary *loadingPage; -@property (nonatomic, copy) NSString *payBanks; -@property (nonatomic, copy) NSString *payPageRiskTips; -@property (nonatomic, copy) NSString *productListData; -@property (nonatomic, copy) NSArray *refreshData; -@property (nonatomic, copy) NSString *registerButton; -@property (nonatomic, copy) NSString *registerConfirm; -@property (nonatomic, copy) NSString *registerNext; -@property (nonatomic, copy) NSString *riskReserveFundDesc; -@property (nonatomic, copy) NSString *riskReserveFundImg; -@property (nonatomic, copy) NSString *riskReserveFundMoney; -@property (nonatomic, copy) NSString *soldOutRemind; -@property (nonatomic, copy) NSString *withdrawalBanks; - -@end diff --git a/GJNetWorkingDemo/Models/GCTestModel.m b/GJNetWorkingDemo/Models/GCTestModel.m deleted file mode 100644 index 67de069..0000000 --- a/GJNetWorkingDemo/Models/GCTestModel.m +++ /dev/null @@ -1,35 +0,0 @@ -// -// GCTestModel.m -// GJNetWorking -// -// Created by wangyutao on 15/11/18. -// Copyright © 2015年 wangyutao. All rights reserved. -// - -#import "GCTestModel.h" - -@implementation GCTestModel - -//mantle -+ (NSDictionary *)JSONKeyPathsByPropertyKey{ - return @{@"loadingPage":@"loadingPage", - @"payBanks":@"payBanks", - @"payPageRiskTips":@"payPageRiskTips", - @"productListData":@"productListData", - @"refreshData":@"refreshData", - @"registerButton":@"registerButton", - @"registerConfirm":@"registerConfirm", - @"registerNext":@"registerNext", - @"riskReserveFundDesc":@"riskReserveFundDesc", - @"riskReserveFundImg":@"riskReserveFundImg", - @"riskReserveFundMoney":@"riskReserveFundMoney", - @"soldOutRemind":@"soldOutRemind", - @"withdrawalBanks":@"withdrawalBanks", - }; -} - -//mj -+ (NSDictionary *)replacedKeyFromPropertyName { - return [self JSONKeyPathsByPropertyKey]; -} -@end diff --git a/GJNetWorkingDemo/Models/Retdata.h b/GJNetWorkingDemo/Models/Retdata.h new file mode 100644 index 0000000..072a3c8 --- /dev/null +++ b/GJNetWorkingDemo/Models/Retdata.h @@ -0,0 +1,25 @@ +// +// Retdata.h +// JSONModel +// +// Created by halong33 on 16/03/01 +// Copyright (c) __ORGANIZATIONNAME__. All rights reserved. +// + +#import + + + +@interface Retdata : NSObject + +@property (nonatomic, copy) NSString *cityCode; + +@property (nonatomic, copy) NSString *cityName; + +@property (nonatomic, copy) NSString *telAreaCode; + +@property (nonatomic, copy) NSString *zipCode; + +@property (nonatomic, copy) NSString *provinceName; + +@end \ No newline at end of file diff --git a/GJNetWorkingDemo/Models/Retdata.m b/GJNetWorkingDemo/Models/Retdata.m new file mode 100644 index 0000000..839e4e3 --- /dev/null +++ b/GJNetWorkingDemo/Models/Retdata.m @@ -0,0 +1,13 @@ +// +// Retdata.m +// JSONModel +// +// Created by halong33 on 16/03/01 +// Copyright (c) __ORGANIZATIONNAME__. All rights reserved. +// + +#import "Retdata.h" + +@implementation Retdata + +@end diff --git a/GJNetWorkingDemo/ViewController.h b/GJNetWorkingDemo/ViewController.h index cf37f3a..799ab63 100644 --- a/GJNetWorkingDemo/ViewController.h +++ b/GJNetWorkingDemo/ViewController.h @@ -1,9 +1,9 @@ // // ViewController.h -// GJNetWorkingDemo +// XinWeiWu // -// Created by wangyutao on 15/12/8. -// Copyright © 2015年 wangyutao. All rights reserved. +// Created by halong33 on 16/3/2. +// Copyright © 2016年 com.halong. All rights reserved. // #import diff --git a/GJNetWorkingDemo/ViewController.m b/GJNetWorkingDemo/ViewController.m index 82bedc3..f70525c 100644 --- a/GJNetWorkingDemo/ViewController.m +++ b/GJNetWorkingDemo/ViewController.m @@ -1,15 +1,16 @@ // // ViewController.m -// GJNetWorkingDemo +// XinWeiWu // -// Created by wangyutao on 15/12/8. -// Copyright © 2015年 wangyutao. All rights reserved. +// Created by halong33 on 16/3/2. +// Copyright © 2016年 com.halong. All rights reserved. // #import "ViewController.h" #import "MYRequest.h" -#import "GCTestModel.h" +#import "Retdata.h" #import "GCStatus.h" + @interface ViewController () @end @@ -18,21 +19,18 @@ @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; - + //模拟接口的调用 MYRequest *request = [MYRequest new]; [request startWithSuccessBlock:^(id responseObject, id status, NSError *error) { - GCTestModel *model = (GCTestModel*)responseObject; - NSLog(@"%@\nstatus %@",model,status); + Retdata *model = (Retdata*)responseObject; + GCStatus *statue = (GCStatus *)status; + NSLog(@"城市名: %@",model.cityName); } failedBlock:^(id responseObject, id status, NSError *error) { }]; - // Do any additional setup after loading the view, typically from a nib. -} -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. } + @end diff --git a/Podfile b/Podfile index 44fee96..326eae2 100644 --- a/Podfile +++ b/Podfile @@ -1,8 +1,6 @@ -platform :ios, '6.0' +platform :ios, '7.0' - -pod 'AFNetworking' -pod 'Mantle' +pod 'AFNetworking', '~> 3.0.4' pod 'MJExtension' pod 'YYModel' pod 'JSONModel' \ No newline at end of file diff --git a/Podfile.lock b/Podfile.lock index dfe29b8..916161d 100644 --- a/Podfile.lock +++ b/Podfile.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/AFNetworking/AFNetworking/AFHTTPRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h deleted file mode 100644 index 321d4e7..0000000 --- a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h +++ /dev/null @@ -1,66 +0,0 @@ -// AFHTTPRequestOperation.h -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -#import -#import "AFURLConnectionOperation.h" - -/** - `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. - */ -@interface AFHTTPRequestOperation : AFURLConnectionOperation - -///------------------------------------------------ -/// @name Getting HTTP URL Connection Information -///------------------------------------------------ - -/** - The last HTTP response received by the operation's connection. - */ -@property (readonly, nonatomic, strong) NSHTTPURLResponse *response; - -/** - Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an AFHTTPResponse serializer, which uses the raw data as its response object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed. - - @warning `responseSerializer` must not be `nil`. Setting a response serializer will clear out any cached value - */ -@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; - -/** - An object constructed by the `responseSerializer` from the response and response data. Returns `nil` unless the operation `isFinished`, has a `response`, and has `responseData` with non-zero content length. If an error occurs during serialization, `nil` will be returned, and the `error` property will be populated with the serialization error. - */ -@property (readonly, nonatomic, strong) id responseObject; - -///----------------------------------------------------------- -/// @name Setting Completion Block Success / Failure Callbacks -///----------------------------------------------------------- - -/** - Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed. - - This method should be overridden in subclasses in order to specify the response object passed into the success block. - - @param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request. - @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request. - */ -- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m deleted file mode 100644 index b8deda8..0000000 --- a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m +++ /dev/null @@ -1,206 +0,0 @@ -// AFHTTPRequestOperation.m -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -#import "AFHTTPRequestOperation.h" - -static dispatch_queue_t http_request_operation_processing_queue() { - static dispatch_queue_t af_http_request_operation_processing_queue; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - af_http_request_operation_processing_queue = dispatch_queue_create("com.alamofire.networking.http-request.processing", DISPATCH_QUEUE_CONCURRENT); - }); - - return af_http_request_operation_processing_queue; -} - -static dispatch_group_t http_request_operation_completion_group() { - static dispatch_group_t af_http_request_operation_completion_group; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - af_http_request_operation_completion_group = dispatch_group_create(); - }); - - return af_http_request_operation_completion_group; -} - -#pragma mark - - -@interface AFURLConnectionOperation () -@property (readwrite, nonatomic, strong) NSURLRequest *request; -@property (readwrite, nonatomic, strong) NSURLResponse *response; -@end - -@interface AFHTTPRequestOperation () -@property (readwrite, nonatomic, strong) NSHTTPURLResponse *response; -@property (readwrite, nonatomic, strong) id responseObject; -@property (readwrite, nonatomic, strong) NSError *responseSerializationError; -@property (readwrite, nonatomic, strong) NSRecursiveLock *lock; -@end - -@implementation AFHTTPRequestOperation -@dynamic response; -@dynamic lock; - -- (instancetype)initWithRequest:(NSURLRequest *)urlRequest { - self = [super initWithRequest:urlRequest]; - if (!self) { - return nil; - } - - self.responseSerializer = [AFHTTPResponseSerializer serializer]; - - return self; -} - -- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { - NSParameterAssert(responseSerializer); - - [self.lock lock]; - _responseSerializer = responseSerializer; - self.responseObject = nil; - self.responseSerializationError = nil; - [self.lock unlock]; -} - -- (id)responseObject { - [self.lock lock]; - if (!_responseObject && [self isFinished] && !self.error) { - NSError *error = nil; - self.responseObject = [self.responseSerializer responseObjectForResponse:self.response data:self.responseData error:&error]; - if (error) { - self.responseSerializationError = error; - } - } - [self.lock unlock]; - - return _responseObject; -} - -- (NSError *)error { - if (_responseSerializationError) { - return _responseSerializationError; - } else { - return [super error]; - } -} - -#pragma mark - AFHTTPRequestOperation - -- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - // completionBlock is manually nilled out in AFURLConnectionOperation to break the retain cycle. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-retain-cycles" -#pragma clang diagnostic ignored "-Wgnu" - self.completionBlock = ^{ - if (self.completionGroup) { - dispatch_group_enter(self.completionGroup); - } - - dispatch_async(http_request_operation_processing_queue(), ^{ - if (self.error) { - if (failure) { - dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{ - failure(self, self.error); - }); - } - } else { - id responseObject = self.responseObject; - if (self.error) { - if (failure) { - dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{ - failure(self, self.error); - }); - } - } else { - if (success) { - dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{ - success(self, responseObject); - }); - } - } - } - - if (self.completionGroup) { - dispatch_group_leave(self.completionGroup); - } - }); - }; -#pragma clang diagnostic pop -} - -#pragma mark - AFURLRequestOperation - -- (void)pause { - [super pause]; - - u_int64_t offset = 0; - if ([self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey]) { - offset = [(NSNumber *)[self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey] unsignedLongLongValue]; - } else { - offset = [(NSData *)[self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey] length]; - } - - NSMutableURLRequest *mutableURLRequest = [self.request mutableCopy]; - if ([self.response respondsToSelector:@selector(allHeaderFields)] && [[self.response allHeaderFields] valueForKey:@"ETag"]) { - [mutableURLRequest setValue:[[self.response allHeaderFields] valueForKey:@"ETag"] forHTTPHeaderField:@"If-Range"]; - } - [mutableURLRequest setValue:[NSString stringWithFormat:@"bytes=%llu-", offset] forHTTPHeaderField:@"Range"]; - self.request = mutableURLRequest; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (id)initWithCoder:(NSCoder *)decoder { - self = [super initWithCoder:decoder]; - if (!self) { - return nil; - } - - self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)coder { - [super encodeWithCoder:coder]; - - [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; -} - -#pragma mark - NSCopying - -- (id)copyWithZone:(NSZone *)zone { - AFHTTPRequestOperation *operation = [super copyWithZone:zone]; - - operation.responseSerializer = [self.responseSerializer copyWithZone:zone]; - operation.completionQueue = self.completionQueue; - operation.completionGroup = self.completionGroup; - - return operation; -} - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h deleted file mode 100644 index 17caa78..0000000 --- a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h +++ /dev/null @@ -1,323 +0,0 @@ -// AFHTTPRequestOperationManager.h -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -#import -#import -#import - -#if __IPHONE_OS_VERSION_MIN_REQUIRED -#import -#else -#import -#endif - -#import "AFHTTPRequestOperation.h" -#import "AFURLResponseSerialization.h" -#import "AFURLRequestSerialization.h" -#import "AFSecurityPolicy.h" -#import "AFNetworkReachabilityManager.h" - -#ifndef NS_DESIGNATED_INITIALIZER -#if __has_attribute(objc_designated_initializer) -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -#else -#define NS_DESIGNATED_INITIALIZER -#endif -#endif - -/** - `AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management. - - ## Subclassing Notes - - Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application. - - For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect. - - ## Methods to Override - - To change the behavior of all request operation construction for an `AFHTTPRequestOperationManager` subclass, override `HTTPRequestOperationWithRequest:success:failure`. - - ## Serialization - - Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to ``. - - Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `` - - ## URL Construction Using Relative Paths - - For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`. - - Below are a few examples of how `baseURL` and relative paths interact: - - NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"]; - [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo - [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz - [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo - [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo - [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/ - [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/ - - Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash. - - ## Network Reachability Monitoring - - Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details. - - ## NSSecureCoding & NSCopying Caveats - - `AFHTTPRequestOperationManager` conforms to the `NSSecureCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. There are a few minor caveats to keep in mind, however: - - - Archives and copies of HTTP clients will be initialized with an empty operation queue. - - NSSecureCoding cannot serialize / deserialize block properties, so an archive of an HTTP client will not include any reachability callback block that may be set. - */ -@interface AFHTTPRequestOperationManager : NSObject - -/** - The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. - */ -@property (readonly, nonatomic, strong) NSURL *baseURL; - -/** - Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies. - - @warning `requestSerializer` must not be `nil`. - */ -@property (nonatomic, strong) AFHTTPRequestSerializer * requestSerializer; - -/** - Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to a JSON serializer, which serializes data from responses with a `application/json` MIME type, and falls back to the raw data object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed. - - @warning `responseSerializer` must not be `nil`. - */ -@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; - -/** - The operation queue on which request operations are scheduled and run. - */ -@property (nonatomic, strong) NSOperationQueue *operationQueue; - -///------------------------------- -/// @name Managing URL Credentials -///------------------------------- - -/** - Whether request operations should consult the credential storage for authenticating the connection. `YES` by default. - - @see AFURLConnectionOperation -shouldUseCredentialStorage - */ -@property (nonatomic, assign) BOOL shouldUseCredentialStorage; - -/** - The credential used by request operations for authentication challenges. - - @see AFURLConnectionOperation -credential - */ -@property (nonatomic, strong) NSURLCredential *credential; - -///------------------------------- -/// @name Managing Security Policy -///------------------------------- - -/** - The security policy used by created request operations to evaluate server trust for secure connections. `AFHTTPRequestOperationManager` uses the `defaultPolicy` unless otherwise specified. - */ -@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; - -///------------------------------------ -/// @name Managing Network Reachability -///------------------------------------ - -/** - The network reachability manager. `AFHTTPRequestOperationManager` uses the `sharedManager` by default. - */ -@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager; - -///------------------------------- -/// @name Managing Callback Queues -///------------------------------- - -/** - The dispatch queue for the `completionBlock` of request operations. If `NULL` (default), the main queue is used. - */ -#if OS_OBJECT_HAVE_OBJC_SUPPORT -@property (nonatomic, strong) dispatch_queue_t completionQueue; -#else -@property (nonatomic, assign) dispatch_queue_t completionQueue; -#endif - -/** - The dispatch group for the `completionBlock` of request operations. If `NULL` (default), a private dispatch group is used. - */ -#if OS_OBJECT_HAVE_OBJC_SUPPORT -@property (nonatomic, strong) dispatch_group_t completionGroup; -#else -@property (nonatomic, assign) dispatch_group_t completionGroup; -#endif - -///--------------------------------------------- -/// @name Creating and Initializing HTTP Clients -///--------------------------------------------- - -/** - Creates and returns an `AFHTTPRequestOperationManager` object. - */ -+ (instancetype)manager; - -/** - Initializes an `AFHTTPRequestOperationManager` object with the specified base URL. - - This is the designated initializer. - - @param url The base URL for the HTTP client. - - @return The newly-initialized HTTP client - */ -- (instancetype)initWithBaseURL:(NSURL *)url NS_DESIGNATED_INITIALIZER; - -///--------------------------------------- -/// @name Managing HTTP Request Operations -///--------------------------------------- - -/** - Creates an `AFHTTPRequestOperation`, and sets the response serializers to that of the HTTP client. - - @param request The request object to be loaded asynchronously during execution of the operation. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. - */ -- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -///--------------------------- -/// @name Making HTTP Requests -///--------------------------- - -/** - Creates and runs an `AFHTTPRequestOperation` with a `GET` request. - - @param URLString The URL string used to create the request URL. - @param parameters The parameters to be encoded according to the client request serializer. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (AFHTTPRequestOperation *)GET:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates and runs an `AFHTTPRequestOperation` with a `HEAD` request. - - @param URLString The URL string used to create the request URL. - @param parameters The parameters to be encoded according to the client request serializer. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes a single arguments: the request operation. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (AFHTTPRequestOperation *)HEAD:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates and runs an `AFHTTPRequestOperation` with a `POST` request. - - @param URLString The URL string used to create the request URL. - @param parameters The parameters to be encoded according to the client request serializer. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (AFHTTPRequestOperation *)POST:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates and runs an `AFHTTPRequestOperation` with a multipart `POST` request. - - @param URLString The URL string used to create the request URL. - @param parameters The parameters to be encoded according to the client request serializer. - @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (AFHTTPRequestOperation *)POST:(NSString *)URLString - parameters:(id)parameters - constructingBodyWithBlock:(void (^)(id formData))block - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates and runs an `AFHTTPRequestOperation` with a `PUT` request. - - @param URLString The URL string used to create the request URL. - @param parameters The parameters to be encoded according to the client request serializer. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (AFHTTPRequestOperation *)PUT:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates and runs an `AFHTTPRequestOperation` with a `PATCH` request. - - @param URLString The URL string used to create the request URL. - @param parameters The parameters to be encoded according to the client request serializer. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates and runs an `AFHTTPRequestOperation` with a `DELETE` request. - - @param URLString The URL string used to create the request URL. - @param parameters The parameters to be encoded according to the client request serializer. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -@end - diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m deleted file mode 100644 index 60739e5..0000000 --- a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m +++ /dev/null @@ -1,284 +0,0 @@ -// AFHTTPRequestOperationManager.m -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -#import - -#import "AFHTTPRequestOperationManager.h" -#import "AFHTTPRequestOperation.h" - -#import -#import - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#import -#endif - -@interface AFHTTPRequestOperationManager () -@property (readwrite, nonatomic, strong) NSURL *baseURL; -@end - -@implementation AFHTTPRequestOperationManager - -+ (instancetype)manager { - return [[self alloc] initWithBaseURL:nil]; -} - -- (instancetype)init { - return [self initWithBaseURL:nil]; -} - -- (instancetype)initWithBaseURL:(NSURL *)url { - self = [super init]; - if (!self) { - return nil; - } - - // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected - if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) { - url = [url URLByAppendingPathComponent:@""]; - } - - self.baseURL = url; - - self.requestSerializer = [AFHTTPRequestSerializer serializer]; - self.responseSerializer = [AFJSONResponseSerializer serializer]; - - self.securityPolicy = [AFSecurityPolicy defaultPolicy]; - - self.reachabilityManager = [AFNetworkReachabilityManager sharedManager]; - - self.operationQueue = [[NSOperationQueue alloc] init]; - - self.shouldUseCredentialStorage = YES; - - return self; -} - -#pragma mark - - -#ifdef _SYSTEMCONFIGURATION_H -#endif - -- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { - NSParameterAssert(requestSerializer); - - _requestSerializer = requestSerializer; -} - -- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { - NSParameterAssert(responseSerializer); - - _responseSerializer = responseSerializer; -} - -#pragma mark - - -- (AFHTTPRequestOperation *)HTTPRequestOperationWithHTTPMethod:(NSString *)method - URLString:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - NSError *serializationError = nil; - NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError]; - if (serializationError) { - if (failure) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgnu" - dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ - failure(nil, serializationError); - }); -#pragma clang diagnostic pop - } - - return nil; - } - - return [self HTTPRequestOperationWithRequest:request success:success failure:failure]; -} - -- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; - operation.responseSerializer = self.responseSerializer; - operation.shouldUseCredentialStorage = self.shouldUseCredentialStorage; - operation.credential = self.credential; - operation.securityPolicy = self.securityPolicy; - - [operation setCompletionBlockWithSuccess:success failure:failure]; - operation.completionQueue = self.completionQueue; - operation.completionGroup = self.completionGroup; - - return operation; -} - -#pragma mark - - -- (AFHTTPRequestOperation *)GET:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"GET" URLString:URLString parameters:parameters success:success failure:failure]; - - [self.operationQueue addOperation:operation]; - - return operation; -} - -- (AFHTTPRequestOperation *)HEAD:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters success:^(AFHTTPRequestOperation *requestOperation, __unused id responseObject) { - if (success) { - success(requestOperation); - } - } failure:failure]; - - [self.operationQueue addOperation:operation]; - - return operation; -} - -- (AFHTTPRequestOperation *)POST:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"POST" URLString:URLString parameters:parameters success:success failure:failure]; - - [self.operationQueue addOperation:operation]; - - return operation; -} - -- (AFHTTPRequestOperation *)POST:(NSString *)URLString - parameters:(id)parameters - constructingBodyWithBlock:(void (^)(id formData))block - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - NSError *serializationError = nil; - NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError]; - if (serializationError) { - if (failure) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgnu" - dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ - failure(nil, serializationError); - }); -#pragma clang diagnostic pop - } - - return nil; - } - - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; - - [self.operationQueue addOperation:operation]; - - return operation; -} - -- (AFHTTPRequestOperation *)PUT:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters success:success failure:failure]; - - [self.operationQueue addOperation:operation]; - - return operation; -} - -- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters success:success failure:failure]; - - [self.operationQueue addOperation:operation]; - - return operation; -} - -- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters success:success failure:failure]; - - [self.operationQueue addOperation:operation]; - - return operation; -} - -#pragma mark - NSObject - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.operationQueue]; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (id)initWithCoder:(NSCoder *)decoder { - NSURL *baseURL = [decoder decodeObjectForKey:NSStringFromSelector(@selector(baseURL))]; - - self = [self initWithBaseURL:baseURL]; - if (!self) { - return nil; - } - - self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))]; - self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)coder { - [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))]; - [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))]; - [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; -} - -#pragma mark - NSCopying - -- (id)copyWithZone:(NSZone *)zone { - AFHTTPRequestOperationManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL]; - - HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone]; - HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone]; - - return HTTPClient; -} - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h b/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h index cc98bab..55ed92e 100644 --- a/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h +++ b/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h @@ -20,10 +20,12 @@ // THE SOFTWARE. #import +#if !TARGET_OS_WATCH #import -#import +#endif +#import -#if __IPHONE_OS_VERSION_MIN_REQUIRED +#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV #import #else #import @@ -31,14 +33,6 @@ #import "AFURLSessionManager.h" -#ifndef NS_DESIGNATED_INITIALIZER -#if __has_attribute(objc_designated_initializer) -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -#else -#define NS_DESIGNATED_INITIALIZER -#endif -#endif - /** `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths. @@ -77,14 +71,14 @@ @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. */ -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) +NS_ASSUME_NONNULL_BEGIN @interface AFHTTPSessionManager : AFURLSessionManager /** - The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. + The URL used to construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. */ -@property (readonly, nonatomic, strong) NSURL *baseURL; +@property (readonly, nonatomic, strong, nullable) NSURL *baseURL; /** Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies. @@ -116,7 +110,7 @@ @return The newly-initialized HTTP client */ -- (instancetype)initWithBaseURL:(NSURL *)url; +- (instancetype)initWithBaseURL:(nullable NSURL *)url; /** Initializes an `AFHTTPSessionManager` object with the specified base URL. @@ -128,8 +122,8 @@ @return The newly-initialized HTTP client */ -- (instancetype)initWithBaseURL:(NSURL *)url - sessionConfiguration:(NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithBaseURL:(nullable NSURL *)url + sessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; ///--------------------------- /// @name Making HTTP Requests @@ -145,10 +139,28 @@ @see -dataTaskWithRequest:completionHandler: */ -- (NSURLSessionDataTask *)GET:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(NSURLSessionDataTask *task, id responseObject))success - failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; +- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE; + + +/** + Creates and runs an `NSURLSessionDataTask` with a `GET` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param progress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: + */ +- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString + parameters:(nullable id)parameters + progress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; /** Creates and runs an `NSURLSessionDataTask` with a `HEAD` request. @@ -160,10 +172,10 @@ @see -dataTaskWithRequest:completionHandler: */ -- (NSURLSessionDataTask *)HEAD:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(NSURLSessionDataTask *task))success - failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; +- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; /** Creates and runs an `NSURLSessionDataTask` with a `POST` request. @@ -175,10 +187,27 @@ @see -dataTaskWithRequest:completionHandler: */ -- (NSURLSessionDataTask *)POST:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(NSURLSessionDataTask *task, id responseObject))success - failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; +- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE; + +/** + Creates and runs an `NSURLSessionDataTask` with a `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: + */ +- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + progress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; /** Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request. @@ -191,11 +220,30 @@ @see -dataTaskWithRequest:completionHandler: */ -- (NSURLSessionDataTask *)POST:(NSString *)URLString - parameters:(id)parameters - constructingBodyWithBlock:(void (^)(id formData))block - success:(void (^)(NSURLSessionDataTask *task, id responseObject))success - failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; +- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + constructingBodyWithBlock:(nullable void (^)(id formData))block + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE; + +/** + Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. + @param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: + */ +- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + constructingBodyWithBlock:(nullable void (^)(id formData))block + progress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; /** Creates and runs an `NSURLSessionDataTask` with a `PUT` request. @@ -207,10 +255,10 @@ @see -dataTaskWithRequest:completionHandler: */ -- (NSURLSessionDataTask *)PUT:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(NSURLSessionDataTask *task, id responseObject))success - failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; +- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; /** Creates and runs an `NSURLSessionDataTask` with a `PATCH` request. @@ -222,10 +270,10 @@ @see -dataTaskWithRequest:completionHandler: */ -- (NSURLSessionDataTask *)PATCH:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(NSURLSessionDataTask *task, id responseObject))success - failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; +- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; /** Creates and runs an `NSURLSessionDataTask` with a `DELETE` request. @@ -237,11 +285,11 @@ @see -dataTaskWithRequest:completionHandler: */ -- (NSURLSessionDataTask *)DELETE:(NSString *)URLString - parameters:(id)parameters - success:(void (^)(NSURLSessionDataTask *task, id responseObject))success - failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; +- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString + parameters:(nullable id)parameters + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; @end -#endif +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m b/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m index 2b8352e..a28cc6e 100644 --- a/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m +++ b/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m @@ -21,24 +21,23 @@ #import "AFHTTPSessionManager.h" -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) - #import "AFURLRequestSerialization.h" #import "AFURLResponseSerialization.h" #import +#import #import -#ifdef _SYSTEMCONFIGURATION_H #import #import #import #import #import -#endif -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV #import +#elif TARGET_OS_WATCH +#import #endif @interface AFHTTPSessionManager () @@ -87,9 +86,6 @@ - (instancetype)initWithBaseURL:(NSURL *)url #pragma mark - -#ifdef _SYSTEMCONFIGURATION_H -#endif - - (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { NSParameterAssert(requestSerializer); @@ -109,7 +105,24 @@ - (NSURLSessionDataTask *)GET:(NSString *)URLString success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure { - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET" URLString:URLString parameters:parameters success:success failure:failure]; + + return [self GET:URLString parameters:parameters progress:nil success:success failure:failure]; +} + +- (NSURLSessionDataTask *)GET:(NSString *)URLString + parameters:(id)parameters + progress:(void (^)(NSProgress * _Nonnull))downloadProgress + success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success + failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure +{ + + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET" + URLString:URLString + parameters:parameters + uploadProgress:nil + downloadProgress:downloadProgress + success:success + failure:failure]; [dataTask resume]; @@ -121,7 +134,7 @@ - (NSURLSessionDataTask *)HEAD:(NSString *)URLString success:(void (^)(NSURLSessionDataTask *task))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure { - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters success:^(NSURLSessionDataTask *task, __unused id responseObject) { + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:^(NSURLSessionDataTask *task, __unused id responseObject) { if (success) { success(task); } @@ -137,16 +150,35 @@ - (NSURLSessionDataTask *)POST:(NSString *)URLString success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure { - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters success:success failure:failure]; + return [self POST:URLString parameters:parameters progress:nil success:success failure:failure]; +} + +- (NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(id)parameters + progress:(void (^)(NSProgress * _Nonnull))uploadProgress + success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success + failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters uploadProgress:uploadProgress downloadProgress:nil success:success failure:failure]; [dataTask resume]; return dataTask; } +- (NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + constructingBodyWithBlock:(nullable void (^)(id _Nonnull))block + success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure +{ + return [self POST:URLString parameters:parameters constructingBodyWithBlock:block progress:nil success:success failure:failure]; +} + - (NSURLSessionDataTask *)POST:(NSString *)URLString parameters:(id)parameters constructingBodyWithBlock:(void (^)(id formData))block + progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure { @@ -165,7 +197,7 @@ - (NSURLSessionDataTask *)POST:(NSString *)URLString return nil; } - __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:nil completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { + __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:uploadProgress completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { if (error) { if (failure) { failure(task, error); @@ -187,7 +219,7 @@ - (NSURLSessionDataTask *)PUT:(NSString *)URLString success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure { - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters success:success failure:failure]; + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure]; [dataTask resume]; @@ -199,7 +231,7 @@ - (NSURLSessionDataTask *)PATCH:(NSString *)URLString success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure { - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters success:success failure:failure]; + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure]; [dataTask resume]; @@ -211,7 +243,7 @@ - (NSURLSessionDataTask *)DELETE:(NSString *)URLString success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure { - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters success:success failure:failure]; + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure]; [dataTask resume]; @@ -221,6 +253,8 @@ - (NSURLSessionDataTask *)DELETE:(NSString *)URLString - (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method URLString:(NSString *)URLString parameters:(id)parameters + uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress + downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress success:(void (^)(NSURLSessionDataTask *, id))success failure:(void (^)(NSURLSessionDataTask *, NSError *))failure { @@ -240,7 +274,10 @@ - (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method } __block NSURLSessionDataTask *dataTask = nil; - dataTask = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { + dataTask = [self dataTaskWithRequest:request + uploadProgress:uploadProgress + downloadProgress:downloadProgress + completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { if (error) { if (failure) { failure(dataTask, error); @@ -267,7 +304,7 @@ + (BOOL)supportsSecureCoding { return YES; } -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { NSURL *baseURL = [decoder decodeObjectOfClass:[NSURL class] forKey:NSStringFromSelector(@selector(baseURL))]; NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; if (!configuration) { @@ -288,6 +325,10 @@ - (id)initWithCoder:(NSCoder *)decoder { self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))]; self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; + AFSecurityPolicy *decodedPolicy = [decoder decodeObjectOfClass:[AFSecurityPolicy class] forKey:NSStringFromSelector(@selector(securityPolicy))]; + if (decodedPolicy) { + self.securityPolicy = decodedPolicy; + } return self; } @@ -303,19 +344,18 @@ - (void)encodeWithCoder:(NSCoder *)coder { } [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))]; [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; + [coder encodeObject:self.securityPolicy forKey:NSStringFromSelector(@selector(securityPolicy))]; } #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFHTTPSessionManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL sessionConfiguration:self.session.configuration]; HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone]; HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone]; - + HTTPClient.securityPolicy = [self.securityPolicy copyWithZone:zone]; return HTTPClient; } @end - -#endif diff --git a/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h b/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h index 4ce2a36..4cf0496 100644 --- a/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h +++ b/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h @@ -20,15 +20,9 @@ // THE SOFTWARE. #import -#import -#ifndef NS_DESIGNATED_INITIALIZER -#if __has_attribute(objc_designated_initializer) -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -#else -#define NS_DESIGNATED_INITIALIZER -#endif -#endif +#if !TARGET_OS_WATCH +#import typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { AFNetworkReachabilityStatusUnknown = -1, @@ -37,6 +31,8 @@ typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { AFNetworkReachabilityStatusReachableViaWiFi = 2, }; +NS_ASSUME_NONNULL_BEGIN + /** `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. @@ -77,6 +73,13 @@ typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { */ + (instancetype)sharedManager; +/** + Creates and returns a network reachability manager with the default socket address. + + @return An initialized network reachability manager, actively monitoring the default socket address. + */ ++ (instancetype)manager; + /** Creates and returns a network reachability manager for the specified domain. @@ -89,7 +92,7 @@ typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { /** Creates and returns a network reachability manager for the socket address. - @param address The socket address (`sockaddr_in`) used to evaluate network reachability. + @param address The socket address (`sockaddr_in6`) used to evaluate network reachability. @return An initialized network reachability manager, actively monitoring the specified socket address. */ @@ -136,7 +139,7 @@ typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`. */ -- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block; +- (void)setReachabilityStatusChangeBlock:(nullable void (^)(AFNetworkReachabilityStatus status))block; @end @@ -187,8 +190,8 @@ typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import ` to the header prefix of the project (`Prefix.pch`). */ -extern NSString * const AFNetworkingReachabilityDidChangeNotification; -extern NSString * const AFNetworkingReachabilityNotificationStatusItem; +FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityDidChangeNotification; +FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusItem; ///-------------------- /// @name Functions @@ -197,4 +200,7 @@ extern NSString * const AFNetworkingReachabilityNotificationStatusItem; /** Returns a localized string representation of an `AFNetworkReachabilityStatus` value. */ -extern NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status); +FOUNDATION_EXPORT NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status); + +NS_ASSUME_NONNULL_END +#endif diff --git a/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m b/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m index 25e9581..5fba0f7 100644 --- a/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m +++ b/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m @@ -20,6 +20,7 @@ // THE SOFTWARE. #import "AFNetworkReachabilityManager.h" +#if !TARGET_OS_WATCH #import #import @@ -32,12 +33,6 @@ typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status); -typedef NS_ENUM(NSUInteger, AFNetworkReachabilityAssociation) { - AFNetworkReachabilityForAddress = 1, - AFNetworkReachabilityForAddressPair = 2, - AFNetworkReachabilityForName = 3, -}; - NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status) { switch (status) { case AFNetworkReachabilityStatusNotReachable: @@ -75,22 +70,31 @@ static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetwork return status; } -static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) { +/** + * Queue a status change notification for the main thread. + * + * This is done to ensure that the notifications are received in the same order + * as they are sent. If notifications are sent directly, it is possible that + * a queued notification (for an earlier status condition) is processed after + * the later update, resulting in the listener being left in the wrong state. + */ +static void AFPostReachabilityStatusChange(SCNetworkReachabilityFlags flags, AFNetworkReachabilityStatusBlock block) { AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); - AFNetworkReachabilityStatusBlock block = (__bridge AFNetworkReachabilityStatusBlock)info; - if (block) { - block(status); - } - - dispatch_async(dispatch_get_main_queue(), ^{ + if (block) { + block(status); + } NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) }; [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo]; }); +} +static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) { + AFPostReachabilityStatusChange(flags, (__bridge AFNetworkReachabilityStatusBlock)info); } + static const void * AFNetworkReachabilityRetainCallback(const void *info) { return Block_copy(info); } @@ -102,8 +106,7 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { } @interface AFNetworkReachabilityManager () -@property (readwrite, nonatomic, assign) SCNetworkReachabilityRef networkReachability; -@property (readwrite, nonatomic, assign) AFNetworkReachabilityAssociation networkReachabilityAssociation; +@property (readwrite, nonatomic, strong) id networkReachability; @property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; @property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock; @end @@ -114,34 +117,46 @@ + (instancetype)sharedManager { static AFNetworkReachabilityManager *_sharedManager = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - struct sockaddr_in address; - bzero(&address, sizeof(address)); - address.sin_len = sizeof(address); - address.sin_family = AF_INET; - - _sharedManager = [self managerForAddress:&address]; + _sharedManager = [self manager]; }); return _sharedManager; } +#ifndef __clang_analyzer__ + (instancetype)managerForDomain:(NSString *)domain { SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]); AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; - manager.networkReachabilityAssociation = AFNetworkReachabilityForName; return manager; } +#endif +#ifndef __clang_analyzer__ + (instancetype)managerForAddress:(const void *)address { SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address); - AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; - manager.networkReachabilityAssociation = AFNetworkReachabilityForAddress; return manager; } +#endif + ++ (instancetype)manager +{ +#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + struct sockaddr_in6 address; + bzero(&address, sizeof(address)); + address.sin6_len = sizeof(address); + address.sin6_family = AF_INET6; +#else + struct sockaddr_in address; + bzero(&address, sizeof(address)); + address.sin_len = sizeof(address); + address.sin_family = AF_INET; +#endif + return [self managerForAddress:&address]; +} - (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability { self = [super init]; @@ -149,19 +164,19 @@ - (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability { return nil; } - self.networkReachability = reachability; + self.networkReachability = CFBridgingRelease(reachability); self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown; return self; } +- (instancetype)init NS_UNAVAILABLE +{ + return nil; +} + - (void)dealloc { [self stopMonitoring]; - - if (_networkReachability) { - CFRelease(_networkReachability); - _networkReachability = NULL; - } } #pragma mark - @@ -198,32 +213,17 @@ - (void)startMonitoring { }; + id networkReachability = self.networkReachability; SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL}; - SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context); - SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); - - switch (self.networkReachabilityAssociation) { - case AFNetworkReachabilityForName: - break; - case AFNetworkReachabilityForAddress: - case AFNetworkReachabilityForAddressPair: - default: { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{ - SCNetworkReachabilityFlags flags; - SCNetworkReachabilityGetFlags(self.networkReachability, &flags); - AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); - dispatch_async(dispatch_get_main_queue(), ^{ - callback(status); - - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:@{ AFNetworkingReachabilityNotificationStatusItem: @(status) }]; - - - }); - }); + SCNetworkReachabilitySetCallback((__bridge SCNetworkReachabilityRef)networkReachability, AFNetworkReachabilityCallback, &context); + SCNetworkReachabilityScheduleWithRunLoop((__bridge SCNetworkReachabilityRef)networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{ + SCNetworkReachabilityFlags flags; + if (SCNetworkReachabilityGetFlags((__bridge SCNetworkReachabilityRef)networkReachability, &flags)) { + AFPostReachabilityStatusChange(flags, callback); } - break; - } + }); } - (void)stopMonitoring { @@ -231,7 +231,7 @@ - (void)stopMonitoring { return; } - SCNetworkReachabilityUnscheduleFromRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); + SCNetworkReachabilityUnscheduleFromRunLoop((__bridge SCNetworkReachabilityRef)self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); } #pragma mark - @@ -257,3 +257,4 @@ + (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key { } @end +#endif diff --git a/Pods/AFNetworking/AFNetworking/AFNetworking.h b/Pods/AFNetworking/AFNetworking/AFNetworking.h index 68273da..e2fb2f4 100644 --- a/Pods/AFNetworking/AFNetworking/AFNetworking.h +++ b/Pods/AFNetworking/AFNetworking/AFNetworking.h @@ -22,6 +22,7 @@ #import #import +#import #ifndef _AFNETWORKING_ #define _AFNETWORKING_ @@ -29,16 +30,12 @@ #import "AFURLRequestSerialization.h" #import "AFURLResponseSerialization.h" #import "AFSecurityPolicy.h" - #import "AFNetworkReachabilityManager.h" - #import "AFURLConnectionOperation.h" - #import "AFHTTPRequestOperation.h" - #import "AFHTTPRequestOperationManager.h" +#if !TARGET_OS_WATCH + #import "AFNetworkReachabilityManager.h" +#endif -#if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \ - ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) ) #import "AFURLSessionManager.h" #import "AFHTTPSessionManager.h" -#endif #endif /* _AFNETWORKING_ */ diff --git a/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h b/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h index c6cec83..90fa212 100644 --- a/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h +++ b/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h @@ -33,7 +33,10 @@ typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled. */ -@interface AFSecurityPolicy : NSObject + +NS_ASSUME_NONNULL_BEGIN + +@interface AFSecurityPolicy : NSObject /** The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`. @@ -41,14 +44,13 @@ typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { @property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode; /** - Whether to evaluate an entire SSL certificate chain, or just the leaf certificate. Defaults to `YES`. - */ -@property (nonatomic, assign) BOOL validatesCertificateChain; + The certificates used to evaluate server trust according to the SSL pinning mode. -/** - The certificates used to evaluate server trust according to the SSL pinning mode. By default, this property is set to any (`.cer`) certificates included in the app bundle. + By default, this property is set to any (`.cer`) certificates included in the target compiling AFNetworking. Note that if you are using AFNetworking as embedded framework, no certificates will be pinned by default. Use `certificatesInBundle` to load certificates from your target, and then create a new policy by calling `policyWithPinningMode:withPinnedCertificates`. + + Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches. */ -@property (nonatomic, strong) NSArray *pinnedCertificates; +@property (nonatomic, strong, nullable) NSSet *pinnedCertificates; /** Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`. @@ -60,6 +62,17 @@ typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { */ @property (nonatomic, assign) BOOL validatesDomainName; +///----------------------------------------- +/// @name Getting Certificates from the Bundle +///----------------------------------------- + +/** + Returns any certificates included in the bundle. If you are using AFNetworking as an embedded framework, you must use this method to find the certificates you have included in your app bundle, and use them when creating your security policy by calling `policyWithPinningMode:withPinnedCertificates`. + + @return The certificates included in the given bundle. + */ ++ (NSSet *)certificatesInBundle:(NSBundle *)bundle; + ///----------------------------------------- /// @name Getting Specific Security Policies ///----------------------------------------- @@ -84,22 +97,19 @@ typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { */ + (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode; -///------------------------------ -/// @name Evaluating Server Trust -///------------------------------ - /** - Whether or not the specified server trust should be accepted, based on the security policy. - - This method should be used when responding to an authentication challenge from a server. - - @param serverTrust The X.509 certificate trust of the server. + Creates and returns a security policy with the specified pinning mode. - @return Whether or not to trust the server. + @param pinningMode The SSL pinning mode. + @param pinnedCertificates The certificates to pin against. - @warning This method has been deprecated in favor of `-evaluateServerTrust:forDomain:`. + @return A new security policy. */ -- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust DEPRECATED_ATTRIBUTE; ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet *)pinnedCertificates; + +///------------------------------ +/// @name Evaluating Server Trust +///------------------------------ /** Whether or not the specified server trust should be accepted, based on the security policy. @@ -112,10 +122,12 @@ typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { @return Whether or not to trust the server. */ - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust - forDomain:(NSString *)domain; + forDomain:(nullable NSString *)domain; @end +NS_ASSUME_NONNULL_END + ///---------------- /// @name Constants ///---------------- diff --git a/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m b/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m index 2bbff62..3704cca 100644 --- a/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m +++ b/Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m @@ -23,7 +23,7 @@ #import -#if !defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if !TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV static NSData * AFSecKeyGetData(SecKeyRef key) { CFDataRef data = NULL; @@ -41,7 +41,7 @@ #endif static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) { -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV return [(__bridge id)key1 isEqual:(__bridge id)key2]; #else return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)]; @@ -150,25 +150,29 @@ static BOOL AFServerTrustIsValid(SecTrustRef serverTrust) { @interface AFSecurityPolicy() @property (readwrite, nonatomic, assign) AFSSLPinningMode SSLPinningMode; -@property (readwrite, nonatomic, strong) NSArray *pinnedPublicKeys; +@property (readwrite, nonatomic, strong) NSSet *pinnedPublicKeys; @end @implementation AFSecurityPolicy -+ (NSArray *)defaultPinnedCertificates { - static NSArray *_defaultPinnedCertificates = nil; ++ (NSSet *)certificatesInBundle:(NSBundle *)bundle { + NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."]; + + NSMutableSet *certificates = [NSMutableSet setWithCapacity:[paths count]]; + for (NSString *path in paths) { + NSData *certificateData = [NSData dataWithContentsOfFile:path]; + [certificates addObject:certificateData]; + } + + return [NSSet setWithSet:certificates]; +} + ++ (NSSet *)defaultPinnedCertificates { + static NSSet *_defaultPinnedCertificates = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ NSBundle *bundle = [NSBundle bundleForClass:[self class]]; - NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."]; - - NSMutableArray *certificates = [NSMutableArray arrayWithCapacity:[paths count]]; - for (NSString *path in paths) { - NSData *certificateData = [NSData dataWithContentsOfFile:path]; - [certificates addObject:certificateData]; - } - - _defaultPinnedCertificates = [[NSArray alloc] initWithArray:certificates]; + _defaultPinnedCertificates = [self certificatesInBundle:bundle]; }); return _defaultPinnedCertificates; @@ -182,31 +186,34 @@ + (instancetype)defaultPolicy { } + (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode { + return [self policyWithPinningMode:pinningMode withPinnedCertificates:[self defaultPinnedCertificates]]; +} + ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet *)pinnedCertificates { AFSecurityPolicy *securityPolicy = [[self alloc] init]; securityPolicy.SSLPinningMode = pinningMode; - [securityPolicy setPinnedCertificates:[self defaultPinnedCertificates]]; + [securityPolicy setPinnedCertificates:pinnedCertificates]; return securityPolicy; } -- (id)init { +- (instancetype)init { self = [super init]; if (!self) { return nil; } - self.validatesCertificateChain = YES; self.validatesDomainName = YES; return self; } -- (void)setPinnedCertificates:(NSArray *)pinnedCertificates { +- (void)setPinnedCertificates:(NSSet *)pinnedCertificates { _pinnedCertificates = pinnedCertificates; if (self.pinnedCertificates) { - NSMutableArray *mutablePinnedPublicKeys = [NSMutableArray arrayWithCapacity:[self.pinnedCertificates count]]; + NSMutableSet *mutablePinnedPublicKeys = [NSMutableSet setWithCapacity:[self.pinnedCertificates count]]; for (NSData *certificate in self.pinnedCertificates) { id publicKey = AFPublicKeyForCertificate(certificate); if (!publicKey) { @@ -214,7 +221,7 @@ - (void)setPinnedCertificates:(NSArray *)pinnedCertificates { } [mutablePinnedPublicKeys addObject:publicKey]; } - self.pinnedPublicKeys = [NSArray arrayWithArray:mutablePinnedPublicKeys]; + self.pinnedPublicKeys = [NSSet setWithSet:mutablePinnedPublicKeys]; } else { self.pinnedPublicKeys = nil; } @@ -222,13 +229,22 @@ - (void)setPinnedCertificates:(NSArray *)pinnedCertificates { #pragma mark - -- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust { - return [self evaluateServerTrust:serverTrust forDomain:nil]; -} - - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust forDomain:(NSString *)domain { + if (domain && self.allowInvalidCertificates && self.validatesDomainName && (self.SSLPinningMode == AFSSLPinningModeNone || [self.pinnedCertificates count] == 0)) { + // https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html + // According to the docs, you should only trust your provided certs for evaluation. + // Pinned certificates are added to the trust. Without pinned certificates, + // there is nothing to evaluate against. + // + // From Apple Docs: + // "Do not implicitly trust self-signed certificates as anchors (kSecTrustOptionImplicitAnchors). + // Instead, add your own (self-signed) CA certificate to the list of trusted anchors." + NSLog(@"In order to validate a domain name for self signed certificates, you MUST use pinning."); + return NO; + } + NSMutableArray *policies = [NSMutableArray array]; if (self.validatesDomainName) { [policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)]; @@ -239,16 +255,11 @@ - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies); if (self.SSLPinningMode == AFSSLPinningModeNone) { - if (self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust)){ - return YES; - } else { - return NO; - } + return self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust); } else if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) { return NO; } - NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust); switch (self.SSLPinningMode) { case AFSSLPinningModeNone: default: @@ -264,25 +275,20 @@ - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust return NO; } - if (!self.validatesCertificateChain) { - return YES; - } - - NSUInteger trustedCertificateCount = 0; - for (NSData *trustChainCertificate in serverCertificates) { + // obtain the chain after being validated, which *should* contain the pinned certificate in the last position (if it's the Root CA) + NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust); + + for (NSData *trustChainCertificate in [serverCertificates reverseObjectEnumerator]) { if ([self.pinnedCertificates containsObject:trustChainCertificate]) { - trustedCertificateCount++; + return YES; } } - - return trustedCertificateCount == [serverCertificates count]; + + return NO; } case AFSSLPinningModePublicKey: { NSUInteger trustedPublicKeyCount = 0; NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust); - if (!self.validatesCertificateChain && [publicKeys count] > 0) { - publicKeys = @[[publicKeys firstObject]]; - } for (id trustChainPublicKey in publicKeys) { for (id pinnedPublicKey in self.pinnedPublicKeys) { @@ -291,11 +297,10 @@ - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust } } } - - return trustedPublicKeyCount > 0 && ((self.validatesCertificateChain && trustedPublicKeyCount == [serverCertificates count]) || (!self.validatesCertificateChain && trustedPublicKeyCount >= 1)); + return trustedPublicKeyCount > 0; } } - + return NO; } @@ -305,4 +310,44 @@ + (NSSet *)keyPathsForValuesAffectingPinnedPublicKeys { return [NSSet setWithObject:@"pinnedCertificates"]; } +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + + self = [self init]; + if (!self) { + return nil; + } + + self.SSLPinningMode = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(SSLPinningMode))] unsignedIntegerValue]; + self.allowInvalidCertificates = [decoder decodeBoolForKey:NSStringFromSelector(@selector(allowInvalidCertificates))]; + self.validatesDomainName = [decoder decodeBoolForKey:NSStringFromSelector(@selector(validatesDomainName))]; + self.pinnedCertificates = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(pinnedCertificates))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:[NSNumber numberWithUnsignedInteger:self.SSLPinningMode] forKey:NSStringFromSelector(@selector(SSLPinningMode))]; + [coder encodeBool:self.allowInvalidCertificates forKey:NSStringFromSelector(@selector(allowInvalidCertificates))]; + [coder encodeBool:self.validatesDomainName forKey:NSStringFromSelector(@selector(validatesDomainName))]; + [coder encodeObject:self.pinnedCertificates forKey:NSStringFromSelector(@selector(pinnedCertificates))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFSecurityPolicy *securityPolicy = [[[self class] allocWithZone:zone] init]; + securityPolicy.SSLPinningMode = self.SSLPinningMode; + securityPolicy.allowInvalidCertificates = self.allowInvalidCertificates; + securityPolicy.validatesDomainName = self.validatesDomainName; + securityPolicy.pinnedCertificates = [self.pinnedCertificates copyWithZone:zone]; + + return securityPolicy; +} + @end diff --git a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h deleted file mode 100644 index 0248e67..0000000 --- a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h +++ /dev/null @@ -1,343 +0,0 @@ -// AFURLConnectionOperation.h -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -#import - -#import -#import "AFURLRequestSerialization.h" -#import "AFURLResponseSerialization.h" -#import "AFSecurityPolicy.h" - -#ifndef NS_DESIGNATED_INITIALIZER -#if __has_attribute(objc_designated_initializer) -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -#else -#define NS_DESIGNATED_INITIALIZER -#endif -#endif - -/** - `AFURLConnectionOperation` is a subclass of `NSOperation` that implements `NSURLConnection` delegate methods. - - ## Subclassing Notes - - This is the base class of all network request operations. You may wish to create your own subclass in order to implement additional `NSURLConnection` delegate methods (see "`NSURLConnection` Delegate Methods" below), or to provide additional properties and/or class constructors. - - If you are creating a subclass that communicates over the HTTP or HTTPS protocols, you may want to consider subclassing `AFHTTPRequestOperation` instead, as it supports specifying acceptable content types or status codes. - - ## NSURLConnection Delegate Methods - - `AFURLConnectionOperation` implements the following `NSURLConnection` delegate methods: - - - `connection:didReceiveResponse:` - - `connection:didReceiveData:` - - `connectionDidFinishLoading:` - - `connection:didFailWithError:` - - `connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:` - - `connection:willCacheResponse:` - - `connectionShouldUseCredentialStorage:` - - `connection:needNewBodyStream:` - - `connection:willSendRequestForAuthenticationChallenge:` - - If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first. - - ## Callbacks and Completion Blocks - - The built-in `completionBlock` provided by `NSOperation` allows for custom behavior to be executed after the request finishes. It is a common pattern for class constructors in subclasses to take callback block parameters, and execute them conditionally in the body of its `completionBlock`. Make sure to handle cancelled operations appropriately when setting a `completionBlock` (i.e. returning early before parsing response data). See the implementation of any of the `AFHTTPRequestOperation` subclasses for an example of this. - - Subclasses are strongly discouraged from overriding `setCompletionBlock:`, as `AFURLConnectionOperation`'s implementation includes a workaround to mitigate retain cycles, and what Apple rather ominously refers to as ["The Deallocation Problem"](http://developer.apple.com/library/ios/#technotes/tn2109/). - - ## SSL Pinning - - Relying on the CA trust model to validate SSL certificates exposes your app to security vulnerabilities, such as man-in-the-middle attacks. For applications that connect to known servers, SSL certificate pinning provides an increased level of security, by checking server certificate validity against those specified in the app bundle. - - SSL with certificate pinning is strongly recommended for any application that transmits sensitive information to an external webservice. - - Connections will be validated on all matching certificates with a `.cer` extension in the bundle root. - - ## App Extensions - - When using AFNetworking in an App Extension, `#define AF_APP_EXTENSIONS` to avoid using unavailable APIs. - - ## NSCoding & NSCopying Conformance - - `AFURLConnectionOperation` conforms to the `NSCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. However, because of the intrinsic limitations of capturing the exact state of an operation at a particular moment, there are some important caveats to keep in mind: - - ### NSCoding Caveats - - - Encoded operations do not include any block or stream properties. Be sure to set `completionBlock`, `outputStream`, and any callback blocks as necessary when using `-initWithCoder:` or `NSKeyedUnarchiver`. - - Operations are paused on `encodeWithCoder:`. If the operation was encoded while paused or still executing, its archived state will return `YES` for `isReady`. Otherwise, the state of an operation when encoding will remain unchanged. - - ### NSCopying Caveats - - - `-copy` and `-copyWithZone:` return a new operation with the `NSURLRequest` of the original. So rather than an exact copy of the operation at that particular instant, the copying mechanism returns a completely new instance, which can be useful for retrying operations. - - A copy of an operation will not include the `outputStream` of the original. - - Operation copies do not include `completionBlock`, as it often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ operation when copied. - */ - -@interface AFURLConnectionOperation : NSOperation - -///------------------------------- -/// @name Accessing Run Loop Modes -///------------------------------- - -/** - The run loop modes in which the operation will run on the network thread. By default, this is a single-member set containing `NSRunLoopCommonModes`. - */ -@property (nonatomic, strong) NSSet *runLoopModes; - -///----------------------------------------- -/// @name Getting URL Connection Information -///----------------------------------------- - -/** - The request used by the operation's connection. - */ -@property (readonly, nonatomic, strong) NSURLRequest *request; - -/** - The last response received by the operation's connection. - */ -@property (readonly, nonatomic, strong) NSURLResponse *response; - -/** - The error, if any, that occurred in the lifecycle of the request. - */ -@property (readonly, nonatomic, strong) NSError *error; - -///---------------------------- -/// @name Getting Response Data -///---------------------------- - -/** - The data received during the request. - */ -@property (readonly, nonatomic, strong) NSData *responseData; - -/** - The string representation of the response data. - */ -@property (readonly, nonatomic, copy) NSString *responseString; - -/** - The string encoding of the response. - - If the response does not specify a valid string encoding, `responseStringEncoding` will return `NSUTF8StringEncoding`. - */ -@property (readonly, nonatomic, assign) NSStringEncoding responseStringEncoding; - -///------------------------------- -/// @name Managing URL Credentials -///------------------------------- - -/** - Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default. - - This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`. - */ -@property (nonatomic, assign) BOOL shouldUseCredentialStorage; - -/** - The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`. - - This will be overridden by any shared credentials that exist for the username or password of the request URL, if present. - */ -@property (nonatomic, strong) NSURLCredential *credential; - -///------------------------------- -/// @name Managing Security Policy -///------------------------------- - -/** - The security policy used to evaluate server trust for secure connections. - */ -@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; - -///------------------------ -/// @name Accessing Streams -///------------------------ - -/** - The input stream used to read data to be sent during the request. - - This property acts as a proxy to the `HTTPBodyStream` property of `request`. - */ -@property (nonatomic, strong) NSInputStream *inputStream; - -/** - The output stream that is used to write data received until the request is finished. - - By default, data is accumulated into a buffer that is stored into `responseData` upon completion of the request, with the intermediary `outputStream` property set to `nil`. When `outputStream` is set, the data will not be accumulated into an internal buffer, and as a result, the `responseData` property of the completed request will be `nil`. The output stream will be scheduled in the network thread runloop upon being set. - */ -@property (nonatomic, strong) NSOutputStream *outputStream; - -///--------------------------------- -/// @name Managing Callback Queues -///--------------------------------- - -/** - The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used. - */ -#if OS_OBJECT_HAVE_OBJC_SUPPORT -@property (nonatomic, strong) dispatch_queue_t completionQueue; -#else -@property (nonatomic, assign) dispatch_queue_t completionQueue; -#endif - -/** - The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used. - */ -#if OS_OBJECT_HAVE_OBJC_SUPPORT -@property (nonatomic, strong) dispatch_group_t completionGroup; -#else -@property (nonatomic, assign) dispatch_group_t completionGroup; -#endif - -///--------------------------------------------- -/// @name Managing Request Operation Information -///--------------------------------------------- - -/** - The user info dictionary for the receiver. - */ -@property (nonatomic, strong) NSDictionary *userInfo; - -///------------------------------------------------------ -/// @name Initializing an AFURLConnectionOperation Object -///------------------------------------------------------ - -/** - Initializes and returns a newly allocated operation object with a url connection configured with the specified url request. - - This is the designated initializer. - - @param urlRequest The request object to be used by the operation connection. - */ -- (instancetype)initWithRequest:(NSURLRequest *)urlRequest NS_DESIGNATED_INITIALIZER; - -///---------------------------------- -/// @name Pausing / Resuming Requests -///---------------------------------- - -/** - Pauses the execution of the request operation. - - A paused operation returns `NO` for `-isReady`, `-isExecuting`, and `-isFinished`. As such, it will remain in an `NSOperationQueue` until it is either cancelled or resumed. Pausing a finished, cancelled, or paused operation has no effect. - */ -- (void)pause; - -/** - Whether the request operation is currently paused. - - @return `YES` if the operation is currently paused, otherwise `NO`. - */ -- (BOOL)isPaused; - -/** - Resumes the execution of the paused request operation. - - Pause/Resume behavior varies depending on the underlying implementation for the operation class. In its base implementation, resuming a paused requests restarts the original request. However, since HTTP defines a specification for how to request a specific content range, `AFHTTPRequestOperation` will resume downloading the request from where it left off, instead of restarting the original request. - */ -- (void)resume; - -///---------------------------------------------- -/// @name Configuring Backgrounding Task Behavior -///---------------------------------------------- - -/** - Specifies that the operation should continue execution after the app has entered the background, and the expiration handler for that background task. - - @param handler A handler to be called shortly before the application’s remaining background time reaches 0. The handler is wrapped in a block that cancels the operation, and cleans up and marks the end of execution, unlike the `handler` parameter in `UIApplication -beginBackgroundTaskWithExpirationHandler:`, which expects this to be done in the handler itself. The handler is called synchronously on the main thread, thus blocking the application’s suspension momentarily while the application is notified. - */ -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) -- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler; -#endif - -///--------------------------------- -/// @name Setting Progress Callbacks -///--------------------------------- - -/** - Sets a callback to be called when an undetermined number of bytes have been uploaded to the server. - - @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes three arguments: the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. - */ -- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block; - -/** - Sets a callback to be called when an undetermined number of bytes have been downloaded from the server. - - @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. - */ -- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block; - -///------------------------------------------------- -/// @name Setting NSURLConnection Delegate Callbacks -///------------------------------------------------- - -/** - Sets a block to be executed when the connection will authenticate a challenge in order to download its request, as handled by the `NSURLConnectionDelegate` method `connection:willSendRequestForAuthenticationChallenge:`. - - @param block A block object to be executed when the connection will authenticate a challenge in order to download its request. The block has no return type and takes two arguments: the URL connection object, and the challenge that must be authenticated. This block must invoke one of the challenge-responder methods (NSURLAuthenticationChallengeSender protocol). - - If `allowsInvalidSSLCertificate` is set to YES, `connection:willSendRequestForAuthenticationChallenge:` will attempt to have the challenge sender use credentials with invalid SSL certificates. - */ -- (void)setWillSendRequestForAuthenticationChallengeBlock:(void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block; - -/** - Sets a block to be executed when the server redirects the request from one URL to another URL, or when the request URL changed by the `NSURLProtocol` subclass handling the request in order to standardize its format, as handled by the `NSURLConnectionDataDelegate` method `connection:willSendRequest:redirectResponse:`. - - @param block A block object to be executed when the request URL was changed. The block returns an `NSURLRequest` object, the URL request to redirect, and takes three arguments: the URL connection object, the the proposed redirected request, and the URL response that caused the redirect. - */ -- (void)setRedirectResponseBlock:(NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block; - - -/** - Sets a block to be executed to modify the response a connection will cache, if any, as handled by the `NSURLConnectionDelegate` method `connection:willCacheResponse:`. - - @param block A block object to be executed to determine what response a connection will cache, if any. The block returns an `NSCachedURLResponse` object, the cached response to store in memory or `nil` to prevent the response from being cached, and takes two arguments: the URL connection object, and the cached response provided for the request. - */ -- (void)setCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block; - -/// - -/** - - */ -+ (NSArray *)batchOfRequestOperations:(NSArray *)operations - progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock - completionBlock:(void (^)(NSArray *operations))completionBlock; - -@end - -///-------------------- -/// @name Notifications -///-------------------- - -/** - Posted when an operation begins executing. - */ -extern NSString * const AFNetworkingOperationDidStartNotification; - -/** - Posted when an operation finishes. - */ -extern NSString * const AFNetworkingOperationDidFinishNotification; diff --git a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m deleted file mode 100644 index 8d32092..0000000 --- a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m +++ /dev/null @@ -1,788 +0,0 @@ -// AFURLConnectionOperation.m -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -#import "AFURLConnectionOperation.h" - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#import -#endif - -#if !__has_feature(objc_arc) -#error AFNetworking must be built with ARC. -// You can turn on ARC for only AFNetworking files by adding -fobjc-arc to the build phase for each of its files. -#endif - -typedef NS_ENUM(NSInteger, AFOperationState) { - AFOperationPausedState = -1, - AFOperationReadyState = 1, - AFOperationExecutingState = 2, - AFOperationFinishedState = 3, -}; - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) -typedef UIBackgroundTaskIdentifier AFBackgroundTaskIdentifier; -#else -typedef id AFBackgroundTaskIdentifier; -#endif - -static dispatch_group_t url_request_operation_completion_group() { - static dispatch_group_t af_url_request_operation_completion_group; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - af_url_request_operation_completion_group = dispatch_group_create(); - }); - - return af_url_request_operation_completion_group; -} - -static dispatch_queue_t url_request_operation_completion_queue() { - static dispatch_queue_t af_url_request_operation_completion_queue; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - af_url_request_operation_completion_queue = dispatch_queue_create("com.alamofire.networking.operation.queue", DISPATCH_QUEUE_CONCURRENT ); - }); - - return af_url_request_operation_completion_queue; -} - -static NSString * const kAFNetworkingLockName = @"com.alamofire.networking.operation.lock"; - -NSString * const AFNetworkingOperationDidStartNotification = @"com.alamofire.networking.operation.start"; -NSString * const AFNetworkingOperationDidFinishNotification = @"com.alamofire.networking.operation.finish"; - -typedef void (^AFURLConnectionOperationProgressBlock)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); -typedef void (^AFURLConnectionOperationAuthenticationChallengeBlock)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge); -typedef NSCachedURLResponse * (^AFURLConnectionOperationCacheResponseBlock)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse); -typedef NSURLRequest * (^AFURLConnectionOperationRedirectResponseBlock)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse); - -static inline NSString * AFKeyPathFromOperationState(AFOperationState state) { - switch (state) { - case AFOperationReadyState: - return @"isReady"; - case AFOperationExecutingState: - return @"isExecuting"; - case AFOperationFinishedState: - return @"isFinished"; - case AFOperationPausedState: - return @"isPaused"; - default: { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunreachable-code" - return @"state"; -#pragma clang diagnostic pop - } - } -} - -static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperationState toState, BOOL isCancelled) { - switch (fromState) { - case AFOperationReadyState: - switch (toState) { - case AFOperationPausedState: - case AFOperationExecutingState: - return YES; - case AFOperationFinishedState: - return isCancelled; - default: - return NO; - } - case AFOperationExecutingState: - switch (toState) { - case AFOperationPausedState: - case AFOperationFinishedState: - return YES; - default: - return NO; - } - case AFOperationFinishedState: - return NO; - case AFOperationPausedState: - return toState == AFOperationReadyState; - default: { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunreachable-code" - switch (toState) { - case AFOperationPausedState: - case AFOperationReadyState: - case AFOperationExecutingState: - case AFOperationFinishedState: - return YES; - default: - return NO; - } - } -#pragma clang diagnostic pop - } -} - -@interface AFURLConnectionOperation () -@property (readwrite, nonatomic, assign) AFOperationState state; -@property (readwrite, nonatomic, strong) NSRecursiveLock *lock; -@property (readwrite, nonatomic, strong) NSURLConnection *connection; -@property (readwrite, nonatomic, strong) NSURLRequest *request; -@property (readwrite, nonatomic, strong) NSURLResponse *response; -@property (readwrite, nonatomic, strong) NSError *error; -@property (readwrite, nonatomic, strong) NSData *responseData; -@property (readwrite, nonatomic, copy) NSString *responseString; -@property (readwrite, nonatomic, assign) NSStringEncoding responseStringEncoding; -@property (readwrite, nonatomic, assign) long long totalBytesRead; -@property (readwrite, nonatomic, assign) AFBackgroundTaskIdentifier backgroundTaskIdentifier; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock uploadProgress; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock downloadProgress; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationAuthenticationChallengeBlock authenticationChallenge; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationCacheResponseBlock cacheResponse; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationRedirectResponseBlock redirectResponse; - -- (void)operationDidStart; -- (void)finish; -- (void)cancelConnection; -@end - -@implementation AFURLConnectionOperation -@synthesize outputStream = _outputStream; - -+ (void)networkRequestThreadEntryPoint:(id)__unused object { - @autoreleasepool { - [[NSThread currentThread] setName:@"AFNetworking"]; - - NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; - [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode]; - [runLoop run]; - } -} - -+ (NSThread *)networkRequestThread { - static NSThread *_networkRequestThread = nil; - static dispatch_once_t oncePredicate; - dispatch_once(&oncePredicate, ^{ - _networkRequestThread = [[NSThread alloc] initWithTarget:self selector:@selector(networkRequestThreadEntryPoint:) object:nil]; - [_networkRequestThread start]; - }); - - return _networkRequestThread; -} - -- (instancetype)initWithRequest:(NSURLRequest *)urlRequest { - NSParameterAssert(urlRequest); - - self = [super init]; - if (!self) { - return nil; - } - - _state = AFOperationReadyState; - - self.lock = [[NSRecursiveLock alloc] init]; - self.lock.name = kAFNetworkingLockName; - - self.runLoopModes = [NSSet setWithObject:NSRunLoopCommonModes]; - - self.request = urlRequest; - - self.shouldUseCredentialStorage = YES; - - self.securityPolicy = [AFSecurityPolicy defaultPolicy]; - - return self; -} - -- (void)dealloc { - if (_outputStream) { - [_outputStream close]; - _outputStream = nil; - } - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) - if (_backgroundTaskIdentifier) { - [[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier]; - _backgroundTaskIdentifier = UIBackgroundTaskInvalid; - } -#endif -} - -#pragma mark - - -- (void)setResponseData:(NSData *)responseData { - [self.lock lock]; - if (!responseData) { - _responseData = nil; - } else { - _responseData = [NSData dataWithBytes:responseData.bytes length:responseData.length]; - } - [self.lock unlock]; -} - -- (NSString *)responseString { - [self.lock lock]; - if (!_responseString && self.response && self.responseData) { - self.responseString = [[NSString alloc] initWithData:self.responseData encoding:self.responseStringEncoding]; - } - [self.lock unlock]; - - return _responseString; -} - -- (NSStringEncoding)responseStringEncoding { - [self.lock lock]; - if (!_responseStringEncoding && self.response) { - NSStringEncoding stringEncoding = NSUTF8StringEncoding; - if (self.response.textEncodingName) { - CFStringEncoding IANAEncoding = CFStringConvertIANACharSetNameToEncoding((__bridge CFStringRef)self.response.textEncodingName); - if (IANAEncoding != kCFStringEncodingInvalidId) { - stringEncoding = CFStringConvertEncodingToNSStringEncoding(IANAEncoding); - } - } - - self.responseStringEncoding = stringEncoding; - } - [self.lock unlock]; - - return _responseStringEncoding; -} - -- (NSInputStream *)inputStream { - return self.request.HTTPBodyStream; -} - -- (void)setInputStream:(NSInputStream *)inputStream { - NSMutableURLRequest *mutableRequest = [self.request mutableCopy]; - mutableRequest.HTTPBodyStream = inputStream; - self.request = mutableRequest; -} - -- (NSOutputStream *)outputStream { - if (!_outputStream) { - self.outputStream = [NSOutputStream outputStreamToMemory]; - } - - return _outputStream; -} - -- (void)setOutputStream:(NSOutputStream *)outputStream { - [self.lock lock]; - if (outputStream != _outputStream) { - if (_outputStream) { - [_outputStream close]; - } - - _outputStream = outputStream; - } - [self.lock unlock]; -} - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) -- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler { - [self.lock lock]; - if (!self.backgroundTaskIdentifier) { - UIApplication *application = [UIApplication sharedApplication]; - __weak __typeof(self)weakSelf = self; - self.backgroundTaskIdentifier = [application beginBackgroundTaskWithExpirationHandler:^{ - __strong __typeof(weakSelf)strongSelf = weakSelf; - - if (handler) { - handler(); - } - - if (strongSelf) { - [strongSelf cancel]; - - [application endBackgroundTask:strongSelf.backgroundTaskIdentifier]; - strongSelf.backgroundTaskIdentifier = UIBackgroundTaskInvalid; - } - }]; - } - [self.lock unlock]; -} -#endif - -#pragma mark - - -- (void)setState:(AFOperationState)state { - if (!AFStateTransitionIsValid(self.state, state, [self isCancelled])) { - return; - } - - [self.lock lock]; - NSString *oldStateKey = AFKeyPathFromOperationState(self.state); - NSString *newStateKey = AFKeyPathFromOperationState(state); - - [self willChangeValueForKey:newStateKey]; - [self willChangeValueForKey:oldStateKey]; - _state = state; - [self didChangeValueForKey:oldStateKey]; - [self didChangeValueForKey:newStateKey]; - [self.lock unlock]; -} - -- (void)pause { - if ([self isPaused] || [self isFinished] || [self isCancelled]) { - return; - } - - [self.lock lock]; - if ([self isExecuting]) { - [self performSelector:@selector(operationDidPause) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; - - dispatch_async(dispatch_get_main_queue(), ^{ - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter postNotificationName:AFNetworkingOperationDidFinishNotification object:self]; - }); - } - - self.state = AFOperationPausedState; - [self.lock unlock]; -} - -- (void)operationDidPause { - [self.lock lock]; - [self.connection cancel]; - [self.lock unlock]; -} - -- (BOOL)isPaused { - return self.state == AFOperationPausedState; -} - -- (void)resume { - if (![self isPaused]) { - return; - } - - [self.lock lock]; - self.state = AFOperationReadyState; - - [self start]; - [self.lock unlock]; -} - -#pragma mark - - -- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block { - self.uploadProgress = block; -} - -- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block { - self.downloadProgress = block; -} - -- (void)setWillSendRequestForAuthenticationChallengeBlock:(void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block { - self.authenticationChallenge = block; -} - -- (void)setCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block { - self.cacheResponse = block; -} - -- (void)setRedirectResponseBlock:(NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block { - self.redirectResponse = block; -} - -#pragma mark - NSOperation - -- (void)setCompletionBlock:(void (^)(void))block { - [self.lock lock]; - if (!block) { - [super setCompletionBlock:nil]; - } else { - __weak __typeof(self)weakSelf = self; - [super setCompletionBlock:^ { - __strong __typeof(weakSelf)strongSelf = weakSelf; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgnu" - dispatch_group_t group = strongSelf.completionGroup ?: url_request_operation_completion_group(); - dispatch_queue_t queue = strongSelf.completionQueue ?: dispatch_get_main_queue(); -#pragma clang diagnostic pop - - dispatch_group_async(group, queue, ^{ - block(); - }); - - dispatch_group_notify(group, url_request_operation_completion_queue(), ^{ - [strongSelf setCompletionBlock:nil]; - }); - }]; - } - [self.lock unlock]; -} - -- (BOOL)isReady { - return self.state == AFOperationReadyState && [super isReady]; -} - -- (BOOL)isExecuting { - return self.state == AFOperationExecutingState; -} - -- (BOOL)isFinished { - return self.state == AFOperationFinishedState; -} - -- (BOOL)isConcurrent { - return YES; -} - -- (void)start { - [self.lock lock]; - if ([self isCancelled]) { - [self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; - } else if ([self isReady]) { - self.state = AFOperationExecutingState; - - [self performSelector:@selector(operationDidStart) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; - } - [self.lock unlock]; -} - -- (void)operationDidStart { - [self.lock lock]; - if (![self isCancelled]) { - self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO]; - - NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; - for (NSString *runLoopMode in self.runLoopModes) { - [self.connection scheduleInRunLoop:runLoop forMode:runLoopMode]; - [self.outputStream scheduleInRunLoop:runLoop forMode:runLoopMode]; - } - - [self.outputStream open]; - [self.connection start]; - } - [self.lock unlock]; - - dispatch_async(dispatch_get_main_queue(), ^{ - [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidStartNotification object:self]; - }); -} - -- (void)finish { - [self.lock lock]; - self.state = AFOperationFinishedState; - [self.lock unlock]; - - dispatch_async(dispatch_get_main_queue(), ^{ - [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidFinishNotification object:self]; - }); -} - -- (void)cancel { - [self.lock lock]; - if (![self isFinished] && ![self isCancelled]) { - [super cancel]; - - if ([self isExecuting]) { - [self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; - } - } - [self.lock unlock]; -} - -- (void)cancelConnection { - NSDictionary *userInfo = nil; - if ([self.request URL]) { - userInfo = [NSDictionary dictionaryWithObject:[self.request URL] forKey:NSURLErrorFailingURLErrorKey]; - } - NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:userInfo]; - - if (![self isFinished]) { - if (self.connection) { - [self.connection cancel]; - [self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:error]; - } else { - // Accomodate race condition where `self.connection` has not yet been set before cancellation - self.error = error; - [self finish]; - } - } -} - -#pragma mark - - -+ (NSArray *)batchOfRequestOperations:(NSArray *)operations - progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock - completionBlock:(void (^)(NSArray *operations))completionBlock -{ - if (!operations || [operations count] == 0) { - return @[[NSBlockOperation blockOperationWithBlock:^{ - dispatch_async(dispatch_get_main_queue(), ^{ - if (completionBlock) { - completionBlock(@[]); - } - }); - }]]; - } - - __block dispatch_group_t group = dispatch_group_create(); - NSBlockOperation *batchedOperation = [NSBlockOperation blockOperationWithBlock:^{ - dispatch_group_notify(group, dispatch_get_main_queue(), ^{ - if (completionBlock) { - completionBlock(operations); - } - }); - }]; - - for (AFURLConnectionOperation *operation in operations) { - operation.completionGroup = group; - void (^originalCompletionBlock)(void) = [operation.completionBlock copy]; - __weak __typeof(operation)weakOperation = operation; - operation.completionBlock = ^{ - __strong __typeof(weakOperation)strongOperation = weakOperation; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgnu" - dispatch_queue_t queue = strongOperation.completionQueue ?: dispatch_get_main_queue(); -#pragma clang diagnostic pop - dispatch_group_async(group, queue, ^{ - if (originalCompletionBlock) { - originalCompletionBlock(); - } - - NSUInteger numberOfFinishedOperations = [[operations indexesOfObjectsPassingTest:^BOOL(id op, NSUInteger __unused idx, BOOL __unused *stop) { - return [op isFinished]; - }] count]; - - if (progressBlock) { - progressBlock(numberOfFinishedOperations, [operations count]); - } - - dispatch_group_leave(group); - }); - }; - - dispatch_group_enter(group); - [batchedOperation addDependency:operation]; - } - - return [operations arrayByAddingObject:batchedOperation]; -} - -#pragma mark - NSObject - -- (NSString *)description { - [self.lock lock]; - NSString *description = [NSString stringWithFormat:@"<%@: %p, state: %@, cancelled: %@ request: %@, response: %@>", NSStringFromClass([self class]), self, AFKeyPathFromOperationState(self.state), ([self isCancelled] ? @"YES" : @"NO"), self.request, self.response]; - [self.lock unlock]; - return description; -} - -#pragma mark - NSURLConnectionDelegate - -- (void)connection:(NSURLConnection *)connection -willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge -{ - if (self.authenticationChallenge) { - self.authenticationChallenge(connection, challenge); - return; - } - - if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { - if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) { - NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; - [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; - } else { - [[challenge sender] cancelAuthenticationChallenge:challenge]; - } - } else { - if ([challenge previousFailureCount] == 0) { - if (self.credential) { - [[challenge sender] useCredential:self.credential forAuthenticationChallenge:challenge]; - } else { - [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; - } - } else { - [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; - } - } -} - -- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection __unused *)connection { - return self.shouldUseCredentialStorage; -} - -- (NSURLRequest *)connection:(NSURLConnection *)connection - willSendRequest:(NSURLRequest *)request - redirectResponse:(NSURLResponse *)redirectResponse -{ - if (self.redirectResponse) { - return self.redirectResponse(connection, request, redirectResponse); - } else { - return request; - } -} - -- (void)connection:(NSURLConnection __unused *)connection - didSendBodyData:(NSInteger)bytesWritten - totalBytesWritten:(NSInteger)totalBytesWritten -totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite -{ - dispatch_async(dispatch_get_main_queue(), ^{ - if (self.uploadProgress) { - self.uploadProgress((NSUInteger)bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); - } - }); -} - -- (void)connection:(NSURLConnection __unused *)connection -didReceiveResponse:(NSURLResponse *)response -{ - self.response = response; -} - -- (void)connection:(NSURLConnection __unused *)connection - didReceiveData:(NSData *)data -{ - NSUInteger length = [data length]; - while (YES) { - NSInteger totalNumberOfBytesWritten = 0; - if ([self.outputStream hasSpaceAvailable]) { - const uint8_t *dataBuffer = (uint8_t *)[data bytes]; - - NSInteger numberOfBytesWritten = 0; - while (totalNumberOfBytesWritten < (NSInteger)length) { - numberOfBytesWritten = [self.outputStream write:&dataBuffer[(NSUInteger)totalNumberOfBytesWritten] maxLength:(length - (NSUInteger)totalNumberOfBytesWritten)]; - if (numberOfBytesWritten == -1) { - break; - } - - totalNumberOfBytesWritten += numberOfBytesWritten; - } - - break; - } - - if (self.outputStream.streamError) { - [self.connection cancel]; - [self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:self.outputStream.streamError]; - return; - } - } - - dispatch_async(dispatch_get_main_queue(), ^{ - self.totalBytesRead += (long long)length; - - if (self.downloadProgress) { - self.downloadProgress(length, self.totalBytesRead, self.response.expectedContentLength); - } - }); -} - -- (void)connectionDidFinishLoading:(NSURLConnection __unused *)connection { - self.responseData = [self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey]; - - [self.outputStream close]; - if (self.responseData) { - self.outputStream = nil; - } - - self.connection = nil; - - [self finish]; -} - -- (void)connection:(NSURLConnection __unused *)connection - didFailWithError:(NSError *)error -{ - self.error = error; - - [self.outputStream close]; - if (self.responseData) { - self.outputStream = nil; - } - - self.connection = nil; - - [self finish]; -} - -- (NSCachedURLResponse *)connection:(NSURLConnection *)connection - willCacheResponse:(NSCachedURLResponse *)cachedResponse -{ - if (self.cacheResponse) { - return self.cacheResponse(connection, cachedResponse); - } else { - if ([self isCancelled]) { - return nil; - } - - return cachedResponse; - } -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (id)initWithCoder:(NSCoder *)decoder { - NSURLRequest *request = [decoder decodeObjectOfClass:[NSURLRequest class] forKey:NSStringFromSelector(@selector(request))]; - - self = [self initWithRequest:request]; - if (!self) { - return nil; - } - - self.state = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(state))] integerValue]; - self.response = [decoder decodeObjectOfClass:[NSHTTPURLResponse class] forKey:NSStringFromSelector(@selector(response))]; - self.error = [decoder decodeObjectOfClass:[NSError class] forKey:NSStringFromSelector(@selector(error))]; - self.responseData = [decoder decodeObjectOfClass:[NSData class] forKey:NSStringFromSelector(@selector(responseData))]; - self.totalBytesRead = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(totalBytesRead))] longLongValue]; - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)coder { - [self pause]; - - [coder encodeObject:self.request forKey:NSStringFromSelector(@selector(request))]; - - switch (self.state) { - case AFOperationExecutingState: - case AFOperationPausedState: - [coder encodeInteger:AFOperationReadyState forKey:NSStringFromSelector(@selector(state))]; - break; - default: - [coder encodeInteger:self.state forKey:NSStringFromSelector(@selector(state))]; - break; - } - - [coder encodeObject:self.response forKey:NSStringFromSelector(@selector(response))]; - [coder encodeObject:self.error forKey:NSStringFromSelector(@selector(error))]; - [coder encodeObject:self.responseData forKey:NSStringFromSelector(@selector(responseData))]; - [coder encodeInt64:self.totalBytesRead forKey:NSStringFromSelector(@selector(totalBytesRead))]; -} - -#pragma mark - NSCopying - -- (id)copyWithZone:(NSZone *)zone { - AFURLConnectionOperation *operation = [(AFURLConnectionOperation *)[[self class] allocWithZone:zone] initWithRequest:self.request]; - - operation.uploadProgress = self.uploadProgress; - operation.downloadProgress = self.downloadProgress; - operation.authenticationChallenge = self.authenticationChallenge; - operation.cacheResponse = self.cacheResponse; - operation.redirectResponse = self.redirectResponse; - operation.completionQueue = self.completionQueue; - operation.completionGroup = self.completionGroup; - - return operation; -} - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h b/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h index bb8d444..134b7dd 100644 --- a/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h +++ b/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h @@ -20,10 +20,16 @@ // THE SOFTWARE. #import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import + +#if TARGET_OS_IOS || TARGET_OS_TV #import +#elif TARGET_OS_WATCH +#import #endif +NS_ASSUME_NONNULL_BEGIN + /** The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary. @@ -40,9 +46,9 @@ @return A serialized request. */ -- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request - withParameters:(id)parameters - error:(NSError * __autoreleasing *)error; +- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(nullable id)parameters + error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW; @end @@ -123,7 +129,7 @@ typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { @discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`. */ -@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders; +@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders; /** Creates and returns a serializer with default configuration. @@ -136,7 +142,7 @@ typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { @param field The HTTP header to set a default value for @param value The value set as default for the specified header, or `nil` */ -- (void)setValue:(NSString *)value +- (void)setValue:(nullable NSString *)value forHTTPHeaderField:(NSString *)field; /** @@ -146,7 +152,7 @@ forHTTPHeaderField:(NSString *)field; @return The value set as default for the specified header, or `nil` */ -- (NSString *)valueForHTTPHeaderField:(NSString *)field; +- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field; /** Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header. @@ -157,12 +163,6 @@ forHTTPHeaderField:(NSString *)field; - (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username password:(NSString *)password; -/** - @deprecated This method has been deprecated. Use -setValue:forHTTPHeaderField: instead. - */ -- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token DEPRECATED_ATTRIBUTE; - - /** Clears any existing value for the "Authorization" HTTP header. */ @@ -175,7 +175,7 @@ forHTTPHeaderField:(NSString *)field; /** HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default. */ -@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI; +@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI; /** Set the method of query string serialization according to one of the pre-defined styles. @@ -191,19 +191,12 @@ forHTTPHeaderField:(NSString *)field; @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request. */ -- (void)setQueryStringSerializationWithBlock:(NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block; +- (void)setQueryStringSerializationWithBlock:(nullable NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block; ///------------------------------- /// @name Creating Request Objects ///------------------------------- -/** - @deprecated This method has been deprecated. Use -requestWithMethod:URLString:parameters:error: instead. - */ -- (NSMutableURLRequest *)requestWithMethod:(NSString *)method - URLString:(NSString *)URLString - parameters:(id)parameters DEPRECATED_ATTRIBUTE; - /** Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string. @@ -212,22 +205,14 @@ forHTTPHeaderField:(NSString *)field; @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`. @param URLString The URL string used to create the request URL. @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body. - @param error The error that occured while constructing the request. + @param error The error that occurred while constructing the request. @return An `NSMutableURLRequest` object. */ - (NSMutableURLRequest *)requestWithMethod:(NSString *)method URLString:(NSString *)URLString - parameters:(id)parameters - error:(NSError * __autoreleasing *)error; - -/** - @deprecated This method has been deprecated. Use -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error: instead. - */ -- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method - URLString:(NSString *)URLString - parameters:(NSDictionary *)parameters - constructingBodyWithBlock:(void (^)(id formData))block DEPRECATED_ATTRIBUTE; + parameters:(nullable id)parameters + error:(NSError * _Nullable __autoreleasing *)error; /** Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 @@ -238,15 +223,15 @@ forHTTPHeaderField:(NSString *)field; @param URLString The URL string used to create the request URL. @param parameters The parameters to be encoded and set in the request HTTP body. @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. - @param error The error that occured while constructing the request. + @param error The error that occurred while constructing the request. @return An `NSMutableURLRequest` object */ - (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method URLString:(NSString *)URLString - parameters:(NSDictionary *)parameters - constructingBodyWithBlock:(void (^)(id formData))block - error:(NSError * __autoreleasing *)error; + parameters:(nullable NSDictionary *)parameters + constructingBodyWithBlock:(nullable void (^)(id formData))block + error:(NSError * _Nullable __autoreleasing *)error; /** Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished. @@ -261,7 +246,7 @@ forHTTPHeaderField:(NSString *)field; */ - (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request writingStreamContentsToFile:(NSURL *)fileURL - completionHandler:(void (^)(NSError *error))handler; + completionHandler:(nullable void (^)(NSError * _Nullable error))handler; @end @@ -285,7 +270,7 @@ forHTTPHeaderField:(NSString *)field; */ - (BOOL)appendPartWithFileURL:(NSURL *)fileURL name:(NSString *)name - error:(NSError * __autoreleasing *)error; + error:(NSError * _Nullable __autoreleasing *)error; /** Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. @@ -302,7 +287,7 @@ forHTTPHeaderField:(NSString *)field; name:(NSString *)name fileName:(NSString *)fileName mimeType:(NSString *)mimeType - error:(NSError * __autoreleasing *)error; + error:(NSError * _Nullable __autoreleasing *)error; /** Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary. @@ -313,7 +298,7 @@ forHTTPHeaderField:(NSString *)field; @param length The length of the specified input stream in bytes. @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. */ -- (void)appendPartWithInputStream:(NSInputStream *)inputStream +- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream name:(NSString *)name fileName:(NSString *)fileName length:(int64_t)length @@ -349,7 +334,7 @@ forHTTPHeaderField:(NSString *)field; @param headers The HTTP headers to be appended to the form data. @param body The data to be encoded and appended to the form data. This parameter must not be `nil`. */ -- (void)appendPartWithHeaders:(NSDictionary *)headers +- (void)appendPartWithHeaders:(nullable NSDictionary *)headers body:(NSData *)body; /** @@ -434,7 +419,7 @@ forHTTPHeaderField:(NSString *)field; `AFURLRequestSerializationErrorDomain` AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. */ -extern NSString * const AFURLRequestSerializationErrorDomain; +FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain; /** ## User info dictionary keys @@ -448,7 +433,7 @@ extern NSString * const AFURLRequestSerializationErrorDomain; `AFNetworkingOperationFailingURLRequestErrorKey` The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`. */ -extern NSString * const AFNetworkingOperationFailingURLRequestErrorKey; +FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKey; /** ## Throttling Bandwidth for HTTP Request Input Streams @@ -463,5 +448,7 @@ extern NSString * const AFNetworkingOperationFailingURLRequestErrorKey; `kAFUploadStream3GSuggestedDelay` Duration of delay each time a packet is read. Equal to 0.2 seconds. */ -extern NSUInteger const kAFUploadStream3GSuggestedPacketSize; -extern NSTimeInterval const kAFUploadStream3GSuggestedDelay; +FOUNDATION_EXPORT NSUInteger const kAFUploadStream3GSuggestedPacketSize; +FOUNDATION_EXPORT NSTimeInterval const kAFUploadStream3GSuggestedDelay; + +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m b/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m index 5b55b5f..bbab7c4 100644 --- a/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m +++ b/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m @@ -21,7 +21,7 @@ #import "AFURLRequestSerialization.h" -#if __IPHONE_OS_VERSION_MIN_REQUIRED +#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV #import #else #import @@ -32,45 +32,51 @@ typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id parameters, NSError *__autoreleasing *error); -static NSString * AFBase64EncodedStringFromString(NSString *string) { - NSData *data = [NSData dataWithBytes:[string UTF8String] length:[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]]; - NSUInteger length = [data length]; - NSMutableData *mutableData = [NSMutableData dataWithLength:((length + 2) / 3) * 4]; +/** + Returns a percent-escaped string following RFC 3986 for a query string key or value. + RFC 3986 states that the following characters are "reserved" characters. + - General Delimiters: ":", "#", "[", "]", "@", "?", "/" + - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" - uint8_t *input = (uint8_t *)[data bytes]; - uint8_t *output = (uint8_t *)[mutableData mutableBytes]; + In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow + query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" + should be percent-escaped in the query string. + - parameter string: The string to be percent-escaped. + - returns: The percent-escaped string. + */ +static NSString * AFPercentEscapedStringFromString(NSString *string) { + static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // does not include "?" or "/" due to RFC 3986 - Section 3.4 + static NSString * const kAFCharactersSubDelimitersToEncode = @"!$&'()*+,;="; - for (NSUInteger i = 0; i < length; i += 3) { - NSUInteger value = 0; - for (NSUInteger j = i; j < (i + 3); j++) { - value <<= 8; - if (j < length) { - value |= (0xFF & input[j]); - } - } + NSMutableCharacterSet * allowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy]; + [allowedCharacterSet removeCharactersInString:[kAFCharactersGeneralDelimitersToEncode stringByAppendingString:kAFCharactersSubDelimitersToEncode]]; - static uint8_t const kAFBase64EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + // FIXME: https://github.com/AFNetworking/AFNetworking/pull/3028 + // return [string stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; - NSUInteger idx = (i / 3) * 4; - output[idx + 0] = kAFBase64EncodingTable[(value >> 18) & 0x3F]; - output[idx + 1] = kAFBase64EncodingTable[(value >> 12) & 0x3F]; - output[idx + 2] = (i + 1) < length ? kAFBase64EncodingTable[(value >> 6) & 0x3F] : '='; - output[idx + 3] = (i + 2) < length ? kAFBase64EncodingTable[(value >> 0) & 0x3F] : '='; - } + static NSUInteger const batchSize = 50; - return [[NSString alloc] initWithData:mutableData encoding:NSASCIIStringEncoding]; -} + NSUInteger index = 0; + NSMutableString *escaped = @"".mutableCopy; -static NSString * const kAFCharactersToBeEscapedInQueryString = @":/?&=;+!@#$()',*"; + while (index < string.length) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wgnu" + NSUInteger length = MIN(string.length - index, batchSize); +#pragma GCC diagnostic pop + NSRange range = NSMakeRange(index, length); -static NSString * AFPercentEscapedQueryStringKeyFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { - static NSString * const kAFCharactersToLeaveUnescapedInQueryStringPairKey = @"[]."; + // To avoid breaking up character sequences such as 👴🏻👮🏽 + range = [string rangeOfComposedCharacterSequencesForRange:range]; - return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, (__bridge CFStringRef)kAFCharactersToLeaveUnescapedInQueryStringPairKey, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding)); -} + NSString *substring = [string substringWithRange:range]; + NSString *encoded = [substring stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; + [escaped appendString:encoded]; -static NSString * AFPercentEscapedQueryStringValueFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { - return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding)); + index += range.length; + } + + return escaped; } #pragma mark - @@ -79,14 +85,14 @@ @interface AFQueryStringPair : NSObject @property (readwrite, nonatomic, strong) id field; @property (readwrite, nonatomic, strong) id value; -- (id)initWithField:(id)field value:(id)value; +- (instancetype)initWithField:(id)field value:(id)value; -- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding; +- (NSString *)URLEncodedStringValue; @end @implementation AFQueryStringPair -- (id)initWithField:(id)field value:(id)value { +- (instancetype)initWithField:(id)field value:(id)value { self = [super init]; if (!self) { return nil; @@ -98,11 +104,11 @@ - (id)initWithField:(id)field value:(id)value { return self; } -- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding { +- (NSString *)URLEncodedStringValue { if (!self.value || [self.value isEqual:[NSNull null]]) { - return AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding); + return AFPercentEscapedStringFromString([self.field description]); } else { - return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding), AFPercentEscapedQueryStringValueFromStringWithEncoding([self.value description], stringEncoding)]; + return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedStringFromString([self.field description]), AFPercentEscapedStringFromString([self.value description])]; } } @@ -110,13 +116,13 @@ - (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding #pragma mark - -extern NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary); -extern NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value); +FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary); +FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value); -static NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *parameters, NSStringEncoding stringEncoding) { +static NSString * AFQueryStringFromParameters(NSDictionary *parameters) { NSMutableArray *mutablePairs = [NSMutableArray array]; for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { - [mutablePairs addObject:[pair URLEncodedStringValueWithEncoding:stringEncoding]]; + [mutablePairs addObject:[pair URLEncodedStringValue]]; } return [mutablePairs componentsJoinedByString:@"&"]; @@ -135,7 +141,7 @@ - (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding NSDictionary *dictionary = value; // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { - id nestedValue = [dictionary objectForKey:nestedKey]; + id nestedValue = dictionary[nestedKey]; if (nestedValue) { [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)]; } @@ -215,11 +221,14 @@ - (instancetype)init { NSString *userAgent = nil; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgnu" -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 - userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; + userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; +#elif TARGET_OS_WATCH + // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 + userAgent = [NSString stringWithFormat:@"%@/%@ (%@; watchOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[WKInterfaceDevice currentDevice] model], [[WKInterfaceDevice currentDevice] systemVersion], [[WKInterfaceDevice currentDevice] screenScale]]; #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) - userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]; + userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]; #endif #pragma clang diagnostic pop if (userAgent) { @@ -313,12 +322,9 @@ - (NSString *)valueForHTTPHeaderField:(NSString *)field { - (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username password:(NSString *)password { - NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password]; - [self setValue:[NSString stringWithFormat:@"Basic %@", AFBase64EncodedStringFromString(basicAuthCredentials)] forHTTPHeaderField:@"Authorization"]; -} - -- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token { - [self setValue:[NSString stringWithFormat:@"Token token=\"%@\"", token] forHTTPHeaderField:@"Authorization"]; + NSData *basicAuthCredentials = [[NSString stringWithFormat:@"%@:%@", username, password] dataUsingEncoding:NSUTF8StringEncoding]; + NSString *base64AuthCredentials = [basicAuthCredentials base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)0]; + [self setValue:[NSString stringWithFormat:@"Basic %@", base64AuthCredentials] forHTTPHeaderField:@"Authorization"]; } - (void)clearAuthorizationHeader { @@ -338,13 +344,6 @@ - (void)setQueryStringSerializationWithBlock:(NSString *(^)(NSURLRequest *, id, #pragma mark - -- (NSMutableURLRequest *)requestWithMethod:(NSString *)method - URLString:(NSString *)URLString - parameters:(id)parameters -{ - return [self requestWithMethod:method URLString:URLString parameters:parameters error:nil]; -} - - (NSMutableURLRequest *)requestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(id)parameters @@ -371,14 +370,6 @@ - (NSMutableURLRequest *)requestWithMethod:(NSString *)method return mutableRequest; } -- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method - URLString:(NSString *)URLString - parameters:(NSDictionary *)parameters - constructingBodyWithBlock:(void (^)(id formData))block -{ - return [self multipartFormRequestWithMethod:method URLString:URLString parameters:parameters constructingBodyWithBlock:block error:nil]; -} - - (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(NSDictionary *)parameters @@ -486,8 +477,8 @@ - (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request } }]; + NSString *query = nil; if (parameters) { - NSString *query = nil; if (self.queryStringSerialization) { NSError *serializationError; query = self.queryStringSerialization(request, parameters, &serializationError); @@ -502,19 +493,25 @@ - (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request } else { switch (self.queryStringSerializationStyle) { case AFHTTPRequestQueryStringDefaultStyle: - query = AFQueryStringFromParametersWithEncoding(parameters, self.stringEncoding); + query = AFQueryStringFromParameters(parameters); break; } } + } - if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + if (query) { mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]]; - } else { - if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { - [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; - } - [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]]; } + } else { + // #2864: an empty string is a valid x-www-form-urlencoded payload + if (!query) { + query = @""; + } + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; + } + [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]]; } return mutableRequest; @@ -550,14 +547,14 @@ + (BOOL)supportsSecureCoding { return YES; } -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { self = [self init]; if (!self) { return nil; } self.mutableHTTPRequestHeaders = [[decoder decodeObjectOfClass:[NSDictionary class] forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))] mutableCopy]; - self.queryStringSerializationStyle = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue]; + self.queryStringSerializationStyle = (AFHTTPRequestQueryStringSerializationStyle)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue]; return self; } @@ -569,7 +566,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init]; serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone]; serializer.queryStringSerializationStyle = self.queryStringSerializationStyle; @@ -601,7 +598,6 @@ - (id)copyWithZone:(NSZone *)zone { } static inline NSString * AFContentTypeForPathExtension(NSString *extension) { -#ifdef __UTTYPE__ NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL); NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); if (!contentType) { @@ -609,10 +605,6 @@ - (id)copyWithZone:(NSZone *)zone { } else { return contentType; } -#else -#pragma unused (extension) - return @"application/octet-stream"; -#endif } NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16; @@ -643,7 +635,7 @@ @interface AFMultipartBodyStream : NSInputStream @property (readonly, nonatomic, assign) unsigned long long contentLength; @property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty; -- (id)initWithStringEncoding:(NSStringEncoding)encoding; +- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding; - (void)setInitialAndFinalBoundaries; - (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart; @end @@ -659,8 +651,8 @@ @interface AFStreamingMultipartFormData () @implementation AFStreamingMultipartFormData -- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest - stringEncoding:(NSStringEncoding)encoding +- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest + stringEncoding:(NSStringEncoding)encoding { self = [super init]; if (!self) { @@ -729,7 +721,7 @@ - (BOOL)appendPartWithFileURL:(NSURL *)fileURL bodyPart.headers = mutableHeaders; bodyPart.boundary = self.boundary; bodyPart.body = fileURL; - bodyPart.bodyContentLength = [[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue]; + bodyPart.bodyContentLength = [fileAttributes[NSFileSize] unsignedLongLongValue]; [self.bodyStream appendHTTPBodyPart:bodyPart]; return YES; @@ -852,7 +844,7 @@ @implementation AFMultipartBodyStream @synthesize streamError; #pragma clang diagnostic pop -- (id)initWithStringEncoding:(NSStringEncoding)encoding { +- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding { self = [super init]; if (!self) { return nil; @@ -872,7 +864,7 @@ - (void)setInitialAndFinalBoundaries { bodyPart.hasFinalBoundary = NO; } - [[self.HTTPBodyParts objectAtIndex:0] setHasInitialBoundary:YES]; + [[self.HTTPBodyParts firstObject] setHasInitialBoundary:YES]; [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES]; } } @@ -904,7 +896,7 @@ - (NSInteger)read:(uint8_t *)buffer break; } } else { - NSUInteger maxLength = length - (NSUInteger)totalNumberOfBytesRead; + NSUInteger maxLength = MIN(length, self.numberOfBytesInPacket) - (NSUInteger)totalNumberOfBytesRead; NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:&buffer[totalNumberOfBytesRead] maxLength:maxLength]; if (numberOfBytesRead == -1) { self.streamError = self.currentHTTPBodyPart.inputStream.streamError; @@ -995,7 +987,7 @@ - (BOOL)_setCFClientFlags:(__unused CFOptionFlags)inFlags #pragma mark - NSCopying --(id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding]; for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { @@ -1032,7 +1024,7 @@ - (NSInteger)readData:(NSData *)data @implementation AFHTTPBodyPart -- (id)init { +- (instancetype)init { self = [super init]; if (!self) { return nil; @@ -1210,7 +1202,7 @@ - (BOOL)transitionToNextPhase { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init]; bodyPart.stringEncoding = self.stringEncoding; @@ -1273,7 +1265,7 @@ - (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request #pragma mark - NSSecureCoding -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (!self) { return nil; @@ -1292,7 +1284,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFJSONRequestSerializer *serializer = [super copyWithZone:zone]; serializer.writingOptions = self.writingOptions; @@ -1352,13 +1344,13 @@ - (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request #pragma mark - NSSecureCoding -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (!self) { return nil; } - self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; + self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; self.writeOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writeOptions))] unsignedIntegerValue]; return self; @@ -1373,7 +1365,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone]; serializer.format = self.format; serializer.writeOptions = self.writeOptions; diff --git a/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h b/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h index 9cd4ad2..f9e14c6 100644 --- a/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h +++ b/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h @@ -22,6 +22,8 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + /** The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data. @@ -38,9 +40,9 @@ @return The object decoded from the specified response data. */ -- (id)responseObjectForResponse:(NSURLResponse *)response - data:(NSData *)data - error:(NSError *__autoreleasing *)error; +- (nullable id)responseObjectForResponse:(nullable NSURLResponse *)response + data:(nullable NSData *)data + error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW; @end @@ -53,7 +55,7 @@ */ @interface AFHTTPResponseSerializer : NSObject -- (instancetype) init; +- (instancetype)init; /** The string encoding used to serialize data received from the server, when no string encoding is specified by the response. `NSUTF8StringEncoding` by default. @@ -74,12 +76,12 @@ See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html */ -@property (nonatomic, copy) NSIndexSet *acceptableStatusCodes; +@property (nonatomic, copy, nullable) NSIndexSet *acceptableStatusCodes; /** The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation. */ -@property (nonatomic, copy) NSSet *acceptableContentTypes; +@property (nonatomic, copy, nullable) NSSet *acceptableContentTypes; /** Validates the specified response and data. @@ -92,9 +94,9 @@ @return `YES` if the response is valid, otherwise `NO`. */ -- (BOOL)validateResponse:(NSHTTPURLResponse *)response - data:(NSData *)data - error:(NSError *__autoreleasing *)error; +- (BOOL)validateResponse:(nullable NSHTTPURLResponse *)response + data:(nullable NSData *)data + error:(NSError * _Nullable __autoreleasing *)error; @end @@ -112,7 +114,7 @@ */ @interface AFJSONResponseSerializer : AFHTTPResponseSerializer -- (instancetype) init; +- (instancetype)init; /** Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. @@ -161,7 +163,7 @@ */ @interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer -- (instancetype) init; +- (instancetype)init; /** Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. @@ -190,7 +192,7 @@ */ @interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer -- (instancetype) init; +- (instancetype)init; /** The property list format. Possible values are described in "NSPropertyListFormat". @@ -233,7 +235,7 @@ */ @interface AFImageResponseSerializer : AFHTTPResponseSerializer -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH /** The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance. */ @@ -257,14 +259,14 @@ /** The component response serializers. */ -@property (readonly, nonatomic, copy) NSArray *responseSerializers; +@property (readonly, nonatomic, copy) NSArray > *responseSerializers; /** Creates and returns a compound serializer comprised of the specified response serializers. @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`. */ -+ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers; ++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray > *)responseSerializers; @end @@ -284,7 +286,7 @@ `AFURLResponseSerializationErrorDomain` AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. */ -extern NSString * const AFURLResponseSerializationErrorDomain; +FOUNDATION_EXPORT NSString * const AFURLResponseSerializationErrorDomain; /** ## User info dictionary keys @@ -302,8 +304,8 @@ extern NSString * const AFURLResponseSerializationErrorDomain; `AFNetworkingOperationFailingURLResponseDataErrorKey` The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`. */ -extern NSString * const AFNetworkingOperationFailingURLResponseErrorKey; - -extern NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey; +FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseErrorKey; +FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey; +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m b/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m old mode 100644 new mode 100755 index a672d20..ef5e334 --- a/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m +++ b/Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m @@ -21,8 +21,12 @@ #import "AFURLResponseSerialization.h" -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#import + +#if TARGET_OS_IOS #import +#elif TARGET_OS_WATCH +#import #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) #import #endif @@ -67,11 +71,11 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO } else if ([JSONObject isKindOfClass:[NSDictionary class]]) { NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:JSONObject]; for (id key in [(NSDictionary *)JSONObject allKeys]) { - id value = [(NSDictionary *)JSONObject objectForKey:key]; + id value = (NSDictionary *)JSONObject[key]; if (!value || [value isEqual:[NSNull null]]) { [mutableDictionary removeObjectForKey:key]; } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) { - [mutableDictionary setObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions) forKey:key]; + mutableDictionary[key] = AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions); } } @@ -169,7 +173,7 @@ + (BOOL)supportsSecureCoding { return YES; } -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { self = [self init]; if (!self) { return nil; @@ -188,7 +192,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFHTTPResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; serializer.acceptableStatusCodes = [self.acceptableStatusCodes copyWithZone:zone]; serializer.acceptableContentTypes = [self.acceptableContentTypes copyWithZone:zone]; @@ -285,7 +289,7 @@ - (id)responseObjectForResponse:(NSURLResponse *)response #pragma mark - NSSecureCoding -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (!self) { return nil; @@ -306,7 +310,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFJSONResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; serializer.readingOptions = self.readingOptions; serializer.removesKeysWithNullValues = self.removesKeysWithNullValues; @@ -406,7 +410,7 @@ - (id)responseObjectForResponse:(NSURLResponse *)response #pragma mark - NSSecureCoding -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (!self) { return nil; @@ -425,7 +429,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFXMLDocumentResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; serializer.options = self.options; @@ -493,13 +497,13 @@ - (id)responseObjectForResponse:(NSURLResponse *)response #pragma mark - NSSecureCoding -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (!self) { return nil; } - self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; + self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; self.readOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readOptions))] unsignedIntegerValue]; return self; @@ -514,7 +518,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFPropertyListResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; serializer.format = self.format; serializer.readOptions = self.readOptions; @@ -526,15 +530,39 @@ - (id)copyWithZone:(NSZone *)zone { #pragma mark - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH #import +#import + +@interface UIImage (AFNetworkingSafeImageLoading) ++ (UIImage *)af_safeImageWithData:(NSData *)data; +@end + +static NSLock* imageLock = nil; + +@implementation UIImage (AFNetworkingSafeImageLoading) + ++ (UIImage *)af_safeImageWithData:(NSData *)data { + UIImage* image = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + imageLock = [[NSLock alloc] init]; + }); + + [imageLock lock]; + image = [UIImage imageWithData:data]; + [imageLock unlock]; + return image; +} + +@end static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) { - UIImage *image = [[UIImage alloc] initWithData:data]; + UIImage *image = [UIImage af_safeImageWithData:data]; if (image.images) { return image; } - + return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation]; } @@ -642,9 +670,12 @@ - (instancetype)init { self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil]; -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV self.imageScale = [[UIScreen mainScreen] scale]; self.automaticallyInflatesResponseImage = YES; +#elif TARGET_OS_WATCH + self.imageScale = [[WKInterfaceDevice currentDevice] screenScale]; + self.automaticallyInflatesResponseImage = YES; #endif return self; @@ -662,13 +693,13 @@ - (id)responseObjectForResponse:(NSURLResponse *)response } } -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH if (self.automaticallyInflatesResponseImage) { return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale); } else { return AFImageWithDataAtScale(data, self.imageScale); } -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) +#else // Ensure that the image is set to it's correct pixel width and height NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:data]; NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])]; @@ -682,13 +713,13 @@ - (id)responseObjectForResponse:(NSURLResponse *)response #pragma mark - NSSecureCoding -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (!self) { return nil; } -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH NSNumber *imageScale = [decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(imageScale))]; #if CGFLOAT_IS_DOUBLE self.imageScale = [imageScale doubleValue]; @@ -705,7 +736,7 @@ - (id)initWithCoder:(NSCoder *)decoder { - (void)encodeWithCoder:(NSCoder *)coder { [super encodeWithCoder:coder]; -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH [coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))]; [coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))]; #endif @@ -713,10 +744,10 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFImageResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH serializer.imageScale = self.imageScale; serializer.automaticallyInflatesResponseImage = self.automaticallyInflatesResponseImage; #endif @@ -768,7 +799,7 @@ - (id)responseObjectForResponse:(NSURLResponse *)response #pragma mark - NSSecureCoding -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (!self) { return nil; @@ -787,7 +818,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { AFCompoundResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; serializer.responseSerializers = self.responseSerializers; diff --git a/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h b/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h index 21d9d64..be91828 100644 --- a/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h +++ b/Pods/AFNetworking/AFNetworking/AFURLSessionManager.h @@ -19,19 +19,14 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. + #import #import "AFURLResponseSerialization.h" #import "AFURLRequestSerialization.h" #import "AFSecurityPolicy.h" +#if !TARGET_OS_WATCH #import "AFNetworkReachabilityManager.h" - -#ifndef NS_DESIGNATED_INITIALIZER -#if __has_attribute(objc_designated_initializer) -#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -#else -#define NS_DESIGNATED_INITIALIZER -#endif #endif /** @@ -89,7 +84,7 @@ @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. */ -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) +NS_ASSUME_NONNULL_BEGIN @interface AFURLSessionManager : NSObject @@ -115,10 +110,11 @@ ///------------------------------- /** - The security policy used by created request operations to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. + The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. */ @property (nonatomic, strong) AFSecurityPolicy *securityPolicy; +#if !TARGET_OS_WATCH ///-------------------------------------- /// @name Monitoring Network Reachability ///-------------------------------------- @@ -127,6 +123,7 @@ The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default. */ @property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager; +#endif ///---------------------------- /// @name Getting Session Tasks @@ -135,22 +132,22 @@ /** The data, upload, and download tasks currently run by the managed session. */ -@property (readonly, nonatomic, strong) NSArray *tasks; +@property (readonly, nonatomic, strong) NSArray *tasks; /** The data tasks currently run by the managed session. */ -@property (readonly, nonatomic, strong) NSArray *dataTasks; +@property (readonly, nonatomic, strong) NSArray *dataTasks; /** The upload tasks currently run by the managed session. */ -@property (readonly, nonatomic, strong) NSArray *uploadTasks; +@property (readonly, nonatomic, strong) NSArray *uploadTasks; /** The download tasks currently run by the managed session. */ -@property (readonly, nonatomic, strong) NSArray *downloadTasks; +@property (readonly, nonatomic, strong) NSArray *downloadTasks; ///------------------------------- /// @name Managing Callback Queues @@ -159,20 +156,12 @@ /** The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used. */ -#if OS_OBJECT_HAVE_OBJC_SUPPORT -@property (nonatomic, strong) dispatch_queue_t completionQueue; -#else -@property (nonatomic, assign) dispatch_queue_t completionQueue; -#endif +@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue; /** The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used. */ -#if OS_OBJECT_HAVE_OBJC_SUPPORT -@property (nonatomic, strong) dispatch_group_t completionGroup; -#else -@property (nonatomic, assign) dispatch_group_t completionGroup; -#endif +@property (nonatomic, strong, nullable) dispatch_group_t completionGroup; ///--------------------------------- /// @name Working Around System Bugs @@ -198,7 +187,7 @@ @return A manager for a newly-created session. */ -- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; /** Invalidates the managed session, optionally canceling pending tasks. @@ -218,7 +207,20 @@ @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. */ - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request - completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; + +/** + Creates an `NSURLSessionDataTask` with the specified request. + + @param request The HTTP request for the request. + @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request + uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock + downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; ///--------------------------- /// @name Running Upload Tasks @@ -229,39 +231,39 @@ @param request The HTTP request for the request. @param fileURL A URL to the local file to be uploaded. - @param progress A progress object monitoring the current upload progress. + @param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. @see `attemptsToRecreateUploadTasksForBackgroundSessions` */ - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL - progress:(NSProgress * __autoreleasing *)progress - completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + progress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; /** Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body. @param request The HTTP request for the request. @param bodyData A data object containing the HTTP body to be uploaded. - @param progress A progress object monitoring the current upload progress. + @param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. */ - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request - fromData:(NSData *)bodyData - progress:(NSProgress * __autoreleasing *)progress - completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + fromData:(nullable NSData *)bodyData + progress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; /** Creates an `NSURLSessionUploadTask` with the specified streaming request. @param request The HTTP request for the request. - @param progress A progress object monitoring the current upload progress. + @param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. */ - (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request - progress:(NSProgress * __autoreleasing *)progress - completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; + progress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; ///----------------------------- /// @name Running Download Tasks @@ -271,29 +273,29 @@ Creates an `NSURLSessionDownloadTask` with the specified request. @param request The HTTP request for the request. - @param progress A progress object monitoring the current download progress. + @param progress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method. */ - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request - progress:(NSProgress * __autoreleasing *)progress - destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination - completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler; + progress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock + destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler; /** Creates an `NSURLSessionDownloadTask` with the specified resume data. @param resumeData The data used to resume downloading. - @param progress A progress object monitoring the current download progress. + @param progress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. */ - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData - progress:(NSProgress * __autoreleasing *)progress - destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination - completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler; + progress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock + destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler; ///--------------------------------- /// @name Getting Progress for Tasks @@ -302,20 +304,20 @@ /** Returns the upload progress of the specified task. - @param uploadTask The session upload task. Must not be `nil`. + @param task The session task. Must not be `nil`. @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable. */ -- (NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask; +- (nullable NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task; /** Returns the download progress of the specified task. - @param downloadTask The session download task. Must not be `nil`. + @param task The session task. Must not be `nil`. @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable. */ -- (NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask; +- (nullable NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task; ///----------------------------------------- /// @name Setting Session Delegate Callbacks @@ -326,14 +328,14 @@ @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation. */ -- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block; +- (void)setSessionDidBecomeInvalidBlock:(nullable void (^)(NSURLSession *session, NSError *error))block; /** Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`. @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. */ -- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block; +- (void)setSessionDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block; ///-------------------------------------- /// @name Setting Task Delegate Callbacks @@ -344,35 +346,35 @@ @param block A block object to be executed when a task requires a new request body stream. */ -- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block; +- (void)setTaskNeedNewBodyStreamBlock:(nullable NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block; /** Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`. @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response. */ -- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block; +- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block; /** Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`. @param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. */ -- (void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block; +- (void)setTaskDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block; /** Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. */ -- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block; +- (void)setTaskDidSendBodyDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block; /** Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`. @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task. */ -- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block; +- (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * _Nullable error))block; ///------------------------------------------- /// @name Setting Data Task Delegate Callbacks @@ -383,35 +385,35 @@ @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response. */ -- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block; +- (void)setDataTaskDidReceiveResponseBlock:(nullable NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block; /** Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`. @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become. */ -- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block; +- (void)setDataTaskDidBecomeDownloadTaskBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block; /** Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`. @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue. */ -- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block; +- (void)setDataTaskDidReceiveDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block; /** Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`. @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response. */ -- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block; +- (void)setDataTaskWillCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block; /** Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`. @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session. */ -- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block; +- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block; ///----------------------------------------------- /// @name Setting Download Task Delegate Callbacks @@ -422,125 +424,76 @@ @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error. */ -- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block; +- (void)setDownloadTaskDidFinishDownloadingBlock:(nullable NSURL * _Nullable (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block; /** Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`. @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue. */ -- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block; +- (void)setDownloadTaskDidWriteDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block; /** Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded. */ -- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block; +- (void)setDownloadTaskDidResumeBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block; @end -#endif - ///-------------------- /// @name Notifications ///-------------------- -/** - Posted when a task begins executing. - - @deprecated Use `AFNetworkingTaskDidResumeNotification` instead. - */ -extern NSString * const AFNetworkingTaskDidStartNotification DEPRECATED_ATTRIBUTE; - /** Posted when a task resumes. */ -extern NSString * const AFNetworkingTaskDidResumeNotification; - -/** - Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. - - @deprecated Use `AFNetworkingTaskDidCompleteNotification` instead. - */ -extern NSString * const AFNetworkingTaskDidFinishNotification DEPRECATED_ATTRIBUTE; +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidResumeNotification; /** Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. */ -extern NSString * const AFNetworkingTaskDidCompleteNotification; +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteNotification; /** Posted when a task suspends its execution. */ -extern NSString * const AFNetworkingTaskDidSuspendNotification; +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidSuspendNotification; /** Posted when a session is invalidated. */ -extern NSString * const AFURLSessionDidInvalidateNotification; +FOUNDATION_EXPORT NSString * const AFURLSessionDidInvalidateNotification; /** Posted when a session download task encountered an error when moving the temporary download file to a specified destination. */ -extern NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification; - -/** - The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task. - - @deprecated Use `AFNetworkingTaskDidCompleteResponseDataKey` instead. - */ -extern NSString * const AFNetworkingTaskDidFinishResponseDataKey DEPRECATED_ATTRIBUTE; - -/** - The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task. - */ -extern NSString * const AFNetworkingTaskDidCompleteResponseDataKey; - -/** - The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized. - - @deprecated Use `AFNetworkingTaskDidCompleteSerializedResponseKey` instead. - */ -extern NSString * const AFNetworkingTaskDidFinishSerializedResponseKey DEPRECATED_ATTRIBUTE; +FOUNDATION_EXPORT NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification; /** - The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized. + The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if response data exists for the task. */ -extern NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey; +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseDataKey; /** - The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer. - - @deprecated Use `AFNetworkingTaskDidCompleteResponseSerializerKey` instead. + The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the response was serialized. */ -extern NSString * const AFNetworkingTaskDidFinishResponseSerializerKey DEPRECATED_ATTRIBUTE; +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey; /** - The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer. + The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the task has an associated response serializer. */ -extern NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey; +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey; /** - The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk. - - @deprecated Use `AFNetworkingTaskDidCompleteAssetPathKey` instead. + The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an the response data has been stored directly to disk. */ -extern NSString * const AFNetworkingTaskDidFinishAssetPathKey DEPRECATED_ATTRIBUTE; +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteAssetPathKey; /** - The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk. + Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an error exists. */ -extern NSString * const AFNetworkingTaskDidCompleteAssetPathKey; +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey; -/** - Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists. - - @deprecated Use `AFNetworkingTaskDidCompleteErrorKey` instead. - */ -extern NSString * const AFNetworkingTaskDidFinishErrorKey DEPRECATED_ATTRIBUTE; - -/** - Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists. - */ -extern NSString * const AFNetworkingTaskDidCompleteErrorKey; +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m b/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m index 99eadfb..de447ae 100644 --- a/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m +++ b/Pods/AFNetworking/AFNetworking/AFURLSessionManager.m @@ -22,7 +22,11 @@ #import "AFURLSessionManager.h" #import -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) +#ifndef NSFoundationVersionNumber_iOS_8_0 +#define NSFoundationVersionNumber_With_Fixed_5871104061079552_bug 1140.11 +#else +#define NSFoundationVersionNumber_With_Fixed_5871104061079552_bug NSFoundationVersionNumber_iOS_8_0 +#endif static dispatch_queue_t url_session_manager_creation_queue() { static dispatch_queue_t af_url_session_manager_creation_queue; @@ -34,6 +38,17 @@ static dispatch_queue_t url_session_manager_creation_queue() { return af_url_session_manager_creation_queue; } +static void url_session_manager_create_task_safely(dispatch_block_t block) { + if (NSFoundationVersionNumber < NSFoundationVersionNumber_With_Fixed_5871104061079552_bug) { + // Fix of bug + // Open Radar:http://openradar.appspot.com/radar?id=5871104061079552 (status: Fixed in iOS8) + // Issue about:https://github.com/AFNetworking/AFNetworking/issues/2093 + dispatch_sync(url_session_manager_creation_queue(), block); + } else { + block(); + } +} + static dispatch_queue_t url_session_manager_processing_queue() { static dispatch_queue_t af_url_session_manager_processing_queue; static dispatch_once_t onceToken; @@ -60,21 +75,12 @@ static dispatch_group_t url_session_manager_completion_group() { NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate"; NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification = @"com.alamofire.networking.session.download.file-manager-error"; -NSString * const AFNetworkingTaskDidStartNotification = @"com.alamofire.networking.task.resume"; // Deprecated -NSString * const AFNetworkingTaskDidFinishNotification = @"com.alamofire.networking.task.complete"; // Deprecated - NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse"; NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer"; NSString * const AFNetworkingTaskDidCompleteResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata"; NSString * const AFNetworkingTaskDidCompleteErrorKey = @"com.alamofire.networking.task.complete.error"; NSString * const AFNetworkingTaskDidCompleteAssetPathKey = @"com.alamofire.networking.task.complete.assetpath"; -NSString * const AFNetworkingTaskDidFinishSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse"; // Deprecated -NSString * const AFNetworkingTaskDidFinishResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer"; // Deprecated -NSString * const AFNetworkingTaskDidFinishResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata"; // Deprecated -NSString * const AFNetworkingTaskDidFinishErrorKey = @"com.alamofire.networking.task.complete.error"; // Deprecated -NSString * const AFNetworkingTaskDidFinishAssetPathKey = @"com.alamofire.networking.task.complete.assetpath"; // Deprecated - static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking.session.manager.lock"; static NSUInteger const AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask = 3; @@ -100,17 +106,22 @@ static dispatch_group_t url_session_manager_completion_group() { typedef NSURL * (^AFURLSessionDownloadTaskDidFinishDownloadingBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location); typedef void (^AFURLSessionDownloadTaskDidWriteDataBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite); typedef void (^AFURLSessionDownloadTaskDidResumeBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes); +typedef void (^AFURLSessionTaskProgressBlock)(NSProgress *); typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id responseObject, NSError *error); + #pragma mark - @interface AFURLSessionManagerTaskDelegate : NSObject @property (nonatomic, weak) AFURLSessionManager *manager; @property (nonatomic, strong) NSMutableData *mutableData; -@property (nonatomic, strong) NSProgress *progress; +@property (nonatomic, strong) NSProgress *uploadProgress; +@property (nonatomic, strong) NSProgress *downloadProgress; @property (nonatomic, copy) NSURL *downloadFileURL; @property (nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading; +@property (nonatomic, copy) AFURLSessionTaskProgressBlock uploadProgressBlock; +@property (nonatomic, copy) AFURLSessionTaskProgressBlock downloadProgressBlock; @property (nonatomic, copy) AFURLSessionTaskCompletionHandler completionHandler; @end @@ -123,24 +134,119 @@ - (instancetype)init { } self.mutableData = [NSMutableData data]; + self.uploadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil]; + self.uploadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown; - self.progress = [NSProgress progressWithTotalUnitCount:0]; - + self.downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil]; + self.downloadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown; return self; } -#pragma mark - NSURLSessionTaskDelegate +#pragma mark - NSProgress Tracking -- (void)URLSession:(__unused NSURLSession *)session - task:(__unused NSURLSessionTask *)task - didSendBodyData:(__unused int64_t)bytesSent - totalBytesSent:(int64_t)totalBytesSent -totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend -{ - self.progress.totalUnitCount = totalBytesExpectedToSend; - self.progress.completedUnitCount = totalBytesSent; +- (void)setupProgressForTask:(NSURLSessionTask *)task { + __weak __typeof__(task) weakTask = task; + + self.uploadProgress.totalUnitCount = task.countOfBytesExpectedToSend; + self.downloadProgress.totalUnitCount = task.countOfBytesExpectedToReceive; + [self.uploadProgress setCancellable:YES]; + [self.uploadProgress setCancellationHandler:^{ + __typeof__(weakTask) strongTask = weakTask; + [strongTask cancel]; + }]; + [self.uploadProgress setPausable:YES]; + [self.uploadProgress setPausingHandler:^{ + __typeof__(weakTask) strongTask = weakTask; + [strongTask suspend]; + }]; + if ([self.uploadProgress respondsToSelector:@selector(setResumingHandler:)]) { + [self.uploadProgress setResumingHandler:^{ + __typeof__(weakTask) strongTask = weakTask; + [strongTask resume]; + }]; + } + + [self.downloadProgress setCancellable:YES]; + [self.downloadProgress setCancellationHandler:^{ + __typeof__(weakTask) strongTask = weakTask; + [strongTask cancel]; + }]; + [self.downloadProgress setPausable:YES]; + [self.downloadProgress setPausingHandler:^{ + __typeof__(weakTask) strongTask = weakTask; + [strongTask suspend]; + }]; + + if ([self.downloadProgress respondsToSelector:@selector(setResumingHandler:)]) { + [self.downloadProgress setResumingHandler:^{ + __typeof__(weakTask) strongTask = weakTask; + [strongTask resume]; + }]; + } + + [task addObserver:self + forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived)) + options:NSKeyValueObservingOptionNew + context:NULL]; + [task addObserver:self + forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToReceive)) + options:NSKeyValueObservingOptionNew + context:NULL]; + + [task addObserver:self + forKeyPath:NSStringFromSelector(@selector(countOfBytesSent)) + options:NSKeyValueObservingOptionNew + context:NULL]; + [task addObserver:self + forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToSend)) + options:NSKeyValueObservingOptionNew + context:NULL]; + + [self.downloadProgress addObserver:self + forKeyPath:NSStringFromSelector(@selector(fractionCompleted)) + options:NSKeyValueObservingOptionNew + context:NULL]; + [self.uploadProgress addObserver:self + forKeyPath:NSStringFromSelector(@selector(fractionCompleted)) + options:NSKeyValueObservingOptionNew + context:NULL]; +} + +- (void)cleanUpProgressForTask:(NSURLSessionTask *)task { + [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))]; + [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))]; + [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))]; + [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToSend))]; + [self.downloadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))]; + [self.uploadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if ([object isKindOfClass:[NSURLSessionTask class]]) { + if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) { + self.downloadProgress.completedUnitCount = [change[@"new"] longLongValue]; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))]) { + self.downloadProgress.totalUnitCount = [change[@"new"] longLongValue]; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) { + self.uploadProgress.completedUnitCount = [change[@"new"] longLongValue]; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToSend))]) { + self.uploadProgress.totalUnitCount = [change[@"new"] longLongValue]; + } + } + else if ([object isEqual:self.downloadProgress]) { + if (self.downloadProgressBlock) { + self.downloadProgressBlock(object); + } + } + else if ([object isEqual:self.uploadProgress]) { + if (self.uploadProgressBlock) { + self.uploadProgressBlock(object); + } + } } +#pragma mark - NSURLSessionTaskDelegate + - (void)URLSession:(__unused NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error @@ -154,10 +260,18 @@ - (void)URLSession:(__unused NSURLSession *)session __block NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; userInfo[AFNetworkingTaskDidCompleteResponseSerializerKey] = manager.responseSerializer; + //Performance Improvement from #2672 + NSData *data = nil; + if (self.mutableData) { + data = [self.mutableData copy]; + //We no longer need the reference, so nil it out to gain back some memory. + self.mutableData = nil; + } + if (self.downloadFileURL) { userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL; - } else if (self.mutableData) { - userInfo[AFNetworkingTaskDidCompleteResponseDataKey] = [NSData dataWithData:self.mutableData]; + } else if (data) { + userInfo[AFNetworkingTaskDidCompleteResponseDataKey] = data; } if (error) { @@ -175,7 +289,7 @@ - (void)URLSession:(__unused NSURLSession *)session } else { dispatch_async(url_session_manager_processing_queue(), ^{ NSError *serializationError = nil; - responseObject = [manager.responseSerializer responseObjectForResponse:task.response data:[NSData dataWithData:self.mutableData] error:&serializationError]; + responseObject = [manager.responseSerializer responseObjectForResponse:task.response data:data error:&serializationError]; if (self.downloadFileURL) { responseObject = self.downloadFileURL; @@ -233,24 +347,6 @@ - (void)URLSession:(NSURLSession *)session } } -- (void)URLSession:(__unused NSURLSession *)session - downloadTask:(__unused NSURLSessionDownloadTask *)downloadTask - didWriteData:(__unused int64_t)bytesWritten - totalBytesWritten:(int64_t)totalBytesWritten -totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite -{ - self.progress.totalUnitCount = totalBytesExpectedToWrite; - self.progress.completedUnitCount = totalBytesWritten; -} - -- (void)URLSession:(__unused NSURLSession *)session - downloadTask:(__unused NSURLSessionDownloadTask *)downloadTask - didResumeAtOffset:(int64_t)fileOffset -expectedTotalBytes:(int64_t)expectedTotalBytes { - self.progress.totalUnitCount = expectedTotalBytes; - self.progress.completedUnitCount = fileOffset; -} - @end #pragma mark - @@ -264,14 +360,14 @@ - (void)URLSession:(__unused NSURLSession *)session * - https://github.com/AFNetworking/AFNetworking/pull/2702 */ -static inline void af_swizzleSelector(Class class, SEL originalSelector, SEL swizzledSelector) { - Method originalMethod = class_getInstanceMethod(class, originalSelector); - Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); +static inline void af_swizzleSelector(Class theClass, SEL originalSelector, SEL swizzledSelector) { + Method originalMethod = class_getInstanceMethod(theClass, originalSelector); + Method swizzledMethod = class_getInstanceMethod(theClass, swizzledSelector); method_exchangeImplementations(originalMethod, swizzledMethod); } -static inline BOOL af_addMethod(Class class, SEL selector, Method method) { - return class_addMethod(class, selector, method_getImplementation(method), method_getTypeEncoding(method)); +static inline BOOL af_addMethod(Class theClass, SEL selector, Method method) { + return class_addMethod(theClass, selector, method_getImplementation(method), method_getTypeEncoding(method)); } static NSString * const AFNSURLSessionTaskDidResumeNotification = @"com.alamofire.networking.nsurlsessiontask.resume"; @@ -316,8 +412,13 @@ + (void)load { 7) If the current class implementation of `resume` is not equal to the super class implementation of `resume` AND the current implementation of `resume` is not equal to the original implementation of `af_resume`, THEN swizzle the methods 8) Set the current class to the super class, and repeat steps 3-8 */ - NSURLSessionDataTask *localDataTask = [[NSURLSession sessionWithConfiguration:nil] dataTaskWithURL:nil]; - IMP originalAFResumeIMP = method_getImplementation(class_getInstanceMethod([_AFURLSessionTaskSwizzling class], @selector(af_resume))); + NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration]; + NSURLSession * session = [NSURLSession sessionWithConfiguration:configuration]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" + NSURLSessionDataTask *localDataTask = [session dataTaskWithURL:nil]; +#pragma clang diagnostic pop + IMP originalAFResumeIMP = method_getImplementation(class_getInstanceMethod([self class], @selector(af_resume))); Class currentClass = [localDataTask class]; while (class_getInstanceMethod(currentClass, @selector(resume))) { @@ -332,18 +433,21 @@ + (void)load { } [localDataTask cancel]; + [session finishTasksAndInvalidate]; } } -+ (void)swizzleResumeAndSuspendMethodForClass:(Class)class { ++ (void)swizzleResumeAndSuspendMethodForClass:(Class)theClass { Method afResumeMethod = class_getInstanceMethod(self, @selector(af_resume)); Method afSuspendMethod = class_getInstanceMethod(self, @selector(af_suspend)); - - af_addMethod(class, @selector(af_resume), afResumeMethod); - af_addMethod(class, @selector(af_suspend), afSuspendMethod); - - af_swizzleSelector(class, @selector(resume), @selector(af_resume)); - af_swizzleSelector(class, @selector(suspend), @selector(af_suspend)); + + if (af_addMethod(theClass, @selector(af_resume), afResumeMethod)) { + af_swizzleSelector(theClass, @selector(resume), @selector(af_resume)); + } + + if (af_addMethod(theClass, @selector(af_suspend), afSuspendMethod)) { + af_swizzleSelector(theClass, @selector(suspend), @selector(af_suspend)); + } } - (NSURLSessionTaskState)state { @@ -425,7 +529,9 @@ - (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)config self.securityPolicy = [AFSecurityPolicy defaultPolicy]; +#if !TARGET_OS_WATCH self.reachabilityManager = [AFNetworkReachabilityManager sharedManager]; +#endif self.mutableTaskDelegatesKeyedByTaskIdentifier = [[NSMutableDictionary alloc] init]; @@ -434,7 +540,7 @@ - (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)config [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) { for (NSURLSessionDataTask *task in dataTasks) { - [self addDelegateForDataTask:task completionHandler:nil]; + [self addDelegateForDataTask:task uploadProgress:nil downloadProgress:nil completionHandler:nil]; } for (NSURLSessionUploadTask *uploadTask in uploadTasks) { @@ -446,9 +552,6 @@ - (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)config } }]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidResume:) name:AFNSURLSessionTaskDidResumeNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidSuspend:) name:AFNSURLSessionTaskDidSuspendNotification object:nil]; - return self; } @@ -505,10 +608,14 @@ - (void)setDelegate:(AFURLSessionManagerTaskDelegate *)delegate [self.lock lock]; self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate; + [delegate setupProgressForTask:task]; + [self addNotificationObserverForTask:task]; [self.lock unlock]; } - (void)addDelegateForDataTask:(NSURLSessionDataTask *)dataTask + uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock + downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler { AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init]; @@ -517,48 +624,28 @@ - (void)addDelegateForDataTask:(NSURLSessionDataTask *)dataTask dataTask.taskDescription = self.taskDescriptionForSessionTasks; [self setDelegate:delegate forTask:dataTask]; + + delegate.uploadProgressBlock = uploadProgressBlock; + delegate.downloadProgressBlock = downloadProgressBlock; } - (void)addDelegateForUploadTask:(NSURLSessionUploadTask *)uploadTask - progress:(NSProgress * __autoreleasing *)progress + progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler { AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init]; delegate.manager = self; delegate.completionHandler = completionHandler; - int64_t totalUnitCount = uploadTask.countOfBytesExpectedToSend; - if(totalUnitCount == NSURLSessionTransferSizeUnknown) { - NSString *contentLength = [uploadTask.originalRequest valueForHTTPHeaderField:@"Content-Length"]; - if(contentLength) { - totalUnitCount = (int64_t)[contentLength longLongValue]; - } - } - - if (delegate.progress) { - delegate.progress.totalUnitCount = totalUnitCount; - } else { - delegate.progress = [NSProgress progressWithTotalUnitCount:totalUnitCount]; - } - - delegate.progress.pausingHandler = ^{ - [uploadTask suspend]; - }; - delegate.progress.cancellationHandler = ^{ - [uploadTask cancel]; - }; - - if (progress) { - *progress = delegate.progress; - } - uploadTask.taskDescription = self.taskDescriptionForSessionTasks; [self setDelegate:delegate forTask:uploadTask]; + + delegate.uploadProgressBlock = uploadProgressBlock; } - (void)addDelegateForDownloadTask:(NSURLSessionDownloadTask *)downloadTask - progress:(NSProgress * __autoreleasing *)progress + progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler { @@ -572,29 +659,24 @@ - (void)addDelegateForDownloadTask:(NSURLSessionDownloadTask *)downloadTask }; } - if (progress) { - *progress = delegate.progress; - } - downloadTask.taskDescription = self.taskDescriptionForSessionTasks; [self setDelegate:delegate forTask:downloadTask]; + + delegate.downloadProgressBlock = downloadProgressBlock; } - (void)removeDelegateForTask:(NSURLSessionTask *)task { NSParameterAssert(task); + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task]; [self.lock lock]; + [delegate cleanUpProgressForTask:task]; + [self removeNotificationObserverForTask:task]; [self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)]; [self.lock unlock]; } -- (void)removeAllDelegates { - [self.lock lock]; - [self.mutableTaskDelegatesKeyedByTaskIdentifier removeAllObjects]; - [self.lock unlock]; -} - #pragma mark - - (NSArray *)tasksForKeyPath:(NSString *)keyPath { @@ -655,17 +737,36 @@ - (void)setResponseSerializer:(id )responseSerialize _responseSerializer = responseSerializer; } +#pragma mark - +- (void)addNotificationObserverForTask:(NSURLSessionTask *)task { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidResume:) name:AFNSURLSessionTaskDidResumeNotification object:task]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidSuspend:) name:AFNSURLSessionTaskDidSuspendNotification object:task]; +} + +- (void)removeNotificationObserverForTask:(NSURLSessionTask *)task { + [[NSNotificationCenter defaultCenter] removeObserver:self name:AFNSURLSessionTaskDidSuspendNotification object:task]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:AFNSURLSessionTaskDidResumeNotification object:task]; +} + #pragma mark - - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler { + return [self dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:completionHandler]; +} + +- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request + uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock + downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler { + __block NSURLSessionDataTask *dataTask = nil; - dispatch_sync(url_session_manager_creation_queue(), ^{ + url_session_manager_create_task_safely(^{ dataTask = [self.session dataTaskWithRequest:request]; }); - [self addDelegateForDataTask:dataTask completionHandler:completionHandler]; + [self addDelegateForDataTask:dataTask uploadProgress:uploadProgressBlock downloadProgress:downloadProgressBlock completionHandler:completionHandler]; return dataTask; } @@ -674,11 +775,11 @@ - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL - progress:(NSProgress * __autoreleasing *)progress + progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler { __block NSURLSessionUploadTask *uploadTask = nil; - dispatch_sync(url_session_manager_creation_queue(), ^{ + url_session_manager_create_task_safely(^{ uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL]; }); @@ -688,36 +789,36 @@ - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request } } - [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler]; + [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler]; return uploadTask; } - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromData:(NSData *)bodyData - progress:(NSProgress * __autoreleasing *)progress + progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler { __block NSURLSessionUploadTask *uploadTask = nil; - dispatch_sync(url_session_manager_creation_queue(), ^{ + url_session_manager_create_task_safely(^{ uploadTask = [self.session uploadTaskWithRequest:request fromData:bodyData]; }); - [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler]; + [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler]; return uploadTask; } - (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request - progress:(NSProgress * __autoreleasing *)progress + progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler { __block NSURLSessionUploadTask *uploadTask = nil; - dispatch_sync(url_session_manager_creation_queue(), ^{ + url_session_manager_create_task_safely(^{ uploadTask = [self.session uploadTaskWithStreamedRequest:request]; }); - [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler]; + [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler]; return uploadTask; } @@ -725,43 +826,42 @@ - (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)reques #pragma mark - - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request - progress:(NSProgress * __autoreleasing *)progress + progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler { __block NSURLSessionDownloadTask *downloadTask = nil; - dispatch_sync(url_session_manager_creation_queue(), ^{ + url_session_manager_create_task_safely(^{ downloadTask = [self.session downloadTaskWithRequest:request]; }); - [self addDelegateForDownloadTask:downloadTask progress:progress destination:destination completionHandler:completionHandler]; + [self addDelegateForDownloadTask:downloadTask progress:downloadProgressBlock destination:destination completionHandler:completionHandler]; return downloadTask; } - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData - progress:(NSProgress * __autoreleasing *)progress + progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler { __block NSURLSessionDownloadTask *downloadTask = nil; - dispatch_sync(url_session_manager_creation_queue(), ^{ + url_session_manager_create_task_safely(^{ downloadTask = [self.session downloadTaskWithResumeData:resumeData]; }); - [self addDelegateForDownloadTask:downloadTask progress:progress destination:destination completionHandler:completionHandler]; + [self addDelegateForDownloadTask:downloadTask progress:downloadProgressBlock destination:destination completionHandler:completionHandler]; return downloadTask; } #pragma mark - - -- (NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask { - return [[self delegateForTask:uploadTask] progress]; +- (NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task { + return [[self delegateForTask:task] uploadProgress]; } -- (NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask { - return [[self delegateForTask:downloadTask] progress]; +- (NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task { + return [[self delegateForTask:task] downloadProgress]; } #pragma mark - @@ -861,7 +961,6 @@ - (void)URLSession:(NSURLSession *)session self.sessionDidBecomeInvalid(session, error); } - [self removeAllDelegates]; [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDidInvalidateNotification object:session]; } @@ -884,7 +983,7 @@ - (void)URLSession:(NSURLSession *)session disposition = NSURLSessionAuthChallengePerformDefaultHandling; } } else { - disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge; + disposition = NSURLSessionAuthChallengeRejectProtectionSpace; } } else { disposition = NSURLSessionAuthChallengePerformDefaultHandling; @@ -931,7 +1030,7 @@ - (void)URLSession:(NSURLSession *)session disposition = NSURLSessionAuthChallengeUseCredential; credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; } else { - disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge; + disposition = NSURLSessionAuthChallengeRejectProtectionSpace; } } else { disposition = NSURLSessionAuthChallengePerformDefaultHandling; @@ -975,9 +1074,6 @@ - (void)URLSession:(NSURLSession *)session } } - AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task]; - [delegate URLSession:session task:task didSendBodyData:bytesSent totalBytesSent:totalBytesSent totalBytesExpectedToSend:totalUnitCount]; - if (self.taskDidSendBodyData) { self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount); } @@ -999,7 +1095,6 @@ - (void)URLSession:(NSURLSession *)session if (self.taskDidComplete) { self.taskDidComplete(session, task, error); } - } #pragma mark - NSURLSessionDataDelegate @@ -1039,6 +1134,7 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data { + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask]; [delegate URLSession:session dataTask:dataTask didReceiveData:data]; @@ -1103,9 +1199,6 @@ - (void)URLSession:(NSURLSession *)session totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite { - AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; - [delegate URLSession:session downloadTask:downloadTask didWriteData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite]; - if (self.downloadTaskDidWriteData) { self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); } @@ -1116,9 +1209,6 @@ - (void)URLSession:(NSURLSession *)session didResumeAtOffset:(int64_t)fileOffset expectedTotalBytes:(int64_t)expectedTotalBytes { - AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; - [delegate URLSession:session downloadTask:downloadTask didResumeAtOffset:fileOffset expectedTotalBytes:expectedTotalBytes]; - if (self.downloadTaskDidResume) { self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes); } @@ -1130,7 +1220,7 @@ + (BOOL)supportsSecureCoding { return YES; } -- (id)initWithCoder:(NSCoder *)decoder { +- (instancetype)initWithCoder:(NSCoder *)decoder { NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; self = [self initWithSessionConfiguration:configuration]; @@ -1147,10 +1237,8 @@ - (void)encodeWithCoder:(NSCoder *)coder { #pragma mark - NSCopying -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { return [[[self class] allocWithZone:zone] initWithSessionConfiguration:self.session.configuration]; } @end - -#endif diff --git a/Pods/AFNetworking/README.md b/Pods/AFNetworking/README.md index 916a242..f784681 100644 --- a/Pods/AFNetworking/README.md +++ b/Pods/AFNetworking/README.md @@ -3,6 +3,11 @@

[![Build Status](https://travis-ci.org/AFNetworking/AFNetworking.svg)](https://travis-ci.org/AFNetworking/AFNetworking) +[![codecov.io](https://codecov.io/github/AFNetworking/AFNetworking/coverage.svg?branch=master)](https://codecov.io/github/AFNetworking/AFNetworking?branch=master) +[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/AFNetworking.svg)](https://img.shields.io/cocoapods/v/AFNetworking.svg) +[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Platform](https://img.shields.io/cocoapods/p/AFNetworking.svg?style=flat)](http://cocoadocs.org/docsets/AFNetworking) +[![Twitter](https://img.shields.io/badge/twitter-@AFNetworking-blue.svg?style=flat)](http://twitter.com/AFNetworking) AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of the [Foundation URL Loading System](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html), extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use. @@ -15,7 +20,7 @@ Choose AFNetworking for your next project, or migrate over your existing project - [Download AFNetworking](https://github.com/AFNetworking/AFNetworking/archive/master.zip) and try out the included Mac and iPhone example apps - Read the ["Getting Started" guide](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking), [FAQ](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-FAQ), or [other articles on the Wiki](https://github.com/AFNetworking/AFNetworking/wiki) - Check out the [documentation](http://cocoadocs.org/docsets/AFNetworking/) for a comprehensive look at all of the APIs available in AFNetworking -- Read the [AFNetworking 2.0 Migration Guide](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-2.0-Migration-Guide) for an overview of the architectural changes from 1.0. +- Read the [AFNetworking 3.0 Migration Guide](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-3.0-Migration-Guide) for an overview of the architectural changes from 2.0. ## Communication @@ -25,24 +30,64 @@ Choose AFNetworking for your next project, or migrate over your existing project - If you **have a feature request**, open an issue. - If you **want to contribute**, submit a pull request. -### Installation with CocoaPods +## Installation +AFNetworking supports multiple methods for installing the library in a project. -[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects. See the ["Getting Started" guide for more information](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking). +## Installation with CocoaPods + +[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects. See the ["Getting Started" guide for more information](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking). You can install it with the following command: + +```bash +$ gem install cocoapods +``` + +> CocoaPods 0.39.0+ is required to build AFNetworking 3.0.0+. #### Podfile +To integrate AFNetworking into your Xcode project using CocoaPods, specify it in your `Podfile`: + ```ruby -platform :ios, '7.0' -pod "AFNetworking", "~> 2.0" +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '8.0' + +pod 'AFNetworking', '~> 3.0' ``` +Then, run the following command: + +```bash +$ pod install +``` + +### Installation with Carthage + +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. + +You can install Carthage with [Homebrew](http://brew.sh/) using the following command: + +```bash +$ brew update +$ brew install carthage +``` + +To integrate AFNetworking into your Xcode project using Carthage, specify it in your `Cartfile`: + +```ogdl +github "AFNetworking/AFNetworking" ~> 3.0 +``` + +Run `carthage` to build the framework and drag the built `AFNetworking.framework` into your Xcode project. + ## Requirements -| AFNetworking Version | Minimum iOS Target | Minimum OS X Target | Notes | -|:--------------------:|:---------------------------:|:----------------------------:|:-------------------------------------------------------------------------:| -| 2.x | iOS 6 | OS X 10.8 | Xcode 5 is required. `NSURLSession` subspec requires iOS 7 or OS X 10.9. | -| [1.x](https://github.com/AFNetworking/AFNetworking/tree/1.x) | iOS 5 | Mac OS X 10.7 | | -| [0.10.x](https://github.com/AFNetworking/AFNetworking/tree/0.10.x) | iOS 4 | Mac OS X 10.6 | | +| AFNetworking Version | Minimum iOS Target | Minimum OS X Target | Minimum watchOS Target | Minimum tvOS Target | Notes | +|:--------------------:|:---------------------------:|:----------------------------:|:----------------------------:|:----------------------------:|:-------------------------------------------------------------------------:| +| 3.x | iOS 7 | OS X 10.9 | watchOS 2.0 | tvOS 9.0 | Xcode 7+ is required. `NSURLConnectionOperation` support has been removed. | +| 2.6 -> 2.6.3 | iOS 7 | OS X 10.9 | watchOS 2.0 | n/a | Xcode 7+ is required. | +| 2.0 -> 2.5.4 | iOS 6 | OS X 10.8 | n/a | n/a | Xcode 5+ is required. `NSURLSession` subspec requires iOS 7 or OS X 10.9. | +| 1.x | iOS 5 | Mac OS X 10.7 | n/a | n/a | +| 0.10.x | iOS 4 | Mac OS X 10.6 | n/a | n/a | (OS X projects must support [64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)). @@ -50,13 +95,7 @@ pod "AFNetworking", "~> 2.0" ## Architecture -### NSURLConnection - -- `AFURLConnectionOperation` -- `AFHTTPRequestOperation` -- `AFHTTPRequestOperationManager` - -### NSURLSession _(iOS 7 / Mac OS X 10.9)_ +### NSURLSession - `AFURLSessionManager` - `AFHTTPSessionManager` @@ -83,50 +122,6 @@ pod "AFNetworking", "~> 2.0" ## Usage -### HTTP Request Operation Manager - -`AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management. - -#### `GET` Request - -```objective-c -AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; -[manager GET:@"http://example.com/resources.json" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { - NSLog(@"JSON: %@", responseObject); -} failure:^(AFHTTPRequestOperation *operation, NSError *error) { - NSLog(@"Error: %@", error); -}]; -``` - -#### `POST` URL-Form-Encoded Request - -```objective-c -AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; -NSDictionary *parameters = @{@"foo": @"bar"}; -[manager POST:@"http://example.com/resources.json" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { - NSLog(@"JSON: %@", responseObject); -} failure:^(AFHTTPRequestOperation *operation, NSError *error) { - NSLog(@"Error: %@", error); -}]; -``` - -#### `POST` Multi-Part Request - -```objective-c -AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; -NSDictionary *parameters = @{@"foo": @"bar"}; -NSURL *filePath = [NSURL fileURLWithPath:@"file://path/to/image.png"]; -[manager POST:@"http://example.com/resources.json" parameters:parameters constructingBodyWithBlock:^(id formData) { - [formData appendPartWithFileURL:filePath name:@"image" error:nil]; -} success:^(AFHTTPRequestOperation *operation, id responseObject) { - NSLog(@"Success: %@", responseObject); -} failure:^(AFHTTPRequestOperation *operation, NSError *error) { - NSLog(@"Error: %@", error); -}]; -``` - ---- - ### AFURLSessionManager `AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to ``, ``, ``, and ``. @@ -177,15 +172,25 @@ NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFo } error:nil]; AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; -NSProgress *progress = nil; -NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { - if (error) { - NSLog(@"Error: %@", error); - } else { - NSLog(@"%@ %@", response, responseObject); - } -}]; +NSURLSessionUploadTask *uploadTask; +uploadTask = [manager + uploadTaskWithStreamedRequest:request + progress:^(NSProgress * _Nonnull uploadProgress) { + // This is not called back on the main queue. + // You are responsible for dispatching to the main queue for UI updates + dispatch_async(dispatch_get_main_queue(), ^{ + //Update the progress view + [progressView setProgress:uploadProgress.fractionCompleted]; + }); + } + completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"%@ %@", response, responseObject); + } + }]; [uploadTask resume]; ``` @@ -256,7 +261,14 @@ NSDictionary *parameters = @{@"foo": @"bar", @"baz": @[@1, @2, @3]}; `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. -**Network reachability is a diagnostic tool that can be used to understand why a request might have failed. It should not be used to determine whether or not to make a request.** +* Do not use Reachability to determine if the original request should be sent. + * You should try to send it. +* You can use Reachability to determine when a request should be automatically retried. + * Although it may still fail, a Reachability notification that the connectivity is available is a good time to retry something. +* Network reachability is a useful tool for determining why a request might have failed. + * After a network request has failed, telling the user they're offline is better than giving them a more technical but accurate error, such as "request timed out." + +See also [WWDC 2012 session 706, "Networking Best Practices."](https://developer.apple.com/videos/play/wwdc2012-706/). #### Shared Network Reachability @@ -264,29 +276,8 @@ NSDictionary *parameters = @{@"foo": @"bar", @"baz": @[@1, @2, @3]}; [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status)); }]; -``` -#### HTTP Manager Reachability - -```objective-c -NSURL *baseURL = [NSURL URLWithString:@"http://example.com/"]; -AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:baseURL]; - -NSOperationQueue *operationQueue = manager.operationQueue; -[manager.reachabilityManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { - switch (status) { - case AFNetworkReachabilityStatusReachableViaWWAN: - case AFNetworkReachabilityStatusReachableViaWiFi: - [operationQueue setSuspended:NO]; - break; - case AFNetworkReachabilityStatusNotReachable: - default: - [operationQueue setSuspended:YES]; - break; - } -}]; - -[manager.reachabilityManager startMonitoring]; +[[AFNetworkReachabilityManager sharedManager] startMonitoring]; ``` --- @@ -300,71 +291,15 @@ Adding pinned SSL certificates to your app helps prevent man-in-the-middle attac #### Allowing Invalid SSL Certificates ```objective-c -AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; +AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; manager.securityPolicy.allowInvalidCertificates = YES; // not recommended for production ``` --- -### AFHTTPRequestOperation - -`AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. - -Although `AFHTTPRequestOperationManager` is usually the best way to go about making requests, `AFHTTPRequestOperation` can be used by itself. - -#### `GET` with `AFHTTPRequestOperation` - -```objective-c -NSURL *URL = [NSURL URLWithString:@"http://example.com/resources/123.json"]; -NSURLRequest *request = [NSURLRequest requestWithURL:URL]; -AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request]; -op.responseSerializer = [AFJSONResponseSerializer serializer]; -[op setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - NSLog(@"JSON: %@", responseObject); -} failure:^(AFHTTPRequestOperation *operation, NSError *error) { - NSLog(@"Error: %@", error); -}]; -[[NSOperationQueue mainQueue] addOperation:op]; -``` - -#### Batch of Operations - -```objective-c -NSMutableArray *mutableOperations = [NSMutableArray array]; -for (NSURL *fileURL in filesToUpload) { - NSURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:@"http://example.com/upload" parameters:nil constructingBodyWithBlock:^(id formData) { - [formData appendPartWithFileURL:fileURL name:@"images[]" error:nil]; - }]; - - AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; - - [mutableOperations addObject:operation]; -} - -NSArray *operations = [AFURLConnectionOperation batchOfRequestOperations:@[...] progressBlock:^(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations) { - NSLog(@"%lu of %lu complete", numberOfFinishedOperations, totalNumberOfOperations); -} completionBlock:^(NSArray *operations) { - NSLog(@"All operations in batch complete"); -}]; -[[NSOperationQueue mainQueue] addOperations:operations waitUntilFinished:NO]; -``` - ## Unit Tests -AFNetworking includes a suite of unit tests within the Tests subdirectory. In order to run the unit tests, you must install the testing dependencies via [CocoaPods](http://cocoapods.org/): - - $ cd Tests - $ pod install - -Once testing dependencies are installed, you can execute the test suite via the 'iOS Tests' and 'OS X Tests' schemes within Xcode. - -### Running Tests from the Command Line - -Tests can also be run from the command line or within a continuous integration environment. The [`xcpretty`](https://github.com/mneorr/xcpretty) utility needs to be installed before running the tests from the command line: - - $ gem install xcpretty - -Once `xcpretty` is installed, you can execute the suite via `rake test`. +AFNetworking includes a suite of unit tests within the Tests subdirectory. These tests can be run simply be executed the test action on the platform framework you would like to test. ## Credits diff --git a/Pods/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h b/Pods/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h new file mode 100644 index 0000000..e89b951 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h @@ -0,0 +1,149 @@ +// AFAutoPurgingImageCache.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// 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. + +#import +#import + +#if TARGET_OS_IOS || TARGET_OS_TV +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + The `AFImageCache` protocol defines a set of APIs for adding, removing and fetching images from a cache synchronously. + */ +@protocol AFImageCache + +/** + Adds the image to the cache with the given identifier. + + @param image The image to cache. + @param identifier The unique identifier for the image in the cache. + */ +- (void)addImage:(UIImage *)image withIdentifier:(NSString *)identifier; + +/** + Removes the image from the cache matching the given identifier. + + @param identifier The unique identifier for the image in the cache. + + @return A BOOL indicating whether or not the image was removed from the cache. + */ +- (BOOL)removeImageWithIdentifier:(NSString *)identifier; + +/** + Removes all images from the cache. + + @return A BOOL indicating whether or not all images were removed from the cache. + */ +- (BOOL)removeAllImages; + +/** + Returns the image in the cache associated with the given identifier. + + @param identifier The unique identifier for the image in the cache. + + @return An image for the matching identifier, or nil. + */ +- (nullable UIImage *)imageWithIdentifier:(NSString *)identifier; +@end + + +/** + The `ImageRequestCache` protocol extends the `ImageCache` protocol by adding methods for adding, removing and fetching images from a cache given an `NSURLRequest` and additional identifier. + */ +@protocol AFImageRequestCache + +/** + Adds the image to the cache using an identifier created from the request and additional identifier. + + @param image The image to cache. + @param request The unique URL request identifing the image asset. + @param identifier The additional identifier to apply to the URL request to identify the image. + */ +- (void)addImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier; + +/** + Removes the image from the cache using an identifier created from the request and additional identifier. + + @param request The unique URL request identifing the image asset. + @param identifier The additional identifier to apply to the URL request to identify the image. + + @return A BOOL indicating whether or not all images were removed from the cache. + */ +- (BOOL)removeImageforRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier; + +/** + Returns the image from the cache associated with an identifier created from the request and additional identifier. + + @param request The unique URL request identifing the image asset. + @param identifier The additional identifier to apply to the URL request to identify the image. + + @return An image for the matching request and identifier, or nil. + */ +- (nullable UIImage *)imageforRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier; + +@end + +/** + The `AutoPurgingImageCache` in an in-memory image cache used to store images up to a given memory capacity. When the memory capacity is reached, the image cache is sorted by last access date, then the oldest image is continuously purged until the preferred memory usage after purge is met. Each time an image is accessed through the cache, the internal access date of the image is updated. + */ +@interface AFAutoPurgingImageCache : NSObject + +/** + The total memory capacity of the cache in bytes. + */ +@property (nonatomic, assign) UInt64 memoryCapacity; + +/** + The preferred memory usage after purge in bytes. During a purge, images will be purged until the memory capacity drops below this limit. + */ +@property (nonatomic, assign) UInt64 preferredMemoryUsageAfterPurge; + +/** + The current total memory usage in bytes of all images stored within the cache. + */ +@property (nonatomic, assign, readonly) UInt64 memoryUsage; + +/** + Initialies the `AutoPurgingImageCache` instance with default values for memory capacity and preferred memory usage after purge limit. `memoryCapcity` defaults to `100 MB`. `preferredMemoryUsageAfterPurge` defaults to `60 MB`. + + @return The new `AutoPurgingImageCache` instance. + */ +- (instancetype)init; + +/** + Initialies the `AutoPurgingImageCache` instance with the given memory capacity and preferred memory usage + after purge limit. + + @param memoryCapacity The total memory capacity of the cache in bytes. + @param preferredMemoryUsageAfterPurge The preferred memory usage after purge in bytes. + + @return The new `AutoPurgingImageCache` instance. + */ +- (instancetype)initWithMemoryCapacity:(UInt64)memoryCapacity preferredMemoryCapacity:(UInt64)preferredMemoryCapacity; + +@end + +NS_ASSUME_NONNULL_END + +#endif + diff --git a/Pods/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.m b/Pods/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.m new file mode 100644 index 0000000..326fe4f --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.m @@ -0,0 +1,201 @@ +// AFAutoPurgingImageCache.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// 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. + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import "AFAutoPurgingImageCache.h" + +@interface AFCachedImage : NSObject + +@property (nonatomic, strong) UIImage *image; +@property (nonatomic, strong) NSString *identifier; +@property (nonatomic, assign) UInt64 totalBytes; +@property (nonatomic, strong) NSDate *lastAccessDate; +@property (nonatomic, assign) UInt64 currentMemoryUsage; + +@end + +@implementation AFCachedImage + +-(instancetype)initWithImage:(UIImage *)image identifier:(NSString *)identifier { + if (self = [self init]) { + self.image = image; + self.identifier = identifier; + + CGSize imageSize = CGSizeMake(image.size.width * image.scale, image.size.height * image.scale); + CGFloat bytesPerPixel = 4.0; + CGFloat bytesPerRow = imageSize.width * bytesPerPixel; + self.totalBytes = (UInt64)bytesPerPixel * (UInt64)bytesPerRow; + self.lastAccessDate = [NSDate date]; + } + return self; +} + +- (UIImage*)accessImage { + self.lastAccessDate = [NSDate date]; + return self.image; +} + +- (NSString *)description { + NSString *descriptionString = [NSString stringWithFormat:@"Idenfitier: %@ lastAccessDate: %@ ", self.identifier, self.lastAccessDate]; + return descriptionString; + +} + +@end + +@interface AFAutoPurgingImageCache () +@property (nonatomic, strong) NSMutableDictionary *cachedImages; +@property (nonatomic, assign) UInt64 currentMemoryUsage; +@property (nonatomic, strong) dispatch_queue_t synchronizationQueue; +@end + +@implementation AFAutoPurgingImageCache + +- (instancetype)init { + return [self initWithMemoryCapacity:100 * 1024 * 1024 preferredMemoryCapacity:60 * 1024 * 1024]; +} + +- (instancetype)initWithMemoryCapacity:(UInt64)memoryCapacity preferredMemoryCapacity:(UInt64)preferredMemoryCapacity { + if (self = [super init]) { + self.memoryCapacity = memoryCapacity; + self.preferredMemoryUsageAfterPurge = preferredMemoryCapacity; + self.cachedImages = [[NSMutableDictionary alloc] init]; + + NSString *queueName = [NSString stringWithFormat:@"com.alamofire.autopurgingimagecache-%@", [[NSUUID UUID] UUIDString]]; + self.synchronizationQueue = dispatch_queue_create([queueName cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_CONCURRENT); + + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(removeAllImages) + name:UIApplicationDidReceiveMemoryWarningNotification + object:nil]; + + } + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (UInt64)memoryUsage { + __block UInt64 result = 0; + dispatch_sync(self.synchronizationQueue, ^{ + result = self.currentMemoryUsage; + }); + return result; +} + +- (void)addImage:(UIImage *)image withIdentifier:(NSString *)identifier { + dispatch_barrier_async(self.synchronizationQueue, ^{ + AFCachedImage *cacheImage = [[AFCachedImage alloc] initWithImage:image identifier:identifier]; + + AFCachedImage *previousCachedImage = self.cachedImages[identifier]; + if (previousCachedImage != nil) { + self.currentMemoryUsage -= previousCachedImage.totalBytes; + } + + self.cachedImages[identifier] = cacheImage; + self.currentMemoryUsage += cacheImage.totalBytes; + }); + + dispatch_barrier_async(self.synchronizationQueue, ^{ + if (self.currentMemoryUsage > self.memoryCapacity) { + UInt64 bytesToPurge = self.currentMemoryUsage - self.preferredMemoryUsageAfterPurge; + NSMutableArray *sortedImages = [NSMutableArray arrayWithArray:self.cachedImages.allValues]; + NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"lastAccessDate" + ascending:YES]; + [sortedImages sortUsingDescriptors:@[sortDescriptor]]; + + UInt64 bytesPurged = 0; + + for (AFCachedImage *cachedImage in sortedImages) { + [self.cachedImages removeObjectForKey:cachedImage.identifier]; + bytesPurged += cachedImage.totalBytes; + if (bytesPurged >= bytesToPurge) { + break ; + } + } + self.currentMemoryUsage -= bytesPurged; + } + }); +} + +- (BOOL)removeImageWithIdentifier:(NSString *)identifier { + __block BOOL removed = NO; + dispatch_barrier_sync(self.synchronizationQueue, ^{ + AFCachedImage *cachedImage = self.cachedImages[identifier]; + if (cachedImage != nil) { + [self.cachedImages removeObjectForKey:identifier]; + self.currentMemoryUsage -= cachedImage.totalBytes; + removed = YES; + } + }); + return removed; +} + +- (BOOL)removeAllImages { + __block BOOL removed = NO; + dispatch_barrier_sync(self.synchronizationQueue, ^{ + if (self.cachedImages.count > 0) { + [self.cachedImages removeAllObjects]; + self.currentMemoryUsage = 0; + removed = YES; + } + }); + return removed; +} + +- (nullable UIImage *)imageWithIdentifier:(NSString *)identifier { + __block UIImage *image = nil; + dispatch_sync(self.synchronizationQueue, ^{ + AFCachedImage *cachedImage = self.cachedImages[identifier]; + image = [cachedImage accessImage]; + }); + return image; +} + +- (void)addImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(NSString *)identifier { + [self addImage:image withIdentifier:[self imageCacheKeyFromURLRequest:request withAdditionalIdentifier:identifier]]; +} + +- (BOOL)removeImageforRequest:(NSURLRequest *)request withAdditionalIdentifier:(NSString *)identifier { + return [self removeImageWithIdentifier:[self imageCacheKeyFromURLRequest:request withAdditionalIdentifier:identifier]]; +} + +- (nullable UIImage *)imageforRequest:(NSURLRequest *)request withAdditionalIdentifier:(NSString *)identifier { + return [self imageWithIdentifier:[self imageCacheKeyFromURLRequest:request withAdditionalIdentifier:identifier]]; +} + +- (NSString *)imageCacheKeyFromURLRequest:(NSURLRequest *)request withAdditionalIdentifier:(NSString *)additionalIdentifier { + NSString *key = request.URL.absoluteString; + if (additionalIdentifier != nil) { + key = [key stringByAppendingString:additionalIdentifier]; + } + return key; +} + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/AFImageDownloader.h b/Pods/AFNetworking/UIKit+AFNetworking/AFImageDownloader.h new file mode 100644 index 0000000..b35e185 --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/AFImageDownloader.h @@ -0,0 +1,157 @@ +// AFImageDownloader.h +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// 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. + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import +#import "AFAutoPurgingImageCache.h" +#import "AFHTTPSessionManager.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) { + AFImageDownloadPrioritizationFIFO, + AFImageDownloadPrioritizationLIFO +}; + +/** + The `AFImageDownloadReceipt` is an object vended by the `AFImageDownloader` when starting a data task. It can be used to cancel active tasks running on the `AFImageDownloader` session. As a general rule, image data tasks should be cancelled using the `AFImageDownloadReceipt` instead of calling `cancel` directly on the `task` itself. The `AFImageDownloader` is optimized to handle duplicate task scenarios as well as pending versus active downloads. + */ +@interface AFImageDownloadReceipt : NSObject + +/** + The data task created by the `AFImageDownloader`. +*/ +@property (nonatomic, strong) NSURLSessionDataTask *task; + +/** + The unique identifier for the success and failure blocks when duplicate requests are made. + */ +@property (nonatomic, strong) NSUUID *receiptID; +@end + +/** The `AFImageDownloader` class is responsible for downloading images in parallel on a prioritized queue. Incoming downloads are added to the front or back of the queue depending on the download prioritization. Each downloaded image is cached in the underlying `NSURLCache` as well as the in-memory image cache. By default, any download request with a cached image equivalent in the image cache will automatically be served the cached image representation. + */ +@interface AFImageDownloader : NSObject + +/** + The image cache used to store all downloaded images in. `AFAutoPurgingImageCache` by default. + */ +@property (nonatomic, strong, nullable) id imageCache; + +/** + The `AFHTTPSessionManager` used to download images. By default, this is configured with an `AFImageResponseSerializer`, and a shared `NSURLCache` for all image downloads. + */ +@property (nonatomic, strong) AFHTTPSessionManager *sessionManager; + +/** + Defines the order prioritization of incoming download requests being inserted into the queue. `AFImageDownloadPrioritizationFIFO` by default. + */ +@property (nonatomic, assign) AFImageDownloadPrioritization downloadPrioritizaton; + +/** + The shared default instance of `AFImageDownloader` initialized with default values. + */ ++ (instancetype)defaultInstance; + +/** + Creates a default `NSURLCache` with common usage parameter values. + + @returns The default `NSURLCache` instance. + */ ++ (NSURLCache *)defaultURLCache; + +/** + Default initializer + + @return An instance of `AFImageDownloader` initialized with default values. + */ +- (instancetype)init; + +/** + Initializes the `AFImageDownloader` instance with the given session manager, download prioritization, maximum active download count and image cache. + + @param sessionManager The session manager to use to download images. + @param downloadPrioritization The download prioritization of the download queue. + @param maximumActiveDownloads The maximum number of active downloads allowed at any given time. Recommend `4`. + @param imageCache The image cache used to store all downloaded images in. + + @return The new `AFImageDownloader` instance. + */ +- (instancetype)initWithSessionManager:(AFHTTPSessionManager *)sessionManager + downloadPrioritization:(AFImageDownloadPrioritization)downloadPrioritization + maximumActiveDownloads:(NSInteger)maximumActiveDownloads + imageCache:(nullable id )imageCache; + +/** + Creates a data task using the `sessionManager` instance for the specified URL request. + + If the same data task is already in the queue or currently being downloaded, the success and failure blocks are + appended to the already existing task. Once the task completes, all success or failure blocks attached to the + task are executed in the order they were added. + + @param request The URL request. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + + @return The image download receipt for the data task if available. `nil` if the image is stored in the cache. + cache and the URL request cache policy allows the cache to be used. + */ +- (nullable AFImageDownloadReceipt *)downloadImageForURLRequest:(NSURLRequest *)request + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *responseObject))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; + +/** + Creates a data task using the `sessionManager` instance for the specified URL request. + + If the same data task is already in the queue or currently being downloaded, the success and failure blocks are + appended to the already existing task. Once the task completes, all success or failure blocks attached to the + task are executed in the order they were added. + + @param request The URL request. + @param request The identifier to use for the download receipt that will be created for this request. This must be a unique identifier that does not represent any other request. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + + @return The image download receipt for the data task if available. `nil` if the image is stored in the cache. + cache and the URL request cache policy allows the cache to be used. + */ +- (nullable AFImageDownloadReceipt *)downloadImageForURLRequest:(NSURLRequest *)request + withReceiptID:(NSUUID *)receiptID + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *responseObject))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; + +/** + Cancels the data task in the receipt by removing the corresponding success and failure blocks and cancelling the data task if necessary. + + If the data task is pending in the queue, it will be cancelled if no other success and failure blocks are registered with the data task. If the data task is currently executing or is already completed, the success and failure blocks are removed and will not be called when the task finishes. + + @param imageDownloadReceipt The image download receipt to cancel. + */ +- (void)cancelTaskForImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt; + +@end + +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/AFNetworking/UIKit+AFNetworking/AFImageDownloader.m b/Pods/AFNetworking/UIKit+AFNetworking/AFImageDownloader.m new file mode 100644 index 0000000..e87082a --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/AFImageDownloader.m @@ -0,0 +1,369 @@ +// AFImageDownloader.m +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// 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. + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import "AFImageDownloader.h" +#import "AFHTTPSessionManager.h" + +@interface AFImageDownloaderResponseHandler : NSObject +@property (nonatomic, strong) NSUUID *uuid; +@property (nonatomic, copy) void (^successBlock)(NSURLRequest*, NSHTTPURLResponse*, UIImage*); +@property (nonatomic, copy) void (^failureBlock)(NSURLRequest*, NSHTTPURLResponse*, NSError*); +@end + +@implementation AFImageDownloaderResponseHandler + +- (instancetype)initWithUUID:(NSUUID *)uuid + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *responseObject))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure { + if (self = [self init]) { + self.uuid = uuid; + self.successBlock = success; + self.failureBlock = failure; + } + return self; +} + +- (NSString *)description { + return [NSString stringWithFormat: @"UUID: %@", [self.uuid UUIDString]]; +} + +@end + +@interface AFImageDownloaderMergedTask : NSObject +@property (nonatomic, strong) NSString *identifier; +@property (nonatomic, strong) NSURLSessionDataTask *task; +@property (nonatomic, strong) NSMutableArray *responseHandlers; + +@end + +@implementation AFImageDownloaderMergedTask + +- (instancetype)initWithIdentifier:(NSString *)identifier task:(NSURLSessionDataTask *)task { + if (self = [self init]) { + self.identifier = identifier; + self.task = task; + self.responseHandlers = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)addResponseHandler:(AFImageDownloaderResponseHandler*)handler { + [self.responseHandlers addObject:handler]; +} + +- (void)removeResponseHandler:(AFImageDownloaderResponseHandler*)handler { + [self.responseHandlers removeObject:handler]; +} + +@end + +@implementation AFImageDownloadReceipt + +- (instancetype)initWithReceiptID:(NSUUID *)receiptID task:(NSURLSessionDataTask *)task { + if (self = [self init]) { + self.receiptID = receiptID; + self.task = task; + } + return self; +} + +@end + +@interface AFImageDownloader () + +@property (nonatomic, strong) dispatch_queue_t synchronizationQueue; +@property (nonatomic, strong) dispatch_queue_t responseQueue; + +@property (nonatomic, assign) NSInteger maximumActiveDownloads; +@property (nonatomic, assign) NSInteger activeRequestCount; + +@property (nonatomic, strong) NSMutableArray *queuedMergedTasks; +@property (nonatomic, strong) NSMutableDictionary *mergedTasks; + +@end + + +@implementation AFImageDownloader + ++ (NSURLCache *)defaultURLCache { + return [[NSURLCache alloc] initWithMemoryCapacity:20 * 1024 * 1024 + diskCapacity:150 * 1024 * 1024 + diskPath:@"com.alamofire.imagedownloader"]; +} + ++ (NSURLSessionConfiguration *)defaultURLSessionConfiguration { + NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; + + //TODO set the default HTTP headers + + configuration.HTTPShouldSetCookies = YES; + configuration.HTTPShouldUsePipelining = NO; + + configuration.requestCachePolicy = NSURLRequestUseProtocolCachePolicy; + configuration.allowsCellularAccess = YES; + configuration.timeoutIntervalForRequest = 60.0; + configuration.URLCache = [AFImageDownloader defaultURLCache]; + + return configuration; +} + +- (instancetype)init { + NSURLSessionConfiguration *defaultConfiguration = [self.class defaultURLSessionConfiguration]; + AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:defaultConfiguration]; + sessionManager.responseSerializer = [AFImageResponseSerializer serializer]; + + return [self initWithSessionManager:sessionManager + downloadPrioritization:AFImageDownloadPrioritizationFIFO + maximumActiveDownloads:4 + imageCache:[[AFAutoPurgingImageCache alloc] init]]; +} + +- (instancetype)initWithSessionManager:(AFHTTPSessionManager *)sessionManager + downloadPrioritization:(AFImageDownloadPrioritization)downloadPrioritization + maximumActiveDownloads:(NSInteger)maximumActiveDownloads + imageCache:(id )imageCache { + if (self = [super init]) { + self.sessionManager = sessionManager; + + self.downloadPrioritizaton = downloadPrioritization; + self.maximumActiveDownloads = maximumActiveDownloads; + self.imageCache = imageCache; + + self.queuedMergedTasks = [[NSMutableArray alloc] init]; + self.mergedTasks = [[NSMutableDictionary alloc] init]; + self.activeRequestCount = 0; + + NSString *name = [NSString stringWithFormat:@"com.alamofire.imagedownloader.synchronizationqueue-%@", [[NSUUID UUID] UUIDString]]; + self.synchronizationQueue = dispatch_queue_create([name cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_SERIAL); + + name = [NSString stringWithFormat:@"com.alamofire.imagedownloader.responsequeue-%@", [[NSUUID UUID] UUIDString]]; + self.responseQueue = dispatch_queue_create([name cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_CONCURRENT); + } + + return self; +} + ++ (instancetype)defaultInstance { + static AFImageDownloader *sharedInstance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedInstance = [[self alloc] init]; + }); + return sharedInstance; +} + +- (nullable AFImageDownloadReceipt *)downloadImageForURLRequest:(NSURLRequest *)request + success:(void (^)(NSURLRequest * _Nonnull, NSHTTPURLResponse * _Nullable, UIImage * _Nonnull))success + failure:(void (^)(NSURLRequest * _Nonnull, NSHTTPURLResponse * _Nullable, NSError * _Nonnull))failure { + return [self downloadImageForURLRequest:request withReceiptID:[NSUUID UUID] success:success failure:failure]; +} + +- (nullable AFImageDownloadReceipt *)downloadImageForURLRequest:(NSURLRequest *)request + withReceiptID:(nonnull NSUUID *)receiptID + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *responseObject))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure { + __block NSURLSessionDataTask *task = nil; + dispatch_sync(self.synchronizationQueue, ^{ + NSString *identifier = request.URL.absoluteString; + + // 1) Append the success and failure blocks to a pre-existing request if it already exists + AFImageDownloaderMergedTask *existingMergedTask = self.mergedTasks[identifier]; + if (existingMergedTask != nil) { + AFImageDownloaderResponseHandler *handler = [[AFImageDownloaderResponseHandler alloc] initWithUUID:receiptID success:success failure:failure]; + [existingMergedTask addResponseHandler:handler]; + task = existingMergedTask.task; + return; + } + + // 2) Attempt to load the image from the image cache if the cache policy allows it + switch (request.cachePolicy) { + case NSURLRequestUseProtocolCachePolicy: + case NSURLRequestReturnCacheDataElseLoad: + case NSURLRequestReturnCacheDataDontLoad: { + UIImage *cachedImage = [self.imageCache imageforRequest:request withAdditionalIdentifier:nil]; + if (cachedImage != nil) { + if (success) { + dispatch_async(dispatch_get_main_queue(), ^{ + success(request, nil, cachedImage); + }); + } + return; + } + break; + } + default: + break; + } + + // 3) Create the request and set up authentication, validation and response serialization + NSURLSessionDataTask *createdTask; + __weak __typeof__(self) weakSelf = self; + + createdTask = [self.sessionManager + dataTaskWithRequest:request + completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { + dispatch_async(self.responseQueue, ^{ + __strong __typeof__(weakSelf) strongSelf = weakSelf; + AFImageDownloaderMergedTask *mergedTask = [strongSelf safelyRemoveMergedTaskWithIdentifier:identifier]; + if (error) { + for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) { + if (handler.failureBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + handler.failureBlock(request, (NSHTTPURLResponse*)response, error); + }); + } + } + } else { + [strongSelf.imageCache addImage:responseObject forRequest:request withAdditionalIdentifier:nil]; + + for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) { + if (handler.successBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + handler.successBlock(request, (NSHTTPURLResponse*)response, responseObject); + }); + } + } + + } + [strongSelf safelyDecrementActiveTaskCount]; + [strongSelf safelyStartNextTaskIfNecessary]; + }); + }]; + + // 4) Store the response handler for use when the request completes + AFImageDownloaderResponseHandler *handler = [[AFImageDownloaderResponseHandler alloc] initWithUUID:receiptID + success:success + failure:failure]; + AFImageDownloaderMergedTask *mergedTask = [[AFImageDownloaderMergedTask alloc] + initWithIdentifier:identifier + task:createdTask]; + [mergedTask addResponseHandler:handler]; + self.mergedTasks[identifier] = mergedTask; + + // 5) Either start the request or enqueue it depending on the current active request count + if ([self isActiveRequestCountBelowMaximumLimit]) { + [self startMergedTask:mergedTask]; + } else { + [self enqueueMergedTask:mergedTask]; + } + + task = mergedTask.task; + }); + if (task) { + return [[AFImageDownloadReceipt alloc] initWithReceiptID:receiptID task:task]; + } else { + return nil; + } +} + +- (void)cancelTaskForImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt { + dispatch_sync(self.synchronizationQueue, ^{ + NSString *identifier = imageDownloadReceipt.task.originalRequest.URL.absoluteString; + AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[identifier]; + NSUInteger index = [mergedTask.responseHandlers indexOfObjectPassingTest:^BOOL(AFImageDownloaderResponseHandler * _Nonnull handler, __unused NSUInteger idx, __unused BOOL * _Nonnull stop) { + return handler.uuid == imageDownloadReceipt.receiptID; + }]; + + if (index != NSNotFound) { + AFImageDownloaderResponseHandler *handler = mergedTask.responseHandlers[index]; + [mergedTask removeResponseHandler:handler]; + NSString *failureReason = [NSString stringWithFormat:@"ImageDownloader cancelled URL request: %@",imageDownloadReceipt.task.originalRequest.URL.absoluteString]; + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey:failureReason}; + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:userInfo]; + if (handler.failureBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + handler.failureBlock(imageDownloadReceipt.task.originalRequest, nil, error); + }); + } + } + + if (mergedTask.responseHandlers.count == 0 && mergedTask.task.state == NSURLSessionTaskStateSuspended) { + [mergedTask.task cancel]; + } + }); +} + +- (AFImageDownloaderMergedTask*)safelyRemoveMergedTaskWithIdentifier:(NSString *)identifier { + __block AFImageDownloaderMergedTask *mergedTask = nil; + dispatch_sync(self.synchronizationQueue, ^{ + mergedTask = self.mergedTasks[identifier]; + [self.mergedTasks removeObjectForKey:identifier]; + + }); + return mergedTask; +} + +- (void)safelyDecrementActiveTaskCount { + dispatch_sync(self.synchronizationQueue, ^{ + if (self.activeRequestCount > 0) { + self.activeRequestCount -= 1; + } + }); +} + +- (void)safelyStartNextTaskIfNecessary { + dispatch_sync(self.synchronizationQueue, ^{ + if ([self isActiveRequestCountBelowMaximumLimit]) { + while (self.queuedMergedTasks.count > 0) { + AFImageDownloaderMergedTask *mergedTask = [self dequeueMergedTask]; + if (mergedTask.task.state == NSURLSessionTaskStateSuspended) { + [self startMergedTask:mergedTask]; + break; + } + } + } + }); +} + +- (void)startMergedTask:(AFImageDownloaderMergedTask *)mergedTask { + [mergedTask.task resume]; + ++self.activeRequestCount; +} + +- (void)enqueueMergedTask:(AFImageDownloaderMergedTask *)mergedTask { + switch (self.downloadPrioritizaton) { + case AFImageDownloadPrioritizationFIFO: + [self.queuedMergedTasks addObject:mergedTask]; + break; + case AFImageDownloadPrioritizationLIFO: + [self.queuedMergedTasks insertObject:mergedTask atIndex:0]; + break; + } +} + +- (AFImageDownloaderMergedTask *)dequeueMergedTask { + AFImageDownloaderMergedTask *mergedTask = nil; + mergedTask = [self.queuedMergedTasks firstObject]; + [self.queuedMergedTasks removeObject:mergedTask]; + return mergedTask; +} + +- (BOOL)isActiveRequestCountBelowMaximumLimit { + return self.activeRequestCount < self.maximumActiveDownloads; +} + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h b/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h index 8242035..a627a6d 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h +++ b/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h @@ -21,14 +21,16 @@ #import -#import +#import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS #import +NS_ASSUME_NONNULL_BEGIN + /** - `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero. + `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a session task has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero. You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code: @@ -39,6 +41,7 @@ See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information: http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44 */ +NS_EXTENSION_UNAVAILABLE_IOS("Use view controller based solutions where appropriate instead.") @interface AFNetworkActivityIndicatorManager : NSObject /** @@ -49,9 +52,25 @@ @property (nonatomic, assign, getter = isEnabled) BOOL enabled; /** - A Boolean value indicating whether the network activity indicator is currently displayed in the status bar. + A Boolean value indicating whether the network activity indicator manager is currently active. +*/ +@property (readonly, nonatomic, assign, getter=isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; + +/** + A time interval indicating the minimum duration of networking activity that should occur before the activity indicator is displayed. The default value 1 second. If the network activity indicator should be displayed immediately when network activity occurs, this value should be set to 0 seconds. + + Apple's HIG describes the following: + + > Display the network activity indicator to provide feedback when your app accesses the network for more than a couple of seconds. If the operation finishes sooner than that, you don’t have to show the network activity indicator, because the indicator is likely to disappear before users notice its presence. + + */ +@property (nonatomic, assign) NSTimeInterval activationDelay; + +/** + A time interval indicating the duration of time of no networking activity required before the activity indicator is disabled. This allows for continuous display of the network activity indicator across multiple requests. The default value is 0.17 seconds. */ -@property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible; + +@property (nonatomic, assign) NSTimeInterval completionDelay; /** Returns the shared network activity indicator manager object for the system. @@ -70,6 +89,15 @@ */ - (void)decrementActivityCount; +/** + Set the a custom method to be executed when the network activity indicator manager should be hidden/shown. By default, this is null, and the UIApplication Network Activity Indicator will be managed automatically. If this block is set, it is the responsiblity of the caller to manager the network activity indicator going forward. + + @param block A block to be executed when the network activity indicator status changes. + */ +- (void)setNetworkingActivityActionWithBlock:(nullable void (^)(BOOL networkActivityIndicatorVisible))block; + @end +NS_ASSUME_NONNULL_END + #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m b/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m index 82c6cc3..0615fa9 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m +++ b/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m @@ -21,41 +21,42 @@ #import "AFNetworkActivityIndicatorManager.h" -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) - -#import "AFHTTPRequestOperation.h" - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 +#if TARGET_OS_IOS #import "AFURLSessionManager.h" -#endif -static NSTimeInterval const kAFNetworkActivityIndicatorInvisibilityDelay = 0.17; +typedef NS_ENUM(NSInteger, AFNetworkActivityManagerState) { + AFNetworkActivityManagerStateNotActive, + AFNetworkActivityManagerStateDelayingStart, + AFNetworkActivityManagerStateActive, + AFNetworkActivityManagerStateDelayingEnd +}; -static NSURLRequest * AFNetworkRequestFromNotification(NSNotification *notification) { - if ([[notification object] isKindOfClass:[AFURLConnectionOperation class]]) { - return [(AFURLConnectionOperation *)[notification object] request]; - } +static NSTimeInterval const kDefaultAFNetworkActivityManagerActivationDelay = 1.0; +static NSTimeInterval const kDefaultAFNetworkActivityManagerCompletionDelay = 0.17; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 +static NSURLRequest * AFNetworkRequestFromNotification(NSNotification *notification) { if ([[notification object] respondsToSelector:@selector(originalRequest)]) { return [(NSURLSessionTask *)[notification object] originalRequest]; + } else { + return nil; } -#endif - - return nil; } +typedef void (^AFNetworkActivityActionBlock)(BOOL networkActivityIndicatorVisible); + @interface AFNetworkActivityIndicatorManager () @property (readwrite, nonatomic, assign) NSInteger activityCount; -@property (readwrite, nonatomic, strong) NSTimer *activityIndicatorVisibilityTimer; -@property (readonly, nonatomic, getter = isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; - -- (void)updateNetworkActivityIndicatorVisibility; -- (void)updateNetworkActivityIndicatorVisibilityDelayed; +@property (readwrite, nonatomic, strong) NSTimer *activationDelayTimer; +@property (readwrite, nonatomic, strong) NSTimer *completionDelayTimer; +@property (readonly, nonatomic, getter = isNetworkActivityOccurring) BOOL networkActivityOccurring; +@property (nonatomic, copy) AFNetworkActivityActionBlock networkActivityActionBlock; +@property (nonatomic, assign) AFNetworkActivityManagerState currentState; +@property (nonatomic, assign, getter=isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; + +- (void)updateCurrentStateForNetworkActivityChange; @end @implementation AFNetworkActivityIndicatorManager -@dynamic networkActivityIndicatorVisible; + (instancetype)sharedManager { static AFNetworkActivityIndicatorManager *_sharedManager = nil; @@ -67,24 +68,17 @@ + (instancetype)sharedManager { return _sharedManager; } -+ (NSSet *)keyPathsForValuesAffectingIsNetworkActivityIndicatorVisible { - return [NSSet setWithObject:@"activityCount"]; -} - -- (id)init { +- (instancetype)init { self = [super init]; if (!self) { return nil; } - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingOperationDidStartNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingOperationDidFinishNotification object:nil]; - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 + self.currentState = AFNetworkActivityManagerStateNotActive; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingTaskDidResumeNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidSuspendNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidCompleteNotification object:nil]; -#endif + self.activationDelay = kDefaultAFNetworkActivityManagerActivationDelay; + self.completionDelay = kDefaultAFNetworkActivityManagerCompletionDelay; return self; } @@ -92,30 +86,40 @@ - (id)init { - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - [_activityIndicatorVisibilityTimer invalidate]; + [_activationDelayTimer invalidate]; + [_completionDelayTimer invalidate]; } -- (void)updateNetworkActivityIndicatorVisibilityDelayed { - if (self.enabled) { - // Delay hiding of activity indicator for a short interval, to avoid flickering - if (![self isNetworkActivityIndicatorVisible]) { - [self.activityIndicatorVisibilityTimer invalidate]; - self.activityIndicatorVisibilityTimer = [NSTimer timerWithTimeInterval:kAFNetworkActivityIndicatorInvisibilityDelay target:self selector:@selector(updateNetworkActivityIndicatorVisibility) userInfo:nil repeats:NO]; - [[NSRunLoop mainRunLoop] addTimer:self.activityIndicatorVisibilityTimer forMode:NSRunLoopCommonModes]; - } else { - [self performSelectorOnMainThread:@selector(updateNetworkActivityIndicatorVisibility) withObject:nil waitUntilDone:NO modes:@[NSRunLoopCommonModes]]; - } +- (void)setEnabled:(BOOL)enabled { + _enabled = enabled; + if (enabled == NO) { + [self setCurrentState:AFNetworkActivityManagerStateNotActive]; } } -- (BOOL)isNetworkActivityIndicatorVisible { - return self.activityCount > 0; +- (void)setNetworkingActivityActionWithBlock:(void (^)(BOOL networkActivityIndicatorVisible))block { + self.networkActivityActionBlock = block; } -- (void)updateNetworkActivityIndicatorVisibility { -#if !defined(AF_APP_EXTENSIONS) - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:[self isNetworkActivityIndicatorVisible]]; -#endif +- (BOOL)isNetworkActivityOccurring { + @synchronized(self) { + return self.activityCount > 0; + } +} + +- (void)setNetworkActivityIndicatorVisible:(BOOL)networkActivityIndicatorVisible { + if (_networkActivityIndicatorVisible != networkActivityIndicatorVisible) { + [self willChangeValueForKey:@"networkActivityIndicatorVisible"]; + @synchronized(self) { + _networkActivityIndicatorVisible = networkActivityIndicatorVisible; + } + [self didChangeValueForKey:@"networkActivityIndicatorVisible"]; + if (self.networkActivityActionBlock) { + self.networkActivityActionBlock(networkActivityIndicatorVisible); + } else { + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:networkActivityIndicatorVisible]; + } + } } - (void)setActivityCount:(NSInteger)activityCount { @@ -124,7 +128,7 @@ - (void)setActivityCount:(NSInteger)activityCount { } dispatch_async(dispatch_get_main_queue(), ^{ - [self updateNetworkActivityIndicatorVisibilityDelayed]; + [self updateCurrentStateForNetworkActivityChange]; }); } @@ -136,7 +140,7 @@ - (void)incrementActivityCount { [self didChangeValueForKey:@"activityCount"]; dispatch_async(dispatch_get_main_queue(), ^{ - [self updateNetworkActivityIndicatorVisibilityDelayed]; + [self updateCurrentStateForNetworkActivityChange]; }); } @@ -151,7 +155,7 @@ - (void)decrementActivityCount { [self didChangeValueForKey:@"activityCount"]; dispatch_async(dispatch_get_main_queue(), ^{ - [self updateNetworkActivityIndicatorVisibilityDelayed]; + [self updateCurrentStateForNetworkActivityChange]; }); } @@ -167,6 +171,91 @@ - (void)networkRequestDidFinish:(NSNotification *)notification { } } +#pragma mark - Internal State Management +- (void)setCurrentState:(AFNetworkActivityManagerState)currentState { + @synchronized(self) { + if (_currentState != currentState) { + [self willChangeValueForKey:@"currentState"]; + _currentState = currentState; + switch (currentState) { + case AFNetworkActivityManagerStateNotActive: + [self cancelActivationDelayTimer]; + [self cancelCompletionDelayTimer]; + [self setNetworkActivityIndicatorVisible:NO]; + break; + case AFNetworkActivityManagerStateDelayingStart: + [self startActivationDelayTimer]; + break; + case AFNetworkActivityManagerStateActive: + [self cancelCompletionDelayTimer]; + [self setNetworkActivityIndicatorVisible:YES]; + break; + case AFNetworkActivityManagerStateDelayingEnd: + [self startCompletionDelayTimer]; + break; + } + } + [self didChangeValueForKey:@"currentState"]; + } +} + +- (void)updateCurrentStateForNetworkActivityChange { + if (self.enabled) { + switch (self.currentState) { + case AFNetworkActivityManagerStateNotActive: + if (self.isNetworkActivityOccurring) { + [self setCurrentState:AFNetworkActivityManagerStateDelayingStart]; + } + break; + case AFNetworkActivityManagerStateDelayingStart: + //No op. Let the delay timer finish out. + break; + case AFNetworkActivityManagerStateActive: + if (!self.isNetworkActivityOccurring) { + [self setCurrentState:AFNetworkActivityManagerStateDelayingEnd]; + } + break; + case AFNetworkActivityManagerStateDelayingEnd: + if (self.isNetworkActivityOccurring) { + [self setCurrentState:AFNetworkActivityManagerStateActive]; + } + break; + } + } +} + +- (void)startActivationDelayTimer { + self.activationDelayTimer = [NSTimer + timerWithTimeInterval:self.activationDelay target:self selector:@selector(activationDelayTimerFired) userInfo:nil repeats:NO]; + [[NSRunLoop mainRunLoop] addTimer:self.activationDelayTimer forMode:NSRunLoopCommonModes]; +} + +- (void)activationDelayTimerFired { + if (self.networkActivityOccurring) { + [self setCurrentState:AFNetworkActivityManagerStateActive]; + } else { + [self setCurrentState:AFNetworkActivityManagerStateNotActive]; + } +} + +- (void)startCompletionDelayTimer { + [self.completionDelayTimer invalidate]; + self.completionDelayTimer = [NSTimer timerWithTimeInterval:self.completionDelay target:self selector:@selector(completionDelayTimerFired) userInfo:nil repeats:NO]; + [[NSRunLoop mainRunLoop] addTimer:self.completionDelayTimer forMode:NSRunLoopCommonModes]; +} + +- (void)completionDelayTimerFired { + [self setCurrentState:AFNetworkActivityManagerStateNotActive]; +} + +- (void)cancelActivationDelayTimer { + [self.activationDelayTimer invalidate]; +} + +- (void)cancelCompletionDelayTimer { + [self.completionDelayTimer invalidate]; +} + @end #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h index 06e89c4..b6ef044 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h @@ -21,16 +21,14 @@ #import -#import +#import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV #import -@class AFURLConnectionOperation; - /** - This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a request operation or session task. + This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a session task. */ @interface UIActivityIndicatorView (AFNetworking) @@ -43,20 +41,7 @@ @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 -- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; -#endif - -///--------------------------------------- -/// @name Animating for Request Operations -///--------------------------------------- - -/** - Binds the animating state to the execution state of the specified operation. - - @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. - */ -- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation; +- (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task; @end diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m index 1a36091..fcf1c0c 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m @@ -20,32 +20,67 @@ // THE SOFTWARE. #import "UIActivityIndicatorView+AFNetworking.h" +#import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV -#import "AFHTTPRequestOperation.h" - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 #import "AFURLSessionManager.h" -#endif + +@interface AFActivityIndicatorViewNotificationObserver : NSObject +@property (readonly, nonatomic, weak) UIActivityIndicatorView *activityIndicatorView; +- (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView; + +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; + +@end @implementation UIActivityIndicatorView (AFNetworking) -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (AFActivityIndicatorViewNotificationObserver *)af_notificationObserver { + AFActivityIndicatorViewNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); + if (notificationObserver == nil) { + notificationObserver = [[AFActivityIndicatorViewNotificationObserver alloc] initWithActivityIndicatorView:self]; + objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return notificationObserver; +} + +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { + [[self af_notificationObserver] setAnimatingWithStateOfTask:task]; +} + +@end + +@implementation AFActivityIndicatorViewNotificationObserver + +- (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView +{ + self = [super init]; + if (self) { + _activityIndicatorView = activityIndicatorView; + } + return self; +} + - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; - + if (task) { if (task.state != NSURLSessionTaskStateCompleted) { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" +#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" if (task.state == NSURLSessionTaskStateRunning) { - [self startAnimating]; + [self.activityIndicatorView startAnimating]; } else { - [self stopAnimating]; + [self.activityIndicatorView stopAnimating]; } +#pragma clang diagnostic pop [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task]; [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task]; @@ -53,44 +88,37 @@ - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { } } } -#endif - -#pragma mark - - -- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation { - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - - [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; - [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; - - if (operation) { - if (![operation isFinished]) { - if ([operation isExecuting]) { - [self startAnimating]; - } else { - [self stopAnimating]; - } - - [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingOperationDidStartNotification object:operation]; - [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingOperationDidFinishNotification object:operation]; - } - } -} #pragma mark - - (void)af_startAnimating { dispatch_async(dispatch_get_main_queue(), ^{ - [self startAnimating]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" + [self.activityIndicatorView startAnimating]; +#pragma clang diagnostic pop }); } - (void)af_stopAnimating { dispatch_async(dispatch_get_main_queue(), ^{ - [self stopAnimating]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" + [self.activityIndicatorView stopAnimating]; +#pragma clang diagnostic pop }); } +#pragma mark - + +- (void)dealloc { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; +} + @end #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h deleted file mode 100644 index 80eddc1..0000000 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h +++ /dev/null @@ -1,95 +0,0 @@ -// UIAlertView+AFNetworking.h -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -#import - -#import - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) - -#import - -@class AFURLConnectionOperation; - -/** - This category adds methods to the UIKit framework's `UIAlertView` class. The methods in this category provide support for automatically showing an alert if a session task or request operation finishes with an error. Alert title and message are filled from the corresponding `localizedDescription` & `localizedRecoverySuggestion` or `localizedFailureReason` of the error. - */ -@interface UIAlertView (AFNetworking) - -///------------------------------------- -/// @name Showing Alert for Session Task -///------------------------------------- - -/** - Shows an alert view with the error of the specified session task, if any. - - @param task The session task. - @param delegate The alert view delegate. - */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 -+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task - delegate:(id)delegate; -#endif - -/** - Shows an alert view with the error of the specified session task, if any, with a custom cancel button title and other button titles. - - @param task The session task. - @param delegate The alert view delegate. - @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title. - @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see "Temporary Views". Titles of additional buttons to add to the receiver, terminated with `nil`. - */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 -+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task - delegate:(id)delegate - cancelButtonTitle:(NSString *)cancelButtonTitle - otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION; -#endif - -///------------------------------------------ -/// @name Showing Alert for Request Operation -///------------------------------------------ - -/** - Shows an alert view with the error of the specified request operation, if any. - - @param operation The request operation. - @param delegate The alert view delegate. - */ -+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation - delegate:(id)delegate; - -/** - Shows an alert view with the error of the specified request operation, if any, with a custom cancel button title and other button titles. - - @param operation The request operation. - @param delegate The alert view delegate. - @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title. - @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see "Temporary Views". Titles of additional buttons to add to the receiver, terminated with `nil`. - */ -+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation - delegate:(id)delegate - cancelButtonTitle:(NSString *)cancelButtonTitle - otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION; - -@end - -#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m deleted file mode 100644 index a128544..0000000 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m +++ /dev/null @@ -1,141 +0,0 @@ -// UIAlertView+AFNetworking.m -// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. - -#import "UIAlertView+AFNetworking.h" - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) - -#import "AFURLConnectionOperation.h" - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 -#import "AFURLSessionManager.h" -#endif - -static void AFGetAlertViewTitleAndMessageFromError(NSError *error, NSString * __autoreleasing *title, NSString * __autoreleasing *message) { - if (error.localizedDescription && (error.localizedRecoverySuggestion || error.localizedFailureReason)) { - *title = error.localizedDescription; - - if (error.localizedRecoverySuggestion) { - *message = error.localizedRecoverySuggestion; - } else { - *message = error.localizedFailureReason; - } - } else if (error.localizedDescription) { - *title = NSLocalizedStringFromTable(@"Error", @"AFNetworking", @"Fallback Error Description"); - *message = error.localizedDescription; - } else { - *title = NSLocalizedStringFromTable(@"Error", @"AFNetworking", @"Fallback Error Description"); - *message = [NSString stringWithFormat:NSLocalizedStringFromTable(@"%@ Error: %ld", @"AFNetworking", @"Fallback Error Failure Reason Format"), error.domain, (long)error.code]; - } -} - -@implementation UIAlertView (AFNetworking) - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 -+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task - delegate:(id)delegate -{ - [self showAlertViewForTaskWithErrorOnCompletion:task delegate:delegate cancelButtonTitle:NSLocalizedStringFromTable(@"Dismiss", @"AFNetworking", @"UIAlertView Cancel Button Title") otherButtonTitles:nil, nil]; -} - -+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task - delegate:(id)delegate - cancelButtonTitle:(NSString *)cancelButtonTitle - otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION -{ - NSMutableArray *mutableOtherTitles = [NSMutableArray array]; - va_list otherButtonTitleList; - va_start(otherButtonTitleList, otherButtonTitles); - { - for (NSString *otherButtonTitle = otherButtonTitles; otherButtonTitle != nil; otherButtonTitle = va_arg(otherButtonTitleList, NSString *)) { - [mutableOtherTitles addObject:otherButtonTitle]; - } - } - va_end(otherButtonTitleList); - - __block __weak id observer = [[NSNotificationCenter defaultCenter] addObserverForName:AFNetworkingTaskDidCompleteNotification object:task queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { - NSError *error = notification.userInfo[AFNetworkingTaskDidCompleteErrorKey]; - if (error) { - NSString *title, *message; - AFGetAlertViewTitleAndMessageFromError(error, &title, &message); - - UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:nil delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil]; - for (NSString *otherButtonTitle in mutableOtherTitles) { - [alertView addButtonWithTitle:otherButtonTitle]; - } - [alertView setTitle:title]; - [alertView setMessage:message]; - [alertView show]; - } - - [[NSNotificationCenter defaultCenter] removeObserver:observer]; - }]; -} -#endif - -#pragma mark - - -+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation - delegate:(id)delegate -{ - [self showAlertViewForRequestOperationWithErrorOnCompletion:operation delegate:delegate cancelButtonTitle:NSLocalizedStringFromTable(@"Dismiss", @"AFNetworking", @"UIAlertView Cancel Button Title") otherButtonTitles:nil, nil]; -} - -+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation - delegate:(id)delegate - cancelButtonTitle:(NSString *)cancelButtonTitle - otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION -{ - NSMutableArray *mutableOtherTitles = [NSMutableArray array]; - va_list otherButtonTitleList; - va_start(otherButtonTitleList, otherButtonTitles); - { - for (NSString *otherButtonTitle = otherButtonTitles; otherButtonTitle != nil; otherButtonTitle = va_arg(otherButtonTitleList, NSString *)) { - [mutableOtherTitles addObject:otherButtonTitle]; - } - } - va_end(otherButtonTitleList); - - __block __weak id observer = [[NSNotificationCenter defaultCenter] addObserverForName:AFNetworkingOperationDidFinishNotification object:operation queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { - - if (notification.object && [notification.object isKindOfClass:[AFURLConnectionOperation class]]) { - NSError *error = [(AFURLConnectionOperation *)notification.object error]; - if (error) { - NSString *title, *message; - AFGetAlertViewTitleAndMessageFromError(error, &title, &message); - - UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:nil delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil]; - for (NSString *otherButtonTitle in mutableOtherTitles) { - [alertView addButtonWithTitle:otherButtonTitle]; - } - [alertView setTitle:title]; - [alertView setMessage:message]; - [alertView show]; - } - } - - [[NSNotificationCenter defaultCenter] removeObserver:observer]; - }]; -} - -@end - -#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h index 6c09b7a..98b911e 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h @@ -21,13 +21,15 @@ #import -#import +#import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV #import -@protocol AFURLResponseSerialization, AFImageCache; +NS_ASSUME_NONNULL_BEGIN + +@class AFImageDownloader; /** This category adds methods to the UIKit framework's `UIButton` class. The methods in this category provide support for loading remote images and background images asynchronously from a URL. @@ -36,32 +38,21 @@ */ @interface UIButton (AFNetworking) -///---------------------------- -/// @name Accessing Image Cache -///---------------------------- - -/** - The image cache used to improve image loadiing performance on scroll views. By default, `UIButton` will use the `sharedImageCache` of `UIImageView`. - */ -+ (id )sharedImageCache; - -/** - Set the cache used for image loading. - - @param imageCache The image cache. - */ -+ (void)setSharedImageCache:(id )imageCache; - ///------------------------------------ -/// @name Accessing Response Serializer +/// @name Accessing the Image Downloader ///------------------------------------ /** - The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`. + Set the shared image downloader used to download images. - @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer + @param imageDownloader The shared image downloader used to download images. +*/ ++ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader; + +/** + The shared image downloader used to download images. */ -@property (nonatomic, strong) id imageResponseSerializer; ++ (AFImageDownloader *)sharedImageDownloader; ///-------------------- /// @name Setting Image @@ -89,7 +80,7 @@ */ - (void)setImageForState:(UIControlState)state withURL:(NSURL *)url - placeholderImage:(UIImage *)placeholderImage; + placeholderImage:(nullable UIImage *)placeholderImage; /** Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. @@ -101,14 +92,14 @@ @param state The control state. @param urlRequest The URL request used for the image request. @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes. - @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes two arguments: the server response and the image. If the image was returned from cache, the request and response parameters will be `nil`. - @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes a single argument: the error that occurred. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. */ - (void)setImageForState:(UIControlState)state withURLRequest:(NSURLRequest *)urlRequest - placeholderImage:(UIImage *)placeholderImage - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSError *error))failure; + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; ///------------------------------- @@ -137,7 +128,7 @@ */ - (void)setBackgroundImageForState:(UIControlState)state withURL:(NSURL *)url - placeholderImage:(UIImage *)placeholderImage; + placeholderImage:(nullable UIImage *)placeholderImage; /** Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. @@ -149,12 +140,14 @@ @param state The control state. @param urlRequest The URL request used for the image request. @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. */ - (void)setBackgroundImageForState:(UIControlState)state withURLRequest:(NSURLRequest *)urlRequest - placeholderImage:(UIImage *)placeholderImage - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSError *error))failure; + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; ///------------------------------ @@ -162,19 +155,21 @@ ///------------------------------ /** - Cancels any executing image operation for the specified control state of the receiver, if one exists. + Cancels any executing image task for the specified control state of the receiver, if one exists. @param state The control state. */ -- (void)cancelImageRequestOperationForState:(UIControlState)state; +- (void)cancelImageDownloadTaskForState:(UIControlState)state; /** - Cancels any executing background image operation for the specified control state of the receiver, if one exists. + Cancels any executing background image task for the specified control state of the receiver, if one exists. @param state The control state. */ -- (void)cancelBackgroundImageRequestOperationForState:(UIControlState)state; +- (void)cancelBackgroundImageDownloadTaskForState:(UIControlState)state; @end +NS_ASSUME_NONNULL_END + #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m index f34631e..ceb6ebc 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m @@ -23,89 +23,76 @@ #import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) - -#import "AFURLResponseSerialization.h" -#import "AFHTTPRequestOperation.h" +#if TARGET_OS_IOS || TARGET_OS_TV #import "UIImageView+AFNetworking.h" +#import "AFImageDownloader.h" @interface UIButton (_AFNetworking) @end @implementation UIButton (_AFNetworking) -+ (NSOperationQueue *)af_sharedImageRequestOperationQueue { - static NSOperationQueue *_af_sharedImageRequestOperationQueue = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _af_sharedImageRequestOperationQueue = [[NSOperationQueue alloc] init]; - _af_sharedImageRequestOperationQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount; - }); - - return _af_sharedImageRequestOperationQueue; -} - #pragma mark - -static char AFImageRequestOperationNormal; -static char AFImageRequestOperationHighlighted; -static char AFImageRequestOperationSelected; -static char AFImageRequestOperationDisabled; +static char AFImageDownloadReceiptNormal; +static char AFImageDownloadReceiptHighlighted; +static char AFImageDownloadReceiptSelected; +static char AFImageDownloadReceiptDisabled; -static const char * af_imageRequestOperationKeyForState(UIControlState state) { +static const char * af_imageDownloadReceiptKeyForState(UIControlState state) { switch (state) { case UIControlStateHighlighted: - return &AFImageRequestOperationHighlighted; + return &AFImageDownloadReceiptHighlighted; case UIControlStateSelected: - return &AFImageRequestOperationSelected; + return &AFImageDownloadReceiptSelected; case UIControlStateDisabled: - return &AFImageRequestOperationDisabled; + return &AFImageDownloadReceiptDisabled; case UIControlStateNormal: default: - return &AFImageRequestOperationNormal; + return &AFImageDownloadReceiptNormal; } } -- (AFHTTPRequestOperation *)af_imageRequestOperationForState:(UIControlState)state { - return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, af_imageRequestOperationKeyForState(state)); +- (AFImageDownloadReceipt *)af_imageDownloadReceiptForState:(UIControlState)state { + return (AFImageDownloadReceipt *)objc_getAssociatedObject(self, af_imageDownloadReceiptKeyForState(state)); } -- (void)af_setImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation +- (void)af_setImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt forState:(UIControlState)state { - objc_setAssociatedObject(self, af_imageRequestOperationKeyForState(state), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + objc_setAssociatedObject(self, af_imageDownloadReceiptKeyForState(state), imageDownloadReceipt, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } #pragma mark - -static char AFBackgroundImageRequestOperationNormal; -static char AFBackgroundImageRequestOperationHighlighted; -static char AFBackgroundImageRequestOperationSelected; -static char AFBackgroundImageRequestOperationDisabled; +static char AFBackgroundImageDownloadReceiptNormal; +static char AFBackgroundImageDownloadReceiptHighlighted; +static char AFBackgroundImageDownloadReceiptSelected; +static char AFBackgroundImageDownloadReceiptDisabled; -static const char * af_backgroundImageRequestOperationKeyForState(UIControlState state) { +static const char * af_backgroundImageDownloadReceiptKeyForState(UIControlState state) { switch (state) { case UIControlStateHighlighted: - return &AFBackgroundImageRequestOperationHighlighted; + return &AFBackgroundImageDownloadReceiptHighlighted; case UIControlStateSelected: - return &AFBackgroundImageRequestOperationSelected; + return &AFBackgroundImageDownloadReceiptSelected; case UIControlStateDisabled: - return &AFBackgroundImageRequestOperationDisabled; + return &AFBackgroundImageDownloadReceiptDisabled; case UIControlStateNormal: default: - return &AFBackgroundImageRequestOperationNormal; + return &AFBackgroundImageDownloadReceiptNormal; } } -- (AFHTTPRequestOperation *)af_backgroundImageRequestOperationForState:(UIControlState)state { - return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, af_backgroundImageRequestOperationKeyForState(state)); +- (AFImageDownloadReceipt *)af_backgroundImageDownloadReceiptForState:(UIControlState)state { + return (AFImageDownloadReceipt *)objc_getAssociatedObject(self, af_backgroundImageDownloadReceiptKeyForState(state)); } -- (void)af_setBackgroundImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation +- (void)af_setBackgroundImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt forState:(UIControlState)state { - objc_setAssociatedObject(self, af_backgroundImageRequestOperationKeyForState(state), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + objc_setAssociatedObject(self, af_backgroundImageDownloadReceiptKeyForState(state), imageDownloadReceipt, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } @end @@ -114,34 +101,16 @@ - (void)af_setBackgroundImageRequestOperation:(AFHTTPRequestOperation *)imageReq @implementation UIButton (AFNetworking) -+ (id )sharedImageCache { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgnu" - return objc_getAssociatedObject(self, @selector(sharedImageCache)) ?: [UIImageView sharedImageCache]; -#pragma clang diagnostic pop -} - -+ (void)setSharedImageCache:(id )imageCache { - objc_setAssociatedObject(self, @selector(sharedImageCache), imageCache, OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -#pragma mark - - -- (id )imageResponseSerializer { - static id _af_defaultImageResponseSerializer = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _af_defaultImageResponseSerializer = [AFImageResponseSerializer serializer]; - }); ++ (AFImageDownloader *)sharedImageDownloader { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgnu" - return objc_getAssociatedObject(self, @selector(imageResponseSerializer)) ?: _af_defaultImageResponseSerializer; + return objc_getAssociatedObject(self, @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance]; #pragma clang diagnostic pop } -- (void)setImageResponseSerializer:(id )serializer { - objc_setAssociatedObject(self, @selector(imageResponseSerializer), serializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); ++ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader { + objc_setAssociatedObject(self, @selector(sharedImageDownloader), imageDownloader, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } #pragma mark - @@ -164,49 +133,62 @@ - (void)setImageForState:(UIControlState)state - (void)setImageForState:(UIControlState)state withURLRequest:(NSURLRequest *)urlRequest - placeholderImage:(UIImage *)placeholderImage - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSError *error))failure + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure { - [self cancelImageRequestOperationForState:state]; + if ([self isActiveTaskURLEqualToURLRequest:urlRequest forState:state]) { + return; + } - UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest]; + [self cancelImageDownloadTaskForState:state]; + + AFImageDownloader *downloader = [[self class] sharedImageDownloader]; + id imageCache = downloader.imageCache; + + //Use the image from the image cache if it exists + UIImage *cachedImage = [imageCache imageforRequest:urlRequest withAdditionalIdentifier:nil]; if (cachedImage) { if (success) { - success(nil, nil, cachedImage); + success(urlRequest, nil, cachedImage); } else { [self setImage:cachedImage forState:state]; } - - [self af_setImageRequestOperation:nil forState:state]; + [self af_setImageDownloadReceipt:nil forState:state]; } else { if (placeholderImage) { [self setImage:placeholderImage forState:state]; } __weak __typeof(self)weakSelf = self; - AFHTTPRequestOperation *imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; - imageRequestOperation.responseSerializer = self.imageResponseSerializer; - [imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if ([[urlRequest URL] isEqual:[operation.request URL]]) { - if (success) { - success(operation.request, operation.response, responseObject); - } else if (responseObject) { - [strongSelf setImage:responseObject forState:state]; - } - } - [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest]; - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if ([[urlRequest URL] isEqual:[operation.request URL]]) { - if (failure) { - failure(error); - } - } - }]; - - [self af_setImageRequestOperation:imageRequestOperation forState:state]; - [[[self class] af_sharedImageRequestOperationQueue] addOperation:imageRequestOperation]; + NSUUID *downloadID = [NSUUID UUID]; + AFImageDownloadReceipt *receipt; + receipt = [downloader + downloadImageForURLRequest:urlRequest + withReceiptID:downloadID + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[strongSelf af_imageDownloadReceiptForState:state].receiptID isEqual:downloadID]) { + if (success) { + success(request, response, responseObject); + } else if(responseObject) { + [strongSelf setImage:responseObject forState:state]; + } + [strongSelf af_setImageDownloadReceipt:nil forState:state]; + } + + } + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[strongSelf af_imageDownloadReceiptForState:state].receiptID isEqual:downloadID]) { + if (failure) { + failure(request, response, error); + } + [strongSelf af_setImageDownloadReceipt:nil forState:state]; + } + }]; + + [self af_setImageDownloadReceipt:receipt forState:state]; } } @@ -220,7 +202,7 @@ - (void)setBackgroundImageForState:(UIControlState)state - (void)setBackgroundImageForState:(UIControlState)state withURL:(NSURL *)url - placeholderImage:(UIImage *)placeholderImage + placeholderImage:(nullable UIImage *)placeholderImage { NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; @@ -230,64 +212,94 @@ - (void)setBackgroundImageForState:(UIControlState)state - (void)setBackgroundImageForState:(UIControlState)state withURLRequest:(NSURLRequest *)urlRequest - placeholderImage:(UIImage *)placeholderImage - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSError *error))failure + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure { - [self cancelBackgroundImageRequestOperationForState:state]; + if ([self isActiveBackgroundTaskURLEqualToURLRequest:urlRequest forState:state]) { + return; + } - UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest]; + [self cancelImageDownloadTaskForState:state]; + + AFImageDownloader *downloader = [[self class] sharedImageDownloader]; + id imageCache = downloader.imageCache; + + //Use the image from the image cache if it exists + UIImage *cachedImage = [imageCache imageforRequest:urlRequest withAdditionalIdentifier:nil]; if (cachedImage) { if (success) { - success(nil, nil, cachedImage); + success(urlRequest, nil, cachedImage); } else { [self setBackgroundImage:cachedImage forState:state]; } - - [self af_setBackgroundImageRequestOperation:nil forState:state]; + [self af_setBackgroundImageDownloadReceipt:nil forState:state]; } else { if (placeholderImage) { [self setBackgroundImage:placeholderImage forState:state]; } __weak __typeof(self)weakSelf = self; - AFHTTPRequestOperation *backgroundImageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; - backgroundImageRequestOperation.responseSerializer = self.imageResponseSerializer; - [backgroundImageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if ([[urlRequest URL] isEqual:[operation.request URL]]) { - if (success) { - success(operation.request, operation.response, responseObject); - } else if (responseObject) { - [strongSelf setBackgroundImage:responseObject forState:state]; - } - } - [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest]; - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if ([[urlRequest URL] isEqual:[operation.request URL]]) { - if (failure) { - failure(error); - } - } - }]; - - [self af_setBackgroundImageRequestOperation:backgroundImageRequestOperation forState:state]; - [[[self class] af_sharedImageRequestOperationQueue] addOperation:backgroundImageRequestOperation]; + NSUUID *downloadID = [NSUUID UUID]; + AFImageDownloadReceipt *receipt; + receipt = [downloader + downloadImageForURLRequest:urlRequest + withReceiptID:downloadID + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[strongSelf af_backgroundImageDownloadReceiptForState:state].receiptID isEqual:downloadID]) { + if (success) { + success(request, response, responseObject); + } else if(responseObject) { + [strongSelf setBackgroundImage:responseObject forState:state]; + } + [strongSelf af_setImageDownloadReceipt:nil forState:state]; + } + + } + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[strongSelf af_backgroundImageDownloadReceiptForState:state].receiptID isEqual:downloadID]) { + if (failure) { + failure(request, response, error); + } + [strongSelf af_setBackgroundImageDownloadReceipt:nil forState:state]; + } + }]; + + [self af_setBackgroundImageDownloadReceipt:receipt forState:state]; } } #pragma mark - -- (void)cancelImageRequestOperationForState:(UIControlState)state { - [[self af_imageRequestOperationForState:state] cancel]; - [self af_setImageRequestOperation:nil forState:state]; +- (void)cancelImageDownloadTaskForState:(UIControlState)state { + AFImageDownloadReceipt *receipt = [self af_imageDownloadReceiptForState:state]; + if (receipt != nil) { + [[self.class sharedImageDownloader] cancelTaskForImageDownloadReceipt:receipt]; + [self af_setImageDownloadReceipt:nil forState:state]; + } +} + +- (void)cancelBackgroundImageDownloadTaskForState:(UIControlState)state { + AFImageDownloadReceipt *receipt = [self af_backgroundImageDownloadReceiptForState:state]; + if (receipt != nil) { + [[self.class sharedImageDownloader] cancelTaskForImageDownloadReceipt:receipt]; + [self af_setBackgroundImageDownloadReceipt:nil forState:state]; + } } -- (void)cancelBackgroundImageRequestOperationForState:(UIControlState)state { - [[self af_backgroundImageRequestOperationForState:state] cancel]; - [self af_setBackgroundImageRequestOperation:nil forState:state]; +- (BOOL)isActiveTaskURLEqualToURLRequest:(NSURLRequest *)urlRequest forState:(UIControlState)state { + AFImageDownloadReceipt *receipt = [self af_imageDownloadReceiptForState:state]; + return [receipt.task.originalRequest.URL.absoluteString isEqualToString:urlRequest.URL.absoluteString]; } +- (BOOL)isActiveBackgroundTaskURLEqualToURLRequest:(NSURLRequest *)urlRequest forState:(UIControlState)state { + AFImageDownloadReceipt *receipt = [self af_backgroundImageDownloadReceiptForState:state]; + return [receipt.task.originalRequest.URL.absoluteString isEqualToString:urlRequest.URL.absoluteString]; +} + + @end #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h new file mode 100644 index 0000000..14744cd --- /dev/null +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h @@ -0,0 +1,35 @@ +// +// UIImage+AFNetworking.h +// +// +// Created by Paulo Ferreira on 08/07/15. +// +// 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. + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +@interface UIImage (AFNetworking) + ++ (UIImage*) safeImageWithData:(NSData*)data; + +@end + +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h index 2fdff9f..ce9ae2e 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h @@ -21,45 +21,36 @@ #import -#import +#import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV #import -@protocol AFURLResponseSerialization, AFImageCache; +NS_ASSUME_NONNULL_BEGIN + +@class AFImageDownloader; /** This category adds methods to the UIKit framework's `UIImageView` class. The methods in this category provide support for loading remote images asynchronously from a URL. */ @interface UIImageView (AFNetworking) -///---------------------------- -/// @name Accessing Image Cache -///---------------------------- - -/** - The image cache used to improve image loading performance on scroll views. By default, this is an `NSCache` subclass conforming to the `AFImageCache` protocol, which listens for notification warnings and evicts objects accordingly. -*/ -+ (id )sharedImageCache; +///------------------------------------ +/// @name Accessing the Image Downloader +///------------------------------------ /** - Set the cache used for image loading. + Set the shared image downloader used to download images. - @param imageCache The image cache. + @param imageDownloader The shared image downloader used to download images. */ -+ (void)setSharedImageCache:(id )imageCache; - -///------------------------------------ -/// @name Accessing Response Serializer -///------------------------------------ ++ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader; /** - The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`. - - @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer + The shared image downloader used to download images. */ -@property (nonatomic, strong) id imageResponseSerializer; ++ (AFImageDownloader *)sharedImageDownloader; ///-------------------- /// @name Setting Image @@ -87,7 +78,7 @@ @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. */ - (void)setImageWithURL:(NSURL *)url - placeholderImage:(UIImage *)placeholderImage; + placeholderImage:(nullable UIImage *)placeholderImage; /** Asynchronously downloads an image from the specified URL request, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. @@ -98,45 +89,21 @@ @param urlRequest The URL request used for the image request. @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. - @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the request and response parameters will be `nil`. - @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. */ - (void)setImageWithURLRequest:(NSURLRequest *)urlRequest - placeholderImage:(UIImage *)placeholderImage - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; /** Cancels any executing image operation for the receiver, if one exists. */ -- (void)cancelImageRequestOperation; +- (void)cancelImageDownloadTask; @end -#pragma mark - - -/** - The `AFImageCache` protocol is adopted by an object used to cache images loaded by the AFNetworking category on `UIImageView`. - */ -@protocol AFImageCache - -/** - Returns a cached image for the specififed request, if available. - - @param request The image request. - - @return The cached image. - */ -- (UIImage *)cachedImageForRequest:(NSURLRequest *)request; - -/** - Caches a particular image for the specified request. - - @param image The image to cache. - @param request The request to be used as a cache key. - */ -- (void)cacheImage:(UIImage *)image - forRequest:(NSURLRequest *)request; -@end +NS_ASSUME_NONNULL_END #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m index 1400b4a..a97d5cc 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m @@ -23,38 +23,22 @@ #import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV -#import "AFHTTPRequestOperation.h" - -@interface AFImageCache : NSCache -@end - -#pragma mark - +#import "AFImageDownloader.h" @interface UIImageView (_AFNetworking) -@property (readwrite, nonatomic, strong, setter = af_setImageRequestOperation:) AFHTTPRequestOperation *af_imageRequestOperation; +@property (readwrite, nonatomic, strong, setter = af_setActiveImageDownloadReceipt:) AFImageDownloadReceipt *af_activeImageDownloadReceipt; @end @implementation UIImageView (_AFNetworking) -+ (NSOperationQueue *)af_sharedImageRequestOperationQueue { - static NSOperationQueue *_af_sharedImageRequestOperationQueue = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _af_sharedImageRequestOperationQueue = [[NSOperationQueue alloc] init]; - _af_sharedImageRequestOperationQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount; - }); - - return _af_sharedImageRequestOperationQueue; +- (AFImageDownloadReceipt *)af_activeImageDownloadReceipt { + return (AFImageDownloadReceipt *)objc_getAssociatedObject(self, @selector(af_activeImageDownloadReceipt)); } -- (AFHTTPRequestOperation *)af_imageRequestOperation { - return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, @selector(af_imageRequestOperation)); -} - -- (void)af_setImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation { - objc_setAssociatedObject(self, @selector(af_imageRequestOperation), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +- (void)af_setActiveImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt { + objc_setAssociatedObject(self, @selector(af_activeImageDownloadReceipt), imageDownloadReceipt, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } @end @@ -62,46 +46,17 @@ - (void)af_setImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperat #pragma mark - @implementation UIImageView (AFNetworking) -@dynamic imageResponseSerializer; - -+ (id )sharedImageCache { - static AFImageCache *_af_defaultImageCache = nil; - static dispatch_once_t oncePredicate; - dispatch_once(&oncePredicate, ^{ - _af_defaultImageCache = [[AFImageCache alloc] init]; - - [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidReceiveMemoryWarningNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * __unused notification) { - [_af_defaultImageCache removeAllObjects]; - }]; - }); - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgnu" - return objc_getAssociatedObject(self, @selector(sharedImageCache)) ?: _af_defaultImageCache; -#pragma clang diagnostic pop -} - -+ (void)setSharedImageCache:(id )imageCache { - objc_setAssociatedObject(self, @selector(sharedImageCache), imageCache, OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -#pragma mark - -- (id )imageResponseSerializer { - static id _af_defaultImageResponseSerializer = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _af_defaultImageResponseSerializer = [AFImageResponseSerializer serializer]; - }); ++ (AFImageDownloader *)sharedImageDownloader { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgnu" - return objc_getAssociatedObject(self, @selector(imageResponseSerializer)) ?: _af_defaultImageResponseSerializer; + return objc_getAssociatedObject(self, @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance]; #pragma clang diagnostic pop } -- (void)setImageResponseSerializer:(id )serializer { - objc_setAssociatedObject(self, @selector(imageResponseSerializer), serializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); ++ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader { + objc_setAssociatedObject(self, @selector(sharedImageDownloader), imageDownloader, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } #pragma mark - @@ -121,93 +76,84 @@ - (void)setImageWithURL:(NSURL *)url - (void)setImageWithURLRequest:(NSURLRequest *)urlRequest placeholderImage:(UIImage *)placeholderImage - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure + success:(void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure { - [self cancelImageRequestOperation]; - UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest]; + if ([urlRequest URL] == nil) { + [self cancelImageDownloadTask]; + self.image = placeholderImage; + return; + } + + if ([self isActiveTaskURLEqualToURLRequest:urlRequest]){ + return; + } + + [self cancelImageDownloadTask]; + + AFImageDownloader *downloader = [[self class] sharedImageDownloader]; + id imageCache = downloader.imageCache; + + //Use the image from the image cache if it exists + UIImage *cachedImage = [imageCache imageforRequest:urlRequest withAdditionalIdentifier:nil]; if (cachedImage) { if (success) { - success(nil, nil, cachedImage); + success(urlRequest, nil, cachedImage); } else { self.image = cachedImage; } - - self.af_imageRequestOperation = nil; + [self clearActiveDownloadInformation]; } else { if (placeholderImage) { self.image = placeholderImage; } __weak __typeof(self)weakSelf = self; - self.af_imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; - self.af_imageRequestOperation.responseSerializer = self.imageResponseSerializer; - [self.af_imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if ([[urlRequest URL] isEqual:[strongSelf.af_imageRequestOperation.request URL]]) { - if (success) { - success(urlRequest, operation.response, responseObject); - } else if (responseObject) { - strongSelf.image = responseObject; - } - - if (operation == strongSelf.af_imageRequestOperation){ - strongSelf.af_imageRequestOperation = nil; - } - } - - [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest]; - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - if ([[urlRequest URL] isEqual:[strongSelf.af_imageRequestOperation.request URL]]) { - if (failure) { - failure(urlRequest, operation.response, error); - } - - if (operation == strongSelf.af_imageRequestOperation){ - strongSelf.af_imageRequestOperation = nil; - } - } - }]; - - [[[self class] af_sharedImageRequestOperationQueue] addOperation:self.af_imageRequestOperation]; + NSUUID *downloadID = [NSUUID UUID]; + AFImageDownloadReceipt *receipt; + receipt = [downloader + downloadImageForURLRequest:urlRequest + withReceiptID:downloadID + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([strongSelf.af_activeImageDownloadReceipt.receiptID isEqual:downloadID]) { + if (success) { + success(request, response, responseObject); + } else if(responseObject) { + strongSelf.image = responseObject; + } + [strongSelf clearActiveDownloadInformation]; + } + + } + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([strongSelf.af_activeImageDownloadReceipt.receiptID isEqual:downloadID]) { + if (failure) { + failure(request, response, error); + } + [strongSelf clearActiveDownloadInformation]; + } + }]; + + self.af_activeImageDownloadReceipt = receipt; } } -- (void)cancelImageRequestOperation { - [self.af_imageRequestOperation cancel]; - self.af_imageRequestOperation = nil; -} - -@end - -#pragma mark - - -static inline NSString * AFImageCacheKeyFromURLRequest(NSURLRequest *request) { - return [[request URL] absoluteString]; +- (void)cancelImageDownloadTask { + if (self.af_activeImageDownloadReceipt != nil) { + [[self.class sharedImageDownloader] cancelTaskForImageDownloadReceipt:self.af_activeImageDownloadReceipt]; + [self clearActiveDownloadInformation]; + } } -@implementation AFImageCache - -- (UIImage *)cachedImageForRequest:(NSURLRequest *)request { - switch ([request cachePolicy]) { - case NSURLRequestReloadIgnoringCacheData: - case NSURLRequestReloadIgnoringLocalAndRemoteCacheData: - return nil; - default: - break; - } - - return [self objectForKey:AFImageCacheKeyFromURLRequest(request)]; +- (void)clearActiveDownloadInformation { + self.af_activeImageDownloadReceipt = nil; } -- (void)cacheImage:(UIImage *)image - forRequest:(NSURLRequest *)request -{ - if (image && request) { - [self setObject:image forKey:AFImageCacheKeyFromURLRequest(request)]; - } +- (BOOL)isActiveTaskURLEqualToURLRequest:(NSURLRequest *)urlRequest { + return [self.af_activeImageDownloadReceipt.task.originalRequest.URL.absoluteString isEqualToString:urlRequest.URL.absoluteString]; } @end diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h index 94082f6..b36ee0c 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h @@ -20,19 +20,23 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if TARGET_OS_IOS || TARGET_OS_TV #import #ifndef _UIKIT_AFNETWORKING_ #define _UIKIT_AFNETWORKING_ +#if TARGET_OS_IOS + #import "AFAutoPurgingImageCache.h" + #import "AFImageDownloader.h" #import "AFNetworkActivityIndicatorManager.h" + #import "UIRefreshControl+AFNetworking.h" + #import "UIWebView+AFNetworking.h" +#endif #import "UIActivityIndicatorView+AFNetworking.h" - #import "UIAlertView+AFNetworking.h" #import "UIButton+AFNetworking.h" #import "UIImageView+AFNetworking.h" - #import "UIKit+AFNetworking.h" #import "UIProgressView+AFNetworking.h" - #import "UIRefreshControl+AFNetworking.h" - #import "UIWebView+AFNetworking.h" #endif /* _UIKIT_AFNETWORKING_ */ +#endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h index 6a4e16f..a0c463b 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h @@ -21,16 +21,17 @@ #import -#import +#import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV #import -@class AFURLConnectionOperation; +NS_ASSUME_NONNULL_BEGIN + /** - This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task or request operation. + This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task. */ @interface UIProgressView (AFNetworking) @@ -44,10 +45,8 @@ @param task The session task. @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 - (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task animated:(BOOL)animated; -#endif /** Binds the progress to the download progress of the specified session task. @@ -55,33 +54,11 @@ @param task The session task. @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 - (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task animated:(BOOL)animated; -#endif - -///------------------------------------ -/// @name Setting Session Task Progress -///------------------------------------ - -/** - Binds the progress to the upload progress of the specified request operation. - - @param operation The request operation. - @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. - */ -- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation - animated:(BOOL)animated; - -/** - Binds the progress to the download progress of the specified request operation. - - @param operation The request operation. - @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. - */ -- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation - animated:(BOOL)animated; @end +NS_ASSUME_NONNULL_END + #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m index ad2c280..6680bac 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m @@ -23,33 +23,13 @@ #import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS || TARGET_OS_TV -#import "AFURLConnectionOperation.h" - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 #import "AFURLSessionManager.h" -#endif static void * AFTaskCountOfBytesSentContext = &AFTaskCountOfBytesSentContext; static void * AFTaskCountOfBytesReceivedContext = &AFTaskCountOfBytesReceivedContext; -@interface AFURLConnectionOperation (_UIProgressView) -@property (readwrite, nonatomic, copy) void (^uploadProgress)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); -@property (readwrite, nonatomic, assign, setter = af_setUploadProgressAnimated:) BOOL af_uploadProgressAnimated; - -@property (readwrite, nonatomic, copy) void (^downloadProgress)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); -@property (readwrite, nonatomic, assign, setter = af_setDownloadProgressAnimated:) BOOL af_downloadProgressAnimated; -@end - -@implementation AFURLConnectionOperation (_UIProgressView) -@dynamic uploadProgress; // Implemented in AFURLConnectionOperation -@dynamic af_uploadProgressAnimated; - -@dynamic downloadProgress; // Implemented in AFURLConnectionOperation -@dynamic af_downloadProgressAnimated; -@end - #pragma mark - @implementation UIProgressView (AFNetworking) @@ -72,7 +52,6 @@ - (void)af_setDownloadProgressAnimated:(BOOL)animated { #pragma mark - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 - (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task animated:(BOOL)animated { @@ -90,47 +69,6 @@ - (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task [self af_setDownloadProgressAnimated:animated]; } -#endif - -#pragma mark - - -- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation - animated:(BOOL)animated -{ - __weak __typeof(self)weakSelf = self; - void (^original)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) = [operation.uploadProgress copy]; - [operation setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) { - if (original) { - original(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); - } - - dispatch_async(dispatch_get_main_queue(), ^{ - if (totalBytesExpectedToWrite > 0) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - [strongSelf setProgress:(totalBytesWritten / (totalBytesExpectedToWrite * 1.0f)) animated:animated]; - } - }); - }]; -} - -- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation - animated:(BOOL)animated -{ - __weak __typeof(self)weakSelf = self; - void (^original)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) = [operation.downloadProgress copy]; - [operation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) { - if (original) { - original(bytesRead, totalBytesRead, totalBytesExpectedToRead); - } - - dispatch_async(dispatch_get_main_queue(), ^{ - if (totalBytesExpectedToRead > 0) { - __strong __typeof(weakSelf)strongSelf = weakSelf; - [strongSelf setProgress:(totalBytesRead / (totalBytesExpectedToRead * 1.0f)) animated:animated]; - } - }); - }]; -} #pragma mark - NSKeyValueObserving @@ -139,7 +77,6 @@ - (void)observeValueForKeyPath:(NSString *)keyPath change:(__unused NSDictionary *)change context:(void *)context { -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 if (context == AFTaskCountOfBytesSentContext || context == AFTaskCountOfBytesReceivedContext) { if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) { if ([object countOfBytesExpectedToSend] > 0) { @@ -174,7 +111,6 @@ - (void)observeValueForKeyPath:(NSString *)keyPath } } } -#endif } @end diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h index 18c12ea..f6930a9 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h @@ -22,16 +22,16 @@ #import -#import +#import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS #import -@class AFURLConnectionOperation; +NS_ASSUME_NONNULL_BEGIN /** - This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically begining and ending refreshing depending on the loading state of a request operation or session task. + This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a session task. */ @interface UIRefreshControl (AFNetworking) @@ -44,21 +44,10 @@ @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. */ -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; -#endif - -///---------------------------------------- -/// @name Refreshing for Request Operations -///---------------------------------------- - -/** - Binds the refreshing state to the execution state of the specified operation. - - @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. - */ -- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation; @end +NS_ASSUME_NONNULL_END + #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m index e266451..ddc033b 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m @@ -21,18 +21,48 @@ // THE SOFTWARE. #import "UIRefreshControl+AFNetworking.h" +#import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS -#import "AFHTTPRequestOperation.h" - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 #import "AFURLSessionManager.h" -#endif + +@interface AFRefreshControlNotificationObserver : NSObject +@property (readonly, nonatomic, weak) UIRefreshControl *refreshControl; +- (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl; + +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; + +@end @implementation UIRefreshControl (AFNetworking) -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 +- (AFRefreshControlNotificationObserver *)af_notificationObserver { + AFRefreshControlNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); + if (notificationObserver == nil) { + notificationObserver = [[AFRefreshControlNotificationObserver alloc] initWithActivityRefreshControl:self]; + objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return notificationObserver; +} + +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { + [[self af_notificationObserver] setRefreshingWithStateOfTask:task]; +} + +@end + +@implementation AFRefreshControlNotificationObserver + +- (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl +{ + self = [super init]; + if (self) { + _refreshControl = refreshControl; + } + return self; +} + - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; @@ -41,36 +71,19 @@ - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; if (task) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" +#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" if (task.state == NSURLSessionTaskStateRunning) { - [self beginRefreshing]; + [self.refreshControl beginRefreshing]; [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task]; [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task]; [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task]; } else { - [self endRefreshing]; - } - } -} -#endif - -- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation { - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - - [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; - [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; - - if (operation) { - if (![operation isFinished]) { - if ([operation isExecuting]) { - [self beginRefreshing]; - } else { - [self endRefreshing]; - } - - [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingOperationDidStartNotification object:operation]; - [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingOperationDidFinishNotification object:operation]; + [self.refreshControl endRefreshing]; } +#pragma clang diagnostic pop } } @@ -78,16 +91,32 @@ - (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation - (void)af_beginRefreshing { dispatch_async(dispatch_get_main_queue(), ^{ - [self beginRefreshing]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" + [self.refreshControl beginRefreshing]; +#pragma clang diagnostic pop }); } - (void)af_endRefreshing { dispatch_async(dispatch_get_main_queue(), ^{ - [self endRefreshing]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreceiver-is-weak" + [self.refreshControl endRefreshing]; +#pragma clang diagnostic pop }); } +#pragma mark - + +- (void)dealloc { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; +} + @end #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h b/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h index 56e5832..777dce2 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h @@ -21,14 +21,15 @@ #import -#import +#import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS #import -@class AFHTTPRequestSerializer, AFHTTPResponseSerializer; -@protocol AFURLRequestSerialization, AFURLResponseSerialization; +NS_ASSUME_NONNULL_BEGIN + +@class AFHTTPSessionManager; /** This category adds methods to the UIKit framework's `UIWebView` class. The methods in this category provide increased control over the request cycle, including progress monitoring and success / failure handling. @@ -38,27 +39,22 @@ @interface UIWebView (AFNetworking) /** - The request serializer used to serialize requests made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPRequestSerializer`. + The session manager used to download all requests. */ -@property (nonatomic, strong) AFHTTPRequestSerializer * requestSerializer; - -/** - The response serializer used to serialize responses made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPResponseSerializer`. - */ -@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; +@property (nonatomic, strong) AFHTTPSessionManager *sessionManager; /** Asynchronously loads the specified request. @param request A URL request identifying the location of the content to load. This must not be `nil`. - @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. + @param progress A progress object monitoring the current download progress. @param success A block object to be executed when the request finishes loading successfully. This block returns the HTML string to be loaded by the web view, and takes two arguments: the response, and the response string. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. + @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. */ - (void)loadRequest:(NSURLRequest *)request - progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress - success:(NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success - failure:(void (^)(NSError *error))failure; + progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress + success:(nullable NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success + failure:(nullable void (^)(NSError *error))failure; /** Asynchronously loads the data associated with a particular request with a specified MIME type and text encoding. @@ -66,17 +62,19 @@ @param request A URL request identifying the location of the content to load. This must not be `nil`. @param MIMEType The MIME type of the content. Defaults to the content type of the response if not specified. @param textEncodingName The IANA encoding name, as in `utf-8` or `utf-16`. Defaults to the response text encoding if not specified. - @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. +@param progress A progress object monitoring the current download progress. @param success A block object to be executed when the request finishes loading successfully. This block returns the data to be loaded by the web view and takes two arguments: the response, and the downloaded data. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. + @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. */ - (void)loadRequest:(NSURLRequest *)request - MIMEType:(NSString *)MIMEType - textEncodingName:(NSString *)textEncodingName - progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress - success:(NSData * (^)(NSHTTPURLResponse *response, NSData *data))success - failure:(void (^)(NSError *error))failure; + MIMEType:(nullable NSString *)MIMEType + textEncodingName:(nullable NSString *)textEncodingName + progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress + success:(nullable NSData * (^)(NSHTTPURLResponse *response, NSData *data))success + failure:(nullable void (^)(NSError *error))failure; @end +NS_ASSUME_NONNULL_END + #endif diff --git a/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m b/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m index 93eacaa..ac089da 100644 --- a/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m +++ b/Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m @@ -23,24 +23,24 @@ #import -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +#if TARGET_OS_IOS -#import "AFHTTPRequestOperation.h" +#import "AFHTTPSessionManager.h" #import "AFURLResponseSerialization.h" #import "AFURLRequestSerialization.h" @interface UIWebView (_AFNetworking) -@property (readwrite, nonatomic, strong, setter = af_setHTTPRequestOperation:) AFHTTPRequestOperation *af_HTTPRequestOperation; +@property (readwrite, nonatomic, strong, setter = af_setURLSessionTask:) NSURLSessionDataTask *af_URLSessionTask; @end @implementation UIWebView (_AFNetworking) -- (AFHTTPRequestOperation *)af_HTTPRequestOperation { - return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, @selector(af_HTTPRequestOperation)); +- (NSURLSessionDataTask *)af_URLSessionTask { + return (NSURLSessionDataTask *)objc_getAssociatedObject(self, @selector(af_URLSessionTask)); } -- (void)af_setHTTPRequestOperation:(AFHTTPRequestOperation *)operation { - objc_setAssociatedObject(self, @selector(af_HTTPRequestOperation), operation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +- (void)af_setURLSessionTask:(NSURLSessionDataTask *)af_URLSessionTask { + objc_setAssociatedObject(self, @selector(af_URLSessionTask), af_URLSessionTask, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } @end @@ -49,21 +49,23 @@ - (void)af_setHTTPRequestOperation:(AFHTTPRequestOperation *)operation { @implementation UIWebView (AFNetworking) -- (AFHTTPRequestSerializer *)requestSerializer { - static AFHTTPRequestSerializer *_af_defaultRequestSerializer = nil; +- (AFHTTPSessionManager *)sessionManager { + static AFHTTPSessionManager *_af_defaultHTTPSessionManager = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - _af_defaultRequestSerializer = [AFHTTPRequestSerializer serializer]; + _af_defaultHTTPSessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + _af_defaultHTTPSessionManager.requestSerializer = [AFHTTPRequestSerializer serializer]; + _af_defaultHTTPSessionManager.responseSerializer = [AFHTTPResponseSerializer serializer]; }); #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgnu" - return objc_getAssociatedObject(self, @selector(requestSerializer)) ?: _af_defaultRequestSerializer; + return objc_getAssociatedObject(self, @selector(sessionManager)) ?: _af_defaultHTTPSessionManager; #pragma clang diagnostic pop } -- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { - objc_setAssociatedObject(self, @selector(requestSerializer), requestSerializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +- (void)setSessionManager:(AFHTTPSessionManager *)sessionManager { + objc_setAssociatedObject(self, @selector(sessionManager), sessionManager, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } - (AFHTTPResponseSerializer *)responseSerializer { @@ -86,7 +88,7 @@ - (void)setResponseSerializer:(AFHTTPResponseSerializer @@ -152,7 +152,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * Create a new model instance and initialize it with the JSON from a text parameter. The method assumes UTF8 encoded input text. * @param string JSON text data * @param err an initialization error or nil - * @exception JSONModelTypeNotAllowedException thrown when unsported type is found in the incoming JSON, + * @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON, * or a property type in your model is not supported by JSONValueTransformer and its categories * @see initWithString:usingEncoding:error: for use of custom text encodings */ @@ -163,7 +163,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * @param string JSON text data * @param encoding the text encoding to use when parsing the string (see NSStringEncoding) * @param err an initialization error or nil - * @exception JSONModelTypeNotAllowedException thrown when unsported type is found in the incoming JSON, + * @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON, * or a property type in your model is not supported by JSONValueTransformer and its categories */ -(instancetype)initWithString:(NSString *)string usingEncoding:(NSStringEncoding)encoding error:(JSONModelError**)err; @@ -222,23 +222,22 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * * @param array list of dictionaries to be imported as models * @return list of initialized data model objects - * @exception JSONModelTypeNotAllowedException thrown when unsported type is found in the incoming JSON, + * @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON, * or a property type in your model is not supported by JSONValueTransformer and its categories * @exception JSONModelInvalidDataException thrown when the input data does not include all required keys * @see arrayOfDictionariesFromModels: */ - +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array; - + +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array __attribute__((deprecated("use arrayOfModelsFromDictionaries:error:"))); +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array error:(NSError**)err; - +(NSMutableArray*)arrayOfModelsFromData:(NSData*)data error:(NSError**)err; + +(NSMutableArray*)arrayOfModelsFromString:(NSString*)string error:(NSError**)err; /** * If you have an NSArray of data model objects, this method takes it in and outputs a list of the * matching dictionaries. This method does the opposite of arrayOfObjectsFromDictionaries: * @param array list of JSONModel objects * @return a list of NSDictionary objects - * @exception JSONModelTypeNotAllowedException thrown when unsported type is found in the incoming JSON, + * @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON, * or a property type in your model is not supported by JSONValueTransformer and its categories * @see arrayOfModelsFromDictionaries: */ @@ -256,14 +255,14 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) -(NSString*)indexPropertyName; /** - * Overriden NSObject method to compare model objects. Compares the <Index> property of the two models, + * Overridden NSObject method to compare model objects. Compares the <Index> property of the two models, * if an index property is defined. * @param object a JSONModel instance to compare to for equality */ -(BOOL)isEqual:(id)object; /** - * Comparision method, which uses the defined <Index> property of the two models, to compare them. + * Comparison method, which uses the defined <Index> property of the two models, to compare them. * If there isn't an index property throws an exception. If the Index property does not have a compare: method * also throws an exception. NSString and NSNumber have compare: methods, and in case the Index property is * a another custom class, the programmer should create a custom compare: method then. @@ -276,7 +275,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) /** * Overwrite the validate method in your own models if you need to perform some custom validation over the model data. * This method gets called at the very end of the JSONModel initializer, thus the model is in the state that you would - * get it back when initialzed. Check the values of any property that needs to be validated and if any invalid values + * get it back when initialized. Check the values of any property that needs to be validated and if any invalid values * are encountered return NO and set the error parameter to an NSError object. If the model is valid return YES. * * NB: Only setting the error parameter is not enough to fail the validation, you also need to return a NO value. @@ -298,7 +297,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * Sets a key mapper which affects ALL the models in your project. Use this if you need only one mapper to work * with your API. For example if you are using the [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase] it is more * likely that you will need to use it with ALL of your models. - * NB: Custom key mappers take precendence over the global key mapper. + * NB: Custom key mappers take precedence over the global key mapper. * @param globalKeyMapper a key mapper to apply to all models in your project. * * Lookup JSONKeyMapper docs for more details. @@ -343,6 +342,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * @param useKeyMapping if YES the method will use the model's key mapper and the global key mapper, if NO * it'll just try to match the dictionary keys to the model's properties */ --(void)mergeFromDictionary:(NSDictionary*)dict useKeyMapping:(BOOL)useKeyMapping; +- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping __attribute__((deprecated("use mergeFromDictionary:useKeyMapping:error:"))); +- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error; @end diff --git a/Pods/JSONModel/JSONModel/JSONModel/JSONModel.m b/Pods/JSONModel/JSONModel/JSONModel/JSONModel.m index 9b819bc..7422d1a 100644 --- a/Pods/JSONModel/JSONModel/JSONModel/JSONModel.m +++ b/Pods/JSONModel/JSONModel/JSONModel/JSONModel.m @@ -1,18 +1,18 @@ // // JSONModel.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 + #if !__has_feature(objc_arc) #error The JSONMOdel framework is ARC only, you can enable ARC on per file basis. @@ -214,7 +214,7 @@ -(BOOL)__doesDictionary:(NSDictionary*)dict matchModelWithKeyMapper:(JSONKeyMapp NSMutableSet* requiredProperties = [self __requiredPropertyNames].mutableCopy; NSSet* incomingKeys = [NSSet setWithArray: incomingKeysArray]; - //transform the key names, if neccessary + //transform the key names, if necessary if (keyMapper || globalKeyMapper) { NSMutableSet* transformedIncomingKeys = [NSMutableSet setWithCapacity: requiredProperties.count]; @@ -225,7 +225,7 @@ -(BOOL)__doesDictionary:(NSDictionary*)dict matchModelWithKeyMapper:(JSONKeyMapp transformedName = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper importing:YES] : property.name; - //chek if exists and if so, add to incoming keys + //check if exists and if so, add to incoming keys id value; @try { value = [dict valueForKeyPath:transformedName]; @@ -393,7 +393,7 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM } else { // 2) check if there's a protocol to the property - // ) might or not be the case there's a built in transofrm for it + // ) might or not be the case there's a built in transform for it if (property.protocol) { //JMLog(@"proto: %@", p.protocol); @@ -476,7 +476,7 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM } else { // it's not a JSON data type, and there's no transformer for it - // if property type is not supported - that's a programmer mistaked -> exception + // if property type is not supported - that's a programmer mistake -> exception @throw [NSException exceptionWithName:@"Type not allowed" reason:[NSString stringWithFormat:@"%@ type not supported for %@.%@", property.type, [self class], property.name] userInfo:nil]; @@ -589,7 +589,7 @@ -(void)__inspectProperties //check for 64b BOOLs if ([propertyAttributes hasPrefix:@"Tc,"]) { - //mask BOOLs as structs so they can have custom convertors + //mask BOOLs as structs so they can have custom converters p.structName = @"BOOL"; } @@ -660,7 +660,7 @@ -(void)__inspectProperties if (![allowedPrimitiveTypes containsObject:propertyType]) { - //type not allowed - programmer mistaked -> exception + //type not allowed - programmer mistaken -> exception @throw [NSException exceptionWithName:@"JSONModelProperty type not allowed" reason:[NSString stringWithFormat:@"Property type of %@.%@ is not supported by JSONModel.", self.class, p.name] userInfo:nil]; @@ -799,7 +799,7 @@ -(id)__transform:(id)value forProperty:(JSONModelClassProperty*)property error:( return value; } -//built-in reverse transormations (export to JSON compliant objects) +//built-in reverse transformations (export to JSON compliant objects) -(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property { Class protocolClass = NSClassFromString(property.protocol); @@ -837,31 +837,34 @@ -(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property #pragma mark - custom transformations -(BOOL)__customSetValue:(id)value forProperty:(JSONModelClassProperty*)property { - if (property.setterType == kNotInspected) { + if (!property.customSetters) + property.customSetters = [NSMutableDictionary new]; + + NSString *className = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:[value class]]); + + if (!property.customSetters[className]) { //check for a custom property setter method NSString* ucfirstName = [property.name stringByReplacingCharactersInRange:NSMakeRange(0,1) withString:[[property.name substringToIndex:1] uppercaseString]]; - NSString* selectorName = [NSString stringWithFormat:@"set%@With%@:", ucfirstName, - [JSONValueTransformer classByResolvingClusterClasses:[value class]] - ]; + NSString* selectorName = [NSString stringWithFormat:@"set%@With%@:", ucfirstName, className]; SEL customPropertySetter = NSSelectorFromString(selectorName); //check if there's a custom selector like this if (![self respondsToSelector: customPropertySetter]) { - property.setterType = kNo; + property.customSetters[className] = [NSNull null]; return NO; } //cache the custom setter selector - property.setterType = kCustom; - property.customSetter = customPropertySetter; + property.customSetters[className] = selectorName; } - if (property.setterType==kCustom) { + if (property.customSetters[className] != [NSNull null]) { //call the custom setter //https://github.com/steipete - ((void (*) (id, SEL, id))objc_msgSend)(self, property.customSetter, value); + SEL selector = NSSelectorFromString(property.customSetters[className]); + ((void (*) (id, SEL, id))objc_msgSend)(self, selector, value); return YES; } @@ -1045,7 +1048,7 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames } else { //in this case most probably a custom property was defined in a model - //but no default reverse transofrmer for it + //but no default reverse transformer for it @throw [NSException exceptionWithName:@"Value transformer not found" reason:[NSString stringWithFormat:@"[JSONValueTransformer %@] not found", selectorName] userInfo:nil]; @@ -1091,7 +1094,7 @@ +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array return [self arrayOfModelsFromDictionaries:array error:nil]; } -+(NSMutableArray*)arrayOfModelsFromData:(NSData *)data error:(NSError *__autoreleasing *)err ++ (NSMutableArray *)arrayOfModelsFromData:(NSData *)data error:(NSError **)err { id json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:err]; if (!json || ![json isKindOfClass:[NSArray class]]) return nil; @@ -1099,6 +1102,11 @@ +(NSMutableArray*)arrayOfModelsFromData:(NSData *)data error:(NSError *__autorel return [self arrayOfModelsFromDictionaries:json error:err]; } ++ (NSMutableArray *)arrayOfModelsFromString:(NSString *)string error:(NSError **)err +{ + return [self arrayOfModelsFromData:[string dataUsingEncoding:NSUTF8StringEncoding] error:err]; +} + // Same as above, but with error reporting +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array error:(NSError**)err { @@ -1218,9 +1226,13 @@ -(NSComparisonResult)compare:(id)object - (NSUInteger)hash { if (self.indexPropertyName) { - return [self.indexPropertyName hash]; + id val = [self valueForKey:self.indexPropertyName]; + + if (val) { + return [val hash]; + } } - + return [super hash]; } @@ -1281,9 +1293,14 @@ +(NSString*)protocolForArrayProperty:(NSString *)propertyName } #pragma mark - working with incomplete models --(void)mergeFromDictionary:(NSDictionary*)dict useKeyMapping:(BOOL)useKeyMapping +- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping +{ + [self mergeFromDictionary:dict useKeyMapping:useKeyMapping error:nil]; +} + +- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error { - [self __importDictionary:dict withKeyMapper:(useKeyMapping)? self.__keyMapper:nil validation:NO error:nil]; + [self __importDictionary:dict withKeyMapper:(useKeyMapping)? self.__keyMapper:nil validation:NO error:error]; } #pragma mark - NSCopying, NSCoding diff --git a/Pods/JSONModel/JSONModel/JSONModel/JSONModelArray.h b/Pods/JSONModel/JSONModel/JSONModel/JSONModelArray.h index e858ad7..21251b1 100644 --- a/Pods/JSONModel/JSONModel/JSONModel/JSONModelArray.h +++ b/Pods/JSONModel/JSONModel/JSONModel/JSONModelArray.h @@ -2,17 +2,17 @@ // JSONModelArray.h // // @version 0.8.0 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @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,7 +50,7 @@ * * Will return nil if no matching model is found. Will return nil if there's no index property * defined on the models found in the array (will sample the first object, assuming the array - * contains homogenous collection of objects) + * contains homogeneous collection of objects) * * @param indexValue the id value to search for * @return the found model or nil diff --git a/Pods/JSONModel/JSONModel/JSONModel/JSONModelArray.m b/Pods/JSONModel/JSONModel/JSONModel/JSONModelArray.m index 88eddc7..44c7fa1 100644 --- a/Pods/JSONModel/JSONModel/JSONModel/JSONModelArray.m +++ b/Pods/JSONModel/JSONModel/JSONModel/JSONModelArray.m @@ -1,18 +1,18 @@ // // JSONModelArray.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 "JSONModelArray.h" #import "JSONModel.h" @@ -69,9 +69,9 @@ -(void)forwardInvocation:(NSInvocation *)anInvocation -(id)forwardingTargetForSelector:(SEL)selector { - static NSArray* overridenMethods = nil; - if (!overridenMethods) overridenMethods = @[@"initWithArray:modelClass:",@"objectAtIndex:",@"objectAtIndexedSubscript:", @"count",@"modelWithIndexValue:",@"description",@"mutableCopy",@"firstObject",@"lastObject",@"countByEnumeratingWithState:objects:count:"]; - if ([overridenMethods containsObject:NSStringFromSelector(selector)]) { + static NSArray *overriddenMethods = nil; + if (!overriddenMethods) overriddenMethods = @[@"initWithArray:modelClass:", @"objectAtIndex:", @"objectAtIndexedSubscript:", @"count", @"modelWithIndexValue:", @"description", @"mutableCopy", @"firstObject", @"lastObject", @"countByEnumeratingWithState:objects:count:"]; + if ([overriddenMethods containsObject:NSStringFromSelector(selector)]) { return self; } return _storage; diff --git a/Pods/JSONModel/JSONModel/JSONModel/JSONModelClassProperty.h b/Pods/JSONModel/JSONModel/JSONModel/JSONModelClassProperty.h index 7e47070..8b0949d 100644 --- a/Pods/JSONModel/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/Pods/JSONModel/JSONModel/JSONModel/JSONModelClassProperty.h @@ -1,18 +1,18 @@ // // JSONModelClassProperty.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 @@ -22,7 +22,6 @@ enum kCustomizationTypes { kNo }; -typedef enum kCustomizationTypes PropertySetterType; typedef enum kCustomizationTypes PropertyGetterType; /** @@ -68,10 +67,7 @@ typedef enum kCustomizationTypes PropertyGetterType; /** a custom getter for this property, found in the owning model */ @property (assign, nonatomic) SEL customGetter; -/** The status of property setter introspection in a model */ -@property (assign, nonatomic) PropertySetterType setterType; - -/** a custom setter for this property, found in the owning model */ -@property (assign, nonatomic) SEL customSetter; +/** custom setters for this property, found in the owning model */ +@property (strong, nonatomic) NSMutableDictionary *customSetters; @end diff --git a/Pods/JSONModel/JSONModel/JSONModel/JSONModelClassProperty.m b/Pods/JSONModel/JSONModel/JSONModel/JSONModelClassProperty.m index 0fe9158..827de0a 100644 --- a/Pods/JSONModel/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/Pods/JSONModel/JSONModel/JSONModel/JSONModelClassProperty.m @@ -1,18 +1,18 @@ // // JSONModelClassProperty.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 "JSONModelClassProperty.h" @@ -28,8 +28,20 @@ -(NSString*)description if (self.isMutable) [properties addObject:@"Mutable"]; if (self.convertsOnDemand) [properties addObject:@"ConvertOnDemand"]; if (self.isStandardJSONType) [properties addObject:@"Standard JSON type"]; - if (self.customSetter) [properties addObject:[NSString stringWithFormat: @"Setter = %@", NSStringFromSelector(self.customSetter)]]; if (self.customGetter) [properties addObject:[NSString stringWithFormat: @"Getter = %@", NSStringFromSelector(self.customGetter)]]; + + if (self.customSetters) + { + NSMutableArray *setters = [NSMutableArray array]; + + for (id obj in self.customSetters.allValues) + { + if (obj != [NSNull null]) + [setters addObject:obj]; + } + + [properties addObject:[NSString stringWithFormat: @"Setters = [%@]", [setters componentsJoinedByString:@", "]]]; + } NSString* propertiesString = @""; if (properties.count>0) { diff --git a/Pods/JSONModel/JSONModel/JSONModel/JSONModelError.h b/Pods/JSONModel/JSONModel/JSONModel/JSONModelError.h index 6824c48..10c6b0f 100644 --- a/Pods/JSONModel/JSONModel/JSONModel/JSONModelError.h +++ b/Pods/JSONModel/JSONModel/JSONModel/JSONModelError.h @@ -1,18 +1,18 @@ // // JSONModelError.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 @@ -62,6 +62,8 @@ extern NSString* const kJSONModelKeyPath; @property (strong, nonatomic) NSHTTPURLResponse* httpResponse; +@property (strong, nonatomic) NSData* responseData; + /** * Creates a JSONModelError instance with code kJSONModelErrorInvalidData = 1 */ diff --git a/Pods/JSONModel/JSONModel/JSONModel/JSONModelError.m b/Pods/JSONModel/JSONModel/JSONModel/JSONModelError.m index de80446..ffbf2fb 100644 --- a/Pods/JSONModel/JSONModel/JSONModel/JSONModelError.m +++ b/Pods/JSONModel/JSONModel/JSONModel/JSONModelError.m @@ -1,18 +1,18 @@ // // JSONModelError.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 "JSONModelError.h" diff --git a/Pods/JSONModel/JSONModel/JSONModelCategories/NSArray+JSONModel.h b/Pods/JSONModel/JSONModel/JSONModelCategories/NSArray+JSONModel.h index d4e18da..3e50cdf 100644 --- a/Pods/JSONModel/JSONModel/JSONModelCategories/NSArray+JSONModel.h +++ b/Pods/JSONModel/JSONModel/JSONModelCategories/NSArray+JSONModel.h @@ -1,18 +1,18 @@ // // NSArray+JSONModel.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 @@ -29,7 +29,7 @@ * * Will return nil if no matching model is found. Will return nil if there's no index property * defined on the models found in the array (will sample the first object, assuming the array - * contains homogenous collection of objects) + * contains homogeneous collection of objects) * * @param indexValue the id value to search for * @return the found model or nil diff --git a/Pods/JSONModel/JSONModel/JSONModelCategories/NSArray+JSONModel.m b/Pods/JSONModel/JSONModel/JSONModelCategories/NSArray+JSONModel.m index 41475a4..cc9fdc8 100644 --- a/Pods/JSONModel/JSONModel/JSONModelCategories/NSArray+JSONModel.m +++ b/Pods/JSONModel/JSONModel/JSONModelCategories/NSArray+JSONModel.m @@ -1,18 +1,18 @@ // // NSArray+JSONModel.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 "NSArray+JSONModel.h" diff --git a/Pods/JSONModel/JSONModel/JSONModelLib.h b/Pods/JSONModel/JSONModel/JSONModelLib.h index 7c969d5..204fef7 100644 --- a/Pods/JSONModel/JSONModel/JSONModelLib.h +++ b/Pods/JSONModel/JSONModel/JSONModelLib.h @@ -1,18 +1,18 @@ // // JSONModelLib.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 diff --git a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONAPI.h b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONAPI.h index dd27aa2..6a86cf7 100644 --- a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONAPI.h @@ -1,18 +1,18 @@ // // JSONAPI.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 "JSONHTTPClient.h" @@ -46,7 +46,7 @@ /** @name Making GET API requests */ /** - * Makes an asynchronious GET request to the API + * Makes an asynchronous GET request to the API * @param path the URL path to add to the base API URL for this HTTP call * @param params the variables to pass to the API * @param completeBlock a JSONObjectBlock block to execute upon completion @@ -68,7 +68,7 @@ /** @name JSON RPC methods */ /** - * Makes an asynchronious JSON RPC request to the API. Read more: http://www.jsonrpc.org + * Makes an asynchronous JSON RPC request to the API. Read more: http://www.jsonrpc.org * @param method the HTTP method name; GET or POST only * @param args the list of arguments to pass to the API * @param completeBlock JSONObjectBlock to execute upon completion @@ -77,7 +77,7 @@ /** @name JSON RPC (2.0) request method */ /** - * Makes an asynchronious JSON RPC 2.0 request to the API. Read more: http://www.jsonrpc.org + * Makes an asynchronous JSON RPC 2.0 request to the API. Read more: http://www.jsonrpc.org * @param method the HTTP method name; GET or POST only * @param params the params to pass to the API - an NSArray or an NSDictionary, * depending whether you're using named or unnamed parameters diff --git a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONAPI.m b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONAPI.m index 212803d..a05b44d 100644 --- a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONAPI.m @@ -1,18 +1,18 @@ // // JSONAPI.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 "JSONAPI.h" diff --git a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONHTTPClient.h index a2129fb..7b2e007 100644 --- a/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/Pods/JSONModel/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -1,18 +1,18 @@ // // JSONModelHTTPClient.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" @@ -33,7 +33,7 @@ extern NSString* const kContentTypeWWWEncoded; /** * A block type to handle incoming JSON object and an error. - * You pass it to methods which fetch JSON asynchroniously. When the operation is finished + * You pass it to methods which fetch JSON asynchronously. When the operation is finished * you receive back the fetched JSON (or nil) and an error (or nil) * * @param json object derived from a JSON string @@ -55,7 +55,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); /** @name HTTP Client configuration */ /** - * Returns a modifyable dictionary of the client's default HTTP headers. + * Returns a modifiable dictionary of the client's default HTTP headers. * @result A mutable dictionary of pairs - HTTP header names and values. * @discussion You can use the result to modify the http client headers like so: *
@@ -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 `-decodeWithCoder: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 `-mergeFromModel:` 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 [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](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 = ""; };
+		1214A3E358F782D81F7CFC707E8B1C72 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkActivityIndicatorManager.h; path = "UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h"; sourceTree = ""; };
+		12700C8E34E43360A4B8A009316EC656 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+JSONModel.m"; path = "JSONModel/JSONModelCategories/NSArray+JSONModel.m"; sourceTree = ""; };
+		12D7830460263449420B0F7806ECF00E /* AFNetworking.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AFNetworking.xcconfig; sourceTree = ""; };
+		18DA3BEF587E6A26A30D88E05C80BDE2 /* NSObject+YYModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+YYModel.h"; path = "YYModel/NSObject+YYModel.h"; sourceTree = ""; };
+		1C2D2A962D0939A6AA9197643DF51EF5 /* MJPropertyKey.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJPropertyKey.m; path = MJExtension/MJPropertyKey.m; sourceTree = ""; };
+		1D242CEE0CA2BC7695783E88BF8312A7 /* JSONKeyMapper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONKeyMapper.m; path = JSONModel/JSONModelTransformations/JSONKeyMapper.m; sourceTree = ""; };
+		21503577811075171479CA9DC58BE711 /* NSObject+MJKeyValue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJKeyValue.m"; path = "MJExtension/NSObject+MJKeyValue.m"; sourceTree = ""; };
+		26D091EA82DC6C228C5967981D8A947C /* JSONModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModel.m; path = JSONModel/JSONModel/JSONModel.m; sourceTree = ""; };
 		272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; };
-		2985156A5BB2598BF675A22BA9351ECD /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; };
-		2D3EFD38A56800F0DA70A7D6A246AC60 /* NSObject+MTLComparisonAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MTLComparisonAdditions.m"; path = "Mantle/NSObject+MTLComparisonAdditions.m"; sourceTree = ""; };
-		323F82DFA65811C481469C1DC2896841 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		337C2EFC61D990AB6618EB201A4D4CF0 /* MJExtension-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MJExtension-dummy.m"; sourceTree = ""; };
-		33AE35A56CE6E3824D96FE55C4869095 /* MJDictionaryCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJDictionaryCache.m; path = MJExtension/MJDictionaryCache.m; sourceTree = ""; };
-		33EF955F11C936B384AF043A05756BE3 /* JSONModel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JSONModel-prefix.pch"; sourceTree = ""; };
-		3406C17F0D62CF638EA4CB0692C96119 /* UIRefreshControl+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIRefreshControl+AFNetworking.h"; path = "UIKit+AFNetworking/UIRefreshControl+AFNetworking.h"; sourceTree = ""; };
-		344EFDC737CD472CB761BA5FB6C63D82 /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLRequestSerialization.m; path = AFNetworking/AFURLRequestSerialization.m; sourceTree = ""; };
-		36588BCEFE1D7E0A4107B673FB227DDD /* AFHTTPRequestOperationManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPRequestOperationManager.m; path = AFNetworking/AFHTTPRequestOperationManager.m; sourceTree = ""; };
+		2D47B1ECCE791AA32D9032ECEEBE9F7F /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLResponseSerialization.h; path = AFNetworking/AFURLResponseSerialization.h; sourceTree = ""; };
+		2DD5E425BB86A0DED2EDE70C1C319945 /* AFSecurityPolicy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFSecurityPolicy.m; path = AFNetworking/AFSecurityPolicy.m; sourceTree = ""; };
+		3380E1498452AD6D302CFF6C4E9CECBE /* AFAutoPurgingImageCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFAutoPurgingImageCache.m; path = "UIKit+AFNetworking/AFAutoPurgingImageCache.m"; sourceTree = ""; };
 		37DB56D75062CC75FCB0966E1C6E8A8E /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; };
-		39B00F81866894A490C50B3CB8BE6BE3 /* libAFNetworking.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAFNetworking.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		3CE7518943ACF62538D905B41A52A67A /* UIAlertView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIAlertView+AFNetworking.m"; path = "UIKit+AFNetworking/UIAlertView+AFNetworking.m"; sourceTree = ""; };
-		3DA509BF18EADB9B060D72AAB1DF8D5A /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFNetworkReachabilityManager.m; path = AFNetworking/AFNetworkReachabilityManager.m; sourceTree = ""; };
-		417E0BC205D8B327F1521392A7033F85 /* libJSONModel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJSONModel.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		42FBDAB19198DA5E8A6A3B448FD556E9 /* MTLJSONAdapter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MTLJSONAdapter.m; path = Mantle/MTLJSONAdapter.m; sourceTree = ""; };
-		4346CF8A65CA74345B8FD5C8B6EE2C49 /* MTLTransformerErrorHandling.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MTLTransformerErrorHandling.m; path = Mantle/MTLTransformerErrorHandling.m; sourceTree = ""; };
-		45BE80F8CF2EBECA6792288C53953ED5 /* Mantle-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Mantle-prefix.pch"; sourceTree = ""; };
-		4606B084C0E1ED087ABEC2363E728606 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelClassProperty.m; path = JSONModel/JSONModel/JSONModelClassProperty.m; sourceTree = ""; };
-		46B794A5FA49A6717D143C72F716EC4D /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPRequestOperation.m; path = AFNetworking/AFHTTPRequestOperation.m; sourceTree = ""; };
-		46CCD50F7C0336C0C3820F8409363988 /* NSArray+MTLManipulationAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+MTLManipulationAdditions.m"; path = "Mantle/NSArray+MTLManipulationAdditions.m"; sourceTree = ""; };
-		49E20A5EA56DAA20CB23ED97E3A4114B /* EXTScope.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXTScope.h; path = Mantle/extobjc/EXTScope.h; sourceTree = ""; };
-		49E9E935EA1107C516DB16A8664A7E0D /* NSDictionary+MTLMappingAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+MTLMappingAdditions.h"; path = "Mantle/NSDictionary+MTLMappingAdditions.h"; sourceTree = ""; };
+		3A0598857874FC5B3F904AD70F874325 /* MJFoundation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJFoundation.m; path = MJExtension/MJFoundation.m; sourceTree = ""; };
+		3B6DE56F84D65424347CC9D56EC5370B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
+		3EBB821533A344C34D19E1733F7F9A8D /* NSObject+MJProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJProperty.m"; path = "MJExtension/NSObject+MJProperty.m"; sourceTree = ""; };
+		41217946E91010813B76690C9DFC1105 /* UIRefreshControl+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIRefreshControl+AFNetworking.h"; path = "UIKit+AFNetworking/UIRefreshControl+AFNetworking.h"; sourceTree = ""; };
 		4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; };
-		50BB70C4556B3F723DDAAA0213E95D42 /* UIKit+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIKit+AFNetworking.h"; path = "UIKit+AFNetworking/UIKit+AFNetworking.h"; sourceTree = ""; };
-		517F066A4E21937B80C1F8D49C4BAFF8 /* AFURLSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLSessionManager.m; path = AFNetworking/AFURLSessionManager.m; sourceTree = ""; };
-		51E464569961AF11674198443B94636B /* JSONValueTransformer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONValueTransformer.h; path = JSONModel/JSONModelTransformations/JSONValueTransformer.h; sourceTree = ""; };
-		5286910528DF78F0B0343CCA6AB09F09 /* MJProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJProperty.m; path = MJExtension/MJProperty.m; sourceTree = ""; };
-		547D9672C48263842AF7C717F2010CFC /* YYModel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "YYModel-prefix.pch"; sourceTree = ""; };
-		55E3A84F5844EC5439D62626CF3F2C9D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
-		5A10588801822F70C68D111FE9302B8D /* NSArray+JSONModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+JSONModel.h"; path = "JSONModel/JSONModelCategories/NSArray+JSONModel.h"; sourceTree = ""; };
-		5B05C5BCC73FC07CDDFA770F4521DC51 /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkReachabilityManager.h; path = AFNetworking/AFNetworkReachabilityManager.h; sourceTree = ""; };
-		5CBA8E46B6265E5A6613EAD13327A2D3 /* Mantle-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Mantle-dummy.m"; sourceTree = ""; };
-		61CD7B93F7501CF8250CB25B85298E03 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIWebView+AFNetworking.m"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.m"; sourceTree = ""; };
-		62482B5149F22F9C76A90080B92736DF /* MJPropertyKey.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJPropertyKey.m; path = MJExtension/MJPropertyKey.m; sourceTree = ""; };
-		6378162CD23C56E8A48F19D3BD11728B /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImageView+AFNetworking.h"; path = "UIKit+AFNetworking/UIImageView+AFNetworking.h"; sourceTree = ""; };
-		6378941E9F301A2F6AE18FB013E5862D /* NSValueTransformer+MTLPredefinedTransformerAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSValueTransformer+MTLPredefinedTransformerAdditions.h"; path = "Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h"; sourceTree = ""; };
-		66EF01084753F8DB45166F8CA5639720 /* AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = AFNetworking/AFNetworking.h; sourceTree = ""; };
-		6869A684A9A5BFA5D34D6D04FD7F8114 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; };
+		4FBF1C35E4FE511CBD674E6B75C711C8 /* AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = AFNetworking/AFNetworking.h; sourceTree = ""; };
+		51C6078130D3FD4382AFBBF5BBF6F148 /* NSObject+MJCoding.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJCoding.h"; path = "MJExtension/NSObject+MJCoding.h"; sourceTree = ""; };
+		53825EEF93A513DD30E6715170C64BB4 /* JSONModelError.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelError.h; path = JSONModel/JSONModel/JSONModelError.h; sourceTree = ""; };
+		568FF1FD83746C878127BCAC4589A917 /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLResponseSerialization.m; path = AFNetworking/AFURLResponseSerialization.m; sourceTree = ""; };
+		56FA46B010CEBE49ECAA163589A161AD /* YYClassInfo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYClassInfo.m; path = YYModel/YYClassInfo.m; sourceTree = ""; };
+		570014AD954196698AC88C9ECB9D7BA7 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFNetworkActivityIndicatorManager.m; path = "UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m"; sourceTree = ""; };
+		5736DF98F0742D3818C94976D85354EF /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPSessionManager.m; path = AFNetworking/AFHTTPSessionManager.m; sourceTree = ""; };
+		5BBDEF65A9F924C4C8BD9095702FAE5B /* MJExtensionConst.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJExtensionConst.h; path = MJExtension/MJExtensionConst.h; sourceTree = ""; };
+		5F3FA45D43C9C8FCA9EC4B3C9F7AEFC5 /* AFAutoPurgingImageCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFAutoPurgingImageCache.h; path = "UIKit+AFNetworking/AFAutoPurgingImageCache.h"; sourceTree = ""; };
+		605DF30C9166350543DFE255238CCEDA /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImageView+AFNetworking.h"; path = "UIKit+AFNetworking/UIImageView+AFNetworking.h"; sourceTree = ""; };
+		606D7D0847B4FB963BDBD947601FA6C6 /* JSONModelArray.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelArray.h; path = JSONModel/JSONModel/JSONModelArray.h; sourceTree = ""; };
+		683ED099B8DC4F9ED207255EF899E5B3 /* AFURLSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLSessionManager.m; path = AFNetworking/AFURLSessionManager.m; sourceTree = ""; };
 		6911BECA35E7518D864239B7E898EEF3 /* Pods-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-frameworks.sh"; sourceTree = ""; };
-		693AB91C68CD9AD4EB6FA079432375B1 /* NSDictionary+MTLMappingAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+MTLMappingAdditions.m"; path = "Mantle/NSDictionary+MTLMappingAdditions.m"; sourceTree = ""; };
-		699433929DA24984E6664239D76549FD /* NSDictionary+MTLJSONKeyPath.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+MTLJSONKeyPath.m"; path = "Mantle/NSDictionary+MTLJSONKeyPath.m"; sourceTree = ""; };
-		69C2DE584C3AD077A68993237076BAAE /* NSObject+MJClass.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJClass.h"; path = "MJExtension/NSObject+MJClass.h"; sourceTree = ""; };
-		6A52824CECC3C2F076DC9785BEC7D984 /* JSONValueTransformer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONValueTransformer.m; path = JSONModel/JSONModelTransformations/JSONValueTransformer.m; sourceTree = ""; };
-		6AFE8F4319CD04A43C5F9F851D4D1AE5 /* UIButton+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIButton+AFNetworking.h"; path = "UIKit+AFNetworking/UIButton+AFNetworking.h"; sourceTree = ""; };
-		6B3023923DDE19B5616A2B21AB3C9CF7 /* AFNetworking-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AFNetworking-dummy.m"; sourceTree = ""; };
-		6C304F8FED1D085E22FD1280B5D77586 /* JSONModelError.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelError.m; path = JSONModel/JSONModel/JSONModelError.m; sourceTree = ""; };
-		6CBFAFAFAE26266577C99488F121C40A /* libMantle.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMantle.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		6E4CCE6EF81633E4755F9E4DDDD07233 /* MJExtensionConst.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJExtensionConst.h; path = MJExtension/MJExtensionConst.h; sourceTree = ""; };
-		7044A8D4DEB32AE1FA59742A904E261E /* NSObject+YYModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+YYModel.m"; path = "YYModel/NSObject+YYModel.m"; sourceTree = ""; };
-		747E6D04C111E27692C52F33A0DC2804 /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPSessionManager.h; path = AFNetworking/AFHTTPSessionManager.h; sourceTree = ""; };
-		74B431BAC2D298913655B42A8D46A5E4 /* MJFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJFoundation.h; path = MJExtension/MJFoundation.h; sourceTree = ""; };
-		755387304D50A7D9245D238969B53A54 /* AFHTTPRequestOperationManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPRequestOperationManager.h; path = AFNetworking/AFHTTPRequestOperationManager.h; sourceTree = ""; };
-		764F13F69DD94DF68A6DE4179E5214E4 /* NSValueTransformer+MTLPredefinedTransformerAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSValueTransformer+MTLPredefinedTransformerAdditions.m"; path = "Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.m"; sourceTree = ""; };
-		7AC5501BD5D9BBDBD2839C794DD1F25A /* libMJExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMJExtension.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		7AEC3111A0670EB53B0463B74BEDB19E /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLConnectionOperation.m; path = AFNetworking/AFURLConnectionOperation.m; sourceTree = ""; };
-		7B1FC1AA50B49519B86163979CB8A669 /* UIButton+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIButton+AFNetworking.m"; path = "UIKit+AFNetworking/UIButton+AFNetworking.m"; sourceTree = ""; };
-		7CB1AA1881672BAF9306471FC500786C /* JSONModel+networking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "JSONModel+networking.m"; path = "JSONModel/JSONModelNetworking/JSONModel+networking.m"; sourceTree = ""; };
-		7DD247EEBC8F689FDE4391C68DBD399A /* YYModel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "YYModel-dummy.m"; sourceTree = ""; };
-		7E2C574EA250AFF37FC2AB81324C8133 /* EXTRuntimeExtensions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXTRuntimeExtensions.h; path = Mantle/extobjc/EXTRuntimeExtensions.h; sourceTree = ""; };
-		7F94F9D09008555558898DE3D9A40948 /* MJFoundation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJFoundation.m; path = MJExtension/MJFoundation.m; sourceTree = ""; };
-		8097081E15C875F726C527B4065CF3A4 /* JSONModel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JSONModel.xcconfig; sourceTree = ""; };
-		812FA1FB893E768781BC5D5573FAD0C7 /* NSObject+YYModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+YYModel.h"; path = "YYModel/NSObject+YYModel.h"; sourceTree = ""; };
-		81A94E4E5F08A61D2AA27A47A9D968EA /* MJPropertyKey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJPropertyKey.h; path = MJExtension/MJPropertyKey.h; sourceTree = ""; };
-		81D478E76465C2A7351BCAC0D621CB2A /* NSArray+MTLManipulationAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MTLManipulationAdditions.h"; path = "Mantle/NSArray+MTLManipulationAdditions.h"; sourceTree = ""; };
-		820BD9320EDC55FA84AC92F397FF9854 /* UIAlertView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIAlertView+AFNetworking.h"; path = "UIKit+AFNetworking/UIAlertView+AFNetworking.h"; sourceTree = ""; };
-		8224BFE306F6013C9F8FE410E22E92BC /* NSString+MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+MJExtension.h"; path = "MJExtension/NSString+MJExtension.h"; sourceTree = ""; };
-		84DB5B311AFF4ECE63B6F937BCB4018F /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkActivityIndicatorManager.h; path = "UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h"; sourceTree = ""; };
-		87F27AB9477FB2BF28FB99D27E248FC2 /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLRequestSerialization.h; path = AFNetworking/AFURLRequestSerialization.h; sourceTree = ""; };
-		8F08F383BECC6CD5088A2A6B8032D690 /* JSONModelError.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelError.h; path = JSONModel/JSONModel/JSONModelError.h; sourceTree = ""; };
-		90C054DEF8692887256ADE1349AA8187 /* MJExtensionConst.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJExtensionConst.m; path = MJExtension/MJExtensionConst.m; sourceTree = ""; };
-		92B0C6E96833E03BE1835E1B18DDC907 /* YYModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYModel.h; path = YYModel/YYModel.h; sourceTree = ""; };
-		92C189A8ABB894FCF9709C280DE44269 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; };
-		9656F51F4F66896775CFCEF013C09396 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; };
+		694CB19852BE17F2C26C5D73A4CE5803 /* AFSecurityPolicy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFSecurityPolicy.h; path = AFNetworking/AFSecurityPolicy.h; sourceTree = ""; };
+		6976E680B55994F52B52A304AB853DE0 /* AFNetworking-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AFNetworking-dummy.m"; sourceTree = ""; };
+		6A5DB84379C661F19696BD0A90AEBCF6 /* 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; };
+		6FEF7A1ED9EEE822067486386BC961C0 /* JSONModelArray.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelArray.m; path = JSONModel/JSONModel/JSONModelArray.m; sourceTree = ""; };
+		72A3070877E2EDE3412BC35DADA16664 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; };
+		762C637B05C8420EE066D9D4089BDA20 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelClassProperty.h; path = JSONModel/JSONModel/JSONModelClassProperty.h; sourceTree = ""; };
+		772086E7A720BEE07E74BE9A73B6F9B3 /* YYModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYModel.h; path = YYModel/YYModel.h; sourceTree = ""; };
+		7768F1CE57584E28E3CDEF3560814CB0 /* AFImageDownloader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFImageDownloader.m; path = "UIKit+AFNetworking/AFImageDownloader.m"; sourceTree = ""; };
+		78ADF25BFDEA7B435BFBC3289EA0F685 /* JSONKeyMapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONKeyMapper.h; path = JSONModel/JSONModelTransformations/JSONKeyMapper.h; sourceTree = ""; };
+		79829287BCBCC690C7FCE131DC126CE1 /* UIProgressView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIProgressView+AFNetworking.h"; path = "UIKit+AFNetworking/UIProgressView+AFNetworking.h"; sourceTree = ""; };
+		79AE56F69183875C9707391B56CED09B /* JSONHTTPClient.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONHTTPClient.h; path = JSONModel/JSONModelNetworking/JSONHTTPClient.h; sourceTree = ""; };
+		79F23D3EBFB558E7650521B9D0E5D7EE /* MJExtension-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MJExtension-dummy.m"; sourceTree = ""; };
+		7BB7B4D2582678DC9368CC97C3818790 /* libAFNetworking.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAFNetworking.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		7EE57AF8BE9E222A9D3BB35E9C401DC8 /* JSONModel+networking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "JSONModel+networking.m"; path = "JSONModel/JSONModelNetworking/JSONModel+networking.m"; sourceTree = ""; };
+		8803B5EE9052C56316D8530CF8FE1E9F /* libMJExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMJExtension.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		89999F3254566BA6BAAB83FC901C18C3 /* JSONModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModel.h; path = JSONModel/JSONModel/JSONModel.h; sourceTree = ""; };
+		8AAFAD7F1D7566D3AFC19B5112F065E0 /* NSObject+MJProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJProperty.h"; path = "MJExtension/NSObject+MJProperty.h"; sourceTree = ""; };
+		8B383E314994657BBF9B1CE8651A1E9D /* NSObject+MJClass.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJClass.m"; path = "MJExtension/NSObject+MJClass.m"; sourceTree = ""; };
+		8ED525C57A27F45647D49FB32C45E674 /* AFURLSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLSessionManager.h; path = AFNetworking/AFURLSessionManager.h; sourceTree = ""; };
+		8EF2D16B1D7A2D59AB8B64476669DA69 /* JSONModelLib.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelLib.h; path = JSONModel/JSONModelLib.h; sourceTree = ""; };
+		8F16E49B40D463D28F84C5FC3AE1D65D /* MJPropertyKey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJPropertyKey.h; path = MJExtension/MJPropertyKey.h; sourceTree = ""; };
+		94B8A461A67B37B6C20F8EE94AC88C1E /* UIActivityIndicatorView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIActivityIndicatorView+AFNetworking.h"; path = "UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h"; sourceTree = ""; };
+		95739C032898627373FB604DC150D252 /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLRequestSerialization.h; path = AFNetworking/AFURLRequestSerialization.h; sourceTree = ""; };
+		95E31C6339B6FF746D8B1E8A3C403476 /* UIImage+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImage+AFNetworking.h"; path = "UIKit+AFNetworking/UIImage+AFNetworking.h"; sourceTree = ""; };
+		96AF26095E6CC2BF6F911ED1CEE3742E /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLRequestSerialization.m; path = AFNetworking/AFURLRequestSerialization.m; sourceTree = ""; };
+		9758E552171AF9F7D972581E28F81CB9 /* YYModel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "YYModel-dummy.m"; sourceTree = ""; };
 		98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; };
-		9AD8C5D8E09BBD5A4AC2D3690AC606B3 /* NSObject+MJKeyValue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJKeyValue.h"; path = "MJExtension/NSObject+MJKeyValue.h"; sourceTree = ""; };
-		9AFB853F6C2BC5C69E8A61B5719A183E /* JSONModelArray.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelArray.h; path = JSONModel/JSONModel/JSONModelArray.h; sourceTree = ""; };
-		A01A01B9B0E7C18C9CE55A3D240E4559 /* JSONModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModel.h; path = JSONModel/JSONModel/JSONModel.h; sourceTree = ""; };
-		A0E773A406D82CE685D20902217024D3 /* NSValueTransformer+MTLInversionAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSValueTransformer+MTLInversionAdditions.h"; path = "Mantle/NSValueTransformer+MTLInversionAdditions.h"; sourceTree = ""; };
+		9EE7B9220EAFF520C793DA70E7E41C0F /* MJProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJProperty.m; path = MJExtension/MJProperty.m; sourceTree = ""; };
+		A06C5C8DBE28531332E9E8C5C44C4BEE /* NSObject+MJClass.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJClass.h"; path = "MJExtension/NSObject+MJClass.h"; sourceTree = ""; };
+		A0B544ED7C1030605D2D1A5A6B45DA46 /* JSONModelError.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelError.m; path = JSONModel/JSONModel/JSONModelError.m; sourceTree = ""; };
+		A108DF0EA1738A62975EEC8F827F5280 /* YYModel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "YYModel-prefix.pch"; sourceTree = ""; };
+		A15E16D7614431788C53003DAEE065BB /* UIKit+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIKit+AFNetworking.h"; path = "UIKit+AFNetworking/UIKit+AFNetworking.h"; sourceTree = ""; };
 		A1A36D34413696BE466E2CA0AFF194DA /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; };
-		A7ADA8C752C529E44B54E7FB92EE7CDF /* EXTKeyPathCoding.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXTKeyPathCoding.h; path = Mantle/extobjc/EXTKeyPathCoding.h; sourceTree = ""; };
-		A8E9937A5D52CD8C5B4390D1EFB5B057 /* metamacros.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = metamacros.h; path = Mantle/extobjc/metamacros.h; sourceTree = ""; };
-		ACF898DFB9464BC29A8AEF36B20DD5A6 /* MTLReflection.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MTLReflection.h; path = Mantle/MTLReflection.h; sourceTree = ""; };
-		B0FA4CEED6A4A71D262BB4340300358A /* AFSecurityPolicy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFSecurityPolicy.h; path = AFNetworking/AFSecurityPolicy.h; sourceTree = ""; };
-		B15AE9442D0520B46513D5F6C0989C9A /* NSObject+MJCoding.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJCoding.h"; path = "MJExtension/NSObject+MJCoding.h"; sourceTree = ""; };
-		B18808FB8D0C431518C27E74BA43E0C7 /* MJPropertyType.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJPropertyType.m; path = MJExtension/MJPropertyType.m; sourceTree = ""; };
-		B27961CB210EA7ADDC8172D563424DCB /* MJExtension.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MJExtension.xcconfig; sourceTree = ""; };
-		B56AFC45F43DE6CACFF0F1D3895F77BD /* UIRefreshControl+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIRefreshControl+AFNetworking.m"; path = "UIKit+AFNetworking/UIRefreshControl+AFNetworking.m"; sourceTree = ""; };
-		B8FD905D61FA0F0B0A34CB4CACFB151E /* MTLValueTransformer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MTLValueTransformer.h; path = Mantle/MTLValueTransformer.h; sourceTree = ""; };
-		B90460F20E9AB8D92EF393C4C0A81800 /* MTLJSONAdapter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MTLJSONAdapter.h; path = Mantle/MTLJSONAdapter.h; sourceTree = ""; };
+		A8A0939EA5EE600F60DDE7CB862C46DF /* JSONAPI.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONAPI.m; path = JSONModel/JSONModelNetworking/JSONAPI.m; sourceTree = ""; };
+		ABF79941E73EE92262DB17D67C076F9B /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		AFF88B33AAF17BA8BC3062C218E19A78 /* libJSONModel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJSONModel.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		B10E3C58BA72DDEA3175AFF7A4CDA5E9 /* JSONModel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JSONModel-dummy.m"; sourceTree = ""; };
+		B67DC869DDEDBE2850A11E2929E0BD82 /* NSObject+MJKeyValue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MJKeyValue.h"; path = "MJExtension/NSObject+MJKeyValue.h"; sourceTree = ""; };
+		B7A7F4C024C31B3443763BF2AC8A220F /* JSONHTTPClient.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONHTTPClient.m; path = JSONModel/JSONModelNetworking/JSONHTTPClient.m; sourceTree = ""; };
+		B9324D39DB35A688FF68D4BB1B2C8A96 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; };
 		BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
-		BCC05F6DD346D91012CE8C31DDF60F7F /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLConnectionOperation.h; path = AFNetworking/AFURLConnectionOperation.h; sourceTree = ""; };
-		BEE462F260358EA9E4C77AB8CDFC2BEC /* UIProgressView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIProgressView+AFNetworking.h"; path = "UIKit+AFNetworking/UIProgressView+AFNetworking.h"; sourceTree = ""; };
-		BF7F3CC4A2768BF5541DD8C32A83F374 /* AFNetworking-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AFNetworking-prefix.pch"; sourceTree = ""; };
-		BF9C5C30EED59CDC880B5A8849AF5627 /* Mantle.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Mantle.xcconfig; sourceTree = ""; };
-		C00322F1FE64C27DDBA42C6C22892BEC /* JSONModel+networking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "JSONModel+networking.h"; path = "JSONModel/JSONModelNetworking/JSONModel+networking.h"; sourceTree = ""; };
-		C42CDD287DF20EF3E287445607A1D09D /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIWebView+AFNetworking.h"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.h"; sourceTree = ""; };
-		C479DE3A22634423C37795A0222AD192 /* MTLModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MTLModel.h; path = Mantle/MTLModel.h; sourceTree = ""; };
-		C602EF86A679370BF44CE261B81E0A32 /* NSDictionary+MTLJSONKeyPath.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+MTLJSONKeyPath.h"; path = "Mantle/NSDictionary+MTLJSONKeyPath.h"; sourceTree = ""; };
-		C79BDE7605B6A0EA11323F7F8434353A /* AFNetworking.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AFNetworking.xcconfig; sourceTree = ""; };
-		C8240BCF6AC273CD3334B14A0CA5F70F /* NSObject+MTLComparisonAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+MTLComparisonAdditions.h"; path = "Mantle/NSObject+MTLComparisonAdditions.h"; sourceTree = ""; };
-		CE51061E32E1AE4F36EBD905650AC1AC /* JSONAPI.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONAPI.h; path = JSONModel/JSONModelNetworking/JSONAPI.h; sourceTree = ""; };
-		CEE1E60538AA84193A987BF8B5E08060 /* MTLModel+NSCoding.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "MTLModel+NSCoding.m"; path = "Mantle/MTLModel+NSCoding.m"; sourceTree = ""; };
-		D0C6948DC2ECA684D01A7701D2A81F6D /* NSValueTransformer+MTLInversionAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSValueTransformer+MTLInversionAdditions.m"; path = "Mantle/NSValueTransformer+MTLInversionAdditions.m"; sourceTree = ""; };
-		D0ED8E585586D557C343E95938CDDEA9 /* NSString+MJExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+MJExtension.m"; path = "MJExtension/NSString+MJExtension.m"; sourceTree = ""; };
-		D44B4170B9B0ADEC5CF3153CE766FFE5 /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPSessionManager.m; path = AFNetworking/AFHTTPSessionManager.m; sourceTree = ""; };
-		D58B2A28EF037B1C43966EA747D5A18C /* MJProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJProperty.h; path = MJExtension/MJProperty.h; sourceTree = ""; };
-		D58F7CF62CECDDCFFB2CE8DB8ED95FFD /* JSONModelArray.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelArray.m; path = JSONModel/JSONModel/JSONModelArray.m; sourceTree = ""; };
-		D67D5C336FE897607601F529530629EE /* libYYModel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libYYModel.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		DED5C6E3D1B56EB65D8D732EB4A3DCF7 /* MTLModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MTLModel.m; path = Mantle/MTLModel.m; sourceTree = ""; };
-		DF86A5F9C917556FD0AEA6A2CA64F307 /* JSONAPI.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONAPI.m; path = JSONModel/JSONModelNetworking/JSONAPI.m; sourceTree = ""; };
-		E0DB9304D24AF0303E86EE178207EF7A /* MTLTransformerErrorHandling.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MTLTransformerErrorHandling.h; path = Mantle/MTLTransformerErrorHandling.h; sourceTree = ""; };
-		E1218B003261203A4479CAEAC42EA6C3 /* EXTRuntimeExtensions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EXTRuntimeExtensions.m; path = Mantle/extobjc/EXTRuntimeExtensions.m; sourceTree = ""; };
-		E3384E81663101B2F54EA9FFD3F852C8 /* JSONHTTPClient.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONHTTPClient.h; path = JSONModel/JSONModelNetworking/JSONHTTPClient.h; sourceTree = ""; };
-		E43B61027789A5A43625808E7BFA32B4 /* NSError+MTLModelException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSError+MTLModelException.m"; path = "Mantle/NSError+MTLModelException.m"; sourceTree = ""; };
-		E7A8605E692E730F26F9E326C41B041E /* JSONModel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JSONModel-dummy.m"; sourceTree = ""; };
-		E8B07C2F01394779D77C956001C69B15 /* JSONKeyMapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONKeyMapper.h; path = JSONModel/JSONModelTransformations/JSONKeyMapper.h; sourceTree = ""; };
-		E8EC7DCCDCA113456DD757C1CAF427D9 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelClassProperty.h; path = JSONModel/JSONModel/JSONModelClassProperty.h; sourceTree = ""; };
-		EA23824EA0DCACBB83504576391BA94B /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLResponseSerialization.h; path = AFNetworking/AFURLResponseSerialization.h; sourceTree = ""; };
-		F11F3B7C3853679BB2440391507EEC84 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImageView+AFNetworking.m"; path = "UIKit+AFNetworking/UIImageView+AFNetworking.m"; sourceTree = ""; };
-		F3197E61E2AB5AB6171C369AFBAC7DF3 /* Mantle.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Mantle.h; path = Mantle/Mantle.h; sourceTree = ""; };
-		F376B0AD431DE9EC2C768F4164E34554 /* MJDictionaryCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJDictionaryCache.h; path = MJExtension/MJDictionaryCache.h; sourceTree = ""; };
-		F7CC08D44967AF4EC66DB3F0F7E7E017 /* MJPropertyType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJPropertyType.h; path = MJExtension/MJPropertyType.h; sourceTree = ""; };
-		F80CA79EB9622595D8E3E37CC0C3A0AE /* MJExtension-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MJExtension-prefix.pch"; sourceTree = ""; };
-		FF32639C51955295435F7451FA380ED6 /* MTLValueTransformer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MTLValueTransformer.m; path = Mantle/MTLValueTransformer.m; sourceTree = ""; };
-		FF74AE1072D0E171334111EA616EA075 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
-		FFDF7671CC822F08C6B0EE507E27F989 /* MTLModel+NSCoding.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "MTLModel+NSCoding.h"; path = "Mantle/MTLModel+NSCoding.h"; sourceTree = ""; };
+		BC6CC063ACC1F6FE00EF71234311F58A /* JSONModel+networking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "JSONModel+networking.h"; path = "JSONModel/JSONModelNetworking/JSONModel+networking.h"; sourceTree = ""; };
+		BC888124383F31FABAD2DBCA0258E4C0 /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFNetworkReachabilityManager.m; path = AFNetworking/AFNetworkReachabilityManager.m; sourceTree = ""; };
+		C011FAFEF5F72BD91B8A7457C6A5BC51 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelClassProperty.m; path = JSONModel/JSONModel/JSONModelClassProperty.m; sourceTree = ""; };
+		C071C02114CA941F64C49AAF09814027 /* MJExtensionConst.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJExtensionConst.m; path = MJExtension/MJExtensionConst.m; sourceTree = ""; };
+		C212172B3D7D18D7C61117B4EDDEBCD5 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; };
+		C22C1BC853172E422FEF5EF93570D8E7 /* JSONValueTransformer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONValueTransformer.h; path = JSONModel/JSONModelTransformations/JSONValueTransformer.h; sourceTree = ""; };
+		C5E04BFD653E957815687FB6B84346F2 /* MJExtension-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MJExtension-prefix.pch"; sourceTree = ""; };
+		C6C57CE34C9E2C2822BAA82F4992D134 /* NSString+MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+MJExtension.h"; path = "MJExtension/NSString+MJExtension.h"; sourceTree = ""; };
+		C9BA894149C19F87CB96CEE950D360BC /* UIRefreshControl+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIRefreshControl+AFNetworking.m"; path = "UIKit+AFNetworking/UIRefreshControl+AFNetworking.m"; sourceTree = ""; };
+		CA0ABF05F7A4FE382E97682A0D79E6B6 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImageView+AFNetworking.m"; path = "UIKit+AFNetworking/UIImageView+AFNetworking.m"; sourceTree = ""; };
+		CA16A97351CF0951017229B9ADED3EA9 /* YYModel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYModel.xcconfig; sourceTree = ""; };
+		CCBC929C9E59A1135390CE347E32968E /* JSONValueTransformer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONValueTransformer.m; path = JSONModel/JSONModelTransformations/JSONValueTransformer.m; sourceTree = ""; };
+		CF934BFEEA5FA3615572D22E4CF4648B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; };
+		D101A1B7B2778D25952EAA75B6B4E045 /* AFNetworking-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AFNetworking-prefix.pch"; sourceTree = ""; };
+		D72CDCE204D482B05EA1B80D8B34ACF4 /* AFImageDownloader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFImageDownloader.h; path = "UIKit+AFNetworking/AFImageDownloader.h"; sourceTree = ""; };
+		D866A4F9683B952C4632B6900399C1CA /* UIActivityIndicatorView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIActivityIndicatorView+AFNetworking.m"; path = "UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m"; sourceTree = ""; };
+		DFE1348BB15D6AA58C3F99AC8D1269D7 /* YYClassInfo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYClassInfo.h; path = YYModel/YYClassInfo.h; sourceTree = ""; };
+		E2566ABB3855D6A96B37F3462DA072AD /* NSObject+MJCoding.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+MJCoding.m"; path = "MJExtension/NSObject+MJCoding.m"; sourceTree = ""; };
+		E5FCE11A818E00B7170F16C89C741BB8 /* UIButton+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIButton+AFNetworking.m"; path = "UIKit+AFNetworking/UIButton+AFNetworking.m"; sourceTree = ""; };
+		E7C541D5DBF5773D1A719F64A2C02FD9 /* NSObject+YYModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+YYModel.m"; path = "YYModel/NSObject+YYModel.m"; sourceTree = ""; };
+		E95E92B6FE793A66B9896C713B3FD432 /* MJPropertyType.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJPropertyType.m; path = MJExtension/MJPropertyType.m; sourceTree = ""; };
+		EE775111EAE322796A4538E35771BBBB /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkReachabilityManager.h; path = AFNetworking/AFNetworkReachabilityManager.h; sourceTree = ""; };
+		EEF0B37A25CA2F613CAE76EEF68257F7 /* JSONModel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JSONModel.xcconfig; sourceTree = ""; };
+		F1215BC9A793FB17C066FE391E6EA50F /* MJFoundation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJFoundation.h; path = MJExtension/MJFoundation.h; sourceTree = ""; };
+		F500D47A6BA8F1BD53546191FF7BBFA6 /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIWebView+AFNetworking.h"; path = "UIKit+AFNetworking/UIWebView+AFNetworking.h"; sourceTree = ""; };
+		F74CAE0F7916433AC14ED64284CC56E1 /* MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJExtension.h; path = MJExtension/MJExtension.h; sourceTree = ""; };
+		FEC2AE555ABD0E86EBEA5445EE9AC671 /* JSONAPI.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONAPI.h; path = JSONModel/JSONModelNetworking/JSONAPI.h; sourceTree = ""; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
-		04F6492DF0B7A5669B29FD4F7C390666 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				3B1575769C2E1566036FFF2F22917E72 /* CoreGraphics.framework in Frameworks */,
-				4AD68C44057762C862EB902673B98C56 /* Foundation.framework in Frameworks */,
-				E43F5D7E2C48C315DDA216F87E47B50B /* MobileCoreServices.framework in Frameworks */,
-				1050F5E599DEA3C0FA7990B9C56E4073 /* Security.framework in Frameworks */,
-				95E69A233A1D42F7E36D4D4C79E5AF46 /* SystemConfiguration.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		1399F5F5B8A99754AF89DC93A9E100DE /* Frameworks */ = {
+		508C962B3E08E8DA04956BF349A3CDFD /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				FE983ADC2960099312AF536D2916BC7A /* Foundation.framework in Frameworks */,
+				2053D71CF543C3A3CC47C5409D61923C /* CoreGraphics.framework in Frameworks */,
+				6083F51989A0009C740D92767F4DC1FC /* Foundation.framework in Frameworks */,
+				00F09DB5E05D1208F27161E2F016FE36 /* MobileCoreServices.framework in Frameworks */,
+				022B549F10007177A43FAB1DD5114F7D /* Security.framework in Frameworks */,
+				CE8965366A3B07A6C0615055A31B8B83 /* SystemConfiguration.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		20EE9ED36E81349A351EA9C5D223D256 /* Frameworks */ = {
+		71CD5942D56EF0F1B69859C450134AE1 /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				70F80E780DA0D521E2007C1AF9EE1C64 /* Foundation.framework in Frameworks */,
+				30ADD2DFE00481F01BC0DB9C865C37F0 /* Foundation.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		5A6B1E07912E48C49E2E6E59701001AE /* Frameworks */ = {
+		747242460B935FEA3E994652BD8C2E0B /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				61D3D263146EF150595EAD54ACEEAC4F /* Foundation.framework in Frameworks */,
+				7010A5470E849DDCF43C386E942E2802 /* Foundation.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		E53E1CB1874DFF6D48D7F509D556395B /* Frameworks */ = {
+		DEC35FC4E82B28A482CF2F9A1F675225 /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				57C6D7D4CE5563FB7F6864E2D3A09383 /* CoreFoundation.framework in Frameworks */,
-				48BF475E818BD005DDCF7AF07202607D /* Foundation.framework in Frameworks */,
-				53E42D87DFE481987214194A79FCDB7C /* UIKit.framework in Frameworks */,
+				1D5AFB312B9E1998E07482EE22ECF18D /* CoreFoundation.framework in Frameworks */,
+				87E1452814A23210667EE6E16FD6A054 /* Foundation.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -410,156 +306,184 @@
 			name = "Targets Support Files";
 			sourceTree = "";
 		};
-		05C283EFD3155A71FB0EE750902933F6 /* YYModel */ = {
+		0F75DF6C7C5F002280EC53F48E80B587 /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
-				812FA1FB893E768781BC5D5573FAD0C7 /* NSObject+YYModel.h */,
-				7044A8D4DEB32AE1FA59742A904E261E /* NSObject+YYModel.m */,
-				18934327AC3301B847335FA1F1FBB9D0 /* YYClassInfo.h */,
-				02434DFDE40D6DAAFFE5CA56A70AF52F /* YYClassInfo.m */,
-				92B0C6E96833E03BE1835E1B18DDC907 /* YYModel.h */,
-				F4C4BA42174570EEE443D721AC0245F5 /* Support Files */,
+				684AD870EB40055B31A36149B4428D3A /* iOS */,
 			);
-			path = YYModel;
+			name = Frameworks;
 			sourceTree = "";
 		};
-		061495081F45523E1D008EA09DF18020 /* iOS */ = {
+		2A08F800BA29DF4F840D071D326F6267 /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				92C189A8ABB894FCF9709C280DE44269 /* CoreFoundation.framework */,
-				2985156A5BB2598BF675A22BA9351ECD /* CoreGraphics.framework */,
-				FF74AE1072D0E171334111EA616EA075 /* Foundation.framework */,
-				6869A684A9A5BFA5D34D6D04FD7F8114 /* MobileCoreServices.framework */,
-				9656F51F4F66896775CFCEF013C09396 /* Security.framework */,
-				153842FACD0B322932EE55A33B6F68F0 /* SystemConfiguration.framework */,
-				55E3A84F5844EC5439D62626CF3F2C9D /* UIKit.framework */,
+				7BB7B4D2582678DC9368CC97C3818790 /* libAFNetworking.a */,
+				AFF88B33AAF17BA8BC3062C218E19A78 /* libJSONModel.a */,
+				8803B5EE9052C56316D8530CF8FE1E9F /* libMJExtension.a */,
+				ABF79941E73EE92262DB17D67C076F9B /* libPods.a */,
+				04D8ADC28CE66AA6064AFA3095238FCE /* libYYModel.a */,
 			);
-			name = iOS;
+			name = Products;
 			sourceTree = "";
 		};
-		17A752719FCB90D610F75DDB8DC7F71E /* AFNetworking */ = {
+		4F77068E9C53924272CBAEFC701A445F /* AFNetworking */ = {
 			isa = PBXGroup;
 			children = (
-				66EF01084753F8DB45166F8CA5639720 /* AFNetworking.h */,
-				EECE178F0D6B07761FA07801920DA70E /* NSURLConnection */,
-				EE9628FB5CA7DBB82C512D1AB1FF4E1A /* NSURLSession */,
-				FF99DFA55ACDD549413CA082BD56AC32 /* Reachability */,
-				BF4C79FDFF2C672B95ADC823868F9186 /* Security */,
-				A2867805A452DB01DA7EE89D748E0A23 /* Serialization */,
-				392C2CB035BCB357E88B8D0EBECFC6D9 /* Support Files */,
-				F0B4FA466F5025CB70E5BFC1AB5D213B /* UIKit */,
+				4FBF1C35E4FE511CBD674E6B75C711C8 /* AFNetworking.h */,
+				DCA41C418B415029539173E4213D4FA6 /* NSURLSession */,
+				7BEA85F46BBA1D09214D6DB97C0A38B1 /* Reachability */,
+				786AF97A8A7EE24A42DE1023D5587FFF /* Security */,
+				CB9FFF1956FC47B77F7CCBC5431BAC2A /* Serialization */,
+				7B77215B6A98FE63A5A2C37F3C613703 /* Support Files */,
+				CC7B3BCD6368019F1144068EF64D068A /* UIKit */,
 			);
 			path = AFNetworking;
 			sourceTree = "";
 		};
-		2E0888CD123A983AD7A2C09B3A65FA2E /* Support Files */ = {
+		52D27A7CA119F3A60A9EE59BF5693A72 /* MJExtension */ = {
 			isa = PBXGroup;
 			children = (
-				B27961CB210EA7ADDC8172D563424DCB /* MJExtension.xcconfig */,
-				337C2EFC61D990AB6618EB201A4D4CF0 /* MJExtension-dummy.m */,
-				F80CA79EB9622595D8E3E37CC0C3A0AE /* MJExtension-prefix.pch */,
+				F74CAE0F7916433AC14ED64284CC56E1 /* MJExtension.h */,
+				5BBDEF65A9F924C4C8BD9095702FAE5B /* MJExtensionConst.h */,
+				C071C02114CA941F64C49AAF09814027 /* MJExtensionConst.m */,
+				F1215BC9A793FB17C066FE391E6EA50F /* MJFoundation.h */,
+				3A0598857874FC5B3F904AD70F874325 /* MJFoundation.m */,
+				03FF46035379319020BE1062C07401FD /* MJProperty.h */,
+				9EE7B9220EAFF520C793DA70E7E41C0F /* MJProperty.m */,
+				8F16E49B40D463D28F84C5FC3AE1D65D /* MJPropertyKey.h */,
+				1C2D2A962D0939A6AA9197643DF51EF5 /* MJPropertyKey.m */,
+				0F45A7067F29BC663CC9450001F8B814 /* MJPropertyType.h */,
+				E95E92B6FE793A66B9896C713B3FD432 /* MJPropertyType.m */,
+				A06C5C8DBE28531332E9E8C5C44C4BEE /* NSObject+MJClass.h */,
+				8B383E314994657BBF9B1CE8651A1E9D /* NSObject+MJClass.m */,
+				51C6078130D3FD4382AFBBF5BBF6F148 /* NSObject+MJCoding.h */,
+				E2566ABB3855D6A96B37F3462DA072AD /* NSObject+MJCoding.m */,
+				B67DC869DDEDBE2850A11E2929E0BD82 /* NSObject+MJKeyValue.h */,
+				21503577811075171479CA9DC58BE711 /* NSObject+MJKeyValue.m */,
+				8AAFAD7F1D7566D3AFC19B5112F065E0 /* NSObject+MJProperty.h */,
+				3EBB821533A344C34D19E1733F7F9A8D /* NSObject+MJProperty.m */,
+				C6C57CE34C9E2C2822BAA82F4992D134 /* NSString+MJExtension.h */,
+				0C5E49AA1C5846BAC6A6D8B8A754FDFD /* NSString+MJExtension.m */,
+				A47E17B19B66B154EBF35D408095D66F /* Support Files */,
 			);
-			name = "Support Files";
-			path = "../Target Support Files/MJExtension";
+			path = MJExtension;
 			sourceTree = "";
 		};
-		392C2CB035BCB357E88B8D0EBECFC6D9 /* Support Files */ = {
+		5F652B322D787CF0ED0F7D1A4550B353 /* YYModel */ = {
 			isa = PBXGroup;
 			children = (
-				C79BDE7605B6A0EA11323F7F8434353A /* AFNetworking.xcconfig */,
-				6B3023923DDE19B5616A2B21AB3C9CF7 /* AFNetworking-dummy.m */,
-				BF7F3CC4A2768BF5541DD8C32A83F374 /* AFNetworking-prefix.pch */,
+				18DA3BEF587E6A26A30D88E05C80BDE2 /* NSObject+YYModel.h */,
+				E7C541D5DBF5773D1A719F64A2C02FD9 /* NSObject+YYModel.m */,
+				DFE1348BB15D6AA58C3F99AC8D1269D7 /* YYClassInfo.h */,
+				56FA46B010CEBE49ECAA163589A161AD /* YYClassInfo.m */,
+				772086E7A720BEE07E74BE9A73B6F9B3 /* YYModel.h */,
+				D958138A2C131E18A1F89EB4CCFB1A02 /* Support Files */,
 			);
-			name = "Support Files";
-			path = "../Target Support Files/AFNetworking";
+			path = YYModel;
 			sourceTree = "";
 		};
-		398E51A3A853E8C3D196188A25BD139F /* Support Files */ = {
+		684AD870EB40055B31A36149B4428D3A /* iOS */ = {
 			isa = PBXGroup;
 			children = (
-				8097081E15C875F726C527B4065CF3A4 /* JSONModel.xcconfig */,
-				E7A8605E692E730F26F9E326C41B041E /* JSONModel-dummy.m */,
-				33EF955F11C936B384AF043A05756BE3 /* JSONModel-prefix.pch */,
+				CF934BFEEA5FA3615572D22E4CF4648B /* CoreFoundation.framework */,
+				C212172B3D7D18D7C61117B4EDDEBCD5 /* CoreGraphics.framework */,
+				3B6DE56F84D65424347CC9D56EC5370B /* Foundation.framework */,
+				B9324D39DB35A688FF68D4BB1B2C8A96 /* MobileCoreServices.framework */,
+				72A3070877E2EDE3412BC35DADA16664 /* Security.framework */,
+				6A5DB84379C661F19696BD0A90AEBCF6 /* SystemConfiguration.framework */,
 			);
-			name = "Support Files";
-			path = "../Target Support Files/JSONModel";
+			name = iOS;
 			sourceTree = "";
 		};
-		405265C0D1CCE71AAA608DF42B60562B /* extobjc */ = {
+		786AF97A8A7EE24A42DE1023D5587FFF /* Security */ = {
 			isa = PBXGroup;
 			children = (
-				A7ADA8C752C529E44B54E7FB92EE7CDF /* EXTKeyPathCoding.h */,
-				7E2C574EA250AFF37FC2AB81324C8133 /* EXTRuntimeExtensions.h */,
-				E1218B003261203A4479CAEAC42EA6C3 /* EXTRuntimeExtensions.m */,
-				49E20A5EA56DAA20CB23ED97E3A4114B /* EXTScope.h */,
-				21AB592366EDBD9FDD40E409253CE8CF /* EXTScope.m */,
-				A8E9937A5D52CD8C5B4390D1EFB5B057 /* metamacros.h */,
+				694CB19852BE17F2C26C5D73A4CE5803 /* AFSecurityPolicy.h */,
+				2DD5E425BB86A0DED2EDE70C1C319945 /* AFSecurityPolicy.m */,
 			);
-			name = extobjc;
+			name = Security;
 			sourceTree = "";
 		};
-		770640FF578006EA59A90FE6BE948952 /* JSONModel */ = {
+		79346C117DC2A7AB8B2C244299E979AE /* Pods */ = {
 			isa = PBXGroup;
 			children = (
-				CE51061E32E1AE4F36EBD905650AC1AC /* JSONAPI.h */,
-				DF86A5F9C917556FD0AEA6A2CA64F307 /* JSONAPI.m */,
-				E3384E81663101B2F54EA9FFD3F852C8 /* JSONHTTPClient.h */,
-				1F47B5F8393E9034BF186913597866E6 /* JSONHTTPClient.m */,
-				E8B07C2F01394779D77C956001C69B15 /* JSONKeyMapper.h */,
-				1E95CED2A425248DF80AA104E7140CF7 /* JSONKeyMapper.m */,
-				A01A01B9B0E7C18C9CE55A3D240E4559 /* JSONModel.h */,
-				04B434EF2C52EA7AE302FD6F16B86700 /* JSONModel.m */,
-				C00322F1FE64C27DDBA42C6C22892BEC /* JSONModel+networking.h */,
-				7CB1AA1881672BAF9306471FC500786C /* JSONModel+networking.m */,
-				9AFB853F6C2BC5C69E8A61B5719A183E /* JSONModelArray.h */,
-				D58F7CF62CECDDCFFB2CE8DB8ED95FFD /* JSONModelArray.m */,
-				E8EC7DCCDCA113456DD757C1CAF427D9 /* JSONModelClassProperty.h */,
-				4606B084C0E1ED087ABEC2363E728606 /* JSONModelClassProperty.m */,
-				8F08F383BECC6CD5088A2A6B8032D690 /* JSONModelError.h */,
-				6C304F8FED1D085E22FD1280B5D77586 /* JSONModelError.m */,
-				1CA885863747DAF430B451F5819C9A53 /* JSONModelLib.h */,
-				51E464569961AF11674198443B94636B /* JSONValueTransformer.h */,
-				6A52824CECC3C2F076DC9785BEC7D984 /* JSONValueTransformer.m */,
-				5A10588801822F70C68D111FE9302B8D /* NSArray+JSONModel.h */,
-				1611F255389A21670BDCDD3EB778FEAC /* NSArray+JSONModel.m */,
-				398E51A3A853E8C3D196188A25BD139F /* Support Files */,
+				4F77068E9C53924272CBAEFC701A445F /* AFNetworking */,
+				882B0DE5550ECFAFF03AA77D2530AB76 /* JSONModel */,
+				52D27A7CA119F3A60A9EE59BF5693A72 /* MJExtension */,
+				5F652B322D787CF0ED0F7D1A4550B353 /* YYModel */,
 			);
-			path = JSONModel;
+			name = Pods;
+			sourceTree = "";
+		};
+		7B77215B6A98FE63A5A2C37F3C613703 /* Support Files */ = {
+			isa = PBXGroup;
+			children = (
+				12D7830460263449420B0F7806ECF00E /* AFNetworking.xcconfig */,
+				6976E680B55994F52B52A304AB853DE0 /* AFNetworking-dummy.m */,
+				D101A1B7B2778D25952EAA75B6B4E045 /* AFNetworking-prefix.pch */,
+			);
+			name = "Support Files";
+			path = "../Target Support Files/AFNetworking";
+			sourceTree = "";
+		};
+		7BEA85F46BBA1D09214D6DB97C0A38B1 /* Reachability */ = {
+			isa = PBXGroup;
+			children = (
+				EE775111EAE322796A4538E35771BBBB /* AFNetworkReachabilityManager.h */,
+				BC888124383F31FABAD2DBCA0258E4C0 /* AFNetworkReachabilityManager.m */,
+			);
+			name = Reachability;
 			sourceTree = "";
 		};
 		7DB346D0F39D3F0E887471402A8071AB = {
 			isa = PBXGroup;
 			children = (
 				BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */,
-				F4CDA5FA9197A41E0081E84F932906EB /* Frameworks */,
-				F0C0B4C12CBD32D5A7DE6E4170D43CF8 /* Pods */,
-				B1491B30F3D8FEC9543F69E71B5A2663 /* Products */,
+				0F75DF6C7C5F002280EC53F48E80B587 /* Frameworks */,
+				79346C117DC2A7AB8B2C244299E979AE /* Pods */,
+				2A08F800BA29DF4F840D071D326F6267 /* Products */,
 				037C0CA694176A3C0915F62C9D20B3E6 /* Targets Support Files */,
 			);
 			sourceTree = "";
 		};
-		A2867805A452DB01DA7EE89D748E0A23 /* Serialization */ = {
+		882B0DE5550ECFAFF03AA77D2530AB76 /* JSONModel */ = {
 			isa = PBXGroup;
 			children = (
-				87F27AB9477FB2BF28FB99D27E248FC2 /* AFURLRequestSerialization.h */,
-				344EFDC737CD472CB761BA5FB6C63D82 /* AFURLRequestSerialization.m */,
-				EA23824EA0DCACBB83504576391BA94B /* AFURLResponseSerialization.h */,
-				18DEA72C2B159355B25C191C6F786D26 /* AFURLResponseSerialization.m */,
+				FEC2AE555ABD0E86EBEA5445EE9AC671 /* JSONAPI.h */,
+				A8A0939EA5EE600F60DDE7CB862C46DF /* JSONAPI.m */,
+				79AE56F69183875C9707391B56CED09B /* JSONHTTPClient.h */,
+				B7A7F4C024C31B3443763BF2AC8A220F /* JSONHTTPClient.m */,
+				78ADF25BFDEA7B435BFBC3289EA0F685 /* JSONKeyMapper.h */,
+				1D242CEE0CA2BC7695783E88BF8312A7 /* JSONKeyMapper.m */,
+				89999F3254566BA6BAAB83FC901C18C3 /* JSONModel.h */,
+				26D091EA82DC6C228C5967981D8A947C /* JSONModel.m */,
+				BC6CC063ACC1F6FE00EF71234311F58A /* JSONModel+networking.h */,
+				7EE57AF8BE9E222A9D3BB35E9C401DC8 /* JSONModel+networking.m */,
+				606D7D0847B4FB963BDBD947601FA6C6 /* JSONModelArray.h */,
+				6FEF7A1ED9EEE822067486386BC961C0 /* JSONModelArray.m */,
+				762C637B05C8420EE066D9D4089BDA20 /* JSONModelClassProperty.h */,
+				C011FAFEF5F72BD91B8A7457C6A5BC51 /* JSONModelClassProperty.m */,
+				53825EEF93A513DD30E6715170C64BB4 /* JSONModelError.h */,
+				A0B544ED7C1030605D2D1A5A6B45DA46 /* JSONModelError.m */,
+				8EF2D16B1D7A2D59AB8B64476669DA69 /* JSONModelLib.h */,
+				C22C1BC853172E422FEF5EF93570D8E7 /* JSONValueTransformer.h */,
+				CCBC929C9E59A1135390CE347E32968E /* JSONValueTransformer.m */,
+				0403F039E3E50220C6BAF6DFDF78065A /* NSArray+JSONModel.h */,
+				12700C8E34E43360A4B8A009316EC656 /* NSArray+JSONModel.m */,
+				E783D98A3C7C33C59A7F8DE02B7FBA7F /* Support Files */,
 			);
-			name = Serialization;
+			path = JSONModel;
 			sourceTree = "";
 		};
-		B1491B30F3D8FEC9543F69E71B5A2663 /* Products */ = {
+		A47E17B19B66B154EBF35D408095D66F /* Support Files */ = {
 			isa = PBXGroup;
 			children = (
-				39B00F81866894A490C50B3CB8BE6BE3 /* libAFNetworking.a */,
-				417E0BC205D8B327F1521392A7033F85 /* libJSONModel.a */,
-				6CBFAFAFAE26266577C99488F121C40A /* libMantle.a */,
-				7AC5501BD5D9BBDBD2839C794DD1F25A /* libMJExtension.a */,
-				323F82DFA65811C481469C1DC2896841 /* libPods.a */,
-				D67D5C336FE897607601F529530629EE /* libYYModel.a */,
+				0955D9C5A396274E68A24F02996829F7 /* MJExtension.xcconfig */,
+				79F23D3EBFB558E7650521B9D0E5D7EE /* MJExtension-dummy.m */,
+				C5E04BFD653E957815687FB6B84346F2 /* MJExtension-prefix.pch */,
 			);
-			name = Products;
+			name = "Support Files";
+			path = "../Target Support Files/MJExtension";
 			sourceTree = "";
 		};
 		B3D1D13E0C6553800746CB8FD61CF946 /* Pods */ = {
@@ -577,209 +501,87 @@
 			path = "Target Support Files/Pods";
 			sourceTree = "";
 		};
-		BF4C79FDFF2C672B95ADC823868F9186 /* Security */ = {
-			isa = PBXGroup;
-			children = (
-				B0FA4CEED6A4A71D262BB4340300358A /* AFSecurityPolicy.h */,
-				0A1BD08B4DB7EEEB6C073709959446BA /* AFSecurityPolicy.m */,
-			);
-			name = Security;
-			sourceTree = "";
-		};
-		D03DA53BCC6DDE927EF7A09216B5E702 /* Mantle */ = {
-			isa = PBXGroup;
-			children = (
-				F3197E61E2AB5AB6171C369AFBAC7DF3 /* Mantle.h */,
-				B90460F20E9AB8D92EF393C4C0A81800 /* MTLJSONAdapter.h */,
-				42FBDAB19198DA5E8A6A3B448FD556E9 /* MTLJSONAdapter.m */,
-				C479DE3A22634423C37795A0222AD192 /* MTLModel.h */,
-				DED5C6E3D1B56EB65D8D732EB4A3DCF7 /* MTLModel.m */,
-				FFDF7671CC822F08C6B0EE507E27F989 /* MTLModel+NSCoding.h */,
-				CEE1E60538AA84193A987BF8B5E08060 /* MTLModel+NSCoding.m */,
-				ACF898DFB9464BC29A8AEF36B20DD5A6 /* MTLReflection.h */,
-				0B13275C0DED9CE1601BA930BCF0EAC7 /* MTLReflection.m */,
-				E0DB9304D24AF0303E86EE178207EF7A /* MTLTransformerErrorHandling.h */,
-				4346CF8A65CA74345B8FD5C8B6EE2C49 /* MTLTransformerErrorHandling.m */,
-				B8FD905D61FA0F0B0A34CB4CACFB151E /* MTLValueTransformer.h */,
-				FF32639C51955295435F7451FA380ED6 /* MTLValueTransformer.m */,
-				81D478E76465C2A7351BCAC0D621CB2A /* NSArray+MTLManipulationAdditions.h */,
-				46CCD50F7C0336C0C3820F8409363988 /* NSArray+MTLManipulationAdditions.m */,
-				C602EF86A679370BF44CE261B81E0A32 /* NSDictionary+MTLJSONKeyPath.h */,
-				699433929DA24984E6664239D76549FD /* NSDictionary+MTLJSONKeyPath.m */,
-				258D73F4F7A0E6DC4DB934070E3B3E83 /* NSDictionary+MTLManipulationAdditions.h */,
-				0FF4F980BB24C89557FDFBA3F64B9634 /* NSDictionary+MTLManipulationAdditions.m */,
-				49E9E935EA1107C516DB16A8664A7E0D /* NSDictionary+MTLMappingAdditions.h */,
-				693AB91C68CD9AD4EB6FA079432375B1 /* NSDictionary+MTLMappingAdditions.m */,
-				018C3BF90CF91C5E46FCE493CF5EED33 /* NSError+MTLModelException.h */,
-				E43B61027789A5A43625808E7BFA32B4 /* NSError+MTLModelException.m */,
-				C8240BCF6AC273CD3334B14A0CA5F70F /* NSObject+MTLComparisonAdditions.h */,
-				2D3EFD38A56800F0DA70A7D6A246AC60 /* NSObject+MTLComparisonAdditions.m */,
-				A0E773A406D82CE685D20902217024D3 /* NSValueTransformer+MTLInversionAdditions.h */,
-				D0C6948DC2ECA684D01A7701D2A81F6D /* NSValueTransformer+MTLInversionAdditions.m */,
-				6378941E9F301A2F6AE18FB013E5862D /* NSValueTransformer+MTLPredefinedTransformerAdditions.h */,
-				764F13F69DD94DF68A6DE4179E5214E4 /* NSValueTransformer+MTLPredefinedTransformerAdditions.m */,
-				405265C0D1CCE71AAA608DF42B60562B /* extobjc */,
-				EC971543EB49BD5F14743070DC33A82E /* Support Files */,
-			);
-			path = Mantle;
-			sourceTree = "";
-		};
-		EC24F776575DD837F647F0D2D3D61294 /* MJExtension */ = {
-			isa = PBXGroup;
-			children = (
-				F376B0AD431DE9EC2C768F4164E34554 /* MJDictionaryCache.h */,
-				33AE35A56CE6E3824D96FE55C4869095 /* MJDictionaryCache.m */,
-				2213B19AF53EF208646BB7EE335E1BEF /* MJExtension.h */,
-				6E4CCE6EF81633E4755F9E4DDDD07233 /* MJExtensionConst.h */,
-				90C054DEF8692887256ADE1349AA8187 /* MJExtensionConst.m */,
-				74B431BAC2D298913655B42A8D46A5E4 /* MJFoundation.h */,
-				7F94F9D09008555558898DE3D9A40948 /* MJFoundation.m */,
-				D58B2A28EF037B1C43966EA747D5A18C /* MJProperty.h */,
-				5286910528DF78F0B0343CCA6AB09F09 /* MJProperty.m */,
-				81A94E4E5F08A61D2AA27A47A9D968EA /* MJPropertyKey.h */,
-				62482B5149F22F9C76A90080B92736DF /* MJPropertyKey.m */,
-				F7CC08D44967AF4EC66DB3F0F7E7E017 /* MJPropertyType.h */,
-				B18808FB8D0C431518C27E74BA43E0C7 /* MJPropertyType.m */,
-				69C2DE584C3AD077A68993237076BAAE /* NSObject+MJClass.h */,
-				129FBF4CCAB4D5C8E3EFE23EE5F15153 /* NSObject+MJClass.m */,
-				B15AE9442D0520B46513D5F6C0989C9A /* NSObject+MJCoding.h */,
-				0D69A13A6EB2072FBC53D4512340BD40 /* NSObject+MJCoding.m */,
-				9AD8C5D8E09BBD5A4AC2D3690AC606B3 /* NSObject+MJKeyValue.h */,
-				08F736C3571E7513172F75BD1853F320 /* NSObject+MJKeyValue.m */,
-				00F1E40D981E220793DCAF65895410AF /* NSObject+MJProperty.h */,
-				237C643C239FF1A2B9227CE8FE5CC02A /* NSObject+MJProperty.m */,
-				8224BFE306F6013C9F8FE410E22E92BC /* NSString+MJExtension.h */,
-				D0ED8E585586D557C343E95938CDDEA9 /* NSString+MJExtension.m */,
-				2E0888CD123A983AD7A2C09B3A65FA2E /* Support Files */,
-			);
-			path = MJExtension;
-			sourceTree = "";
-		};
-		EC971543EB49BD5F14743070DC33A82E /* Support Files */ = {
-			isa = PBXGroup;
-			children = (
-				BF9C5C30EED59CDC880B5A8849AF5627 /* Mantle.xcconfig */,
-				5CBA8E46B6265E5A6613EAD13327A2D3 /* Mantle-dummy.m */,
-				45BE80F8CF2EBECA6792288C53953ED5 /* Mantle-prefix.pch */,
-			);
-			name = "Support Files";
-			path = "../Target Support Files/Mantle";
-			sourceTree = "";
-		};
-		EE9628FB5CA7DBB82C512D1AB1FF4E1A /* NSURLSession */ = {
-			isa = PBXGroup;
-			children = (
-				747E6D04C111E27692C52F33A0DC2804 /* AFHTTPSessionManager.h */,
-				D44B4170B9B0ADEC5CF3153CE766FFE5 /* AFHTTPSessionManager.m */,
-				0E0BCA33AECB8E80716EF2AC296F046C /* AFURLSessionManager.h */,
-				517F066A4E21937B80C1F8D49C4BAFF8 /* AFURLSessionManager.m */,
-			);
-			name = NSURLSession;
-			sourceTree = "";
-		};
-		EECE178F0D6B07761FA07801920DA70E /* NSURLConnection */ = {
+		CB9FFF1956FC47B77F7CCBC5431BAC2A /* Serialization */ = {
 			isa = PBXGroup;
 			children = (
-				1F1AF724CC974597A0B74E3C6DFBD9FB /* AFHTTPRequestOperation.h */,
-				46B794A5FA49A6717D143C72F716EC4D /* AFHTTPRequestOperation.m */,
-				755387304D50A7D9245D238969B53A54 /* AFHTTPRequestOperationManager.h */,
-				36588BCEFE1D7E0A4107B673FB227DDD /* AFHTTPRequestOperationManager.m */,
-				BCC05F6DD346D91012CE8C31DDF60F7F /* AFURLConnectionOperation.h */,
-				7AEC3111A0670EB53B0463B74BEDB19E /* AFURLConnectionOperation.m */,
+				95739C032898627373FB604DC150D252 /* AFURLRequestSerialization.h */,
+				96AF26095E6CC2BF6F911ED1CEE3742E /* AFURLRequestSerialization.m */,
+				2D47B1ECCE791AA32D9032ECEEBE9F7F /* AFURLResponseSerialization.h */,
+				568FF1FD83746C878127BCAC4589A917 /* AFURLResponseSerialization.m */,
 			);
-			name = NSURLConnection;
+			name = Serialization;
 			sourceTree = "";
 		};
-		F0B4FA466F5025CB70E5BFC1AB5D213B /* UIKit */ = {
+		CC7B3BCD6368019F1144068EF64D068A /* UIKit */ = {
 			isa = PBXGroup;
 			children = (
-				84DB5B311AFF4ECE63B6F937BCB4018F /* AFNetworkActivityIndicatorManager.h */,
-				0BCE5E454DF60B24D5EA93556E869EB0 /* AFNetworkActivityIndicatorManager.m */,
-				13FEB7BC8AF257FFBFEB3C80FDA11DD1 /* UIActivityIndicatorView+AFNetworking.h */,
-				09C146E8AC24239C6737FA7C09655738 /* UIActivityIndicatorView+AFNetworking.m */,
-				820BD9320EDC55FA84AC92F397FF9854 /* UIAlertView+AFNetworking.h */,
-				3CE7518943ACF62538D905B41A52A67A /* UIAlertView+AFNetworking.m */,
-				6AFE8F4319CD04A43C5F9F851D4D1AE5 /* UIButton+AFNetworking.h */,
-				7B1FC1AA50B49519B86163979CB8A669 /* UIButton+AFNetworking.m */,
-				6378162CD23C56E8A48F19D3BD11728B /* UIImageView+AFNetworking.h */,
-				F11F3B7C3853679BB2440391507EEC84 /* UIImageView+AFNetworking.m */,
-				50BB70C4556B3F723DDAAA0213E95D42 /* UIKit+AFNetworking.h */,
-				BEE462F260358EA9E4C77AB8CDFC2BEC /* UIProgressView+AFNetworking.h */,
-				2324798C1C23B3EFF005584C90BA4ED7 /* UIProgressView+AFNetworking.m */,
-				3406C17F0D62CF638EA4CB0692C96119 /* UIRefreshControl+AFNetworking.h */,
-				B56AFC45F43DE6CACFF0F1D3895F77BD /* UIRefreshControl+AFNetworking.m */,
-				C42CDD287DF20EF3E287445607A1D09D /* UIWebView+AFNetworking.h */,
-				61CD7B93F7501CF8250CB25B85298E03 /* UIWebView+AFNetworking.m */,
+				5F3FA45D43C9C8FCA9EC4B3C9F7AEFC5 /* AFAutoPurgingImageCache.h */,
+				3380E1498452AD6D302CFF6C4E9CECBE /* AFAutoPurgingImageCache.m */,
+				D72CDCE204D482B05EA1B80D8B34ACF4 /* AFImageDownloader.h */,
+				7768F1CE57584E28E3CDEF3560814CB0 /* AFImageDownloader.m */,
+				1214A3E358F782D81F7CFC707E8B1C72 /* AFNetworkActivityIndicatorManager.h */,
+				570014AD954196698AC88C9ECB9D7BA7 /* AFNetworkActivityIndicatorManager.m */,
+				94B8A461A67B37B6C20F8EE94AC88C1E /* UIActivityIndicatorView+AFNetworking.h */,
+				D866A4F9683B952C4632B6900399C1CA /* UIActivityIndicatorView+AFNetworking.m */,
+				09231B77614F8302E0872D8555BA5567 /* UIButton+AFNetworking.h */,
+				E5FCE11A818E00B7170F16C89C741BB8 /* UIButton+AFNetworking.m */,
+				95E31C6339B6FF746D8B1E8A3C403476 /* UIImage+AFNetworking.h */,
+				605DF30C9166350543DFE255238CCEDA /* UIImageView+AFNetworking.h */,
+				CA0ABF05F7A4FE382E97682A0D79E6B6 /* UIImageView+AFNetworking.m */,
+				A15E16D7614431788C53003DAEE065BB /* UIKit+AFNetworking.h */,
+				79829287BCBCC690C7FCE131DC126CE1 /* UIProgressView+AFNetworking.h */,
+				07A6952D5983395906DA6CF1AF8852C5 /* UIProgressView+AFNetworking.m */,
+				41217946E91010813B76690C9DFC1105 /* UIRefreshControl+AFNetworking.h */,
+				C9BA894149C19F87CB96CEE950D360BC /* UIRefreshControl+AFNetworking.m */,
+				F500D47A6BA8F1BD53546191FF7BBFA6 /* UIWebView+AFNetworking.h */,
+				0DF914E58CA0AEBF93A05C26920E21C2 /* UIWebView+AFNetworking.m */,
 			);
 			name = UIKit;
 			sourceTree = "";
 		};
-		F0C0B4C12CBD32D5A7DE6E4170D43CF8 /* Pods */ = {
+		D958138A2C131E18A1F89EB4CCFB1A02 /* Support Files */ = {
 			isa = PBXGroup;
 			children = (
-				17A752719FCB90D610F75DDB8DC7F71E /* AFNetworking */,
-				770640FF578006EA59A90FE6BE948952 /* JSONModel */,
-				D03DA53BCC6DDE927EF7A09216B5E702 /* Mantle */,
-				EC24F776575DD837F647F0D2D3D61294 /* MJExtension */,
-				05C283EFD3155A71FB0EE750902933F6 /* YYModel */,
-			);
-			name = Pods;
-			sourceTree = "";
-		};
-		F4C4BA42174570EEE443D721AC0245F5 /* Support Files */ = {
-			isa = PBXGroup;
-			children = (
-				1C6723A0E9DD678B6B2F1E44DEDD6DC6 /* YYModel.xcconfig */,
-				7DD247EEBC8F689FDE4391C68DBD399A /* YYModel-dummy.m */,
-				547D9672C48263842AF7C717F2010CFC /* YYModel-prefix.pch */,
+				CA16A97351CF0951017229B9ADED3EA9 /* YYModel.xcconfig */,
+				9758E552171AF9F7D972581E28F81CB9 /* YYModel-dummy.m */,
+				A108DF0EA1738A62975EEC8F827F5280 /* YYModel-prefix.pch */,
 			);
 			name = "Support Files";
 			path = "../Target Support Files/YYModel";
 			sourceTree = "";
 		};
-		F4CDA5FA9197A41E0081E84F932906EB /* Frameworks */ = {
+		DCA41C418B415029539173E4213D4FA6 /* NSURLSession */ = {
 			isa = PBXGroup;
 			children = (
-				061495081F45523E1D008EA09DF18020 /* iOS */,
+				0D8909276CAABD303D581898C413593E /* AFHTTPSessionManager.h */,
+				5736DF98F0742D3818C94976D85354EF /* AFHTTPSessionManager.m */,
+				8ED525C57A27F45647D49FB32C45E674 /* AFURLSessionManager.h */,
+				683ED099B8DC4F9ED207255EF899E5B3 /* AFURLSessionManager.m */,
 			);
-			name = Frameworks;
+			name = NSURLSession;
 			sourceTree = "";
 		};
-		FF99DFA55ACDD549413CA082BD56AC32 /* Reachability */ = {
+		E783D98A3C7C33C59A7F8DE02B7FBA7F /* Support Files */ = {
 			isa = PBXGroup;
 			children = (
-				5B05C5BCC73FC07CDDFA770F4521DC51 /* AFNetworkReachabilityManager.h */,
-				3DA509BF18EADB9B060D72AAB1DF8D5A /* AFNetworkReachabilityManager.m */,
+				EEF0B37A25CA2F613CAE76EEF68257F7 /* JSONModel.xcconfig */,
+				B10E3C58BA72DDEA3175AFF7A4CDA5E9 /* JSONModel-dummy.m */,
+				018FAA69CDEAE009F427656EE0F9264E /* JSONModel-prefix.pch */,
 			);
-			name = Reachability;
+			name = "Support Files";
+			path = "../Target Support Files/JSONModel";
 			sourceTree = "";
 		};
 /* End PBXGroup section */
 
 /* Begin PBXHeadersBuildPhase section */
-		26E101B486F95D438A3BA112B66FC59A /* Headers */ = {
+		0BA35855A0681A0BBF35DFE472705917 /* Headers */ = {
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				DF180E88C3E1BF35D93F31300FA4BC65 /* AFHTTPRequestOperation.h in Headers */,
-				3A60E1AA43C09B68A26EF2579E98D725 /* AFHTTPRequestOperationManager.h in Headers */,
-				5DFB5A46A57DE37A4FEAD5E01C998A05 /* AFHTTPSessionManager.h in Headers */,
-				DEA1065191A84F4399632F5DC5E5358B /* AFNetworkActivityIndicatorManager.h in Headers */,
-				96C7E8AA9881FF1B1EC3EED102DF287D /* AFNetworking.h in Headers */,
-				86A345B686DF337CC22C577DFD08F6D6 /* AFNetworkReachabilityManager.h in Headers */,
-				E6E2E57ADE1578E3ED86B1387009F3F8 /* AFSecurityPolicy.h in Headers */,
-				F3B32DA5C47A34B5B2609E632FFA8557 /* AFURLConnectionOperation.h in Headers */,
-				0E4FD75ECCFD6A179057653D9BA711CD /* AFURLRequestSerialization.h in Headers */,
-				136FB41CEB8D026BA1B0E0C514CD90F7 /* AFURLResponseSerialization.h in Headers */,
-				5675E7169016543A92985F6EBC0C1411 /* AFURLSessionManager.h in Headers */,
-				C2D9B8F82D04BDD22AE84A18C08A19C9 /* UIActivityIndicatorView+AFNetworking.h in Headers */,
-				9C5A2CD706CA4688C9F4BC6D63BAB935 /* UIAlertView+AFNetworking.h in Headers */,
-				04A416BF54F937DAE3D19FE50DA72202 /* UIButton+AFNetworking.h in Headers */,
-				58B3A1ECCB7C9B804E6E041C7D5FBFAC /* UIImageView+AFNetworking.h in Headers */,
-				263D08D54C23AAE447AC8A0E6BD02B39 /* UIKit+AFNetworking.h in Headers */,
-				E38C00106AD769DAA4E938F8878B7A7D /* UIProgressView+AFNetworking.h in Headers */,
-				9ECCBA3A8092E326BE8CAD2075001BB2 /* UIRefreshControl+AFNetworking.h in Headers */,
-				C4D34910F4D6673E3B9E99D7A781DC6C /* UIWebView+AFNetworking.h in Headers */,
+				6083580C462930E006F0FD618DEF018A /* NSObject+YYModel.h in Headers */,
+				24484B9729D5A17AF22E036A40D4229B /* YYClassInfo.h in Headers */,
+				A7CA8B5657D905776E74716A35A14A09 /* YYModel.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -801,58 +603,46 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		6F29A8F17B2F2F41D146B6397C96C3D8 /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				CD0E87EA8A39BBC280379886EBDF18FF /* NSObject+YYModel.h in Headers */,
-				1AB882D96B82AD38881CF0BC68862326 /* YYClassInfo.h in Headers */,
-				D2429C7E2299F5727080E880D8A72949 /* YYModel.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		7CE23E179CD1F0088209DFA18D08F79F /* Headers */ = {
+		B981229135DBE9773A86BDB116C368D1 /* Headers */ = {
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				0AFABD28B2E5C3292603A36599055EA7 /* MJDictionaryCache.h in Headers */,
-				DBC399A4B8E6521B2A885EA52612BFB0 /* MJExtension.h in Headers */,
-				2EDB111B41EBA9F2B002DAD15CB26687 /* MJExtensionConst.h in Headers */,
-				DAD5C4333A7FA2DECFF4BEA4F17FEC6B /* MJFoundation.h in Headers */,
-				A044BDEEC463D3CB278C383FA8BABEC6 /* MJProperty.h in Headers */,
-				9734B73DB91553CC9279C5DEF98B973F /* MJPropertyKey.h in Headers */,
-				D34140627AA9906F84A524AB1A22748E /* MJPropertyType.h in Headers */,
-				28D5E64861C74DB483E72DE4E35E4AA0 /* NSObject+MJClass.h in Headers */,
-				10B5AA3FFC425BAFB7A81C4B1C19CC1A /* NSObject+MJCoding.h in Headers */,
-				11BD5AE4F92EFD5DB5772947204A678C /* NSObject+MJKeyValue.h in Headers */,
-				3CAB03CE944BBD5BD312744F4DC4ED0A /* NSObject+MJProperty.h in Headers */,
-				D4110838F297CB76E9BFABBC1463004B /* NSString+MJExtension.h in Headers */,
+				19E6319F6ECED7539AABBD9A211F7AEC /* AFAutoPurgingImageCache.h in Headers */,
+				F3774B1449FCE5B3CA3E1B336E11D284 /* AFHTTPSessionManager.h in Headers */,
+				326A543AD4E39A2DAECA1CD385E3AEA2 /* AFImageDownloader.h in Headers */,
+				3939531EB270B4145C7ADFBAB2E5695F /* AFNetworkActivityIndicatorManager.h in Headers */,
+				0A08FC71C4E3B8E0F8734BCDA7CCA7CB /* AFNetworking.h in Headers */,
+				ED69D9B5A342FE9BD3F170D5CDDEC948 /* AFNetworkReachabilityManager.h in Headers */,
+				DFDAC8245626953C4BCE5A2DA6BE2A5B /* AFSecurityPolicy.h in Headers */,
+				2359387620C5E815BF0594BC40311734 /* AFURLRequestSerialization.h in Headers */,
+				B51AA1F7701DCDBCC9B88A15320F9C2C /* AFURLResponseSerialization.h in Headers */,
+				3511AE7ADBB71D05565854F0E70B7D08 /* AFURLSessionManager.h in Headers */,
+				830050886B18F54E17F117FD8EFC717B /* UIActivityIndicatorView+AFNetworking.h in Headers */,
+				E212C2AA95E8F6EFB69A5F1455F291F8 /* UIButton+AFNetworking.h in Headers */,
+				C1B65C3D849FEE4FB5298A8135A765DA /* UIImage+AFNetworking.h in Headers */,
+				6EC97BDB3FC508526F9E388095A7DDCC /* UIImageView+AFNetworking.h in Headers */,
+				85FAB6F1D2FE0598BF2E61D7BB084B8D /* UIKit+AFNetworking.h in Headers */,
+				5D52DB6DF2E6C24CECB0015A9177A2E1 /* UIProgressView+AFNetworking.h in Headers */,
+				ACE9C1A6E8D5121C6C5F907C7A9CFCC9 /* UIRefreshControl+AFNetworking.h in Headers */,
+				B5CF67F7870BAB70A76E57479B706B42 /* UIWebView+AFNetworking.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		A7CE0B2F5900B8DE72065180B996B165 /* Headers */ = {
+		F95AF419D96CDED026D79CDD7A3B3023 /* Headers */ = {
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				F8FF07D76760D6A2FF269061E11A8B31 /* EXTKeyPathCoding.h in Headers */,
-				4980C203311F9A91EF1A1FCAEC09EBD2 /* EXTRuntimeExtensions.h in Headers */,
-				0CCB6B307EBF17E2D0E3A6AD52F6F51E /* EXTScope.h in Headers */,
-				FF3D94F730A96F1B9FAF43E8DB68E702 /* Mantle.h in Headers */,
-				41C46F19A2CE1E29840F226638A10678 /* metamacros.h in Headers */,
-				3C43032339841F7D1D94EF12903A2272 /* MTLJSONAdapter.h in Headers */,
-				0563227B6D480B862CA5EF8C36DF51A4 /* MTLModel+NSCoding.h in Headers */,
-				4BABB4C716353500FDF75187D35DAACF /* MTLModel.h in Headers */,
-				9BB66BC3A3E2C0AB0BA3ACE98373EF30 /* MTLReflection.h in Headers */,
-				F7B7585021FEDC680689A7B49F8BA3ED /* MTLTransformerErrorHandling.h in Headers */,
-				F0D2DF741E4223975FD166C5C101479F /* MTLValueTransformer.h in Headers */,
-				D1A08D7B676CB358664FE1A7EE3472E3 /* NSArray+MTLManipulationAdditions.h in Headers */,
-				E72FE1FA640F108A9769E9661E34F3BF /* NSDictionary+MTLJSONKeyPath.h in Headers */,
-				6B45ADBBD4925214FD239E8C25214C87 /* NSDictionary+MTLManipulationAdditions.h in Headers */,
-				19D81E345715F41ED29349DBFF389D55 /* NSDictionary+MTLMappingAdditions.h in Headers */,
-				495E27E8D0F85F4008E237D0F29EA8AC /* NSError+MTLModelException.h in Headers */,
-				52B96AC796E60DBF61A11151FD25CEE8 /* NSObject+MTLComparisonAdditions.h in Headers */,
-				2B91954D1D8469415E1164E83DD3D3F1 /* NSValueTransformer+MTLInversionAdditions.h in Headers */,
-				784E07C8B9704257D10696DD47E2A3B4 /* NSValueTransformer+MTLPredefinedTransformerAdditions.h in Headers */,
+				C37D2F9A62232C28DAF2E51CF1364F21 /* MJExtension.h in Headers */,
+				0F7EC02E944F8719A5EBDC9D29F9E99F /* MJExtensionConst.h in Headers */,
+				13695CE9BF36F26CA806C5CD2D6ADECA /* MJFoundation.h in Headers */,
+				DAF1CE8756287B465E0DE48A6133FB79 /* MJProperty.h in Headers */,
+				366A613AE07EAA35B5789F6123FB48AF /* MJPropertyKey.h in Headers */,
+				91CAC2B69903F5F3D7C25A95CA77A600 /* MJPropertyType.h in Headers */,
+				CA1EB1DB5C89E63A19ED05C55E35AF23 /* NSObject+MJClass.h in Headers */,
+				118227C43F283C87130BEE2BFABC7EBD /* NSObject+MJCoding.h in Headers */,
+				4330562BA1A299CBD37F4602B1A4C95A /* NSObject+MJKeyValue.h in Headers */,
+				C16442D25F534C602780E6FD44C6A698 /* NSObject+MJProperty.h in Headers */,
+				86D3C675657C8AFE6F73E5D0F209E990 /* NSString+MJExtension.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -863,7 +653,7 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = C6AF5E073E12BB724B34252D7E1E5E2E /* Build configuration list for PBXNativeTarget "JSONModel" */;
 			buildPhases = (
-				9A80637BC4F7665B84839294439F16ED /* Sources */,
+				DCC9A773031824E51419098CE072BB9E /* Sources */,
 				EB932C7244160CC464D5F7E2A9713D3F /* Frameworks */,
 				6EEA72BE015541ED3D178BEF9BB5788F /* Headers */,
 			);
@@ -873,71 +663,70 @@
 			);
 			name = JSONModel;
 			productName = JSONModel;
-			productReference = 417E0BC205D8B327F1521392A7033F85 /* libJSONModel.a */;
+			productReference = AFF88B33AAF17BA8BC3062C218E19A78 /* libJSONModel.a */;
 			productType = "com.apple.product-type.library.static";
 		};
-		2602F3D0DAC534568B6AD7EEA0DD1959 /* AFNetworking */ = {
+		1F37C6E4221D42995C00354D68C90FEA /* Pods */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = A903F971702871B72BEA8510BB8CC55A /* Build configuration list for PBXNativeTarget "AFNetworking" */;
+			buildConfigurationList = D26EA6DFB70611F0544E97C415664053 /* Build configuration list for PBXNativeTarget "Pods" */;
 			buildPhases = (
-				F06802316DD235FBB40BC284273405D6 /* Sources */,
-				04F6492DF0B7A5669B29FD4F7C390666 /* Frameworks */,
-				26E101B486F95D438A3BA112B66FC59A /* Headers */,
+				7A77C966B63E19709FA0A8A1729B46E6 /* Sources */,
+				71CD5942D56EF0F1B69859C450134AE1 /* Frameworks */,
 			);
 			buildRules = (
 			);
 			dependencies = (
+				D470FA26CEE670DE33EC28FB716889AC /* PBXTargetDependency */,
+				7D2A7FCA0B0A1854C5A9D518B2C00127 /* PBXTargetDependency */,
+				09E0A09814609ED2AF11FCF078A51FCC /* PBXTargetDependency */,
+				7B4DA3D4354F389510E432060C7C6F66 /* PBXTargetDependency */,
 			);
-			name = AFNetworking;
-			productName = AFNetworking;
-			productReference = 39B00F81866894A490C50B3CB8BE6BE3 /* libAFNetworking.a */;
+			name = Pods;
+			productName = Pods;
+			productReference = ABF79941E73EE92262DB17D67C076F9B /* libPods.a */;
 			productType = "com.apple.product-type.library.static";
 		};
-		426BC4549A625B5E1E4200D5261A98BF /* Mantle */ = {
+		3E2BA6702CDB283F0780C4B47A59E791 /* YYModel */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = 0705E2EB1ED884E2B646D5F2180F282B /* Build configuration list for PBXNativeTarget "Mantle" */;
+			buildConfigurationList = 2E1CD3442AD98988582BDB08412B7F9B /* Build configuration list for PBXNativeTarget "YYModel" */;
 			buildPhases = (
-				541D0E339EB299E614EF0FCA9EC8C140 /* Sources */,
-				1399F5F5B8A99754AF89DC93A9E100DE /* Frameworks */,
-				A7CE0B2F5900B8DE72065180B996B165 /* Headers */,
+				51B55493994891355F9E1D29B0D4CAED /* Sources */,
+				DEC35FC4E82B28A482CF2F9A1F675225 /* Frameworks */,
+				0BA35855A0681A0BBF35DFE472705917 /* Headers */,
 			);
 			buildRules = (
 			);
 			dependencies = (
 			);
-			name = Mantle;
-			productName = Mantle;
-			productReference = 6CBFAFAFAE26266577C99488F121C40A /* libMantle.a */;
+			name = YYModel;
+			productName = YYModel;
+			productReference = 04D8ADC28CE66AA6064AFA3095238FCE /* libYYModel.a */;
 			productType = "com.apple.product-type.library.static";
 		};
-		80B936BC9337D6F92B7605630C9A90F5 /* Pods */ = {
+		928353533005A4198EBDA5B700D37B64 /* AFNetworking */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = 34799E0F9EE2F3167744E447393B3FCD /* Build configuration list for PBXNativeTarget "Pods" */;
+			buildConfigurationList = 77CF2A7107BC61A2E90025871305961D /* Build configuration list for PBXNativeTarget "AFNetworking" */;
 			buildPhases = (
-				0F7D5846D8421E2E38C51642EE1EE0B2 /* Sources */,
-				20EE9ED36E81349A351EA9C5D223D256 /* Frameworks */,
+				DE0BAD758C6F291CE7E10DA077987C62 /* Sources */,
+				508C962B3E08E8DA04956BF349A3CDFD /* Frameworks */,
+				B981229135DBE9773A86BDB116C368D1 /* Headers */,
 			);
 			buildRules = (
 			);
 			dependencies = (
-				DA1B3978204B93AC336F037595920ED5 /* PBXTargetDependency */,
-				EADD9AAAD70C92A854FDEAD83D74F908 /* PBXTargetDependency */,
-				6D3D05992A85723699A5A9A758512E2A /* PBXTargetDependency */,
-				A451BFE85765DF3585075A366F6F760A /* PBXTargetDependency */,
-				F22B6F80C818C68E5239D3E02C711A16 /* PBXTargetDependency */,
 			);
-			name = Pods;
-			productName = Pods;
-			productReference = 323F82DFA65811C481469C1DC2896841 /* libPods.a */;
+			name = AFNetworking;
+			productName = AFNetworking;
+			productReference = 7BB7B4D2582678DC9368CC97C3818790 /* libAFNetworking.a */;
 			productType = "com.apple.product-type.library.static";
 		};
-		B23B3D15FFC0FC9893968F478086D58D /* MJExtension */ = {
+		9EAB3E42EF957541E6C3C76D35FD008E /* MJExtension */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = 3755813E806991794D335BE59E0D5786 /* Build configuration list for PBXNativeTarget "MJExtension" */;
+			buildConfigurationList = ECCC06F4F1551987F0834A094FDCB1CA /* Build configuration list for PBXNativeTarget "MJExtension" */;
 			buildPhases = (
-				38FE856E1AE81A94E44A9DAE88AEC8F9 /* Sources */,
-				5A6B1E07912E48C49E2E6E59701001AE /* Frameworks */,
-				7CE23E179CD1F0088209DFA18D08F79F /* Headers */,
+				2CBFB844B4D7FEB4FF2F11CAE31CAD75 /* Sources */,
+				747242460B935FEA3E994652BD8C2E0B /* Frameworks */,
+				F95AF419D96CDED026D79CDD7A3B3023 /* Headers */,
 			);
 			buildRules = (
 			);
@@ -945,24 +734,7 @@
 			);
 			name = MJExtension;
 			productName = MJExtension;
-			productReference = 7AC5501BD5D9BBDBD2839C794DD1F25A /* libMJExtension.a */;
-			productType = "com.apple.product-type.library.static";
-		};
-		BFF917EB51EEA40133D67E15EB66AE74 /* YYModel */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C5242B3578718300981194BF1BA0DB49 /* Build configuration list for PBXNativeTarget "YYModel" */;
-			buildPhases = (
-				2CFDAD63983256368FFF8F8B06DBDBBA /* Sources */,
-				E53E1CB1874DFF6D48D7F509D556395B /* Frameworks */,
-				6F29A8F17B2F2F41D146B6397C96C3D8 /* Headers */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = YYModel;
-			productName = YYModel;
-			productReference = D67D5C336FE897607601F529530629EE /* libYYModel.a */;
+			productReference = 8803B5EE9052C56316D8530CF8FE1E9F /* libMJExtension.a */;
 			productType = "com.apple.product-type.library.static";
 		};
 /* End PBXNativeTarget section */
@@ -982,186 +754,168 @@
 				en,
 			);
 			mainGroup = 7DB346D0F39D3F0E887471402A8071AB;
-			productRefGroup = B1491B30F3D8FEC9543F69E71B5A2663 /* Products */;
+			productRefGroup = 2A08F800BA29DF4F840D071D326F6267 /* Products */;
 			projectDirPath = "";
 			projectRoot = "";
 			targets = (
-				2602F3D0DAC534568B6AD7EEA0DD1959 /* AFNetworking */,
+				928353533005A4198EBDA5B700D37B64 /* AFNetworking */,
 				09FA060F1A0492FB25232F489AC4E573 /* JSONModel */,
-				426BC4549A625B5E1E4200D5261A98BF /* Mantle */,
-				B23B3D15FFC0FC9893968F478086D58D /* MJExtension */,
-				80B936BC9337D6F92B7605630C9A90F5 /* Pods */,
-				BFF917EB51EEA40133D67E15EB66AE74 /* YYModel */,
+				9EAB3E42EF957541E6C3C76D35FD008E /* MJExtension */,
+				1F37C6E4221D42995C00354D68C90FEA /* Pods */,
+				3E2BA6702CDB283F0780C4B47A59E791 /* YYModel */,
 			);
 		};
 /* End PBXProject section */
 
 /* Begin PBXSourcesBuildPhase section */
-		0F7D5846D8421E2E38C51642EE1EE0B2 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8359F80C2C3D1FD1DEC6C0151338B4B6 /* Pods-dummy.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		2CFDAD63983256368FFF8F8B06DBDBBA /* Sources */ = {
+		2CBFB844B4D7FEB4FF2F11CAE31CAD75 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				034A0BC8D482F341468FB07AA8547F30 /* NSObject+YYModel.m in Sources */,
-				FD9A84D4F9CD61B073685A40A8C4DAF8 /* YYClassInfo.m in Sources */,
-				D6475D5E613BCB8DA0C6FCF40D4B8566 /* YYModel-dummy.m in Sources */,
+				2CC27528C64733F5C0AB4B1B6EE35E8C /* MJExtension-dummy.m in Sources */,
+				FDF30F97BDF167F0B956DED0F2C8DA69 /* MJExtensionConst.m in Sources */,
+				710DA5E9C44A1BC56CD13FC1F2D6E099 /* MJFoundation.m in Sources */,
+				A0AD231A11A54F59BC8D486946D2928B /* MJProperty.m in Sources */,
+				A60A4B3054017180C0B6C7B24E651E0A /* MJPropertyKey.m in Sources */,
+				4C61B999DF40B1B00449A7AFCBB61D5E /* MJPropertyType.m in Sources */,
+				026CCF569A2125FCB0EE8F152731259E /* NSObject+MJClass.m in Sources */,
+				CDA4DB994BAC351F4CD71EC283055E57 /* NSObject+MJCoding.m in Sources */,
+				B9C36A50069E553B4B8538E291864BB5 /* NSObject+MJKeyValue.m in Sources */,
+				CD4CF5F1389281BCE40DF30AD1945D03 /* NSObject+MJProperty.m in Sources */,
+				D1D1F11808DACCA88C55636F85A58FD8 /* NSString+MJExtension.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		38FE856E1AE81A94E44A9DAE88AEC8F9 /* Sources */ = {
+		51B55493994891355F9E1D29B0D4CAED /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				8B6B4FB5A92E1EEDAFC98E6DD1E81CA7 /* MJDictionaryCache.m in Sources */,
-				C3E942A24436AFAE47C0F265F0CA369A /* MJExtension-dummy.m in Sources */,
-				0C2B33BE64F0CF1C6ED2B2200953568E /* MJExtensionConst.m in Sources */,
-				BFE1D87E9D4D58C95CEAF1737F70C956 /* MJFoundation.m in Sources */,
-				E5FDED1F3CFC60D892F02046B8F4FB91 /* MJProperty.m in Sources */,
-				764A917183297280E7F02642D7C8047C /* MJPropertyKey.m in Sources */,
-				630E7EB6AA410EB4E3F0AE39B187CF52 /* MJPropertyType.m in Sources */,
-				5E6AD069AEFAE5E8E3538B532F09674E /* NSObject+MJClass.m in Sources */,
-				14F67635944C4C8A9A87FDD7CD101A2A /* NSObject+MJCoding.m in Sources */,
-				C3EB1AF50203F4E383BB02AA9EAA2539 /* NSObject+MJKeyValue.m in Sources */,
-				5CB847381DE56E2B338F95A8FC79E620 /* NSObject+MJProperty.m in Sources */,
-				E9FF6786EDCF303B455D928C19A94B23 /* NSString+MJExtension.m in Sources */,
+				2DB87F0B08ACF244F156C584AB77B6E6 /* NSObject+YYModel.m in Sources */,
+				2F8E5AE787864956A700F252954FA910 /* YYClassInfo.m in Sources */,
+				EAEDC97E58D7D11BC72EFDBA87922D2B /* YYModel-dummy.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		541D0E339EB299E614EF0FCA9EC8C140 /* Sources */ = {
+		7A77C966B63E19709FA0A8A1729B46E6 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				17A59C9B4F5727FAF9E3A6D92A9FFABD /* EXTRuntimeExtensions.m in Sources */,
-				BAE29EFF696E9062CE0DFB3887FF9806 /* EXTScope.m in Sources */,
-				669FAFC1DA77D8FF3171FA45F80A0AB8 /* Mantle-dummy.m in Sources */,
-				04A4FE6BC333B1FC7D35EADA8F59FAD6 /* MTLJSONAdapter.m in Sources */,
-				9543DC81B3F035E8C5768FB50B7146F1 /* MTLModel+NSCoding.m in Sources */,
-				06B93267BE4B80B2B4B91E5EFCE386D2 /* MTLModel.m in Sources */,
-				FD913ECF18E91FD4D8EE34BA8170DB4F /* MTLReflection.m in Sources */,
-				6672A2EFC9413A1DE45CAF0A950CCAAE /* MTLTransformerErrorHandling.m in Sources */,
-				542A74473DEBCC4A4A8EFD7219D2957B /* MTLValueTransformer.m in Sources */,
-				7E5C71195CF0F35F44FDA4D355CFE73C /* NSArray+MTLManipulationAdditions.m in Sources */,
-				2D097F9B47E61A2F9ED4053728DA7AE6 /* NSDictionary+MTLJSONKeyPath.m in Sources */,
-				944BC5B32BE8AFDE9A1E1B88C7F7E86D /* NSDictionary+MTLManipulationAdditions.m in Sources */,
-				C0B7827E6FEB64AEA58656D1DE343E63 /* NSDictionary+MTLMappingAdditions.m in Sources */,
-				6B6012E259B1804C7CC8D36A07252B07 /* NSError+MTLModelException.m in Sources */,
-				7632A90850BF21261FD1585914D71E98 /* NSObject+MTLComparisonAdditions.m in Sources */,
-				B6E1E26869BC3BFBEAD1B6F35F5A670D /* NSValueTransformer+MTLInversionAdditions.m in Sources */,
-				EEF2248467AB8464AB72CB730C7FE178 /* NSValueTransformer+MTLPredefinedTransformerAdditions.m in Sources */,
+				7FDE91216511338E9117E9AFDA47C856 /* Pods-dummy.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		9A80637BC4F7665B84839294439F16ED /* Sources */ = {
+		DCC9A773031824E51419098CE072BB9E /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				AED2BAD1D43745DD69F82C134A985AB3 /* JSONAPI.m in Sources */,
-				ACF42F60DB38312D939C3817F3AECE32 /* JSONHTTPClient.m in Sources */,
-				ABC9A1F8D86F932BEE6C28A8849048A6 /* JSONKeyMapper.m in Sources */,
-				16A189CC65DC66678D3D637ED8B5B5FF /* JSONModel+networking.m in Sources */,
-				D4EF11B8928C1374360A67C3BC22AD13 /* JSONModel-dummy.m in Sources */,
-				4A4DCF231CE4F0B8916A5FA4590C3343 /* JSONModel.m in Sources */,
-				128993FF267CC0FA8EE6889C6AEC2EC3 /* JSONModelArray.m in Sources */,
-				4DE36D4B16AB5BD257BDBA97DE1BD733 /* JSONModelClassProperty.m in Sources */,
-				17D8C9D90B9DCDE1B8B9D5ECF8DADCEC /* JSONModelError.m in Sources */,
-				DCB74D72FE0E9C8C8E23B49C8CE52276 /* JSONValueTransformer.m in Sources */,
-				B685C45C6BF1321FC17F0F03AC635E4C /* NSArray+JSONModel.m in Sources */,
+				393E2E501D0B38AE7DD535362026926D /* JSONAPI.m in Sources */,
+				59DFAF46993F71E88A7336D2A8A3731D /* JSONHTTPClient.m in Sources */,
+				8CD001B0217CFDD1F5D8A3A6C3A8A5DC /* JSONKeyMapper.m in Sources */,
+				891A5DA07C60C95DAD969B542CCDE442 /* JSONModel+networking.m in Sources */,
+				EE27B8D800BD5CBC5A23FACF87210920 /* JSONModel-dummy.m in Sources */,
+				19A2AEA6F18B93212006AFB2A7A25AF8 /* JSONModel.m in Sources */,
+				880C99DF50E8C41EBE032934BE7F9905 /* JSONModelArray.m in Sources */,
+				2F8D135BE069298B3FE7C13988B2CF08 /* JSONModelClassProperty.m in Sources */,
+				A049B322C75DF1C944935D7D0D7F1E7E /* JSONModelError.m in Sources */,
+				7EC57A971BC81BEFCD4D52ACF58BB517 /* JSONValueTransformer.m in Sources */,
+				8572EA2DB7894989FDA4C085E70D96C8 /* NSArray+JSONModel.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		F06802316DD235FBB40BC284273405D6 /* Sources */ = {
+		DE0BAD758C6F291CE7E10DA077987C62 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				43E2B22CDD34DC9E3AC42491D4E0C7B6 /* AFHTTPRequestOperation.m in Sources */,
-				C59584009765D8E13DBD8C23AFC54E2B /* AFHTTPRequestOperationManager.m in Sources */,
-				FB13976159230EA492199199181C64AC /* AFHTTPSessionManager.m in Sources */,
-				D227CEAB5B8A915D6E65EA6DD91F51D6 /* AFNetworkActivityIndicatorManager.m in Sources */,
-				205F51216177E22CD1AE443745B8A119 /* AFNetworking-dummy.m in Sources */,
-				EAC33FF21DBF26381F425381F18B9965 /* AFNetworkReachabilityManager.m in Sources */,
-				98D00CD3E197EAA6C7450281537CD79C /* AFSecurityPolicy.m in Sources */,
-				23F5B559815FF24B03A7D5D76F19E740 /* AFURLConnectionOperation.m in Sources */,
-				3CE08E61AA9A53953E30A442440E4D8F /* AFURLRequestSerialization.m in Sources */,
-				270D0D7DCF78170B1F481DDF511C07D6 /* AFURLResponseSerialization.m in Sources */,
-				E4213D476018C8B58166DF22722C0463 /* AFURLSessionManager.m in Sources */,
-				AAF2E61730FAA37AF5A03D4571D30E8B /* UIActivityIndicatorView+AFNetworking.m in Sources */,
-				D6D9125049BC87CDA2D57020C0153E75 /* UIAlertView+AFNetworking.m in Sources */,
-				D53D346EDA02176B05B3EB0BC617354B /* UIButton+AFNetworking.m in Sources */,
-				9F56B2A232106CEC99383ADACDC85C4A /* UIImageView+AFNetworking.m in Sources */,
-				27AFE404AA450432596D55D44B871E62 /* UIProgressView+AFNetworking.m in Sources */,
-				0659C55D67614156ACE73EF681E30DC7 /* UIRefreshControl+AFNetworking.m in Sources */,
-				3940747A9B6BDD5DC55DFD9ECD8DC300 /* UIWebView+AFNetworking.m in Sources */,
+				14CD3DFB4A25BAEFB205730FA6750025 /* AFAutoPurgingImageCache.m in Sources */,
+				23415204AA48A02959E4E5245CF96037 /* AFHTTPSessionManager.m in Sources */,
+				D31FEE51AF4BE2A6CC059F80B983CD3B /* AFImageDownloader.m in Sources */,
+				4BA19F7DD8F9FDA648137B2CE89E7588 /* AFNetworkActivityIndicatorManager.m in Sources */,
+				A8FC6A53F6C1CB4DEFD972664E1AF3B1 /* AFNetworking-dummy.m in Sources */,
+				43098B12DF5546CB576986E68DBCAFCA /* AFNetworkReachabilityManager.m in Sources */,
+				311E5200832E4AE174A193851A2C6317 /* AFSecurityPolicy.m in Sources */,
+				8E82178CC9BD8BE3DBF2C10E33807AEB /* AFURLRequestSerialization.m in Sources */,
+				C2201E34603B014192F0967473518496 /* AFURLResponseSerialization.m in Sources */,
+				FCDDD3BC67EA205C87238A2A87D5C36C /* AFURLSessionManager.m in Sources */,
+				15460ABD372C937E2A07A2FCDF98C473 /* UIActivityIndicatorView+AFNetworking.m in Sources */,
+				78940A6980F359C4304C695EF6E67C5D /* UIButton+AFNetworking.m in Sources */,
+				B0BE398350F83A7B0102C3BBAFC51428 /* UIImageView+AFNetworking.m in Sources */,
+				38EEA9ED6B922946C54AD6BAC93B73AD /* UIProgressView+AFNetworking.m in Sources */,
+				7F0578A0258E02384F6229C678E60D31 /* UIRefreshControl+AFNetworking.m in Sources */,
+				AD359A96DD4AA2C962E50A5CD5524F54 /* UIWebView+AFNetworking.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
-		6D3D05992A85723699A5A9A758512E2A /* PBXTargetDependency */ = {
+		09E0A09814609ED2AF11FCF078A51FCC /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			name = MJExtension;
-			target = B23B3D15FFC0FC9893968F478086D58D /* MJExtension */;
-			targetProxy = 3CDADA51E4F48F1BD4E9D1BD062F3A8D /* PBXContainerItemProxy */;
+			target = 9EAB3E42EF957541E6C3C76D35FD008E /* MJExtension */;
+			targetProxy = E1B4B798F4893C07FFFF6CC50567DE79 /* PBXContainerItemProxy */;
 		};
-		A451BFE85765DF3585075A366F6F760A /* PBXTargetDependency */ = {
+		7B4DA3D4354F389510E432060C7C6F66 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
-			name = Mantle;
-			target = 426BC4549A625B5E1E4200D5261A98BF /* Mantle */;
-			targetProxy = 712E7F2B7442228DB6DEBDD8B98C418A /* PBXContainerItemProxy */;
-		};
-		DA1B3978204B93AC336F037595920ED5 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = AFNetworking;
-			target = 2602F3D0DAC534568B6AD7EEA0DD1959 /* AFNetworking */;
-			targetProxy = 88D7E302238C412F9FB1295E599A0317 /* PBXContainerItemProxy */;
+			name = YYModel;
+			target = 3E2BA6702CDB283F0780C4B47A59E791 /* YYModel */;
+			targetProxy = 23EF1693CC42D1A25F4AF23075E313FD /* PBXContainerItemProxy */;
 		};
-		EADD9AAAD70C92A854FDEAD83D74F908 /* PBXTargetDependency */ = {
+		7D2A7FCA0B0A1854C5A9D518B2C00127 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			name = JSONModel;
 			target = 09FA060F1A0492FB25232F489AC4E573 /* JSONModel */;
-			targetProxy = 9D0CB74D9A073B05F7AEFF12FC2296B9 /* PBXContainerItemProxy */;
+			targetProxy = 93EB7DA60B06D8562F3E82665280C486 /* PBXContainerItemProxy */;
 		};
-		F22B6F80C818C68E5239D3E02C711A16 /* PBXTargetDependency */ = {
+		D470FA26CEE670DE33EC28FB716889AC /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
-			name = YYModel;
-			target = BFF917EB51EEA40133D67E15EB66AE74 /* YYModel */;
-			targetProxy = 1CE9B78EF12EF230E0D812BD87D80BB7 /* PBXContainerItemProxy */;
+			name = AFNetworking;
+			target = 928353533005A4198EBDA5B700D37B64 /* AFNetworking */;
+			targetProxy = A95F771819A639C0C6FD8ACCB88F2727 /* PBXContainerItemProxy */;
 		};
 /* End PBXTargetDependency section */
 
 /* Begin XCBuildConfiguration section */
-		12E063B3D6927160095647AC7967325B /* Release */ = {
+		052A17875CB827423D627183396CEB60 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = BF9C5C30EED59CDC880B5A8849AF5627 /* Mantle.xcconfig */;
 			buildSettings = {
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_PREFIX_HEADER = "Target Support Files/Mantle/Mantle-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_LDFLAGS = "";
-				OTHER_LIBTOOLFLAGS = "";
-				PRIVATE_HEADERS_FOLDER_PATH = "";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				PUBLIC_HEADERS_FOLDER_PATH = "";
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = YES;
+				ENABLE_NS_ASSERTIONS = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1";
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				STRIP_INSTALLED_PRODUCT = NO;
+				SYMROOT = "${SRCROOT}/../build";
+				VALIDATE_PRODUCT = YES;
 			};
 			name = Release;
 		};
-		26E0F3DF70A80CEF98DAEC260D5C8CE6 /* Debug */ = {
+		17224E02F0E8CE2AC8EF6DDD7B535094 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = B27961CB210EA7ADDC8172D563424DCB /* MJExtension.xcconfig */;
+			baseConfigurationReference = 12D7830460263449420B0F7806ECF00E /* AFNetworking.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_PREFIX_HEADER = "Target Support Files/MJExtension/MJExtension-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				GCC_PREFIX_HEADER = "Target Support Files/AFNetworking/AFNetworking-prefix.pch";
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
@@ -1173,13 +927,13 @@
 			};
 			name = Debug;
 		};
-		27A13A3E892A5CCFB792BD8E82D8AC07 /* Release */ = {
+		2C5CBD3A72085FEB008264874E65D26A /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 1C6723A0E9DD678B6B2F1E44DEDD6DC6 /* YYModel.xcconfig */;
+			baseConfigurationReference = EEF0B37A25CA2F613CAE76EEF68257F7 /* JSONModel.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_PREFIX_HEADER = "Target Support Files/YYModel/YYModel-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				GCC_PREFIX_HEADER = "Target Support Files/JSONModel/JSONModel-prefix.pch";
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
@@ -1191,32 +945,31 @@
 			};
 			name = Release;
 		};
-		49E925C8EC1375CD093742FF2C53C2A1 /* Release */ = {
+		6CC49AD3F8D5079CFA3C95D970E71541 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 8097081E15C875F726C527B4065CF3A4 /* JSONModel.xcconfig */;
+			baseConfigurationReference = 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_PREFIX_HEADER = "Target Support Files/JSONModel/JSONModel-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
-				MTL_ENABLE_DEBUG_INFO = NO;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				MACH_O_TYPE = staticlib;
+				MTL_ENABLE_DEBUG_INFO = YES;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
-				PRIVATE_HEADERS_FOLDER_PATH = "";
+				PODS_ROOT = "$(SRCROOT)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				PUBLIC_HEADERS_FOLDER_PATH = "";
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
 			};
-			name = Release;
+			name = Debug;
 		};
-		4A80938C592611E2EEB56B647903E857 /* Release */ = {
+		90C8F7834EDB83B6447CB678A8502AF6 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = B27961CB210EA7ADDC8172D563424DCB /* MJExtension.xcconfig */;
+			baseConfigurationReference = CA16A97351CF0951017229B9ADED3EA9 /* YYModel.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_PREFIX_HEADER = "Target Support Files/MJExtension/MJExtension-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
-				MTL_ENABLE_DEBUG_INFO = NO;
+				GCC_PREFIX_HEADER = "Target Support Files/YYModel/YYModel-prefix.pch";
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				MTL_ENABLE_DEBUG_INFO = YES;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
 				PRIVATE_HEADERS_FOLDER_PATH = "";
@@ -1225,15 +978,15 @@
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
 			};
-			name = Release;
+			name = Debug;
 		};
-		580F1FE33F80F33FE44AD1183672EC4A /* Debug */ = {
+		9530CB7A404DF04D69578C617F9D664A /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = C79BDE7605B6A0EA11323F7F8434353A /* AFNetworking.xcconfig */;
+			baseConfigurationReference = 0955D9C5A396274E68A24F02996829F7 /* MJExtension.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_PREFIX_HEADER = "Target Support Files/AFNetworking/AFNetworking-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				GCC_PREFIX_HEADER = "Target Support Files/MJExtension/MJExtension-prefix.pch";
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
@@ -1245,7 +998,7 @@
 			};
 			name = Debug;
 		};
-		6569F07DC21AD8B72752685013E3D9D8 /* Debug */ = {
+		B37F0F91F85060E28F1DAAB522DC7EC1 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
@@ -1277,21 +1030,21 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				ONLY_ACTIVE_ARCH = YES;
 				STRIP_INSTALLED_PRODUCT = NO;
 				SYMROOT = "${SRCROOT}/../build";
 			};
 			name = Debug;
 		};
-		6A5902138D993C7DF04C7835AFC4340C /* Debug */ = {
+		BB4FEE3A29726B80E9C5E31DBE1FE28D /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 8097081E15C875F726C527B4065CF3A4 /* JSONModel.xcconfig */;
+			baseConfigurationReference = 0955D9C5A396274E68A24F02996829F7 /* MJExtension.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_PREFIX_HEADER = "Target Support Files/JSONModel/JSONModel-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
-				MTL_ENABLE_DEBUG_INFO = YES;
+				GCC_PREFIX_HEADER = "Target Support Files/MJExtension/MJExtension-prefix.pch";
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
 				PRIVATE_HEADERS_FOLDER_PATH = "";
@@ -1300,16 +1053,16 @@
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
 			};
-			name = Debug;
+			name = Release;
 		};
-		9CE013453B2A911B60AB09CAD66F860B /* Debug */ = {
+		BFBB6DD945BFD7DA4BC8BF8199445852 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */;
+			baseConfigurationReference = 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				MACH_O_TYPE = staticlib;
-				MTL_ENABLE_DEBUG_INFO = YES;
+				MTL_ENABLE_DEBUG_INFO = NO;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
 				PODS_ROOT = "$(SRCROOT)";
@@ -1317,49 +1070,15 @@
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
 			};
-			name = Debug;
-		};
-		A14E2444F162A20E3776820E0ADFFB52 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = YES;
-				ENABLE_NS_ASSERTIONS = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1";
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
-				STRIP_INSTALLED_PRODUCT = NO;
-				SYMROOT = "${SRCROOT}/../build";
-				VALIDATE_PRODUCT = YES;
-			};
 			name = Release;
 		};
-		B1C7023AD20E8A9CEA65B83DD7D3D00B /* Release */ = {
+		CF42542529F689B52406696B5784E1F9 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = C79BDE7605B6A0EA11323F7F8434353A /* AFNetworking.xcconfig */;
+			baseConfigurationReference = 12D7830460263449420B0F7806ECF00E /* AFNetworking.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_PREFIX_HEADER = "Target Support Files/AFNetworking/AFNetworking-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
@@ -1371,13 +1090,13 @@
 			};
 			name = Release;
 		};
-		B99489F092757170AE50EF1494037E75 /* Debug */ = {
+		D5A53314F0406B315CA0867F8EFCFD33 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = BF9C5C30EED59CDC880B5A8849AF5627 /* Mantle.xcconfig */;
+			baseConfigurationReference = EEF0B37A25CA2F613CAE76EEF68257F7 /* JSONModel.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_PREFIX_HEADER = "Target Support Files/Mantle/Mantle-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+				GCC_PREFIX_HEADER = "Target Support Files/JSONModel/JSONModel-prefix.pch";
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
@@ -1389,14 +1108,14 @@
 			};
 			name = Debug;
 		};
-		E63C0FAFD929963329188FA94DE43DD1 /* Debug */ = {
+		DB9C1E31ABBDFC1D2D949137E4C9F09A /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 1C6723A0E9DD678B6B2F1E44DEDD6DC6 /* YYModel.xcconfig */;
+			baseConfigurationReference = CA16A97351CF0951017229B9ADED3EA9 /* YYModel.xcconfig */;
 			buildSettings = {
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_PREFIX_HEADER = "Target Support Files/YYModel/YYModel-prefix.pch";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
-				MTL_ENABLE_DEBUG_INFO = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
 				OTHER_LDFLAGS = "";
 				OTHER_LIBTOOLFLAGS = "";
 				PRIVATE_HEADERS_FOLDER_PATH = "";
@@ -1405,87 +1124,61 @@
 				SDKROOT = iphoneos;
 				SKIP_INSTALL = YES;
 			};
-			name = Debug;
-		};
-		FC22C3CE5263B1CDE3E7B982E739CD37 /* Release */ = {
-			isa = XCBuildConfiguration;
-			baseConfigurationReference = 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */;
-			buildSettings = {
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
-				MACH_O_TYPE = staticlib;
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_LDFLAGS = "";
-				OTHER_LIBTOOLFLAGS = "";
-				PODS_ROOT = "$(SRCROOT)";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-			};
 			name = Release;
 		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
-		0705E2EB1ED884E2B646D5F2180F282B /* Build configuration list for PBXNativeTarget "Mantle" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				B99489F092757170AE50EF1494037E75 /* Debug */,
-				12E063B3D6927160095647AC7967325B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
 		2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				6569F07DC21AD8B72752685013E3D9D8 /* Debug */,
-				A14E2444F162A20E3776820E0ADFFB52 /* Release */,
+				B37F0F91F85060E28F1DAAB522DC7EC1 /* Debug */,
+				052A17875CB827423D627183396CEB60 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		34799E0F9EE2F3167744E447393B3FCD /* Build configuration list for PBXNativeTarget "Pods" */ = {
+		2E1CD3442AD98988582BDB08412B7F9B /* Build configuration list for PBXNativeTarget "YYModel" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				9CE013453B2A911B60AB09CAD66F860B /* Debug */,
-				FC22C3CE5263B1CDE3E7B982E739CD37 /* Release */,
+				90C8F7834EDB83B6447CB678A8502AF6 /* Debug */,
+				DB9C1E31ABBDFC1D2D949137E4C9F09A /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		3755813E806991794D335BE59E0D5786 /* Build configuration list for PBXNativeTarget "MJExtension" */ = {
+		77CF2A7107BC61A2E90025871305961D /* Build configuration list for PBXNativeTarget "AFNetworking" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				26E0F3DF70A80CEF98DAEC260D5C8CE6 /* Debug */,
-				4A80938C592611E2EEB56B647903E857 /* Release */,
+				17224E02F0E8CE2AC8EF6DDD7B535094 /* Debug */,
+				CF42542529F689B52406696B5784E1F9 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		A903F971702871B72BEA8510BB8CC55A /* Build configuration list for PBXNativeTarget "AFNetworking" */ = {
+		C6AF5E073E12BB724B34252D7E1E5E2E /* Build configuration list for PBXNativeTarget "JSONModel" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				580F1FE33F80F33FE44AD1183672EC4A /* Debug */,
-				B1C7023AD20E8A9CEA65B83DD7D3D00B /* Release */,
+				D5A53314F0406B315CA0867F8EFCFD33 /* Debug */,
+				2C5CBD3A72085FEB008264874E65D26A /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		C5242B3578718300981194BF1BA0DB49 /* Build configuration list for PBXNativeTarget "YYModel" */ = {
+		D26EA6DFB70611F0544E97C415664053 /* Build configuration list for PBXNativeTarget "Pods" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				E63C0FAFD929963329188FA94DE43DD1 /* Debug */,
-				27A13A3E892A5CCFB792BD8E82D8AC07 /* Release */,
+				6CC49AD3F8D5079CFA3C95D970E71541 /* Debug */,
+				BFBB6DD945BFD7DA4BC8BF8199445852 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		C6AF5E073E12BB724B34252D7E1E5E2E /* Build configuration list for PBXNativeTarget "JSONModel" */ = {
+		ECCC06F4F1551987F0834A094FDCB1CA /* Build configuration list for PBXNativeTarget "MJExtension" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				6A5902138D993C7DF04C7835AFC4340C /* Debug */,
-				49E925C8EC1375CD093742FF2C53C2A1 /* Release */,
+				9530CB7A404DF04D69578C617F9D664A /* Debug */,
+				BB4FEE3A29726B80E9C5E31DBE1FE28D /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
diff --git a/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch b/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch
index aa992a4..b52cf0d 100644
--- a/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch	
+++ b/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch	
@@ -2,3 +2,14 @@
 #import 
 #endif
 
+#ifndef TARGET_OS_IOS
+  #define TARGET_OS_IOS TARGET_OS_IPHONE
+#endif
+
+#ifndef TARGET_OS_WATCH
+  #define TARGET_OS_WATCH 0
+#endif
+
+#ifndef TARGET_OS_TV
+  #define TARGET_OS_TV 0
+#endif
diff --git a/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig b/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig
index 5652bd8..30ed8d2 100644
--- a/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig	
+++ b/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig	
@@ -1,5 +1,5 @@
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/YYModel"
+HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/YYModel"
 OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
 PODS_ROOT = ${SRCROOT}
 SKIP_INSTALL = YES
\ No newline at end of file
diff --git a/Pods/Target Support Files/JSONModel/JSONModel.xcconfig b/Pods/Target Support Files/JSONModel/JSONModel.xcconfig
index 6d43a86..47b1cd6 100644
--- a/Pods/Target Support Files/JSONModel/JSONModel.xcconfig	
+++ b/Pods/Target Support Files/JSONModel/JSONModel.xcconfig	
@@ -1,4 +1,4 @@
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/JSONModel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/YYModel"
+HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/JSONModel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/YYModel"
 PODS_ROOT = ${SRCROOT}
 SKIP_INSTALL = YES
\ No newline at end of file
diff --git a/Pods/Target Support Files/MJExtension/MJExtension.xcconfig b/Pods/Target Support Files/MJExtension/MJExtension.xcconfig
index 1677402..2fb4408 100644
--- a/Pods/Target Support Files/MJExtension/MJExtension.xcconfig	
+++ b/Pods/Target Support Files/MJExtension/MJExtension.xcconfig	
@@ -1,4 +1,4 @@
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MJExtension" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/YYModel"
+HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MJExtension" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/YYModel"
 PODS_ROOT = ${SRCROOT}
 SKIP_INSTALL = YES
\ No newline at end of file
diff --git a/Pods/Target Support Files/Mantle/Mantle-dummy.m b/Pods/Target Support Files/Mantle/Mantle-dummy.m
deleted file mode 100644
index 729d652..0000000
--- a/Pods/Target Support Files/Mantle/Mantle-dummy.m	
+++ /dev/null
@@ -1,5 +0,0 @@
-#import 
-@interface PodsDummy_Mantle : NSObject
-@end
-@implementation PodsDummy_Mantle
-@end
diff --git a/Pods/Target Support Files/Mantle/Mantle-prefix.pch b/Pods/Target Support Files/Mantle/Mantle-prefix.pch
deleted file mode 100644
index aa992a4..0000000
--- a/Pods/Target Support Files/Mantle/Mantle-prefix.pch	
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifdef __OBJC__
-#import 
-#endif
-
diff --git a/Pods/Target Support Files/Mantle/Mantle.xcconfig b/Pods/Target Support Files/Mantle/Mantle.xcconfig
deleted file mode 100644
index a095246..0000000
--- a/Pods/Target Support Files/Mantle/Mantle.xcconfig	
+++ /dev/null
@@ -1,5 +0,0 @@
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Mantle" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/YYModel"
-OTHER_LDFLAGS = -framework "Foundation"
-PODS_ROOT = ${SRCROOT}
-SKIP_INSTALL = YES
\ No newline at end of file
diff --git a/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown
index dc4c9dd..dbb3500 100644
--- a/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown	
+++ b/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown	
@@ -74,31 +74,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 
 
-## Mantle
-
-**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.
-
-
 ## YYModel
 
 The MIT License (MIT)
diff --git a/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/Pods/Target Support Files/Pods/Pods-acknowledgements.plist
index acd13c1..13c28db 100644
--- a/Pods/Target Support Files/Pods/Pods-acknowledgements.plist	
+++ b/Pods/Target Support Files/Pods/Pods-acknowledgements.plist	
@@ -97,35 +97,6 @@ THE SOFTWARE.
 			Type
 			PSGroupSpecifier
 		
-		
-			FooterText
-			**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.
-
-			Title
-			Mantle
-			Type
-			PSGroupSpecifier
-		
 		
 			FooterText
 			The MIT License (MIT)
diff --git a/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/Pods/Target Support Files/Pods/Pods.debug.xcconfig
index f3bc040..3936455 100644
--- a/Pods/Target Support Files/Pods/Pods.debug.xcconfig	
+++ b/Pods/Target Support Files/Pods/Pods.debug.xcconfig	
@@ -1,5 +1,5 @@
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/YYModel"
-OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/JSONModel" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/Mantle" -isystem "${PODS_ROOT}/Headers/Public/YYModel"
-OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"JSONModel" -l"MJExtension" -l"Mantle" -l"YYModel" -framework "CoreFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit"
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/YYModel"
+OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/JSONModel" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/YYModel"
+OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"JSONModel" -l"MJExtension" -l"YYModel" -framework "CoreFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
 PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
diff --git a/Pods/Target Support Files/Pods/Pods.release.xcconfig b/Pods/Target Support Files/Pods/Pods.release.xcconfig
index f3bc040..3936455 100644
--- a/Pods/Target Support Files/Pods/Pods.release.xcconfig	
+++ b/Pods/Target Support Files/Pods/Pods.release.xcconfig	
@@ -1,5 +1,5 @@
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/YYModel"
-OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/JSONModel" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/Mantle" -isystem "${PODS_ROOT}/Headers/Public/YYModel"
-OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"JSONModel" -l"MJExtension" -l"Mantle" -l"YYModel" -framework "CoreFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit"
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/YYModel"
+OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/JSONModel" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/YYModel"
+OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"JSONModel" -l"MJExtension" -l"YYModel" -framework "CoreFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
 PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
diff --git a/Pods/Target Support Files/YYModel/YYModel.xcconfig b/Pods/Target Support Files/YYModel/YYModel.xcconfig
index 3459dfe..16b6bce 100644
--- a/Pods/Target Support Files/YYModel/YYModel.xcconfig	
+++ b/Pods/Target Support Files/YYModel/YYModel.xcconfig	
@@ -1,5 +1,5 @@
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/YYModel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/YYModel"
-OTHER_LDFLAGS = -framework "CoreFoundation" -framework "UIKit"
+HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/YYModel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/YYModel"
+OTHER_LDFLAGS = -framework "CoreFoundation" -framework "Foundation"
 PODS_ROOT = ${SRCROOT}
 SKIP_INSTALL = YES
\ No newline at end of file
diff --git a/Pods/YYModel/README.md b/Pods/YYModel/README.md
index 3b511e1..ea38047 100755
--- a/Pods/YYModel/README.md
+++ b/Pods/YYModel/README.md
@@ -1,15 +1,14 @@
-YYModel 中文介绍
+YYModel
 ==============
 
 [![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/ibireme/YYModel/master/LICENSE) 
 [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 
 [![CocoaPods](http://img.shields.io/cocoapods/v/YYModel.svg?style=flat)](http://cocoapods.org/?q= YYModel) 
 [![CocoaPods](http://img.shields.io/cocoapods/p/YYModel.svg?style=flat)](http://cocoapods.org/?q= YYModel) 
-[![Support](https://img.shields.io/badge/support-iOS%206%2B%20-blue.svg?style=flat)](https://www.apple.com/nl/ios/) 
-[![Build Status](https://travis-ci.org/ibireme/YYModel.svg?branch=master)](https://travis-ci.org/ibireme/YYModel)
+[![Build Status](https://travis-ci.org/ibireme/YYModel.svg?branch=master)](https://travis-ci.org/ibireme/YYModel) 
+[![codecov.io](https://codecov.io/github/ibireme/YYModel/coverage.svg?branch=master)](https://codecov.io/github/ibireme/YYModel?branch=master)
 
-
-High performance model framework for iOS.
+High performance model framework for iOS/OSX.
(It's a component of [YYKit](https://github.com/ibireme/YYKit)) @@ -31,7 +30,7 @@ Features - **Type Safe**: All data types will be verified to ensure type-safe during the conversion process. - **Non-intrusive**: There is no need to make the model class inherit from other base class. - **Lightwight**: This library contains only 5 files. - +- **Docs and unit testing**: 100% docs coverage, 99.6% code coverage. Usage ============== @@ -148,6 +147,8 @@ EEE MMM dd HH:mm:ss Z yyyy } @end +You can map a json key (key path) or an array of json key (key path) to one or multiple property name. If there's no mapper for a property, it will use the property's name as default. + ###Nested model // JSON @@ -210,10 +211,10 @@ EEE MMM dd HH:mm:ss Z yyyy @implementation Attributes + (NSArray *)modelPropertyBlacklist { - return @{@"test1", @"test2"}; + return @[@"test1", @"test2"]; } + (NSArray *)modelPropertyWhitelist { - return @{@"name"}; + return @[@"name"]; } @end @@ -232,7 +233,7 @@ EEE MMM dd HH:mm:ss Z yyyy @end @implementation User - - (BOOL))modelCustomTransformFromDictionary:(NSDictionary *)dic { + - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic { NSNumber *timestamp = dic[@"timestamp"]; if (![timestamp isKindOfClass:[NSNumber class]]) return NO; _createdAt = [NSDate dateWithTimeIntervalSince1970:timestamp.floatValue]; @@ -245,7 +246,7 @@ EEE MMM dd HH:mm:ss Z yyyy } @end -###Coding/Copying/hash/equal +###Coding/Copying/hash/equal/description @interface YYShadow :NSObject @property (nonatomic, copy) NSString *name; @@ -258,6 +259,7 @@ EEE MMM dd HH:mm:ss Z yyyy - (id)copyWithZone:(NSZone *)zone { return [self yy_modelCopy]; } - (NSUInteger)hash { return [self yy_modelHash]; } - (BOOL)isEqual:(id)object { return [self yy_modelIsEqual:object]; } + - (NSString *)description { return [self yy_modelDescription]; } @end @@ -266,7 +268,7 @@ Installation ### CocoaPods -1. Add `pod "YYModel"` to your Podfile. +1. Add `pod 'YYModel'` to your Podfile. 2. Run `pod install` or `pod update`. 3. Import \. @@ -293,7 +295,7 @@ You can also install documentation locally using [appledoc](https://github.com/t Requirements ============== -This library requires a deployment target of iOS 6.0 or greater. +This library requires `iOS 6.0+` and `Xcode 7.0+`. License @@ -305,7 +307,7 @@ YYModel is provided under the MIT license. See LICENSE file for details. --- 中文介绍 ============== -高性能 iOS 模型转换框架。
+高性能 iOS/OSX 模型转换框架。
(该项目是 [YYKit](https://github.com/ibireme/YYKit) 组件之一) @@ -326,7 +328,7 @@ YYModel is provided under the MIT license. See LICENSE file for details. - **类型安全**: 转换过程中,所有的数据类型都会被检测一遍,以保证类型安全,避免崩溃问题。 - **无侵入性**: 模型无需继承自其他基类。 - **轻量**: 该框架只有 5 个文件 (包括.h文件)。 - +- **文档和单元测试**: 文档覆盖率100%, 代码覆盖率99.6%。 使用方法 ============== @@ -441,6 +443,12 @@ EEE MMM dd HH:mm:ss Z yyyy @"bookID" : @[@"id",@"ID",@"book_id"]}; } @end + +你可以把一个或一组 json key (key path) 映射到一个或多个属性。如果一个属性没有映射关系,那默认会使用相同属性名作为映射。 + +在 json->model 的过程中:如果一个属性对应了多个 json key,那么转换过程会按顺序查找,并使用第一个不为空的值。 + +在 model->json 的过程中:如果一个属性对应了多个 json key (key path),那么转换过程仅会处理第一个 json key (key path);如果多个属性对应了同一个 json key,则转换过过程会使用其中任意一个不为空的值。 ###Model 包含其他 Model @@ -505,11 +513,11 @@ EEE MMM dd HH:mm:ss Z yyyy @implementation Attributes // 如果实现了该方法,则处理过程中会忽略该列表内的所有属性 + (NSArray *)modelPropertyBlacklist { - return @{@"test1", @"test2"}; + return @[@"test1", @"test2"]; } // 如果实现了该方法,则处理过程中不会处理该列表外的属性。 + (NSArray *)modelPropertyWhitelist { - return @{@"name"}; + return @[@"name"]; } @end @@ -531,7 +539,7 @@ EEE MMM dd HH:mm:ss Z yyyy // 当 JSON 转为 Model 完成后,该方法会被调用。 // 你可以在这里对数据进行校验,如果校验不通过,可以返回 NO,则该 Model 会被忽略。 // 你也可以在这里做一些自动转换不能完成的工作。 - - (BOOL))modelCustomTransformFromDictionary:(NSDictionary *)dic { + - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic { NSNumber *timestamp = dic[@"timestamp"]; if (![timestamp isKindOfClass:[NSNumber class]]) return NO; _createdAt = [NSDate dateWithTimeIntervalSince1970:timestamp.floatValue]; @@ -548,7 +556,7 @@ EEE MMM dd HH:mm:ss Z yyyy } @end -###Coding/Copying/hash/equal +###Coding/Copying/hash/equal/description @interface YYShadow :NSObject @property (nonatomic, copy) NSString *name; @@ -562,6 +570,7 @@ EEE MMM dd HH:mm:ss Z yyyy - (id)copyWithZone:(NSZone *)zone { return [self yy_modelCopy]; } - (NSUInteger)hash { return [self yy_modelHash]; } - (BOOL)isEqual:(id)object { return [self yy_modelIsEqual:object]; } + - (NSString *)description { return [self yy_modelDescription]; } @end @@ -570,7 +579,7 @@ EEE MMM dd HH:mm:ss Z yyyy ### CocoaPods -1. 在 Podfile 中添加 `pod "YYModel"`。 +1. 在 Podfile 中添加 `pod 'YYModel'`。 2. 执行 `pod install` 或 `pod update`。 3. 导入 \。 @@ -594,10 +603,9 @@ EEE MMM dd HH:mm:ss Z yyyy 你可以在 [CocoaDocs](http://cocoadocs.org/docsets/YYModel/) 查看在线 API 文档,也可以用 [appledoc](https://github.com/tomaz/appledoc) 本地生成文档。 - 系统要求 ============== -该项目最低支持 iOS 6.0。 +该项目最低支持 `iOS 6.0` 和 `Xcode 7.0`。 许可证 diff --git a/Pods/YYModel/YYModel/NSObject+YYModel.h b/Pods/YYModel/YYModel/NSObject+YYModel.h index e134e68..67d6e66 100644 --- a/Pods/YYModel/YYModel/NSObject+YYModel.h +++ b/Pods/YYModel/YYModel/NSObject+YYModel.h @@ -11,6 +11,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + /** Provide some data-model method: @@ -73,7 +75,7 @@ @return A new instance created from the json, or nil if an error occurs. */ -+ (instancetype)yy_modelWithJSON:(id)json; ++ (nullable instancetype)yy_modelWithJSON:(id)json; /** Creates and returns a new instance of the receiver from a key-value dictionary. @@ -94,7 +96,7 @@ `NSValue` -> struct or union, such as CGRect, CGSize, ... `NSString` -> SEL, Class. */ -+ (instancetype)yy_modelWithDictionary:(NSDictionary *)dictionary; ++ (nullable instancetype)yy_modelWithDictionary:(NSDictionary *)dictionary; /** Set the receiver's properties with a json object. @@ -138,7 +140,7 @@ If the reciver is `NSArray`, `NSDictionary` or `NSSet`, it just convert the inner object to json object. */ -- (id)yy_modelToJSONObject; +- (nullable id)yy_modelToJSONObject; /** Generate a json string's data from the receiver's properties. @@ -149,7 +151,7 @@ If the reciver is `NSArray`, `NSDictionary` or `NSSet`, it will also convert the inner object to json string. */ -- (NSData *)yy_modelToJSONData; +- (nullable NSData *)yy_modelToJSONData; /** Generate a json string from the receiver's properties. @@ -160,14 +162,14 @@ If the reciver is `NSArray`, `NSDictionary` or `NSSet`, it will also convert the inner object to json string. */ -- (NSString *)yy_modelToJSONString; +- (nullable NSString *)yy_modelToJSONString; /** Copy a instance with the receiver's properties. @return A copied instance, or nil if an error occurs. */ -- (id)yy_modelCopy; +- (nullable id)yy_modelCopy; /** Encode the receiver's properties to a coder. @@ -201,6 +203,13 @@ */ - (BOOL)yy_modelIsEqual:(id)model; +/** + Description method for debugging purposes based on properties. + + @return A string that describes the contents of the receiver. + */ +- (NSString *)yy_modelDescription; + @end @@ -220,7 +229,7 @@ @return A array, or nil if an error occurs. */ -+ (NSArray *)yy_modelArrayWithClass:(Class)cls json:(id)json; ++ (nullable NSArray *)yy_modelArrayWithClass:(Class)cls json:(id)json; @end @@ -241,7 +250,7 @@ @return A array, or nil if an error occurs. */ -+ (NSDictionary *)yy_modelDictionaryWithClass:(Class)cls json:(id)json; ++ (nullable NSDictionary *)yy_modelDictionaryWithClass:(Class)cls json:(id)json; @end @@ -267,7 +276,7 @@ "n":"Harry Pottery", "p": 256, "ext" : { - "desc" : "A book written by J.K.Rowing." + "desc" : "A book written by J.K.Rowling." }, "ID" : 100010 } @@ -291,7 +300,7 @@ @return A custom mapper for properties. */ -+ (NSDictionary *)modelCustomPropertyMapper; ++ (nullable NSDictionary *)modelCustomPropertyMapper; /** The generic class mapper for container properties. @@ -320,7 +329,7 @@ @return A class mapper. */ -+ (NSDictionary *)modelContainerPropertyGenericClass; ++ (nullable NSDictionary *)modelContainerPropertyGenericClass; /** If you need to create instances of different classes during json->object transform, @@ -354,23 +363,23 @@ @return Class to create from this dictionary, `nil` to use current class. */ -+ (Class)modelCustomClassForDictionary:(NSDictionary*)dictionary; ++ (nullable Class)modelCustomClassForDictionary:(NSDictionary *)dictionary; /** All the properties in blacklist will be ignored in model transform process. Returns nil to ignore this feature. - @return An array of property's name (Array). + @return An array of property's name. */ -+ (NSArray *)modelPropertyBlacklist; ++ (nullable NSArray *)modelPropertyBlacklist; /** If a property is not in the whitelist, it will be ignored in model transform process. Returns nil to ignore this feature. - @return An array of property's name (Array). + @return An array of property's name. */ -+ (NSArray *)modelPropertyWhitelist; ++ (nullable NSArray *)modelPropertyWhitelist; /** If the default json-to-model transform does not fit to your model object, implement @@ -403,3 +412,5 @@ - (BOOL)modelCustomTransformToDictionary:(NSMutableDictionary *)dic; @end + +NS_ASSUME_NONNULL_END diff --git a/Pods/YYModel/YYModel/NSObject+YYModel.m b/Pods/YYModel/YYModel/NSObject+YYModel.m index 8da99f9..c344265 100644 --- a/Pods/YYModel/YYModel/NSObject+YYModel.m +++ b/Pods/YYModel/YYModel/NSObject+YYModel.m @@ -11,7 +11,6 @@ #import "NSObject+YYModel.h" #import "YYClassInfo.h" -#import #import #define force_inline __inline__ __attribute__((always_inline)) @@ -358,15 +357,13 @@ + (instancetype)metaWithClassInfo:(YYClassInfo *)classInfo propertyInfo:(YYClass } if (propertyInfo.getter) { - SEL sel = NSSelectorFromString(propertyInfo.getter); - if ([classInfo.cls instancesRespondToSelector:sel]) { - meta->_getter = sel; + if ([classInfo.cls instancesRespondToSelector:propertyInfo.getter]) { + meta->_getter = propertyInfo.getter; } } if (propertyInfo.setter) { - SEL sel = NSSelectorFromString(propertyInfo.setter); - if ([classInfo.cls instancesRespondToSelector:sel]) { - meta->_setter = sel; + if ([classInfo.cls instancesRespondToSelector:propertyInfo.setter]) { + meta->_setter = propertyInfo.setter; } } @@ -407,13 +404,14 @@ + (instancetype)metaWithClassInfo:(YYClassInfo *)classInfo propertyInfo:(YYClass /// A class info in object model. @interface _YYModelMeta : NSObject { @package + YYClassInfo *_classInfo; /// Key:mapped key and key path, Value:_YYModelPropertyInfo. NSDictionary *_mapper; - /// Array<_YYModelPropertyInfo>, all property meta of this model. + /// Array<_YYModelPropertyMeta>, all property meta of this model. NSArray *_allPropertyMetas; - /// Array<_YYModelPropertyInfo>, property meta which is mapped to a key path. + /// Array<_YYModelPropertyMeta>, property meta which is mapped to a key path. NSArray *_keyPathPropertyMetas; - /// Array<_YYModelPropertyInfo>, property meta which is mapped to multi keys. + /// Array<_YYModelPropertyMeta>, property meta which is mapped to multi keys. NSArray *_multiKeysPropertyMetas; /// The number of mapped key (and key path), same to _mapper.count. NSUInteger _keyMappedCount; @@ -485,7 +483,7 @@ - (instancetype)initWithClass:(Class)cls { propertyInfo:propertyInfo generic:genericMapper[propertyInfo.name]]; if (!meta || !meta->_name) continue; - if (!meta->_getter && !meta->_setter) continue; + if (!meta->_getter || !meta->_setter) continue; if (allPropertyMetas[meta->_name]) continue; allPropertyMetas[meta->_name] = meta; } @@ -538,12 +536,6 @@ - (instancetype)initWithClass:(Class)cls { } if (!propertyMeta->_mappedToKey) return; -// // reverse -// NSUInteger count = mappedToKeyArray.count; -// for (NSUInteger i = 0, mid = count / 2.0; i < mid; i++) { -// [mappedToKeyArray exchangeObjectAtIndex:i withObjectAtIndex:(count - (i + 1))]; -// } - propertyMeta->_mappedToKeyArray = mappedToKeyArray; [multiKeysPropertyMetas addObject:propertyMeta]; @@ -563,6 +555,7 @@ - (instancetype)initWithClass:(Class)cls { if (keyPathPropertyMetas) _keyPathPropertyMetas = keyPathPropertyMetas; if (multiKeysPropertyMetas) _multiKeysPropertyMetas = multiKeysPropertyMetas; + _classInfo = classInfo; _keyMappedCount = _allPropertyMetas.count; _nsType = YYClassGetNSType(cls); _hasCustomTransformFromDictionary = ([cls instancesRespondToSelector:@selector(modelCustomTransformFromDictionary:)]); @@ -577,20 +570,20 @@ + (instancetype)metaWithClass:(Class)cls { if (!cls) return nil; static CFMutableDictionaryRef cache; static dispatch_once_t onceToken; - static OSSpinLock lock; + static dispatch_semaphore_t lock; dispatch_once(&onceToken, ^{ cache = CFDictionaryCreateMutable(CFAllocatorGetDefault(), 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - lock = OS_SPINLOCK_INIT; + lock = dispatch_semaphore_create(1); }); - OSSpinLockLock(&lock); + dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER); _YYModelMeta *meta = CFDictionaryGetValue(cache, (__bridge const void *)(cls)); - OSSpinLockUnlock(&lock); - if (!meta) { + dispatch_semaphore_signal(lock); + if (!meta || meta->_classInfo.needUpdate) { meta = [[_YYModelMeta alloc] initWithClass:cls]; if (meta) { - OSSpinLockLock(&lock); + dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER); CFDictionarySetValue(cache, (__bridge const void *)(cls), (__bridge const void *)(meta)); - OSSpinLockUnlock(&lock); + dispatch_semaphore_signal(lock); } } return meta; @@ -715,7 +708,7 @@ static force_inline void ModelSetNumberToProperty(__unsafe_unretained id model, long double d = num.doubleValue; if (isnan(d) || isinf(d)) d = 0; ((void (*)(id, SEL, long double))(void *) objc_msgSend)((id)model, meta->_setter, (long double)d); - } break; + } // break; commented for code coverage in next line default: break; } } @@ -946,7 +939,7 @@ static void ModelSetValueForProperty(__unsafe_unretained id model, ((NSSet *)valueSet).mutableCopy); } } - } break; + } // break; commented for code coverage in next line default: break; } @@ -1041,7 +1034,7 @@ static void ModelSetValueForProperty(__unsafe_unretained id model, ((void (*)(id, SEL, void *))(void *) objc_msgSend)((id)model, meta->_setter, nsValue.pointerValue); } } - } break; + } // break; commented for code coverage in next line default: break; } @@ -1204,10 +1197,8 @@ static id ModelToJSONObjectRecursive(NSObject *model) { subDic = superDic[key]; if (subDic) { if ([subDic isKindOfClass:[NSDictionary class]]) { - if (![subDic isKindOfClass:[NSMutableDictionary class]]) { - subDic = subDic.mutableCopy; - superDic[key] = subDic; - } + subDic = subDic.mutableCopy; + superDic[key] = subDic; } else { break; } @@ -1232,6 +1223,154 @@ static id ModelToJSONObjectRecursive(NSObject *model) { return result; } +/// Add indent to string (exclude first line) +static NSMutableString *ModelDescriptionAddIndent(NSMutableString *desc, NSUInteger indent) { + for (NSUInteger i = 0, max = desc.length; i < max; i++) { + unichar c = [desc characterAtIndex:i]; + if (c == '\n') { + for (NSUInteger j = 0; j < indent; j++) { + [desc insertString:@" " atIndex:i + 1]; + } + i += indent * 4; + max += indent * 4; + } + } + return desc; +} + +/// Generaate a description string +static NSString *ModelDescription(NSObject *model) { + static const int kDescMaxLength = 100; + if (!model) return @""; + if (model == (id)kCFNull) return @""; + if (![model isKindOfClass:[NSObject class]]) return [NSString stringWithFormat:@"%@",model]; + + + _YYModelMeta *modelMeta = [_YYModelMeta metaWithClass:model.class]; + switch (modelMeta->_nsType) { + case YYEncodingTypeNSString: case YYEncodingTypeNSMutableString: { + return [NSString stringWithFormat:@"\"%@\"",model]; + } + + case YYEncodingTypeNSValue: + case YYEncodingTypeNSData: case YYEncodingTypeNSMutableData: { + NSString *tmp = model.description; + if (tmp.length > kDescMaxLength) { + tmp = [tmp substringToIndex:kDescMaxLength]; + tmp = [tmp stringByAppendingString:@"..."]; + } + return tmp; + } + + case YYEncodingTypeNSNumber: + case YYEncodingTypeNSDecimalNumber: + case YYEncodingTypeNSDate: + case YYEncodingTypeNSURL: { + return [NSString stringWithFormat:@"%@",model]; + } + + case YYEncodingTypeNSSet: case YYEncodingTypeNSMutableSet: { + model = ((NSSet *)model).allObjects; + } // no break + + case YYEncodingTypeNSArray: case YYEncodingTypeNSMutableArray: { + NSArray *array = (id)model; + NSMutableString *desc = [NSMutableString new]; + if (array.count == 0) { + return [desc stringByAppendingString:@"[]"]; + } else { + [desc appendFormat:@"[\n"]; + for (NSUInteger i = 0, max = array.count; i < max; i++) { + NSObject *obj = array[i]; + [desc appendString:@" "]; + [desc appendString:ModelDescriptionAddIndent(ModelDescription(obj).mutableCopy, 1)]; + [desc appendString:(i + 1 == max) ? @"\n" : @";\n"]; + } + [desc appendString:@"]"]; + return desc; + } + } + case YYEncodingTypeNSDictionary: case YYEncodingTypeNSMutableDictionary: { + NSDictionary *dic = (id)model; + NSMutableString *desc = [NSMutableString new]; + if (dic.count == 0) { + return [desc stringByAppendingString:@"{}"]; + } else { + NSArray *keys = dic.allKeys; + + [desc appendFormat:@"[\n"]; + for (NSUInteger i = 0, max = keys.count; i < max; i++) { + NSString *key = keys[i]; + NSObject *value = dic[key]; + [desc appendString:@" "]; + [desc appendFormat:@"%@ = %@",key, ModelDescriptionAddIndent(ModelDescription(value).mutableCopy, 1)]; + [desc appendString:(i + 1 == max) ? @"\n" : @";\n"]; + } + [desc appendString:@"]"]; + } + return desc; + } + + default: { + NSMutableString *desc = [NSMutableString new]; + [desc appendFormat:@"<%@: %p>", model.class, model]; + if (modelMeta->_allPropertyMetas.count == 0) return desc; + + // sort property names + NSArray *properties = [modelMeta->_allPropertyMetas + sortedArrayUsingComparator:^NSComparisonResult(_YYModelPropertyMeta *p1, _YYModelPropertyMeta *p2) { + return [p1->_name compare:p2->_name]; + }]; + + [desc appendFormat:@" {\n"]; + for (NSUInteger i = 0, max = properties.count; i < max; i++) { + _YYModelPropertyMeta *property = properties[i]; + NSString *propertyDesc; + if (property->_isCNumber) { + NSNumber *num = ModelCreateNumberFromProperty(model, property); + propertyDesc = num.stringValue; + } else { + switch (property->_type & YYEncodingTypeMask) { + case YYEncodingTypeObject: { + id v = ((id (*)(id, SEL))(void *) objc_msgSend)((id)model, property->_getter); + propertyDesc = ModelDescription(v); + if (!propertyDesc) propertyDesc = @""; + } break; + case YYEncodingTypeClass: { + id v = ((id (*)(id, SEL))(void *) objc_msgSend)((id)model, property->_getter); + propertyDesc = ((NSObject *)v).description; + if (!propertyDesc) propertyDesc = @""; + } break; + case YYEncodingTypeSEL: { + SEL sel = ((SEL (*)(id, SEL))(void *) objc_msgSend)((id)model, property->_getter); + if (sel) propertyDesc = NSStringFromSelector(sel); + else propertyDesc = @""; + } break; + case YYEncodingTypeBlock: { + id block = ((id (*)(id, SEL))(void *) objc_msgSend)((id)model, property->_getter); + propertyDesc = block ? ((NSObject *)block).description : @""; + } break; + case YYEncodingTypeCArray: case YYEncodingTypeCString: case YYEncodingTypePointer: { + void *pointer = ((void* (*)(id, SEL))(void *) objc_msgSend)((id)model, property->_getter); + propertyDesc = [NSString stringWithFormat:@"%p",pointer]; + } break; + case YYEncodingTypeStruct: case YYEncodingTypeUnion: { + NSValue *value = [model valueForKey:property->_name]; + propertyDesc = value ? value.description : @"{unknown}"; + } break; + default: propertyDesc = @""; + } + } + + propertyDesc = ModelDescriptionAddIndent(propertyDesc.mutableCopy, 1); + [desc appendFormat:@" %@ = %@",property->_name, propertyDesc]; + [desc appendString:(i + 1 == max) ? @"\n" : @";\n"]; + } + [desc appendFormat:@"}"]; + return desc; + } + } +} @implementation NSObject (YYModel) @@ -1389,7 +1528,7 @@ - (id)yy_modelCopy{ case YYEncodingTypeLongDouble: { long double num = ((long double (*)(id, SEL))(void *) objc_msgSend)((id)self, propertyMeta->_getter); ((void (*)(id, SEL, long double))(void *) objc_msgSend)((id)one, propertyMeta->_setter, num); - } break; + } // break; commented for code coverage in next line default: break; } } else { @@ -1413,11 +1552,8 @@ - (id)yy_modelCopy{ if (value) { [one setValue:value forKey:propertyMeta->_name]; } - } - @catch (NSException *exception) { - // do nothing... - } - } break; + } @catch (NSException *exception) {} + } // break; commented for code coverage in next line default: break; } } @@ -1471,10 +1607,7 @@ - (void)yy_modelEncodeWithCoder:(NSCoder *)aCoder { @try { NSValue *value = [self valueForKey:NSStringFromSelector(propertyMeta->_getter)]; [aCoder encodeObject:value forKey:propertyMeta->_name]; - } - @catch (NSException *exception) { - // do nothing... - } + } @catch (NSException *exception) {} } } break; @@ -1520,10 +1653,7 @@ - (id)yy_modelInitWithCoder:(NSCoder *)aDecoder { @try { NSValue *value = [aDecoder decodeObjectForKey:propertyMeta->_name]; if (value) [self setValue:value forKey:propertyMeta->_name]; - } - @catch (NSException *exception) { - // do nothing... - } + } @catch (NSException *exception) {} } } break; @@ -1564,11 +1694,15 @@ - (BOOL)yy_modelIsEqual:(id)model { id that = [model valueForKey:NSStringFromSelector(propertyMeta->_getter)]; if (this == that) continue; if (this == nil || that == nil) return NO; - if ([this isEqual:that]) continue; + if (![this isEqual:that]) return NO; } return YES; } +- (NSString *)yy_modelDescription { + return ModelDescription(self); +} + @end diff --git a/Pods/YYModel/YYModel/YYClassInfo.h b/Pods/YYModel/YYModel/YYClassInfo.h index ebbf7d4..a74e96f 100644 --- a/Pods/YYModel/YYModel/YYClassInfo.h +++ b/Pods/YYModel/YYModel/YYClassInfo.h @@ -12,6 +12,8 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + /** Type encoding's type. */ @@ -78,68 +80,98 @@ YYEncodingType YYEncodingGetType(const char *typeEncoding); Instance variable information. */ @interface YYClassIvarInfo : NSObject -@property (nonatomic, assign, readonly) Ivar ivar; -@property (nonatomic, strong, readonly) NSString *name; ///< Ivar's name -@property (nonatomic, assign, readonly) ptrdiff_t offset; ///< Ivar's offset +@property (nonatomic, assign, readonly) Ivar ivar; ///< ivar opaque struct +@property (nonatomic, strong, readonly) NSString *name; ///< Ivar's name +@property (nonatomic, assign, readonly) ptrdiff_t offset; ///< Ivar's offset @property (nonatomic, strong, readonly) NSString *typeEncoding; ///< Ivar's type encoding -@property (nonatomic, assign, readonly) YYEncodingType type; ///< Ivar's type +@property (nonatomic, assign, readonly) YYEncodingType type; ///< Ivar's type + +/** + Creates and returns an ivar info object. + + @param ivar ivar opaque struct + @return A new object, or nil if an error occurs. + */ - (instancetype)initWithIvar:(Ivar)ivar; @end + /** Method information. */ @interface YYClassMethodInfo : NSObject -@property (nonatomic, assign, readonly) Method method; -@property (nonatomic, strong, readonly) NSString *name; ///< method name -@property (nonatomic, assign, readonly) SEL sel; ///< method's selector -@property (nonatomic, assign, readonly) IMP imp; ///< method's implementation -@property (nonatomic, strong, readonly) NSString *typeEncoding; ///< method's parameter and return types -@property (nonatomic, strong, readonly) NSString *returnTypeEncoding; ///< return value's type -@property (nonatomic, strong, readonly) NSArray *argumentTypeEncodings; ///< array of arguments' type +@property (nonatomic, assign, readonly) Method method; ///< method opaque struct +@property (nonatomic, strong, readonly) NSString *name; ///< method name +@property (nonatomic, assign, readonly) SEL sel; ///< method's selector +@property (nonatomic, assign, readonly) IMP imp; ///< method's implementation +@property (nonatomic, strong, readonly) NSString *typeEncoding; ///< method's parameter and return types +@property (nonatomic, strong, readonly) NSString *returnTypeEncoding; ///< return value's type +@property (nullable, nonatomic, strong, readonly) NSArray *argumentTypeEncodings; ///< array of arguments' type + +/** + Creates and returns a method info object. + + @param method method opaque struct + @return A new object, or nil if an error occurs. + */ - (instancetype)initWithMethod:(Method)method; @end + /** Property information. */ @interface YYClassPropertyInfo : NSObject -@property (nonatomic, assign, readonly) objc_property_t property; -@property (nonatomic, strong, readonly) NSString *name; ///< property's name -@property (nonatomic, assign, readonly) YYEncodingType type; ///< property's type -@property (nonatomic, strong, readonly) NSString *typeEncoding; ///< property's encoding value -@property (nonatomic, strong, readonly) NSString *ivarName; ///< property's ivar name -@property (nonatomic, assign, readonly) Class cls; ///< may be nil -@property (nonatomic, strong, readonly) NSString *getter; ///< getter (nonnull) -@property (nonatomic, strong, readonly) NSString *setter; ///< setter (nonnull) +@property (nonatomic, assign, readonly) objc_property_t property; ///< property's opaque struct +@property (nonatomic, strong, readonly) NSString *name; ///< property's name +@property (nonatomic, assign, readonly) YYEncodingType type; ///< property's type +@property (nonatomic, strong, readonly) NSString *typeEncoding; ///< property's encoding value +@property (nonatomic, strong, readonly) NSString *ivarName; ///< property's ivar name +@property (nullable, nonatomic, assign, readonly) Class cls; ///< may be nil +@property (nonatomic, assign, readonly) SEL getter; ///< getter (nonnull) +@property (nonatomic, assign, readonly) SEL setter; ///< setter (nonnull) + +/** + Creates and returns a property info object. + + @param property property opaque struct + @return A new object, or nil if an error occurs. + */ - (instancetype)initWithProperty:(objc_property_t)property; @end + /** Class information for a class. */ @interface YYClassInfo : NSObject - -@property (nonatomic, assign, readonly) Class cls; -@property (nonatomic, assign, readonly) Class superCls; -@property (nonatomic, assign, readonly) Class metaCls; -@property (nonatomic, assign, readonly) BOOL isMeta; -@property (nonatomic, strong, readonly) NSString *name; -@property (nonatomic, strong, readonly) YYClassInfo *superClassInfo; - -@property (nonatomic, strong, readonly) NSDictionary *ivarInfos; ///< key:NSString(ivar), value:YYClassIvarInfo -@property (nonatomic, strong, readonly) NSDictionary *methodInfos; ///< key:NSString(selector), value:YYClassMethodInfo -@property (nonatomic, strong, readonly) NSDictionary *propertyInfos; ///< key:NSString(property), value:YYClassPropertyInfo +@property (nonatomic, assign, readonly) Class cls; ///< class object +@property (nullable, nonatomic, assign, readonly) Class superCls; ///< super class object +@property (nullable, nonatomic, assign, readonly) Class metaCls; ///< class's meta class object +@property (nonatomic, readonly) BOOL isMeta; ///< whether this class is meta class +@property (nonatomic, strong, readonly) NSString *name; ///< class name +@property (nullable, nonatomic, strong, readonly) YYClassInfo *superClassInfo; ///< super class's class info +@property (nullable, nonatomic, strong, readonly) NSDictionary *ivarInfos; ///< ivars +@property (nullable, nonatomic, strong, readonly) NSDictionary *methodInfos; ///< methods +@property (nullable, nonatomic, strong, readonly) NSDictionary *propertyInfos; ///< properties /** If the class is changed (for example: you add a method to this class with 'class_addMethod()'), you should call this method to refresh the class info cache. - After called this method, you may call 'classInfoWithClass' or - 'classInfoWithClassName' to get the updated class info. + After called this method, `needUpdate` will returns `YES`, and you should call + 'classInfoWithClass' or 'classInfoWithClassName' to get the updated class info. */ - (void)setNeedUpdate; +/** + If this method returns `YES`, you should stop using this instance and call + `classInfoWithClass` or `classInfoWithClassName` to get the updated class info. + + @return Whether this class info need update. + */ +- (BOOL)needUpdate; + /** Get the class info of a specified Class. @@ -149,7 +181,7 @@ YYEncodingType YYEncodingGetType(const char *typeEncoding); @param cls A class. @return A class info, or nil if an error occurs. */ -+ (instancetype)classInfoWithClass:(Class)cls; ++ (nullable instancetype)classInfoWithClass:(Class)cls; /** Get the class info of a specified Class. @@ -160,6 +192,8 @@ YYEncodingType YYEncodingGetType(const char *typeEncoding); @param className A class name. @return A class info, or nil if an error occurs. */ -+ (instancetype)classInfoWithClassName:(NSString *)className; ++ (nullable instancetype)classInfoWithClassName:(NSString *)className; @end + +NS_ASSUME_NONNULL_END diff --git a/Pods/YYModel/YYModel/YYClassInfo.m b/Pods/YYModel/YYModel/YYClassInfo.m index d248ee9..15652b6 100644 --- a/Pods/YYModel/YYModel/YYClassInfo.m +++ b/Pods/YYModel/YYModel/YYClassInfo.m @@ -11,7 +11,6 @@ #import "YYClassInfo.h" #import -#import YYEncodingType YYEncodingGetType(const char *typeEncoding) { char *type = (char *)typeEncoding; @@ -169,7 +168,7 @@ - (instancetype)initWithProperty:(objc_property_t)property { if (attrs[i].value) { _typeEncoding = [NSString stringWithUTF8String:attrs[i].value]; type = YYEncodingGetType(attrs[i].value); - if (type & YYEncodingTypeObject) { + if ((type & YYEncodingTypeMask) == YYEncodingTypeObject) { size_t len = strlen(attrs[i].value); if (len > 3) { char name[len - 2]; @@ -206,15 +205,15 @@ - (instancetype)initWithProperty:(objc_property_t)property { case 'G': { type |= YYEncodingTypePropertyCustomGetter; if (attrs[i].value) { - _getter = [NSString stringWithUTF8String:attrs[i].value]; + _getter = NSSelectorFromString([NSString stringWithUTF8String:attrs[i].value]); } } break; case 'S': { type |= YYEncodingTypePropertyCustomSetter; if (attrs[i].value) { - _setter = [NSString stringWithUTF8String:attrs[i].value]; + _setter = NSSelectorFromString([NSString stringWithUTF8String:attrs[i].value]); } - } break; + } // break; commented for code coverage in next line default: break; } } @@ -226,10 +225,10 @@ - (instancetype)initWithProperty:(objc_property_t)property { _type = type; if (_name.length) { if (!_getter) { - _getter = _name; + _getter = NSSelectorFromString(_name); } if (!_setter) { - _setter = [NSString stringWithFormat:@"set%@%@:", [_name substringToIndex:1].uppercaseString, [_name substringFromIndex:1]]; + _setter = NSSelectorFromString([NSString stringWithFormat:@"set%@%@:", [_name substringToIndex:1].uppercaseString, [_name substringFromIndex:1]]); } } return self; @@ -297,6 +296,11 @@ - (void)_update { } free(ivars); } + + if (!_ivarInfos) _ivarInfos = @{}; + if (!_methodInfos) _methodInfos = @{}; + if (!_propertyInfos) _propertyInfos = @{}; + _needUpdate = NO; } @@ -304,29 +308,33 @@ - (void)setNeedUpdate { _needUpdate = YES; } +- (BOOL)needUpdate { + return _needUpdate; +} + + (instancetype)classInfoWithClass:(Class)cls { if (!cls) return nil; static CFMutableDictionaryRef classCache; static CFMutableDictionaryRef metaCache; static dispatch_once_t onceToken; - static OSSpinLock lock; + static dispatch_semaphore_t lock; dispatch_once(&onceToken, ^{ classCache = CFDictionaryCreateMutable(CFAllocatorGetDefault(), 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); metaCache = CFDictionaryCreateMutable(CFAllocatorGetDefault(), 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - lock = OS_SPINLOCK_INIT; + lock = dispatch_semaphore_create(1); }); - OSSpinLockLock(&lock); + dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER); YYClassInfo *info = CFDictionaryGetValue(class_isMetaClass(cls) ? metaCache : classCache, (__bridge const void *)(cls)); if (info && info->_needUpdate) { [info _update]; } - OSSpinLockUnlock(&lock); + dispatch_semaphore_signal(lock); if (!info) { info = [[YYClassInfo alloc] initWithClass:cls]; if (info) { - OSSpinLockLock(&lock); + dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER); CFDictionarySetValue(info.isMeta ? metaCache : classCache, (__bridge const void *)(cls), (__bridge const void *)(info)); - OSSpinLockUnlock(&lock); + dispatch_semaphore_signal(lock); } } return info; diff --git a/Pods/YYModel/YYModel/YYModel.h b/Pods/YYModel/YYModel/YYModel.h index 72e35eb..e1154ee 100644 --- a/Pods/YYModel/YYModel/YYModel.h +++ b/Pods/YYModel/YYModel/YYModel.h @@ -9,7 +9,7 @@ // LICENSE file in the root directory of this source tree. // -#import +#import #if __has_include() FOUNDATION_EXPORT double YYModelVersionNumber;