From bd0b8c2fdbedbb50ea05e572e5ec77b0c0c8146e Mon Sep 17 00:00:00 2001 From: Paolo Manna Date: Thu, 22 Jan 2015 17:12:56 +0000 Subject: [PATCH 001/171] - Added toJSONData accessor to JSONModel - Made date formatter static to avoid recreating it each time --- JSONModel/JSONModel/JSONModel.h | 13 ++++++ JSONModel/JSONModel/JSONModel.m | 41 ++++++++++++------- .../JSONValueTransformer.m | 28 +++++++------ 3 files changed, 54 insertions(+), 28 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 0e6dab04..65a3d801 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -186,6 +186,12 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) */ -(NSString*)toJSONString; + /** + * Export the whole object to a JSON data text string + * @return JSON text data describing the data model + */ + -(NSData*)toJSONData; + /** * Export the specified properties of the object to a dictionary * @param propertyNames the properties to export; if nil, all properties exported @@ -200,6 +206,13 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) */ -(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames; + /** + * Export the specified properties of the object to a JSON data text string + * @param propertyNames the properties to export; if nil, all properties exported + * @return JSON text data describing the data model + */ + -(NSData*)toJSONDataWithKeys:(NSArray*)propertyNames; + /** @name Batch methods */ /** diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 0354ad01..89671fe6 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -928,6 +928,11 @@ -(NSString*)toJSONString return [self toJSONStringWithKeys:nil]; } +-(NSData*)toJSONData +{ + return [self toJSONDataWithKeys:nil]; +} + //exports the model as a dictionary of JSON compliant objects -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames { @@ -1049,23 +1054,29 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames } //exports model to a dictionary and then to a JSON string +-(NSData*)toJSONDataWithKeys:(NSArray*)propertyNames +{ + NSData* jsonData = nil; + NSError* jsonError = nil; + + @try { + NSDictionary* dict = [self toDictionaryWithKeys:propertyNames]; + jsonData = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&jsonError]; + } + @catch (NSException *exception) { + //this should not happen in properly design JSONModel + //usually means there was no reverse transformer for a custom property + JMLog(@"EXCEPTION: %@", exception.description); + return nil; + } + + return jsonData; +} + -(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames { - NSData* jsonData = nil; - NSError* jsonError = nil; - - @try { - NSDictionary* dict = [self toDictionaryWithKeys:propertyNames]; - jsonData = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&jsonError]; - } - @catch (NSException *exception) { - //this should not happen in properly design JSONModel - //usually means there was no reverse transformer for a custom property - JMLog(@"EXCEPTION: %@", exception.description); - return nil; - } - - return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + return [[NSString alloc] initWithData: [self toJSONDataWithKeys: propertyNames] + encoding: NSUTF8StringEncoding]; } #pragma mark - import/export of lists diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 2a37f8dd..e40fa57e 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -26,8 +26,6 @@ extern BOOL isNull(id value) return NO; } -static NSDateFormatter *_dateFormatter; - @implementation JSONValueTransformer -(id)init @@ -213,14 +211,14 @@ -(NSString*)JSONObjectFromNSURL:(NSURL*)url #pragma mark - string <-> date -(NSDateFormatter*)importDateFormatter { - static dispatch_once_t once; - static NSDateFormatter* dateFormatter; - dispatch_once(&once, ^{ - dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]]; - [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HHmmssZZZ"]; + static dispatch_once_t onceInput; + static NSDateFormatter* inputDateFormatter; + dispatch_once(&onceInput, ^{ + inputDateFormatter = [[NSDateFormatter alloc] init]; + [inputDateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]]; + [inputDateFormatter setDateFormat:@"yyyy-MM-dd'T'HHmmssZZZ"]; }); - return dateFormatter; + return inputDateFormatter; } -(NSDate*)__NSDateFromNSString:(NSString*)string @@ -231,10 +229,14 @@ -(NSDate*)__NSDateFromNSString:(NSString*)string -(NSString*)__JSONObjectFromNSDate:(NSDate*)date { - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]]; - [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZ"]; - return [dateFormatter stringFromDate:date]; + static dispatch_once_t onceOutput; + static NSDateFormatter *outputDateFormatter; + dispatch_once(&onceOutput, ^{ + outputDateFormatter = [[NSDateFormatter alloc] init]; + [outputDateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]]; + [outputDateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZ"]; + }); + return [outputDateFormatter stringFromDate:date]; } #pragma mark - number <-> date From 9184a339bcb825aa1f8709dcc205c37d734b2f08 Mon Sep 17 00:00:00 2001 From: Dustin Bachrach Date: Tue, 10 Feb 2015 11:08:22 -0800 Subject: [PATCH 002/171] Fix bug in modifying the shared requiredPropertyNames of a JSONModel The requiredPropertyNames are stored as an associated object on the class, but during initialization that mutable set can be modified. This change creates a mutableCopy of the requiredProperties, which allows concurrent changes to the requiredProperties. --- JSONModel/JSONModel/JSONModel.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 0354ad01..36c72be0 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -211,7 +211,7 @@ -(BOOL)__doesDictionary:(NSDictionary*)dict matchModelWithKeyMapper:(JSONKeyMapp { //check if all required properties are present NSArray* incomingKeysArray = [dict allKeys]; - NSMutableSet* requiredProperties = [self __requiredPropertyNames]; + NSMutableSet* requiredProperties = [self __requiredPropertyNames].mutableCopy; NSSet* incomingKeys = [NSSet setWithArray: incomingKeysArray]; //transform the key names, if neccessary From e798444e6e0b0f2bfe3e479d69ef7d96cedee719 Mon Sep 17 00:00:00 2001 From: Amit Palomo Date: Wed, 11 Mar 2015 15:53:49 +0200 Subject: [PATCH 003/171] Safer transformation of NSURLFromNSString e.g. this will handle white spaces in string (convert to %20) instead of returning a nil object. --- JSONModel/JSONModelTransformations/JSONValueTransformer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 2a37f8dd..02a8a0e0 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -202,7 +202,7 @@ -(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number #pragma mark - string <-> url -(NSURL*)NSURLFromNSString:(NSString*)string { - return [NSURL URLWithString:string]; + return [NSURL URLWithString:[string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; } -(NSString*)JSONObjectFromNSURL:(NSURL*)url From c795a5dfa244ece25f5b1fc8047e11f2d49dac87 Mon Sep 17 00:00:00 2001 From: Luckyhu Date: Fri, 24 Apr 2015 18:09:24 +0800 Subject: [PATCH 004/171] Add error log in initWithCoder. Add error log in initWithCoder. --- JSONModel/JSONModel/JSONModel.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 0354ad01..0d35ba50 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1277,7 +1277,9 @@ -(instancetype)initWithCoder:(NSCoder *)decoder { NSString* json = [decoder decodeObjectForKey:@"json"]; - self = [self initWithString:json error:nil]; + JSONModelError *error = nil; + self = [self initWithString:json error:&error]; + if(error) JMLog(@"%@",[error localizedDescription]); return self; } From fc765b4c0b954ffb705a465aa6409246196b1aad Mon Sep 17 00:00:00 2001 From: Alven Diaz Date: Tue, 5 May 2015 00:29:08 -0500 Subject: [PATCH 005/171] Fixing typo in JSONModel header documentation. --- JSONModel/JSONModel/JSONModel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 0e6dab04..35b485f9 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -139,7 +139,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) ///////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - JSONModel interface /** - * The JSONModel is an abstract model class, you should ot instantiate it directly, + * The JSONModel is an abstract model class, you should not instantiate it directly, * as it does not have any properties, and therefore cannot serve as a data model. * Instead you should subclass it, and define the properties you want your data model * to have as properties of your own class. From 7a6ee0ba4bea68586eca9b7e6e1da48dbf1d9e22 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Sun, 10 May 2015 20:08:27 +0200 Subject: [PATCH 006/171] * fixed: https://github.com/icanzilb/JSONModel/pull/319 * fixed: https://github.com/icanzilb/JSONModel/issues/313 --- JSONModel/JSONModelNetworking/JSONHTTPClient.m | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index b5e5d263..1387e5ba 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -190,6 +190,14 @@ +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBod //turn off network indicator if (doesControlIndicator) dispatch_async(dispatch_get_main_queue(), ^{[self setNetworkIndicatorVisible:NO];}); + //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 @@ -301,13 +309,13 @@ +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method param } //step 3: if there's no response so far, return a basic error - if (!responseData && !jsonObject) { + if (!responseData && !error) { //check for false response, but no network error error = [JSONModelError errorBadResponse]; } //step 4: if there's a response at this and no errors, convert to object - if (error==nil && jsonObject==nil) { + if (error==nil) { // Note: it is possible to have a valid response with empty response data (204 No Content). // So only create the JSON object if there is some response data. if(responseData.length > 0) From dfeafb6be961bf770c92a18c2b06be93d574b1e6 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Sun, 10 May 2015 23:14:06 +0200 Subject: [PATCH 007/171] * cleanup --- JSONModel/JSONModel/JSONModel.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 0d35ba50..0fd0433a 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1279,7 +1279,9 @@ -(instancetype)initWithCoder:(NSCoder *)decoder JSONModelError *error = nil; self = [self initWithString:json error:&error]; - if(error) JMLog(@"%@",[error localizedDescription]); + if (error) { + JMLog(@"%@",[error localizedDescription]); + } return self; } From ff121c9d4069f60dcbdb154d72490e6c480b51c1 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Sun, 10 May 2015 23:17:01 +0200 Subject: [PATCH 008/171] * due to numerous requests about problems with this method I'm removing it in 1.1 --- .../JSONModelNetworking/JSONHTTPClient.h | 9 ------- .../JSONModelNetworking/JSONHTTPClient.m | 24 ------------------- 2 files changed, 33 deletions(-) diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index f946c788..a2129fb8 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -85,15 +85,6 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); */ +(void)setTimeoutInSeconds:(int)seconds; -/** - * A method to enable/disable automatic network indicator showing. - * Set to YES by default. - * @param doesControlIndicator if YES, the library shows and hides the - * system network indicator automatically on begin and end of - * network operations - */ -+(void)setControlsNetworkIndicator:(BOOL)doesControlIndicator; - /** * A method to set the default conent type of the request body * By default the content type is set to kContentTypeAutomatic diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index 1387e5ba..18147c04 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -34,11 +34,6 @@ static int defaultTimeoutInSeconds = 60; -/** - * Whether the iPhone net indicator automatically shows when making requests - */ -static BOOL doesControlIndicator = YES; - /** * Custom HTTP headers to send over with *each* request */ @@ -83,11 +78,6 @@ +(void)setTimeoutInSeconds:(int)seconds defaultTimeoutInSeconds = seconds; } -+(void)setControlsNetworkIndicator:(BOOL)does -{ - doesControlIndicator = does; -} - +(void)setRequestContentType:(NSString*)contentTypeString { requestContentType = contentTypeString; @@ -140,9 +130,6 @@ +(NSString*)urlEncode:(id)value #pragma mark - networking worker methods +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSData*)bodyData headers:(NSDictionary*)headers etag:(NSString**)etag error:(JSONModelError**)err { - //turn on network indicator - if (doesControlIndicator) dispatch_async(dispatch_get_main_queue(), ^{[self setNetworkIndicatorVisible:YES];}); - NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: url cachePolicy: defaultCachePolicy timeoutInterval: defaultTimeoutInSeconds]; @@ -187,9 +174,6 @@ +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBod *err = [JSONModelError errorWithDomain:errObj.domain code:errObj.code userInfo:errObj.userInfo]; } - //turn off network indicator - if (doesControlIndicator) dispatch_async(dispatch_get_main_queue(), ^{[self setNetworkIndicatorVisible:NO];}); - //special case for http error code 401 if ([*err code] == kCFURLErrorUserCancelledAuthentication) { response = [[NSHTTPURLResponse alloc] initWithURL:url @@ -387,12 +371,4 @@ +(void)postJSONFromURLWithString:(NSString*)urlString bodyData:(NSData*)bodyData }]; } -#pragma mark - iOS UI helper -+(void)setNetworkIndicatorVisible:(BOOL)isVisible -{ -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:isVisible]; -#endif -} - @end From 07d9ff65c45e0d624e1e6f22e2325974db2f1274 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Sun, 10 May 2015 23:20:23 +0200 Subject: [PATCH 009/171] * adjusted unit tests --- JSONModelDemoTests/UnitTests/HTTPClientSuite.m | 1 - 1 file changed, 1 deletion(-) diff --git a/JSONModelDemoTests/UnitTests/HTTPClientSuite.m b/JSONModelDemoTests/UnitTests/HTTPClientSuite.m index b31665ae..08e57f26 100644 --- a/JSONModelDemoTests/UnitTests/HTTPClientSuite.m +++ b/JSONModelDemoTests/UnitTests/HTTPClientSuite.m @@ -353,7 +353,6 @@ -(void)testPostJSONWithError //check block parameters NSAssert(!json, @"getJSONFromURLWithString:completion: returned nil, object expected"); NSAssert(err, @"getJSONFromURLWithString:completion: returned error, nil error expected"); - NSAssert(err.code==kJSONModelErrorBadResponse, @"Error code didn't match kJSONModelErrorBadResponse"); //release the semaphore lock [[MTTestSemaphor semaphore] lift: semaphorKey]; From ebb59d2cc93914a84a193cba3db4bc9b10743da3 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Sun, 10 May 2015 23:23:31 +0200 Subject: [PATCH 010/171] * 1.1 --- AppledocSettings.plist | 2 +- JSONModel.podspec | 4 ++-- gendoc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AppledocSettings.plist b/AppledocSettings.plist index 0c8c8b41..fc4218ac 100644 --- a/AppledocSettings.plist +++ b/AppledocSettings.plist @@ -3,7 +3,7 @@ --project-name - JSONModel 1.0.2 + JSONModel 1.1 --print-settings --project-company diff --git a/JSONModel.podspec b/JSONModel.podspec index 957932be..063b5482 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,13 +1,13 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.0.2" + s.version = "1.1" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" s.license = { :type => 'MIT', :file => 'LICENSE_jsonmodel.txt' } s.author = { "Marin Todorov" => "touch-code-magazine@underplot.com" } - s.source = { :git => "https://github.com/icanzilb/JSONModel.git", :tag => "1.0.2" } + s.source = { :git => "https://github.com/icanzilb/JSONModel.git", :tag => "1.1" } s.ios.deployment_target = '5.0' s.osx.deployment_target = '10.7' diff --git a/gendoc b/gendoc index ff208d47..a2090adf 100755 --- a/gendoc +++ b/gendoc @@ -1 +1 @@ -appledoc --project-name "JSONModel 1.0.2" --project-company "Marin Todorov, Underplot" --company-id com.underplot --output ~/help --no-create-docset --explicit-crossref JSONModel +appledoc --project-name "JSONModel 1.1" --project-company "Marin Todorov, Underplot" --company-id com.underplot --output ~/help --no-create-docset --explicit-crossref JSONModel From 63439d4b910761a1becef6eeb3737564460bbe34 Mon Sep 17 00:00:00 2001 From: Scott Guelich Date: Mon, 18 May 2015 14:09:39 -0700 Subject: [PATCH 011/171] Document property-specific conversion methods Also bump README version to 1.1 --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 996fe0f9..369e3328 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Magical Data Modelling Framework for JSON -### Version 1.0.2 +### Version 1.1 #####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. @@ -498,6 +498,32 @@ NSString* string = [pm toJSONString]; ``` +#### Custom handling for specific properties + +```objective-c + +@interface ProductModel : JSONModel +@property (assign, nonatomic) int id; +@property (strong, nonatomic) NSString* name; +@property (assign, nonatomic) float price; +@property (strong, nonatomic) NSLocale *locale; +@end + +@implementation ProductModel + +// Convert and assign the locale property +- (void)setLocaleWithNSString:(NSString*)string { + self.locale = [NSLocale localeWithLocaleIdentifier:string]; +} + +- (NSString *)JSONObjectForLocale { + return self.locale.localeIdentifier; +} + +@end + +``` + * json validation * error handling * custom data validation From ce1c10ddc16c3e2a73895aa861a7b56c366df0f0 Mon Sep 17 00:00:00 2001 From: Quanlong He Date: Sat, 30 May 2015 16:03:10 +0800 Subject: [PATCH 012/171] Add .xcodeproj to build framework --- JSONModel.xcodeproj/project.pbxproj | 398 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/JSONModel.xccheckout | 41 ++ .../xcshareddata/xcschemes/JSONModel.xcscheme | 110 +++++ JSONModel/Info.plist | 26 ++ 5 files changed, 582 insertions(+) create mode 100644 JSONModel.xcodeproj/project.pbxproj create mode 100644 JSONModel.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout create mode 100644 JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme create mode 100644 JSONModel/Info.plist diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj new file mode 100644 index 00000000..a9fb3d33 --- /dev/null +++ b/JSONModel.xcodeproj/project.pbxproj @@ -0,0 +1,398 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 92C9BC7C1B19A5B600D79B06 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC641B19A5B600D79B06 /* JSONModel.h */; }; + 92C9BC7D1B19A5B600D79B06 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC651B19A5B600D79B06 /* JSONModel.m */; }; + 92C9BC7E1B19A5B600D79B06 /* JSONModelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC661B19A5B600D79B06 /* JSONModelArray.h */; }; + 92C9BC7F1B19A5B600D79B06 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC671B19A5B600D79B06 /* JSONModelArray.m */; }; + 92C9BC801B19A5B600D79B06 /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; }; + 92C9BC811B19A5B600D79B06 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */; }; + 92C9BC821B19A5B600D79B06 /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */; }; + 92C9BC831B19A5B600D79B06 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */; }; + 92C9BC841B19A5B600D79B06 /* NSArray+JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */; }; + 92C9BC851B19A5B600D79B06 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6E1B19A5B600D79B06 /* NSArray+JSONModel.m */; }; + 92C9BC861B19A5B600D79B06 /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */; }; + 92C9BC871B19A5B600D79B06 /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC711B19A5B600D79B06 /* JSONAPI.h */; }; + 92C9BC881B19A5B600D79B06 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC721B19A5B600D79B06 /* JSONAPI.m */; }; + 92C9BC891B19A5B600D79B06 /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */; }; + 92C9BC8A1B19A5B600D79B06 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC741B19A5B600D79B06 /* JSONHTTPClient.m */; }; + 92C9BC8B1B19A5B600D79B06 /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */; }; + 92C9BC8C1B19A5B600D79B06 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC761B19A5B600D79B06 /* JSONModel+networking.m */; }; + 92C9BC8D1B19A5B600D79B06 /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */; }; + 92C9BC8E1B19A5B600D79B06 /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC791B19A5B600D79B06 /* JSONKeyMapper.m */; }; + 92C9BC8F1B19A5B600D79B06 /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */; }; + 92C9BC901B19A5B600D79B06 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 92C9BC3D1B19A51100D79B06 /* JSONModel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JSONModel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 92C9BC411B19A51100D79B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 92C9BC641B19A5B600D79B06 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; }; + 92C9BC651B19A5B600D79B06 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.m; sourceTree = ""; }; + 92C9BC661B19A5B600D79B06 /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; }; + 92C9BC671B19A5B600D79B06 /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelArray.m; sourceTree = ""; }; + 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; }; + 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; }; + 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; }; + 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; }; + 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+JSONModel.h"; sourceTree = ""; }; + 92C9BC6E1B19A5B600D79B06 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+JSONModel.m"; sourceTree = ""; }; + 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONModelLib.h; path = JSONModel/JSONModelLib.h; sourceTree = ""; }; + 92C9BC711B19A5B600D79B06 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; }; + 92C9BC721B19A5B600D79B06 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; }; + 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONHTTPClient.h; sourceTree = ""; }; + 92C9BC741B19A5B600D79B06 /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONHTTPClient.m; sourceTree = ""; }; + 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONModel+networking.h"; sourceTree = ""; }; + 92C9BC761B19A5B600D79B06 /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONModel+networking.m"; sourceTree = ""; }; + 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKeyMapper.h; sourceTree = ""; }; + 92C9BC791B19A5B600D79B06 /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKeyMapper.m; sourceTree = ""; }; + 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONValueTransformer.h; sourceTree = ""; }; + 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONValueTransformer.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 92C9BC391B19A51100D79B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 92C9BC331B19A51100D79B06 = { + isa = PBXGroup; + children = ( + 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */, + 92C9BC631B19A5B600D79B06 /* JSONModel */, + 92C9BC6C1B19A5B600D79B06 /* JSONModelCategories */, + 92C9BC701B19A5B600D79B06 /* JSONModelNetworking */, + 92C9BC771B19A5B600D79B06 /* JSONModelTransformations */, + 92C9BC401B19A51100D79B06 /* Supporting Files */, + 92C9BC3E1B19A51100D79B06 /* Products */, + ); + sourceTree = ""; + }; + 92C9BC3E1B19A51100D79B06 /* Products */ = { + isa = PBXGroup; + children = ( + 92C9BC3D1B19A51100D79B06 /* JSONModel.framework */, + ); + name = Products; + sourceTree = ""; + }; + 92C9BC401B19A51100D79B06 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 92C9BC411B19A51100D79B06 /* Info.plist */, + ); + name = "Supporting Files"; + path = JSONModel; + sourceTree = ""; + }; + 92C9BC631B19A5B600D79B06 /* JSONModel */ = { + isa = PBXGroup; + children = ( + 92C9BC641B19A5B600D79B06 /* JSONModel.h */, + 92C9BC651B19A5B600D79B06 /* JSONModel.m */, + 92C9BC661B19A5B600D79B06 /* JSONModelArray.h */, + 92C9BC671B19A5B600D79B06 /* JSONModelArray.m */, + 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */, + 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */, + 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */, + 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */, + ); + name = JSONModel; + path = JSONModel/JSONModel; + sourceTree = ""; + }; + 92C9BC6C1B19A5B600D79B06 /* JSONModelCategories */ = { + isa = PBXGroup; + children = ( + 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */, + 92C9BC6E1B19A5B600D79B06 /* NSArray+JSONModel.m */, + ); + name = JSONModelCategories; + path = JSONModel/JSONModelCategories; + sourceTree = ""; + }; + 92C9BC701B19A5B600D79B06 /* JSONModelNetworking */ = { + isa = PBXGroup; + children = ( + 92C9BC711B19A5B600D79B06 /* JSONAPI.h */, + 92C9BC721B19A5B600D79B06 /* JSONAPI.m */, + 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */, + 92C9BC741B19A5B600D79B06 /* JSONHTTPClient.m */, + 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */, + 92C9BC761B19A5B600D79B06 /* JSONModel+networking.m */, + ); + name = JSONModelNetworking; + path = JSONModel/JSONModelNetworking; + sourceTree = ""; + }; + 92C9BC771B19A5B600D79B06 /* JSONModelTransformations */ = { + isa = PBXGroup; + children = ( + 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */, + 92C9BC791B19A5B600D79B06 /* JSONKeyMapper.m */, + 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */, + 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */, + ); + name = JSONModelTransformations; + path = JSONModel/JSONModelTransformations; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 92C9BC3A1B19A51100D79B06 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 92C9BC8B1B19A5B600D79B06 /* JSONModel+networking.h in Headers */, + 92C9BC861B19A5B600D79B06 /* JSONModelLib.h in Headers */, + 92C9BC7E1B19A5B600D79B06 /* JSONModelArray.h in Headers */, + 92C9BC8F1B19A5B600D79B06 /* JSONValueTransformer.h in Headers */, + 92C9BC841B19A5B600D79B06 /* NSArray+JSONModel.h in Headers */, + 92C9BC801B19A5B600D79B06 /* JSONModelClassProperty.h in Headers */, + 92C9BC871B19A5B600D79B06 /* JSONAPI.h in Headers */, + 92C9BC7C1B19A5B600D79B06 /* JSONModel.h in Headers */, + 92C9BC821B19A5B600D79B06 /* JSONModelError.h in Headers */, + 92C9BC891B19A5B600D79B06 /* JSONHTTPClient.h in Headers */, + 92C9BC8D1B19A5B600D79B06 /* JSONKeyMapper.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 92C9BC3C1B19A51100D79B06 /* JSONModel */ = { + isa = PBXNativeTarget; + buildConfigurationList = 92C9BC531B19A51100D79B06 /* Build configuration list for PBXNativeTarget "JSONModel" */; + buildPhases = ( + 92C9BC381B19A51100D79B06 /* Sources */, + 92C9BC391B19A51100D79B06 /* Frameworks */, + 92C9BC3A1B19A51100D79B06 /* Headers */, + 92C9BC3B1B19A51100D79B06 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = JSONModel; + productName = JSONModel; + productReference = 92C9BC3D1B19A51100D79B06 /* JSONModel.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 92C9BC341B19A51100D79B06 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0630; + ORGANIZATIONNAME = "com.touch-code-magazine"; + TargetAttributes = { + 92C9BC3C1B19A51100D79B06 = { + CreatedOnToolsVersion = 6.3.1; + }; + }; + }; + buildConfigurationList = 92C9BC371B19A51100D79B06 /* Build configuration list for PBXProject "JSONModel" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 92C9BC331B19A51100D79B06; + productRefGroup = 92C9BC3E1B19A51100D79B06 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 92C9BC3C1B19A51100D79B06 /* JSONModel */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 92C9BC3B1B19A51100D79B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 92C9BC381B19A51100D79B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 92C9BC8A1B19A5B600D79B06 /* JSONHTTPClient.m in Sources */, + 92C9BC831B19A5B600D79B06 /* JSONModelError.m in Sources */, + 92C9BC851B19A5B600D79B06 /* NSArray+JSONModel.m in Sources */, + 92C9BC901B19A5B600D79B06 /* JSONValueTransformer.m in Sources */, + 92C9BC8E1B19A5B600D79B06 /* JSONKeyMapper.m in Sources */, + 92C9BC881B19A5B600D79B06 /* JSONAPI.m in Sources */, + 92C9BC7D1B19A5B600D79B06 /* JSONModel.m in Sources */, + 92C9BC7F1B19A5B600D79B06 /* JSONModelArray.m in Sources */, + 92C9BC811B19A5B600D79B06 /* JSONModelClassProperty.m in Sources */, + 92C9BC8C1B19A5B600D79B06 /* JSONModel+networking.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 92C9BC511B19A51100D79B06 /* Debug */ = { + 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 92C9BC521B19A51100D79B06 /* 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 92C9BC541B19A51100D79B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = JSONModel/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 92C9BC551B19A51100D79B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = JSONModel/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 92C9BC371B19A51100D79B06 /* Build configuration list for PBXProject "JSONModel" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 92C9BC511B19A51100D79B06 /* Debug */, + 92C9BC521B19A51100D79B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 92C9BC531B19A51100D79B06 /* Build configuration list for PBXNativeTarget "JSONModel" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 92C9BC541B19A51100D79B06 /* Debug */, + 92C9BC551B19A51100D79B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 92C9BC341B19A51100D79B06 /* Project object */; +} diff --git a/JSONModel.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/JSONModel.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..c00329a8 --- /dev/null +++ b/JSONModel.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout b/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout new file mode 100644 index 00000000..03f0a1f3 --- /dev/null +++ b/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 3B7742E4-67BB-4BEC-9806-1DAFD44187D5 + IDESourceControlProjectName + JSONModel + IDESourceControlProjectOriginsDictionary + + 2454A7C0A4BC2A09472718EB55354F320600B245 + github.com:icanzilb/JSONModel.git + + IDESourceControlProjectPath + JSONModel.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + 2454A7C0A4BC2A09472718EB55354F320600B245 + ../.. + + IDESourceControlProjectURL + github.com:icanzilb/JSONModel.git + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + 2454A7C0A4BC2A09472718EB55354F320600B245 + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 2454A7C0A4BC2A09472718EB55354F320600B245 + IDESourceControlWCCName + JSONModel + + + + diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme new file mode 100644 index 00000000..bf5ad70e --- /dev/null +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist new file mode 100644 index 00000000..5c50cfb0 --- /dev/null +++ b/JSONModel/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.touch-code-magazine.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + From 04ef2ed9d5898e38ba30cf4299d964eba32a18aa Mon Sep 17 00:00:00 2001 From: Quanlong He Date: Thu, 4 Jun 2015 16:51:44 +0800 Subject: [PATCH 013/171] Support Carthage --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 996fe0f9..8accab14 100644 --- a/README.md +++ b/README.md @@ -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: From 9582fea718dd2c941741d9248b7f7b7949f22593 Mon Sep 17 00:00:00 2001 From: Quanlong He Date: Wed, 17 Jun 2015 23:30:12 +0800 Subject: [PATCH 014/171] Add `JSONModel.xcodeproj` to `JSONModelDemos.xcworkspace` --- JSONModelDemos.xcworkspace/contents.xcworkspacedata | 3 +++ 1 file changed, 3 insertions(+) diff --git a/JSONModelDemos.xcworkspace/contents.xcworkspacedata b/JSONModelDemos.xcworkspace/contents.xcworkspacedata index 38b606ac..9244ef39 100644 --- a/JSONModelDemos.xcworkspace/contents.xcworkspacedata +++ b/JSONModelDemos.xcworkspace/contents.xcworkspacedata @@ -90,4 +90,7 @@ + + From 2e5a551d0c55eeb8c2e0d64ad1338a65fcf92ad5 Mon Sep 17 00:00:00 2001 From: Quanlong He Date: Wed, 17 Jun 2015 23:31:41 +0800 Subject: [PATCH 015/171] carthage: Import headers --- JSONModel.xcodeproj/project.pbxproj | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index a9fb3d33..c385207e 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -7,26 +7,26 @@ objects = { /* Begin PBXBuildFile section */ - 92C9BC7C1B19A5B600D79B06 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC641B19A5B600D79B06 /* JSONModel.h */; }; + 92C9BC7C1B19A5B600D79B06 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC641B19A5B600D79B06 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC7D1B19A5B600D79B06 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC651B19A5B600D79B06 /* JSONModel.m */; }; - 92C9BC7E1B19A5B600D79B06 /* JSONModelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC661B19A5B600D79B06 /* JSONModelArray.h */; }; + 92C9BC7E1B19A5B600D79B06 /* JSONModelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC661B19A5B600D79B06 /* JSONModelArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC7F1B19A5B600D79B06 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC671B19A5B600D79B06 /* JSONModelArray.m */; }; - 92C9BC801B19A5B600D79B06 /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; }; + 92C9BC801B19A5B600D79B06 /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC811B19A5B600D79B06 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */; }; - 92C9BC821B19A5B600D79B06 /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */; }; + 92C9BC821B19A5B600D79B06 /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC831B19A5B600D79B06 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */; }; - 92C9BC841B19A5B600D79B06 /* NSArray+JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */; }; + 92C9BC841B19A5B600D79B06 /* NSArray+JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC851B19A5B600D79B06 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6E1B19A5B600D79B06 /* NSArray+JSONModel.m */; }; - 92C9BC861B19A5B600D79B06 /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */; }; - 92C9BC871B19A5B600D79B06 /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC711B19A5B600D79B06 /* JSONAPI.h */; }; + 92C9BC861B19A5B600D79B06 /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 92C9BC871B19A5B600D79B06 /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC711B19A5B600D79B06 /* JSONAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC881B19A5B600D79B06 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC721B19A5B600D79B06 /* JSONAPI.m */; }; - 92C9BC891B19A5B600D79B06 /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */; }; + 92C9BC891B19A5B600D79B06 /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC8A1B19A5B600D79B06 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC741B19A5B600D79B06 /* JSONHTTPClient.m */; }; - 92C9BC8B1B19A5B600D79B06 /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */; }; + 92C9BC8B1B19A5B600D79B06 /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC8C1B19A5B600D79B06 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC761B19A5B600D79B06 /* JSONModel+networking.m */; }; - 92C9BC8D1B19A5B600D79B06 /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */; }; + 92C9BC8D1B19A5B600D79B06 /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC8E1B19A5B600D79B06 /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC791B19A5B600D79B06 /* JSONKeyMapper.m */; }; - 92C9BC8F1B19A5B600D79B06 /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */; }; + 92C9BC8F1B19A5B600D79B06 /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC901B19A5B600D79B06 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */; }; /* End PBXBuildFile section */ From 4ea460b708b9d3f3bc04ea490758ba079808237d Mon Sep 17 00:00:00 2001 From: brian-intuit Date: Tue, 23 Jun 2015 18:30:02 -0700 Subject: [PATCH 016/171] Add new line at end of file to quiet "No newline at end of file" warning --- JSONModel/JSONModelLib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index b8f5a178..7c969d50 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -32,4 +32,4 @@ //models array #import "NSArray+JSONModel.h" -#import "JSONModelArray.h" \ No newline at end of file +#import "JSONModelArray.h" From 2707ef67e56e9c6b981b0f49282ce0edc60fe89c Mon Sep 17 00:00:00 2001 From: brian-intuit Date: Tue, 23 Jun 2015 18:31:52 -0700 Subject: [PATCH 017/171] Add param name for mismatchDescription in doc comment to quiet warning --- JSONModel/JSONModel/JSONModelError.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index 36f41ef5..6824c489 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -75,7 +75,7 @@ extern NSString* const kJSONModelKeyPath; /** * Creates a JSONModelError instance with code kJSONModelErrorInvalidData = 1 - * @param A description of the type mismatch that was encountered. + * @param mismatchDescription description of the type mismatch that was encountered. */ +(id)errorInvalidDataWithTypeMismatch:(NSString*)mismatchDescription; From fd4fad17b3669493ff2e7a58fedb2970de2dea4e Mon Sep 17 00:00:00 2001 From: brian-intuit Date: Tue, 23 Jun 2015 18:32:32 -0700 Subject: [PATCH 018/171] Fix param name in doc comment to quiet warning --- JSONModel/JSONModel/JSONModel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 56f4cfa3..5c483402 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -108,7 +108,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * should suffice, but developers have the option ot also overwrite it if needed. * * @param data representing a JSON response (usually fetched from web), to be imported in the model. - * @param err an error or NULL + * @param error an error or NULL */ -(instancetype)initWithData:(NSData*)data error:(NSError**)error; From c18cfedaed4254f7c37828c834a8fa47a64a0aa6 Mon Sep 17 00:00:00 2001 From: Dustin Bachrach Date: Tue, 30 Jun 2015 11:36:44 -0700 Subject: [PATCH 019/171] Allow specifying an NSArray's protocol type in implementation method rather than header file --- JSONModel/JSONModel/JSONModel.h | 14 ++++++++++++++ JSONModel/JSONModel/JSONModel.m | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 56f4cfa3..3760d8b5 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -323,6 +323,20 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) */ +(BOOL)propertyIsIgnored:(NSString*)propertyName; +/** + * Indicates the protocol name for an array property. + * Rather than using: + * @property (strong) NSArray* things; + * You can implement protocolForArrayProperty: and keep your property + * defined like: + * @property (strong) NSArray* things; + * @param propertyName the name of the property + * @return an NSString result indicating the name of the protocol/class + * that should be contained in this array property. Return nil to indicate + * no contained protocol. + */ ++(NSString*)protocolForArrayProperty:(NSString *)propertyName; + /** * Merges values from the given dictionary into the model instance. * @param dict dictionary with values diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 571af312..9b819bc9 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -676,6 +676,11 @@ -(void)__inspectProperties if([[self class] propertyIsIgnored:nsPropertyName]){ p = nil; } + + NSString* customProtocol = [[self class] protocolForArrayProperty:nsPropertyName]; + if (customProtocol) { + p.protocol = customProtocol; + } //few cases where JSONModel will ignore properties automatically if ([propertyType isEqualToString:@"Block"]) { @@ -1270,6 +1275,11 @@ +(BOOL)propertyIsIgnored:(NSString *)propertyName return NO; } ++(NSString*)protocolForArrayProperty:(NSString *)propertyName +{ + return nil; +} + #pragma mark - working with incomplete models -(void)mergeFromDictionary:(NSDictionary*)dict useKeyMapping:(BOOL)useKeyMapping { From 33548fd7aa00fe7b15f898469d5ae28ab26d0ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Fossli?= Date: Wed, 26 Aug 2015 22:24:11 +0200 Subject: [PATCH 020/171] Fixing very unsafe code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I found a very shocking line in this code. ``` NSMutableDictionary* userToJSONMap = [NSMutableDictionary dictionaryWithObjects:map.allKeys forKeys:map.allValues]; ``` Reading the documentation it is clear that this was working by pure luck: ``` @property(readonly, copy) NSArray *allKeys Description A new array containing the dictionary’s keys, or an empty array if the dictionary has no entries (read-only) The order of the elements in the array is not defined. @property(readonly, copy) NSArray *allValues Description A new array containing the dictionary’s values, or an empty array if the dictionary has no entries (read-only) The order of the values in the array isn’t defined. ``` --- .../JSONModelTransformations/JSONKeyMapper.m | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index c3007dad..d2ca303b 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -70,29 +70,41 @@ -(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel return self; } --(instancetype)initWithDictionary:(NSDictionary*)map +-(instancetype)initWithDictionary:(NSDictionary *)map { self = [super init]; if (self) { - //initialize - - NSMutableDictionary* userToModelMap = [NSMutableDictionary dictionaryWithDictionary: map]; - NSMutableDictionary* userToJSONMap = [NSMutableDictionary dictionaryWithObjects:map.allKeys forKeys:map.allValues]; - _JSONToModelKeyBlock = ^NSString*(NSString* keyName) { - NSString* result = [userToModelMap valueForKeyPath: keyName]; - return result?result:keyName; + NSDictionary *userToModelMap = [map copy]; + NSDictionary *userToJSONMap = [self swapKeysAndValuesInDictionary:map]; + + _JSONToModelKeyBlock = ^NSString *(NSString *keyName) { + NSString *result = [userToModelMap valueForKeyPath:keyName]; + return result ? result : keyName; }; - _modelToJSONKeyBlock = ^NSString*(NSString* keyName) { - NSString* result = [userToJSONMap valueForKeyPath: keyName]; - return result?result:keyName; + _modelToJSONKeyBlock = ^NSString *(NSString *keyName) { + NSString *result = [userToJSONMap valueForKeyPath:keyName]; + return result ? result : keyName; }; } return self; } +- (NSDictionary *)swapKeysAndValuesInDictionary:(NSDictionary *)dictionary +{ + NSMutableDictionary *swapped = [NSMutableDictionary new]; + + [dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) { + NSAssert([value isKindOfClass:[NSString class]], @"Expect keys and values to be NSString"); + NSAssert([key isKindOfClass:[NSString class]], @"Expect keys and values to be NSString"); + swapped[value] = key; + }]; + + return swapped; +} + -(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing { return !importing?_JSONToModelKeyBlock(value):_modelToJSONKeyBlock(value); From 3e71562c5ebb8d79b5cb0da455fe0056714c2933 Mon Sep 17 00:00:00 2001 From: Emirate Date: Thu, 3 Sep 2015 17:00:54 +0700 Subject: [PATCH 021/171] Update README.md Update version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 996fe0f9..8c00c395 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Magical Data Modelling Framework for JSON -### Version 1.0.2 +### Version 1.1 #####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. From a7c7f3aec7c306a59f17c452b06003b23842fcc2 Mon Sep 17 00:00:00 2001 From: Luca D'Alberti Date: Sun, 6 Sep 2015 18:20:42 +0200 Subject: [PATCH 022/171] Updated iOS deplyoment target This will solve an issue with AFNetworking integration --- JSONModel.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel.podspec b/JSONModel.podspec index 063b5482..012cd70d 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/icanzilb/JSONModel.git", :tag => "1.1" } - s.ios.deployment_target = '5.0' + s.ios.deployment_target = '6.0' s.osx.deployment_target = '10.7' s.source_files = 'JSONModel/**/*.{m,h}' From d4a8ac22abf5c0feefe7230cfa72d791b0791dc0 Mon Sep 17 00:00:00 2001 From: Dustin Bachrach Date: Fri, 16 Oct 2015 10:21:11 -0700 Subject: [PATCH 023/171] Add tests for +protocolForArrayProperty: --- JSONModelDemoTests/UnitTests/ArrayTests.m | 19 +++++++++++++++++++ .../UnitTests/TestModels/ReposModel.h | 6 ++++++ .../UnitTests/TestModels/ReposModel.m | 13 +++++++++++++ 3 files changed, 38 insertions(+) diff --git a/JSONModelDemoTests/UnitTests/ArrayTests.m b/JSONModelDemoTests/UnitTests/ArrayTests.m index b3f88b79..6f9a6b22 100644 --- a/JSONModelDemoTests/UnitTests/ArrayTests.m +++ b/JSONModelDemoTests/UnitTests/ArrayTests.m @@ -13,6 +13,7 @@ @implementation ArrayTests { ReposModel* repos; + ReposProtocolArrayModel* reposProtocolArray; } -(void)setUp @@ -28,6 +29,9 @@ -(void)setUp repos = [[ReposModel alloc] initWithString:jsonContents error:&err]; XCTAssertNil(err, @"%@", [err localizedDescription]); + reposProtocolArray = [[ReposProtocolArrayModel alloc] initWithString:jsonContents error:&err]; + XCTAssertNil(err, @"%@", [err localizedDescription]); + XCTAssertNotNil(repos, @"Could not load the test data file."); } @@ -36,11 +40,15 @@ -(void)testLoading { XCTAssertTrue([repos.repositories isMemberOfClass:[JSONModelArray class]], @".properties is not a JSONModelArray"); XCTAssertEqualObjects([[repos.repositories[0] class] description], @"GitHubRepoModel", @".properties[0] is not a GitHubRepoModel"); + + XCTAssertTrue([reposProtocolArray.repositories isMemberOfClass:[JSONModelArray class]], @".properties is not a JSONModelArray"); + XCTAssertEqualObjects([[reposProtocolArray.repositories[0] class] description], @"GitHubRepoModel", @".properties[0] is not a GitHubRepoModel"); } -(void)testCount { XCTAssertEqualObjects(@(repos.repositories.count), @100, @"wrong count"); + XCTAssertEqualObjects(@(reposProtocolArray.repositories.count), @100, @"wrong count"); } -(void)testFastEnumeration @@ -48,6 +56,10 @@ -(void)testFastEnumeration for (GitHubRepoModel *m in repos.repositories) { XCTAssertNoThrow([m created], @"should not throw exception"); } + + for (GitHubRepoModel *m in reposProtocolArray.repositories) { + XCTAssertNoThrow([m created], @"should not throw exception"); + } } -(void)testReadArray @@ -65,6 +77,7 @@ -(void)testReadArray -(void)testFirstObject { XCTAssertEqualObjects([[repos.repositories.firstObject class] description], @"GitHubRepoModel", @"wrong class"); + XCTAssertEqualObjects([[reposProtocolArray.repositories.firstObject class] description], @"GitHubRepoModel", @"wrong class"); } /* @@ -74,6 +87,9 @@ -(void)testArrayReverseTransformGitHubIssue_14 { NSDictionary* dict = [repos toDictionary]; XCTAssertNotNil(dict, @"Could not convert ReposModel back to an NSDictionary"); + + NSDictionary* dict2 = [reposProtocolArray toDictionary]; + XCTAssertNotNil(dict2, @"Could not convert ReposProtocolArrayModel back to an NSDictionary"); } /* @@ -83,6 +99,9 @@ -(void)testArrayReverseTransformGitHubIssue_15 { NSString* string = [repos toJSONString]; XCTAssertNotNil(string, @"Could not convert ReposModel back to a string"); + + NSString* string2 = [reposProtocolArray toJSONString]; + XCTAssertNotNil(string2, @"Could not convert ReposProtocolArrayModel back to a string"); } @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h index cfdb16e3..ca606b54 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h +++ b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h @@ -14,3 +14,9 @@ @property (strong, nonatomic) NSMutableArray* repositories; @end + +@interface ReposProtocolArrayModel : JSONModel + +@property (strong, nonatomic) NSMutableArray* repositories; + +@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m index ef95b80f..9baf8223 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m +++ b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m @@ -11,3 +11,16 @@ @implementation ReposModel @end + + +@implementation ReposProtocolArrayModel + ++(NSString*)protocolForArrayProperty:(NSString *)propertyName +{ + if ([propertyName isEqualToString:@"repositories"]) { + return NSStringFromClass(GitHubRepoModel.class); + } + return nil; +} + +@end \ No newline at end of file From e9af29e5b18f4ad1e29dc0c28831a1f1aeed6c69 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Mon, 19 Oct 2015 18:10:53 +0200 Subject: [PATCH 024/171] * bump to 1.1.2 --- AppledocSettings.plist | 2 +- Changelog.md | 10 +++++++++- JSONModel.podspec | 4 ++-- README.md | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/AppledocSettings.plist b/AppledocSettings.plist index fc4218ac..e0666d67 100644 --- a/AppledocSettings.plist +++ b/AppledocSettings.plist @@ -3,7 +3,7 @@ --project-name - JSONModel 1.1 + JSONModel 1.1.2 --print-settings --project-company diff --git a/Changelog.md b/Changelog.md index c74e9259..4ee0f1ac 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,7 +1,15 @@ Change-log ========== -**Version 1.2** @ 2015-01-21 +**Version 1.1.2** @2015-10-19 + +Merging more requests re: iOS9 + +**Version 1.1** @2015-05 + +Merging more requests + +**Version 1.0.2** @ 2015-01-21 - merged a number of pull requests that fix compatibility with iOS 8 and other issues diff --git a/JSONModel.podspec b/JSONModel.podspec index 063b5482..4171b254 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,13 +1,13 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.1" + s.version = "1.1.2" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" s.license = { :type => 'MIT', :file => 'LICENSE_jsonmodel.txt' } s.author = { "Marin Todorov" => "touch-code-magazine@underplot.com" } - s.source = { :git => "https://github.com/icanzilb/JSONModel.git", :tag => "1.1" } + s.source = { :git => "https://github.com/icanzilb/JSONModel.git", :tag => "1.1.2" } s.ios.deployment_target = '5.0' s.osx.deployment_target = '10.7' diff --git a/README.md b/README.md index 369e3328..61f25fa6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Magical Data Modelling Framework for JSON -### Version 1.1 +### Version 1.1.2 #####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. From 71323af046e943a029756549a463fe0f55309fc2 Mon Sep 17 00:00:00 2001 From: fmaylinch Date: Mon, 26 Oct 2015 00:37:48 +0100 Subject: [PATCH 025/171] Keep responseData in JSONModelError --- JSONModel/JSONModel/JSONModelError.h | 2 ++ JSONModel/JSONModelNetworking/JSONHTTPClient.m | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index 6824c489..a5940f4f 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -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/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index 18147c04..18e3eef5 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -310,8 +310,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 From 8254e083c12ef4d42a986678f78d275eb6b5e3eb Mon Sep 17 00:00:00 2001 From: Eric DeLabar Date: Thu, 29 Oct 2015 16:00:00 -0400 Subject: [PATCH 026/171] Add deployment target to support watchOS 2 --- JSONModel.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/JSONModel.podspec b/JSONModel.podspec index 4171b254..6eae7972 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -11,6 +11,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = '5.0' s.osx.deployment_target = '10.7' + s.watchos.deployment_target = '2.0' s.source_files = 'JSONModel/**/*.{m,h}' s.public_header_files = 'JSONModel/**/*.h' From 8dfbdf2e4e2edd974080531c8079616ce54428b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Avard=20Fossli?= Date: Tue, 1 Dec 2015 14:41:51 +0100 Subject: [PATCH 027/171] Lock when writing to keymapper cache and memory concerns Blocks should be copied to heap http://stackoverflow.com/questions/14683746/why-should-we-copy-blocks-rather-than-retain Sometimes EXC_BAD_ACCESS occurs when multiple threads are accessing the same JSONKeyMapper. The spin lock solves this. Keeping a strongSelf through the block also avoids the possibility of self being nil between check and return ``` if (strongSelf.toModelMap[keyName]) { return strongSelf.toModelMap[keyName]; } ``` (using weakself there's a possibility that self is not nil in the if-test and is nil in the return statement) --- .../JSONModelTransformations/JSONKeyMapper.m | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index d2ca303b..0f6bf2cf 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -15,10 +15,12 @@ // 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]; } From bc2dc411871ba79ee0c85f58466ab1924e0d4554 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 14 Dec 2015 14:44:02 +0000 Subject: [PATCH 028/171] Allow custom setters for multiple types The existing behavior is flawed in that the first custom setter used would always be used, even for values of a different type. This new behavior caches the setter on a per-type basis. Resolves #345 --- JSONModel/JSONModel/JSONModel.m | 21 +++++++++++--------- JSONModel/JSONModel/JSONModelClassProperty.h | 8 ++------ JSONModel/JSONModel/JSONModelClassProperty.m | 14 ++++++++++++- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 9b819bc9..8d06f35f 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -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; } diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index 7e470707..b92b6daf 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -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/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index 0fe91582..5e66cae0 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -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) { From badae013f23ced1fa0f57ee57c5cfdf2f6a8f052 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Tue, 15 Dec 2015 11:15:17 +0000 Subject: [PATCH 029/171] Mark `+arrayOfModelsFromDictionaries:` as deprecated Fixes #103 --- JSONModel/JSONModel/JSONModel.h | 2 +- JSONModelDemo_iOS/YouTubeViewController.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 0752e2f7..c57df199 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -227,7 +227,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * @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; diff --git a/JSONModelDemo_iOS/YouTubeViewController.m b/JSONModelDemo_iOS/YouTubeViewController.m index 39608d4e..c5b362e6 100644 --- a/JSONModelDemo_iOS/YouTubeViewController.m +++ b/JSONModelDemo_iOS/YouTubeViewController.m @@ -45,7 +45,7 @@ -(void)viewDidAppear:(BOOL)animated items = [VideoModel arrayOfModelsFromDictionaries: json[@"feed"][@"entry"] - ]; + error:nil]; [HUD hideUIBlockingIndicator]; From b5f0b466cbf83511b4c104d0f6e0e27812525626 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Tue, 15 Dec 2015 11:28:23 +0000 Subject: [PATCH 030/171] Revert "Safer transformation of NSURLFromNSString" This reverts commit e798444e6e0b0f2bfe3e479d69ef7d96cedee719. --- JSONModel/JSONModelTransformations/JSONValueTransformer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 4e5bc4a4..e40fa57e 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -200,7 +200,7 @@ -(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number #pragma mark - string <-> url -(NSURL*)NSURLFromNSString:(NSString*)string { - return [NSURL URLWithString:[string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + return [NSURL URLWithString:string]; } -(NSString*)JSONObjectFromNSURL:(NSURL*)url From a75e750a3bdb308347e1629a59a09c477c4289a8 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Tue, 15 Dec 2015 11:42:01 +0000 Subject: [PATCH 031/171] Added tests & comments to safeguard NSURL behavior --- JSONModel/JSONModelTransformations/JSONValueTransformer.m | 2 ++ JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m | 3 +++ JSONModelDemoTests/UnitTests/DataFiles/converts.json | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index e40fa57e..63ebfe84 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -200,6 +200,8 @@ -(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number #pragma mark - string <-> url -(NSURL*)NSURLFromNSString:(NSString*)string { + // do not change this behavior - there are other ways of overriding it + // see: https://github.com/icanzilb/JSONModel/pull/119 return [NSURL URLWithString:string]; } diff --git a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m index d492cc50..f2c951f4 100644 --- a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m +++ b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m @@ -65,6 +65,9 @@ -(void)testConversions //https://github.com/icanzilb/JSONModel/pull/60 XCTAssertNotNil(b.websiteURL, @"URL parsing did return nil"); XCTAssertNotNil(b.websiteURL.query, @"key1=test"); + + // see: https://github.com/icanzilb/JSONModel/pull/119 + XCTAssertEqualObjects(b.websiteURL.absoluteString, @"http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test&q=search%20terms"); XCTAssertNotNil(b.timeZone, @"Time zone parsing did return nil"); XCTAssertEqualObjects([b.timeZone name], @"PST", @"Time zone is not PST"); diff --git a/JSONModelDemoTests/UnitTests/DataFiles/converts.json b/JSONModelDemoTests/UnitTests/DataFiles/converts.json index e5fbff32..82b1bebf 100644 --- a/JSONModelDemoTests/UnitTests/DataFiles/converts.json +++ b/JSONModelDemoTests/UnitTests/DataFiles/converts.json @@ -12,7 +12,7 @@ "importantEvent": "2012-11-26T10:00:01+02:00", - "websiteURL": "http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test", + "websiteURL": "http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test&q=search%20terms", "timeZone": "PST", From 333e03d69b18a9fc30340d5fd364210f8a570f9d Mon Sep 17 00:00:00 2001 From: James Billingham Date: Tue, 15 Dec 2015 13:45:01 +0000 Subject: [PATCH 032/171] Added method to deserialize an array from string --- JSONModel/JSONModel/JSONModel.h | 3 +-- JSONModel/JSONModel/JSONModel.m | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index c57df199..c9d59a0b 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -228,10 +228,9 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * @see arrayOfDictionariesFromModels: */ +(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 diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 8d06f35f..fa17bc1c 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1094,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; @@ -1102,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 { From 7e1cbb86ece6a8711b6f83e3276a161eaa5619a9 Mon Sep 17 00:00:00 2001 From: Paolo Garri Date: Sun, 25 Oct 2015 15:27:39 +0100 Subject: [PATCH 033/171] Add tvos deployment_target --- JSONModel.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/JSONModel.podspec b/JSONModel.podspec index 3ea29c18..c64584eb 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -12,6 +12,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = '6.0' s.osx.deployment_target = '10.7' s.watchos.deployment_target = '2.0' + s.tvos.deployment_target = '9.0' s.source_files = 'JSONModel/**/*.{m,h}' s.public_header_files = 'JSONModel/**/*.h' From 9efa8cea9e7d5f237acbcd6ccd9edc389f13c7c2 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 16 Dec 2015 18:46:45 +0000 Subject: [PATCH 034/171] Removed redundant file references --- .../contents.xcworkspacedata | 83 ------------------- 1 file changed, 83 deletions(-) diff --git a/JSONModelDemos.xcworkspace/contents.xcworkspacedata b/JSONModelDemos.xcworkspace/contents.xcworkspacedata index 9244ef39..e231fc6b 100644 --- a/JSONModelDemos.xcworkspace/contents.xcworkspacedata +++ b/JSONModelDemos.xcworkspace/contents.xcworkspacedata @@ -1,89 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 2436ac003160d4785f0b536b1e765010b9be8393 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 16 Dec 2015 18:57:27 +0000 Subject: [PATCH 035/171] Xcode updates Various changes caused by opening every file in the latest version of Xcode - 7.2 (on OS X 10.11.2) --- JSONModel.xcodeproj/project.pbxproj | 25 +- .../xcshareddata/xcschemes/JSONModel.xcscheme | 13 +- JSONModel/Info.plist | 2 +- .../JSONModelDemoTests-Info.plist | 2 +- .../JSONModelDemo_iOSTests-Info.plist | 2 +- JSONModelDemo_OSX.xcodeproj/project.pbxproj | 38 +- JSONModelDemo_iOS.xcodeproj/project.pbxproj | 31 +- JSONModelDemo_iOS/GitHubViewController.xib | 183 +- .../JSONModelDemo_iOS-Info.plist | 2 +- JSONModelDemo_iOS/KivaViewController.xib | 358 +- .../KivaViewControllerNetworking.xib | 346 +- JSONModelDemo_iOS/StorageViewController.xib | 12 +- JSONModelDemo_iOS/YouTubeViewController.xib | 11 +- .../en.lproj/MasterViewController.xib | 8 +- JSONModelOSX/JSONModelDemo_OSX-Info.plist | 2 +- JSONModelOSX/ViewController.xib | 1188 +--- JSONModelOSX/en.lproj/MainMenu.xib | 5333 +++-------------- 17 files changed, 985 insertions(+), 6571 deletions(-) diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index c385207e..8dba33f1 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -33,26 +33,26 @@ /* Begin PBXFileReference section */ 92C9BC3D1B19A51100D79B06 /* JSONModel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JSONModel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 92C9BC411B19A51100D79B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 92C9BC641B19A5B600D79B06 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; }; + 92C9BC641B19A5B600D79B06 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC651B19A5B600D79B06 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.m; sourceTree = ""; }; 92C9BC661B19A5B600D79B06 /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; }; 92C9BC671B19A5B600D79B06 /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelArray.m; sourceTree = ""; }; - 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; }; + 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; }; - 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; }; + 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; }; - 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+JSONModel.h"; sourceTree = ""; }; + 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+JSONModel.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC6E1B19A5B600D79B06 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+JSONModel.m"; sourceTree = ""; }; - 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONModelLib.h; path = JSONModel/JSONModelLib.h; sourceTree = ""; }; - 92C9BC711B19A5B600D79B06 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; }; + 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONModelLib.h; path = JSONModel/JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 92C9BC711B19A5B600D79B06 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC721B19A5B600D79B06 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; }; - 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONHTTPClient.h; sourceTree = ""; }; + 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONHTTPClient.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC741B19A5B600D79B06 /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONHTTPClient.m; sourceTree = ""; }; - 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONModel+networking.h"; sourceTree = ""; }; + 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONModel+networking.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC761B19A5B600D79B06 /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONModel+networking.m"; sourceTree = ""; }; - 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKeyMapper.h; sourceTree = ""; }; + 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKeyMapper.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC791B19A5B600D79B06 /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKeyMapper.m; sourceTree = ""; }; - 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONValueTransformer.h; sourceTree = ""; }; + 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONValueTransformer.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONValueTransformer.m; sourceTree = ""; }; /* End PBXFileReference section */ @@ -197,7 +197,7 @@ 92C9BC341B19A51100D79B06 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0630; + LastUpgradeCheck = 0720; ORGANIZATIONNAME = "com.touch-code-magazine"; TargetAttributes = { 92C9BC3C1B19A51100D79B06 = { @@ -275,6 +275,7 @@ CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -351,6 +352,7 @@ INFOPLIST_FILE = JSONModel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; @@ -366,6 +368,7 @@ INFOPLIST_FILE = JSONModel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme index bf5ad70e..ca3fb1a2 100644 --- a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -62,15 +62,18 @@ ReferencedContainer = "container:JSONModel.xcodeproj"> + + CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.touch-code-magazine.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/JSONModelDemoTests/JSONModelDemoTests-Info.plist b/JSONModelDemoTests/JSONModelDemoTests-Info.plist index 5dc7ada4..169b6f71 100644 --- a/JSONModelDemoTests/JSONModelDemoTests-Info.plist +++ b/JSONModelDemoTests/JSONModelDemoTests-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist b/JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist index 5dc7ada4..169b6f71 100644 --- a/JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist +++ b/JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/JSONModelDemo_OSX.xcodeproj/project.pbxproj b/JSONModelDemo_OSX.xcodeproj/project.pbxproj index d718f83b..a5e0e4f0 100644 --- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj +++ b/JSONModelDemo_OSX.xcodeproj/project.pbxproj @@ -137,13 +137,13 @@ 9C05B408168CEB220054215E /* withOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withOptProp.json; sourceTree = ""; }; 9C05B409168CEB220054215E /* withoutOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withoutOptProp.json; sourceTree = ""; }; 9C05B40A168CEB220054215E /* IdPropertyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdPropertyTests.h; sourceTree = ""; }; - 9C05B40B168CEB220054215E /* IdPropertyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdPropertyTests.m; sourceTree = ""; }; + 9C05B40B168CEB220054215E /* IdPropertyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdPropertyTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 9C05B40C168CEB220054215E /* JSONTypesModelWithValidation1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation1.h; sourceTree = ""; }; 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation1.m; sourceTree = ""; }; 9C05B40E168CEB220054215E /* JSONTypesModelWithValidation2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation2.h; sourceTree = ""; }; 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation2.m; sourceTree = ""; }; 9C05B410168CEB220054215E /* JSONTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesReadTests.h; sourceTree = ""; }; - 9C05B411168CEB220054215E /* JSONTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesReadTests.m; sourceTree = ""; }; + 9C05B411168CEB220054215E /* JSONTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesReadTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 9C05B412168CEB220054215E /* JSONValueTransformer+UIColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONValueTransformer+UIColor.h"; sourceTree = ""; }; 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONValueTransformer+UIColor.m"; sourceTree = ""; }; 9C05B414168CEB220054215E /* KeyMappingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyMappingTests.h; sourceTree = ""; }; @@ -151,7 +151,7 @@ 9C05B416168CEB220054215E /* NestedModelsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModelsTests.h; sourceTree = ""; }; 9C05B417168CEB220054215E /* NestedModelsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModelsTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 9C05B418168CEB220054215E /* OptionalPropertiesTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropertiesTests.h; sourceTree = ""; }; - 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropertiesTests.m; sourceTree = ""; }; + 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropertiesTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 9C05B41A168CEB220054215E /* PersistTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistTests.h; sourceTree = ""; }; 9C05B41B168CEB220054215E /* PersistTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersistTests.m; sourceTree = ""; }; 9C05B41C168CEB220054215E /* PrimitiveTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitiveTypesReadTests.h; sourceTree = ""; }; @@ -191,26 +191,26 @@ 9C08C1AD1749750100AA8CC9 /* CopyrightModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyrightModel.h; sourceTree = ""; }; 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyrightModel.m; sourceTree = ""; }; 9C66DFDE168CF09A0015CCDF /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFDF168CF09A0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFDF168CF09A0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; }; 9C66DFE0168CF09A0015CCDF /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; }; - 9C66DFE1168CF09A0015CCDF /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelArray.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFE1168CF09A0015CCDF /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelArray.m; sourceTree = ""; }; 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; }; 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; }; 9C66DFE7168CF09A0015CCDF /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "NSArray+JSONModel.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFE8168CF09A0015CCDF /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSArray+JSONModel.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFE8168CF09A0015CCDF /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSArray+JSONModel.m"; sourceTree = ""; }; 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66DFEB168CF09A0015CCDF /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; }; 9C66DFED168CF09A0015CCDF /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONHTTPClient.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONHTTPClient.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONHTTPClient.m; sourceTree = ""; }; 9C66DFEF168CF09A0015CCDF /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "JSONModel+networking.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "JSONModel+networking.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "JSONModel+networking.m"; sourceTree = ""; }; 9C66DFF2168CF09A0015CCDF /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONKeyMapper.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONKeyMapper.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONKeyMapper.m; sourceTree = ""; }; 9C66DFF4168CF09A0015CCDF /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONValueTransformer.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONValueTransformer.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONValueTransformer.m; sourceTree = ""; }; 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithArrayError.json; sourceTree = ""; }; 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = ""; }; 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = ""; }; @@ -316,7 +316,6 @@ children = ( 9CD4257D1702220300A42AA1 /* Class */, 9C05B3FE168CEB220054215E /* DataFiles */, - 9C05B420168CEB220054215E /* TestModels */, 9C05B3F6168CEB220054215E /* ArrayTests.h */, 9C05B3F7168CEB220054215E /* ArrayTests.m */, 9C05B3F8168CEB220054215E /* BuiltInConversionsTests.h */, @@ -641,7 +640,7 @@ name = JSONModelDemoTests; productName = JSONModelDemoTests; productReference = 9C05B2A8168CE9600054215E /* JSONModelDemoTests.xctest */; - productType = "com.apple.product-type.bundle"; + productType = "com.apple.product-type.bundle.unit-test"; }; 9CC27C8C1689B7BE008B5411 /* JSONModelDemo_OSX */ = { isa = PBXNativeTarget; @@ -666,7 +665,7 @@ 9CC27C841689B7BE008B5411 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0460; + LastUpgradeCheck = 0720; ORGANIZATIONNAME = "Underplot ltd."; TargetAttributes = { 9C05B2A7168CE9600054215E = { @@ -874,6 +873,7 @@ ); INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemoTests-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 6.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = ""; TEST_HOST = "$(BUNDLE_LOADER)"; @@ -895,6 +895,7 @@ GCC_PREFIX_HEADER = "JSONModelDemoTests/JSONModelDemoTests-Prefix.pch"; INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemoTests-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 6.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = ""; TEST_HOST = "$(BUNDLE_LOADER)"; @@ -907,13 +908,13 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -937,7 +938,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; @@ -963,6 +963,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JSONModelOSX/JSONModelDemo_OSX-Prefix.pch"; INFOPLIST_FILE = "JSONModelOSX/JSONModelDemo_OSX-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = JSONModelDemo_OSX; WRAPPER_EXTENSION = app; }; @@ -975,6 +976,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JSONModelOSX/JSONModelDemo_OSX-Prefix.pch"; INFOPLIST_FILE = "JSONModelOSX/JSONModelDemo_OSX-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = JSONModelDemo_OSX; WRAPPER_EXTENSION = app; }; diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj index 1ba85343..540ffded 100644 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_iOS.xcodeproj/project.pbxproj @@ -7,11 +7,11 @@ objects = { /* Begin PBXBuildFile section */ - 4A50001D19C5DCCF00C161A0 /* InitWithDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */; }; 358FD078D3C0D56C77ACD770 /* ExtremeNestingModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */; }; 358FD179E0B41C47C67713B5 /* InteractionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */; }; 358FD61804BD21F41035348E /* ExtremeNestingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */; }; 358FD640BFEAB00349FBBA4A /* DrugModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FD25356988AC33EA6A935 /* DrugModel.m */; }; + 4A50001D19C5DCCF00C161A0 /* InitWithDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */; }; 69286BDA17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */; }; 69286BDB17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */; }; 697852FD17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */; }; @@ -156,7 +156,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitWithDataTests.m; sourceTree = ""; }; 358FD25356988AC33EA6A935 /* DrugModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrugModel.m; sourceTree = ""; }; 358FD7AD55FD213CBAAB460F /* ExtremeNestingModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingModel.h; sourceTree = ""; }; 358FD807C3E86F5DC4058645 /* ExtremeNestingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingTests.h; sourceTree = ""; }; @@ -165,6 +164,7 @@ 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtremeNestingModel.m; sourceTree = ""; }; 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteractionModel.m; sourceTree = ""; }; 358FDED5E028AA00D3E6564D /* InteractionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteractionModel.h; sourceTree = ""; }; + 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitWithDataTests.m; sourceTree = ""; }; 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = ""; }; 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = ""; }; 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImagesObject.json; sourceTree = ""; }; @@ -214,26 +214,26 @@ 9C66DFA6168CEF420015CCDF /* ValidationTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidationTestSuite.h; sourceTree = ""; }; 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidationTestSuite.m; sourceTree = ""; }; 9C66E00C168CF0AA0015CCDF /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E00D168CF0AA0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E00D168CF0AA0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; }; 9C66E00E168CF0AA0015CCDF /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; }; - 9C66E00F168CF0AA0015CCDF /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelArray.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E00F168CF0AA0015CCDF /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelArray.m; sourceTree = ""; }; 9C66E010168CF0AA0015CCDF /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; }; 9C66E012168CF0AA0015CCDF /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E013168CF0AA0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E013168CF0AA0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; }; 9C66E015168CF0AA0015CCDF /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "NSArray+JSONModel.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E016168CF0AA0015CCDF /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSArray+JSONModel.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E016168CF0AA0015CCDF /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSArray+JSONModel.m"; sourceTree = ""; }; 9C66E017168CF0AA0015CCDF /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66E019168CF0AA0015CCDF /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E01A168CF0AA0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E01A168CF0AA0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; }; 9C66E01B168CF0AA0015CCDF /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONHTTPClient.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E01C168CF0AA0015CCDF /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONHTTPClient.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E01C168CF0AA0015CCDF /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONHTTPClient.m; sourceTree = ""; }; 9C66E01D168CF0AA0015CCDF /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "JSONModel+networking.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E01E168CF0AA0015CCDF /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "JSONModel+networking.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E01E168CF0AA0015CCDF /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "JSONModel+networking.m"; sourceTree = ""; }; 9C66E020168CF0AA0015CCDF /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONKeyMapper.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E021168CF0AA0015CCDF /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONKeyMapper.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E021168CF0AA0015CCDF /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONKeyMapper.m; sourceTree = ""; }; 9C66E022168CF0AA0015CCDF /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONValueTransformer.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E023168CF0AA0015CCDF /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONValueTransformer.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66E023168CF0AA0015CCDF /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONValueTransformer.m; sourceTree = ""; }; 9C735D62170B716300FF96F5 /* JSONAPITests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPITests.h; sourceTree = ""; }; 9C735D63170B716300FF96F5 /* JSONAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPITests.m; sourceTree = ""; }; 9C735D6E170C007900FF96F5 /* InitFromWebTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitFromWebTests.h; sourceTree = ""; }; @@ -824,7 +824,7 @@ isa = PBXProject; attributes = { LastTestingUpgradeCheck = 0510; - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0720; ORGANIZATIONNAME = "Underplot ltd."; }; buildConfigurationList = 9CBBBED2166B6CEF008B4326 /* Build configuration list for PBXProject "JSONModelDemo_iOS" */; @@ -1052,6 +1052,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -1098,6 +1099,7 @@ GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch"; INFOPLIST_FILE = "JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = JSONModelDemo_iOS; WRAPPER_EXTENSION = app; }; @@ -1110,6 +1112,7 @@ GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch"; INFOPLIST_FILE = "JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = JSONModelDemo_iOS; WRAPPER_EXTENSION = app; }; @@ -1135,6 +1138,7 @@ INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; OTHER_LDFLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = JSONModelDemo_iOSTests; TEST_HOST = "$(BUNDLE_LOADER)"; }; @@ -1155,6 +1159,7 @@ INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; OTHER_LDFLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = JSONModelDemo_iOSTests; TEST_HOST = "$(BUNDLE_LOADER)"; }; diff --git a/JSONModelDemo_iOS/GitHubViewController.xib b/JSONModelDemo_iOS/GitHubViewController.xib index 83d3d155..18d65e35 100644 --- a/JSONModelDemo_iOS/GitHubViewController.xib +++ b/JSONModelDemo_iOS/GitHubViewController.xib @@ -1,159 +1,24 @@ - - - - 1536 - 12C60 - 2840 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1926 - - - IBProxyObject - IBUITableView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {{0, 20}, {320, 548}} - - - - 3 - MQA - - NO - YES - NO - - - IBUIScreenMetrics - - YES - - - - - - {320, 568} - {568, 320} - - - IBCocoaTouchFramework - Retina 4 Full Screen - 2 - - IBCocoaTouchFramework - NO - 1 - 0 - YES - 44 - 22 - 22 - - - - - - - view - - - - 5 - - - - dataSource - - - - 6 - - - - delegate - - - - 7 - - - - - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - - - GitHubViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 7 - - - - - GitHubViewController - UITableViewController - - IBProjectSource - ./Classes/GitHubViewController.h - - - - - 0 - IBCocoaTouchFramework - YES - 3 - YES - 1926 - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist b/JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist index 025bf26e..b7bc4ba1 100644 --- a/JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist +++ b/JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/JSONModelDemo_iOS/KivaViewController.xib b/JSONModelDemo_iOS/KivaViewController.xib index 5f1bfe69..edb8d586 100644 --- a/JSONModelDemo_iOS/KivaViewController.xib +++ b/JSONModelDemo_iOS/KivaViewController.xib @@ -1,321 +1,37 @@ - - - - 1280 - 12E55 - 4504 - 1187.39 - 626.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 3734.1 - - - IBNSLayoutConstraint - IBProxyObject - IBUITableView - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - - - 274 - {320, 548} - - - _NS:9 - - 3 - MQA - - YES - IBCocoaTouchFramework - YES - 1 - 0 - YES - 44 - 22 - 22 - - - {{0, 20}, {320, 548}} - - - - 3 - MQA - - 2 - - - - - IBUIScreenMetrics - - YES - - - - - - {320, 568} - {568, 320} - - - IBCocoaTouchFramework - Retina 4-inch Full Screen - 2 - - IBCocoaTouchFramework - - - - - - - view - - - - 3 - - - - table - - - - 11 - - - - dataSource - - - - 9 - - - - delegate - - - - 10 - - - - - - 0 - - - - - - 1 - - - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 0 - 29 - 3 - NO - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - - 0 - 29 - 3 - NO - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 0 - 29 - 3 - NO - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 0 - 29 - 3 - NO - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - - - KivaViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 11 - - - - - KivaViewController - UIViewController - - table - UITableView - - - table - - table - UITableView - - - - IBProjectSource - ./Classes/KivaViewController.h - - - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - - - - 0 - IBCocoaTouchFramework - YES - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - YES - 3734.1 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModelDemo_iOS/KivaViewControllerNetworking.xib b/JSONModelDemo_iOS/KivaViewControllerNetworking.xib index db7a65e6..b8cfdbc6 100644 --- a/JSONModelDemo_iOS/KivaViewControllerNetworking.xib +++ b/JSONModelDemo_iOS/KivaViewControllerNetworking.xib @@ -1,309 +1,37 @@ - - - - 1536 - 12C60 - 2840 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1926 - - - IBNSLayoutConstraint - IBProxyObject - IBUITableView - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - - - 274 - {320, 548} - - - _NS:9 - - 3 - MQA - - YES - IBCocoaTouchFramework - YES - 1 - 0 - YES - 44 - 22 - 22 - - - {{0, 20}, {320, 548}} - - - - - 3 - MQA - - 2 - - - - - IBUIScreenMetrics - - YES - - - - - - {320, 568} - {568, 320} - - - IBCocoaTouchFramework - Retina 4 Full Screen - 2 - - IBCocoaTouchFramework - - - - - - - view - - - - 3 - - - - table - - - - 11 - - - - dataSource - - - - 9 - - - - delegate - - - - 10 - - - - - - 0 - - - - - - 1 - - - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - - - KivaViewControllerNetworking - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 11 - - - - - KivaViewControllerNetworking - UIViewController - - table - UITableView - - - table - - table - UITableView - - - - IBProjectSource - ./Classes/KivaViewControllerNetworking.h - - - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - - - - 0 - IBCocoaTouchFramework - YES - 3 - YES - 1926 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModelDemo_iOS/StorageViewController.xib b/JSONModelDemo_iOS/StorageViewController.xib index c1454a08..edd1ac90 100644 --- a/JSONModelDemo_iOS/StorageViewController.xib +++ b/JSONModelDemo_iOS/StorageViewController.xib @@ -1,8 +1,8 @@ - + - - + + @@ -19,7 +19,6 @@ - @@ -30,7 +29,6 @@ - @@ -77,9 +73,7 @@ - - diff --git a/JSONModelDemo_iOS/YouTubeViewController.xib b/JSONModelDemo_iOS/YouTubeViewController.xib index 87a68306..679f9d66 100644 --- a/JSONModelDemo_iOS/YouTubeViewController.xib +++ b/JSONModelDemo_iOS/YouTubeViewController.xib @@ -1,8 +1,8 @@ - + - - + + @@ -18,7 +18,6 @@ - @@ -33,8 +32,6 @@ - - - \ No newline at end of file + diff --git a/JSONModelDemo_iOS/en.lproj/MasterViewController.xib b/JSONModelDemo_iOS/en.lproj/MasterViewController.xib index 47496393..b937d8fd 100644 --- a/JSONModelDemo_iOS/en.lproj/MasterViewController.xib +++ b/JSONModelDemo_iOS/en.lproj/MasterViewController.xib @@ -1,8 +1,8 @@ - + - - + + @@ -15,9 +15,7 @@ - - diff --git a/JSONModelOSX/JSONModelDemo_OSX-Info.plist b/JSONModelOSX/JSONModelDemo_OSX-Info.plist index 3c99c75f..1d5e1057 100644 --- a/JSONModelOSX/JSONModelDemo_OSX-Info.plist +++ b/JSONModelOSX/JSONModelDemo_OSX-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/JSONModelOSX/ViewController.xib b/JSONModelOSX/ViewController.xib index 74f1e59b..b953dda8 100644 --- a/JSONModelOSX/ViewController.xib +++ b/JSONModelOSX/ViewController.xib @@ -1,1043 +1,145 @@ - - - - 1070 - 12C60 - 2840 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 2840 - - - IBNSLayoutConstraint - NSButton - NSButtonCell - NSCustomObject - NSCustomView - NSProgressIndicator - NSScrollView - NSScroller - NSTableCellView - NSTableColumn - NSTableView - NSTextField - NSTextFieldCell - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - ViewController - - - FirstResponder - - - NSApplication - - - - 268 - - - - 268 - {{462, 341}, {16, 16}} - - - - _NS:945 - 20746 - 100 - - - - 268 - {{175, 332}, {99, 32}} - - - - _NS:9 - YES - - 67108864 - 134217728 - GitHub - - LucidaGrande - 13 - 1044 - - _NS:9 - - -2038284288 - 129 - - - 200 - 25 - - NO - - - - 268 - {{79, 332}, {96, 32}} - - - - _NS:9 - YES - - 67108864 - 134217728 - YouTube - - _NS:9 - - -2038284288 - 129 - - - 200 - 25 - - NO - - - - 268 - {{3, 332}, {76, 32}} - - - - _NS:9 - YES - - 67108864 - 134217728 - Kiva - - _NS:9 - - -2038284288 - 129 - - - 200 - 25 - - NO - - - - 268 - - - - 2304 - - - - 256 - - {496, 329} - - - - _NS:13 - YES - NO - YES - - - -2147483392 - {{224, 0}, {16, 17}} - _NS:19 - - - - MyCol - 493.0078125 - 40 - 1000 - - 75497536 - 2048 - - - LucidaGrande - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 337641536 - 2048 - Text Cell - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - 3 - YES - YES - - - - 3 - 2 - - 3 - MQA - - - 6 - System - gridColor - - 3 - MC41AA - - - 32 - 381681664 - - - 4 - 15 - 0 - YES - 0 - 1 - - - {{1, 1}, {496, 329}} - - - - _NS:11 - - - 4 - - - - -2147483392 - {{224, 17}, {15, 102}} - - - - _NS:58 - NO - - _doScroller: - 0.99696969696969695 - - - - -2147483392 - {{1, 119}, {223, 15}} - - - _NS:60 - NO - 1 - - _doScroller: - 0.99798792756539234 - - - {498, 331} - - - - _NS:9 - 133682 - - - - QSAAAEEgAABCCAAAQggAAA - 0.25 - 4 - 1 - - - {498, 371} - - - - NSView - - - - - - - view - - - - 2 - - - - table - - - - 39 - - - - actionKiva: - - - - 44 - - - - actionYoutube: - - - - 50 - - - - actionGithub: - - - - 56 - - - - spinner - - - - 60 - - - - dataSource - - - - 37 - - - - delegate - - - - 38 - - - - textField - - - 274 - - - - 266 - {{0, 15}, {493, 17}} - - - {250, 750} - YES - - 67108928 - 272631808 - Table View Cell - - - - 6 - System - controlColor - - - - - NO - - - {{1, 1}, {493, 32}} - - - - - 32 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 1 - - - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 6 - 1 - - 12 - - 1000 - - 6 - 24 - 3 - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 6 - 1 - - 12 - - 1000 - - 6 - 24 - 3 - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - - 9 - 40 - 3 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 3 - 0 - - 3 - 1 - - 40 - - 1000 - - 3 - 9 - 3 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 3 - 0 - - 3 - 1 - - 11 - - 1000 - - 3 - 9 - 3 - - - - 5 - 0 - - 5 - 1 - - 9 - - 1000 - - 3 - 9 - 3 - - - - - - - - - - - 3 - - - - - - - - - - 4 - - - - - - - - 5 - - - - - 7 - - - - - 8 - - - - - - - - - 11 - - - - - 15 - - - - - 16 - - - - - 18 - - - - - 20 - - - - - 29 - - - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 3 - 9 - 3 - - - - 5 - 0 - - 5 - 1 - - 3 - - 1000 - - 8 - 29 - 3 - - - - 6 - 0 - - 6 - 1 - - 3 - - 1000 - - 8 - 29 - 3 - - - - - - 30 - - - - - - - - 31 - - - - - 33 - - - - - 35 - - - - - 36 - - - - - 40 - - - - - - 7 - 0 - - 0 - 1 - - 64 - - 1000 - - 3 - 9 - 1 - - - - - - 41 - - - - - 42 - - - - - 43 - - - - - 45 - - - - - 46 - - - - - - - - 47 - - - - - 48 - - - - - 49 - - - - - 51 - - - - - - 7 - 0 - - 0 - 1 - - 87 - - 1000 - - 3 - 9 - 1 - - - - - - 52 - - - - - 53 - - - - - 54 - - - - - 55 - - - - - 57 - - - - - 58 - - - - - 59 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - - - - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - MyCell - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - - - - - 60 - - - - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - - - ViewController - NSViewController - - NSProgressIndicator - NSTableView - - - - spinner - NSProgressIndicator - - - table - NSTableView - - - - IBProjectSource - ./Classes/ViewController.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - YES - 3 - YES - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModelOSX/en.lproj/MainMenu.xib b/JSONModelOSX/en.lproj/MainMenu.xib index 557fab51..79a67ab6 100644 --- a/JSONModelOSX/en.lproj/MainMenu.xib +++ b/JSONModelOSX/en.lproj/MainMenu.xib @@ -1,4666 +1,667 @@ - - - - 1080 - 12C60 - 2840 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 2840 - - - NSCustomObject - NSMenu - NSMenuItem - NSView - NSWindowTemplate - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - - - JSONModelDemo_OSX - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - JSONModelDemo_OSX - - - - About JSONModelDemo_OSX - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide JSONModelDemo_OSX - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit JSONModelDemo_OSX - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save… - s - 1048576 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find and Replace… - f - 1572864 - 2147483647 - - - 12 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - - - Font - - 2147483647 - - - submenuAction: - - Font - - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligatures - - 2147483647 - - - submenuAction: - - Ligatures - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - - - JSONModelDemo_OSX Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - 15 - 2 - {{335, 390}, {480, 360}} - 1954021376 - JSONModelDemo_OSX - NSWindow - - - - - 256 - {480, 360} - - {{0, 0}, {2560, 1418}} - {10000000000000, 10000000000000} - YES - - - AppDelegate - - - NSFontManager - - - - - - - terminate: - - - - 449 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - delegate - - - - 495 - - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - saveDocument: - - - - 362 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - performFindPanelAction: - - - - 535 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - window - - - - 532 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - - - - - - - - - - - - 19 - - - - - - - - 56 - - - - - - - - 217 - - - - - - - - 83 - - - - - - - - 81 - - - - - - - - - - - - - - - - - 75 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - - - - - - 126 - - - - - 205 - - - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - - - - - - 216 - - - - - - - - 200 - - - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - - - - - - 296 - - - - - - - - - 297 - - - - - 298 - - - - - 211 - - - - - - - - 212 - - - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - - - - - - 349 - - - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 371 - - - - - - - - 372 - - - - - 375 - - - - - - - - 376 - - - - - - - - - 377 - - - - - - - - 388 - - - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - - - - - - 398 - - - - - - - - 399 - - - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - - - - - - 451 - - - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - - - - - - 491 - - - - - - - - 492 - - - - - 494 - - - - - 496 - - - - - - - - 497 - - - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - 534 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{380, 496}, {480, 360}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 535 - - - - - ABCardController - NSObject - - id - id - id - id - id - id - id - - - - addCardViewField: - id - - - copy: - id - - - cut: - id - - - doDelete: - id - - - find: - id - - - paste: - id - - - saveChanges: - id - - - - ABCardView - NSButton - NSManagedObjectContext - NSSearchField - NSTextField - NSWindow - - - - mCardView - ABCardView - - - mEditButton - NSButton - - - mManagedObjectContext - NSManagedObjectContext - - - mSearchField - NSSearchField - - - mStatusTextField - NSTextField - - - mWindow - NSWindow - - - - IBProjectSource - ./Classes/ABCardController.h - - - - ABCardView - NSView - - id - id - - - - commitAndSave: - id - - - statusImageClicked: - id - - - - NSObjectController - NSImageView - NSView - ABNameFrameView - NSView - NSImage - ABImageView - - - - mBindingsController - NSObjectController - - - mBuddyStatusImage - NSImageView - - - mHeaderView - NSView - - - mNameView - ABNameFrameView - - - mNextKeyView - NSView - - - mUserImage - NSImage - - - mUserImageView - ABImageView - - - - IBProjectSource - ./Classes/ABCardView.h - - - - ABImageView - NSImageView - - id - id - id - id - - - - copy: - id - - - cut: - id - - - delete: - id - - - paste: - id - - - - IBProjectSource - ./Classes/ABImageView.h - - - - AppDelegate - NSObject - - id - id - - - - applicationShouldTerminate: - id - - - applicationWillFinishLaunching: - id - - - - IBProjectSource - ./Classes/AppDelegate.h - - - - DVTBorderedView - DVTLayoutView_ML - - contentView - NSView - - - contentView - - contentView - NSView - - - - IBProjectSource - ./Classes/DVTBorderedView.h - - - - DVTDelayedMenuButton - NSButton - - IBProjectSource - ./Classes/DVTDelayedMenuButton.h - - - - DVTGradientImageButton - NSButton - - IBProjectSource - ./Classes/DVTGradientImageButton.h - - - - DVTImageAndTextCell - NSTextFieldCell - - IBProjectSource - ./Classes/DVTImageAndTextCell.h - - - - DVTImageAndTextColumn - NSTableColumn - - IBProjectSource - ./Classes/DVTImageAndTextColumn.h - - - - DVTLayoutView_ML - NSView - - IBProjectSource - ./Classes/DVTLayoutView_ML.h - - - - DVTOutlineView - NSOutlineView - - IBProjectSource - ./Classes/DVTOutlineView.h - - - - DVTSplitView - NSSplitView - - IBProjectSource - ./Classes/DVTSplitView.h - - - - DVTStackView_ML - DVTLayoutView_ML - - IBProjectSource - ./Classes/DVTStackView_ML.h - - - - DVTTableView - NSTableView - - IBProjectSource - ./Classes/DVTTableView.h - - - - DVTViewController - NSViewController - - IBProjectSource - ./Classes/DVTViewController.h - - - - HFController - NSObject - - selectAll: - id - - - selectAll: - - selectAll: - id - - - - IBProjectSource - ./Classes/HFController.h - - - - HFRepresenterTextView - NSView - - selectAll: - id - - - selectAll: - - selectAll: - id - - - - IBProjectSource - ./Classes/HFRepresenterTextView.h - - - - IBEditor - NSObject - - id - id - id - id - id - - - - changeFont: - id - - - performCopy: - id - - - performCut: - id - - - selectAll: - id - - - sizeSelectionToFit: - id - - - - IBProjectSource - ./Classes/IBEditor.h - - - - IDECapsuleListView - DVTStackView_ML - - dataSource - id - - - dataSource - - dataSource - id - - - - IBProjectSource - ./Classes/IDECapsuleListView.h - - - - IDEDMArrayController - NSArrayController - - IBProjectSource - ./Classes/IDEDMArrayController.h - - - - IDEDMEditor - IDEEditor - - DVTBorderedView - NSView - IDEDMEditorSourceListController - DVTSplitView - - - - bottomToolbarBorderView - DVTBorderedView - - - sourceListSplitViewPane - NSView - - - sourceListViewController - IDEDMEditorSourceListController - - - splitView - DVTSplitView - - - - IBProjectSource - ./Classes/IDEDMEditor.h - - - - IDEDMEditorController - IDEViewController - - IBProjectSource - ./Classes/IDEDMEditorController.h - - - - IDEDMEditorSourceListController - IDEDMEditorController - - DVTBorderedView - IDEDMEditor - DVTImageAndTextColumn - DVTOutlineView - NSTreeController - - - - borderedView - DVTBorderedView - - - parentEditor - IDEDMEditor - - - primaryColumn - DVTImageAndTextColumn - - - sourceListOutlineView - DVTOutlineView - - - sourceListTreeController - NSTreeController - - - - IBProjectSource - ./Classes/IDEDMEditorSourceListController.h - - - - IDEDMHighlightImageAndTextCell - DVTImageAndTextCell - - IBProjectSource - ./Classes/IDEDMHighlightImageAndTextCell.h - - - - IDEDataModelBrowserEditor - IDEDMEditorController - - IDEDataModelPropertiesTableController - IDECapsuleListView - NSArrayController - IDEDataModelPropertiesTableController - IDEDataModelEntityContentsEditor - IDEDataModelPropertiesTableController - - - - attributesTableViewController - IDEDataModelPropertiesTableController - - - capsuleView - IDECapsuleListView - - - entityArrayController - NSArrayController - - - fetchedPropertiesTableViewController - IDEDataModelPropertiesTableController - - - parentEditor - IDEDataModelEntityContentsEditor - - - relationshipsTableViewController - IDEDataModelPropertiesTableController - - - - IBProjectSource - ./Classes/IDEDataModelBrowserEditor.h - - - - IDEDataModelConfigurationEditor - IDEDMEditorController - - IDECapsuleListView - IDEDataModelEditor - IDEDataModelConfigurationTableController - - - - capsuleListView - IDECapsuleListView - - - parentEditor - IDEDataModelEditor - - - tableController - IDEDataModelConfigurationTableController - - - - IBProjectSource - ./Classes/IDEDataModelConfigurationEditor.h - - - - IDEDataModelConfigurationTableController - IDEDMEditorController - - NSArrayController - NSArrayController - IDEDataModelConfigurationEditor - XDTableView - - - - configurationsArrayController - NSArrayController - - - entitiesArrayController - NSArrayController - - - parentEditor - IDEDataModelConfigurationEditor - - - tableView - XDTableView - - - - IBProjectSource - ./Classes/IDEDataModelConfigurationTableController.h - - - - IDEDataModelDiagramEditor - IDEDMEditorController - - XDDiagramView - IDEDataModelEntityContentsEditor - - - - diagramView - XDDiagramView - - - parentEditor - IDEDataModelEntityContentsEditor - - - - IBProjectSource - ./Classes/IDEDataModelDiagramEditor.h - - - - IDEDataModelEditor - IDEDMEditor - - DVTDelayedMenuButton - DVTDelayedMenuButton - NSSegmentedControl - IDEDataModelConfigurationEditor - IDEDataModelEntityContentsEditor - IDEDataModelFetchRequestEditor - NSSegmentedControl - NSTabView - - - - addEntityButton - DVTDelayedMenuButton - - - addPropertyButton - DVTDelayedMenuButton - - - browserDiagramSegmentControl - NSSegmentedControl - - - configurationViewController - IDEDataModelConfigurationEditor - - - entityContentsViewController - IDEDataModelEntityContentsEditor - - - fetchRequestViewController - IDEDataModelFetchRequestEditor - - - hierarchySegmentControl - NSSegmentedControl - - - tabView - NSTabView - - - - IBProjectSource - ./Classes/IDEDataModelEditor.h - - - - IDEDataModelEntityContentsEditor - IDEDMEditorController - - IDEDataModelBrowserEditor - IDEDataModelDiagramEditor - IDEDataModelEditor - NSTabView - - - - browserViewController - IDEDataModelBrowserEditor - - - diagramViewController - IDEDataModelDiagramEditor - - - parentEditor - IDEDataModelEditor - - - tabView - NSTabView - - - - IBProjectSource - ./Classes/IDEDataModelEntityContentsEditor.h - - - - IDEDataModelFetchRequestEditor - IDEDMEditorController - - NSArrayController - IDEDataModelEditor - IDECapsuleListView - - - - entityController - NSArrayController - - - parentEditor - IDEDataModelEditor - - - tableView - IDECapsuleListView - - - - IBProjectSource - ./Classes/IDEDataModelFetchRequestEditor.h - - - - IDEDataModelPropertiesTableController - IDEDMEditorController - - IDEDMArrayController - NSTableColumn - NSArrayController - IDEDataModelBrowserEditor - IDEDMHighlightImageAndTextCell - XDTableView - - - - arrayController - IDEDMArrayController - - - entitiesColumn - NSTableColumn - - - entityArrayController - NSArrayController - - - parentEditor - IDEDataModelBrowserEditor - - - propertyNameAndImageCell - IDEDMHighlightImageAndTextCell - - - tableView - XDTableView - - - - IBProjectSource - ./Classes/IDEDataModelPropertiesTableController.h - - - - IDEDocDownloadsTableViewController - NSObject - - NSButtonCell - DVTTableView - IDEDocViewingPrefPaneController - - - - _downloadButtonCell - NSButtonCell - - - _tableView - DVTTableView - - - prefPaneController - IDEDocViewingPrefPaneController - - - - IBProjectSource - ./Classes/IDEDocDownloadsTableViewController.h - - - - IDEDocSetOutlineView - NSOutlineView - - IBProjectSource - ./Classes/IDEDocSetOutlineView.h - - - - IDEDocSetOutlineViewController - NSObject - - id - id - id - id - id - - - - getDocSetAction: - id - - - showProblemInfoForUpdate: - id - - - subscribeToPublisherAction: - id - - - unsubscribeFromPublisher: - id - - - updateDocSetAction: - id - - - - docSetOutlineView - IDEDocSetOutlineView - - - docSetOutlineView - - docSetOutlineView - IDEDocSetOutlineView - - - - IBProjectSource - ./Classes/IDEDocSetOutlineViewController.h - - - - IDEDocViewingPrefPaneController - IDEViewController - - id - id - id - id - id - id - id - id - id - id - id - - - - addSubscription: - id - - - checkForAndInstallUpdatesNow: - id - - - deleteDocSet: - id - - - downloadAction: - id - - - minimumFontSizeComboBoxAction: - id - - - minimumFontSizeEnabledAction: - id - - - showHelp: - id - - - showSubscriptionSheet: - id - - - subscriptionCancelAction: - id - - - toggleAutoCheckForAndInstallUpdates: - id - - - toggleDocSetInfo: - id - - - - DVTGradientImageButton - DVTGradientImageButton - DVTGradientImageButton - NSSplitView - NSView - NSView - DVTBorderedView - DVTBorderedView - NSButton - NSTextView - IDEDocSetOutlineViewController - IDEDocDownloadsTableViewController - NSComboBox - NSTextField - NSButton - NSTextField - NSWindow - NSButton - - - - _addButton - DVTGradientImageButton - - - _deleteButton - DVTGradientImageButton - - - _showInfoAreaButton - DVTGradientImageButton - - - _splitView - NSSplitView - - - _splitViewDocSetInfoSubview - NSView - - - _splitViewDocSetsListSubview - NSView - - - borderedViewAroundSplitView - DVTBorderedView - - - borderedViewBelowTable - DVTBorderedView - - - checkAndInstallNowButton - NSButton - - - docSetInfoTextView - NSTextView - - - docSetOutlineViewController - IDEDocSetOutlineViewController - - - downloadsTableViewController - IDEDocDownloadsTableViewController - - - minimumFontSizeControl - NSComboBox - - - noUpdatesAvailableMessage - NSTextField - - - showInfoButton - NSButton - - - subscriptionTextField - NSTextField - - - subscriptionWindow - NSWindow - - - validateAddSubscriptionButton - NSButton - - - - IBProjectSource - ./Classes/IDEDocViewingPrefPaneController.h - - - - IDEEditor - IDEViewController - - IBProjectSource - ./Classes/IDEEditor.h - - - - IDEViewController - DVTViewController - - IBProjectSource - ./Classes/IDEViewController.h - - - - IKImageView - - id - id - id - id - - - - copy: - id - - - crop: - id - - - cut: - id - - - paste: - id - - - - IBProjectSource - ./Classes/IKImageView.h - - - - NSDocument - - id - id - id - id - id - id - - - - printDocument: - id - - - revertDocumentToSaved: - id - - - runPageLayout: - id - - - saveDocument: - id - - - saveDocumentAs: - id - - - saveDocumentTo: - id - - - - IBProjectSource - ./Classes/NSDocument.h - - - - NSResponder - - _insertFindPattern: - id - - - _insertFindPattern: - - _insertFindPattern: - id - - - - IBProjectSource - ./Classes/NSResponder.h - - - - QLPreviewBubble - NSObject - - id - id - - - - hide: - id - - - show: - id - - - - parentWindow - NSWindow - - - parentWindow - - parentWindow - NSWindow - - - - IBProjectSource - ./Classes/QLPreviewBubble.h - - - - QTMovieView - - id - id - id - id - id - - - - showAll: - id - - - showCustomButton: - id - - - toggleLoops: - id - - - zoomIn: - id - - - zoomOut: - id - - - - IBProjectSource - ./Classes/QTMovieView.h - - - - WebView - - id - id - id - id - - - - reloadFromOrigin: - id - - - resetPageZoom: - id - - - zoomPageIn: - id - - - zoomPageOut: - id - - - - IBProjectSource - ./Classes/WebView.h - - - - XDDiagramView - NSView - - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - _graphLayouterMenuItemAction: - id - - - _zoomPopUpButtonAction: - id - - - alignBottomEdges: - id - - - alignCentersHorizontallyInContainer: - id - - - alignCentersVerticallyInContainer: - id - - - alignHorizontalCenters: - id - - - alignLeftEdges: - id - - - alignRightEdges: - id - - - alignTopEdges: - id - - - alignVerticalCenters: - id - - - bringToFront: - id - - - collapseAllCompartments: - id - - - copy: - id - - - cut: - id - - - delete: - id - - - deleteBackward: - id - - - deleteForward: - id - - - deselectAll: - id - - - diagramZoomIn: - id - - - diagramZoomOut: - id - - - expandAllCompartments: - id - - - flipHorizontally: - id - - - flipVertically: - id - - - layoutGraphicsConcentrically: - id - - - layoutGraphicsHierarchically: - id - - - lock: - id - - - makeSameHeight: - id - - - makeSameWidth: - id - - - moveDown: - id - - - moveDownAndModifySelection: - id - - - moveLeft: - id - - - moveLeftAndModifySelection: - id - - - moveRight: - id - - - moveRightAndModifySelection: - id - - - moveUp: - id - - - moveUpAndModifySelection: - id - - - paste: - id - - - rollDownAllCompartments: - id - - - rollUpAllCompartments: - id - - - selectAll: - id - - - sendToBack: - id - - - sizeToFit: - id - - - toggleGridShown: - id - - - toggleHiddenGraphicsShown: - id - - - togglePageBreaksShown: - id - - - toggleRuler: - id - - - toggleSnapsToGrid: - id - - - unlock: - id - - - - _diagramController - IDEDataModelDiagramEditor - - - _diagramController - - _diagramController - IDEDataModelDiagramEditor - - - - IBProjectSource - ./Classes/XDDiagramView.h - - - - XDTableView - NSTableView - - showAllTableColumns: - id - - - showAllTableColumns: - - showAllTableColumns: - id - - - - IBProjectSource - ./Classes/XDTableView.h - - - - - 0 - IBCocoaFramework - YES - 3 - - {11, 11} - {10, 3} - - YES - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From ebd4c7fe4807414ed4cb60d8a1b9162bdcc8919c Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 16 Dec 2015 18:57:36 +0000 Subject: [PATCH 036/171] Fix use of deprecated method --- JSONModelOSX/ViewController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/JSONModelOSX/ViewController.m b/JSONModelOSX/ViewController.m index 2d0fe33c..1e38160b 100644 --- a/JSONModelOSX/ViewController.m +++ b/JSONModelOSX/ViewController.m @@ -182,6 +182,7 @@ -(IBAction)actionYoutube:(id)sender videos = [VideoModel arrayOfModelsFromDictionaries: json[@"feed"][@"entry"] + error:nil ]; [table reloadData]; if (e) { From ce384b982afba5ac951d8188f81a75ba6c74ddca Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 16 Dec 2015 18:59:15 +0000 Subject: [PATCH 037/171] Ensure projects explicitly define spacing standards --- JSONModel.xcodeproj/project.pbxproj | 3 +++ JSONModelDemo_OSX.xcodeproj/project.pbxproj | 3 +++ JSONModelDemo_iOS.xcodeproj/project.pbxproj | 3 +++ 3 files changed, 9 insertions(+) diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index 8dba33f1..c4c2b1ba 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -78,7 +78,10 @@ 92C9BC401B19A51100D79B06 /* Supporting Files */, 92C9BC3E1B19A51100D79B06 /* Products */, ); + indentWidth = 4; sourceTree = ""; + tabWidth = 4; + usesTabs = 0; }; 92C9BC3E1B19A51100D79B06 /* Products */ = { isa = PBXGroup; diff --git a/JSONModelDemo_OSX.xcodeproj/project.pbxproj b/JSONModelDemo_OSX.xcodeproj/project.pbxproj index a5e0e4f0..4f4dd550 100644 --- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj +++ b/JSONModelDemo_OSX.xcodeproj/project.pbxproj @@ -518,7 +518,10 @@ 9CC27C901689B7BE008B5411 /* Frameworks */, 9CC27C8E1689B7BE008B5411 /* Products */, ); + indentWidth = 4; sourceTree = ""; + tabWidth = 4; + usesTabs = 0; }; 9CC27C8E1689B7BE008B5411 /* Products */ = { isa = PBXGroup; diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj index 540ffded..6b9014f6 100644 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_iOS.xcodeproj/project.pbxproj @@ -532,7 +532,10 @@ 9CBBBEDB166B6CF0008B4326 /* Frameworks */, 9CBBBED9166B6CF0008B4326 /* Products */, ); + indentWidth = 4; sourceTree = ""; + tabWidth = 4; + usesTabs = 0; }; 9CBBBED9166B6CF0008B4326 /* Products */ = { isa = PBXGroup; From 62dff1dc53a7c67dd8c40711a188264f8cdfa344 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 16 Dec 2015 19:10:44 +0000 Subject: [PATCH 038/171] Fixed warnings Resolves #372 --- .../UnitTests/BuiltInConversionsTests.m | 4 +- .../UnitTests/JSONTypesReadTests.m | 2 +- .../UnitTests/PrimitiveTypesReadTests.m | 5 +- .../UnitTests/TestModels/GitHubRepoModel.h | 2 - JSONModelDemo_OSX.xcodeproj/project.pbxproj | 10 - JSONModelDemo_iOS.xcodeproj/project.pbxproj | 14 - JSONModelDemo_iOS/MBProgressHUD.h | 142 ++++-- JSONModelDemo_iOS/MBProgressHUD.m | 460 ++++++++++++------ JSONModelDemo_iOS/MasterViewController.m | 1 - 9 files changed, 429 insertions(+), 211 deletions(-) diff --git a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m index f2c951f4..3d8eb820 100644 --- a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m +++ b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m @@ -56,8 +56,8 @@ -(void)testConversions //TODO: I had to hardcode the float epsilon below, bcz actually [NSNumber floatValue] was returning a bigger deviation than FLT_EPSILON // IDEAS? - XCTAssertTrue(fabsf([b.numberFromString floatValue]-1230.99)<0.001, @"numberFromString's value is not 1230.99"); - + XCTAssertEqualWithAccuracy([b.numberFromString floatValue], 1230.99, 0.001, @"numberFromString's value is not 1230.99"); + XCTAssertTrue([b.importantEvent isKindOfClass:[NSDate class]], @"importantEvent is not an NSDate"); XCTAssertTrue((long)[b.importantEvent timeIntervalSince1970] == 1353916801, @"importantEvent value was not read properly"); diff --git a/JSONModelDemoTests/UnitTests/JSONTypesReadTests.m b/JSONModelDemoTests/UnitTests/JSONTypesReadTests.m index 84e03a07..16d7fc9c 100644 --- a/JSONModelDemoTests/UnitTests/JSONTypesReadTests.m +++ b/JSONModelDemoTests/UnitTests/JSONTypesReadTests.m @@ -42,7 +42,7 @@ -(void)testStandardTypes XCTAssertTrue([t.year intValue]==2012, @"year value is not 2012"); XCTAssertTrue([t.pi isKindOfClass:[NSNumber class]], @"pi is not NSNumber object"); - XCTAssertTrue(fabsf([t.pi floatValue]-3.14159)* language; @property (assign, nonatomic) BOOL fork; @property (assign, nonatomic) double size; diff --git a/JSONModelDemo_OSX.xcodeproj/project.pbxproj b/JSONModelDemo_OSX.xcodeproj/project.pbxproj index 4f4dd550..879edc93 100644 --- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj +++ b/JSONModelDemo_OSX.xcodeproj/project.pbxproj @@ -862,11 +862,6 @@ buildSettings = { BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/JSONModelDemo_OSX.app/Contents/MacOS/JSONModelDemo_OSX"; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JSONModelDemoTests/JSONModelDemoTests-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -889,11 +884,6 @@ buildSettings = { BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/JSONModelDemo_OSX.app/Contents/MacOS/JSONModelDemo_OSX"; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JSONModelDemoTests/JSONModelDemoTests-Prefix.pch"; INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemoTests-Info.plist"; diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj index 6b9014f6..cc141202 100644 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_iOS.xcodeproj/project.pbxproj @@ -1125,12 +1125,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/JSONModelDemo_iOS.app/JSONModelDemo_iOS"; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -1140,7 +1134,6 @@ ); INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; - OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = JSONModelDemo_iOSTests; TEST_HOST = "$(BUNDLE_LOADER)"; @@ -1151,17 +1144,10 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/JSONModelDemo_iOS.app/JSONModelDemo_iOS"; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch"; INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; - OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = JSONModelDemo_iOSTests; TEST_HOST = "$(BUNDLE_LOADER)"; diff --git a/JSONModelDemo_iOS/MBProgressHUD.h b/JSONModelDemo_iOS/MBProgressHUD.h index deee8bb4..cfcbe5c5 100755 --- a/JSONModelDemo_iOS/MBProgressHUD.h +++ b/JSONModelDemo_iOS/MBProgressHUD.h @@ -1,12 +1,12 @@ // // MBProgressHUD.h -// Version 0.5 +// Version 0.9.1 // Created by Matej Bukovinski on 2.4.09. // // This code is distributed under the terms and conditions of the MIT license. -// Copyright (c) 2011 Matej Bukovinski +// Copyright (c) 2009-2015 Matej Bukovinski // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -33,29 +33,39 @@ @protocol MBProgressHUDDelegate; -typedef enum { +typedef NS_ENUM(NSInteger, MBProgressHUDMode) { /** Progress is shown using an UIActivityIndicatorView. This is the default. */ MBProgressHUDModeIndeterminate, /** Progress is shown using a round, pie-chart like, progress view. */ MBProgressHUDModeDeterminate, + /** Progress is shown using a horizontal progress bar */ + MBProgressHUDModeDeterminateHorizontalBar, /** Progress is shown using a ring-shaped progress view. */ MBProgressHUDModeAnnularDeterminate, /** Shows a custom view */ MBProgressHUDModeCustomView, /** Shows only labels */ MBProgressHUDModeText -} MBProgressHUDMode; +}; -typedef enum { +typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) { /** Opacity animation */ MBProgressHUDAnimationFade, /** Opacity + scale animation */ MBProgressHUDAnimationZoom, MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom, MBProgressHUDAnimationZoomIn -} MBProgressHUDAnimation; +}; +#ifndef MB_INSTANCETYPE +#if __has_feature(objc_instancetype) + #define MB_INSTANCETYPE instancetype +#else + #define MB_INSTANCETYPE id +#endif +#endif + #ifndef MB_STRONG #if __has_feature(objc_arc) #define MB_STRONG strong @@ -74,19 +84,11 @@ typedef enum { #endif #endif -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 - #define MBLabelAlignmentCenter NSTextAlignmentCenter -#else - #define MBLabelAlignmentCenter UITextAlignmentCenter -#endif - #if NS_BLOCKS_AVAILABLE typedef void (^MBProgressHUDCompletionBlock)(); #endif - - /** * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. * @@ -96,21 +98,23 @@ typedef void (^MBProgressHUDCompletionBlock)(); * drawn centered as a rounded semi-transparent view which resizes depending on the user specified content. * * This view supports four modes of operation: - * - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView - * - MBProgressHUDModeDeterminate - shows a custom round progress indicator - * - MBProgressHUDModeAnnularDeterminate - shows a custom annular progress indicator - * - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (@see customView) + * - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView + * - MBProgressHUDModeDeterminate - shows a custom round progress indicator + * - MBProgressHUDModeAnnularDeterminate - shows a custom annular progress indicator + * - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (see `customView`) * * All three modes can have optional labels assigned: - * - If the labelText property is set and non-empty then a label containing the provided content is placed below the - * indicator view. - * - If also the detailsLabelText property is set then another label is placed below the first label. + * - If the labelText property is set and non-empty then a label containing the provided content is placed below the + * indicator view. + * - If also the detailsLabelText property is set then another label is placed below the first label. */ @interface MBProgressHUD : UIView /** * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. - * + * + * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden. + * * @param view The view that the HUD will be added to * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use * animations while appearing. @@ -119,15 +123,17 @@ typedef void (^MBProgressHUDCompletionBlock)(); * @see hideHUDForView:animated: * @see animationType */ -+ (MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; ++ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; /** * Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:. * + * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden. + * * @param view The view that is going to be searched for a HUD subview. * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use * animations while disappearing. - * @return YES if a HUD was found and removed, NO otherwise. + * @return YES if a HUD was found and removed, NO otherwise. * * @see showHUDAddedTo:animated: * @see animationType @@ -137,12 +143,14 @@ typedef void (^MBProgressHUDCompletionBlock)(); /** * Finds all the HUD subviews and hides them. * + * @note This method sets `removeFromSuperViewOnHide`. The HUDs will automatically be removed from the view hierarchy when hidden. + * * @param view The view that is going to be searched for HUD subviews. * @param animated If set to YES the HUDs will disappear using the current animationType. If set to NO the HUDs will not use * animations while disappearing. * @return the number of HUDs found and removed. * - * @see hideAllHUDForView:animated: + * @see hideHUDForView:animated: * @see animationType */ + (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated; @@ -153,7 +161,7 @@ typedef void (^MBProgressHUDCompletionBlock)(); * @param view The view that is going to be searched. * @return A reference to the last HUD subview discovered. */ -+ (MBProgressHUD *)HUDForView:(UIView *)view; ++ (MB_INSTANCETYPE)HUDForView:(UIView *)view; /** * Finds all HUD subviews and returns them. @@ -210,7 +218,7 @@ typedef void (^MBProgressHUDCompletionBlock)(); * * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use * animations while disappearing. - * @param delay Delay in secons until the HUD is hidden. + * @param delay Delay in seconds until the HUD is hidden. * * @see animationType */ @@ -235,21 +243,21 @@ typedef void (^MBProgressHUDCompletionBlock)(); /** * Shows the HUD while a block is executing on a background queue, then hides the HUD. * - * @see showAnimated:whileExecutingBlock:onQueue:completion: + * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: */ - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block; /** * Shows the HUD while a block is executing on a background queue, then hides the HUD. * - * @see showAnimated:whileExecutingBlock:onQueue:completion: + * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: */ - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion; /** * Shows the HUD while a block is executing on the specified dispatch queue, then hides the HUD. * - * @see showAnimated:whileExecutingBlock:onQueue:completion: + * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: */ - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue; @@ -259,7 +267,7 @@ typedef void (^MBProgressHUDCompletionBlock)(); * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will * not use animations while (dis)appearing. * @param block The block to be executed while the HUD is shown. - * @param queue The dispatch queue on which the block should be execouted. + * @param queue The dispatch queue on which the block should be executed. * @param completion The block to be executed on completion. * * @see completionBlock @@ -268,7 +276,7 @@ typedef void (^MBProgressHUDCompletionBlock)(); completionBlock:(MBProgressHUDCompletionBlock)completion; /** - * A block that gets called after the HUD was completely hiden. + * A block that gets called after the HUD was completely hidden. */ @property (copy) MBProgressHUDCompletionBlock completionBlock; @@ -332,16 +340,22 @@ typedef void (^MBProgressHUDCompletionBlock)(); @property (assign) float xOffset; /** - * The y-ayis offset of the HUD relative to the centre of the superview. + * The y-axis offset of the HUD relative to the centre of the superview. */ @property (assign) float yOffset; /** - * The amounth of space between the HUD edge and the HUD elements (labels, indicators or custom views). + * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). * Defaults to 20.0 */ @property (assign) float margin; +/** + * The corner radius for the HUD + * Defaults to 10.0 + */ +@property (assign) float cornerRadius; + /** * Cover the HUD background view with a radial gradient. */ @@ -386,11 +400,27 @@ typedef void (^MBProgressHUDCompletionBlock)(); */ @property (MB_STRONG) UIFont* labelFont; -/** - * Font to be used for the details label. Set this property if the default is not adequate. +/** + * Color to be used for the main label. Set this property if the default is not adequate. + */ +@property (MB_STRONG) UIColor* labelColor; + +/** + * Font to be used for the details label. Set this property if the default is not adequate. */ @property (MB_STRONG) UIFont* detailsLabelFont; +/** + * Color to be used for the details label. Set this property if the default is not adequate. + */ +@property (MB_STRONG) UIColor* detailsLabelColor; + +/** + * The color of the activity indicator. Defaults to [UIColor whiteColor] + * Does nothing on pre iOS 5. + */ +@property (MB_STRONG) UIColor *activityIndicatorColor; + /** * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. */ @@ -401,6 +431,15 @@ typedef void (^MBProgressHUDCompletionBlock)(); */ @property (assign) CGSize minSize; + +/** + * The actual size of the HUD bezel. + * You can use this to limit touch handling on the bezel area only. + * @see https://github.com/jdg/MBProgressHUD/pull/200 + */ +@property (atomic, assign, readonly) CGSize size; + + /** * Force the HUD dimensions to be equal if possible. */ @@ -449,3 +488,34 @@ typedef void (^MBProgressHUDCompletionBlock)(); @property (nonatomic, assign, getter = isAnnular) BOOL annular; @end + + +/** + * A flat bar progress view. + */ +@interface MBBarProgressView : UIView + +/** + * Progress (0.0 to 1.0) + */ +@property (nonatomic, assign) float progress; + +/** + * Bar border line color. + * Defaults to white [UIColor whiteColor]. + */ +@property (nonatomic, MB_STRONG) UIColor *lineColor; + +/** + * Bar background color. + * Defaults to clear [UIColor clearColor]; + */ +@property (nonatomic, MB_STRONG) UIColor *progressRemainingColor; + +/** + * Bar progress color. + * Defaults to white [UIColor whiteColor]. + */ +@property (nonatomic, MB_STRONG) UIColor *progressColor; + +@end diff --git a/JSONModelDemo_iOS/MBProgressHUD.m b/JSONModelDemo_iOS/MBProgressHUD.m index 3626fe44..996b1cb8 100755 --- a/JSONModelDemo_iOS/MBProgressHUD.m +++ b/JSONModelDemo_iOS/MBProgressHUD.m @@ -1,10 +1,11 @@ // // MBProgressHUD.m -// Version 0.5 +// Version 0.9.1 // Created by Matej Bukovinski on 2.4.09. // #import "MBProgressHUD.h" +#import #if __has_feature(objc_arc) @@ -17,43 +18,43 @@ #define MB_RETAIN(exp) [exp retain] #endif +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 + #define MBLabelAlignmentCenter NSTextAlignmentCenter +#else + #define MBLabelAlignmentCenter UITextAlignmentCenter +#endif -static const CGFloat kPadding = 4.f; -static const CGFloat kLabelFontSize = 16.f; -static const CGFloat kDetailsLabelFontSize = 12.f; +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text \ + sizeWithAttributes:@{NSFontAttributeName:font}] : CGSizeZero; +#else + #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text sizeWithFont:font] : CGSizeZero; +#endif +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ + boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \ + attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero; +#else + #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ + sizeWithFont:font constrainedToSize:maxSize lineBreakMode:mode] : CGSizeZero; +#endif -@interface MBProgressHUD () - -- (void)setupLabels; -- (void)registerForKVO; -- (void)unregisterFromKVO; -- (NSArray *)observableKeypaths; -- (void)registerForNotifications; -- (void)unregisterFromNotifications; -- (void)updateUIForKeypath:(NSString *)keyPath; -- (void)hideUsingAnimation:(BOOL)animated; -- (void)showUsingAnimation:(BOOL)animated; -- (void)done; -- (void)updateIndicators; -- (void)handleGraceTimer:(NSTimer *)theTimer; -- (void)handleMinShowTimer:(NSTimer *)theTimer; -- (void)setTransformForCurrentOrientation:(BOOL)animated; -- (void)cleanUp; -- (void)launchExecution; -- (void)deviceOrientationDidChange:(NSNotification *)notification; -- (void)hideDelayed:(NSNumber *)animated; +#ifndef kCFCoreFoundationVersionNumber_iOS_7_0 + #define kCFCoreFoundationVersionNumber_iOS_7_0 847.20 +#endif -@property (atomic, MB_STRONG) UIView *indicator; -@property (atomic, MB_STRONG) NSTimer *graceTimer; -@property (atomic, MB_STRONG) NSTimer *minShowTimer; -@property (atomic, MB_STRONG) NSDate *showStarted; -@property (atomic, assign) CGSize size; +#ifndef kCFCoreFoundationVersionNumber_iOS_8_0 + #define kCFCoreFoundationVersionNumber_iOS_8_0 1129.15 +#endif -@end + +static const CGFloat kPadding = 4.f; +static const CGFloat kLabelFontSize = 16.f; +static const CGFloat kDetailsLabelFontSize = 12.f; -@implementation MBProgressHUD { +@interface MBProgressHUD () { BOOL useAnimation; SEL methodForExecution; id targetForExecution; @@ -64,6 +65,16 @@ @implementation MBProgressHUD { CGAffineTransform rotationTransform; } +@property (atomic, MB_STRONG) UIView *indicator; +@property (atomic, MB_STRONG) NSTimer *graceTimer; +@property (atomic, MB_STRONG) NSTimer *minShowTimer; +@property (atomic, MB_STRONG) NSDate *showStarted; + +@end + + +@implementation MBProgressHUD + #pragma mark - Properties @synthesize animationType; @@ -71,7 +82,9 @@ @implementation MBProgressHUD { @synthesize opacity; @synthesize color; @synthesize labelFont; +@synthesize labelColor; @synthesize detailsLabelFont; +@synthesize detailsLabelColor; @synthesize indicator; @synthesize xOffset; @synthesize yOffset; @@ -92,21 +105,23 @@ @implementation MBProgressHUD { @synthesize detailsLabelText; @synthesize progress; @synthesize size; +@synthesize activityIndicatorColor; #if NS_BLOCKS_AVAILABLE @synthesize completionBlock; #endif #pragma mark - Class methods -+ (MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:view]; ++ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated { + MBProgressHUD *hud = [[self alloc] initWithView:view]; + hud.removeFromSuperViewOnHide = YES; [view addSubview:hud]; [hud show:animated]; return MB_AUTORELEASE(hud); } + (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [MBProgressHUD HUDForView:view]; + MBProgressHUD *hud = [self HUDForView:view]; if (hud != nil) { hud.removeFromSuperViewOnHide = YES; [hud hide:animated]; @@ -116,7 +131,7 @@ + (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated { } + (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated { - NSArray *huds = [self allHUDsForView:view]; + NSArray *huds = [MBProgressHUD allHUDsForView:view]; for (MBProgressHUD *hud in huds) { hud.removeFromSuperViewOnHide = YES; [hud hide:animated]; @@ -124,11 +139,10 @@ + (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated { return [huds count]; } -+ (MBProgressHUD *)HUDForView:(UIView *)view { - Class hudClass = [MBProgressHUD class]; ++ (MB_INSTANCETYPE)HUDForView:(UIView *)view { NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator]; for (UIView *subview in subviewsEnum) { - if ([subview isKindOfClass:hudClass]) { + if ([subview isKindOfClass:self]) { return (MBProgressHUD *)subview; } } @@ -138,9 +152,8 @@ + (MBProgressHUD *)HUDForView:(UIView *)view { + (NSArray *)allHUDsForView:(UIView *)view { NSMutableArray *huds = [NSMutableArray array]; NSArray *subviews = view.subviews; - Class hudClass = [MBProgressHUD class]; for (UIView *aView in subviews) { - if ([aView isKindOfClass:hudClass]) { + if ([aView isKindOfClass:self]) { [huds addObject:aView]; } } @@ -158,19 +171,24 @@ - (id)initWithFrame:(CGRect)frame { self.labelText = nil; self.detailsLabelText = nil; self.opacity = 0.8f; - self.color = nil; + self.color = nil; self.labelFont = [UIFont boldSystemFontOfSize:kLabelFontSize]; + self.labelColor = [UIColor whiteColor]; self.detailsLabelFont = [UIFont boldSystemFontOfSize:kDetailsLabelFontSize]; + self.detailsLabelColor = [UIColor whiteColor]; + self.activityIndicatorColor = [UIColor whiteColor]; self.xOffset = 0.0f; self.yOffset = 0.0f; self.dimBackground = NO; self.margin = 20.0f; + self.cornerRadius = 10.0f; self.graceTime = 0.0f; self.minShowTime = 0.0f; self.removeFromSuperViewOnHide = NO; self.minSize = CGSizeZero; self.square = NO; - self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin + self.contentMode = UIViewContentModeCenter; + self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; // Transparent background @@ -192,12 +210,7 @@ - (id)initWithFrame:(CGRect)frame { - (id)initWithView:(UIView *)view { NSAssert(view, @"View must not be nil."); - id me = [self initWithFrame:view.bounds]; - // We need to take care of rotation ourselfs if we're adding the HUD to a window - if ([view isKindOfClass:[UIWindow class]]) { - [self setTransformForCurrentOrientation:NO]; - } - return me; + return [self initWithFrame:view.bounds]; } - (id)initWithWindow:(UIWindow *)window { @@ -218,6 +231,10 @@ - (void)dealloc { [minShowTimer release]; [showStarted release]; [customView release]; + [labelFont release]; + [labelColor release]; + [detailsLabelFont release]; + [detailsLabelColor release]; #if NS_BLOCKS_AVAILABLE [completionBlock release]; #endif @@ -228,20 +245,22 @@ - (void)dealloc { #pragma mark - Show & hide - (void)show:(BOOL)animated { + NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); useAnimation = animated; // If the grace time is set postpone the HUD display if (self.graceTime > 0.0) { - self.graceTimer = [NSTimer scheduledTimerWithTimeInterval:self.graceTime target:self - selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO]; + NSTimer *newGraceTimer = [NSTimer timerWithTimeInterval:self.graceTime target:self selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO]; + [[NSRunLoop currentRunLoop] addTimer:newGraceTimer forMode:NSRunLoopCommonModes]; + self.graceTimer = newGraceTimer; } // ... otherwise show the HUD imediately else { - [self setNeedsDisplay]; [self showUsingAnimation:useAnimation]; } } - (void)hide:(BOOL)animated { + NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); useAnimation = animated; // If the minShow time is set, calculate how long the hud was shown, // and pospone the hiding operation if necessary @@ -270,7 +289,6 @@ - (void)hideDelayed:(NSNumber *)animated { - (void)handleGraceTimer:(NSTimer *)theTimer { // Show the HUD only if the task is still running if (taskInProgress) { - [self setNeedsDisplay]; [self showUsingAnimation:useAnimation]; } } @@ -279,9 +297,19 @@ - (void)handleMinShowTimer:(NSTimer *)theTimer { [self hideUsingAnimation:useAnimation]; } +#pragma mark - View Hierrarchy + +- (void)didMoveToSuperview { + [self updateForCurrentOrientationAnimated:NO]; +} + #pragma mark - Internal show & hide operations - (void)showUsingAnimation:(BOOL)animated { + // Cancel any scheduled hideDelayed: calls + [NSObject cancelPreviousPerformRequestsWithTarget:self]; + [self setNeedsDisplay]; + if (animated && animationType == MBProgressHUDAnimationZoomIn) { self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f)); } else if (animated && animationType == MBProgressHUDAnimationZoomOut) { @@ -333,10 +361,11 @@ - (void)animationFinished:(NSString *)animationID finished:(BOOL)finished contex } - (void)done { + [NSObject cancelPreviousPerformRequestsWithTarget:self]; isFinished = YES; self.alpha = 0.0f; - if ([delegate respondsToSelector:@selector(hudWasHidden:)]) { - [delegate performSelector:@selector(hudWasHidden:) withObject:self]; + if (removeFromSuperViewOnHide) { + [self removeFromSuperview]; } #if NS_BLOCKS_AVAILABLE if (self.completionBlock) { @@ -344,8 +373,8 @@ - (void)done { self.completionBlock = NULL; } #endif - if (removeFromSuperViewOnHide) { - [self removeFromSuperview]; + if ([delegate respondsToSelector:@selector(hudWasHidden:)]) { + [delegate performSelector:@selector(hudWasHidden:) withObject:self]; } } @@ -383,12 +412,12 @@ - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block self.taskInProgress = YES; self.completionBlock = completion; dispatch_async(queue, ^(void) { - block(); - dispatch_async(dispatch_get_main_queue(), ^(void) { - [self cleanUp]; - }); - }); - [self show:animated]; + block(); + dispatch_async(dispatch_get_main_queue(), ^(void) { + [self cleanUp]; + }); + }); + [self show:animated]; } #endif @@ -408,7 +437,6 @@ - (void)launchExecution { - (void)cleanUp { taskInProgress = NO; - self.indicator = nil; #if !__has_feature(objc_arc) [targetForExecution release]; [objectForExecution release]; @@ -427,7 +455,7 @@ - (void)setupLabels { label.textAlignment = MBLabelAlignmentCenter; label.opaque = NO; label.backgroundColor = [UIColor clearColor]; - label.textColor = [UIColor whiteColor]; + label.textColor = self.labelColor; label.font = self.labelFont; label.text = self.labelText; [self addSubview:label]; @@ -438,7 +466,7 @@ - (void)setupLabels { detailsLabel.textAlignment = MBLabelAlignmentCenter; detailsLabel.opaque = NO; detailsLabel.backgroundColor = [UIColor clearColor]; - detailsLabel.textColor = [UIColor whiteColor]; + detailsLabel.textColor = self.detailsLabelColor; detailsLabel.numberOfLines = 0; detailsLabel.font = self.detailsLabelFont; detailsLabel.text = self.detailsLabelText; @@ -450,12 +478,23 @@ - (void)updateIndicators { BOOL isActivityIndicator = [indicator isKindOfClass:[UIActivityIndicatorView class]]; BOOL isRoundIndicator = [indicator isKindOfClass:[MBRoundProgressView class]]; - if (mode == MBProgressHUDModeIndeterminate && !isActivityIndicator) { - // Update to indeterminate indicator + if (mode == MBProgressHUDModeIndeterminate) { + if (!isActivityIndicator) { + // Update to indeterminate indicator + [indicator removeFromSuperview]; + self.indicator = MB_AUTORELEASE([[UIActivityIndicatorView alloc] + initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]); + [(UIActivityIndicatorView *)indicator startAnimating]; + [self addSubview:indicator]; + } +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000 + [(UIActivityIndicatorView *)indicator setColor:self.activityIndicatorColor]; +#endif + } + else if (mode == MBProgressHUDModeDeterminateHorizontalBar) { + // Update to bar determinate indicator [indicator removeFromSuperview]; - self.indicator = MB_AUTORELEASE([[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]); - [(UIActivityIndicatorView *)indicator startAnimating]; + self.indicator = MB_AUTORELEASE([[MBBarProgressView alloc] init]); [self addSubview:indicator]; } else if (mode == MBProgressHUDModeDeterminate || mode == MBProgressHUDModeAnnularDeterminate) { @@ -468,7 +507,9 @@ - (void)updateIndicators { if (mode == MBProgressHUDModeAnnularDeterminate) { [(MBRoundProgressView *)indicator setAnnular:YES]; } - } + [(MBRoundProgressView *)indicator setProgressTintColor:self.activityIndicatorColor]; + [(MBRoundProgressView *)indicator setBackgroundTintColor:[self.activityIndicatorColor colorWithAlphaComponent:0.1f]]; + } else if (mode == MBProgressHUDModeCustomView && customView != indicator) { // Update custom view indicator [indicator removeFromSuperview]; @@ -483,6 +524,7 @@ - (void)updateIndicators { #pragma mark - Layout - (void)layoutSubviews { + [super layoutSubviews]; // Entirely cover the parent view UIView *parent = self.superview; @@ -491,7 +533,7 @@ - (void)layoutSubviews { } CGRect bounds = self.bounds; - // Determine the total widt and height needed + // Determine the total width and height needed CGFloat maxWidth = bounds.size.width - 4 * margin; CGSize totalSize = CGSizeZero; @@ -500,7 +542,7 @@ - (void)layoutSubviews { totalSize.width = MAX(totalSize.width, indicatorF.size.width); totalSize.height += indicatorF.size.height; - CGSize labelSize = [label.text sizeWithAttributes:@{NSFontAttributeName:label.font}]; + CGSize labelSize = MB_TEXTSIZE(label.text, label.font); labelSize.width = MIN(labelSize.width, maxWidth); totalSize.width = MAX(totalSize.width, labelSize.width); totalSize.height += labelSize.height; @@ -510,8 +552,7 @@ - (void)layoutSubviews { CGFloat remainingHeight = bounds.size.height - totalSize.height - kPadding - 4 * margin; CGSize maxSize = CGSizeMake(maxWidth, remainingHeight); - CGSize detailsLabelSize = [detailsLabel.text sizeWithFont:detailsLabel.font - constrainedToSize:maxSize lineBreakMode:detailsLabel.lineBreakMode]; + CGSize detailsLabelSize = MB_MULTILINE_TEXTSIZE(detailsLabel.text, detailsLabel.font, maxSize, detailsLabel.lineBreakMode); totalSize.width = MAX(totalSize.width, detailsLabelSize.width); totalSize.height += detailsLabelSize.height; if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) { @@ -522,10 +563,10 @@ - (void)layoutSubviews { totalSize.height += 2 * margin; // Position elements - CGFloat yPos = roundf(((bounds.size.height - totalSize.height) / 2)) + margin + yOffset; + CGFloat yPos = round(((bounds.size.height - totalSize.height) / 2)) + margin + yOffset; CGFloat xPos = xOffset; indicatorF.origin.y = yPos; - indicatorF.origin.x = roundf((bounds.size.width - indicatorF.size.width) / 2) + xPos; + indicatorF.origin.x = round((bounds.size.width - indicatorF.size.width) / 2) + xPos; indicator.frame = indicatorF; yPos += indicatorF.size.height; @@ -534,7 +575,7 @@ - (void)layoutSubviews { } CGRect labelF; labelF.origin.y = yPos; - labelF.origin.x = roundf((bounds.size.width - labelSize.width) / 2) + xPos; + labelF.origin.x = round((bounds.size.width - labelSize.width) / 2) + xPos; labelF.size = labelSize; label.frame = labelF; yPos += labelF.size.height; @@ -544,7 +585,7 @@ - (void)layoutSubviews { } CGRect detailsLabelF; detailsLabelF.origin.y = yPos; - detailsLabelF.origin.x = roundf((bounds.size.width - detailsLabelSize.width) / 2) + xPos; + detailsLabelF.origin.x = round((bounds.size.width - detailsLabelSize.width) / 2) + xPos; detailsLabelF.size = detailsLabelSize; detailsLabel.frame = detailsLabelF; @@ -565,7 +606,7 @@ - (void)layoutSubviews { totalSize.height = minSize.height; } - self.size = totalSize; + size = totalSize; } #pragma mark BG Drawing @@ -594,20 +635,20 @@ - (void)drawRect:(CGRect)rect { CGGradientRelease(gradient); } - // Set background rect color - if (self.color) { - CGContextSetFillColorWithColor(context, self.color.CGColor); - } else { - CGContextSetGrayFillColor(context, 0.0f, self.opacity); - } + // Set background rect color + if (self.color) { + CGContextSetFillColorWithColor(context, self.color.CGColor); + } else { + CGContextSetGrayFillColor(context, 0.0f, self.opacity); + } // Center HUD CGRect allRect = self.bounds; // Draw rounded HUD backgroud rect - CGRect boxRect = CGRectMake(roundf((allRect.size.width - size.width) / 2) + self.xOffset, - roundf((allRect.size.height - size.height) / 2) + self.yOffset, size.width, size.height); - float radius = 10.0f; + CGRect boxRect = CGRectMake(round((allRect.size.width - size.width) / 2) + self.xOffset, + round((allRect.size.height - size.height) / 2) + self.yOffset, size.width, size.height); + float radius = self.cornerRadius; CGContextBeginPath(context); CGContextMoveToPoint(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect)); CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMinY(boxRect) + radius, radius, 3 * (float)M_PI / 2, 0, 0); @@ -635,8 +676,8 @@ - (void)unregisterFromKVO { } - (NSArray *)observableKeypaths { - return [NSArray arrayWithObjects:@"mode", @"customView", @"labelText", @"labelFont", - @"detailsLabelText", @"detailsLabelFont", @"progress", nil]; + return [NSArray arrayWithObjects:@"mode", @"customView", @"labelText", @"labelFont", @"labelColor", + @"detailsLabelText", @"detailsLabelFont", @"detailsLabelColor", @"progress", @"activityIndicatorColor", nil]; } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { @@ -648,19 +689,24 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N } - (void)updateUIForKeypath:(NSString *)keyPath { - if ([keyPath isEqualToString:@"mode"] || [keyPath isEqualToString:@"customView"]) { + if ([keyPath isEqualToString:@"mode"] || [keyPath isEqualToString:@"customView"] || + [keyPath isEqualToString:@"activityIndicatorColor"]) { [self updateIndicators]; } else if ([keyPath isEqualToString:@"labelText"]) { label.text = self.labelText; } else if ([keyPath isEqualToString:@"labelFont"]) { label.font = self.labelFont; + } else if ([keyPath isEqualToString:@"labelColor"]) { + label.textColor = self.labelColor; } else if ([keyPath isEqualToString:@"detailsLabelText"]) { detailsLabel.text = self.detailsLabelText; } else if ([keyPath isEqualToString:@"detailsLabelFont"]) { detailsLabel.font = self.detailsLabelFont; + } else if ([keyPath isEqualToString:@"detailsLabelColor"]) { + detailsLabel.textColor = self.detailsLabelColor; } else if ([keyPath isEqualToString:@"progress"]) { if ([indicator respondsToSelector:@selector(setProgress:)]) { - [(id)indicator setProgress:progress]; + [(id)indicator setValue:@(progress) forKey:@"progress"]; } return; } @@ -671,34 +717,46 @@ - (void)updateUIForKeypath:(NSString *)keyPath { #pragma mark - Notifications - (void)registerForNotifications { +#if !TARGET_OS_TV NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc addObserver:self selector:@selector(deviceOrientationDidChange:) - name:UIDeviceOrientationDidChangeNotification object:nil]; + + [nc addObserver:self selector:@selector(statusBarOrientationDidChange:) + name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; +#endif } - (void)unregisterFromNotifications { - [[NSNotificationCenter defaultCenter] removeObserver:self]; +#if !TARGET_OS_TV + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; +#endif } -- (void)deviceOrientationDidChange:(NSNotification *)notification { +#if !TARGET_OS_TV +- (void)statusBarOrientationDidChange:(NSNotification *)notification { UIView *superview = self.superview; if (!superview) { return; - } else if ([superview isKindOfClass:[UIWindow class]]) { - [self setTransformForCurrentOrientation:YES]; } else { - self.bounds = self.superview.bounds; - [self setNeedsDisplay]; + [self updateForCurrentOrientationAnimated:YES]; } } +#endif + +- (void)updateForCurrentOrientationAnimated:(BOOL)animated { + // Stay in sync with the superview in any case + if (self.superview) { + self.bounds = self.superview.bounds; + [self setNeedsDisplay]; + } + + // Not needed on iOS 8+, compile out when the deployment target allows, + // to avoid sharedApplication problems on extension targets +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 + // Only needed pre iOS 7 when added to a window + BOOL iOS8OrLater = kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0; + if (iOS8OrLater || ![self.superview isKindOfClass:[UIWindow class]]) return; -- (void)setTransformForCurrentOrientation:(BOOL)animated { - // Stay in sync with the superview - if (self.superview) { - self.bounds = self.superview.bounds; - [self setNeedsDisplay]; - } - UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; CGFloat radians = 0; if (UIInterfaceOrientationIsLandscape(orientation)) { @@ -714,45 +772,19 @@ - (void)setTransformForCurrentOrientation:(BOOL)animated { if (animated) { [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:0.3]; } [self setTransform:rotationTransform]; if (animated) { [UIView commitAnimations]; } +#endif } @end -@implementation MBRoundProgressView { - float _progress; - BOOL _annular; -} - -#pragma mark - Properties - -@synthesize progressTintColor = _progressTintColor; -@synthesize backgroundTintColor = _backgroundTintColor; - -#pragma mark - Accessors - -- (float)progress { - return _progress; -} - -- (void)setProgress:(float)progress { - _progress = progress; - [self setNeedsDisplay]; -} - -- (BOOL)isAnnular { - return _annular; -} - -- (void)setAnnular:(BOOL)annular { - _annular = annular; - [self setNeedsDisplay]; -} +@implementation MBRoundProgressView #pragma mark - Lifecycle @@ -793,10 +825,11 @@ - (void)drawRect:(CGRect)rect { if (_annular) { // Draw background - CGFloat lineWidth = 5.f; + BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; + CGFloat lineWidth = isPreiOS7 ? 5.f : 2.f; UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath]; processBackgroundPath.lineWidth = lineWidth; - processBackgroundPath.lineCapStyle = kCGLineCapRound; + processBackgroundPath.lineCapStyle = kCGLineCapButt; CGPoint center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); CGFloat radius = (self.bounds.size.width - lineWidth)/2; CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees @@ -806,7 +839,7 @@ - (void)drawRect:(CGRect)rect { [processBackgroundPath stroke]; // Draw progress UIBezierPath *processPath = [UIBezierPath bezierPath]; - processPath.lineCapStyle = kCGLineCapRound; + processPath.lineCapStyle = isPreiOS7 ? kCGLineCapRound : kCGLineCapSquare; processPath.lineWidth = lineWidth; endAngle = (self.progress * 2 * (float)M_PI) + startAngle; [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; @@ -824,7 +857,7 @@ - (void)drawRect:(CGRect)rect { CGFloat radius = (allRect.size.width - 4) / 2; CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees CGFloat endAngle = (self.progress * 2 * (float)M_PI) + startAngle; - CGContextSetRGBFillColor(context, 1.0f, 1.0f, 1.0f, 1.0f); // white + [_progressTintColor setFill]; CGContextMoveToPoint(context, center.x, center.y); CGContextAddArc(context, center.x, center.y, radius, startAngle, endAngle, 0); CGContextClosePath(context); @@ -847,7 +880,150 @@ - (void)unregisterFromKVO { } - (NSArray *)observableKeypaths { - return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", nil]; + return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", @"progress", @"annular", nil]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + [self setNeedsDisplay]; +} + +@end + + +@implementation MBBarProgressView + +#pragma mark - Lifecycle + +- (id)init { + return [self initWithFrame:CGRectMake(.0f, .0f, 120.0f, 20.0f)]; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + _progress = 0.f; + _lineColor = [UIColor whiteColor]; + _progressColor = [UIColor whiteColor]; + _progressRemainingColor = [UIColor clearColor]; + self.backgroundColor = [UIColor clearColor]; + self.opaque = NO; + [self registerForKVO]; + } + return self; +} + +- (void)dealloc { + [self unregisterFromKVO]; +#if !__has_feature(objc_arc) + [_lineColor release]; + [_progressColor release]; + [_progressRemainingColor release]; + [super dealloc]; +#endif +} + +#pragma mark - Drawing + +- (void)drawRect:(CGRect)rect { + CGContextRef context = UIGraphicsGetCurrentContext(); + + CGContextSetLineWidth(context, 2); + CGContextSetStrokeColorWithColor(context,[_lineColor CGColor]); + CGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]); + + // Draw background + float radius = (rect.size.height / 2) - 2; + CGContextMoveToPoint(context, 2, rect.size.height/2); + CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); + CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); + CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); + CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); + CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); + CGContextFillPath(context); + + // Draw border + CGContextMoveToPoint(context, 2, rect.size.height/2); + CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); + CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); + CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); + CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); + CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); + CGContextStrokePath(context); + + CGContextSetFillColorWithColor(context, [_progressColor CGColor]); + radius = radius - 2; + float amount = self.progress * rect.size.width; + + // Progress in the middle area + if (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) { + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); + CGContextAddLineToPoint(context, amount, 4); + CGContextAddLineToPoint(context, amount, radius + 4); + + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); + CGContextAddLineToPoint(context, amount, rect.size.height - 4); + CGContextAddLineToPoint(context, amount, radius + 4); + + CGContextFillPath(context); + } + + // Progress in the right arc + else if (amount > radius + 4) { + float x = amount - (rect.size.width - radius - 4); + + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 4, 4); + float angle = -acos(x/radius); + if (isnan(angle)) angle = 0; + CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, M_PI, angle, 0); + CGContextAddLineToPoint(context, amount, rect.size.height/2); + + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 4, rect.size.height - 4); + angle = acos(x/radius); + if (isnan(angle)) angle = 0; + CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1); + CGContextAddLineToPoint(context, amount, rect.size.height/2); + + CGContextFillPath(context); + } + + // Progress is in the left arc + else if (amount < radius + 4 && amount > 0) { + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); + CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); + + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); + CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); + + CGContextFillPath(context); + } +} + +#pragma mark - KVO + +- (void)registerForKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; + } +} + +- (void)unregisterFromKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self removeObserver:self forKeyPath:keyPath]; + } +} + +- (NSArray *)observableKeypaths { + return [NSArray arrayWithObjects:@"lineColor", @"progressRemainingColor", @"progressColor", @"progress", nil]; } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { diff --git a/JSONModelDemo_iOS/MasterViewController.m b/JSONModelDemo_iOS/MasterViewController.m index a09f1a58..77f4d97f 100644 --- a/JSONModelDemo_iOS/MasterViewController.m +++ b/JSONModelDemo_iOS/MasterViewController.m @@ -100,7 +100,6 @@ @interface TopModel : JSONModel @property (assign, nonatomic, readonly) int rId; @property (nonatomic, copy) void(^userLocationCompleted)(); @property (strong, nonatomic) NSDictionary* dict; -@property (strong, nonatomic) NSString* description; @end @implementation TopModel From b417d3f40603d64870f160b500e699b711f2d43b Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 16 Dec 2015 19:45:46 +0000 Subject: [PATCH 039/171] Added support for keymappers with exceptions Resolves #332 --- .../JSONModelTransformations/JSONKeyMapper.h | 7 +++++ .../JSONModelTransformations/JSONKeyMapper.m | 31 +++++++++++++++++++ .../UnitTests/KeyMappingTests.m | 20 +++++++++++- .../TestModels/RenamedPropertyModel.h | 16 ++++++++++ .../TestModels/RenamedPropertyModel.m | 19 ++++++++++++ JSONModelDemo_OSX.xcodeproj/project.pbxproj | 6 ++++ JSONModelDemo_iOS.xcodeproj/project.pbxproj | 6 ++++ 7 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.h create mode 100644 JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.m diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 75822c6e..f35908ff 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -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/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 0f6bf2cf..4d5ce612 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -203,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/JSONModelDemoTests/UnitTests/KeyMappingTests.m b/JSONModelDemoTests/UnitTests/KeyMappingTests.m index c0cbb690..60ad6ef1 100644 --- a/JSONModelDemoTests/UnitTests/KeyMappingTests.m +++ b/JSONModelDemoTests/UnitTests/KeyMappingTests.m @@ -12,7 +12,7 @@ #import "GitHubKeyMapRepoModelDict.h" #import "GitHubRepoModelForUSMapper.h" #import "ModelForUpperCaseMapper.h" - +#import "RenamedPropertyModel.h" #pragma mark - TestModel class @interface TestModel: JSONModel @@ -287,4 +287,22 @@ -(void)testUsingBothGlobalAndCustomMappers [JSONModel setGlobalKeyMapper:nil]; } +- (void)testExceptionsMapper +{ + NSString *jsonString = @"{\"ID\":\"12345\",\"NAME\":\"TEST\"}"; + RenamedPropertyModel *m = [[RenamedPropertyModel alloc] initWithString:jsonString error:nil]; + XCTAssertNotNil(m, @"Could not initialize model from string"); + + // import + XCTAssertEqualObjects(m.identifier, @"12345", @"identifier does not equal '12345'"); + XCTAssertEqualObjects(m.name, @"TEST", @"name does not equal 'TEST'"); + + // export + NSDictionary *dict = [m toDictionary]; + XCTAssertNotNil(dict, @"toDictionary failed"); + + XCTAssertEqualObjects(dict[@"ID"], m.identifier, @"ID does not equal '12345'"); + XCTAssertEqualObjects(dict[@"NAME"], m.name, @"NAME does not equal 'TEST'"); +} + @end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.h b/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.h new file mode 100644 index 00000000..41f90a42 --- /dev/null +++ b/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.h @@ -0,0 +1,16 @@ +// +// RenamedPropertyModel.h +// JSONModelDemo_iOS +// +// Created by James Billingham on 16/12/2015. +// Copyright © 2015 Underplot ltd. All rights reserved. +// + +#import "JSONModel.h" + +@interface RenamedPropertyModel : JSONModel + +@property (copy, nonatomic) NSString *identifier; +@property (copy, nonatomic) NSString *name; + +@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.m b/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.m new file mode 100644 index 00000000..c2095823 --- /dev/null +++ b/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.m @@ -0,0 +1,19 @@ +// +// RenamedPropertyModel.m +// JSONModelDemo_iOS +// +// Created by James Billingham on 16/12/2015. +// Copyright © 2015 Underplot ltd. All rights reserved. +// + +#import "RenamedPropertyModel.h" + +@implementation RenamedPropertyModel + ++ (JSONKeyMapper *)keyMapper +{ + JSONKeyMapper *base = [JSONKeyMapper mapperFromUpperCaseToLowerCase]; + return [JSONKeyMapper mapper:base withExceptions:@{@"ID": @"identifier"}]; +} + +@end diff --git a/JSONModelDemo_OSX.xcodeproj/project.pbxproj b/JSONModelDemo_OSX.xcodeproj/project.pbxproj index 879edc93..95ed77fe 100644 --- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj +++ b/JSONModelDemo_OSX.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1AE9CA931C21F50C00B8F5C1 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */; }; 1C008FE518B7AE54002DFD3A /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */; }; 9C05B43F168CEB220054215E /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3F7168CEB220054215E /* ArrayTests.m */; }; 9C05B440168CEB220054215E /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */; }; @@ -115,6 +116,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 1AE9CA911C21F50C00B8F5C1 /* RenamedPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenamedPropertyModel.h; sourceTree = ""; }; + 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RenamedPropertyModel.m; sourceTree = ""; }; 1C008FE318B7AE54002DFD3A /* ModelForUpperCaseMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelForUpperCaseMapper.h; sourceTree = ""; }; 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelForUpperCaseMapper.m; sourceTree = ""; }; 9C05B2A8168CE9600054215E /* JSONModelDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JSONModelDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -423,6 +426,8 @@ D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */, 9C735D6B170B7A2D00FF96F5 /* RpcRequestModel.h */, 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */, + 1AE9CA911C21F50C00B8F5C1 /* RenamedPropertyModel.h */, + 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */, ); path = TestModels; sourceTree = ""; @@ -793,6 +798,7 @@ 9CD4258B170222AF00A42AA1 /* MockNSURLConnection.m in Sources */, 9CD4258C170222AF00A42AA1 /* MTTestSemaphor.m in Sources */, 9C735D67170B717F00FF96F5 /* JSONAPITests.m in Sources */, + 1AE9CA931C21F50C00B8F5C1 /* RenamedPropertyModel.m in Sources */, 9C735D6D170B7A2D00FF96F5 /* RpcRequestModel.m in Sources */, 9C735D73170C048C00FF96F5 /* InitFromWebTests.m in Sources */, 9C08C1AF1749750100AA8CC9 /* CopyrightModel.m in Sources */, diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj index cc141202..246d9fcc 100644 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_iOS.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1AE9CA901C21F47600B8F5C1 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */; }; 358FD078D3C0D56C77ACD770 /* ExtremeNestingModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */; }; 358FD179E0B41C47C67713B5 /* InteractionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */; }; 358FD61804BD21F41035348E /* ExtremeNestingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */; }; @@ -156,6 +157,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 1AE9CA8E1C21F47600B8F5C1 /* RenamedPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenamedPropertyModel.h; sourceTree = ""; }; + 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RenamedPropertyModel.m; sourceTree = ""; }; 358FD25356988AC33EA6A935 /* DrugModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrugModel.m; sourceTree = ""; }; 358FD7AD55FD213CBAAB460F /* ExtremeNestingModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingModel.h; sourceTree = ""; }; 358FD807C3E86F5DC4058645 /* ExtremeNestingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingTests.h; sourceTree = ""; }; @@ -778,6 +781,8 @@ 358FDA6A1D0805B6ABE4720D /* DrugModel.h */, 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */, 358FDED5E028AA00D3E6564D /* InteractionModel.h */, + 1AE9CA8E1C21F47600B8F5C1 /* RenamedPropertyModel.h */, + 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */, ); path = TestModels; sourceTree = ""; @@ -929,6 +934,7 @@ 9CBBBFB1166BBB05008B4326 /* MyDataModel.m in Sources */, 9CBBBFB5166BBB21008B4326 /* StorageViewController.m in Sources */, 9C0D0240166E6BBF001EA645 /* KivaViewControllerNetworking.m in Sources */, + 1AE9CA901C21F47600B8F5C1 /* RenamedPropertyModel.m in Sources */, 9C55AF0E18903300004EBD8A /* ReposModel.m in Sources */, 9C66E024168CF0AA0015CCDF /* JSONModel.m in Sources */, 9C66E026168CF0AA0015CCDF /* JSONModelArray.m in Sources */, From f472318dbf6d115a5aa1b40c66c0722233760b97 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 17 Dec 2015 11:32:31 +0000 Subject: [PATCH 040/171] Return error from `mergeWithDictionary` Also alias & deprecate the old method Fixes #305 --- JSONModel/JSONModel/JSONModel.h | 3 ++- JSONModel/JSONModel/JSONModel.m | 9 +++++++-- JSONModelDemoTests/UnitTests/KeyMappingTests.m | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index c9d59a0b..af6171e8 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -342,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/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index fa17bc1c..1fca50ca 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1289,9 +1289,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 __importDictionary:dict withKeyMapper:(useKeyMapping)? self.__keyMapper:nil validation:NO error:nil]; + [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:error]; } #pragma mark - NSCopying, NSCoding diff --git a/JSONModelDemoTests/UnitTests/KeyMappingTests.m b/JSONModelDemoTests/UnitTests/KeyMappingTests.m index 60ad6ef1..262e01aa 100644 --- a/JSONModelDemoTests/UnitTests/KeyMappingTests.m +++ b/JSONModelDemoTests/UnitTests/KeyMappingTests.m @@ -235,7 +235,7 @@ -(void)testMergingData XCTAssertNil(global1.name, @"name got a value when nil expected"); NSDictionary* data = @{@"name":@"NAME IN CAPITALS"}; - [global1 mergeFromDictionary:data useKeyMapping:NO]; + [global1 mergeFromDictionary:data useKeyMapping:NO error:nil]; XCTAssertEqualObjects(global1.name, @"NAME IN CAPITALS", @"did not import name property"); @@ -245,7 +245,7 @@ -(void)testMergingData }]]; GlobalModel* global2 = [[GlobalModel alloc] init]; NSDictionary* data2 = @{@"name1":@"NAME IN CAPITALS"}; - [global2 mergeFromDictionary:data2 useKeyMapping:YES]; + [global2 mergeFromDictionary:data2 useKeyMapping:YES error:nil]; XCTAssertEqualObjects(global2.name, @"NAME IN CAPITALS", @"did not import name property"); From 220f200976d7591a318e40cb0d12ccc5126807c0 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Fri, 18 Dec 2015 11:14:51 +0100 Subject: [PATCH 041/171] * clean test code --- JSONModelDemo_iOS/MasterViewController.m | 103 +---------------------- 1 file changed, 2 insertions(+), 101 deletions(-) diff --git a/JSONModelDemo_iOS/MasterViewController.m b/JSONModelDemo_iOS/MasterViewController.m index 77f4d97f..7e32b293 100644 --- a/JSONModelDemo_iOS/MasterViewController.m +++ b/JSONModelDemo_iOS/MasterViewController.m @@ -25,115 +25,16 @@ @interface MasterViewController () { } @end -/* -#define OPT(type, opt, name) type name; @property id opt name##Property__; -#define OptionalProperties(...) @property BOOL zz_____OptionalPropertiesBegin; __VA_ARGS__ @property BOOL zz_____OptionalPropertiesEnd; - -@interface Ignore_Model : JSONModel - -//OptionalProperties -//( - @property (strong, nonatomic) NSNumber* oName; -//) - -@property (assign, nonatomic) OPT(BOOL, , name); -@property (strong, nonatomic) NSNumber* iName; -@property (strong, nonatomic) NSDate* mydate; - -@end - -@implementation Ignore_Model - -//@dynamic nameProperty; - -+(BOOL)propertyIsOptional:(NSString*)propertyName -{ - return ([propertyName isEqualToString:@"name"]); -} - -@end - -@interface TopModel : JSONModel -@property (strong, nonatomic) Ignore_Model* im; -@end - -@implementation TopModel -@end -*/ - -#define modelOptional - -@protocol JSONAnswer - -@end - -// -// JSON Connector -// - -@protocol JSONAnswerJSON - -@required -@property (nonatomic) NSString* name; - -@optional -@property (nonatomic) NSString* age; - --(void)importAgeFromJSON:(id)value; --(id)exportAgeToJSON; - --(void)importAgeFromCoreData:(id)value; --(id)exportAgeToCoreData; - -@end - -@interface JSONAnswer : JSONModel -@property (nonatomic, strong) NSString* name; -@end - -@implementation JSONAnswer -@end - -@interface TopModel : JSONModel -@property (assign, nonatomic) int id; -@property (strong, nonatomic) JSONAnswer* answer; -@property (assign, nonatomic, readonly) int rId; -@property (nonatomic, copy) void(^userLocationCompleted)(); -@property (strong, nonatomic) NSDictionary* dict; -@end - -@implementation TopModel -+(BOOL)propertyIsIgnored:(NSString *)propertyName -{ - return NO; -} --(NSString*)getText -{ - return @"1123"; -} -@end - @implementation MasterViewController -(void)viewDidAppear:(BOOL)animated { - NSString* json = @"{\"id\":1, \"answer\": {\"name1\":\"marin\"}, \"dict\":[], \"description\":\"Marin\"}"; - TopModel* tm = [[TopModel alloc] initWithString:json error:nil]; - NSLog(@"tm: %@", tm.toDictionary); - NSLog(@"to string: %@", tm.toJSONString); - tm = [[TopModel alloc] initWithData:[json dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - NSLog(@"tm - WithData : %@", tm.toDictionary); - NSLog(@"to string - WithData : %@", tm.toJSONString); + } -(IBAction)actionLoadCall:(id)sender { - [JSONHTTPClient getJSONFromURLWithString:@"http://localhost/testapi/test.php" - completion:^(NSDictionary *json, JSONModelError *err) { - - NSLog(@"GOT: %@", [json allKeys]); - - }]; + } - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil From c2f8fac151ddf79149aa25d6c9f3280a9265b8fc Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Fri, 18 Dec 2015 12:04:45 +0100 Subject: [PATCH 042/171] * fixes demo apps * updated copyright --- JSONModel/JSONModel/JSONModel.h | 8 +- JSONModel/JSONModel/JSONModel.m | 8 +- JSONModel/JSONModel/JSONModelArray.h | 6 +- JSONModel/JSONModel/JSONModelArray.m | 8 +- JSONModel/JSONModel/JSONModelClassProperty.h | 8 +- JSONModel/JSONModel/JSONModelClassProperty.m | 8 +- JSONModel/JSONModel/JSONModelError.h | 8 +- JSONModel/JSONModel/JSONModelError.m | 8 +- .../JSONModelCategories/NSArray+JSONModel.h | 8 +- .../JSONModelCategories/NSArray+JSONModel.m | 8 +- JSONModel/JSONModelLib.h | 8 +- JSONModel/JSONModelNetworking/JSONAPI.h | 8 +- JSONModel/JSONModelNetworking/JSONAPI.m | 8 +- .../JSONModelNetworking/JSONHTTPClient.h | 8 +- .../JSONModelNetworking/JSONHTTPClient.m | 8 +- .../JSONModel+networking.h | 8 +- .../JSONModel+networking.m | 8 +- .../JSONModelTransformations/JSONKeyMapper.h | 8 +- .../JSONModelTransformations/JSONKeyMapper.m | 8 +- .../JSONValueTransformer.h | 8 +- .../JSONValueTransformer.m | 8 +- JSONModelDemoTests/MTTestSemaphor.h | 4 +- JSONModelDemoTests/MTTestSemaphor.m | 4 +- JSONModelDemo_OSX.xcodeproj/project.pbxproj | 26 ----- JSONModelDemo_iOS.xcodeproj/project.pbxproj | 44 --------- JSONModelDemo_iOS/KivaViewController.m | 2 +- JSONModelDemo_iOS/MasterViewController.m | 12 +-- JSONModelDemo_iOS/StorageViewController.m | 3 +- JSONModelDemo_iOS/StorageViewController.xib | 25 ++--- JSONModelDemo_iOS/VideoLink.h | 16 ---- JSONModelDemo_iOS/VideoLink.m | 13 --- JSONModelDemo_iOS/VideoModel.h | 21 ---- JSONModelDemo_iOS/VideoModel.m | 28 ------ JSONModelDemo_iOS/VideoTitle.h | 15 --- JSONModelDemo_iOS/VideoTitle.m | 13 --- JSONModelDemo_iOS/YouTubeViewController.h | 13 --- JSONModelDemo_iOS/YouTubeViewController.m | 96 ------------------- JSONModelDemo_iOS/YouTubeViewController.xib | 37 ------- .../en.lproj/MasterViewController.xib | 4 +- JSONModelOSX/ViewController.m | 50 +--------- JSONModelOSX/ViewController.xib | 32 ++----- 41 files changed, 112 insertions(+), 512 deletions(-) delete mode 100644 JSONModelDemo_iOS/VideoLink.h delete mode 100644 JSONModelDemo_iOS/VideoLink.m delete mode 100644 JSONModelDemo_iOS/VideoModel.h delete mode 100644 JSONModelDemo_iOS/VideoModel.m delete mode 100644 JSONModelDemo_iOS/VideoTitle.h delete mode 100644 JSONModelDemo_iOS/VideoTitle.m delete mode 100644 JSONModelDemo_iOS/YouTubeViewController.h delete mode 100644 JSONModelDemo_iOS/YouTubeViewController.m delete mode 100644 JSONModelDemo_iOS/YouTubeViewController.xib diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index af6171e8..f2126870 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -1,18 +1,18 @@ // // 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 // -// 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/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 1fca50ca..10fbe0c8 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/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 // -// 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. diff --git a/JSONModel/JSONModel/JSONModelArray.h b/JSONModel/JSONModel/JSONModelArray.h index e858ad78..759d536e 100644 --- a/JSONModel/JSONModel/JSONModelArray.h +++ b/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 // -// 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/JSONModel/JSONModel/JSONModelArray.m b/JSONModel/JSONModel/JSONModelArray.m index 88eddc7a..5a16e010 100644 --- a/JSONModel/JSONModel/JSONModelArray.m +++ b/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 // -// 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" diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index b92b6daf..31649742 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/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 // -// 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/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index 5e66cae0..ab2e16a9 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/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 // -// 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" diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index a5940f4f..6cb3f957 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/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 // -// 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/JSONModel/JSONModel/JSONModelError.m b/JSONModel/JSONModel/JSONModelError.m index de80446a..0f5a4d81 100644 --- a/JSONModel/JSONModel/JSONModelError.m +++ b/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 // -// 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/JSONModel/JSONModelCategories/NSArray+JSONModel.h b/JSONModel/JSONModelCategories/NSArray+JSONModel.h index d4e18dab..73be57a1 100644 --- a/JSONModel/JSONModelCategories/NSArray+JSONModel.h +++ b/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 // -// 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/JSONModel/JSONModelCategories/NSArray+JSONModel.m b/JSONModel/JSONModelCategories/NSArray+JSONModel.m index 41475a47..a6c5b2a2 100644 --- a/JSONModel/JSONModelCategories/NSArray+JSONModel.m +++ b/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 // -// 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/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index 7c969d50..7e7be176 100644 --- a/JSONModel/JSONModelLib.h +++ b/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 // -// 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/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index dd27aa23..3f65d5d0 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/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 // -// 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" diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index 212803d7..02b859d1 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/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 // -// 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/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index a2129fb8..6bbd981a 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/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 // -// 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" diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index 18e3eef5..c401aabb 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -1,18 +1,18 @@ // // 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 // -// 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" diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index 88e329ef..4aefca00 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/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 // -// 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" diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index 7d4d1ff3..44d6676c 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/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 // -// 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/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index f35908ff..b0afd197 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/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 // -// 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/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 4d5ce612..1a0b5875 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -1,18 +1,18 @@ // // 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 // -// 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 diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index 8c40ce85..bea1d7ea 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -1,18 +1,18 @@ // // 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 // -// 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" diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 63ebfe84..cd6498f5 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/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 // -// 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" diff --git a/JSONModelDemoTests/MTTestSemaphor.h b/JSONModelDemoTests/MTTestSemaphor.h index 8ce6e30a..32ba349e 100644 --- a/JSONModelDemoTests/MTTestSemaphor.h +++ b/JSONModelDemoTests/MTTestSemaphor.h @@ -2,10 +2,10 @@ // MTTestSemaphor // // @version 0.1 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @author Marin Todorov, http://www.underplot.com // -// 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: diff --git a/JSONModelDemoTests/MTTestSemaphor.m b/JSONModelDemoTests/MTTestSemaphor.m index 359a0e83..01b82324 100644 --- a/JSONModelDemoTests/MTTestSemaphor.m +++ b/JSONModelDemoTests/MTTestSemaphor.m @@ -2,10 +2,10 @@ // MTTestSemaphor // // @version 0.1 -// @author Marin Todorov, http://www.touch-code-magazine.com +// @author Marin Todorov, http://www.underplot.com // -// 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: diff --git a/JSONModelDemo_OSX.xcodeproj/project.pbxproj b/JSONModelDemo_OSX.xcodeproj/project.pbxproj index 95ed77fe..8e8975e1 100644 --- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj +++ b/JSONModelDemo_OSX.xcodeproj/project.pbxproj @@ -89,9 +89,6 @@ 9C735D73170C048C00FF96F5 /* InitFromWebTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */; }; 9C97441C168CF255004DA333 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C97441B168CF255004DA333 /* Cocoa.framework */; }; 9C97441E168CF264004DA333 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C97441D168CF264004DA333 /* Cocoa.framework */; }; - 9CB6BC28168DE35E0002535B /* VideoLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB6BC23168DE35E0002535B /* VideoLink.m */; }; - 9CB6BC29168DE35E0002535B /* VideoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB6BC25168DE35E0002535B /* VideoModel.m */; }; - 9CB6BC2A168DE35E0002535B /* VideoTitle.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB6BC27168DE35E0002535B /* VideoTitle.m */; }; 9CB6BC2E168E07730002535B /* GitHubUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB6BC2D168E07730002535B /* GitHubUserModel.m */; }; 9CC27C9C1689B7BE008B5411 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */; }; 9CC27C9E1689B7BE008B5411 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27C9D1689B7BE008B5411 /* main.m */; }; @@ -227,12 +224,6 @@ 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitFromWebTests.m; sourceTree = ""; }; 9C97441B168CF255004DA333 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 9C97441D168CF264004DA333 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 9CB6BC22168DE35E0002535B /* VideoLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VideoLink.h; path = JSONModelDemo_iOS/VideoLink.h; sourceTree = SOURCE_ROOT; }; - 9CB6BC23168DE35E0002535B /* VideoLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VideoLink.m; path = JSONModelDemo_iOS/VideoLink.m; sourceTree = SOURCE_ROOT; }; - 9CB6BC24168DE35E0002535B /* VideoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VideoModel.h; path = JSONModelDemo_iOS/VideoModel.h; sourceTree = SOURCE_ROOT; }; - 9CB6BC25168DE35E0002535B /* VideoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VideoModel.m; path = JSONModelDemo_iOS/VideoModel.m; sourceTree = SOURCE_ROOT; }; - 9CB6BC26168DE35E0002535B /* VideoTitle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VideoTitle.h; path = JSONModelDemo_iOS/VideoTitle.h; sourceTree = SOURCE_ROOT; }; - 9CB6BC27168DE35E0002535B /* VideoTitle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VideoTitle.m; path = JSONModelDemo_iOS/VideoTitle.m; sourceTree = SOURCE_ROOT; }; 9CB6BC2C168E07730002535B /* GitHubUserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GitHubUserModel.h; path = JSONModelDemo_iOS/GitHubUserModel.h; sourceTree = SOURCE_ROOT; }; 9CB6BC2D168E07730002535B /* GitHubUserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GitHubUserModel.m; path = JSONModelDemo_iOS/GitHubUserModel.m; sourceTree = SOURCE_ROOT; }; 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; @@ -492,19 +483,6 @@ path = JSONModelTransformations; sourceTree = ""; }; - 9CB6BC21168DE3250002535B /* YoutubeDemo */ = { - isa = PBXGroup; - children = ( - 9CB6BC22168DE35E0002535B /* VideoLink.h */, - 9CB6BC23168DE35E0002535B /* VideoLink.m */, - 9CB6BC24168DE35E0002535B /* VideoModel.h */, - 9CB6BC25168DE35E0002535B /* VideoModel.m */, - 9CB6BC26168DE35E0002535B /* VideoTitle.h */, - 9CB6BC27168DE35E0002535B /* VideoTitle.m */, - ); - name = YoutubeDemo; - sourceTree = ""; - }; 9CB6BC2B168E07640002535B /* GithubDemo */ = { isa = PBXGroup; children = ( @@ -608,7 +586,6 @@ isa = PBXGroup; children = ( 9CB6BC2B168E07640002535B /* GithubDemo */, - 9CB6BC21168DE3250002535B /* YoutubeDemo */, 9CC2FCB1168CE6E60059FE67 /* KivaDemo */, 9CC27CC91689B8EE008B5411 /* ViewController */, 9CC27CA31689B7BE008B5411 /* AppDelegate.h */, @@ -826,9 +803,6 @@ 9C66E004168CF09A0015CCDF /* JSONModel+networking.m in Sources */, 9C66E006168CF09A0015CCDF /* JSONKeyMapper.m in Sources */, 9C66E008168CF09A0015CCDF /* JSONValueTransformer.m in Sources */, - 9CB6BC28168DE35E0002535B /* VideoLink.m in Sources */, - 9CB6BC29168DE35E0002535B /* VideoModel.m in Sources */, - 9CB6BC2A168DE35E0002535B /* VideoTitle.m in Sources */, 9CB6BC2E168E07730002535B /* GitHubUserModel.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj index 246d9fcc..6e249942 100644 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_iOS.xcodeproj/project.pbxproj @@ -112,11 +112,6 @@ 9CBBBF97166BAED2008B4326 /* GitHubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */; }; 9CBBBF98166BAED2008B4326 /* GitHubViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */; }; 9CBBBF9C166BAEF5008B4326 /* GitHubUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */; }; - 9CBBBFA1166BB29B008B4326 /* YouTubeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF9F166BB29B008B4326 /* YouTubeViewController.m */; }; - 9CBBBFA2166BB29B008B4326 /* YouTubeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBFA0166BB29B008B4326 /* YouTubeViewController.xib */; }; - 9CBBBFA5166BB2AD008B4326 /* VideoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFA4166BB2AD008B4326 /* VideoModel.m */; }; - 9CBBBFA9166BB3E1008B4326 /* VideoTitle.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFA8166BB3E1008B4326 /* VideoTitle.m */; }; - 9CBBBFAC166BB3EC008B4326 /* VideoLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFAB166BB3EC008B4326 /* VideoLink.m */; }; 9CBBBFB1166BBB05008B4326 /* MyDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */; }; 9CBBBFB5166BBB21008B4326 /* StorageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */; }; 9CBBBFB6166BBB21008B4326 /* StorageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */; }; @@ -282,15 +277,6 @@ 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GitHubViewController.xib; sourceTree = ""; }; 9CBBBF9A166BAEF5008B4326 /* GitHubUserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubUserModel.h; sourceTree = ""; }; 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubUserModel.m; sourceTree = ""; }; - 9CBBBF9E166BB29B008B4326 /* YouTubeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YouTubeViewController.h; sourceTree = ""; }; - 9CBBBF9F166BB29B008B4326 /* YouTubeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YouTubeViewController.m; sourceTree = ""; }; - 9CBBBFA0166BB29B008B4326 /* YouTubeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = YouTubeViewController.xib; sourceTree = ""; }; - 9CBBBFA3166BB2AD008B4326 /* VideoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoModel.h; sourceTree = ""; }; - 9CBBBFA4166BB2AD008B4326 /* VideoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoModel.m; sourceTree = ""; }; - 9CBBBFA7166BB3E1008B4326 /* VideoTitle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoTitle.h; sourceTree = ""; }; - 9CBBBFA8166BB3E1008B4326 /* VideoTitle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoTitle.m; sourceTree = ""; }; - 9CBBBFAA166BB3EC008B4326 /* VideoLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoLink.h; sourceTree = ""; }; - 9CBBBFAB166BB3EC008B4326 /* VideoLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoLink.m; sourceTree = ""; }; 9CBBBFAF166BBB05008B4326 /* MyDataModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyDataModel.h; sourceTree = ""; }; 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDataModel.m; sourceTree = ""; }; 9CBBBFB2166BBB21008B4326 /* StorageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageViewController.h; sourceTree = ""; }; @@ -567,7 +553,6 @@ children = ( 9CBBBFAD166BB87B008B4326 /* DemoApp */, 9CBBBF87166BAC31008B4326 /* libs */, - 9CBBBF9D166BB27E008B4326 /* YouTubeDemo */, 9CBBBF93166BAEB2008B4326 /* GitHubDemo */, 9CBBBFAE166BBADA008B4326 /* UsedAsStorageDemo */, 9CBBBF73166BA7E1008B4326 /* KivaJSONDemo */, @@ -655,30 +640,6 @@ name = GitHubModels; sourceTree = ""; }; - 9CBBBF9D166BB27E008B4326 /* YouTubeDemo */ = { - isa = PBXGroup; - children = ( - 9CBBBFA6166BB2B3008B4326 /* YouTubeModels */, - 9CBBBF9E166BB29B008B4326 /* YouTubeViewController.h */, - 9CBBBF9F166BB29B008B4326 /* YouTubeViewController.m */, - 9CBBBFA0166BB29B008B4326 /* YouTubeViewController.xib */, - ); - name = YouTubeDemo; - sourceTree = ""; - }; - 9CBBBFA6166BB2B3008B4326 /* YouTubeModels */ = { - isa = PBXGroup; - children = ( - 9CBBBFA3166BB2AD008B4326 /* VideoModel.h */, - 9CBBBFA4166BB2AD008B4326 /* VideoModel.m */, - 9CBBBFA7166BB3E1008B4326 /* VideoTitle.h */, - 9CBBBFA8166BB3E1008B4326 /* VideoTitle.m */, - 9CBBBFAA166BB3EC008B4326 /* VideoLink.h */, - 9CBBBFAB166BB3EC008B4326 /* VideoLink.m */, - ); - name = YouTubeModels; - sourceTree = ""; - }; 9CBBBFAD166BB87B008B4326 /* DemoApp */ = { isa = PBXGroup; children = ( @@ -868,7 +829,6 @@ 9CBBBF90166BAC54008B4326 /* btnCheck@2x.png in Resources */, 69286BDA17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */, 9CBBBF98166BAED2008B4326 /* GitHubViewController.xib in Resources */, - 9CBBBFA2166BB29B008B4326 /* YouTubeViewController.xib in Resources */, 9CBBBFB6166BBB21008B4326 /* StorageViewController.xib in Resources */, 9C0D0241166E6BBF001EA645 /* KivaViewControllerNetworking.xib in Resources */, 9CC2FD2B168CE7830059FE67 /* JSONModelDemo_iOSTests-Info.plist in Resources */, @@ -926,10 +886,6 @@ 9CBBBF92166BAC54008B4326 /* MBProgressHUD.m in Sources */, 9CBBBF97166BAED2008B4326 /* GitHubViewController.m in Sources */, 9CBBBF9C166BAEF5008B4326 /* GitHubUserModel.m in Sources */, - 9CBBBFA1166BB29B008B4326 /* YouTubeViewController.m in Sources */, - 9CBBBFA5166BB2AD008B4326 /* VideoModel.m in Sources */, - 9CBBBFA9166BB3E1008B4326 /* VideoTitle.m in Sources */, - 9CBBBFAC166BB3EC008B4326 /* VideoLink.m in Sources */, 9C55AF0F189033AE004EBD8A /* GitHubRepoModel.m in Sources */, 9CBBBFB1166BBB05008B4326 /* MyDataModel.m in Sources */, 9CBBBFB5166BBB21008B4326 /* StorageViewController.m in Sources */, diff --git a/JSONModelDemo_iOS/KivaViewController.m b/JSONModelDemo_iOS/KivaViewController.m index a327bf55..bfb13399 100644 --- a/JSONModelDemo_iOS/KivaViewController.m +++ b/JSONModelDemo_iOS/KivaViewController.m @@ -30,7 +30,7 @@ -(void)viewDidAppear:(BOOL)animated self.title = @"Kiva.org latest loans"; [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; - [JSONHTTPClient getJSONFromURLWithString:@"http://api.kivaws.org/v1/loans/search.json" + [JSONHTTPClient getJSONFromURLWithString:@"https://api.kivaws.org/v1/loans/search.json" params:@{@"status":@"fundraising"} completion:^(NSDictionary *json, JSONModelError *err) { diff --git a/JSONModelDemo_iOS/MasterViewController.m b/JSONModelDemo_iOS/MasterViewController.m index 7e32b293..9f7c61d6 100644 --- a/JSONModelDemo_iOS/MasterViewController.m +++ b/JSONModelDemo_iOS/MasterViewController.m @@ -10,15 +10,10 @@ #import "KivaViewController.h" #import "GitHubViewController.h" -#import "YouTubeViewController.h" #import "StorageViewController.h" #import "KivaViewControllerNetworking.h" #import "JSONModel+networking.h" -#import "VideoModel.h" - -#import -#import @interface MasterViewController () { NSMutableArray *_objects; @@ -42,7 +37,7 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { self.title = @"Demos"; - _objects = [NSMutableArray arrayWithArray:@[@"Kiva.org demo", @"GitHub demo", @"Youtube demo", @"Used for storage"]]; + _objects = [NSMutableArray arrayWithArray:@[@"Kiva.org demo", @"GitHub demo", @"Used for storage"]]; } return self; } @@ -88,11 +83,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath }break; case 2:{ - YouTubeViewController* yt = [[YouTubeViewController alloc] initWithNibName:@"YouTubeViewController" bundle:nil]; - [self.navigationController pushViewController:yt animated:YES]; - }break; - - case 3:{ StorageViewController* sc = [[StorageViewController alloc] initWithNibName:@"StorageViewController" bundle:nil]; [self.navigationController pushViewController:sc animated:YES]; }break; diff --git a/JSONModelDemo_iOS/StorageViewController.m b/JSONModelDemo_iOS/StorageViewController.m index 2f8410dc..a586aa3f 100644 --- a/JSONModelDemo_iOS/StorageViewController.m +++ b/JSONModelDemo_iOS/StorageViewController.m @@ -11,7 +11,7 @@ @interface StorageViewController () { - IBOutlet UITextView* txtContent; + IBOutlet UITextField* txtContent; IBOutlet UILabel* lblTimes; NSString* filePath; @@ -61,6 +61,7 @@ -(IBAction)actionSave:(id)sender //save to disc [[data toDictionary] writeToFile:filePath atomically:YES]; + NSLog(@"%@", [data toDictionary]); } @end diff --git a/JSONModelDemo_iOS/StorageViewController.xib b/JSONModelDemo_iOS/StorageViewController.xib index edd1ac90..1cda668e 100644 --- a/JSONModelDemo_iOS/StorageViewController.xib +++ b/JSONModelDemo_iOS/StorageViewController.xib @@ -1,14 +1,14 @@ - + - + - + @@ -17,16 +17,6 @@ - - - - - - - - - - - - - - - @@ -133,10 +123,6 @@ - - - - From 3c3849ccf1a0e1080ff1fa6807258a190604401d Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Fri, 18 Dec 2015 12:06:49 +0100 Subject: [PATCH 043/171] * updated copyright to reflect that this is a community project --- JSONModel/JSONModel/JSONModel.h | 2 +- JSONModel/JSONModel/JSONModel.m | 2 +- JSONModel/JSONModel/JSONModelArray.h | 2 +- JSONModel/JSONModel/JSONModelArray.m | 2 +- JSONModel/JSONModel/JSONModelClassProperty.h | 2 +- JSONModel/JSONModel/JSONModelClassProperty.m | 2 +- JSONModel/JSONModel/JSONModelError.h | 2 +- JSONModel/JSONModel/JSONModelError.m | 2 +- JSONModel/JSONModelCategories/NSArray+JSONModel.h | 2 +- JSONModel/JSONModelCategories/NSArray+JSONModel.m | 2 +- JSONModel/JSONModelLib.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.m | 2 +- JSONModel/JSONModelNetworking/JSONHTTPClient.h | 2 +- JSONModel/JSONModelNetworking/JSONHTTPClient.m | 2 +- JSONModel/JSONModelNetworking/JSONModel+networking.h | 2 +- JSONModel/JSONModelNetworking/JSONModel+networking.m | 2 +- JSONModel/JSONModelTransformations/JSONKeyMapper.h | 2 +- JSONModel/JSONModelTransformations/JSONKeyMapper.m | 2 +- JSONModel/JSONModelTransformations/JSONValueTransformer.h | 2 +- JSONModel/JSONModelTransformations/JSONValueTransformer.m | 2 +- JSONModelDemoTests/MTTestSemaphor.h | 2 +- JSONModelDemoTests/MTTestSemaphor.m | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index f2126870..41f4006d 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -2,7 +2,7 @@ // JSONModel.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 10fbe0c8..cfcbe388 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -2,7 +2,7 @@ // JSONModel.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModel/JSONModelArray.h b/JSONModel/JSONModel/JSONModelArray.h index 759d536e..96e2341a 100644 --- a/JSONModel/JSONModel/JSONModelArray.h +++ b/JSONModel/JSONModel/JSONModelArray.h @@ -2,7 +2,7 @@ // JSONModelArray.h // // @version 0.8.0 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModel/JSONModelArray.m b/JSONModel/JSONModel/JSONModelArray.m index 5a16e010..2d0476d4 100644 --- a/JSONModel/JSONModel/JSONModelArray.m +++ b/JSONModel/JSONModel/JSONModelArray.m @@ -2,7 +2,7 @@ // JSONModelArray.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index 31649742..8b0949d9 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -2,7 +2,7 @@ // JSONModelClassProperty.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index ab2e16a9..827de0a1 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -2,7 +2,7 @@ // JSONModelClassProperty.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index 6cb3f957..10c6b0f2 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -2,7 +2,7 @@ // JSONModelError.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModel/JSONModelError.m b/JSONModel/JSONModel/JSONModelError.m index 0f5a4d81..ffbf2fb6 100644 --- a/JSONModel/JSONModel/JSONModelError.m +++ b/JSONModel/JSONModel/JSONModelError.m @@ -2,7 +2,7 @@ // JSONModelError.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelCategories/NSArray+JSONModel.h b/JSONModel/JSONModelCategories/NSArray+JSONModel.h index 73be57a1..93a0429f 100644 --- a/JSONModel/JSONModelCategories/NSArray+JSONModel.h +++ b/JSONModel/JSONModelCategories/NSArray+JSONModel.h @@ -2,7 +2,7 @@ // NSArray+JSONModel.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelCategories/NSArray+JSONModel.m b/JSONModel/JSONModelCategories/NSArray+JSONModel.m index a6c5b2a2..cc9fdc83 100644 --- a/JSONModel/JSONModelCategories/NSArray+JSONModel.m +++ b/JSONModel/JSONModelCategories/NSArray+JSONModel.m @@ -2,7 +2,7 @@ // NSArray+JSONModel.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index 7e7be176..204fef7b 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -2,7 +2,7 @@ // JSONModelLib.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index 3f65d5d0..f8c05c1e 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.h @@ -2,7 +2,7 @@ // JSONAPI.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index 02b859d1..a05b44dd 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -2,7 +2,7 @@ // JSONAPI.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index 6bbd981a..64cb78b6 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -2,7 +2,7 @@ // JSONModelHTTPClient.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index c401aabb..fa0b77f5 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -2,7 +2,7 @@ // JSONModelHTTPClient.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index 4aefca00..bb045c03 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -2,7 +2,7 @@ // JSONModel+networking.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index 44d6676c..bb070c4c 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -2,7 +2,7 @@ // JSONModel+networking.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index b0afd197..22cdcc91 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -2,7 +2,7 @@ // JSONKeyMapper.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 1a0b5875..ee107946 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -2,7 +2,7 @@ // JSONKeyMapper.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index bea1d7ea..605c1575 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -2,7 +2,7 @@ // JSONValueTransformer.h // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index cd6498f5..bf4d91b6 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -2,7 +2,7 @@ // JSONValueTransformer.m // // @version 1.2 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModelDemoTests/MTTestSemaphor.h b/JSONModelDemoTests/MTTestSemaphor.h index 32ba349e..7a49f2c6 100644 --- a/JSONModelDemoTests/MTTestSemaphor.h +++ b/JSONModelDemoTests/MTTestSemaphor.h @@ -2,7 +2,7 @@ // MTTestSemaphor // // @version 0.1 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. diff --git a/JSONModelDemoTests/MTTestSemaphor.m b/JSONModelDemoTests/MTTestSemaphor.m index 01b82324..c7b699db 100644 --- a/JSONModelDemoTests/MTTestSemaphor.m +++ b/JSONModelDemoTests/MTTestSemaphor.m @@ -2,7 +2,7 @@ // MTTestSemaphor // // @version 0.1 -// @author Marin Todorov, http://www.underplot.com +// @author Marin Todorov (http://www.underplot.com) and contributors // // Copyright (c) 2012-2015 Marin Todorov, Underplot ltd. From e460d0d02346639d295e691e3c608fc3f59b936e Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 18 Dec 2015 13:07:23 +0000 Subject: [PATCH 044/171] Correct hashing process when is used Fixes #298 (hopefully) --- JSONModel/JSONModel/JSONModel.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index cfcbe388..3ade7445 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1226,9 +1226,11 @@ -(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]; } From d06bebb2c331efd9c91e560e4b6104959da1c251 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 18 Dec 2015 13:55:12 +0000 Subject: [PATCH 045/171] Code style correction --- JSONModel/JSONModel/JSONModel.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 3ade7445..58f75ae2 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1227,8 +1227,10 @@ - (NSUInteger)hash { if (self.indexPropertyName) { id val = [self valueForKey:self.indexPropertyName]; - if (val) + + if (val) { return [val hash]; + } } return [super hash]; From 43ff564614c0886b1420e26ec758ba21394bf496 Mon Sep 17 00:00:00 2001 From: jiyee Date: Fri, 25 Dec 2015 17:19:43 +0800 Subject: [PATCH 046/171] documentation enhancement. --- JSONModel/JSONModel/JSONModel.h | 12 ++++++------ JSONModel/JSONModel/JSONModel.m | 8 ++++---- JSONModel/JSONModel/JSONModelArray.h | 2 +- JSONModel/JSONModelCategories/NSArray+JSONModel.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.h | 6 +++--- JSONModel/JSONModelNetworking/JSONHTTPClient.h | 12 ++++++------ .../JSONModelNetworking/JSONModel+networking.h | 4 ++-- JSONModel/JSONModelTransformations/JSONKeyMapper.h | 4 ++-- .../JSONValueTransformer.h | 14 +++++++------- .../JSONValueTransformer.m | 2 +- 10 files changed, 33 insertions(+), 33 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 41f4006d..0963e218 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -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,7 +222,7 @@ 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: @@ -237,7 +237,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * 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: */ @@ -275,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. @@ -297,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. diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 58f75ae2..208ded2c 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -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]; @@ -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); @@ -1048,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]; diff --git a/JSONModel/JSONModel/JSONModelArray.h b/JSONModel/JSONModel/JSONModelArray.h index 96e2341a..21251b17 100644 --- a/JSONModel/JSONModel/JSONModelArray.h +++ b/JSONModel/JSONModel/JSONModelArray.h @@ -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/JSONModel/JSONModelCategories/NSArray+JSONModel.h b/JSONModel/JSONModelCategories/NSArray+JSONModel.h index 93a0429f..3e50cdf3 100644 --- a/JSONModel/JSONModelCategories/NSArray+JSONModel.h +++ b/JSONModel/JSONModelCategories/NSArray+JSONModel.h @@ -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/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index f8c05c1e..6a86cf7d 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.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/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index 64cb78b6..69256c79 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.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 synchronous 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/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h
index bb045c03..9529d770 100644
--- a/JSONModel/JSONModelNetworking/JSONModel+networking.h
+++ b/JSONModel/JSONModelNetworking/JSONModel+networking.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/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h
index 22cdcc91..e022e5bf 100644
--- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h
+++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h
@@ -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
diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h
index 605c1575..71728a91 100644
--- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h
+++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h
@@ -19,7 +19,7 @@
 
 /////////////////////////////////////////////////////////////////////////////////////////////
 
-#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/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m
index bf4d91b6..cf04d111 100644
--- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m
+++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m
@@ -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",
                              

From d6658f2639818aabe14a302fac2dc808aeeab648 Mon Sep 17 00:00:00 2001
From: jiyee 
Date: Fri, 25 Dec 2015 17:46:10 +0800
Subject: [PATCH 047/171] documentation enhancement.

---
 JSONModel/JSONModel/JSONModel.h      | 4 ++--
 JSONModel/JSONModel/JSONModel.m      | 8 ++++----
 JSONModel/JSONModel/JSONModelArray.m | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h
index 0963e218..62d6b5e7 100644
--- a/JSONModel/JSONModel/JSONModel.h
+++ b/JSONModel/JSONModel/JSONModel.h
@@ -255,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.
diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m
index 208ded2c..7422d1ad 100644
--- a/JSONModel/JSONModel/JSONModel.m
+++ b/JSONModel/JSONModel/JSONModel.m
@@ -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];
@@ -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];
diff --git a/JSONModel/JSONModel/JSONModelArray.m b/JSONModel/JSONModel/JSONModelArray.m
index 2d0476d4..44c7fa15 100644
--- a/JSONModel/JSONModel/JSONModelArray.m
+++ b/JSONModel/JSONModel/JSONModelArray.m
@@ -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;

From 8097c06c0404bc9385f63c704f288b84ee4c1d88 Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 10:24:52 +0000
Subject: [PATCH 048/171] Version bump to v1.2.0

---
 AppledocSettings.plist |  2 +-
 Changelog.md           | 17 +++++++++++++++++
 JSONModel.podspec      |  4 ++--
 README.md              |  4 ++--
 gendoc                 |  2 +-
 5 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/AppledocSettings.plist b/AppledocSettings.plist
index e0666d67..eda9db2f 100644
--- a/AppledocSettings.plist
+++ b/AppledocSettings.plist
@@ -3,7 +3,7 @@
 
 
 	--project-name
-	JSONModel 1.1.2
+	JSONModel 1.2.0
 	--print-settings
 	
 	--project-company
diff --git a/Changelog.md b/Changelog.md
index 4ee0f1ac..6aecf3b4 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,6 +1,23 @@
 Change-log
 ==========
 
+**Version 1.2.0** @2015-12-30
+
+- support added for watchOS and tvOS
+- minimum iOS version bumped to 6.0
+- support added for Carthage
+- deprecated `+arrayOfModelsFromDictionaries:` in favor of `+arrayOfModelsFromDictionaries:error:`
+- added `+arrayOfModelsFromString:error:`
+- deprecated `+mergeFromDictionary:` in favor of `mergeFromDictionary:useKeyMapping:error:`
+- added support for multiple custom setters
+- fixed `-hash` implementation
+- added `responseData` property to `JSONModelError`
+- added support for creating a key mapper with exceptions (`+mapper:withExceptions:`)
+- locks now used in key mapper implementation for additional safety
+- fixed behavior of `NSURLFromNSString` transformer
+- updated project files to latest Xcode
+- updated demo apps to work with the latest JSONModel & external API code
+
 **Version 1.1.2** @2015-10-19
 
 Merging more requests re: iOS9
diff --git a/JSONModel.podspec b/JSONModel.podspec
index c64584eb..691f1e71 100644
--- a/JSONModel.podspec
+++ b/JSONModel.podspec
@@ -1,13 +1,13 @@
 Pod::Spec.new do |s|
   s.name         = "JSONModel"
-  s.version      = "1.1.2"
+  s.version      = "1.2.0"
   s.summary      = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes."
   s.homepage     = "http://www.jsonmodel.com"
 
   s.license      = { :type => 'MIT', :file => 'LICENSE_jsonmodel.txt' }
   s.author       = { "Marin Todorov" => "touch-code-magazine@underplot.com" }
 
-  s.source       = { :git => "https://github.com/icanzilb/JSONModel.git", :tag => "1.1.2" }
+  s.source       = { :git => "https://github.com/icanzilb/JSONModel.git", :tag => "1.2.0" }
 
   s.ios.deployment_target = '6.0'
   s.osx.deployment_target = '10.7'
diff --git a/README.md b/README.md
index 1501530f..5cc6db3c 100644
--- a/README.md
+++ b/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!
 
diff --git a/gendoc b/gendoc
index a2090adf..6f2ad483 100755
--- a/gendoc
+++ b/gendoc
@@ -1 +1 @@
-appledoc --project-name "JSONModel 1.1" --project-company "Marin Todorov, Underplot" --company-id com.underplot --output ~/help --no-create-docset --explicit-crossref JSONModel
+appledoc --project-name "JSONModel 1.2.0" --project-company "Marin Todorov, Underplot" --company-id com.underplot --output ~/help --no-create-docset --explicit-crossref JSONModel

From 24feb0e6e56e293812fe12499201405b0d7115ca Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 10:25:15 +0000
Subject: [PATCH 049/171] Trailing spaces removed from readme

---
 README.md | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 5cc6db3c..a0d041fb 100644
--- a/README.md
+++ b/README.md
@@ -70,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
@@ -93,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];
 
@@ -103,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.
@@ -118,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/)
 
@@ -463,9 +463,9 @@ Examples
 [JSONHTTPClient postJSONFromURLWithString:@"http://mydomain.com/api"
                                    params:@{@"postParam1":@"value1"}
                                completion:^(id json, JSONModelError *err) {
-                                   
+
                                    //check err, process json ...
-                                   
+
                                }];
 ```
 
@@ -552,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

From a30323da3d26a2f8a181240e3a24cceff66f79ed Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 11:37:00 +0000
Subject: [PATCH 050/171] Added watchOS and tvOS projects

For testing compatibility. Should help with #413
---
 .../project.pbxproj                           | 405 +++++++++++
 .../JSONModelDemo_tvOS/AppDelegate.h          |  15 +
 .../JSONModelDemo_tvOS/AppDelegate.m          |  17 +
 .../Content.imageset/Contents.json            |  12 +
 .../Back.imagestacklayer/Contents.json        |   6 +
 .../App Icon - Large.imagestack/Contents.json |  17 +
 .../Content.imageset/Contents.json            |  12 +
 .../Front.imagestacklayer/Contents.json       |   6 +
 .../Content.imageset/Contents.json            |  12 +
 .../Middle.imagestacklayer/Contents.json      |   6 +
 .../Content.imageset/Contents.json            |  12 +
 .../Back.imagestacklayer/Contents.json        |   6 +
 .../App Icon - Small.imagestack/Contents.json |  17 +
 .../Content.imageset/Contents.json            |  12 +
 .../Front.imagestacklayer/Contents.json       |   6 +
 .../Content.imageset/Contents.json            |  12 +
 .../Middle.imagestacklayer/Contents.json      |   6 +
 .../Contents.json                             |  26 +
 .../Top Shelf Image.imageset/Contents.json    |  12 +
 .../Assets.xcassets/Contents.json             |   6 +
 .../LaunchImage.launchimage/Contents.json     |  15 +
 .../Base.lproj/Main.storyboard                |  25 +
 .../JSONModelDemo_tvOS/Info.plist             |  32 +
 .../JSONModelDemo_tvOS/ViewController.h       |  13 +
 .../JSONModelDemo_tvOS/ViewController.m       |  17 +
 JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m  |  20 +
 .../AppIcon.appiconset/Contents.json          |  55 ++
 .../Base.lproj/Interface.storyboard           |  15 +
 .../Info.plist                                |  35 +
 .../ExtensionDelegate.h                       |  13 +
 .../ExtensionDelegate.m                       |  13 +
 .../Info.plist                                |  40 +
 .../InterfaceController.h                     |  13 +
 .../InterfaceController.m                     |  17 +
 .../project.pbxproj                           | 688 ++++++++++++++++++
 .../JSONModelDemo_watchOS/AppDelegate.h       |  15 +
 .../JSONModelDemo_watchOS/AppDelegate.m       |  17 +
 .../AppIcon.appiconset/Contents.json          |  73 ++
 .../Base.lproj/LaunchScreen.storyboard        |  27 +
 .../Base.lproj/Main.storyboard                |  26 +
 .../JSONModelDemo_watchOS/Info.plist          |  47 ++
 .../JSONModelDemo_watchOS/ViewController.h    |  13 +
 .../JSONModelDemo_watchOS/ViewController.m    |  17 +
 .../JSONModelDemo_watchOS/main.m              |  20 +
 .../contents.xcworkspacedata                  |   6 +
 45 files changed, 1895 insertions(+)
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.h
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.m
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Base.lproj/Main.storyboard
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Info.plist
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.h
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.m
 create mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Base.lproj/Interface.storyboard
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Info.plist
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.h
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.m
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/Info.plist
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.h
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.m
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.h
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.m
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/LaunchScreen.storyboard
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/Main.storyboard
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/Info.plist
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.h
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.m
 create mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/main.m

diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj b/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..647866f8
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj
@@ -0,0 +1,405 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1ACA08E81C33F8FD00234DA6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08E71C33F8FD00234DA6 /* main.m */; };
+		1ACA08EB1C33F8FD00234DA6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08EA1C33F8FD00234DA6 /* AppDelegate.m */; };
+		1ACA08EE1C33F8FD00234DA6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08ED1C33F8FD00234DA6 /* ViewController.m */; };
+		1ACA08F11C33F8FD00234DA6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08EF1C33F8FD00234DA6 /* Main.storyboard */; };
+		1ACA08F31C33F8FD00234DA6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08F21C33F8FD00234DA6 /* Assets.xcassets */; };
+		1ACA09151C33F91900234DA6 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08FB1C33F91900234DA6 /* Info.plist */; };
+		1ACA09161C33F91900234DA6 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08FE1C33F91900234DA6 /* JSONModel.m */; };
+		1ACA09171C33F91900234DA6 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09001C33F91900234DA6 /* JSONModelArray.m */; };
+		1ACA09181C33F91900234DA6 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09021C33F91900234DA6 /* JSONModelClassProperty.m */; };
+		1ACA09191C33F91900234DA6 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09041C33F91900234DA6 /* JSONModelError.m */; };
+		1ACA091A1C33F91900234DA6 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09071C33F91900234DA6 /* NSArray+JSONModel.m */; };
+		1ACA091B1C33F91900234DA6 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA090B1C33F91900234DA6 /* JSONAPI.m */; };
+		1ACA091C1C33F91900234DA6 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA090D1C33F91900234DA6 /* JSONHTTPClient.m */; };
+		1ACA091D1C33F91900234DA6 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA090F1C33F91900234DA6 /* JSONModel+networking.m */; };
+		1ACA091E1C33F91900234DA6 /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09121C33F91900234DA6 /* JSONKeyMapper.m */; };
+		1ACA091F1C33F91900234DA6 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09141C33F91900234DA6 /* JSONValueTransformer.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		1ACA08E31C33F8FD00234DA6 /* JSONModelDemo_tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JSONModelDemo_tvOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		1ACA08E71C33F8FD00234DA6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+		1ACA08E91C33F8FD00234DA6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+		1ACA08EA1C33F8FD00234DA6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
+		1ACA08EC1C33F8FD00234DA6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
+		1ACA08ED1C33F8FD00234DA6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
+		1ACA08F01C33F8FD00234DA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+		1ACA08F21C33F8FD00234DA6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+		1ACA08F41C33F8FD00234DA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+		1ACA08FB1C33F91900234DA6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+		1ACA08FD1C33F91900234DA6 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; };
+		1ACA08FE1C33F91900234DA6 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.m; sourceTree = ""; };
+		1ACA08FF1C33F91900234DA6 /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; };
+		1ACA09001C33F91900234DA6 /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelArray.m; sourceTree = ""; };
+		1ACA09011C33F91900234DA6 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; };
+		1ACA09021C33F91900234DA6 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; };
+		1ACA09031C33F91900234DA6 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; };
+		1ACA09041C33F91900234DA6 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; };
+		1ACA09061C33F91900234DA6 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+JSONModel.h"; sourceTree = ""; };
+		1ACA09071C33F91900234DA6 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+JSONModel.m"; sourceTree = ""; };
+		1ACA09081C33F91900234DA6 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelLib.h; sourceTree = ""; };
+		1ACA090A1C33F91900234DA6 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; };
+		1ACA090B1C33F91900234DA6 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; };
+		1ACA090C1C33F91900234DA6 /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONHTTPClient.h; sourceTree = ""; };
+		1ACA090D1C33F91900234DA6 /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONHTTPClient.m; sourceTree = ""; };
+		1ACA090E1C33F91900234DA6 /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONModel+networking.h"; sourceTree = ""; };
+		1ACA090F1C33F91900234DA6 /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONModel+networking.m"; sourceTree = ""; };
+		1ACA09111C33F91900234DA6 /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKeyMapper.h; sourceTree = ""; };
+		1ACA09121C33F91900234DA6 /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKeyMapper.m; sourceTree = ""; };
+		1ACA09131C33F91900234DA6 /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONValueTransformer.h; sourceTree = ""; };
+		1ACA09141C33F91900234DA6 /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONValueTransformer.m; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		1ACA08E01C33F8FD00234DA6 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		1ACA08DA1C33F8FD00234DA6 = {
+			isa = PBXGroup;
+			children = (
+				1ACA08FA1C33F91900234DA6 /* JSONModel */,
+				1ACA08E51C33F8FD00234DA6 /* JSONModelDemo_tvOS */,
+				1ACA08E41C33F8FD00234DA6 /* Products */,
+			);
+			indentWidth = 4;
+			sourceTree = "";
+			tabWidth = 4;
+			usesTabs = 0;
+		};
+		1ACA08E41C33F8FD00234DA6 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08E31C33F8FD00234DA6 /* JSONModelDemo_tvOS.app */,
+			);
+			name = Products;
+			sourceTree = "";
+		};
+		1ACA08E51C33F8FD00234DA6 /* JSONModelDemo_tvOS */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08E91C33F8FD00234DA6 /* AppDelegate.h */,
+				1ACA08EA1C33F8FD00234DA6 /* AppDelegate.m */,
+				1ACA08EC1C33F8FD00234DA6 /* ViewController.h */,
+				1ACA08ED1C33F8FD00234DA6 /* ViewController.m */,
+				1ACA08EF1C33F8FD00234DA6 /* Main.storyboard */,
+				1ACA08F21C33F8FD00234DA6 /* Assets.xcassets */,
+				1ACA08F41C33F8FD00234DA6 /* Info.plist */,
+				1ACA08E61C33F8FD00234DA6 /* Supporting Files */,
+			);
+			path = JSONModelDemo_tvOS;
+			sourceTree = "";
+		};
+		1ACA08E61C33F8FD00234DA6 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08E71C33F8FD00234DA6 /* main.m */,
+			);
+			name = "Supporting Files";
+			sourceTree = "";
+		};
+		1ACA08FA1C33F91900234DA6 /* JSONModel */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08FB1C33F91900234DA6 /* Info.plist */,
+				1ACA08FC1C33F91900234DA6 /* JSONModel */,
+				1ACA09051C33F91900234DA6 /* JSONModelCategories */,
+				1ACA09081C33F91900234DA6 /* JSONModelLib.h */,
+				1ACA09091C33F91900234DA6 /* JSONModelNetworking */,
+				1ACA09101C33F91900234DA6 /* JSONModelTransformations */,
+			);
+			name = JSONModel;
+			path = ../JSONModel;
+			sourceTree = "";
+		};
+		1ACA08FC1C33F91900234DA6 /* JSONModel */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08FD1C33F91900234DA6 /* JSONModel.h */,
+				1ACA08FE1C33F91900234DA6 /* JSONModel.m */,
+				1ACA08FF1C33F91900234DA6 /* JSONModelArray.h */,
+				1ACA09001C33F91900234DA6 /* JSONModelArray.m */,
+				1ACA09011C33F91900234DA6 /* JSONModelClassProperty.h */,
+				1ACA09021C33F91900234DA6 /* JSONModelClassProperty.m */,
+				1ACA09031C33F91900234DA6 /* JSONModelError.h */,
+				1ACA09041C33F91900234DA6 /* JSONModelError.m */,
+			);
+			path = JSONModel;
+			sourceTree = "";
+		};
+		1ACA09051C33F91900234DA6 /* JSONModelCategories */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA09061C33F91900234DA6 /* NSArray+JSONModel.h */,
+				1ACA09071C33F91900234DA6 /* NSArray+JSONModel.m */,
+			);
+			path = JSONModelCategories;
+			sourceTree = "";
+		};
+		1ACA09091C33F91900234DA6 /* JSONModelNetworking */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA090A1C33F91900234DA6 /* JSONAPI.h */,
+				1ACA090B1C33F91900234DA6 /* JSONAPI.m */,
+				1ACA090C1C33F91900234DA6 /* JSONHTTPClient.h */,
+				1ACA090D1C33F91900234DA6 /* JSONHTTPClient.m */,
+				1ACA090E1C33F91900234DA6 /* JSONModel+networking.h */,
+				1ACA090F1C33F91900234DA6 /* JSONModel+networking.m */,
+			);
+			path = JSONModelNetworking;
+			sourceTree = "";
+		};
+		1ACA09101C33F91900234DA6 /* JSONModelTransformations */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA09111C33F91900234DA6 /* JSONKeyMapper.h */,
+				1ACA09121C33F91900234DA6 /* JSONKeyMapper.m */,
+				1ACA09131C33F91900234DA6 /* JSONValueTransformer.h */,
+				1ACA09141C33F91900234DA6 /* JSONValueTransformer.m */,
+			);
+			path = JSONModelTransformations;
+			sourceTree = "";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		1ACA08E21C33F8FD00234DA6 /* JSONModelDemo_tvOS */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 1ACA08F71C33F8FD00234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_tvOS" */;
+			buildPhases = (
+				1ACA08DF1C33F8FD00234DA6 /* Sources */,
+				1ACA08E01C33F8FD00234DA6 /* Frameworks */,
+				1ACA08E11C33F8FD00234DA6 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = JSONModelDemo_tvOS;
+			productName = JSONModelDemo_tvOS;
+			productReference = 1ACA08E31C33F8FD00234DA6 /* JSONModelDemo_tvOS.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		1ACA08DB1C33F8FD00234DA6 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0720;
+				ORGANIZATIONNAME = Cuvva;
+				TargetAttributes = {
+					1ACA08E21C33F8FD00234DA6 = {
+						CreatedOnToolsVersion = 7.2;
+					};
+				};
+			};
+			buildConfigurationList = 1ACA08DE1C33F8FD00234DA6 /* Build configuration list for PBXProject "JSONModelDemo_tvOS" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 1ACA08DA1C33F8FD00234DA6;
+			productRefGroup = 1ACA08E41C33F8FD00234DA6 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				1ACA08E21C33F8FD00234DA6 /* JSONModelDemo_tvOS */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		1ACA08E11C33F8FD00234DA6 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				1ACA08F31C33F8FD00234DA6 /* Assets.xcassets in Resources */,
+				1ACA08F11C33F8FD00234DA6 /* Main.storyboard in Resources */,
+				1ACA09151C33F91900234DA6 /* Info.plist in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		1ACA08DF1C33F8FD00234DA6 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				1ACA091C1C33F91900234DA6 /* JSONHTTPClient.m in Sources */,
+				1ACA09171C33F91900234DA6 /* JSONModelArray.m in Sources */,
+				1ACA09191C33F91900234DA6 /* JSONModelError.m in Sources */,
+				1ACA091B1C33F91900234DA6 /* JSONAPI.m in Sources */,
+				1ACA091F1C33F91900234DA6 /* JSONValueTransformer.m in Sources */,
+				1ACA08EE1C33F8FD00234DA6 /* ViewController.m in Sources */,
+				1ACA09161C33F91900234DA6 /* JSONModel.m in Sources */,
+				1ACA091E1C33F91900234DA6 /* JSONKeyMapper.m in Sources */,
+				1ACA091D1C33F91900234DA6 /* JSONModel+networking.m in Sources */,
+				1ACA091A1C33F91900234DA6 /* NSArray+JSONModel.m in Sources */,
+				1ACA08EB1C33F8FD00234DA6 /* AppDelegate.m in Sources */,
+				1ACA08E81C33F8FD00234DA6 /* main.m in Sources */,
+				1ACA09181C33F91900234DA6 /* JSONModelClassProperty.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		1ACA08EF1C33F8FD00234DA6 /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				1ACA08F01C33F8FD00234DA6 /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		1ACA08F51C33F8FD00234DA6 /* Debug */ = {
+			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_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = appletvos;
+				TARGETED_DEVICE_FAMILY = 3;
+				TVOS_DEPLOYMENT_TARGET = 9.1;
+			};
+			name = Debug;
+		};
+		1ACA08F61C33F8FD00234DA6 /* 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_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = appletvos;
+				TARGETED_DEVICE_FAMILY = 3;
+				TVOS_DEPLOYMENT_TARGET = 9.1;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		1ACA08F81C33F8FD00234DA6 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				INFOPLIST_FILE = JSONModelDemo_tvOS/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-tvOS";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		1ACA08F91C33F8FD00234DA6 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				INFOPLIST_FILE = JSONModelDemo_tvOS/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-tvOS";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1ACA08DE1C33F8FD00234DA6 /* Build configuration list for PBXProject "JSONModelDemo_tvOS" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1ACA08F51C33F8FD00234DA6 /* Debug */,
+				1ACA08F61C33F8FD00234DA6 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		1ACA08F71C33F8FD00234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_tvOS" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1ACA08F81C33F8FD00234DA6 /* Debug */,
+				1ACA08F91C33F8FD00234DA6 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 1ACA08DB1C33F8FD00234DA6 /* Project object */;
+}
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.h b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.h
new file mode 100644
index 00000000..733ff25a
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.h
@@ -0,0 +1,15 @@
+//
+//  AppDelegate.h
+//  JSONModelDemo_tvOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+@import UIKit;
+
+@interface AppDelegate : UIResponder 
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.m b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.m
new file mode 100644
index 00000000..f84412b2
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.m
@@ -0,0 +1,17 @@
+//
+//  AppDelegate.m
+//  JSONModelDemo_tvOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+@interface AppDelegate ()
+
+@end
+
+@implementation AppDelegate
+
+@end
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
new file mode 100644
index 00000000..0564959f
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json	
@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json
new file mode 100644
index 00000000..da4a164c
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json	
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json
new file mode 100644
index 00000000..8bf75d9f
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json	
@@ -0,0 +1,17 @@
+{
+  "layers" : [
+    {
+      "filename" : "Front.imagestacklayer"
+    },
+    {
+      "filename" : "Middle.imagestacklayer"
+    },
+    {
+      "filename" : "Back.imagestacklayer"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
new file mode 100644
index 00000000..0564959f
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json	
@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json
new file mode 100644
index 00000000..da4a164c
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json	
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
new file mode 100644
index 00000000..0564959f
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json	
@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json
new file mode 100644
index 00000000..da4a164c
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json	
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
new file mode 100644
index 00000000..0564959f
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json	
@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json
new file mode 100644
index 00000000..da4a164c
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json	
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json
new file mode 100644
index 00000000..8bf75d9f
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json	
@@ -0,0 +1,17 @@
+{
+  "layers" : [
+    {
+      "filename" : "Front.imagestacklayer"
+    },
+    {
+      "filename" : "Middle.imagestacklayer"
+    },
+    {
+      "filename" : "Back.imagestacklayer"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
new file mode 100644
index 00000000..0564959f
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json	
@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json
new file mode 100644
index 00000000..da4a164c
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json	
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
new file mode 100644
index 00000000..0564959f
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json	
@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json
new file mode 100644
index 00000000..da4a164c
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json	
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json
new file mode 100644
index 00000000..6a3dcfa5
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json	
@@ -0,0 +1,26 @@
+{
+  "assets" : [
+    {
+      "size" : "1280x768",
+      "idiom" : "tv",
+      "filename" : "App Icon - Large.imagestack",
+      "role" : "primary-app-icon"
+    },
+    {
+      "size" : "400x240",
+      "idiom" : "tv",
+      "filename" : "App Icon - Small.imagestack",
+      "role" : "primary-app-icon"
+    },
+    {
+      "size" : "1920x720",
+      "idiom" : "tv",
+      "filename" : "Top Shelf Image.imageset",
+      "role" : "top-shelf-image"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json
new file mode 100644
index 00000000..0564959f
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json	
@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/Contents.json
new file mode 100644
index 00000000..da4a164c
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json
new file mode 100644
index 00000000..29d94c78
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json
@@ -0,0 +1,15 @@
+{
+  "images" : [
+    {
+      "orientation" : "landscape",
+      "idiom" : "tv",
+      "extent" : "full-screen",
+      "minimum-system-version" : "9.0",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Base.lproj/Main.storyboard b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Base.lproj/Main.storyboard
new file mode 100644
index 00000000..f1d0070b
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Base.lproj/Main.storyboard
@@ -0,0 +1,25 @@
+
+
+    
+        
+    
+    
+        
+        
+            
+                
+                    
+                        
+                        
+                    
+                    
+                        
+                        
+                        
+                    
+                
+                
+            
+        
+    
+
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Info.plist b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Info.plist
new file mode 100644
index 00000000..4f338601
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+	CFBundleDevelopmentRegion
+	en
+	CFBundleExecutable
+	$(EXECUTABLE_NAME)
+	CFBundleIdentifier
+	$(PRODUCT_BUNDLE_IDENTIFIER)
+	CFBundleInfoDictionaryVersion
+	6.0
+	CFBundleName
+	$(PRODUCT_NAME)
+	CFBundlePackageType
+	APPL
+	CFBundleShortVersionString
+	1.0
+	CFBundleSignature
+	????
+	CFBundleVersion
+	1
+	LSRequiresIPhoneOS
+	
+	UIMainStoryboardFile
+	Main
+	UIRequiredDeviceCapabilities
+	
+		arm64
+	
+
+
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.h b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.h
new file mode 100644
index 00000000..d025b2b5
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.h
@@ -0,0 +1,13 @@
+//
+//  ViewController.h
+//  JSONModelDemo_tvOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+@import UIKit;
+
+@interface ViewController : UIViewController
+
+@end
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.m b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.m
new file mode 100644
index 00000000..4d5951d1
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.m
@@ -0,0 +1,17 @@
+//
+//  ViewController.m
+//  JSONModelDemo_tvOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+#import "ViewController.h"
+
+@interface ViewController ()
+
+@end
+
+@implementation ViewController
+
+@end
diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m
new file mode 100644
index 00000000..3f2eb561
--- /dev/null
+++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m
@@ -0,0 +1,20 @@
+//
+//  main.m
+//  JSONModelDemo_tvOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+@import UIKit;
+
+#import "AppDelegate.h"
+
+int main(int argc, char * argv[])
+{
+    @autoreleasepool
+    {
+        Class delegate = [AppDelegate class];
+        return UIApplicationMain(argc, argv, nil, NSStringFromClass(delegate));
+    }
+}
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 00000000..dd221ba5
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json	
@@ -0,0 +1,55 @@
+{
+  "images" : [
+    {
+      "size" : "24x24",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "notificationCenter",
+      "subtype" : "38mm"
+    },
+    {
+      "size" : "27.5x27.5",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "notificationCenter",
+      "subtype" : "42mm"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "watch",
+      "role" : "companionSettings",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "watch",
+      "role" : "companionSettings",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "appLauncher",
+      "subtype" : "38mm"
+    },
+    {
+      "size" : "86x86",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "quickLook",
+      "subtype" : "38mm"
+    },
+    {
+      "size" : "98x98",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "quickLook",
+      "subtype" : "42mm"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Base.lproj/Interface.storyboard b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Base.lproj/Interface.storyboard
new file mode 100644
index 00000000..d9fe0b13
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Base.lproj/Interface.storyboard	
@@ -0,0 +1,15 @@
+
+
+    
+        
+        
+    
+    
+        
+        
+            
+                
+            
+        
+    
+
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Info.plist b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Info.plist
new file mode 100644
index 00000000..a48bcf9e
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Info.plist	
@@ -0,0 +1,35 @@
+
+
+
+
+	CFBundleDevelopmentRegion
+	en
+	CFBundleDisplayName
+	JSONModelDemo_watchOS WatchKit App
+	CFBundleExecutable
+	$(EXECUTABLE_NAME)
+	CFBundleIdentifier
+	$(PRODUCT_BUNDLE_IDENTIFIER)
+	CFBundleInfoDictionaryVersion
+	6.0
+	CFBundleName
+	$(PRODUCT_NAME)
+	CFBundlePackageType
+	APPL
+	CFBundleShortVersionString
+	1.0
+	CFBundleSignature
+	????
+	CFBundleVersion
+	1
+	UISupportedInterfaceOrientations
+	
+		UIInterfaceOrientationPortrait
+		UIInterfaceOrientationPortraitUpsideDown
+	
+	WKCompanionAppBundleIdentifier
+	co.cuvva.JSONModelDemo-watchOS
+	WKWatchKitApp
+	
+
+
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.h b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.h
new file mode 100644
index 00000000..df52dc63
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.h	
@@ -0,0 +1,13 @@
+//
+//  ExtensionDelegate.h
+//  JSONModelDemo_watchOS WatchKit Extension
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+@import WatchKit;
+
+@interface ExtensionDelegate : NSObject 
+
+@end
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.m
new file mode 100644
index 00000000..b5faae57
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.m	
@@ -0,0 +1,13 @@
+//
+//  ExtensionDelegate.m
+//  JSONModelDemo_watchOS WatchKit Extension
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+#import "ExtensionDelegate.h"
+
+@implementation ExtensionDelegate
+
+@end
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/Info.plist b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/Info.plist
new file mode 100644
index 00000000..260a9808
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/Info.plist	
@@ -0,0 +1,40 @@
+
+
+
+
+	CFBundleDevelopmentRegion
+	en
+	CFBundleDisplayName
+	JSONModelDemo_watchOS WatchKit Extension
+	CFBundleExecutable
+	$(EXECUTABLE_NAME)
+	CFBundleIdentifier
+	$(PRODUCT_BUNDLE_IDENTIFIER)
+	CFBundleInfoDictionaryVersion
+	6.0
+	CFBundleName
+	$(PRODUCT_NAME)
+	CFBundlePackageType
+	XPC!
+	CFBundleShortVersionString
+	1.0
+	CFBundleSignature
+	????
+	CFBundleVersion
+	1
+	NSExtension
+	
+		NSExtensionAttributes
+		
+			WKAppBundleIdentifier
+			co.cuvva.JSONModelDemo-watchOS.watchkitapp
+		
+		NSExtensionPointIdentifier
+		com.apple.watchkit
+	
+	RemoteInterfacePrincipalClass
+	InterfaceController
+	WKExtensionDelegateClassName
+	ExtensionDelegate
+
+
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.h b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.h
new file mode 100644
index 00000000..f50623db
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.h	
@@ -0,0 +1,13 @@
+//
+//  InterfaceController.h
+//  JSONModelDemo_watchOS WatchKit Extension
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+@import WatchKit;
+
+@interface InterfaceController : WKInterfaceController
+
+@end
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.m
new file mode 100644
index 00000000..9d82d99a
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.m	
@@ -0,0 +1,17 @@
+//
+//  InterfaceController.m
+//  JSONModelDemo_watchOS WatchKit Extension
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+#import "InterfaceController.h"
+
+@interface InterfaceController ()
+
+@end
+
+@implementation InterfaceController
+
+@end
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj b/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..31e3d968
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj
@@ -0,0 +1,688 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1ACA086B1C33F84500234DA6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA086A1C33F84500234DA6 /* main.m */; };
+		1ACA086E1C33F84500234DA6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA086D1C33F84500234DA6 /* AppDelegate.m */; };
+		1ACA08711C33F84500234DA6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08701C33F84500234DA6 /* ViewController.m */; };
+		1ACA08741C33F84500234DA6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08721C33F84500234DA6 /* Main.storyboard */; };
+		1ACA08761C33F84500234DA6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08751C33F84500234DA6 /* Assets.xcassets */; };
+		1ACA08791C33F84500234DA6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08771C33F84500234DA6 /* LaunchScreen.storyboard */; };
+		1ACA087E1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 1ACA087D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app */; };
+		1ACA08841C33F84600234DA6 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08821C33F84600234DA6 /* Interface.storyboard */; };
+		1ACA08861C33F84600234DA6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08851C33F84600234DA6 /* Assets.xcassets */; };
+		1ACA088D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 1ACA088C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		1ACA08931C33F84600234DA6 /* InterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08921C33F84600234DA6 /* InterfaceController.m */; };
+		1ACA08961C33F84600234DA6 /* ExtensionDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08951C33F84600234DA6 /* ExtensionDelegate.m */; };
+		1ACA08C61C33F8CA00234DA6 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */; };
+		1ACA08C71C33F8CA00234DA6 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */; };
+		1ACA08C81C33F8CA00234DA6 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AF1C33F8CA00234DA6 /* JSONModelArray.m */; };
+		1ACA08C91C33F8CA00234DA6 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AF1C33F8CA00234DA6 /* JSONModelArray.m */; };
+		1ACA08CA1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */; };
+		1ACA08CB1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */; };
+		1ACA08CC1C33F8CA00234DA6 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */; };
+		1ACA08CD1C33F8CA00234DA6 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */; };
+		1ACA08CE1C33F8CA00234DA6 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B61C33F8CA00234DA6 /* NSArray+JSONModel.m */; };
+		1ACA08CF1C33F8CA00234DA6 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B61C33F8CA00234DA6 /* NSArray+JSONModel.m */; };
+		1ACA08D01C33F8CA00234DA6 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */; };
+		1ACA08D11C33F8CA00234DA6 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */; };
+		1ACA08D21C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BC1C33F8CA00234DA6 /* JSONHTTPClient.m */; };
+		1ACA08D31C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BC1C33F8CA00234DA6 /* JSONHTTPClient.m */; };
+		1ACA08D41C33F8CA00234DA6 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BE1C33F8CA00234DA6 /* JSONModel+networking.m */; };
+		1ACA08D51C33F8CA00234DA6 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BE1C33F8CA00234DA6 /* JSONModel+networking.m */; };
+		1ACA08D61C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08C11C33F8CA00234DA6 /* JSONKeyMapper.m */; };
+		1ACA08D71C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08C11C33F8CA00234DA6 /* JSONKeyMapper.m */; };
+		1ACA08D81C33F8CA00234DA6 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08C31C33F8CA00234DA6 /* JSONValueTransformer.m */; };
+		1ACA08D91C33F8CA00234DA6 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08C31C33F8CA00234DA6 /* JSONValueTransformer.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		1ACA087F1C33F84600234DA6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 1ACA085E1C33F84500234DA6 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 1ACA087C1C33F84600234DA6;
+			remoteInfo = "JSONModelDemo_watchOS WatchKit App";
+		};
+		1ACA088E1C33F84600234DA6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 1ACA085E1C33F84500234DA6 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 1ACA088B1C33F84600234DA6;
+			remoteInfo = "JSONModelDemo_watchOS WatchKit Extension";
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		1ACA089F1C33F84600234DA6 /* Embed App Extensions */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 13;
+			files = (
+				1ACA088D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex in Embed App Extensions */,
+			);
+			name = "Embed App Extensions";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		1ACA08A31C33F84600234DA6 /* Embed Watch Content */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "$(CONTENTS_FOLDER_PATH)/Watch";
+			dstSubfolderSpec = 16;
+			files = (
+				1ACA087E1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app in Embed Watch Content */,
+			);
+			name = "Embed Watch Content";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		1ACA08661C33F84500234DA6 /* JSONModelDemo_watchOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JSONModelDemo_watchOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		1ACA086A1C33F84500234DA6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+		1ACA086C1C33F84500234DA6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+		1ACA086D1C33F84500234DA6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
+		1ACA086F1C33F84500234DA6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
+		1ACA08701C33F84500234DA6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
+		1ACA08731C33F84500234DA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+		1ACA08751C33F84500234DA6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+		1ACA08781C33F84500234DA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+		1ACA087A1C33F84500234DA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+		1ACA087D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "JSONModelDemo_watchOS WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		1ACA08831C33F84600234DA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; };
+		1ACA08851C33F84600234DA6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+		1ACA08871C33F84600234DA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+		1ACA088C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "JSONModelDemo_watchOS WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
+		1ACA08911C33F84600234DA6 /* InterfaceController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InterfaceController.h; sourceTree = ""; };
+		1ACA08921C33F84600234DA6 /* InterfaceController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InterfaceController.m; sourceTree = ""; };
+		1ACA08941C33F84600234DA6 /* ExtensionDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtensionDelegate.h; sourceTree = ""; };
+		1ACA08951C33F84600234DA6 /* ExtensionDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExtensionDelegate.m; sourceTree = ""; };
+		1ACA08991C33F84600234DA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+		1ACA08AC1C33F8CA00234DA6 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; };
+		1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.m; sourceTree = ""; };
+		1ACA08AE1C33F8CA00234DA6 /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; };
+		1ACA08AF1C33F8CA00234DA6 /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelArray.m; sourceTree = ""; };
+		1ACA08B01C33F8CA00234DA6 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; };
+		1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; };
+		1ACA08B21C33F8CA00234DA6 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; };
+		1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; };
+		1ACA08B51C33F8CA00234DA6 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+JSONModel.h"; sourceTree = ""; };
+		1ACA08B61C33F8CA00234DA6 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+JSONModel.m"; sourceTree = ""; };
+		1ACA08B71C33F8CA00234DA6 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelLib.h; sourceTree = ""; };
+		1ACA08B91C33F8CA00234DA6 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; };
+		1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; };
+		1ACA08BB1C33F8CA00234DA6 /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONHTTPClient.h; sourceTree = ""; };
+		1ACA08BC1C33F8CA00234DA6 /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONHTTPClient.m; sourceTree = ""; };
+		1ACA08BD1C33F8CA00234DA6 /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONModel+networking.h"; sourceTree = ""; };
+		1ACA08BE1C33F8CA00234DA6 /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONModel+networking.m"; sourceTree = ""; };
+		1ACA08C01C33F8CA00234DA6 /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKeyMapper.h; sourceTree = ""; };
+		1ACA08C11C33F8CA00234DA6 /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKeyMapper.m; sourceTree = ""; };
+		1ACA08C21C33F8CA00234DA6 /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONValueTransformer.h; sourceTree = ""; };
+		1ACA08C31C33F8CA00234DA6 /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONValueTransformer.m; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		1ACA08631C33F84500234DA6 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		1ACA08891C33F84600234DA6 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		1ACA085D1C33F84500234DA6 = {
+			isa = PBXGroup;
+			children = (
+				1ACA08A91C33F8CA00234DA6 /* JSONModel */,
+				1ACA08681C33F84500234DA6 /* JSONModelDemo_watchOS */,
+				1ACA08811C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */,
+				1ACA08901C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */,
+				1ACA08671C33F84500234DA6 /* Products */,
+			);
+			indentWidth = 4;
+			sourceTree = "";
+			tabWidth = 4;
+			usesTabs = 0;
+		};
+		1ACA08671C33F84500234DA6 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08661C33F84500234DA6 /* JSONModelDemo_watchOS.app */,
+				1ACA087D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app */,
+				1ACA088C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex */,
+			);
+			name = Products;
+			sourceTree = "";
+		};
+		1ACA08681C33F84500234DA6 /* JSONModelDemo_watchOS */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA086C1C33F84500234DA6 /* AppDelegate.h */,
+				1ACA086D1C33F84500234DA6 /* AppDelegate.m */,
+				1ACA086F1C33F84500234DA6 /* ViewController.h */,
+				1ACA08701C33F84500234DA6 /* ViewController.m */,
+				1ACA08721C33F84500234DA6 /* Main.storyboard */,
+				1ACA08751C33F84500234DA6 /* Assets.xcassets */,
+				1ACA08771C33F84500234DA6 /* LaunchScreen.storyboard */,
+				1ACA087A1C33F84500234DA6 /* Info.plist */,
+				1ACA08691C33F84500234DA6 /* Supporting Files */,
+			);
+			path = JSONModelDemo_watchOS;
+			sourceTree = "";
+		};
+		1ACA08691C33F84500234DA6 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA086A1C33F84500234DA6 /* main.m */,
+			);
+			name = "Supporting Files";
+			sourceTree = "";
+		};
+		1ACA08811C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08821C33F84600234DA6 /* Interface.storyboard */,
+				1ACA08851C33F84600234DA6 /* Assets.xcassets */,
+				1ACA08871C33F84600234DA6 /* Info.plist */,
+			);
+			path = "JSONModelDemo_watchOS WatchKit App";
+			sourceTree = "";
+		};
+		1ACA08901C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08911C33F84600234DA6 /* InterfaceController.h */,
+				1ACA08921C33F84600234DA6 /* InterfaceController.m */,
+				1ACA08941C33F84600234DA6 /* ExtensionDelegate.h */,
+				1ACA08951C33F84600234DA6 /* ExtensionDelegate.m */,
+				1ACA08991C33F84600234DA6 /* Info.plist */,
+			);
+			path = "JSONModelDemo_watchOS WatchKit Extension";
+			sourceTree = "";
+		};
+		1ACA08A91C33F8CA00234DA6 /* JSONModel */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08AB1C33F8CA00234DA6 /* JSONModel */,
+				1ACA08B41C33F8CA00234DA6 /* JSONModelCategories */,
+				1ACA08B71C33F8CA00234DA6 /* JSONModelLib.h */,
+				1ACA08B81C33F8CA00234DA6 /* JSONModelNetworking */,
+				1ACA08BF1C33F8CA00234DA6 /* JSONModelTransformations */,
+			);
+			name = JSONModel;
+			path = ../JSONModel;
+			sourceTree = "";
+		};
+		1ACA08AB1C33F8CA00234DA6 /* JSONModel */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08AC1C33F8CA00234DA6 /* JSONModel.h */,
+				1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */,
+				1ACA08AE1C33F8CA00234DA6 /* JSONModelArray.h */,
+				1ACA08AF1C33F8CA00234DA6 /* JSONModelArray.m */,
+				1ACA08B01C33F8CA00234DA6 /* JSONModelClassProperty.h */,
+				1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */,
+				1ACA08B21C33F8CA00234DA6 /* JSONModelError.h */,
+				1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */,
+			);
+			path = JSONModel;
+			sourceTree = "";
+		};
+		1ACA08B41C33F8CA00234DA6 /* JSONModelCategories */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08B51C33F8CA00234DA6 /* NSArray+JSONModel.h */,
+				1ACA08B61C33F8CA00234DA6 /* NSArray+JSONModel.m */,
+			);
+			path = JSONModelCategories;
+			sourceTree = "";
+		};
+		1ACA08B81C33F8CA00234DA6 /* JSONModelNetworking */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08B91C33F8CA00234DA6 /* JSONAPI.h */,
+				1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */,
+				1ACA08BB1C33F8CA00234DA6 /* JSONHTTPClient.h */,
+				1ACA08BC1C33F8CA00234DA6 /* JSONHTTPClient.m */,
+				1ACA08BD1C33F8CA00234DA6 /* JSONModel+networking.h */,
+				1ACA08BE1C33F8CA00234DA6 /* JSONModel+networking.m */,
+			);
+			path = JSONModelNetworking;
+			sourceTree = "";
+		};
+		1ACA08BF1C33F8CA00234DA6 /* JSONModelTransformations */ = {
+			isa = PBXGroup;
+			children = (
+				1ACA08C01C33F8CA00234DA6 /* JSONKeyMapper.h */,
+				1ACA08C11C33F8CA00234DA6 /* JSONKeyMapper.m */,
+				1ACA08C21C33F8CA00234DA6 /* JSONValueTransformer.h */,
+				1ACA08C31C33F8CA00234DA6 /* JSONValueTransformer.m */,
+			);
+			path = JSONModelTransformations;
+			sourceTree = "";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		1ACA08651C33F84500234DA6 /* JSONModelDemo_watchOS */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 1ACA08A41C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS" */;
+			buildPhases = (
+				1ACA08621C33F84500234DA6 /* Sources */,
+				1ACA08631C33F84500234DA6 /* Frameworks */,
+				1ACA08641C33F84500234DA6 /* Resources */,
+				1ACA08A31C33F84600234DA6 /* Embed Watch Content */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				1ACA08801C33F84600234DA6 /* PBXTargetDependency */,
+			);
+			name = JSONModelDemo_watchOS;
+			productName = JSONModelDemo_watchOS;
+			productReference = 1ACA08661C33F84500234DA6 /* JSONModelDemo_watchOS.app */;
+			productType = "com.apple.product-type.application";
+		};
+		1ACA087C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 1ACA08A01C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS WatchKit App" */;
+			buildPhases = (
+				1ACA087B1C33F84600234DA6 /* Resources */,
+				1ACA089F1C33F84600234DA6 /* Embed App Extensions */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				1ACA088F1C33F84600234DA6 /* PBXTargetDependency */,
+			);
+			name = "JSONModelDemo_watchOS WatchKit App";
+			productName = "JSONModelDemo_watchOS WatchKit App";
+			productReference = 1ACA087D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app */;
+			productType = "com.apple.product-type.application.watchapp2";
+		};
+		1ACA088B1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 1ACA089C1C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS WatchKit Extension" */;
+			buildPhases = (
+				1ACA08881C33F84600234DA6 /* Sources */,
+				1ACA08891C33F84600234DA6 /* Frameworks */,
+				1ACA088A1C33F84600234DA6 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "JSONModelDemo_watchOS WatchKit Extension";
+			productName = "JSONModelDemo_watchOS WatchKit Extension";
+			productReference = 1ACA088C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex */;
+			productType = "com.apple.product-type.watchkit2-extension";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		1ACA085E1C33F84500234DA6 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0720;
+				ORGANIZATIONNAME = Cuvva;
+				TargetAttributes = {
+					1ACA08651C33F84500234DA6 = {
+						CreatedOnToolsVersion = 7.2;
+					};
+					1ACA087C1C33F84600234DA6 = {
+						CreatedOnToolsVersion = 7.2;
+					};
+					1ACA088B1C33F84600234DA6 = {
+						CreatedOnToolsVersion = 7.2;
+					};
+				};
+			};
+			buildConfigurationList = 1ACA08611C33F84500234DA6 /* Build configuration list for PBXProject "JSONModelDemo_watchOS" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 1ACA085D1C33F84500234DA6;
+			productRefGroup = 1ACA08671C33F84500234DA6 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				1ACA08651C33F84500234DA6 /* JSONModelDemo_watchOS */,
+				1ACA087C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */,
+				1ACA088B1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		1ACA08641C33F84500234DA6 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				1ACA08791C33F84500234DA6 /* LaunchScreen.storyboard in Resources */,
+				1ACA08761C33F84500234DA6 /* Assets.xcassets in Resources */,
+				1ACA08741C33F84500234DA6 /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		1ACA087B1C33F84600234DA6 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				1ACA08861C33F84600234DA6 /* Assets.xcassets in Resources */,
+				1ACA08841C33F84600234DA6 /* Interface.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		1ACA088A1C33F84600234DA6 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		1ACA08621C33F84500234DA6 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				1ACA08D21C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */,
+				1ACA08C81C33F8CA00234DA6 /* JSONModelArray.m in Sources */,
+				1ACA08CC1C33F8CA00234DA6 /* JSONModelError.m in Sources */,
+				1ACA08D01C33F8CA00234DA6 /* JSONAPI.m in Sources */,
+				1ACA08D81C33F8CA00234DA6 /* JSONValueTransformer.m in Sources */,
+				1ACA08711C33F84500234DA6 /* ViewController.m in Sources */,
+				1ACA08C61C33F8CA00234DA6 /* JSONModel.m in Sources */,
+				1ACA08D61C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */,
+				1ACA08D41C33F8CA00234DA6 /* JSONModel+networking.m in Sources */,
+				1ACA08CE1C33F8CA00234DA6 /* NSArray+JSONModel.m in Sources */,
+				1ACA086E1C33F84500234DA6 /* AppDelegate.m in Sources */,
+				1ACA086B1C33F84500234DA6 /* main.m in Sources */,
+				1ACA08CA1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		1ACA08881C33F84600234DA6 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				1ACA08D31C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */,
+				1ACA08D11C33F8CA00234DA6 /* JSONAPI.m in Sources */,
+				1ACA08CD1C33F8CA00234DA6 /* JSONModelError.m in Sources */,
+				1ACA08CF1C33F8CA00234DA6 /* NSArray+JSONModel.m in Sources */,
+				1ACA08D71C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */,
+				1ACA08C71C33F8CA00234DA6 /* JSONModel.m in Sources */,
+				1ACA08C91C33F8CA00234DA6 /* JSONModelArray.m in Sources */,
+				1ACA08CB1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */,
+				1ACA08D51C33F8CA00234DA6 /* JSONModel+networking.m in Sources */,
+				1ACA08961C33F84600234DA6 /* ExtensionDelegate.m in Sources */,
+				1ACA08931C33F84600234DA6 /* InterfaceController.m in Sources */,
+				1ACA08D91C33F8CA00234DA6 /* JSONValueTransformer.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		1ACA08801C33F84600234DA6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 1ACA087C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */;
+			targetProxy = 1ACA087F1C33F84600234DA6 /* PBXContainerItemProxy */;
+		};
+		1ACA088F1C33F84600234DA6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 1ACA088B1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */;
+			targetProxy = 1ACA088E1C33F84600234DA6 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		1ACA08721C33F84500234DA6 /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				1ACA08731C33F84500234DA6 /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "";
+		};
+		1ACA08771C33F84500234DA6 /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				1ACA08781C33F84500234DA6 /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "";
+		};
+		1ACA08821C33F84600234DA6 /* Interface.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				1ACA08831C33F84600234DA6 /* Base */,
+			);
+			name = Interface.storyboard;
+			sourceTree = "";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		1ACA089A1C33F84600234DA6 /* Debug */ = {
+			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_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.2;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		1ACA089B1C33F84600234DA6 /* 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_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.2;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		1ACA089D1C33F84600234DA6 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INFOPLIST_FILE = "JSONModelDemo_watchOS WatchKit Extension/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS.watchkitapp.watchkitextension";
+				PRODUCT_NAME = "${TARGET_NAME}";
+				SDKROOT = watchos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = 4;
+				WATCHOS_DEPLOYMENT_TARGET = 2.1;
+			};
+			name = Debug;
+		};
+		1ACA089E1C33F84600234DA6 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INFOPLIST_FILE = "JSONModelDemo_watchOS WatchKit Extension/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS.watchkitapp.watchkitextension";
+				PRODUCT_NAME = "${TARGET_NAME}";
+				SDKROOT = watchos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = 4;
+				WATCHOS_DEPLOYMENT_TARGET = 2.1;
+			};
+			name = Release;
+		};
+		1ACA08A11C33F84600234DA6 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				IBSC_MODULE = JSONModelDemo_watchOS_WatchKit_Extension;
+				INFOPLIST_FILE = "JSONModelDemo_watchOS WatchKit App/Info.plist";
+				PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS.watchkitapp";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SDKROOT = watchos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = 4;
+				WATCHOS_DEPLOYMENT_TARGET = 2.1;
+			};
+			name = Debug;
+		};
+		1ACA08A21C33F84600234DA6 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				IBSC_MODULE = JSONModelDemo_watchOS_WatchKit_Extension;
+				INFOPLIST_FILE = "JSONModelDemo_watchOS WatchKit App/Info.plist";
+				PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS.watchkitapp";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SDKROOT = watchos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = 4;
+				WATCHOS_DEPLOYMENT_TARGET = 2.1;
+			};
+			name = Release;
+		};
+		1ACA08A51C33F84600234DA6 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				INFOPLIST_FILE = JSONModelDemo_watchOS/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		1ACA08A61C33F84600234DA6 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				INFOPLIST_FILE = JSONModelDemo_watchOS/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1ACA08611C33F84500234DA6 /* Build configuration list for PBXProject "JSONModelDemo_watchOS" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1ACA089A1C33F84600234DA6 /* Debug */,
+				1ACA089B1C33F84600234DA6 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		1ACA089C1C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS WatchKit Extension" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1ACA089D1C33F84600234DA6 /* Debug */,
+				1ACA089E1C33F84600234DA6 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+		};
+		1ACA08A01C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS WatchKit App" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1ACA08A11C33F84600234DA6 /* Debug */,
+				1ACA08A21C33F84600234DA6 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+		};
+		1ACA08A41C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1ACA08A51C33F84600234DA6 /* Debug */,
+				1ACA08A61C33F84600234DA6 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 1ACA085E1C33F84500234DA6 /* Project object */;
+}
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.h b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.h
new file mode 100644
index 00000000..a4cc7579
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.h
@@ -0,0 +1,15 @@
+//
+//  AppDelegate.h
+//  JSONModelDemo_watchOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+@import UIKit;
+
+@interface AppDelegate : UIResponder 
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.m
new file mode 100644
index 00000000..d7aecab3
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.m
@@ -0,0 +1,17 @@
+//
+//  AppDelegate.m
+//  JSONModelDemo_watchOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+@interface AppDelegate ()
+
+@end
+
+@implementation AppDelegate
+
+@end
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 00000000..eeea76c2
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,73 @@
+{
+  "images" : [
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "83.5x83.5",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/LaunchScreen.storyboard b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 00000000..78686cd0
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,27 @@
+
+
+    
+        
+        
+    
+    
+        
+        
+            
+                
+                    
+                        
+                        
+                    
+                    
+                        
+                        
+                        
+                    
+                
+                
+            
+            
+        
+    
+
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/Main.storyboard b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/Main.storyboard
new file mode 100644
index 00000000..b1336625
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+    
+        
+        
+    
+    
+        
+        
+            
+                
+                    
+                        
+                        
+                    
+                    
+                        
+                        
+                        
+                    
+                
+                
+            
+        
+    
+
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Info.plist b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Info.plist
new file mode 100644
index 00000000..40c6215d
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Info.plist
@@ -0,0 +1,47 @@
+
+
+
+
+	CFBundleDevelopmentRegion
+	en
+	CFBundleExecutable
+	$(EXECUTABLE_NAME)
+	CFBundleIdentifier
+	$(PRODUCT_BUNDLE_IDENTIFIER)
+	CFBundleInfoDictionaryVersion
+	6.0
+	CFBundleName
+	$(PRODUCT_NAME)
+	CFBundlePackageType
+	APPL
+	CFBundleShortVersionString
+	1.0
+	CFBundleSignature
+	????
+	CFBundleVersion
+	1
+	LSRequiresIPhoneOS
+	
+	UILaunchStoryboardName
+	LaunchScreen
+	UIMainStoryboardFile
+	Main
+	UIRequiredDeviceCapabilities
+	
+		armv7
+	
+	UISupportedInterfaceOrientations
+	
+		UIInterfaceOrientationPortrait
+		UIInterfaceOrientationLandscapeLeft
+		UIInterfaceOrientationLandscapeRight
+	
+	UISupportedInterfaceOrientations~ipad
+	
+		UIInterfaceOrientationPortrait
+		UIInterfaceOrientationPortraitUpsideDown
+		UIInterfaceOrientationLandscapeLeft
+		UIInterfaceOrientationLandscapeRight
+	
+
+
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.h b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.h
new file mode 100644
index 00000000..20b73453
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.h
@@ -0,0 +1,13 @@
+//
+//  ViewController.h
+//  JSONModelDemo_watchOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+@import UIKit;
+
+@interface ViewController : UIViewController
+
+@end
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.m
new file mode 100644
index 00000000..61d1a80d
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.m
@@ -0,0 +1,17 @@
+//
+//  ViewController.m
+//  JSONModelDemo_watchOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+#import "ViewController.h"
+
+@interface ViewController ()
+
+@end
+
+@implementation ViewController
+
+@end
diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/main.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/main.m
new file mode 100644
index 00000000..e99da99e
--- /dev/null
+++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/main.m
@@ -0,0 +1,20 @@
+//
+//  main.m
+//  JSONModelDemo_watchOS
+//
+//  Created by James Billingham on 30/12/2015.
+//  Copyright © 2015 Cuvva. All rights reserved.
+//
+
+@import UIKit;
+
+#import "AppDelegate.h"
+
+int main(int argc, char * argv[])
+{
+    @autoreleasepool
+    {
+        Class delegate = [AppDelegate class];
+        return UIApplicationMain(argc, argv, nil, NSStringFromClass(delegate));
+    }
+}
diff --git a/JSONModelDemos.xcworkspace/contents.xcworkspacedata b/JSONModelDemos.xcworkspace/contents.xcworkspacedata
index e231fc6b..d122fbec 100644
--- a/JSONModelDemos.xcworkspace/contents.xcworkspacedata
+++ b/JSONModelDemos.xcworkspace/contents.xcworkspacedata
@@ -7,6 +7,12 @@
    
    
+   
+   
+   
+   
    
    

From b7420f60abc572fa5500f70555385351fece49b7 Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 12:35:29 +0000
Subject: [PATCH 051/171] Minor typo

---
 JSONModel/JSONModelNetworking/JSONHTTPClient.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h
index 69256c79..7b2e007a 100644
--- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h
+++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h
@@ -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 synchronous 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.

From 689e2e18b99f7035184cb7bc1f2e5e02f2b2b5e3 Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 12:37:16 +0000
Subject: [PATCH 052/171] Remove all etag related code

It wasn't being used anyway - presumably left over from something a long time ago
---
 JSONModel/JSONModelNetworking/JSONHTTPClient.m | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m
index fa0b77f5..7671b5f6 100644
--- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m
+++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m
@@ -128,7 +128,7 @@ +(NSString*)urlEncode:(id)value
 }
 
 #pragma mark - networking worker methods
-+(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSData*)bodyData headers:(NSDictionary*)headers etag:(NSString**)etag error:(JSONModelError**)err
++(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSData*)bodyData headers:(NSDictionary*)headers error:(JSONModelError**)err
 {
     NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: url
                                                                 cachePolicy: defaultCachePolicy
@@ -203,7 +203,7 @@ +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBod
     return responseData;
 }
 
-+(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method params:(NSDictionary*)params headers:(NSDictionary*)headers etag:(NSString**)etag error:(JSONModelError**)err
++(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method params:(NSDictionary*)params headers:(NSDictionary*)headers error:(JSONModelError**)err
 {
     //create the request body
     NSMutableString* paramsString = nil;
@@ -235,7 +235,6 @@ +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method params:(NS
                                  method: method
                             requestBody: [method isEqualToString:kHTTPMethodPOST]?[paramsString dataUsingEncoding:NSUTF8StringEncoding]:nil
                                 headers: headers
-                                   etag: etag
                                   error: err];
 }
 
@@ -269,7 +268,6 @@ +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method param
         id jsonObject = nil;
         JSONModelError* error = nil;
         NSData* responseData = nil;
-        NSString* etag = nil;
         
         @try {
             if (bodyData) {
@@ -277,14 +275,12 @@ +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method param
                                                      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];
             }
         }

From b0444fa6ac5aea471fdb7c79a1363921f37b6502 Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 13:27:24 +0000
Subject: [PATCH 053/171] Rebuild internals of JSONHTTPClient to work
 asynchronously

---
 .../JSONModelNetworking/JSONHTTPClient.m      | 134 ++++++++----------
 1 file changed, 62 insertions(+), 72 deletions(-)

diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m
index 7671b5f6..23de6b75 100644
--- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m
+++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m
@@ -16,6 +16,8 @@
 
 #import "JSONHTTPClient.h"
 
+typedef void (^RequestResultBlock)(NSData *data, JSONModelError *error);
+
 #pragma mark - constants
 NSString* const kHTTPMethodGET = @"GET";
 NSString* const kHTTPMethodPOST = @"POST";
@@ -128,7 +130,7 @@ +(NSString*)urlEncode:(id)value
 }
 
 #pragma mark - networking worker methods
-+(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSData*)bodyData headers:(NSDictionary*)headers 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 +162,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 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,11 +237,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
-                                  error: err];
+    [self requestDataFromURL: url
+                      method: method
+                 requestBody: [method isEqualToString:kHTTPMethodPOST]?[paramsString dataUsingEncoding:NSUTF8StringEncoding]:nil
+                     headers: headers
+                       handler:handler];
 }
 
 #pragma mark - Async network request
@@ -261,33 +267,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;
-        
-        @try {
-            if (bodyData) {
-                responseData = [self syncRequestDataFromURL: [NSURL URLWithString:urlString]
-                                                     method: method
-                                                requestBody: bodyData
-                                                    headers: customHeaders
-                                                      error: &error];
-            } else {
-                responseData = [self syncRequestDataFromURL: [NSURL URLWithString:urlString]
-                                                     method: method
-                                                     params: params
-                                                    headers: customHeaders
-                                                      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
@@ -318,7 +300,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

From 0f50725eb1a93a59ba5476e788f0fd2513b763d1 Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 13:46:40 +0000
Subject: [PATCH 054/171] Add new mocked method & build config for tests

---
 JSONModelDemoTests/MockNSURLConnection.m    | 18 ++++++++++++++++++
 JSONModelDemo_OSX.xcodeproj/project.pbxproj |  2 --
 JSONModelDemo_iOS.xcodeproj/project.pbxproj |  4 ----
 3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/JSONModelDemoTests/MockNSURLConnection.m b/JSONModelDemoTests/MockNSURLConnection.m
index 3da00fb3..d4de37dd 100644
--- a/JSONModelDemoTests/MockNSURLConnection.m
+++ b/JSONModelDemoTests/MockNSURLConnection.m
@@ -42,6 +42,24 @@ + (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NS
     return nextData;
 }
 
++ (void)sendAsynchronousRequest:(NSURLRequest *)request queue:(NSOperationQueue *)queue completionHandler:(void (^)(NSURLResponse *, NSData *, NSError *))handler
+{
+    lastRequest = request;
+
+    dispatch_queue_t dQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
+
+    dispatch_block_t dBlock = ^{
+        handler(nextResponse, nextData, nextError);
+    };
+
+    if (responseDelayInSeconds > 0) {
+        dispatch_time_t dTime = dispatch_time(DISPATCH_TIME_NOW, responseDelayInSeconds * NSEC_PER_SEC);
+        dispatch_after(dTime, dQueue, dBlock);
+    } else {
+        dispatch_async(dQueue, dBlock);
+    }
+}
+
 +(void)setResponseDelay:(int)seconds
 {
     responseDelayInSeconds = seconds;
diff --git a/JSONModelDemo_OSX.xcodeproj/project.pbxproj b/JSONModelDemo_OSX.xcodeproj/project.pbxproj
index 8e8975e1..8073a4da 100644
--- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj
+++ b/JSONModelDemo_OSX.xcodeproj/project.pbxproj
@@ -850,7 +850,6 @@
 					"UNIT_TESTING=1",
 				);
 				INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemoTests-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = "";
@@ -867,7 +866,6 @@
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "JSONModelDemoTests/JSONModelDemoTests-Prefix.pch";
 				INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemoTests-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = "";
diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj
index 6e249942..425292e1 100644
--- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj
+++ b/JSONModelDemo_iOS.xcodeproj/project.pbxproj
@@ -1063,7 +1063,6 @@
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch";
 				INFOPLIST_FILE = "JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}";
 				PRODUCT_NAME = JSONModelDemo_iOS;
 				WRAPPER_EXTENSION = app;
@@ -1076,7 +1075,6 @@
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch";
 				INFOPLIST_FILE = "JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}";
 				PRODUCT_NAME = JSONModelDemo_iOS;
 				WRAPPER_EXTENSION = app;
@@ -1095,7 +1093,6 @@
 					"UNIT_TESTING=1",
 				);
 				INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}";
 				PRODUCT_NAME = JSONModelDemo_iOSTests;
 				TEST_HOST = "$(BUNDLE_LOADER)";
@@ -1109,7 +1106,6 @@
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch";
 				INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}";
 				PRODUCT_NAME = JSONModelDemo_iOSTests;
 				TEST_HOST = "$(BUNDLE_LOADER)";

From f50d314bfb904c65be39ee703b188b52a26a5679 Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 13:51:01 +0000
Subject: [PATCH 055/171] Use newer percent encoding method where available

Checks deployment target for compatibility

Closes #416
---
 JSONModel/JSONModelNetworking/JSONHTTPClient.m | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m
index 23de6b75..b3499a52 100644
--- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m
+++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m
@@ -120,13 +120,20 @@ +(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

From 3f3b7830d73e14eff6442756be7f74e54538dc2c Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 14:11:43 +0000
Subject: [PATCH 056/171] Prevent loss of precision when deserializing numbers

Fixes #422
---
 JSONModel/JSONModelTransformations/JSONValueTransformer.m       | 2 +-
 JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m          | 1 +
 JSONModelDemoTests/UnitTests/DataFiles/converts.json            | 1 +
 .../UnitTests/TestModels/BuiltInConversionsModel.h              | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m
index cf04d111..c902fdf1 100644
--- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m
+++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m
@@ -179,7 +179,7 @@ -(NSNumber*)NSNumberFromfloat:(float)f
 #pragma mark - string <-> number
 -(NSNumber*)NSNumberFromNSString:(NSString*)string
 {
-    return [NSNumber numberWithFloat: [string doubleValue]];
+    return [NSNumber numberWithDouble:[string doubleValue]];
 }
 
 -(NSString*)NSStringFromNSNumber:(NSNumber*)number
diff --git a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m
index 3d8eb820..35fd06b6 100644
--- a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m
+++ b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m
@@ -53,6 +53,7 @@ -(void)testConversions
     XCTAssertTrue([b.stringFromNumber isEqualToString:@"19.95"], @"stringFromNumber's value is not 19.95");
     
     XCTAssertTrue([b.numberFromString isKindOfClass:[NSNumber class]], @"numberFromString is not an NSNumber");
+    XCTAssertEqualObjects(b.doubleFromString, @16909129);
     
     //TODO: I had to hardcode the float epsilon below, bcz actually [NSNumber floatValue] was returning a bigger deviation than FLT_EPSILON
     // IDEAS?
diff --git a/JSONModelDemoTests/UnitTests/DataFiles/converts.json b/JSONModelDemoTests/UnitTests/DataFiles/converts.json
index 82b1bebf..cf3aa46b 100644
--- a/JSONModelDemoTests/UnitTests/DataFiles/converts.json
+++ b/JSONModelDemoTests/UnitTests/DataFiles/converts.json
@@ -9,6 +9,7 @@
 
     "stringFromNumber": 19.95,
     "numberFromString": "1230.99",
+    "doubleFromString": "16909129",
 
     "importantEvent": "2012-11-26T10:00:01+02:00",
     
diff --git a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h b/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h
index c6f2c75b..8b4de15a 100644
--- a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h
+++ b/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h
@@ -26,6 +26,7 @@
 /* automatically convert JSON data types */
 @property (strong, nonatomic) NSString* stringFromNumber;
 @property (strong, nonatomic) NSNumber* numberFromString;
+@property (strong, nonatomic) NSNumber* doubleFromString;
 
 /* predefined transformer */
 @property (strong, nonatomic) NSDate* importantEvent;

From 0e9d509926d30c939a4ec792c1f30a2d7101f3e0 Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Wed, 30 Dec 2015 16:29:46 +0000
Subject: [PATCH 057/171] Add support for working with 'root' dictionaries

Resolves #421
---
 JSONModel/JSONModel/JSONModel.h |  6 ++--
 JSONModel/JSONModel/JSONModel.m | 60 +++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h
index 62d6b5e7..6bcaabbe 100644
--- a/JSONModel/JSONModel/JSONModel.h
+++ b/JSONModel/JSONModel/JSONModel.h
@@ -231,6 +231,9 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
   +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array error:(NSError**)err;
   +(NSMutableArray*)arrayOfModelsFromData:(NSData*)data error:(NSError**)err;
   +(NSMutableArray*)arrayOfModelsFromString:(NSString*)string error:(NSError**)err;
+  +(NSMutableDictionary*)dictionaryOfModelsFromDictionary:(NSDictionary*)dictionary error:(NSError**)err;
+  +(NSMutableDictionary*)dictionaryOfModelsFromData:(NSData*)data error:(NSError**)err;
+  +(NSMutableDictionary*)dictionaryOfModelsFromString:(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 
@@ -242,8 +245,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
    * @see arrayOfModelsFromDictionaries:
    */
   +(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array;
-
-
+  +(NSMutableDictionary*)dictionaryOfDictionariesFromModels:(NSDictionary*)dictionary;
 
 /** @name Comparing models */
 
diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m
index 7422d1ad..da7dd9e4 100644
--- a/JSONModel/JSONModel/JSONModel.m
+++ b/JSONModel/JSONModel/JSONModel.m
@@ -1147,6 +1147,49 @@ +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array error:(NSError**
     return list;
 }
 
++ (NSMutableDictionary *)dictionaryOfModelsFromString:(NSString *)string error:(NSError **)err
+{
+    return [self dictionaryOfModelsFromData:[string dataUsingEncoding:NSUTF8StringEncoding] error:err];
+}
+
++ (NSMutableDictionary *)dictionaryOfModelsFromData:(NSData *)data error:(NSError **)err
+{
+    id json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:err];
+    if (!json || ![json isKindOfClass:[NSDictionary class]]) return nil;
+
+    return [self dictionaryOfModelsFromDictionary:json error:err];
+}
+
++ (NSMutableDictionary *)dictionaryOfModelsFromDictionary:(NSDictionary *)dictionary error:(NSError **)err
+{
+    NSMutableDictionary *output = [NSMutableDictionary dictionaryWithCapacity:dictionary.count];
+
+    for (NSString *key in dictionary.allKeys)
+    {
+        id object = dictionary[key];
+
+        if ([object isKindOfClass:NSDictionary.class])
+        {
+            id obj = [[self alloc] initWithDictionary:object error:err];
+            if (obj == nil) return nil;
+            output[key] = obj;
+        }
+        else if ([object isKindOfClass:NSArray.class])
+        {
+            id obj = [self arrayOfModelsFromDictionaries:object error:err];
+            if (obj == nil) return nil;
+            output[key] = obj;
+        }
+        else
+        {
+            *err = [JSONModelError errorInvalidDataWithTypeMismatch:@"Only dictionaries and arrays are supported"];
+            return nil;
+        }
+    }
+
+    return output;
+}
+
 //loop over NSArray of models and export them to JSON objects
 +(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array
 {
@@ -1185,6 +1228,23 @@ +(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array propertyNamesToE
     return list;
 }
 
++(NSMutableDictionary *)dictionaryOfDictionariesFromModels:(NSDictionary *)dictionary
+{
+    //bail early
+    if (isNull(dictionary)) return nil;
+
+    NSMutableDictionary *output = [NSMutableDictionary dictionaryWithCapacity:dictionary.count];
+
+    for (NSString *key in dictionary.allKeys) {
+        id  object = dictionary[key];
+        id obj = [object toDictionary];
+        if (!obj) return nil;
+        output[key] = obj;
+    }
+
+    return output;
+}
+
 #pragma mark - custom comparison methods
 -(NSString*)indexPropertyName
 {

From 8ea61df814a7e8dcd8dfce2c2bd1ca17f6853667 Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Thu, 31 Dec 2015 11:24:12 +0000
Subject: [PATCH 058/171] Added readme note about json2object utility

Resolves #392
---
 README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.md b/README.md
index a0d041fb..a4a6657f 100644
--- a/README.md
+++ b/README.md
@@ -550,6 +550,8 @@ Also everyone who did successful [pull requests](https://github.com/icanzilb/JSO
 
 Change log : [https://github.com/icanzilb/JSONModel/blob/master/Changelog.md](https://github.com/icanzilb/JSONModel/blob/master/Changelog.md)
 
+Utility to generate JSONModel classes from JSON data: https://github.com/dofork/json2object
+
 -------
 #### License
 This code is distributed under the terms and conditions of the MIT license.

From c55f7b7c87a4c979ab62044e7ef4e1ea701ee457 Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Tue, 19 Jan 2016 10:36:35 +0000
Subject: [PATCH 059/171] Renamed Repo.md to CONTRIBUTING.md

GitHub will automatically show this file to users when they open issues, etc.
---
 Repo.md => CONTRIBUTING.md | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename Repo.md => CONTRIBUTING.md (100%)

diff --git a/Repo.md b/CONTRIBUTING.md
similarity index 100%
rename from Repo.md
rename to CONTRIBUTING.md

From 9da509f8e1a69611c7d2ebd6ca92cb027dbdf14c Mon Sep 17 00:00:00 2001
From: James Billingham 
Date: Mon, 1 Feb 2016 11:27:07 +0000
Subject: [PATCH 060/171] Clarified protocol angle brackets

---
 README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.md b/README.md
index a4a6657f..d6afdedc 100644
--- a/README.md
+++ b/README.md
@@ -232,6 +232,8 @@ Examples
 @implementation OrderModel
 @end
 
+ +Note: the angle brackets after NSArray contain a protocol. This is not the same as the new Objective-C generics system. They are not mutually exclusive, but for JSONModel to work, the protocol must be in place. From e4b4b62743ae33dc6ef79702edc9d90ed35ff4dd Mon Sep 17 00:00:00 2001 From: Gergo Nemeth Date: Tue, 9 Feb 2016 20:14:20 +0100 Subject: [PATCH 061/171] Fixed typo --- JSONModel/JSONModel/JSONModel.h | 4 ++-- JSONModel/JSONModel/JSONModel.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 6bcaabbe..77038acd 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -93,7 +93,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * All JSONModel classes should implement initWithDictionary: * * For most classes the default initWithDictionary: inherited from JSONModel itself - * should suffice, but developers have the option ot also overwrite it if needed. + * should suffice, but developers have the option to also overwrite it if needed. * * @param dict a dictionary holding JSON objects, to be imported in the model. * @param err an error or NULL @@ -105,7 +105,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * All JSONModel classes should implement initWithData:error: * * For most classes the default initWithData: inherited from JSONModel itself - * should suffice, but developers have the option ot also overwrite it if needed. + * should suffice, but developers have the option to also overwrite it if needed. * * @param data representing a JSON response (usually fetched from web), to be imported in the model. * @param error an error or NULL diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index da7dd9e4..903d2233 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -285,7 +285,7 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM //loop over the incoming keys and set self's properties for (JSONModelClassProperty* property in [self __properties__]) { - //convert key name ot model keys, if a mapper is provided + //convert key name to model keys, if a mapper is provided NSString* jsonKeyPath = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper importing:YES] : property.name; //JMLog(@"keyPath: %@", jsonKeyPath); From 1c6046f793f8726f5fff7c9ff84ad4d74924b254 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 15 Feb 2016 09:50:25 +0000 Subject: [PATCH 062/171] Remove use of Obj-C generics Generics not supported before Xcode 7. Fixes #445. --- JSONModel/JSONModel/JSONModelClassProperty.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index 8b0949d9..46c835cf 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -68,6 +68,6 @@ typedef enum kCustomizationTypes PropertyGetterType; @property (assign, nonatomic) SEL customGetter; /** custom setters for this property, found in the owning model */ -@property (strong, nonatomic) NSMutableDictionary *customSetters; +@property (strong, nonatomic) NSMutableDictionary *customSetters; @end From 9e039123d306fdffcdd871203063e45560e13eab Mon Sep 17 00:00:00 2001 From: matteonovelli Date: Fri, 26 Feb 2016 10:02:35 +0100 Subject: [PATCH 063/171] Update README.md --- README.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d6afdedc..2a21729a 100644 --- a/README.md +++ b/README.md @@ -534,7 +534,34 @@ NSString* string = [pm toJSONString]; ``` -* json validation +#### Custom JSON validation + +```objective-c + +@interface ProductModel : JSONModel +@property (assign, nonatomic) int id; +@property (strong, nonatomic) NSString* name; +@property (assign, nonatomic) float price; +@property (strong, nonatomic) NSLocale *locale; +@property (strong, nonatomic) NSInteger minNameLength; +@end + +@implementation ProductModel + +- (BOOL)validate:(NSError *__autoreleasing *)error { + BOOL valid = [super validate:error]; + + if (self.name.length < self.minNameLength) { + *error = [NSError errorWithDomain:@"me.mycompany.com" code:1 userInfo:nil]; + valid = NO; + } + + return valid; +} + +@end + +``` * error handling * custom data validation * automatic compare and equality features From 45eadcb33362028c27b6c8946382f4fb43861cea Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 11 Mar 2016 09:14:09 +0000 Subject: [PATCH 064/171] Fixed the incorrect type for sample property. Thanks @xingheng. Fixes #456. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2a21729a..aa99b032 100644 --- a/README.md +++ b/README.md @@ -543,7 +543,7 @@ NSString* string = [pm toJSONString]; @property (strong, nonatomic) NSString* name; @property (assign, nonatomic) float price; @property (strong, nonatomic) NSLocale *locale; -@property (strong, nonatomic) NSInteger minNameLength; +@property (strong, nonatomic) NSNumber *minNameLength; @end @implementation ProductModel @@ -551,7 +551,7 @@ NSString* string = [pm toJSONString]; - (BOOL)validate:(NSError *__autoreleasing *)error { BOOL valid = [super validate:error]; - if (self.name.length < self.minNameLength) { + if (self.name.length < self.minNameLength.integerValue) { *error = [NSError errorWithDomain:@"me.mycompany.com" code:1 userInfo:nil]; valid = NO; } From d44d7b54d92615416419729aa6cd429917c7ea82 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Wed, 23 Mar 2016 09:30:29 +0100 Subject: [PATCH 065/171] * tests https://github.com/icanzilb/JSONModel/issues/460 --- .../UnitTests/SpecialValuesTests.m | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 JSONModelDemoTests/UnitTests/SpecialValuesTests.m diff --git a/JSONModelDemoTests/UnitTests/SpecialValuesTests.m b/JSONModelDemoTests/UnitTests/SpecialValuesTests.m new file mode 100644 index 00000000..036f0785 --- /dev/null +++ b/JSONModelDemoTests/UnitTests/SpecialValuesTests.m @@ -0,0 +1,50 @@ + +// +// SpecialValuesTests.m +// JSONModelDemo_iOS +// +// Created by Marin Todorov on 3/23/16. +// Copyright © 2016 Underplot ltd. All rights reserved. +// + +#import +#import "JSONModelLib.h" + +//model class +@interface SpecialModel: JSONModel +@property (strong, nonatomic) NSString* name; +@end + +@implementation SpecialModel +@end + +//tests class +@interface SpecialValuesTests : XCTestCase +@end + +@implementation SpecialValuesTests +{ + SpecialModel* _model; +} + +- (void)setUp { + [super setUp]; + + NSString* jsonContents = @"{\"name\": \"FIRST_SECOND\"}"; + + NSError *err; + _model = [[SpecialModel alloc] initWithString:jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(_model, @"Could not load the test data file."); +} + +// tests: https://github.com/icanzilb/JSONModel/issues/460 +- (void)testExample { + XCTAssertTrue([_model.name isEqualToString:@"FIRST_SECOND"]); +} + +-(void)tearDown { + _model = nil; +} + +@end From 4e55b53388a82dfc867a8e9c96e89d99169cbd20 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Wed, 23 Mar 2016 09:37:01 +0100 Subject: [PATCH 066/171] * update project file for test added* tests https://github.com/icanzilb/JSONModel/issues/460 --- JSONModelDemo_iOS.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj index 425292e1..c0221e44 100644 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_iOS.xcodeproj/project.pbxproj @@ -120,6 +120,7 @@ 9CD425751701FE0000A42AA1 /* HTTPClientSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */; }; 9CD425781701FF2100A42AA1 /* MTTestSemaphor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */; }; 9CD4257B1702002900A42AA1 /* MockNSURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */; }; + 9CF21CE91CA28A200076A4C7 /* SpecialValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */; }; 9CFDD0CA176E977C007B7DFA /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */; }; 9CFDD0CB176E977C007B7DFA /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */; }; 9CFDD0CC176E977C007B7DFA /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */; }; @@ -292,6 +293,7 @@ 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTTestSemaphor.m; sourceTree = ""; }; 9CD425791702002900A42AA1 /* MockNSURLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockNSURLConnection.h; sourceTree = ""; }; 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MockNSURLConnection.m; sourceTree = ""; }; + 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialValuesTests.m; sourceTree = ""; }; 9CFDD0A6176E977C007B7DFA /* BuiltInConversionsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsModel.h; sourceTree = ""; }; 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsModel.m; sourceTree = ""; }; 9CFDD0A8176E977C007B7DFA /* CopyrightModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyrightModel.h; sourceTree = ""; }; @@ -425,6 +427,7 @@ 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */, 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */, 358FD807C3E86F5DC4058645 /* ExtremeNestingTests.h */, + 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */, ); path = UnitTests; sourceTree = ""; @@ -919,6 +922,7 @@ 9C66DFB8168CEF420015CCDF /* JSONTypesModelWithValidation1.m in Sources */, 9C66DFB9168CEF420015CCDF /* JSONTypesModelWithValidation2.m in Sources */, 9C66DFBA168CEF420015CCDF /* JSONTypesReadTests.m in Sources */, + 9CF21CE91CA28A200076A4C7 /* SpecialValuesTests.m in Sources */, 9C66DFBB168CEF420015CCDF /* JSONValueTransformer+UIColor.m in Sources */, 9C66DFBC168CEF420015CCDF /* KeyMappingTests.m in Sources */, 9C66DFBD168CEF420015CCDF /* NestedModelsTests.m in Sources */, From 69ba0cb9c8f82153bd7f655537385aec81c7fef4 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 28 Mar 2016 18:10:23 +0100 Subject: [PATCH 067/171] Remove all support for ConvertOnDemand Resolves #464 --- JSONModel.xcodeproj/project.pbxproj | 25 --- JSONModel/JSONModel/JSONModel.h | 13 +- JSONModel/JSONModel/JSONModel.m | 25 +-- JSONModel/JSONModel/JSONModelArray.h | 60 -------- JSONModel/JSONModel/JSONModelArray.m | 145 ------------------ JSONModel/JSONModel/JSONModelClassProperty.h | 3 - JSONModel/JSONModel/JSONModelClassProperty.m | 1 - .../JSONModelCategories/NSArray+JSONModel.h | 40 ----- .../JSONModelCategories/NSArray+JSONModel.m | 28 ---- JSONModel/JSONModelLib.h | 4 - .../JSONValueTransformer.h | 10 -- .../JSONValueTransformer.m | 18 --- JSONModelDemoTests/UnitTests/ArrayTests.m | 16 +- .../UnitTests/TestModels/ReposModel.h | 4 +- JSONModelDemo_OSX.xcodeproj/project.pbxproj | 24 --- JSONModelDemo_iOS.xcodeproj/project.pbxproj | 24 --- JSONModelDemo_iOS/KivaFeed.h | 2 +- .../project.pbxproj | 20 --- .../project.pbxproj | 24 --- JSONModelOSX/KivaFeed.h | 2 +- 20 files changed, 16 insertions(+), 472 deletions(-) delete mode 100644 JSONModel/JSONModel/JSONModelArray.h delete mode 100644 JSONModel/JSONModel/JSONModelArray.m delete mode 100644 JSONModel/JSONModelCategories/NSArray+JSONModel.h delete mode 100644 JSONModel/JSONModelCategories/NSArray+JSONModel.m diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index c4c2b1ba..58eadc7c 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -9,14 +9,10 @@ /* Begin PBXBuildFile section */ 92C9BC7C1B19A5B600D79B06 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC641B19A5B600D79B06 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC7D1B19A5B600D79B06 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC651B19A5B600D79B06 /* JSONModel.m */; }; - 92C9BC7E1B19A5B600D79B06 /* JSONModelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC661B19A5B600D79B06 /* JSONModelArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 92C9BC7F1B19A5B600D79B06 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC671B19A5B600D79B06 /* JSONModelArray.m */; }; 92C9BC801B19A5B600D79B06 /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC811B19A5B600D79B06 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */; }; 92C9BC821B19A5B600D79B06 /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC831B19A5B600D79B06 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */; }; - 92C9BC841B19A5B600D79B06 /* NSArray+JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 92C9BC851B19A5B600D79B06 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6E1B19A5B600D79B06 /* NSArray+JSONModel.m */; }; 92C9BC861B19A5B600D79B06 /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC871B19A5B600D79B06 /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC711B19A5B600D79B06 /* JSONAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC881B19A5B600D79B06 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC721B19A5B600D79B06 /* JSONAPI.m */; }; @@ -35,14 +31,10 @@ 92C9BC411B19A51100D79B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 92C9BC641B19A5B600D79B06 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC651B19A5B600D79B06 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.m; sourceTree = ""; }; - 92C9BC661B19A5B600D79B06 /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; }; - 92C9BC671B19A5B600D79B06 /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelArray.m; sourceTree = ""; }; 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; }; 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; }; - 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+JSONModel.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 92C9BC6E1B19A5B600D79B06 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+JSONModel.m"; sourceTree = ""; }; 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONModelLib.h; path = JSONModel/JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC711B19A5B600D79B06 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC721B19A5B600D79B06 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; }; @@ -72,7 +64,6 @@ children = ( 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */, 92C9BC631B19A5B600D79B06 /* JSONModel */, - 92C9BC6C1B19A5B600D79B06 /* JSONModelCategories */, 92C9BC701B19A5B600D79B06 /* JSONModelNetworking */, 92C9BC771B19A5B600D79B06 /* JSONModelTransformations */, 92C9BC401B19A51100D79B06 /* Supporting Files */, @@ -105,8 +96,6 @@ children = ( 92C9BC641B19A5B600D79B06 /* JSONModel.h */, 92C9BC651B19A5B600D79B06 /* JSONModel.m */, - 92C9BC661B19A5B600D79B06 /* JSONModelArray.h */, - 92C9BC671B19A5B600D79B06 /* JSONModelArray.m */, 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */, 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */, 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */, @@ -116,16 +105,6 @@ path = JSONModel/JSONModel; sourceTree = ""; }; - 92C9BC6C1B19A5B600D79B06 /* JSONModelCategories */ = { - isa = PBXGroup; - children = ( - 92C9BC6D1B19A5B600D79B06 /* NSArray+JSONModel.h */, - 92C9BC6E1B19A5B600D79B06 /* NSArray+JSONModel.m */, - ); - name = JSONModelCategories; - path = JSONModel/JSONModelCategories; - sourceTree = ""; - }; 92C9BC701B19A5B600D79B06 /* JSONModelNetworking */ = { isa = PBXGroup; children = ( @@ -161,9 +140,7 @@ files = ( 92C9BC8B1B19A5B600D79B06 /* JSONModel+networking.h in Headers */, 92C9BC861B19A5B600D79B06 /* JSONModelLib.h in Headers */, - 92C9BC7E1B19A5B600D79B06 /* JSONModelArray.h in Headers */, 92C9BC8F1B19A5B600D79B06 /* JSONValueTransformer.h in Headers */, - 92C9BC841B19A5B600D79B06 /* NSArray+JSONModel.h in Headers */, 92C9BC801B19A5B600D79B06 /* JSONModelClassProperty.h in Headers */, 92C9BC871B19A5B600D79B06 /* JSONAPI.h in Headers */, 92C9BC7C1B19A5B600D79B06 /* JSONModel.h in Headers */, @@ -242,12 +219,10 @@ files = ( 92C9BC8A1B19A5B600D79B06 /* JSONHTTPClient.m in Sources */, 92C9BC831B19A5B600D79B06 /* JSONModelError.m in Sources */, - 92C9BC851B19A5B600D79B06 /* NSArray+JSONModel.m in Sources */, 92C9BC901B19A5B600D79B06 /* JSONValueTransformer.m in Sources */, 92C9BC8E1B19A5B600D79B06 /* JSONKeyMapper.m in Sources */, 92C9BC881B19A5B600D79B06 /* JSONAPI.m in Sources */, 92C9BC7D1B19A5B600D79B06 /* JSONModel.m in Sources */, - 92C9BC7F1B19A5B600D79B06 /* JSONModelArray.m in Sources */, 92C9BC811B19A5B600D79B06 /* JSONModelClassProperty.m in Sources */, 92C9BC8C1B19A5B600D79B06 /* JSONModel+networking.m in Sources */, ); diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 77038acd..1525c47a 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -66,20 +66,11 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) @interface NSObject(JSONModelPropertyCompatibility) @end -/** - * ConvertOnDemand enables lazy model initialization for NSArrays of models - * - * @property (strong, nonatomic) NSArray<JSONModel, ConvertOnDemand>* propertyName; - */ +// no longer used +__attribute__ ((deprecated)) @protocol ConvertOnDemand @end -/** - * Make all arrays ConvertOnDemand compatible to avoid compiler warnings - */ -@interface NSArray(JSONModelPropertyCompatibility) -@end - ///////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - JSONModel protocol /** diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 903d2233..11648279 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -25,7 +25,6 @@ #import "JSONModel.h" #import "JSONModelClassProperty.h" -#import "JSONModelArray.h" #pragma mark - associated objects names static const char * kMapperObjectKey; @@ -627,8 +626,6 @@ -(void)__inspectProperties p.name, OBJC_ASSOCIATION_RETAIN // This is atomic ); - } else if([protocolName isEqualToString:@"ConvertOnDemand"]) { - p.convertsOnDemand = YES; } else if([protocolName isEqualToString:@"Ignore"]) { p = nil; } else { @@ -744,19 +741,13 @@ -(id)__transform:(id)value forProperty:(JSONModelClassProperty*)property error:( return nil; } - if (property.convertsOnDemand) { - //on demand conversion - value = [[JSONModelArray alloc] initWithArray:value modelClass:[protocolClass class]]; - - } else { - //one shot conversion - JSONModelError* arrayErr = nil; - value = [[protocolClass class] arrayOfModelsFromDictionaries:value error:&arrayErr]; - if((err != nil) && (arrayErr != nil)) - { - *err = [arrayErr errorByPrependingKeyPathComponent:property.name]; - return nil; - } + //one shot conversion + JSONModelError* arrayErr = nil; + value = [[protocolClass class] arrayOfModelsFromDictionaries:value error:&arrayErr]; + if((err != nil) && (arrayErr != nil)) + { + *err = [arrayErr errorByPrependingKeyPathComponent:property.name]; + return nil; } } @@ -1313,7 +1304,7 @@ -(NSString*)description id value = ([p.name isEqualToString:@"description"])?self->_description:[self valueForKey:p.name]; NSString* valueDescription = (value)?[value description]:@""; - if (p.isStandardJSONType && ![value respondsToSelector:@selector(count)] && [valueDescription length]>60 && !p.convertsOnDemand) { + if (p.isStandardJSONType && ![value respondsToSelector:@selector(count)] && [valueDescription length]>60) { //cap description for longer values valueDescription = [NSString stringWithFormat:@"%@...", [valueDescription substringToIndex:59]]; diff --git a/JSONModel/JSONModel/JSONModelArray.h b/JSONModel/JSONModel/JSONModelArray.h deleted file mode 100644 index 21251b17..00000000 --- a/JSONModel/JSONModel/JSONModelArray.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// JSONModelArray.h -// -// @version 0.8.0 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - - -#import - -/** - * **Don't make instances of JSONModelArray yourself, except you know what you are doing.** - * - * You get automatically JSONModelArray instances, when you declare a convert on demand property, like so: - * - * @property (strong, nonatomic) NSArray<JSONModel, ConvertOnDemand>* list; - * - * The class stores its contents as they come from JSON, and upon the first request - * of each of the objects stored in the array, it'll be converted to the target model class. - * Thus saving time upon the very first model creation. - */ -@interface JSONModelArray : NSObject - -/** - * Don't make instances of JSONModelArray yourself, except you know what you are doing. - * - * @param array an array of NSDictionary objects - * @param cls the JSONModel sub-class you'd like the NSDictionaries to be converted to on demand - */ -- (id)initWithArray:(NSArray *)array modelClass:(Class)cls; - -- (id)objectAtIndex:(NSUInteger)index; -- (id)objectAtIndexedSubscript:(NSUInteger)index; -- (void)forwardInvocation:(NSInvocation *)anInvocation; -- (NSUInteger)count; -- (id)firstObject; -- (id)lastObject; - -/** - * Looks up the array's contents and tries to find a JSONModel object - * with matching index property value to the indexValue param. - * - * 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 homogeneous collection of objects) - * - * @param indexValue the id value to search for - * @return the found model or nil - */ -- (id)modelWithIndexValue:(id)indexValue; - -@end diff --git a/JSONModel/JSONModel/JSONModelArray.m b/JSONModel/JSONModel/JSONModelArray.m deleted file mode 100644 index 44c7fa15..00000000 --- a/JSONModel/JSONModel/JSONModelArray.m +++ /dev/null @@ -1,145 +0,0 @@ -// -// JSONModelArray.m -// -// @version 1.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - - -#import "JSONModelArray.h" -#import "JSONModel.h" - -@implementation JSONModelArray -{ - NSMutableArray* _storage; - Class _targetClass; -} - --(id)initWithArray:(NSArray *)array modelClass:(Class)cls -{ - self = [super init]; - - if (self) { - _storage = [NSMutableArray arrayWithArray:array]; - _targetClass = cls; - } - return self; -} - --(id)firstObject -{ - return [self objectAtIndex:0]; -} - --(id)lastObject -{ - return [self objectAtIndex:_storage.count - 1]; -} - --(id)objectAtIndex:(NSUInteger)index -{ - return [self objectAtIndexedSubscript:index]; -} - --(id)objectAtIndexedSubscript:(NSUInteger)index -{ - id object = _storage[index]; - if (![object isMemberOfClass:_targetClass]) { - NSError* err = nil; - object = [[_targetClass alloc] initWithDictionary:object error:&err]; - if (object) { - _storage[index] = object; - } - } - return object; -} - --(void)forwardInvocation:(NSInvocation *)anInvocation -{ - [anInvocation invokeWithTarget:_storage]; -} - --(id)forwardingTargetForSelector:(SEL)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; -} - --(NSUInteger)count -{ - return _storage.count; -} - --(id)modelWithIndexValue:(id)indexValue -{ - if (self.count==0) return nil; - if (![_storage[0] indexPropertyName]) return nil; - - for (JSONModel* model in _storage) { - if ([[model valueForKey:model.indexPropertyName] isEqual:indexValue]) { - return model; - } - } - - return nil; -} - --(id)mutableCopy -{ - //it's already mutable - return self; -} - -#pragma mark - description --(NSString*)description -{ - NSMutableString* res = [NSMutableString stringWithFormat:@"\n", [_targetClass description]]; - for (id m in _storage) { - [res appendString: [m description]]; - [res appendString: @",\n"]; - } - [res appendFormat:@"\n"]; - return res; -} - --(NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state - objects:(id __unsafe_unretained [])stackbuf - count:(NSUInteger)stackbufLength -{ - NSUInteger count = 0; - - unsigned long countOfItemsAlreadyEnumerated = state->state; - - if (countOfItemsAlreadyEnumerated == 0) { - state->mutationsPtr = &state->extra[0]; - } - - if (countOfItemsAlreadyEnumerated < [self count]) { - state->itemsPtr = stackbuf; - while ((countOfItemsAlreadyEnumerated < [self count]) && (count < stackbufLength)) { - stackbuf[count] = [self objectAtIndex:countOfItemsAlreadyEnumerated]; - countOfItemsAlreadyEnumerated++; - count++; - } - } else { - count = 0; - } - - state->state = countOfItemsAlreadyEnumerated; - - return count; -} - -@end diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index 46c835cf..45d7aa57 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -55,9 +55,6 @@ typedef enum kCustomizationTypes PropertyGetterType; /** If YES - create a mutable object for the value of the property */ @property (assign, nonatomic) BOOL isMutable; -/** If YES - create models on demand for the array members */ -@property (assign, nonatomic) BOOL convertsOnDemand; - /** If YES - the value of this property determines equality to other models */ @property (assign, nonatomic) BOOL isIndex; diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index 827de0a1..e63bc86c 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -26,7 +26,6 @@ -(NSString*)description if (self.isIndex) [properties addObject:@"Index"]; if (self.isOptional) [properties addObject:@"Optional"]; if (self.isMutable) [properties addObject:@"Mutable"]; - if (self.convertsOnDemand) [properties addObject:@"ConvertOnDemand"]; if (self.isStandardJSONType) [properties addObject:@"Standard JSON type"]; if (self.customGetter) [properties addObject:[NSString stringWithFormat: @"Getter = %@", NSStringFromSelector(self.customGetter)]]; diff --git a/JSONModel/JSONModelCategories/NSArray+JSONModel.h b/JSONModel/JSONModelCategories/NSArray+JSONModel.h deleted file mode 100644 index 3e50cdf3..00000000 --- a/JSONModel/JSONModelCategories/NSArray+JSONModel.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// NSArray+JSONModel.h -// -// @version 1.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - - - -#import -#import "JSONModel.h" - -/** - * Exposes invisible JSONModelArray methods - */ -@interface NSArray(JSONModel) - -/** - * Looks up the array's contents and tries to find a JSONModel object - * with matching index property value to the indexValue param. - * - * 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 homogeneous collection of objects) - * - * @param indexValue the id value to search for - * @return the found model or nil - * @exception NSException throws exception if you call this method on an instance, which is not actually a JSONModelArray - */ -- (id)modelWithIndexValue:(id)indexValue; - -@end diff --git a/JSONModel/JSONModelCategories/NSArray+JSONModel.m b/JSONModel/JSONModelCategories/NSArray+JSONModel.m deleted file mode 100644 index cc9fdc83..00000000 --- a/JSONModel/JSONModelCategories/NSArray+JSONModel.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// NSArray+JSONModel.m -// -// @version 1.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - - - -#import "NSArray+JSONModel.h" - -@implementation NSArray(JSONModel) - -- (id)modelWithIndexValue:(id)indexValue -{ - NSAssert(NO, @"call modelWithIndexValue: on a ConvertOnDemand property, which is defined like that: @property (strong, nonatomic) NSArray* list;"); - return nil; -} - -@end diff --git a/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index 204fef7b..c0b6c5ba 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -29,7 +29,3 @@ #import "JSONHTTPClient.h" #import "JSONModel+networking.h" #import "JSONAPI.h" - -//models array -#import "NSArray+JSONModel.h" -#import "JSONModelArray.h" diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index 71728a91..ddd5b5c3 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -15,7 +15,6 @@ #import -#import "JSONModelArray.h" ///////////////////////////////////////////////////////////////////////////////////////////// @@ -73,15 +72,6 @@ extern BOOL isNull(id value); */ -(NSMutableArray*)NSMutableArrayFromNSArray:(NSArray*)array; -#pragma mark - NS(Mutable)Array <- JSONModelArray -/** - * Transforms an array to a JSONModelArray - * @param array incoming array - * @return JSONModelArray - */ --(NSArray*)NSArrayFromJSONModelArray:(JSONModelArray*)array; --(NSMutableArray*)NSMutableArrayFromJSONModelArray:(JSONModelArray*)array; - #pragma mark - NSMutableDictionary <-> NSDictionary /** * Transforms a dictionary to a mutable dictionary diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index c902fdf1..61aff8d8 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -15,7 +15,6 @@ #import "JSONValueTransformer.h" -#import "JSONModelArray.h" #pragma mark - functions extern BOOL isNull(id value) @@ -82,26 +81,9 @@ -(NSMutableString*)NSMutableStringFromNSString:(NSString*)string #pragma mark - NSMutableArray <-> NSArray -(NSMutableArray*)NSMutableArrayFromNSArray:(NSArray*)array { - if ([array isKindOfClass:[JSONModelArray class]]) { - //it's a jsonmodelarray already, just return it - return (id)array; - } - return [NSMutableArray arrayWithArray:array]; } -#pragma mark - NS(Mutable)Array <- JSONModelArray --(NSArray*)NSArrayFromJSONModelArray:(JSONModelArray*)array -{ - return (NSMutableArray*)array; -} - --(NSMutableArray*)NSMutableArrayFromJSONModelArray:(JSONModelArray*)array -{ - return (NSMutableArray*)array; -} - - #pragma mark - NSMutableDictionary <-> NSDictionary -(NSMutableDictionary*)NSMutableDictionaryFromNSDictionary:(NSDictionary*)dict { diff --git a/JSONModelDemoTests/UnitTests/ArrayTests.m b/JSONModelDemoTests/UnitTests/ArrayTests.m index 6f9a6b22..0b8e7e08 100644 --- a/JSONModelDemoTests/UnitTests/ArrayTests.m +++ b/JSONModelDemoTests/UnitTests/ArrayTests.m @@ -38,10 +38,10 @@ -(void)setUp -(void)testLoading { - XCTAssertTrue([repos.repositories isMemberOfClass:[JSONModelArray class]], @".properties is not a JSONModelArray"); + XCTAssertTrue([repos.repositories isKindOfClass:[NSArray class]], @".properties is not a NSArray"); XCTAssertEqualObjects([[repos.repositories[0] class] description], @"GitHubRepoModel", @".properties[0] is not a GitHubRepoModel"); - XCTAssertTrue([reposProtocolArray.repositories isMemberOfClass:[JSONModelArray class]], @".properties is not a JSONModelArray"); + XCTAssertTrue([reposProtocolArray.repositories isKindOfClass:[NSArray class]], @".properties is not a NSArray"); XCTAssertEqualObjects([[reposProtocolArray.repositories[0] class] description], @"GitHubRepoModel", @".properties[0] is not a GitHubRepoModel"); } @@ -62,18 +62,6 @@ -(void)testFastEnumeration } } --(void)testReadArray -{ - JSONModelArray *array = [JSONModelArray new]; - - XCTAssertEqualObjects(@(array.count), @0, @"wrong count"); - XCTAssertNil([array firstObject], @"first object of an empty array should be nil"); - XCTAssertNil([array lastObject], @"last object of an empty array should be nil"); - XCTAssertNil(array[0], @"read of empty array should be nil"); - XCTAssertNil(array[2], @"read of empty array should be nil"); - XCTAssertNil(array[-2], @"read of empty array should be nil"); -} - -(void)testFirstObject { XCTAssertEqualObjects([[repos.repositories.firstObject class] description], @"GitHubRepoModel", @"wrong class"); diff --git a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h index ca606b54..984bf57b 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h +++ b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h @@ -11,12 +11,12 @@ @interface ReposModel : JSONModel -@property (strong, nonatomic) NSMutableArray* repositories; +@property (strong, nonatomic) NSMutableArray* repositories; @end @interface ReposProtocolArrayModel : JSONModel -@property (strong, nonatomic) NSMutableArray* repositories; +@property (strong, nonatomic) NSMutableArray* repositories; @end \ No newline at end of file diff --git a/JSONModelDemo_OSX.xcodeproj/project.pbxproj b/JSONModelDemo_OSX.xcodeproj/project.pbxproj index 8073a4da..00a11e07 100644 --- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj +++ b/JSONModelDemo_OSX.xcodeproj/project.pbxproj @@ -61,14 +61,10 @@ 9C66DF51168CEECF0015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B409168CEB220054215E /* withoutOptProp.json */; }; 9C66DFF6168CF09A0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFDF168CF09A0015CCDF /* JSONModel.m */; }; 9C66DFF7168CF09A0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFDF168CF09A0015CCDF /* JSONModel.m */; }; - 9C66DFF8168CF09A0015CCDF /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE1168CF09A0015CCDF /* JSONModelArray.m */; }; - 9C66DFF9168CF09A0015CCDF /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE1168CF09A0015CCDF /* JSONModelArray.m */; }; 9C66DFFA168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */; }; 9C66DFFB168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */; }; 9C66DFFC168CF09A0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */; }; 9C66DFFD168CF09A0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */; }; - 9C66DFFE168CF09A0015CCDF /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE8168CF09A0015CCDF /* NSArray+JSONModel.m */; }; - 9C66DFFF168CF09A0015CCDF /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE8168CF09A0015CCDF /* NSArray+JSONModel.m */; }; 9C66E000168CF09A0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */; }; 9C66E001168CF09A0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */; }; 9C66E002168CF09A0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */; }; @@ -192,14 +188,10 @@ 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyrightModel.m; sourceTree = ""; }; 9C66DFDE168CF09A0015CCDF /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66DFDF168CF09A0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; }; - 9C66DFE0168CF09A0015CCDF /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; }; - 9C66DFE1168CF09A0015CCDF /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelArray.m; sourceTree = ""; }; 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; }; 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; }; - 9C66DFE7168CF09A0015CCDF /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "NSArray+JSONModel.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFE8168CF09A0015CCDF /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSArray+JSONModel.m"; sourceTree = ""; }; 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66DFEB168CF09A0015CCDF /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; }; @@ -427,7 +419,6 @@ isa = PBXGroup; children = ( 9C66DFDD168CF09A0015CCDF /* JSONModel */, - 9C66DFE6168CF09A0015CCDF /* JSONModelCategories */, 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */, 9C66DFEA168CF09A0015CCDF /* JSONModelNetworking */, 9C66DFF1168CF09A0015CCDF /* JSONModelTransformations */, @@ -440,8 +431,6 @@ children = ( 9C66DFDE168CF09A0015CCDF /* JSONModel.h */, 9C66DFDF168CF09A0015CCDF /* JSONModel.m */, - 9C66DFE0168CF09A0015CCDF /* JSONModelArray.h */, - 9C66DFE1168CF09A0015CCDF /* JSONModelArray.m */, 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */, 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */, 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */, @@ -450,15 +439,6 @@ path = JSONModel; sourceTree = ""; }; - 9C66DFE6168CF09A0015CCDF /* JSONModelCategories */ = { - isa = PBXGroup; - children = ( - 9C66DFE7168CF09A0015CCDF /* NSArray+JSONModel.h */, - 9C66DFE8168CF09A0015CCDF /* NSArray+JSONModel.m */, - ); - path = JSONModelCategories; - sourceTree = ""; - }; 9C66DFEA168CF09A0015CCDF /* JSONModelNetworking */ = { isa = PBXGroup; children = ( @@ -759,10 +739,8 @@ 9C05B466168CEB220054215E /* ReposModel.m in Sources */, 9C05B467168CEB220054215E /* ValidationTestSuite.m in Sources */, 9C66DFF7168CF09A0015CCDF /* JSONModel.m in Sources */, - 9C66DFF9168CF09A0015CCDF /* JSONModelArray.m in Sources */, 9C66DFFB168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */, 9C66DFFD168CF09A0015CCDF /* JSONModelError.m in Sources */, - 9C66DFFF168CF09A0015CCDF /* NSArray+JSONModel.m in Sources */, 9C66E001168CF09A0015CCDF /* JSONAPI.m in Sources */, 9C66E003168CF09A0015CCDF /* JSONHTTPClient.m in Sources */, 9C66E005168CF09A0015CCDF /* JSONModel+networking.m in Sources */, @@ -794,10 +772,8 @@ 9CC2FCBA168CE7340059FE67 /* LoanModel.m in Sources */, 9CC2FCBB168CE7340059FE67 /* LocationModel.m in Sources */, 9C66DFF6168CF09A0015CCDF /* JSONModel.m in Sources */, - 9C66DFF8168CF09A0015CCDF /* JSONModelArray.m in Sources */, 9C66DFFA168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */, 9C66DFFC168CF09A0015CCDF /* JSONModelError.m in Sources */, - 9C66DFFE168CF09A0015CCDF /* NSArray+JSONModel.m in Sources */, 9C66E000168CF09A0015CCDF /* JSONAPI.m in Sources */, 9C66E002168CF09A0015CCDF /* JSONHTTPClient.m in Sources */, 9C66E004168CF09A0015CCDF /* JSONModel+networking.m in Sources */, diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj index c0221e44..90864376 100644 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_iOS.xcodeproj/project.pbxproj @@ -62,14 +62,10 @@ 9C66DFDB168CEF530015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF72168CEF420015CCDF /* withoutOptProp.json */; }; 9C66E024168CF0AA0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E00D168CF0AA0015CCDF /* JSONModel.m */; }; 9C66E025168CF0AA0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E00D168CF0AA0015CCDF /* JSONModel.m */; }; - 9C66E026168CF0AA0015CCDF /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E00F168CF0AA0015CCDF /* JSONModelArray.m */; }; - 9C66E027168CF0AA0015CCDF /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E00F168CF0AA0015CCDF /* JSONModelArray.m */; }; 9C66E028168CF0AA0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */; }; 9C66E029168CF0AA0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */; }; 9C66E02A168CF0AA0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E013168CF0AA0015CCDF /* JSONModelError.m */; }; 9C66E02B168CF0AA0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E013168CF0AA0015CCDF /* JSONModelError.m */; }; - 9C66E02C168CF0AA0015CCDF /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E016168CF0AA0015CCDF /* NSArray+JSONModel.m */; }; - 9C66E02D168CF0AA0015CCDF /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E016168CF0AA0015CCDF /* NSArray+JSONModel.m */; }; 9C66E02E168CF0AA0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E01A168CF0AA0015CCDF /* JSONAPI.m */; }; 9C66E02F168CF0AA0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E01A168CF0AA0015CCDF /* JSONAPI.m */; }; 9C66E030168CF0AA0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E01C168CF0AA0015CCDF /* JSONHTTPClient.m */; }; @@ -214,14 +210,10 @@ 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidationTestSuite.m; sourceTree = ""; }; 9C66E00C168CF0AA0015CCDF /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66E00D168CF0AA0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; }; - 9C66E00E168CF0AA0015CCDF /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; }; - 9C66E00F168CF0AA0015CCDF /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelArray.m; sourceTree = ""; }; 9C66E010168CF0AA0015CCDF /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; }; 9C66E012168CF0AA0015CCDF /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66E013168CF0AA0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; }; - 9C66E015168CF0AA0015CCDF /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "NSArray+JSONModel.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E016168CF0AA0015CCDF /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSArray+JSONModel.m"; sourceTree = ""; }; 9C66E017168CF0AA0015CCDF /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66E019168CF0AA0015CCDF /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 9C66E01A168CF0AA0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; }; @@ -459,7 +451,6 @@ isa = PBXGroup; children = ( 9C66E00B168CF0AA0015CCDF /* JSONModel */, - 9C66E014168CF0AA0015CCDF /* JSONModelCategories */, 9C66E017168CF0AA0015CCDF /* JSONModelLib.h */, 9C66E018168CF0AA0015CCDF /* JSONModelNetworking */, 9C66E01F168CF0AA0015CCDF /* JSONModelTransformations */, @@ -472,8 +463,6 @@ children = ( 9C66E00C168CF0AA0015CCDF /* JSONModel.h */, 9C66E00D168CF0AA0015CCDF /* JSONModel.m */, - 9C66E00E168CF0AA0015CCDF /* JSONModelArray.h */, - 9C66E00F168CF0AA0015CCDF /* JSONModelArray.m */, 9C66E010168CF0AA0015CCDF /* JSONModelClassProperty.h */, 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */, 9C66E012168CF0AA0015CCDF /* JSONModelError.h */, @@ -482,15 +471,6 @@ path = JSONModel; sourceTree = ""; }; - 9C66E014168CF0AA0015CCDF /* JSONModelCategories */ = { - isa = PBXGroup; - children = ( - 9C66E015168CF0AA0015CCDF /* NSArray+JSONModel.h */, - 9C66E016168CF0AA0015CCDF /* NSArray+JSONModel.m */, - ); - path = JSONModelCategories; - sourceTree = ""; - }; 9C66E018168CF0AA0015CCDF /* JSONModelNetworking */ = { isa = PBXGroup; children = ( @@ -896,10 +876,8 @@ 1AE9CA901C21F47600B8F5C1 /* RenamedPropertyModel.m in Sources */, 9C55AF0E18903300004EBD8A /* ReposModel.m in Sources */, 9C66E024168CF0AA0015CCDF /* JSONModel.m in Sources */, - 9C66E026168CF0AA0015CCDF /* JSONModelArray.m in Sources */, 9C66E028168CF0AA0015CCDF /* JSONModelClassProperty.m in Sources */, 9C66E02A168CF0AA0015CCDF /* JSONModelError.m in Sources */, - 9C66E02C168CF0AA0015CCDF /* NSArray+JSONModel.m in Sources */, 9C66E02E168CF0AA0015CCDF /* JSONAPI.m in Sources */, 9C66E030168CF0AA0015CCDF /* JSONHTTPClient.m in Sources */, 9C66E032168CF0AA0015CCDF /* JSONModel+networking.m in Sources */, @@ -932,11 +910,9 @@ 9C66DFC1168CEF420015CCDF /* SimpleDataErrorTests.m in Sources */, 9C66DFD0168CEF420015CCDF /* ValidationTestSuite.m in Sources */, 9C66E025168CF0AA0015CCDF /* JSONModel.m in Sources */, - 9C66E027168CF0AA0015CCDF /* JSONModelArray.m in Sources */, 9C66E029168CF0AA0015CCDF /* JSONModelClassProperty.m in Sources */, 9C66E02B168CF0AA0015CCDF /* JSONModelError.m in Sources */, 9CCAFD921901B44300314886 /* SpecialPropertiesTests.m in Sources */, - 9C66E02D168CF0AA0015CCDF /* NSArray+JSONModel.m in Sources */, 9C66E02F168CF0AA0015CCDF /* JSONAPI.m in Sources */, 9C66E031168CF0AA0015CCDF /* JSONHTTPClient.m in Sources */, 9C66E033168CF0AA0015CCDF /* JSONModel+networking.m in Sources */, diff --git a/JSONModelDemo_iOS/KivaFeed.h b/JSONModelDemo_iOS/KivaFeed.h index 18753b14..3e1b3a3f 100644 --- a/JSONModelDemo_iOS/KivaFeed.h +++ b/JSONModelDemo_iOS/KivaFeed.h @@ -11,6 +11,6 @@ @interface KivaFeed : JSONModel -@property (strong, nonatomic) NSArray* loans; +@property (strong, nonatomic) NSArray* loans; @end \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj b/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj index 647866f8..56144e12 100644 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj @@ -14,10 +14,8 @@ 1ACA08F31C33F8FD00234DA6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08F21C33F8FD00234DA6 /* Assets.xcassets */; }; 1ACA09151C33F91900234DA6 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08FB1C33F91900234DA6 /* Info.plist */; }; 1ACA09161C33F91900234DA6 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08FE1C33F91900234DA6 /* JSONModel.m */; }; - 1ACA09171C33F91900234DA6 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09001C33F91900234DA6 /* JSONModelArray.m */; }; 1ACA09181C33F91900234DA6 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09021C33F91900234DA6 /* JSONModelClassProperty.m */; }; 1ACA09191C33F91900234DA6 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09041C33F91900234DA6 /* JSONModelError.m */; }; - 1ACA091A1C33F91900234DA6 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09071C33F91900234DA6 /* NSArray+JSONModel.m */; }; 1ACA091B1C33F91900234DA6 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA090B1C33F91900234DA6 /* JSONAPI.m */; }; 1ACA091C1C33F91900234DA6 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA090D1C33F91900234DA6 /* JSONHTTPClient.m */; }; 1ACA091D1C33F91900234DA6 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA090F1C33F91900234DA6 /* JSONModel+networking.m */; }; @@ -38,14 +36,10 @@ 1ACA08FB1C33F91900234DA6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1ACA08FD1C33F91900234DA6 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; }; 1ACA08FE1C33F91900234DA6 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.m; sourceTree = ""; }; - 1ACA08FF1C33F91900234DA6 /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; }; - 1ACA09001C33F91900234DA6 /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelArray.m; sourceTree = ""; }; 1ACA09011C33F91900234DA6 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; }; 1ACA09021C33F91900234DA6 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; }; 1ACA09031C33F91900234DA6 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; }; 1ACA09041C33F91900234DA6 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; }; - 1ACA09061C33F91900234DA6 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+JSONModel.h"; sourceTree = ""; }; - 1ACA09071C33F91900234DA6 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+JSONModel.m"; sourceTree = ""; }; 1ACA09081C33F91900234DA6 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelLib.h; sourceTree = ""; }; 1ACA090A1C33F91900234DA6 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; }; 1ACA090B1C33F91900234DA6 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; }; @@ -118,7 +112,6 @@ children = ( 1ACA08FB1C33F91900234DA6 /* Info.plist */, 1ACA08FC1C33F91900234DA6 /* JSONModel */, - 1ACA09051C33F91900234DA6 /* JSONModelCategories */, 1ACA09081C33F91900234DA6 /* JSONModelLib.h */, 1ACA09091C33F91900234DA6 /* JSONModelNetworking */, 1ACA09101C33F91900234DA6 /* JSONModelTransformations */, @@ -132,8 +125,6 @@ children = ( 1ACA08FD1C33F91900234DA6 /* JSONModel.h */, 1ACA08FE1C33F91900234DA6 /* JSONModel.m */, - 1ACA08FF1C33F91900234DA6 /* JSONModelArray.h */, - 1ACA09001C33F91900234DA6 /* JSONModelArray.m */, 1ACA09011C33F91900234DA6 /* JSONModelClassProperty.h */, 1ACA09021C33F91900234DA6 /* JSONModelClassProperty.m */, 1ACA09031C33F91900234DA6 /* JSONModelError.h */, @@ -142,15 +133,6 @@ path = JSONModel; sourceTree = ""; }; - 1ACA09051C33F91900234DA6 /* JSONModelCategories */ = { - isa = PBXGroup; - children = ( - 1ACA09061C33F91900234DA6 /* NSArray+JSONModel.h */, - 1ACA09071C33F91900234DA6 /* NSArray+JSONModel.m */, - ); - path = JSONModelCategories; - sourceTree = ""; - }; 1ACA09091C33F91900234DA6 /* JSONModelNetworking */ = { isa = PBXGroup; children = ( @@ -246,7 +228,6 @@ buildActionMask = 2147483647; files = ( 1ACA091C1C33F91900234DA6 /* JSONHTTPClient.m in Sources */, - 1ACA09171C33F91900234DA6 /* JSONModelArray.m in Sources */, 1ACA09191C33F91900234DA6 /* JSONModelError.m in Sources */, 1ACA091B1C33F91900234DA6 /* JSONAPI.m in Sources */, 1ACA091F1C33F91900234DA6 /* JSONValueTransformer.m in Sources */, @@ -254,7 +235,6 @@ 1ACA09161C33F91900234DA6 /* JSONModel.m in Sources */, 1ACA091E1C33F91900234DA6 /* JSONKeyMapper.m in Sources */, 1ACA091D1C33F91900234DA6 /* JSONModel+networking.m in Sources */, - 1ACA091A1C33F91900234DA6 /* NSArray+JSONModel.m in Sources */, 1ACA08EB1C33F8FD00234DA6 /* AppDelegate.m in Sources */, 1ACA08E81C33F8FD00234DA6 /* main.m in Sources */, 1ACA09181C33F91900234DA6 /* JSONModelClassProperty.m in Sources */, diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj b/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj index 31e3d968..8a0c24ce 100644 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj @@ -21,14 +21,10 @@ 1ACA08961C33F84600234DA6 /* ExtensionDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08951C33F84600234DA6 /* ExtensionDelegate.m */; }; 1ACA08C61C33F8CA00234DA6 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */; }; 1ACA08C71C33F8CA00234DA6 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */; }; - 1ACA08C81C33F8CA00234DA6 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AF1C33F8CA00234DA6 /* JSONModelArray.m */; }; - 1ACA08C91C33F8CA00234DA6 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AF1C33F8CA00234DA6 /* JSONModelArray.m */; }; 1ACA08CA1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */; }; 1ACA08CB1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */; }; 1ACA08CC1C33F8CA00234DA6 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */; }; 1ACA08CD1C33F8CA00234DA6 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */; }; - 1ACA08CE1C33F8CA00234DA6 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B61C33F8CA00234DA6 /* NSArray+JSONModel.m */; }; - 1ACA08CF1C33F8CA00234DA6 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B61C33F8CA00234DA6 /* NSArray+JSONModel.m */; }; 1ACA08D01C33F8CA00234DA6 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */; }; 1ACA08D11C33F8CA00234DA6 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */; }; 1ACA08D21C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BC1C33F8CA00234DA6 /* JSONHTTPClient.m */; }; @@ -106,14 +102,10 @@ 1ACA08991C33F84600234DA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1ACA08AC1C33F8CA00234DA6 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; }; 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.m; sourceTree = ""; }; - 1ACA08AE1C33F8CA00234DA6 /* JSONModelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelArray.h; sourceTree = ""; }; - 1ACA08AF1C33F8CA00234DA6 /* JSONModelArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelArray.m; sourceTree = ""; }; 1ACA08B01C33F8CA00234DA6 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; }; 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; }; 1ACA08B21C33F8CA00234DA6 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; }; 1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; }; - 1ACA08B51C33F8CA00234DA6 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+JSONModel.h"; sourceTree = ""; }; - 1ACA08B61C33F8CA00234DA6 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+JSONModel.m"; sourceTree = ""; }; 1ACA08B71C33F8CA00234DA6 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelLib.h; sourceTree = ""; }; 1ACA08B91C33F8CA00234DA6 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; }; 1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; }; @@ -219,7 +211,6 @@ isa = PBXGroup; children = ( 1ACA08AB1C33F8CA00234DA6 /* JSONModel */, - 1ACA08B41C33F8CA00234DA6 /* JSONModelCategories */, 1ACA08B71C33F8CA00234DA6 /* JSONModelLib.h */, 1ACA08B81C33F8CA00234DA6 /* JSONModelNetworking */, 1ACA08BF1C33F8CA00234DA6 /* JSONModelTransformations */, @@ -233,8 +224,6 @@ children = ( 1ACA08AC1C33F8CA00234DA6 /* JSONModel.h */, 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */, - 1ACA08AE1C33F8CA00234DA6 /* JSONModelArray.h */, - 1ACA08AF1C33F8CA00234DA6 /* JSONModelArray.m */, 1ACA08B01C33F8CA00234DA6 /* JSONModelClassProperty.h */, 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */, 1ACA08B21C33F8CA00234DA6 /* JSONModelError.h */, @@ -243,15 +232,6 @@ path = JSONModel; sourceTree = ""; }; - 1ACA08B41C33F8CA00234DA6 /* JSONModelCategories */ = { - isa = PBXGroup; - children = ( - 1ACA08B51C33F8CA00234DA6 /* NSArray+JSONModel.h */, - 1ACA08B61C33F8CA00234DA6 /* NSArray+JSONModel.m */, - ); - path = JSONModelCategories; - sourceTree = ""; - }; 1ACA08B81C33F8CA00234DA6 /* JSONModelNetworking */ = { isa = PBXGroup; children = ( @@ -407,7 +387,6 @@ buildActionMask = 2147483647; files = ( 1ACA08D21C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */, - 1ACA08C81C33F8CA00234DA6 /* JSONModelArray.m in Sources */, 1ACA08CC1C33F8CA00234DA6 /* JSONModelError.m in Sources */, 1ACA08D01C33F8CA00234DA6 /* JSONAPI.m in Sources */, 1ACA08D81C33F8CA00234DA6 /* JSONValueTransformer.m in Sources */, @@ -415,7 +394,6 @@ 1ACA08C61C33F8CA00234DA6 /* JSONModel.m in Sources */, 1ACA08D61C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */, 1ACA08D41C33F8CA00234DA6 /* JSONModel+networking.m in Sources */, - 1ACA08CE1C33F8CA00234DA6 /* NSArray+JSONModel.m in Sources */, 1ACA086E1C33F84500234DA6 /* AppDelegate.m in Sources */, 1ACA086B1C33F84500234DA6 /* main.m in Sources */, 1ACA08CA1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */, @@ -429,10 +407,8 @@ 1ACA08D31C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */, 1ACA08D11C33F8CA00234DA6 /* JSONAPI.m in Sources */, 1ACA08CD1C33F8CA00234DA6 /* JSONModelError.m in Sources */, - 1ACA08CF1C33F8CA00234DA6 /* NSArray+JSONModel.m in Sources */, 1ACA08D71C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */, 1ACA08C71C33F8CA00234DA6 /* JSONModel.m in Sources */, - 1ACA08C91C33F8CA00234DA6 /* JSONModelArray.m in Sources */, 1ACA08CB1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */, 1ACA08D51C33F8CA00234DA6 /* JSONModel+networking.m in Sources */, 1ACA08961C33F84600234DA6 /* ExtensionDelegate.m in Sources */, diff --git a/JSONModelOSX/KivaFeed.h b/JSONModelOSX/KivaFeed.h index 18753b14..3e1b3a3f 100644 --- a/JSONModelOSX/KivaFeed.h +++ b/JSONModelOSX/KivaFeed.h @@ -11,6 +11,6 @@ @interface KivaFeed : JSONModel -@property (strong, nonatomic) NSArray* loans; +@property (strong, nonatomic) NSArray* loans; @end \ No newline at end of file From 03a90f47cb4f79bf8dda05a2c2cc40089179bd18 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 28 Mar 2016 18:13:37 +0100 Subject: [PATCH 068/171] JSONModel no longer supports lazy conversion --- README.md | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/README.md b/README.md index aa99b032..fddeb7da 100644 --- a/README.md +++ b/README.md @@ -403,57 +403,6 @@ Note: the angle brackets after NSArray contain a protocol. This is - -#### Lazy convert collection items from dictionaries to models - - - - - -
-
-{
-  "order_id": 104,
-  "total_price": 103.45,
-  "products" : [
-    {
-      "id": "123",
-      "name": "Product #1",
-      "price": 12.95
-    },
-    {
-      "id": "137",
-      "name": "Product #2",
-      "price": 82.95
-    }
-  ]
-}
-
-
-
-@protocol ProductModel
-@end
-
-@interface ProductModel : JSONModel
-@property (assign, nonatomic) int id;
-@property (strong, nonatomic) NSString* name;
-@property (assign, nonatomic) float price;
-@end
-
-@implementation ProductModel
-@end
-
-@interface OrderModel : JSONModel
-@property (assign, nonatomic) int order_id;
-@property (assign, nonatomic) float total_price;
-@property (strong, nonatomic) NSArray<ProductModel, ConvertOnDemand>* products;
-@end
-
-@implementation OrderModel
-@end
-
-
- #### Using the built-in thin HTTP client ```objective-c From 134644445ee1f169a7b71d8fcf69421603158676 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Wed, 6 Apr 2016 11:29:26 +0200 Subject: [PATCH 069/171] * cocoadocs now automatically generates online docs, no sense to have the instructions in there --- README.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index aa99b032..f8583ce3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Magical Data Modelling Framework for JSON +## Magical Data Modeling Framework for JSON ### Version 1.2.0 @@ -54,12 +54,9 @@ In your project's **Cartfile** add the JSONModel: github "icanzilb/JSONModel" ``` -#### Source code documentation -The source code includes class docs, which you can build yourself and import into Xcode: +#### Docs -1. If you don't already have [appledoc](http://gentlebytes.com/appledoc/) installed, install it with [homebrew](http://brew.sh/) by typing `brew install appledoc`. -2. Install the documentation into Xcode by typing `appledoc .` in the root directory of the repository. -3. Restart Xcode if it's already running. +You can find the generated docs online at: [http://cocoadocs.org/docsets/JSONModel/][http://cocoadocs.org/docsets/JSONModel/] ------------------------------------ Basic usage From 7a64a6897a717668e8e6f2d1e3db2cd316b7f9be Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Wed, 6 Apr 2016 11:30:57 +0200 Subject: [PATCH 070/171] * cocoadocs now automatically generates online docs, no sense to have the instructions in there --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 84e86892..adab32de 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ github "icanzilb/JSONModel" #### Docs -You can find the generated docs online at: [http://cocoadocs.org/docsets/JSONModel/][http://cocoadocs.org/docsets/JSONModel/] +You can find the generated docs online at: [http://cocoadocs.org/docsets/JSONModel/](http://cocoadocs.org/docsets/JSONModel/) ------------------------------------ Basic usage From 5cc6bc630c135ff85c62de04f9d020932adca03e Mon Sep 17 00:00:00 2001 From: Marius Constantinescu Date: Wed, 6 Apr 2016 15:21:40 +0200 Subject: [PATCH 071/171] Fixed CocoaPods spelling https://twitter.com/orta/status/697374357975388160 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index adab32de..1a6ded1f 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Adding JSONModel to your project 2. Copy the JSONModel sub-folder into your Xcode project 3. Link your app to SystemConfiguration.framework -#### or 2) via Cocoa pods +#### or 2) via CocoaPods In your project's **Podfile** add the JSONModel pod: From 24c7b0f752ff81a0cbe0aa88862fa455d340aa13 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Tue, 14 Jun 2016 11:26:23 +0100 Subject: [PATCH 072/171] Deprecate JSON->Model key mapping --- JSONModel/JSONModel/JSONModel.m | 14 ++-- .../JSONModelTransformations/JSONKeyMapper.h | 8 +- .../JSONModelTransformations/JSONKeyMapper.m | 77 ++++--------------- 3 files changed, 26 insertions(+), 73 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 11648279..1953da15 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -222,7 +222,7 @@ -(BOOL)__doesDictionary:(NSDictionary*)dict matchModelWithKeyMapper:(JSONKeyMapp //loop over the required properties list for (JSONModelClassProperty* property in [self __properties__]) { - transformedName = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper importing:YES] : property.name; + transformedName = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper] : property.name; //check if exists and if so, add to incoming keys id value; @@ -262,18 +262,18 @@ -(BOOL)__doesDictionary:(NSDictionary*)dict matchModelWithKeyMapper:(JSONKeyMapp return YES; } --(NSString*)__mapString:(NSString*)string withKeyMapper:(JSONKeyMapper*)keyMapper importing:(BOOL)importing +-(NSString*)__mapString:(NSString*)string withKeyMapper:(JSONKeyMapper*)keyMapper { if (keyMapper) { //custom mapper - NSString* mappedName = [keyMapper convertValue:string isImportingToModel:importing]; + NSString* mappedName = [keyMapper convertValue:string]; if (globalKeyMapper && [mappedName isEqualToString: string]) { - mappedName = [globalKeyMapper convertValue:string isImportingToModel:importing]; + mappedName = [globalKeyMapper convertValue:string]; } string = mappedName; } else if (globalKeyMapper) { //global keymapper - string = [globalKeyMapper convertValue:string isImportingToModel:importing]; + string = [globalKeyMapper convertValue:string]; } return string; @@ -285,7 +285,7 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM for (JSONModelClassProperty* property in [self __properties__]) { //convert key name to model keys, if a mapper is provided - NSString* jsonKeyPath = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper importing:YES] : property.name; + NSString* jsonKeyPath = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper] : property.name; //JMLog(@"keyPath: %@", jsonKeyPath); //general check for data type compliance @@ -948,7 +948,7 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames continue; //fetch key and value - NSString* keyPath = (self.__keyMapper||globalKeyMapper) ? [self __mapString:p.name withKeyMapper:self.__keyMapper importing:YES] : p.name; + NSString* keyPath = (self.__keyMapper||globalKeyMapper) ? [self __mapString:p.name withKeyMapper:self.__keyMapper] : p.name; value = [self valueForKey: p.name]; //JMLog(@"toDictionary[%@]->[%@] = '%@'", p.name, keyPath, value); diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index e022e5bf..60325ff9 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -52,7 +52,7 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); /** @name Name converters */ /** Block, which takes in a JSON key and converts it to the corresponding property name */ -@property (readonly, nonatomic) JSONModelKeyMapBlock JSONToModelKeyBlock; +@property (readonly, nonatomic) JSONModelKeyMapBlock JSONToModelKeyBlock DEPRECATED_ATTRIBUTE; /** Block, which takes in a property name and converts it to the corresponding JSON key name */ @property (readonly, nonatomic) JSONModelKeyMapBlock modelToJSONKeyBlock; @@ -62,7 +62,8 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); * @param importing YES invokes JSONToModelKeyBlock, NO - modelToJSONKeyBlock * @return JSONKeyMapper instance */ --(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing; +-(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing DEPRECATED_MSG_ATTRIBUTE("use convertValue:"); +-(NSString*)convertValue:(NSString*)value; /** @name Creating a key mapper */ @@ -75,7 +76,8 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); * @param toJSON transforms your model property name to a JSON key */ -(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel - modelToJSONBlock:(JSONModelKeyMapBlock)toJSON; + modelToJSONBlock:(JSONModelKeyMapBlock)toJSON DEPRECATED_MSG_ATTRIBUTE("use initWithModelToJSONBlock:"); +-(instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON; /** * Creates a JSONKeyMapper instance, based on the mapping you provide diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index ee107946..61787fb5 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -18,7 +18,6 @@ #import @interface JSONKeyMapper() -@property (nonatomic, strong) NSMutableDictionary *toModelMap; @property (nonatomic, strong) NSMutableDictionary *toJSONMap; @property (nonatomic, assign) OSSpinLock lock; @end @@ -30,7 +29,6 @@ -(instancetype)init self = [super init]; if (self) { //initialization - self.toModelMap = [NSMutableDictionary dictionary]; self.toJSONMap = [NSMutableDictionary dictionary]; } return self; @@ -38,6 +36,11 @@ -(instancetype)init -(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel modelToJSONBlock:(JSONModelKeyMapBlock)toJSON +{ + return [self initWithModelToJSONBlock:toJSON]; +} + +-(instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON { self = [self init]; @@ -45,26 +48,6 @@ -(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel __weak JSONKeyMapper* weakSelf = self; - _JSONToModelKeyBlock = [^NSString* (NSString* keyName) { - - __strong JSONKeyMapper* strongSelf = weakSelf; - - //try to return cached transformed key - if (strongSelf.toModelMap[keyName]) { - return strongSelf.toModelMap[keyName]; - } - - //try to convert the key, and store in the cache - NSString* result = toModel(keyName); - - OSSpinLockLock(&strongSelf->_lock); - strongSelf.toModelMap[keyName] = result; - OSSpinLockUnlock(&strongSelf->_lock); - - return result; - - } copy]; - _modelToJSONKeyBlock = [^NSString* (NSString* keyName) { __strong JSONKeyMapper *strongSelf = weakSelf; @@ -95,14 +78,8 @@ -(instancetype)initWithDictionary:(NSDictionary *)map self = [super init]; if (self) { - NSDictionary *userToModelMap = [map copy]; NSDictionary *userToJSONMap = [self swapKeysAndValuesInDictionary:map]; - _JSONToModelKeyBlock = ^NSString *(NSString *keyName) { - NSString *result = [userToModelMap valueForKeyPath:keyName]; - return result ? result : keyName; - }; - _modelToJSONKeyBlock = ^NSString *(NSString *keyName) { NSString *result = [userToJSONMap valueForKeyPath:keyName]; return result ? result : keyName; @@ -127,24 +104,16 @@ - (NSDictionary *)swapKeysAndValuesInDictionary:(NSDictionary *)dictionary -(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing { - return !importing?_JSONToModelKeyBlock(value):_modelToJSONKeyBlock(value); + return [self convertValue:value]; } -+(instancetype)mapperFromUnderscoreCaseToCamelCase +-(NSString*)convertValue:(NSString*)value { - JSONModelKeyMapBlock toModel = ^ NSString* (NSString* keyName) { - - //bail early if no transformation required - if ([keyName rangeOfString:@"_"].location==NSNotFound) return keyName; - - //derive camel case out of underscore case - NSString* camelCase = [keyName capitalizedString]; - camelCase = [camelCase stringByReplacingOccurrencesOfString:@"_" withString:@""]; - camelCase = [camelCase stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[[camelCase substringToIndex:1] lowercaseString] ]; - - return camelCase; - }; + return _modelToJSONKeyBlock(value); +} ++(instancetype)mapperFromUnderscoreCaseToCamelCase +{ JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) { NSMutableString* result = [NSMutableString stringWithString:keyName]; @@ -179,18 +148,12 @@ +(instancetype)mapperFromUnderscoreCaseToCamelCase return result; }; - return [[self alloc] initWithJSONToModelBlock:toModel - modelToJSONBlock:toJSON]; + return [[self alloc] initWithModelToJSONBlock:toJSON]; } +(instancetype)mapperFromUpperCaseToLowerCase { - JSONModelKeyMapBlock toModel = ^ NSString* (NSString* keyName) { - NSString*lowercaseString = [keyName lowercaseString]; - return lowercaseString; - }; - JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) { NSString *uppercaseString = [keyName uppercaseString]; @@ -198,8 +161,7 @@ +(instancetype)mapperFromUpperCaseToLowerCase return uppercaseString; }; - return [[self alloc] initWithJSONToModelBlock:toModel - modelToJSONBlock:toJSON]; + return [[self alloc] initWithModelToJSONBlock:toJSON]; } @@ -208,19 +170,8 @@ + (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictiona 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; @@ -231,7 +182,7 @@ + (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictiona return baseKeyMapper.modelToJSONKeyBlock(keyName); }; - return [[self alloc] initWithJSONToModelBlock:toModel modelToJSONBlock:toJson]; + return [[self alloc] initWithModelToJSONBlock:toJson]; } @end From c11895bd38ef97083dfdebd7aaae5ec9e7a04376 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Tue, 14 Jun 2016 12:11:34 +0100 Subject: [PATCH 073/171] Update tests to remove use of deprecated method --- .../UnitTests/TestModels/GitHubKeyMapRepoModel.m | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m b/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m index 9921b902..d19b8412 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m +++ b/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m @@ -12,15 +12,7 @@ @implementation GitHubKeyMapRepoModel +(JSONKeyMapper*)keyMapper { - return [[JSONKeyMapper alloc] initWithJSONToModelBlock:^NSString *(NSString *keyName) { - - if ([keyName isEqual:@"description"]) { - return @"__description"; - } else { - return keyName; - } - - } modelToJSONBlock:^NSString *(NSString *keyName) { + return [[JSONKeyMapper alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) { if ([keyName isEqual:@"__description"]) { return @"description"; From 65d95773b4fd0dce7b6f95f8fe0fbc04d37f6570 Mon Sep 17 00:00:00 2001 From: Marin Todorov Date: Wed, 22 Jun 2016 17:28:51 +0200 Subject: [PATCH 074/171] moved pod to org --- JSONModel.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel.podspec b/JSONModel.podspec index 691f1e71..a4b972b1 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.license = { :type => 'MIT', :file => 'LICENSE_jsonmodel.txt' } s.author = { "Marin Todorov" => "touch-code-magazine@underplot.com" } - s.source = { :git => "https://github.com/icanzilb/JSONModel.git", :tag => "1.2.0" } + s.source = { :git => "https://github.com/JSONModel/JSONModel.git", :tag => "1.2.0" } s.ios.deployment_target = '6.0' s.osx.deployment_target = '10.7' From 61edb8b4ffb4ba99ed689cc8b7943e75afed36da Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 22 Jun 2016 15:52:12 +0100 Subject: [PATCH 075/171] Flag all networking support as deprecated --- JSONModel/JSONModelNetworking/JSONAPI.h | 14 +++---- .../JSONModelNetworking/JSONHTTPClient.h | 40 +++++++++---------- .../JSONModel+networking.h | 10 ++--- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index 6a86cf7d..28026f87 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.h @@ -24,7 +24,7 @@ * and facilitates making requests to the same web host. Also features helper * method for making calls to a JSON RPC service */ -@interface JSONAPI : NSObject +DEPRECATED_ATTRIBUTE @interface JSONAPI : NSObject ///////////////////////////////////////////////////////////////////////////////////////////// @@ -33,14 +33,14 @@ * Sets the API url * @param base the API url as a string */ -+(void)setAPIBaseURLWithString:(NSString*)base; ++(void)setAPIBaseURLWithString:(NSString*)base DEPRECATED_ATTRIBUTE; /** * Sets the default content type for the requests/responses * @param ctype The content-type as a string. Some possible types, * depending on the service: application/json, text/json, x-application/javascript, etc. */ -+(void)setContentType:(NSString*)ctype; ++(void)setContentType:(NSString*)ctype DEPRECATED_ATTRIBUTE; ///////////////////////////////////////////////////////////////////////////////////////////// @@ -51,7 +51,7 @@ * @param params the variables to pass to the API * @param completeBlock a JSONObjectBlock block to execute upon completion */ -+(void)getWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock; ++(void)getWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ///////////////////////////////////////////////////////////////////////////////////////////// @@ -62,7 +62,7 @@ * @param params the variables to pass to the API * @param completeBlock a JSONObjectBlock block to execute upon completion */ -+(void)postWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock; ++(void)postWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ///////////////////////////////////////////////////////////////////////////////////////////// @@ -73,7 +73,7 @@ * @param args the list of arguments to pass to the API * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)rpcWithMethodName:(NSString*)method andArguments:(NSArray*)args completion:(JSONObjectBlock)completeBlock; ++(void)rpcWithMethodName:(NSString*)method andArguments:(NSArray*)args completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; /** @name JSON RPC (2.0) request method */ /** @@ -83,7 +83,7 @@ * depending whether you're using named or unnamed parameters * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)rpc2WithMethodName:(NSString*)method andParams:(id)params completion:(JSONObjectBlock)completeBlock; ++(void)rpc2WithMethodName:(NSString*)method andParams:(id)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ///////////////////////////////////////////////////////////////////////////////////////////// diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index 7b2e007a..9d22bd34 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -21,15 +21,15 @@ /** * HTTP Request methods */ -extern NSString* const kHTTPMethodGET; -extern NSString* const kHTTPMethodPOST; +extern NSString* const kHTTPMethodGET DEPRECATED_ATTRIBUTE; +extern NSString* const kHTTPMethodPOST DEPRECATED_ATTRIBUTE; /** * Content-type strings */ -extern NSString* const kContentTypeAutomatic; -extern NSString* const kContentTypeJSON; -extern NSString* const kContentTypeWWWEncoded; +extern NSString* const kContentTypeAutomatic DEPRECATED_ATTRIBUTE; +extern NSString* const kContentTypeJSON DEPRECATED_ATTRIBUTE; +extern NSString* const kContentTypeWWWEncoded DEPRECATED_ATTRIBUTE; /** * A block type to handle incoming JSON object and an error. @@ -39,7 +39,7 @@ extern NSString* const kContentTypeWWWEncoded; * @param json object derived from a JSON string * @param err JSONModelError or nil */ -typedef void (^JSONObjectBlock)(id json, JSONModelError* err); +typedef void (^JSONObjectBlock)(id json, JSONModelError* err) DEPRECATED_ATTRIBUTE; ///////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - configuration methods @@ -48,7 +48,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * @discussion A very thin HTTP client that can do GET and POST HTTP requests. * It fetches only JSON data and also deserializes it using NSJSONSerialization. */ -@interface JSONHTTPClient : NSObject +DEPRECATED_ATTRIBUTE @interface JSONHTTPClient : NSObject ///////////////////////////////////////////////////////////////////////////////////////////// @@ -63,27 +63,27 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * headers[@"APIToken"] = @"MySecretTokenValue"; * */ -+(NSMutableDictionary*)requestHeaders; ++(NSMutableDictionary*)requestHeaders DEPRECATED_ATTRIBUTE; /** * Sets the default encoding of the request body. * See NSStringEncoding for a list of supported encodings * @param encoding text encoding constant */ -+(void)setDefaultTextEncoding:(NSStringEncoding)encoding; ++(void)setDefaultTextEncoding:(NSStringEncoding)encoding DEPRECATED_ATTRIBUTE; /** * Sets the policies for caching HTTP data * See NSURLRequestCachePolicy for a list of the pre-defined policies * @param policy the caching policy */ -+(void)setCachingPolicy:(NSURLRequestCachePolicy)policy; ++(void)setCachingPolicy:(NSURLRequestCachePolicy)policy DEPRECATED_ATTRIBUTE; /** * Sets the timeout for network calls * @param seconds the amount of seconds to wait before considering the call failed */ -+(void)setTimeoutInSeconds:(int)seconds; ++(void)setTimeoutInSeconds:(int)seconds DEPRECATED_ATTRIBUTE; /** * A method to set the default content type of the request body @@ -91,7 +91,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * which checks the body request and decides between "application/json" * and "application/x-www-form-urlencoded" */ -+(void)setRequestContentType:(NSString*)contentTypeString; ++(void)setRequestContentType:(NSString*)contentTypeString DEPRECATED_ATTRIBUTE; ///////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - GET asynchronous JSON calls @@ -102,7 +102,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * @param urlString the URL as a string * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)getJSONFromURLWithString:(NSString*)urlString completion:(JSONObjectBlock)completeBlock; ++(void)getJSONFromURLWithString:(NSString*)urlString completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; /** * Makes GET request to the given URL address and fetches a JSON response. Sends the params as a query string variables. @@ -110,7 +110,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * @param params a dictionary of key / value pairs to be send as variables to the request * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)getJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock; ++(void)getJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; /** * Makes a request to the given URL address and fetches a JSON response. @@ -120,7 +120,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * @param bodyString the body of the POST request as a string * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock; ++(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; /** * Makes a request to the given URL address and fetches a JSON response. @@ -131,7 +131,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * @param headers the headers to set on the request - overrides those in +requestHeaders * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock; ++(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; /** * Makes a request to the given URL address and fetches a JSON response. @@ -142,7 +142,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * @param headers the headers to set on the request - overrides those in +requestHeaders * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary *)params orBodyData:(NSData*)bodyData headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock; ++(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary *)params orBodyData:(NSData*)bodyData headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ///////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - POST asynchronous JSON calls @@ -153,7 +153,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * @param params a dictionary of key / value pairs to be send as variables to the request * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)postJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock; ++(void)postJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; /** * Makes POST request to the given URL address and fetches a JSON response. Sends the bodyString param as the POST request body. @@ -161,7 +161,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * @param bodyString the body of the POST request as a string * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)postJSONFromURLWithString:(NSString*)urlString bodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock; ++(void)postJSONFromURLWithString:(NSString*)urlString bodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; /** * Makes POST request to the given URL address and fetches a JSON response. Sends the bodyString param as the POST request body. @@ -169,7 +169,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err); * @param bodyData the body of the POST request as an NSData object * @param completeBlock JSONObjectBlock to execute upon completion */ -+(void)postJSONFromURLWithString:(NSString*)urlString bodyData:(NSData*)bodyData completion:(JSONObjectBlock)completeBlock; ++(void)postJSONFromURLWithString:(NSString*)urlString bodyData:(NSData*)bodyData completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; @end diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index 9529d770..041e2134 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -17,7 +17,7 @@ #import "JSONModel.h" #import "JSONHTTPClient.h" -typedef void (^JSONModelBlock)(id model, JSONModelError* err); +typedef void (^JSONModelBlock)(id model, JSONModelError* err) DEPRECATED_ATTRIBUTE; /** * The JSONModel(networking) class category adds networking to JSONModel. @@ -27,7 +27,7 @@ typedef void (^JSONModelBlock)(id model, JSONModelError* err); */ @interface JSONModel(Networking) -@property (assign, nonatomic) BOOL isLoading; +@property (assign, nonatomic) BOOL isLoading DEPRECATED_ATTRIBUTE; /** @name Asynchronously create a model over the network */ /** * Asynchronously create a model over the network. Create a new model instance and initialize it with the JSON fetched from the given URL @@ -35,7 +35,7 @@ typedef void (^JSONModelBlock)(id model, JSONModelError* err); * @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 */ --(instancetype)initFromURLWithString:(NSString *)urlString completion:(JSONModelBlock)completeBlock; +-(instancetype)initFromURLWithString:(NSString *)urlString completion:(JSONModelBlock)completeBlock DEPRECATED_ATTRIBUTE; /** * Asynchronously gets the contents of a URL and constructs a JSONModel object from the response. @@ -47,7 +47,7 @@ typedef void (^JSONModelBlock)(id model, JSONModelError* err); * The first parameter is the initialized model (of the same JSONModel sub-class as the receiver) or nil if there was an error; * The second parameter is the initialization error, if any. */ -+ (void)getModelFromURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock; ++ (void)getModelFromURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock DEPRECATED_ATTRIBUTE; /** * Asynchronously posts a JSONModel object (as JSON) to a URL and constructs a JSONModel object from the response. @@ -60,7 +60,7 @@ typedef void (^JSONModelBlock)(id model, JSONModelError* err); * The first parameter is the initialized model (of the same JSONModel sub-class as the receiver) or nil if there was an error; * The second parameter is the initialization error, if any. */ -+ (void)postModel:(JSONModel*)post toURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock; ++ (void)postModel:(JSONModel*)post toURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock DEPRECATED_ATTRIBUTE; @end From 6e26e05c3287eefafb9ac9bbab6fe5f1d8581197 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 22 Jun 2016 15:54:07 +0100 Subject: [PATCH 076/171] Ignore networking deprecation warnings in tests --- JSONModel/JSONModelNetworking/JSONAPI.m | 7 +++++++ JSONModel/JSONModelNetworking/JSONHTTPClient.m | 4 ++++ JSONModelDemoTests/UnitTests/HTTPClientSuite.m | 2 ++ JSONModelDemoTests/UnitTests/InitFromWebTests.m | 2 ++ JSONModelDemoTests/UnitTests/JSONAPITests.m | 2 ++ JSONModelDemo_iOS/KivaViewController.m | 3 +++ JSONModelDemo_iOS/KivaViewControllerNetworking.m | 3 +++ JSONModelOSX/ViewController.m | 6 ++++++ 8 files changed, 29 insertions(+) diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index a05b44dd..538ad4e9 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -25,7 +25,11 @@ @interface JSONAPIRPCErrorModel: JSONModel #pragma mark - static variables +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" static JSONAPI* sharedInstance = nil; +#pragma GCC diagnostic pop + static long jsonRpcId = 0; #pragma mark - JSONAPI() private interface @@ -44,7 +48,10 @@ +(void)initialize { static dispatch_once_t once; dispatch_once(&once, ^{ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" sharedInstance = [[JSONAPI alloc] init]; +#pragma GCC diagnostic pop }); } diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index b3499a52..0900bcde 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -55,7 +55,11 @@ +(void)initialize static dispatch_once_t once; dispatch_once(&once, ^{ requestHeaders = [NSMutableDictionary dictionary]; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" requestContentType = kContentTypeAutomatic; +#pragma GCC diagnostic pop }); } diff --git a/JSONModelDemoTests/UnitTests/HTTPClientSuite.m b/JSONModelDemoTests/UnitTests/HTTPClientSuite.m index 08e57f26..7eb864e4 100644 --- a/JSONModelDemoTests/UnitTests/HTTPClientSuite.m +++ b/JSONModelDemoTests/UnitTests/HTTPClientSuite.m @@ -15,6 +15,8 @@ #import "MockNSURLConnection.h" #import "MTTestSemaphor.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + @implementation HTTPClientSuite { NSString* jsonContents; diff --git a/JSONModelDemoTests/UnitTests/InitFromWebTests.m b/JSONModelDemoTests/UnitTests/InitFromWebTests.m index 05d351f5..4fdebafc 100644 --- a/JSONModelDemoTests/UnitTests/InitFromWebTests.m +++ b/JSONModelDemoTests/UnitTests/InitFromWebTests.m @@ -13,6 +13,8 @@ #import "NestedModel.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + @implementation InitFromWebTests { NSString* jsonContents; diff --git a/JSONModelDemoTests/UnitTests/JSONAPITests.m b/JSONModelDemoTests/UnitTests/JSONAPITests.m index 64f86fb1..10f8a7c8 100644 --- a/JSONModelDemoTests/UnitTests/JSONAPITests.m +++ b/JSONModelDemoTests/UnitTests/JSONAPITests.m @@ -13,6 +13,8 @@ #import "JSONModelLib.h" #import "RpcRequestModel.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + @implementation JSONAPITests -(void)testBaseURL diff --git a/JSONModelDemo_iOS/KivaViewController.m b/JSONModelDemo_iOS/KivaViewController.m index bfb13399..58d12b1c 100644 --- a/JSONModelDemo_iOS/KivaViewController.m +++ b/JSONModelDemo_iOS/KivaViewController.m @@ -30,7 +30,10 @@ -(void)viewDidAppear:(BOOL)animated self.title = @"Kiva.org latest loans"; [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" [JSONHTTPClient getJSONFromURLWithString:@"https://api.kivaws.org/v1/loans/search.json" +#pragma GCC diagnostic pop params:@{@"status":@"fundraising"} completion:^(NSDictionary *json, JSONModelError *err) { diff --git a/JSONModelDemo_iOS/KivaViewControllerNetworking.m b/JSONModelDemo_iOS/KivaViewControllerNetworking.m index 2af57f9a..d736532d 100644 --- a/JSONModelDemo_iOS/KivaViewControllerNetworking.m +++ b/JSONModelDemo_iOS/KivaViewControllerNetworking.m @@ -29,7 +29,10 @@ -(void)viewDidAppear:(BOOL)animated [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" feed = [[KivaFeed alloc] initFromURLWithString:@"http://api.kivaws.org/v1/loans/search.json?status=fundraising" +#pragma GCC diagnostic pop completion:^(JSONModel *model, JSONModelError* e) { [HUD hideUIBlockingIndicator]; diff --git a/JSONModelOSX/ViewController.m b/JSONModelOSX/ViewController.m index 3db1f4f3..636b9132 100644 --- a/JSONModelOSX/ViewController.m +++ b/JSONModelOSX/ViewController.m @@ -131,7 +131,10 @@ -(IBAction)actionKiva:(id)sender currentService = kServiceKiva; [self setLoaderVisible:YES]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" kiva = [[KivaFeed alloc] initFromURLWithString:@"https://api.kivaws.org/v1/loans/search.json?status=fundraising" +#pragma GCC diagnostic pop completion:^(JSONModel *model, JSONModelError *e) { [table reloadData]; @@ -150,7 +153,10 @@ -(IBAction)actionGithub:(id)sender currentService = kServiceGithub; [self setLoaderVisible:YES]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" user = [[GitHubUserModel alloc] initFromURLWithString:@"https://api.github.com/users/icanzilb" +#pragma GCC diagnostic pop completion:^(JSONModel *model, JSONModelError *e) { items = @[user.login, user.html_url, user.company, user.name, user.blog]; From 0ceb62e03cf95a01ce2be0899d99fba5baaa4a13 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 22 Jun 2016 16:37:38 +0100 Subject: [PATCH 077/171] Deprecate global key mapper --- JSONModel/JSONModel/JSONModel.h | 2 +- JSONModelDemoTests/UnitTests/KeyMappingTests.m | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 1525c47a..2fab4c18 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -295,7 +295,7 @@ __attribute__ ((deprecated)) * * Lookup JSONKeyMapper docs for more details. */ -+(void)setGlobalKeyMapper:(JSONKeyMapper*)globalKeyMapper; ++(void)setGlobalKeyMapper:(JSONKeyMapper*)globalKeyMapper DEPRECATED_MSG_ATTRIBUTE("override +keyMapper in a base model class instead"); /** * Indicates whether the property with the given name is Optional. diff --git a/JSONModelDemoTests/UnitTests/KeyMappingTests.m b/JSONModelDemoTests/UnitTests/KeyMappingTests.m index 262e01aa..b8e19393 100644 --- a/JSONModelDemoTests/UnitTests/KeyMappingTests.m +++ b/JSONModelDemoTests/UnitTests/KeyMappingTests.m @@ -14,6 +14,8 @@ #import "ModelForUpperCaseMapper.h" #import "RenamedPropertyModel.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + #pragma mark - TestModel class @interface TestModel: JSONModel From 5bcbbbbf5a251b89c4f118d211baa39ec1e94121 Mon Sep 17 00:00:00 2001 From: Esteban Torres Date: Wed, 22 Jun 2016 10:55:04 -0600 Subject: [PATCH 078/171] Replaced icanzilb for JSONModel (#501) * Replaced icanzilb for JSONModel References to old `icanzilb` repo were changed to `JSONModel` --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1a6ded1f..32e8c293 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Adding JSONModel to your project #### Get it as: 1) source files -1. Download the JSONModel repository as a [zip file](https://github.com/icanzilb/JSONModel/archive/master.zip) or clone it +1. Download the JSONModel repository as a [zip file](https://github.com/JSONModel/JSONModel/archive/master.zip) or clone it 2. Copy the JSONModel sub-folder into your Xcode project 3. Link your app to SystemConfiguration.framework @@ -51,7 +51,7 @@ If you want to read more about CocoaPods, have a look at [this short tutorial](h In your project's **Cartfile** add the JSONModel: ```ruby -github "icanzilb/JSONModel" +github "JSONModel/JSONModel" ``` #### Docs @@ -521,9 +521,9 @@ Misc Author: [Marin Todorov](http://www.touch-code-magazine.com) Contributors: Christian Hoffmann, Mark Joslin, Julien Vignali, Symvaro GmbH, BB9z. -Also everyone who did successful [pull requests](https://github.com/icanzilb/JSONModel/graphs/contributors). +Also everyone who did successful [pull requests](https://github.com/JSONModel/JSONModel/graphs/contributors). -Change log : [https://github.com/icanzilb/JSONModel/blob/master/Changelog.md](https://github.com/icanzilb/JSONModel/blob/master/Changelog.md) +Change log : [https://github.com/JSONModel/JSONModel/blob/master/Changelog.md](https://github.com/JSONModel/JSONModel/blob/master/Changelog.md) Utility to generate JSONModel classes from JSON data: https://github.com/dofork/json2object From ccb636c918db07ad7f488643598d3ccb6ca248ab Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 22 Jun 2016 18:00:43 +0100 Subject: [PATCH 079/171] Update other references to old repo url --- .../project.xcworkspace/xcshareddata/JSONModel.xccheckout | 4 ++-- JSONModel/JSONModelTransformations/JSONValueTransformer.m | 4 ++-- JSONModelDemoTests/UnitTests/ArrayTests.m | 4 ++-- JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m | 4 ++-- JSONModelDemoTests/UnitTests/HTTPClientSuite.m | 4 ++-- JSONModelDemoTests/UnitTests/KeyMappingTests.m | 4 ++-- JSONModelDemoTests/UnitTests/SpecialValuesTests.m | 2 +- .../xcshareddata/JSONModelDemos.xccheckout | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout b/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout index 03f0a1f3..1b5b23d5 100644 --- a/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout +++ b/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout @@ -11,7 +11,7 @@ IDESourceControlProjectOriginsDictionary 2454A7C0A4BC2A09472718EB55354F320600B245 - github.com:icanzilb/JSONModel.git + github.com:JSONModel/JSONModel.git IDESourceControlProjectPath JSONModel.xcodeproj @@ -21,7 +21,7 @@ ../.. IDESourceControlProjectURL - github.com:icanzilb/JSONModel.git + github.com:JSONModel/JSONModel.git IDESourceControlProjectVersion 111 IDESourceControlProjectWCCIdentifier diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 61aff8d8..699eb829 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -183,7 +183,7 @@ -(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number -(NSURL*)NSURLFromNSString:(NSString*)string { // do not change this behavior - there are other ways of overriding it - // see: https://github.com/icanzilb/JSONModel/pull/119 + // see: https://github.com/JSONModel/JSONModel/pull/119 return [NSURL URLWithString:string]; } @@ -240,7 +240,7 @@ - (id)JSONObjectFromNSTimeZone:(NSTimeZone *)timeZone { } #pragma mark - hidden transform for empty dictionaries -//https://github.com/icanzilb/JSONModel/issues/163 +//https://github.com/JSONModel/JSONModel/issues/163 -(NSDictionary*)__NSDictionaryFromNSArray:(NSArray*)array { if (array.count==0) return @{}; diff --git a/JSONModelDemoTests/UnitTests/ArrayTests.m b/JSONModelDemoTests/UnitTests/ArrayTests.m index 0b8e7e08..31296d12 100644 --- a/JSONModelDemoTests/UnitTests/ArrayTests.m +++ b/JSONModelDemoTests/UnitTests/ArrayTests.m @@ -69,7 +69,7 @@ -(void)testFirstObject } /* - * https://github.com/icanzilb/JSONModel/pull/14 + * https://github.com/JSONModel/JSONModel/pull/14 */ -(void)testArrayReverseTransformGitHubIssue_14 { @@ -81,7 +81,7 @@ -(void)testArrayReverseTransformGitHubIssue_14 } /* - * https://github.com/icanzilb/JSONModel/issues/15 + * https://github.com/JSONModel/JSONModel/issues/15 */ -(void)testArrayReverseTransformGitHubIssue_15 { diff --git a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m index 35fd06b6..1f3b774d 100644 --- a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m +++ b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m @@ -63,11 +63,11 @@ -(void)testConversions XCTAssertTrue((long)[b.importantEvent timeIntervalSince1970] == 1353916801, @"importantEvent value was not read properly"); //test for a valid URL - //https://github.com/icanzilb/JSONModel/pull/60 + //https://github.com/JSONModel/JSONModel/pull/60 XCTAssertNotNil(b.websiteURL, @"URL parsing did return nil"); XCTAssertNotNil(b.websiteURL.query, @"key1=test"); - // see: https://github.com/icanzilb/JSONModel/pull/119 + // see: https://github.com/JSONModel/JSONModel/pull/119 XCTAssertEqualObjects(b.websiteURL.absoluteString, @"http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test&q=search%20terms"); XCTAssertNotNil(b.timeZone, @"Time zone parsing did return nil"); diff --git a/JSONModelDemoTests/UnitTests/HTTPClientSuite.m b/JSONModelDemoTests/UnitTests/HTTPClientSuite.m index 7eb864e4..22ed9bd5 100644 --- a/JSONModelDemoTests/UnitTests/HTTPClientSuite.m +++ b/JSONModelDemoTests/UnitTests/HTTPClientSuite.m @@ -363,7 +363,7 @@ -(void)testPostJSONWithError [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; } -//https://github.com/icanzilb/JSONModel/issues/58 +//https://github.com/JSONModel/JSONModel/issues/58 -(void)testNumberQueryParams { NSString* jsonURLString = @"http://localhost/test.json?testGetJSONFromURLWithParamsNumber"; @@ -396,7 +396,7 @@ -(void)testNumberQueryParams } -//https://github.com/icanzilb/JSONModel/issues/59 +//https://github.com/JSONModel/JSONModel/issues/59 -(void)testHttpStatusCodes { //check if the header is sent along the http request diff --git a/JSONModelDemoTests/UnitTests/KeyMappingTests.m b/JSONModelDemoTests/UnitTests/KeyMappingTests.m index b8e19393..7177f8c1 100644 --- a/JSONModelDemoTests/UnitTests/KeyMappingTests.m +++ b/JSONModelDemoTests/UnitTests/KeyMappingTests.m @@ -222,7 +222,7 @@ -(void)testGlobalKeyMapperImportAndExport [JSONModel setGlobalKeyMapper:nil]; } -//https://github.com/icanzilb/JSONModel/issues/132 +//https://github.com/JSONModel/JSONModel/issues/132 -(void)testAtNameProperty { AtNameModel* at = [[AtNameModel alloc] initWithString:@"{\"@type\":157}" error:nil]; @@ -254,7 +254,7 @@ -(void)testMergingData [JSONModel setGlobalKeyMapper:nil]; } -//https://github.com/icanzilb/JSONModel/issues/180 +//https://github.com/JSONModel/JSONModel/issues/180 -(void)testUsingBothGlobalAndCustomMappers { //input dictionary for TestModel diff --git a/JSONModelDemoTests/UnitTests/SpecialValuesTests.m b/JSONModelDemoTests/UnitTests/SpecialValuesTests.m index 036f0785..99bf76b4 100644 --- a/JSONModelDemoTests/UnitTests/SpecialValuesTests.m +++ b/JSONModelDemoTests/UnitTests/SpecialValuesTests.m @@ -38,7 +38,7 @@ - (void)setUp { XCTAssertNotNil(_model, @"Could not load the test data file."); } -// tests: https://github.com/icanzilb/JSONModel/issues/460 +// tests: https://github.com/JSONModel/JSONModel/issues/460 - (void)testExample { XCTAssertTrue([_model.name isEqualToString:@"FIRST_SECOND"]); } diff --git a/JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout b/JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout index c4f47edf..240de767 100644 --- a/JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout +++ b/JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout @@ -11,7 +11,7 @@ IDESourceControlProjectOriginsDictionary 2454A7C0A4BC2A09472718EB55354F320600B245 - https://github.com/icanzilb/JSONModel.git + https://github.com/JSONModel/JSONModel.git IDESourceControlProjectPath JSONModelDemos.xcworkspace @@ -21,7 +21,7 @@ .. IDESourceControlProjectURL - https://github.com/icanzilb/JSONModel.git + https://github.com/JSONModel/JSONModel.git IDESourceControlProjectVersion 111 IDESourceControlProjectWCCIdentifier From 650f887ede65d64850df63bf5e6011e613638320 Mon Sep 17 00:00:00 2001 From: Cail Borrell Date: Wed, 22 Jun 2016 19:14:52 +0200 Subject: [PATCH 080/171] Added custom module map file that includes the umbrella header JSONModelLib.h (#482) --- JSONModel.xcodeproj/project.pbxproj | 2 ++ module.modulemap | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 module.modulemap diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index 58eadc7c..f7d0daf3 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -330,6 +330,7 @@ INFOPLIST_FILE = JSONModel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "$(PROJECT_DIR)/module.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -346,6 +347,7 @@ INFOPLIST_FILE = JSONModel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "$(PROJECT_DIR)/module.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/module.modulemap b/module.modulemap new file mode 100644 index 00000000..67dbc70d --- /dev/null +++ b/module.modulemap @@ -0,0 +1,6 @@ +framework module JSONModel { + umbrella header "JSONModelLib.h" + + export * + module * { export * } +} From 9981efd08a126c41d016762fb4922dc19e0fbbb1 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 22 Jun 2016 18:40:28 +0100 Subject: [PATCH 081/171] Consistent style for deprecations - top of the file with brief comment - no documentation --- JSONModel/JSONModel/JSONModel.h | 21 +-- JSONModel/JSONModelNetworking/JSONAPI.h | 77 +------- .../JSONModelNetworking/JSONHTTPClient.h | 164 ++---------------- .../JSONModel+networking.h | 46 +---- .../JSONModelTransformations/JSONKeyMapper.h | 12 +- 5 files changed, 39 insertions(+), 281 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 2fab4c18..df5e755b 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -66,8 +66,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) @interface NSObject(JSONModelPropertyCompatibility) @end -// no longer used -__attribute__ ((deprecated)) +DEPRECATED_ATTRIBUTE @protocol ConvertOnDemand @end @@ -137,6 +136,11 @@ __attribute__ ((deprecated)) */ @interface JSONModel : NSObject +// deprecated ++ (NSMutableArray *)arrayOfModelsFromDictionaries:(NSArray *)array DEPRECATED_MSG_ATTRIBUTE("use arrayOfModelsFromDictionaries:error:"); ++ (void)setGlobalKeyMapper:(JSONKeyMapper *)globalKeyMapper DEPRECATED_MSG_ATTRIBUTE("override +keyMapper in a base model class instead"); +- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping DEPRECATED_MSG_ATTRIBUTE("use mergeFromDictionary:useKeyMapping:error:"); + /** @name Creating and initializing models */ /** @@ -218,7 +222,6 @@ __attribute__ ((deprecated)) * @exception JSONModelInvalidDataException thrown when the input data does not include all required keys * @see arrayOfDictionariesFromModels: */ - +(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; @@ -286,17 +289,6 @@ __attribute__ ((deprecated)) */ +(JSONKeyMapper*)keyMapper; -/** - * 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 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. - */ -+(void)setGlobalKeyMapper:(JSONKeyMapper*)globalKeyMapper DEPRECATED_MSG_ATTRIBUTE("override +keyMapper in a base model class instead"); - /** * Indicates whether the property with the given name is Optional. * To have a model with all of its properties being Optional just return YES. @@ -335,7 +327,6 @@ __attribute__ ((deprecated)) * @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 __attribute__((deprecated("use mergeFromDictionary:useKeyMapping:error:"))); - (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error; @end diff --git a/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index 28026f87..96ffdde7 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.h @@ -13,78 +13,17 @@ // 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 "JSONHTTPClient.h" -///////////////////////////////////////////////////////////////////////////////////////////// - -/** - * @discussion Class for working with JSON APIs. It builds upon the JSONHTTPClient class - * and facilitates making requests to the same web host. Also features helper - * method for making calls to a JSON RPC service - */ -DEPRECATED_ATTRIBUTE @interface JSONAPI : NSObject - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** @name Configuring the API */ -/** - * Sets the API url - * @param base the API url as a string - */ -+(void)setAPIBaseURLWithString:(NSString*)base DEPRECATED_ATTRIBUTE; - -/** - * Sets the default content type for the requests/responses - * @param ctype The content-type as a string. Some possible types, - * depending on the service: application/json, text/json, x-application/javascript, etc. - */ -+(void)setContentType:(NSString*)ctype DEPRECATED_ATTRIBUTE; - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** @name Making GET API requests */ -/** - * 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 - */ -+(void)getWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** @name Making POST API requests */ -/** - * Makes a POST 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 - */ -+(void)postWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** @name JSON RPC methods */ -/** - * 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 - */ -+(void)rpcWithMethodName:(NSString*)method andArguments:(NSArray*)args completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -/** @name JSON RPC (2.0) request method */ -/** - * 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 - * @param completeBlock JSONObjectBlock to execute upon completion - */ -+(void)rpc2WithMethodName:(NSString*)method andParams:(id)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; +DEPRECATED_ATTRIBUTE +@interface JSONAPI : NSObject -///////////////////////////////////////////////////////////////////////////////////////////// ++ (void)setAPIBaseURLWithString:(NSString *)base DEPRECATED_ATTRIBUTE; ++ (void)setContentType:(NSString *)ctype DEPRECATED_ATTRIBUTE; ++ (void)getWithPath:(NSString *)path andParams:(NSDictionary *)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)postWithPath:(NSString *)path andParams:(NSDictionary *)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)rpcWithMethodName:(NSString *)method andArguments:(NSArray *)args completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)rpc2WithMethodName:(NSString *)method andParams:(id)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; @end diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index 9d22bd34..f4745c82 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -13,163 +13,31 @@ // 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 "JSONModel.h" -#pragma mark - definitions - -/** - * HTTP Request methods - */ extern NSString* const kHTTPMethodGET DEPRECATED_ATTRIBUTE; extern NSString* const kHTTPMethodPOST DEPRECATED_ATTRIBUTE; - -/** - * Content-type strings - */ extern NSString* const kContentTypeAutomatic DEPRECATED_ATTRIBUTE; extern NSString* const kContentTypeJSON DEPRECATED_ATTRIBUTE; extern NSString* const kContentTypeWWWEncoded DEPRECATED_ATTRIBUTE; -/** - * A block type to handle incoming JSON object and an error. - * 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 - * @param err JSONModelError or nil - */ typedef void (^JSONObjectBlock)(id json, JSONModelError* err) DEPRECATED_ATTRIBUTE; -///////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - configuration methods - -/** - * @discussion A very thin HTTP client that can do GET and POST HTTP requests. - * It fetches only JSON data and also deserializes it using NSJSONSerialization. - */ -DEPRECATED_ATTRIBUTE @interface JSONHTTPClient : NSObject - -///////////////////////////////////////////////////////////////////////////////////////////// - - -/** @name HTTP Client configuration */ -/** - * 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: - *
- * NSMutableDictionary* headers = [JSONHTTPClient requestHeaders];
- * headers[@"APIToken"] = @"MySecretTokenValue";
- * 
- */ -+(NSMutableDictionary*)requestHeaders DEPRECATED_ATTRIBUTE; - -/** - * Sets the default encoding of the request body. - * See NSStringEncoding for a list of supported encodings - * @param encoding text encoding constant - */ -+(void)setDefaultTextEncoding:(NSStringEncoding)encoding DEPRECATED_ATTRIBUTE; - -/** - * Sets the policies for caching HTTP data - * See NSURLRequestCachePolicy for a list of the pre-defined policies - * @param policy the caching policy - */ -+(void)setCachingPolicy:(NSURLRequestCachePolicy)policy DEPRECATED_ATTRIBUTE; - -/** - * Sets the timeout for network calls - * @param seconds the amount of seconds to wait before considering the call failed - */ -+(void)setTimeoutInSeconds:(int)seconds DEPRECATED_ATTRIBUTE; - -/** - * 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" - */ -+(void)setRequestContentType:(NSString*)contentTypeString DEPRECATED_ATTRIBUTE; - -///////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - GET asynchronous JSON calls - -/** @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 - * @param completeBlock JSONObjectBlock to execute upon completion - */ -+(void)getJSONFromURLWithString:(NSString*)urlString completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -/** - * Makes GET request to the given URL address and fetches a JSON response. Sends the params as a query string variables. - * @param urlString the URL as a string - * @param params a dictionary of key / value pairs to be send as variables to the request - * @param completeBlock JSONObjectBlock to execute upon completion - */ -+(void)getJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -/** - * Makes a request to the given URL address and fetches a JSON response. - * @param urlString the URL as a string - * @param method the method of the request as a string - * @param params a dictionary of key / value pairs to be send as variables to the request - * @param bodyString the body of the POST request as a string - * @param completeBlock JSONObjectBlock to execute upon completion - */ -+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -/** - * Makes a request to the given URL address and fetches a JSON response. - * @param urlString the URL as a string - * @param method the method of the request as a string - * @param params a dictionary of key / value pairs to be send as variables to the request - * @param bodyString the body of the POST request as a string - * @param headers the headers to set on the request - overrides those in +requestHeaders - * @param completeBlock JSONObjectBlock to execute upon completion - */ -+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -/** - * Makes a request to the given URL address and fetches a JSON response. - * @param urlString the URL as a string - * @param method the method of the request as a string - * @param params a dictionary of key / value pairs to be send as variables to the request - * @param bodyData the body of the POST request as raw binary data - * @param headers the headers to set on the request - overrides those in +requestHeaders - * @param completeBlock JSONObjectBlock to execute upon completion - */ -+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary *)params orBodyData:(NSData*)bodyData headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -///////////////////////////////////////////////////////////////////////////////////////////// -#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. - * @param urlString the URL as a string - * @param params a dictionary of key / value pairs to be send as variables to the request - * @param completeBlock JSONObjectBlock to execute upon completion - */ -+(void)postJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -/** - * Makes POST request to the given URL address and fetches a JSON response. Sends the bodyString param as the POST request body. - * @param urlString the URL as a string - * @param bodyString the body of the POST request as a string - * @param completeBlock JSONObjectBlock to execute upon completion - */ -+(void)postJSONFromURLWithString:(NSString*)urlString bodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - -/** - * Makes POST request to the given URL address and fetches a JSON response. Sends the bodyString param as the POST request body. - * @param urlString the URL as a string - * @param bodyData the body of the POST request as an NSData object - * @param completeBlock JSONObjectBlock to execute upon completion - */ -+(void)postJSONFromURLWithString:(NSString*)urlString bodyData:(NSData*)bodyData completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; - +DEPRECATED_ATTRIBUTE +@interface JSONHTTPClient : NSObject + ++ (NSMutableDictionary *)requestHeaders DEPRECATED_ATTRIBUTE; ++ (void)setDefaultTextEncoding:(NSStringEncoding)encoding DEPRECATED_ATTRIBUTE; ++ (void)setCachingPolicy:(NSURLRequestCachePolicy)policy DEPRECATED_ATTRIBUTE; ++ (void)setTimeoutInSeconds:(int)seconds DEPRECATED_ATTRIBUTE; ++ (void)setRequestContentType:(NSString *)contentTypeString DEPRECATED_ATTRIBUTE; ++ (void)getJSONFromURLWithString:(NSString *)urlString completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)getJSONFromURLWithString:(NSString *)urlString params:(NSDictionary *)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)JSONFromURLWithString:(NSString *)urlString method:(NSString *)method params:(NSDictionary *)params orBodyString:(NSString *)bodyString completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)JSONFromURLWithString:(NSString *)urlString method:(NSString *)method params:(NSDictionary *)params orBodyString:(NSString *)bodyString headers:(NSDictionary *)headers completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)JSONFromURLWithString:(NSString *)urlString method:(NSString *)method params:(NSDictionary *)params orBodyData:(NSData *)bodyData headers:(NSDictionary *)headers completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)postJSONFromURLWithString:(NSString *)urlString params:(NSDictionary *)params completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)postJSONFromURLWithString:(NSString *)urlString bodyString:(NSString *)bodyString completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)postJSONFromURLWithString:(NSString *)urlString bodyData:(NSData *)bodyData completion:(JSONObjectBlock)completeBlock DEPRECATED_ATTRIBUTE; @end diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index 041e2134..6d4a08fa 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -13,54 +13,16 @@ // 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 "JSONModel.h" #import "JSONHTTPClient.h" typedef void (^JSONModelBlock)(id model, JSONModelError* err) DEPRECATED_ATTRIBUTE; -/** - * The JSONModel(networking) class category adds networking to JSONModel. - * It adds initFromURLWithString: initializer, which makes a GET http request - * to the URL given and initializes the model with the returned JSON. - * Use #import "JSONModel+networking.h" to import networking capabilities. - */ -@interface JSONModel(Networking) +@interface JSONModel (Networking) @property (assign, nonatomic) BOOL isLoading DEPRECATED_ATTRIBUTE; -/** @name Asynchronously create a model over the network */ -/** - * 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 - */ --(instancetype)initFromURLWithString:(NSString *)urlString completion:(JSONModelBlock)completeBlock DEPRECATED_ATTRIBUTE; - -/** - * Asynchronously gets the contents of a URL and constructs a JSONModel object from the response. - * The constructed JSONModel object passed as the first parameter to the completion block will be of the same - * class as the receiver. So call this method on yourJSONModel sub-class rather than directly on JSONModel. - * @param urlString The absolute URL of the JSON resource, as a string - * @param completeBlock The block to be called upon completion. - * JSONModelBlock type is defined as: void (^JSONModelBlock)(JSONModel* model, JSONModelError* err); - * The first parameter is the initialized model (of the same JSONModel sub-class as the receiver) or nil if there was an error; - * The second parameter is the initialization error, if any. - */ -+ (void)getModelFromURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock DEPRECATED_ATTRIBUTE; - -/** - * Asynchronously posts a JSONModel object (as JSON) to a URL and constructs a JSONModel object from the response. - * The constructed JSONModel object passed as the first parameter to the completion block will be of the same - * class as the receiver. So call this method on yourJSONModel sub-class rather than directly on JSONModel. - * @param post A JSONModel object that will be converted to JSON and sent as the POST data to the HTTP request. - * @param urlString The absolute URL of the JSON resource, as a string - * @param completeBlock The block to be called upon completion. - * JSONModelBlock type is defined as: void (^JSONModelBlock)(JSONModel* model, JSONModelError* err); - * The first parameter is the initialized model (of the same JSONModel sub-class as the receiver) or nil if there was an error; - * The second parameter is the initialization error, if any. - */ -+ (void)postModel:(JSONModel*)post toURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock DEPRECATED_ATTRIBUTE; - +- (instancetype)initFromURLWithString:(NSString *)urlString completion:(JSONModelBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)getModelFromURLWithString:(NSString *)urlString completion:(JSONModelBlock)completeBlock DEPRECATED_ATTRIBUTE; ++ (void)postModel:(JSONModel *)post toURLWithString:(NSString *)urlString completion:(JSONModelBlock)completeBlock DEPRECATED_ATTRIBUTE; @end diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 60325ff9..f11766d0 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -50,10 +50,12 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); */ @interface JSONKeyMapper : NSObject -/** @name Name converters */ -/** Block, which takes in a JSON key and converts it to the corresponding property name */ +// deprecated @property (readonly, nonatomic) JSONModelKeyMapBlock JSONToModelKeyBlock DEPRECATED_ATTRIBUTE; +- (NSString *)convertValue:(NSString *)value isImportingToModel:(BOOL)importing DEPRECATED_MSG_ATTRIBUTE("use convertValue:"); +- (instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel modelToJSONBlock:(JSONModelKeyMapBlock)toJSON DEPRECATED_MSG_ATTRIBUTE("use initWithModelToJSONBlock:"); +/** @name Name converters */ /** Block, which takes in a property name and converts it to the corresponding JSON key name */ @property (readonly, nonatomic) JSONModelKeyMapBlock modelToJSONKeyBlock; @@ -62,21 +64,17 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); * @param importing YES invokes JSONToModelKeyBlock, NO - modelToJSONKeyBlock * @return JSONKeyMapper instance */ --(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing DEPRECATED_MSG_ATTRIBUTE("use convertValue:"); -(NSString*)convertValue:(NSString*)value; /** @name Creating a key mapper */ /** * Creates a JSONKeyMapper instance, based on the two blocks you provide this initializer. - * The two parameters take in a JSONModelKeyMapBlock block: + * The parameter takes in a JSONModelKeyMapBlock block: *
NSString* (^JSONModelKeyMapBlock)(NSString* keyName)
* The block takes in a string and returns the transformed (if at all) string. - * @param toModel transforms JSON key name to your model property name * @param toJSON transforms your model property name to a JSON key */ --(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel - modelToJSONBlock:(JSONModelKeyMapBlock)toJSON DEPRECATED_MSG_ATTRIBUTE("use initWithModelToJSONBlock:"); -(instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON; /** From 50f4672f97092b023abaff05666f058b11e66483 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 22 Jun 2016 18:56:41 +0100 Subject: [PATCH 082/171] Ensure spacing and style is consistent in headers --- JSONModel/JSONModel/JSONModel.h | 330 +++++++++--------- JSONModel/JSONModel/JSONModelClassProperty.h | 10 +- JSONModel/JSONModel/JSONModelError.h | 34 +- .../JSONModelNetworking/JSONHTTPClient.h | 12 +- .../JSONModel+networking.h | 2 +- .../JSONModelTransformations/JSONKeyMapper.h | 36 +- .../JSONValueTransformer.h | 48 +-- 7 files changed, 236 insertions(+), 236 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index df5e755b..d9d90818 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -34,17 +34,17 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * Protocol for defining properties in a JSON Model class that should not be considered at all * neither while importing nor when exporting JSON. * - * @property (strong, nonatomic) NSString<Ignore>* propertyName; + * @property (strong, nonatomic) NSString<Ignore> *propertyName; * */ @protocol Ignore @end /** - * Protocol for defining optional properties in a JSON Model class. Use like below to define + * Protocol for defining optional properties in a JSON Model class. Use like below to define * model properties that are not required to have values in the JSON input: - * - * @property (strong, nonatomic) NSString<Optional>* propertyName; + * + * @property (strong, nonatomic) NSString<Optional> *propertyName; * */ @protocol Optional @@ -54,7 +54,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * Protocol for defining index properties in a JSON Model class. Use like below to define * model properties that are considered the Model's identifier (id). * - * @property (strong, nonatomic) NSString<Index>* propertyName; + * @property (strong, nonatomic) NSString<Index> *propertyName; * */ @protocol Index @@ -79,16 +79,16 @@ DEPRECATED_ATTRIBUTE @protocol AbstractJSONModelProtocol @required - /** - * All JSONModel classes should implement initWithDictionary: - * - * For most classes the default initWithDictionary: inherited from JSONModel itself - * should suffice, but developers have the option to also overwrite it if needed. - * - * @param dict a dictionary holding JSON objects, to be imported in the model. - * @param err an error or NULL - */ - -(instancetype)initWithDictionary:(NSDictionary*)dict error:(NSError**)err; +/** + * All JSONModel classes should implement initWithDictionary: + * + * For most classes the default initWithDictionary: inherited from JSONModel itself + * should suffice, but developers have the option to also overwrite it if needed. + * + * @param dict a dictionary holding JSON objects, to be imported in the model. + * @param err an error or NULL + */ +- (instancetype)initWithDictionary:(NSDictionary *)dict error:(NSError **)err; /** @@ -100,7 +100,7 @@ DEPRECATED_ATTRIBUTE * @param data representing a JSON response (usually fetched from web), to be imported in the model. * @param error an error or NULL */ --(instancetype)initWithData:(NSData*)data error:(NSError**)error; +- (instancetype)initWithData:(NSData *)data error:(NSError **)error; /** * All JSONModel classes should be able to export themselves as a dictionary of @@ -113,17 +113,17 @@ DEPRECATED_ATTRIBUTE * @exception JSONModelTypeNotAllowedException thrown when one of your model's custom class properties * does not have matching transformer method in an JSONValueTransformer. */ - -(NSDictionary*)toDictionary; - - /** - * Export a model class to a dictionary, including only given properties - * - * @param propertyNames the properties to export; if nil, all properties exported - * @return NSDictionary dictionary of JSON compliant objects - * @exception JSONModelTypeNotAllowedException thrown when one of your model's custom class properties - * does not have matching transformer method in an JSONValueTransformer. - */ - -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames; +- (NSDictionary *)toDictionary; + +/** + * Export a model class to a dictionary, including only given properties + * + * @param propertyNames the properties to export; if nil, all properties exported + * @return NSDictionary dictionary of JSON compliant objects + * @exception JSONModelTypeNotAllowedException thrown when one of your model's custom class properties + * does not have matching transformer method in an JSONValueTransformer. + */ +- (NSDictionary *)toDictionaryWithKeys:(NSArray *)propertyNames; @end ///////////////////////////////////////////////////////////////////////////////////////////// @@ -143,151 +143,151 @@ DEPRECATED_ATTRIBUTE /** @name Creating and initializing models */ - /** - * 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 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 - */ - -(instancetype)initWithString:(NSString*)string error:(JSONModelError**)err; - - /** - * Create a new model instance and initialize it with the JSON from a text parameter using the given encoding. - * @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 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; - - -(instancetype)initWithDictionary:(NSDictionary*)dict error:(NSError **)err; - - -(instancetype)initWithData:(NSData *)data error:(NSError **)error; +/** + * 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 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 + */ +- (instancetype)initWithString:(NSString *)string error:(JSONModelError **)err; + +/** + * Create a new model instance and initialize it with the JSON from a text parameter using the given encoding. + * @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 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; + +- (instancetype)initWithDictionary:(NSDictionary *)dict error:(NSError **)err; + +- (instancetype)initWithData:(NSData *)data error:(NSError **)error; /** @name Exporting model contents */ - /** - * Export the whole object to a dictionary - * @return dictionary containing the data model - */ - -(NSDictionary*)toDictionary; - - /** - * Export the whole object to a JSON data text string - * @return JSON text describing the data model - */ - -(NSString*)toJSONString; - - /** - * Export the whole object to a JSON data text string - * @return JSON text data describing the data model - */ - -(NSData*)toJSONData; - - /** - * Export the specified properties of the object to a dictionary - * @param propertyNames the properties to export; if nil, all properties exported - * @return dictionary containing the data model - */ - -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames; - - /** - * Export the specified properties of the object to a JSON data text string - * @param propertyNames the properties to export; if nil, all properties exported - * @return JSON text describing the data model - */ - -(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames; - - /** - * Export the specified properties of the object to a JSON data text string - * @param propertyNames the properties to export; if nil, all properties exported - * @return JSON text data describing the data model - */ - -(NSData*)toJSONDataWithKeys:(NSArray*)propertyNames; +/** + * Export the whole object to a dictionary + * @return dictionary containing the data model + */ +- (NSDictionary *)toDictionary; + +/** + * Export the whole object to a JSON data text string + * @return JSON text describing the data model + */ +- (NSString *)toJSONString; + +/** + * Export the whole object to a JSON data text string + * @return JSON text data describing the data model + */ +- (NSData *)toJSONData; + +/** + * Export the specified properties of the object to a dictionary + * @param propertyNames the properties to export; if nil, all properties exported + * @return dictionary containing the data model + */ +- (NSDictionary *)toDictionaryWithKeys:(NSArray *)propertyNames; + +/** + * Export the specified properties of the object to a JSON data text string + * @param propertyNames the properties to export; if nil, all properties exported + * @return JSON text describing the data model + */ +- (NSString *)toJSONStringWithKeys:(NSArray *)propertyNames; + +/** + * Export the specified properties of the object to a JSON data text string + * @param propertyNames the properties to export; if nil, all properties exported + * @return JSON text data describing the data model + */ +- (NSData *)toJSONDataWithKeys:(NSArray *)propertyNames; /** @name Batch methods */ - /** - * If you have a list of dictionaries in a JSON feed, you can use this method to create an NSArray - * of model objects. Handy when importing JSON data lists. - * This method will loop over the input list and initialize a data model for every dictionary in the list. - * - * @param array list of dictionaries to be imported as models - * @return list of initialized data model objects - * @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 error:(NSError**)err; - +(NSMutableArray*)arrayOfModelsFromData:(NSData*)data error:(NSError**)err; - +(NSMutableArray*)arrayOfModelsFromString:(NSString*)string error:(NSError**)err; - +(NSMutableDictionary*)dictionaryOfModelsFromDictionary:(NSDictionary*)dictionary error:(NSError**)err; - +(NSMutableDictionary*)dictionaryOfModelsFromData:(NSData*)data error:(NSError**)err; - +(NSMutableDictionary*)dictionaryOfModelsFromString:(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 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: - */ - +(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array; - +(NSMutableDictionary*)dictionaryOfDictionariesFromModels:(NSDictionary*)dictionary; +/** + * If you have a list of dictionaries in a JSON feed, you can use this method to create an NSArray + * of model objects. Handy when importing JSON data lists. + * This method will loop over the input list and initialize a data model for every dictionary in the list. + * + * @param array list of dictionaries to be imported as models + * @return list of initialized data model objects + * @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 error:(NSError **)err; ++ (NSMutableArray *)arrayOfModelsFromData:(NSData *)data error:(NSError **)err; ++ (NSMutableArray *)arrayOfModelsFromString:(NSString *)string error:(NSError **)err; ++ (NSMutableDictionary *)dictionaryOfModelsFromDictionary:(NSDictionary *)dictionary error:(NSError **)err; ++ (NSMutableDictionary *)dictionaryOfModelsFromData:(NSData *)data error:(NSError **)err; ++ (NSMutableDictionary *)dictionaryOfModelsFromString:(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 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: + */ ++ (NSMutableArray *)arrayOfDictionariesFromModels:(NSArray *)array; ++ (NSMutableDictionary *)dictionaryOfDictionariesFromModels:(NSDictionary *)dictionary; /** @name Comparing models */ - /** - * The name of the model's property, which is considered the model's unique identifier. - * You can define Index property by using the Index protocol: - * @property (strong, nonatomic) NSString<Index>* id; - */ - -(NSString*)indexPropertyName; - - /** - * 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; - - /** - * 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. - * @param object a JSONModel instance to compare to - */ - -(NSComparisonResult)compare:(id)object; +/** + * The name of the model's property, which is considered the model's unique identifier. + * You can define Index property by using the Index protocol: + * @property (strong, nonatomic) NSString<Index> *id; + */ +- (NSString *)indexPropertyName; + +/** + * 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; + +/** + * 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. + * @param object a JSONModel instance to compare to + */ +- (NSComparisonResult)compare:(id)object; /** @name Validation */ - /** - * 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 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. - * - * @param error a pointer to an NSError object, to pass back an error if needed - * @return a BOOL result, showing whether the model data validates or not. You can use the convenience method - * [JSONModelError errorModelIsInvalid] to set the NSError param if the data fails your custom validation - */ --(BOOL)validate:(NSError**)error; +/** + * 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 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. + * + * @param error a pointer to an NSError object, to pass back an error if needed + * @return a BOOL result, showing whether the model data validates or not. You can use the convenience method + * [JSONModelError errorModelIsInvalid] to set the NSError param if the data fails your custom validation + */ +- (BOOL)validate:(NSError **)error; /** @name Key mapping */ - /** - * Overwrite in your models if your property names don't match your JSON key names. - * Lookup JSONKeyMapper docs for more details. - */ -+(JSONKeyMapper*)keyMapper; +/** + * Overwrite in your models if your property names don't match your JSON key names. + * Lookup JSONKeyMapper docs for more details. + */ ++ (JSONKeyMapper *)keyMapper; /** * Indicates whether the property with the given name is Optional. @@ -296,7 +296,7 @@ DEPRECATED_ATTRIBUTE * @param propertyName the name of the property * @return a BOOL result indicating whether the property is optional */ -+(BOOL)propertyIsOptional:(NSString*)propertyName; ++ (BOOL)propertyIsOptional:(NSString *)propertyName; /** * Indicates whether the property with the given name is Ignored. @@ -305,26 +305,26 @@ DEPRECATED_ATTRIBUTE * @param propertyName the name of the property * @return a BOOL result indicating whether the property is ignored */ -+(BOOL)propertyIsIgnored:(NSString*)propertyName; ++ (BOOL)propertyIsIgnored:(NSString *)propertyName; /** * Indicates the protocol name for an array property. * Rather than using: - * @property (strong) NSArray* things; - * You can implement protocolForArrayProperty: and keep your property + * @property (strong) NSArray *things; + * You can implement protocolForArrayProperty: and keep your property * defined like: - * @property (strong) NSArray* things; + * @property (strong) NSArray *things; * @param propertyName the name of the property * @return an NSString result indicating the name of the protocol/class * that should be contained in this array property. Return nil to indicate * no contained protocol. */ -+(NSString*)protocolForArrayProperty:(NSString *)propertyName; ++ (NSString *)protocolForArrayProperty:(NSString *)propertyName; /** * Merges values from the given dictionary into the model instance. * @param dict dictionary with values - * @param useKeyMapping if YES the method will use the model's key mapper and the global key mapper, if NO + * @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 error:(NSError **)error; diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index 45d7aa57..c91f423f 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -20,7 +20,7 @@ enum kCustomizationTypes { kNotInspected = 0, kCustom, kNo - }; +}; typedef enum kCustomizationTypes PropertyGetterType; @@ -29,22 +29,22 @@ typedef enum kCustomizationTypes PropertyGetterType; * to inspect the declared properties of your model class. * * Class to contain the information, representing a class property - * It features the property's name, type, whether it's a required property, + * It features the property's name, type, whether it's a required property, * and (optionally) the class protocol */ @interface JSONModelClassProperty : NSObject /** The name of the declared property (not the ivar name) */ -@property (copy, nonatomic) NSString* name; +@property (copy, nonatomic) NSString *name; /** A property class type */ @property (assign, nonatomic) Class type; /** Struct name if a struct */ -@property (strong, nonatomic) NSString* structName; +@property (strong, nonatomic) NSString *structName; /** The name of the protocol the property conforms to (or nil) */ -@property (copy, nonatomic) NSString* protocol; +@property (copy, nonatomic) NSString *protocol; /** If YES, it can be missing in the input data, and the input would be still valid */ @property (assign, nonatomic) BOOL isOptional; diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index 10c6b0f2..3a7772b0 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -28,15 +28,15 @@ typedef NS_ENUM(int, kJSONModelErrorTypes) ///////////////////////////////////////////////////////////////////////////////////////////// /** The domain name used for the JSONModelError instances */ -extern NSString* const JSONModelErrorDomain; +extern NSString *const JSONModelErrorDomain; -/** +/** * If the model JSON input misses keys that are required, check the - * userInfo dictionary of the JSONModelError instance you get back - + * userInfo dictionary of the JSONModelError instance you get back - * under the kJSONModelMissingKeys key you will find a list of the * names of the missing keys. */ -extern NSString* const kJSONModelMissingKeys; +extern NSString *const kJSONModelMissingKeys; /** * If JSON input has a different type than expected by the model, check the @@ -44,62 +44,62 @@ extern NSString* const kJSONModelMissingKeys; * under the kJSONModelTypeMismatch key you will find a description * of the mismatched types. */ -extern NSString* const kJSONModelTypeMismatch; +extern NSString *const kJSONModelTypeMismatch; /** * If an error occurs in a nested model, check the userInfo dictionary of * the JSONModelError instance you get back - under the kJSONModelKeyPath * key you will find key-path at which the error occurred. */ -extern NSString* const kJSONModelKeyPath; +extern NSString *const kJSONModelKeyPath; ///////////////////////////////////////////////////////////////////////////////////////////// /** - * Custom NSError subclass with shortcut methods for creating + * Custom NSError subclass with shortcut methods for creating * the common JSONModel errors */ @interface JSONModelError : NSError -@property (strong, nonatomic) NSHTTPURLResponse* httpResponse; +@property (strong, nonatomic) NSHTTPURLResponse *httpResponse; -@property (strong, nonatomic) NSData* responseData; +@property (strong, nonatomic) NSData *responseData; /** * Creates a JSONModelError instance with code kJSONModelErrorInvalidData = 1 */ -+(id)errorInvalidDataWithMessage:(NSString*)message; ++ (id)errorInvalidDataWithMessage:(NSString *)message; /** * Creates a JSONModelError instance with code kJSONModelErrorInvalidData = 1 * @param keys a set of field names that were required, but not found in the input */ -+(id)errorInvalidDataWithMissingKeys:(NSSet*)keys; ++ (id)errorInvalidDataWithMissingKeys:(NSSet *)keys; /** * Creates a JSONModelError instance with code kJSONModelErrorInvalidData = 1 * @param mismatchDescription description of the type mismatch that was encountered. */ -+(id)errorInvalidDataWithTypeMismatch:(NSString*)mismatchDescription; ++ (id)errorInvalidDataWithTypeMismatch:(NSString *)mismatchDescription; /** * Creates a JSONModelError instance with code kJSONModelErrorBadResponse = 2 */ -+(id)errorBadResponse; ++ (id)errorBadResponse; /** * Creates a JSONModelError instance with code kJSONModelErrorBadJSON = 3 */ -+(id)errorBadJSON; ++ (id)errorBadJSON; /** * Creates a JSONModelError instance with code kJSONModelErrorModelIsInvalid = 4 */ -+(id)errorModelIsInvalid; ++ (id)errorModelIsInvalid; /** * Creates a JSONModelError instance with code kJSONModelErrorNilInput = 5 */ -+(id)errorInputIsNil; ++ (id)errorInputIsNil; /** * Creates a new JSONModelError with the same values plus information about the key-path of the error. @@ -108,7 +108,7 @@ extern NSString* const kJSONModelKeyPath; * This key contains the component string parameter. If the key is already present * then the new error object has the component string prepended to the existing value. */ -- (instancetype)errorByPrependingKeyPathComponent:(NSString*)component; +- (instancetype)errorByPrependingKeyPathComponent:(NSString *)component; ///////////////////////////////////////////////////////////////////////////////////////////// @end diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index f4745c82..daa20c9a 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -15,13 +15,13 @@ #import "JSONModel.h" -extern NSString* const kHTTPMethodGET DEPRECATED_ATTRIBUTE; -extern NSString* const kHTTPMethodPOST DEPRECATED_ATTRIBUTE; -extern NSString* const kContentTypeAutomatic DEPRECATED_ATTRIBUTE; -extern NSString* const kContentTypeJSON DEPRECATED_ATTRIBUTE; -extern NSString* const kContentTypeWWWEncoded DEPRECATED_ATTRIBUTE; +extern NSString *const kHTTPMethodGET DEPRECATED_ATTRIBUTE; +extern NSString *const kHTTPMethodPOST DEPRECATED_ATTRIBUTE; +extern NSString *const kContentTypeAutomatic DEPRECATED_ATTRIBUTE; +extern NSString *const kContentTypeJSON DEPRECATED_ATTRIBUTE; +extern NSString *const kContentTypeWWWEncoded DEPRECATED_ATTRIBUTE; -typedef void (^JSONObjectBlock)(id json, JSONModelError* err) DEPRECATED_ATTRIBUTE; +typedef void (^JSONObjectBlock)(id json, JSONModelError *err) DEPRECATED_ATTRIBUTE; DEPRECATED_ATTRIBUTE @interface JSONHTTPClient : NSObject diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index 6d4a08fa..ffa9eb4d 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -16,7 +16,7 @@ #import "JSONModel.h" #import "JSONHTTPClient.h" -typedef void (^JSONModelBlock)(id model, JSONModelError* err) DEPRECATED_ATTRIBUTE; +typedef void (^JSONModelBlock)(id model, JSONModelError *err) DEPRECATED_ATTRIBUTE; @interface JSONModel (Networking) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index f11766d0..9d37ff4f 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -16,11 +16,11 @@ #import -typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); +typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); /** * **You won't need to create or store instances of this class yourself.** If you want your model - * to have different property names than the JSON feed keys, look below on how to + * to have different property names than the JSON feed keys, look below on how to * make your model use a key mapper. * * For example if you consume JSON from twitter @@ -31,19 +31,19 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); * * To comply with Obj-C accepted camelCase property naming for your classes, * you need to provide mapping between JSON keys and ObjC property names. - * - * In your model overwrite the +(JSONKeyMapper*)keyMapper method and provide a JSONKeyMapper + * + * In your model overwrite the + (JSONKeyMapper *)keyMapper method and provide a JSONKeyMapper * instance to convert the key names for your model. - * + * * If you need custom mapping it's as easy as: *
- * +(JSONKeyMapper*)keyMapper {
+ * + (JSONKeyMapper *)keyMapper {
  *   return [[JSONKeyMapper alloc] initWithDictionary:@{@"crazy_JSON_name":@"myCamelCaseName"}];
  * }
  * 
* In case you want to handle underscore_case, **use the predefined key mapper**, like so: *
- * +(JSONKeyMapper*)keyMapper {
+ * + (JSONKeyMapper *)keyMapper {
  *   return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase];
  * }
  * 
@@ -60,38 +60,38 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName); @property (readonly, nonatomic) JSONModelKeyMapBlock modelToJSONKeyBlock; /** Combined converter method -* @param value the source name -* @param importing YES invokes JSONToModelKeyBlock, NO - modelToJSONKeyBlock -* @return JSONKeyMapper instance -*/ --(NSString*)convertValue:(NSString*)value; + * @param value the source name + * @param importing YES invokes JSONToModelKeyBlock, NO - modelToJSONKeyBlock + * @return JSONKeyMapper instance + */ +- (NSString *)convertValue:(NSString *)value; /** @name Creating a key mapper */ /** * Creates a JSONKeyMapper instance, based on the two blocks you provide this initializer. * The parameter takes in a JSONModelKeyMapBlock block: - *
NSString* (^JSONModelKeyMapBlock)(NSString* keyName)
+ *
NSString *(^JSONModelKeyMapBlock)(NSString *keyName)
* The block takes in a string and returns the transformed (if at all) string. * @param toJSON transforms your model property name to a JSON key */ --(instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON; +- (instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON; /** * Creates a JSONKeyMapper instance, based on the mapping you provide - * in the map parameter. Use the JSON key names as keys, your JSONModel + * in the map parameter. Use the JSON key names as keys, your JSONModel * property names as values. * @param map map dictionary, in the format:
@{@"crazy_JSON_name":@"myCamelCaseName"}
* @return JSONKeyMapper instance */ --(instancetype)initWithDictionary:(NSDictionary*)map; +- (instancetype)initWithDictionary:(NSDictionary *)map; /** * Creates a JSONKeyMapper, which converts underscore_case to camelCase and vice versa. */ -+(instancetype)mapperFromUnderscoreCaseToCamelCase; ++ (instancetype)mapperFromUnderscoreCaseToCamelCase; -+(instancetype)mapperFromUpperCaseToLowerCase; ++ (instancetype)mapperFromUpperCaseToLowerCase; /** * Creates a JSONKeyMapper based on a built-in JSONKeyMapper, with specific exceptions. diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index ddd5b5c3..b6c89e9b 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -29,7 +29,7 @@ extern BOOL isNull(id value); #pragma mark - JSONValueTransformer interface /** - * **You don't need to call methods of this class manually.** + * **You don't need to call methods of this class manually.** * * Class providing methods to transform values from one class to another. * You are given a number of built-in transformers, but you are encouraged to @@ -43,7 +43,7 @@ extern BOOL isNull(id value); */ @interface JSONValueTransformer : NSObject -@property (strong, nonatomic, readonly) NSDictionary* primitivesNames; +@property (strong, nonatomic, readonly) NSDictionary *primitivesNames; /** @name Resolving cluster class names */ /** @@ -53,7 +53,7 @@ extern BOOL isNull(id value); * @param sourceClass the class to get the umbrella class for * @return Class */ -+(Class)classByResolvingClusterClasses:(Class)sourceClass; ++ (Class)classByResolvingClusterClasses:(Class)sourceClass; #pragma mark - NSMutableString <-> NSString /** @name Transforming to Mutable copies */ @@ -62,7 +62,7 @@ extern BOOL isNull(id value); * @param string incoming string * @return mutable string */ --(NSMutableString*)NSMutableStringFromNSString:(NSString*)string; +- (NSMutableString *)NSMutableStringFromNSString:(NSString *)string; #pragma mark - NSMutableArray <-> NSArray /** @@ -70,7 +70,7 @@ extern BOOL isNull(id value); * @param array incoming array * @return mutable array */ --(NSMutableArray*)NSMutableArrayFromNSArray:(NSArray*)array; +- (NSMutableArray *)NSMutableArrayFromNSArray:(NSArray *)array; #pragma mark - NSMutableDictionary <-> NSDictionary /** @@ -78,7 +78,7 @@ extern BOOL isNull(id value); * @param dict incoming dictionary * @return mutable dictionary */ --(NSMutableDictionary*)NSMutableDictionaryFromNSDictionary:(NSDictionary*)dict; +- (NSMutableDictionary *)NSMutableDictionaryFromNSDictionary:(NSDictionary *)dict; #pragma mark - NSSet <-> NSArray /** @name Transforming Sets */ @@ -87,28 +87,28 @@ extern BOOL isNull(id value); * @param array incoming array * @return set with the array's elements */ --(NSSet*)NSSetFromNSArray:(NSArray*)array; +- (NSSet *)NSSetFromNSArray:(NSArray *)array; /** * Transforms an array to a mutable set * @param array incoming array * @return mutable set with the array's elements */ --(NSMutableSet*)NSMutableSetFromNSArray:(NSArray*)array; +- (NSMutableSet *)NSMutableSetFromNSArray:(NSArray *)array; /** * Transforms a set to an array * @param set incoming set * @return an array with the set's elements */ --(NSArray*)JSONObjectFromNSSet:(NSSet*)set; +- (NSArray *)JSONObjectFromNSSet:(NSSet *)set; /** * Transforms a mutable set to an array * @param set incoming mutable set * @return an array with the set's elements */ --(NSArray*)JSONObjectFromNSMutableSet:(NSMutableSet*)set; +- (NSArray *)JSONObjectFromNSMutableSet:(NSMutableSet *)set; #pragma mark - BOOL <-> number/string /** @name Transforming JSON types */ @@ -117,21 +117,21 @@ extern BOOL isNull(id value); * @param number the number to convert * @return the resulting number */ --(NSNumber*)BOOLFromNSNumber:(NSNumber*)number; +- (NSNumber *)BOOLFromNSNumber:(NSNumber *)number; /** * Transforms a number object to a bool number object * @param string the string value to convert, "0" converts to NO, everything else to YES * @return the resulting number */ --(NSNumber*)BOOLFromNSString:(NSString*)string; +- (NSNumber *)BOOLFromNSString:(NSString *)string; /** * Transforms a BOOL value to a bool number object * @param number an NSNumber value coming from the model * @return the result number */ --(NSNumber*)JSONObjectFromBOOL:(NSNumber*)number; +- (NSNumber *)JSONObjectFromBOOL:(NSNumber *)number; #pragma mark - string <-> number /** @@ -139,28 +139,28 @@ extern BOOL isNull(id value); * @param string the string to convert * @return the resulting number */ --(NSNumber*)NSNumberFromNSString:(NSString*)string; +- (NSNumber *)NSNumberFromNSString:(NSString *)string; /** * Transforms a number object to a string object * @param number the number to convert * @return the resulting string */ --(NSString*)NSStringFromNSNumber:(NSNumber*)number; +- (NSString *)NSStringFromNSNumber:(NSNumber *)number; /** * Transforms a string object to a nsdecimalnumber object * @param string the string to convert * @return the resulting number */ --(NSDecimalNumber*)NSDecimalNumberFromNSString:(NSString*)string; +- (NSDecimalNumber *)NSDecimalNumberFromNSString:(NSString *)string; /** * Transforms a nsdecimalnumber object to a string object * @param number the number to convert * @return the resulting string */ --(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number; +- (NSString *)NSStringFromNSDecimalNumber:(NSDecimalNumber *)number; #pragma mark - string <-> url @@ -170,14 +170,14 @@ extern BOOL isNull(id value); * @param string the string to convert * @return the resulting url object */ --(NSURL*)NSURLFromNSString:(NSString*)string; +- (NSURL *)NSURLFromNSString:(NSString *)string; /** * Transforms an NSURL object to a string * @param url the url object to convert * @return the resulting string */ --(NSString*)JSONObjectFromNSURL:(NSURL*)url; +- (NSString *)JSONObjectFromNSURL:(NSURL *)url; #pragma mark - string <-> time zone @@ -187,7 +187,7 @@ extern BOOL isNull(id value); * @param string the string to convert * @return the resulting NSTimeZone object */ -- (NSTimeZone *)NSTimeZoneFromNSString:(NSString*)string; +- (NSTimeZone *)NSTimeZoneFromNSString:(NSString *)string; /** * Transforms an NSTimeZone object to a string @@ -199,14 +199,14 @@ extern BOOL isNull(id value); #pragma mark - string <-> date /** @name Transforming Dates */ /** - * The following two methods are not public. This way if there is a category on converting + * The following two methods are not public. This way if there is a category on converting * dates it'll override them. If there isn't a category the default methods found in the .m * file will be invoked. If these are public a warning is produced at the point of overriding * them in a category, so they have to stay hidden here. */ -//-(NSDate*)NSDateFromNSString:(NSString*)string; -//-(NSString*)JSONObjectFromNSDate:(NSDate*)date; +//- (NSDate *)NSDateFromNSString:(NSString *)string; +//- (NSString *)JSONObjectFromNSDate:(NSDate *)date; #pragma mark - number <-> date @@ -215,6 +215,6 @@ extern BOOL isNull(id value); * @param number the number to convert * @return the resulting date */ -- (NSDate*)NSDateFromNSNumber:(NSNumber*)number; +- (NSDate *)NSDateFromNSNumber:(NSNumber *)number; @end From f3884d4e0f1d82f0b615afc076c3b4214afd5c97 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 22 Jun 2016 21:37:34 +0100 Subject: [PATCH 083/171] Deprecate `Index` protocol (#499) * Deprecate Index protocol * Ignore deprecation warnings in internal, test code --- JSONModel/JSONModel/JSONModel.h | 53 +++++-------------- JSONModel/JSONModel/JSONModel.m | 9 ++++ JSONModel/JSONModel/JSONModelClassProperty.h | 2 +- JSONModel/JSONModel/JSONModelClassProperty.m | 4 ++ .../TestModels/GitHubKeyMapRepoModel.h | 4 ++ .../UnitTests/TestModels/GitHubRepoModel.h | 4 ++ .../UnitTests/TestModels/PostModel.h | 4 ++ 7 files changed, 38 insertions(+), 42 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index d9d90818..5509e772 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -29,6 +29,14 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) #endif ///////////////////////////////////////////////////////////////////////////////////////////// +DEPRECATED_ATTRIBUTE +@protocol ConvertOnDemand +@end + +DEPRECATED_ATTRIBUTE +@protocol Index +@end + #pragma mark - Property Protocols /** * Protocol for defining properties in a JSON Model class that should not be considered at all @@ -51,23 +59,9 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) @end /** - * Protocol for defining index properties in a JSON Model class. Use like below to define - * model properties that are considered the Model's identifier (id). - * - * @property (strong, nonatomic) NSString<Index> *propertyName; - * - */ -@protocol Index -@end - -/** - * Make all objects Optional compatible to avoid compiler warnings + * Make all objects compatible to avoid compiler warnings */ -@interface NSObject(JSONModelPropertyCompatibility) -@end - -DEPRECATED_ATTRIBUTE -@protocol ConvertOnDemand +@interface NSObject(JSONModelPropertyCompatibility) @end ///////////////////////////////////////////////////////////////////////////////////////////// @@ -140,6 +134,8 @@ DEPRECATED_ATTRIBUTE + (NSMutableArray *)arrayOfModelsFromDictionaries:(NSArray *)array DEPRECATED_MSG_ATTRIBUTE("use arrayOfModelsFromDictionaries:error:"); + (void)setGlobalKeyMapper:(JSONKeyMapper *)globalKeyMapper DEPRECATED_MSG_ATTRIBUTE("override +keyMapper in a base model class instead"); - (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping DEPRECATED_MSG_ATTRIBUTE("use mergeFromDictionary:useKeyMapping:error:"); +- (NSString *)indexPropertyName DEPRECATED_ATTRIBUTE; +- (NSComparisonResult)compare:(id)object DEPRECATED_ATTRIBUTE; /** @name Creating and initializing models */ @@ -241,31 +237,6 @@ DEPRECATED_ATTRIBUTE + (NSMutableArray *)arrayOfDictionariesFromModels:(NSArray *)array; + (NSMutableDictionary *)dictionaryOfDictionariesFromModels:(NSDictionary *)dictionary; -/** @name Comparing models */ - -/** - * The name of the model's property, which is considered the model's unique identifier. - * You can define Index property by using the Index protocol: - * @property (strong, nonatomic) NSString<Index> *id; - */ -- (NSString *)indexPropertyName; - -/** - * 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; - -/** - * 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. - * @param object a JSONModel instance to compare to - */ -- (NSComparisonResult)compare:(id)object; - /** @name Validation */ /** diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 1953da15..a7d3a896 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -619,7 +619,11 @@ -(void)__inspectProperties if ([protocolName isEqualToString:@"Optional"]) { p.isOptional = YES; } else if([protocolName isEqualToString:@"Index"]) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" p.isIndex = YES; +#pragma GCC diagnostic pop + objc_setAssociatedObject( self.class, &kIndexPropertyNameKey, @@ -1237,6 +1241,9 @@ +(NSMutableDictionary *)dictionaryOfDictionariesFromModels:(NSDictionary *)dicti } #pragma mark - custom comparison methods + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -(NSString*)indexPropertyName { //custom getter for an associated object @@ -1287,6 +1294,8 @@ - (NSUInteger)hash return [super hash]; } +#pragma GCC diagnostic pop + #pragma mark - custom data validation -(BOOL)validate:(NSError**)error { diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index c91f423f..fc2cfdc1 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -56,7 +56,7 @@ typedef enum kCustomizationTypes PropertyGetterType; @property (assign, nonatomic) BOOL isMutable; /** If YES - the value of this property determines equality to other models */ -@property (assign, nonatomic) BOOL isIndex; +@property (assign, nonatomic) BOOL isIndex DEPRECATED_ATTRIBUTE; /** The status of property getter introspection in a model */ @property (assign, nonatomic) PropertyGetterType getterType; diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index e63bc86c..bc543e9e 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -23,7 +23,11 @@ -(NSString*)description //build the properties string for the current class property NSMutableArray* properties = [NSMutableArray arrayWithCapacity:8]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" if (self.isIndex) [properties addObject:@"Index"]; +#pragma GCC diagnostic pop + if (self.isOptional) [properties addObject:@"Optional"]; if (self.isMutable) [properties addObject:@"Mutable"]; if (self.isStandardJSONType) [properties addObject:@"Standard JSON type"]; diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h b/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h index b4b1dfc5..b321282c 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h +++ b/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h @@ -12,6 +12,10 @@ @property (strong, nonatomic) NSString* __description; @property (strong, nonatomic) NSString* language; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" @property (assign, nonatomic) NSString* name; +#pragma GCC diagnostic pop @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h b/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h index a2f69d44..04bc247e 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h +++ b/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h @@ -22,6 +22,10 @@ @property (assign, nonatomic) BOOL fork; @property (assign, nonatomic) double size; @property (assign, nonatomic) int followers; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" @property (strong, nonatomic) NSString* name; +#pragma GCC diagnostic pop @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PostModel.h b/JSONModelDemoTests/UnitTests/TestModels/PostModel.h index 7bf8bee8..ad455320 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/PostModel.h +++ b/JSONModelDemoTests/UnitTests/TestModels/PostModel.h @@ -12,7 +12,11 @@ @interface PostModel : JSONModel +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" @property (strong, nonatomic) NSString* id; +#pragma GCC diagnostic pop + @property (strong, nonatomic) NSString* name; @end From 13ca8656e9ff31d0184dfb9fc95e7f907a46a601 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 22 Jun 2016 23:26:58 +0100 Subject: [PATCH 084/171] Remove duplicate definitions included in abstract protocol --- JSONModel/JSONModel/JSONModel.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 5509e772..ca025e53 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -61,7 +61,7 @@ DEPRECATED_ATTRIBUTE /** * Make all objects compatible to avoid compiler warnings */ -@interface NSObject(JSONModelPropertyCompatibility) +@interface NSObject (JSONModelPropertyCompatibility) @end ///////////////////////////////////////////////////////////////////////////////////////////// @@ -159,18 +159,8 @@ DEPRECATED_ATTRIBUTE */ - (instancetype)initWithString:(NSString *)string usingEncoding:(NSStringEncoding)encoding error:(JSONModelError **)err; -- (instancetype)initWithDictionary:(NSDictionary *)dict error:(NSError **)err; - -- (instancetype)initWithData:(NSData *)data error:(NSError **)error; - /** @name Exporting model contents */ -/** - * Export the whole object to a dictionary - * @return dictionary containing the data model - */ -- (NSDictionary *)toDictionary; - /** * Export the whole object to a JSON data text string * @return JSON text describing the data model @@ -183,13 +173,6 @@ DEPRECATED_ATTRIBUTE */ - (NSData *)toJSONData; -/** - * Export the specified properties of the object to a dictionary - * @param propertyNames the properties to export; if nil, all properties exported - * @return dictionary containing the data model - */ -- (NSDictionary *)toDictionaryWithKeys:(NSArray *)propertyNames; - /** * Export the specified properties of the object to a JSON data text string * @param propertyNames the properties to export; if nil, all properties exported @@ -281,7 +264,7 @@ DEPRECATED_ATTRIBUTE /** * Indicates the protocol name for an array property. * Rather than using: - * @property (strong) NSArray *things; + * @property (strong) NSArray *things; * You can implement protocolForArrayProperty: and keep your property * defined like: * @property (strong) NSArray *things; From 06a28cc613c1826d26827616859ddcf92b935ef6 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 11:41:28 +0100 Subject: [PATCH 085/171] Check for overriding deprecated methods --- JSONModel.xcodeproj/project.pbxproj | 2 ++ JSONModel/JSONModelNetworking/JSONAPI.m | 9 +++------ JSONModel/JSONModelNetworking/JSONHTTPClient.m | 7 +++---- JSONModel/JSONModelNetworking/JSONModel+networking.m | 3 +++ JSONModelDemo_OSX.xcodeproj/project.pbxproj | 2 ++ JSONModelDemo_iOS.xcodeproj/project.pbxproj | 2 ++ .../JSONModelDemo_tvOS.xcodeproj/project.pbxproj | 2 ++ .../JSONModelDemo_watchOS.xcodeproj/project.pbxproj | 2 ++ 8 files changed, 19 insertions(+), 10 deletions(-) diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index f7d0daf3..97efbb28 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -241,6 +241,7 @@ CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; @@ -289,6 +290,7 @@ CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index 538ad4e9..6d4bec86 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -16,6 +16,9 @@ #import "JSONAPI.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wdeprecated-implementations" + #pragma mark - helper error model class @interface JSONAPIRPCErrorModel: JSONModel @property (assign, nonatomic) int code; @@ -25,10 +28,7 @@ @interface JSONAPIRPCErrorModel: JSONModel #pragma mark - static variables -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" static JSONAPI* sharedInstance = nil; -#pragma GCC diagnostic pop static long jsonRpcId = 0; @@ -48,10 +48,7 @@ +(void)initialize { static dispatch_once_t once; dispatch_once(&once, ^{ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" sharedInstance = [[JSONAPI alloc] init]; -#pragma GCC diagnostic pop }); } diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index 0900bcde..56f2f9d5 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -16,6 +16,9 @@ #import "JSONHTTPClient.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wdeprecated-implementations" + typedef void (^RequestResultBlock)(NSData *data, JSONModelError *error); #pragma mark - constants @@ -55,11 +58,7 @@ +(void)initialize static dispatch_once_t once; dispatch_once(&once, ^{ requestHeaders = [NSMutableDictionary dictionary]; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" requestContentType = kContentTypeAutomatic; -#pragma GCC diagnostic pop }); } diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index bb070c4c..0d306de8 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -17,6 +17,9 @@ #import "JSONModel+networking.h" #import "JSONHTTPClient.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wdeprecated-implementations" + BOOL _isLoading; @implementation JSONModel(Networking) diff --git a/JSONModelDemo_OSX.xcodeproj/project.pbxproj b/JSONModelDemo_OSX.xcodeproj/project.pbxproj index 00a11e07..30a79855 100644 --- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj +++ b/JSONModelDemo_OSX.xcodeproj/project.pbxproj @@ -858,6 +858,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; @@ -888,6 +889,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj index 90864376..032c4e16 100644 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_iOS.xcodeproj/project.pbxproj @@ -993,6 +993,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -1022,6 +1023,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj b/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj index 56144e12..e45cd2d4 100644 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj @@ -265,6 +265,7 @@ CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; @@ -308,6 +309,7 @@ CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj b/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj index 8a0c24ce..ab0d8330 100644 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj +++ b/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj @@ -470,6 +470,7 @@ CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; @@ -514,6 +515,7 @@ CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; From 2317bd37c8f6e839c9ad7e4e985e7fc21afc3e1d Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 12:53:05 +0100 Subject: [PATCH 086/171] Remove all demos files & projects They will all be recreated as a single new project --- .../JSONModelDemoTests-Info.plist | 22 - .../JSONModelDemoTests-Prefix.pch | 9 - .../JSONModelDemo_iOSTests-Info.plist | 22 - JSONModelDemoTests/MTTestSemaphor.h | 26 - JSONModelDemoTests/MTTestSemaphor.m | 75 - JSONModelDemoTests/MockNSURLConnection.h | 18 - JSONModelDemoTests/MockNSURLConnection.m | 68 - JSONModelDemoTests/UnitTests/ArrayTests.h | 13 - JSONModelDemoTests/UnitTests/ArrayTests.m | 95 - .../UnitTests/BuiltInConversionsTests.h | 13 - .../UnitTests/BuiltInConversionsTests.m | 79 - .../UnitTests/CustomPropsTests.h | 13 - .../UnitTests/CustomPropsTests.m | 48 - .../UnitTests/DataFiles/colors.json | 4 - .../UnitTests/DataFiles/converts.json | 21 - .../UnitTests/DataFiles/github-iphone.json | 1804 ----------------- .../UnitTests/DataFiles/jsonTypes.json | 14 - .../UnitTests/DataFiles/nestedData.json | 15 - .../DataFiles/nestedDataWithArrayError.json | 15 - .../nestedDataWithDictionaryError.json | 15 - .../nestedDataWithTypeMismatchOnImages.json | 15 - ...tedDataWithTypeMismatchOnImagesObject.json | 15 - .../UnitTests/DataFiles/post.json | 9 - .../UnitTests/DataFiles/primitives.json | 11 - .../DataFiles/primitivesWithErrors.json | 10 - .../DataFiles/specialPropertyName.json | 5 - .../UnitTests/DataFiles/withOptProp.json | 4 - .../UnitTests/DataFiles/withoutOptProp.json | 3 - .../UnitTests/ExtremeNestingTests.h | 11 - .../UnitTests/ExtremeNestingTests.m | 69 - .../UnitTests/HTTPClientSuite.h | 13 - .../UnitTests/HTTPClientSuite.m | 430 ---- .../UnitTests/IdPropertyTests.h | 15 - .../UnitTests/IdPropertyTests.m | 56 - .../UnitTests/InitFromWebTests.h | 13 - .../UnitTests/InitFromWebTests.m | 60 - .../UnitTests/InitWithDataTests.m | 142 -- JSONModelDemoTests/UnitTests/JSONAPITests.h | 13 - JSONModelDemoTests/UnitTests/JSONAPITests.m | 187 -- .../UnitTests/JSONTypesModelWithValidation1.h | 13 - .../UnitTests/JSONTypesModelWithValidation1.m | 23 - .../UnitTests/JSONTypesModelWithValidation2.h | 13 - .../UnitTests/JSONTypesModelWithValidation2.m | 22 - .../UnitTests/JSONTypesReadTests.h | 13 - .../UnitTests/JSONTypesReadTests.m | 66 - .../UnitTests/JSONValueTransformer+UIColor.h | 24 - .../UnitTests/JSONValueTransformer+UIColor.m | 53 - .../UnitTests/KeyMappingTests.h | 13 - .../UnitTests/KeyMappingTests.m | 310 --- .../UnitTests/NestedModelsTests.h | 13 - .../UnitTests/NestedModelsTests.m | 53 - .../UnitTests/OptionalPropertiesTests.h | 13 - .../UnitTests/OptionalPropertiesTests.m | 61 - JSONModelDemoTests/UnitTests/PersistTests.h | 13 - JSONModelDemoTests/UnitTests/PersistTests.m | 113 -- .../UnitTests/PrimitiveTypesReadTests.h | 13 - .../UnitTests/PrimitiveTypesReadTests.m | 80 - .../UnitTests/SimpleDataErrorTests.h | 13 - .../UnitTests/SimpleDataErrorTests.m | 163 -- .../UnitTests/SpecialPropertiesTests.m | 87 - .../UnitTests/SpecialPropertyNameTests.h | 13 - .../UnitTests/SpecialPropertyNameTests.m | 35 - .../UnitTests/SpecialValuesTests.m | 50 - .../TestModels/BuiltInConversionsModel.h | 43 - .../TestModels/BuiltInConversionsModel.m | 13 - .../UnitTests/TestModels/CopyrightModel.h | 16 - .../UnitTests/TestModels/CopyrightModel.m | 13 - .../TestModels/CustomPropertyModel.h | 25 - .../TestModels/CustomPropertyModel.m | 13 - .../UnitTests/TestModels/DrugModel.h | 16 - .../UnitTests/TestModels/DrugModel.m | 14 - .../UnitTests/TestModels/EnumModel.h | 36 - .../UnitTests/TestModels/EnumModel.m | 61 - .../TestModels/ExtremeNestingModel.h | 14 - .../TestModels/ExtremeNestingModel.m | 21 - .../TestModels/GitHubKeyMapRepoModel.h | 21 - .../TestModels/GitHubKeyMapRepoModel.m | 26 - .../TestModels/GitHubKeyMapRepoModelDict.h | 13 - .../TestModels/GitHubKeyMapRepoModelDict.m | 20 - .../UnitTests/TestModels/GitHubRepoModel.h | 31 - .../UnitTests/TestModels/GitHubRepoModel.m | 13 - .../TestModels/GitHubRepoModelForUSMapper.h | 20 - .../TestModels/GitHubRepoModelForUSMapper.m | 18 - .../UnitTests/TestModels/ImageModel.h | 22 - .../UnitTests/TestModels/ImageModel.m | 13 - .../UnitTests/TestModels/InteractionModel.h | 14 - .../UnitTests/TestModels/InteractionModel.m | 13 - .../UnitTests/TestModels/JSONTypesModel.h | 40 - .../UnitTests/TestModels/JSONTypesModel.m | 13 - .../TestModels/ModelForUpperCaseMapper.h | 12 - .../TestModels/ModelForUpperCaseMapper.m | 15 - .../UnitTests/TestModels/NestedModel.h | 24 - .../UnitTests/TestModels/NestedModel.m | 13 - .../UnitTests/TestModels/OptionalPropModel.h | 27 - .../UnitTests/TestModels/OptionalPropModel.m | 22 - .../UnitTests/TestModels/PostModel.h | 22 - .../UnitTests/TestModels/PostModel.m | 13 - .../UnitTests/TestModels/PostsModel.h | 16 - .../UnitTests/TestModels/PostsModel.m | 13 - .../UnitTests/TestModels/PrimitivesModel.h | 34 - .../UnitTests/TestModels/PrimitivesModel.m | 13 - .../TestModels/RenamedPropertyModel.h | 16 - .../TestModels/RenamedPropertyModel.m | 19 - .../UnitTests/TestModels/ReposModel.h | 22 - .../UnitTests/TestModels/ReposModel.m | 26 - .../UnitTests/TestModels/RpcRequestModel.h | 17 - .../UnitTests/TestModels/RpcRequestModel.m | 13 - .../TestModels/SpecialPropertyModel.h | 16 - .../TestModels/SpecialPropertyModel.m | 13 - .../UnitTests/ValidationTestSuite.h | 13 - .../UnitTests/ValidationTestSuite.m | 66 - JSONModelDemo_OSX.xcodeproj/project.pbxproj | 967 --------- .../contents.xcworkspacedata | 7 - JSONModelDemo_iOS.xcodeproj/project.pbxproj | 1130 ----------- .../contents.xcworkspacedata | 7 - JSONModelDemo_iOS/AppDelegate.h | 17 - JSONModelDemo_iOS/AppDelegate.m | 55 - JSONModelDemo_iOS/Default-568h@2x.png | Bin 18594 -> 0 bytes JSONModelDemo_iOS/Default.png | Bin 6540 -> 0 bytes JSONModelDemo_iOS/Default@2x.png | Bin 16107 -> 0 bytes JSONModelDemo_iOS/GitHubUserModel.h | 19 - JSONModelDemo_iOS/GitHubUserModel.m | 13 - JSONModelDemo_iOS/GitHubViewController.h | 13 - JSONModelDemo_iOS/GitHubViewController.m | 95 - JSONModelDemo_iOS/GitHubViewController.xib | 24 - JSONModelDemo_iOS/HUD.h | 45 - JSONModelDemo_iOS/HUD.m | 201 -- .../JSONModelDemo_iOS-Info.plist | 48 - .../JSONModelDemo_iOS-Prefix.pch | 14 - JSONModelDemo_iOS/KivaFeed.h | 16 - JSONModelDemo_iOS/KivaFeed.m | 13 - JSONModelDemo_iOS/KivaViewController.h | 13 - JSONModelDemo_iOS/KivaViewController.m | 111 - JSONModelDemo_iOS/KivaViewController.xib | 37 - .../KivaViewControllerNetworking.h | 13 - .../KivaViewControllerNetworking.m | 92 - .../KivaViewControllerNetworking.xib | 37 - JSONModelDemo_iOS/LoanModel.h | 22 - JSONModelDemo_iOS/LoanModel.m | 13 - JSONModelDemo_iOS/LocationModel.h | 16 - JSONModelDemo_iOS/LocationModel.m | 19 - JSONModelDemo_iOS/MBProgressHUD.h | 521 ----- JSONModelDemo_iOS/MBProgressHUD.m | 1033 ---------- JSONModelDemo_iOS/MasterViewController.h | 12 - JSONModelDemo_iOS/MasterViewController.m | 95 - JSONModelDemo_iOS/MyDataModel.h | 16 - JSONModelDemo_iOS/MyDataModel.m | 13 - JSONModelDemo_iOS/StorageViewController.h | 13 - JSONModelDemo_iOS/StorageViewController.m | 67 - JSONModelDemo_iOS/StorageViewController.xib | 72 - JSONModelDemo_iOS/btnCheck.png | Bin 1334 -> 0 bytes JSONModelDemo_iOS/btnCheck@2x.png | Bin 3252 -> 0 bytes JSONModelDemo_iOS/en.lproj/InfoPlist.strings | 2 - .../en.lproj/MasterViewController.xib | 25 - JSONModelDemo_iOS/main.m | 18 - .../project.pbxproj | 387 ---- .../JSONModelDemo_tvOS/AppDelegate.h | 15 - .../JSONModelDemo_tvOS/AppDelegate.m | 17 - .../Content.imageset/Contents.json | 12 - .../Back.imagestacklayer/Contents.json | 6 - .../App Icon - Large.imagestack/Contents.json | 17 - .../Content.imageset/Contents.json | 12 - .../Front.imagestacklayer/Contents.json | 6 - .../Content.imageset/Contents.json | 12 - .../Middle.imagestacklayer/Contents.json | 6 - .../Content.imageset/Contents.json | 12 - .../Back.imagestacklayer/Contents.json | 6 - .../App Icon - Small.imagestack/Contents.json | 17 - .../Content.imageset/Contents.json | 12 - .../Front.imagestacklayer/Contents.json | 6 - .../Content.imageset/Contents.json | 12 - .../Middle.imagestacklayer/Contents.json | 6 - .../Contents.json | 26 - .../Top Shelf Image.imageset/Contents.json | 12 - .../Assets.xcassets/Contents.json | 6 - .../LaunchImage.launchimage/Contents.json | 15 - .../Base.lproj/Main.storyboard | 25 - .../JSONModelDemo_tvOS/Info.plist | 32 - .../JSONModelDemo_tvOS/ViewController.h | 13 - .../JSONModelDemo_tvOS/ViewController.m | 17 - JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m | 20 - .../AppIcon.appiconset/Contents.json | 55 - .../Base.lproj/Interface.storyboard | 15 - .../Info.plist | 35 - .../ExtensionDelegate.h | 13 - .../ExtensionDelegate.m | 13 - .../Info.plist | 40 - .../InterfaceController.h | 13 - .../InterfaceController.m | 17 - .../project.pbxproj | 666 ------ .../JSONModelDemo_watchOS/AppDelegate.h | 15 - .../JSONModelDemo_watchOS/AppDelegate.m | 17 - .../AppIcon.appiconset/Contents.json | 73 - .../Base.lproj/LaunchScreen.storyboard | 27 - .../Base.lproj/Main.storyboard | 26 - .../JSONModelDemo_watchOS/Info.plist | 47 - .../JSONModelDemo_watchOS/ViewController.h | 13 - .../JSONModelDemo_watchOS/ViewController.m | 17 - .../JSONModelDemo_watchOS/main.m | 20 - .../contents.xcworkspacedata | 19 - .../xcshareddata/JSONModelDemos.xccheckout | 41 - JSONModelOSX/AppDelegate.h | 15 - JSONModelOSX/AppDelegate.m | 35 - JSONModelOSX/JSONModelDemo_OSX-Info.plist | 34 - JSONModelOSX/JSONModelDemo_OSX-Prefix.pch | 7 - JSONModelOSX/KivaFeed.h | 16 - JSONModelOSX/KivaFeed.m | 13 - JSONModelOSX/LoanModel.h | 22 - JSONModelOSX/LoanModel.m | 13 - JSONModelOSX/LocationModel.h | 16 - JSONModelOSX/LocationModel.m | 19 - JSONModelOSX/ViewController.h | 13 - JSONModelOSX/ViewController.m | 174 -- JSONModelOSX/ViewController.xib | 131 -- JSONModelOSX/en.lproj/Credits.rtf | 36 - JSONModelOSX/en.lproj/InfoPlist.strings | 2 - JSONModelOSX/en.lproj/MainMenu.xib | 667 ------ JSONModelOSX/main.m | 14 - 218 files changed, 13827 deletions(-) delete mode 100644 JSONModelDemoTests/JSONModelDemoTests-Info.plist delete mode 100644 JSONModelDemoTests/JSONModelDemoTests-Prefix.pch delete mode 100644 JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist delete mode 100644 JSONModelDemoTests/MTTestSemaphor.h delete mode 100644 JSONModelDemoTests/MTTestSemaphor.m delete mode 100644 JSONModelDemoTests/MockNSURLConnection.h delete mode 100644 JSONModelDemoTests/MockNSURLConnection.m delete mode 100644 JSONModelDemoTests/UnitTests/ArrayTests.h delete mode 100644 JSONModelDemoTests/UnitTests/ArrayTests.m delete mode 100644 JSONModelDemoTests/UnitTests/BuiltInConversionsTests.h delete mode 100644 JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m delete mode 100644 JSONModelDemoTests/UnitTests/CustomPropsTests.h delete mode 100644 JSONModelDemoTests/UnitTests/CustomPropsTests.m delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/colors.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/converts.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/github-iphone.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/jsonTypes.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/nestedData.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithArrayError.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithDictionaryError.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithTypeMismatchOnImages.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithTypeMismatchOnImagesObject.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/post.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/primitives.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/primitivesWithErrors.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/specialPropertyName.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/withOptProp.json delete mode 100644 JSONModelDemoTests/UnitTests/DataFiles/withoutOptProp.json delete mode 100644 JSONModelDemoTests/UnitTests/ExtremeNestingTests.h delete mode 100644 JSONModelDemoTests/UnitTests/ExtremeNestingTests.m delete mode 100644 JSONModelDemoTests/UnitTests/HTTPClientSuite.h delete mode 100644 JSONModelDemoTests/UnitTests/HTTPClientSuite.m delete mode 100644 JSONModelDemoTests/UnitTests/IdPropertyTests.h delete mode 100644 JSONModelDemoTests/UnitTests/IdPropertyTests.m delete mode 100644 JSONModelDemoTests/UnitTests/InitFromWebTests.h delete mode 100644 JSONModelDemoTests/UnitTests/InitFromWebTests.m delete mode 100644 JSONModelDemoTests/UnitTests/InitWithDataTests.m delete mode 100644 JSONModelDemoTests/UnitTests/JSONAPITests.h delete mode 100644 JSONModelDemoTests/UnitTests/JSONAPITests.m delete mode 100644 JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.h delete mode 100644 JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.m delete mode 100644 JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.h delete mode 100644 JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.m delete mode 100644 JSONModelDemoTests/UnitTests/JSONTypesReadTests.h delete mode 100644 JSONModelDemoTests/UnitTests/JSONTypesReadTests.m delete mode 100644 JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.h delete mode 100644 JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.m delete mode 100644 JSONModelDemoTests/UnitTests/KeyMappingTests.h delete mode 100644 JSONModelDemoTests/UnitTests/KeyMappingTests.m delete mode 100644 JSONModelDemoTests/UnitTests/NestedModelsTests.h delete mode 100644 JSONModelDemoTests/UnitTests/NestedModelsTests.m delete mode 100644 JSONModelDemoTests/UnitTests/OptionalPropertiesTests.h delete mode 100644 JSONModelDemoTests/UnitTests/OptionalPropertiesTests.m delete mode 100644 JSONModelDemoTests/UnitTests/PersistTests.h delete mode 100644 JSONModelDemoTests/UnitTests/PersistTests.m delete mode 100644 JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.h delete mode 100644 JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.m delete mode 100644 JSONModelDemoTests/UnitTests/SimpleDataErrorTests.h delete mode 100644 JSONModelDemoTests/UnitTests/SimpleDataErrorTests.m delete mode 100644 JSONModelDemoTests/UnitTests/SpecialPropertiesTests.m delete mode 100644 JSONModelDemoTests/UnitTests/SpecialPropertyNameTests.h delete mode 100644 JSONModelDemoTests/UnitTests/SpecialPropertyNameTests.m delete mode 100644 JSONModelDemoTests/UnitTests/SpecialValuesTests.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/DrugModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/DrugModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/EnumModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/EnumModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/ImageModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/ImageModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/InteractionModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/InteractionModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/NestedModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/NestedModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/PostModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/PostModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/PostsModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/PostsModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/ReposModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/ReposModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.m delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.h delete mode 100644 JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.m delete mode 100644 JSONModelDemoTests/UnitTests/ValidationTestSuite.h delete mode 100644 JSONModelDemoTests/UnitTests/ValidationTestSuite.m delete mode 100644 JSONModelDemo_OSX.xcodeproj/project.pbxproj delete mode 100644 JSONModelDemo_OSX.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 JSONModelDemo_iOS.xcodeproj/project.pbxproj delete mode 100644 JSONModelDemo_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 JSONModelDemo_iOS/AppDelegate.h delete mode 100644 JSONModelDemo_iOS/AppDelegate.m delete mode 100644 JSONModelDemo_iOS/Default-568h@2x.png delete mode 100644 JSONModelDemo_iOS/Default.png delete mode 100644 JSONModelDemo_iOS/Default@2x.png delete mode 100644 JSONModelDemo_iOS/GitHubUserModel.h delete mode 100644 JSONModelDemo_iOS/GitHubUserModel.m delete mode 100644 JSONModelDemo_iOS/GitHubViewController.h delete mode 100644 JSONModelDemo_iOS/GitHubViewController.m delete mode 100644 JSONModelDemo_iOS/GitHubViewController.xib delete mode 100644 JSONModelDemo_iOS/HUD.h delete mode 100644 JSONModelDemo_iOS/HUD.m delete mode 100644 JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist delete mode 100644 JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch delete mode 100644 JSONModelDemo_iOS/KivaFeed.h delete mode 100644 JSONModelDemo_iOS/KivaFeed.m delete mode 100644 JSONModelDemo_iOS/KivaViewController.h delete mode 100644 JSONModelDemo_iOS/KivaViewController.m delete mode 100644 JSONModelDemo_iOS/KivaViewController.xib delete mode 100644 JSONModelDemo_iOS/KivaViewControllerNetworking.h delete mode 100644 JSONModelDemo_iOS/KivaViewControllerNetworking.m delete mode 100644 JSONModelDemo_iOS/KivaViewControllerNetworking.xib delete mode 100644 JSONModelDemo_iOS/LoanModel.h delete mode 100644 JSONModelDemo_iOS/LoanModel.m delete mode 100644 JSONModelDemo_iOS/LocationModel.h delete mode 100644 JSONModelDemo_iOS/LocationModel.m delete mode 100755 JSONModelDemo_iOS/MBProgressHUD.h delete mode 100755 JSONModelDemo_iOS/MBProgressHUD.m delete mode 100644 JSONModelDemo_iOS/MasterViewController.h delete mode 100644 JSONModelDemo_iOS/MasterViewController.m delete mode 100644 JSONModelDemo_iOS/MyDataModel.h delete mode 100644 JSONModelDemo_iOS/MyDataModel.m delete mode 100644 JSONModelDemo_iOS/StorageViewController.h delete mode 100644 JSONModelDemo_iOS/StorageViewController.m delete mode 100644 JSONModelDemo_iOS/StorageViewController.xib delete mode 100644 JSONModelDemo_iOS/btnCheck.png delete mode 100644 JSONModelDemo_iOS/btnCheck@2x.png delete mode 100644 JSONModelDemo_iOS/en.lproj/InfoPlist.strings delete mode 100644 JSONModelDemo_iOS/en.lproj/MasterViewController.xib delete mode 100644 JSONModelDemo_iOS/main.m delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.h delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.m delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Base.lproj/Main.storyboard delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/Info.plist delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.h delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.m delete mode 100644 JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Base.lproj/Interface.storyboard delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Info.plist delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.h delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.m delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/Info.plist delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.h delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.m delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.h delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.m delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/LaunchScreen.storyboard delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/Main.storyboard delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/Info.plist delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.h delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.m delete mode 100644 JSONModelDemo_watchOS/JSONModelDemo_watchOS/main.m delete mode 100644 JSONModelDemos.xcworkspace/contents.xcworkspacedata delete mode 100644 JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout delete mode 100644 JSONModelOSX/AppDelegate.h delete mode 100644 JSONModelOSX/AppDelegate.m delete mode 100644 JSONModelOSX/JSONModelDemo_OSX-Info.plist delete mode 100644 JSONModelOSX/JSONModelDemo_OSX-Prefix.pch delete mode 100644 JSONModelOSX/KivaFeed.h delete mode 100644 JSONModelOSX/KivaFeed.m delete mode 100644 JSONModelOSX/LoanModel.h delete mode 100644 JSONModelOSX/LoanModel.m delete mode 100644 JSONModelOSX/LocationModel.h delete mode 100644 JSONModelOSX/LocationModel.m delete mode 100644 JSONModelOSX/ViewController.h delete mode 100644 JSONModelOSX/ViewController.m delete mode 100644 JSONModelOSX/ViewController.xib delete mode 100644 JSONModelOSX/en.lproj/Credits.rtf delete mode 100644 JSONModelOSX/en.lproj/InfoPlist.strings delete mode 100644 JSONModelOSX/en.lproj/MainMenu.xib delete mode 100644 JSONModelOSX/main.m diff --git a/JSONModelDemoTests/JSONModelDemoTests-Info.plist b/JSONModelDemoTests/JSONModelDemoTests-Info.plist deleted file mode 100644 index 169b6f71..00000000 --- a/JSONModelDemoTests/JSONModelDemoTests-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/JSONModelDemoTests/JSONModelDemoTests-Prefix.pch b/JSONModelDemoTests/JSONModelDemoTests-Prefix.pch deleted file mode 100644 index ff499d9a..00000000 --- a/JSONModelDemoTests/JSONModelDemoTests-Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'JSONModelDemoTests' target in the 'JSONModelDemoTests' project -// - -#ifdef __OBJC__ - - #import - -#endif diff --git a/JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist b/JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist deleted file mode 100644 index 169b6f71..00000000 --- a/JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/JSONModelDemoTests/MTTestSemaphor.h b/JSONModelDemoTests/MTTestSemaphor.h deleted file mode 100644 index 7a49f2c6..00000000 --- a/JSONModelDemoTests/MTTestSemaphor.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// MTTestSemaphor -// -// @version 0.1 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. - -#import - -@interface MTTestSemaphor : NSObject - -+(instancetype)semaphore; - --(BOOL)isLifted:(NSString*)key; --(void)lift:(NSString*)key; --(void)waitForKey:(NSString*)key; --(NSDictionary*)flags; - -@end diff --git a/JSONModelDemoTests/MTTestSemaphor.m b/JSONModelDemoTests/MTTestSemaphor.m deleted file mode 100644 index c7b699db..00000000 --- a/JSONModelDemoTests/MTTestSemaphor.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// MTTestSemaphor -// -// @version 0.1 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. - -#import "MTTestSemaphor.h" - -@implementation MTTestSemaphor -{ - NSMutableDictionary* flags; -} - -+(instancetype)semaphore -{ - static MTTestSemaphor *sharedInstance = nil; - static dispatch_once_t once; - - dispatch_once(&once, ^{ - sharedInstance = [[MTTestSemaphor alloc] _initPrivate]; - }); - - return sharedInstance; -} - --(id)_initPrivate -{ - self = [super init]; - if (self != nil) { - flags = [NSMutableDictionary dictionaryWithCapacity:10]; - } - return self; -} - --(BOOL)isLifted:(NSString*)key -{ - NSLog(@"check key: %@", key); - NSLog(@"key value: %@", flags[key]); - return [flags objectForKey:key]==nil; -} - --(void)lift:(NSString*)key -{ - NSLog(@"lift key '%@'", key); - [flags removeObjectForKey: key]; -} - --(void)waitForKey:(NSString*)key -{ - NSLog(@"begin waiting on '%@' : %@", key, flags); - [flags setObject:@"YES" forKey: key]; - - BOOL keepRunning = YES; - while (keepRunning) { - [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:1.0]]; - keepRunning = ![[MTTestSemaphor semaphore] isLifted: key]; - } - - NSLog(@"end waiting on '%@': %@",key, flags); -} - --(NSDictionary*)flags -{ - return flags; -} - -@end \ No newline at end of file diff --git a/JSONModelDemoTests/MockNSURLConnection.h b/JSONModelDemoTests/MockNSURLConnection.h deleted file mode 100644 index f0d838fb..00000000 --- a/JSONModelDemoTests/MockNSURLConnection.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// MockNSURLConnection.h -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 3/26/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import - -@interface NSURLConnection (Mock) - -+(void)setNextResponse:(NSHTTPURLResponse*)response data:(NSData*)data error:(NSError*)error; -+(NSURLRequest*)lastRequest; - -+(void)setResponseDelay:(int)seconds; - -@end diff --git a/JSONModelDemoTests/MockNSURLConnection.m b/JSONModelDemoTests/MockNSURLConnection.m deleted file mode 100644 index d4de37dd..00000000 --- a/JSONModelDemoTests/MockNSURLConnection.m +++ /dev/null @@ -1,68 +0,0 @@ -// -// MockNSURLConnection.m -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 3/26/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import "MockNSURLConnection.h" -#import "MTTestSemaphor.h" - -static NSHTTPURLResponse* nextResponse = nil; -static NSError* nextError = nil; -static NSData* nextData = nil; -static NSURLRequest* lastRequest = nil; - -static int responseDelayInSeconds = 0; - -@implementation NSURLConnection(Mock) - -+(void)setNextResponse:(NSHTTPURLResponse*)response data:(NSData*)data error:(NSError*)error -{ - nextResponse = response; - nextData = data; - nextError = error; -} - -+(NSURLRequest*)lastRequest -{ - return lastRequest; -} - -+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSHTTPURLResponse **)response error:(NSError **)error -{ - if (responseDelayInSeconds>0) { - [NSThread sleepForTimeInterval: responseDelayInSeconds]; - } - - lastRequest = request; - *response = nextResponse; - *error = nextError; - return nextData; -} - -+ (void)sendAsynchronousRequest:(NSURLRequest *)request queue:(NSOperationQueue *)queue completionHandler:(void (^)(NSURLResponse *, NSData *, NSError *))handler -{ - lastRequest = request; - - dispatch_queue_t dQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - - dispatch_block_t dBlock = ^{ - handler(nextResponse, nextData, nextError); - }; - - if (responseDelayInSeconds > 0) { - dispatch_time_t dTime = dispatch_time(DISPATCH_TIME_NOW, responseDelayInSeconds * NSEC_PER_SEC); - dispatch_after(dTime, dQueue, dBlock); - } else { - dispatch_async(dQueue, dBlock); - } -} - -+(void)setResponseDelay:(int)seconds -{ - responseDelayInSeconds = seconds; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/ArrayTests.h b/JSONModelDemoTests/UnitTests/ArrayTests.h deleted file mode 100644 index 6fc47f03..00000000 --- a/JSONModelDemoTests/UnitTests/ArrayTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ArrayTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface ArrayTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/ArrayTests.m b/JSONModelDemoTests/UnitTests/ArrayTests.m deleted file mode 100644 index 31296d12..00000000 --- a/JSONModelDemoTests/UnitTests/ArrayTests.m +++ /dev/null @@ -1,95 +0,0 @@ -// -// ArrayTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "ArrayTests.h" -#import "JSONModelLib.h" -#import "ReposModel.h" - -@implementation ArrayTests -{ - ReposModel* repos; - ReposProtocolArrayModel* reposProtocolArray; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"github-iphone.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - repos = [[ReposModel alloc] initWithString:jsonContents error:&err]; - XCTAssertNil(err, @"%@", [err localizedDescription]); - - reposProtocolArray = [[ReposProtocolArrayModel alloc] initWithString:jsonContents error:&err]; - XCTAssertNil(err, @"%@", [err localizedDescription]); - - XCTAssertNotNil(repos, @"Could not load the test data file."); - -} - --(void)testLoading -{ - XCTAssertTrue([repos.repositories isKindOfClass:[NSArray class]], @".properties is not a NSArray"); - XCTAssertEqualObjects([[repos.repositories[0] class] description], @"GitHubRepoModel", @".properties[0] is not a GitHubRepoModel"); - - XCTAssertTrue([reposProtocolArray.repositories isKindOfClass:[NSArray class]], @".properties is not a NSArray"); - XCTAssertEqualObjects([[reposProtocolArray.repositories[0] class] description], @"GitHubRepoModel", @".properties[0] is not a GitHubRepoModel"); -} - --(void)testCount -{ - XCTAssertEqualObjects(@(repos.repositories.count), @100, @"wrong count"); - XCTAssertEqualObjects(@(reposProtocolArray.repositories.count), @100, @"wrong count"); -} - --(void)testFastEnumeration -{ - for (GitHubRepoModel *m in repos.repositories) { - XCTAssertNoThrow([m created], @"should not throw exception"); - } - - for (GitHubRepoModel *m in reposProtocolArray.repositories) { - XCTAssertNoThrow([m created], @"should not throw exception"); - } -} - --(void)testFirstObject -{ - XCTAssertEqualObjects([[repos.repositories.firstObject class] description], @"GitHubRepoModel", @"wrong class"); - XCTAssertEqualObjects([[reposProtocolArray.repositories.firstObject class] description], @"GitHubRepoModel", @"wrong class"); -} - -/* - * https://github.com/JSONModel/JSONModel/pull/14 - */ --(void)testArrayReverseTransformGitHubIssue_14 -{ - NSDictionary* dict = [repos toDictionary]; - XCTAssertNotNil(dict, @"Could not convert ReposModel back to an NSDictionary"); - - NSDictionary* dict2 = [reposProtocolArray toDictionary]; - XCTAssertNotNil(dict2, @"Could not convert ReposProtocolArrayModel back to an NSDictionary"); -} - -/* - * https://github.com/JSONModel/JSONModel/issues/15 - */ --(void)testArrayReverseTransformGitHubIssue_15 -{ - NSString* string = [repos toJSONString]; - XCTAssertNotNil(string, @"Could not convert ReposModel back to a string"); - - NSString* string2 = [reposProtocolArray toJSONString]; - XCTAssertNotNil(string2, @"Could not convert ReposProtocolArrayModel back to a string"); -} - -@end diff --git a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.h b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.h deleted file mode 100644 index a4bcc1ac..00000000 --- a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// BuiltInConversionsTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface BuiltInConversionsTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m b/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m deleted file mode 100644 index 1f3b774d..00000000 --- a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// BuiltInConversionsTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "BuiltInConversionsTests.h" -#import "BuiltInConversionsModel.h" - -@implementation BuiltInConversionsTests -{ - BuiltInConversionsModel* b; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"converts.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - b = [[BuiltInConversionsModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(b, @"Could not load the test data file."); -} - --(void)testConversions -{ - XCTAssertTrue(b.isItYesOrNo==YES, @"isItYesOrNo value is not YES"); - - XCTAssertTrue(b.boolFromBoolean==YES, @"boolFromBoolean is not YES"); - XCTAssertTrue(b.boolFromNumber==YES, @"boolFromNumber is not YES"); - XCTAssertTrue(b.boolFromString==YES, @"boolFromString is not YES"); - - - XCTAssertTrue([b.unorderedList isKindOfClass:[NSSet class]], @"unorderedList is not an NSSet object"); - XCTAssertTrue([b.unorderedList anyObject], @"unorderedList don't have any objects"); - - XCTAssertTrue([b.dynamicUnorderedList isKindOfClass:[NSMutableSet class]], @"dynamicUnorderedList is not an NSMutableSet object"); - XCTAssertTrue([b.dynamicUnorderedList anyObject], @"dynamicUnorderedList don't have any objects"); - - NSUInteger nrOfObjects = [b.dynamicUnorderedList allObjects].count; - - [b.dynamicUnorderedList addObject:@"ADDED"]; - XCTAssertTrue(nrOfObjects + 1 == [b.dynamicUnorderedList allObjects].count, @"dynamicUnorderedList didn't add an object"); - - XCTAssertTrue([b.stringFromNumber isKindOfClass:[NSString class]], @"stringFromNumber is not an NSString"); - XCTAssertTrue([b.stringFromNumber isEqualToString:@"19.95"], @"stringFromNumber's value is not 19.95"); - - XCTAssertTrue([b.numberFromString isKindOfClass:[NSNumber class]], @"numberFromString is not an NSNumber"); - XCTAssertEqualObjects(b.doubleFromString, @16909129); - - //TODO: I had to hardcode the float epsilon below, bcz actually [NSNumber floatValue] was returning a bigger deviation than FLT_EPSILON - // IDEAS? - XCTAssertEqualWithAccuracy([b.numberFromString floatValue], 1230.99, 0.001, @"numberFromString's value is not 1230.99"); - - XCTAssertTrue([b.importantEvent isKindOfClass:[NSDate class]], @"importantEvent is not an NSDate"); - XCTAssertTrue((long)[b.importantEvent timeIntervalSince1970] == 1353916801, @"importantEvent value was not read properly"); - - //test for a valid URL - //https://github.com/JSONModel/JSONModel/pull/60 - XCTAssertNotNil(b.websiteURL, @"URL parsing did return nil"); - XCTAssertNotNil(b.websiteURL.query, @"key1=test"); - - // see: https://github.com/JSONModel/JSONModel/pull/119 - XCTAssertEqualObjects(b.websiteURL.absoluteString, @"http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test&q=search%20terms"); - - XCTAssertNotNil(b.timeZone, @"Time zone parsing did return nil"); - XCTAssertEqualObjects([b.timeZone name], @"PST", @"Time zone is not PST"); - - XCTAssertTrue([b.stringArray.firstObject isKindOfClass:[NSString class]], @"The array element is not a string"); -} - -@end diff --git a/JSONModelDemoTests/UnitTests/CustomPropsTests.h b/JSONModelDemoTests/UnitTests/CustomPropsTests.h deleted file mode 100644 index 29410b7e..00000000 --- a/JSONModelDemoTests/UnitTests/CustomPropsTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// CustomPropsTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface CustomPropsTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/CustomPropsTests.m b/JSONModelDemoTests/UnitTests/CustomPropsTests.m deleted file mode 100644 index 2bc21056..00000000 --- a/JSONModelDemoTests/UnitTests/CustomPropsTests.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// CustomPropsTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "CustomPropsTests.h" -#import "CustomPropertyModel.h" - -#import "QuartzCore/QuartzCore.h" - -@implementation CustomPropsTests -{ - CustomPropertyModel* c; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"colors.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - c = [[CustomPropertyModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(c, @"Could not load the test data file."); -} - --(void)testColors -{ -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED - XCTAssertTrue([c.redColor isKindOfClass:[UIColor class]], @"redColor is not a Color instance"); - CGColorRef redColor = [UIColor redColor].CGColor; -#else - XCTAssertTrue([c.redColor isKindOfClass:[NSColor class]], @"redColor is not a Color instance"); - CGColorRef redColor = [NSColor redColor].CGColor; -#endif - - XCTAssertTrue(CGColorEqualToColor(c.redColor.CGColor, redColor), @"redColor's value is not red color"); -} - - -@end diff --git a/JSONModelDemoTests/UnitTests/DataFiles/colors.json b/JSONModelDemoTests/UnitTests/DataFiles/colors.json deleted file mode 100644 index cdd10b51..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/colors.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "redColor": "#ff0000", - "blueColor": "#0000ff" -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/converts.json b/JSONModelDemoTests/UnitTests/DataFiles/converts.json deleted file mode 100644 index cf3aa46b..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/converts.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "isItYesOrNo": 1, - "boolFromString" : "1", - "boolFromNumber" : 1, - "boolFromBoolean" : true, - - "unorderedList": ["1","5","7","2"], - "dynamicUnorderedList": ["a", "3"], - - "stringFromNumber": 19.95, - "numberFromString": "1230.99", - "doubleFromString": "16909129", - - "importantEvent": "2012-11-26T10:00:01+02:00", - - "websiteURL": "http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test&q=search%20terms", - - "timeZone": "PST", - - "stringArray": ["one", "two", "three"] -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/github-iphone.json b/JSONModelDemoTests/UnitTests/DataFiles/github-iphone.json deleted file mode 100644 index 698e9371..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/github-iphone.json +++ /dev/null @@ -1,1804 +0,0 @@ -{ - "repositories": [ - { - "type": "repo", - "created": "2010-03-31T12:07:59-07:00", - "pushed_at": "2012-12-18T19:21:35-08:00", - "watchers": 2412, - "owner": "cocos2d", - "pushed": "2012-12-18T19:21:35-08:00", - "forks": 556, - "username": "cocos2d", - "description": "cocos2d for iPhone", - "language": "Objective-C", - "fork": false, - "size": 7128, - "followers": 2412, - "name": "cocos2d-iphone", - "private": false, - "created_at": "2010-03-31T12:07:59-07:00" - }, - { - "type": "repo", - "created": "2008-10-22T11:45:41-07:00", - "pushed_at": "2012-06-22T17:03:53-07:00", - "watchers": 863, - "owner": "ldandersen", - "pushed": "2012-06-22T17:03:53-07:00", - "forks": 133, - "username": "ldandersen", - "description": "Open source iPhone code", - "language": "Objective-C", - "fork": false, - "size": 164, - "followers": 863, - "name": "scifihifi-iphone", - "private": false, - "created_at": "2008-10-22T11:45:41-07:00" - }, - { - "type": "repo", - "created": "2009-04-14T11:41:03-07:00", - "pushed_at": "2011-10-21T01:41:26-07:00", - "watchers": 900, - "owner": "erica", - "pushed": "2011-10-21T01:41:26-07:00", - "forks": 166, - "username": "erica", - "description": "Sample Code", - "language": "Objective-C", - "fork": false, - "size": 312, - "followers": 900, - "name": "iphone-3.0-cookbook-", - "private": false, - "created_at": "2009-04-14T11:41:03-07:00" - }, - { - "type": "repo", - "created": "2009-06-04T11:23:51-07:00", - "pushed_at": "2012-07-03T07:54:22-07:00", - "watchers": 488, - "owner": "c99koder", - "pushed": "2012-07-03T07:54:22-07:00", - "forks": 80, - "username": "c99koder", - "description": "The official Last.fm iPhone application", - "language": "Objective-C", - "fork": false, - "size": 3072, - "followers": 488, - "name": "lastfm-iphone", - "private": false, - "created_at": "2009-06-04T11:23:51-07:00" - }, - { - "type": "repo", - "created": "2009-07-27T04:47:29-07:00", - "pushed_at": "2012-10-11T13:21:17-07:00", - "watchers": 778, - "owner": "bengottlieb", - "pushed": "2012-10-11T13:21:17-07:00", - "forks": 150, - "username": "bengottlieb", - "description": "An easy way to get Twitter authenticating with OAuth on iPhone", - "language": "Objective-C", - "fork": false, - "size": 160, - "followers": 778, - "name": "Twitter-OAuth-iPhone", - "private": false, - "created_at": "2009-07-27T04:47:29-07:00" - }, - { - "type": "repo", - "created": "2012-08-12T21:10:01-07:00", - "pushed_at": "2012-12-04T00:38:38-08:00", - "watchers": 159, - "owner": "oschina", - "pushed": "2012-12-04T00:38:38-08:00", - "forks": 146, - "username": "oschina", - "description": "OSCHINA 的 iPhone 客户端源码,可直接在 App Store上搜索“开源中国”来安装此app", - "language": "Objective-C", - "fork": false, - "size": 284, - "followers": 159, - "name": "iphone-app", - "private": false, - "created_at": "2012-08-12T21:10:01-07:00" - }, - { - "type": "repo", - "created": "2009-02-18T22:31:51-08:00", - "pushed_at": "2012-10-18T02:30:54-07:00", - "watchers": 7153, - "owner": "facebook", - "pushed": "2012-10-18T02:30:54-07:00", - "forks": 1294, - "username": "facebook", - "description": "Three20 is an Objective-C library for iPhone developers", - "language": "Objective-C", - "fork": false, - "size": 4608, - "followers": 7153, - "name": "three20", - "private": false, - "created_at": "2009-02-18T22:31:51-08:00" - }, - { - "type": "repo", - "created": "2009-06-15T20:34:15-07:00", - "pushed_at": "2012-10-31T10:58:15-07:00", - "watchers": 539, - "owner": "tdreyno", - "pushed": "2012-10-31T10:58:15-07:00", - "forks": 88, - "username": "tdreyno", - "description": "Turn your checkboxes into iOS-style binary switches", - "language": "CoffeeScript", - "fork": false, - "size": 148, - "followers": 539, - "name": "iphone-style-checkboxes", - "private": false, - "created_at": "2009-06-15T20:34:15-07:00" - }, - { - "type": "repo", - "created": "2009-07-08T12:58:18-07:00", - "pushed_at": "2010-06-08T13:00:14-07:00", - "watchers": 496, - "owner": "kennytm", - "pushed": "2010-06-08T13:00:14-07:00", - "forks": 85, - "username": "kennytm", - "description": "Headers for private frameworks or undocumented interfaces of iPhoneOS 3.x or before (4.x is not supported yet).", - "language": "C", - "fork": false, - "size": 284, - "followers": 496, - "name": "iphone-private-frameworks", - "private": false, - "created_at": "2009-07-08T12:58:18-07:00" - }, - { - "type": "repo", - "created": "2011-05-30T08:37:32-07:00", - "pushed_at": "2012-04-22T05:58:55-07:00", - "watchers": 520, - "owner": "cocos2d", - "pushed": "2012-04-22T05:58:55-07:00", - "forks": 117, - "username": "cocos2d", - "description": "3rd party extensions for cocos2d for iPHone", - "language": "Objective-C", - "fork": false, - "size": 396, - "followers": 520, - "name": "cocos2d-iphone-extensions", - "private": false, - "created_at": "2011-05-30T08:37:32-07:00" - }, - { - "type": "repo", - "created": "2010-11-18T15:17:00-08:00", - "pushed_at": "2012-12-16T23:40:28-08:00", - "watchers": 1003, - "owner": "cocos2d", - "pushed": "2012-12-16T23:40:28-08:00", - "forks": 487, - "username": "cocos2d", - "description": "Port of cocos2d-iphone in C++", - "language": "C", - "fork": false, - "size": 9644, - "followers": 1003, - "name": "cocos2d-x", - "private": false, - "created_at": "2010-11-18T15:17:00-08:00" - }, - { - "type": "repo", - "created": "2011-01-06T13:21:52-08:00", - "pushed_at": "2012-08-25T09:20:18-07:00", - "watchers": 336, - "owner": "gdavis", - "pushed": "2012-08-25T09:20:18-07:00", - "forks": 82, - "username": "gdavis", - "description": "Objective-C based gallery for iPhones", - "language": "Objective-C", - "fork": false, - "size": 164, - "followers": 336, - "name": "FGallery-iPhone", - "private": false, - "created_at": "2011-01-06T13:21:52-08:00" - }, - { - "type": "repo", - "created": "2009-03-05T10:28:43-08:00", - "pushed_at": "2011-05-08T18:00:18-07:00", - "watchers": 390, - "owner": "niw", - "pushed": "2011-05-08T18:00:18-07:00", - "forks": 67, - "username": "niw", - "description": "Test application for iPhone with OpenCV library", - "language": "C++", - "fork": false, - "size": 12344, - "followers": 390, - "name": "iphone_opencv_test", - "private": false, - "created_at": "2009-03-05T10:28:43-08:00" - }, - { - "type": "repo", - "created": "2009-05-15T19:07:23-07:00", - "pushed_at": "2012-11-14T08:22:14-08:00", - "watchers": 998, - "owner": "atebits", - "pushed": "2012-11-14T08:22:14-08:00", - "forks": 107, - "username": "atebits", - "description": "Screencasting for iPhone", - "language": "Objective-C", - "fork": false, - "size": 172, - "followers": 998, - "name": "SimFinger", - "private": false, - "created_at": "2009-05-15T19:07:23-07:00" - }, - { - "type": "repo", - "created": "2009-12-31T13:26:00-08:00", - "pushed_at": "2011-04-11T20:56:45-07:00", - "watchers": 284, - "owner": "nolanbrown", - "pushed": "2011-04-11T20:56:45-07:00", - "forks": 65, - "username": "nolanbrown", - "description": "Demo iPhone app utilizing the tesseract library for OCR", - "language": "C++", - "fork": false, - "size": 188, - "followers": 284, - "name": "Tesseract-iPhone-Demo", - "private": false, - "created_at": "2009-12-31T13:26:00-08:00" - }, - { - "type": "repo", - "created": "2010-07-14T10:48:47-07:00", - "pushed_at": "2012-12-14T16:58:55-08:00", - "watchers": 117, - "owner": "mixpanel", - "pushed": "2012-12-14T16:58:55-08:00", - "forks": 42, - "username": "mixpanel", - "description": "iPhone tracking library for Mixpanel Analytics", - "language": "Objective-C", - "fork": false, - "size": 288, - "followers": 117, - "name": "mixpanel-iphone", - "private": false, - "created_at": "2010-07-14T10:48:47-07:00" - }, - { - "type": "repo", - "created": "2010-02-03T04:27:50-08:00", - "pushed_at": "2012-02-01T15:29:10-08:00", - "watchers": 147, - "owner": "wikimedia", - "pushed": "2012-02-01T15:29:10-08:00", - "forks": 34, - "username": "wikimedia", - "description": "", - "language": "Objective-C", - "fork": false, - "size": 292, - "followers": 147, - "name": "wikipedia-iphone", - "private": false, - "created_at": "2010-02-03T04:27:50-08:00" - }, - { - "type": "repo", - "created": "2010-06-12T12:40:45-07:00", - "pushed_at": "2012-12-05T09:40:55-08:00", - "watchers": 469, - "owner": "kstenerud", - "pushed": "2012-12-05T09:40:55-08:00", - "forks": 52, - "username": "kstenerud", - "description": "Mac and iOS Audio development, minus the headache. ObjectAL is the easy Objective-C interface to OpenAL, AVAudioPlayer, and audio session management.", - "language": "Objective-C", - "fork": false, - "size": 348, - "followers": 469, - "name": "ObjectAL-for-iPhone", - "private": false, - "created_at": "2010-06-12T12:40:45-07:00" - }, - { - "type": "repo", - "created": "2009-08-17T09:50:47-07:00", - "pushed_at": "2011-10-16T18:07:47-07:00", - "watchers": 828, - "owner": "thefaj", - "pushed": "2011-10-16T18:07:47-07:00", - "forks": 150, - "username": "thefaj", - "description": "CoverFlow API replacement for the iPhone", - "language": "Objective-C", - "fork": false, - "size": 204, - "followers": 828, - "name": "OpenFlow", - "private": false, - "created_at": "2009-08-17T09:50:47-07:00" - }, - { - "type": "repo", - "created": "2010-07-06T13:25:58-07:00", - "pushed_at": "2011-10-31T11:51:02-07:00", - "watchers": 1744, - "owner": "ideashower", - "pushed": "2011-10-31T11:51:02-07:00", - "forks": 386, - "username": "ideashower", - "description": "Drop in sharing features for all iPhone and iPad apps", - "language": "Objective-C", - "fork": false, - "size": 812, - "followers": 1744, - "name": "ShareKit", - "private": false, - "created_at": "2010-07-06T13:25:58-07:00" - }, - { - "type": "repo", - "created": "2009-05-01T11:40:01-07:00", - "pushed_at": "2012-07-12T22:04:08-07:00", - "watchers": 391, - "owner": "haqu", - "pushed": "2012-07-12T22:04:08-07:00", - "forks": 86, - "username": "haqu", - "description": "iPhone game", - "language": "Objective-C", - "fork": false, - "size": 180, - "followers": 391, - "name": "tweejump", - "private": false, - "created_at": "2009-05-01T11:40:01-07:00" - }, - { - "type": "repo", - "created": "2010-05-28T13:52:32-07:00", - "pushed_at": "2012-12-14T14:45:44-08:00", - "watchers": 144, - "owner": "uservoice", - "pushed": "2012-12-14T14:45:44-08:00", - "forks": 57, - "username": "uservoice", - "description": "UserVoice for iOS SDK for iPhone and iPad apps", - "language": "Objective-C", - "fork": false, - "size": 67453, - "followers": 144, - "name": "uservoice-iphone-sdk", - "private": false, - "created_at": "2010-05-28T13:52:32-07:00" - }, - { - "type": "repo", - "created": "2011-09-04T10:14:37-07:00", - "pushed_at": "2012-12-14T09:10:22-08:00", - "watchers": 1185, - "owner": "ShareKit", - "pushed": "2012-12-14T09:10:22-08:00", - "forks": 434, - "username": "ShareKit", - "description": "Drop in sharing features for all iPhone and iPad apps", - "language": "Objective-C", - "fork": false, - "size": 638, - "followers": 1185, - "name": "ShareKit", - "private": false, - "created_at": "2011-09-04T10:14:37-07:00" - }, - { - "type": "repo", - "created": "2009-07-13T11:40:48-07:00", - "pushed_at": "2012-05-22T02:54:53-07:00", - "watchers": 1210, - "owner": "capttaco", - "pushed": "2012-05-22T02:54:53-07:00", - "forks": 87, - "username": "capttaco", - "description": "Framework for iPhone wireframes", - "language": "Objective-C", - "fork": false, - "size": 128, - "followers": 1210, - "name": "Briefs", - "private": false, - "created_at": "2009-07-13T11:40:48-07:00" - }, - { - "type": "repo", - "created": "2010-10-21T06:51:05-07:00", - "pushed_at": "2012-12-17T08:28:09-08:00", - "watchers": 90, - "owner": "mixare", - "pushed": "2012-12-17T08:28:09-08:00", - "forks": 28, - "username": "mixare", - "description": "mixare (mix Augmented Reality Engine) is a free open source augmented reality browser, which is published under the GPLv3. This repository contains the iphone version", - "language": "Objective-C", - "fork": false, - "size": 344, - "followers": 90, - "name": "mixare-iphone", - "private": false, - "created_at": "2010-10-21T06:51:05-07:00" - }, - { - "type": "repo", - "created": "2011-04-04T19:07:42-07:00", - "pushed_at": "2012-11-08T21:27:45-08:00", - "watchers": 588, - "owner": "Xuzz", - "pushed": "2012-11-08T21:27:45-08:00", - "forks": 118, - "username": "Xuzz", - "description": "An iPhone Hacker News client.", - "language": "Objective-C", - "fork": false, - "size": 228, - "followers": 588, - "name": "newsyc", - "private": false, - "created_at": "2011-04-04T19:07:42-07:00" - }, - { - "type": "repo", - "created": "2008-08-03T11:00:05-07:00", - "pushed_at": "2009-12-03T17:28:39-08:00", - "watchers": 1694, - "owner": "sintaxi", - "pushed": "2009-12-03T17:28:39-08:00", - "forks": 631, - "username": "sintaxi", - "description": "access core functions on Android, iPhone and Blackberry using JavaScript", - "language": "JavaScript", - "fork": false, - "size": 608, - "followers": 1694, - "name": "phonegap", - "private": false, - "created_at": "2008-08-03T11:00:05-07:00" - }, - { - "type": "repo", - "created": "2011-08-17T15:21:46-07:00", - "pushed_at": "2011-11-24T14:34:30-08:00", - "watchers": 85, - "owner": "yoshiokatsuneo", - "pushed": "2011-11-24T14:34:30-08:00", - "forks": 26, - "username": "yoshiokatsuneo", - "description": "CamLingual for iPhone(iOS)", - "language": "Objective-C", - "fork": false, - "size": 120, - "followers": 85, - "name": "camlingual_iphone", - "private": false, - "created_at": "2011-08-17T15:21:46-07:00" - }, - { - "type": "repo", - "created": "2010-07-25T10:44:33-07:00", - "pushed_at": "2012-08-08T14:59:53-07:00", - "watchers": 1682, - "owner": "leah", - "pushed": "2012-08-08T14:59:53-07:00", - "forks": 203, - "username": "leah", - "description": "A simple iPhone TableViewController for adding pull-to-refresh functionality.", - "language": "Objective-C", - "fork": false, - "size": 176, - "followers": 1682, - "name": "PullToRefresh", - "private": false, - "created_at": "2010-07-25T10:44:33-07:00" - }, - { - "type": "repo", - "created": "2009-04-23T01:21:13-07:00", - "pushed_at": "2011-09-20T01:59:01-07:00", - "watchers": 229, - "owner": "tapsandswipes", - "pushed": "2011-09-20T01:59:01-07:00", - "forks": 26, - "username": "tapsandswipes", - "description": "A pie menu implementation specially designed for iPhone and iPod touch", - "language": "Objective-C", - "fork": false, - "size": 120, - "followers": 229, - "name": "iphone-pie-menu", - "private": false, - "created_at": "2009-04-23T01:21:13-07:00" - }, - { - "type": "repo", - "created": "2011-06-08T01:38:54-07:00", - "pushed_at": "2012-11-15T04:47:00-08:00", - "watchers": 588, - "owner": "haqu", - "pushed": "2012-11-15T04:47:00-08:00", - "forks": 86, - "username": "haqu", - "description": "Remake of the popular iPhone game.", - "language": "Objective-C", - "fork": false, - "size": 208, - "followers": 588, - "name": "tiny-wings", - "private": false, - "created_at": "2011-06-08T01:38:54-07:00" - }, - { - "type": "repo", - "created": "2008-07-14T14:43:50-07:00", - "pushed_at": "2012-07-30T08:22:30-07:00", - "watchers": 4289, - "owner": "pokeb", - "pushed": "2012-07-30T08:22:30-07:00", - "forks": 806, - "username": "pokeb", - "description": "Easy to use CFNetwork wrapper for HTTP requests, Objective-C, Mac OS X and iPhone", - "language": "Objective-C", - "fork": false, - "size": 864, - "followers": 4289, - "name": "asi-http-request", - "private": false, - "created_at": "2008-07-14T14:43:50-07:00" - }, - { - "type": "repo", - "created": "2009-12-18T19:46:11-08:00", - "pushed_at": "2012-05-26T07:16:36-07:00", - "watchers": 234, - "owner": "nielswh", - "pushed": "2012-05-26T07:16:36-07:00", - "forks": 45, - "username": "nielswh", - "description": "An Objective-C augmented reality kit for iPhone. Forked from the iphonearkit.", - "language": "Objective-C", - "fork": true, - "size": 152, - "followers": 234, - "name": "iPhone-AR-Toolkit", - "private": false, - "created_at": "2009-12-18T19:46:11-08:00" - }, - { - "type": "repo", - "created": "2012-08-16T22:41:57-07:00", - "pushed_at": "2012-11-17T12:14:34-08:00", - "watchers": 3136, - "owner": "maker", - "pushed": "2012-11-17T12:14:34-08:00", - "forks": 256, - "username": "maker", - "description": "Prototype iPhone apps with simple HTML, CSS, and JS components. ", - "language": "JavaScript", - "fork": false, - "size": 616, - "followers": 3136, - "name": "ratchet", - "private": false, - "created_at": "2012-08-16T22:41:57-07:00" - }, - { - "type": "repo", - "created": "2010-04-17T11:58:21-07:00", - "pushed_at": "2012-09-28T18:11:00-07:00", - "watchers": 1920, - "owner": "AlanQuatermain", - "pushed": "2012-09-28T18:11:00-07:00", - "forks": 354, - "username": "AlanQuatermain", - "description": "A grid view for iPhone/iPad, designed to look similar to NSCollectionView.", - "language": "Objective-C", - "fork": false, - "size": 216, - "followers": 1920, - "name": "AQGridView", - "private": false, - "created_at": "2010-04-17T11:58:21-07:00" - }, - { - "type": "repo", - "created": "2009-12-19T08:28:14-08:00", - "pushed_at": "2012-11-30T10:15:53-08:00", - "watchers": 989, - "owner": "klazuka", - "pushed": "2012-11-30T10:15:53-08:00", - "forks": 201, - "username": "klazuka", - "description": "A calendar component for the iPhone (the UI is designed to match MobileCal)", - "language": "Objective-C", - "fork": false, - "size": 176, - "followers": 989, - "name": "Kal", - "private": false, - "created_at": "2009-12-19T08:28:14-08:00" - }, - { - "type": "repo", - "created": "2008-12-12T10:32:57-08:00", - "pushed_at": "2011-06-08T10:55:43-07:00", - "watchers": 94, - "owner": "hamedh", - "pushed": "2011-06-08T10:55:43-07:00", - "forks": 18, - "username": "hamedh", - "description": "iPhone Internet Radio Streaming Application", - "language": null, - "fork": false, - "size": 116, - "followers": 94, - "name": "iphone_radio", - "private": false, - "created_at": "2008-12-12T10:32:57-08:00" - }, - { - "type": "repo", - "created": "2011-12-01T16:58:14-08:00", - "pushed_at": "2012-06-08T17:01:51-07:00", - "watchers": 167, - "owner": "toffer", - "pushed": "2012-06-08T17:01:51-07:00", - "forks": 24, - "username": "toffer", - "description": "Backup your iPhone SMS text messages.", - "language": "Python", - "fork": false, - "size": 156, - "followers": 167, - "name": "iphone-sms-backup", - "private": false, - "created_at": "2011-12-01T16:58:14-08:00" - }, - { - "type": "repo", - "created": "2008-10-22T04:43:22-07:00", - "pushed_at": "2008-11-12T10:48:11-08:00", - "watchers": 138, - "owner": "leonho", - "pushed": "2008-11-12T10:48:11-08:00", - "forks": 14, - "username": "leonho", - "description": "Varies useful libs, classes, and methods for iPhone development", - "language": "Objective-C", - "fork": false, - "size": 136, - "followers": 138, - "name": "iphone-libs", - "private": false, - "created_at": "2008-10-22T04:43:22-07:00" - }, - { - "type": "repo", - "created": "2012-02-21T04:14:31-08:00", - "pushed_at": "2012-11-15T14:06:29-08:00", - "watchers": 634, - "owner": "yyx990803", - "pushed": "2012-11-15T14:06:29-08:00", - "forks": 106, - "username": "yyx990803", - "description": "A replica of the Clear iphone app in HTML5", - "language": "JavaScript", - "fork": false, - "size": 156, - "followers": 634, - "name": "HTML5-Clear", - "private": false, - "created_at": "2012-02-21T04:14:31-08:00" - }, - { - "type": "repo", - "created": "2010-10-12T22:10:01-07:00", - "pushed_at": "2012-03-27T19:10:36-07:00", - "watchers": 447, - "owner": "ittybittydude", - "pushed": "2012-03-27T19:10:36-07:00", - "forks": 74, - "username": "ittybittydude", - "description": "A simple iPhone forms library", - "language": "Objective-C", - "fork": false, - "size": 268, - "followers": 447, - "name": "IBAForms", - "private": false, - "created_at": "2010-10-12T22:10:01-07:00" - }, - { - "type": "repo", - "created": "2010-02-09T10:28:20-08:00", - "pushed_at": "2011-08-29T08:12:58-07:00", - "watchers": 139, - "owner": "marforic", - "pushed": "2011-08-29T08:12:58-07:00", - "forks": 24, - "username": "marforic", - "description": "Script and instructions to compile imagemagick as a static library to use in any iPhone project", - "language": "C", - "fork": false, - "size": 140, - "followers": 139, - "name": "imagemagick_lib_iphone", - "private": false, - "created_at": "2010-02-09T10:28:20-08:00" - }, - { - "type": "repo", - "created": "2009-09-07T16:27:53-07:00", - "pushed_at": "2012-12-17T13:27:13-08:00", - "watchers": 1533, - "owner": "arashpayan", - "pushed": "2012-12-17T13:27:13-08:00", - "forks": 265, - "username": "arashpayan", - "description": "A utility that reminds your iPhone app's users to review the app.", - "language": "Objective-C", - "fork": false, - "size": 228, - "followers": 1533, - "name": "appirater", - "private": false, - "created_at": "2009-09-07T16:27:53-07:00" - }, - { - "type": "repo", - "created": "2010-01-14T15:56:45-08:00", - "pushed_at": "2010-09-09T11:37:28-07:00", - "watchers": 79, - "owner": "dropcam", - "pushed": "2010-09-09T11:37:28-07:00", - "forks": 32, - "username": "dropcam", - "description": "", - "language": "C", - "fork": false, - "size": 236, - "followers": 79, - "name": "dropcam_for_iphone", - "private": false, - "created_at": "2010-01-14T15:56:45-08:00" - }, - { - "type": "repo", - "created": "2009-09-08T15:41:48-07:00", - "pushed_at": "2009-10-27T21:10:38-07:00", - "watchers": 703, - "owner": "zac", - "pushed": "2009-10-27T21:10:38-07:00", - "forks": 158, - "username": "zac", - "description": "An Objective-C augmented reality kit for iPhone.", - "language": "Objective-C", - "fork": false, - "size": 120, - "followers": 703, - "name": "iphonearkit", - "private": false, - "created_at": "2009-09-08T15:41:48-07:00" - }, - { - "type": "repo", - "created": "2008-05-23T22:14:00-07:00", - "pushed_at": "2010-07-01T11:00:49-07:00", - "watchers": 326, - "owner": "planetbeing", - "pushed": "2010-07-01T11:00:49-07:00", - "forks": 73, - "username": "planetbeing", - "description": "Port Linux to the iPhone", - "language": "C", - "fork": false, - "size": 256, - "followers": 326, - "name": "iphonelinux", - "private": false, - "created_at": "2008-05-23T22:14:00-07:00" - }, - { - "type": "repo", - "created": "2011-11-30T05:17:12-08:00", - "pushed_at": "2012-05-27T04:44:26-07:00", - "watchers": 122, - "owner": "sergiomtzlosa", - "pushed": "2012-05-27T04:44:26-07:00", - "forks": 23, - "username": "sergiomtzlosa", - "description": "Wrapper class for iPhone to detect faces from face.com (developer.face.com)", - "language": "Objective-C", - "fork": false, - "size": 240, - "followers": 122, - "name": "faceWrapper-iphone", - "private": false, - "created_at": "2011-11-30T05:17:12-08:00" - }, - { - "type": "repo", - "created": "2010-05-12T19:50:24-07:00", - "pushed_at": "2011-11-07T08:54:47-08:00", - "watchers": 165, - "owner": "clarkware", - "pushed": "2011-11-07T08:54:47-08:00", - "forks": 19, - "username": "clarkware", - "description": "Material for my RailsConf 2010 tutorial", - "language": "Objective-C", - "fork": false, - "size": 120, - "followers": 165, - "name": "iphone-rails-tutorial", - "private": false, - "created_at": "2010-05-12T19:50:24-07:00" - }, - { - "type": "repo", - "created": "2010-07-25T05:27:11-07:00", - "pushed_at": "2010-07-25T06:38:45-07:00", - "watchers": 82, - "owner": "joelind", - "pushed": "2010-07-25T06:38:45-07:00", - "forks": 15, - "username": "joelind", - "description": "A build of Zebra Crossing (http://code.google.com/p/zxing/) for ios 4", - "language": "Java", - "fork": false, - "size": 640, - "followers": 82, - "name": "zxing-iphone", - "private": false, - "created_at": "2010-07-25T05:27:11-07:00" - }, - { - "type": "repo", - "created": "2010-02-04T05:57:05-08:00", - "pushed_at": "2012-09-21T13:23:57-07:00", - "watchers": 125, - "owner": "x2on", - "pushed": "2012-09-21T13:23:57-07:00", - "forks": 34, - "username": "x2on", - "description": "An Example XCode-Project with script for compiling OpenSSL for iOS Devices (iPhone, iPod Touch, iPad)", - "language": "C", - "fork": false, - "size": 168, - "followers": 125, - "name": "OpenSSL-for-iPhone", - "private": false, - "created_at": "2010-02-04T05:57:05-08:00" - }, - { - "type": "repo", - "created": "2010-01-12T01:37:53-08:00", - "pushed_at": "2012-12-17T05:21:54-08:00", - "watchers": 1410, - "owner": "futuretap", - "pushed": "2012-12-17T05:21:54-08:00", - "forks": 222, - "username": "futuretap", - "description": "This iPhone framework allows settings to be in-app in addition to being in the Settings app", - "language": "Objective-C", - "fork": false, - "size": 248, - "followers": 1410, - "name": "InAppSettingsKit", - "private": false, - "created_at": "2010-01-12T01:37:53-08:00" - }, - { - "type": "repo", - "created": "2009-06-24T18:03:08-07:00", - "pushed_at": "2009-09-26T18:18:32-07:00", - "watchers": 193, - "owner": "mattvague", - "pushed": "2009-09-26T18:18:32-07:00", - "forks": 25, - "username": "mattvague", - "description": "The accompanying code for my three20 iPhone tutorials at http://www.mattvague.com/blog", - "language": "Objective-C", - "fork": false, - "size": 376, - "followers": 193, - "name": "three20-iPhone-tutorials", - "private": false, - "created_at": "2009-06-24T18:03:08-07:00" - }, - { - "type": "repo", - "created": "2009-05-05T10:48:46-07:00", - "pushed_at": "2012-12-17T18:49:36-08:00", - "watchers": 2452, - "owner": "phonegap", - "pushed": "2012-12-17T18:49:36-08:00", - "forks": 421, - "username": "phonegap", - "description": "access core functions on Android, iPhone and Blackberry using JavaScript", - "language": "JavaScript", - "fork": true, - "size": 2348, - "followers": 2452, - "name": "phonegap", - "private": false, - "created_at": "2009-05-05T10:48:46-07:00" - }, - { - "type": "repo", - "created": "2010-01-08T17:20:28-08:00", - "pushed_at": "2010-03-31T10:57:03-07:00", - "watchers": 3, - "owner": "infil00p", - "pushed": "2010-03-31T10:57:03-07:00", - "forks": 163, - "username": "infil00p", - "description": "iPhone OS implementation of the PhoneGap API", - "language": "Objective-C", - "fork": false, - "size": 116, - "followers": 3, - "name": "phonegap-iphone", - "private": false, - "created_at": "2010-01-08T17:20:28-08:00" - }, - { - "type": "repo", - "created": "2009-06-11T13:55:04-07:00", - "pushed_at": "2012-06-04T11:13:22-07:00", - "watchers": 697, - "owner": "neror", - "pushed": "2012-06-04T11:13:22-07:00", - "forks": 67, - "username": "neror", - "description": "iPhone utilities mostly for Core Animation", - "language": "Objective-C", - "fork": false, - "size": 3747, - "followers": 697, - "name": "ftutils", - "private": false, - "created_at": "2009-06-11T13:55:04-07:00" - }, - { - "type": "repo", - "created": "2010-03-21T20:37:07-07:00", - "pushed_at": "2010-04-11T17:00:04-07:00", - "watchers": 92, - "owner": "gabriel", - "pushed": "2010-04-11T17:00:04-07:00", - "forks": 25, - "username": "gabriel", - "description": "Build scripts for building ffmpeg on iPhone", - "language": "Perl", - "fork": false, - "size": 116, - "followers": 92, - "name": "ffmpeg-iphone-build", - "private": false, - "created_at": "2010-03-21T20:37:07-07:00" - }, - { - "type": "repo", - "created": "2010-11-06T03:52:17-07:00", - "pushed_at": "2011-10-15T20:19:52-07:00", - "watchers": 553, - "owner": "briancollins", - "pushed": "2011-10-15T20:19:52-07:00", - "forks": 73, - "username": "briancollins", - "description": "a Tweetie-style tab bar for the iPhone", - "language": "Objective-C", - "fork": false, - "size": 132, - "followers": 553, - "name": "BCTabBarController", - "private": false, - "created_at": "2010-11-06T03:52:17-07:00" - }, - { - "type": "repo", - "created": "2009-07-08T17:23:48-07:00", - "pushed_at": "2010-01-20T09:30:04-08:00", - "watchers": 131, - "owner": "pmark", - "pushed": "2010-01-20T09:30:04-08:00", - "forks": 19, - "username": "pmark", - "description": "Objective-C and Cocoa Touch extensions one might expect to already be there.", - "language": "Objective-C", - "fork": false, - "size": 100, - "followers": 131, - "name": "Helpful-iPhone-Utilities", - "private": false, - "created_at": "2009-07-08T17:23:48-07:00" - }, - { - "type": "repo", - "created": "2009-10-19T19:27:09-07:00", - "pushed_at": "2012-03-28T11:22:23-07:00", - "watchers": 633, - "owner": "enormego", - "pushed": "2012-03-28T11:22:23-07:00", - "forks": 127, - "username": "enormego", - "description": "What if images on the iPhone were as easy as HTML?", - "language": "Objective-C", - "fork": false, - "size": 236, - "followers": 633, - "name": "EGOImageLoading", - "private": false, - "created_at": "2009-10-19T19:27:09-07:00" - }, - { - "type": "repo", - "created": "2008-09-22T09:46:32-07:00", - "pushed_at": "2011-01-11T01:19:43-08:00", - "watchers": 60, - "owner": "jeremywohl", - "pushed": "2011-01-11T01:19:43-08:00", - "forks": 16, - "username": "jeremywohl", - "description": "iPhone- and App Store-related items", - "language": null, - "fork": false, - "size": 192, - "followers": 60, - "name": "iphone-scripts", - "private": false, - "created_at": "2008-09-22T09:46:32-07:00" - }, - { - "type": "repo", - "created": "2010-06-17T11:53:07-07:00", - "pushed_at": "2012-01-14T16:57:38-08:00", - "watchers": 301, - "owner": "reddit", - "pushed": "2012-01-14T16:57:38-08:00", - "forks": 56, - "username": "reddit", - "description": "The iReddit iPhone app", - "language": "Objective-C", - "fork": false, - "size": 324, - "followers": 301, - "name": "iReddit", - "private": false, - "created_at": "2010-06-17T11:53:07-07:00" - }, - { - "type": "repo", - "created": "2011-01-17T07:05:02-08:00", - "pushed_at": "2011-10-29T03:44:11-07:00", - "watchers": 496, - "owner": "atomton", - "pushed": "2011-10-29T03:44:11-07:00", - "forks": 66, - "username": "atomton", - "description": "Library for the creation of HUDs in iPhone applications.", - "language": "Objective-C", - "fork": false, - "size": 136, - "followers": 496, - "name": "ATMHud", - "private": false, - "created_at": "2011-01-17T07:05:02-08:00" - }, - { - "type": "repo", - "created": "2009-02-06T11:24:15-08:00", - "pushed_at": "2009-03-06T10:02:14-08:00", - "watchers": 240, - "owner": "ars", - "pushed": "2009-03-06T10:02:14-08:00", - "forks": 62, - "username": "ars", - "description": "Helpful utilities for UIColor for iPhone", - "language": "Objective-C", - "fork": false, - "size": 100, - "followers": 240, - "name": "uicolor-utilities", - "private": false, - "created_at": "2009-02-06T11:24:15-08:00" - }, - { - "type": "repo", - "created": "2009-06-16T17:30:27-07:00", - "pushed_at": "2012-09-03T01:23:15-07:00", - "watchers": 776, - "owner": "mattgallagher", - "pushed": "2012-09-03T01:23:15-07:00", - "forks": 219, - "username": "mattgallagher", - "description": "A streaming audio player class (AudioStreamer) for Mac OS X and iPhone.", - "language": "Objective-C", - "fork": false, - "size": 148, - "followers": 776, - "name": "AudioStreamer", - "private": false, - "created_at": "2009-06-16T17:30:27-07:00" - }, - { - "type": "repo", - "created": "2010-05-04T21:09:38-07:00", - "pushed_at": "2011-10-19T23:33:48-07:00", - "watchers": 93, - "owner": "st3fan", - "pushed": "2011-10-19T23:33:48-07:00", - "forks": 11, - "username": "st3fan", - "description": "iPhone Twitter Framework", - "language": "Objective-C", - "fork": false, - "size": 340, - "followers": 93, - "name": "iphone-twitter", - "private": false, - "created_at": "2010-05-04T21:09:38-07:00" - }, - { - "type": "repo", - "created": "2008-10-27T20:46:21-07:00", - "pushed_at": "2011-09-05T18:54:08-07:00", - "watchers": 431, - "owner": "jdg", - "pushed": "2011-09-05T18:54:08-07:00", - "forks": 128, - "username": "jdg", - "description": "An iPhone ready, Objective-C implementation of an OAuth consumer.", - "language": "Objective-C", - "fork": false, - "size": 176, - "followers": 431, - "name": "oauthconsumer", - "private": false, - "created_at": "2008-10-27T20:46:21-07:00" - }, - { - "type": "repo", - "created": "2012-06-07T05:48:26-07:00", - "pushed_at": "2012-10-01T00:45:21-07:00", - "watchers": 66, - "owner": "MetaWatchOpenProjects", - "pushed": "2012-10-01T00:45:21-07:00", - "forks": 24, - "username": "MetaWatchOpenProjects", - "description": "iOS application project that demonstrates connectivity with Meta Watch Bluetooth 4.0 capable watches", - "language": "Objective-C", - "fork": false, - "size": 456, - "followers": 66, - "name": "MWM-for-iPhone", - "private": false, - "created_at": "2012-06-07T05:48:26-07:00" - }, - { - "type": "repo", - "created": "2010-09-13T16:49:15-07:00", - "pushed_at": "2012-06-13T14:47:11-07:00", - "watchers": 100, - "owner": "cobbal", - "pushed": "2012-06-13T14:47:11-07:00", - "forks": 18, - "username": "cobbal", - "description": "Build script for compiling python into a static library that can be used with the official SDK", - "language": "Shell", - "fork": false, - "size": 140, - "followers": 100, - "name": "python-for-iphone", - "private": false, - "created_at": "2010-09-13T16:49:15-07:00" - }, - { - "type": "repo", - "created": "2010-03-16T02:16:25-07:00", - "pushed_at": "2012-12-12T03:57:26-08:00", - "watchers": 403, - "owner": "rs", - "pushed": "2012-12-12T03:57:26-08:00", - "forks": 123, - "username": "rs", - "description": "URLCache subclass with on-disk cache support on iPhone/iPad", - "language": "Objective-C", - "fork": false, - "size": 164, - "followers": 403, - "name": "SDURLCache", - "private": false, - "created_at": "2010-03-16T02:16:25-07:00" - }, - { - "type": "repo", - "created": "2012-05-14T03:31:26-07:00", - "pushed_at": "2012-05-14T09:36:17-07:00", - "watchers": 688, - "owner": "mattgemmell", - "pushed": "2012-05-14T09:36:17-07:00", - "forks": 77, - "username": "mattgemmell", - "description": "Tile-based contextual menu for iPad and iPhone developers.", - "language": "Objective-C", - "fork": false, - "size": 132, - "followers": 688, - "name": "MGTileMenu", - "private": false, - "created_at": "2012-05-14T03:31:26-07:00" - }, - { - "type": "repo", - "created": "2009-05-22T15:51:08-07:00", - "pushed_at": "2010-03-24T09:40:50-07:00", - "watchers": 201, - "owner": "jhaynie", - "pushed": "2010-03-24T09:40:50-07:00", - "forks": 98, - "username": "jhaynie", - "description": "Command Line Launcher for the iPhone Simulator", - "language": "Objective-C", - "fork": false, - "size": 268, - "followers": 201, - "name": "iphonesim", - "private": false, - "created_at": "2009-05-22T15:51:08-07:00" - }, - { - "type": "repo", - "created": "2010-09-14T15:04:55-07:00", - "pushed_at": "2012-10-23T10:48:42-07:00", - "watchers": 37, - "owner": "janrain", - "pushed": "2012-10-23T10:48:42-07:00", - "forks": 17, - "username": "janrain", - "description": "", - "language": "Objective-C", - "fork": false, - "size": 172, - "followers": 37, - "name": "engage.iphone", - "private": false, - "created_at": "2010-09-14T15:04:55-07:00" - }, - { - "type": "repo", - "created": "2009-03-04T17:08:08-08:00", - "pushed_at": "2009-03-12T15:42:00-07:00", - "watchers": 52, - "owner": "kailoa", - "pushed": "2009-03-12T15:42:00-07:00", - "forks": 13, - "username": "kailoa", - "description": "A github fork of SKPSMTPMessage. A quick SMTP client for the iPhone, built on CFNetwork in ObjC", - "language": "Objective-C", - "fork": false, - "size": 92, - "followers": 52, - "name": "iphone-smtp", - "private": false, - "created_at": "2009-03-04T17:08:08-08:00" - }, - { - "type": "repo", - "created": "2011-01-21T08:43:35-08:00", - "pushed_at": "2012-12-08T02:10:50-08:00", - "watchers": 564, - "owner": "cubiq", - "pushed": "2012-12-08T02:10:50-08:00", - "forks": 79, - "username": "cubiq", - "description": "Add to home screen popup for iPhone/iPad", - "language": "JavaScript", - "fork": false, - "size": 172, - "followers": 564, - "name": "add-to-homescreen", - "private": false, - "created_at": "2011-01-21T08:43:35-08:00" - }, - { - "type": "repo", - "created": "2009-02-06T17:59:18-08:00", - "pushed_at": "2010-04-19T20:14:54-07:00", - "watchers": 67, - "owner": "andrewfromyammer", - "pushed": "2010-04-19T20:14:54-07:00", - "forks": 11, - "username": "andrewfromyammer", - "description": "Yammer.com iPhone App", - "language": "Objective-C", - "fork": false, - "size": 96, - "followers": 67, - "name": "yammer_iphone", - "private": false, - "created_at": "2009-02-06T17:59:18-08:00" - }, - { - "type": "repo", - "created": "2010-12-14T02:48:05-08:00", - "pushed_at": "2011-01-05T01:48:53-08:00", - "watchers": 147, - "owner": "bcaccinolo", - "pushed": "2011-01-05T01:48:53-08:00", - "forks": 63, - "username": "bcaccinolo", - "description": "an iPhone XML to NSDictionary converter", - "language": "Objective-C", - "fork": false, - "size": 132, - "followers": 147, - "name": "XML-to-NSDictionary", - "private": false, - "created_at": "2010-12-14T02:48:05-08:00" - }, - { - "type": "repo", - "created": "2009-03-28T10:25:03-07:00", - "pushed_at": "2012-12-18T00:42:29-08:00", - "watchers": 1035, - "owner": "dennisreimann", - "pushed": "2012-12-18T00:42:29-08:00", - "forks": 114, - "username": "dennisreimann", - "description": "iOS GitHub client (universal, works on the iPad, iPhone and iPod Touch)", - "language": "Objective-C", - "fork": false, - "size": 800, - "followers": 1035, - "name": "ioctocat", - "private": false, - "created_at": "2009-03-28T10:25:03-07:00" - }, - { - "type": "repo", - "created": "2011-08-08T22:46:15-07:00", - "pushed_at": "2011-12-14T00:08:10-08:00", - "watchers": 52, - "owner": "AdilSoomro", - "pushed": "2011-12-14T00:08:10-08:00", - "forks": 23, - "username": "AdilSoomro", - "description": "android Tab widget like Iphon UITabBar", - "language": "Java", - "fork": false, - "size": 196, - "followers": 52, - "name": "Iphone-Tab-in-Android", - "private": false, - "created_at": "2011-08-08T22:46:15-07:00" - }, - { - "type": "repo", - "created": "2009-10-11T10:45:35-07:00", - "pushed_at": "2011-03-01T04:07:44-08:00", - "watchers": 222, - "owner": "ksexton", - "pushed": "2011-03-01T04:07:44-08:00", - "forks": 43, - "username": "ksexton", - "description": "MobileOrg iPhone App", - "language": "Objective-C", - "fork": false, - "size": 340, - "followers": 222, - "name": "mobileorg", - "private": false, - "created_at": "2009-10-11T10:45:35-07:00" - }, - { - "type": "repo", - "created": "2010-11-11T11:44:17-08:00", - "pushed_at": "2011-02-17T18:17:34-08:00", - "watchers": 66, - "owner": "twilio", - "pushed": "2011-02-17T18:17:34-08:00", - "forks": 19, - "username": "twilio", - "description": "OpenVBX for iPhone", - "language": "Objective-C", - "fork": false, - "size": 204, - "followers": 66, - "name": "OpenVBX-iPhone", - "private": false, - "created_at": "2010-11-11T11:44:17-08:00" - }, - { - "type": "repo", - "created": "2012-02-14T22:34:59-08:00", - "pushed_at": "2012-09-16T06:23:54-07:00", - "watchers": 843, - "owner": "mystcolor", - "pushed": "2012-09-16T06:23:54-07:00", - "forks": 122, - "username": "mystcolor", - "description": "Recreating the buttonless interaction pattern found in Clear for iPhone app", - "language": "Objective-C", - "fork": false, - "size": 156, - "followers": 843, - "name": "JTGestureBasedTableViewDemo", - "private": false, - "created_at": "2012-02-14T22:34:59-08:00" - }, - { - "type": "repo", - "created": "2010-07-05T01:37:04-07:00", - "pushed_at": "2012-11-26T09:20:27-08:00", - "watchers": 567, - "owner": "mattgemmell", - "pushed": "2012-11-26T09:20:27-08:00", - "forks": 69, - "username": "mattgemmell", - "description": "Useful UIImage categories for iPhone/iPad developers.", - "language": "Objective-C", - "fork": false, - "size": 152, - "followers": 567, - "name": "MGImageUtilities", - "private": false, - "created_at": "2010-07-05T01:37:04-07:00" - }, - { - "type": "repo", - "created": "2010-01-08T09:06:41-08:00", - "pushed_at": "2010-08-06T12:13:56-07:00", - "watchers": 81, - "owner": "st3fan", - "pushed": "2010-08-06T12:13:56-07:00", - "forks": 9, - "username": "st3fan", - "description": "Simple EPUB Book Reader for the iPhone", - "language": "C", - "fork": false, - "size": 128, - "followers": 81, - "name": "iphone-bookreader", - "private": false, - "created_at": "2010-01-08T09:06:41-08:00" - }, - { - "type": "repo", - "created": "2008-10-24T01:30:55-07:00", - "pushed_at": "2010-09-01T08:13:59-07:00", - "watchers": 473, - "owner": "takuma104", - "pushed": "2010-09-01T08:13:59-07:00", - "forks": 73, - "username": "takuma104", - "description": "NatsuLiphone - The twitter client for iPhone / iPod touch", - "language": "Objective-C", - "fork": false, - "size": 312, - "followers": 473, - "name": "ntlniph", - "private": false, - "created_at": "2008-10-24T01:30:55-07:00" - }, - { - "type": "repo", - "created": "2011-06-12T09:31:37-07:00", - "pushed_at": "2012-12-19T07:10:29-08:00", - "watchers": 116, - "owner": "MiniKeePass", - "pushed": "2012-12-19T07:10:29-08:00", - "forks": 28, - "username": "MiniKeePass", - "description": "MiniKeePass for the iPhone", - "language": "Objective-C", - "fork": false, - "size": 496, - "followers": 116, - "name": "MiniKeePass", - "private": false, - "created_at": "2011-06-12T09:31:37-07:00" - }, - { - "type": "repo", - "created": "2010-01-19T12:57:50-08:00", - "pushed_at": "2011-07-27T17:26:07-07:00", - "watchers": 821, - "owner": "tcurdt", - "pushed": "2011-07-27T17:26:07-07:00", - "forks": 111, - "username": "tcurdt", - "description": "Let's you connect your laptop to the iPhone to surf the web.", - "language": "C", - "fork": false, - "size": 180, - "followers": 821, - "name": "iProxy", - "private": false, - "created_at": "2010-01-19T12:57:50-08:00" - }, - { - "type": "repo", - "created": "2010-04-19T22:53:04-07:00", - "pushed_at": "2011-10-29T18:14:34-07:00", - "watchers": 1214, - "owner": "brow", - "pushed": "2011-10-29T18:14:34-07:00", - "forks": 238, - "username": "brow", - "description": "An iBooks-like page-turning interface for iPhone and iPad apps using only public APIs.", - "language": "Objective-C", - "fork": false, - "size": 220, - "followers": 1214, - "name": "leaves", - "private": false, - "created_at": "2010-04-19T22:53:04-07:00" - }, - { - "type": "repo", - "created": "2009-10-19T16:43:56-07:00", - "pushed_at": "2012-11-12T08:04:30-08:00", - "watchers": 336, - "owner": "enormego", - "pushed": "2012-11-12T08:04:30-08:00", - "forks": 84, - "username": "enormego", - "description": "Fast Caching for Objective-C (iPhone & Mac Compatible)", - "language": "Objective-C", - "fork": false, - "size": 184, - "followers": 336, - "name": "EGOCache", - "private": false, - "created_at": "2009-10-19T16:43:56-07:00" - }, - { - "type": "repo", - "created": "2010-02-08T07:52:55-08:00", - "pushed_at": "2012-04-19T10:24:57-07:00", - "watchers": 481, - "owner": "kirbyt", - "pushed": "2012-04-19T10:24:57-07:00", - "forks": 83, - "username": "kirbyt", - "description": "KTPhotoBrowser is a lightweight photo browser library for the iPhone and iPod touch that looks and behaves like the iPhone Photos app.", - "language": "Objective-C", - "fork": false, - "size": 164, - "followers": 481, - "name": "KTPhotoBrowser", - "private": false, - "created_at": "2010-02-08T07:52:55-08:00" - }, - { - "type": "repo", - "created": "2009-06-28T18:57:35-07:00", - "pushed_at": "2012-04-06T10:31:07-07:00", - "watchers": 1034, - "owner": "probablycorey", - "pushed": "2012-04-06T10:31:07-07:00", - "forks": 83, - "username": "probablycorey", - "description": "Wax is a framework that lets you write native iPhone apps in Lua.", - "language": "C", - "fork": false, - "size": 1759, - "followers": 1034, - "name": "wax", - "private": false, - "created_at": "2009-06-28T18:57:35-07:00" - }, - { - "type": "repo", - "created": "2009-02-28T21:34:53-08:00", - "pushed_at": "2009-04-17T23:59:59-07:00", - "watchers": 79, - "owner": "keishi", - "pushed": "2009-04-17T23:59:59-07:00", - "forks": 14, - "username": "keishi", - "description": "An iPhone app to view articles on wikiHow.com.", - "language": "C", - "fork": false, - "size": 112, - "followers": 79, - "name": "wikihow-iphone-app", - "private": false, - "created_at": "2009-02-28T21:34:53-08:00" - }, - { - "type": "repo", - "created": "2012-02-13T10:40:19-08:00", - "pushed_at": "2012-05-17T06:29:19-07:00", - "watchers": 1064, - "owner": "ccoenraets", - "pushed": "2012-05-17T06:29:19-07:00", - "forks": 225, - "username": "ccoenraets", - "description": "Sample Application built with Backbone.js and 3 different UI toolkits: Twitter Bootstrap, jQuery Mobile, and custom iPhone skins", - "language": "PHP", - "fork": false, - "size": 268, - "followers": 1064, - "name": "backbone-directory", - "private": false, - "created_at": "2012-02-13T10:40:19-08:00" - }, - { - "type": "repo", - "created": "2012-05-14T06:46:36-07:00", - "pushed_at": "2012-06-11T07:22:17-07:00", - "watchers": 212, - "owner": "takashisite", - "pushed": "2012-06-11T07:22:17-07:00", - "forks": 33, - "username": "takashisite", - "description": "UIPopover like UI for iPhone", - "language": "Objective-C", - "fork": false, - "size": 168, - "followers": 212, - "name": "TSPopover", - "private": false, - "created_at": "2012-05-14T06:46:36-07:00" - }, - { - "type": "repo", - "created": "2009-05-06T08:35:51-07:00", - "pushed_at": "2011-03-06T17:33:12-08:00", - "watchers": 240, - "owner": "beetlebugorg", - "pushed": "2011-03-06T17:33:12-08:00", - "forks": 29, - "username": "beetlebugorg", - "description": "iPhone Face Detection App", - "language": "C", - "fork": false, - "size": 160, - "followers": 240, - "name": "PictureMe", - "private": false, - "created_at": "2009-05-06T08:35:51-07:00" - }, - { - "type": "repo", - "created": "2012-01-26T15:00:24-08:00", - "pushed_at": "2012-09-21T10:45:26-07:00", - "watchers": 711, - "owner": "omz", - "pushed": "2012-09-21T10:45:26-07:00", - "forks": 89, - "username": "omz", - "description": "Dedicated app for reading Apple's developer documentation on an iPad or iPhone", - "language": "C", - "fork": false, - "size": 232, - "followers": 711, - "name": "DocSets-for-iOS", - "private": false, - "created_at": "2012-01-26T15:00:24-08:00" - }, - { - "type": "repo", - "created": "2010-07-07T02:24:17-07:00", - "pushed_at": "2012-12-15T14:17:33-08:00", - "watchers": 1164, - "owner": "Simbul", - "pushed": "2012-12-15T14:17:33-08:00", - "forks": 172, - "username": "Simbul", - "description": "The HTML5 ebook framework to publish interactive books & magazines on iPad & iPhone using simply open web standards ", - "language": "Objective-C", - "fork": false, - "size": 580, - "followers": 1164, - "name": "baker", - "private": false, - "created_at": "2010-07-07T02:24:17-07:00" - }, - { - "type": "repo", - "created": "2010-03-31T09:04:35-07:00", - "pushed_at": "2012-04-15T11:06:42-07:00", - "watchers": 57, - "owner": "ResultsDirect", - "pushed": "2012-04-15T11:06:42-07:00", - "forks": 15, - "username": "ResultsDirect", - "description": "Simple framework to provide authentication and API support for LinkedIn on iPhoneOS devices.", - "language": "Objective-C", - "fork": false, - "size": 172, - "followers": 57, - "name": "LinkedIn-iPhone", - "private": false, - "created_at": "2010-03-31T09:04:35-07:00" - }, - { - "type": "repo", - "created": "2010-03-15T08:15:39-07:00", - "pushed_at": "2010-09-04T07:10:19-07:00", - "watchers": 1198, - "owner": "mattgemmell", - "pushed": "2010-09-04T07:10:19-07:00", - "forks": 158, - "username": "mattgemmell", - "description": "Objective-C Twitter integration library for Mac OS X and iPhone. Official repository.", - "language": "Objective-C", - "fork": false, - "size": 316, - "followers": 1198, - "name": "MGTwitterEngine", - "private": false, - "created_at": "2010-03-15T08:15:39-07:00" - }, - { - "type": "repo", - "created": "2011-06-01T08:33:37-07:00", - "pushed_at": "2012-11-12T11:33:52-08:00", - "watchers": 332, - "owner": "schwa", - "pushed": "2012-11-12T11:33:52-08:00", - "forks": 61, - "username": "schwa", - "description": "An open source (BSD) iPhone & iPad PDF Reader", - "language": "Objective-C", - "fork": false, - "size": 192, - "followers": 332, - "name": "iOS-PDF-Reader", - "private": false, - "created_at": "2011-06-01T08:33:37-07:00" - }, - { - "type": "repo", - "created": "2010-10-20T15:30:03-07:00", - "pushed_at": "2012-12-18T09:25:07-08:00", - "watchers": 68, - "owner": "MIT-Mobile", - "pushed": "2012-12-18T09:25:07-08:00", - "forks": 19, - "username": "MIT-Mobile", - "description": "The iPhone native portion of the MIT Mobile Framework", - "language": "Objective-C", - "fork": false, - "size": 2172, - "followers": 68, - "name": "MIT-Mobile-for-iPhone", - "private": false, - "created_at": "2010-10-20T15:30:03-07:00" - } - ] -} diff --git a/JSONModelDemoTests/UnitTests/DataFiles/jsonTypes.json b/JSONModelDemoTests/UnitTests/DataFiles/jsonTypes.json deleted file mode 100644 index 4349fddb..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/jsonTypes.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "caption": "This is a text element", - "dynamicString": "A piece of text", - - "year": 2012, - "pi": 3.14159, - - "list": ["111","222","333"], - "dynamicList": ["12", 12, 0.12], - "dictionary": {"test":"mest", "value": 123.29}, - "dynamicDictionary": {"key":"value", "otherKey": 1200}, - - "notAvailable": null -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/nestedData.json b/JSONModelDemoTests/UnitTests/DataFiles/nestedData.json deleted file mode 100644 index 561ef36e..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/nestedData.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "singleImage": {"idImage": 2, "name": "lake.jpg"}, - - "images": [ - {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, - {"idImage": 2, "name": "lake.jpg"}, - {"idImage": 3, "name": "peak.jpg"} - ], - - "imagesObject": { - "image2": {"idImage": 2, "name": "lake.jpg"}, - "image3": {"idImage": 3, "name": "peak.jpg"} - } - -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithArrayError.json b/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithArrayError.json deleted file mode 100644 index 7a071c48..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithArrayError.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "singleImage": {"idImage": 2, "name": "lake.jpg"}, - - "images": [ - {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, - {"idImage": 2, "name1": "lake.jpg"}, - {"idImage": 3, "name": "peak.jpg"} - ], - - "imagesObject": { - "image2": {"idImage": 2, "name": "lake.jpg"}, - "image3": {"idImage": 3, "name": "peak.jpg"} - } - -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithDictionaryError.json b/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithDictionaryError.json deleted file mode 100644 index 26930c64..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithDictionaryError.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "singleImage": {"idImage": 2, "name": "lake.jpg"}, - - "images": [ - {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, - {"idImage": 2, "name": "lake.jpg"}, - {"idImage": 3, "name": "peak.jpg"} - ], - - "imagesObject": { - "image2": {"idImage": 2, "name1": "lake.jpg"}, - "image3": {"idImage": 3, "name": "peak.jpg"} - } - -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithTypeMismatchOnImages.json b/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithTypeMismatchOnImages.json deleted file mode 100644 index 04a98b3e..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithTypeMismatchOnImages.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "singleImage": {"idImage": 2, "name": "lake.jpg"}, - - "images": { - "x" : {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, - "y" : {"idImage": 2, "name": "lake.jpg"}, - "z" : {"idImage": 3, "name": "peak.jpg"} - }, - - "imagesObject": { - "image2": {"idImage": 2, "name": "lake.jpg"}, - "image3": {"idImage": 3, "name": "peak.jpg"} - } - -} diff --git a/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithTypeMismatchOnImagesObject.json b/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithTypeMismatchOnImagesObject.json deleted file mode 100644 index e42751b5..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/nestedDataWithTypeMismatchOnImagesObject.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "singleImage": {"idImage": 2, "name": "lake.jpg"}, - - "images": [ - {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, - {"idImage": 2, "name": "lake.jpg"}, - {"idImage": 3, "name": "peak.jpg"} - ], - - "imagesObject": [ - {"idImage": 2, "name": "lake.jpg"}, - {"idImage": 3, "name": "peak.jpg"} - ] - -} diff --git a/JSONModelDemoTests/UnitTests/DataFiles/post.json b/JSONModelDemoTests/UnitTests/DataFiles/post.json deleted file mode 100644 index 401804b1..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/post.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "posts": [ - {"id":1, "name":"My first post!!"}, - {"id":2, "name":"My second post!!"}, - {"id":3, "name":"My third post!!"}, - {"id":4, "name":"My fourth post!!"}, - {"id":5, "name":"My fifth post!!"} - ] -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/primitives.json b/JSONModelDemoTests/UnitTests/DataFiles/primitives.json deleted file mode 100644 index e5e35860..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/primitives.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "shortNumber": 114, - "intNumber": 12, - "longNumber": 12124, - - "floatNumber": 12.12, - "doubleNumber": 121231312.124, - - "boolYES": true, - "boolNO": false -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/primitivesWithErrors.json b/JSONModelDemoTests/UnitTests/DataFiles/primitivesWithErrors.json deleted file mode 100644 index 23fd2398..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/primitivesWithErrors.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "shortNumber": 114, - "longNumber1": 12124, - - "floatNumber": 12.12, - "doubleNumber": 121231312.124, - - "boolYES": true, - "boolNO": false -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/specialPropertyName.json b/JSONModelDemoTests/UnitTests/DataFiles/specialPropertyName.json deleted file mode 100644 index aea0cf03..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/specialPropertyName.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "className" : "Test", - "indexPropertyName" : "foo", - "id" : "bar" -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/withOptProp.json b/JSONModelDemoTests/UnitTests/DataFiles/withOptProp.json deleted file mode 100644 index 11406c1c..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/withOptProp.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "fillerNumber": 42, - "notRequredProperty" : "I'm here this time!" -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/DataFiles/withoutOptProp.json b/JSONModelDemoTests/UnitTests/DataFiles/withoutOptProp.json deleted file mode 100644 index c8738021..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/withoutOptProp.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "fillerNumber": 13 -} \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/ExtremeNestingTests.h b/JSONModelDemoTests/UnitTests/ExtremeNestingTests.h deleted file mode 100644 index 119e1aff..00000000 --- a/JSONModelDemoTests/UnitTests/ExtremeNestingTests.h +++ /dev/null @@ -1,11 +0,0 @@ -// -// Created by Rahul Somasunderam on 9/4/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import -#import - - -@interface ExtremeNestingTests : XCTestCase -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/ExtremeNestingTests.m b/JSONModelDemoTests/UnitTests/ExtremeNestingTests.m deleted file mode 100644 index 8c771ec2..00000000 --- a/JSONModelDemoTests/UnitTests/ExtremeNestingTests.m +++ /dev/null @@ -1,69 +0,0 @@ -// -// Created by Rahul Somasunderam on 9/4/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import "ExtremeNestingTests.h" -#import "NestedModel.h" -#import "ExtremeNestingModel.h" -#import "DrugModel.h" -#import "InteractionModel.h" - - -@implementation ExtremeNestingTests -{ - ExtremeNestingModel *n; - -} - - -- (void)setUp -{ - [super setUp]; - - NSString *jsonContents = @"{\n" - " \"generic_alternatives\": [\n" - " {\n" - " \"items\": [\n" - " {\n" - " \"data\": [\n" - " {\n" - " \"brand_name\": \"Novolog\",\n" - " \"interaction_list\": [\n" - " {\n" - " \"dxid\": 594,\n" - " \"text\": \"Novolog Mix 70-30 100 unit/mL subcutaneous solution is relatively contraindicated in patients with Renal Disease.
The following patient diagnosis is related to, or may imply, that this condition exists:
  • Diabetes with Renal Manifestations Type II or Unspecified Type, not Stated as Uncontrolled

This medication belongs to the following drug class or contains the following ingredient which is known to have clinically important considerations:
  • INSULINS
is relatively contraindicated in Renal Disease
For additional information please refer to the manufacturer's monograph.\",\n" - " \"title\": \"Diabetes with Renal Manifestations Type II or Unspecified Type, not Stated as Uncontrolled (Renal Disease)\",\n" - " \"type\": \"DDX\"\n" - " }\n" - " ]\n" - " }\n" - " ]\n" - " }\n" - " ]\n" - " }\n" - " ]\n" - "}"; - - NSError *err; - n = [[ExtremeNestingModel alloc] initWithString:jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(n, @"Could not load the test data file."); -} - -- (void)testNestedStructures -{ - XCTAssertEqual(n.drugs.count, 1); - DrugModel *drug = n.drugs[0]; - XCTAssertEqualObjects(drug.brand_name, @"Novolog"); - - XCTAssertEqual(drug.interaction_list.count, 1); - InteractionModel *interaction = drug.interaction_list[0]; - - XCTAssertEqualObjects(interaction.title, @"Diabetes with Renal Manifestations Type II or Unspecified Type, " - "not Stated as Uncontrolled (Renal Disease)"); - XCTAssertEqualObjects(interaction.type, @"DDX"); - -} - -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/HTTPClientSuite.h b/JSONModelDemoTests/UnitTests/HTTPClientSuite.h deleted file mode 100644 index f7a41cc7..00000000 --- a/JSONModelDemoTests/UnitTests/HTTPClientSuite.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// HTTPClientSuite.h -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 3/26/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import - -@interface HTTPClientSuite : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/HTTPClientSuite.m b/JSONModelDemoTests/UnitTests/HTTPClientSuite.m deleted file mode 100644 index 22ed9bd5..00000000 --- a/JSONModelDemoTests/UnitTests/HTTPClientSuite.m +++ /dev/null @@ -1,430 +0,0 @@ -// -// HTTPClientSuite.m -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 3/26/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import "HTTPClientSuite.h" - -#import "NestedModel.h" -#import "ImageModel.h" - -#import "JSONModel+networking.h" -#import "MockNSURLConnection.h" -#import "MTTestSemaphor.h" - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -@implementation HTTPClientSuite -{ - NSString* jsonContents; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"nestedData.json"]; - jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); -} - --(void)testRequestHeaders -{ - NSString* headerName = @"CustomHeader"; - NSString* headerValue = @"CustomValue"; - NSMutableDictionary* headers = [JSONHTTPClient requestHeaders]; - headers[headerName] = headerValue; - - //check if the header is saved - NSMutableDictionary* newHeadersReference = [JSONHTTPClient requestHeaders]; - NSAssert([headerValue isEqualToString: newHeadersReference[headerName]], @"the custom header was not persisted"); - - //check if the header is sent along the http request - NSString* jsonURLString = @"http://localhost/test.json?testRequestHeaders"; - NSString* semaphorKey = @"testRequestHeaders"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - [NSURLConnection setNextResponse:response data:[@"{}" dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - [JSONHTTPClient postJSONFromURLWithString:jsonURLString - params:nil - completion:^(NSDictionary *json, JSONModelError *err) { - NSURLRequest* request = [NSURLConnection lastRequest]; - NSAssert([[request valueForHTTPHeaderField:headerName] isEqualToString: headerValue], @"the custom header was not sent along the http request"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; - -} - --(void)testContentType -{ - NSString* jsonURLString = @"http://localhost/test.json?testContentType"; - NSString* semaphorKey = @"testContentType"; - NSString* ctype = @"text/plain"; - - [JSONHTTPClient setRequestContentType: ctype]; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - [NSURLConnection setNextResponse:response data:[@"{}" dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - [JSONHTTPClient postJSONFromURLWithString:jsonURLString - params:nil - completion:^(NSDictionary *json, JSONModelError *err) { - NSURLRequest* request = [NSURLConnection lastRequest]; - NSAssert([[request valueForHTTPHeaderField:@"Content-type"] hasPrefix:ctype], @"request content type was not application/JSON"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - [JSONHTTPClient setRequestContentType:kContentTypeAutomatic]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testCachingPolicy -{ - //check if the header is sent along the http request - NSString* jsonURLString = @"http://localhost/test.json?case=testCachingPolicy"; - NSString* semaphorKey = @"testCachingPolicy"; - - [JSONHTTPClient setCachingPolicy:NSURLCacheStorageAllowed]; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - [NSURLConnection setNextResponse:response data:[@"{}" dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - [JSONHTTPClient postJSONFromURLWithString:jsonURLString - params:nil - completion:^(NSDictionary *json, JSONModelError *err) { - - NSURLRequest* request = [NSURLConnection lastRequest]; - - NSLog(@"request: %@", request.URL.absoluteString); - NSLog(@"keys active: %@", [[MTTestSemaphor semaphore] flags]); - - NSAssert(request.cachePolicy==NSURLCacheStorageAllowed, @"user set caching policy was not set in request"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testRequestTimeout -{ - //check if the header is sent along the http request - NSString* jsonURLString = @"http://localhost/test.json?testRequestTimeout"; - NSString* semaphorKey = @"testRequestTimeout"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - [NSURLConnection setNextResponse:response data:[@"{}" dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - //set the client timeout for 5 seconds - [JSONHTTPClient setTimeoutInSeconds:2]; - [JSONHTTPClient postJSONFromURLWithString: jsonURLString - params: nil - completion: ^(NSDictionary *json, JSONModelError *err) { - - NSURLRequest* request = [NSURLConnection lastRequest]; - NSAssert(request.timeoutInterval == 2, @"custom set timeout was not set to the request"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testGetJSONFromURLNoParams -{ - NSString* jsonURLString = @"http://localhost/test.json?testGetJSONFromURLNoParams"; - NSString* semaphorKey = @"testGetJSONFromURLNoParams"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - - [NSURLConnection setNextResponse:response data:[jsonContents dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - [JSONHTTPClient getJSONFromURLWithString:jsonURLString - completion:^(NSDictionary *json, JSONModelError *err) { - - //check block parameters - NSAssert(json, @"getJSONFromURLWithString:completion: returned nil, object expected"); - NSAssert(!err, @"getJSONFromURLWithString:completion: returned error, nil error expected"); - - //check JSON validity - NestedModel* model = [[NestedModel alloc] initWithDictionary:json error:nil]; - NSAssert(model, @"getJSONFromURLWithString:completion: got invalid response and model is not initialized properly"); - - //check the request - NSURLRequest* request = [NSURLConnection lastRequest]; - NSAssert([request.URL.absoluteString isEqualToString: jsonURLString], @"request.URL did not match the request URL"); - - //release the semaphore lock - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testGetJSONFromURLWithParams -{ - NSString* jsonURLString = @"http://localhost/test.json?testGetJSONFromURLWithParams"; - NSString* semaphorKey = @"testGetJSONFromURLWithParams"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - - [NSURLConnection setNextResponse:response data:[jsonContents dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - [JSONHTTPClient getJSONFromURLWithString:jsonURLString - params:@{@"key1":@"param1",@"key2":@"pa!?&r am2"} - completion:^(NSDictionary *json, JSONModelError *err) { - - //check block parameters - NSAssert(json, @"getJSONFromURLWithString:completion: returned nil, object expected"); - NSAssert(!err, @"getJSONFromURLWithString:completion: returned error, nil error expected"); - - //check JSON validity - NestedModel* model = [[NestedModel alloc] initWithDictionary:json error:nil]; - NSAssert(model, @"getJSONFromURLWithString:completion: got invalid response and model is not initialized properly"); - - //check the request - NSURLRequest* request = [NSURLConnection lastRequest]; - NSAssert([request.URL.absoluteString isEqualToString: @"http://localhost/test.json?testGetJSONFromURLWithParams&key1=param1&key2=pa%21%3F%26r%20am2"], @"request.URL did not match the request URL"); - - //release the semaphore lock - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testPostJSONWithParams -{ - NSString* jsonURLString = @"http://localhost/test.json?testPostJSONWithParams"; - NSString* semaphorKey = @"testPostJSONWithParams"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - - [NSURLConnection setNextResponse:response data:[jsonContents dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - [JSONHTTPClient postJSONFromURLWithString:jsonURLString - params:@{@"key1":@"param1",@"key2":@"pa!?&r am2"} - completion:^(NSDictionary *json, JSONModelError *err) { - - //check block parameters - NSAssert(json, @"getJSONFromURLWithString:completion: returned nil, object expected"); - NSAssert(!err, @"getJSONFromURLWithString:completion: returned error, nil error expected"); - - //check JSON validity - NestedModel* model = [[NestedModel alloc] initWithDictionary:json error:nil]; - NSAssert(model, @"getJSONFromURLWithString:completion: got invalid response and model is not initialized properly"); - - //check the request - NSURLRequest* request = [NSURLConnection lastRequest]; - NSString* paramsSent = [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding]; - NSAssert([request.URL.absoluteString isEqualToString: jsonURLString], @"request.URL is not the given URL"); - NSAssert([paramsSent isEqualToString: @"key1=param1&key2=pa%21%3F%26r%20am2"], @"request body data did not match the post encoded params"); - - //release the semaphore lock - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; - -} - --(void)testPostJSONWithBodyText -{ - NSString* jsonURLString = @"http://localhost/test.json?testPostJSONWithBodyText"; - NSString* semaphorKey = @"testPostJSONWithBodyText"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - - [NSURLConnection setNextResponse:response data:[jsonContents dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - [JSONHTTPClient postJSONFromURLWithString:jsonURLString - bodyString:@"{clear text post body}" - completion:^(NSDictionary *json, JSONModelError *err) { - - //check block parameters - NSAssert(json, @"getJSONFromURLWithString:completion: returned nil, object expected"); - NSAssert(!err, @"getJSONFromURLWithString:completion: returned error, nil error expected"); - - //check JSON validity - NestedModel* model = [[NestedModel alloc] initWithDictionary:json error:nil]; - NSAssert(model, @"getJSONFromURLWithString:completion: got invalid response and model is not initialized properly"); - - //check the request - NSURLRequest* request = [NSURLConnection lastRequest]; - NSString* paramsSent = [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding]; - NSAssert([request.URL.absoluteString isEqualToString: jsonURLString], @"request.URL is not the given URL"); - NSAssert([paramsSent isEqualToString: @"{clear text post body}"], @"post body data did not match the sent text"); - - //release the semaphore lock - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; - -} - --(void)testPostJSONWithBodyData -{ - NSString* jsonURLString = @"http://localhost/test.json?testPostJSONWithBodyData"; - NSString* semaphorKey = @"testPostJSONWithBodyData"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - - [NSURLConnection setNextResponse:response data:[jsonContents dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - NSData* postData = [@"POSTDATA" dataUsingEncoding:NSUTF8StringEncoding]; - - [JSONHTTPClient postJSONFromURLWithString:jsonURLString - bodyData:postData - completion:^(NSDictionary *json, JSONModelError *err) { - - //check block parameters - NSAssert(json, @"getJSONFromURLWithString:completion: returned nil, object expected"); - NSAssert(!err, @"getJSONFromURLWithString:completion: returned error, nil error expected"); - - //check JSON validity - NestedModel* model = [[NestedModel alloc] initWithDictionary:json error:nil]; - NSAssert(model, @"getJSONFromURLWithString:completion: got invalid response and model is not initialized properly"); - - //check the request - NSURLRequest* request = [NSURLConnection lastRequest]; - NSAssert([request.URL.absoluteString isEqualToString: jsonURLString], @"request.URL is not the given URL"); - NSAssert([postData isEqualToData:[request HTTPBody]], @"post data did not match the sent post data"); - - //release the semaphore lock - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testPostJSONWithError -{ - NSString* jsonURLString = @"http://localhost/test.json?testPostJSONWithError"; - NSString* semaphorKey = @"testPostJSONWithBodyData"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - - [NSURLConnection setNextResponse:response data:nil error:[NSError errorWithDomain:@"HTTP" code:1000 userInfo:@{}]]; - - NSData* postData = [@"POSTDATA" dataUsingEncoding:NSUTF8StringEncoding]; - - [JSONHTTPClient postJSONFromURLWithString:jsonURLString - bodyData:postData - completion:^(NSDictionary *json, JSONModelError *err) { - - //check block parameters - NSAssert(!json, @"getJSONFromURLWithString:completion: returned nil, object expected"); - NSAssert(err, @"getJSONFromURLWithString:completion: returned error, nil error expected"); - - //release the semaphore lock - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - -//https://github.com/JSONModel/JSONModel/issues/58 --(void)testNumberQueryParams -{ - NSString* jsonURLString = @"http://localhost/test.json?testGetJSONFromURLWithParamsNumber"; - NSString* semaphorKey = @"testGetJSONFromURLWithParamsNumber"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - - [NSURLConnection setNextResponse:response data:[jsonContents dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - [JSONHTTPClient getJSONFromURLWithString:jsonURLString - params:@{@"key1":@100.56,@"key2":@"test"} - completion:^(NSDictionary *json, JSONModelError *err) { - - //check block parameters - NSAssert(json, @"getJSONFromURLWithString:completion: returned nil, object expected"); - NSAssert(!err, @"getJSONFromURLWithString:completion: returned error, nil error expected"); - - //check the request - NSURLRequest* request = [NSURLConnection lastRequest]; - NSAssert([request.URL.absoluteString isEqualToString: @"http://localhost/test.json?testGetJSONFromURLWithParamsNumber&key1=100.56&key2=test"], @"request.URL did not match the request URL"); - - //release the semaphore lock - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; - -} - -//https://github.com/JSONModel/JSONModel/issues/59 --(void)testHttpStatusCodes -{ - //check if the header is sent along the http request - NSString* jsonURLString = @"http://localhost/test.json?case=testHttpStatuses"; - NSString* semaphorKey = @"testHttpStatuses"; - - //set a custom http error status code - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:601 - HTTPVersion:@"1.1" - headerFields:nil]; - [NSURLConnection setNextResponse:response data:[@"{\"name\":123}" dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - - [JSONHTTPClient postJSONFromURLWithString:jsonURLString - params:nil - completion:^(NSDictionary *json, JSONModelError *err) { - - NSAssert(json, @"JSON content not fetched"); - - NSAssert(err, @"No JSONModel error for HTTP response status 601"); - NSAssert(err.httpResponse, @"No HTTP response along a bad response JSONModel error"); - NSAssert(err.httpResponse.statusCode==601, @"The HTTP status code is not the set value of 601"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; - -} - -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/IdPropertyTests.h b/JSONModelDemoTests/UnitTests/IdPropertyTests.h deleted file mode 100644 index 407e8da8..00000000 --- a/JSONModelDemoTests/UnitTests/IdPropertyTests.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// IdPropertyTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 13/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface IdPropertyTests : XCTestCase - - - -@end diff --git a/JSONModelDemoTests/UnitTests/IdPropertyTests.m b/JSONModelDemoTests/UnitTests/IdPropertyTests.m deleted file mode 100644 index 06ee1b22..00000000 --- a/JSONModelDemoTests/UnitTests/IdPropertyTests.m +++ /dev/null @@ -1,56 +0,0 @@ -// -// IdPropertyTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 13/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "IdPropertyTests.h" -#import "PostsModel.h" -#import "PostModel.h" - -@implementation IdPropertyTests -{ - PostsModel* posts; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"post.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - posts = [[PostsModel alloc] initWithString: jsonContents error:&err]; - XCTAssertTrue(!err, "%@", [err localizedDescription]); - - XCTAssertNotNil(posts, @"Could not load the test data file."); -} - --(void)testEquality -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"post.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - PostsModel* posts1 = [[PostsModel alloc] initWithString: jsonContents error:nil]; - PostModel* post = posts.posts[0]; - - XCTAssertTrue([post isEqual:posts1.posts[0]], @"Equal to another different model object"); - - XCTAssertTrue([posts.posts indexOfObject: posts1.posts[1]]==1, @"NSArray searching for a model object failed" ); -} - --(void)testCompareInequality -{ - PostModel* post = posts.posts[0]; - XCTAssertTrue(![post isEqual:nil], @"Equal to nil object"); - XCTAssertTrue(![post isEqual:[NSNull null]], @"Equal to NSNull object"); - XCTAssertTrue(![post isEqual:posts.posts[1]], @"Equal to another different model object"); -} - - -@end diff --git a/JSONModelDemoTests/UnitTests/InitFromWebTests.h b/JSONModelDemoTests/UnitTests/InitFromWebTests.h deleted file mode 100644 index b414cf46..00000000 --- a/JSONModelDemoTests/UnitTests/InitFromWebTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// InitFromWebTests.h -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 4/3/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import - -@interface InitFromWebTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/InitFromWebTests.m b/JSONModelDemoTests/UnitTests/InitFromWebTests.m deleted file mode 100644 index 4fdebafc..00000000 --- a/JSONModelDemoTests/UnitTests/InitFromWebTests.m +++ /dev/null @@ -1,60 +0,0 @@ -// -// InitFromWebTests.m -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 4/3/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import "InitFromWebTests.h" -#import "JSONModelLib.h" -#import "MockNSURLConnection.h" -#import "MTTestSemaphor.h" - -#import "NestedModel.h" - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -@implementation InitFromWebTests -{ - NSString* jsonContents; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"nestedData.json"]; - jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); -} - --(void)testInitFromWeb -{ - NSString* jsonURLString = @"http://localhost/test.json?testInitFromWeb"; - NSString* semaphorKey = @"testInitFromWeb"; - - NSHTTPURLResponse* response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:jsonURLString] - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - - [NSURLConnection setNextResponse:response data:[jsonContents dataUsingEncoding:NSUTF8StringEncoding] error:nil]; - [NSURLConnection setResponseDelay:1]; - - __block NestedModel* nested = [[NestedModel alloc] initFromURLWithString:jsonURLString - completion:^(NestedModel *model, JSONModelError *err) { - - XCTAssertTrue(nested==model, @"async initialization didn't work"); - XCTAssertTrue(model.images.count>0, @"content not initialized from async init"); - - [NSURLConnection setResponseDelay:0]; - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - XCTAssertTrue(nested.isLoading, @"isLoading property not set during load"); - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/InitWithDataTests.m b/JSONModelDemoTests/UnitTests/InitWithDataTests.m deleted file mode 100644 index 8528cbef..00000000 --- a/JSONModelDemoTests/UnitTests/InitWithDataTests.m +++ /dev/null @@ -1,142 +0,0 @@ -// -// InitWithDataTests.m -// JSONModelDemo_iOS -// -// Created by Johnykutty on 14/09/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import -#import "PrimitivesModel.h" -#import "NestedModel.h" -#import "CopyrightModel.h" - -@interface InitWithDataTests : XCTestCase - -@end - -@implementation InitWithDataTests - -- (void)setUp -{ - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown -{ - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - --(void)testForNilInputFromData -{ - JSONModelError* err = nil; - - //test for nil string input - CopyrightModel* cpModel = [[CopyrightModel alloc] initWithData:nil - error:&err]; - cpModel=nil; - - XCTAssertTrue(err!=nil, @"No error returned when initialized with nil string"); - XCTAssertTrue(err.code == kJSONModelErrorNilInput, @"Wrong error for nil string input"); -} - --(void)testErrorsInNestedModelsArray -{ - NSError* err = [self performTestErrorsInNestedModelFile:@"nestedDataWithArrayError.json"]; - - // Make sure that the error is at the expected key-path - XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"images[1]", @"kJSONModelKeyPath does not contain the expected path of the error."); -} - --(void)testErrorsInNestedModelsDictionary -{ - NSError* err = [self performTestErrorsInNestedModelFile:@"nestedDataWithDictionaryError.json"]; - - // Make sure that the error is at the expected key-path - XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"imagesObject.image2", @"kJSONModelKeyPath does not contain the expected path of the error."); -} - -- (NSError*)performTestErrorsInNestedModelFile:(NSString*)jsonFilename -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:jsonFilename]; - NSData *jsonData = [NSData dataWithContentsOfFile:filePath]; - - XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); - - NSError* err = nil; - NestedModel* n = [[NestedModel alloc] initWithData: jsonData error:&err]; - XCTAssertNotNil(err, @"No error thrown when loading invalid data"); - - XCTAssertNil(n, @"Model is not nil, when invalid data input"); - XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for missing keys"); - - // Make sure that 'name' is listed as the missing key - XCTAssertEqualObjects(err.userInfo[kJSONModelMissingKeys][0], @"name", @"'name' should be the missing key."); - return err; -} - --(void)testMissingKeysError -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"primitivesWithErrors.json"]; - NSData *jsonData = [NSData dataWithContentsOfFile:filePath]; - - XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); - - NSError* err; - PrimitivesModel* p = [[PrimitivesModel alloc] initWithData: jsonData error:&err]; - XCTAssertNil(p, @"Model is not nil, when input is invalid"); - XCTAssertNotNil(err, @"No error when keys are missing."); - - XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for missing keys"); - NSArray* missingKeys = err.userInfo[kJSONModelMissingKeys]; - missingKeys = [missingKeys sortedArrayUsingSelector:@selector(compare:)]; - XCTAssertTrue(missingKeys, @"error does not have kJSONModelMissingKeys keys in user info"); - XCTAssertTrue([missingKeys[0] isEqualToString:@"intNumber"],@"missing field intNumber not found in missingKeys"); - XCTAssertTrue([missingKeys[1] isEqualToString:@"longNumber"],@"missing field longNumber not found in missingKeys"); -} - --(void)testTypeMismatchErrorImages -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"nestedDataWithTypeMismatchOnImages.json"]; - NSData *jsonData = [NSData dataWithContentsOfFile:filePath]; - - XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); - - NSError* err = nil; - NestedModel* p = [[NestedModel alloc] initWithData: jsonData error:&err]; - XCTAssertNil(p, @"Model is not nil, when input is invalid"); - XCTAssertNotNil(err, @"No error when types mismatch."); - - XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for type mismatch"); - NSString* mismatchDescription = err.userInfo[kJSONModelTypeMismatch]; - XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info"); - XCTAssertTrue([mismatchDescription rangeOfString:@"'images'"].location != NSNotFound, @"error should mention that the 'images' property (expecting an Array) is mismatched."); - - // Make sure that the error is at the expected key-path - XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"images", @"kJSONModelKeyPath does not contain the expected path of the error."); -} - --(void)testTypeMismatchErrorImagesObject -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"nestedDataWithTypeMismatchOnImagesObject.json"]; - NSData *jsonData = [NSData dataWithContentsOfFile:filePath]; - - XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); - - NSError* err; - NestedModel* p = [[NestedModel alloc] initWithData: jsonData error:&err]; - XCTAssertNil(p, @"Model is not nil, when input is invalid"); - XCTAssertNotNil(err, @"No error when types mismatch."); - - XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for type mismatch"); - NSString* mismatchDescription = err.userInfo[kJSONModelTypeMismatch]; - XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info"); - XCTAssertTrue([mismatchDescription rangeOfString:@"'imagesObject'"].location != NSNotFound, @"error should mention that the 'imagesObject' property (expecting a Dictionary) is mismatched."); - - // Make sure that the error is at the expected key-path - XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"imagesObject", @"kJSONModelKeyPath does not contain the expected path of the error."); -} - -@end diff --git a/JSONModelDemoTests/UnitTests/JSONAPITests.h b/JSONModelDemoTests/UnitTests/JSONAPITests.h deleted file mode 100644 index 2c74a6a7..00000000 --- a/JSONModelDemoTests/UnitTests/JSONAPITests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// JSONAPITests.h -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 4/2/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import - -@interface JSONAPITests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/JSONAPITests.m b/JSONModelDemoTests/UnitTests/JSONAPITests.m deleted file mode 100644 index 10f8a7c8..00000000 --- a/JSONModelDemoTests/UnitTests/JSONAPITests.m +++ /dev/null @@ -1,187 +0,0 @@ -// -// JSONAPITests.m -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 4/2/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import "JSONAPITests.h" -#import "MockNSURLConnection.h" -#import "MTTestSemaphor.h" - -#import "JSONModelLib.h" -#import "RpcRequestModel.h" - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -@implementation JSONAPITests - --(void)testBaseURL -{ - //check if the header is sent along the http request - NSString* apiBaseUrlString = @"http://localhost/test.json/"; - NSString* semaphorKey = @"testBaseURL"; - - [JSONAPI setAPIBaseURLWithString: apiBaseUrlString]; - [JSONAPI getWithPath: semaphorKey - andParams: nil - completion:^(NSDictionary *json, JSONModelError *err) { - - NSURLRequest* request = [NSURLConnection lastRequest]; - NSString* absString = [request.URL absoluteString]; - XCTAssertTrue([absString hasPrefix: apiBaseUrlString], @"URL request not start with base URL"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testContentType -{ - //check if the header is sent along the http request - NSString* apiBaseUrlString = @"http://localhost/test.json/"; - NSString* semaphorKey = @"testContentType"; - - NSString* ctype = @"MyCustomType"; - - [JSONAPI setAPIBaseURLWithString: apiBaseUrlString]; - [JSONAPI setContentType: ctype]; - [JSONAPI getWithPath: semaphorKey - andParams: nil - completion:^(NSDictionary *json, JSONModelError *err) { - - NSURLRequest* request = [NSURLConnection lastRequest]; - XCTAssertTrue([[request valueForHTTPHeaderField:@"Content-type"] hasPrefix:ctype], @"request content type was not MyCustomType"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - [JSONHTTPClient setRequestContentType:kContentTypeAutomatic]; - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testGetAPIRequests -{ - //check if the header is sent along the http request - NSString* apiBaseUrlString = @"http://localhost/test.json/"; - NSString* semaphorKey = @"testGetAPIRequests"; - - [JSONAPI setAPIBaseURLWithString: apiBaseUrlString]; - - //test GET method, no params - [JSONAPI getWithPath: semaphorKey - andParams: nil - completion:^(NSDictionary *json, JSONModelError *err) { - - NSURLRequest* request = [NSURLConnection lastRequest]; - NSString* absString = [request.URL absoluteString]; - NSString* desiredString = @"http://localhost/test.json/testGetAPIRequests"; - XCTAssertTrue( [absString isEqualToString: desiredString] , @"URL does not match"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - - }]; - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; - - //test GET method, with params - [JSONAPI getWithPath: semaphorKey - andParams: @{@"key2":@"marin",@"key1":@"ma rin"} - completion:^(NSDictionary *json, JSONModelError *err) { - - NSURLRequest* request = [NSURLConnection lastRequest]; - NSString* absString = [request.URL absoluteString]; - NSString* desiredString = @"http://localhost/test.json/testGetAPIRequests?key1=ma%20rin&key2=marin"; - XCTAssertTrue( [absString isEqualToString: desiredString] , @"URL does not match"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - - }]; - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testPostAPIRequests -{ - //check if the header is sent along the http request - NSString* apiBaseUrlString = @"http://localhost/test.json/"; - NSString* semaphorKey = @"testPostAPIRequests"; - - [JSONAPI setAPIBaseURLWithString: apiBaseUrlString]; - - //test POST method, with params - [JSONAPI postWithPath: semaphorKey - andParams: @{@"key2":@"marin",@"key1":@"ma rin"} - completion:^(NSDictionary *json, JSONModelError *err) { - - NSURLRequest* request = [NSURLConnection lastRequest]; - NSString* absString = [request.URL absoluteString]; - NSString* desiredString = @"http://localhost/test.json/testPostAPIRequests"; - XCTAssertTrue( [absString isEqualToString: desiredString] , @"URL does not match"); - - NSString* paramsSent = [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding]; - XCTAssertTrue([paramsSent isEqualToString: @"key1=ma%20rin&key2=marin"], @"request body data did not match the post encoded params"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - - }]; - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - --(void)testRpcRequest -{ - //check if the header is sent along the http request - NSString* apiBaseUrlString = @"http://localhost/test.json/"; - NSString* semaphorKey = @"testRpcRequest"; - - [JSONAPI setAPIBaseURLWithString: apiBaseUrlString]; - - //test RPC method, no params - [JSONAPI rpcWithMethodName:semaphorKey - andArguments:nil - completion:^(NSDictionary *json, JSONModelError *err) { - - NSURLRequest* request = [NSURLConnection lastRequest]; - NSString* absString = [request.URL absoluteString]; - NSString* desiredString = @"http://localhost/test.json/"; - XCTAssertTrue([absString isEqualToString: desiredString], @"URL does not match"); - - NSString* jsonSent = [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding]; - RpcRequestModel* jsonRequest = [[RpcRequestModel alloc] initWithString:jsonSent error:nil]; - XCTAssertNotNil(jsonRequest, @"RPC request is not valid"); - - XCTAssertNotNil(jsonRequest.id, @"id is nil"); - XCTAssertTrue([jsonRequest.params count]==0, @"params not an empty array"); - XCTAssertTrue([jsonRequest.method isEqualToString: semaphorKey], @"method name does not match"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; - - //test RPC method, with params - [JSONAPI rpcWithMethodName:semaphorKey - andArguments:@[@"chicken", @1, @[@"semi",@"conductor"]] - completion:^(NSDictionary *json, JSONModelError *err) { - - NSURLRequest* request = [NSURLConnection lastRequest]; - NSString* jsonSent = [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding]; - RpcRequestModel* jsonRequest = [[RpcRequestModel alloc] initWithString:jsonSent error:nil]; - XCTAssertNotNil(jsonRequest, @"RPC request is not valid"); - - XCTAssertTrue([jsonRequest.params[0] isEqualToString: @"chicken"], @"first param is not chicken"); - XCTAssertTrue([jsonRequest.params[1] isEqualToNumber:@1], @"second param is not 1"); - XCTAssertTrue([jsonRequest.params[2] count]==2, @"third param is not 2 element array"); - - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; - -} - -@end diff --git a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.h b/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.h deleted file mode 100644 index 52ba36fd..00000000 --- a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// JSONTypesModelWithValidation1.h -// JSONModelDemo -// -// Created by Marin Todorov on 17/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONTypesModel.h" - -@interface JSONTypesModelWithValidation1 : JSONTypesModel - -@end diff --git a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.m b/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.m deleted file mode 100644 index 1aa57417..00000000 --- a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// JSONTypesModelWithValidation1.m -// JSONModelDemo -// -// Created by Marin Todorov on 17/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONTypesModelWithValidation1.h" - -@implementation JSONTypesModelWithValidation1 - --(BOOL)validate:(NSError**)err -{ - if (!([self.year intValue]>2011 && [self.pi floatValue]>3.10)) { - *err = [JSONModelError errorModelIsInvalid]; - return NO; - } - - return YES; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.h b/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.h deleted file mode 100644 index 71c37f0c..00000000 --- a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// JSONTypesModelWithValidation2.h -// JSONModelDemo -// -// Created by Marin Todorov on 17/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONTypesModel.h" - -@interface JSONTypesModelWithValidation2 : JSONTypesModel - -@end diff --git a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.m b/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.m deleted file mode 100644 index 200d5c28..00000000 --- a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// JSONTypesModelWithValidation2.m -// JSONModelDemo -// -// Created by Marin Todorov on 17/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONTypesModelWithValidation2.h" - -@implementation JSONTypesModelWithValidation2 - --(BOOL)validate:(NSError**)err -{ - if (!([self.year intValue]<2011 || [self.pi floatValue]<3.10)) { - *err = [JSONModelError errorModelIsInvalid]; - return NO; - } - return YES; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/JSONTypesReadTests.h b/JSONModelDemoTests/UnitTests/JSONTypesReadTests.h deleted file mode 100644 index dbc3af3b..00000000 --- a/JSONModelDemoTests/UnitTests/JSONTypesReadTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// JSONTypesReadTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface JSONTypesReadTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/JSONTypesReadTests.m b/JSONModelDemoTests/UnitTests/JSONTypesReadTests.m deleted file mode 100644 index 16d7fc9c..00000000 --- a/JSONModelDemoTests/UnitTests/JSONTypesReadTests.m +++ /dev/null @@ -1,66 +0,0 @@ -// -// JSONTypesReadTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONTypesReadTests.h" -#import "JSONTypesModel.h" - -@implementation JSONTypesReadTests -{ - JSONTypesModel* t; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"jsonTypes.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - t = [[JSONTypesModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(t, @"Could not load the test data file."); -} - --(void)testStandardTypes -{ - XCTAssertTrue([t.caption isKindOfClass:[NSString class]], @"caption is not NSString object"); - XCTAssertTrue([t.caption isEqualToString:@"This is a text element"], @"caption value is not 'This is a text element'"); - - XCTAssertTrue([t.dynamicString isKindOfClass:[NSMutableString class]], @"caption is not NSMutableString object"); - [t.dynamicString appendString:@"!!!"]; - XCTAssertTrue([t.dynamicString isEqualToString:@"A piece of text!!!"], @"caption value is not 'A piece of text!!!'"); - - XCTAssertTrue([t.year isKindOfClass:[NSNumber class]], @"year is not NSNumber object"); - XCTAssertTrue([t.year intValue]==2012, @"year value is not 2012"); - - XCTAssertTrue([t.pi isKindOfClass:[NSNumber class]], @"pi is not NSNumber object"); - XCTAssertEqualWithAccuracy([t.pi floatValue], 3.14159, FLT_EPSILON, @"pi value is not 3.14159"); - - XCTAssertTrue([t.list isKindOfClass:[NSArray class]], @"list failed to read"); - XCTAssertTrue([t.list[0] isEqualToString:@"111"], @"list - first obect is not \"111\""); - - XCTAssertTrue([t.dynamicList isKindOfClass:[NSArray class]], @"dynamicList failed to read"); - XCTAssertTrue([t.dynamicList[0] isEqualToString:@"12"], @"dynamicList - first obect is not \"12\""); - - XCTAssertTrue([t.dictionary isKindOfClass:[NSDictionary class]], @"dictionary failed to read"); - XCTAssertTrue([t.dictionary[@"test"] isEqualToString:@"mest"], @"dictionary key \"test\"'s value is not \"mest\""); - - XCTAssertTrue([t.dynamicDictionary isKindOfClass:[NSMutableDictionary class]], @"dynamicDictionary failed to read"); - XCTAssertTrue([t.dynamicDictionary[@"key"] isEqualToString:@"value"], @"dynamicDictionary key \"key\"'s value is not \"value\""); - [t.dynamicDictionary setValue:@"ADDED" forKey:@"newKey"]; - XCTAssertTrue([t.dynamicDictionary[@"newKey"] isEqualToString:@"ADDED"], @"dynamicDictionary key \"newKey\"'s value is not \"ADDED\""); - - XCTAssertTrue(!t.notAvailable, @"notAvailable is not nil"); -} - - - -@end diff --git a/JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.h b/JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.h deleted file mode 100644 index 2aed7ee1..00000000 --- a/JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// JSONValueTransformer+UIColor.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import -#import "JSONValueTransformer.h" - -@interface JSONValueTransformer(Color) - -#pragma mark - uicolor <-> hex color -/* uicolor <-> hex color for converting text hex representations to actual color objects */ - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED --(UIColor*)UIColorFromNSString:(NSString*)string; --(id)JSONObjectFromUIColor:(UIColor*)color; -#else --(NSColor*)UIColorFromNSString:(NSString*)string; --(id)JSONObjectFromUIColor:(NSColor*)color; -#endif -@end diff --git a/JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.m b/JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.m deleted file mode 100644 index 247ed033..00000000 --- a/JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// JSONValueTransformer+Color.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONValueTransformer+UIColor.h" - -@implementation JSONValueTransformer(UIColor) - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED --(UIColor*)UIColorFromNSString:(NSString *)string -#else --(NSColor*)NSColorFromNSString:(NSString *)string -#endif -{ - // - // http://stackoverflow.com/a/13648705 - // - - NSString *noHashString = [string stringByReplacingOccurrencesOfString:@"#" withString:@""]; // remove the # - NSScanner *scanner = [NSScanner scannerWithString:noHashString]; - [scanner setCharactersToBeSkipped:[NSCharacterSet symbolCharacterSet]]; // remove + and $ - - unsigned hex; - if (![scanner scanHexInt:&hex]) return nil; - int r = (hex >> 16) & 0xFF; - int g = (hex >> 8) & 0xFF; - int b = (hex) & 0xFF; - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED - return [UIColor colorWithRed:r / 255.0f green:g / 255.0f blue:b / 255.0f alpha:1.0f]; -#else - return [NSColor colorWithCalibratedRed:r / 255.0f green:g / 255.0f blue:b / 255.0f alpha:1.0f]; -#endif -} - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED --(id)JSONObjectFromUIColor:(UIColor*)color -#else --(id)JSONObjectFromNSColor:(NSColor*)color -#endif -{ - // - // http://softteco.blogspot.de/2011/06/extract-hex-rgb-color-from-uicolor.html - // - - return [NSString stringWithFormat:@"#%02X%02X%02X", (int)((CGColorGetComponents(color.CGColor))[0]*255.0), (int)((CGColorGetComponents(color.CGColor))[1]*255.0), (int)((CGColorGetComponents(color.CGColor))[2]*255.0)]; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/KeyMappingTests.h b/JSONModelDemoTests/UnitTests/KeyMappingTests.h deleted file mode 100644 index 3cda518a..00000000 --- a/JSONModelDemoTests/UnitTests/KeyMappingTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// KeyMappingTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface KeyMappingTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/KeyMappingTests.m b/JSONModelDemoTests/UnitTests/KeyMappingTests.m deleted file mode 100644 index 7177f8c1..00000000 --- a/JSONModelDemoTests/UnitTests/KeyMappingTests.m +++ /dev/null @@ -1,310 +0,0 @@ -// -// KeyMappingTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "KeyMappingTests.h" -#import "JSONModelLib.h" -#import "GitHubKeyMapRepoModel.h" -#import "GitHubKeyMapRepoModelDict.h" -#import "GitHubRepoModelForUSMapper.h" -#import "ModelForUpperCaseMapper.h" -#import "RenamedPropertyModel.h" - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#pragma mark - TestModel class -@interface TestModel: JSONModel - -@property (strong, nonatomic) NSString* text1; -@property (strong, nonatomic) NSString* text2; - -@property (strong, nonatomic) NSString* text3; - -@end -@implementation TestModel - -+(JSONKeyMapper*)keyMapper -{ - return [[JSONKeyMapper alloc] initWithDictionary:@{ - @"texts.text1": @"text1", - @"texts.text2.value": @"text2" - }]; -} - -@end - -#pragma mark - at-name property -@interface AtNameModel : JSONModel -@property (assign) int type; -@end - -@implementation AtNameModel -+(JSONKeyMapper*)keyMapper -{ - return [[JSONKeyMapper alloc] initWithDictionary:@{ - @"@type": @"type" - }]; -} -@end - -#pragma mark - global key mapper test model -@interface GlobalModel: JSONModel -@property (strong, nonatomic) NSString* name; -@end -@implementation GlobalModel -@end - -#pragma mark - KeyMappingTests unit test - -@implementation KeyMappingTests -{ - NSArray* json; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"github-iphone.json"]; - NSData* jsonData = [NSData dataWithContentsOfFile:filePath]; - - XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); - - NSError* err; - NSDictionary* jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:&err]; - json = jsonDict[@"repositories"]; - - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(jsonData, @"Could not load the test data file."); -} - --(void)testKeyMapping -{ - NSDictionary* repo1 = json[0]; - GitHubKeyMapRepoModel* model1 = [[GitHubKeyMapRepoModel alloc] initWithDictionary:repo1 error:nil]; - XCTAssertNotNil(model1, @"Could not initialize model"); - XCTAssertNotNil(model1.__description, @"__description is nil"); - XCTAssertTrue([model1.__description isEqualToString:repo1[@"description"]], @"__description was not mapped properly"); - - NSDictionary* dict = [model1 toDictionary]; - XCTAssertNotNil(dict[@"description"], @"description not exported properly"); -} - --(void)testKeyMappingWithDict -{ - NSDictionary* repo1 = json[0]; - GitHubKeyMapRepoModelDict* model1 = [[GitHubKeyMapRepoModelDict alloc] initWithDictionary:repo1 error:nil]; - XCTAssertNotNil(model1, @"Could not initialize model"); - XCTAssertNotNil(model1.__description, @"__description is nil"); - XCTAssertTrue([model1.__description isEqualToString:repo1[@"description"]], @"__description was not mapped properly"); - - NSDictionary* dict = [model1 toDictionary]; - XCTAssertNotNil(dict[@"description"], @"description not exported properly"); -} - --(void)testUnderscoreMapper -{ - NSString* jsonString = @"{\"pushed_at\":\"2012-12-18T19:21:35-08:00\",\"created_at\":\"2012-12-18T19:21:35-08:00\",\"a_very_long_property_name\":10000, \"item_object_145\":\"TEST\", \"item_object_176_details\":\"OTHERTEST\"}"; - GitHubRepoModelForUSMapper* m = [[GitHubRepoModelForUSMapper alloc] initWithString:jsonString error:nil]; - XCTAssertNotNil(m, @"Could not initialize model from string"); - - //import - XCTAssertTrue([m.pushedAt compare:[NSDate dateWithTimeIntervalSinceReferenceDate:0] ]==NSOrderedDescending, @"pushedAt is not initialized"); - XCTAssertTrue([m.createdAt compare:[NSDate dateWithTimeIntervalSinceReferenceDate:0] ]==NSOrderedDescending, @"createdAt is not initialized"); - XCTAssertTrue(m.aVeryLongPropertyName == 10000, @"aVeryLongPropertyName is not 10000"); - - XCTAssertEqualObjects(m.itemObject145, @"TEST", @"itemObject145 does not equal 'TEST'"); - XCTAssertEqualObjects(m.itemObject176Details, @"OTHERTEST", @"itemObject176Details does not equal 'OTHERTEST'"); - - //export - NSDictionary* dict = [m toDictionary]; - XCTAssertNotNil(dict, @"toDictionary failed"); - - XCTAssertNotNil(dict[@"pushed_at"], @"pushed_at not exported"); - XCTAssertNotNil(dict[@"created_at"], @"pushed_at not exported"); - XCTAssertTrue([dict[@"a_very_long_property_name"] intValue]==10000,@"a_very_long_property_name not exported properly"); - - XCTAssertEqualObjects(dict[@"item_object_145"], m.itemObject145, @"item_object_145 does not equal 'TEST'"); - XCTAssertEqualObjects(dict[@"item_object_176_details"], m.itemObject176Details, @"item_object_176_details does not equal 'OTHERTEST'"); -} - --(void)testUpperCaseMapper -{ - NSString* jsonString = @"{\"UPPERTEST\":\"TEST\"}"; - ModelForUpperCaseMapper * m = [[ModelForUpperCaseMapper alloc] initWithString:jsonString error:nil]; - XCTAssertNotNil(m, @"Could not initialize model from string"); - - //import - XCTAssertEqualObjects(m.uppertest, @"TEST", @"uppertest does not equal 'TEST'"); - - //export - NSDictionary* dict = [m toDictionary]; - XCTAssertNotNil(dict, @"toDictionary failed"); - - XCTAssertEqualObjects(dict[@"UPPERTEST"], m.uppertest, @"UPPERTEST does not equal 'TEST'"); -} - --(void)testKeyMapperCaching -{ - //simulate fetching different models, so the keyMapper cache is used - - [self testUnderscoreMapper]; - [self testKeyMapping]; - [self testUnderscoreMapper]; - [self testKeyMapping]; - [self testUnderscoreMapper]; - [self testKeyMapping]; -} - --(void)testKeyPathKeyMapping -{ - //input dictionary for TestModel - NSDictionary* dict = @{ - @"texts": @{ - @"text1": @"TEST!!!", - @"text2": @{@"value":@"MEST"} - } - }; - - NSError* err = nil; - TestModel* model = [[TestModel alloc] initWithDictionary:dict error:&err]; - - XCTAssertTrue(err==nil, @"Error creating TestModel: %@", [err localizedDescription]); - XCTAssertTrue(model!=nil, @"TestModel instance is nil"); - - XCTAssertTrue([model.text1 isEqualToString:@"TEST!!!"], @"text1 is not 'TEST!!!'"); - XCTAssertTrue([model.text2 isEqualToString:@"MEST"], @"text1 is not 'MEST'"); - - NSDictionary* toDict = [model toDictionary]; - - XCTAssertTrue([toDict[@"texts"][@"text1"] isEqualToString:@"TEST!!!"], @"toDict.texts.text1 is not 'TEST!!!'"); - XCTAssertTrue([toDict[@"texts"][@"text2"][@"value"] isEqualToString:@"MEST"], @"toDict.texts.text2.value is not 'MEST'"); - - NSString* toString = [model toJSONString]; - XCTAssertTrue([toString rangeOfString:@"text1\":\"TEST!!!"].location!=NSNotFound, @"model did not export text1 in string"); -} - --(void)testGlobalKeyMapperImportAndExport -{ - //import - NSString* jsonString1 = @"{\"name\": \"NAME IN CAPITALS\"}"; - GlobalModel* global1 = [[GlobalModel alloc] initWithString:jsonString1 - error:nil]; - XCTAssertNotNil(global1, @"model did not initialize with proper json"); - - - //test import via gloabl key mapper - [JSONModel setGlobalKeyMapper:[[JSONKeyMapper alloc] initWithDictionary:@{ - @"name1":@"name" - }]]; - - NSString* jsonString2 = @"{\"name1\": \"NAME IN CAPITALS\"}"; - GlobalModel* global2 = [[GlobalModel alloc] initWithString:jsonString2 - error:nil]; - XCTAssertNotNil(global2, @"model did not initialize with proper json"); - - //export - NSDictionary* dict = [global2 toDictionary]; - XCTAssertNotNil(dict[@"name1"], @"model did not export name"); - NSString* exportedString = [global2 toJSONString]; - XCTAssertTrue([exportedString rangeOfString:@"name1\":\"NAME"].location!=NSNotFound, @"model did not export name in string"); - - [JSONModel setGlobalKeyMapper:nil]; - - GlobalModel* global3 = [[GlobalModel alloc] initWithString:jsonString2 - error:nil]; - XCTAssertNil(global3, @"model supposed to be nil"); - - [JSONModel setGlobalKeyMapper:nil]; -} - -//https://github.com/JSONModel/JSONModel/issues/132 --(void)testAtNameProperty -{ - AtNameModel* at = [[AtNameModel alloc] initWithString:@"{\"@type\":157}" error:nil]; - XCTAssertNotNil(at, @"model instance is nil"); -} - --(void)testMergingData -{ - //import - GlobalModel* global1 = [[GlobalModel alloc] init]; - XCTAssertNotNil(global1, @"model did not initialize"); - XCTAssertNil(global1.name, @"name got a value when nil expected"); - - NSDictionary* data = @{@"name":@"NAME IN CAPITALS"}; - [global1 mergeFromDictionary:data useKeyMapping:NO error:nil]; - - XCTAssertEqualObjects(global1.name, @"NAME IN CAPITALS", @"did not import name property"); - - //test import via gloabl key mapper - [JSONModel setGlobalKeyMapper:[[JSONKeyMapper alloc] initWithDictionary:@{ - @"name1":@"name" - }]]; - GlobalModel* global2 = [[GlobalModel alloc] init]; - NSDictionary* data2 = @{@"name1":@"NAME IN CAPITALS"}; - [global2 mergeFromDictionary:data2 useKeyMapping:YES error:nil]; - - XCTAssertEqualObjects(global2.name, @"NAME IN CAPITALS", @"did not import name property"); - - [JSONModel setGlobalKeyMapper:nil]; -} - -//https://github.com/JSONModel/JSONModel/issues/180 --(void)testUsingBothGlobalAndCustomMappers -{ - //input dictionary for TestModel - NSDictionary* dict = @{ - @"texts": @{ - @"text1": @"TEST!!!", - @"text2": @{@"value":@"MEST"}, - @"text3": @"Marin" - } - }; - - //test import via gloabl key mapper - [JSONModel setGlobalKeyMapper:[[JSONKeyMapper alloc] initWithDictionary:@{ - @"texts.text3":@"text3" - }]]; - - NSError* err = nil; - TestModel* model = [[TestModel alloc] initWithDictionary:dict error:&err]; - - XCTAssertTrue(err==nil, @"Error creating TestModel: %@", [err localizedDescription]); - XCTAssertTrue(model!=nil, @"TestModel instance is nil"); - - XCTAssertTrue([model.text3 isEqualToString:@"Marin"], @"text3 is not 'Marin'"); - - NSDictionary* toDict = [model toDictionary]; - - XCTAssertTrue([toDict[@"texts"][@"text3"] isEqualToString:@"Marin"], @"toDict.texts.text3 is not 'Marin'"); - - NSString* toString = [model toJSONString]; - XCTAssertTrue([toString rangeOfString:@"text3\":\"Marin"].location!=NSNotFound, @"model did not export text3 in string"); - - [JSONModel setGlobalKeyMapper:nil]; -} - -- (void)testExceptionsMapper -{ - NSString *jsonString = @"{\"ID\":\"12345\",\"NAME\":\"TEST\"}"; - RenamedPropertyModel *m = [[RenamedPropertyModel alloc] initWithString:jsonString error:nil]; - XCTAssertNotNil(m, @"Could not initialize model from string"); - - // import - XCTAssertEqualObjects(m.identifier, @"12345", @"identifier does not equal '12345'"); - XCTAssertEqualObjects(m.name, @"TEST", @"name does not equal 'TEST'"); - - // export - NSDictionary *dict = [m toDictionary]; - XCTAssertNotNil(dict, @"toDictionary failed"); - - XCTAssertEqualObjects(dict[@"ID"], m.identifier, @"ID does not equal '12345'"); - XCTAssertEqualObjects(dict[@"NAME"], m.name, @"NAME does not equal 'TEST'"); -} - -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/NestedModelsTests.h b/JSONModelDemoTests/UnitTests/NestedModelsTests.h deleted file mode 100644 index 1c69bc13..00000000 --- a/JSONModelDemoTests/UnitTests/NestedModelsTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// NestedModelsTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface NestedModelsTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/NestedModelsTests.m b/JSONModelDemoTests/UnitTests/NestedModelsTests.m deleted file mode 100644 index 41cb6365..00000000 --- a/JSONModelDemoTests/UnitTests/NestedModelsTests.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// NestedModelsTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "NestedModelsTests.h" - -#import "NestedModel.h" -#import "ImageModel.h" -#import "CopyrightModel.h" - -@implementation NestedModelsTests -{ - NestedModel* n; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"nestedData.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - n = [[NestedModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(n, @"Could not load the test data file."); -} - --(void)testNestedStructures -{ - XCTAssertTrue([n.singleImage isKindOfClass:[ImageModel class]], @"singleImage is not an ImageModel instance"); - XCTAssertTrue([n.singleImage.name isEqualToString:@"lake.jpg"], @"singleImage.name is not 'lake.jpg'"); - - XCTAssertTrue([n.images isKindOfClass:[NSArray class]], @"images is not an NSArray"); - XCTAssertTrue([n.images[0] isKindOfClass:[ImageModel class]], @"images[0] is not an ImageModel instance"); - XCTAssertTrue([[n.images[0] name] isEqualToString:@"house.jpg"], @"images[0].name is not 'house.jpg'"); - CopyrightModel* copy = [n.images[0] copyright]; - XCTAssertTrue([copy.author isEqualToString:@"Marin Todorov"], @"images[0].name.copyright is not 'Marin Todorov'"); - - XCTAssertTrue([n.imagesObject isKindOfClass:[NSDictionary class]], @"imagesObject is not an NSDictionary"); - ImageModel* img = n.imagesObject[@"image2"]; - XCTAssertTrue([img isKindOfClass:[ImageModel class]], @"images[image2] is not an ImageModel instance"); - XCTAssertTrue([img.name isEqualToString:@"lake.jpg"], @"imagesObject[image2].name is not 'lake.jpg'"); - -} - -@end diff --git a/JSONModelDemoTests/UnitTests/OptionalPropertiesTests.h b/JSONModelDemoTests/UnitTests/OptionalPropertiesTests.h deleted file mode 100644 index c644b62a..00000000 --- a/JSONModelDemoTests/UnitTests/OptionalPropertiesTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// OptionalPropertiesTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface OptionalPropertiesTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/OptionalPropertiesTests.m b/JSONModelDemoTests/UnitTests/OptionalPropertiesTests.m deleted file mode 100644 index 2898558e..00000000 --- a/JSONModelDemoTests/UnitTests/OptionalPropertiesTests.m +++ /dev/null @@ -1,61 +0,0 @@ -// -// OptionalPropertiesTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "OptionalPropertiesTests.h" -#import "OptionalPropModel.h" - -@implementation OptionalPropertiesTests -{ - OptionalPropModel* o; -} - --(void)testPropertyPresent -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"withOptProp.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - o = [[OptionalPropModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(o, @"Could not load the test data file."); - - XCTAssertTrue([o.notRequredProperty isEqualToString:@"I'm here this time!"], @"notRequredProperty' value is not 'I'm here this time!'"); -} - --(void)testPropertyMissing -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"withoutOptProp.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - o = [[OptionalPropModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(o, @"Could not load the test data file."); - - XCTAssertTrue(!o.notRequredProperty, @"notRequredProperty' is not nil"); - -} - --(void)testNullValuesForOptionalProperties -{ - NSString* jsonWithNulls = @"{\"notRequredProperty\":null,\"fillerNumber\":1}"; - - NSError* err; - o = [[OptionalPropModel alloc] initWithString: jsonWithNulls error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(o, @"Could not initialize the model"); - - XCTAssertTrue(!o.notRequredProperty, @"notRequredProperty' is not nil"); - -} - -@end diff --git a/JSONModelDemoTests/UnitTests/PersistTests.h b/JSONModelDemoTests/UnitTests/PersistTests.h deleted file mode 100644 index 69488ff9..00000000 --- a/JSONModelDemoTests/UnitTests/PersistTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// PersistTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 16/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface PersistTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/PersistTests.m b/JSONModelDemoTests/UnitTests/PersistTests.m deleted file mode 100644 index 57100e7f..00000000 --- a/JSONModelDemoTests/UnitTests/PersistTests.m +++ /dev/null @@ -1,113 +0,0 @@ -// -// PersistTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 16/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "PersistTests.h" -#import "JSONTypesModel.h" -#import "BuiltInConversionsModel.h" - -@implementation PersistTests - --(void)testPersistJSONTypes -{ - //--------------------------------------- - // load JSON file - //--------------------------------------- - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"jsonTypes.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - JSONTypesModel* t = [[JSONTypesModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(t, @"Could not load the test data file."); - - //--------------------------------------- - // export model to NSDictionary - //--------------------------------------- - - NSDictionary* d = [t toDictionary]; - XCTAssertNotNil(d, @"toDictionary returned nil"); - XCTAssertTrue([d isKindOfClass:[NSDictionary class]], @"toDictionary didn't return NSDictionary object"); - - XCTAssertTrue( [t.caption isEqualToString: d[@"caption"] ], @"caption key is not equal to exported value"); - - //--------------------------------------- - // turn NSDictionary to a model - //--------------------------------------- - - JSONTypesModel* t1 = [[JSONTypesModel alloc] initWithDictionary:d error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - - XCTAssertTrue( [t1.caption isEqualToString:t.caption], @"t1.caption != t.caption" ); - XCTAssertTrue( t1.notAvailable==t.notAvailable, @"t1.notAvailable != t.notAvailable" ); - - //--------------------------------------- - // export model to JSON - //--------------------------------------- - - NSString* json = [t1 toJSONString]; - XCTAssertNotNil(json, @"Exported JSON is nil"); - - //--------------------------------------- - // turn exported JSON to a model - //--------------------------------------- - - JSONTypesModel* t2 = [[JSONTypesModel alloc] initWithString:json error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - - XCTAssertTrue([t1.caption isEqualToString:t2.caption], @"t1.caption != t2.caption" ); - XCTAssertTrue(t1.notAvailable==t2.notAvailable, @"t1.notAvailable != t2.notAvailable" ); -} - --(void)testBoolExport -{ - //--------------------------------------- - // load JSON file - //--------------------------------------- - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"converts.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - BuiltInConversionsModel* b = [[BuiltInConversionsModel alloc] initWithString: jsonContents error:&err]; - - //--------------------------------------- - // export model to NSDictionary - //--------------------------------------- - - NSDictionary* d = [b toDictionary]; - XCTAssertNotNil(d, @"toDictionary returned nil"); - XCTAssertTrue([d isKindOfClass:[NSDictionary class]], @"toDictionary didn't return NSDictionary object"); - - XCTAssertTrue( [@(1) isEqualToNumber:d[@"boolFromString"]], @"boolFromString key is not equal to YES"); -} - --(void)testCopy -{ - //load json - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"converts.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - BuiltInConversionsModel* b = [[BuiltInConversionsModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNotNil(b.importantEvent, @"Did not initialize model with data"); - - //test copying and coding at the same time - BuiltInConversionsModel* b1 = [b copy]; - - XCTAssertNotNil(b1, @"model copy did not succeed"); - XCTAssertTrue([b.importantEvent isEqualToDate: b1.importantEvent], @"date copy were not equal to original"); -} - -@end diff --git a/JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.h b/JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.h deleted file mode 100644 index 2d1ecde5..00000000 --- a/JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// PrimitiveTypesReadTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface PrimitiveTypesReadTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.m b/JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.m deleted file mode 100644 index 121105f3..00000000 --- a/JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.m +++ /dev/null @@ -1,80 +0,0 @@ -// -// PrimitiveTypesReadTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "PrimitiveTypesReadTests.h" -#import "PrimitivesModel.h" - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 -#import "EnumModel.h" -#endif - -@implementation PrimitiveTypesReadTests -{ - PrimitivesModel* p; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"primitives.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - p = [[PrimitivesModel alloc] initWithString: jsonContents error:&err]; - - XCTAssertNil(err, "%@", [err localizedDescription]); - - XCTAssertNotNil(p, @"Could not load the test data file."); -} - --(void)testPrimitiveTypes -{ - XCTAssertTrue(p.shortNumber==114, @"shortNumber read fail"); - XCTAssertTrue(p.intNumber==12, @"intNumber read fail"); - XCTAssertTrue(p.longNumber==12124, @"longNumber read fail"); - - XCTAssertEqualWithAccuracy(p.floatNumber, 12.12, FLT_EPSILON, @"floatNumber read fail"); - XCTAssertEqualWithAccuracy(p.doubleNumber, 121231312.124, DBL_EPSILON, @"doubleNumber read fail"); - - XCTAssertTrue(p.boolNO==NO, @"boolNO read fail"); - XCTAssertTrue(p.boolYES==YES, @"boolYES read fail"); -} - --(void)testBoolExport -{ - NSString* exportedJSON = [p toJSONString]; - XCTAssertTrue([exportedJSON rangeOfString:@"\"boolNO\":false"].location != NSNotFound, @"boolNO should export to 'false'"); - XCTAssertTrue([exportedJSON rangeOfString:@"\"boolYES\":true"].location != NSNotFound, @"boolYES should export to 'true'"); -} - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 --(void)testEnumerationTypes -{ - NSString* jsonContents = @"{\"nested\":{\"status\":\"open\"},\"nsStatus\":\"closed\",\"nsuStatus\":\"open\",\"statusString\":\"open\"}"; - - NSError* err; - EnumModel* p1 = [[EnumModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - - XCTAssertNotNil(p1, @"Could not read input json text"); - - XCTAssertTrue(p1.status==StatusOpen, @"Status is not StatusOpen"); - XCTAssertTrue(p1.nsStatus==NSE_StatusClosed, @"nsStatus is not NSE_StatusClosed"); - XCTAssertTrue(p1.nsuStatus==NSEU_StatusOpen, @"nsuStatus is not NSEU_StatusOpen"); - - NSString* json = [p1 toJSONString]; - XCTAssertTrue([json rangeOfString:@"\"statusString\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); - XCTAssertTrue([json rangeOfString:@"\"nsuStatus\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); - XCTAssertTrue([json rangeOfString:@"\"nsStatus\":\"closed\""].location!=NSNotFound, @"Exporting enum value didn't work out"); -} -#endif - -@end diff --git a/JSONModelDemoTests/UnitTests/SimpleDataErrorTests.h b/JSONModelDemoTests/UnitTests/SimpleDataErrorTests.h deleted file mode 100644 index 7c0468d5..00000000 --- a/JSONModelDemoTests/UnitTests/SimpleDataErrorTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// SimpleDataErrorTests.h -// JSONModelDemo -// -// Created by Marin Todorov on 13/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface SimpleDataErrorTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/SimpleDataErrorTests.m b/JSONModelDemoTests/UnitTests/SimpleDataErrorTests.m deleted file mode 100644 index 4de6f1e5..00000000 --- a/JSONModelDemoTests/UnitTests/SimpleDataErrorTests.m +++ /dev/null @@ -1,163 +0,0 @@ -// -// SimpleDataErrorTests.m -// JSONModelDemo -// -// Created by Marin Todorov on 13/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "SimpleDataErrorTests.h" -#import "PrimitivesModel.h" -#import "NestedModel.h" -#import "CopyrightModel.h" - -@implementation SimpleDataErrorTests - --(void)testMissingKeysError -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"primitivesWithErrors.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - PrimitivesModel* p = [[PrimitivesModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(p, @"Model is not nil, when input is invalid"); - XCTAssertNotNil(err, @"No error when keys are missing."); - - XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for missing keys"); - NSArray* missingKeys = err.userInfo[kJSONModelMissingKeys]; - missingKeys = [missingKeys sortedArrayUsingSelector:@selector(compare:)]; - XCTAssertTrue(missingKeys, @"error does not have kJSONModelMissingKeys keys in user info"); - XCTAssertTrue([missingKeys[0] isEqualToString:@"intNumber"],@"missing field intNumber not found in missingKeys"); - XCTAssertTrue([missingKeys[1] isEqualToString:@"longNumber"],@"missing field longNumber not found in missingKeys"); -} - --(void)testTypeMismatchErrorImages -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"nestedDataWithTypeMismatchOnImages.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err = nil; - NestedModel* p = [[NestedModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(p, @"Model is not nil, when input is invalid"); - XCTAssertNotNil(err, @"No error when types mismatch."); - - XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for type mismatch"); - NSString* mismatchDescription = err.userInfo[kJSONModelTypeMismatch]; - XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info"); - XCTAssertTrue([mismatchDescription rangeOfString:@"'images'"].location != NSNotFound, @"error should mention that the 'images' property (expecting an Array) is mismatched."); - - // Make sure that the error is at the expected key-path - XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"images", @"kJSONModelKeyPath does not contain the expected path of the error."); -} - --(void)testTypeMismatchErrorImagesObject -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"nestedDataWithTypeMismatchOnImagesObject.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - NestedModel* p = [[NestedModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(p, @"Model is not nil, when input is invalid"); - XCTAssertNotNil(err, @"No error when types mismatch."); - - XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for type mismatch"); - NSString* mismatchDescription = err.userInfo[kJSONModelTypeMismatch]; - XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info"); - XCTAssertTrue([mismatchDescription rangeOfString:@"'imagesObject'"].location != NSNotFound, @"error should mention that the 'imagesObject' property (expecting a Dictionary) is mismatched."); - - // Make sure that the error is at the expected key-path - XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"imagesObject", @"kJSONModelKeyPath does not contain the expected path of the error."); -} - --(void)testBrokenJSON -{ - NSString* jsonContents = @"{[1,23,4],\"123\":123,}"; - - NSError* err; - PrimitivesModel* p = [[PrimitivesModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNil(p, @"Model is not nil, when input is invalid"); - XCTAssertNotNil(err, @"No error when keys are missing."); - - XCTAssertTrue(err.code == kJSONModelErrorBadJSON, @"Wrong error for bad JSON"); -} - -- (NSError*)performTestErrorsInNestedModelFile:(NSString*)jsonFilename -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:jsonFilename]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err = nil; - NestedModel* n = [[NestedModel alloc] initWithString: jsonContents error:&err]; - XCTAssertNotNil(err, @"No error thrown when loading invalid data"); - - XCTAssertNil(n, @"Model is not nil, when invalid data input"); - XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for missing keys"); - - // Make sure that 'name' is listed as the missing key - XCTAssertEqualObjects(err.userInfo[kJSONModelMissingKeys][0], @"name", @"'name' should be the missing key."); - return err; -} - --(void)testErrorsInNestedModelsArray -{ - NSError* err = [self performTestErrorsInNestedModelFile:@"nestedDataWithArrayError.json"]; - - // Make sure that the error is at the expected key-path - XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"images[1]", @"kJSONModelKeyPath does not contain the expected path of the error."); -} - --(void)testErrorsInNestedModelsDictionary -{ - NSError* err = [self performTestErrorsInNestedModelFile:@"nestedDataWithDictionaryError.json"]; - - // Make sure that the error is at the expected key-path - XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"imagesObject.image2", @"kJSONModelKeyPath does not contain the expected path of the error."); -} - --(void)testForNilInputFromString -{ - JSONModelError* err = nil; - - //test for nil string input - CopyrightModel* cpModel = [[CopyrightModel alloc] initWithString:nil - error:&err]; - cpModel=nil; - - XCTAssertTrue(err!=nil, @"No error returned when initialized with nil string"); - XCTAssertTrue(err.code == kJSONModelErrorNilInput, @"Wrong error for nil string input"); -} - --(void)testForNilInputFromDictionary -{ - JSONModelError* err = nil; - - //test for nil string input - CopyrightModel* cpModel = [[CopyrightModel alloc] initWithDictionary:nil - error:&err]; - cpModel=nil; - - XCTAssertTrue(err!=nil, @"No error returned when initialized with nil dictionary"); - XCTAssertTrue(err.code == kJSONModelErrorNilInput, @"Wrong error for nil dictionary input"); -} - --(void)testForNullValuesForRequiredProperty -{ - JSONModelError* err = nil; - NSString* jsonString = @"{\"author\":\"Marin\",\"year\":null}"; - - CopyrightModel* cpModel = [[CopyrightModel alloc] initWithString:jsonString - error:&err]; - cpModel = nil; - XCTAssertTrue(err, @"No error returned when initialized with nil dictionary"); - XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error null value for a required property"); -} - -@end diff --git a/JSONModelDemoTests/UnitTests/SpecialPropertiesTests.m b/JSONModelDemoTests/UnitTests/SpecialPropertiesTests.m deleted file mode 100644 index ee8d1e02..00000000 --- a/JSONModelDemoTests/UnitTests/SpecialPropertiesTests.m +++ /dev/null @@ -1,87 +0,0 @@ -// -// SpecialPropertiesTests.m -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 4/18/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import -#import "JSONModel.h" - -#pragma mark - model with block property -@interface BModel: JSONModel -@property (assign, nonatomic) int id; -@property (nonatomic, copy) void(^userLocationCompleted)(); -@end - -@implementation BModel -@end - -#pragma mark - model with read-only properties -@interface RModel: JSONModel -@property (assign, nonatomic) int id; -@property (assign, nonatomic, readonly) int rId; -@property (strong, nonatomic, readonly) NSNumber* nId; -@end - -@implementation RModel -@end - -#pragma mark - empty array/dictionary -@interface DModel: JSONModel -@property (strong, nonatomic) NSDictionary* dict; -@property (strong, nonatomic) NSMutableDictionary* mdict; -@end - -@implementation DModel -@end - -#pragma mark - test suite - -@interface SpecialPropertiesTests : XCTestCase - -@end - -@implementation SpecialPropertiesTests - -- (void)setUp -{ - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown -{ - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -//test autoignoring block properties -- (void)testBlocks -{ - NSString* json = @"{\"id\":1}"; - BModel* bm = [[BModel alloc] initWithString:json error:nil]; - XCTAssertNotNil(bm, @"model failed to crate"); -} - -//test autoignoring read-only properties -- (void)testReadOnly -{ - NSString* json = @"{\"id\":1}"; - RModel* rm = [[RModel alloc] initWithString:json error:nil]; - XCTAssertNotNil(rm, @"model failed to crate"); -} - -//test auto-converting array to dict --(void)testEmtpyDictionary -{ - NSString* json = @"{\"dict\":[],\"mdict\":[]}"; - DModel* dm = [[DModel alloc] initWithString:json error:nil]; - XCTAssertNotNil(dm, @"model failed to crate"); - XCTAssertTrue([dm.dict isKindOfClass:[NSDictionary class]], @"property did not convert to dictionary"); - XCTAssertTrue([dm.mdict isKindOfClass:[NSMutableDictionary class]], @"property did not convert to mutable dictionary"); -} - -@end - diff --git a/JSONModelDemoTests/UnitTests/SpecialPropertyNameTests.h b/JSONModelDemoTests/UnitTests/SpecialPropertyNameTests.h deleted file mode 100644 index 3d771760..00000000 --- a/JSONModelDemoTests/UnitTests/SpecialPropertyNameTests.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// SpeicalPropertyNameTest.h -// JSONModelDemo_OSX -// -// Created by BB9z on 13-4-26. -// Copyright (c) 2013年 Underplot ltd. All rights reserved. -// - -#import - -@interface SpecialPropertyNameTests : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/SpecialPropertyNameTests.m b/JSONModelDemoTests/UnitTests/SpecialPropertyNameTests.m deleted file mode 100644 index 81a00086..00000000 --- a/JSONModelDemoTests/UnitTests/SpecialPropertyNameTests.m +++ /dev/null @@ -1,35 +0,0 @@ -// -// SpeicalPropertyNameTest.m -// JSONModelDemo_OSX -// -// Created by BB9z on 13-4-26. -// Copyright (c) 2013年 Underplot ltd. All rights reserved. -// - -#import "SpecialPropertyNameTests.h" -#import "SpecialPropertyModel.h" - -@interface DescModel : JSONModel -@property (assign, nonatomic) int id; -@end - -@implementation DescModel -@end - -@implementation SpecialPropertyNameTests - -- (void)testSpecialPropertyName -{ - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"specialPropertyName.json"]; - NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; - - XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); - - NSError* err; - SpecialPropertyModel *p = [[SpecialPropertyModel alloc] initWithString: jsonContents error:&err]; - - XCTAssertNotNil(p, @"Could not initialize model."); - XCTAssertNil(err, "%@", [err localizedDescription]); -} - -@end diff --git a/JSONModelDemoTests/UnitTests/SpecialValuesTests.m b/JSONModelDemoTests/UnitTests/SpecialValuesTests.m deleted file mode 100644 index 99bf76b4..00000000 --- a/JSONModelDemoTests/UnitTests/SpecialValuesTests.m +++ /dev/null @@ -1,50 +0,0 @@ - -// -// SpecialValuesTests.m -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 3/23/16. -// Copyright © 2016 Underplot ltd. All rights reserved. -// - -#import -#import "JSONModelLib.h" - -//model class -@interface SpecialModel: JSONModel -@property (strong, nonatomic) NSString* name; -@end - -@implementation SpecialModel -@end - -//tests class -@interface SpecialValuesTests : XCTestCase -@end - -@implementation SpecialValuesTests -{ - SpecialModel* _model; -} - -- (void)setUp { - [super setUp]; - - NSString* jsonContents = @"{\"name\": \"FIRST_SECOND\"}"; - - NSError *err; - _model = [[SpecialModel alloc] initWithString:jsonContents error:&err]; - XCTAssertNil(err, "%@", [err localizedDescription]); - XCTAssertNotNil(_model, @"Could not load the test data file."); -} - -// tests: https://github.com/JSONModel/JSONModel/issues/460 -- (void)testExample { - XCTAssertTrue([_model.name isEqualToString:@"FIRST_SECOND"]); -} - --(void)tearDown { - _model = nil; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h b/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h deleted file mode 100644 index 8b4de15a..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// BuiltInConversionsModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface BuiltInConversionsModel : JSONModel - -/* BOOL automatically converted from a number */ -@property (assign, nonatomic) BOOL isItYesOrNo; - -@property (assign, nonatomic) BOOL boolFromString; -@property (assign, nonatomic) BOOL boolFromNumber; -@property (assign, nonatomic) BOOL boolFromBoolean; - -/* unordered list */ -@property (strong, nonatomic) NSSet* unorderedList; - -/* mutable unordered list */ -@property (strong, nonatomic) NSMutableSet* dynamicUnorderedList; - -/* automatically convert JSON data types */ -@property (strong, nonatomic) NSString* stringFromNumber; -@property (strong, nonatomic) NSNumber* numberFromString; -@property (strong, nonatomic) NSNumber* doubleFromString; - -/* predefined transformer */ -@property (strong, nonatomic) NSDate* importantEvent; - -/* URLs */ -@property (strong, nonatomic) NSURL* websiteURL; - -/* Time zone */ -@property (strong, nonatomic) NSTimeZone *timeZone; - -/* String array */ -@property (strong, nonatomic) NSArray* stringArray; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.m b/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.m deleted file mode 100644 index 7302a4d7..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// BuiltInConversionsModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "BuiltInConversionsModel.h" - -@implementation BuiltInConversionsModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.h b/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.h deleted file mode 100644 index 5d634676..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// CopyrightModel.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface CopyrightModel : JSONModel - -@property (strong, nonatomic) NSString* author; -@property (strong, nonatomic) NSNumber* year; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.m b/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.m deleted file mode 100644 index b38095d4..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// CopyrightModel.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "CopyrightModel.h" - -@implementation CopyrightModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.h b/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.h deleted file mode 100644 index ab53131a..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// CustomPropertyModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -//TODO: The methods the category adds are accessible without importing the header, what gives? -#import "JSONValueTransformer+UIColor.h" - -@interface CustomPropertyModel : JSONModel - -/* custom transformer from JSONValueTransformer+UIColor.h */ -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -@property (strong, nonatomic) UIColor* redColor; -@property (strong, nonatomic) UIColor* blueColor; -#else -@property (strong, nonatomic) NSColor* redColor; -@property (strong, nonatomic) NSColor* blueColor; -#endif - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.m b/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.m deleted file mode 100644 index 80082f69..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// CustomPropertyModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "CustomPropertyModel.h" - -@implementation CustomPropertyModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/DrugModel.h b/JSONModelDemoTests/UnitTests/TestModels/DrugModel.h deleted file mode 100644 index 233f8ad6..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/DrugModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// Created by Rahul Somasunderam on 9/4/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import -#import "JSONModel.h" - -@protocol InteractionModel; - -@protocol DrugModel -@end -@interface DrugModel : JSONModel -@property NSString *brand_name; -@property NSArray *interaction_list; -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/DrugModel.m b/JSONModelDemoTests/UnitTests/TestModels/DrugModel.m deleted file mode 100644 index 39feaba2..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/DrugModel.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// Created by Rahul Somasunderam on 9/4/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import "DrugModel.h" -#import "InteractionModel.h" - - -@implementation DrugModel -{ - -} -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/EnumModel.h b/JSONModelDemoTests/UnitTests/TestModels/EnumModel.h deleted file mode 100644 index 0911e41e..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/EnumModel.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// EnumModel.h -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 6/17/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -//stock enum definition -typedef enum { - StatusOpen = 1000, - StatusClosed = 2000, -} Status; - -//marco enum definition -typedef NS_ENUM(NSInteger, NSE_Status) { - NSE_StatusOpen = 1001, - NSE_StatusClosed = 2001, -}; - -//marco enum definition NSUInteger -typedef NS_ENUM(NSUInteger, NSEU_Status) { - NSEU_StatusOpen = 1002, - NSEU_StatusClosed = 2002, -}; - -@interface EnumModel : JSONModel - -@property (nonatomic) Status status; -@property (nonatomic) NSE_Status nsStatus; -@property (nonatomic) NSEU_Status nsuStatus; -@property (nonatomic) Status nestedStatus; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/EnumModel.m b/JSONModelDemoTests/UnitTests/TestModels/EnumModel.m deleted file mode 100644 index 54c920a7..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/EnumModel.m +++ /dev/null @@ -1,61 +0,0 @@ -// -// EnumModel.m -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 6/17/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import "EnumModel.h" - -@implementation EnumModel - --(void)setStatusWithNSString:(NSString*)statusString -{ - _status = [statusString isEqualToString:@"open"]?StatusOpen:StatusClosed; -} - --(void)setNsStatusWithNSString:(NSString*)statusString -{ - _nsStatus = [statusString isEqualToString:@"open"]?NSE_StatusOpen:NSE_StatusClosed; -} - --(void)setNsuStatusWithNSString:(NSString*)statusString -{ - _nsuStatus = [statusString isEqualToString:@"open"]?NSEU_StatusOpen:NSEU_StatusClosed; -} - --(void)setNestedStatusWithNSString:(NSString*)statusString -{ - _status = [statusString isEqualToString:@"open"]?StatusOpen:StatusClosed; -} - --(id)JSONObjectForStatus -{ - return (self.status==StatusOpen)?@"open":@"closed"; -} - --(id)JSONObjectForNsStatus -{ - return (self.nsStatus==NSE_StatusOpen)?@"open":@"closed"; -} - --(id)JSONObjectForNsuStatus -{ - return (self.nsuStatus==NSEU_StatusOpen)?@"open":@"closed"; -} - --(id)JSONObjectForNestedStatus -{ - return (self.status==StatusOpen)?@"open":@"closed"; -} - -+(JSONKeyMapper*)keyMapper -{ - return [[JSONKeyMapper alloc] initWithDictionary:@{ - @"statusString":@"status", - @"nested.status":@"nestedStatus" - }]; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.h b/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.h deleted file mode 100644 index 307aecac..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// Created by Rahul Somasunderam on 9/4/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import -#import "JSONModel.h" - - -@protocol DrugModel; - -@interface ExtremeNestingModel : JSONModel -@property NSArray *drugs; -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.m b/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.m deleted file mode 100644 index 5a985fe9..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// Created by Rahul Somasunderam on 9/4/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import "ExtremeNestingModel.h" - - -@implementation ExtremeNestingModel -{ - -} - -+(JSONKeyMapper*)keyMapper -{ - return [[JSONKeyMapper alloc] initWithDictionary:@{ - @"generic_alternatives.items.data" : @"drugs" - }]; -} - -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h b/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h deleted file mode 100644 index b321282c..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// GitHubKeyMapRepoModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface GitHubKeyMapRepoModel : JSONModel - -@property (strong, nonatomic) NSString* __description; -@property (strong, nonatomic) NSString* language; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -@property (assign, nonatomic) NSString* name; -#pragma GCC diagnostic pop - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m b/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m deleted file mode 100644 index d19b8412..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// GitHubKeyMapRepoModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "GitHubKeyMapRepoModel.h" - -@implementation GitHubKeyMapRepoModel - -+(JSONKeyMapper*)keyMapper -{ - return [[JSONKeyMapper alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) { - - if ([keyName isEqual:@"__description"]) { - return @"description"; - } else { - return keyName; - } - - }]; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.h b/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.h deleted file mode 100644 index 41eb046d..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// GitHubKeyMapRepoModelDict.h -// JSONModelDemo -// -// Created by Marin Todorov on 20/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "GitHubKeyMapRepoModel.h" - -@interface GitHubKeyMapRepoModelDict : GitHubKeyMapRepoModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.m b/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.m deleted file mode 100644 index aef6f289..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.m +++ /dev/null @@ -1,20 +0,0 @@ -// -// GitHubKeyMapRepoModelDict.m -// JSONModelDemo -// -// Created by Marin Todorov on 20/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "GitHubKeyMapRepoModelDict.h" - -@implementation GitHubKeyMapRepoModelDict - -+(JSONKeyMapper*)keyMapper -{ - return [[JSONKeyMapper alloc] initWithDictionary: - @{@"description":@"__description"} - ]; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h b/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h deleted file mode 100644 index 04bc247e..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// GitHubRepoModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@protocol GitHubRepoModel -@end - -@interface GitHubRepoModel : JSONModel - -@property (strong, nonatomic) NSDate* created; -@property (strong, nonatomic) NSDate* pushed; -@property (assign, nonatomic) int watchers; -@property (strong, nonatomic) NSString* owner; -@property (assign, nonatomic) int forks; -@property (strong, nonatomic) NSString* language; -@property (assign, nonatomic) BOOL fork; -@property (assign, nonatomic) double size; -@property (assign, nonatomic) int followers; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -@property (strong, nonatomic) NSString* name; -#pragma GCC diagnostic pop - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.m b/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.m deleted file mode 100644 index 327c98f3..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// GitHubRepoModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "GitHubRepoModel.h" - -@implementation GitHubRepoModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.h b/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.h deleted file mode 100644 index b350bc18..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// GitHubRepoModelForUSMapper.h -// JSONModelDemo -// -// Created by Marin Todorov on 21/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface GitHubRepoModelForUSMapper : JSONModel - -@property (strong, nonatomic) NSDate* pushedAt; -@property (strong, nonatomic) NSDate* createdAt; -@property (assign, nonatomic) int aVeryLongPropertyName; - -@property (strong, nonatomic) NSString* itemObject145; -@property (strong, nonatomic) NSString* itemObject176Details; - -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.m b/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.m deleted file mode 100644 index a9d06f25..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// GitHubRepoModelForUSMapper.m -// JSONModelDemo -// -// Created by Marin Todorov on 21/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "GitHubRepoModelForUSMapper.h" - -@implementation GitHubRepoModelForUSMapper - -+(JSONKeyMapper*)keyMapper -{ - return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase]; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/ImageModel.h b/JSONModelDemoTests/UnitTests/TestModels/ImageModel.h deleted file mode 100644 index ee1e3e08..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ImageModel.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// ImageModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "CopyrightModel.h" - -@protocol ImageModel @end - -@interface ImageModel : JSONModel - -@property (strong, nonatomic) NSNumber* idImage; -@property (strong, nonatomic) NSString* name; - -@property (strong, nonatomic) CopyrightModel* copyright; - - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/ImageModel.m b/JSONModelDemoTests/UnitTests/TestModels/ImageModel.m deleted file mode 100644 index 42374700..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ImageModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// ImageModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "ImageModel.h" - -@implementation ImageModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/InteractionModel.h b/JSONModelDemoTests/UnitTests/TestModels/InteractionModel.h deleted file mode 100644 index ff0a2660..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/InteractionModel.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// Created by Rahul Somasunderam on 9/4/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import -#import "JSONModel.h" - -@protocol InteractionModel -@end -@interface InteractionModel : JSONModel -@property NSString *type; -@property NSString *title; -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/InteractionModel.m b/JSONModelDemoTests/UnitTests/TestModels/InteractionModel.m deleted file mode 100644 index cfa08533..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/InteractionModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// Created by Rahul Somasunderam on 9/4/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import "InteractionModel.h" - - -@implementation InteractionModel -{ - -} -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.h b/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.h deleted file mode 100644 index 39d055c7..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// JSONTypesModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface JSONTypesModel : JSONModel - -/* string */ -@property (strong, nonatomic) NSString* caption; - -/* mutable string */ -@property (strong, nonatomic) NSMutableString* dynamicString; - -/* integer number */ -@property (strong, nonatomic) NSNumber* year; - -/* float number */ -@property (strong, nonatomic) NSNumber* pi; - -/* list */ -@property (strong, nonatomic) NSArray* list; - -/* mutable list */ -@property (strong, nonatomic) NSMutableArray* dynamicList; - -/* object */ -@property (strong, nonatomic) NSDictionary* dictionary; - -/* mutable object */ -@property (strong, nonatomic) NSMutableDictionary* dynamicDictionary; - -/* null */ -@property (strong, nonatomic) NSString* notAvailable; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.m b/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.m deleted file mode 100644 index 50205fa4..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// JSONTypesModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONTypesModel.h" - -@implementation JSONTypesModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.h b/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.h deleted file mode 100644 index 15266b3a..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// Created by Petr Korolev on 21/02/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface ModelForUpperCaseMapper : JSONModel - -@property (strong, nonatomic) NSString* uppertest; - -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.m b/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.m deleted file mode 100644 index caaacb18..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.m +++ /dev/null @@ -1,15 +0,0 @@ -// -// Created by Petr Korolev on 21/02/14. -// Copyright (c) 2014 Underplot ltd. All rights reserved. -// - -#import "ModelForUpperCaseMapper.h" - -@implementation ModelForUpperCaseMapper - -+(JSONKeyMapper*)keyMapper -{ - return [JSONKeyMapper mapperFromUpperCaseToLowerCase]; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/NestedModel.h b/JSONModelDemoTests/UnitTests/TestModels/NestedModel.h deleted file mode 100644 index a5294e99..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/NestedModel.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// NestedModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "ImageModel.h" - -@interface NestedModel : JSONModel - -/* JSONModel object */ -@property (strong, nonatomic) ImageModel* singleImage; - -/* list of JSONModel objects */ -@property (strong, nonatomic) NSArray* images; - -/* dictionary of JSONModel objects */ -@property (strong, nonatomic) NSDictionary* imagesObject; - - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/NestedModel.m b/JSONModelDemoTests/UnitTests/TestModels/NestedModel.m deleted file mode 100644 index a4fb37b1..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/NestedModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// NestedModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "NestedModel.h" - -@implementation NestedModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.h b/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.h deleted file mode 100644 index 80d87fb6..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// OptionalPropModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface OptionalPropModel : JSONModel - -/* filler property */ -@property (assign, nonatomic) int fillerNumber; - -/* optional property, not required in the JSON data */ -@property (strong, nonatomic) NSString* notRequredProperty; - -/* this is a property of the model class that gets completely ignored */ -@property (strong, nonatomic) NSString* ignoredProperty; - -/* optional struct property */ -@property (assign, nonatomic) CGPoint notRequiredPoint; - -+(BOOL)propertyIsOptional:(NSString*)propertyName; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.m b/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.m deleted file mode 100644 index f4aa28ec..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// OptionalPropModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "OptionalPropModel.h" - -@implementation OptionalPropModel - -+(BOOL)propertyIsOptional:(NSString*)propertyName{ - if(![super propertyIsOptional:propertyName]){ - if([@[@"notRequiredPoint"] containsObject:propertyName]){ - return YES; - } - } - return NO; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PostModel.h b/JSONModelDemoTests/UnitTests/TestModels/PostModel.h deleted file mode 100644 index ad455320..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/PostModel.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// PostModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 13/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@protocol PostModel @end - -@interface PostModel : JSONModel - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -@property (strong, nonatomic) NSString* id; -#pragma GCC diagnostic pop - -@property (strong, nonatomic) NSString* name; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PostModel.m b/JSONModelDemoTests/UnitTests/TestModels/PostModel.m deleted file mode 100644 index e8183360..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/PostModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// PostModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 13/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "PostModel.h" - -@implementation PostModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PostsModel.h b/JSONModelDemoTests/UnitTests/TestModels/PostsModel.h deleted file mode 100644 index c67dcc26..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/PostsModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// PostsModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 13/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "PostModel.h" - -@interface PostsModel : JSONModel - -@property (strong, nonatomic) NSArray* posts; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PostsModel.m b/JSONModelDemoTests/UnitTests/TestModels/PostsModel.m deleted file mode 100644 index 68dfd462..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/PostsModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// PostsModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 13/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "PostsModel.h" - -@implementation PostsModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.h b/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.h deleted file mode 100644 index 360dde27..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// PrimitivesModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface PrimitivesModel : JSONModel - -/* short type */ -@property (assign, nonatomic) short shortNumber; - -/* int type */ -@property (assign, nonatomic) int intNumber; - -/* long type */ -@property (assign, nonatomic) long longNumber; - -/* float type */ -@property (assign, nonatomic) float floatNumber; - -/* double type */ -@property (assign, nonatomic) double doubleNumber; - -/* BOOL */ -@property (assign, nonatomic) BOOL boolYES; - -/* BOOL */ -@property (assign, nonatomic) BOOL boolNO; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.m b/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.m deleted file mode 100644 index ff4beecc..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// PrimitivesModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "PrimitivesModel.h" - -@implementation PrimitivesModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.h b/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.h deleted file mode 100644 index 41f90a42..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// RenamedPropertyModel.h -// JSONModelDemo_iOS -// -// Created by James Billingham on 16/12/2015. -// Copyright © 2015 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface RenamedPropertyModel : JSONModel - -@property (copy, nonatomic) NSString *identifier; -@property (copy, nonatomic) NSString *name; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.m b/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.m deleted file mode 100644 index c2095823..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/RenamedPropertyModel.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// RenamedPropertyModel.m -// JSONModelDemo_iOS -// -// Created by James Billingham on 16/12/2015. -// Copyright © 2015 Underplot ltd. All rights reserved. -// - -#import "RenamedPropertyModel.h" - -@implementation RenamedPropertyModel - -+ (JSONKeyMapper *)keyMapper -{ - JSONKeyMapper *base = [JSONKeyMapper mapperFromUpperCaseToLowerCase]; - return [JSONKeyMapper mapper:base withExceptions:@{@"ID": @"identifier"}]; -} - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h deleted file mode 100644 index 984bf57b..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// ReposModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "GitHubRepoModel.h" - -@interface ReposModel : JSONModel - -@property (strong, nonatomic) NSMutableArray* repositories; - -@end - -@interface ReposProtocolArrayModel : JSONModel - -@property (strong, nonatomic) NSMutableArray* repositories; - -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m deleted file mode 100644 index 9baf8223..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// ReposModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 19/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "ReposModel.h" - -@implementation ReposModel - -@end - - -@implementation ReposProtocolArrayModel - -+(NSString*)protocolForArrayProperty:(NSString *)propertyName -{ - if ([propertyName isEqualToString:@"repositories"]) { - return NSStringFromClass(GitHubRepoModel.class); - } - return nil; -} - -@end \ No newline at end of file diff --git a/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.h b/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.h deleted file mode 100644 index d1e5722e..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// RpcRequestModel.h -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 4/2/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface RpcRequestModel : JSONModel - -@property (strong, nonatomic) NSString* id; -@property (strong, nonatomic) NSArray* params; -@property (strong, nonatomic) NSString* method; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.m b/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.m deleted file mode 100644 index 0ad9aecc..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// RpcRequestModel.m -// JSONModelDemo_iOS -// -// Created by Marin Todorov on 4/2/13. -// Copyright (c) 2013 Underplot ltd. All rights reserved. -// - -#import "RpcRequestModel.h" - -@implementation RpcRequestModel - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.h b/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.h deleted file mode 100644 index f141c9db..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// SpecialPropertyModel.h -// JSONModelDemo_OSX -// -// Created by BB9z on 13-4-26. -// Copyright (c) 2013年 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface SpecialPropertyModel : JSONModel -@property (strong, nonatomic) NSString *className; -@property (strong, nonatomic) NSString *indexPropertyName; -@property (strong, nonatomic) NSString *id; - -@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.m b/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.m deleted file mode 100644 index 686c6473..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// SpecialPropertyModel.m -// JSONModelDemo_OSX -// -// Created by BB9z on 13-4-26. -// Copyright (c) 2013年 Underplot ltd. All rights reserved. -// - -#import "SpecialPropertyModel.h" - -@implementation SpecialPropertyModel - -@end diff --git a/JSONModelDemoTests/UnitTests/ValidationTestSuite.h b/JSONModelDemoTests/UnitTests/ValidationTestSuite.h deleted file mode 100644 index f6cc3703..00000000 --- a/JSONModelDemoTests/UnitTests/ValidationTestSuite.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ValidationTestSuite.h -// JSONModelDemo -// -// Created by Marin Todorov on 17/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface ValidationTestSuite : XCTestCase - -@end diff --git a/JSONModelDemoTests/UnitTests/ValidationTestSuite.m b/JSONModelDemoTests/UnitTests/ValidationTestSuite.m deleted file mode 100644 index 20c41b36..00000000 --- a/JSONModelDemoTests/UnitTests/ValidationTestSuite.m +++ /dev/null @@ -1,66 +0,0 @@ -// -// ValidationTestSuite.m -// JSONModelDemo -// -// Created by Marin Todorov on 17/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "ValidationTestSuite.h" -#import "JSONTypesModelWithValidation1.h" -#import "JSONTypesModelWithValidation2.h" - -@implementation ValidationTestSuite -{ - NSString* jsonContents; -} - --(void)setUp -{ - [super setUp]; - - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"jsonTypes.json"]; - jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; -} - --(void)testValidData -{ - NSError* err; - JSONTypesModelWithValidation1* val1 = [[JSONTypesModelWithValidation1 alloc] initWithString:jsonContents error:&err]; - NSAssert(val1, @"Model didn't initialize"); - NSAssert(!err, @"Model is not nil, but there's an error back from init"); - -} - --(void)testInvalidData -{ - NSError* err; - JSONTypesModelWithValidation2* val2 = [[JSONTypesModelWithValidation2 alloc] initWithString:jsonContents error:&err]; - NSAssert(!val2, @"Model did initialize with wrong data"); - NSAssert(err.code == kJSONModelErrorModelIsInvalid, @"Error code is not kJSONModelErrorModelIsInvalid"); - -} - --(void)testBOOLValidationResult -{ - NSError* err; - JSONTypesModelWithValidation1* val1 = [[JSONTypesModelWithValidation1 alloc] initWithString:jsonContents error:&err]; - val1.pi = @1.0; - - NSError* valError = nil; - BOOL res = [val1 validate: &valError]; - - NSAssert(res==NO, @"JSONTypesModelWithValidation1 validate failed to return false"); - NSAssert(valError!=nil, @"JSONTypesModelWithValidation1 validate failed to return an error object"); - - val1.pi = @3.15; - - valError = nil; - res = [val1 validate: &valError]; - - NSAssert(res==YES, @"JSONTypesModelWithValidation1 validate failed to return true"); - NSAssert(valError==nil, @"JSONTypesModelWithValidation1 validate failed to return a nil error object"); - -} - -@end diff --git a/JSONModelDemo_OSX.xcodeproj/project.pbxproj b/JSONModelDemo_OSX.xcodeproj/project.pbxproj deleted file mode 100644 index 30a79855..00000000 --- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj +++ /dev/null @@ -1,967 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1AE9CA931C21F50C00B8F5C1 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */; }; - 1C008FE518B7AE54002DFD3A /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */; }; - 9C05B43F168CEB220054215E /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3F7168CEB220054215E /* ArrayTests.m */; }; - 9C05B440168CEB220054215E /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */; }; - 9C05B442168CEB220054215E /* CustomPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3FD168CEB220054215E /* CustomPropsTests.m */; }; - 9C05B443168CEB220054215E /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B3FF168CEB220054215E /* colors.json */; }; - 9C05B444168CEB220054215E /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B400168CEB220054215E /* converts.json */; }; - 9C05B445168CEB220054215E /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B401168CEB220054215E /* github-iphone.json */; }; - 9C05B446168CEB220054215E /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B402168CEB220054215E /* jsonTypes.json */; }; - 9C05B447168CEB220054215E /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B403168CEB220054215E /* nestedData.json */; }; - 9C05B449168CEB220054215E /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B405168CEB220054215E /* post.json */; }; - 9C05B44A168CEB220054215E /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B406168CEB220054215E /* primitives.json */; }; - 9C05B44B168CEB220054215E /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B407168CEB220054215E /* primitivesWithErrors.json */; }; - 9C05B44C168CEB220054215E /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B408168CEB220054215E /* withOptProp.json */; }; - 9C05B44D168CEB220054215E /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B409168CEB220054215E /* withoutOptProp.json */; }; - 9C05B44E168CEB220054215E /* IdPropertyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B40B168CEB220054215E /* IdPropertyTests.m */; }; - 9C05B44F168CEB220054215E /* JSONTypesModelWithValidation1.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */; }; - 9C05B450168CEB220054215E /* JSONTypesModelWithValidation2.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */; }; - 9C05B451168CEB220054215E /* JSONTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B411168CEB220054215E /* JSONTypesReadTests.m */; }; - 9C05B452168CEB220054215E /* JSONValueTransformer+UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */; }; - 9C05B453168CEB220054215E /* KeyMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B415168CEB220054215E /* KeyMappingTests.m */; }; - 9C05B454168CEB220054215E /* NestedModelsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B417168CEB220054215E /* NestedModelsTests.m */; }; - 9C05B455168CEB220054215E /* OptionalPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */; }; - 9C05B456168CEB220054215E /* PersistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B41B168CEB220054215E /* PersistTests.m */; }; - 9C05B457168CEB220054215E /* PrimitiveTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B41D168CEB220054215E /* PrimitiveTypesReadTests.m */; }; - 9C05B458168CEB220054215E /* SimpleDataErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B41F168CEB220054215E /* SimpleDataErrorTests.m */; }; - 9C05B459168CEB220054215E /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B422168CEB220054215E /* BuiltInConversionsModel.m */; }; - 9C05B45A168CEB220054215E /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B424168CEB220054215E /* CustomPropertyModel.m */; }; - 9C05B45B168CEB220054215E /* GitHubKeyMapRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B426168CEB220054215E /* GitHubKeyMapRepoModel.m */; }; - 9C05B45C168CEB220054215E /* GitHubKeyMapRepoModelDict.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B428168CEB220054215E /* GitHubKeyMapRepoModelDict.m */; }; - 9C05B45D168CEB220054215E /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B42A168CEB220054215E /* GitHubRepoModel.m */; }; - 9C05B45E168CEB220054215E /* GitHubRepoModelForUSMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B42C168CEB220054215E /* GitHubRepoModelForUSMapper.m */; }; - 9C05B45F168CEB220054215E /* ImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B42E168CEB220054215E /* ImageModel.m */; }; - 9C05B460168CEB220054215E /* JSONTypesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B430168CEB220054215E /* JSONTypesModel.m */; }; - 9C05B461168CEB220054215E /* NestedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B432168CEB220054215E /* NestedModel.m */; }; - 9C05B462168CEB220054215E /* OptionalPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B434168CEB220054215E /* OptionalPropModel.m */; }; - 9C05B463168CEB220054215E /* PostModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B436168CEB220054215E /* PostModel.m */; }; - 9C05B464168CEB220054215E /* PostsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B438168CEB220054215E /* PostsModel.m */; }; - 9C05B465168CEB220054215E /* PrimitivesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B43A168CEB220054215E /* PrimitivesModel.m */; }; - 9C05B466168CEB220054215E /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B43C168CEB220054215E /* ReposModel.m */; }; - 9C05B467168CEB220054215E /* ValidationTestSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B43E168CEB220054215E /* ValidationTestSuite.m */; }; - 9C08C1AF1749750100AA8CC9 /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */; }; - 9C66DF47168CEECF0015CCDF /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B3FF168CEB220054215E /* colors.json */; }; - 9C66DF48168CEECF0015CCDF /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B400168CEB220054215E /* converts.json */; }; - 9C66DF49168CEECF0015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B401168CEB220054215E /* github-iphone.json */; }; - 9C66DF4A168CEECF0015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B402168CEB220054215E /* jsonTypes.json */; }; - 9C66DF4B168CEECF0015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B403168CEB220054215E /* nestedData.json */; }; - 9C66DF4D168CEECF0015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B405168CEB220054215E /* post.json */; }; - 9C66DF4E168CEECF0015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B406168CEB220054215E /* primitives.json */; }; - 9C66DF4F168CEECF0015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B407168CEB220054215E /* primitivesWithErrors.json */; }; - 9C66DF50168CEECF0015CCDF /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B408168CEB220054215E /* withOptProp.json */; }; - 9C66DF51168CEECF0015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B409168CEB220054215E /* withoutOptProp.json */; }; - 9C66DFF6168CF09A0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFDF168CF09A0015CCDF /* JSONModel.m */; }; - 9C66DFF7168CF09A0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFDF168CF09A0015CCDF /* JSONModel.m */; }; - 9C66DFFA168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */; }; - 9C66DFFB168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */; }; - 9C66DFFC168CF09A0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */; }; - 9C66DFFD168CF09A0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */; }; - 9C66E000168CF09A0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */; }; - 9C66E001168CF09A0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */; }; - 9C66E002168CF09A0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */; }; - 9C66E003168CF09A0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */; }; - 9C66E004168CF09A0015CCDF /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */; }; - 9C66E005168CF09A0015CCDF /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */; }; - 9C66E006168CF09A0015CCDF /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */; }; - 9C66E007168CF09A0015CCDF /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */; }; - 9C66E008168CF09A0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */; }; - 9C66E009168CF09A0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */; }; - 9C6C35DF181CF7B500BEE72D /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */; }; - 9C6C35E0181CF7B500BEE72D /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */; }; - 9C6C35E1181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */; }; - 9C6C35E2181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */; }; - 9C72A49D171447F70047C6AE /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */; }; - 9C735D67170B717F00FF96F5 /* JSONAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D66170B717F00FF96F5 /* JSONAPITests.m */; }; - 9C735D6D170B7A2D00FF96F5 /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */; }; - 9C735D73170C048C00FF96F5 /* InitFromWebTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */; }; - 9C97441C168CF255004DA333 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C97441B168CF255004DA333 /* Cocoa.framework */; }; - 9C97441E168CF264004DA333 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C97441D168CF264004DA333 /* Cocoa.framework */; }; - 9CB6BC2E168E07730002535B /* GitHubUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB6BC2D168E07730002535B /* GitHubUserModel.m */; }; - 9CC27C9C1689B7BE008B5411 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */; }; - 9CC27C9E1689B7BE008B5411 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27C9D1689B7BE008B5411 /* main.m */; }; - 9CC27CA21689B7BE008B5411 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27CA01689B7BE008B5411 /* Credits.rtf */; }; - 9CC27CA51689B7BE008B5411 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27CA41689B7BE008B5411 /* AppDelegate.m */; }; - 9CC27CA81689B7BE008B5411 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27CA61689B7BE008B5411 /* MainMenu.xib */; }; - 9CC27CCD1689B92A008B5411 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27CCB1689B92A008B5411 /* ViewController.m */; }; - 9CC27CCE1689B92A008B5411 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27CCC1689B92A008B5411 /* ViewController.xib */; }; - 9CC2FCB9168CE7340059FE67 /* KivaFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC2FCB4168CE7340059FE67 /* KivaFeed.m */; }; - 9CC2FCBA168CE7340059FE67 /* LoanModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC2FCB6168CE7340059FE67 /* LoanModel.m */; }; - 9CC2FCBB168CE7340059FE67 /* LocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC2FCB8168CE7340059FE67 /* LocationModel.m */; }; - 9CCAFD941901B7F500314886 /* SpecialPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CCAFD931901B7F500314886 /* SpecialPropertiesTests.m */; }; - 9CD22C8618FF32F7003E66AD /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */; }; - 9CD425861702224F00A42AA1 /* HTTPClientSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425851702224F00A42AA1 /* HTTPClientSuite.m */; }; - 9CD4258B170222AF00A42AA1 /* MockNSURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD42588170222AF00A42AA1 /* MockNSURLConnection.m */; }; - 9CD4258C170222AF00A42AA1 /* MTTestSemaphor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD4258A170222AF00A42AA1 /* MTTestSemaphor.m */; }; - 9CFDD0A4176E9742007B7DFA /* EnumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A3176E9742007B7DFA /* EnumModel.m */; }; - D5F918E5172AD99600AC2C8E /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */; }; - D5F918EB172ADA3F00AC2C8E /* SpecialPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */; }; - D5F918EE172ADAF900AC2C8E /* SpecialPropertyNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D5F918ED172ADAF800AC2C8E /* SpecialPropertyNameTests.m */; }; - D5F918EF172ADC2400AC2C8E /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1AE9CA911C21F50C00B8F5C1 /* RenamedPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenamedPropertyModel.h; sourceTree = ""; }; - 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RenamedPropertyModel.m; sourceTree = ""; }; - 1C008FE318B7AE54002DFD3A /* ModelForUpperCaseMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelForUpperCaseMapper.h; sourceTree = ""; }; - 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelForUpperCaseMapper.m; sourceTree = ""; }; - 9C05B2A8168CE9600054215E /* JSONModelDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JSONModelDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 9C05B2B0168CE9600054215E /* JSONModelDemoTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "JSONModelDemoTests-Info.plist"; sourceTree = ""; }; - 9C05B2B7168CE9600054215E /* JSONModelDemoTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JSONModelDemoTests-Prefix.pch"; sourceTree = ""; }; - 9C05B3F6168CEB220054215E /* ArrayTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayTests.h; sourceTree = ""; }; - 9C05B3F7168CEB220054215E /* ArrayTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrayTests.m; sourceTree = ""; }; - 9C05B3F8168CEB220054215E /* BuiltInConversionsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsTests.h; sourceTree = ""; }; - 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsTests.m; sourceTree = ""; }; - 9C05B3FC168CEB220054215E /* CustomPropsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropsTests.h; sourceTree = ""; }; - 9C05B3FD168CEB220054215E /* CustomPropsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropsTests.m; sourceTree = ""; }; - 9C05B3FF168CEB220054215E /* colors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = colors.json; sourceTree = ""; }; - 9C05B400168CEB220054215E /* converts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = converts.json; sourceTree = ""; }; - 9C05B401168CEB220054215E /* github-iphone.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "github-iphone.json"; sourceTree = ""; }; - 9C05B402168CEB220054215E /* jsonTypes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = jsonTypes.json; sourceTree = ""; }; - 9C05B403168CEB220054215E /* nestedData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedData.json; sourceTree = ""; }; - 9C05B405168CEB220054215E /* post.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = post.json; sourceTree = ""; }; - 9C05B406168CEB220054215E /* primitives.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitives.json; sourceTree = ""; }; - 9C05B407168CEB220054215E /* primitivesWithErrors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitivesWithErrors.json; sourceTree = ""; }; - 9C05B408168CEB220054215E /* withOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withOptProp.json; sourceTree = ""; }; - 9C05B409168CEB220054215E /* withoutOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withoutOptProp.json; sourceTree = ""; }; - 9C05B40A168CEB220054215E /* IdPropertyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdPropertyTests.h; sourceTree = ""; }; - 9C05B40B168CEB220054215E /* IdPropertyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdPropertyTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C05B40C168CEB220054215E /* JSONTypesModelWithValidation1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation1.h; sourceTree = ""; }; - 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation1.m; sourceTree = ""; }; - 9C05B40E168CEB220054215E /* JSONTypesModelWithValidation2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation2.h; sourceTree = ""; }; - 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation2.m; sourceTree = ""; }; - 9C05B410168CEB220054215E /* JSONTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesReadTests.h; sourceTree = ""; }; - 9C05B411168CEB220054215E /* JSONTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesReadTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C05B412168CEB220054215E /* JSONValueTransformer+UIColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONValueTransformer+UIColor.h"; sourceTree = ""; }; - 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONValueTransformer+UIColor.m"; sourceTree = ""; }; - 9C05B414168CEB220054215E /* KeyMappingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyMappingTests.h; sourceTree = ""; }; - 9C05B415168CEB220054215E /* KeyMappingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeyMappingTests.m; sourceTree = ""; }; - 9C05B416168CEB220054215E /* NestedModelsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModelsTests.h; sourceTree = ""; }; - 9C05B417168CEB220054215E /* NestedModelsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModelsTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C05B418168CEB220054215E /* OptionalPropertiesTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropertiesTests.h; sourceTree = ""; }; - 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropertiesTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C05B41A168CEB220054215E /* PersistTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistTests.h; sourceTree = ""; }; - 9C05B41B168CEB220054215E /* PersistTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersistTests.m; sourceTree = ""; }; - 9C05B41C168CEB220054215E /* PrimitiveTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitiveTypesReadTests.h; sourceTree = ""; }; - 9C05B41D168CEB220054215E /* PrimitiveTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitiveTypesReadTests.m; sourceTree = ""; }; - 9C05B41E168CEB220054215E /* SimpleDataErrorTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleDataErrorTests.h; sourceTree = ""; }; - 9C05B41F168CEB220054215E /* SimpleDataErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleDataErrorTests.m; sourceTree = ""; }; - 9C05B421168CEB220054215E /* BuiltInConversionsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsModel.h; sourceTree = ""; }; - 9C05B422168CEB220054215E /* BuiltInConversionsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsModel.m; sourceTree = ""; }; - 9C05B423168CEB220054215E /* CustomPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropertyModel.h; sourceTree = ""; }; - 9C05B424168CEB220054215E /* CustomPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropertyModel.m; sourceTree = ""; }; - 9C05B425168CEB220054215E /* GitHubKeyMapRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModel.h; sourceTree = ""; }; - 9C05B426168CEB220054215E /* GitHubKeyMapRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModel.m; sourceTree = ""; }; - 9C05B427168CEB220054215E /* GitHubKeyMapRepoModelDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModelDict.h; sourceTree = ""; }; - 9C05B428168CEB220054215E /* GitHubKeyMapRepoModelDict.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModelDict.m; sourceTree = ""; }; - 9C05B429168CEB220054215E /* GitHubRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModel.h; sourceTree = ""; }; - 9C05B42A168CEB220054215E /* GitHubRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModel.m; sourceTree = ""; }; - 9C05B42B168CEB220054215E /* GitHubRepoModelForUSMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModelForUSMapper.h; sourceTree = ""; }; - 9C05B42C168CEB220054215E /* GitHubRepoModelForUSMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModelForUSMapper.m; sourceTree = ""; }; - 9C05B42D168CEB220054215E /* ImageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageModel.h; sourceTree = ""; }; - 9C05B42E168CEB220054215E /* ImageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageModel.m; sourceTree = ""; }; - 9C05B42F168CEB220054215E /* JSONTypesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModel.h; sourceTree = ""; }; - 9C05B430168CEB220054215E /* JSONTypesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModel.m; sourceTree = ""; }; - 9C05B431168CEB220054215E /* NestedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModel.h; sourceTree = ""; }; - 9C05B432168CEB220054215E /* NestedModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModel.m; sourceTree = ""; }; - 9C05B433168CEB220054215E /* OptionalPropModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropModel.h; sourceTree = ""; }; - 9C05B434168CEB220054215E /* OptionalPropModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropModel.m; sourceTree = ""; }; - 9C05B435168CEB220054215E /* PostModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostModel.h; sourceTree = ""; }; - 9C05B436168CEB220054215E /* PostModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostModel.m; sourceTree = ""; }; - 9C05B437168CEB220054215E /* PostsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostsModel.h; sourceTree = ""; }; - 9C05B438168CEB220054215E /* PostsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostsModel.m; sourceTree = ""; }; - 9C05B439168CEB220054215E /* PrimitivesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitivesModel.h; sourceTree = ""; }; - 9C05B43A168CEB220054215E /* PrimitivesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitivesModel.m; sourceTree = ""; }; - 9C05B43B168CEB220054215E /* ReposModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReposModel.h; sourceTree = ""; }; - 9C05B43C168CEB220054215E /* ReposModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReposModel.m; sourceTree = ""; }; - 9C05B43D168CEB220054215E /* ValidationTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidationTestSuite.h; sourceTree = ""; }; - 9C05B43E168CEB220054215E /* ValidationTestSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidationTestSuite.m; sourceTree = ""; }; - 9C08C1AD1749750100AA8CC9 /* CopyrightModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyrightModel.h; sourceTree = ""; }; - 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyrightModel.m; sourceTree = ""; }; - 9C66DFDE168CF09A0015CCDF /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFDF168CF09A0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; }; - 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; }; - 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; }; - 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFEB168CF09A0015CCDF /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; }; - 9C66DFED168CF09A0015CCDF /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONHTTPClient.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONHTTPClient.m; sourceTree = ""; }; - 9C66DFEF168CF09A0015CCDF /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "JSONModel+networking.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "JSONModel+networking.m"; sourceTree = ""; }; - 9C66DFF2168CF09A0015CCDF /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONKeyMapper.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONKeyMapper.m; sourceTree = ""; }; - 9C66DFF4168CF09A0015CCDF /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONValueTransformer.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONValueTransformer.m; sourceTree = ""; }; - 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithArrayError.json; sourceTree = ""; }; - 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = ""; }; - 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = ""; }; - 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImagesObject.json; sourceTree = ""; }; - 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - 9C735D65170B717F00FF96F5 /* JSONAPITests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPITests.h; sourceTree = ""; }; - 9C735D66170B717F00FF96F5 /* JSONAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPITests.m; sourceTree = ""; }; - 9C735D6B170B7A2D00FF96F5 /* RpcRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RpcRequestModel.h; sourceTree = ""; }; - 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RpcRequestModel.m; sourceTree = ""; }; - 9C735D71170C048C00FF96F5 /* InitFromWebTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitFromWebTests.h; sourceTree = ""; }; - 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitFromWebTests.m; sourceTree = ""; }; - 9C97441B168CF255004DA333 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 9C97441D168CF264004DA333 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 9CB6BC2C168E07730002535B /* GitHubUserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GitHubUserModel.h; path = JSONModelDemo_iOS/GitHubUserModel.h; sourceTree = SOURCE_ROOT; }; - 9CB6BC2D168E07730002535B /* GitHubUserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GitHubUserModel.m; path = JSONModelDemo_iOS/GitHubUserModel.m; sourceTree = SOURCE_ROOT; }; - 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 9CC27C8D1689B7BE008B5411 /* JSONModelDemo_OSX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JSONModelDemo_OSX.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 9CC27C941689B7BE008B5411 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 9CC27C951689B7BE008B5411 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 9CC27C961689B7BE008B5411 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 9CC27C991689B7BE008B5411 /* JSONModelDemo_OSX-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "JSONModelDemo_OSX-Info.plist"; sourceTree = ""; }; - 9CC27C9B1689B7BE008B5411 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 9CC27C9D1689B7BE008B5411 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 9CC27C9F1689B7BE008B5411 /* JSONModelDemo_OSX-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JSONModelDemo_OSX-Prefix.pch"; sourceTree = ""; }; - 9CC27CA11689B7BE008B5411 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; - 9CC27CA31689B7BE008B5411 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 9CC27CA41689B7BE008B5411 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9CC27CA71689B7BE008B5411 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - 9CC27CAF1689B7BE008B5411 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; - 9CC27CCA1689B92A008B5411 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 9CC27CCB1689B92A008B5411 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 9CC27CCC1689B92A008B5411 /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = ""; }; - 9CC2FCB3168CE7340059FE67 /* KivaFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaFeed.h; sourceTree = ""; }; - 9CC2FCB4168CE7340059FE67 /* KivaFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaFeed.m; sourceTree = ""; }; - 9CC2FCB5168CE7340059FE67 /* LoanModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoanModel.h; sourceTree = ""; }; - 9CC2FCB6168CE7340059FE67 /* LoanModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoanModel.m; sourceTree = ""; }; - 9CC2FCB7168CE7340059FE67 /* LocationModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationModel.h; sourceTree = ""; }; - 9CC2FCB8168CE7340059FE67 /* LocationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationModel.m; sourceTree = ""; }; - 9CCAFD931901B7F500314886 /* SpecialPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertiesTests.m; sourceTree = ""; }; - 9CD425841702224F00A42AA1 /* HTTPClientSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPClientSuite.h; sourceTree = ""; }; - 9CD425851702224F00A42AA1 /* HTTPClientSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPClientSuite.m; sourceTree = ""; }; - 9CD42587170222AF00A42AA1 /* MockNSURLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockNSURLConnection.h; path = JSONModelDemoTests/MockNSURLConnection.h; sourceTree = SOURCE_ROOT; }; - 9CD42588170222AF00A42AA1 /* MockNSURLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MockNSURLConnection.m; path = JSONModelDemoTests/MockNSURLConnection.m; sourceTree = SOURCE_ROOT; }; - 9CD42589170222AF00A42AA1 /* MTTestSemaphor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MTTestSemaphor.h; path = JSONModelDemoTests/MTTestSemaphor.h; sourceTree = SOURCE_ROOT; }; - 9CD4258A170222AF00A42AA1 /* MTTestSemaphor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MTTestSemaphor.m; path = JSONModelDemoTests/MTTestSemaphor.m; sourceTree = SOURCE_ROOT; }; - 9CFDD0A2176E9742007B7DFA /* EnumModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumModel.h; sourceTree = ""; }; - 9CFDD0A3176E9742007B7DFA /* EnumModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EnumModel.m; sourceTree = ""; }; - D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = specialPropertyName.json; sourceTree = ""; }; - D5F918E9172ADA3F00AC2C8E /* SpecialPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyModel.h; sourceTree = ""; }; - D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyModel.m; sourceTree = ""; }; - D5F918EC172ADAF800AC2C8E /* SpecialPropertyNameTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyNameTests.h; sourceTree = ""; }; - D5F918ED172ADAF800AC2C8E /* SpecialPropertyNameTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyNameTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9C05B2A4168CE9600054215E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CD22C8618FF32F7003E66AD /* XCTest.framework in Frameworks */, - 9C97441E168CF264004DA333 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CC27C8A1689B7BE008B5411 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C72A49D171447F70047C6AE /* SystemConfiguration.framework in Frameworks */, - 9C97441C168CF255004DA333 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9C05B2AE168CE9600054215E /* JSONModelDemoTests */ = { - isa = PBXGroup; - children = ( - 9C05B3F5168CEB220054215E /* UnitTests */, - 9C05B2AF168CE9600054215E /* Supporting Files */, - ); - path = JSONModelDemoTests; - sourceTree = ""; - }; - 9C05B2AF168CE9600054215E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9C05B2B0168CE9600054215E /* JSONModelDemoTests-Info.plist */, - 9C05B2B7168CE9600054215E /* JSONModelDemoTests-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9C05B3F5168CEB220054215E /* UnitTests */ = { - isa = PBXGroup; - children = ( - 9CD4257D1702220300A42AA1 /* Class */, - 9C05B3FE168CEB220054215E /* DataFiles */, - 9C05B3F6168CEB220054215E /* ArrayTests.h */, - 9C05B3F7168CEB220054215E /* ArrayTests.m */, - 9C05B3F8168CEB220054215E /* BuiltInConversionsTests.h */, - 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */, - 9C05B3FC168CEB220054215E /* CustomPropsTests.h */, - 9C05B3FD168CEB220054215E /* CustomPropsTests.m */, - 9C05B40A168CEB220054215E /* IdPropertyTests.h */, - 9C05B40B168CEB220054215E /* IdPropertyTests.m */, - 9C05B40C168CEB220054215E /* JSONTypesModelWithValidation1.h */, - 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */, - 9C05B40E168CEB220054215E /* JSONTypesModelWithValidation2.h */, - 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */, - 9C05B410168CEB220054215E /* JSONTypesReadTests.h */, - 9C05B411168CEB220054215E /* JSONTypesReadTests.m */, - 9C05B412168CEB220054215E /* JSONValueTransformer+UIColor.h */, - 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */, - 9C05B414168CEB220054215E /* KeyMappingTests.h */, - 9C05B415168CEB220054215E /* KeyMappingTests.m */, - 9C05B416168CEB220054215E /* NestedModelsTests.h */, - 9C05B417168CEB220054215E /* NestedModelsTests.m */, - 9C05B418168CEB220054215E /* OptionalPropertiesTests.h */, - 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */, - 9C05B41A168CEB220054215E /* PersistTests.h */, - 9C05B41B168CEB220054215E /* PersistTests.m */, - 9C05B41C168CEB220054215E /* PrimitiveTypesReadTests.h */, - 9C05B41D168CEB220054215E /* PrimitiveTypesReadTests.m */, - 9C05B41E168CEB220054215E /* SimpleDataErrorTests.h */, - 9C05B41F168CEB220054215E /* SimpleDataErrorTests.m */, - D5F918EC172ADAF800AC2C8E /* SpecialPropertyNameTests.h */, - D5F918ED172ADAF800AC2C8E /* SpecialPropertyNameTests.m */, - 9C05B420168CEB220054215E /* TestModels */, - 9C05B43D168CEB220054215E /* ValidationTestSuite.h */, - 9C05B43E168CEB220054215E /* ValidationTestSuite.m */, - 9CD425841702224F00A42AA1 /* HTTPClientSuite.h */, - 9CD425851702224F00A42AA1 /* HTTPClientSuite.m */, - 9C735D65170B717F00FF96F5 /* JSONAPITests.h */, - 9C735D66170B717F00FF96F5 /* JSONAPITests.m */, - 9C735D71170C048C00FF96F5 /* InitFromWebTests.h */, - 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */, - 9CCAFD931901B7F500314886 /* SpecialPropertiesTests.m */, - ); - path = UnitTests; - sourceTree = ""; - }; - 9C05B3FE168CEB220054215E /* DataFiles */ = { - isa = PBXGroup; - children = ( - 9C05B3FF168CEB220054215E /* colors.json */, - 9C05B400168CEB220054215E /* converts.json */, - 9C05B401168CEB220054215E /* github-iphone.json */, - 9C05B402168CEB220054215E /* jsonTypes.json */, - 9C05B403168CEB220054215E /* nestedData.json */, - 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */, - 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */, - 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */, - 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */, - 9C05B405168CEB220054215E /* post.json */, - 9C05B406168CEB220054215E /* primitives.json */, - 9C05B407168CEB220054215E /* primitivesWithErrors.json */, - D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */, - 9C05B408168CEB220054215E /* withOptProp.json */, - 9C05B409168CEB220054215E /* withoutOptProp.json */, - ); - path = DataFiles; - sourceTree = ""; - }; - 9C05B420168CEB220054215E /* TestModels */ = { - isa = PBXGroup; - children = ( - 9CFDD0A2176E9742007B7DFA /* EnumModel.h */, - 9CFDD0A3176E9742007B7DFA /* EnumModel.m */, - 9C08C1AD1749750100AA8CC9 /* CopyrightModel.h */, - 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */, - 9C05B421168CEB220054215E /* BuiltInConversionsModel.h */, - 9C05B422168CEB220054215E /* BuiltInConversionsModel.m */, - 9C05B423168CEB220054215E /* CustomPropertyModel.h */, - 9C05B424168CEB220054215E /* CustomPropertyModel.m */, - 9C05B425168CEB220054215E /* GitHubKeyMapRepoModel.h */, - 9C05B426168CEB220054215E /* GitHubKeyMapRepoModel.m */, - 9C05B427168CEB220054215E /* GitHubKeyMapRepoModelDict.h */, - 9C05B428168CEB220054215E /* GitHubKeyMapRepoModelDict.m */, - 9C05B429168CEB220054215E /* GitHubRepoModel.h */, - 9C05B42A168CEB220054215E /* GitHubRepoModel.m */, - 9C05B42B168CEB220054215E /* GitHubRepoModelForUSMapper.h */, - 9C05B42C168CEB220054215E /* GitHubRepoModelForUSMapper.m */, - 1C008FE318B7AE54002DFD3A /* ModelForUpperCaseMapper.h */, - 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */, - 9C05B42D168CEB220054215E /* ImageModel.h */, - 9C05B42E168CEB220054215E /* ImageModel.m */, - 9C05B42F168CEB220054215E /* JSONTypesModel.h */, - 9C05B430168CEB220054215E /* JSONTypesModel.m */, - 9C05B431168CEB220054215E /* NestedModel.h */, - 9C05B432168CEB220054215E /* NestedModel.m */, - 9C05B433168CEB220054215E /* OptionalPropModel.h */, - 9C05B434168CEB220054215E /* OptionalPropModel.m */, - 9C05B435168CEB220054215E /* PostModel.h */, - 9C05B436168CEB220054215E /* PostModel.m */, - 9C05B437168CEB220054215E /* PostsModel.h */, - 9C05B438168CEB220054215E /* PostsModel.m */, - 9C05B439168CEB220054215E /* PrimitivesModel.h */, - 9C05B43A168CEB220054215E /* PrimitivesModel.m */, - 9C05B43B168CEB220054215E /* ReposModel.h */, - 9C05B43C168CEB220054215E /* ReposModel.m */, - D5F918E9172ADA3F00AC2C8E /* SpecialPropertyModel.h */, - D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */, - 9C735D6B170B7A2D00FF96F5 /* RpcRequestModel.h */, - 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */, - 1AE9CA911C21F50C00B8F5C1 /* RenamedPropertyModel.h */, - 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */, - ); - path = TestModels; - sourceTree = ""; - }; - 9C66DFDC168CF09A0015CCDF /* JSONModel */ = { - isa = PBXGroup; - children = ( - 9C66DFDD168CF09A0015CCDF /* JSONModel */, - 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */, - 9C66DFEA168CF09A0015CCDF /* JSONModelNetworking */, - 9C66DFF1168CF09A0015CCDF /* JSONModelTransformations */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66DFDD168CF09A0015CCDF /* JSONModel */ = { - isa = PBXGroup; - children = ( - 9C66DFDE168CF09A0015CCDF /* JSONModel.h */, - 9C66DFDF168CF09A0015CCDF /* JSONModel.m */, - 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */, - 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */, - 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */, - 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66DFEA168CF09A0015CCDF /* JSONModelNetworking */ = { - isa = PBXGroup; - children = ( - 9C66DFEB168CF09A0015CCDF /* JSONAPI.h */, - 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */, - 9C66DFED168CF09A0015CCDF /* JSONHTTPClient.h */, - 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */, - 9C66DFEF168CF09A0015CCDF /* JSONModel+networking.h */, - 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */, - ); - path = JSONModelNetworking; - sourceTree = ""; - }; - 9C66DFF1168CF09A0015CCDF /* JSONModelTransformations */ = { - isa = PBXGroup; - children = ( - 9C66DFF2168CF09A0015CCDF /* JSONKeyMapper.h */, - 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */, - 9C66DFF4168CF09A0015CCDF /* JSONValueTransformer.h */, - 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */, - ); - path = JSONModelTransformations; - sourceTree = ""; - }; - 9CB6BC2B168E07640002535B /* GithubDemo */ = { - isa = PBXGroup; - children = ( - 9CB6BC2C168E07730002535B /* GitHubUserModel.h */, - 9CB6BC2D168E07730002535B /* GitHubUserModel.m */, - ); - name = GithubDemo; - sourceTree = ""; - }; - 9CC27C821689B7BE008B5411 = { - isa = PBXGroup; - children = ( - 9C66DFDC168CF09A0015CCDF /* JSONModel */, - 9CC27C971689B7BE008B5411 /* JSONModelDemo_OSX */, - 9C05B2AE168CE9600054215E /* JSONModelDemoTests */, - 9CC27C901689B7BE008B5411 /* Frameworks */, - 9CC27C8E1689B7BE008B5411 /* Products */, - ); - indentWidth = 4; - sourceTree = ""; - tabWidth = 4; - usesTabs = 0; - }; - 9CC27C8E1689B7BE008B5411 /* Products */ = { - isa = PBXGroup; - children = ( - 9CC27C8D1689B7BE008B5411 /* JSONModelDemo_OSX.app */, - 9C05B2A8168CE9600054215E /* JSONModelDemoTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 9CC27C901689B7BE008B5411 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */, - 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */, - 9C97441D168CF264004DA333 /* Cocoa.framework */, - 9C97441B168CF255004DA333 /* Cocoa.framework */, - 9CC27CAF1689B7BE008B5411 /* SenTestingKit.framework */, - 9CC27C931689B7BE008B5411 /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9CC27C931689B7BE008B5411 /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 9CC27C941689B7BE008B5411 /* AppKit.framework */, - 9CC27C951689B7BE008B5411 /* CoreData.framework */, - 9CC27C961689B7BE008B5411 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 9CC27C971689B7BE008B5411 /* JSONModelDemo_OSX */ = { - isa = PBXGroup; - children = ( - 9CC2FCB2168CE6F00059FE67 /* DemoApp */, - ); - name = JSONModelDemo_OSX; - path = JSONModelOSX; - sourceTree = ""; - }; - 9CC27C981689B7BE008B5411 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9CC27C991689B7BE008B5411 /* JSONModelDemo_OSX-Info.plist */, - 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */, - 9CC27C9D1689B7BE008B5411 /* main.m */, - 9CC27C9F1689B7BE008B5411 /* JSONModelDemo_OSX-Prefix.pch */, - 9CC27CA01689B7BE008B5411 /* Credits.rtf */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9CC27CC91689B8EE008B5411 /* ViewController */ = { - isa = PBXGroup; - children = ( - 9CC27CCA1689B92A008B5411 /* ViewController.h */, - 9CC27CCB1689B92A008B5411 /* ViewController.m */, - 9CC27CCC1689B92A008B5411 /* ViewController.xib */, - ); - name = ViewController; - sourceTree = ""; - }; - 9CC2FCB1168CE6E60059FE67 /* KivaDemo */ = { - isa = PBXGroup; - children = ( - 9CC2FCB3168CE7340059FE67 /* KivaFeed.h */, - 9CC2FCB4168CE7340059FE67 /* KivaFeed.m */, - 9CC2FCB5168CE7340059FE67 /* LoanModel.h */, - 9CC2FCB6168CE7340059FE67 /* LoanModel.m */, - 9CC2FCB7168CE7340059FE67 /* LocationModel.h */, - 9CC2FCB8168CE7340059FE67 /* LocationModel.m */, - ); - name = KivaDemo; - sourceTree = ""; - }; - 9CC2FCB2168CE6F00059FE67 /* DemoApp */ = { - isa = PBXGroup; - children = ( - 9CB6BC2B168E07640002535B /* GithubDemo */, - 9CC2FCB1168CE6E60059FE67 /* KivaDemo */, - 9CC27CC91689B8EE008B5411 /* ViewController */, - 9CC27CA31689B7BE008B5411 /* AppDelegate.h */, - 9CC27CA41689B7BE008B5411 /* AppDelegate.m */, - 9CC27CA61689B7BE008B5411 /* MainMenu.xib */, - 9CC27C981689B7BE008B5411 /* Supporting Files */, - ); - name = DemoApp; - sourceTree = ""; - }; - 9CD4257D1702220300A42AA1 /* Class */ = { - isa = PBXGroup; - children = ( - 9CD42587170222AF00A42AA1 /* MockNSURLConnection.h */, - 9CD42588170222AF00A42AA1 /* MockNSURLConnection.m */, - 9CD42589170222AF00A42AA1 /* MTTestSemaphor.h */, - 9CD4258A170222AF00A42AA1 /* MTTestSemaphor.m */, - ); - name = Class; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9C05B2A7168CE9600054215E /* JSONModelDemoTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9C05B2B8168CE9600054215E /* Build configuration list for PBXNativeTarget "JSONModelDemoTests" */; - buildPhases = ( - 9C05B2A3168CE9600054215E /* Sources */, - 9C05B2A4168CE9600054215E /* Frameworks */, - 9C05B2A5168CE9600054215E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = JSONModelDemoTests; - productName = JSONModelDemoTests; - productReference = 9C05B2A8168CE9600054215E /* JSONModelDemoTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 9CC27C8C1689B7BE008B5411 /* JSONModelDemo_OSX */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9CC27CBF1689B7BE008B5411 /* Build configuration list for PBXNativeTarget "JSONModelDemo_OSX" */; - buildPhases = ( - 9CC27C891689B7BE008B5411 /* Sources */, - 9CC27C8A1689B7BE008B5411 /* Frameworks */, - 9CC27C8B1689B7BE008B5411 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = JSONModelDemo_OSX; - productName = JSONModelOSX; - productReference = 9CC27C8D1689B7BE008B5411 /* JSONModelDemo_OSX.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9CC27C841689B7BE008B5411 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "Underplot ltd."; - TargetAttributes = { - 9C05B2A7168CE9600054215E = { - TestTargetID = 9CC27C8C1689B7BE008B5411; - }; - }; - }; - buildConfigurationList = 9CC27C871689B7BE008B5411 /* Build configuration list for PBXProject "JSONModelDemo_OSX" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 9CC27C821689B7BE008B5411; - productRefGroup = 9CC27C8E1689B7BE008B5411 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9CC27C8C1689B7BE008B5411 /* JSONModelDemo_OSX */, - 9C05B2A7168CE9600054215E /* JSONModelDemoTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9C05B2A5168CE9600054215E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C6C35E0181CF7B500BEE72D /* nestedDataWithDictionaryError.json in Resources */, - 9C05B443168CEB220054215E /* colors.json in Resources */, - 9C05B444168CEB220054215E /* converts.json in Resources */, - 9C05B445168CEB220054215E /* github-iphone.json in Resources */, - 9C6C35DF181CF7B500BEE72D /* nestedDataWithArrayError.json in Resources */, - 9C05B446168CEB220054215E /* jsonTypes.json in Resources */, - 9C6C35E2181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */, - 9C05B447168CEB220054215E /* nestedData.json in Resources */, - 9C05B449168CEB220054215E /* post.json in Resources */, - 9C05B44A168CEB220054215E /* primitives.json in Resources */, - 9C05B44B168CEB220054215E /* primitivesWithErrors.json in Resources */, - D5F918E5172AD99600AC2C8E /* specialPropertyName.json in Resources */, - 9C6C35E1181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json in Resources */, - 9C05B44C168CEB220054215E /* withOptProp.json in Resources */, - 9C05B44D168CEB220054215E /* withoutOptProp.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CC27C8B1689B7BE008B5411 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CC27C9C1689B7BE008B5411 /* InfoPlist.strings in Resources */, - 9CC27CA21689B7BE008B5411 /* Credits.rtf in Resources */, - 9CC27CA81689B7BE008B5411 /* MainMenu.xib in Resources */, - 9CC27CCE1689B92A008B5411 /* ViewController.xib in Resources */, - 9C66DF47168CEECF0015CCDF /* colors.json in Resources */, - 9C66DF48168CEECF0015CCDF /* converts.json in Resources */, - 9C66DF49168CEECF0015CCDF /* github-iphone.json in Resources */, - 9C66DF4A168CEECF0015CCDF /* jsonTypes.json in Resources */, - 9C66DF4B168CEECF0015CCDF /* nestedData.json in Resources */, - 9C66DF4D168CEECF0015CCDF /* post.json in Resources */, - 9C66DF4E168CEECF0015CCDF /* primitives.json in Resources */, - 9C66DF4F168CEECF0015CCDF /* primitivesWithErrors.json in Resources */, - D5F918EF172ADC2400AC2C8E /* specialPropertyName.json in Resources */, - 9C66DF50168CEECF0015CCDF /* withOptProp.json in Resources */, - 9C66DF51168CEECF0015CCDF /* withoutOptProp.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9C05B2A3168CE9600054215E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C05B43F168CEB220054215E /* ArrayTests.m in Sources */, - 9C05B440168CEB220054215E /* BuiltInConversionsTests.m in Sources */, - 9C05B442168CEB220054215E /* CustomPropsTests.m in Sources */, - 9C05B44E168CEB220054215E /* IdPropertyTests.m in Sources */, - 9C05B44F168CEB220054215E /* JSONTypesModelWithValidation1.m in Sources */, - 9C05B450168CEB220054215E /* JSONTypesModelWithValidation2.m in Sources */, - 9C05B451168CEB220054215E /* JSONTypesReadTests.m in Sources */, - 9C05B452168CEB220054215E /* JSONValueTransformer+UIColor.m in Sources */, - 9C05B453168CEB220054215E /* KeyMappingTests.m in Sources */, - 9C05B454168CEB220054215E /* NestedModelsTests.m in Sources */, - 9C05B455168CEB220054215E /* OptionalPropertiesTests.m in Sources */, - 9C05B456168CEB220054215E /* PersistTests.m in Sources */, - 9C05B457168CEB220054215E /* PrimitiveTypesReadTests.m in Sources */, - 9C05B458168CEB220054215E /* SimpleDataErrorTests.m in Sources */, - 1C008FE518B7AE54002DFD3A /* ModelForUpperCaseMapper.m in Sources */, - 9C05B459168CEB220054215E /* BuiltInConversionsModel.m in Sources */, - 9C05B45A168CEB220054215E /* CustomPropertyModel.m in Sources */, - 9C05B45B168CEB220054215E /* GitHubKeyMapRepoModel.m in Sources */, - 9C05B45C168CEB220054215E /* GitHubKeyMapRepoModelDict.m in Sources */, - 9C05B45D168CEB220054215E /* GitHubRepoModel.m in Sources */, - 9C05B45E168CEB220054215E /* GitHubRepoModelForUSMapper.m in Sources */, - 9C05B45F168CEB220054215E /* ImageModel.m in Sources */, - 9C05B460168CEB220054215E /* JSONTypesModel.m in Sources */, - 9C05B461168CEB220054215E /* NestedModel.m in Sources */, - 9C05B462168CEB220054215E /* OptionalPropModel.m in Sources */, - 9C05B463168CEB220054215E /* PostModel.m in Sources */, - 9C05B464168CEB220054215E /* PostsModel.m in Sources */, - 9C05B465168CEB220054215E /* PrimitivesModel.m in Sources */, - 9C05B466168CEB220054215E /* ReposModel.m in Sources */, - 9C05B467168CEB220054215E /* ValidationTestSuite.m in Sources */, - 9C66DFF7168CF09A0015CCDF /* JSONModel.m in Sources */, - 9C66DFFB168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */, - 9C66DFFD168CF09A0015CCDF /* JSONModelError.m in Sources */, - 9C66E001168CF09A0015CCDF /* JSONAPI.m in Sources */, - 9C66E003168CF09A0015CCDF /* JSONHTTPClient.m in Sources */, - 9C66E005168CF09A0015CCDF /* JSONModel+networking.m in Sources */, - 9C66E007168CF09A0015CCDF /* JSONKeyMapper.m in Sources */, - 9CCAFD941901B7F500314886 /* SpecialPropertiesTests.m in Sources */, - 9C66E009168CF09A0015CCDF /* JSONValueTransformer.m in Sources */, - D5F918EB172ADA3F00AC2C8E /* SpecialPropertyModel.m in Sources */, - D5F918EE172ADAF900AC2C8E /* SpecialPropertyNameTests.m in Sources */, - 9CD425861702224F00A42AA1 /* HTTPClientSuite.m in Sources */, - 9CD4258B170222AF00A42AA1 /* MockNSURLConnection.m in Sources */, - 9CD4258C170222AF00A42AA1 /* MTTestSemaphor.m in Sources */, - 9C735D67170B717F00FF96F5 /* JSONAPITests.m in Sources */, - 1AE9CA931C21F50C00B8F5C1 /* RenamedPropertyModel.m in Sources */, - 9C735D6D170B7A2D00FF96F5 /* RpcRequestModel.m in Sources */, - 9C735D73170C048C00FF96F5 /* InitFromWebTests.m in Sources */, - 9C08C1AF1749750100AA8CC9 /* CopyrightModel.m in Sources */, - 9CFDD0A4176E9742007B7DFA /* EnumModel.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CC27C891689B7BE008B5411 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CC27C9E1689B7BE008B5411 /* main.m in Sources */, - 9CC27CA51689B7BE008B5411 /* AppDelegate.m in Sources */, - 9CC27CCD1689B92A008B5411 /* ViewController.m in Sources */, - 9CC2FCB9168CE7340059FE67 /* KivaFeed.m in Sources */, - 9CC2FCBA168CE7340059FE67 /* LoanModel.m in Sources */, - 9CC2FCBB168CE7340059FE67 /* LocationModel.m in Sources */, - 9C66DFF6168CF09A0015CCDF /* JSONModel.m in Sources */, - 9C66DFFA168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */, - 9C66DFFC168CF09A0015CCDF /* JSONModelError.m in Sources */, - 9C66E000168CF09A0015CCDF /* JSONAPI.m in Sources */, - 9C66E002168CF09A0015CCDF /* JSONHTTPClient.m in Sources */, - 9C66E004168CF09A0015CCDF /* JSONModel+networking.m in Sources */, - 9C66E006168CF09A0015CCDF /* JSONKeyMapper.m in Sources */, - 9C66E008168CF09A0015CCDF /* JSONValueTransformer.m in Sources */, - 9CB6BC2E168E07730002535B /* GitHubUserModel.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 9CC27C9B1689B7BE008B5411 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 9CC27CA01689B7BE008B5411 /* Credits.rtf */ = { - isa = PBXVariantGroup; - children = ( - 9CC27CA11689B7BE008B5411 /* en */, - ); - name = Credits.rtf; - sourceTree = ""; - }; - 9CC27CA61689B7BE008B5411 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 9CC27CA71689B7BE008B5411 /* en */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 9C05B2B9168CE9600054215E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/JSONModelDemo_OSX.app/Contents/MacOS/JSONModelDemo_OSX"; - COMBINE_HIDPI_IMAGES = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "JSONModelDemoTests/JSONModelDemoTests-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - "UNIT_TESTING=1", - ); - INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemoTests-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = ""; - TEST_HOST = "$(BUNDLE_LOADER)"; - WRAPPER_EXTENSION = xctest; - }; - name = Debug; - }; - 9C05B2BA168CE9600054215E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/JSONModelDemo_OSX.app/Contents/MacOS/JSONModelDemo_OSX"; - COMBINE_HIDPI_IMAGES = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "JSONModelDemoTests/JSONModelDemoTests-Prefix.pch"; - INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemoTests-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = ""; - TEST_HOST = "$(BUNDLE_LOADER)"; - VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = xctest; - }; - name = Release; - }; - 9CC27CBD1689B7BE008B5411 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 9CC27CBE1689B7BE008B5411 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - 9CC27CC01689B7BE008B5411 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "JSONModelOSX/JSONModelDemo_OSX-Prefix.pch"; - INFOPLIST_FILE = "JSONModelOSX/JSONModelDemo_OSX-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = JSONModelDemo_OSX; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 9CC27CC11689B7BE008B5411 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "JSONModelOSX/JSONModelDemo_OSX-Prefix.pch"; - INFOPLIST_FILE = "JSONModelOSX/JSONModelDemo_OSX-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = JSONModelDemo_OSX; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9C05B2B8168CE9600054215E /* Build configuration list for PBXNativeTarget "JSONModelDemoTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9C05B2B9168CE9600054215E /* Debug */, - 9C05B2BA168CE9600054215E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9CC27C871689B7BE008B5411 /* Build configuration list for PBXProject "JSONModelDemo_OSX" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CC27CBD1689B7BE008B5411 /* Debug */, - 9CC27CBE1689B7BE008B5411 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9CC27CBF1689B7BE008B5411 /* Build configuration list for PBXNativeTarget "JSONModelDemo_OSX" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CC27CC01689B7BE008B5411 /* Debug */, - 9CC27CC11689B7BE008B5411 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9CC27C841689B7BE008B5411 /* Project object */; -} diff --git a/JSONModelDemo_OSX.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/JSONModelDemo_OSX.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 85d597ac..00000000 --- a/JSONModelDemo_OSX.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/JSONModelDemo_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj deleted file mode 100644 index 032c4e16..00000000 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1130 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1AE9CA901C21F47600B8F5C1 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */; }; - 358FD078D3C0D56C77ACD770 /* ExtremeNestingModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */; }; - 358FD179E0B41C47C67713B5 /* InteractionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */; }; - 358FD61804BD21F41035348E /* ExtremeNestingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */; }; - 358FD640BFEAB00349FBBA4A /* DrugModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FD25356988AC33EA6A935 /* DrugModel.m */; }; - 4A50001D19C5DCCF00C161A0 /* InitWithDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */; }; - 69286BDA17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */; }; - 69286BDB17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */; }; - 697852FD17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */; }; - 697852FF17D93547006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */; }; - 9C0D0240166E6BBF001EA645 /* KivaViewControllerNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C0D023E166E6BBF001EA645 /* KivaViewControllerNetworking.m */; }; - 9C0D0241166E6BBF001EA645 /* KivaViewControllerNetworking.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9C0D023F166E6BBF001EA645 /* KivaViewControllerNetworking.xib */; }; - 9C28A14118B2A4D2002AEC1E /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C55AF0618903127004EBD8A /* CoreData.framework */; }; - 9C55AF0718903127004EBD8A /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C55AF0618903127004EBD8A /* CoreData.framework */; }; - 9C55AF0E18903300004EBD8A /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C5176E977C007B7DFA /* ReposModel.m */; }; - 9C55AF0F189033AE004EBD8A /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */; }; - 9C66DFA8168CEF420015CCDF /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF60168CEF420015CCDF /* ArrayTests.m */; }; - 9C66DFA9168CEF420015CCDF /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF62168CEF420015CCDF /* BuiltInConversionsTests.m */; }; - 9C66DFAB168CEF420015CCDF /* CustomPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF66168CEF420015CCDF /* CustomPropsTests.m */; }; - 9C66DFAC168CEF420015CCDF /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF68168CEF420015CCDF /* colors.json */; }; - 9C66DFAD168CEF420015CCDF /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF69168CEF420015CCDF /* converts.json */; }; - 9C66DFAE168CEF420015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6A168CEF420015CCDF /* github-iphone.json */; }; - 9C66DFAF168CEF420015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6B168CEF420015CCDF /* jsonTypes.json */; }; - 9C66DFB0168CEF420015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6C168CEF420015CCDF /* nestedData.json */; }; - 9C66DFB1168CEF420015CCDF /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */; }; - 9C66DFB2168CEF420015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6E168CEF420015CCDF /* post.json */; }; - 9C66DFB3168CEF420015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6F168CEF420015CCDF /* primitives.json */; }; - 9C66DFB4168CEF420015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */; }; - 9C66DFB5168CEF420015CCDF /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF71168CEF420015CCDF /* withOptProp.json */; }; - 9C66DFB6168CEF420015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF72168CEF420015CCDF /* withoutOptProp.json */; }; - 9C66DFB7168CEF420015CCDF /* IdPropertyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF74168CEF420015CCDF /* IdPropertyTests.m */; }; - 9C66DFB8168CEF420015CCDF /* JSONTypesModelWithValidation1.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF76168CEF420015CCDF /* JSONTypesModelWithValidation1.m */; }; - 9C66DFB9168CEF420015CCDF /* JSONTypesModelWithValidation2.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF78168CEF420015CCDF /* JSONTypesModelWithValidation2.m */; }; - 9C66DFBA168CEF420015CCDF /* JSONTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF7A168CEF420015CCDF /* JSONTypesReadTests.m */; }; - 9C66DFBB168CEF420015CCDF /* JSONValueTransformer+UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF7C168CEF420015CCDF /* JSONValueTransformer+UIColor.m */; }; - 9C66DFBC168CEF420015CCDF /* KeyMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF7E168CEF420015CCDF /* KeyMappingTests.m */; }; - 9C66DFBD168CEF420015CCDF /* NestedModelsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF80168CEF420015CCDF /* NestedModelsTests.m */; }; - 9C66DFBE168CEF420015CCDF /* OptionalPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF82168CEF420015CCDF /* OptionalPropertiesTests.m */; }; - 9C66DFBF168CEF420015CCDF /* PersistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF84168CEF420015CCDF /* PersistTests.m */; }; - 9C66DFC0168CEF420015CCDF /* PrimitiveTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF86168CEF420015CCDF /* PrimitiveTypesReadTests.m */; }; - 9C66DFC1168CEF420015CCDF /* SimpleDataErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF88168CEF420015CCDF /* SimpleDataErrorTests.m */; }; - 9C66DFD0168CEF420015CCDF /* ValidationTestSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */; }; - 9C66DFD1168CEF530015CCDF /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF68168CEF420015CCDF /* colors.json */; }; - 9C66DFD2168CEF530015CCDF /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF69168CEF420015CCDF /* converts.json */; }; - 9C66DFD3168CEF530015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6A168CEF420015CCDF /* github-iphone.json */; }; - 9C66DFD4168CEF530015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6B168CEF420015CCDF /* jsonTypes.json */; }; - 9C66DFD5168CEF530015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6C168CEF420015CCDF /* nestedData.json */; }; - 9C66DFD6168CEF530015CCDF /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */; }; - 9C66DFD7168CEF530015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6E168CEF420015CCDF /* post.json */; }; - 9C66DFD8168CEF530015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6F168CEF420015CCDF /* primitives.json */; }; - 9C66DFD9168CEF530015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */; }; - 9C66DFDA168CEF530015CCDF /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF71168CEF420015CCDF /* withOptProp.json */; }; - 9C66DFDB168CEF530015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF72168CEF420015CCDF /* withoutOptProp.json */; }; - 9C66E024168CF0AA0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E00D168CF0AA0015CCDF /* JSONModel.m */; }; - 9C66E025168CF0AA0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E00D168CF0AA0015CCDF /* JSONModel.m */; }; - 9C66E028168CF0AA0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */; }; - 9C66E029168CF0AA0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */; }; - 9C66E02A168CF0AA0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E013168CF0AA0015CCDF /* JSONModelError.m */; }; - 9C66E02B168CF0AA0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E013168CF0AA0015CCDF /* JSONModelError.m */; }; - 9C66E02E168CF0AA0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E01A168CF0AA0015CCDF /* JSONAPI.m */; }; - 9C66E02F168CF0AA0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E01A168CF0AA0015CCDF /* JSONAPI.m */; }; - 9C66E030168CF0AA0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E01C168CF0AA0015CCDF /* JSONHTTPClient.m */; }; - 9C66E031168CF0AA0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E01C168CF0AA0015CCDF /* JSONHTTPClient.m */; }; - 9C66E032168CF0AA0015CCDF /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E01E168CF0AA0015CCDF /* JSONModel+networking.m */; }; - 9C66E033168CF0AA0015CCDF /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E01E168CF0AA0015CCDF /* JSONModel+networking.m */; }; - 9C66E034168CF0AA0015CCDF /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E021168CF0AA0015CCDF /* JSONKeyMapper.m */; }; - 9C66E035168CF0AA0015CCDF /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E021168CF0AA0015CCDF /* JSONKeyMapper.m */; }; - 9C66E036168CF0AA0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E023168CF0AA0015CCDF /* JSONValueTransformer.m */; }; - 9C66E037168CF0AA0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66E023168CF0AA0015CCDF /* JSONValueTransformer.m */; }; - 9C735D64170B716300FF96F5 /* JSONAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D63170B716300FF96F5 /* JSONAPITests.m */; }; - 9C735D70170C007900FF96F5 /* InitFromWebTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D6F170C007900FF96F5 /* InitFromWebTests.m */; }; - 9CA6B10016FCA5B400B3E78E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */; }; - 9CA6B10216FCAAEE00B3E78E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */; }; - 9CB1EE42172C1136004BAA07 /* SpecialPropertyNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB1EE41172C1136004BAA07 /* SpecialPropertyNameTests.m */; }; - 9CB1EE47172C1205004BAA07 /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = 9CB1EE46172C1205004BAA07 /* specialPropertyName.json */; }; - 9CBBBEDD166B6CF0008B4326 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */; }; - 9CBBBEDF166B6CF0008B4326 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */; }; - 9CBBBEE1166B6CF0008B4326 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */; }; - 9CBBBEE7166B6CF0008B4326 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEE5166B6CF0008B4326 /* InfoPlist.strings */; }; - 9CBBBEE9166B6CF0008B4326 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBEE8166B6CF0008B4326 /* main.m */; }; - 9CBBBEED166B6CF0008B4326 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBEEC166B6CF0008B4326 /* AppDelegate.m */; }; - 9CBBBEEF166B6CF0008B4326 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEEE166B6CF0008B4326 /* Default.png */; }; - 9CBBBEF1166B6CF0008B4326 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEF0166B6CF0008B4326 /* Default@2x.png */; }; - 9CBBBEF3166B6CF0008B4326 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEF2166B6CF0008B4326 /* Default-568h@2x.png */; }; - 9CBBBEF6166B6CF0008B4326 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBEF5166B6CF0008B4326 /* MasterViewController.m */; }; - 9CBBBEFC166B6CF0008B4326 /* MasterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEFA166B6CF0008B4326 /* MasterViewController.xib */; }; - 9CBBBF08166B6CF0008B4326 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */; }; - 9CBBBF09166B6CF0008B4326 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */; }; - 9CBBBF65166B9E3E008B4326 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */; }; - 9CBBBF77166BA80F008B4326 /* KivaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF75166BA80F008B4326 /* KivaViewController.m */; }; - 9CBBBF78166BA80F008B4326 /* KivaViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF76166BA80F008B4326 /* KivaViewController.xib */; }; - 9CBBBF80166BA86A008B4326 /* LoanModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF7B166BA86A008B4326 /* LoanModel.m */; }; - 9CBBBF81166BA86A008B4326 /* LocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF7D166BA86A008B4326 /* LocationModel.m */; }; - 9CBBBF82166BA86A008B4326 /* KivaFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF7F166BA86A008B4326 /* KivaFeed.m */; }; - 9CBBBF8F166BAC54008B4326 /* btnCheck.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF89166BAC54008B4326 /* btnCheck.png */; }; - 9CBBBF90166BAC54008B4326 /* btnCheck@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF8A166BAC54008B4326 /* btnCheck@2x.png */; }; - 9CBBBF91166BAC54008B4326 /* HUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF8C166BAC54008B4326 /* HUD.m */; }; - 9CBBBF92166BAC54008B4326 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF8E166BAC54008B4326 /* MBProgressHUD.m */; }; - 9CBBBF97166BAED2008B4326 /* GitHubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */; }; - 9CBBBF98166BAED2008B4326 /* GitHubViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */; }; - 9CBBBF9C166BAEF5008B4326 /* GitHubUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */; }; - 9CBBBFB1166BBB05008B4326 /* MyDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */; }; - 9CBBBFB5166BBB21008B4326 /* StorageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */; }; - 9CBBBFB6166BBB21008B4326 /* StorageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */; }; - 9CC2FD2B168CE7830059FE67 /* JSONModelDemo_iOSTests-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9CC2FCD5168CE7830059FE67 /* JSONModelDemo_iOSTests-Info.plist */; }; - 9CCAFD921901B44300314886 /* SpecialPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CCAFD911901B44300314886 /* SpecialPropertiesTests.m */; }; - 9CD425751701FE0000A42AA1 /* HTTPClientSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */; }; - 9CD425781701FF2100A42AA1 /* MTTestSemaphor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */; }; - 9CD4257B1702002900A42AA1 /* MockNSURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */; }; - 9CF21CE91CA28A200076A4C7 /* SpecialValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */; }; - 9CFDD0CA176E977C007B7DFA /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */; }; - 9CFDD0CB176E977C007B7DFA /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */; }; - 9CFDD0CC176E977C007B7DFA /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */; }; - 9CFDD0CD176E977C007B7DFA /* EnumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AD176E977C007B7DFA /* EnumModel.m */; }; - 9CFDD0CE176E977C007B7DFA /* GitHubKeyMapRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AF176E977C007B7DFA /* GitHubKeyMapRepoModel.m */; }; - 9CFDD0CF176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B1176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m */; }; - 9CFDD0D0176E977C007B7DFA /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */; }; - 9CFDD0D1176E977C007B7DFA /* GitHubRepoModelForUSMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B5176E977C007B7DFA /* GitHubRepoModelForUSMapper.m */; }; - 9CFDD0D2176E977C007B7DFA /* ImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B7176E977C007B7DFA /* ImageModel.m */; }; - 9CFDD0D3176E977C007B7DFA /* JSONTypesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B9176E977C007B7DFA /* JSONTypesModel.m */; }; - 9CFDD0D4176E977C007B7DFA /* NestedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0BB176E977C007B7DFA /* NestedModel.m */; }; - 9CFDD0D5176E977C007B7DFA /* OptionalPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0BD176E977C007B7DFA /* OptionalPropModel.m */; }; - 9CFDD0D6176E977C007B7DFA /* PostModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0BF176E977C007B7DFA /* PostModel.m */; }; - 9CFDD0D7176E977C007B7DFA /* PostsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C1176E977C007B7DFA /* PostsModel.m */; }; - 9CFDD0D8176E977C007B7DFA /* PrimitivesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C3176E977C007B7DFA /* PrimitivesModel.m */; }; - 9CFDD0D9176E977C007B7DFA /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C5176E977C007B7DFA /* ReposModel.m */; }; - 9CFDD0DA176E977C007B7DFA /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C7176E977C007B7DFA /* RpcRequestModel.m */; }; - 9CFDD0DB176E977C007B7DFA /* SpecialPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C9176E977C007B7DFA /* SpecialPropertyModel.m */; }; - D66F5792A312B021F52F7BFF /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = D66F58FBC6313C65C9357A2F /* ModelForUpperCaseMapper.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 9CBBBF0A166B6CF0008B4326 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9CBBBECF166B6CEF008B4326 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9CBBBED7166B6CF0008B4326; - remoteInfo = JSONModelDemo; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1AE9CA8E1C21F47600B8F5C1 /* RenamedPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenamedPropertyModel.h; sourceTree = ""; }; - 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RenamedPropertyModel.m; sourceTree = ""; }; - 358FD25356988AC33EA6A935 /* DrugModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrugModel.m; sourceTree = ""; }; - 358FD7AD55FD213CBAAB460F /* ExtremeNestingModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingModel.h; sourceTree = ""; }; - 358FD807C3E86F5DC4058645 /* ExtremeNestingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingTests.h; sourceTree = ""; }; - 358FDA6A1D0805B6ABE4720D /* DrugModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrugModel.h; sourceTree = ""; }; - 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtremeNestingTests.m; sourceTree = ""; }; - 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtremeNestingModel.m; sourceTree = ""; }; - 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteractionModel.m; sourceTree = ""; }; - 358FDED5E028AA00D3E6564D /* InteractionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteractionModel.h; sourceTree = ""; }; - 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitWithDataTests.m; sourceTree = ""; }; - 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = ""; }; - 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = ""; }; - 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImagesObject.json; sourceTree = ""; }; - 9C0D023D166E6BBF001EA645 /* KivaViewControllerNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaViewControllerNetworking.h; sourceTree = ""; }; - 9C0D023E166E6BBF001EA645 /* KivaViewControllerNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaViewControllerNetworking.m; sourceTree = ""; }; - 9C0D023F166E6BBF001EA645 /* KivaViewControllerNetworking.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KivaViewControllerNetworking.xib; sourceTree = ""; }; - 9C55AF0618903127004EBD8A /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 9C66DF5F168CEF420015CCDF /* ArrayTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayTests.h; sourceTree = ""; }; - 9C66DF60168CEF420015CCDF /* ArrayTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrayTests.m; sourceTree = ""; }; - 9C66DF61168CEF420015CCDF /* BuiltInConversionsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsTests.h; sourceTree = ""; }; - 9C66DF62168CEF420015CCDF /* BuiltInConversionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsTests.m; sourceTree = ""; }; - 9C66DF65168CEF420015CCDF /* CustomPropsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropsTests.h; sourceTree = ""; }; - 9C66DF66168CEF420015CCDF /* CustomPropsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropsTests.m; sourceTree = ""; }; - 9C66DF68168CEF420015CCDF /* colors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = colors.json; sourceTree = ""; }; - 9C66DF69168CEF420015CCDF /* converts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = converts.json; sourceTree = ""; }; - 9C66DF6A168CEF420015CCDF /* github-iphone.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "github-iphone.json"; sourceTree = ""; }; - 9C66DF6B168CEF420015CCDF /* jsonTypes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = jsonTypes.json; sourceTree = ""; }; - 9C66DF6C168CEF420015CCDF /* nestedData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedData.json; sourceTree = ""; }; - 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithArrayError.json; sourceTree = ""; }; - 9C66DF6E168CEF420015CCDF /* post.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = post.json; sourceTree = ""; }; - 9C66DF6F168CEF420015CCDF /* primitives.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitives.json; sourceTree = ""; }; - 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitivesWithErrors.json; sourceTree = ""; }; - 9C66DF71168CEF420015CCDF /* withOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withOptProp.json; sourceTree = ""; }; - 9C66DF72168CEF420015CCDF /* withoutOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withoutOptProp.json; sourceTree = ""; }; - 9C66DF73168CEF420015CCDF /* IdPropertyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdPropertyTests.h; sourceTree = ""; }; - 9C66DF74168CEF420015CCDF /* IdPropertyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = IdPropertyTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C66DF75168CEF420015CCDF /* JSONTypesModelWithValidation1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation1.h; sourceTree = ""; }; - 9C66DF76168CEF420015CCDF /* JSONTypesModelWithValidation1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation1.m; sourceTree = ""; }; - 9C66DF77168CEF420015CCDF /* JSONTypesModelWithValidation2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation2.h; sourceTree = ""; }; - 9C66DF78168CEF420015CCDF /* JSONTypesModelWithValidation2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation2.m; sourceTree = ""; }; - 9C66DF79168CEF420015CCDF /* JSONTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesReadTests.h; sourceTree = ""; }; - 9C66DF7A168CEF420015CCDF /* JSONTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONTypesReadTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C66DF7B168CEF420015CCDF /* JSONValueTransformer+UIColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONValueTransformer+UIColor.h"; sourceTree = ""; }; - 9C66DF7C168CEF420015CCDF /* JSONValueTransformer+UIColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONValueTransformer+UIColor.m"; sourceTree = ""; }; - 9C66DF7D168CEF420015CCDF /* KeyMappingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyMappingTests.h; sourceTree = ""; }; - 9C66DF7E168CEF420015CCDF /* KeyMappingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = KeyMappingTests.m; sourceTree = ""; }; - 9C66DF7F168CEF420015CCDF /* NestedModelsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModelsTests.h; sourceTree = ""; }; - 9C66DF80168CEF420015CCDF /* NestedModelsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = NestedModelsTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C66DF81168CEF420015CCDF /* OptionalPropertiesTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropertiesTests.h; sourceTree = ""; }; - 9C66DF82168CEF420015CCDF /* OptionalPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = OptionalPropertiesTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C66DF83168CEF420015CCDF /* PersistTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistTests.h; sourceTree = ""; }; - 9C66DF84168CEF420015CCDF /* PersistTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PersistTests.m; sourceTree = ""; }; - 9C66DF85168CEF420015CCDF /* PrimitiveTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitiveTypesReadTests.h; sourceTree = ""; }; - 9C66DF86168CEF420015CCDF /* PrimitiveTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PrimitiveTypesReadTests.m; sourceTree = ""; }; - 9C66DF87168CEF420015CCDF /* SimpleDataErrorTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleDataErrorTests.h; sourceTree = ""; }; - 9C66DF88168CEF420015CCDF /* SimpleDataErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleDataErrorTests.m; sourceTree = ""; }; - 9C66DFA6168CEF420015CCDF /* ValidationTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidationTestSuite.h; sourceTree = ""; }; - 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidationTestSuite.m; sourceTree = ""; }; - 9C66E00C168CF0AA0015CCDF /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E00D168CF0AA0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; }; - 9C66E010168CF0AA0015CCDF /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; }; - 9C66E012168CF0AA0015CCDF /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E013168CF0AA0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; }; - 9C66E017168CF0AA0015CCDF /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E019168CF0AA0015CCDF /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E01A168CF0AA0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; }; - 9C66E01B168CF0AA0015CCDF /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONHTTPClient.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E01C168CF0AA0015CCDF /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONHTTPClient.m; sourceTree = ""; }; - 9C66E01D168CF0AA0015CCDF /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "JSONModel+networking.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E01E168CF0AA0015CCDF /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "JSONModel+networking.m"; sourceTree = ""; }; - 9C66E020168CF0AA0015CCDF /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONKeyMapper.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E021168CF0AA0015CCDF /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONKeyMapper.m; sourceTree = ""; }; - 9C66E022168CF0AA0015CCDF /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONValueTransformer.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66E023168CF0AA0015CCDF /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONValueTransformer.m; sourceTree = ""; }; - 9C735D62170B716300FF96F5 /* JSONAPITests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPITests.h; sourceTree = ""; }; - 9C735D63170B716300FF96F5 /* JSONAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPITests.m; sourceTree = ""; }; - 9C735D6E170C007900FF96F5 /* InitFromWebTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitFromWebTests.h; sourceTree = ""; }; - 9C735D6F170C007900FF96F5 /* InitFromWebTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitFromWebTests.m; sourceTree = ""; }; - 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - 9CB1EE40172C1136004BAA07 /* SpecialPropertyNameTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyNameTests.h; sourceTree = ""; }; - 9CB1EE41172C1136004BAA07 /* SpecialPropertyNameTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SpecialPropertyNameTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9CB1EE46172C1205004BAA07 /* specialPropertyName.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = specialPropertyName.json; sourceTree = ""; }; - 9CBBBED8166B6CF0008B4326 /* JSONModelDemo_iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JSONModelDemo_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 9CBBBEE4166B6CF0008B4326 /* JSONModelDemo_iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "JSONModelDemo_iOS-Info.plist"; sourceTree = ""; }; - 9CBBBEE6166B6CF0008B4326 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 9CBBBEE8166B6CF0008B4326 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 9CBBBEEA166B6CF0008B4326 /* JSONModelDemo_iOS-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JSONModelDemo_iOS-Prefix.pch"; sourceTree = ""; }; - 9CBBBEEB166B6CF0008B4326 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 9CBBBEEC166B6CF0008B4326 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9CBBBEEE166B6CF0008B4326 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - 9CBBBEF0166B6CF0008B4326 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; - 9CBBBEF2166B6CF0008B4326 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 9CBBBEF4166B6CF0008B4326 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = ""; }; - 9CBBBEF5166B6CF0008B4326 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = ""; }; - 9CBBBEFB166B6CF0008B4326 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MasterViewController.xib; sourceTree = ""; }; - 9CBBBF05166B6CF0008B4326 /* JSONModelDemo_iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JSONModelDemo_iOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 9CBBBF74166BA80F008B4326 /* KivaViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaViewController.h; sourceTree = ""; }; - 9CBBBF75166BA80F008B4326 /* KivaViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaViewController.m; sourceTree = ""; }; - 9CBBBF76166BA80F008B4326 /* KivaViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KivaViewController.xib; sourceTree = ""; }; - 9CBBBF7A166BA86A008B4326 /* LoanModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoanModel.h; sourceTree = ""; }; - 9CBBBF7B166BA86A008B4326 /* LoanModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoanModel.m; sourceTree = ""; }; - 9CBBBF7C166BA86A008B4326 /* LocationModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationModel.h; sourceTree = ""; }; - 9CBBBF7D166BA86A008B4326 /* LocationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationModel.m; sourceTree = ""; }; - 9CBBBF7E166BA86A008B4326 /* KivaFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaFeed.h; sourceTree = ""; }; - 9CBBBF7F166BA86A008B4326 /* KivaFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaFeed.m; sourceTree = ""; }; - 9CBBBF89166BAC54008B4326 /* btnCheck.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btnCheck.png; sourceTree = ""; }; - 9CBBBF8A166BAC54008B4326 /* btnCheck@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btnCheck@2x.png"; sourceTree = ""; }; - 9CBBBF8B166BAC54008B4326 /* HUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HUD.h; sourceTree = ""; }; - 9CBBBF8C166BAC54008B4326 /* HUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HUD.m; sourceTree = ""; }; - 9CBBBF8D166BAC54008B4326 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = ""; }; - 9CBBBF8E166BAC54008B4326 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = ""; }; - 9CBBBF94166BAED2008B4326 /* GitHubViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubViewController.h; sourceTree = ""; }; - 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubViewController.m; sourceTree = ""; }; - 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GitHubViewController.xib; sourceTree = ""; }; - 9CBBBF9A166BAEF5008B4326 /* GitHubUserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubUserModel.h; sourceTree = ""; }; - 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubUserModel.m; sourceTree = ""; }; - 9CBBBFAF166BBB05008B4326 /* MyDataModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyDataModel.h; sourceTree = ""; }; - 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDataModel.m; sourceTree = ""; }; - 9CBBBFB2166BBB21008B4326 /* StorageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageViewController.h; sourceTree = ""; }; - 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StorageViewController.m; sourceTree = ""; }; - 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = StorageViewController.xib; sourceTree = ""; }; - 9CBD6D4F18FF2D7D00DE66EC /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 9CC2FCD2168CE7830059FE67 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 9CC2FCD5168CE7830059FE67 /* JSONModelDemo_iOSTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "JSONModelDemo_iOSTests-Info.plist"; sourceTree = ""; }; - 9CCAFD911901B44300314886 /* SpecialPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertiesTests.m; sourceTree = ""; }; - 9CD425721701FDE500A42AA1 /* HTTPClientSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPClientSuite.h; sourceTree = ""; }; - 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPClientSuite.m; sourceTree = ""; }; - 9CD425761701FF2100A42AA1 /* MTTestSemaphor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTTestSemaphor.h; sourceTree = ""; }; - 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTTestSemaphor.m; sourceTree = ""; }; - 9CD425791702002900A42AA1 /* MockNSURLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockNSURLConnection.h; sourceTree = ""; }; - 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MockNSURLConnection.m; sourceTree = ""; }; - 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialValuesTests.m; sourceTree = ""; }; - 9CFDD0A6176E977C007B7DFA /* BuiltInConversionsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsModel.h; sourceTree = ""; }; - 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsModel.m; sourceTree = ""; }; - 9CFDD0A8176E977C007B7DFA /* CopyrightModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyrightModel.h; sourceTree = ""; }; - 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyrightModel.m; sourceTree = ""; }; - 9CFDD0AA176E977C007B7DFA /* CustomPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropertyModel.h; sourceTree = ""; }; - 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropertyModel.m; sourceTree = ""; }; - 9CFDD0AC176E977C007B7DFA /* EnumModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumModel.h; sourceTree = ""; }; - 9CFDD0AD176E977C007B7DFA /* EnumModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EnumModel.m; sourceTree = ""; }; - 9CFDD0AE176E977C007B7DFA /* GitHubKeyMapRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModel.h; sourceTree = ""; }; - 9CFDD0AF176E977C007B7DFA /* GitHubKeyMapRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModel.m; sourceTree = ""; }; - 9CFDD0B0176E977C007B7DFA /* GitHubKeyMapRepoModelDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModelDict.h; sourceTree = ""; }; - 9CFDD0B1176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModelDict.m; sourceTree = ""; }; - 9CFDD0B2176E977C007B7DFA /* GitHubRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModel.h; sourceTree = ""; }; - 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModel.m; sourceTree = ""; }; - 9CFDD0B4176E977C007B7DFA /* GitHubRepoModelForUSMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModelForUSMapper.h; sourceTree = ""; }; - 9CFDD0B5176E977C007B7DFA /* GitHubRepoModelForUSMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModelForUSMapper.m; sourceTree = ""; }; - 9CFDD0B6176E977C007B7DFA /* ImageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageModel.h; sourceTree = ""; }; - 9CFDD0B7176E977C007B7DFA /* ImageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageModel.m; sourceTree = ""; }; - 9CFDD0B8176E977C007B7DFA /* JSONTypesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModel.h; sourceTree = ""; }; - 9CFDD0B9176E977C007B7DFA /* JSONTypesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModel.m; sourceTree = ""; }; - 9CFDD0BA176E977C007B7DFA /* NestedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModel.h; sourceTree = ""; }; - 9CFDD0BB176E977C007B7DFA /* NestedModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModel.m; sourceTree = ""; }; - 9CFDD0BC176E977C007B7DFA /* OptionalPropModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropModel.h; sourceTree = ""; }; - 9CFDD0BD176E977C007B7DFA /* OptionalPropModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropModel.m; sourceTree = ""; }; - 9CFDD0BE176E977C007B7DFA /* PostModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostModel.h; sourceTree = ""; }; - 9CFDD0BF176E977C007B7DFA /* PostModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostModel.m; sourceTree = ""; }; - 9CFDD0C0176E977C007B7DFA /* PostsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostsModel.h; sourceTree = ""; }; - 9CFDD0C1176E977C007B7DFA /* PostsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostsModel.m; sourceTree = ""; }; - 9CFDD0C2176E977C007B7DFA /* PrimitivesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitivesModel.h; sourceTree = ""; }; - 9CFDD0C3176E977C007B7DFA /* PrimitivesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitivesModel.m; sourceTree = ""; }; - 9CFDD0C4176E977C007B7DFA /* ReposModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReposModel.h; sourceTree = ""; }; - 9CFDD0C5176E977C007B7DFA /* ReposModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReposModel.m; sourceTree = ""; }; - 9CFDD0C6176E977C007B7DFA /* RpcRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RpcRequestModel.h; sourceTree = ""; }; - 9CFDD0C7176E977C007B7DFA /* RpcRequestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RpcRequestModel.m; sourceTree = ""; }; - 9CFDD0C8176E977C007B7DFA /* SpecialPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyModel.h; sourceTree = ""; }; - 9CFDD0C9176E977C007B7DFA /* SpecialPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyModel.m; sourceTree = ""; }; - D66F555A1EB344B7A5FF0D85 /* ModelForUpperCaseMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelForUpperCaseMapper.h; sourceTree = ""; }; - D66F58FBC6313C65C9357A2F /* ModelForUpperCaseMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelForUpperCaseMapper.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9CBBBED5166B6CF0008B4326 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C55AF0718903127004EBD8A /* CoreData.framework in Frameworks */, - 9CA6B10216FCAAEE00B3E78E /* SystemConfiguration.framework in Frameworks */, - 9CBBBEDD166B6CF0008B4326 /* UIKit.framework in Frameworks */, - 9CBBBEDF166B6CF0008B4326 /* Foundation.framework in Frameworks */, - 9CBBBEE1166B6CF0008B4326 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CBBBF01166B6CF0008B4326 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C28A14118B2A4D2002AEC1E /* CoreData.framework in Frameworks */, - 9CA6B10016FCA5B400B3E78E /* SystemConfiguration.framework in Frameworks */, - 9CBBBF65166B9E3E008B4326 /* CoreGraphics.framework in Frameworks */, - 9CBBBF08166B6CF0008B4326 /* UIKit.framework in Frameworks */, - 9CBBBF09166B6CF0008B4326 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9C05B2BB168CE9DE0054215E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9CC2FCD1168CE7830059FE67 /* InfoPlist.strings */, - 9CC2FCD5168CE7830059FE67 /* JSONModelDemo_iOSTests-Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9C0D023C166E6B7A001EA645 /* KivaJSONDemo+networking */ = { - isa = PBXGroup; - children = ( - 9C0D023D166E6BBF001EA645 /* KivaViewControllerNetworking.h */, - 9C0D023E166E6BBF001EA645 /* KivaViewControllerNetworking.m */, - 9C0D023F166E6BBF001EA645 /* KivaViewControllerNetworking.xib */, - ); - name = "KivaJSONDemo+networking"; - sourceTree = ""; - }; - 9C66DF5E168CEF420015CCDF /* UnitTests */ = { - isa = PBXGroup; - children = ( - 9CFDD0A5176E977B007B7DFA /* TestModels */, - 9C66DF5F168CEF420015CCDF /* ArrayTests.h */, - 9C66DF60168CEF420015CCDF /* ArrayTests.m */, - 9C66DF61168CEF420015CCDF /* BuiltInConversionsTests.h */, - 9C66DF62168CEF420015CCDF /* BuiltInConversionsTests.m */, - 9C66DF65168CEF420015CCDF /* CustomPropsTests.h */, - 9C66DF66168CEF420015CCDF /* CustomPropsTests.m */, - 9C66DF73168CEF420015CCDF /* IdPropertyTests.h */, - 9C66DF74168CEF420015CCDF /* IdPropertyTests.m */, - 9C66DF75168CEF420015CCDF /* JSONTypesModelWithValidation1.h */, - 9C66DF76168CEF420015CCDF /* JSONTypesModelWithValidation1.m */, - 9C66DF77168CEF420015CCDF /* JSONTypesModelWithValidation2.h */, - 9C66DF78168CEF420015CCDF /* JSONTypesModelWithValidation2.m */, - 9C66DF79168CEF420015CCDF /* JSONTypesReadTests.h */, - 9C66DF7A168CEF420015CCDF /* JSONTypesReadTests.m */, - 9C66DF7B168CEF420015CCDF /* JSONValueTransformer+UIColor.h */, - 9C66DF7C168CEF420015CCDF /* JSONValueTransformer+UIColor.m */, - 9C66DF7D168CEF420015CCDF /* KeyMappingTests.h */, - 9C66DF7E168CEF420015CCDF /* KeyMappingTests.m */, - 9C66DF7F168CEF420015CCDF /* NestedModelsTests.h */, - 9C66DF80168CEF420015CCDF /* NestedModelsTests.m */, - 9C66DF81168CEF420015CCDF /* OptionalPropertiesTests.h */, - 9C66DF82168CEF420015CCDF /* OptionalPropertiesTests.m */, - 9C66DF83168CEF420015CCDF /* PersistTests.h */, - 9C66DF84168CEF420015CCDF /* PersistTests.m */, - 9C66DF85168CEF420015CCDF /* PrimitiveTypesReadTests.h */, - 9C66DF86168CEF420015CCDF /* PrimitiveTypesReadTests.m */, - 9C66DF87168CEF420015CCDF /* SimpleDataErrorTests.h */, - 9C66DF88168CEF420015CCDF /* SimpleDataErrorTests.m */, - 9CB1EE40172C1136004BAA07 /* SpecialPropertyNameTests.h */, - 9CB1EE41172C1136004BAA07 /* SpecialPropertyNameTests.m */, - 9C66DFA6168CEF420015CCDF /* ValidationTestSuite.h */, - 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */, - 9CD425721701FDE500A42AA1 /* HTTPClientSuite.h */, - 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */, - 9C735D62170B716300FF96F5 /* JSONAPITests.h */, - 9C735D63170B716300FF96F5 /* JSONAPITests.m */, - 9C735D6E170C007900FF96F5 /* InitFromWebTests.h */, - 9C735D6F170C007900FF96F5 /* InitFromWebTests.m */, - 9CCAFD911901B44300314886 /* SpecialPropertiesTests.m */, - 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */, - 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */, - 358FD807C3E86F5DC4058645 /* ExtremeNestingTests.h */, - 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */, - ); - path = UnitTests; - sourceTree = ""; - }; - 9C66DF67168CEF420015CCDF /* DataFiles */ = { - isa = PBXGroup; - children = ( - 9C66DF68168CEF420015CCDF /* colors.json */, - 9C66DF69168CEF420015CCDF /* converts.json */, - 9C66DF6A168CEF420015CCDF /* github-iphone.json */, - 9C66DF6B168CEF420015CCDF /* jsonTypes.json */, - 9C66DF6C168CEF420015CCDF /* nestedData.json */, - 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */, - 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */, - 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */, - 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */, - 9C66DF6E168CEF420015CCDF /* post.json */, - 9C66DF6F168CEF420015CCDF /* primitives.json */, - 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */, - 9C66DF71168CEF420015CCDF /* withOptProp.json */, - 9C66DF72168CEF420015CCDF /* withoutOptProp.json */, - 9CB1EE46172C1205004BAA07 /* specialPropertyName.json */, - ); - name = DataFiles; - path = UnitTests/DataFiles; - sourceTree = ""; - }; - 9C66E00A168CF0AA0015CCDF /* JSONModel */ = { - isa = PBXGroup; - children = ( - 9C66E00B168CF0AA0015CCDF /* JSONModel */, - 9C66E017168CF0AA0015CCDF /* JSONModelLib.h */, - 9C66E018168CF0AA0015CCDF /* JSONModelNetworking */, - 9C66E01F168CF0AA0015CCDF /* JSONModelTransformations */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66E00B168CF0AA0015CCDF /* JSONModel */ = { - isa = PBXGroup; - children = ( - 9C66E00C168CF0AA0015CCDF /* JSONModel.h */, - 9C66E00D168CF0AA0015CCDF /* JSONModel.m */, - 9C66E010168CF0AA0015CCDF /* JSONModelClassProperty.h */, - 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */, - 9C66E012168CF0AA0015CCDF /* JSONModelError.h */, - 9C66E013168CF0AA0015CCDF /* JSONModelError.m */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66E018168CF0AA0015CCDF /* JSONModelNetworking */ = { - isa = PBXGroup; - children = ( - 9C66E019168CF0AA0015CCDF /* JSONAPI.h */, - 9C66E01A168CF0AA0015CCDF /* JSONAPI.m */, - 9C66E01B168CF0AA0015CCDF /* JSONHTTPClient.h */, - 9C66E01C168CF0AA0015CCDF /* JSONHTTPClient.m */, - 9C66E01D168CF0AA0015CCDF /* JSONModel+networking.h */, - 9C66E01E168CF0AA0015CCDF /* JSONModel+networking.m */, - ); - path = JSONModelNetworking; - sourceTree = ""; - }; - 9C66E01F168CF0AA0015CCDF /* JSONModelTransformations */ = { - isa = PBXGroup; - children = ( - 9C66E020168CF0AA0015CCDF /* JSONKeyMapper.h */, - 9C66E021168CF0AA0015CCDF /* JSONKeyMapper.m */, - 9C66E022168CF0AA0015CCDF /* JSONValueTransformer.h */, - 9C66E023168CF0AA0015CCDF /* JSONValueTransformer.m */, - ); - path = JSONModelTransformations; - sourceTree = ""; - }; - 9CBBBECD166B6CEF008B4326 = { - isa = PBXGroup; - children = ( - 9C66E00A168CF0AA0015CCDF /* JSONModel */, - 9CBBBEE2166B6CF0008B4326 /* JSONModelDemo_iOS */, - 9CC2FCBC168CE7830059FE67 /* JSONModelDemoTests */, - 9CBBBEDB166B6CF0008B4326 /* Frameworks */, - 9CBBBED9166B6CF0008B4326 /* Products */, - ); - indentWidth = 4; - sourceTree = ""; - tabWidth = 4; - usesTabs = 0; - }; - 9CBBBED9166B6CF0008B4326 /* Products */ = { - isa = PBXGroup; - children = ( - 9CBBBED8166B6CF0008B4326 /* JSONModelDemo_iOS.app */, - 9CBBBF05166B6CF0008B4326 /* JSONModelDemo_iOSTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 9CBBBEDB166B6CF0008B4326 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9CBD6D4F18FF2D7D00DE66EC /* XCTest.framework */, - 9C55AF0618903127004EBD8A /* CoreData.framework */, - 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */, - 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */, - 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */, - 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9CBBBEE2166B6CF0008B4326 /* JSONModelDemo_iOS */ = { - isa = PBXGroup; - children = ( - 9CBBBFAD166BB87B008B4326 /* DemoApp */, - 9CBBBF87166BAC31008B4326 /* libs */, - 9CBBBF93166BAEB2008B4326 /* GitHubDemo */, - 9CBBBFAE166BBADA008B4326 /* UsedAsStorageDemo */, - 9CBBBF73166BA7E1008B4326 /* KivaJSONDemo */, - 9C0D023C166E6B7A001EA645 /* KivaJSONDemo+networking */, - ); - path = JSONModelDemo_iOS; - sourceTree = ""; - }; - 9CBBBEE3166B6CF0008B4326 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9CBBBEE4166B6CF0008B4326 /* JSONModelDemo_iOS-Info.plist */, - 9CBBBEE5166B6CF0008B4326 /* InfoPlist.strings */, - 9CBBBEE8166B6CF0008B4326 /* main.m */, - 9CBBBEEA166B6CF0008B4326 /* JSONModelDemo_iOS-Prefix.pch */, - 9CBBBEEE166B6CF0008B4326 /* Default.png */, - 9CBBBEF0166B6CF0008B4326 /* Default@2x.png */, - 9CBBBEF2166B6CF0008B4326 /* Default-568h@2x.png */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9CBBBF73166BA7E1008B4326 /* KivaJSONDemo */ = { - isa = PBXGroup; - children = ( - 9CBBBF79166BA857008B4326 /* KivaModels */, - 9CBBBF74166BA80F008B4326 /* KivaViewController.h */, - 9CBBBF75166BA80F008B4326 /* KivaViewController.m */, - 9CBBBF76166BA80F008B4326 /* KivaViewController.xib */, - ); - name = KivaJSONDemo; - sourceTree = ""; - }; - 9CBBBF79166BA857008B4326 /* KivaModels */ = { - isa = PBXGroup; - children = ( - 9CBBBF7A166BA86A008B4326 /* LoanModel.h */, - 9CBBBF7B166BA86A008B4326 /* LoanModel.m */, - 9CBBBF7C166BA86A008B4326 /* LocationModel.h */, - 9CBBBF7D166BA86A008B4326 /* LocationModel.m */, - 9CBBBF7E166BA86A008B4326 /* KivaFeed.h */, - 9CBBBF7F166BA86A008B4326 /* KivaFeed.m */, - ); - name = KivaModels; - sourceTree = ""; - }; - 9CBBBF87166BAC31008B4326 /* libs */ = { - isa = PBXGroup; - children = ( - 9CBBBF88166BAC43008B4326 /* HUD */, - ); - name = libs; - sourceTree = ""; - }; - 9CBBBF88166BAC43008B4326 /* HUD */ = { - isa = PBXGroup; - children = ( - 9CBBBF89166BAC54008B4326 /* btnCheck.png */, - 9CBBBF8A166BAC54008B4326 /* btnCheck@2x.png */, - 9CBBBF8B166BAC54008B4326 /* HUD.h */, - 9CBBBF8C166BAC54008B4326 /* HUD.m */, - 9CBBBF8D166BAC54008B4326 /* MBProgressHUD.h */, - 9CBBBF8E166BAC54008B4326 /* MBProgressHUD.m */, - ); - name = HUD; - sourceTree = ""; - }; - 9CBBBF93166BAEB2008B4326 /* GitHubDemo */ = { - isa = PBXGroup; - children = ( - 9CBBBF99166BAEDF008B4326 /* GitHubModels */, - 9CBBBF94166BAED2008B4326 /* GitHubViewController.h */, - 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */, - 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */, - ); - name = GitHubDemo; - sourceTree = ""; - }; - 9CBBBF99166BAEDF008B4326 /* GitHubModels */ = { - isa = PBXGroup; - children = ( - 9CBBBF9A166BAEF5008B4326 /* GitHubUserModel.h */, - 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */, - ); - name = GitHubModels; - sourceTree = ""; - }; - 9CBBBFAD166BB87B008B4326 /* DemoApp */ = { - isa = PBXGroup; - children = ( - 9CBBBEE3166B6CF0008B4326 /* Supporting Files */, - 9CBBBEEB166B6CF0008B4326 /* AppDelegate.h */, - 9CBBBEEC166B6CF0008B4326 /* AppDelegate.m */, - 9CBBBEF4166B6CF0008B4326 /* MasterViewController.h */, - 9CBBBEF5166B6CF0008B4326 /* MasterViewController.m */, - 9CBBBEFA166B6CF0008B4326 /* MasterViewController.xib */, - ); - name = DemoApp; - sourceTree = ""; - }; - 9CBBBFAE166BBADA008B4326 /* UsedAsStorageDemo */ = { - isa = PBXGroup; - children = ( - 9CBBBFB7166BBB27008B4326 /* StorageModel */, - 9CBBBFB2166BBB21008B4326 /* StorageViewController.h */, - 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */, - 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */, - ); - name = UsedAsStorageDemo; - sourceTree = ""; - }; - 9CBBBFB7166BBB27008B4326 /* StorageModel */ = { - isa = PBXGroup; - children = ( - 9CBBBFAF166BBB05008B4326 /* MyDataModel.h */, - 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */, - ); - name = StorageModel; - sourceTree = ""; - }; - 9CC2FCBC168CE7830059FE67 /* JSONModelDemoTests */ = { - isa = PBXGroup; - children = ( - 9CD4257C1702003600A42AA1 /* Class */, - 9C66DF67168CEF420015CCDF /* DataFiles */, - 9C66DF5E168CEF420015CCDF /* UnitTests */, - 9C05B2BB168CE9DE0054215E /* Supporting Files */, - ); - path = JSONModelDemoTests; - sourceTree = ""; - }; - 9CD4257C1702003600A42AA1 /* Class */ = { - isa = PBXGroup; - children = ( - 9CD425791702002900A42AA1 /* MockNSURLConnection.h */, - 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */, - 9CD425761701FF2100A42AA1 /* MTTestSemaphor.h */, - 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */, - ); - name = Class; - sourceTree = ""; - }; - 9CFDD0A5176E977B007B7DFA /* TestModels */ = { - isa = PBXGroup; - children = ( - 9CFDD0A6176E977C007B7DFA /* BuiltInConversionsModel.h */, - 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */, - 9CFDD0A8176E977C007B7DFA /* CopyrightModel.h */, - 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */, - 9CFDD0AA176E977C007B7DFA /* CustomPropertyModel.h */, - 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */, - 9CFDD0AC176E977C007B7DFA /* EnumModel.h */, - 9CFDD0AD176E977C007B7DFA /* EnumModel.m */, - 9CFDD0AE176E977C007B7DFA /* GitHubKeyMapRepoModel.h */, - 9CFDD0AF176E977C007B7DFA /* GitHubKeyMapRepoModel.m */, - 9CFDD0B0176E977C007B7DFA /* GitHubKeyMapRepoModelDict.h */, - 9CFDD0B1176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m */, - 9CFDD0B2176E977C007B7DFA /* GitHubRepoModel.h */, - 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */, - 9CFDD0B4176E977C007B7DFA /* GitHubRepoModelForUSMapper.h */, - 9CFDD0B5176E977C007B7DFA /* GitHubRepoModelForUSMapper.m */, - 9CFDD0B6176E977C007B7DFA /* ImageModel.h */, - 9CFDD0B7176E977C007B7DFA /* ImageModel.m */, - 9CFDD0B8176E977C007B7DFA /* JSONTypesModel.h */, - 9CFDD0B9176E977C007B7DFA /* JSONTypesModel.m */, - 9CFDD0BA176E977C007B7DFA /* NestedModel.h */, - 9CFDD0BB176E977C007B7DFA /* NestedModel.m */, - 9CFDD0BC176E977C007B7DFA /* OptionalPropModel.h */, - 9CFDD0BD176E977C007B7DFA /* OptionalPropModel.m */, - 9CFDD0BE176E977C007B7DFA /* PostModel.h */, - 9CFDD0BF176E977C007B7DFA /* PostModel.m */, - 9CFDD0C0176E977C007B7DFA /* PostsModel.h */, - 9CFDD0C1176E977C007B7DFA /* PostsModel.m */, - 9CFDD0C2176E977C007B7DFA /* PrimitivesModel.h */, - 9CFDD0C3176E977C007B7DFA /* PrimitivesModel.m */, - 9CFDD0C4176E977C007B7DFA /* ReposModel.h */, - 9CFDD0C5176E977C007B7DFA /* ReposModel.m */, - 9CFDD0C6176E977C007B7DFA /* RpcRequestModel.h */, - 9CFDD0C7176E977C007B7DFA /* RpcRequestModel.m */, - 9CFDD0C8176E977C007B7DFA /* SpecialPropertyModel.h */, - 9CFDD0C9176E977C007B7DFA /* SpecialPropertyModel.m */, - D66F555A1EB344B7A5FF0D85 /* ModelForUpperCaseMapper.h */, - D66F58FBC6313C65C9357A2F /* ModelForUpperCaseMapper.m */, - 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */, - 358FD7AD55FD213CBAAB460F /* ExtremeNestingModel.h */, - 358FD25356988AC33EA6A935 /* DrugModel.m */, - 358FDA6A1D0805B6ABE4720D /* DrugModel.h */, - 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */, - 358FDED5E028AA00D3E6564D /* InteractionModel.h */, - 1AE9CA8E1C21F47600B8F5C1 /* RenamedPropertyModel.h */, - 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */, - ); - path = TestModels; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9CBBBED7166B6CF0008B4326 /* JSONModelDemo_iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9CBBBF17166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "JSONModelDemo_iOS" */; - buildPhases = ( - 9CBBBED4166B6CF0008B4326 /* Sources */, - 9CBBBED5166B6CF0008B4326 /* Frameworks */, - 9CBBBED6166B6CF0008B4326 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = JSONModelDemo_iOS; - productName = JSONModelDemo; - productReference = 9CBBBED8166B6CF0008B4326 /* JSONModelDemo_iOS.app */; - productType = "com.apple.product-type.application"; - }; - 9CBBBF04166B6CF0008B4326 /* JSONModelDemo_iOSTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9CBBBF1A166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "JSONModelDemo_iOSTests" */; - buildPhases = ( - 9CBBBF00166B6CF0008B4326 /* Sources */, - 9CBBBF01166B6CF0008B4326 /* Frameworks */, - 9CBBBF02166B6CF0008B4326 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 9CBBBF0B166B6CF0008B4326 /* PBXTargetDependency */, - ); - name = JSONModelDemo_iOSTests; - productName = JSONModelDemoTests; - productReference = 9CBBBF05166B6CF0008B4326 /* JSONModelDemo_iOSTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9CBBBECF166B6CEF008B4326 /* Project object */ = { - isa = PBXProject; - attributes = { - LastTestingUpgradeCheck = 0510; - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "Underplot ltd."; - }; - buildConfigurationList = 9CBBBED2166B6CEF008B4326 /* Build configuration list for PBXProject "JSONModelDemo_iOS" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 9CBBBECD166B6CEF008B4326; - productRefGroup = 9CBBBED9166B6CF0008B4326 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9CBBBED7166B6CF0008B4326 /* JSONModelDemo_iOS */, - 9CBBBF04166B6CF0008B4326 /* JSONModelDemo_iOSTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9CBBBED6166B6CF0008B4326 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CBBBEE7166B6CF0008B4326 /* InfoPlist.strings in Resources */, - 9CBBBEEF166B6CF0008B4326 /* Default.png in Resources */, - 9CBBBEF1166B6CF0008B4326 /* Default@2x.png in Resources */, - 9CBBBEF3166B6CF0008B4326 /* Default-568h@2x.png in Resources */, - 9CBBBEFC166B6CF0008B4326 /* MasterViewController.xib in Resources */, - 9CBBBF78166BA80F008B4326 /* KivaViewController.xib in Resources */, - 9CBBBF8F166BAC54008B4326 /* btnCheck.png in Resources */, - 9CBBBF90166BAC54008B4326 /* btnCheck@2x.png in Resources */, - 69286BDA17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */, - 9CBBBF98166BAED2008B4326 /* GitHubViewController.xib in Resources */, - 9CBBBFB6166BBB21008B4326 /* StorageViewController.xib in Resources */, - 9C0D0241166E6BBF001EA645 /* KivaViewControllerNetworking.xib in Resources */, - 9CC2FD2B168CE7830059FE67 /* JSONModelDemo_iOSTests-Info.plist in Resources */, - 9C66DFD1168CEF530015CCDF /* colors.json in Resources */, - 9C66DFD2168CEF530015CCDF /* converts.json in Resources */, - 9C66DFD3168CEF530015CCDF /* github-iphone.json in Resources */, - 9C66DFD4168CEF530015CCDF /* jsonTypes.json in Resources */, - 9C66DFD5168CEF530015CCDF /* nestedData.json in Resources */, - 9C66DFD6168CEF530015CCDF /* nestedDataWithArrayError.json in Resources */, - 9C66DFD7168CEF530015CCDF /* post.json in Resources */, - 9C66DFD8168CEF530015CCDF /* primitives.json in Resources */, - 9C66DFD9168CEF530015CCDF /* primitivesWithErrors.json in Resources */, - 9C66DFDA168CEF530015CCDF /* withOptProp.json in Resources */, - 9C66DFDB168CEF530015CCDF /* withoutOptProp.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CBBBF02166B6CF0008B4326 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C66DFAC168CEF420015CCDF /* colors.json in Resources */, - 9C66DFAD168CEF420015CCDF /* converts.json in Resources */, - 9C66DFAE168CEF420015CCDF /* github-iphone.json in Resources */, - 9C66DFAF168CEF420015CCDF /* jsonTypes.json in Resources */, - 9C66DFB0168CEF420015CCDF /* nestedData.json in Resources */, - 9C66DFB1168CEF420015CCDF /* nestedDataWithArrayError.json in Resources */, - 9C66DFB2168CEF420015CCDF /* post.json in Resources */, - 9C66DFB3168CEF420015CCDF /* primitives.json in Resources */, - 9C66DFB4168CEF420015CCDF /* primitivesWithErrors.json in Resources */, - 9C66DFB5168CEF420015CCDF /* withOptProp.json in Resources */, - 9C66DFB6168CEF420015CCDF /* withoutOptProp.json in Resources */, - 9CB1EE47172C1205004BAA07 /* specialPropertyName.json in Resources */, - 697852FD17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json in Resources */, - 69286BDB17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */, - 697852FF17D93547006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9CBBBED4166B6CF0008B4326 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CBBBEE9166B6CF0008B4326 /* main.m in Sources */, - 9CBBBEED166B6CF0008B4326 /* AppDelegate.m in Sources */, - 9CBBBEF6166B6CF0008B4326 /* MasterViewController.m in Sources */, - 9CBBBF77166BA80F008B4326 /* KivaViewController.m in Sources */, - 9CBBBF80166BA86A008B4326 /* LoanModel.m in Sources */, - 9CBBBF81166BA86A008B4326 /* LocationModel.m in Sources */, - 9CBBBF82166BA86A008B4326 /* KivaFeed.m in Sources */, - 9CBBBF91166BAC54008B4326 /* HUD.m in Sources */, - 9CBBBF92166BAC54008B4326 /* MBProgressHUD.m in Sources */, - 9CBBBF97166BAED2008B4326 /* GitHubViewController.m in Sources */, - 9CBBBF9C166BAEF5008B4326 /* GitHubUserModel.m in Sources */, - 9C55AF0F189033AE004EBD8A /* GitHubRepoModel.m in Sources */, - 9CBBBFB1166BBB05008B4326 /* MyDataModel.m in Sources */, - 9CBBBFB5166BBB21008B4326 /* StorageViewController.m in Sources */, - 9C0D0240166E6BBF001EA645 /* KivaViewControllerNetworking.m in Sources */, - 1AE9CA901C21F47600B8F5C1 /* RenamedPropertyModel.m in Sources */, - 9C55AF0E18903300004EBD8A /* ReposModel.m in Sources */, - 9C66E024168CF0AA0015CCDF /* JSONModel.m in Sources */, - 9C66E028168CF0AA0015CCDF /* JSONModelClassProperty.m in Sources */, - 9C66E02A168CF0AA0015CCDF /* JSONModelError.m in Sources */, - 9C66E02E168CF0AA0015CCDF /* JSONAPI.m in Sources */, - 9C66E030168CF0AA0015CCDF /* JSONHTTPClient.m in Sources */, - 9C66E032168CF0AA0015CCDF /* JSONModel+networking.m in Sources */, - 9C66E034168CF0AA0015CCDF /* JSONKeyMapper.m in Sources */, - 9C66E036168CF0AA0015CCDF /* JSONValueTransformer.m in Sources */, - 358FD078D3C0D56C77ACD770 /* ExtremeNestingModel.m in Sources */, - 358FD640BFEAB00349FBBA4A /* DrugModel.m in Sources */, - 358FD179E0B41C47C67713B5 /* InteractionModel.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CBBBF00166B6CF0008B4326 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C66DFA8168CEF420015CCDF /* ArrayTests.m in Sources */, - 9C66DFA9168CEF420015CCDF /* BuiltInConversionsTests.m in Sources */, - 9C66DFAB168CEF420015CCDF /* CustomPropsTests.m in Sources */, - 9C66DFB7168CEF420015CCDF /* IdPropertyTests.m in Sources */, - 9C66DFB8168CEF420015CCDF /* JSONTypesModelWithValidation1.m in Sources */, - 9C66DFB9168CEF420015CCDF /* JSONTypesModelWithValidation2.m in Sources */, - 9C66DFBA168CEF420015CCDF /* JSONTypesReadTests.m in Sources */, - 9CF21CE91CA28A200076A4C7 /* SpecialValuesTests.m in Sources */, - 9C66DFBB168CEF420015CCDF /* JSONValueTransformer+UIColor.m in Sources */, - 9C66DFBC168CEF420015CCDF /* KeyMappingTests.m in Sources */, - 9C66DFBD168CEF420015CCDF /* NestedModelsTests.m in Sources */, - 9C66DFBE168CEF420015CCDF /* OptionalPropertiesTests.m in Sources */, - 9C66DFBF168CEF420015CCDF /* PersistTests.m in Sources */, - 9C66DFC0168CEF420015CCDF /* PrimitiveTypesReadTests.m in Sources */, - 9C66DFC1168CEF420015CCDF /* SimpleDataErrorTests.m in Sources */, - 9C66DFD0168CEF420015CCDF /* ValidationTestSuite.m in Sources */, - 9C66E025168CF0AA0015CCDF /* JSONModel.m in Sources */, - 9C66E029168CF0AA0015CCDF /* JSONModelClassProperty.m in Sources */, - 9C66E02B168CF0AA0015CCDF /* JSONModelError.m in Sources */, - 9CCAFD921901B44300314886 /* SpecialPropertiesTests.m in Sources */, - 9C66E02F168CF0AA0015CCDF /* JSONAPI.m in Sources */, - 9C66E031168CF0AA0015CCDF /* JSONHTTPClient.m in Sources */, - 9C66E033168CF0AA0015CCDF /* JSONModel+networking.m in Sources */, - 9C66E035168CF0AA0015CCDF /* JSONKeyMapper.m in Sources */, - 9C66E037168CF0AA0015CCDF /* JSONValueTransformer.m in Sources */, - 9CB1EE42172C1136004BAA07 /* SpecialPropertyNameTests.m in Sources */, - 4A50001D19C5DCCF00C161A0 /* InitWithDataTests.m in Sources */, - 9CD425751701FE0000A42AA1 /* HTTPClientSuite.m in Sources */, - 9CD425781701FF2100A42AA1 /* MTTestSemaphor.m in Sources */, - 9CD4257B1702002900A42AA1 /* MockNSURLConnection.m in Sources */, - 9C735D64170B716300FF96F5 /* JSONAPITests.m in Sources */, - 9C735D70170C007900FF96F5 /* InitFromWebTests.m in Sources */, - 9CFDD0CA176E977C007B7DFA /* BuiltInConversionsModel.m in Sources */, - 9CFDD0CB176E977C007B7DFA /* CopyrightModel.m in Sources */, - 9CFDD0CC176E977C007B7DFA /* CustomPropertyModel.m in Sources */, - 9CFDD0CD176E977C007B7DFA /* EnumModel.m in Sources */, - 9CFDD0CE176E977C007B7DFA /* GitHubKeyMapRepoModel.m in Sources */, - 9CFDD0CF176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m in Sources */, - 9CFDD0D0176E977C007B7DFA /* GitHubRepoModel.m in Sources */, - 9CFDD0D1176E977C007B7DFA /* GitHubRepoModelForUSMapper.m in Sources */, - 9CFDD0D2176E977C007B7DFA /* ImageModel.m in Sources */, - 9CFDD0D3176E977C007B7DFA /* JSONTypesModel.m in Sources */, - 9CFDD0D4176E977C007B7DFA /* NestedModel.m in Sources */, - 9CFDD0D5176E977C007B7DFA /* OptionalPropModel.m in Sources */, - 9CFDD0D6176E977C007B7DFA /* PostModel.m in Sources */, - 9CFDD0D7176E977C007B7DFA /* PostsModel.m in Sources */, - 9CFDD0D8176E977C007B7DFA /* PrimitivesModel.m in Sources */, - 9CFDD0D9176E977C007B7DFA /* ReposModel.m in Sources */, - 9CFDD0DA176E977C007B7DFA /* RpcRequestModel.m in Sources */, - 9CFDD0DB176E977C007B7DFA /* SpecialPropertyModel.m in Sources */, - D66F5792A312B021F52F7BFF /* ModelForUpperCaseMapper.m in Sources */, - 358FD61804BD21F41035348E /* ExtremeNestingTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 9CBBBF0B166B6CF0008B4326 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9CBBBED7166B6CF0008B4326 /* JSONModelDemo_iOS */; - targetProxy = 9CBBBF0A166B6CF0008B4326 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 9CBBBEE5166B6CF0008B4326 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 9CBBBEE6166B6CF0008B4326 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 9CBBBEFA166B6CF0008B4326 /* MasterViewController.xib */ = { - isa = PBXVariantGroup; - children = ( - 9CBBBEFB166B6CF0008B4326 /* en */, - ); - name = MasterViewController.xib; - sourceTree = ""; - }; - 9CC2FCD1168CE7830059FE67 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 9CC2FCD2168CE7830059FE67 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 9CBBBF15166B6CF0008B4326 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 9CBBBF16166B6CF0008B4326 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 9CBBBF18166B6CF0008B4326 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch"; - INFOPLIST_FILE = "JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = JSONModelDemo_iOS; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 9CBBBF19166B6CF0008B4326 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch"; - INFOPLIST_FILE = "JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = JSONModelDemo_iOS; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - 9CBBBF1B166B6CF0008B4326 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/JSONModelDemo_iOS.app/JSONModelDemo_iOS"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - "UNIT_TESTING=1", - ); - INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = JSONModelDemo_iOSTests; - TEST_HOST = "$(BUNDLE_LOADER)"; - }; - name = Debug; - }; - 9CBBBF1C166B6CF0008B4326 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/JSONModelDemo_iOS.app/JSONModelDemo_iOS"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch"; - INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = JSONModelDemo_iOSTests; - TEST_HOST = "$(BUNDLE_LOADER)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9CBBBED2166B6CEF008B4326 /* Build configuration list for PBXProject "JSONModelDemo_iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CBBBF15166B6CF0008B4326 /* Debug */, - 9CBBBF16166B6CF0008B4326 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9CBBBF17166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "JSONModelDemo_iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CBBBF18166B6CF0008B4326 /* Debug */, - 9CBBBF19166B6CF0008B4326 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9CBBBF1A166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "JSONModelDemo_iOSTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CBBBF1B166B6CF0008B4326 /* Debug */, - 9CBBBF1C166B6CF0008B4326 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9CBBBECF166B6CEF008B4326 /* Project object */; -} diff --git a/JSONModelDemo_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/JSONModelDemo_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7648c4a7..00000000 --- a/JSONModelDemo_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/JSONModelDemo_iOS/AppDelegate.h b/JSONModelDemo_iOS/AppDelegate.h deleted file mode 100644 index 913f91e6..00000000 --- a/JSONModelDemo_iOS/AppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// AppDelegate.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@property (strong, nonatomic) UINavigationController *navigationController; - -@end diff --git a/JSONModelDemo_iOS/AppDelegate.m b/JSONModelDemo_iOS/AppDelegate.m deleted file mode 100644 index 4349247f..00000000 --- a/JSONModelDemo_iOS/AppDelegate.m +++ /dev/null @@ -1,55 +0,0 @@ -// -// AppDelegate.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "AppDelegate.h" - -#import "MasterViewController.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - // Override point for customization after application launch. - - MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil]; - self.navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController]; - self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; - self.window.rootViewController = self.navigationController; - [self.window makeKeyAndVisible]; - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end diff --git a/JSONModelDemo_iOS/Default-568h@2x.png b/JSONModelDemo_iOS/Default-568h@2x.png deleted file mode 100644 index 0891b7aabfcf3422423b109c8beed2bab838c607..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18594 zcmeI4X;f257Jx&9fS`ixvS;&$x8J@slQFSel)6zJN=?13FB7H(lQjRkSy8x_-S~tvu2gzn1oS+dLcF#eqtq$ z%tf9TTvX?`)R@}3uBI;jzS-=ZR-Td&MHaS&;!0?Ni*#$#`n*~CcQK)Q9vAQ~TUpnI!j)a2biYK^R)M~A5wUDZhx?ULMX z3x1P&qt=trOY6P2U67L=m=U?F|5#Uj(eCueNTZaHs_ceWiHeET+j+tp3Jt9g(ekqP z2WOvfR{qV+9r+o4J5?qK>7;;^+I7tGv-i)es$X_D=EoKF+S?zsyj^oRFElP}c}JT< zd8SUs-?O?}2YD#ngKbnHgzHBcboxK_2r9l(?eNCl-pEzkJm}fY?WC*jnS?VBE4EpY zO$fEejz6fU;W2Kl>JeQBZBl-%Irg`obSlg*@4QB;Dd1H7^Oi5wvt4d{RZ!8Og?^aE z)k0$1g+V3fd(gdQ3d&q2q-FL*uy#}|bc^=VhFsl0jBgUGJ+-s3U8MK9A!YJJMxpci z5hJ%|{DwV48fZn0{n5l$N_KcSb#NKE4plB`9I6Zt=Z!~-zw0{9tg$L&Ju1F0X)Cy8 zKF;(&lJ>x)Jw(=;p~sF(Sd9VWGwFE2rnyS9!f^DZ8+aCLq zQ};>lcJ1GDLqjm6Hd>|Eabno@P`~Bn(~6^aD_#yoEH(a?Nm1S<;S+hSxI5d16^<1lEM3NPFi zkqPrpL)+ zgnseFikg`gJVBha1&7C4;O6>h=dt~`ND+;Zd?W(4v2JIb7Pt>Td42%M-Ju-XAH#Pns762L}K3 zDhvsRqN0Ni(1UrishD2YvV?4*h2iFj$+&N||Fn$4n|^NSU+o?~jq`0jVQt8T9l{7b zXiwwODFh2V!Q6sqP9S>WH$oOf$N~=d0-bqTlD61!=`&0eAP-F>XN?*|gtOXX{ zQVTWyYo4ZK0GAw!GHf|pz9`D;-bbb*5LBX*{bnz|+)$@&P9|ORM2o?95{;ejvo&r- zq8cBhTN6nn)7~W>54U)%-F_-b?YKdfk5I8MHcuzBD5)!;yv#Z&R&^y=@=>VTIMy#r zX&U<=BsPkdqcMe<_}2+>H%XKyrr5ZR8_KVe>ZqYN z^=^~TFD};;rHJ$U;{~w^hYojl4hRI@SH$^K{YEo=sg)WY87r!*7blQK&qnpDo0`Vn zkl)9u9g=mCh&ZCJS(L4yN3k0kQ zuvg$h2KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u diff --git a/JSONModelDemo_iOS/Default.png b/JSONModelDemo_iOS/Default.png deleted file mode 100644 index 4c8ca6f693f96d511e9113c0eb59eec552354e42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6540 zcmeAS@N?(olHy`uVBq!ia0y~yU~~ZD2OMlbkt;o0To@QwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoOb(*3gH$%aYWC zkHmcab=va2<#X%jakpJ;<1@F;k__#bwtC&%^D0v(FBh9K&$sK+<}2RJS609D)17$w ztdQP8(eLM8Ka}m_IQ@3wyMKP)l=oM4-?`YS_*P?4V_ORLPxsj&7Ju#kH;>6^Kp?T7~ zl+q?{UOOqV==?+d{=)5s|M~T1mwtH@+Z^$G&eEO9JNP^AX@3jZ*J*!!>lc|1-W%fA z@AOQpXZ_Lt>rxFXrGp*zLPiW@uo_c7C{As>j zWeX)wi+LTp_)@KYZCX{j;H?|1yXT4DnlS(Fr8gyP5|uaX_gLvaW0ScZdnG7o+u{T6 zFI-%d{ls*WuCDa5UJ@|RXv&ejZe}*BMkiWY51&pnRPw(hlykSzvj6e%mYz-GdvzBD zF10?szF_~!jS=?2HyQuPCvARXAe}C}WP|yQ*>5~~=*Nxq8+HHW1~FMDRCP^TcacKuk$ z(U#REVv)D!PhJ*ecH-ELFUrfyV&*)Z)>UCOuS?yd^L@Afk>ihynYPc{^CRwu+JHX+#$@YsC4c|l0tGigsn@jy) zXD($Ouk>H+V(Mr6NQT0S9BFM~V6nkj;1OBOz`zY;a|<&v%$g$sEJPk;hD4M^`1)8S z=jZArrsOB3>Q&?x097+E*i={nnYpPYi3%0DIeEoa6}C!X6;?ntNLXJ<0j#7X+g2&U zH$cHTzbI9~RL@Y)NXd>%K|#T$C?(A*$i)q+9mum)$|xx*u+rBrFE7_CH`dE9O4m2E zw6xSWFw!?N(gmu}Ew0QfNvzP#D^`XW0yD=YwK%ybv!En1KTiQ3|)OBHVcpi zp&D%TL4k-AsNfg_g$9~9p}$+4Ynr|VULLgiakg&)DD)EWO!OHC@snXr}UI${nVUP zpr1>Mf#G6^ng~;pt%^&NvQm>vU@-wn)!_JWN=(;B61LIDR86%A1?G9U(@`={MPdPF zbOKdd`R1o&rd7HmmZaJl85kPr8kp-EnTHsfS{ayIfdU*&4N@e5WSomq6HD@oLh|!- z?7;Dr3*ssm=^5w&a}>G?yzvAH17L|`#|6|0E4}QvA~xC{V_*wu2^AHZU}H9f($4F$btFf{}TLQXUhF5fht1@YV$^ z9BUdFV+73^nIsvRXRM40U}6b7z_6}kHbY}i1LK(xT@6Mi?F5GKBfbp|ZU-3BR*6kv zXcRSQ(0-)mprD+wTr)o_4I;(%zOu)+jEgNB)_SXCVoSa}|F?cfwR!69+L=W3IX z!UiU`0@ph%94Rb33Cpq^IY*r_8XBW%V>G9XmK&p`=xCiXTEmXEH%41uqixaAmicH0 zVYIt6!aI*K%s=kP-v##6IXGZ2Cama>{@)81;C?K-P&M2k<0!GL}5+H~XTq*@SQi|Ft z2*0X`$`8S!qO#)xBeJRkf?;t189=ZB6Imw-h=`q;FP(2UpWZvmJ@=k-@45M(dtb7r zyVEiaLk$=Vw#>zu;st}j6Jf9=m1+nXCFe!$1PrEZ%5Ze_ba8YX_9-*rJujiLuQmJo&2v+Cxes}ec zU|qeux&7*yz#W=X_|wGQskL7*OHNjwFs@sEC+64Hb$Z(#H21Gh$Pe2WzOubdr6fzg z{l{!k%OD?N5Z7j33SoK?YdV6Scm>})U+MIQLNRgIvkZQEc^mP9XBPg%y|S$~Br|;N zk?-!-(Qqh_mQ|6WINQ{hHAjBRV#O#!FkAJ+oxy`L#f8V45*VvWMJFBB5m zG6vOLtDvgoDjHlSq-*h5xM56O>Jjau2f2IxKItIb@coX4XTyf$^{LZG&lI|D95wN1 z!fo0)q>WV7-V;q|A?HR!*bgozJw%j98-~gwBKVV0;=hZIF>7oJSr2YjOWO*rSxz#& z;KXnDrJVZp;Yduiy1-H%s$ZFz6Q=x@$V_B@Tqwl?>6e;EHt|MiK<(#hXQMuj@Jseeh&eN{FxsQ$iw>D1aX1HMMlUbh?Z zmhY4eHffn5&LUbL_}o8|$JYz&$WFiLWmEg0ZPX+;W>@CxQz-%{E5+P7dH9&ey_y$R z@Zzje>2B%z!i!7Brqi{t5Y)~5>vpqRs~2aXD8DVE8vKl=`k(`duI1-k@?!pJ^HA6S zS;3WpuhjQHyoC>X>Xf8gze%_8^#+^RTV>V9&YPAWMjd~%xpSg?ON?kK^X*Pb(o8jR zz;DmaOWMMr6=M~K?MFx4_xDkARTxLJ@W@ohAx z5RD0jGgk?QL@H`VubD2k4}?VtB8@g`%hHBA$2pJ(gK5g1HMNysXEF_BNu-p!&+Qa8_APgopHWnRgg=TZZF*sXWTMQPD z!Q(Au5|+F;7M~`tWbsU98~NA{h0Y7%GB|t&n}w9OOABU4^X*V5xuN;rY(M#ouuqm) zyt!e?28fY!FgP?8GvBsMl_aM^UUVKiGFsleFN?t^<46kO#pF-cX0;sIOb(aM z)^jQgX^Z6pKA9mC@N)_aiHj9HxD2|?A@Y9B_h}(*v3%ek8CXc1Qy^jFPF&zrMa1OZ zSVaF{&ZY|(|H0XE&X>-XQz1`=fF2n@VKC_|h3jlKVM&-jmyMavllcYr`6LVtfq2ou zd+8zkkCB+2)rxq0Lkq_&Ad@g(O8;pAm96>tu79?81T@Z<;gm^3ZtPG-SR94Mr<3tm z9NrR3u*4I5aMlo(09g@8m_;%Rf+XiSa_KZao9n}7N0JrsV#;5Ucr+F*TTzQ8{%f3O zeIUy?WDS|-$LvMc@Z7320)tr}bfIka5hx9H;8H|%our=C+Do0CSFRWue14o5#r8v2 zw=|&r4*eMX%lgCV(ka?*j%H^UuP4LmBC(ON`)&7>NF-|PDRU{-7o`CU0HNbd&c~))@yl9IKu_ zXA+A-!khpP_yx=f#qt2_0ptmgBf4gF!{Y)MW6R$cC1d7@$Yb?+_j zYwfE^5_e`vhT zX=u3r>4$fsxP&apbm@Rcbyuc2T=giqZiMo9@9=oua6#YH0hO-1ak9^rJTPMM qY4Yr5Cu^v99p{E9VdroUHKlRW;M8#BJ^AOQE?e9wSHJo8(7yq;BYKSh diff --git a/JSONModelDemo_iOS/GitHubUserModel.h b/JSONModelDemo_iOS/GitHubUserModel.h deleted file mode 100644 index 17ec618b..00000000 --- a/JSONModelDemo_iOS/GitHubUserModel.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// GitHubUserModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface GitHubUserModel : JSONModel - -@property (strong, nonatomic) NSString* login; -@property (strong, nonatomic) NSURL* html_url; -@property (strong, nonatomic) NSString* company; -@property (strong, nonatomic) NSString* name; -@property (strong, nonatomic) NSURL* blog; - -@end diff --git a/JSONModelDemo_iOS/GitHubUserModel.m b/JSONModelDemo_iOS/GitHubUserModel.m deleted file mode 100644 index 9bee0ce5..00000000 --- a/JSONModelDemo_iOS/GitHubUserModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// GitHubUserModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "GitHubUserModel.h" - -@implementation GitHubUserModel - -@end diff --git a/JSONModelDemo_iOS/GitHubViewController.h b/JSONModelDemo_iOS/GitHubViewController.h deleted file mode 100644 index eaaeee66..00000000 --- a/JSONModelDemo_iOS/GitHubViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// GitHubViewController.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface GitHubViewController : UITableViewController - -@end diff --git a/JSONModelDemo_iOS/GitHubViewController.m b/JSONModelDemo_iOS/GitHubViewController.m deleted file mode 100644 index c68e7101..00000000 --- a/JSONModelDemo_iOS/GitHubViewController.m +++ /dev/null @@ -1,95 +0,0 @@ -// -// GitHubViewController.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "GitHubViewController.h" -#import "GitHubUserModel.h" -#import "HUD.h" - -@interface GitHubViewController () -{ - GitHubUserModel* user; - NSArray* items; -} -@end - -@implementation GitHubViewController - --(void)viewDidAppear:(BOOL)animated -{ - self.title = @"GitHub.com user lookup"; - [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; - - //1 - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - //code executed in the background - //2 - NSData* ghData = [NSData dataWithContentsOfURL: - [NSURL URLWithString:@"https://api.github.com/users/icanzilb"] - ]; - //3 - NSDictionary* json = nil; - if (ghData) { - json = [NSJSONSerialization - JSONObjectWithData:ghData - options:kNilOptions - error:nil]; - } - - //4 - dispatch_async(dispatch_get_main_queue(), ^{ - //code executed on the main queue - //5 - - user = [[GitHubUserModel alloc] initWithDictionary:json error:NULL]; - items = @[user.login, user.html_url, user.company, user.name, user.blog]; - - [self.tableView reloadData]; - [HUD hideUIBlockingIndicator]; - }); - - }); -} - -#pragma mark - table methods --(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - --(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return items.count; -} - --(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KivaCell"]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KivaCell"]; - } - - cell.textLabel.text = [items[indexPath.row] description]; - - if ([items[indexPath.row] isKindOfClass:[NSURL class]]) { - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - return cell; -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; - - if ([items[indexPath.row] isKindOfClass:[NSURL class]]) { - [[UIApplication sharedApplication] openURL:items[indexPath.row]]; - } -} - - -@end diff --git a/JSONModelDemo_iOS/GitHubViewController.xib b/JSONModelDemo_iOS/GitHubViewController.xib deleted file mode 100644 index 18d65e35..00000000 --- a/JSONModelDemo_iOS/GitHubViewController.xib +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_iOS/HUD.h b/JSONModelDemo_iOS/HUD.h deleted file mode 100644 index 0ffb44ed..00000000 --- a/JSONModelDemo_iOS/HUD.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// HUD.h -// BeatGuide -// -// Created by Marin Todorov on 22/04/2012. -// -// This code is distributed under the terms and conditions of the MIT license. -// -// Copyright (c) 2011 Marin Todorov -// -// 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 "MBProgressHUD.h" - -@interface HUD : NSObject - -+(MBProgressHUD*)showUIBlockingIndicator; -+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str; -+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str withTimeout:(int)seconds; - -+(MBProgressHUD*)showUIBlockingProgressIndicatorWithText:(NSString*)str andProgress:(float)progress; - -+(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text; -+(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text target:(id)t action:(SEL)sel; - -+(void)hideUIBlockingIndicator; - -@end diff --git a/JSONModelDemo_iOS/HUD.m b/JSONModelDemo_iOS/HUD.m deleted file mode 100644 index 58703b0e..00000000 --- a/JSONModelDemo_iOS/HUD.m +++ /dev/null @@ -1,201 +0,0 @@ -// -// HUD.m -// BeatGuide -// -// This code is distributed under the terms and conditions of the MIT license. -// -// Copyright (c) 2011 Marin Todorov -// -// 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 "HUD.h" -#import "QuartzCore/QuartzCore.h" - -static UIView* lastViewWithHUD = nil; - -@interface GlowButton : UIButton - -@end - -@implementation GlowButton -{ - NSTimer* timer; - float glowDelta; -} - --(id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - //effect - self.layer.shadowColor = [UIColor whiteColor].CGColor; - self.layer.shadowOffset = CGSizeMake(1,1); - self.layer.shadowOpacity = 0.9; - - glowDelta = 0.2; - timer = [NSTimer timerWithTimeInterval:0.05 - target:self - selector:@selector(glow) - userInfo:nil - repeats:YES]; - - [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode]; - } - return self; -} - --(void)glow -{ - if (self.layer.shadowRadius>7.0 || self.layer.shadowRadius<0.1) { - glowDelta *= -1; - } - self.layer.shadowRadius += glowDelta; -} - --(void)dealloc -{ - [timer invalidate]; - timer = nil; -} - -@end - -@implementation HUD - -+(UIView*)rootView -{ - //return [UIApplication sharedApplication].keyWindow.rootViewController.view; - - UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController; - - while (topController.presentedViewController) { - topController = topController.presentedViewController; - } - - return topController.view; -} - -+(MBProgressHUD*)showUIBlockingIndicator -{ - return [self showUIBlockingIndicatorWithText:nil]; -} - -+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str -{ - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; - - //show the HUD - UIView* targetView = [self rootView]; - if (targetView==nil) return nil; - - lastViewWithHUD = targetView; - - [MBProgressHUD hideHUDForView:targetView animated:YES]; - - MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES]; - if (str!=nil) { - hud.labelText = str; - } else { - hud.labelText = @"Loading..."; - } - - return hud; -} - -+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str withTimeout:(int)seconds -{ - MBProgressHUD* hud = [self showUIBlockingIndicatorWithText:str]; - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; - hud.customView = [[UIView alloc] initWithFrame:CGRectMake(0,0,37,37)]; - hud.mode = MBProgressHUDModeDeterminate; - [hud hide:YES afterDelay:seconds]; - return hud; -} - -+(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text -{ - return [self showAlertWithTitle:titleText text:text target:nil action:NULL]; -} - -+(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text target:(id)t action:(SEL)sel -{ - [HUD hideUIBlockingIndicator]; - - //show the HUD - UIView* targetView = [self rootView]; - if (targetView==nil) return nil; - - lastViewWithHUD = targetView; - - MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES]; - - //set the text - hud.labelText = titleText; - hud.detailsLabelText = text; - - //set the close button - GlowButton* btnClose = [GlowButton buttonWithType:UIButtonTypeCustom]; - if (t!=nil && sel!=NULL) { - [btnClose addTarget:t action:sel forControlEvents:UIControlEventTouchUpInside]; - } else { - [btnClose addTarget:hud action:@selector(hide:) forControlEvents:UIControlEventTouchUpInside]; - } - - UIImage* imgClose = [UIImage imageNamed:@"btnCheck.png"]; - [btnClose setImage:imgClose forState:UIControlStateNormal]; - [btnClose setFrame:CGRectMake(0,0,imgClose.size.width,imgClose.size.height)]; - - //hud settings - hud.customView = btnClose; - hud.mode = MBProgressHUDModeCustomView; - hud.removeFromSuperViewOnHide = YES; - - return hud; -} - -+(void)hideUIBlockingIndicator -{ - [MBProgressHUD hideHUDForView:lastViewWithHUD animated:YES]; - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; -} - - -+(MBProgressHUD*)showUIBlockingProgressIndicatorWithText:(NSString*)str andProgress:(float)progress -{ - [HUD hideUIBlockingIndicator]; - - //show the HUD - UIView* targetView = [self rootView]; - if (targetView==nil) return nil; - - lastViewWithHUD = targetView; - - MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES]; - - //set the text - hud.labelText = str; - - hud.mode = MBProgressHUDModeDeterminate; - hud.progress = progress; - hud.removeFromSuperViewOnHide = YES; - - return hud; -} - -@end \ No newline at end of file diff --git a/JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist b/JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist deleted file mode 100644 index b7bc4ba1..00000000 --- a/JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist +++ /dev/null @@ -1,48 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UIStatusBarTintParameters - - UINavigationBar - - Style - UIBarStyleDefault - Translucent - - - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch b/JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch deleted file mode 100644 index 62993bc7..00000000 --- a/JSONModelDemo_iOS/JSONModelDemo_iOS-Prefix.pch +++ /dev/null @@ -1,14 +0,0 @@ -// -// Prefix header for all source files of the 'JSONModelDemo' target in the 'JSONModelDemo' project -// - -#import - -#ifndef __IPHONE_4_0 -#warning "This project uses features only available in iOS SDK 4.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/JSONModelDemo_iOS/KivaFeed.h b/JSONModelDemo_iOS/KivaFeed.h deleted file mode 100644 index 3e1b3a3f..00000000 --- a/JSONModelDemo_iOS/KivaFeed.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// KivaFeed.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "LoanModel.h" - -@interface KivaFeed : JSONModel - -@property (strong, nonatomic) NSArray* loans; - -@end \ No newline at end of file diff --git a/JSONModelDemo_iOS/KivaFeed.m b/JSONModelDemo_iOS/KivaFeed.m deleted file mode 100644 index 185d023d..00000000 --- a/JSONModelDemo_iOS/KivaFeed.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// KivaFeed.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "KivaFeed.h" - -@implementation KivaFeed - -@end diff --git a/JSONModelDemo_iOS/KivaViewController.h b/JSONModelDemo_iOS/KivaViewController.h deleted file mode 100644 index 4ed3aef2..00000000 --- a/JSONModelDemo_iOS/KivaViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// KivaViewController.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface KivaViewController : UIViewController - -@end diff --git a/JSONModelDemo_iOS/KivaViewController.m b/JSONModelDemo_iOS/KivaViewController.m deleted file mode 100644 index 58d12b1c..00000000 --- a/JSONModelDemo_iOS/KivaViewController.m +++ /dev/null @@ -1,111 +0,0 @@ -// -// KivaViewController.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "KivaViewController.h" -#import "KivaFeed.h" -#import "HUD.h" -#import "JSONModel+networking.h" - -@interface KivaViewController () -{ - IBOutlet UITableView* table; - KivaFeed* feed; - - double benchStart; - double benchObj; - double benchEnd; -} - -@end - -@implementation KivaViewController - --(void)viewDidAppear:(BOOL)animated -{ - self.title = @"Kiva.org latest loans"; - [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - [JSONHTTPClient getJSONFromURLWithString:@"https://api.kivaws.org/v1/loans/search.json" -#pragma GCC diagnostic pop - params:@{@"status":@"fundraising"} - completion:^(NSDictionary *json, JSONModelError *err) { - - benchStart = CFAbsoluteTimeGetCurrent(); - feed = [[KivaFeed alloc] initWithDictionary: json error:nil]; - benchEnd = CFAbsoluteTimeGetCurrent(); - - [HUD hideUIBlockingIndicator]; - - if (feed) { - [table reloadData]; - - [self logBenchmark]; - } else { - //show error - [[[UIAlertView alloc] initWithTitle:@"Error" - message:[err localizedDescription] - delegate:nil - cancelButtonTitle:@"Close" - otherButtonTitles:nil] show]; - } - }]; -} - --(void)logBenchmark -{ - NSLog(@"start: %f", benchStart); - NSLog(@"model: %f", benchEnd); - NSLog(@"-------------------------"); - NSLog(@"json -> model: %.4f", benchEnd - benchStart); -} - -#pragma mark - table methods --(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - --(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return feed.loans.count; -} - --(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KivaCell"]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KivaCell"]; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - LoanModel* loan = feed.loans[indexPath.row]; - - cell.textLabel.text = [NSString stringWithFormat:@"%@ from %@ (%@)", - loan.name, loan.location.country, loan.location.countryCode - ]; - - return cell; -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [table deselectRowAtIndexPath:indexPath animated:YES]; - - LoanModel* loan = feed.loans[indexPath.row]; - - NSString* message = [NSString stringWithFormat:@"%@ from %@(%@) needs a loan %@", - loan.name, loan.location.country, loan.location.countryCode, loan.use - ]; - - - [HUD showAlertWithTitle:@"Loan details" text:message]; -} - -@end diff --git a/JSONModelDemo_iOS/KivaViewController.xib b/JSONModelDemo_iOS/KivaViewController.xib deleted file mode 100644 index edb8d586..00000000 --- a/JSONModelDemo_iOS/KivaViewController.xib +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_iOS/KivaViewControllerNetworking.h b/JSONModelDemo_iOS/KivaViewControllerNetworking.h deleted file mode 100644 index a29fd53d..00000000 --- a/JSONModelDemo_iOS/KivaViewControllerNetworking.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// KivaViewControllerNetworking.h -// JSONModelDemo -// -// Created by Marin Todorov on 04/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface KivaViewControllerNetworking : UIViewController - -@end diff --git a/JSONModelDemo_iOS/KivaViewControllerNetworking.m b/JSONModelDemo_iOS/KivaViewControllerNetworking.m deleted file mode 100644 index d736532d..00000000 --- a/JSONModelDemo_iOS/KivaViewControllerNetworking.m +++ /dev/null @@ -1,92 +0,0 @@ -// -// KivaViewControllerNetworking.m -// JSONModelDemo -// -// Created by Marin Todorov on 04/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "KivaViewControllerNetworking.h" - -#import "JSONModel+networking.h" -#import "KivaFeed.h" - -#import "HUD.h" - -@interface KivaViewControllerNetworking () -{ - IBOutlet UITableView* table; - KivaFeed* feed; -} - -@end - -@implementation KivaViewControllerNetworking - --(void)viewDidAppear:(BOOL)animated -{ - self.title = @"Kiva.org latest loans"; - - [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - feed = [[KivaFeed alloc] initFromURLWithString:@"http://api.kivaws.org/v1/loans/search.json?status=fundraising" -#pragma GCC diagnostic pop - completion:^(JSONModel *model, JSONModelError* e) { - - [HUD hideUIBlockingIndicator]; - - if (model) { - [table reloadData]; - } else { - [HUD showAlertWithTitle:@"Error" text:e.localizedDescription]; - } - - }]; - -} - -#pragma mark - table methods --(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - --(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return feed.loans.count; -} - --(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KivaCell"]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KivaCell"]; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - LoanModel* loan = feed.loans[indexPath.row]; - - cell.textLabel.text = [NSString stringWithFormat:@"%@ from %@", - loan.name, loan.location.country - ]; - - return cell; -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [table deselectRowAtIndexPath:indexPath animated:YES]; - - LoanModel* loan = feed.loans[indexPath.row]; - - NSString* message = [NSString stringWithFormat:@"%@ from %@ needs a loan %@", - loan.name, loan.location.country, loan.use - ]; - - - [HUD showAlertWithTitle:@"Loan details" text:message]; -} - -@end diff --git a/JSONModelDemo_iOS/KivaViewControllerNetworking.xib b/JSONModelDemo_iOS/KivaViewControllerNetworking.xib deleted file mode 100644 index b8cfdbc6..00000000 --- a/JSONModelDemo_iOS/KivaViewControllerNetworking.xib +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_iOS/LoanModel.h b/JSONModelDemo_iOS/LoanModel.h deleted file mode 100644 index 36ead02e..00000000 --- a/JSONModelDemo_iOS/LoanModel.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// LoanModel.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "LocationModel.h" - -@protocol LoanModel @end - -@interface LoanModel : JSONModel - -@property (strong, nonatomic) NSString* name; -@property (strong, nonatomic) NSString* status; -@property (strong, nonatomic) NSString* use; - -@property (strong, nonatomic) LocationModel* location; - -@end \ No newline at end of file diff --git a/JSONModelDemo_iOS/LoanModel.m b/JSONModelDemo_iOS/LoanModel.m deleted file mode 100644 index d3678d9b..00000000 --- a/JSONModelDemo_iOS/LoanModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// LoanModel.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "LoanModel.h" - -@implementation LoanModel - -@end diff --git a/JSONModelDemo_iOS/LocationModel.h b/JSONModelDemo_iOS/LocationModel.h deleted file mode 100644 index d5e877b3..00000000 --- a/JSONModelDemo_iOS/LocationModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// LocationModel.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface LocationModel : JSONModel - -@property (strong, nonatomic) NSString* countryCode; -@property (strong, nonatomic) NSString* country; - -@end diff --git a/JSONModelDemo_iOS/LocationModel.m b/JSONModelDemo_iOS/LocationModel.m deleted file mode 100644 index 4d58dddc..00000000 --- a/JSONModelDemo_iOS/LocationModel.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// LocationModel.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "LocationModel.h" -#import "JSONKeyMapper.h" - -@implementation LocationModel - -+(JSONKeyMapper*)keyMapper -{ - return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase]; -} - -@end \ No newline at end of file diff --git a/JSONModelDemo_iOS/MBProgressHUD.h b/JSONModelDemo_iOS/MBProgressHUD.h deleted file mode 100755 index cfcbe5c5..00000000 --- a/JSONModelDemo_iOS/MBProgressHUD.h +++ /dev/null @@ -1,521 +0,0 @@ -// -// MBProgressHUD.h -// Version 0.9.1 -// Created by Matej Bukovinski on 2.4.09. -// - -// This code is distributed under the terms and conditions of the MIT license. - -// Copyright (c) 2009-2015 Matej Bukovinski -// -// 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 - -@protocol MBProgressHUDDelegate; - - -typedef NS_ENUM(NSInteger, MBProgressHUDMode) { - /** Progress is shown using an UIActivityIndicatorView. This is the default. */ - MBProgressHUDModeIndeterminate, - /** Progress is shown using a round, pie-chart like, progress view. */ - MBProgressHUDModeDeterminate, - /** Progress is shown using a horizontal progress bar */ - MBProgressHUDModeDeterminateHorizontalBar, - /** Progress is shown using a ring-shaped progress view. */ - MBProgressHUDModeAnnularDeterminate, - /** Shows a custom view */ - MBProgressHUDModeCustomView, - /** Shows only labels */ - MBProgressHUDModeText -}; - -typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) { - /** Opacity animation */ - MBProgressHUDAnimationFade, - /** Opacity + scale animation */ - MBProgressHUDAnimationZoom, - MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom, - MBProgressHUDAnimationZoomIn -}; - - -#ifndef MB_INSTANCETYPE -#if __has_feature(objc_instancetype) - #define MB_INSTANCETYPE instancetype -#else - #define MB_INSTANCETYPE id -#endif -#endif - -#ifndef MB_STRONG -#if __has_feature(objc_arc) - #define MB_STRONG strong -#else - #define MB_STRONG retain -#endif -#endif - -#ifndef MB_WEAK -#if __has_feature(objc_arc_weak) - #define MB_WEAK weak -#elif __has_feature(objc_arc) - #define MB_WEAK unsafe_unretained -#else - #define MB_WEAK assign -#endif -#endif - -#if NS_BLOCKS_AVAILABLE -typedef void (^MBProgressHUDCompletionBlock)(); -#endif - - -/** - * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. - * - * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. - * The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all - * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is - * drawn centered as a rounded semi-transparent view which resizes depending on the user specified content. - * - * This view supports four modes of operation: - * - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView - * - MBProgressHUDModeDeterminate - shows a custom round progress indicator - * - MBProgressHUDModeAnnularDeterminate - shows a custom annular progress indicator - * - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (see `customView`) - * - * All three modes can have optional labels assigned: - * - If the labelText property is set and non-empty then a label containing the provided content is placed below the - * indicator view. - * - If also the detailsLabelText property is set then another label is placed below the first label. - */ -@interface MBProgressHUD : UIView - -/** - * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. - * - * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden. - * - * @param view The view that the HUD will be added to - * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use - * animations while appearing. - * @return A reference to the created HUD. - * - * @see hideHUDForView:animated: - * @see animationType - */ -+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; - -/** - * Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:. - * - * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden. - * - * @param view The view that is going to be searched for a HUD subview. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return YES if a HUD was found and removed, NO otherwise. - * - * @see showHUDAddedTo:animated: - * @see animationType - */ -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; - -/** - * Finds all the HUD subviews and hides them. - * - * @note This method sets `removeFromSuperViewOnHide`. The HUDs will automatically be removed from the view hierarchy when hidden. - * - * @param view The view that is going to be searched for HUD subviews. - * @param animated If set to YES the HUDs will disappear using the current animationType. If set to NO the HUDs will not use - * animations while disappearing. - * @return the number of HUDs found and removed. - * - * @see hideHUDForView:animated: - * @see animationType - */ -+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated; - -/** - * Finds the top-most HUD subview and returns it. - * - * @param view The view that is going to be searched. - * @return A reference to the last HUD subview discovered. - */ -+ (MB_INSTANCETYPE)HUDForView:(UIView *)view; - -/** - * Finds all HUD subviews and returns them. - * - * @param view The view that is going to be searched. - * @return All found HUD views (array of MBProgressHUD objects). - */ -+ (NSArray *)allHUDsForView:(UIView *)view; - -/** - * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with - * window.bounds as the parameter. - * - * @param window The window instance that will provide the bounds for the HUD. Should be the same instance as - * the HUD's superview (i.e., the window that the HUD will be added to). - */ -- (id)initWithWindow:(UIWindow *)window; - -/** - * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with - * view.bounds as the parameter - * - * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as - * the HUD's superview (i.e., the view that the HUD will be added to). - */ -- (id)initWithView:(UIView *)view; - -/** - * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so - * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread - * (e.g., when using something like NSOperation or calling an asynchronous call like NSURLRequest). - * - * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use - * animations while appearing. - * - * @see animationType - */ -- (void)show:(BOOL)animated; - -/** - * Hide the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * - * @see animationType - */ -- (void)hide:(BOOL)animated; - -/** - * Hide the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @param delay Delay in seconds until the HUD is hidden. - * - * @see animationType - */ -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay; - -/** - * Shows the HUD while a background task is executing in a new thread, then hides the HUD. - * - * This method also takes care of autorelease pools so your method does not have to be concerned with setting up a - * pool. - * - * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread. - * @param target The object that the target method belongs to. - * @param object An optional object to be passed to the method. - * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will not use - * animations while (dis)appearing. - */ -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated; - -#if NS_BLOCKS_AVAILABLE - -/** - * Shows the HUD while a block is executing on a background queue, then hides the HUD. - * - * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block; - -/** - * Shows the HUD while a block is executing on a background queue, then hides the HUD. - * - * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion; - -/** - * Shows the HUD while a block is executing on the specified dispatch queue, then hides the HUD. - * - * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue; - -/** - * Shows the HUD while a block is executing on the specified dispatch queue, executes completion block on the main queue, and then hides the HUD. - * - * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will - * not use animations while (dis)appearing. - * @param block The block to be executed while the HUD is shown. - * @param queue The dispatch queue on which the block should be executed. - * @param completion The block to be executed on completion. - * - * @see completionBlock - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue - completionBlock:(MBProgressHUDCompletionBlock)completion; - -/** - * A block that gets called after the HUD was completely hidden. - */ -@property (copy) MBProgressHUDCompletionBlock completionBlock; - -#endif - -/** - * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate. - * - * @see MBProgressHUDMode - */ -@property (assign) MBProgressHUDMode mode; - -/** - * The animation type that should be used when the HUD is shown and hidden. - * - * @see MBProgressHUDAnimation - */ -@property (assign) MBProgressHUDAnimation animationType; - -/** - * The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView. - * For best results use a 37 by 37 pixel view (so the bounds match the built in indicator bounds). - */ -@property (MB_STRONG) UIView *customView; - -/** - * The HUD delegate object. - * - * @see MBProgressHUDDelegate - */ -@property (MB_WEAK) id delegate; - -/** - * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit - * the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or - * set to @"", then no message is displayed. - */ -@property (copy) NSString *labelText; - -/** - * An optional details message displayed below the labelText message. This message is displayed only if the labelText - * property is also set and is different from an empty string (@""). The details text can span multiple lines. - */ -@property (copy) NSString *detailsLabelText; - -/** - * The opacity of the HUD window. Defaults to 0.8 (80% opacity). - */ -@property (assign) float opacity; - -/** - * The color of the HUD window. Defaults to black. If this property is set, color is set using - * this UIColor and the opacity property is not used. using retain because performing copy on - * UIColor base colors (like [UIColor greenColor]) cause problems with the copyZone. - */ -@property (MB_STRONG) UIColor *color; - -/** - * The x-axis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float xOffset; - -/** - * The y-axis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float yOffset; - -/** - * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). - * Defaults to 20.0 - */ -@property (assign) float margin; - -/** - * The corner radius for the HUD - * Defaults to 10.0 - */ -@property (assign) float cornerRadius; - -/** - * Cover the HUD background view with a radial gradient. - */ -@property (assign) BOOL dimBackground; - -/* - * Grace period is the time (in seconds) that the invoked method may be run without - * showing the HUD. If the task finishes before the grace time runs out, the HUD will - * not be shown at all. - * This may be used to prevent HUD display for very short tasks. - * Defaults to 0 (no grace time). - * Grace time functionality is only supported when the task status is known! - * @see taskInProgress - */ -@property (assign) float graceTime; - -/** - * The minimum time (in seconds) that the HUD is shown. - * This avoids the problem of the HUD being shown and than instantly hidden. - * Defaults to 0 (no minimum show time). - */ -@property (assign) float minShowTime; - -/** - * Indicates that the executed operation is in progress. Needed for correct graceTime operation. - * If you don't set a graceTime (different than 0.0) this does nothing. - * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:. - * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly), - * you need to set this property when your task starts and completes in order to have normal graceTime - * functionality. - */ -@property (assign) BOOL taskInProgress; - -/** - * Removes the HUD from its parent view when hidden. - * Defaults to NO. - */ -@property (assign) BOOL removeFromSuperViewOnHide; - -/** - * Font to be used for the main label. Set this property if the default is not adequate. - */ -@property (MB_STRONG) UIFont* labelFont; - -/** - * Color to be used for the main label. Set this property if the default is not adequate. - */ -@property (MB_STRONG) UIColor* labelColor; - -/** - * Font to be used for the details label. Set this property if the default is not adequate. - */ -@property (MB_STRONG) UIFont* detailsLabelFont; - -/** - * Color to be used for the details label. Set this property if the default is not adequate. - */ -@property (MB_STRONG) UIColor* detailsLabelColor; - -/** - * The color of the activity indicator. Defaults to [UIColor whiteColor] - * Does nothing on pre iOS 5. - */ -@property (MB_STRONG) UIColor *activityIndicatorColor; - -/** - * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. - */ -@property (assign) float progress; - -/** - * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size). - */ -@property (assign) CGSize minSize; - - -/** - * The actual size of the HUD bezel. - * You can use this to limit touch handling on the bezel area only. - * @see https://github.com/jdg/MBProgressHUD/pull/200 - */ -@property (atomic, assign, readonly) CGSize size; - - -/** - * Force the HUD dimensions to be equal if possible. - */ -@property (assign, getter = isSquare) BOOL square; - -@end - - -@protocol MBProgressHUDDelegate - -@optional - -/** - * Called after the HUD was fully hidden from the screen. - */ -- (void)hudWasHidden:(MBProgressHUD *)hud; - -@end - - -/** - * A progress view for showing definite progress by filling up a circle (pie chart). - */ -@interface MBRoundProgressView : UIView - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -/** - * Indicator progress color. - * Defaults to white [UIColor whiteColor] - */ -@property (nonatomic, MB_STRONG) UIColor *progressTintColor; - -/** - * Indicator background (non-progress) color. - * Defaults to translucent white (alpha 0.1) - */ -@property (nonatomic, MB_STRONG) UIColor *backgroundTintColor; - -/* - * Display mode - NO = round or YES = annular. Defaults to round. - */ -@property (nonatomic, assign, getter = isAnnular) BOOL annular; - -@end - - -/** - * A flat bar progress view. - */ -@interface MBBarProgressView : UIView - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -/** - * Bar border line color. - * Defaults to white [UIColor whiteColor]. - */ -@property (nonatomic, MB_STRONG) UIColor *lineColor; - -/** - * Bar background color. - * Defaults to clear [UIColor clearColor]; - */ -@property (nonatomic, MB_STRONG) UIColor *progressRemainingColor; - -/** - * Bar progress color. - * Defaults to white [UIColor whiteColor]. - */ -@property (nonatomic, MB_STRONG) UIColor *progressColor; - -@end diff --git a/JSONModelDemo_iOS/MBProgressHUD.m b/JSONModelDemo_iOS/MBProgressHUD.m deleted file mode 100755 index 996b1cb8..00000000 --- a/JSONModelDemo_iOS/MBProgressHUD.m +++ /dev/null @@ -1,1033 +0,0 @@ -// -// MBProgressHUD.m -// Version 0.9.1 -// Created by Matej Bukovinski on 2.4.09. -// - -#import "MBProgressHUD.h" -#import - - -#if __has_feature(objc_arc) - #define MB_AUTORELEASE(exp) exp - #define MB_RELEASE(exp) exp - #define MB_RETAIN(exp) exp -#else - #define MB_AUTORELEASE(exp) [exp autorelease] - #define MB_RELEASE(exp) [exp release] - #define MB_RETAIN(exp) [exp retain] -#endif - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 - #define MBLabelAlignmentCenter NSTextAlignmentCenter -#else - #define MBLabelAlignmentCenter UITextAlignmentCenter -#endif - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 - #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text \ - sizeWithAttributes:@{NSFontAttributeName:font}] : CGSizeZero; -#else - #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text sizeWithFont:font] : CGSizeZero; -#endif - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 - #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ - boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \ - attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero; -#else - #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ - sizeWithFont:font constrainedToSize:maxSize lineBreakMode:mode] : CGSizeZero; -#endif - -#ifndef kCFCoreFoundationVersionNumber_iOS_7_0 - #define kCFCoreFoundationVersionNumber_iOS_7_0 847.20 -#endif - -#ifndef kCFCoreFoundationVersionNumber_iOS_8_0 - #define kCFCoreFoundationVersionNumber_iOS_8_0 1129.15 -#endif - - -static const CGFloat kPadding = 4.f; -static const CGFloat kLabelFontSize = 16.f; -static const CGFloat kDetailsLabelFontSize = 12.f; - - -@interface MBProgressHUD () { - BOOL useAnimation; - SEL methodForExecution; - id targetForExecution; - id objectForExecution; - UILabel *label; - UILabel *detailsLabel; - BOOL isFinished; - CGAffineTransform rotationTransform; -} - -@property (atomic, MB_STRONG) UIView *indicator; -@property (atomic, MB_STRONG) NSTimer *graceTimer; -@property (atomic, MB_STRONG) NSTimer *minShowTimer; -@property (atomic, MB_STRONG) NSDate *showStarted; - -@end - - -@implementation MBProgressHUD - -#pragma mark - Properties - -@synthesize animationType; -@synthesize delegate; -@synthesize opacity; -@synthesize color; -@synthesize labelFont; -@synthesize labelColor; -@synthesize detailsLabelFont; -@synthesize detailsLabelColor; -@synthesize indicator; -@synthesize xOffset; -@synthesize yOffset; -@synthesize minSize; -@synthesize square; -@synthesize margin; -@synthesize dimBackground; -@synthesize graceTime; -@synthesize minShowTime; -@synthesize graceTimer; -@synthesize minShowTimer; -@synthesize taskInProgress; -@synthesize removeFromSuperViewOnHide; -@synthesize customView; -@synthesize showStarted; -@synthesize mode; -@synthesize labelText; -@synthesize detailsLabelText; -@synthesize progress; -@synthesize size; -@synthesize activityIndicatorColor; -#if NS_BLOCKS_AVAILABLE -@synthesize completionBlock; -#endif - -#pragma mark - Class methods - -+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [[self alloc] initWithView:view]; - hud.removeFromSuperViewOnHide = YES; - [view addSubview:hud]; - [hud show:animated]; - return MB_AUTORELEASE(hud); -} - -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [self HUDForView:view]; - if (hud != nil) { - hud.removeFromSuperViewOnHide = YES; - [hud hide:animated]; - return YES; - } - return NO; -} - -+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated { - NSArray *huds = [MBProgressHUD allHUDsForView:view]; - for (MBProgressHUD *hud in huds) { - hud.removeFromSuperViewOnHide = YES; - [hud hide:animated]; - } - return [huds count]; -} - -+ (MB_INSTANCETYPE)HUDForView:(UIView *)view { - NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator]; - for (UIView *subview in subviewsEnum) { - if ([subview isKindOfClass:self]) { - return (MBProgressHUD *)subview; - } - } - return nil; -} - -+ (NSArray *)allHUDsForView:(UIView *)view { - NSMutableArray *huds = [NSMutableArray array]; - NSArray *subviews = view.subviews; - for (UIView *aView in subviews) { - if ([aView isKindOfClass:self]) { - [huds addObject:aView]; - } - } - return [NSArray arrayWithArray:huds]; -} - -#pragma mark - Lifecycle - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - // Set default values for properties - self.animationType = MBProgressHUDAnimationFade; - self.mode = MBProgressHUDModeIndeterminate; - self.labelText = nil; - self.detailsLabelText = nil; - self.opacity = 0.8f; - self.color = nil; - self.labelFont = [UIFont boldSystemFontOfSize:kLabelFontSize]; - self.labelColor = [UIColor whiteColor]; - self.detailsLabelFont = [UIFont boldSystemFontOfSize:kDetailsLabelFontSize]; - self.detailsLabelColor = [UIColor whiteColor]; - self.activityIndicatorColor = [UIColor whiteColor]; - self.xOffset = 0.0f; - self.yOffset = 0.0f; - self.dimBackground = NO; - self.margin = 20.0f; - self.cornerRadius = 10.0f; - self.graceTime = 0.0f; - self.minShowTime = 0.0f; - self.removeFromSuperViewOnHide = NO; - self.minSize = CGSizeZero; - self.square = NO; - self.contentMode = UIViewContentModeCenter; - self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin - | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; - - // Transparent background - self.opaque = NO; - self.backgroundColor = [UIColor clearColor]; - // Make it invisible for now - self.alpha = 0.0f; - - taskInProgress = NO; - rotationTransform = CGAffineTransformIdentity; - - [self setupLabels]; - [self updateIndicators]; - [self registerForKVO]; - [self registerForNotifications]; - } - return self; -} - -- (id)initWithView:(UIView *)view { - NSAssert(view, @"View must not be nil."); - return [self initWithFrame:view.bounds]; -} - -- (id)initWithWindow:(UIWindow *)window { - return [self initWithView:window]; -} - -- (void)dealloc { - [self unregisterFromNotifications]; - [self unregisterFromKVO]; -#if !__has_feature(objc_arc) - [color release]; - [indicator release]; - [label release]; - [detailsLabel release]; - [labelText release]; - [detailsLabelText release]; - [graceTimer release]; - [minShowTimer release]; - [showStarted release]; - [customView release]; - [labelFont release]; - [labelColor release]; - [detailsLabelFont release]; - [detailsLabelColor release]; -#if NS_BLOCKS_AVAILABLE - [completionBlock release]; -#endif - [super dealloc]; -#endif -} - -#pragma mark - Show & hide - -- (void)show:(BOOL)animated { - NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); - useAnimation = animated; - // If the grace time is set postpone the HUD display - if (self.graceTime > 0.0) { - NSTimer *newGraceTimer = [NSTimer timerWithTimeInterval:self.graceTime target:self selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO]; - [[NSRunLoop currentRunLoop] addTimer:newGraceTimer forMode:NSRunLoopCommonModes]; - self.graceTimer = newGraceTimer; - } - // ... otherwise show the HUD imediately - else { - [self showUsingAnimation:useAnimation]; - } -} - -- (void)hide:(BOOL)animated { - NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); - useAnimation = animated; - // If the minShow time is set, calculate how long the hud was shown, - // and pospone the hiding operation if necessary - if (self.minShowTime > 0.0 && showStarted) { - NSTimeInterval interv = [[NSDate date] timeIntervalSinceDate:showStarted]; - if (interv < self.minShowTime) { - self.minShowTimer = [NSTimer scheduledTimerWithTimeInterval:(self.minShowTime - interv) target:self - selector:@selector(handleMinShowTimer:) userInfo:nil repeats:NO]; - return; - } - } - // ... otherwise hide the HUD immediately - [self hideUsingAnimation:useAnimation]; -} - -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay { - [self performSelector:@selector(hideDelayed:) withObject:[NSNumber numberWithBool:animated] afterDelay:delay]; -} - -- (void)hideDelayed:(NSNumber *)animated { - [self hide:[animated boolValue]]; -} - -#pragma mark - Timer callbacks - -- (void)handleGraceTimer:(NSTimer *)theTimer { - // Show the HUD only if the task is still running - if (taskInProgress) { - [self showUsingAnimation:useAnimation]; - } -} - -- (void)handleMinShowTimer:(NSTimer *)theTimer { - [self hideUsingAnimation:useAnimation]; -} - -#pragma mark - View Hierrarchy - -- (void)didMoveToSuperview { - [self updateForCurrentOrientationAnimated:NO]; -} - -#pragma mark - Internal show & hide operations - -- (void)showUsingAnimation:(BOOL)animated { - // Cancel any scheduled hideDelayed: calls - [NSObject cancelPreviousPerformRequestsWithTarget:self]; - [self setNeedsDisplay]; - - if (animated && animationType == MBProgressHUDAnimationZoomIn) { - self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f)); - } else if (animated && animationType == MBProgressHUDAnimationZoomOut) { - self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f)); - } - self.showStarted = [NSDate date]; - // Fade in - if (animated) { - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:0.30]; - self.alpha = 1.0f; - if (animationType == MBProgressHUDAnimationZoomIn || animationType == MBProgressHUDAnimationZoomOut) { - self.transform = rotationTransform; - } - [UIView commitAnimations]; - } - else { - self.alpha = 1.0f; - } -} - -- (void)hideUsingAnimation:(BOOL)animated { - // Fade out - if (animated && showStarted) { - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:0.30]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)]; - // 0.02 prevents the hud from passing through touches during the animation the hud will get completely hidden - // in the done method - if (animationType == MBProgressHUDAnimationZoomIn) { - self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f)); - } else if (animationType == MBProgressHUDAnimationZoomOut) { - self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f)); - } - - self.alpha = 0.02f; - [UIView commitAnimations]; - } - else { - self.alpha = 0.0f; - [self done]; - } - self.showStarted = nil; -} - -- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context { - [self done]; -} - -- (void)done { - [NSObject cancelPreviousPerformRequestsWithTarget:self]; - isFinished = YES; - self.alpha = 0.0f; - if (removeFromSuperViewOnHide) { - [self removeFromSuperview]; - } -#if NS_BLOCKS_AVAILABLE - if (self.completionBlock) { - self.completionBlock(); - self.completionBlock = NULL; - } -#endif - if ([delegate respondsToSelector:@selector(hudWasHidden:)]) { - [delegate performSelector:@selector(hudWasHidden:) withObject:self]; - } -} - -#pragma mark - Threading - -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated { - methodForExecution = method; - targetForExecution = MB_RETAIN(target); - objectForExecution = MB_RETAIN(object); - // Launch execution in new thread - self.taskInProgress = YES; - [NSThread detachNewThreadSelector:@selector(launchExecution) toTarget:self withObject:nil]; - // Show HUD view - [self show:animated]; -} - -#if NS_BLOCKS_AVAILABLE - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)())completion { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:completion]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue { - [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue - completionBlock:(MBProgressHUDCompletionBlock)completion { - self.taskInProgress = YES; - self.completionBlock = completion; - dispatch_async(queue, ^(void) { - block(); - dispatch_async(dispatch_get_main_queue(), ^(void) { - [self cleanUp]; - }); - }); - [self show:animated]; -} - -#endif - -- (void)launchExecution { - @autoreleasepool { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-performSelector-leaks" - // Start executing the requested task - [targetForExecution performSelector:methodForExecution withObject:objectForExecution]; -#pragma clang diagnostic pop - // Task completed, update view in main thread (note: view operations should - // be done only in the main thread) - [self performSelectorOnMainThread:@selector(cleanUp) withObject:nil waitUntilDone:NO]; - } -} - -- (void)cleanUp { - taskInProgress = NO; -#if !__has_feature(objc_arc) - [targetForExecution release]; - [objectForExecution release]; -#else - targetForExecution = nil; - objectForExecution = nil; -#endif - [self hide:useAnimation]; -} - -#pragma mark - UI - -- (void)setupLabels { - label = [[UILabel alloc] initWithFrame:self.bounds]; - label.adjustsFontSizeToFitWidth = NO; - label.textAlignment = MBLabelAlignmentCenter; - label.opaque = NO; - label.backgroundColor = [UIColor clearColor]; - label.textColor = self.labelColor; - label.font = self.labelFont; - label.text = self.labelText; - [self addSubview:label]; - - detailsLabel = [[UILabel alloc] initWithFrame:self.bounds]; - detailsLabel.font = self.detailsLabelFont; - detailsLabel.adjustsFontSizeToFitWidth = NO; - detailsLabel.textAlignment = MBLabelAlignmentCenter; - detailsLabel.opaque = NO; - detailsLabel.backgroundColor = [UIColor clearColor]; - detailsLabel.textColor = self.detailsLabelColor; - detailsLabel.numberOfLines = 0; - detailsLabel.font = self.detailsLabelFont; - detailsLabel.text = self.detailsLabelText; - [self addSubview:detailsLabel]; -} - -- (void)updateIndicators { - - BOOL isActivityIndicator = [indicator isKindOfClass:[UIActivityIndicatorView class]]; - BOOL isRoundIndicator = [indicator isKindOfClass:[MBRoundProgressView class]]; - - if (mode == MBProgressHUDModeIndeterminate) { - if (!isActivityIndicator) { - // Update to indeterminate indicator - [indicator removeFromSuperview]; - self.indicator = MB_AUTORELEASE([[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]); - [(UIActivityIndicatorView *)indicator startAnimating]; - [self addSubview:indicator]; - } -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000 - [(UIActivityIndicatorView *)indicator setColor:self.activityIndicatorColor]; -#endif - } - else if (mode == MBProgressHUDModeDeterminateHorizontalBar) { - // Update to bar determinate indicator - [indicator removeFromSuperview]; - self.indicator = MB_AUTORELEASE([[MBBarProgressView alloc] init]); - [self addSubview:indicator]; - } - else if (mode == MBProgressHUDModeDeterminate || mode == MBProgressHUDModeAnnularDeterminate) { - if (!isRoundIndicator) { - // Update to determinante indicator - [indicator removeFromSuperview]; - self.indicator = MB_AUTORELEASE([[MBRoundProgressView alloc] init]); - [self addSubview:indicator]; - } - if (mode == MBProgressHUDModeAnnularDeterminate) { - [(MBRoundProgressView *)indicator setAnnular:YES]; - } - [(MBRoundProgressView *)indicator setProgressTintColor:self.activityIndicatorColor]; - [(MBRoundProgressView *)indicator setBackgroundTintColor:[self.activityIndicatorColor colorWithAlphaComponent:0.1f]]; - } - else if (mode == MBProgressHUDModeCustomView && customView != indicator) { - // Update custom view indicator - [indicator removeFromSuperview]; - self.indicator = customView; - [self addSubview:indicator]; - } else if (mode == MBProgressHUDModeText) { - [indicator removeFromSuperview]; - self.indicator = nil; - } -} - -#pragma mark - Layout - -- (void)layoutSubviews { - [super layoutSubviews]; - - // Entirely cover the parent view - UIView *parent = self.superview; - if (parent) { - self.frame = parent.bounds; - } - CGRect bounds = self.bounds; - - // Determine the total width and height needed - CGFloat maxWidth = bounds.size.width - 4 * margin; - CGSize totalSize = CGSizeZero; - - CGRect indicatorF = indicator.bounds; - indicatorF.size.width = MIN(indicatorF.size.width, maxWidth); - totalSize.width = MAX(totalSize.width, indicatorF.size.width); - totalSize.height += indicatorF.size.height; - - CGSize labelSize = MB_TEXTSIZE(label.text, label.font); - labelSize.width = MIN(labelSize.width, maxWidth); - totalSize.width = MAX(totalSize.width, labelSize.width); - totalSize.height += labelSize.height; - if (labelSize.height > 0.f && indicatorF.size.height > 0.f) { - totalSize.height += kPadding; - } - - CGFloat remainingHeight = bounds.size.height - totalSize.height - kPadding - 4 * margin; - CGSize maxSize = CGSizeMake(maxWidth, remainingHeight); - CGSize detailsLabelSize = MB_MULTILINE_TEXTSIZE(detailsLabel.text, detailsLabel.font, maxSize, detailsLabel.lineBreakMode); - totalSize.width = MAX(totalSize.width, detailsLabelSize.width); - totalSize.height += detailsLabelSize.height; - if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) { - totalSize.height += kPadding; - } - - totalSize.width += 2 * margin; - totalSize.height += 2 * margin; - - // Position elements - CGFloat yPos = round(((bounds.size.height - totalSize.height) / 2)) + margin + yOffset; - CGFloat xPos = xOffset; - indicatorF.origin.y = yPos; - indicatorF.origin.x = round((bounds.size.width - indicatorF.size.width) / 2) + xPos; - indicator.frame = indicatorF; - yPos += indicatorF.size.height; - - if (labelSize.height > 0.f && indicatorF.size.height > 0.f) { - yPos += kPadding; - } - CGRect labelF; - labelF.origin.y = yPos; - labelF.origin.x = round((bounds.size.width - labelSize.width) / 2) + xPos; - labelF.size = labelSize; - label.frame = labelF; - yPos += labelF.size.height; - - if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) { - yPos += kPadding; - } - CGRect detailsLabelF; - detailsLabelF.origin.y = yPos; - detailsLabelF.origin.x = round((bounds.size.width - detailsLabelSize.width) / 2) + xPos; - detailsLabelF.size = detailsLabelSize; - detailsLabel.frame = detailsLabelF; - - // Enforce minsize and quare rules - if (square) { - CGFloat max = MAX(totalSize.width, totalSize.height); - if (max <= bounds.size.width - 2 * margin) { - totalSize.width = max; - } - if (max <= bounds.size.height - 2 * margin) { - totalSize.height = max; - } - } - if (totalSize.width < minSize.width) { - totalSize.width = minSize.width; - } - if (totalSize.height < minSize.height) { - totalSize.height = minSize.height; - } - - size = totalSize; -} - -#pragma mark BG Drawing - -- (void)drawRect:(CGRect)rect { - - CGContextRef context = UIGraphicsGetCurrentContext(); - UIGraphicsPushContext(context); - - if (self.dimBackground) { - //Gradient colours - size_t gradLocationsNum = 2; - CGFloat gradLocations[2] = {0.0f, 1.0f}; - CGFloat gradColors[8] = {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.75f}; - CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, gradColors, gradLocations, gradLocationsNum); - CGColorSpaceRelease(colorSpace); - //Gradient center - CGPoint gradCenter= CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); - //Gradient radius - float gradRadius = MIN(self.bounds.size.width , self.bounds.size.height) ; - //Gradient draw - CGContextDrawRadialGradient (context, gradient, gradCenter, - 0, gradCenter, gradRadius, - kCGGradientDrawsAfterEndLocation); - CGGradientRelease(gradient); - } - - // Set background rect color - if (self.color) { - CGContextSetFillColorWithColor(context, self.color.CGColor); - } else { - CGContextSetGrayFillColor(context, 0.0f, self.opacity); - } - - - // Center HUD - CGRect allRect = self.bounds; - // Draw rounded HUD backgroud rect - CGRect boxRect = CGRectMake(round((allRect.size.width - size.width) / 2) + self.xOffset, - round((allRect.size.height - size.height) / 2) + self.yOffset, size.width, size.height); - float radius = self.cornerRadius; - CGContextBeginPath(context); - CGContextMoveToPoint(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect)); - CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMinY(boxRect) + radius, radius, 3 * (float)M_PI / 2, 0, 0); - CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMaxY(boxRect) - radius, radius, 0, (float)M_PI / 2, 0); - CGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMaxY(boxRect) - radius, radius, (float)M_PI / 2, (float)M_PI, 0); - CGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect) + radius, radius, (float)M_PI, 3 * (float)M_PI / 2, 0); - CGContextClosePath(context); - CGContextFillPath(context); - - UIGraphicsPopContext(); -} - -#pragma mark - KVO - -- (void)registerForKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; - } -} - -- (void)unregisterFromKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self removeObserver:self forKeyPath:keyPath]; - } -} - -- (NSArray *)observableKeypaths { - return [NSArray arrayWithObjects:@"mode", @"customView", @"labelText", @"labelFont", @"labelColor", - @"detailsLabelText", @"detailsLabelFont", @"detailsLabelColor", @"progress", @"activityIndicatorColor", nil]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if (![NSThread isMainThread]) { - [self performSelectorOnMainThread:@selector(updateUIForKeypath:) withObject:keyPath waitUntilDone:NO]; - } else { - [self updateUIForKeypath:keyPath]; - } -} - -- (void)updateUIForKeypath:(NSString *)keyPath { - if ([keyPath isEqualToString:@"mode"] || [keyPath isEqualToString:@"customView"] || - [keyPath isEqualToString:@"activityIndicatorColor"]) { - [self updateIndicators]; - } else if ([keyPath isEqualToString:@"labelText"]) { - label.text = self.labelText; - } else if ([keyPath isEqualToString:@"labelFont"]) { - label.font = self.labelFont; - } else if ([keyPath isEqualToString:@"labelColor"]) { - label.textColor = self.labelColor; - } else if ([keyPath isEqualToString:@"detailsLabelText"]) { - detailsLabel.text = self.detailsLabelText; - } else if ([keyPath isEqualToString:@"detailsLabelFont"]) { - detailsLabel.font = self.detailsLabelFont; - } else if ([keyPath isEqualToString:@"detailsLabelColor"]) { - detailsLabel.textColor = self.detailsLabelColor; - } else if ([keyPath isEqualToString:@"progress"]) { - if ([indicator respondsToSelector:@selector(setProgress:)]) { - [(id)indicator setValue:@(progress) forKey:@"progress"]; - } - return; - } - [self setNeedsLayout]; - [self setNeedsDisplay]; -} - -#pragma mark - Notifications - -- (void)registerForNotifications { -#if !TARGET_OS_TV - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - - [nc addObserver:self selector:@selector(statusBarOrientationDidChange:) - name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; -#endif -} - -- (void)unregisterFromNotifications { -#if !TARGET_OS_TV - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; -#endif -} - -#if !TARGET_OS_TV -- (void)statusBarOrientationDidChange:(NSNotification *)notification { - UIView *superview = self.superview; - if (!superview) { - return; - } else { - [self updateForCurrentOrientationAnimated:YES]; - } -} -#endif - -- (void)updateForCurrentOrientationAnimated:(BOOL)animated { - // Stay in sync with the superview in any case - if (self.superview) { - self.bounds = self.superview.bounds; - [self setNeedsDisplay]; - } - - // Not needed on iOS 8+, compile out when the deployment target allows, - // to avoid sharedApplication problems on extension targets -#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 - // Only needed pre iOS 7 when added to a window - BOOL iOS8OrLater = kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0; - if (iOS8OrLater || ![self.superview isKindOfClass:[UIWindow class]]) return; - - UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; - CGFloat radians = 0; - if (UIInterfaceOrientationIsLandscape(orientation)) { - if (orientation == UIInterfaceOrientationLandscapeLeft) { radians = -(CGFloat)M_PI_2; } - else { radians = (CGFloat)M_PI_2; } - // Window coordinates differ! - self.bounds = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.width); - } else { - if (orientation == UIInterfaceOrientationPortraitUpsideDown) { radians = (CGFloat)M_PI; } - else { radians = 0; } - } - rotationTransform = CGAffineTransformMakeRotation(radians); - - if (animated) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:0.3]; - } - [self setTransform:rotationTransform]; - if (animated) { - [UIView commitAnimations]; - } -#endif -} - -@end - - -@implementation MBRoundProgressView - -#pragma mark - Lifecycle - -- (id)init { - return [self initWithFrame:CGRectMake(0.f, 0.f, 37.f, 37.f)]; -} - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - self.backgroundColor = [UIColor clearColor]; - self.opaque = NO; - _progress = 0.f; - _annular = NO; - _progressTintColor = [[UIColor alloc] initWithWhite:1.f alpha:1.f]; - _backgroundTintColor = [[UIColor alloc] initWithWhite:1.f alpha:.1f]; - [self registerForKVO]; - } - return self; -} - -- (void)dealloc { - [self unregisterFromKVO]; -#if !__has_feature(objc_arc) - [_progressTintColor release]; - [_backgroundTintColor release]; - [super dealloc]; -#endif -} - -#pragma mark - Drawing - -- (void)drawRect:(CGRect)rect { - - CGRect allRect = self.bounds; - CGRect circleRect = CGRectInset(allRect, 2.0f, 2.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - - if (_annular) { - // Draw background - BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; - CGFloat lineWidth = isPreiOS7 ? 5.f : 2.f; - UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath]; - processBackgroundPath.lineWidth = lineWidth; - processBackgroundPath.lineCapStyle = kCGLineCapButt; - CGPoint center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); - CGFloat radius = (self.bounds.size.width - lineWidth)/2; - CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees - CGFloat endAngle = (2 * (float)M_PI) + startAngle; - [processBackgroundPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; - [_backgroundTintColor set]; - [processBackgroundPath stroke]; - // Draw progress - UIBezierPath *processPath = [UIBezierPath bezierPath]; - processPath.lineCapStyle = isPreiOS7 ? kCGLineCapRound : kCGLineCapSquare; - processPath.lineWidth = lineWidth; - endAngle = (self.progress * 2 * (float)M_PI) + startAngle; - [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; - [_progressTintColor set]; - [processPath stroke]; - } else { - // Draw background - [_progressTintColor setStroke]; - [_backgroundTintColor setFill]; - CGContextSetLineWidth(context, 2.0f); - CGContextFillEllipseInRect(context, circleRect); - CGContextStrokeEllipseInRect(context, circleRect); - // Draw progress - CGPoint center = CGPointMake(allRect.size.width / 2, allRect.size.height / 2); - CGFloat radius = (allRect.size.width - 4) / 2; - CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees - CGFloat endAngle = (self.progress * 2 * (float)M_PI) + startAngle; - [_progressTintColor setFill]; - CGContextMoveToPoint(context, center.x, center.y); - CGContextAddArc(context, center.x, center.y, radius, startAngle, endAngle, 0); - CGContextClosePath(context); - CGContextFillPath(context); - } -} - -#pragma mark - KVO - -- (void)registerForKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; - } -} - -- (void)unregisterFromKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self removeObserver:self forKeyPath:keyPath]; - } -} - -- (NSArray *)observableKeypaths { - return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", @"progress", @"annular", nil]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - [self setNeedsDisplay]; -} - -@end - - -@implementation MBBarProgressView - -#pragma mark - Lifecycle - -- (id)init { - return [self initWithFrame:CGRectMake(.0f, .0f, 120.0f, 20.0f)]; -} - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - _progress = 0.f; - _lineColor = [UIColor whiteColor]; - _progressColor = [UIColor whiteColor]; - _progressRemainingColor = [UIColor clearColor]; - self.backgroundColor = [UIColor clearColor]; - self.opaque = NO; - [self registerForKVO]; - } - return self; -} - -- (void)dealloc { - [self unregisterFromKVO]; -#if !__has_feature(objc_arc) - [_lineColor release]; - [_progressColor release]; - [_progressRemainingColor release]; - [super dealloc]; -#endif -} - -#pragma mark - Drawing - -- (void)drawRect:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - - CGContextSetLineWidth(context, 2); - CGContextSetStrokeColorWithColor(context,[_lineColor CGColor]); - CGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]); - - // Draw background - float radius = (rect.size.height / 2) - 2; - CGContextMoveToPoint(context, 2, rect.size.height/2); - CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); - CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); - CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); - CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); - CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); - CGContextFillPath(context); - - // Draw border - CGContextMoveToPoint(context, 2, rect.size.height/2); - CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); - CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); - CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); - CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); - CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); - CGContextStrokePath(context); - - CGContextSetFillColorWithColor(context, [_progressColor CGColor]); - radius = radius - 2; - float amount = self.progress * rect.size.width; - - // Progress in the middle area - if (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) { - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); - CGContextAddLineToPoint(context, amount, 4); - CGContextAddLineToPoint(context, amount, radius + 4); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); - CGContextAddLineToPoint(context, amount, rect.size.height - 4); - CGContextAddLineToPoint(context, amount, radius + 4); - - CGContextFillPath(context); - } - - // Progress in the right arc - else if (amount > radius + 4) { - float x = amount - (rect.size.width - radius - 4); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 4, 4); - float angle = -acos(x/radius); - if (isnan(angle)) angle = 0; - CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, M_PI, angle, 0); - CGContextAddLineToPoint(context, amount, rect.size.height/2); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 4, rect.size.height - 4); - angle = acos(x/radius); - if (isnan(angle)) angle = 0; - CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1); - CGContextAddLineToPoint(context, amount, rect.size.height/2); - - CGContextFillPath(context); - } - - // Progress is in the left arc - else if (amount < radius + 4 && amount > 0) { - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); - CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); - CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); - - CGContextFillPath(context); - } -} - -#pragma mark - KVO - -- (void)registerForKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; - } -} - -- (void)unregisterFromKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self removeObserver:self forKeyPath:keyPath]; - } -} - -- (NSArray *)observableKeypaths { - return [NSArray arrayWithObjects:@"lineColor", @"progressRemainingColor", @"progressColor", @"progress", nil]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - [self setNeedsDisplay]; -} - -@end diff --git a/JSONModelDemo_iOS/MasterViewController.h b/JSONModelDemo_iOS/MasterViewController.h deleted file mode 100644 index 02ded327..00000000 --- a/JSONModelDemo_iOS/MasterViewController.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// MasterViewController.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface MasterViewController : UITableViewController -@end diff --git a/JSONModelDemo_iOS/MasterViewController.m b/JSONModelDemo_iOS/MasterViewController.m deleted file mode 100644 index 9f7c61d6..00000000 --- a/JSONModelDemo_iOS/MasterViewController.m +++ /dev/null @@ -1,95 +0,0 @@ -// -// MasterViewController.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "MasterViewController.h" - -#import "KivaViewController.h" -#import "GitHubViewController.h" -#import "StorageViewController.h" -#import "KivaViewControllerNetworking.h" - -#import "JSONModel+networking.h" - -@interface MasterViewController () { - NSMutableArray *_objects; -} -@end - -@implementation MasterViewController - --(void)viewDidAppear:(BOOL)animated -{ - -} - --(IBAction)actionLoadCall:(id)sender -{ - -} - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - self.title = @"Demos"; - _objects = [NSMutableArray arrayWithArray:@[@"Kiva.org demo", @"GitHub demo", @"Used for storage"]]; - } - return self; -} - -#pragma mark - Table View -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return _objects.count; -} - -// Customize the appearance of table view cells. -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - NSDate *object = _objects[indexPath.row]; - cell.textLabel.text = [object description]; - return cell; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - switch (indexPath.row) { - case 0:{ - KivaViewController* kiva = [[KivaViewController alloc] initWithNibName:@"KivaViewController" bundle:nil]; - [self.navigationController pushViewController:kiva animated:YES]; - }break; - - case 1:{ - GitHubViewController* gh = [[GitHubViewController alloc] initWithNibName:@"GitHubViewController" bundle:nil]; - [self.navigationController pushViewController:gh animated:YES]; - }break; - - case 2:{ - StorageViewController* sc = [[StorageViewController alloc] initWithNibName:@"StorageViewController" bundle:nil]; - [self.navigationController pushViewController:sc animated:YES]; - }break; - - default: - break; - } -} - -@end diff --git a/JSONModelDemo_iOS/MyDataModel.h b/JSONModelDemo_iOS/MyDataModel.h deleted file mode 100644 index df20623b..00000000 --- a/JSONModelDemo_iOS/MyDataModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// MyDataModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface MyDataModel : JSONModel - -@property (strong, nonatomic) NSString* content; -@property (assign, nonatomic) int timesSaved; - -@end diff --git a/JSONModelDemo_iOS/MyDataModel.m b/JSONModelDemo_iOS/MyDataModel.m deleted file mode 100644 index 781f889e..00000000 --- a/JSONModelDemo_iOS/MyDataModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// MyDataModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "MyDataModel.h" - -@implementation MyDataModel - -@end diff --git a/JSONModelDemo_iOS/StorageViewController.h b/JSONModelDemo_iOS/StorageViewController.h deleted file mode 100644 index 1e779100..00000000 --- a/JSONModelDemo_iOS/StorageViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// StorageViewController.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface StorageViewController : UIViewController - -@end diff --git a/JSONModelDemo_iOS/StorageViewController.m b/JSONModelDemo_iOS/StorageViewController.m deleted file mode 100644 index a586aa3f..00000000 --- a/JSONModelDemo_iOS/StorageViewController.m +++ /dev/null @@ -1,67 +0,0 @@ -// -// StorageViewController.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "StorageViewController.h" -#import "MyDataModel.h" - -@interface StorageViewController () -{ - IBOutlet UITextField* txtContent; - IBOutlet UILabel* lblTimes; - - NSString* filePath; - MyDataModel* data; -} - -@end - -@implementation StorageViewController - --(void)viewDidAppear:(BOOL)animated -{ - NSString* libraryDir = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory , NSUserDomainMask, YES)[0]; - filePath = [libraryDir stringByAppendingPathComponent:@"saved.plist"]; - - [self loadFromFile]; -} - --(void)loadFromFile -{ - //load from file - NSDictionary* object = [NSDictionary dictionaryWithContentsOfFile:filePath]; - - //initialize model with data - JSONModelError* initError; - data = [[MyDataModel alloc] initWithDictionary: object error:&initError]; - - if (!data) { - data = [[MyDataModel alloc] init]; - } - - //update the UI - lblTimes.text = [NSString stringWithFormat:@"Times saved: %i", data.timesSaved]; - txtContent.text = data.content; -} - --(IBAction)actionSave:(id)sender -{ - [txtContent resignFirstResponder]; - - //update model - data.timesSaved++; - data.content = txtContent.text; - - //update UI - lblTimes.text = [NSString stringWithFormat:@"Times saved: %i", data.timesSaved]; - - //save to disc - [[data toDictionary] writeToFile:filePath atomically:YES]; - NSLog(@"%@", [data toDictionary]); -} - -@end diff --git a/JSONModelDemo_iOS/StorageViewController.xib b/JSONModelDemo_iOS/StorageViewController.xib deleted file mode 100644 index 1cda668e..00000000 --- a/JSONModelDemo_iOS/StorageViewController.xib +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - This screen uses a JSONModel object to save data to the device's disc. The model persists the text that you can edit in the text box below + the number of times you saved to the file. - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_iOS/btnCheck.png b/JSONModelDemo_iOS/btnCheck.png deleted file mode 100644 index fbab71ddf26edc71549235bdbc128f5bb961aa45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1334 zcmV-61g$jY+W6wudC-twn-Z$TenplIjq)0*OLJLx(SGkjI0+5 zg>RsGYHI3nRi>%{stN%2u?sMpOrJ!HqTazUFWu(x!icxtKJ>0KHdY1AXaN4$1ei?5 zV)0gS5l(P0oFIS+0mouwF~Wj^f)8NGGk}Po0%{C3q)w+3LX|)&S4(a*8Ve*6iJk+b zG+><^0tcWcf$iIu8h1jg{Sb!k;08{vt*MD3V`JN+L{Wc2^Ax}im|ZD(Q&ZEMGO6S& z2Qe-dRQ3PbqC}!Zcs#qrff%{G8UiO-p-|+Nm6e@?uAP8QDs7U9*@r_V5JDO z1F&+s&Y+{CW4fxUsvm`gpMaK@i@GgaHXlQSxqys}jQzz$Mdk2QT;TV+WY3Mpy(CF~ z6~^ZaACdtv7YSLg9`#@E>YDxR%$c6~`T6TGt!Hry&Yw5GER)JAI1nflShnCFh2`bt z<-p+SYJ=e;=okXHg9O|TQbD%z`FzO|w|&|-Zr+$H*Xw_Axm-U$^Ls!a0XAa^@$qqF zEZG{y50l^=Q0of_proghc7d%zi^b9dlcq5CyMof(+$@vF#I%PC!gq24=K=@-dZ)#5 z+XY;AW@cut!nE%IcK|cA13>(WKp=RER*F+Tve_pWKde@(U2}8OCbRid=&%7ETxk9> zS|*cSij0WZ6ZBhQUSYNN%$Jsy_D)SrbucUc6_KM6v;%2rFaDmmE0I)g-=4gnoCzM- z4z|tXaXGv9?0#-`c4oe}x3~ZF=~JGR=Tk0-M51i}RpWjR^!4?-OG--m#>dBh1j26t zR=_m7F*rJma2)5M99^L=H{|9X$f4*c@b`dS;P}LZtG4#+$H$HyNl+@4YAQsc7#J9I zzkl-NU5CSQl_9qPCViuX6@W2O9#>geS$!Zk=haYWq}%QGK)?~pi9}^+c;tRzVc~$y zW<$1L0o-E9y}s}A6~Ky!HyEmGUdztjj|Cy1f}|BZVB7z)*&b-L+QFfrVMN{r_!%$} zNFGc8D?PV|13uyN&qV&!E83wLq<$nX2FYwK$Lqm z8tq7TcXubV@-D#N08gk48cF~yg3IM5f`~8D)6-M^BF%?o!40MYXIk? z$X9wN+ysZy-b*blx9p>%lzsFbjZx+~IB?gSot=eF&StraUcNmx z=AgzLb{c<-jCcv)QivTr%Tow5$Z^Z(!So}g;+ZC(R>7?xTQEz^J{ypfw3^)o< zu9|!e*K&bWDotx|Z|~9R-b07U*MQ@IC)Py1f*=f5A^=H%WG1JhB!gn${(1?Zoj|uL sbRsh8bxq{!_Rr{%4*akGoc=4o04zDvJ>92s{Qv*}07*qoM6N<$f`j#UtN;K2 diff --git a/JSONModelDemo_iOS/btnCheck@2x.png b/JSONModelDemo_iOS/btnCheck@2x.png deleted file mode 100644 index 1071f3eb270736fadaf1aeb3aeb67edfcf7251f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3252 zcmV;l3`_HgP)9Rv8Fx}p$0W=O;WYuQ9c&=eGWAYiKjR50k#o|5+1oW^Pz zTaBqP%0m{SIg%Ps5H=#>I=y%1zcY7-4o zZvJ^jz%v4#5zx&)Kd>l(cJJO5mXea<1De21IbzXt z3j#K7*x=*q<5#57XxyD$^bv7!algmi?mzwu{Kz)Vhq&}YW z@$(xV8yovueA3sJKj^9i@cZ}gOYY@rc$?#4(es=lG9gl9%;?dxX3m^B&6YptiUgp& zd$X6iySc|BjRqs(IfONi$R8p{+{Yuy3V7VcO?)386&blYC@5$o{(et(DReagP*zsv zFN~gEDFh@EogDxtKt(b*vCZRuc(D(O_w+OvdM{qQcr*SANs^o>30;W*l#!7!$;;@K zrGP~slnCj_Aq3}Ao977`Jm>4%GarTkl$(>gaP_LyZouA?BoFP{ zxpT~O0|p$^Xf--w-XduB4=GE502T?r=VF`VWpZA6Y3%G7GiFT2&+J3|0pDTM%glVE zuZR2Y(9qDojv6(}6Zh%cOEc~DNl#B7?Ca-y9D{d6vT0Kb;6?DnOO`AlxwiL{AYtp)tv&$*2mV8+)wvN! zJOH6u7Aqdn=}F*u(I1GgrF-aoU^S)+Q+?vvq|flzh!UOKC1B~2B|ZK9{R?$ktw9<9 zaYmzY?D}=sAt7O1H^n4~>c z7{DB}1Z1ZO_aWuHva<5ts#UAX&1Unr`0+$;Vrgt^(kSmh?&3au`plugiJ9>{buv6R zeE9IG$;rt{P<8dN7YXy`&C`u}VGK@jox)k|vchQqq=uS04@-j~14(^VRaMO^S0V z@8f0-mL}!q&SiPWjvdQ&bu~mw!>Q*cZ~~bRVrM|^5~Q{OXW~VH`>wkBeoRbEd3AMl z1@5_k<#Qn5I+iD{YWwDmwTb}7a)7ZB~IR3Sx4)zvkYWy_XTVDLoqUt#$I%VjK81Uwc? z3j!h|XF3E2kIZv$aPXEH=M+|v^=zc;cv7!Ue)YY(jg1Yd+qUK4&RbZTACd%ASXdbE z;o-5IA``6>MkKR9fKY79`bVltU%GnxcAX_QHm(wze+6j#b2WH!x0(Qc?%cUa27~L% zbPxfIUEx@;QVlM<#XcU#*BP(R*nmB3ZT8;1$8l#Zmirwf0p;f(!YOXQWcFsVmIYbs z3gM6hGgJu7AUxM_`}TvSOP76p?b@{p0DT^g#O%L^dBOY@AAkJ%h68Zd2o)%suZMJb35?KCJ_$+x+_Bg8XS-Ui}Z_nnfqDPZXGTOIILTgiH%G zu$O3Li zBOc$@Jmjzy8y9CTDK6O~h7p=WlaNOe4GrznV6)W7#RadCGA!{3A%}>eXV2a-ixy>0 z7(YG)%1>L)79BctFxX#AakY-p7)t08$EI_k;~_}FG7&_TjbEg!A&EBCSx+d<;+ea#eYbEM^78q27BaKnYeMMy8{mbGY>VFm z&s~|Eyd^ikpx{edbnr}SDQAMrQKMnna^WHM8I7KUQ&Us2yo|;HgoOC`<%W=u=l|@4 z(`)uQyp`s8Yi+B9S_i?kHgWB@Cr+Fo;7cLSlQsV}mfIbPLRL`#(pi$$4#e`KHEUMC z6BQX5B-rryG!0?n15)`br4w+p=X#bxuyM8hiyU=+KZ`-!5CMzqOft(Y2HJFg_{?@JYr@Z#sAfzr#R5>EDY1#r) z)F`>7`g-f(UirrEjNP}=($XpT&q4F$0REwCkk$xbNpJ@eLetW=&wu5WNdvhS0BkP- zHINqfvpJUh9f7Gdl_P2WY2UuO&6|@;aPtai{yc#1bOF{D0W1l9sU_^%xpU#9NfZ6# zLP#JXN-0k`SPsaBeF#udBCAAF`T{}CCj^{ZE}DF(nS_(v+i+ao|t!VsNK zH!3|neg4FW6MfaDD=^x!9UZI}h`^YFdI_*kIDY(i!}8_vB>?yfF#R%n>_2pb07`-* zwFFE;*q%KZ3&xEb_ne|zsd6LMV7+?f+EyG#(K_8vV68+29UuNu^pQC>Hn!Aav0MT0 z=VAR*@DCnozrBM5uq1d;OW2#8wQy`igtuh9l5Mm4RiXslORz4o@!(MKQGz(8_!hXo zpZNIBqL`QxoadK=vpWZx|IQxZAC>?$2}AXIeOPvO_JS8*{BeJ^-*3N&Zaa%Oefo6c zym|8ocoTppW?ur}@7e==X9%Dq=qU*}r49dJ|NaHx;o(Ns^@CDvrG--7z}YUP$%V7$ z&fT3m_pQ>##zq!=F@SHh7x>N+z>?5UBEcy3l}alz4>Nz zso88cF`JkK{Qv9?{!s`}lMv`?FuahH`@#Is&`=Knvcq=sTS4}ZqQzYL>his)sHoE0 z_4RZI_Z$QMj=jM@Dgl%PCz%9S*U<+K z;Uz|6TQ&XDB!Gh&Uk~rv0u2Vk=z@a$1;HbO-H~b)&>c0{)|YqMuYP^C`Hh(~%d4uY zOi;_8g)ObB#|hqE1lT0u$dL~h4j(?kt?e=gBdof9f9lj}<=3x^+t**hn*WNvxOkl4 z?fC-<3uub0)#Cd4`hU-w6`gtca`7!*eyPdqCczHSjT<*CQBkuhFnIdn;=HZB`>sGh z3leVLym=-%Iy$Sgw4|2)Oof%Y+FA>~UTHF!Z0+4Y5%7|6+W*JWWI4FNUcz)w&wg9} z_35Xz)z#k#L~5{Hxl(Eg4h|;k{cl)Ou#i__Be3*pWe2%S5x|l_D##h$-rj#WbLO+U znwn~%veIM;3kxG!CofLO>-D)<$gj70KXLGnkpM~pc_%=2l3w@q^+`Q->g3Jw1qB+IKeLQLC^l{ mY&ZWrBj6bU-Td=^0R{kiNRO)@qT$B?0000(y diff --git a/JSONModelDemo_iOS/en.lproj/InfoPlist.strings b/JSONModelDemo_iOS/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/JSONModelDemo_iOS/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/JSONModelDemo_iOS/en.lproj/MasterViewController.xib b/JSONModelDemo_iOS/en.lproj/MasterViewController.xib deleted file mode 100644 index e8648983..00000000 --- a/JSONModelDemo_iOS/en.lproj/MasterViewController.xib +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_iOS/main.m b/JSONModelDemo_iOS/main.m deleted file mode 100644 index b332e8bf..00000000 --- a/JSONModelDemo_iOS/main.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// main.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -#import "AppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj b/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj deleted file mode 100644 index e45cd2d4..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS.xcodeproj/project.pbxproj +++ /dev/null @@ -1,387 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1ACA08E81C33F8FD00234DA6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08E71C33F8FD00234DA6 /* main.m */; }; - 1ACA08EB1C33F8FD00234DA6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08EA1C33F8FD00234DA6 /* AppDelegate.m */; }; - 1ACA08EE1C33F8FD00234DA6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08ED1C33F8FD00234DA6 /* ViewController.m */; }; - 1ACA08F11C33F8FD00234DA6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08EF1C33F8FD00234DA6 /* Main.storyboard */; }; - 1ACA08F31C33F8FD00234DA6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08F21C33F8FD00234DA6 /* Assets.xcassets */; }; - 1ACA09151C33F91900234DA6 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08FB1C33F91900234DA6 /* Info.plist */; }; - 1ACA09161C33F91900234DA6 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08FE1C33F91900234DA6 /* JSONModel.m */; }; - 1ACA09181C33F91900234DA6 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09021C33F91900234DA6 /* JSONModelClassProperty.m */; }; - 1ACA09191C33F91900234DA6 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09041C33F91900234DA6 /* JSONModelError.m */; }; - 1ACA091B1C33F91900234DA6 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA090B1C33F91900234DA6 /* JSONAPI.m */; }; - 1ACA091C1C33F91900234DA6 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA090D1C33F91900234DA6 /* JSONHTTPClient.m */; }; - 1ACA091D1C33F91900234DA6 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA090F1C33F91900234DA6 /* JSONModel+networking.m */; }; - 1ACA091E1C33F91900234DA6 /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09121C33F91900234DA6 /* JSONKeyMapper.m */; }; - 1ACA091F1C33F91900234DA6 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA09141C33F91900234DA6 /* JSONValueTransformer.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1ACA08E31C33F8FD00234DA6 /* JSONModelDemo_tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JSONModelDemo_tvOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1ACA08E71C33F8FD00234DA6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 1ACA08E91C33F8FD00234DA6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1ACA08EA1C33F8FD00234DA6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1ACA08EC1C33F8FD00234DA6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 1ACA08ED1C33F8FD00234DA6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 1ACA08F01C33F8FD00234DA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 1ACA08F21C33F8FD00234DA6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 1ACA08F41C33F8FD00234DA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1ACA08FB1C33F91900234DA6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1ACA08FD1C33F91900234DA6 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; }; - 1ACA08FE1C33F91900234DA6 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.m; sourceTree = ""; }; - 1ACA09011C33F91900234DA6 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; }; - 1ACA09021C33F91900234DA6 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; }; - 1ACA09031C33F91900234DA6 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; }; - 1ACA09041C33F91900234DA6 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; }; - 1ACA09081C33F91900234DA6 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelLib.h; sourceTree = ""; }; - 1ACA090A1C33F91900234DA6 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; }; - 1ACA090B1C33F91900234DA6 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; }; - 1ACA090C1C33F91900234DA6 /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONHTTPClient.h; sourceTree = ""; }; - 1ACA090D1C33F91900234DA6 /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONHTTPClient.m; sourceTree = ""; }; - 1ACA090E1C33F91900234DA6 /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONModel+networking.h"; sourceTree = ""; }; - 1ACA090F1C33F91900234DA6 /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONModel+networking.m"; sourceTree = ""; }; - 1ACA09111C33F91900234DA6 /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKeyMapper.h; sourceTree = ""; }; - 1ACA09121C33F91900234DA6 /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKeyMapper.m; sourceTree = ""; }; - 1ACA09131C33F91900234DA6 /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONValueTransformer.h; sourceTree = ""; }; - 1ACA09141C33F91900234DA6 /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONValueTransformer.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1ACA08E01C33F8FD00234DA6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1ACA08DA1C33F8FD00234DA6 = { - isa = PBXGroup; - children = ( - 1ACA08FA1C33F91900234DA6 /* JSONModel */, - 1ACA08E51C33F8FD00234DA6 /* JSONModelDemo_tvOS */, - 1ACA08E41C33F8FD00234DA6 /* Products */, - ); - indentWidth = 4; - sourceTree = ""; - tabWidth = 4; - usesTabs = 0; - }; - 1ACA08E41C33F8FD00234DA6 /* Products */ = { - isa = PBXGroup; - children = ( - 1ACA08E31C33F8FD00234DA6 /* JSONModelDemo_tvOS.app */, - ); - name = Products; - sourceTree = ""; - }; - 1ACA08E51C33F8FD00234DA6 /* JSONModelDemo_tvOS */ = { - isa = PBXGroup; - children = ( - 1ACA08E91C33F8FD00234DA6 /* AppDelegate.h */, - 1ACA08EA1C33F8FD00234DA6 /* AppDelegate.m */, - 1ACA08EC1C33F8FD00234DA6 /* ViewController.h */, - 1ACA08ED1C33F8FD00234DA6 /* ViewController.m */, - 1ACA08EF1C33F8FD00234DA6 /* Main.storyboard */, - 1ACA08F21C33F8FD00234DA6 /* Assets.xcassets */, - 1ACA08F41C33F8FD00234DA6 /* Info.plist */, - 1ACA08E61C33F8FD00234DA6 /* Supporting Files */, - ); - path = JSONModelDemo_tvOS; - sourceTree = ""; - }; - 1ACA08E61C33F8FD00234DA6 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 1ACA08E71C33F8FD00234DA6 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 1ACA08FA1C33F91900234DA6 /* JSONModel */ = { - isa = PBXGroup; - children = ( - 1ACA08FB1C33F91900234DA6 /* Info.plist */, - 1ACA08FC1C33F91900234DA6 /* JSONModel */, - 1ACA09081C33F91900234DA6 /* JSONModelLib.h */, - 1ACA09091C33F91900234DA6 /* JSONModelNetworking */, - 1ACA09101C33F91900234DA6 /* JSONModelTransformations */, - ); - name = JSONModel; - path = ../JSONModel; - sourceTree = ""; - }; - 1ACA08FC1C33F91900234DA6 /* JSONModel */ = { - isa = PBXGroup; - children = ( - 1ACA08FD1C33F91900234DA6 /* JSONModel.h */, - 1ACA08FE1C33F91900234DA6 /* JSONModel.m */, - 1ACA09011C33F91900234DA6 /* JSONModelClassProperty.h */, - 1ACA09021C33F91900234DA6 /* JSONModelClassProperty.m */, - 1ACA09031C33F91900234DA6 /* JSONModelError.h */, - 1ACA09041C33F91900234DA6 /* JSONModelError.m */, - ); - path = JSONModel; - sourceTree = ""; - }; - 1ACA09091C33F91900234DA6 /* JSONModelNetworking */ = { - isa = PBXGroup; - children = ( - 1ACA090A1C33F91900234DA6 /* JSONAPI.h */, - 1ACA090B1C33F91900234DA6 /* JSONAPI.m */, - 1ACA090C1C33F91900234DA6 /* JSONHTTPClient.h */, - 1ACA090D1C33F91900234DA6 /* JSONHTTPClient.m */, - 1ACA090E1C33F91900234DA6 /* JSONModel+networking.h */, - 1ACA090F1C33F91900234DA6 /* JSONModel+networking.m */, - ); - path = JSONModelNetworking; - sourceTree = ""; - }; - 1ACA09101C33F91900234DA6 /* JSONModelTransformations */ = { - isa = PBXGroup; - children = ( - 1ACA09111C33F91900234DA6 /* JSONKeyMapper.h */, - 1ACA09121C33F91900234DA6 /* JSONKeyMapper.m */, - 1ACA09131C33F91900234DA6 /* JSONValueTransformer.h */, - 1ACA09141C33F91900234DA6 /* JSONValueTransformer.m */, - ); - path = JSONModelTransformations; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1ACA08E21C33F8FD00234DA6 /* JSONModelDemo_tvOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1ACA08F71C33F8FD00234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_tvOS" */; - buildPhases = ( - 1ACA08DF1C33F8FD00234DA6 /* Sources */, - 1ACA08E01C33F8FD00234DA6 /* Frameworks */, - 1ACA08E11C33F8FD00234DA6 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = JSONModelDemo_tvOS; - productName = JSONModelDemo_tvOS; - productReference = 1ACA08E31C33F8FD00234DA6 /* JSONModelDemo_tvOS.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1ACA08DB1C33F8FD00234DA6 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = Cuvva; - TargetAttributes = { - 1ACA08E21C33F8FD00234DA6 = { - CreatedOnToolsVersion = 7.2; - }; - }; - }; - buildConfigurationList = 1ACA08DE1C33F8FD00234DA6 /* Build configuration list for PBXProject "JSONModelDemo_tvOS" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 1ACA08DA1C33F8FD00234DA6; - productRefGroup = 1ACA08E41C33F8FD00234DA6 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1ACA08E21C33F8FD00234DA6 /* JSONModelDemo_tvOS */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1ACA08E11C33F8FD00234DA6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1ACA08F31C33F8FD00234DA6 /* Assets.xcassets in Resources */, - 1ACA08F11C33F8FD00234DA6 /* Main.storyboard in Resources */, - 1ACA09151C33F91900234DA6 /* Info.plist in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1ACA08DF1C33F8FD00234DA6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1ACA091C1C33F91900234DA6 /* JSONHTTPClient.m in Sources */, - 1ACA09191C33F91900234DA6 /* JSONModelError.m in Sources */, - 1ACA091B1C33F91900234DA6 /* JSONAPI.m in Sources */, - 1ACA091F1C33F91900234DA6 /* JSONValueTransformer.m in Sources */, - 1ACA08EE1C33F8FD00234DA6 /* ViewController.m in Sources */, - 1ACA09161C33F91900234DA6 /* JSONModel.m in Sources */, - 1ACA091E1C33F91900234DA6 /* JSONKeyMapper.m in Sources */, - 1ACA091D1C33F91900234DA6 /* JSONModel+networking.m in Sources */, - 1ACA08EB1C33F8FD00234DA6 /* AppDelegate.m in Sources */, - 1ACA08E81C33F8FD00234DA6 /* main.m in Sources */, - 1ACA09181C33F91900234DA6 /* JSONModelClassProperty.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 1ACA08EF1C33F8FD00234DA6 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1ACA08F01C33F8FD00234DA6 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 1ACA08F51C33F8FD00234DA6 /* Debug */ = { - 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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.1; - }; - name = Debug; - }; - 1ACA08F61C33F8FD00234DA6 /* 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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.1; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 1ACA08F81C33F8FD00234DA6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - INFOPLIST_FILE = JSONModelDemo_tvOS/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1ACA08F91C33F8FD00234DA6 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - INFOPLIST_FILE = JSONModelDemo_tvOS/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1ACA08DE1C33F8FD00234DA6 /* Build configuration list for PBXProject "JSONModelDemo_tvOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1ACA08F51C33F8FD00234DA6 /* Debug */, - 1ACA08F61C33F8FD00234DA6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1ACA08F71C33F8FD00234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_tvOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1ACA08F81C33F8FD00234DA6 /* Debug */, - 1ACA08F91C33F8FD00234DA6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1ACA08DB1C33F8FD00234DA6 /* Project object */; -} diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.h b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.h deleted file mode 100644 index 733ff25a..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// AppDelegate.h -// JSONModelDemo_tvOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -@import UIKit; - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.m b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.m deleted file mode 100644 index f84412b2..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/AppDelegate.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// AppDelegate.m -// JSONModelDemo_tvOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -#import "AppDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - -@end diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959f..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json deleted file mode 100644 index 8bf75d9f..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "layers" : [ - { - "filename" : "Front.imagestacklayer" - }, - { - "filename" : "Middle.imagestacklayer" - }, - { - "filename" : "Back.imagestacklayer" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959f..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959f..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959f..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json deleted file mode 100644 index 8bf75d9f..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "layers" : [ - { - "filename" : "Front.imagestacklayer" - }, - { - "filename" : "Middle.imagestacklayer" - }, - { - "filename" : "Back.imagestacklayer" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959f..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959f..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json deleted file mode 100644 index 6a3dcfa5..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "assets" : [ - { - "size" : "1280x768", - "idiom" : "tv", - "filename" : "App Icon - Large.imagestack", - "role" : "primary-app-icon" - }, - { - "size" : "400x240", - "idiom" : "tv", - "filename" : "App Icon - Small.imagestack", - "role" : "primary-app-icon" - }, - { - "size" : "1920x720", - "idiom" : "tv", - "filename" : "Top Shelf Image.imageset", - "role" : "top-shelf-image" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json deleted file mode 100644 index 0564959f..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index 29d94c78..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "orientation" : "landscape", - "idiom" : "tv", - "extent" : "full-screen", - "minimum-system-version" : "9.0", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Base.lproj/Main.storyboard b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Base.lproj/Main.storyboard deleted file mode 100644 index f1d0070b..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Info.plist b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Info.plist deleted file mode 100644 index 4f338601..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - arm64 - - - diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.h b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.h deleted file mode 100644 index d025b2b5..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ViewController.h -// JSONModelDemo_tvOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -@import UIKit; - -@interface ViewController : UIViewController - -@end diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.m b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.m deleted file mode 100644 index 4d5951d1..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/ViewController.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// ViewController.m -// JSONModelDemo_tvOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -#import "ViewController.h" - -@interface ViewController () - -@end - -@implementation ViewController - -@end diff --git a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m b/JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m deleted file mode 100644 index 3f2eb561..00000000 --- a/JSONModelDemo_tvOS/JSONModelDemo_tvOS/main.m +++ /dev/null @@ -1,20 +0,0 @@ -// -// main.m -// JSONModelDemo_tvOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -@import UIKit; - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) -{ - @autoreleasepool - { - Class delegate = [AppDelegate class]; - return UIApplicationMain(argc, argv, nil, NSStringFromClass(delegate)); - } -} diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index dd221ba5..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "images" : [ - { - "size" : "24x24", - "idiom" : "watch", - "scale" : "2x", - "role" : "notificationCenter", - "subtype" : "38mm" - }, - { - "size" : "27.5x27.5", - "idiom" : "watch", - "scale" : "2x", - "role" : "notificationCenter", - "subtype" : "42mm" - }, - { - "size" : "29x29", - "idiom" : "watch", - "role" : "companionSettings", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "watch", - "role" : "companionSettings", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "watch", - "scale" : "2x", - "role" : "appLauncher", - "subtype" : "38mm" - }, - { - "size" : "86x86", - "idiom" : "watch", - "scale" : "2x", - "role" : "quickLook", - "subtype" : "38mm" - }, - { - "size" : "98x98", - "idiom" : "watch", - "scale" : "2x", - "role" : "quickLook", - "subtype" : "42mm" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Base.lproj/Interface.storyboard b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Base.lproj/Interface.storyboard deleted file mode 100644 index d9fe0b13..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Base.lproj/Interface.storyboard +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Info.plist b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Info.plist deleted file mode 100644 index a48bcf9e..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit App/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - JSONModelDemo_watchOS WatchKit App - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - - WKCompanionAppBundleIdentifier - co.cuvva.JSONModelDemo-watchOS - WKWatchKitApp - - - diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.h b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.h deleted file mode 100644 index df52dc63..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ExtensionDelegate.h -// JSONModelDemo_watchOS WatchKit Extension -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -@import WatchKit; - -@interface ExtensionDelegate : NSObject - -@end diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.m deleted file mode 100644 index b5faae57..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/ExtensionDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// ExtensionDelegate.m -// JSONModelDemo_watchOS WatchKit Extension -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -#import "ExtensionDelegate.h" - -@implementation ExtensionDelegate - -@end diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/Info.plist b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/Info.plist deleted file mode 100644 index 260a9808..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - JSONModelDemo_watchOS WatchKit Extension - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - XPC! - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSExtension - - NSExtensionAttributes - - WKAppBundleIdentifier - co.cuvva.JSONModelDemo-watchOS.watchkitapp - - NSExtensionPointIdentifier - com.apple.watchkit - - RemoteInterfacePrincipalClass - InterfaceController - WKExtensionDelegateClassName - ExtensionDelegate - - diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.h b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.h deleted file mode 100644 index f50623db..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// InterfaceController.h -// JSONModelDemo_watchOS WatchKit Extension -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -@import WatchKit; - -@interface InterfaceController : WKInterfaceController - -@end diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.m deleted file mode 100644 index 9d82d99a..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS WatchKit Extension/InterfaceController.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// InterfaceController.m -// JSONModelDemo_watchOS WatchKit Extension -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -#import "InterfaceController.h" - -@interface InterfaceController () - -@end - -@implementation InterfaceController - -@end diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj b/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj deleted file mode 100644 index ab0d8330..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS.xcodeproj/project.pbxproj +++ /dev/null @@ -1,666 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1ACA086B1C33F84500234DA6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA086A1C33F84500234DA6 /* main.m */; }; - 1ACA086E1C33F84500234DA6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA086D1C33F84500234DA6 /* AppDelegate.m */; }; - 1ACA08711C33F84500234DA6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08701C33F84500234DA6 /* ViewController.m */; }; - 1ACA08741C33F84500234DA6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08721C33F84500234DA6 /* Main.storyboard */; }; - 1ACA08761C33F84500234DA6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08751C33F84500234DA6 /* Assets.xcassets */; }; - 1ACA08791C33F84500234DA6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08771C33F84500234DA6 /* LaunchScreen.storyboard */; }; - 1ACA087E1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 1ACA087D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app */; }; - 1ACA08841C33F84600234DA6 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08821C33F84600234DA6 /* Interface.storyboard */; }; - 1ACA08861C33F84600234DA6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1ACA08851C33F84600234DA6 /* Assets.xcassets */; }; - 1ACA088D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 1ACA088C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 1ACA08931C33F84600234DA6 /* InterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08921C33F84600234DA6 /* InterfaceController.m */; }; - 1ACA08961C33F84600234DA6 /* ExtensionDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08951C33F84600234DA6 /* ExtensionDelegate.m */; }; - 1ACA08C61C33F8CA00234DA6 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */; }; - 1ACA08C71C33F8CA00234DA6 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */; }; - 1ACA08CA1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */; }; - 1ACA08CB1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */; }; - 1ACA08CC1C33F8CA00234DA6 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */; }; - 1ACA08CD1C33F8CA00234DA6 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */; }; - 1ACA08D01C33F8CA00234DA6 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */; }; - 1ACA08D11C33F8CA00234DA6 /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */; }; - 1ACA08D21C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BC1C33F8CA00234DA6 /* JSONHTTPClient.m */; }; - 1ACA08D31C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BC1C33F8CA00234DA6 /* JSONHTTPClient.m */; }; - 1ACA08D41C33F8CA00234DA6 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BE1C33F8CA00234DA6 /* JSONModel+networking.m */; }; - 1ACA08D51C33F8CA00234DA6 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08BE1C33F8CA00234DA6 /* JSONModel+networking.m */; }; - 1ACA08D61C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08C11C33F8CA00234DA6 /* JSONKeyMapper.m */; }; - 1ACA08D71C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08C11C33F8CA00234DA6 /* JSONKeyMapper.m */; }; - 1ACA08D81C33F8CA00234DA6 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08C31C33F8CA00234DA6 /* JSONValueTransformer.m */; }; - 1ACA08D91C33F8CA00234DA6 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ACA08C31C33F8CA00234DA6 /* JSONValueTransformer.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1ACA087F1C33F84600234DA6 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1ACA085E1C33F84500234DA6 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1ACA087C1C33F84600234DA6; - remoteInfo = "JSONModelDemo_watchOS WatchKit App"; - }; - 1ACA088E1C33F84600234DA6 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1ACA085E1C33F84500234DA6 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1ACA088B1C33F84600234DA6; - remoteInfo = "JSONModelDemo_watchOS WatchKit Extension"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 1ACA089F1C33F84600234DA6 /* Embed App Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 1ACA088D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex in Embed App Extensions */, - ); - name = "Embed App Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; - 1ACA08A31C33F84600234DA6 /* Embed Watch Content */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; - dstSubfolderSpec = 16; - files = ( - 1ACA087E1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app in Embed Watch Content */, - ); - name = "Embed Watch Content"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1ACA08661C33F84500234DA6 /* JSONModelDemo_watchOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JSONModelDemo_watchOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1ACA086A1C33F84500234DA6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 1ACA086C1C33F84500234DA6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1ACA086D1C33F84500234DA6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1ACA086F1C33F84500234DA6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 1ACA08701C33F84500234DA6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 1ACA08731C33F84500234DA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 1ACA08751C33F84500234DA6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 1ACA08781C33F84500234DA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 1ACA087A1C33F84500234DA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1ACA087D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "JSONModelDemo_watchOS WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1ACA08831C33F84600234DA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; - 1ACA08851C33F84600234DA6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 1ACA08871C33F84600234DA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1ACA088C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "JSONModelDemo_watchOS WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1ACA08911C33F84600234DA6 /* InterfaceController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InterfaceController.h; sourceTree = ""; }; - 1ACA08921C33F84600234DA6 /* InterfaceController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InterfaceController.m; sourceTree = ""; }; - 1ACA08941C33F84600234DA6 /* ExtensionDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtensionDelegate.h; sourceTree = ""; }; - 1ACA08951C33F84600234DA6 /* ExtensionDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExtensionDelegate.m; sourceTree = ""; }; - 1ACA08991C33F84600234DA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1ACA08AC1C33F8CA00234DA6 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; }; - 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.m; sourceTree = ""; }; - 1ACA08B01C33F8CA00234DA6 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelClassProperty.h; sourceTree = ""; }; - 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; }; - 1ACA08B21C33F8CA00234DA6 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; }; - 1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; }; - 1ACA08B71C33F8CA00234DA6 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelLib.h; sourceTree = ""; }; - 1ACA08B91C33F8CA00234DA6 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; }; - 1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; }; - 1ACA08BB1C33F8CA00234DA6 /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONHTTPClient.h; sourceTree = ""; }; - 1ACA08BC1C33F8CA00234DA6 /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONHTTPClient.m; sourceTree = ""; }; - 1ACA08BD1C33F8CA00234DA6 /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONModel+networking.h"; sourceTree = ""; }; - 1ACA08BE1C33F8CA00234DA6 /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONModel+networking.m"; sourceTree = ""; }; - 1ACA08C01C33F8CA00234DA6 /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKeyMapper.h; sourceTree = ""; }; - 1ACA08C11C33F8CA00234DA6 /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKeyMapper.m; sourceTree = ""; }; - 1ACA08C21C33F8CA00234DA6 /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONValueTransformer.h; sourceTree = ""; }; - 1ACA08C31C33F8CA00234DA6 /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONValueTransformer.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1ACA08631C33F84500234DA6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1ACA08891C33F84600234DA6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1ACA085D1C33F84500234DA6 = { - isa = PBXGroup; - children = ( - 1ACA08A91C33F8CA00234DA6 /* JSONModel */, - 1ACA08681C33F84500234DA6 /* JSONModelDemo_watchOS */, - 1ACA08811C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */, - 1ACA08901C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */, - 1ACA08671C33F84500234DA6 /* Products */, - ); - indentWidth = 4; - sourceTree = ""; - tabWidth = 4; - usesTabs = 0; - }; - 1ACA08671C33F84500234DA6 /* Products */ = { - isa = PBXGroup; - children = ( - 1ACA08661C33F84500234DA6 /* JSONModelDemo_watchOS.app */, - 1ACA087D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app */, - 1ACA088C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex */, - ); - name = Products; - sourceTree = ""; - }; - 1ACA08681C33F84500234DA6 /* JSONModelDemo_watchOS */ = { - isa = PBXGroup; - children = ( - 1ACA086C1C33F84500234DA6 /* AppDelegate.h */, - 1ACA086D1C33F84500234DA6 /* AppDelegate.m */, - 1ACA086F1C33F84500234DA6 /* ViewController.h */, - 1ACA08701C33F84500234DA6 /* ViewController.m */, - 1ACA08721C33F84500234DA6 /* Main.storyboard */, - 1ACA08751C33F84500234DA6 /* Assets.xcassets */, - 1ACA08771C33F84500234DA6 /* LaunchScreen.storyboard */, - 1ACA087A1C33F84500234DA6 /* Info.plist */, - 1ACA08691C33F84500234DA6 /* Supporting Files */, - ); - path = JSONModelDemo_watchOS; - sourceTree = ""; - }; - 1ACA08691C33F84500234DA6 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 1ACA086A1C33F84500234DA6 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 1ACA08811C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */ = { - isa = PBXGroup; - children = ( - 1ACA08821C33F84600234DA6 /* Interface.storyboard */, - 1ACA08851C33F84600234DA6 /* Assets.xcassets */, - 1ACA08871C33F84600234DA6 /* Info.plist */, - ); - path = "JSONModelDemo_watchOS WatchKit App"; - sourceTree = ""; - }; - 1ACA08901C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */ = { - isa = PBXGroup; - children = ( - 1ACA08911C33F84600234DA6 /* InterfaceController.h */, - 1ACA08921C33F84600234DA6 /* InterfaceController.m */, - 1ACA08941C33F84600234DA6 /* ExtensionDelegate.h */, - 1ACA08951C33F84600234DA6 /* ExtensionDelegate.m */, - 1ACA08991C33F84600234DA6 /* Info.plist */, - ); - path = "JSONModelDemo_watchOS WatchKit Extension"; - sourceTree = ""; - }; - 1ACA08A91C33F8CA00234DA6 /* JSONModel */ = { - isa = PBXGroup; - children = ( - 1ACA08AB1C33F8CA00234DA6 /* JSONModel */, - 1ACA08B71C33F8CA00234DA6 /* JSONModelLib.h */, - 1ACA08B81C33F8CA00234DA6 /* JSONModelNetworking */, - 1ACA08BF1C33F8CA00234DA6 /* JSONModelTransformations */, - ); - name = JSONModel; - path = ../JSONModel; - sourceTree = ""; - }; - 1ACA08AB1C33F8CA00234DA6 /* JSONModel */ = { - isa = PBXGroup; - children = ( - 1ACA08AC1C33F8CA00234DA6 /* JSONModel.h */, - 1ACA08AD1C33F8CA00234DA6 /* JSONModel.m */, - 1ACA08B01C33F8CA00234DA6 /* JSONModelClassProperty.h */, - 1ACA08B11C33F8CA00234DA6 /* JSONModelClassProperty.m */, - 1ACA08B21C33F8CA00234DA6 /* JSONModelError.h */, - 1ACA08B31C33F8CA00234DA6 /* JSONModelError.m */, - ); - path = JSONModel; - sourceTree = ""; - }; - 1ACA08B81C33F8CA00234DA6 /* JSONModelNetworking */ = { - isa = PBXGroup; - children = ( - 1ACA08B91C33F8CA00234DA6 /* JSONAPI.h */, - 1ACA08BA1C33F8CA00234DA6 /* JSONAPI.m */, - 1ACA08BB1C33F8CA00234DA6 /* JSONHTTPClient.h */, - 1ACA08BC1C33F8CA00234DA6 /* JSONHTTPClient.m */, - 1ACA08BD1C33F8CA00234DA6 /* JSONModel+networking.h */, - 1ACA08BE1C33F8CA00234DA6 /* JSONModel+networking.m */, - ); - path = JSONModelNetworking; - sourceTree = ""; - }; - 1ACA08BF1C33F8CA00234DA6 /* JSONModelTransformations */ = { - isa = PBXGroup; - children = ( - 1ACA08C01C33F8CA00234DA6 /* JSONKeyMapper.h */, - 1ACA08C11C33F8CA00234DA6 /* JSONKeyMapper.m */, - 1ACA08C21C33F8CA00234DA6 /* JSONValueTransformer.h */, - 1ACA08C31C33F8CA00234DA6 /* JSONValueTransformer.m */, - ); - path = JSONModelTransformations; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1ACA08651C33F84500234DA6 /* JSONModelDemo_watchOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1ACA08A41C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS" */; - buildPhases = ( - 1ACA08621C33F84500234DA6 /* Sources */, - 1ACA08631C33F84500234DA6 /* Frameworks */, - 1ACA08641C33F84500234DA6 /* Resources */, - 1ACA08A31C33F84600234DA6 /* Embed Watch Content */, - ); - buildRules = ( - ); - dependencies = ( - 1ACA08801C33F84600234DA6 /* PBXTargetDependency */, - ); - name = JSONModelDemo_watchOS; - productName = JSONModelDemo_watchOS; - productReference = 1ACA08661C33F84500234DA6 /* JSONModelDemo_watchOS.app */; - productType = "com.apple.product-type.application"; - }; - 1ACA087C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1ACA08A01C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS WatchKit App" */; - buildPhases = ( - 1ACA087B1C33F84600234DA6 /* Resources */, - 1ACA089F1C33F84600234DA6 /* Embed App Extensions */, - ); - buildRules = ( - ); - dependencies = ( - 1ACA088F1C33F84600234DA6 /* PBXTargetDependency */, - ); - name = "JSONModelDemo_watchOS WatchKit App"; - productName = "JSONModelDemo_watchOS WatchKit App"; - productReference = 1ACA087D1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App.app */; - productType = "com.apple.product-type.application.watchapp2"; - }; - 1ACA088B1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1ACA089C1C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS WatchKit Extension" */; - buildPhases = ( - 1ACA08881C33F84600234DA6 /* Sources */, - 1ACA08891C33F84600234DA6 /* Frameworks */, - 1ACA088A1C33F84600234DA6 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "JSONModelDemo_watchOS WatchKit Extension"; - productName = "JSONModelDemo_watchOS WatchKit Extension"; - productReference = 1ACA088C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension.appex */; - productType = "com.apple.product-type.watchkit2-extension"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1ACA085E1C33F84500234DA6 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = Cuvva; - TargetAttributes = { - 1ACA08651C33F84500234DA6 = { - CreatedOnToolsVersion = 7.2; - }; - 1ACA087C1C33F84600234DA6 = { - CreatedOnToolsVersion = 7.2; - }; - 1ACA088B1C33F84600234DA6 = { - CreatedOnToolsVersion = 7.2; - }; - }; - }; - buildConfigurationList = 1ACA08611C33F84500234DA6 /* Build configuration list for PBXProject "JSONModelDemo_watchOS" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 1ACA085D1C33F84500234DA6; - productRefGroup = 1ACA08671C33F84500234DA6 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1ACA08651C33F84500234DA6 /* JSONModelDemo_watchOS */, - 1ACA087C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */, - 1ACA088B1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1ACA08641C33F84500234DA6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1ACA08791C33F84500234DA6 /* LaunchScreen.storyboard in Resources */, - 1ACA08761C33F84500234DA6 /* Assets.xcassets in Resources */, - 1ACA08741C33F84500234DA6 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1ACA087B1C33F84600234DA6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1ACA08861C33F84600234DA6 /* Assets.xcassets in Resources */, - 1ACA08841C33F84600234DA6 /* Interface.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1ACA088A1C33F84600234DA6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1ACA08621C33F84500234DA6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1ACA08D21C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */, - 1ACA08CC1C33F8CA00234DA6 /* JSONModelError.m in Sources */, - 1ACA08D01C33F8CA00234DA6 /* JSONAPI.m in Sources */, - 1ACA08D81C33F8CA00234DA6 /* JSONValueTransformer.m in Sources */, - 1ACA08711C33F84500234DA6 /* ViewController.m in Sources */, - 1ACA08C61C33F8CA00234DA6 /* JSONModel.m in Sources */, - 1ACA08D61C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */, - 1ACA08D41C33F8CA00234DA6 /* JSONModel+networking.m in Sources */, - 1ACA086E1C33F84500234DA6 /* AppDelegate.m in Sources */, - 1ACA086B1C33F84500234DA6 /* main.m in Sources */, - 1ACA08CA1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1ACA08881C33F84600234DA6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1ACA08D31C33F8CA00234DA6 /* JSONHTTPClient.m in Sources */, - 1ACA08D11C33F8CA00234DA6 /* JSONAPI.m in Sources */, - 1ACA08CD1C33F8CA00234DA6 /* JSONModelError.m in Sources */, - 1ACA08D71C33F8CA00234DA6 /* JSONKeyMapper.m in Sources */, - 1ACA08C71C33F8CA00234DA6 /* JSONModel.m in Sources */, - 1ACA08CB1C33F8CA00234DA6 /* JSONModelClassProperty.m in Sources */, - 1ACA08D51C33F8CA00234DA6 /* JSONModel+networking.m in Sources */, - 1ACA08961C33F84600234DA6 /* ExtensionDelegate.m in Sources */, - 1ACA08931C33F84600234DA6 /* InterfaceController.m in Sources */, - 1ACA08D91C33F8CA00234DA6 /* JSONValueTransformer.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1ACA08801C33F84600234DA6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1ACA087C1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit App */; - targetProxy = 1ACA087F1C33F84600234DA6 /* PBXContainerItemProxy */; - }; - 1ACA088F1C33F84600234DA6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1ACA088B1C33F84600234DA6 /* JSONModelDemo_watchOS WatchKit Extension */; - targetProxy = 1ACA088E1C33F84600234DA6 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 1ACA08721C33F84500234DA6 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1ACA08731C33F84500234DA6 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 1ACA08771C33F84500234DA6 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1ACA08781C33F84500234DA6 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; - 1ACA08821C33F84600234DA6 /* Interface.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1ACA08831C33F84600234DA6 /* Base */, - ); - name = Interface.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 1ACA089A1C33F84600234DA6 /* Debug */ = { - 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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 1ACA089B1C33F84600234DA6 /* 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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 1ACA089D1C33F84600234DA6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = "JSONModelDemo_watchOS WatchKit Extension/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS.watchkitapp.watchkitextension"; - PRODUCT_NAME = "${TARGET_NAME}"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 2.1; - }; - name = Debug; - }; - 1ACA089E1C33F84600234DA6 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = "JSONModelDemo_watchOS WatchKit Extension/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS.watchkitapp.watchkitextension"; - PRODUCT_NAME = "${TARGET_NAME}"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 2.1; - }; - name = Release; - }; - 1ACA08A11C33F84600234DA6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - IBSC_MODULE = JSONModelDemo_watchOS_WatchKit_Extension; - INFOPLIST_FILE = "JSONModelDemo_watchOS WatchKit App/Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS.watchkitapp"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 2.1; - }; - name = Debug; - }; - 1ACA08A21C33F84600234DA6 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - IBSC_MODULE = JSONModelDemo_watchOS_WatchKit_Extension; - INFOPLIST_FILE = "JSONModelDemo_watchOS WatchKit App/Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS.watchkitapp"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 2.1; - }; - name = Release; - }; - 1ACA08A51C33F84600234DA6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = JSONModelDemo_watchOS/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1ACA08A61C33F84600234DA6 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = JSONModelDemo_watchOS/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "co.cuvva.JSONModelDemo-watchOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1ACA08611C33F84500234DA6 /* Build configuration list for PBXProject "JSONModelDemo_watchOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1ACA089A1C33F84600234DA6 /* Debug */, - 1ACA089B1C33F84600234DA6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1ACA089C1C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS WatchKit Extension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1ACA089D1C33F84600234DA6 /* Debug */, - 1ACA089E1C33F84600234DA6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; - 1ACA08A01C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS WatchKit App" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1ACA08A11C33F84600234DA6 /* Debug */, - 1ACA08A21C33F84600234DA6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; - 1ACA08A41C33F84600234DA6 /* Build configuration list for PBXNativeTarget "JSONModelDemo_watchOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1ACA08A51C33F84600234DA6 /* Debug */, - 1ACA08A61C33F84600234DA6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1ACA085E1C33F84500234DA6 /* Project object */; -} diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.h b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.h deleted file mode 100644 index a4cc7579..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// AppDelegate.h -// JSONModelDemo_watchOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -@import UIKit; - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.m deleted file mode 100644 index d7aecab3..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/AppDelegate.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// AppDelegate.m -// JSONModelDemo_watchOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -#import "AppDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - -@end diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index eeea76c2..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/LaunchScreen.storyboard b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 78686cd0..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/Main.storyboard b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/Main.storyboard deleted file mode 100644 index b1336625..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Info.plist b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Info.plist deleted file mode 100644 index 40c6215d..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.h b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.h deleted file mode 100644 index 20b73453..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ViewController.h -// JSONModelDemo_watchOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -@import UIKit; - -@interface ViewController : UIViewController - -@end diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.m deleted file mode 100644 index 61d1a80d..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/ViewController.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// ViewController.m -// JSONModelDemo_watchOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -#import "ViewController.h" - -@interface ViewController () - -@end - -@implementation ViewController - -@end diff --git a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/main.m b/JSONModelDemo_watchOS/JSONModelDemo_watchOS/main.m deleted file mode 100644 index e99da99e..00000000 --- a/JSONModelDemo_watchOS/JSONModelDemo_watchOS/main.m +++ /dev/null @@ -1,20 +0,0 @@ -// -// main.m -// JSONModelDemo_watchOS -// -// Created by James Billingham on 30/12/2015. -// Copyright © 2015 Cuvva. All rights reserved. -// - -@import UIKit; - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) -{ - @autoreleasepool - { - Class delegate = [AppDelegate class]; - return UIApplicationMain(argc, argv, nil, NSStringFromClass(delegate)); - } -} diff --git a/JSONModelDemos.xcworkspace/contents.xcworkspacedata b/JSONModelDemos.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index d122fbec..00000000 --- a/JSONModelDemos.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - diff --git a/JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout b/JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout deleted file mode 100644 index 240de767..00000000 --- a/JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 9AD3690B-CC20-4B34-9CC2-2D4156FE27A2 - IDESourceControlProjectName - JSONModelDemos - IDESourceControlProjectOriginsDictionary - - 2454A7C0A4BC2A09472718EB55354F320600B245 - https://github.com/JSONModel/JSONModel.git - - IDESourceControlProjectPath - JSONModelDemos.xcworkspace - IDESourceControlProjectRelativeInstallPathDictionary - - 2454A7C0A4BC2A09472718EB55354F320600B245 - .. - - IDESourceControlProjectURL - https://github.com/JSONModel/JSONModel.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 2454A7C0A4BC2A09472718EB55354F320600B245 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 2454A7C0A4BC2A09472718EB55354F320600B245 - IDESourceControlWCCName - JSONModel_master - - - - diff --git a/JSONModelOSX/AppDelegate.h b/JSONModelOSX/AppDelegate.h deleted file mode 100644 index 7d3bb017..00000000 --- a/JSONModelOSX/AppDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// AppDelegate.h -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface AppDelegate : NSObject - -@property (assign) IBOutlet NSWindow *window; - -@end diff --git a/JSONModelOSX/AppDelegate.m b/JSONModelOSX/AppDelegate.m deleted file mode 100644 index ddd41d53..00000000 --- a/JSONModelOSX/AppDelegate.m +++ /dev/null @@ -1,35 +0,0 @@ -// -// AppDelegate.m -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "AppDelegate.h" -#import "ViewController.h" - -@interface AppDelegate() -@property (strong, nonatomic) ViewController* controller; -@end - - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Insert code here to initialize your application - - self.controller = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; - self.window.contentView = self.controller.view; - - self.controller.view.frame = ((NSView*)self.window.contentView).bounds; - self.controller.view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; - -} - -- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { - return YES; -} - -@end diff --git a/JSONModelOSX/JSONModelDemo_OSX-Info.plist b/JSONModelOSX/JSONModelDemo_OSX-Info.plist deleted file mode 100644 index 1d5e1057..00000000 --- a/JSONModelOSX/JSONModelDemo_OSX-Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2012 Underplot ltd. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/JSONModelOSX/JSONModelDemo_OSX-Prefix.pch b/JSONModelOSX/JSONModelDemo_OSX-Prefix.pch deleted file mode 100644 index 6e99a320..00000000 --- a/JSONModelOSX/JSONModelDemo_OSX-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'JSONModelOSX' target in the 'JSONModelOSX' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/JSONModelOSX/KivaFeed.h b/JSONModelOSX/KivaFeed.h deleted file mode 100644 index 3e1b3a3f..00000000 --- a/JSONModelOSX/KivaFeed.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// KivaFeed.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "LoanModel.h" - -@interface KivaFeed : JSONModel - -@property (strong, nonatomic) NSArray* loans; - -@end \ No newline at end of file diff --git a/JSONModelOSX/KivaFeed.m b/JSONModelOSX/KivaFeed.m deleted file mode 100644 index 185d023d..00000000 --- a/JSONModelOSX/KivaFeed.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// KivaFeed.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "KivaFeed.h" - -@implementation KivaFeed - -@end diff --git a/JSONModelOSX/LoanModel.h b/JSONModelOSX/LoanModel.h deleted file mode 100644 index 36ead02e..00000000 --- a/JSONModelOSX/LoanModel.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// LoanModel.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "LocationModel.h" - -@protocol LoanModel @end - -@interface LoanModel : JSONModel - -@property (strong, nonatomic) NSString* name; -@property (strong, nonatomic) NSString* status; -@property (strong, nonatomic) NSString* use; - -@property (strong, nonatomic) LocationModel* location; - -@end \ No newline at end of file diff --git a/JSONModelOSX/LoanModel.m b/JSONModelOSX/LoanModel.m deleted file mode 100644 index d3678d9b..00000000 --- a/JSONModelOSX/LoanModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// LoanModel.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "LoanModel.h" - -@implementation LoanModel - -@end diff --git a/JSONModelOSX/LocationModel.h b/JSONModelOSX/LocationModel.h deleted file mode 100644 index d5e877b3..00000000 --- a/JSONModelOSX/LocationModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// LocationModel.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface LocationModel : JSONModel - -@property (strong, nonatomic) NSString* countryCode; -@property (strong, nonatomic) NSString* country; - -@end diff --git a/JSONModelOSX/LocationModel.m b/JSONModelOSX/LocationModel.m deleted file mode 100644 index 4d58dddc..00000000 --- a/JSONModelOSX/LocationModel.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// LocationModel.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "LocationModel.h" -#import "JSONKeyMapper.h" - -@implementation LocationModel - -+(JSONKeyMapper*)keyMapper -{ - return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase]; -} - -@end \ No newline at end of file diff --git a/JSONModelOSX/ViewController.h b/JSONModelOSX/ViewController.h deleted file mode 100644 index e2ae3387..00000000 --- a/JSONModelOSX/ViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ViewController.h -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface ViewController : NSViewController - -@end diff --git a/JSONModelOSX/ViewController.m b/JSONModelOSX/ViewController.m deleted file mode 100644 index 636b9132..00000000 --- a/JSONModelOSX/ViewController.m +++ /dev/null @@ -1,174 +0,0 @@ -// -// ViewController.m -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "ViewController.h" - -//kiva models -#import "KivaFeed.h" -#import "LoanModel.h" - -//github -#import "GitHubUserModel.h" - -#import "JSONModel+networking.h" - -enum kServices { - kServiceKiva = 1, - kServiceYoutube, - kServiceGithub - }; - -@interface ViewController () -{ - IBOutlet NSTableView* table; - IBOutlet NSProgressIndicator* spinner; - - int currentService; - - //kiva - KivaFeed* kiva; - - //youtube - NSArray* videos; - - //github - GitHubUserModel* user; - NSArray* items; - -} - -@end - -@implementation ViewController - --(void)awakeFromNib -{ - [spinner setHidden:YES]; -} - --(void)setLoaderVisible:(BOOL)isVis -{ - [spinner setHidden:!isVis]; - if (isVis) [spinner startAnimation:nil]; - else [spinner stopAnimation:nil]; -} - -- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row -{ - NSTableCellView *cellView = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self]; - - switch (currentService) { - case kServiceKiva: - { - if (row>=kiva.loans.count) return nil; - - LoanModel* loan = kiva.loans[row]; - NSString* message = [NSString stringWithFormat:@"%@ from %@(%@) needs a loan %@", - loan.name, loan.location.country, loan.location.countryCode, loan.use - ]; - - cellView.textField.stringValue = message; - - } break; - - case kServiceGithub: - { - if (row>=items.count) return nil; - cellView.textField.stringValue = [items[row] description]; - - } break; - - default: - cellView.textField.stringValue = @"n/a"; - break; - } - - return cellView; -} - - -- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView -{ - switch (currentService) { - case kServiceKiva: - return kiva.loans.count; - break; - case kServiceGithub: - return items.count; - break; - default: - return 0; - break; - } -} - -- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(NSInteger)rowIndex -{ - switch (currentService) { - case kServiceGithub: - { - id item = items[rowIndex]; - if ([item isKindOfClass:[NSURL class]]) { - [[NSWorkspace sharedWorkspace] openURL:item]; - } - - } break; - - default: - break; - } - return YES; -} - -#pragma mark - button actions --(IBAction)actionKiva:(id)sender -{ - currentService = kServiceKiva; - [self setLoaderVisible:YES]; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - kiva = [[KivaFeed alloc] initFromURLWithString:@"https://api.kivaws.org/v1/loans/search.json?status=fundraising" -#pragma GCC diagnostic pop - completion:^(JSONModel *model, JSONModelError *e) { - - [table reloadData]; - - if (e) { - [[NSAlert alertWithError:e] beginSheetModalForWindow:self.view.window modalDelegate:nil didEndSelector:nil contextInfo:nil]; - } - - [self setLoaderVisible:NO]; - }]; - -} - --(IBAction)actionGithub:(id)sender -{ - currentService = kServiceGithub; - [self setLoaderVisible:YES]; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - user = [[GitHubUserModel alloc] initFromURLWithString:@"https://api.github.com/users/icanzilb" -#pragma GCC diagnostic pop - completion:^(JSONModel *model, JSONModelError *e) { - - items = @[user.login, user.html_url, user.company, user.name, user.blog]; - [table performSelector:@selector(reloadData) withObject:nil afterDelay:0.1]; - - if (e) { - [[NSAlert alertWithError:e] beginSheetModalForWindow:self.view.window modalDelegate:nil didEndSelector:nil contextInfo:nil]; - } - - [self setLoaderVisible:NO]; - }]; - -} - -@end diff --git a/JSONModelOSX/ViewController.xib b/JSONModelOSX/ViewController.xib deleted file mode 100644 index 85e2bf0b..00000000 --- a/JSONModelOSX/ViewController.xib +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelOSX/en.lproj/Credits.rtf b/JSONModelOSX/en.lproj/Credits.rtf deleted file mode 100644 index 9033dfe4..00000000 --- a/JSONModelOSX/en.lproj/Credits.rtf +++ /dev/null @@ -1,36 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 - -\f0\b\fs24 \cf0 Engineering: -\b0 \ - Marin Todorov\ -\ - -\b Human Interface Design: -\b0 \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 Marin Todorov\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 \ - -\b Testing: -\b0 \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 Marin Todorov\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 \ - -\b Documentation: -\b0 \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 Marin Todorov\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 \ - -\b With special thanks to: -\b0 \ - Mom and Dad\ -} \ No newline at end of file diff --git a/JSONModelOSX/en.lproj/InfoPlist.strings b/JSONModelOSX/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/JSONModelOSX/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/JSONModelOSX/en.lproj/MainMenu.xib b/JSONModelOSX/en.lproj/MainMenu.xib deleted file mode 100644 index 79a67ab6..00000000 --- a/JSONModelOSX/en.lproj/MainMenu.xib +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelOSX/main.m b/JSONModelOSX/main.m deleted file mode 100644 index 592f5e07..00000000 --- a/JSONModelOSX/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **)argv); -} From 8271d315b42384d3c966b4020fc0a093b08dff1b Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 13:35:01 +0100 Subject: [PATCH 087/171] Initial empty example projects --- .gitignore | 13 +- examples/Examples.xcodeproj/project.pbxproj | 1508 +++++++++++++++++ .../contents.xcworkspacedata | 7 + .../contents.xcworkspacedata | 10 + examples/Podfile | 33 + examples/Tests/Info.plist | 24 + examples/Tests/SanityTests.m | 44 + examples/iOS/AppDelegate.h | 15 + examples/iOS/AppDelegate.m | 18 + .../AppIcon.appiconset/Contents.json | 38 + .../iOS/Base.lproj/LaunchScreen.storyboard | 27 + examples/iOS/Base.lproj/Main.storyboard | 25 + examples/iOS/Info.plist | 40 + examples/iOS/ViewController.h | 13 + examples/iOS/ViewController.m | 13 + examples/iOS/main.m | 19 + examples/macOS/AppDelegate.h | 13 + examples/macOS/AppDelegate.m | 13 + .../AppIcon.appiconset/Contents.json | 58 + examples/macOS/Base.lproj/Main.storyboard | 682 ++++++++ examples/macOS/Info.plist | 34 + examples/macOS/ViewController.h | 13 + examples/macOS/ViewController.m | 13 + examples/macOS/main.m | 14 + examples/tvOS/AppDelegate.h | 15 + examples/tvOS/AppDelegate.m | 18 + .../Content.imageset/Contents.json | 12 + .../Back.imagestacklayer/Contents.json | 6 + .../App Icon - Large.imagestack/Contents.json | 17 + .../Content.imageset/Contents.json | 12 + .../Front.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 12 + .../Middle.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 12 + .../Back.imagestacklayer/Contents.json | 6 + .../App Icon - Small.imagestack/Contents.json | 17 + .../Content.imageset/Contents.json | 12 + .../Front.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 12 + .../Middle.imagestacklayer/Contents.json | 6 + .../Contents.json | 32 + .../Contents.json | 12 + .../Top Shelf Image.imageset/Contents.json | 12 + examples/tvOS/Assets.xcassets/Contents.json | 6 + .../LaunchImage.launchimage/Contents.json | 15 + examples/tvOS/Base.lproj/Main.storyboard | 25 + examples/tvOS/Info.plist | 34 + examples/tvOS/ViewController.h | 13 + examples/tvOS/ViewController.m | 13 + examples/tvOS/main.m | 19 + .../watchOS-extension/ExtensionDelegate.h | 13 + .../watchOS-extension/ExtensionDelegate.m | 13 + examples/watchOS-extension/Info.plist | 38 + .../watchOS-extension/InterfaceController.h | 13 + .../watchOS-extension/InterfaceController.m | 13 + .../AppIcon.appiconset/Contents.json | 55 + .../watchOS/Base.lproj/Interface.storyboard | 15 + examples/watchOS/Info.plist | 35 + 58 files changed, 3233 insertions(+), 5 deletions(-) create mode 100644 examples/Examples.xcodeproj/project.pbxproj create mode 100644 examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 examples/Examples.xcworkspace/contents.xcworkspacedata create mode 100644 examples/Podfile create mode 100644 examples/Tests/Info.plist create mode 100644 examples/Tests/SanityTests.m create mode 100644 examples/iOS/AppDelegate.h create mode 100644 examples/iOS/AppDelegate.m create mode 100644 examples/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/iOS/Base.lproj/LaunchScreen.storyboard create mode 100644 examples/iOS/Base.lproj/Main.storyboard create mode 100644 examples/iOS/Info.plist create mode 100644 examples/iOS/ViewController.h create mode 100644 examples/iOS/ViewController.m create mode 100644 examples/iOS/main.m create mode 100644 examples/macOS/AppDelegate.h create mode 100644 examples/macOS/AppDelegate.m create mode 100644 examples/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/macOS/Base.lproj/Main.storyboard create mode 100644 examples/macOS/Info.plist create mode 100644 examples/macOS/ViewController.h create mode 100644 examples/macOS/ViewController.m create mode 100644 examples/macOS/main.m create mode 100644 examples/tvOS/AppDelegate.h create mode 100644 examples/tvOS/AppDelegate.m create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/Contents.json create mode 100644 examples/tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json create mode 100644 examples/tvOS/Base.lproj/Main.storyboard create mode 100644 examples/tvOS/Info.plist create mode 100644 examples/tvOS/ViewController.h create mode 100644 examples/tvOS/ViewController.m create mode 100644 examples/tvOS/main.m create mode 100644 examples/watchOS-extension/ExtensionDelegate.h create mode 100644 examples/watchOS-extension/ExtensionDelegate.m create mode 100644 examples/watchOS-extension/Info.plist create mode 100644 examples/watchOS-extension/InterfaceController.h create mode 100644 examples/watchOS-extension/InterfaceController.m create mode 100644 examples/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/watchOS/Base.lproj/Interface.storyboard create mode 100644 examples/watchOS/Info.plist diff --git a/.gitignore b/.gitignore index 4c8c4435..5720f180 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -# Xcode -.DS_Store build/ *.pbxuser !default.pbxuser @@ -9,9 +7,14 @@ build/ !default.mode2v3 *.perspectivev3 !default.perspectivev3 -!default.xcworkspace -xcuserdata +xcuserdata/ +*.xccheckout profile *.moved-aside DerivedData -.idea/ +*.hmap +*.ipa +.bundle +Carthage +Pods/ +Podfile.lock diff --git a/examples/Examples.xcodeproj/project.pbxproj b/examples/Examples.xcodeproj/project.pbxproj new file mode 100644 index 00000000..964f731a --- /dev/null +++ b/examples/Examples.xcodeproj/project.pbxproj @@ -0,0 +1,1508 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0DB9D559E428E7124986BF07 /* Pods_iOSTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F37BF9082B944335670E6BC4 /* Pods_iOSTests.framework */; }; + 1A46AB611D1C71CB00E10D9D /* SanityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A46AB601D1C71CB00E10D9D /* SanityTests.m */; }; + 1A46AB7A1D1C741900E10D9D /* SanityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A46AB601D1C71CB00E10D9D /* SanityTests.m */; }; + 1A46AB7B1D1C741A00E10D9D /* SanityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A46AB601D1C71CB00E10D9D /* SanityTests.m */; }; + 1A84BBE01D1BFB0E005234F4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BBDF1D1BFB0E005234F4 /* main.m */; }; + 1A84BBE31D1BFB0E005234F4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BBE21D1BFB0E005234F4 /* AppDelegate.m */; }; + 1A84BBE61D1BFB0E005234F4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BBE51D1BFB0E005234F4 /* ViewController.m */; }; + 1A84BBE91D1BFB0E005234F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BBE71D1BFB0E005234F4 /* Main.storyboard */; }; + 1A84BBEB1D1BFB0E005234F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BBEA1D1BFB0E005234F4 /* Assets.xcassets */; }; + 1A84BBEE1D1BFB0E005234F4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BBEC1D1BFB0E005234F4 /* LaunchScreen.storyboard */; }; + 1A84BBF31D1BFB0E005234F4 /* watchOS.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 1A84BBF21D1BFB0E005234F4 /* watchOS.app */; }; + 1A84BBF91D1BFB0E005234F4 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BBF71D1BFB0E005234F4 /* Interface.storyboard */; }; + 1A84BBFB1D1BFB0E005234F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BBFA1D1BFB0E005234F4 /* Assets.xcassets */; }; + 1A84BC021D1BFB0E005234F4 /* watchOS-extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 1A84BC011D1BFB0E005234F4 /* watchOS-extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 1A84BC081D1BFB0E005234F4 /* InterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC071D1BFB0E005234F4 /* InterfaceController.m */; }; + 1A84BC0B1D1BFB0E005234F4 /* ExtensionDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC0A1D1BFB0E005234F4 /* ExtensionDelegate.m */; }; + 1A84BC241D1C0010005234F4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC231D1C0010005234F4 /* AppDelegate.m */; }; + 1A84BC271D1C0010005234F4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC261D1C0010005234F4 /* main.m */; }; + 1A84BC2A1D1C0010005234F4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC291D1C0010005234F4 /* ViewController.m */; }; + 1A84BC2C1D1C0010005234F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BC2B1D1C0010005234F4 /* Assets.xcassets */; }; + 1A84BC2F1D1C0010005234F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BC2D1D1C0010005234F4 /* Main.storyboard */; }; + 1A84BC3C1D1C0359005234F4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC3B1D1C0359005234F4 /* main.m */; }; + 1A84BC3F1D1C0359005234F4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC3E1D1C0359005234F4 /* AppDelegate.m */; }; + 1A84BC421D1C0359005234F4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC411D1C0359005234F4 /* ViewController.m */; }; + 1A84BC451D1C0359005234F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BC431D1C0359005234F4 /* Main.storyboard */; }; + 1A84BC471D1C0359005234F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BC461D1C0359005234F4 /* Assets.xcassets */; }; + 5CB2A425167A8E07ED4DE275 /* Pods_watchOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52B339E24F89A9DA2A76B966 /* Pods_watchOS.framework */; }; + 72EAF1AC1B81C8A14DD60AD9 /* Pods_watchOS_extension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5692CCAD15B02E148B7DA7 /* Pods_watchOS_extension.framework */; }; + 781D56C813A5E3442DB017EB /* Pods_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7CAA3D8D5BD344CFA7833A86 /* Pods_iOS.framework */; }; + 7ECB7F2AD9F9D0721CF10411 /* Pods_tvOSTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C370B412DC108AAC99B3A13 /* Pods_tvOSTests.framework */; }; + 931ECCC61B449E69C9F60862 /* Pods_macOSTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 10A3600BED7471EF4FB3C34D /* Pods_macOSTests.framework */; }; + AA4DDDDDE4080D745F0D096B /* Pods_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1D48E23848723BCB420F544 /* Pods_macOS.framework */; }; + C1468B4CA8357FFE0AEB2715 /* Pods_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E225E30531704F049BE5B4C /* Pods_tvOS.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 1A84BBF41D1BFB0E005234F4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1A84BBD31D1BFB0D005234F4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1A84BBF11D1BFB0E005234F4; + remoteInfo = watchOS; + }; + 1A84BC031D1BFB0E005234F4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1A84BBD31D1BFB0D005234F4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1A84BC001D1BFB0E005234F4; + remoteInfo = "watchOS-extension"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 1A84BC141D1BFB0E005234F4 /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 1A84BC021D1BFB0E005234F4 /* watchOS-extension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BC181D1BFB0E005234F4 /* Embed Watch Content */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; + dstSubfolderSpec = 16; + files = ( + 1A84BBF31D1BFB0E005234F4 /* watchOS.app in Embed Watch Content */, + ); + name = "Embed Watch Content"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0A4DE5B5DC624A64AA75870C /* Pods-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-macOS/Pods-macOS.debug.xcconfig"; sourceTree = ""; }; + 107DC0780200A72176B28827 /* Pods-iOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-iOSTests/Pods-iOSTests.release.xcconfig"; sourceTree = ""; }; + 10A3600BED7471EF4FB3C34D /* Pods_macOSTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_macOSTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A46A99A1D1C52FC00E10D9D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1A46AA501D1C544900E10D9D /* iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A46AB601D1C71CB00E10D9D /* SanityTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SanityTests.m; sourceTree = ""; }; + 1A46AB661D1C735C00E10D9D /* macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = macOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A46AB721D1C738400E10D9D /* tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = tvOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A84BBDB1D1BFB0E005234F4 /* iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A84BBDF1D1BFB0E005234F4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 1A84BBE11D1BFB0E005234F4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 1A84BBE21D1BFB0E005234F4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 1A84BBE41D1BFB0E005234F4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 1A84BBE51D1BFB0E005234F4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 1A84BBE81D1BFB0E005234F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 1A84BBEA1D1BFB0E005234F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 1A84BBED1D1BFB0E005234F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 1A84BBEF1D1BFB0E005234F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1A84BBF21D1BFB0E005234F4 /* watchOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = watchOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A84BBF81D1BFB0E005234F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; + 1A84BBFA1D1BFB0E005234F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 1A84BBFC1D1BFB0E005234F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1A84BC011D1BFB0E005234F4 /* watchOS-extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "watchOS-extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A84BC061D1BFB0E005234F4 /* InterfaceController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InterfaceController.h; sourceTree = ""; }; + 1A84BC071D1BFB0E005234F4 /* InterfaceController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InterfaceController.m; sourceTree = ""; }; + 1A84BC091D1BFB0E005234F4 /* ExtensionDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtensionDelegate.h; sourceTree = ""; }; + 1A84BC0A1D1BFB0E005234F4 /* ExtensionDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExtensionDelegate.m; sourceTree = ""; }; + 1A84BC0E1D1BFB0E005234F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1A84BC201D1C0010005234F4 /* macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = macOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A84BC221D1C0010005234F4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 1A84BC231D1C0010005234F4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 1A84BC261D1C0010005234F4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 1A84BC281D1C0010005234F4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 1A84BC291D1C0010005234F4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 1A84BC2B1D1C0010005234F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 1A84BC2E1D1C0010005234F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 1A84BC301D1C0010005234F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1A84BC381D1C0359005234F4 /* tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tvOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A84BC3B1D1C0359005234F4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 1A84BC3D1D1C0359005234F4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 1A84BC3E1D1C0359005234F4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 1A84BC401D1C0359005234F4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 1A84BC411D1C0359005234F4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 1A84BC441D1C0359005234F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 1A84BC461D1C0359005234F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 1A84BC481D1C0359005234F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 21CE3B1BB8B2A3D33C54BE59 /* Pods-macOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-macOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-macOSTests/Pods-macOSTests.debug.xcconfig"; sourceTree = ""; }; + 38F03B2DA2344C07E5EF16B1 /* Pods-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-tvOSTests/Pods-tvOSTests.debug.xcconfig"; sourceTree = ""; }; + 3C370B412DC108AAC99B3A13 /* Pods_tvOSTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_tvOSTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 52B339E24F89A9DA2A76B966 /* Pods_watchOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_watchOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 565504004BF40E7F504FB470 /* Pods-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-tvOS/Pods-tvOS.debug.xcconfig"; sourceTree = ""; }; + 6A5692CCAD15B02E148B7DA7 /* Pods_watchOS_extension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_watchOS_extension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6AE4B6F1DE912D9546E61997 /* Pods-iOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-iOSTests/Pods-iOSTests.debug.xcconfig"; sourceTree = ""; }; + 6F379CB8EFD3B5F0453D5AB6 /* Pods-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-tvOS/Pods-tvOS.release.xcconfig"; sourceTree = ""; }; + 710BEE33C9D054DF6DC501EC /* Pods-watchOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-watchOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-watchOS/Pods-watchOS.release.xcconfig"; sourceTree = ""; }; + 7CAA3D8D5BD344CFA7833A86 /* Pods_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E225E30531704F049BE5B4C /* Pods_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9247828CB3D42AA7BA5AED53 /* Pods-macOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-macOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-macOSTests/Pods-macOSTests.release.xcconfig"; sourceTree = ""; }; + A728B4A9DE20ECD75F7FDB8E /* Pods-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-iOS/Pods-iOS.release.xcconfig"; sourceTree = ""; }; + B1B1180C2C83F2AC52985AB2 /* Pods-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-tvOSTests/Pods-tvOSTests.release.xcconfig"; sourceTree = ""; }; + C6B9067A24F333B91074F231 /* Pods-watchOS-extension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-watchOS-extension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-watchOS-extension/Pods-watchOS-extension.debug.xcconfig"; sourceTree = ""; }; + CD4BE0AB1A0D7ED88A9B68AB /* Pods-watchOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-watchOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-watchOS/Pods-watchOS.debug.xcconfig"; sourceTree = ""; }; + CF86137C50AC9DC5E09BAEE5 /* Pods-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-iOS/Pods-iOS.debug.xcconfig"; sourceTree = ""; }; + D1A4E88CC1575485760915E8 /* Pods-watchOS-extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-watchOS-extension.release.xcconfig"; path = "Pods/Target Support Files/Pods-watchOS-extension/Pods-watchOS-extension.release.xcconfig"; sourceTree = ""; }; + E1D48E23848723BCB420F544 /* Pods_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EE84FC3D9B36E8214BE605D6 /* Pods-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-macOS/Pods-macOS.release.xcconfig"; sourceTree = ""; }; + F37BF9082B944335670E6BC4 /* Pods_iOSTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iOSTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 02602A19BD74D43C786165E0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5CB2A425167A8E07ED4DE275 /* Pods_watchOS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A46AA4D1D1C544900E10D9D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0DB9D559E428E7124986BF07 /* Pods_iOSTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A46AB631D1C735C00E10D9D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 931ECCC61B449E69C9F60862 /* Pods_macOSTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A46AB6F1D1C738400E10D9D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7ECB7F2AD9F9D0721CF10411 /* Pods_tvOSTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BBD81D1BFB0D005234F4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 781D56C813A5E3442DB017EB /* Pods_iOS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BBFE1D1BFB0E005234F4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 72EAF1AC1B81C8A14DD60AD9 /* Pods_watchOS_extension.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BC1D1D1C0010005234F4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + AA4DDDDDE4080D745F0D096B /* Pods_macOS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BC351D1C0359005234F4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C1468B4CA8357FFE0AEB2715 /* Pods_tvOS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1A46A9971D1C52FC00E10D9D /* Tests */ = { + isa = PBXGroup; + children = ( + 1A46A99A1D1C52FC00E10D9D /* Info.plist */, + 1A46AB601D1C71CB00E10D9D /* SanityTests.m */, + ); + path = Tests; + sourceTree = ""; + }; + 1A84BBD21D1BFB0D005234F4 = { + isa = PBXGroup; + children = ( + 1A84BBDD1D1BFB0E005234F4 /* iOS */, + 1A84BC211D1C0010005234F4 /* macOS */, + 1A84BC391D1C0359005234F4 /* tvOS */, + 1A84BBF61D1BFB0E005234F4 /* watchOS */, + 1A84BC051D1BFB0E005234F4 /* watchOS-extension */, + 1A46A9971D1C52FC00E10D9D /* Tests */, + 1A84BBDC1D1BFB0E005234F4 /* Products */, + FDE9FC5ACCF1F2AAA02606AF /* Pods */, + 6A800556EEA0169D370265C6 /* Frameworks */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 1; + }; + 1A84BBDC1D1BFB0E005234F4 /* Products */ = { + isa = PBXGroup; + children = ( + 1A84BBDB1D1BFB0E005234F4 /* iOS.app */, + 1A84BBF21D1BFB0E005234F4 /* watchOS.app */, + 1A84BC011D1BFB0E005234F4 /* watchOS-extension.appex */, + 1A84BC201D1C0010005234F4 /* macOS.app */, + 1A84BC381D1C0359005234F4 /* tvOS.app */, + 1A46AA501D1C544900E10D9D /* iOSTests.xctest */, + 1A46AB661D1C735C00E10D9D /* macOSTests.xctest */, + 1A46AB721D1C738400E10D9D /* tvOSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 1A84BBDD1D1BFB0E005234F4 /* iOS */ = { + isa = PBXGroup; + children = ( + 1A84BBEF1D1BFB0E005234F4 /* Info.plist */, + 1A84BBEA1D1BFB0E005234F4 /* Assets.xcassets */, + 1A84BBEC1D1BFB0E005234F4 /* LaunchScreen.storyboard */, + 1A84BBE71D1BFB0E005234F4 /* Main.storyboard */, + 1A84BBDF1D1BFB0E005234F4 /* main.m */, + 1A84BBE11D1BFB0E005234F4 /* AppDelegate.h */, + 1A84BBE21D1BFB0E005234F4 /* AppDelegate.m */, + 1A84BBE41D1BFB0E005234F4 /* ViewController.h */, + 1A84BBE51D1BFB0E005234F4 /* ViewController.m */, + ); + path = iOS; + sourceTree = ""; + }; + 1A84BBF61D1BFB0E005234F4 /* watchOS */ = { + isa = PBXGroup; + children = ( + 1A84BBFC1D1BFB0E005234F4 /* Info.plist */, + 1A84BBFA1D1BFB0E005234F4 /* Assets.xcassets */, + 1A84BBF71D1BFB0E005234F4 /* Interface.storyboard */, + ); + path = watchOS; + sourceTree = ""; + }; + 1A84BC051D1BFB0E005234F4 /* watchOS-extension */ = { + isa = PBXGroup; + children = ( + 1A84BC0E1D1BFB0E005234F4 /* Info.plist */, + 1A84BC091D1BFB0E005234F4 /* ExtensionDelegate.h */, + 1A84BC0A1D1BFB0E005234F4 /* ExtensionDelegate.m */, + 1A84BC061D1BFB0E005234F4 /* InterfaceController.h */, + 1A84BC071D1BFB0E005234F4 /* InterfaceController.m */, + ); + path = "watchOS-extension"; + sourceTree = ""; + }; + 1A84BC211D1C0010005234F4 /* macOS */ = { + isa = PBXGroup; + children = ( + 1A84BC301D1C0010005234F4 /* Info.plist */, + 1A84BC2B1D1C0010005234F4 /* Assets.xcassets */, + 1A84BC2D1D1C0010005234F4 /* Main.storyboard */, + 1A84BC261D1C0010005234F4 /* main.m */, + 1A84BC221D1C0010005234F4 /* AppDelegate.h */, + 1A84BC231D1C0010005234F4 /* AppDelegate.m */, + 1A84BC281D1C0010005234F4 /* ViewController.h */, + 1A84BC291D1C0010005234F4 /* ViewController.m */, + ); + path = macOS; + sourceTree = ""; + }; + 1A84BC391D1C0359005234F4 /* tvOS */ = { + isa = PBXGroup; + children = ( + 1A84BC481D1C0359005234F4 /* Info.plist */, + 1A84BC461D1C0359005234F4 /* Assets.xcassets */, + 1A84BC431D1C0359005234F4 /* Main.storyboard */, + 1A84BC3B1D1C0359005234F4 /* main.m */, + 1A84BC3D1D1C0359005234F4 /* AppDelegate.h */, + 1A84BC3E1D1C0359005234F4 /* AppDelegate.m */, + 1A84BC401D1C0359005234F4 /* ViewController.h */, + 1A84BC411D1C0359005234F4 /* ViewController.m */, + ); + path = tvOS; + sourceTree = ""; + }; + 6A800556EEA0169D370265C6 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7CAA3D8D5BD344CFA7833A86 /* Pods_iOS.framework */, + F37BF9082B944335670E6BC4 /* Pods_iOSTests.framework */, + E1D48E23848723BCB420F544 /* Pods_macOS.framework */, + 7E225E30531704F049BE5B4C /* Pods_tvOS.framework */, + 52B339E24F89A9DA2A76B966 /* Pods_watchOS.framework */, + 6A5692CCAD15B02E148B7DA7 /* Pods_watchOS_extension.framework */, + 10A3600BED7471EF4FB3C34D /* Pods_macOSTests.framework */, + 3C370B412DC108AAC99B3A13 /* Pods_tvOSTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + FDE9FC5ACCF1F2AAA02606AF /* Pods */ = { + isa = PBXGroup; + children = ( + CF86137C50AC9DC5E09BAEE5 /* Pods-iOS.debug.xcconfig */, + A728B4A9DE20ECD75F7FDB8E /* Pods-iOS.release.xcconfig */, + 0A4DE5B5DC624A64AA75870C /* Pods-macOS.debug.xcconfig */, + EE84FC3D9B36E8214BE605D6 /* Pods-macOS.release.xcconfig */, + 565504004BF40E7F504FB470 /* Pods-tvOS.debug.xcconfig */, + 6F379CB8EFD3B5F0453D5AB6 /* Pods-tvOS.release.xcconfig */, + CD4BE0AB1A0D7ED88A9B68AB /* Pods-watchOS.debug.xcconfig */, + 710BEE33C9D054DF6DC501EC /* Pods-watchOS.release.xcconfig */, + C6B9067A24F333B91074F231 /* Pods-watchOS-extension.debug.xcconfig */, + D1A4E88CC1575485760915E8 /* Pods-watchOS-extension.release.xcconfig */, + 6AE4B6F1DE912D9546E61997 /* Pods-iOSTests.debug.xcconfig */, + 107DC0780200A72176B28827 /* Pods-iOSTests.release.xcconfig */, + 21CE3B1BB8B2A3D33C54BE59 /* Pods-macOSTests.debug.xcconfig */, + 9247828CB3D42AA7BA5AED53 /* Pods-macOSTests.release.xcconfig */, + 38F03B2DA2344C07E5EF16B1 /* Pods-tvOSTests.debug.xcconfig */, + B1B1180C2C83F2AC52985AB2 /* Pods-tvOSTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1A46AA4F1D1C544900E10D9D /* iOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1A46AA551D1C544900E10D9D /* Build configuration list for PBXNativeTarget "iOSTests" */; + buildPhases = ( + 66D6DFC455CD55F69AC1F3FA /* [CP] Check Pods Manifest.lock */, + 1A46AA4C1D1C544900E10D9D /* Sources */, + 1A46AA4D1D1C544900E10D9D /* Frameworks */, + 1A46AA4E1D1C544900E10D9D /* Resources */, + 165BFC7166A443EB608CBD8D /* [CP] Embed Pods Frameworks */, + CE339679567460AAC17DBECC /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iOSTests; + productName = iOSTests; + productReference = 1A46AA501D1C544900E10D9D /* iOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 1A46AB651D1C735C00E10D9D /* macOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1A46AB6B1D1C735D00E10D9D /* Build configuration list for PBXNativeTarget "macOSTests" */; + buildPhases = ( + DF49DB78DE17E4EEC73EFA24 /* [CP] Check Pods Manifest.lock */, + 1A46AB621D1C735C00E10D9D /* Sources */, + 1A46AB631D1C735C00E10D9D /* Frameworks */, + 1A46AB641D1C735C00E10D9D /* Resources */, + B81C07ABC89B1048CC15AC24 /* [CP] Embed Pods Frameworks */, + B1CE7620B4418313D5AC5B80 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = macOSTests; + productName = macOSTests; + productReference = 1A46AB661D1C735C00E10D9D /* macOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 1A46AB711D1C738400E10D9D /* tvOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1A46AB771D1C738400E10D9D /* Build configuration list for PBXNativeTarget "tvOSTests" */; + buildPhases = ( + CA8C643C00F20E3F8282ECBA /* [CP] Check Pods Manifest.lock */, + 1A46AB6E1D1C738400E10D9D /* Sources */, + 1A46AB6F1D1C738400E10D9D /* Frameworks */, + 1A46AB701D1C738400E10D9D /* Resources */, + 7A4FD822901F223367A54653 /* [CP] Embed Pods Frameworks */, + 29E28CD54375617BE9AA72C7 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tvOSTests; + productName = tvOSTests; + productReference = 1A46AB721D1C738400E10D9D /* tvOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 1A84BBDA1D1BFB0D005234F4 /* iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1A84BC191D1BFB0E005234F4 /* Build configuration list for PBXNativeTarget "iOS" */; + buildPhases = ( + 793704CBF138F3DF9E79ABF0 /* [CP] Check Pods Manifest.lock */, + 1A84BBD71D1BFB0D005234F4 /* Sources */, + 1A84BBD81D1BFB0D005234F4 /* Frameworks */, + 1A84BBD91D1BFB0D005234F4 /* Resources */, + 1A84BC181D1BFB0E005234F4 /* Embed Watch Content */, + F67D1C90D29A153292B9651A /* [CP] Embed Pods Frameworks */, + 14B3D7D25E503A0DB641C5FD /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 1A84BBF51D1BFB0E005234F4 /* PBXTargetDependency */, + ); + name = iOS; + productName = iOS; + productReference = 1A84BBDB1D1BFB0E005234F4 /* iOS.app */; + productType = "com.apple.product-type.application"; + }; + 1A84BBF11D1BFB0E005234F4 /* watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1A84BC151D1BFB0E005234F4 /* Build configuration list for PBXNativeTarget "watchOS" */; + buildPhases = ( + EAAF7A55FA008081E3887EBB /* [CP] Check Pods Manifest.lock */, + 1A84BBF01D1BFB0E005234F4 /* Resources */, + 1A84BC141D1BFB0E005234F4 /* Embed App Extensions */, + 02602A19BD74D43C786165E0 /* Frameworks */, + 88EDAF1F34DF7A96083C5E90 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 1A84BC041D1BFB0E005234F4 /* PBXTargetDependency */, + ); + name = watchOS; + productName = watchOS; + productReference = 1A84BBF21D1BFB0E005234F4 /* watchOS.app */; + productType = "com.apple.product-type.application.watchapp2"; + }; + 1A84BC001D1BFB0E005234F4 /* watchOS-extension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1A84BC111D1BFB0E005234F4 /* Build configuration list for PBXNativeTarget "watchOS-extension" */; + buildPhases = ( + 6341D301E595BBCBCB15AE1B /* [CP] Check Pods Manifest.lock */, + 1A84BBFD1D1BFB0E005234F4 /* Sources */, + 1A84BBFE1D1BFB0E005234F4 /* Frameworks */, + 1A84BBFF1D1BFB0E005234F4 /* Resources */, + B3D310E0F3E115CCA4CDEF00 /* [CP] Embed Pods Frameworks */, + 99BB77F9E8A20CC16FABF04B /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "watchOS-extension"; + productName = "watchOS-extension"; + productReference = 1A84BC011D1BFB0E005234F4 /* watchOS-extension.appex */; + productType = "com.apple.product-type.watchkit2-extension"; + }; + 1A84BC1F1D1C0010005234F4 /* macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1A84BC331D1C0010005234F4 /* Build configuration list for PBXNativeTarget "macOS" */; + buildPhases = ( + 93BAC5AAFB8DA6882D0B75ED /* [CP] Check Pods Manifest.lock */, + 1A84BC1C1D1C0010005234F4 /* Sources */, + 1A84BC1D1D1C0010005234F4 /* Frameworks */, + 1A84BC1E1D1C0010005234F4 /* Resources */, + 5F7CEA4CFBCCAD7C891B4AB4 /* [CP] Embed Pods Frameworks */, + E1D3201AC8B197487989E8EE /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = macOS; + productName = macOS; + productReference = 1A84BC201D1C0010005234F4 /* macOS.app */; + productType = "com.apple.product-type.application"; + }; + 1A84BC371D1C0359005234F4 /* tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1A84BC491D1C0359005234F4 /* Build configuration list for PBXNativeTarget "tvOS" */; + buildPhases = ( + 9DEB94EB0C787A7BC558FC82 /* [CP] Check Pods Manifest.lock */, + 1A84BC341D1C0359005234F4 /* Sources */, + 1A84BC351D1C0359005234F4 /* Frameworks */, + 1A84BC361D1C0359005234F4 /* Resources */, + C3AB7A606A2BD8599FF1BD22 /* [CP] Embed Pods Frameworks */, + CDF4BA0066EAED2C8DE2EF2D /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tvOS; + productName = tvOS; + productReference = 1A84BC381D1C0359005234F4 /* tvOS.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 1A84BBD31D1BFB0D005234F4 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = JSONModel; + TargetAttributes = { + 1A46AB651D1C735C00E10D9D = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = 22D6LDWKW5; + DevelopmentTeamName = "Cuvva Limited"; + ProvisioningStyle = Automatic; + }; + 1A46AB711D1C738400E10D9D = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = 22D6LDWKW5; + DevelopmentTeamName = "Cuvva Limited"; + ProvisioningStyle = Automatic; + }; + 1A84BBDA1D1BFB0D005234F4 = { + CreatedOnToolsVersion = 7.3.1; + }; + 1A84BBF11D1BFB0E005234F4 = { + CreatedOnToolsVersion = 7.3.1; + }; + 1A84BC001D1BFB0E005234F4 = { + CreatedOnToolsVersion = 7.3.1; + }; + 1A84BC1F1D1C0010005234F4 = { + CreatedOnToolsVersion = 7.3.1; + }; + 1A84BC371D1C0359005234F4 = { + CreatedOnToolsVersion = 7.3.1; + }; + }; + }; + buildConfigurationList = 1A84BBD61D1BFB0D005234F4 /* Build configuration list for PBXProject "Examples" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 1A84BBD21D1BFB0D005234F4; + productRefGroup = 1A84BBDC1D1BFB0E005234F4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1A84BBDA1D1BFB0D005234F4 /* iOS */, + 1A84BC1F1D1C0010005234F4 /* macOS */, + 1A84BC371D1C0359005234F4 /* tvOS */, + 1A84BBF11D1BFB0E005234F4 /* watchOS */, + 1A84BC001D1BFB0E005234F4 /* watchOS-extension */, + 1A46AA4F1D1C544900E10D9D /* iOSTests */, + 1A46AB651D1C735C00E10D9D /* macOSTests */, + 1A46AB711D1C738400E10D9D /* tvOSTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1A46AA4E1D1C544900E10D9D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A46AB641D1C735C00E10D9D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A46AB701D1C738400E10D9D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BBD91D1BFB0D005234F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A84BBEE1D1BFB0E005234F4 /* LaunchScreen.storyboard in Resources */, + 1A84BBEB1D1BFB0E005234F4 /* Assets.xcassets in Resources */, + 1A84BBE91D1BFB0E005234F4 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BBF01D1BFB0E005234F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A84BBFB1D1BFB0E005234F4 /* Assets.xcassets in Resources */, + 1A84BBF91D1BFB0E005234F4 /* Interface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BBFF1D1BFB0E005234F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BC1E1D1C0010005234F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A84BC2C1D1C0010005234F4 /* Assets.xcassets in Resources */, + 1A84BC2F1D1C0010005234F4 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BC361D1C0359005234F4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A84BC471D1C0359005234F4 /* Assets.xcassets in Resources */, + 1A84BC451D1C0359005234F4 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 14B3D7D25E503A0DB641C5FD /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-iOS/Pods-iOS-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 165BFC7166A443EB608CBD8D /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-iOSTests/Pods-iOSTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 29E28CD54375617BE9AA72C7 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOSTests/Pods-tvOSTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 5F7CEA4CFBCCAD7C891B4AB4 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-macOS/Pods-macOS-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 6341D301E595BBCBCB15AE1B /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 66D6DFC455CD55F69AC1F3FA /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 793704CBF138F3DF9E79ABF0 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 7A4FD822901F223367A54653 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOSTests/Pods-tvOSTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 88EDAF1F34DF7A96083C5E90 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-watchOS/Pods-watchOS-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 93BAC5AAFB8DA6882D0B75ED /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 99BB77F9E8A20CC16FABF04B /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-watchOS-extension/Pods-watchOS-extension-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 9DEB94EB0C787A7BC558FC82 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + B1CE7620B4418313D5AC5B80 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-macOSTests/Pods-macOSTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + B3D310E0F3E115CCA4CDEF00 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-watchOS-extension/Pods-watchOS-extension-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + B81C07ABC89B1048CC15AC24 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-macOSTests/Pods-macOSTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + C3AB7A606A2BD8599FF1BD22 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOS/Pods-tvOS-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + CA8C643C00F20E3F8282ECBA /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + CDF4BA0066EAED2C8DE2EF2D /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOS/Pods-tvOS-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + CE339679567460AAC17DBECC /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-iOSTests/Pods-iOSTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + DF49DB78DE17E4EEC73EFA24 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + E1D3201AC8B197487989E8EE /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-macOS/Pods-macOS-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + EAAF7A55FA008081E3887EBB /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + F67D1C90D29A153292B9651A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-iOS/Pods-iOS-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1A46AA4C1D1C544900E10D9D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A46AB611D1C71CB00E10D9D /* SanityTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A46AB621D1C735C00E10D9D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A46AB7A1D1C741900E10D9D /* SanityTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A46AB6E1D1C738400E10D9D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A46AB7B1D1C741A00E10D9D /* SanityTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BBD71D1BFB0D005234F4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A84BBE61D1BFB0E005234F4 /* ViewController.m in Sources */, + 1A84BBE31D1BFB0E005234F4 /* AppDelegate.m in Sources */, + 1A84BBE01D1BFB0E005234F4 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BBFD1D1BFB0E005234F4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A84BC0B1D1BFB0E005234F4 /* ExtensionDelegate.m in Sources */, + 1A84BC081D1BFB0E005234F4 /* InterfaceController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BC1C1D1C0010005234F4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A84BC2A1D1C0010005234F4 /* ViewController.m in Sources */, + 1A84BC271D1C0010005234F4 /* main.m in Sources */, + 1A84BC241D1C0010005234F4 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1A84BC341D1C0359005234F4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A84BC421D1C0359005234F4 /* ViewController.m in Sources */, + 1A84BC3F1D1C0359005234F4 /* AppDelegate.m in Sources */, + 1A84BC3C1D1C0359005234F4 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 1A84BBF51D1BFB0E005234F4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 1A84BBF11D1BFB0E005234F4 /* watchOS */; + targetProxy = 1A84BBF41D1BFB0E005234F4 /* PBXContainerItemProxy */; + }; + 1A84BC041D1BFB0E005234F4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 1A84BC001D1BFB0E005234F4 /* watchOS-extension */; + targetProxy = 1A84BC031D1BFB0E005234F4 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 1A84BBE71D1BFB0E005234F4 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1A84BBE81D1BFB0E005234F4 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 1A84BBEC1D1BFB0E005234F4 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1A84BBED1D1BFB0E005234F4 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + 1A84BBF71D1BFB0E005234F4 /* Interface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1A84BBF81D1BFB0E005234F4 /* Base */, + ); + name = Interface.storyboard; + sourceTree = ""; + }; + 1A84BC2D1D1C0010005234F4 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1A84BC2E1D1C0010005234F4 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 1A84BC431D1C0359005234F4 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1A84BC441D1C0359005234F4 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1A46AA561D1C544900E10D9D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6AE4B6F1DE912D9546E61997 /* Pods-iOSTests.debug.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Tests/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.iOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1A46AA571D1C544900E10D9D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 107DC0780200A72176B28827 /* Pods-iOSTests.release.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Tests/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.iOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Release; + }; + 1A46AB6C1D1C735D00E10D9D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 21CE3B1BB8B2A3D33C54BE59 /* Pods-macOSTests.debug.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Tests/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.macOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 1A46AB6D1D1C735D00E10D9D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9247828CB3D42AA7BA5AED53 /* Pods-macOSTests.release.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Tests/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.macOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; + 1A46AB781D1C738400E10D9D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 38F03B2DA2344C07E5EF16B1 /* Pods-tvOSTests.debug.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Tests/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.tvOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + }; + name = Debug; + }; + 1A46AB791D1C738400E10D9D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B1B1180C2C83F2AC52985AB2 /* Pods-tvOSTests.release.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Tests/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.tvOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + }; + name = Release; + }; + 1A84BC0F1D1BFB0E005234F4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + TVOS_DEPLOYMENT_TARGET = 9.0; + VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + 1A84BC101D1BFB0E005234F4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + TVOS_DEPLOYMENT_TARGET = 9.0; + VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; + 1A84BC121D1BFB0E005234F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C6B9067A24F333B91074F231 /* Pods-watchOS-extension.debug.xcconfig */; + buildSettings = { + INFOPLIST_FILE = "watchOS-extension/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.iOS.watchOS.extension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = Debug; + }; + 1A84BC131D1BFB0E005234F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D1A4E88CC1575485760915E8 /* Pods-watchOS-extension.release.xcconfig */; + buildSettings = { + INFOPLIST_FILE = "watchOS-extension/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.iOS.watchOS.extension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = Release; + }; + 1A84BC161D1BFB0E005234F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CD4BE0AB1A0D7ED88A9B68AB /* Pods-watchOS.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + IBSC_MODULE = "watchOS-extension"; + INFOPLIST_FILE = watchOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.iOS.watchOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = Debug; + }; + 1A84BC171D1BFB0E005234F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 710BEE33C9D054DF6DC501EC /* Pods-watchOS.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + IBSC_MODULE = "watchOS-extension"; + INFOPLIST_FILE = watchOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.iOS.watchOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = Release; + }; + 1A84BC1A1D1BFB0E005234F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CF86137C50AC9DC5E09BAEE5 /* Pods-iOS.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = iOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.iOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1A84BC1B1D1BFB0E005234F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A728B4A9DE20ECD75F7FDB8E /* Pods-iOS.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = iOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.iOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Release; + }; + 1A84BC311D1C0010005234F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0A4DE5B5DC624A64AA75870C /* Pods-macOS.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = macOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.macOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 1A84BC321D1C0010005234F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EE84FC3D9B36E8214BE605D6 /* Pods-macOS.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = macOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.macOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; + 1A84BC4A1D1C0359005234F4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 565504004BF40E7F504FB470 /* Pods-tvOS.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + INFOPLIST_FILE = tvOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.tvOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + }; + name = Debug; + }; + 1A84BC4B1D1C0359005234F4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6F379CB8EFD3B5F0453D5AB6 /* Pods-tvOS.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + INFOPLIST_FILE = tvOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.examples.tvOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1A46AA551D1C544900E10D9D /* Build configuration list for PBXNativeTarget "iOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A46AA561D1C544900E10D9D /* Debug */, + 1A46AA571D1C544900E10D9D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1A46AB6B1D1C735D00E10D9D /* Build configuration list for PBXNativeTarget "macOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A46AB6C1D1C735D00E10D9D /* Debug */, + 1A46AB6D1D1C735D00E10D9D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1A46AB771D1C738400E10D9D /* Build configuration list for PBXNativeTarget "tvOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A46AB781D1C738400E10D9D /* Debug */, + 1A46AB791D1C738400E10D9D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1A84BBD61D1BFB0D005234F4 /* Build configuration list for PBXProject "Examples" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A84BC0F1D1BFB0E005234F4 /* Debug */, + 1A84BC101D1BFB0E005234F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1A84BC111D1BFB0E005234F4 /* Build configuration list for PBXNativeTarget "watchOS-extension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A84BC121D1BFB0E005234F4 /* Debug */, + 1A84BC131D1BFB0E005234F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1A84BC151D1BFB0E005234F4 /* Build configuration list for PBXNativeTarget "watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A84BC161D1BFB0E005234F4 /* Debug */, + 1A84BC171D1BFB0E005234F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1A84BC191D1BFB0E005234F4 /* Build configuration list for PBXNativeTarget "iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A84BC1A1D1BFB0E005234F4 /* Debug */, + 1A84BC1B1D1BFB0E005234F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1A84BC331D1C0010005234F4 /* Build configuration list for PBXNativeTarget "macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A84BC311D1C0010005234F4 /* Debug */, + 1A84BC321D1C0010005234F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1A84BC491D1C0359005234F4 /* Build configuration list for PBXNativeTarget "tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A84BC4A1D1C0359005234F4 /* Debug */, + 1A84BC4B1D1C0359005234F4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 1A84BBD31D1BFB0D005234F4 /* Project object */; +} diff --git a/examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..25bf9070 --- /dev/null +++ b/examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/Examples.xcworkspace/contents.xcworkspacedata b/examples/Examples.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..0a69e11b --- /dev/null +++ b/examples/Examples.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/examples/Podfile b/examples/Podfile new file mode 100644 index 00000000..787bd160 --- /dev/null +++ b/examples/Podfile @@ -0,0 +1,33 @@ +use_frameworks! + +target 'iOS' do + pod 'JSONModel', path: '..' +end + +target 'macOS' do + pod 'JSONModel', path: '..' +end + +target 'tvOS' do + pod 'JSONModel', path: '..' +end + +target 'watchOS' do + pod 'JSONModel', path: '..' +end + +target 'watchOS-extension' do + pod 'JSONModel', path: '..' +end + +target 'iOSTests' do + pod 'JSONModel', path: '..' +end + +target 'macOSTests' do + pod 'JSONModel', path: '..' +end + +target 'tvOSTests' do + pod 'JSONModel', path: '..' +end diff --git a/examples/Tests/Info.plist b/examples/Tests/Info.plist new file mode 100644 index 00000000..ba72822e --- /dev/null +++ b/examples/Tests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/examples/Tests/SanityTests.m b/examples/Tests/SanityTests.m new file mode 100644 index 00000000..e8b038c2 --- /dev/null +++ b/examples/Tests/SanityTests.m @@ -0,0 +1,44 @@ +// +// SanityTests.m +// Examples +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2016 JSONModel. All rights reserved. +// + +@import XCTest; +@import JSONModel; + +@interface MyModel : JSONModel +@property (nonatomic) NSString *foo; +@property (nonatomic) NSInteger a; +@end + +@implementation MyModel +@end + +@interface SanityTests : XCTestCase +@end + +@implementation SanityTests + +- (void)testSanity +{ + XCTAssert(YES); +} + +- (void)testJsonModel +{ + NSString *json = @"{\"foo\":\"bar\", \"a\": 1}"; + + NSError *error = nil; + MyModel *obj = [[MyModel alloc] initWithString:json error:&error]; + + XCTAssertNil(error); + XCTAssertNotNil(obj); + + XCTAssertEqualObjects(obj.foo, @"bar"); + XCTAssertEqual(obj.a, 1); +} + +@end diff --git a/examples/iOS/AppDelegate.h b/examples/iOS/AppDelegate.h new file mode 100644 index 00000000..f52fdfde --- /dev/null +++ b/examples/iOS/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// iOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import UIKit; + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/examples/iOS/AppDelegate.m b/examples/iOS/AppDelegate.m new file mode 100644 index 00000000..d5ed89ec --- /dev/null +++ b/examples/iOS/AppDelegate.m @@ -0,0 +1,18 @@ +// +// AppDelegate.m +// iOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +#import "AppDelegate.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + return YES; +} + +@end diff --git a/examples/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..118c98f7 --- /dev/null +++ b/examples/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/iOS/Base.lproj/LaunchScreen.storyboard b/examples/iOS/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..2e721e18 --- /dev/null +++ b/examples/iOS/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/iOS/Base.lproj/Main.storyboard b/examples/iOS/Base.lproj/Main.storyboard new file mode 100644 index 00000000..ada9d7ff --- /dev/null +++ b/examples/iOS/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/iOS/Info.plist b/examples/iOS/Info.plist new file mode 100644 index 00000000..06c072a1 --- /dev/null +++ b/examples/iOS/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + JSONModel + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/examples/iOS/ViewController.h b/examples/iOS/ViewController.h new file mode 100644 index 00000000..a4f41ebf --- /dev/null +++ b/examples/iOS/ViewController.h @@ -0,0 +1,13 @@ +// +// ViewController.h +// iOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import UIKit; + +@interface ViewController : UIViewController + +@end diff --git a/examples/iOS/ViewController.m b/examples/iOS/ViewController.m new file mode 100644 index 00000000..61683a76 --- /dev/null +++ b/examples/iOS/ViewController.m @@ -0,0 +1,13 @@ +// +// ViewController.m +// iOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +#import "ViewController.h" + +@implementation ViewController + +@end diff --git a/examples/iOS/main.m b/examples/iOS/main.m new file mode 100644 index 00000000..bd1e410c --- /dev/null +++ b/examples/iOS/main.m @@ -0,0 +1,19 @@ +// +// main.m +// iOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import UIKit; + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool + { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/examples/macOS/AppDelegate.h b/examples/macOS/AppDelegate.h new file mode 100644 index 00000000..40445919 --- /dev/null +++ b/examples/macOS/AppDelegate.h @@ -0,0 +1,13 @@ +// +// AppDelegate.h +// macOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import Cocoa; + +@interface AppDelegate : NSObject + +@end diff --git a/examples/macOS/AppDelegate.m b/examples/macOS/AppDelegate.m new file mode 100644 index 00000000..1442f89a --- /dev/null +++ b/examples/macOS/AppDelegate.m @@ -0,0 +1,13 @@ +// +// AppDelegate.m +// macOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +#import "AppDelegate.h" + +@implementation AppDelegate + +@end diff --git a/examples/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..2db2b1c7 --- /dev/null +++ b/examples/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/macOS/Base.lproj/Main.storyboard b/examples/macOS/Base.lproj/Main.storyboard new file mode 100644 index 00000000..1f52b501 --- /dev/null +++ b/examples/macOS/Base.lproj/Main.storyboard @@ -0,0 +1,682 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/macOS/Info.plist b/examples/macOS/Info.plist new file mode 100644 index 00000000..a1723878 --- /dev/null +++ b/examples/macOS/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + JSONModel + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2012-2016, JSONModel contributors. MIT licensed. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + + diff --git a/examples/macOS/ViewController.h b/examples/macOS/ViewController.h new file mode 100644 index 00000000..fc690760 --- /dev/null +++ b/examples/macOS/ViewController.h @@ -0,0 +1,13 @@ +// +// ViewController.h +// macOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import Cocoa; + +@interface ViewController : NSViewController + +@end diff --git a/examples/macOS/ViewController.m b/examples/macOS/ViewController.m new file mode 100644 index 00000000..b9bf7af7 --- /dev/null +++ b/examples/macOS/ViewController.m @@ -0,0 +1,13 @@ +// +// ViewController.m +// macOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +#import "ViewController.h" + +@implementation ViewController + +@end diff --git a/examples/macOS/main.m b/examples/macOS/main.m new file mode 100644 index 00000000..3b27b59f --- /dev/null +++ b/examples/macOS/main.m @@ -0,0 +1,14 @@ +// +// main.m +// macOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import Cocoa; + +int main(int argc, const char * argv[]) +{ + return NSApplicationMain(argc, argv); +} diff --git a/examples/tvOS/AppDelegate.h b/examples/tvOS/AppDelegate.h new file mode 100644 index 00000000..2877eb05 --- /dev/null +++ b/examples/tvOS/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// tvOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import UIKit; + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/examples/tvOS/AppDelegate.m b/examples/tvOS/AppDelegate.m new file mode 100644 index 00000000..72379da5 --- /dev/null +++ b/examples/tvOS/AppDelegate.m @@ -0,0 +1,18 @@ +// +// AppDelegate.m +// tvOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +#import "AppDelegate.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + return YES; +} + +@end diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..0564959f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json new file mode 100644 index 00000000..8bf75d9f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..0564959f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..0564959f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..0564959f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json new file mode 100644 index 00000000..8bf75d9f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..0564959f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..0564959f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json new file mode 100644 index 00000000..dea6e49f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -0,0 +1,32 @@ +{ + "assets" : [ + { + "size" : "1280x768", + "idiom" : "tv", + "filename" : "App Icon - Large.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "App Icon - Small.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "2320x720", + "idiom" : "tv", + "filename" : "Top Shelf Image Wide.imageset", + "role" : "top-shelf-image-wide" + }, + { + "size" : "1920x720", + "idiom" : "tv", + "filename" : "Top Shelf Image.imageset", + "role" : "top-shelf-image" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 00000000..0564959f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 00000000..0564959f --- /dev/null +++ b/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/Contents.json b/examples/tvOS/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/examples/tvOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/examples/tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 00000000..29d94c78 --- /dev/null +++ b/examples/tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "orientation" : "landscape", + "idiom" : "tv", + "extent" : "full-screen", + "minimum-system-version" : "9.0", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/tvOS/Base.lproj/Main.storyboard b/examples/tvOS/Base.lproj/Main.storyboard new file mode 100644 index 00000000..3771b7f2 --- /dev/null +++ b/examples/tvOS/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/tvOS/Info.plist b/examples/tvOS/Info.plist new file mode 100644 index 00000000..2523f223 --- /dev/null +++ b/examples/tvOS/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + JSONModel + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + arm64 + + + diff --git a/examples/tvOS/ViewController.h b/examples/tvOS/ViewController.h new file mode 100644 index 00000000..307df8af --- /dev/null +++ b/examples/tvOS/ViewController.h @@ -0,0 +1,13 @@ +// +// ViewController.h +// tvOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import UIKit; + +@interface ViewController : UIViewController + +@end diff --git a/examples/tvOS/ViewController.m b/examples/tvOS/ViewController.m new file mode 100644 index 00000000..efc7bcb4 --- /dev/null +++ b/examples/tvOS/ViewController.m @@ -0,0 +1,13 @@ +// +// ViewController.m +// tvOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +#import "ViewController.h" + +@implementation ViewController + +@end diff --git a/examples/tvOS/main.m b/examples/tvOS/main.m new file mode 100644 index 00000000..ac5f1a97 --- /dev/null +++ b/examples/tvOS/main.m @@ -0,0 +1,19 @@ +// +// main.m +// tvOS +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import UIKit; + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool + { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/examples/watchOS-extension/ExtensionDelegate.h b/examples/watchOS-extension/ExtensionDelegate.h new file mode 100644 index 00000000..ff011dc6 --- /dev/null +++ b/examples/watchOS-extension/ExtensionDelegate.h @@ -0,0 +1,13 @@ +// +// ExtensionDelegate.h +// watchOS-extension +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import WatchKit; + +@interface ExtensionDelegate : NSObject + +@end diff --git a/examples/watchOS-extension/ExtensionDelegate.m b/examples/watchOS-extension/ExtensionDelegate.m new file mode 100644 index 00000000..3f3e1282 --- /dev/null +++ b/examples/watchOS-extension/ExtensionDelegate.m @@ -0,0 +1,13 @@ +// +// ExtensionDelegate.m +// watchOS-extension +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +#import "ExtensionDelegate.h" + +@implementation ExtensionDelegate + +@end diff --git a/examples/watchOS-extension/Info.plist b/examples/watchOS-extension/Info.plist new file mode 100644 index 00000000..500cc6c0 --- /dev/null +++ b/examples/watchOS-extension/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + JSONModel + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSExtension + + NSExtensionAttributes + + WKAppBundleIdentifier + com.jsonmodel.examples.iOS.watchOS + + NSExtensionPointIdentifier + com.apple.watchkit + + WKExtensionDelegateClassName + ExtensionDelegate + + diff --git a/examples/watchOS-extension/InterfaceController.h b/examples/watchOS-extension/InterfaceController.h new file mode 100644 index 00000000..48f0640a --- /dev/null +++ b/examples/watchOS-extension/InterfaceController.h @@ -0,0 +1,13 @@ +// +// InterfaceController.h +// watchOS-extension +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +@import WatchKit; + +@interface InterfaceController : WKInterfaceController + +@end diff --git a/examples/watchOS-extension/InterfaceController.m b/examples/watchOS-extension/InterfaceController.m new file mode 100644 index 00000000..cd9b84ff --- /dev/null +++ b/examples/watchOS-extension/InterfaceController.m @@ -0,0 +1,13 @@ +// +// InterfaceController.m +// watchOS-extension +// +// Created by James Billingham on 23/06/2016. +// Copyright © 2012-2016, JSONModel contributors. MIT licensed. +// + +#import "InterfaceController.h" + +@implementation InterfaceController + +@end diff --git a/examples/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..dd221ba5 --- /dev/null +++ b/examples/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,55 @@ +{ + "images" : [ + { + "size" : "24x24", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "38mm" + }, + { + "size" : "27.5x27.5", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "42mm" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "38mm" + }, + { + "size" : "86x86", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "38mm" + }, + { + "size" : "98x98", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "42mm" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/examples/watchOS/Base.lproj/Interface.storyboard b/examples/watchOS/Base.lproj/Interface.storyboard new file mode 100644 index 00000000..5f52cb6c --- /dev/null +++ b/examples/watchOS/Base.lproj/Interface.storyboard @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/examples/watchOS/Info.plist b/examples/watchOS/Info.plist new file mode 100644 index 00000000..9429bdad --- /dev/null +++ b/examples/watchOS/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + JSONModel + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + WKCompanionAppBundleIdentifier + com.jsonmodel.examples.iOS + WKWatchKitApp + + + From b70fb580380118939b42fac90c9632907aca7490 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 21:58:23 +0100 Subject: [PATCH 088/171] Added all unit tests --- examples/Examples.xcodeproj/project.pbxproj | 548 +++++ examples/Tests/ArrayTests.m | 100 + examples/Tests/BuiltInConversionsTests.m | 83 + examples/Tests/CustomPropsTests.m | 51 + examples/Tests/Data/colors.json | 4 + examples/Tests/Data/converts.json | 21 + examples/Tests/Data/github-iphone.json | 1804 +++++++++++++++++ examples/Tests/Data/jsonTypes.json | 14 + examples/Tests/Data/nestedData.json | 15 + .../Tests/Data/nestedDataWithArrayError.json | 15 + .../Data/nestedDataWithDictionaryError.json | 15 + .../nestedDataWithTypeMismatchOnImages.json | 15 + ...tedDataWithTypeMismatchOnImagesObject.json | 15 + examples/Tests/Data/post.json | 9 + examples/Tests/Data/primitives.json | 11 + examples/Tests/Data/primitivesWithErrors.json | 10 + examples/Tests/Data/specialPropertyName.json | 5 + examples/Tests/Data/withOptProp.json | 4 + examples/Tests/Data/withoutOptProp.json | 3 + examples/Tests/ExtremeNestingTests.m | 69 + examples/Tests/IdPropertyTests.m | 60 + examples/Tests/InitWithDataTests.m | 141 ++ examples/Tests/JSONTypesReadTests.m | 70 + examples/Tests/KeyMappingTests.m | 320 +++ .../Models/Headers/BuiltInConversionsModel.h | 33 + .../Tests/Models/Headers/CopyrightModel.h | 16 + .../Models/Headers/CustomPropertyModel.h | 22 + examples/Tests/Models/Headers/DrugModel.h | 16 + examples/Tests/Models/Headers/EnumModel.h | 36 + .../Models/Headers/ExtremeNestingModel.h | 15 + .../Models/Headers/GitHubKeyMapRepoModel.h | 21 + .../Headers/GitHubKeyMapRepoModelDict.h | 13 + .../Tests/Models/Headers/GitHubRepoModel.h | 28 + .../Headers/GitHubRepoModelForUSMapper.h | 19 + examples/Tests/Models/Headers/ImageModel.h | 19 + .../Tests/Models/Headers/InteractionModel.h | 14 + .../Tests/Models/Headers/JSONTypesModel.h | 23 + .../Headers/JSONTypesModelWithValidation1.h | 13 + .../Headers/JSONTypesModelWithValidation2.h | 13 + .../Headers/JSONValueTransformer+UIColor.h | 25 + .../Models/Headers/ModelForUpperCaseMapper.h | 12 + examples/Tests/Models/Headers/NestedModel.h | 20 + .../Tests/Models/Headers/OptionalPropModel.h | 20 + examples/Tests/Models/Headers/PostModel.h | 20 + examples/Tests/Models/Headers/PostsModel.h | 17 + .../Tests/Models/Headers/PrimitivesModel.h | 21 + .../Models/Headers/RenamedPropertyModel.h | 16 + examples/Tests/Models/Headers/ReposModel.h | 23 + .../Tests/Models/Headers/RpcRequestModel.h | 17 + .../Models/Headers/SpecialPropertyModel.h | 17 + .../Implementations/BuiltInConversionsModel.m | 12 + .../Models/Implementations/CopyrightModel.m | 12 + .../Implementations/CustomPropertyModel.m | 12 + .../Tests/Models/Implementations/DrugModel.m | 9 + .../Tests/Models/Implementations/EnumModel.m | 62 + .../Implementations/ExtremeNestingModel.m | 18 + .../Implementations/GitHubKeyMapRepoModel.m | 24 + .../GitHubKeyMapRepoModelDict.m | 18 + .../Models/Implementations/GitHubRepoModel.m | 12 + .../GitHubRepoModelForUSMapper.m | 18 + .../Tests/Models/Implementations/ImageModel.m | 12 + .../Models/Implementations/InteractionModel.m | 9 + .../Models/Implementations/JSONTypesModel.m | 12 + .../JSONTypesModelWithValidation1.m | 23 + .../JSONTypesModelWithValidation2.m | 23 + .../JSONValueTransformer+UIColor.m | 53 + .../Implementations/ModelForUpperCaseMapper.m | 15 + .../Models/Implementations/NestedModel.m | 12 + .../Implementations/OptionalPropModel.m | 24 + .../Tests/Models/Implementations/PostModel.m | 12 + .../Tests/Models/Implementations/PostsModel.m | 12 + .../Models/Implementations/PrimitivesModel.m | 12 + .../Implementations/RenamedPropertyModel.m | 19 + .../Tests/Models/Implementations/ReposModel.m | 27 + .../Models/Implementations/RpcRequestModel.m | 12 + .../Implementations/SpecialPropertyModel.m | 12 + examples/Tests/NestedModelsTests.m | 56 + examples/Tests/OptionalPropertiesTests.m | 65 + examples/Tests/PersistTests.m | 117 ++ examples/Tests/PrimitiveTypesReadTests.m | 84 + examples/Tests/SanityTests.m | 2 +- examples/Tests/SimpleDataErrorTests.m | 164 ++ examples/Tests/SpecialPropertiesTests.m | 86 + examples/Tests/SpecialPropertyNameTests.m | 39 + examples/Tests/SpecialValuesTests.m | 50 + examples/Tests/ValidationTests.m | 70 + 86 files changed, 5129 insertions(+), 1 deletion(-) create mode 100644 examples/Tests/ArrayTests.m create mode 100644 examples/Tests/BuiltInConversionsTests.m create mode 100644 examples/Tests/CustomPropsTests.m create mode 100644 examples/Tests/Data/colors.json create mode 100644 examples/Tests/Data/converts.json create mode 100644 examples/Tests/Data/github-iphone.json create mode 100644 examples/Tests/Data/jsonTypes.json create mode 100644 examples/Tests/Data/nestedData.json create mode 100644 examples/Tests/Data/nestedDataWithArrayError.json create mode 100644 examples/Tests/Data/nestedDataWithDictionaryError.json create mode 100644 examples/Tests/Data/nestedDataWithTypeMismatchOnImages.json create mode 100644 examples/Tests/Data/nestedDataWithTypeMismatchOnImagesObject.json create mode 100644 examples/Tests/Data/post.json create mode 100644 examples/Tests/Data/primitives.json create mode 100644 examples/Tests/Data/primitivesWithErrors.json create mode 100644 examples/Tests/Data/specialPropertyName.json create mode 100644 examples/Tests/Data/withOptProp.json create mode 100644 examples/Tests/Data/withoutOptProp.json create mode 100644 examples/Tests/ExtremeNestingTests.m create mode 100644 examples/Tests/IdPropertyTests.m create mode 100644 examples/Tests/InitWithDataTests.m create mode 100644 examples/Tests/JSONTypesReadTests.m create mode 100644 examples/Tests/KeyMappingTests.m create mode 100644 examples/Tests/Models/Headers/BuiltInConversionsModel.h create mode 100644 examples/Tests/Models/Headers/CopyrightModel.h create mode 100644 examples/Tests/Models/Headers/CustomPropertyModel.h create mode 100644 examples/Tests/Models/Headers/DrugModel.h create mode 100644 examples/Tests/Models/Headers/EnumModel.h create mode 100644 examples/Tests/Models/Headers/ExtremeNestingModel.h create mode 100644 examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h create mode 100644 examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h create mode 100644 examples/Tests/Models/Headers/GitHubRepoModel.h create mode 100644 examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h create mode 100644 examples/Tests/Models/Headers/ImageModel.h create mode 100644 examples/Tests/Models/Headers/InteractionModel.h create mode 100644 examples/Tests/Models/Headers/JSONTypesModel.h create mode 100644 examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h create mode 100644 examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h create mode 100644 examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h create mode 100644 examples/Tests/Models/Headers/ModelForUpperCaseMapper.h create mode 100644 examples/Tests/Models/Headers/NestedModel.h create mode 100644 examples/Tests/Models/Headers/OptionalPropModel.h create mode 100644 examples/Tests/Models/Headers/PostModel.h create mode 100644 examples/Tests/Models/Headers/PostsModel.h create mode 100644 examples/Tests/Models/Headers/PrimitivesModel.h create mode 100644 examples/Tests/Models/Headers/RenamedPropertyModel.h create mode 100644 examples/Tests/Models/Headers/ReposModel.h create mode 100644 examples/Tests/Models/Headers/RpcRequestModel.h create mode 100644 examples/Tests/Models/Headers/SpecialPropertyModel.h create mode 100644 examples/Tests/Models/Implementations/BuiltInConversionsModel.m create mode 100644 examples/Tests/Models/Implementations/CopyrightModel.m create mode 100644 examples/Tests/Models/Implementations/CustomPropertyModel.m create mode 100644 examples/Tests/Models/Implementations/DrugModel.m create mode 100644 examples/Tests/Models/Implementations/EnumModel.m create mode 100644 examples/Tests/Models/Implementations/ExtremeNestingModel.m create mode 100644 examples/Tests/Models/Implementations/GitHubKeyMapRepoModel.m create mode 100644 examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m create mode 100644 examples/Tests/Models/Implementations/GitHubRepoModel.m create mode 100644 examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m create mode 100644 examples/Tests/Models/Implementations/ImageModel.m create mode 100644 examples/Tests/Models/Implementations/InteractionModel.m create mode 100644 examples/Tests/Models/Implementations/JSONTypesModel.m create mode 100644 examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m create mode 100644 examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m create mode 100644 examples/Tests/Models/Implementations/JSONValueTransformer+UIColor.m create mode 100644 examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m create mode 100644 examples/Tests/Models/Implementations/NestedModel.m create mode 100644 examples/Tests/Models/Implementations/OptionalPropModel.m create mode 100644 examples/Tests/Models/Implementations/PostModel.m create mode 100644 examples/Tests/Models/Implementations/PostsModel.m create mode 100644 examples/Tests/Models/Implementations/PrimitivesModel.m create mode 100644 examples/Tests/Models/Implementations/RenamedPropertyModel.m create mode 100644 examples/Tests/Models/Implementations/ReposModel.m create mode 100644 examples/Tests/Models/Implementations/RpcRequestModel.m create mode 100644 examples/Tests/Models/Implementations/SpecialPropertyModel.m create mode 100644 examples/Tests/NestedModelsTests.m create mode 100644 examples/Tests/OptionalPropertiesTests.m create mode 100644 examples/Tests/PersistTests.m create mode 100644 examples/Tests/PrimitiveTypesReadTests.m create mode 100644 examples/Tests/SimpleDataErrorTests.m create mode 100644 examples/Tests/SpecialPropertiesTests.m create mode 100644 examples/Tests/SpecialPropertyNameTests.m create mode 100644 examples/Tests/SpecialValuesTests.m create mode 100644 examples/Tests/ValidationTests.m diff --git a/examples/Examples.xcodeproj/project.pbxproj b/examples/Examples.xcodeproj/project.pbxproj index 964f731a..0da20903 100644 --- a/examples/Examples.xcodeproj/project.pbxproj +++ b/examples/Examples.xcodeproj/project.pbxproj @@ -11,6 +11,180 @@ 1A46AB611D1C71CB00E10D9D /* SanityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A46AB601D1C71CB00E10D9D /* SanityTests.m */; }; 1A46AB7A1D1C741900E10D9D /* SanityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A46AB601D1C71CB00E10D9D /* SanityTests.m */; }; 1A46AB7B1D1C741A00E10D9D /* SanityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A46AB601D1C71CB00E10D9D /* SanityTests.m */; }; + 1A4BAA5F1D1C79460069D735 /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FB1D1C79260069D735 /* ArrayTests.m */; }; + 1A4BAA601D1C79460069D735 /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FC1D1C79260069D735 /* BuiltInConversionsTests.m */; }; + 1A4BAA611D1C79460069D735 /* CustomPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FD1D1C79260069D735 /* CustomPropsTests.m */; }; + 1A4BAA621D1C79460069D735 /* ExtremeNestingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0E1D1C79260069D735 /* ExtremeNestingTests.m */; }; + 1A4BAA641D1C79460069D735 /* IdPropertyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA101D1C79260069D735 /* IdPropertyTests.m */; }; + 1A4BAA661D1C79460069D735 /* InitWithDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA121D1C79260069D735 /* InitWithDataTests.m */; }; + 1A4BAA681D1C79460069D735 /* JSONTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA141D1C79260069D735 /* JSONTypesReadTests.m */; }; + 1A4BAA691D1C79460069D735 /* KeyMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA151D1C79260069D735 /* KeyMappingTests.m */; }; + 1A4BAA6A1D1C79460069D735 /* NestedModelsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA311D1C79260069D735 /* NestedModelsTests.m */; }; + 1A4BAA6B1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA321D1C79260069D735 /* OptionalPropertiesTests.m */; }; + 1A4BAA6C1D1C79460069D735 /* PersistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA331D1C79260069D735 /* PersistTests.m */; }; + 1A4BAA6D1D1C79460069D735 /* PrimitiveTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA341D1C79260069D735 /* PrimitiveTypesReadTests.m */; }; + 1A4BAA6E1D1C79460069D735 /* SimpleDataErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA351D1C79260069D735 /* SimpleDataErrorTests.m */; }; + 1A4BAA6F1D1C79460069D735 /* SpecialPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA361D1C79260069D735 /* SpecialPropertiesTests.m */; }; + 1A4BAA701D1C79460069D735 /* SpecialPropertyNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA371D1C79260069D735 /* SpecialPropertyNameTests.m */; }; + 1A4BAA711D1C79460069D735 /* SpecialValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA381D1C79260069D735 /* SpecialValuesTests.m */; }; + 1A4BAA721D1C79460069D735 /* ValidationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA391D1C79260069D735 /* ValidationTests.m */; }; + 1A4BAA731D1C79460069D735 /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FB1D1C79260069D735 /* ArrayTests.m */; }; + 1A4BAA741D1C79460069D735 /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FC1D1C79260069D735 /* BuiltInConversionsTests.m */; }; + 1A4BAA751D1C79460069D735 /* CustomPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FD1D1C79260069D735 /* CustomPropsTests.m */; }; + 1A4BAA761D1C79460069D735 /* ExtremeNestingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0E1D1C79260069D735 /* ExtremeNestingTests.m */; }; + 1A4BAA781D1C79460069D735 /* IdPropertyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA101D1C79260069D735 /* IdPropertyTests.m */; }; + 1A4BAA7A1D1C79460069D735 /* InitWithDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA121D1C79260069D735 /* InitWithDataTests.m */; }; + 1A4BAA7C1D1C79460069D735 /* JSONTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA141D1C79260069D735 /* JSONTypesReadTests.m */; }; + 1A4BAA7D1D1C79460069D735 /* KeyMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA151D1C79260069D735 /* KeyMappingTests.m */; }; + 1A4BAA7E1D1C79460069D735 /* NestedModelsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA311D1C79260069D735 /* NestedModelsTests.m */; }; + 1A4BAA7F1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA321D1C79260069D735 /* OptionalPropertiesTests.m */; }; + 1A4BAA801D1C79460069D735 /* PersistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA331D1C79260069D735 /* PersistTests.m */; }; + 1A4BAA811D1C79460069D735 /* PrimitiveTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA341D1C79260069D735 /* PrimitiveTypesReadTests.m */; }; + 1A4BAA821D1C79460069D735 /* SimpleDataErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA351D1C79260069D735 /* SimpleDataErrorTests.m */; }; + 1A4BAA831D1C79460069D735 /* SpecialPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA361D1C79260069D735 /* SpecialPropertiesTests.m */; }; + 1A4BAA841D1C79460069D735 /* SpecialPropertyNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA371D1C79260069D735 /* SpecialPropertyNameTests.m */; }; + 1A4BAA851D1C79460069D735 /* SpecialValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA381D1C79260069D735 /* SpecialValuesTests.m */; }; + 1A4BAA861D1C79460069D735 /* ValidationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA391D1C79260069D735 /* ValidationTests.m */; }; + 1A4BAA871D1C79480069D735 /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FB1D1C79260069D735 /* ArrayTests.m */; }; + 1A4BAA881D1C79480069D735 /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FC1D1C79260069D735 /* BuiltInConversionsTests.m */; }; + 1A4BAA891D1C79480069D735 /* CustomPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FD1D1C79260069D735 /* CustomPropsTests.m */; }; + 1A4BAA8A1D1C79480069D735 /* ExtremeNestingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0E1D1C79260069D735 /* ExtremeNestingTests.m */; }; + 1A4BAA8C1D1C79480069D735 /* IdPropertyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA101D1C79260069D735 /* IdPropertyTests.m */; }; + 1A4BAA8E1D1C79480069D735 /* InitWithDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA121D1C79260069D735 /* InitWithDataTests.m */; }; + 1A4BAA901D1C79480069D735 /* JSONTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA141D1C79260069D735 /* JSONTypesReadTests.m */; }; + 1A4BAA911D1C79480069D735 /* KeyMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA151D1C79260069D735 /* KeyMappingTests.m */; }; + 1A4BAA921D1C79480069D735 /* NestedModelsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA311D1C79260069D735 /* NestedModelsTests.m */; }; + 1A4BAA931D1C79480069D735 /* OptionalPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA321D1C79260069D735 /* OptionalPropertiesTests.m */; }; + 1A4BAA941D1C79480069D735 /* PersistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA331D1C79260069D735 /* PersistTests.m */; }; + 1A4BAA951D1C79480069D735 /* PrimitiveTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA341D1C79260069D735 /* PrimitiveTypesReadTests.m */; }; + 1A4BAA961D1C79480069D735 /* SimpleDataErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA351D1C79260069D735 /* SimpleDataErrorTests.m */; }; + 1A4BAA971D1C79480069D735 /* SpecialPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA361D1C79260069D735 /* SpecialPropertiesTests.m */; }; + 1A4BAA981D1C79480069D735 /* SpecialPropertyNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA371D1C79260069D735 /* SpecialPropertyNameTests.m */; }; + 1A4BAA991D1C79480069D735 /* SpecialValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA381D1C79260069D735 /* SpecialValuesTests.m */; }; + 1A4BAA9A1D1C79480069D735 /* ValidationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAA391D1C79260069D735 /* ValidationTests.m */; }; + 1A4BAA9B1D1C79550069D735 /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FF1D1C79260069D735 /* colors.json */; }; + 1A4BAA9C1D1C79550069D735 /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA001D1C79260069D735 /* converts.json */; }; + 1A4BAA9D1D1C79550069D735 /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA011D1C79260069D735 /* github-iphone.json */; }; + 1A4BAA9E1D1C79550069D735 /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA021D1C79260069D735 /* jsonTypes.json */; }; + 1A4BAA9F1D1C79550069D735 /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA031D1C79260069D735 /* nestedData.json */; }; + 1A4BAAA01D1C79550069D735 /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA041D1C79260069D735 /* nestedDataWithArrayError.json */; }; + 1A4BAAA11D1C79550069D735 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA051D1C79260069D735 /* nestedDataWithDictionaryError.json */; }; + 1A4BAAA21D1C79550069D735 /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA061D1C79260069D735 /* nestedDataWithTypeMismatchOnImages.json */; }; + 1A4BAAA31D1C79550069D735 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA071D1C79260069D735 /* nestedDataWithTypeMismatchOnImagesObject.json */; }; + 1A4BAAA41D1C79550069D735 /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA081D1C79260069D735 /* post.json */; }; + 1A4BAAA51D1C79550069D735 /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA091D1C79260069D735 /* primitives.json */; }; + 1A4BAAA61D1C79550069D735 /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0A1D1C79260069D735 /* primitivesWithErrors.json */; }; + 1A4BAAA71D1C79550069D735 /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0B1D1C79260069D735 /* specialPropertyName.json */; }; + 1A4BAAA81D1C79550069D735 /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0C1D1C79260069D735 /* withOptProp.json */; }; + 1A4BAAA91D1C79550069D735 /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0D1D1C79260069D735 /* withoutOptProp.json */; }; + 1A4BAAAA1D1C79550069D735 /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FF1D1C79260069D735 /* colors.json */; }; + 1A4BAAAB1D1C79550069D735 /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA001D1C79260069D735 /* converts.json */; }; + 1A4BAAAC1D1C79550069D735 /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA011D1C79260069D735 /* github-iphone.json */; }; + 1A4BAAAD1D1C79550069D735 /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA021D1C79260069D735 /* jsonTypes.json */; }; + 1A4BAAAE1D1C79550069D735 /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA031D1C79260069D735 /* nestedData.json */; }; + 1A4BAAAF1D1C79550069D735 /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA041D1C79260069D735 /* nestedDataWithArrayError.json */; }; + 1A4BAAB01D1C79550069D735 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA051D1C79260069D735 /* nestedDataWithDictionaryError.json */; }; + 1A4BAAB11D1C79550069D735 /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA061D1C79260069D735 /* nestedDataWithTypeMismatchOnImages.json */; }; + 1A4BAAB21D1C79550069D735 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA071D1C79260069D735 /* nestedDataWithTypeMismatchOnImagesObject.json */; }; + 1A4BAAB31D1C79550069D735 /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA081D1C79260069D735 /* post.json */; }; + 1A4BAAB41D1C79550069D735 /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA091D1C79260069D735 /* primitives.json */; }; + 1A4BAAB51D1C79550069D735 /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0A1D1C79260069D735 /* primitivesWithErrors.json */; }; + 1A4BAAB61D1C79550069D735 /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0B1D1C79260069D735 /* specialPropertyName.json */; }; + 1A4BAAB71D1C79550069D735 /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0C1D1C79260069D735 /* withOptProp.json */; }; + 1A4BAAB81D1C79550069D735 /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0D1D1C79260069D735 /* withoutOptProp.json */; }; + 1A4BAAB91D1C79560069D735 /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BA9FF1D1C79260069D735 /* colors.json */; }; + 1A4BAABA1D1C79560069D735 /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA001D1C79260069D735 /* converts.json */; }; + 1A4BAABB1D1C79560069D735 /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA011D1C79260069D735 /* github-iphone.json */; }; + 1A4BAABC1D1C79560069D735 /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA021D1C79260069D735 /* jsonTypes.json */; }; + 1A4BAABD1D1C79560069D735 /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA031D1C79260069D735 /* nestedData.json */; }; + 1A4BAABE1D1C79560069D735 /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA041D1C79260069D735 /* nestedDataWithArrayError.json */; }; + 1A4BAABF1D1C79560069D735 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA051D1C79260069D735 /* nestedDataWithDictionaryError.json */; }; + 1A4BAAC01D1C79560069D735 /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA061D1C79260069D735 /* nestedDataWithTypeMismatchOnImages.json */; }; + 1A4BAAC11D1C79560069D735 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA071D1C79260069D735 /* nestedDataWithTypeMismatchOnImagesObject.json */; }; + 1A4BAAC21D1C79560069D735 /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA081D1C79260069D735 /* post.json */; }; + 1A4BAAC31D1C79560069D735 /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA091D1C79260069D735 /* primitives.json */; }; + 1A4BAAC41D1C79560069D735 /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0A1D1C79260069D735 /* primitivesWithErrors.json */; }; + 1A4BAAC51D1C79560069D735 /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0B1D1C79260069D735 /* specialPropertyName.json */; }; + 1A4BAAC61D1C79560069D735 /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0C1D1C79260069D735 /* withOptProp.json */; }; + 1A4BAAC71D1C79560069D735 /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A4BAA0D1D1C79260069D735 /* withoutOptProp.json */; }; + 1A4BAB051D1C7DA80069D735 /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD11D1C7D590069D735 /* BuiltInConversionsModel.m */; }; + 1A4BAB061D1C7DA80069D735 /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD21D1C7D590069D735 /* CopyrightModel.m */; }; + 1A4BAB071D1C7DA80069D735 /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD31D1C7D590069D735 /* CustomPropertyModel.m */; }; + 1A4BAB081D1C7DA80069D735 /* DrugModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD41D1C7D590069D735 /* DrugModel.m */; }; + 1A4BAB091D1C7DA80069D735 /* EnumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD51D1C7D590069D735 /* EnumModel.m */; }; + 1A4BAB0A1D1C7DA80069D735 /* ExtremeNestingModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD61D1C7D590069D735 /* ExtremeNestingModel.m */; }; + 1A4BAB0B1D1C7DA80069D735 /* GitHubKeyMapRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD71D1C7D590069D735 /* GitHubKeyMapRepoModel.m */; }; + 1A4BAB0C1D1C7DA80069D735 /* GitHubKeyMapRepoModelDict.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD81D1C7D590069D735 /* GitHubKeyMapRepoModelDict.m */; }; + 1A4BAB0D1D1C7DA80069D735 /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD91D1C7D590069D735 /* GitHubRepoModel.m */; }; + 1A4BAB0E1D1C7DA80069D735 /* GitHubRepoModelForUSMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADA1D1C7D590069D735 /* GitHubRepoModelForUSMapper.m */; }; + 1A4BAB0F1D1C7DA80069D735 /* ImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADB1D1C7D590069D735 /* ImageModel.m */; }; + 1A4BAB101D1C7DA80069D735 /* InteractionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADC1D1C7D590069D735 /* InteractionModel.m */; }; + 1A4BAB111D1C7DA80069D735 /* JSONTypesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADD1D1C7D590069D735 /* JSONTypesModel.m */; }; + 1A4BAB121D1C7DA80069D735 /* JSONTypesModelWithValidation1.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADE1D1C7D590069D735 /* JSONTypesModelWithValidation1.m */; }; + 1A4BAB131D1C7DA80069D735 /* JSONTypesModelWithValidation2.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADF1D1C7D590069D735 /* JSONTypesModelWithValidation2.m */; }; + 1A4BAB141D1C7DA80069D735 /* JSONValueTransformer+UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE01D1C7D590069D735 /* JSONValueTransformer+UIColor.m */; }; + 1A4BAB151D1C7DA80069D735 /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE11D1C7D590069D735 /* ModelForUpperCaseMapper.m */; }; + 1A4BAB161D1C7DA80069D735 /* NestedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE21D1C7D590069D735 /* NestedModel.m */; }; + 1A4BAB171D1C7DA80069D735 /* OptionalPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE31D1C7D590069D735 /* OptionalPropModel.m */; }; + 1A4BAB181D1C7DA80069D735 /* PostModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE41D1C7D590069D735 /* PostModel.m */; }; + 1A4BAB191D1C7DA80069D735 /* PostsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE51D1C7D590069D735 /* PostsModel.m */; }; + 1A4BAB1A1D1C7DA80069D735 /* PrimitivesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE61D1C7D590069D735 /* PrimitivesModel.m */; }; + 1A4BAB1B1D1C7DA80069D735 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE71D1C7D590069D735 /* RenamedPropertyModel.m */; }; + 1A4BAB1C1D1C7DA80069D735 /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE81D1C7D590069D735 /* ReposModel.m */; }; + 1A4BAB1D1D1C7DA80069D735 /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE91D1C7D590069D735 /* RpcRequestModel.m */; }; + 1A4BAB1E1D1C7DA80069D735 /* SpecialPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAEA1D1C7D590069D735 /* SpecialPropertyModel.m */; }; + 1A4BAB1F1D1C7DA80069D735 /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD11D1C7D590069D735 /* BuiltInConversionsModel.m */; }; + 1A4BAB201D1C7DA80069D735 /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD21D1C7D590069D735 /* CopyrightModel.m */; }; + 1A4BAB211D1C7DA80069D735 /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD31D1C7D590069D735 /* CustomPropertyModel.m */; }; + 1A4BAB221D1C7DA80069D735 /* DrugModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD41D1C7D590069D735 /* DrugModel.m */; }; + 1A4BAB231D1C7DA80069D735 /* EnumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD51D1C7D590069D735 /* EnumModel.m */; }; + 1A4BAB241D1C7DA80069D735 /* ExtremeNestingModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD61D1C7D590069D735 /* ExtremeNestingModel.m */; }; + 1A4BAB251D1C7DA80069D735 /* GitHubKeyMapRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD71D1C7D590069D735 /* GitHubKeyMapRepoModel.m */; }; + 1A4BAB261D1C7DA80069D735 /* GitHubKeyMapRepoModelDict.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD81D1C7D590069D735 /* GitHubKeyMapRepoModelDict.m */; }; + 1A4BAB271D1C7DA80069D735 /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD91D1C7D590069D735 /* GitHubRepoModel.m */; }; + 1A4BAB281D1C7DA80069D735 /* GitHubRepoModelForUSMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADA1D1C7D590069D735 /* GitHubRepoModelForUSMapper.m */; }; + 1A4BAB291D1C7DA80069D735 /* ImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADB1D1C7D590069D735 /* ImageModel.m */; }; + 1A4BAB2A1D1C7DA80069D735 /* InteractionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADC1D1C7D590069D735 /* InteractionModel.m */; }; + 1A4BAB2B1D1C7DA80069D735 /* JSONTypesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADD1D1C7D590069D735 /* JSONTypesModel.m */; }; + 1A4BAB2C1D1C7DA80069D735 /* JSONTypesModelWithValidation1.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADE1D1C7D590069D735 /* JSONTypesModelWithValidation1.m */; }; + 1A4BAB2D1D1C7DA80069D735 /* JSONTypesModelWithValidation2.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADF1D1C7D590069D735 /* JSONTypesModelWithValidation2.m */; }; + 1A4BAB2E1D1C7DA80069D735 /* JSONValueTransformer+UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE01D1C7D590069D735 /* JSONValueTransformer+UIColor.m */; }; + 1A4BAB2F1D1C7DA80069D735 /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE11D1C7D590069D735 /* ModelForUpperCaseMapper.m */; }; + 1A4BAB301D1C7DA80069D735 /* NestedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE21D1C7D590069D735 /* NestedModel.m */; }; + 1A4BAB311D1C7DA80069D735 /* OptionalPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE31D1C7D590069D735 /* OptionalPropModel.m */; }; + 1A4BAB321D1C7DA80069D735 /* PostModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE41D1C7D590069D735 /* PostModel.m */; }; + 1A4BAB331D1C7DA80069D735 /* PostsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE51D1C7D590069D735 /* PostsModel.m */; }; + 1A4BAB341D1C7DA80069D735 /* PrimitivesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE61D1C7D590069D735 /* PrimitivesModel.m */; }; + 1A4BAB351D1C7DA80069D735 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE71D1C7D590069D735 /* RenamedPropertyModel.m */; }; + 1A4BAB361D1C7DA80069D735 /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE81D1C7D590069D735 /* ReposModel.m */; }; + 1A4BAB371D1C7DA80069D735 /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE91D1C7D590069D735 /* RpcRequestModel.m */; }; + 1A4BAB381D1C7DA80069D735 /* SpecialPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAEA1D1C7D590069D735 /* SpecialPropertyModel.m */; }; + 1A4BAB391D1C7DA90069D735 /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD11D1C7D590069D735 /* BuiltInConversionsModel.m */; }; + 1A4BAB3A1D1C7DA90069D735 /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD21D1C7D590069D735 /* CopyrightModel.m */; }; + 1A4BAB3B1D1C7DA90069D735 /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD31D1C7D590069D735 /* CustomPropertyModel.m */; }; + 1A4BAB3C1D1C7DA90069D735 /* DrugModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD41D1C7D590069D735 /* DrugModel.m */; }; + 1A4BAB3D1D1C7DA90069D735 /* EnumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD51D1C7D590069D735 /* EnumModel.m */; }; + 1A4BAB3E1D1C7DA90069D735 /* ExtremeNestingModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD61D1C7D590069D735 /* ExtremeNestingModel.m */; }; + 1A4BAB3F1D1C7DA90069D735 /* GitHubKeyMapRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD71D1C7D590069D735 /* GitHubKeyMapRepoModel.m */; }; + 1A4BAB401D1C7DA90069D735 /* GitHubKeyMapRepoModelDict.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD81D1C7D590069D735 /* GitHubKeyMapRepoModelDict.m */; }; + 1A4BAB411D1C7DA90069D735 /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAD91D1C7D590069D735 /* GitHubRepoModel.m */; }; + 1A4BAB421D1C7DA90069D735 /* GitHubRepoModelForUSMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADA1D1C7D590069D735 /* GitHubRepoModelForUSMapper.m */; }; + 1A4BAB431D1C7DA90069D735 /* ImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADB1D1C7D590069D735 /* ImageModel.m */; }; + 1A4BAB441D1C7DA90069D735 /* InteractionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADC1D1C7D590069D735 /* InteractionModel.m */; }; + 1A4BAB451D1C7DA90069D735 /* JSONTypesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADD1D1C7D590069D735 /* JSONTypesModel.m */; }; + 1A4BAB461D1C7DA90069D735 /* JSONTypesModelWithValidation1.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADE1D1C7D590069D735 /* JSONTypesModelWithValidation1.m */; }; + 1A4BAB471D1C7DA90069D735 /* JSONTypesModelWithValidation2.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAADF1D1C7D590069D735 /* JSONTypesModelWithValidation2.m */; }; + 1A4BAB481D1C7DA90069D735 /* JSONValueTransformer+UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE01D1C7D590069D735 /* JSONValueTransformer+UIColor.m */; }; + 1A4BAB491D1C7DA90069D735 /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE11D1C7D590069D735 /* ModelForUpperCaseMapper.m */; }; + 1A4BAB4A1D1C7DA90069D735 /* NestedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE21D1C7D590069D735 /* NestedModel.m */; }; + 1A4BAB4B1D1C7DA90069D735 /* OptionalPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE31D1C7D590069D735 /* OptionalPropModel.m */; }; + 1A4BAB4C1D1C7DA90069D735 /* PostModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE41D1C7D590069D735 /* PostModel.m */; }; + 1A4BAB4D1D1C7DA90069D735 /* PostsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE51D1C7D590069D735 /* PostsModel.m */; }; + 1A4BAB4E1D1C7DA90069D735 /* PrimitivesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE61D1C7D590069D735 /* PrimitivesModel.m */; }; + 1A4BAB4F1D1C7DA90069D735 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE71D1C7D590069D735 /* RenamedPropertyModel.m */; }; + 1A4BAB501D1C7DA90069D735 /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE81D1C7D590069D735 /* ReposModel.m */; }; + 1A4BAB511D1C7DA90069D735 /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAE91D1C7D590069D735 /* RpcRequestModel.m */; }; + 1A4BAB521D1C7DA90069D735 /* SpecialPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A4BAAEA1D1C7D590069D735 /* SpecialPropertyModel.m */; }; 1A84BBE01D1BFB0E005234F4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BBDF1D1BFB0E005234F4 /* main.m */; }; 1A84BBE31D1BFB0E005234F4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BBE21D1BFB0E005234F4 /* AppDelegate.m */; }; 1A84BBE61D1BFB0E005234F4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BBE51D1BFB0E005234F4 /* ViewController.m */; }; @@ -93,6 +267,90 @@ 1A46AB601D1C71CB00E10D9D /* SanityTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SanityTests.m; sourceTree = ""; }; 1A46AB661D1C735C00E10D9D /* macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = macOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 1A46AB721D1C738400E10D9D /* tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = tvOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A4BA9FB1D1C79260069D735 /* ArrayTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrayTests.m; sourceTree = ""; }; + 1A4BA9FC1D1C79260069D735 /* BuiltInConversionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsTests.m; sourceTree = ""; }; + 1A4BA9FD1D1C79260069D735 /* CustomPropsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropsTests.m; sourceTree = ""; }; + 1A4BA9FF1D1C79260069D735 /* colors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = colors.json; sourceTree = ""; }; + 1A4BAA001D1C79260069D735 /* converts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = converts.json; sourceTree = ""; }; + 1A4BAA011D1C79260069D735 /* github-iphone.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "github-iphone.json"; sourceTree = ""; }; + 1A4BAA021D1C79260069D735 /* jsonTypes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = jsonTypes.json; sourceTree = ""; }; + 1A4BAA031D1C79260069D735 /* nestedData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedData.json; sourceTree = ""; }; + 1A4BAA041D1C79260069D735 /* nestedDataWithArrayError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithArrayError.json; sourceTree = ""; }; + 1A4BAA051D1C79260069D735 /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = ""; }; + 1A4BAA061D1C79260069D735 /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = ""; }; + 1A4BAA071D1C79260069D735 /* nestedDataWithTypeMismatchOnImagesObject.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImagesObject.json; sourceTree = ""; }; + 1A4BAA081D1C79260069D735 /* post.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = post.json; sourceTree = ""; }; + 1A4BAA091D1C79260069D735 /* primitives.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitives.json; sourceTree = ""; }; + 1A4BAA0A1D1C79260069D735 /* primitivesWithErrors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitivesWithErrors.json; sourceTree = ""; }; + 1A4BAA0B1D1C79260069D735 /* specialPropertyName.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = specialPropertyName.json; sourceTree = ""; }; + 1A4BAA0C1D1C79260069D735 /* withOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withOptProp.json; sourceTree = ""; }; + 1A4BAA0D1D1C79260069D735 /* withoutOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withoutOptProp.json; sourceTree = ""; }; + 1A4BAA0E1D1C79260069D735 /* ExtremeNestingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtremeNestingTests.m; sourceTree = ""; }; + 1A4BAA101D1C79260069D735 /* IdPropertyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdPropertyTests.m; sourceTree = ""; }; + 1A4BAA121D1C79260069D735 /* InitWithDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitWithDataTests.m; sourceTree = ""; }; + 1A4BAA141D1C79260069D735 /* JSONTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesReadTests.m; sourceTree = ""; }; + 1A4BAA151D1C79260069D735 /* KeyMappingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeyMappingTests.m; sourceTree = ""; }; + 1A4BAA171D1C79260069D735 /* BuiltInConversionsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsModel.h; sourceTree = ""; }; + 1A4BAA181D1C79260069D735 /* CopyrightModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyrightModel.h; sourceTree = ""; }; + 1A4BAA191D1C79260069D735 /* CustomPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropertyModel.h; sourceTree = ""; }; + 1A4BAA1A1D1C79260069D735 /* DrugModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrugModel.h; sourceTree = ""; }; + 1A4BAA1B1D1C79260069D735 /* EnumModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumModel.h; sourceTree = ""; }; + 1A4BAA1C1D1C79260069D735 /* ExtremeNestingModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingModel.h; sourceTree = ""; }; + 1A4BAA1D1D1C79260069D735 /* GitHubKeyMapRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModel.h; sourceTree = ""; }; + 1A4BAA1E1D1C79260069D735 /* GitHubKeyMapRepoModelDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModelDict.h; sourceTree = ""; }; + 1A4BAA1F1D1C79260069D735 /* GitHubRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModel.h; sourceTree = ""; }; + 1A4BAA201D1C79260069D735 /* GitHubRepoModelForUSMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModelForUSMapper.h; sourceTree = ""; }; + 1A4BAA211D1C79260069D735 /* ImageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageModel.h; sourceTree = ""; }; + 1A4BAA221D1C79260069D735 /* InteractionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteractionModel.h; sourceTree = ""; }; + 1A4BAA231D1C79260069D735 /* JSONTypesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModel.h; sourceTree = ""; }; + 1A4BAA241D1C79260069D735 /* JSONTypesModelWithValidation1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation1.h; sourceTree = ""; }; + 1A4BAA251D1C79260069D735 /* JSONTypesModelWithValidation2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation2.h; sourceTree = ""; }; + 1A4BAA261D1C79260069D735 /* JSONValueTransformer+UIColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONValueTransformer+UIColor.h"; sourceTree = ""; }; + 1A4BAA271D1C79260069D735 /* ModelForUpperCaseMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelForUpperCaseMapper.h; sourceTree = ""; }; + 1A4BAA281D1C79260069D735 /* NestedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModel.h; sourceTree = ""; }; + 1A4BAA291D1C79260069D735 /* OptionalPropModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropModel.h; sourceTree = ""; }; + 1A4BAA2A1D1C79260069D735 /* PostModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostModel.h; sourceTree = ""; }; + 1A4BAA2B1D1C79260069D735 /* PostsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostsModel.h; sourceTree = ""; }; + 1A4BAA2C1D1C79260069D735 /* PrimitivesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitivesModel.h; sourceTree = ""; }; + 1A4BAA2D1D1C79260069D735 /* RenamedPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenamedPropertyModel.h; sourceTree = ""; }; + 1A4BAA2E1D1C79260069D735 /* ReposModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReposModel.h; sourceTree = ""; }; + 1A4BAA2F1D1C79260069D735 /* RpcRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RpcRequestModel.h; sourceTree = ""; }; + 1A4BAA301D1C79260069D735 /* SpecialPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyModel.h; sourceTree = ""; }; + 1A4BAA311D1C79260069D735 /* NestedModelsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModelsTests.m; sourceTree = ""; }; + 1A4BAA321D1C79260069D735 /* OptionalPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropertiesTests.m; sourceTree = ""; }; + 1A4BAA331D1C79260069D735 /* PersistTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersistTests.m; sourceTree = ""; }; + 1A4BAA341D1C79260069D735 /* PrimitiveTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitiveTypesReadTests.m; sourceTree = ""; }; + 1A4BAA351D1C79260069D735 /* SimpleDataErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleDataErrorTests.m; sourceTree = ""; }; + 1A4BAA361D1C79260069D735 /* SpecialPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertiesTests.m; sourceTree = ""; }; + 1A4BAA371D1C79260069D735 /* SpecialPropertyNameTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyNameTests.m; sourceTree = ""; }; + 1A4BAA381D1C79260069D735 /* SpecialValuesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialValuesTests.m; sourceTree = ""; }; + 1A4BAA391D1C79260069D735 /* ValidationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidationTests.m; sourceTree = ""; }; + 1A4BAAD11D1C7D590069D735 /* BuiltInConversionsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsModel.m; sourceTree = ""; }; + 1A4BAAD21D1C7D590069D735 /* CopyrightModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyrightModel.m; sourceTree = ""; }; + 1A4BAAD31D1C7D590069D735 /* CustomPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropertyModel.m; sourceTree = ""; }; + 1A4BAAD41D1C7D590069D735 /* DrugModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrugModel.m; sourceTree = ""; }; + 1A4BAAD51D1C7D590069D735 /* EnumModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EnumModel.m; sourceTree = ""; }; + 1A4BAAD61D1C7D590069D735 /* ExtremeNestingModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtremeNestingModel.m; sourceTree = ""; }; + 1A4BAAD71D1C7D590069D735 /* GitHubKeyMapRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModel.m; sourceTree = ""; }; + 1A4BAAD81D1C7D590069D735 /* GitHubKeyMapRepoModelDict.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModelDict.m; sourceTree = ""; }; + 1A4BAAD91D1C7D590069D735 /* GitHubRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModel.m; sourceTree = ""; }; + 1A4BAADA1D1C7D590069D735 /* GitHubRepoModelForUSMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModelForUSMapper.m; sourceTree = ""; }; + 1A4BAADB1D1C7D590069D735 /* ImageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageModel.m; sourceTree = ""; }; + 1A4BAADC1D1C7D590069D735 /* InteractionModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteractionModel.m; sourceTree = ""; }; + 1A4BAADD1D1C7D590069D735 /* JSONTypesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModel.m; sourceTree = ""; }; + 1A4BAADE1D1C7D590069D735 /* JSONTypesModelWithValidation1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation1.m; sourceTree = ""; }; + 1A4BAADF1D1C7D590069D735 /* JSONTypesModelWithValidation2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation2.m; sourceTree = ""; }; + 1A4BAAE01D1C7D590069D735 /* JSONValueTransformer+UIColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONValueTransformer+UIColor.m"; sourceTree = ""; }; + 1A4BAAE11D1C7D590069D735 /* ModelForUpperCaseMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelForUpperCaseMapper.m; sourceTree = ""; }; + 1A4BAAE21D1C7D590069D735 /* NestedModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModel.m; sourceTree = ""; }; + 1A4BAAE31D1C7D590069D735 /* OptionalPropModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropModel.m; sourceTree = ""; }; + 1A4BAAE41D1C7D590069D735 /* PostModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostModel.m; sourceTree = ""; }; + 1A4BAAE51D1C7D590069D735 /* PostsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostsModel.m; sourceTree = ""; }; + 1A4BAAE61D1C7D590069D735 /* PrimitivesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitivesModel.m; sourceTree = ""; }; + 1A4BAAE71D1C7D590069D735 /* RenamedPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RenamedPropertyModel.m; sourceTree = ""; }; + 1A4BAAE81D1C7D590069D735 /* ReposModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReposModel.m; sourceTree = ""; }; + 1A4BAAE91D1C7D590069D735 /* RpcRequestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RpcRequestModel.m; sourceTree = ""; }; + 1A4BAAEA1D1C7D590069D735 /* SpecialPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyModel.m; sourceTree = ""; }; 1A84BBDB1D1BFB0E005234F4 /* iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1A84BBDF1D1BFB0E005234F4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 1A84BBE11D1BFB0E005234F4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -226,11 +484,127 @@ isa = PBXGroup; children = ( 1A46A99A1D1C52FC00E10D9D /* Info.plist */, + 1A4BA9FE1D1C79260069D735 /* Data */, + 1A4BAA161D1C79260069D735 /* Models */, 1A46AB601D1C71CB00E10D9D /* SanityTests.m */, + 1A4BA9FB1D1C79260069D735 /* ArrayTests.m */, + 1A4BA9FC1D1C79260069D735 /* BuiltInConversionsTests.m */, + 1A4BA9FD1D1C79260069D735 /* CustomPropsTests.m */, + 1A4BAA0E1D1C79260069D735 /* ExtremeNestingTests.m */, + 1A4BAA101D1C79260069D735 /* IdPropertyTests.m */, + 1A4BAA121D1C79260069D735 /* InitWithDataTests.m */, + 1A4BAA141D1C79260069D735 /* JSONTypesReadTests.m */, + 1A4BAA151D1C79260069D735 /* KeyMappingTests.m */, + 1A4BAA311D1C79260069D735 /* NestedModelsTests.m */, + 1A4BAA321D1C79260069D735 /* OptionalPropertiesTests.m */, + 1A4BAA331D1C79260069D735 /* PersistTests.m */, + 1A4BAA341D1C79260069D735 /* PrimitiveTypesReadTests.m */, + 1A4BAA351D1C79260069D735 /* SimpleDataErrorTests.m */, + 1A4BAA361D1C79260069D735 /* SpecialPropertiesTests.m */, + 1A4BAA371D1C79260069D735 /* SpecialPropertyNameTests.m */, + 1A4BAA381D1C79260069D735 /* SpecialValuesTests.m */, + 1A4BAA391D1C79260069D735 /* ValidationTests.m */, ); path = Tests; sourceTree = ""; }; + 1A4BA9FE1D1C79260069D735 /* Data */ = { + isa = PBXGroup; + children = ( + 1A4BA9FF1D1C79260069D735 /* colors.json */, + 1A4BAA001D1C79260069D735 /* converts.json */, + 1A4BAA011D1C79260069D735 /* github-iphone.json */, + 1A4BAA021D1C79260069D735 /* jsonTypes.json */, + 1A4BAA031D1C79260069D735 /* nestedData.json */, + 1A4BAA041D1C79260069D735 /* nestedDataWithArrayError.json */, + 1A4BAA051D1C79260069D735 /* nestedDataWithDictionaryError.json */, + 1A4BAA061D1C79260069D735 /* nestedDataWithTypeMismatchOnImages.json */, + 1A4BAA071D1C79260069D735 /* nestedDataWithTypeMismatchOnImagesObject.json */, + 1A4BAA081D1C79260069D735 /* post.json */, + 1A4BAA091D1C79260069D735 /* primitives.json */, + 1A4BAA0A1D1C79260069D735 /* primitivesWithErrors.json */, + 1A4BAA0B1D1C79260069D735 /* specialPropertyName.json */, + 1A4BAA0C1D1C79260069D735 /* withOptProp.json */, + 1A4BAA0D1D1C79260069D735 /* withoutOptProp.json */, + ); + path = Data; + sourceTree = ""; + }; + 1A4BAA161D1C79260069D735 /* Models */ = { + isa = PBXGroup; + children = ( + 1A4BAACF1D1C7D4C0069D735 /* Headers */, + 1A4BAAD01D1C7D590069D735 /* Implementations */, + ); + path = Models; + sourceTree = ""; + }; + 1A4BAACF1D1C7D4C0069D735 /* Headers */ = { + isa = PBXGroup; + children = ( + 1A4BAA171D1C79260069D735 /* BuiltInConversionsModel.h */, + 1A4BAA181D1C79260069D735 /* CopyrightModel.h */, + 1A4BAA191D1C79260069D735 /* CustomPropertyModel.h */, + 1A4BAA1A1D1C79260069D735 /* DrugModel.h */, + 1A4BAA1B1D1C79260069D735 /* EnumModel.h */, + 1A4BAA1C1D1C79260069D735 /* ExtremeNestingModel.h */, + 1A4BAA1D1D1C79260069D735 /* GitHubKeyMapRepoModel.h */, + 1A4BAA1E1D1C79260069D735 /* GitHubKeyMapRepoModelDict.h */, + 1A4BAA1F1D1C79260069D735 /* GitHubRepoModel.h */, + 1A4BAA201D1C79260069D735 /* GitHubRepoModelForUSMapper.h */, + 1A4BAA211D1C79260069D735 /* ImageModel.h */, + 1A4BAA221D1C79260069D735 /* InteractionModel.h */, + 1A4BAA231D1C79260069D735 /* JSONTypesModel.h */, + 1A4BAA241D1C79260069D735 /* JSONTypesModelWithValidation1.h */, + 1A4BAA251D1C79260069D735 /* JSONTypesModelWithValidation2.h */, + 1A4BAA261D1C79260069D735 /* JSONValueTransformer+UIColor.h */, + 1A4BAA271D1C79260069D735 /* ModelForUpperCaseMapper.h */, + 1A4BAA281D1C79260069D735 /* NestedModel.h */, + 1A4BAA291D1C79260069D735 /* OptionalPropModel.h */, + 1A4BAA2A1D1C79260069D735 /* PostModel.h */, + 1A4BAA2B1D1C79260069D735 /* PostsModel.h */, + 1A4BAA2C1D1C79260069D735 /* PrimitivesModel.h */, + 1A4BAA2D1D1C79260069D735 /* RenamedPropertyModel.h */, + 1A4BAA2E1D1C79260069D735 /* ReposModel.h */, + 1A4BAA2F1D1C79260069D735 /* RpcRequestModel.h */, + 1A4BAA301D1C79260069D735 /* SpecialPropertyModel.h */, + ); + path = Headers; + sourceTree = ""; + }; + 1A4BAAD01D1C7D590069D735 /* Implementations */ = { + isa = PBXGroup; + children = ( + 1A4BAAD11D1C7D590069D735 /* BuiltInConversionsModel.m */, + 1A4BAAD21D1C7D590069D735 /* CopyrightModel.m */, + 1A4BAAD31D1C7D590069D735 /* CustomPropertyModel.m */, + 1A4BAAD41D1C7D590069D735 /* DrugModel.m */, + 1A4BAAD51D1C7D590069D735 /* EnumModel.m */, + 1A4BAAD61D1C7D590069D735 /* ExtremeNestingModel.m */, + 1A4BAAD71D1C7D590069D735 /* GitHubKeyMapRepoModel.m */, + 1A4BAAD81D1C7D590069D735 /* GitHubKeyMapRepoModelDict.m */, + 1A4BAAD91D1C7D590069D735 /* GitHubRepoModel.m */, + 1A4BAADA1D1C7D590069D735 /* GitHubRepoModelForUSMapper.m */, + 1A4BAADB1D1C7D590069D735 /* ImageModel.m */, + 1A4BAADC1D1C7D590069D735 /* InteractionModel.m */, + 1A4BAADD1D1C7D590069D735 /* JSONTypesModel.m */, + 1A4BAADE1D1C7D590069D735 /* JSONTypesModelWithValidation1.m */, + 1A4BAADF1D1C7D590069D735 /* JSONTypesModelWithValidation2.m */, + 1A4BAAE01D1C7D590069D735 /* JSONValueTransformer+UIColor.m */, + 1A4BAAE11D1C7D590069D735 /* ModelForUpperCaseMapper.m */, + 1A4BAAE21D1C7D590069D735 /* NestedModel.m */, + 1A4BAAE31D1C7D590069D735 /* OptionalPropModel.m */, + 1A4BAAE41D1C7D590069D735 /* PostModel.m */, + 1A4BAAE51D1C7D590069D735 /* PostsModel.m */, + 1A4BAAE61D1C7D590069D735 /* PrimitivesModel.m */, + 1A4BAAE71D1C7D590069D735 /* RenamedPropertyModel.m */, + 1A4BAAE81D1C7D590069D735 /* ReposModel.m */, + 1A4BAAE91D1C7D590069D735 /* RpcRequestModel.m */, + 1A4BAAEA1D1C7D590069D735 /* SpecialPropertyModel.m */, + ); + path = Implementations; + sourceTree = ""; + }; 1A84BBD21D1BFB0D005234F4 = { isa = PBXGroup; children = ( @@ -603,6 +977,21 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A4BAAA51D1C79550069D735 /* primitives.json in Resources */, + 1A4BAAA31D1C79550069D735 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */, + 1A4BAA9F1D1C79550069D735 /* nestedData.json in Resources */, + 1A4BAA9D1D1C79550069D735 /* github-iphone.json in Resources */, + 1A4BAA9E1D1C79550069D735 /* jsonTypes.json in Resources */, + 1A4BAAA21D1C79550069D735 /* nestedDataWithTypeMismatchOnImages.json in Resources */, + 1A4BAAA61D1C79550069D735 /* primitivesWithErrors.json in Resources */, + 1A4BAAA41D1C79550069D735 /* post.json in Resources */, + 1A4BAAA81D1C79550069D735 /* withOptProp.json in Resources */, + 1A4BAAA01D1C79550069D735 /* nestedDataWithArrayError.json in Resources */, + 1A4BAA9B1D1C79550069D735 /* colors.json in Resources */, + 1A4BAAA91D1C79550069D735 /* withoutOptProp.json in Resources */, + 1A4BAA9C1D1C79550069D735 /* converts.json in Resources */, + 1A4BAAA11D1C79550069D735 /* nestedDataWithDictionaryError.json in Resources */, + 1A4BAAA71D1C79550069D735 /* specialPropertyName.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -610,6 +999,21 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A4BAAB41D1C79550069D735 /* primitives.json in Resources */, + 1A4BAAB21D1C79550069D735 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */, + 1A4BAAAE1D1C79550069D735 /* nestedData.json in Resources */, + 1A4BAAAC1D1C79550069D735 /* github-iphone.json in Resources */, + 1A4BAAAD1D1C79550069D735 /* jsonTypes.json in Resources */, + 1A4BAAB11D1C79550069D735 /* nestedDataWithTypeMismatchOnImages.json in Resources */, + 1A4BAAB51D1C79550069D735 /* primitivesWithErrors.json in Resources */, + 1A4BAAB31D1C79550069D735 /* post.json in Resources */, + 1A4BAAB71D1C79550069D735 /* withOptProp.json in Resources */, + 1A4BAAAF1D1C79550069D735 /* nestedDataWithArrayError.json in Resources */, + 1A4BAAAA1D1C79550069D735 /* colors.json in Resources */, + 1A4BAAB81D1C79550069D735 /* withoutOptProp.json in Resources */, + 1A4BAAAB1D1C79550069D735 /* converts.json in Resources */, + 1A4BAAB01D1C79550069D735 /* nestedDataWithDictionaryError.json in Resources */, + 1A4BAAB61D1C79550069D735 /* specialPropertyName.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -617,6 +1021,21 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A4BAAC31D1C79560069D735 /* primitives.json in Resources */, + 1A4BAAC11D1C79560069D735 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */, + 1A4BAABD1D1C79560069D735 /* nestedData.json in Resources */, + 1A4BAABB1D1C79560069D735 /* github-iphone.json in Resources */, + 1A4BAABC1D1C79560069D735 /* jsonTypes.json in Resources */, + 1A4BAAC01D1C79560069D735 /* nestedDataWithTypeMismatchOnImages.json in Resources */, + 1A4BAAC41D1C79560069D735 /* primitivesWithErrors.json in Resources */, + 1A4BAAC21D1C79560069D735 /* post.json in Resources */, + 1A4BAAC61D1C79560069D735 /* withOptProp.json in Resources */, + 1A4BAABE1D1C79560069D735 /* nestedDataWithArrayError.json in Resources */, + 1A4BAAB91D1C79560069D735 /* colors.json in Resources */, + 1A4BAAC71D1C79560069D735 /* withoutOptProp.json in Resources */, + 1A4BAABA1D1C79560069D735 /* converts.json in Resources */, + 1A4BAABF1D1C79560069D735 /* nestedDataWithDictionaryError.json in Resources */, + 1A4BAAC51D1C79560069D735 /* specialPropertyName.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1019,7 +1438,50 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A4BAB091D1C7DA80069D735 /* EnumModel.m in Sources */, + 1A4BAB061D1C7DA80069D735 /* CopyrightModel.m in Sources */, + 1A4BAB0F1D1C7DA80069D735 /* ImageModel.m in Sources */, + 1A4BAB0A1D1C7DA80069D735 /* ExtremeNestingModel.m in Sources */, + 1A4BAB141D1C7DA80069D735 /* JSONValueTransformer+UIColor.m in Sources */, + 1A4BAA911D1C79480069D735 /* KeyMappingTests.m in Sources */, + 1A4BAB0E1D1C7DA80069D735 /* GitHubRepoModelForUSMapper.m in Sources */, + 1A4BAB0C1D1C7DA80069D735 /* GitHubKeyMapRepoModelDict.m in Sources */, + 1A4BAA951D1C79480069D735 /* PrimitiveTypesReadTests.m in Sources */, + 1A4BAB181D1C7DA80069D735 /* PostModel.m in Sources */, + 1A4BAB121D1C7DA80069D735 /* JSONTypesModelWithValidation1.m in Sources */, + 1A4BAB191D1C7DA80069D735 /* PostsModel.m in Sources */, + 1A4BAA941D1C79480069D735 /* PersistTests.m in Sources */, + 1A4BAA8C1D1C79480069D735 /* IdPropertyTests.m in Sources */, 1A46AB611D1C71CB00E10D9D /* SanityTests.m in Sources */, + 1A4BAA8A1D1C79480069D735 /* ExtremeNestingTests.m in Sources */, + 1A4BAA8E1D1C79480069D735 /* InitWithDataTests.m in Sources */, + 1A4BAB1C1D1C7DA80069D735 /* ReposModel.m in Sources */, + 1A4BAA881D1C79480069D735 /* BuiltInConversionsTests.m in Sources */, + 1A4BAA961D1C79480069D735 /* SimpleDataErrorTests.m in Sources */, + 1A4BAA991D1C79480069D735 /* SpecialValuesTests.m in Sources */, + 1A4BAB161D1C7DA80069D735 /* NestedModel.m in Sources */, + 1A4BAB051D1C7DA80069D735 /* BuiltInConversionsModel.m in Sources */, + 1A4BAB1E1D1C7DA80069D735 /* SpecialPropertyModel.m in Sources */, + 1A4BAB1A1D1C7DA80069D735 /* PrimitivesModel.m in Sources */, + 1A4BAB1D1D1C7DA80069D735 /* RpcRequestModel.m in Sources */, + 1A4BAA921D1C79480069D735 /* NestedModelsTests.m in Sources */, + 1A4BAA9A1D1C79480069D735 /* ValidationTests.m in Sources */, + 1A4BAA971D1C79480069D735 /* SpecialPropertiesTests.m in Sources */, + 1A4BAA871D1C79480069D735 /* ArrayTests.m in Sources */, + 1A4BAB131D1C7DA80069D735 /* JSONTypesModelWithValidation2.m in Sources */, + 1A4BAB0D1D1C7DA80069D735 /* GitHubRepoModel.m in Sources */, + 1A4BAA981D1C79480069D735 /* SpecialPropertyNameTests.m in Sources */, + 1A4BAB081D1C7DA80069D735 /* DrugModel.m in Sources */, + 1A4BAB0B1D1C7DA80069D735 /* GitHubKeyMapRepoModel.m in Sources */, + 1A4BAB171D1C7DA80069D735 /* OptionalPropModel.m in Sources */, + 1A4BAB151D1C7DA80069D735 /* ModelForUpperCaseMapper.m in Sources */, + 1A4BAA891D1C79480069D735 /* CustomPropsTests.m in Sources */, + 1A4BAA931D1C79480069D735 /* OptionalPropertiesTests.m in Sources */, + 1A4BAA901D1C79480069D735 /* JSONTypesReadTests.m in Sources */, + 1A4BAB101D1C7DA80069D735 /* InteractionModel.m in Sources */, + 1A4BAB071D1C7DA80069D735 /* CustomPropertyModel.m in Sources */, + 1A4BAB111D1C7DA80069D735 /* JSONTypesModel.m in Sources */, + 1A4BAB1B1D1C7DA80069D735 /* RenamedPropertyModel.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1027,7 +1489,50 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A4BAB231D1C7DA80069D735 /* EnumModel.m in Sources */, + 1A4BAB201D1C7DA80069D735 /* CopyrightModel.m in Sources */, + 1A4BAB291D1C7DA80069D735 /* ImageModel.m in Sources */, + 1A4BAB241D1C7DA80069D735 /* ExtremeNestingModel.m in Sources */, + 1A4BAB2E1D1C7DA80069D735 /* JSONValueTransformer+UIColor.m in Sources */, + 1A4BAA7D1D1C79460069D735 /* KeyMappingTests.m in Sources */, + 1A4BAB281D1C7DA80069D735 /* GitHubRepoModelForUSMapper.m in Sources */, + 1A4BAB261D1C7DA80069D735 /* GitHubKeyMapRepoModelDict.m in Sources */, + 1A4BAA811D1C79460069D735 /* PrimitiveTypesReadTests.m in Sources */, + 1A4BAB321D1C7DA80069D735 /* PostModel.m in Sources */, + 1A4BAB2C1D1C7DA80069D735 /* JSONTypesModelWithValidation1.m in Sources */, + 1A4BAB331D1C7DA80069D735 /* PostsModel.m in Sources */, + 1A4BAA801D1C79460069D735 /* PersistTests.m in Sources */, + 1A4BAA781D1C79460069D735 /* IdPropertyTests.m in Sources */, 1A46AB7A1D1C741900E10D9D /* SanityTests.m in Sources */, + 1A4BAA761D1C79460069D735 /* ExtremeNestingTests.m in Sources */, + 1A4BAA7A1D1C79460069D735 /* InitWithDataTests.m in Sources */, + 1A4BAB361D1C7DA80069D735 /* ReposModel.m in Sources */, + 1A4BAA741D1C79460069D735 /* BuiltInConversionsTests.m in Sources */, + 1A4BAA821D1C79460069D735 /* SimpleDataErrorTests.m in Sources */, + 1A4BAA851D1C79460069D735 /* SpecialValuesTests.m in Sources */, + 1A4BAB301D1C7DA80069D735 /* NestedModel.m in Sources */, + 1A4BAB1F1D1C7DA80069D735 /* BuiltInConversionsModel.m in Sources */, + 1A4BAB381D1C7DA80069D735 /* SpecialPropertyModel.m in Sources */, + 1A4BAB341D1C7DA80069D735 /* PrimitivesModel.m in Sources */, + 1A4BAB371D1C7DA80069D735 /* RpcRequestModel.m in Sources */, + 1A4BAA7E1D1C79460069D735 /* NestedModelsTests.m in Sources */, + 1A4BAA861D1C79460069D735 /* ValidationTests.m in Sources */, + 1A4BAA831D1C79460069D735 /* SpecialPropertiesTests.m in Sources */, + 1A4BAA731D1C79460069D735 /* ArrayTests.m in Sources */, + 1A4BAB2D1D1C7DA80069D735 /* JSONTypesModelWithValidation2.m in Sources */, + 1A4BAB271D1C7DA80069D735 /* GitHubRepoModel.m in Sources */, + 1A4BAA841D1C79460069D735 /* SpecialPropertyNameTests.m in Sources */, + 1A4BAB221D1C7DA80069D735 /* DrugModel.m in Sources */, + 1A4BAB251D1C7DA80069D735 /* GitHubKeyMapRepoModel.m in Sources */, + 1A4BAB311D1C7DA80069D735 /* OptionalPropModel.m in Sources */, + 1A4BAB2F1D1C7DA80069D735 /* ModelForUpperCaseMapper.m in Sources */, + 1A4BAA751D1C79460069D735 /* CustomPropsTests.m in Sources */, + 1A4BAA7F1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */, + 1A4BAA7C1D1C79460069D735 /* JSONTypesReadTests.m in Sources */, + 1A4BAB2A1D1C7DA80069D735 /* InteractionModel.m in Sources */, + 1A4BAB211D1C7DA80069D735 /* CustomPropertyModel.m in Sources */, + 1A4BAB2B1D1C7DA80069D735 /* JSONTypesModel.m in Sources */, + 1A4BAB351D1C7DA80069D735 /* RenamedPropertyModel.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1035,7 +1540,50 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A4BAB3D1D1C7DA90069D735 /* EnumModel.m in Sources */, + 1A4BAB3A1D1C7DA90069D735 /* CopyrightModel.m in Sources */, + 1A4BAB431D1C7DA90069D735 /* ImageModel.m in Sources */, + 1A4BAB3E1D1C7DA90069D735 /* ExtremeNestingModel.m in Sources */, + 1A4BAB481D1C7DA90069D735 /* JSONValueTransformer+UIColor.m in Sources */, + 1A4BAA691D1C79460069D735 /* KeyMappingTests.m in Sources */, + 1A4BAB421D1C7DA90069D735 /* GitHubRepoModelForUSMapper.m in Sources */, + 1A4BAB401D1C7DA90069D735 /* GitHubKeyMapRepoModelDict.m in Sources */, + 1A4BAA6D1D1C79460069D735 /* PrimitiveTypesReadTests.m in Sources */, + 1A4BAB4C1D1C7DA90069D735 /* PostModel.m in Sources */, + 1A4BAB461D1C7DA90069D735 /* JSONTypesModelWithValidation1.m in Sources */, + 1A4BAB4D1D1C7DA90069D735 /* PostsModel.m in Sources */, + 1A4BAA6C1D1C79460069D735 /* PersistTests.m in Sources */, + 1A4BAA641D1C79460069D735 /* IdPropertyTests.m in Sources */, 1A46AB7B1D1C741A00E10D9D /* SanityTests.m in Sources */, + 1A4BAA621D1C79460069D735 /* ExtremeNestingTests.m in Sources */, + 1A4BAA661D1C79460069D735 /* InitWithDataTests.m in Sources */, + 1A4BAB501D1C7DA90069D735 /* ReposModel.m in Sources */, + 1A4BAA601D1C79460069D735 /* BuiltInConversionsTests.m in Sources */, + 1A4BAA6E1D1C79460069D735 /* SimpleDataErrorTests.m in Sources */, + 1A4BAA711D1C79460069D735 /* SpecialValuesTests.m in Sources */, + 1A4BAB4A1D1C7DA90069D735 /* NestedModel.m in Sources */, + 1A4BAB391D1C7DA90069D735 /* BuiltInConversionsModel.m in Sources */, + 1A4BAB521D1C7DA90069D735 /* SpecialPropertyModel.m in Sources */, + 1A4BAB4E1D1C7DA90069D735 /* PrimitivesModel.m in Sources */, + 1A4BAB511D1C7DA90069D735 /* RpcRequestModel.m in Sources */, + 1A4BAA6A1D1C79460069D735 /* NestedModelsTests.m in Sources */, + 1A4BAA721D1C79460069D735 /* ValidationTests.m in Sources */, + 1A4BAA6F1D1C79460069D735 /* SpecialPropertiesTests.m in Sources */, + 1A4BAA5F1D1C79460069D735 /* ArrayTests.m in Sources */, + 1A4BAB471D1C7DA90069D735 /* JSONTypesModelWithValidation2.m in Sources */, + 1A4BAB411D1C7DA90069D735 /* GitHubRepoModel.m in Sources */, + 1A4BAA701D1C79460069D735 /* SpecialPropertyNameTests.m in Sources */, + 1A4BAB3C1D1C7DA90069D735 /* DrugModel.m in Sources */, + 1A4BAB3F1D1C7DA90069D735 /* GitHubKeyMapRepoModel.m in Sources */, + 1A4BAB4B1D1C7DA90069D735 /* OptionalPropModel.m in Sources */, + 1A4BAB491D1C7DA90069D735 /* ModelForUpperCaseMapper.m in Sources */, + 1A4BAA611D1C79460069D735 /* CustomPropsTests.m in Sources */, + 1A4BAA6B1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */, + 1A4BAA681D1C79460069D735 /* JSONTypesReadTests.m in Sources */, + 1A4BAB441D1C7DA90069D735 /* InteractionModel.m in Sources */, + 1A4BAB3B1D1C7DA90069D735 /* CustomPropertyModel.m in Sources */, + 1A4BAB451D1C7DA90069D735 /* JSONTypesModel.m in Sources */, + 1A4BAB4F1D1C7DA90069D735 /* RenamedPropertyModel.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/examples/Tests/ArrayTests.m b/examples/Tests/ArrayTests.m new file mode 100644 index 00000000..ac85f1f1 --- /dev/null +++ b/examples/Tests/ArrayTests.m @@ -0,0 +1,100 @@ +// +// ArrayTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 19/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; +@import JSONModel; + +#import "ReposModel.h" +#import "GitHubRepoModel.h" + +@interface ArrayTests : XCTestCase +@end + +@implementation ArrayTests +{ + ReposModel* repos; + ReposProtocolArrayModel* reposProtocolArray; +} + +-(void)setUp +{ + [super setUp]; + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../github-iphone.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + repos = [[ReposModel alloc] initWithString:jsonContents error:&err]; + XCTAssertNil(err, @"%@", [err localizedDescription]); + + reposProtocolArray = [[ReposProtocolArrayModel alloc] initWithString:jsonContents error:&err]; + XCTAssertNil(err, @"%@", [err localizedDescription]); + + XCTAssertNotNil(repos, @"Could not load the test data file."); + +} + +-(void)testLoading +{ + XCTAssertTrue([repos.repositories isKindOfClass:[NSArray class]], @".properties is not a NSArray"); + XCTAssertEqualObjects([[repos.repositories[0] class] description], @"GitHubRepoModel", @".properties[0] is not a GitHubRepoModel"); + + XCTAssertTrue([reposProtocolArray.repositories isKindOfClass:[NSArray class]], @".properties is not a NSArray"); + XCTAssertEqualObjects([[reposProtocolArray.repositories[0] class] description], @"GitHubRepoModel", @".properties[0] is not a GitHubRepoModel"); +} + +-(void)testCount +{ + XCTAssertEqualObjects(@(repos.repositories.count), @100, @"wrong count"); + XCTAssertEqualObjects(@(reposProtocolArray.repositories.count), @100, @"wrong count"); +} + +-(void)testFastEnumeration +{ + for (GitHubRepoModel *m in repos.repositories) { + XCTAssertNoThrow([m created], @"should not throw exception"); + } + + for (GitHubRepoModel *m in reposProtocolArray.repositories) { + XCTAssertNoThrow([m created], @"should not throw exception"); + } +} + +-(void)testFirstObject +{ + XCTAssertEqualObjects([[repos.repositories.firstObject class] description], @"GitHubRepoModel", @"wrong class"); + XCTAssertEqualObjects([[reposProtocolArray.repositories.firstObject class] description], @"GitHubRepoModel", @"wrong class"); +} + +/* + * https://github.com/JSONModel/JSONModel/pull/14 + */ +-(void)testArrayReverseTransformGitHubIssue_14 +{ + NSDictionary* dict = [repos toDictionary]; + XCTAssertNotNil(dict, @"Could not convert ReposModel back to an NSDictionary"); + + NSDictionary* dict2 = [reposProtocolArray toDictionary]; + XCTAssertNotNil(dict2, @"Could not convert ReposProtocolArrayModel back to an NSDictionary"); +} + +/* + * https://github.com/JSONModel/JSONModel/issues/15 + */ +-(void)testArrayReverseTransformGitHubIssue_15 +{ + NSString* string = [repos toJSONString]; + XCTAssertNotNil(string, @"Could not convert ReposModel back to a string"); + + NSString* string2 = [reposProtocolArray toJSONString]; + XCTAssertNotNil(string2, @"Could not convert ReposProtocolArrayModel back to a string"); +} + +@end diff --git a/examples/Tests/BuiltInConversionsTests.m b/examples/Tests/BuiltInConversionsTests.m new file mode 100644 index 00000000..dd2cc9ab --- /dev/null +++ b/examples/Tests/BuiltInConversionsTests.m @@ -0,0 +1,83 @@ +// +// BuiltInConversionsTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "BuiltInConversionsModel.h" + +@interface BuiltInConversionsTests : XCTestCase +@end + +@implementation BuiltInConversionsTests +{ + BuiltInConversionsModel* b; +} + +-(void)setUp +{ + [super setUp]; + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../converts.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + b = [[BuiltInConversionsModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(b, @"Could not load the test data file."); +} + +-(void)testConversions +{ + XCTAssertTrue(b.isItYesOrNo==YES, @"isItYesOrNo value is not YES"); + + XCTAssertTrue(b.boolFromBoolean==YES, @"boolFromBoolean is not YES"); + XCTAssertTrue(b.boolFromNumber==YES, @"boolFromNumber is not YES"); + XCTAssertTrue(b.boolFromString==YES, @"boolFromString is not YES"); + + + XCTAssertTrue([b.unorderedList isKindOfClass:[NSSet class]], @"unorderedList is not an NSSet object"); + XCTAssertTrue([b.unorderedList anyObject], @"unorderedList don't have any objects"); + + XCTAssertTrue([b.dynamicUnorderedList isKindOfClass:[NSMutableSet class]], @"dynamicUnorderedList is not an NSMutableSet object"); + XCTAssertTrue([b.dynamicUnorderedList anyObject], @"dynamicUnorderedList don't have any objects"); + + NSUInteger nrOfObjects = [b.dynamicUnorderedList allObjects].count; + + [b.dynamicUnorderedList addObject:@"ADDED"]; + XCTAssertTrue(nrOfObjects + 1 == [b.dynamicUnorderedList allObjects].count, @"dynamicUnorderedList didn't add an object"); + + XCTAssertTrue([b.stringFromNumber isKindOfClass:[NSString class]], @"stringFromNumber is not an NSString"); + XCTAssertTrue([b.stringFromNumber isEqualToString:@"19.95"], @"stringFromNumber's value is not 19.95"); + + XCTAssertTrue([b.numberFromString isKindOfClass:[NSNumber class]], @"numberFromString is not an NSNumber"); + XCTAssertEqualObjects(b.doubleFromString, @16909129); + + //TODO: I had to hardcode the float epsilon below, bcz actually [NSNumber floatValue] was returning a bigger deviation than FLT_EPSILON + // IDEAS? + XCTAssertEqualWithAccuracy([b.numberFromString floatValue], 1230.99, 0.001, @"numberFromString's value is not 1230.99"); + + XCTAssertTrue([b.importantEvent isKindOfClass:[NSDate class]], @"importantEvent is not an NSDate"); + XCTAssertTrue((long)[b.importantEvent timeIntervalSince1970] == 1353916801, @"importantEvent value was not read properly"); + + //test for a valid URL + //https://github.com/JSONModel/JSONModel/pull/60 + XCTAssertNotNil(b.websiteURL, @"URL parsing did return nil"); + XCTAssertNotNil(b.websiteURL.query, @"key1=test"); + + // see: https://github.com/JSONModel/JSONModel/pull/119 + XCTAssertEqualObjects(b.websiteURL.absoluteString, @"http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test&q=search%20terms"); + + XCTAssertNotNil(b.timeZone, @"Time zone parsing did return nil"); + XCTAssertEqualObjects([b.timeZone name], @"PST", @"Time zone is not PST"); + + XCTAssertTrue([b.stringArray.firstObject isKindOfClass:[NSString class]], @"The array element is not a string"); +} + +@end diff --git a/examples/Tests/CustomPropsTests.m b/examples/Tests/CustomPropsTests.m new file mode 100644 index 00000000..4a8d36f4 --- /dev/null +++ b/examples/Tests/CustomPropsTests.m @@ -0,0 +1,51 @@ +// +// CustomPropsTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; +@import QuartzCore; + +#import "CustomPropertyModel.h" + +@interface CustomPropsTests : XCTestCase +@end + +@implementation CustomPropsTests +{ + CustomPropertyModel* c; +} + +-(void)setUp +{ + [super setUp]; + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../colors.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + c = [[CustomPropertyModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(c, @"Could not load the test data file."); +} + +-(void)testColors +{ +#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED + XCTAssertTrue([c.redColor isKindOfClass:[UIColor class]], @"redColor is not a Color instance"); + CGColorRef redColor = [UIColor redColor].CGColor; +#else + XCTAssertTrue([c.redColor isKindOfClass:[NSColor class]], @"redColor is not a Color instance"); + CGColorRef redColor = [NSColor redColor].CGColor; +#endif + + XCTAssertTrue(CGColorEqualToColor(c.redColor.CGColor, redColor), @"redColor's value is not red color"); +} + + +@end diff --git a/examples/Tests/Data/colors.json b/examples/Tests/Data/colors.json new file mode 100644 index 00000000..bcee98f1 --- /dev/null +++ b/examples/Tests/Data/colors.json @@ -0,0 +1,4 @@ +{ + "redColor": "#ff0000", + "blueColor": "#0000ff" +} diff --git a/examples/Tests/Data/converts.json b/examples/Tests/Data/converts.json new file mode 100644 index 00000000..0056d4b6 --- /dev/null +++ b/examples/Tests/Data/converts.json @@ -0,0 +1,21 @@ +{ + "isItYesOrNo": 1, + "boolFromString" : "1", + "boolFromNumber" : 1, + "boolFromBoolean" : true, + + "unorderedList": ["1","5","7","2"], + "dynamicUnorderedList": ["a", "3"], + + "stringFromNumber": 19.95, + "numberFromString": "1230.99", + "doubleFromString": "16909129", + + "importantEvent": "2012-11-26T10:00:01+02:00", + + "websiteURL": "http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test&q=search%20terms", + + "timeZone": "PST", + + "stringArray": ["one", "two", "three"] +} diff --git a/examples/Tests/Data/github-iphone.json b/examples/Tests/Data/github-iphone.json new file mode 100644 index 00000000..8942e558 --- /dev/null +++ b/examples/Tests/Data/github-iphone.json @@ -0,0 +1,1804 @@ +{ + "repositories": [ + { + "type": "repo", + "created": "2010-03-31T12:07:59-07:00", + "pushed_at": "2012-12-18T19:21:35-08:00", + "watchers": 2412, + "owner": "cocos2d", + "pushed": "2012-12-18T19:21:35-08:00", + "forks": 556, + "username": "cocos2d", + "description": "cocos2d for iPhone", + "language": "Objective-C", + "fork": false, + "size": 7128, + "followers": 2412, + "name": "cocos2d-iphone", + "private": false, + "created_at": "2010-03-31T12:07:59-07:00" + }, + { + "type": "repo", + "created": "2008-10-22T11:45:41-07:00", + "pushed_at": "2012-06-22T17:03:53-07:00", + "watchers": 863, + "owner": "ldandersen", + "pushed": "2012-06-22T17:03:53-07:00", + "forks": 133, + "username": "ldandersen", + "description": "Open source iPhone code", + "language": "Objective-C", + "fork": false, + "size": 164, + "followers": 863, + "name": "scifihifi-iphone", + "private": false, + "created_at": "2008-10-22T11:45:41-07:00" + }, + { + "type": "repo", + "created": "2009-04-14T11:41:03-07:00", + "pushed_at": "2011-10-21T01:41:26-07:00", + "watchers": 900, + "owner": "erica", + "pushed": "2011-10-21T01:41:26-07:00", + "forks": 166, + "username": "erica", + "description": "Sample Code", + "language": "Objective-C", + "fork": false, + "size": 312, + "followers": 900, + "name": "iphone-3.0-cookbook-", + "private": false, + "created_at": "2009-04-14T11:41:03-07:00" + }, + { + "type": "repo", + "created": "2009-06-04T11:23:51-07:00", + "pushed_at": "2012-07-03T07:54:22-07:00", + "watchers": 488, + "owner": "c99koder", + "pushed": "2012-07-03T07:54:22-07:00", + "forks": 80, + "username": "c99koder", + "description": "The official Last.fm iPhone application", + "language": "Objective-C", + "fork": false, + "size": 3072, + "followers": 488, + "name": "lastfm-iphone", + "private": false, + "created_at": "2009-06-04T11:23:51-07:00" + }, + { + "type": "repo", + "created": "2009-07-27T04:47:29-07:00", + "pushed_at": "2012-10-11T13:21:17-07:00", + "watchers": 778, + "owner": "bengottlieb", + "pushed": "2012-10-11T13:21:17-07:00", + "forks": 150, + "username": "bengottlieb", + "description": "An easy way to get Twitter authenticating with OAuth on iPhone", + "language": "Objective-C", + "fork": false, + "size": 160, + "followers": 778, + "name": "Twitter-OAuth-iPhone", + "private": false, + "created_at": "2009-07-27T04:47:29-07:00" + }, + { + "type": "repo", + "created": "2012-08-12T21:10:01-07:00", + "pushed_at": "2012-12-04T00:38:38-08:00", + "watchers": 159, + "owner": "oschina", + "pushed": "2012-12-04T00:38:38-08:00", + "forks": 146, + "username": "oschina", + "description": "OSCHINA 的 iPhone 客户端源码,可直接在 App Store上搜索“开源中国”来安装此app", + "language": "Objective-C", + "fork": false, + "size": 284, + "followers": 159, + "name": "iphone-app", + "private": false, + "created_at": "2012-08-12T21:10:01-07:00" + }, + { + "type": "repo", + "created": "2009-02-18T22:31:51-08:00", + "pushed_at": "2012-10-18T02:30:54-07:00", + "watchers": 7153, + "owner": "facebook", + "pushed": "2012-10-18T02:30:54-07:00", + "forks": 1294, + "username": "facebook", + "description": "Three20 is an Objective-C library for iPhone developers", + "language": "Objective-C", + "fork": false, + "size": 4608, + "followers": 7153, + "name": "three20", + "private": false, + "created_at": "2009-02-18T22:31:51-08:00" + }, + { + "type": "repo", + "created": "2009-06-15T20:34:15-07:00", + "pushed_at": "2012-10-31T10:58:15-07:00", + "watchers": 539, + "owner": "tdreyno", + "pushed": "2012-10-31T10:58:15-07:00", + "forks": 88, + "username": "tdreyno", + "description": "Turn your checkboxes into iOS-style binary switches", + "language": "CoffeeScript", + "fork": false, + "size": 148, + "followers": 539, + "name": "iphone-style-checkboxes", + "private": false, + "created_at": "2009-06-15T20:34:15-07:00" + }, + { + "type": "repo", + "created": "2009-07-08T12:58:18-07:00", + "pushed_at": "2010-06-08T13:00:14-07:00", + "watchers": 496, + "owner": "kennytm", + "pushed": "2010-06-08T13:00:14-07:00", + "forks": 85, + "username": "kennytm", + "description": "Headers for private frameworks or undocumented interfaces of iPhoneOS 3.x or before (4.x is not supported yet).", + "language": "C", + "fork": false, + "size": 284, + "followers": 496, + "name": "iphone-private-frameworks", + "private": false, + "created_at": "2009-07-08T12:58:18-07:00" + }, + { + "type": "repo", + "created": "2011-05-30T08:37:32-07:00", + "pushed_at": "2012-04-22T05:58:55-07:00", + "watchers": 520, + "owner": "cocos2d", + "pushed": "2012-04-22T05:58:55-07:00", + "forks": 117, + "username": "cocos2d", + "description": "3rd party extensions for cocos2d for iPHone", + "language": "Objective-C", + "fork": false, + "size": 396, + "followers": 520, + "name": "cocos2d-iphone-extensions", + "private": false, + "created_at": "2011-05-30T08:37:32-07:00" + }, + { + "type": "repo", + "created": "2010-11-18T15:17:00-08:00", + "pushed_at": "2012-12-16T23:40:28-08:00", + "watchers": 1003, + "owner": "cocos2d", + "pushed": "2012-12-16T23:40:28-08:00", + "forks": 487, + "username": "cocos2d", + "description": "Port of cocos2d-iphone in C++", + "language": "C", + "fork": false, + "size": 9644, + "followers": 1003, + "name": "cocos2d-x", + "private": false, + "created_at": "2010-11-18T15:17:00-08:00" + }, + { + "type": "repo", + "created": "2011-01-06T13:21:52-08:00", + "pushed_at": "2012-08-25T09:20:18-07:00", + "watchers": 336, + "owner": "gdavis", + "pushed": "2012-08-25T09:20:18-07:00", + "forks": 82, + "username": "gdavis", + "description": "Objective-C based gallery for iPhones", + "language": "Objective-C", + "fork": false, + "size": 164, + "followers": 336, + "name": "FGallery-iPhone", + "private": false, + "created_at": "2011-01-06T13:21:52-08:00" + }, + { + "type": "repo", + "created": "2009-03-05T10:28:43-08:00", + "pushed_at": "2011-05-08T18:00:18-07:00", + "watchers": 390, + "owner": "niw", + "pushed": "2011-05-08T18:00:18-07:00", + "forks": 67, + "username": "niw", + "description": "Test application for iPhone with OpenCV library", + "language": "C++", + "fork": false, + "size": 12344, + "followers": 390, + "name": "iphone_opencv_test", + "private": false, + "created_at": "2009-03-05T10:28:43-08:00" + }, + { + "type": "repo", + "created": "2009-05-15T19:07:23-07:00", + "pushed_at": "2012-11-14T08:22:14-08:00", + "watchers": 998, + "owner": "atebits", + "pushed": "2012-11-14T08:22:14-08:00", + "forks": 107, + "username": "atebits", + "description": "Screencasting for iPhone", + "language": "Objective-C", + "fork": false, + "size": 172, + "followers": 998, + "name": "SimFinger", + "private": false, + "created_at": "2009-05-15T19:07:23-07:00" + }, + { + "type": "repo", + "created": "2009-12-31T13:26:00-08:00", + "pushed_at": "2011-04-11T20:56:45-07:00", + "watchers": 284, + "owner": "nolanbrown", + "pushed": "2011-04-11T20:56:45-07:00", + "forks": 65, + "username": "nolanbrown", + "description": "Demo iPhone app utilizing the tesseract library for OCR", + "language": "C++", + "fork": false, + "size": 188, + "followers": 284, + "name": "Tesseract-iPhone-Demo", + "private": false, + "created_at": "2009-12-31T13:26:00-08:00" + }, + { + "type": "repo", + "created": "2010-07-14T10:48:47-07:00", + "pushed_at": "2012-12-14T16:58:55-08:00", + "watchers": 117, + "owner": "mixpanel", + "pushed": "2012-12-14T16:58:55-08:00", + "forks": 42, + "username": "mixpanel", + "description": "iPhone tracking library for Mixpanel Analytics", + "language": "Objective-C", + "fork": false, + "size": 288, + "followers": 117, + "name": "mixpanel-iphone", + "private": false, + "created_at": "2010-07-14T10:48:47-07:00" + }, + { + "type": "repo", + "created": "2010-02-03T04:27:50-08:00", + "pushed_at": "2012-02-01T15:29:10-08:00", + "watchers": 147, + "owner": "wikimedia", + "pushed": "2012-02-01T15:29:10-08:00", + "forks": 34, + "username": "wikimedia", + "description": "", + "language": "Objective-C", + "fork": false, + "size": 292, + "followers": 147, + "name": "wikipedia-iphone", + "private": false, + "created_at": "2010-02-03T04:27:50-08:00" + }, + { + "type": "repo", + "created": "2010-06-12T12:40:45-07:00", + "pushed_at": "2012-12-05T09:40:55-08:00", + "watchers": 469, + "owner": "kstenerud", + "pushed": "2012-12-05T09:40:55-08:00", + "forks": 52, + "username": "kstenerud", + "description": "Mac and iOS Audio development, minus the headache. ObjectAL is the easy Objective-C interface to OpenAL, AVAudioPlayer, and audio session management.", + "language": "Objective-C", + "fork": false, + "size": 348, + "followers": 469, + "name": "ObjectAL-for-iPhone", + "private": false, + "created_at": "2010-06-12T12:40:45-07:00" + }, + { + "type": "repo", + "created": "2009-08-17T09:50:47-07:00", + "pushed_at": "2011-10-16T18:07:47-07:00", + "watchers": 828, + "owner": "thefaj", + "pushed": "2011-10-16T18:07:47-07:00", + "forks": 150, + "username": "thefaj", + "description": "CoverFlow API replacement for the iPhone", + "language": "Objective-C", + "fork": false, + "size": 204, + "followers": 828, + "name": "OpenFlow", + "private": false, + "created_at": "2009-08-17T09:50:47-07:00" + }, + { + "type": "repo", + "created": "2010-07-06T13:25:58-07:00", + "pushed_at": "2011-10-31T11:51:02-07:00", + "watchers": 1744, + "owner": "ideashower", + "pushed": "2011-10-31T11:51:02-07:00", + "forks": 386, + "username": "ideashower", + "description": "Drop in sharing features for all iPhone and iPad apps", + "language": "Objective-C", + "fork": false, + "size": 812, + "followers": 1744, + "name": "ShareKit", + "private": false, + "created_at": "2010-07-06T13:25:58-07:00" + }, + { + "type": "repo", + "created": "2009-05-01T11:40:01-07:00", + "pushed_at": "2012-07-12T22:04:08-07:00", + "watchers": 391, + "owner": "haqu", + "pushed": "2012-07-12T22:04:08-07:00", + "forks": 86, + "username": "haqu", + "description": "iPhone game", + "language": "Objective-C", + "fork": false, + "size": 180, + "followers": 391, + "name": "tweejump", + "private": false, + "created_at": "2009-05-01T11:40:01-07:00" + }, + { + "type": "repo", + "created": "2010-05-28T13:52:32-07:00", + "pushed_at": "2012-12-14T14:45:44-08:00", + "watchers": 144, + "owner": "uservoice", + "pushed": "2012-12-14T14:45:44-08:00", + "forks": 57, + "username": "uservoice", + "description": "UserVoice for iOS SDK for iPhone and iPad apps", + "language": "Objective-C", + "fork": false, + "size": 67453, + "followers": 144, + "name": "uservoice-iphone-sdk", + "private": false, + "created_at": "2010-05-28T13:52:32-07:00" + }, + { + "type": "repo", + "created": "2011-09-04T10:14:37-07:00", + "pushed_at": "2012-12-14T09:10:22-08:00", + "watchers": 1185, + "owner": "ShareKit", + "pushed": "2012-12-14T09:10:22-08:00", + "forks": 434, + "username": "ShareKit", + "description": "Drop in sharing features for all iPhone and iPad apps", + "language": "Objective-C", + "fork": false, + "size": 638, + "followers": 1185, + "name": "ShareKit", + "private": false, + "created_at": "2011-09-04T10:14:37-07:00" + }, + { + "type": "repo", + "created": "2009-07-13T11:40:48-07:00", + "pushed_at": "2012-05-22T02:54:53-07:00", + "watchers": 1210, + "owner": "capttaco", + "pushed": "2012-05-22T02:54:53-07:00", + "forks": 87, + "username": "capttaco", + "description": "Framework for iPhone wireframes", + "language": "Objective-C", + "fork": false, + "size": 128, + "followers": 1210, + "name": "Briefs", + "private": false, + "created_at": "2009-07-13T11:40:48-07:00" + }, + { + "type": "repo", + "created": "2010-10-21T06:51:05-07:00", + "pushed_at": "2012-12-17T08:28:09-08:00", + "watchers": 90, + "owner": "mixare", + "pushed": "2012-12-17T08:28:09-08:00", + "forks": 28, + "username": "mixare", + "description": "mixare (mix Augmented Reality Engine) is a free open source augmented reality browser, which is published under the GPLv3. This repository contains the iphone version", + "language": "Objective-C", + "fork": false, + "size": 344, + "followers": 90, + "name": "mixare-iphone", + "private": false, + "created_at": "2010-10-21T06:51:05-07:00" + }, + { + "type": "repo", + "created": "2011-04-04T19:07:42-07:00", + "pushed_at": "2012-11-08T21:27:45-08:00", + "watchers": 588, + "owner": "Xuzz", + "pushed": "2012-11-08T21:27:45-08:00", + "forks": 118, + "username": "Xuzz", + "description": "An iPhone Hacker News client.", + "language": "Objective-C", + "fork": false, + "size": 228, + "followers": 588, + "name": "newsyc", + "private": false, + "created_at": "2011-04-04T19:07:42-07:00" + }, + { + "type": "repo", + "created": "2008-08-03T11:00:05-07:00", + "pushed_at": "2009-12-03T17:28:39-08:00", + "watchers": 1694, + "owner": "sintaxi", + "pushed": "2009-12-03T17:28:39-08:00", + "forks": 631, + "username": "sintaxi", + "description": "access core functions on Android, iPhone and Blackberry using JavaScript", + "language": "JavaScript", + "fork": false, + "size": 608, + "followers": 1694, + "name": "phonegap", + "private": false, + "created_at": "2008-08-03T11:00:05-07:00" + }, + { + "type": "repo", + "created": "2011-08-17T15:21:46-07:00", + "pushed_at": "2011-11-24T14:34:30-08:00", + "watchers": 85, + "owner": "yoshiokatsuneo", + "pushed": "2011-11-24T14:34:30-08:00", + "forks": 26, + "username": "yoshiokatsuneo", + "description": "CamLingual for iPhone(iOS)", + "language": "Objective-C", + "fork": false, + "size": 120, + "followers": 85, + "name": "camlingual_iphone", + "private": false, + "created_at": "2011-08-17T15:21:46-07:00" + }, + { + "type": "repo", + "created": "2010-07-25T10:44:33-07:00", + "pushed_at": "2012-08-08T14:59:53-07:00", + "watchers": 1682, + "owner": "leah", + "pushed": "2012-08-08T14:59:53-07:00", + "forks": 203, + "username": "leah", + "description": "A simple iPhone TableViewController for adding pull-to-refresh functionality.", + "language": "Objective-C", + "fork": false, + "size": 176, + "followers": 1682, + "name": "PullToRefresh", + "private": false, + "created_at": "2010-07-25T10:44:33-07:00" + }, + { + "type": "repo", + "created": "2009-04-23T01:21:13-07:00", + "pushed_at": "2011-09-20T01:59:01-07:00", + "watchers": 229, + "owner": "tapsandswipes", + "pushed": "2011-09-20T01:59:01-07:00", + "forks": 26, + "username": "tapsandswipes", + "description": "A pie menu implementation specially designed for iPhone and iPod touch", + "language": "Objective-C", + "fork": false, + "size": 120, + "followers": 229, + "name": "iphone-pie-menu", + "private": false, + "created_at": "2009-04-23T01:21:13-07:00" + }, + { + "type": "repo", + "created": "2011-06-08T01:38:54-07:00", + "pushed_at": "2012-11-15T04:47:00-08:00", + "watchers": 588, + "owner": "haqu", + "pushed": "2012-11-15T04:47:00-08:00", + "forks": 86, + "username": "haqu", + "description": "Remake of the popular iPhone game.", + "language": "Objective-C", + "fork": false, + "size": 208, + "followers": 588, + "name": "tiny-wings", + "private": false, + "created_at": "2011-06-08T01:38:54-07:00" + }, + { + "type": "repo", + "created": "2008-07-14T14:43:50-07:00", + "pushed_at": "2012-07-30T08:22:30-07:00", + "watchers": 4289, + "owner": "pokeb", + "pushed": "2012-07-30T08:22:30-07:00", + "forks": 806, + "username": "pokeb", + "description": "Easy to use CFNetwork wrapper for HTTP requests, Objective-C, Mac OS X and iPhone", + "language": "Objective-C", + "fork": false, + "size": 864, + "followers": 4289, + "name": "asi-http-request", + "private": false, + "created_at": "2008-07-14T14:43:50-07:00" + }, + { + "type": "repo", + "created": "2009-12-18T19:46:11-08:00", + "pushed_at": "2012-05-26T07:16:36-07:00", + "watchers": 234, + "owner": "nielswh", + "pushed": "2012-05-26T07:16:36-07:00", + "forks": 45, + "username": "nielswh", + "description": "An Objective-C augmented reality kit for iPhone. Forked from the iphonearkit.", + "language": "Objective-C", + "fork": true, + "size": 152, + "followers": 234, + "name": "iPhone-AR-Toolkit", + "private": false, + "created_at": "2009-12-18T19:46:11-08:00" + }, + { + "type": "repo", + "created": "2012-08-16T22:41:57-07:00", + "pushed_at": "2012-11-17T12:14:34-08:00", + "watchers": 3136, + "owner": "maker", + "pushed": "2012-11-17T12:14:34-08:00", + "forks": 256, + "username": "maker", + "description": "Prototype iPhone apps with simple HTML, CSS, and JS components. ", + "language": "JavaScript", + "fork": false, + "size": 616, + "followers": 3136, + "name": "ratchet", + "private": false, + "created_at": "2012-08-16T22:41:57-07:00" + }, + { + "type": "repo", + "created": "2010-04-17T11:58:21-07:00", + "pushed_at": "2012-09-28T18:11:00-07:00", + "watchers": 1920, + "owner": "AlanQuatermain", + "pushed": "2012-09-28T18:11:00-07:00", + "forks": 354, + "username": "AlanQuatermain", + "description": "A grid view for iPhone/iPad, designed to look similar to NSCollectionView.", + "language": "Objective-C", + "fork": false, + "size": 216, + "followers": 1920, + "name": "AQGridView", + "private": false, + "created_at": "2010-04-17T11:58:21-07:00" + }, + { + "type": "repo", + "created": "2009-12-19T08:28:14-08:00", + "pushed_at": "2012-11-30T10:15:53-08:00", + "watchers": 989, + "owner": "klazuka", + "pushed": "2012-11-30T10:15:53-08:00", + "forks": 201, + "username": "klazuka", + "description": "A calendar component for the iPhone (the UI is designed to match MobileCal)", + "language": "Objective-C", + "fork": false, + "size": 176, + "followers": 989, + "name": "Kal", + "private": false, + "created_at": "2009-12-19T08:28:14-08:00" + }, + { + "type": "repo", + "created": "2008-12-12T10:32:57-08:00", + "pushed_at": "2011-06-08T10:55:43-07:00", + "watchers": 94, + "owner": "hamedh", + "pushed": "2011-06-08T10:55:43-07:00", + "forks": 18, + "username": "hamedh", + "description": "iPhone Internet Radio Streaming Application", + "language": null, + "fork": false, + "size": 116, + "followers": 94, + "name": "iphone_radio", + "private": false, + "created_at": "2008-12-12T10:32:57-08:00" + }, + { + "type": "repo", + "created": "2011-12-01T16:58:14-08:00", + "pushed_at": "2012-06-08T17:01:51-07:00", + "watchers": 167, + "owner": "toffer", + "pushed": "2012-06-08T17:01:51-07:00", + "forks": 24, + "username": "toffer", + "description": "Backup your iPhone SMS text messages.", + "language": "Python", + "fork": false, + "size": 156, + "followers": 167, + "name": "iphone-sms-backup", + "private": false, + "created_at": "2011-12-01T16:58:14-08:00" + }, + { + "type": "repo", + "created": "2008-10-22T04:43:22-07:00", + "pushed_at": "2008-11-12T10:48:11-08:00", + "watchers": 138, + "owner": "leonho", + "pushed": "2008-11-12T10:48:11-08:00", + "forks": 14, + "username": "leonho", + "description": "Varies useful libs, classes, and methods for iPhone development", + "language": "Objective-C", + "fork": false, + "size": 136, + "followers": 138, + "name": "iphone-libs", + "private": false, + "created_at": "2008-10-22T04:43:22-07:00" + }, + { + "type": "repo", + "created": "2012-02-21T04:14:31-08:00", + "pushed_at": "2012-11-15T14:06:29-08:00", + "watchers": 634, + "owner": "yyx990803", + "pushed": "2012-11-15T14:06:29-08:00", + "forks": 106, + "username": "yyx990803", + "description": "A replica of the Clear iphone app in HTML5", + "language": "JavaScript", + "fork": false, + "size": 156, + "followers": 634, + "name": "HTML5-Clear", + "private": false, + "created_at": "2012-02-21T04:14:31-08:00" + }, + { + "type": "repo", + "created": "2010-10-12T22:10:01-07:00", + "pushed_at": "2012-03-27T19:10:36-07:00", + "watchers": 447, + "owner": "ittybittydude", + "pushed": "2012-03-27T19:10:36-07:00", + "forks": 74, + "username": "ittybittydude", + "description": "A simple iPhone forms library", + "language": "Objective-C", + "fork": false, + "size": 268, + "followers": 447, + "name": "IBAForms", + "private": false, + "created_at": "2010-10-12T22:10:01-07:00" + }, + { + "type": "repo", + "created": "2010-02-09T10:28:20-08:00", + "pushed_at": "2011-08-29T08:12:58-07:00", + "watchers": 139, + "owner": "marforic", + "pushed": "2011-08-29T08:12:58-07:00", + "forks": 24, + "username": "marforic", + "description": "Script and instructions to compile imagemagick as a static library to use in any iPhone project", + "language": "C", + "fork": false, + "size": 140, + "followers": 139, + "name": "imagemagick_lib_iphone", + "private": false, + "created_at": "2010-02-09T10:28:20-08:00" + }, + { + "type": "repo", + "created": "2009-09-07T16:27:53-07:00", + "pushed_at": "2012-12-17T13:27:13-08:00", + "watchers": 1533, + "owner": "arashpayan", + "pushed": "2012-12-17T13:27:13-08:00", + "forks": 265, + "username": "arashpayan", + "description": "A utility that reminds your iPhone app's users to review the app.", + "language": "Objective-C", + "fork": false, + "size": 228, + "followers": 1533, + "name": "appirater", + "private": false, + "created_at": "2009-09-07T16:27:53-07:00" + }, + { + "type": "repo", + "created": "2010-01-14T15:56:45-08:00", + "pushed_at": "2010-09-09T11:37:28-07:00", + "watchers": 79, + "owner": "dropcam", + "pushed": "2010-09-09T11:37:28-07:00", + "forks": 32, + "username": "dropcam", + "description": "", + "language": "C", + "fork": false, + "size": 236, + "followers": 79, + "name": "dropcam_for_iphone", + "private": false, + "created_at": "2010-01-14T15:56:45-08:00" + }, + { + "type": "repo", + "created": "2009-09-08T15:41:48-07:00", + "pushed_at": "2009-10-27T21:10:38-07:00", + "watchers": 703, + "owner": "zac", + "pushed": "2009-10-27T21:10:38-07:00", + "forks": 158, + "username": "zac", + "description": "An Objective-C augmented reality kit for iPhone.", + "language": "Objective-C", + "fork": false, + "size": 120, + "followers": 703, + "name": "iphonearkit", + "private": false, + "created_at": "2009-09-08T15:41:48-07:00" + }, + { + "type": "repo", + "created": "2008-05-23T22:14:00-07:00", + "pushed_at": "2010-07-01T11:00:49-07:00", + "watchers": 326, + "owner": "planetbeing", + "pushed": "2010-07-01T11:00:49-07:00", + "forks": 73, + "username": "planetbeing", + "description": "Port Linux to the iPhone", + "language": "C", + "fork": false, + "size": 256, + "followers": 326, + "name": "iphonelinux", + "private": false, + "created_at": "2008-05-23T22:14:00-07:00" + }, + { + "type": "repo", + "created": "2011-11-30T05:17:12-08:00", + "pushed_at": "2012-05-27T04:44:26-07:00", + "watchers": 122, + "owner": "sergiomtzlosa", + "pushed": "2012-05-27T04:44:26-07:00", + "forks": 23, + "username": "sergiomtzlosa", + "description": "Wrapper class for iPhone to detect faces from face.com (developer.face.com)", + "language": "Objective-C", + "fork": false, + "size": 240, + "followers": 122, + "name": "faceWrapper-iphone", + "private": false, + "created_at": "2011-11-30T05:17:12-08:00" + }, + { + "type": "repo", + "created": "2010-05-12T19:50:24-07:00", + "pushed_at": "2011-11-07T08:54:47-08:00", + "watchers": 165, + "owner": "clarkware", + "pushed": "2011-11-07T08:54:47-08:00", + "forks": 19, + "username": "clarkware", + "description": "Material for my RailsConf 2010 tutorial", + "language": "Objective-C", + "fork": false, + "size": 120, + "followers": 165, + "name": "iphone-rails-tutorial", + "private": false, + "created_at": "2010-05-12T19:50:24-07:00" + }, + { + "type": "repo", + "created": "2010-07-25T05:27:11-07:00", + "pushed_at": "2010-07-25T06:38:45-07:00", + "watchers": 82, + "owner": "joelind", + "pushed": "2010-07-25T06:38:45-07:00", + "forks": 15, + "username": "joelind", + "description": "A build of Zebra Crossing (http://code.google.com/p/zxing/) for ios 4", + "language": "Java", + "fork": false, + "size": 640, + "followers": 82, + "name": "zxing-iphone", + "private": false, + "created_at": "2010-07-25T05:27:11-07:00" + }, + { + "type": "repo", + "created": "2010-02-04T05:57:05-08:00", + "pushed_at": "2012-09-21T13:23:57-07:00", + "watchers": 125, + "owner": "x2on", + "pushed": "2012-09-21T13:23:57-07:00", + "forks": 34, + "username": "x2on", + "description": "An Example XCode-Project with script for compiling OpenSSL for iOS Devices (iPhone, iPod Touch, iPad)", + "language": "C", + "fork": false, + "size": 168, + "followers": 125, + "name": "OpenSSL-for-iPhone", + "private": false, + "created_at": "2010-02-04T05:57:05-08:00" + }, + { + "type": "repo", + "created": "2010-01-12T01:37:53-08:00", + "pushed_at": "2012-12-17T05:21:54-08:00", + "watchers": 1410, + "owner": "futuretap", + "pushed": "2012-12-17T05:21:54-08:00", + "forks": 222, + "username": "futuretap", + "description": "This iPhone framework allows settings to be in-app in addition to being in the Settings app", + "language": "Objective-C", + "fork": false, + "size": 248, + "followers": 1410, + "name": "InAppSettingsKit", + "private": false, + "created_at": "2010-01-12T01:37:53-08:00" + }, + { + "type": "repo", + "created": "2009-06-24T18:03:08-07:00", + "pushed_at": "2009-09-26T18:18:32-07:00", + "watchers": 193, + "owner": "mattvague", + "pushed": "2009-09-26T18:18:32-07:00", + "forks": 25, + "username": "mattvague", + "description": "The accompanying code for my three20 iPhone tutorials at http://www.mattvague.com/blog", + "language": "Objective-C", + "fork": false, + "size": 376, + "followers": 193, + "name": "three20-iPhone-tutorials", + "private": false, + "created_at": "2009-06-24T18:03:08-07:00" + }, + { + "type": "repo", + "created": "2009-05-05T10:48:46-07:00", + "pushed_at": "2012-12-17T18:49:36-08:00", + "watchers": 2452, + "owner": "phonegap", + "pushed": "2012-12-17T18:49:36-08:00", + "forks": 421, + "username": "phonegap", + "description": "access core functions on Android, iPhone and Blackberry using JavaScript", + "language": "JavaScript", + "fork": true, + "size": 2348, + "followers": 2452, + "name": "phonegap", + "private": false, + "created_at": "2009-05-05T10:48:46-07:00" + }, + { + "type": "repo", + "created": "2010-01-08T17:20:28-08:00", + "pushed_at": "2010-03-31T10:57:03-07:00", + "watchers": 3, + "owner": "infil00p", + "pushed": "2010-03-31T10:57:03-07:00", + "forks": 163, + "username": "infil00p", + "description": "iPhone OS implementation of the PhoneGap API", + "language": "Objective-C", + "fork": false, + "size": 116, + "followers": 3, + "name": "phonegap-iphone", + "private": false, + "created_at": "2010-01-08T17:20:28-08:00" + }, + { + "type": "repo", + "created": "2009-06-11T13:55:04-07:00", + "pushed_at": "2012-06-04T11:13:22-07:00", + "watchers": 697, + "owner": "neror", + "pushed": "2012-06-04T11:13:22-07:00", + "forks": 67, + "username": "neror", + "description": "iPhone utilities mostly for Core Animation", + "language": "Objective-C", + "fork": false, + "size": 3747, + "followers": 697, + "name": "ftutils", + "private": false, + "created_at": "2009-06-11T13:55:04-07:00" + }, + { + "type": "repo", + "created": "2010-03-21T20:37:07-07:00", + "pushed_at": "2010-04-11T17:00:04-07:00", + "watchers": 92, + "owner": "gabriel", + "pushed": "2010-04-11T17:00:04-07:00", + "forks": 25, + "username": "gabriel", + "description": "Build scripts for building ffmpeg on iPhone", + "language": "Perl", + "fork": false, + "size": 116, + "followers": 92, + "name": "ffmpeg-iphone-build", + "private": false, + "created_at": "2010-03-21T20:37:07-07:00" + }, + { + "type": "repo", + "created": "2010-11-06T03:52:17-07:00", + "pushed_at": "2011-10-15T20:19:52-07:00", + "watchers": 553, + "owner": "briancollins", + "pushed": "2011-10-15T20:19:52-07:00", + "forks": 73, + "username": "briancollins", + "description": "a Tweetie-style tab bar for the iPhone", + "language": "Objective-C", + "fork": false, + "size": 132, + "followers": 553, + "name": "BCTabBarController", + "private": false, + "created_at": "2010-11-06T03:52:17-07:00" + }, + { + "type": "repo", + "created": "2009-07-08T17:23:48-07:00", + "pushed_at": "2010-01-20T09:30:04-08:00", + "watchers": 131, + "owner": "pmark", + "pushed": "2010-01-20T09:30:04-08:00", + "forks": 19, + "username": "pmark", + "description": "Objective-C and Cocoa Touch extensions one might expect to already be there.", + "language": "Objective-C", + "fork": false, + "size": 100, + "followers": 131, + "name": "Helpful-iPhone-Utilities", + "private": false, + "created_at": "2009-07-08T17:23:48-07:00" + }, + { + "type": "repo", + "created": "2009-10-19T19:27:09-07:00", + "pushed_at": "2012-03-28T11:22:23-07:00", + "watchers": 633, + "owner": "enormego", + "pushed": "2012-03-28T11:22:23-07:00", + "forks": 127, + "username": "enormego", + "description": "What if images on the iPhone were as easy as HTML?", + "language": "Objective-C", + "fork": false, + "size": 236, + "followers": 633, + "name": "EGOImageLoading", + "private": false, + "created_at": "2009-10-19T19:27:09-07:00" + }, + { + "type": "repo", + "created": "2008-09-22T09:46:32-07:00", + "pushed_at": "2011-01-11T01:19:43-08:00", + "watchers": 60, + "owner": "jeremywohl", + "pushed": "2011-01-11T01:19:43-08:00", + "forks": 16, + "username": "jeremywohl", + "description": "iPhone- and App Store-related items", + "language": null, + "fork": false, + "size": 192, + "followers": 60, + "name": "iphone-scripts", + "private": false, + "created_at": "2008-09-22T09:46:32-07:00" + }, + { + "type": "repo", + "created": "2010-06-17T11:53:07-07:00", + "pushed_at": "2012-01-14T16:57:38-08:00", + "watchers": 301, + "owner": "reddit", + "pushed": "2012-01-14T16:57:38-08:00", + "forks": 56, + "username": "reddit", + "description": "The iReddit iPhone app", + "language": "Objective-C", + "fork": false, + "size": 324, + "followers": 301, + "name": "iReddit", + "private": false, + "created_at": "2010-06-17T11:53:07-07:00" + }, + { + "type": "repo", + "created": "2011-01-17T07:05:02-08:00", + "pushed_at": "2011-10-29T03:44:11-07:00", + "watchers": 496, + "owner": "atomton", + "pushed": "2011-10-29T03:44:11-07:00", + "forks": 66, + "username": "atomton", + "description": "Library for the creation of HUDs in iPhone applications.", + "language": "Objective-C", + "fork": false, + "size": 136, + "followers": 496, + "name": "ATMHud", + "private": false, + "created_at": "2011-01-17T07:05:02-08:00" + }, + { + "type": "repo", + "created": "2009-02-06T11:24:15-08:00", + "pushed_at": "2009-03-06T10:02:14-08:00", + "watchers": 240, + "owner": "ars", + "pushed": "2009-03-06T10:02:14-08:00", + "forks": 62, + "username": "ars", + "description": "Helpful utilities for UIColor for iPhone", + "language": "Objective-C", + "fork": false, + "size": 100, + "followers": 240, + "name": "uicolor-utilities", + "private": false, + "created_at": "2009-02-06T11:24:15-08:00" + }, + { + "type": "repo", + "created": "2009-06-16T17:30:27-07:00", + "pushed_at": "2012-09-03T01:23:15-07:00", + "watchers": 776, + "owner": "mattgallagher", + "pushed": "2012-09-03T01:23:15-07:00", + "forks": 219, + "username": "mattgallagher", + "description": "A streaming audio player class (AudioStreamer) for Mac OS X and iPhone.", + "language": "Objective-C", + "fork": false, + "size": 148, + "followers": 776, + "name": "AudioStreamer", + "private": false, + "created_at": "2009-06-16T17:30:27-07:00" + }, + { + "type": "repo", + "created": "2010-05-04T21:09:38-07:00", + "pushed_at": "2011-10-19T23:33:48-07:00", + "watchers": 93, + "owner": "st3fan", + "pushed": "2011-10-19T23:33:48-07:00", + "forks": 11, + "username": "st3fan", + "description": "iPhone Twitter Framework", + "language": "Objective-C", + "fork": false, + "size": 340, + "followers": 93, + "name": "iphone-twitter", + "private": false, + "created_at": "2010-05-04T21:09:38-07:00" + }, + { + "type": "repo", + "created": "2008-10-27T20:46:21-07:00", + "pushed_at": "2011-09-05T18:54:08-07:00", + "watchers": 431, + "owner": "jdg", + "pushed": "2011-09-05T18:54:08-07:00", + "forks": 128, + "username": "jdg", + "description": "An iPhone ready, Objective-C implementation of an OAuth consumer.", + "language": "Objective-C", + "fork": false, + "size": 176, + "followers": 431, + "name": "oauthconsumer", + "private": false, + "created_at": "2008-10-27T20:46:21-07:00" + }, + { + "type": "repo", + "created": "2012-06-07T05:48:26-07:00", + "pushed_at": "2012-10-01T00:45:21-07:00", + "watchers": 66, + "owner": "MetaWatchOpenProjects", + "pushed": "2012-10-01T00:45:21-07:00", + "forks": 24, + "username": "MetaWatchOpenProjects", + "description": "iOS application project that demonstrates connectivity with Meta Watch Bluetooth 4.0 capable watches", + "language": "Objective-C", + "fork": false, + "size": 456, + "followers": 66, + "name": "MWM-for-iPhone", + "private": false, + "created_at": "2012-06-07T05:48:26-07:00" + }, + { + "type": "repo", + "created": "2010-09-13T16:49:15-07:00", + "pushed_at": "2012-06-13T14:47:11-07:00", + "watchers": 100, + "owner": "cobbal", + "pushed": "2012-06-13T14:47:11-07:00", + "forks": 18, + "username": "cobbal", + "description": "Build script for compiling python into a static library that can be used with the official SDK", + "language": "Shell", + "fork": false, + "size": 140, + "followers": 100, + "name": "python-for-iphone", + "private": false, + "created_at": "2010-09-13T16:49:15-07:00" + }, + { + "type": "repo", + "created": "2010-03-16T02:16:25-07:00", + "pushed_at": "2012-12-12T03:57:26-08:00", + "watchers": 403, + "owner": "rs", + "pushed": "2012-12-12T03:57:26-08:00", + "forks": 123, + "username": "rs", + "description": "URLCache subclass with on-disk cache support on iPhone/iPad", + "language": "Objective-C", + "fork": false, + "size": 164, + "followers": 403, + "name": "SDURLCache", + "private": false, + "created_at": "2010-03-16T02:16:25-07:00" + }, + { + "type": "repo", + "created": "2012-05-14T03:31:26-07:00", + "pushed_at": "2012-05-14T09:36:17-07:00", + "watchers": 688, + "owner": "mattgemmell", + "pushed": "2012-05-14T09:36:17-07:00", + "forks": 77, + "username": "mattgemmell", + "description": "Tile-based contextual menu for iPad and iPhone developers.", + "language": "Objective-C", + "fork": false, + "size": 132, + "followers": 688, + "name": "MGTileMenu", + "private": false, + "created_at": "2012-05-14T03:31:26-07:00" + }, + { + "type": "repo", + "created": "2009-05-22T15:51:08-07:00", + "pushed_at": "2010-03-24T09:40:50-07:00", + "watchers": 201, + "owner": "jhaynie", + "pushed": "2010-03-24T09:40:50-07:00", + "forks": 98, + "username": "jhaynie", + "description": "Command Line Launcher for the iPhone Simulator", + "language": "Objective-C", + "fork": false, + "size": 268, + "followers": 201, + "name": "iphonesim", + "private": false, + "created_at": "2009-05-22T15:51:08-07:00" + }, + { + "type": "repo", + "created": "2010-09-14T15:04:55-07:00", + "pushed_at": "2012-10-23T10:48:42-07:00", + "watchers": 37, + "owner": "janrain", + "pushed": "2012-10-23T10:48:42-07:00", + "forks": 17, + "username": "janrain", + "description": "", + "language": "Objective-C", + "fork": false, + "size": 172, + "followers": 37, + "name": "engage.iphone", + "private": false, + "created_at": "2010-09-14T15:04:55-07:00" + }, + { + "type": "repo", + "created": "2009-03-04T17:08:08-08:00", + "pushed_at": "2009-03-12T15:42:00-07:00", + "watchers": 52, + "owner": "kailoa", + "pushed": "2009-03-12T15:42:00-07:00", + "forks": 13, + "username": "kailoa", + "description": "A github fork of SKPSMTPMessage. A quick SMTP client for the iPhone, built on CFNetwork in ObjC", + "language": "Objective-C", + "fork": false, + "size": 92, + "followers": 52, + "name": "iphone-smtp", + "private": false, + "created_at": "2009-03-04T17:08:08-08:00" + }, + { + "type": "repo", + "created": "2011-01-21T08:43:35-08:00", + "pushed_at": "2012-12-08T02:10:50-08:00", + "watchers": 564, + "owner": "cubiq", + "pushed": "2012-12-08T02:10:50-08:00", + "forks": 79, + "username": "cubiq", + "description": "Add to home screen popup for iPhone/iPad", + "language": "JavaScript", + "fork": false, + "size": 172, + "followers": 564, + "name": "add-to-homescreen", + "private": false, + "created_at": "2011-01-21T08:43:35-08:00" + }, + { + "type": "repo", + "created": "2009-02-06T17:59:18-08:00", + "pushed_at": "2010-04-19T20:14:54-07:00", + "watchers": 67, + "owner": "andrewfromyammer", + "pushed": "2010-04-19T20:14:54-07:00", + "forks": 11, + "username": "andrewfromyammer", + "description": "Yammer.com iPhone App", + "language": "Objective-C", + "fork": false, + "size": 96, + "followers": 67, + "name": "yammer_iphone", + "private": false, + "created_at": "2009-02-06T17:59:18-08:00" + }, + { + "type": "repo", + "created": "2010-12-14T02:48:05-08:00", + "pushed_at": "2011-01-05T01:48:53-08:00", + "watchers": 147, + "owner": "bcaccinolo", + "pushed": "2011-01-05T01:48:53-08:00", + "forks": 63, + "username": "bcaccinolo", + "description": "an iPhone XML to NSDictionary converter", + "language": "Objective-C", + "fork": false, + "size": 132, + "followers": 147, + "name": "XML-to-NSDictionary", + "private": false, + "created_at": "2010-12-14T02:48:05-08:00" + }, + { + "type": "repo", + "created": "2009-03-28T10:25:03-07:00", + "pushed_at": "2012-12-18T00:42:29-08:00", + "watchers": 1035, + "owner": "dennisreimann", + "pushed": "2012-12-18T00:42:29-08:00", + "forks": 114, + "username": "dennisreimann", + "description": "iOS GitHub client (universal, works on the iPad, iPhone and iPod Touch)", + "language": "Objective-C", + "fork": false, + "size": 800, + "followers": 1035, + "name": "ioctocat", + "private": false, + "created_at": "2009-03-28T10:25:03-07:00" + }, + { + "type": "repo", + "created": "2011-08-08T22:46:15-07:00", + "pushed_at": "2011-12-14T00:08:10-08:00", + "watchers": 52, + "owner": "AdilSoomro", + "pushed": "2011-12-14T00:08:10-08:00", + "forks": 23, + "username": "AdilSoomro", + "description": "android Tab widget like Iphon UITabBar", + "language": "Java", + "fork": false, + "size": 196, + "followers": 52, + "name": "Iphone-Tab-in-Android", + "private": false, + "created_at": "2011-08-08T22:46:15-07:00" + }, + { + "type": "repo", + "created": "2009-10-11T10:45:35-07:00", + "pushed_at": "2011-03-01T04:07:44-08:00", + "watchers": 222, + "owner": "ksexton", + "pushed": "2011-03-01T04:07:44-08:00", + "forks": 43, + "username": "ksexton", + "description": "MobileOrg iPhone App", + "language": "Objective-C", + "fork": false, + "size": 340, + "followers": 222, + "name": "mobileorg", + "private": false, + "created_at": "2009-10-11T10:45:35-07:00" + }, + { + "type": "repo", + "created": "2010-11-11T11:44:17-08:00", + "pushed_at": "2011-02-17T18:17:34-08:00", + "watchers": 66, + "owner": "twilio", + "pushed": "2011-02-17T18:17:34-08:00", + "forks": 19, + "username": "twilio", + "description": "OpenVBX for iPhone", + "language": "Objective-C", + "fork": false, + "size": 204, + "followers": 66, + "name": "OpenVBX-iPhone", + "private": false, + "created_at": "2010-11-11T11:44:17-08:00" + }, + { + "type": "repo", + "created": "2012-02-14T22:34:59-08:00", + "pushed_at": "2012-09-16T06:23:54-07:00", + "watchers": 843, + "owner": "mystcolor", + "pushed": "2012-09-16T06:23:54-07:00", + "forks": 122, + "username": "mystcolor", + "description": "Recreating the buttonless interaction pattern found in Clear for iPhone app", + "language": "Objective-C", + "fork": false, + "size": 156, + "followers": 843, + "name": "JTGestureBasedTableViewDemo", + "private": false, + "created_at": "2012-02-14T22:34:59-08:00" + }, + { + "type": "repo", + "created": "2010-07-05T01:37:04-07:00", + "pushed_at": "2012-11-26T09:20:27-08:00", + "watchers": 567, + "owner": "mattgemmell", + "pushed": "2012-11-26T09:20:27-08:00", + "forks": 69, + "username": "mattgemmell", + "description": "Useful UIImage categories for iPhone/iPad developers.", + "language": "Objective-C", + "fork": false, + "size": 152, + "followers": 567, + "name": "MGImageUtilities", + "private": false, + "created_at": "2010-07-05T01:37:04-07:00" + }, + { + "type": "repo", + "created": "2010-01-08T09:06:41-08:00", + "pushed_at": "2010-08-06T12:13:56-07:00", + "watchers": 81, + "owner": "st3fan", + "pushed": "2010-08-06T12:13:56-07:00", + "forks": 9, + "username": "st3fan", + "description": "Simple EPUB Book Reader for the iPhone", + "language": "C", + "fork": false, + "size": 128, + "followers": 81, + "name": "iphone-bookreader", + "private": false, + "created_at": "2010-01-08T09:06:41-08:00" + }, + { + "type": "repo", + "created": "2008-10-24T01:30:55-07:00", + "pushed_at": "2010-09-01T08:13:59-07:00", + "watchers": 473, + "owner": "takuma104", + "pushed": "2010-09-01T08:13:59-07:00", + "forks": 73, + "username": "takuma104", + "description": "NatsuLiphone - The twitter client for iPhone / iPod touch", + "language": "Objective-C", + "fork": false, + "size": 312, + "followers": 473, + "name": "ntlniph", + "private": false, + "created_at": "2008-10-24T01:30:55-07:00" + }, + { + "type": "repo", + "created": "2011-06-12T09:31:37-07:00", + "pushed_at": "2012-12-19T07:10:29-08:00", + "watchers": 116, + "owner": "MiniKeePass", + "pushed": "2012-12-19T07:10:29-08:00", + "forks": 28, + "username": "MiniKeePass", + "description": "MiniKeePass for the iPhone", + "language": "Objective-C", + "fork": false, + "size": 496, + "followers": 116, + "name": "MiniKeePass", + "private": false, + "created_at": "2011-06-12T09:31:37-07:00" + }, + { + "type": "repo", + "created": "2010-01-19T12:57:50-08:00", + "pushed_at": "2011-07-27T17:26:07-07:00", + "watchers": 821, + "owner": "tcurdt", + "pushed": "2011-07-27T17:26:07-07:00", + "forks": 111, + "username": "tcurdt", + "description": "Let's you connect your laptop to the iPhone to surf the web.", + "language": "C", + "fork": false, + "size": 180, + "followers": 821, + "name": "iProxy", + "private": false, + "created_at": "2010-01-19T12:57:50-08:00" + }, + { + "type": "repo", + "created": "2010-04-19T22:53:04-07:00", + "pushed_at": "2011-10-29T18:14:34-07:00", + "watchers": 1214, + "owner": "brow", + "pushed": "2011-10-29T18:14:34-07:00", + "forks": 238, + "username": "brow", + "description": "An iBooks-like page-turning interface for iPhone and iPad apps using only public APIs.", + "language": "Objective-C", + "fork": false, + "size": 220, + "followers": 1214, + "name": "leaves", + "private": false, + "created_at": "2010-04-19T22:53:04-07:00" + }, + { + "type": "repo", + "created": "2009-10-19T16:43:56-07:00", + "pushed_at": "2012-11-12T08:04:30-08:00", + "watchers": 336, + "owner": "enormego", + "pushed": "2012-11-12T08:04:30-08:00", + "forks": 84, + "username": "enormego", + "description": "Fast Caching for Objective-C (iPhone & Mac Compatible)", + "language": "Objective-C", + "fork": false, + "size": 184, + "followers": 336, + "name": "EGOCache", + "private": false, + "created_at": "2009-10-19T16:43:56-07:00" + }, + { + "type": "repo", + "created": "2010-02-08T07:52:55-08:00", + "pushed_at": "2012-04-19T10:24:57-07:00", + "watchers": 481, + "owner": "kirbyt", + "pushed": "2012-04-19T10:24:57-07:00", + "forks": 83, + "username": "kirbyt", + "description": "KTPhotoBrowser is a lightweight photo browser library for the iPhone and iPod touch that looks and behaves like the iPhone Photos app.", + "language": "Objective-C", + "fork": false, + "size": 164, + "followers": 481, + "name": "KTPhotoBrowser", + "private": false, + "created_at": "2010-02-08T07:52:55-08:00" + }, + { + "type": "repo", + "created": "2009-06-28T18:57:35-07:00", + "pushed_at": "2012-04-06T10:31:07-07:00", + "watchers": 1034, + "owner": "probablycorey", + "pushed": "2012-04-06T10:31:07-07:00", + "forks": 83, + "username": "probablycorey", + "description": "Wax is a framework that lets you write native iPhone apps in Lua.", + "language": "C", + "fork": false, + "size": 1759, + "followers": 1034, + "name": "wax", + "private": false, + "created_at": "2009-06-28T18:57:35-07:00" + }, + { + "type": "repo", + "created": "2009-02-28T21:34:53-08:00", + "pushed_at": "2009-04-17T23:59:59-07:00", + "watchers": 79, + "owner": "keishi", + "pushed": "2009-04-17T23:59:59-07:00", + "forks": 14, + "username": "keishi", + "description": "An iPhone app to view articles on wikiHow.com.", + "language": "C", + "fork": false, + "size": 112, + "followers": 79, + "name": "wikihow-iphone-app", + "private": false, + "created_at": "2009-02-28T21:34:53-08:00" + }, + { + "type": "repo", + "created": "2012-02-13T10:40:19-08:00", + "pushed_at": "2012-05-17T06:29:19-07:00", + "watchers": 1064, + "owner": "ccoenraets", + "pushed": "2012-05-17T06:29:19-07:00", + "forks": 225, + "username": "ccoenraets", + "description": "Sample Application built with Backbone.js and 3 different UI toolkits: Twitter Bootstrap, jQuery Mobile, and custom iPhone skins", + "language": "PHP", + "fork": false, + "size": 268, + "followers": 1064, + "name": "backbone-directory", + "private": false, + "created_at": "2012-02-13T10:40:19-08:00" + }, + { + "type": "repo", + "created": "2012-05-14T06:46:36-07:00", + "pushed_at": "2012-06-11T07:22:17-07:00", + "watchers": 212, + "owner": "takashisite", + "pushed": "2012-06-11T07:22:17-07:00", + "forks": 33, + "username": "takashisite", + "description": "UIPopover like UI for iPhone", + "language": "Objective-C", + "fork": false, + "size": 168, + "followers": 212, + "name": "TSPopover", + "private": false, + "created_at": "2012-05-14T06:46:36-07:00" + }, + { + "type": "repo", + "created": "2009-05-06T08:35:51-07:00", + "pushed_at": "2011-03-06T17:33:12-08:00", + "watchers": 240, + "owner": "beetlebugorg", + "pushed": "2011-03-06T17:33:12-08:00", + "forks": 29, + "username": "beetlebugorg", + "description": "iPhone Face Detection App", + "language": "C", + "fork": false, + "size": 160, + "followers": 240, + "name": "PictureMe", + "private": false, + "created_at": "2009-05-06T08:35:51-07:00" + }, + { + "type": "repo", + "created": "2012-01-26T15:00:24-08:00", + "pushed_at": "2012-09-21T10:45:26-07:00", + "watchers": 711, + "owner": "omz", + "pushed": "2012-09-21T10:45:26-07:00", + "forks": 89, + "username": "omz", + "description": "Dedicated app for reading Apple's developer documentation on an iPad or iPhone", + "language": "C", + "fork": false, + "size": 232, + "followers": 711, + "name": "DocSets-for-iOS", + "private": false, + "created_at": "2012-01-26T15:00:24-08:00" + }, + { + "type": "repo", + "created": "2010-07-07T02:24:17-07:00", + "pushed_at": "2012-12-15T14:17:33-08:00", + "watchers": 1164, + "owner": "Simbul", + "pushed": "2012-12-15T14:17:33-08:00", + "forks": 172, + "username": "Simbul", + "description": "The HTML5 ebook framework to publish interactive books & magazines on iPad & iPhone using simply open web standards ", + "language": "Objective-C", + "fork": false, + "size": 580, + "followers": 1164, + "name": "baker", + "private": false, + "created_at": "2010-07-07T02:24:17-07:00" + }, + { + "type": "repo", + "created": "2010-03-31T09:04:35-07:00", + "pushed_at": "2012-04-15T11:06:42-07:00", + "watchers": 57, + "owner": "ResultsDirect", + "pushed": "2012-04-15T11:06:42-07:00", + "forks": 15, + "username": "ResultsDirect", + "description": "Simple framework to provide authentication and API support for LinkedIn on iPhoneOS devices.", + "language": "Objective-C", + "fork": false, + "size": 172, + "followers": 57, + "name": "LinkedIn-iPhone", + "private": false, + "created_at": "2010-03-31T09:04:35-07:00" + }, + { + "type": "repo", + "created": "2010-03-15T08:15:39-07:00", + "pushed_at": "2010-09-04T07:10:19-07:00", + "watchers": 1198, + "owner": "mattgemmell", + "pushed": "2010-09-04T07:10:19-07:00", + "forks": 158, + "username": "mattgemmell", + "description": "Objective-C Twitter integration library for Mac OS X and iPhone. Official repository.", + "language": "Objective-C", + "fork": false, + "size": 316, + "followers": 1198, + "name": "MGTwitterEngine", + "private": false, + "created_at": "2010-03-15T08:15:39-07:00" + }, + { + "type": "repo", + "created": "2011-06-01T08:33:37-07:00", + "pushed_at": "2012-11-12T11:33:52-08:00", + "watchers": 332, + "owner": "schwa", + "pushed": "2012-11-12T11:33:52-08:00", + "forks": 61, + "username": "schwa", + "description": "An open source (BSD) iPhone & iPad PDF Reader", + "language": "Objective-C", + "fork": false, + "size": 192, + "followers": 332, + "name": "iOS-PDF-Reader", + "private": false, + "created_at": "2011-06-01T08:33:37-07:00" + }, + { + "type": "repo", + "created": "2010-10-20T15:30:03-07:00", + "pushed_at": "2012-12-18T09:25:07-08:00", + "watchers": 68, + "owner": "MIT-Mobile", + "pushed": "2012-12-18T09:25:07-08:00", + "forks": 19, + "username": "MIT-Mobile", + "description": "The iPhone native portion of the MIT Mobile Framework", + "language": "Objective-C", + "fork": false, + "size": 2172, + "followers": 68, + "name": "MIT-Mobile-for-iPhone", + "private": false, + "created_at": "2010-10-20T15:30:03-07:00" + } + ] +} diff --git a/examples/Tests/Data/jsonTypes.json b/examples/Tests/Data/jsonTypes.json new file mode 100644 index 00000000..a5e19abd --- /dev/null +++ b/examples/Tests/Data/jsonTypes.json @@ -0,0 +1,14 @@ +{ + "caption": "This is a text element", + "dynamicString": "A piece of text", + + "year": 2012, + "pi": 3.14159, + + "list": ["111","222","333"], + "dynamicList": ["12", 12, 0.12], + "dictionary": {"test":"mest", "value": 123.29}, + "dynamicDictionary": {"key":"value", "otherKey": 1200}, + + "notAvailable": null +} diff --git a/examples/Tests/Data/nestedData.json b/examples/Tests/Data/nestedData.json new file mode 100644 index 00000000..3621ac71 --- /dev/null +++ b/examples/Tests/Data/nestedData.json @@ -0,0 +1,15 @@ +{ + "singleImage": {"idImage": 2, "name": "lake.jpg"}, + + "images": [ + {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, + {"idImage": 2, "name": "lake.jpg"}, + {"idImage": 3, "name": "peak.jpg"} + ], + + "imagesObject": { + "image2": {"idImage": 2, "name": "lake.jpg"}, + "image3": {"idImage": 3, "name": "peak.jpg"} + } + +} diff --git a/examples/Tests/Data/nestedDataWithArrayError.json b/examples/Tests/Data/nestedDataWithArrayError.json new file mode 100644 index 00000000..bf2f24aa --- /dev/null +++ b/examples/Tests/Data/nestedDataWithArrayError.json @@ -0,0 +1,15 @@ +{ + "singleImage": {"idImage": 2, "name": "lake.jpg"}, + + "images": [ + {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, + {"idImage": 2, "name1": "lake.jpg"}, + {"idImage": 3, "name": "peak.jpg"} + ], + + "imagesObject": { + "image2": {"idImage": 2, "name": "lake.jpg"}, + "image3": {"idImage": 3, "name": "peak.jpg"} + } + +} diff --git a/examples/Tests/Data/nestedDataWithDictionaryError.json b/examples/Tests/Data/nestedDataWithDictionaryError.json new file mode 100644 index 00000000..f2da21e7 --- /dev/null +++ b/examples/Tests/Data/nestedDataWithDictionaryError.json @@ -0,0 +1,15 @@ +{ + "singleImage": {"idImage": 2, "name": "lake.jpg"}, + + "images": [ + {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, + {"idImage": 2, "name": "lake.jpg"}, + {"idImage": 3, "name": "peak.jpg"} + ], + + "imagesObject": { + "image2": {"idImage": 2, "name1": "lake.jpg"}, + "image3": {"idImage": 3, "name": "peak.jpg"} + } + +} diff --git a/examples/Tests/Data/nestedDataWithTypeMismatchOnImages.json b/examples/Tests/Data/nestedDataWithTypeMismatchOnImages.json new file mode 100644 index 00000000..5f1facf7 --- /dev/null +++ b/examples/Tests/Data/nestedDataWithTypeMismatchOnImages.json @@ -0,0 +1,15 @@ +{ + "singleImage": {"idImage": 2, "name": "lake.jpg"}, + + "images": { + "x" : {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, + "y" : {"idImage": 2, "name": "lake.jpg"}, + "z" : {"idImage": 3, "name": "peak.jpg"} + }, + + "imagesObject": { + "image2": {"idImage": 2, "name": "lake.jpg"}, + "image3": {"idImage": 3, "name": "peak.jpg"} + } + +} diff --git a/examples/Tests/Data/nestedDataWithTypeMismatchOnImagesObject.json b/examples/Tests/Data/nestedDataWithTypeMismatchOnImagesObject.json new file mode 100644 index 00000000..70545f34 --- /dev/null +++ b/examples/Tests/Data/nestedDataWithTypeMismatchOnImagesObject.json @@ -0,0 +1,15 @@ +{ + "singleImage": {"idImage": 2, "name": "lake.jpg"}, + + "images": [ + {"idImage": 1, "name": "house.jpg", "copyright":{"author":"Marin Todorov", "year":2012} }, + {"idImage": 2, "name": "lake.jpg"}, + {"idImage": 3, "name": "peak.jpg"} + ], + + "imagesObject": [ + {"idImage": 2, "name": "lake.jpg"}, + {"idImage": 3, "name": "peak.jpg"} + ] + +} diff --git a/examples/Tests/Data/post.json b/examples/Tests/Data/post.json new file mode 100644 index 00000000..0f522381 --- /dev/null +++ b/examples/Tests/Data/post.json @@ -0,0 +1,9 @@ +{ + "posts": [ + {"id":1, "name":"My first post!!"}, + {"id":2, "name":"My second post!!"}, + {"id":3, "name":"My third post!!"}, + {"id":4, "name":"My fourth post!!"}, + {"id":5, "name":"My fifth post!!"} + ] +} diff --git a/examples/Tests/Data/primitives.json b/examples/Tests/Data/primitives.json new file mode 100644 index 00000000..ac05246a --- /dev/null +++ b/examples/Tests/Data/primitives.json @@ -0,0 +1,11 @@ +{ + "shortNumber": 114, + "intNumber": 12, + "longNumber": 12124, + + "floatNumber": 12.12, + "doubleNumber": 121231312.124, + + "boolYES": true, + "boolNO": false +} diff --git a/examples/Tests/Data/primitivesWithErrors.json b/examples/Tests/Data/primitivesWithErrors.json new file mode 100644 index 00000000..47fa4c56 --- /dev/null +++ b/examples/Tests/Data/primitivesWithErrors.json @@ -0,0 +1,10 @@ +{ + "shortNumber": 114, + "longNumber1": 12124, + + "floatNumber": 12.12, + "doubleNumber": 121231312.124, + + "boolYES": true, + "boolNO": false +} diff --git a/examples/Tests/Data/specialPropertyName.json b/examples/Tests/Data/specialPropertyName.json new file mode 100644 index 00000000..6651c820 --- /dev/null +++ b/examples/Tests/Data/specialPropertyName.json @@ -0,0 +1,5 @@ +{ + "className" : "Test", + "indexPropertyName" : "foo", + "id" : "bar" +} diff --git a/examples/Tests/Data/withOptProp.json b/examples/Tests/Data/withOptProp.json new file mode 100644 index 00000000..fc613e3d --- /dev/null +++ b/examples/Tests/Data/withOptProp.json @@ -0,0 +1,4 @@ +{ + "fillerNumber": 42, + "notRequredProperty" : "I'm here this time!" +} diff --git a/examples/Tests/Data/withoutOptProp.json b/examples/Tests/Data/withoutOptProp.json new file mode 100644 index 00000000..e29bab91 --- /dev/null +++ b/examples/Tests/Data/withoutOptProp.json @@ -0,0 +1,3 @@ +{ + "fillerNumber": 13 +} diff --git a/examples/Tests/ExtremeNestingTests.m b/examples/Tests/ExtremeNestingTests.m new file mode 100644 index 00000000..8b3f7dc7 --- /dev/null +++ b/examples/Tests/ExtremeNestingTests.m @@ -0,0 +1,69 @@ +// +// Created by Rahul Somasunderam on 9/4/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "NestedModel.h" +#import "ExtremeNestingModel.h" +#import "DrugModel.h" +#import "InteractionModel.h" + +@interface ExtremeNestingTests : XCTestCase +@end + +@implementation ExtremeNestingTests +{ + ExtremeNestingModel *n; +} + +- (void)setUp +{ + [super setUp]; + + NSString *jsonContents = @"{\n" + " \"generic_alternatives\": [\n" + " {\n" + " \"items\": [\n" + " {\n" + " \"data\": [\n" + " {\n" + " \"brand_name\": \"Novolog\",\n" + " \"interaction_list\": [\n" + " {\n" + " \"dxid\": 594,\n" + " \"text\": \"Novolog Mix 70-30 100 unit/mL subcutaneous solution is relatively contraindicated in patients with Renal Disease.
The following patient diagnosis is related to, or may imply, that this condition exists:
  • Diabetes with Renal Manifestations Type II or Unspecified Type, not Stated as Uncontrolled

This medication belongs to the following drug class or contains the following ingredient which is known to have clinically important considerations:
  • INSULINS
is relatively contraindicated in Renal Disease
For additional information please refer to the manufacturer's monograph.\",\n" + " \"title\": \"Diabetes with Renal Manifestations Type II or Unspecified Type, not Stated as Uncontrolled (Renal Disease)\",\n" + " \"type\": \"DDX\"\n" + " }\n" + " ]\n" + " }\n" + " ]\n" + " }\n" + " ]\n" + " }\n" + " ]\n" + "}"; + + NSError *err; + n = [[ExtremeNestingModel alloc] initWithString:jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(n, @"Could not load the test data file."); +} + +- (void)testNestedStructures +{ + XCTAssertEqual(n.drugs.count, 1); + DrugModel *drug = n.drugs[0]; + XCTAssertEqualObjects(drug.brand_name, @"Novolog"); + + XCTAssertEqual(drug.interaction_list.count, 1); + InteractionModel *interaction = drug.interaction_list[0]; + + XCTAssertEqualObjects(interaction.title, @"Diabetes with Renal Manifestations Type II or Unspecified Type, " + "not Stated as Uncontrolled (Renal Disease)"); + XCTAssertEqualObjects(interaction.type, @"DDX"); +} + +@end diff --git a/examples/Tests/IdPropertyTests.m b/examples/Tests/IdPropertyTests.m new file mode 100644 index 00000000..3466a53d --- /dev/null +++ b/examples/Tests/IdPropertyTests.m @@ -0,0 +1,60 @@ +// +// IdPropertyTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 13/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "PostsModel.h" +#import "PostModel.h" + +@interface IdPropertyTests : XCTestCase +@end + +@implementation IdPropertyTests +{ + PostsModel* posts; +} + +-(void)setUp +{ + [super setUp]; + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../post.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + posts = [[PostsModel alloc] initWithString: jsonContents error:&err]; + XCTAssertTrue(!err, "%@", [err localizedDescription]); + + XCTAssertNotNil(posts, @"Could not load the test data file."); +} + +-(void)testEquality +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../post.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + PostsModel* posts1 = [[PostsModel alloc] initWithString: jsonContents error:nil]; + PostModel* post = posts.posts[0]; + + XCTAssertTrue([post isEqual:posts1.posts[0]], @"Equal to another different model object"); + + XCTAssertTrue([posts.posts indexOfObject: posts1.posts[1]]==1, @"NSArray searching for a model object failed" ); +} + +-(void)testCompareInequality +{ + PostModel* post = posts.posts[0]; + XCTAssertTrue(![post isEqual:nil], @"Equal to nil object"); + XCTAssertTrue(![post isEqual:[NSNull null]], @"Equal to NSNull object"); + XCTAssertTrue(![post isEqual:posts.posts[1]], @"Equal to another different model object"); +} + + +@end diff --git a/examples/Tests/InitWithDataTests.m b/examples/Tests/InitWithDataTests.m new file mode 100644 index 00000000..786ffdbb --- /dev/null +++ b/examples/Tests/InitWithDataTests.m @@ -0,0 +1,141 @@ +// +// InitWithDataTests.m +// JSONModelDemo_iOS +// +// Created by Johnykutty on 14/09/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "PrimitivesModel.h" +#import "NestedModel.h" +#import "CopyrightModel.h" + +@interface InitWithDataTests : XCTestCase +@end + +@implementation InitWithDataTests + +- (void)setUp +{ + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown +{ + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +-(void)testForNilInputFromData +{ + JSONModelError* err = nil; + + //test for nil string input + CopyrightModel* cpModel = [[CopyrightModel alloc] initWithData:nil error:&err]; + cpModel=nil; + + XCTAssertTrue(err!=nil, @"No error returned when initialized with nil string"); + XCTAssertTrue(err.code == kJSONModelErrorNilInput, @"Wrong error for nil string input"); +} + +-(void)testErrorsInNestedModelsArray +{ + NSError* err = [self performTestErrorsInNestedModelFile:@"../../nestedDataWithArrayError.json"]; + + // Make sure that the error is at the expected key-path + XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"images[1]", @"kJSONModelKeyPath does not contain the expected path of the error."); +} + +-(void)testErrorsInNestedModelsDictionary +{ + NSError* err = [self performTestErrorsInNestedModelFile:@"../../nestedDataWithDictionaryError.json"]; + + // Make sure that the error is at the expected key-path + XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"imagesObject.image2", @"kJSONModelKeyPath does not contain the expected path of the error."); +} + +- (NSError*)performTestErrorsInNestedModelFile:(NSString*)jsonFilename +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:jsonFilename]; + NSData *jsonData = [NSData dataWithContentsOfFile:filePath]; + + XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); + + NSError* err = nil; + NestedModel* n = [[NestedModel alloc] initWithData: jsonData error:&err]; + XCTAssertNotNil(err, @"No error thrown when loading invalid data"); + + XCTAssertNil(n, @"Model is not nil, when invalid data input"); + XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for missing keys"); + + // Make sure that 'name' is listed as the missing key + XCTAssertEqualObjects(err.userInfo[kJSONModelMissingKeys][0], @"name", @"'name' should be the missing key."); + return err; +} + +-(void)testMissingKeysError +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../primitivesWithErrors.json"]; + NSData *jsonData = [NSData dataWithContentsOfFile:filePath]; + + XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); + + NSError* err; + PrimitivesModel* p = [[PrimitivesModel alloc] initWithData: jsonData error:&err]; + XCTAssertNil(p, @"Model is not nil, when input is invalid"); + XCTAssertNotNil(err, @"No error when keys are missing."); + + XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for missing keys"); + NSArray* missingKeys = err.userInfo[kJSONModelMissingKeys]; + missingKeys = [missingKeys sortedArrayUsingSelector:@selector(compare:)]; + XCTAssertTrue(missingKeys, @"error does not have kJSONModelMissingKeys keys in user info"); + XCTAssertTrue([missingKeys[0] isEqualToString:@"intNumber"],@"missing field intNumber not found in missingKeys"); + XCTAssertTrue([missingKeys[1] isEqualToString:@"longNumber"],@"missing field longNumber not found in missingKeys"); +} + +-(void)testTypeMismatchErrorImages +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../nestedDataWithTypeMismatchOnImages.json"]; + NSData *jsonData = [NSData dataWithContentsOfFile:filePath]; + + XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); + + NSError* err = nil; + NestedModel* p = [[NestedModel alloc] initWithData: jsonData error:&err]; + XCTAssertNil(p, @"Model is not nil, when input is invalid"); + XCTAssertNotNil(err, @"No error when types mismatch."); + + XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for type mismatch"); + NSString* mismatchDescription = err.userInfo[kJSONModelTypeMismatch]; + XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info"); + XCTAssertTrue([mismatchDescription rangeOfString:@"'images'"].location != NSNotFound, @"error should mention that the 'images' property (expecting an Array) is mismatched."); + + // Make sure that the error is at the expected key-path + XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"images", @"kJSONModelKeyPath does not contain the expected path of the error."); +} + +-(void)testTypeMismatchErrorImagesObject +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../nestedDataWithTypeMismatchOnImagesObject.json"]; + NSData *jsonData = [NSData dataWithContentsOfFile:filePath]; + + XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); + + NSError* err; + NestedModel* p = [[NestedModel alloc] initWithData: jsonData error:&err]; + XCTAssertNil(p, @"Model is not nil, when input is invalid"); + XCTAssertNotNil(err, @"No error when types mismatch."); + + XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for type mismatch"); + NSString* mismatchDescription = err.userInfo[kJSONModelTypeMismatch]; + XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info"); + XCTAssertTrue([mismatchDescription rangeOfString:@"'imagesObject'"].location != NSNotFound, @"error should mention that the 'imagesObject' property (expecting a Dictionary) is mismatched."); + + // Make sure that the error is at the expected key-path + XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"imagesObject", @"kJSONModelKeyPath does not contain the expected path of the error."); +} + +@end diff --git a/examples/Tests/JSONTypesReadTests.m b/examples/Tests/JSONTypesReadTests.m new file mode 100644 index 00000000..768b5875 --- /dev/null +++ b/examples/Tests/JSONTypesReadTests.m @@ -0,0 +1,70 @@ +// +// JSONTypesReadTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "JSONTypesModel.h" + +@interface JSONTypesReadTests : XCTestCase +@end + +@implementation JSONTypesReadTests +{ + JSONTypesModel* t; +} + +-(void)setUp +{ + [super setUp]; + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../jsonTypes.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + t = [[JSONTypesModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(t, @"Could not load the test data file."); +} + +-(void)testStandardTypes +{ + XCTAssertTrue([t.caption isKindOfClass:[NSString class]], @"caption is not NSString object"); + XCTAssertTrue([t.caption isEqualToString:@"This is a text element"], @"caption value is not 'This is a text element'"); + + XCTAssertTrue([t.dynamicString isKindOfClass:[NSMutableString class]], @"caption is not NSMutableString object"); + [t.dynamicString appendString:@"!!!"]; + XCTAssertTrue([t.dynamicString isEqualToString:@"A piece of text!!!"], @"caption value is not 'A piece of text!!!'"); + + XCTAssertTrue([t.year isKindOfClass:[NSNumber class]], @"year is not NSNumber object"); + XCTAssertTrue([t.year intValue]==2012, @"year value is not 2012"); + + XCTAssertTrue([t.pi isKindOfClass:[NSNumber class]], @"pi is not NSNumber object"); + XCTAssertEqualWithAccuracy([t.pi floatValue], 3.14159, FLT_EPSILON, @"pi value is not 3.14159"); + + XCTAssertTrue([t.list isKindOfClass:[NSArray class]], @"list failed to read"); + XCTAssertTrue([t.list[0] isEqualToString:@"111"], @"list - first obect is not \"111\""); + + XCTAssertTrue([t.dynamicList isKindOfClass:[NSArray class]], @"dynamicList failed to read"); + XCTAssertTrue([t.dynamicList[0] isEqualToString:@"12"], @"dynamicList - first obect is not \"12\""); + + XCTAssertTrue([t.dictionary isKindOfClass:[NSDictionary class]], @"dictionary failed to read"); + XCTAssertTrue([t.dictionary[@"test"] isEqualToString:@"mest"], @"dictionary key \"test\"'s value is not \"mest\""); + + XCTAssertTrue([t.dynamicDictionary isKindOfClass:[NSMutableDictionary class]], @"dynamicDictionary failed to read"); + XCTAssertTrue([t.dynamicDictionary[@"key"] isEqualToString:@"value"], @"dynamicDictionary key \"key\"'s value is not \"value\""); + [t.dynamicDictionary setValue:@"ADDED" forKey:@"newKey"]; + XCTAssertTrue([t.dynamicDictionary[@"newKey"] isEqualToString:@"ADDED"], @"dynamicDictionary key \"newKey\"'s value is not \"ADDED\""); + + XCTAssertTrue(!t.notAvailable, @"notAvailable is not nil"); +} + + + +@end diff --git a/examples/Tests/KeyMappingTests.m b/examples/Tests/KeyMappingTests.m new file mode 100644 index 00000000..c804839b --- /dev/null +++ b/examples/Tests/KeyMappingTests.m @@ -0,0 +1,320 @@ +// +// KeyMappingTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 19/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; +@import JSONModel; + +#import "GitHubKeyMapRepoModel.h" +#import "GitHubKeyMapRepoModelDict.h" +#import "GitHubRepoModelForUSMapper.h" +#import "ModelForUpperCaseMapper.h" +#import "RenamedPropertyModel.h" + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#pragma mark - TestModel class +@interface TestModel: JSONModel + +@property (strong, nonatomic) NSString* text1; +@property (strong, nonatomic) NSString* text2; + +@property (strong, nonatomic) NSString* text3; + +@end + +@implementation TestModel + ++(JSONKeyMapper*)keyMapper +{ + return [[JSONKeyMapper alloc] initWithDictionary:@ + { + @"texts.text1": @"text1", + @"texts.text2.value": @"text2" + }]; +} + +@end + +#pragma mark - at-name property +@interface AtNameModel : JSONModel +@property (assign) int type; +@end + +@implementation AtNameModel ++(JSONKeyMapper*)keyMapper +{ + return [[JSONKeyMapper alloc] initWithDictionary:@ + { + @"@type": @"type" + }]; +} +@end + +#pragma mark - global key mapper test model +@interface GlobalModel: JSONModel +@property (strong, nonatomic) NSString* name; +@end +@implementation GlobalModel +@end + +#pragma mark - KeyMappingTests unit test + +@interface KeyMappingTests : XCTestCase +@end + +@implementation KeyMappingTests +{ + NSArray* json; +} + +-(void)setUp +{ + [super setUp]; + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../github-iphone.json"]; + NSData* jsonData = [NSData dataWithContentsOfFile:filePath]; + + XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); + + NSError* err; + NSDictionary* jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:&err]; + json = jsonDict[@"repositories"]; + + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(jsonData, @"Could not load the test data file."); +} + +-(void)testKeyMapping +{ + NSDictionary* repo1 = json[0]; + GitHubKeyMapRepoModel* model1 = [[GitHubKeyMapRepoModel alloc] initWithDictionary:repo1 error:nil]; + XCTAssertNotNil(model1, @"Could not initialize model"); + XCTAssertNotNil(model1.__description, @"__description is nil"); + XCTAssertTrue([model1.__description isEqualToString:repo1[@"description"]], @"__description was not mapped properly"); + + NSDictionary* dict = [model1 toDictionary]; + XCTAssertNotNil(dict[@"description"], @"description not exported properly"); +} + +-(void)testKeyMappingWithDict +{ + NSDictionary* repo1 = json[0]; + GitHubKeyMapRepoModelDict* model1 = [[GitHubKeyMapRepoModelDict alloc] initWithDictionary:repo1 error:nil]; + XCTAssertNotNil(model1, @"Could not initialize model"); + XCTAssertNotNil(model1.__description, @"__description is nil"); + XCTAssertTrue([model1.__description isEqualToString:repo1[@"description"]], @"__description was not mapped properly"); + + NSDictionary* dict = [model1 toDictionary]; + XCTAssertNotNil(dict[@"description"], @"description not exported properly"); +} + +-(void)testUnderscoreMapper +{ + NSString* jsonString = @"{\"pushed_at\":\"2012-12-18T19:21:35-08:00\",\"created_at\":\"2012-12-18T19:21:35-08:00\",\"a_very_long_property_name\":10000, \"item_object_145\":\"TEST\", \"item_object_176_details\":\"OTHERTEST\"}"; + GitHubRepoModelForUSMapper* m = [[GitHubRepoModelForUSMapper alloc] initWithString:jsonString error:nil]; + XCTAssertNotNil(m, @"Could not initialize model from string"); + + //import + XCTAssertTrue([m.pushedAt compare:[NSDate dateWithTimeIntervalSinceReferenceDate:0] ]==NSOrderedDescending, @"pushedAt is not initialized"); + XCTAssertTrue([m.createdAt compare:[NSDate dateWithTimeIntervalSinceReferenceDate:0] ]==NSOrderedDescending, @"createdAt is not initialized"); + XCTAssertTrue(m.aVeryLongPropertyName == 10000, @"aVeryLongPropertyName is not 10000"); + + XCTAssertEqualObjects(m.itemObject145, @"TEST", @"itemObject145 does not equal 'TEST'"); + XCTAssertEqualObjects(m.itemObject176Details, @"OTHERTEST", @"itemObject176Details does not equal 'OTHERTEST'"); + + //export + NSDictionary* dict = [m toDictionary]; + XCTAssertNotNil(dict, @"toDictionary failed"); + + XCTAssertNotNil(dict[@"pushed_at"], @"pushed_at not exported"); + XCTAssertNotNil(dict[@"created_at"], @"pushed_at not exported"); + XCTAssertTrue([dict[@"a_very_long_property_name"] intValue]==10000,@"a_very_long_property_name not exported properly"); + + XCTAssertEqualObjects(dict[@"item_object_145"], m.itemObject145, @"item_object_145 does not equal 'TEST'"); + XCTAssertEqualObjects(dict[@"item_object_176_details"], m.itemObject176Details, @"item_object_176_details does not equal 'OTHERTEST'"); +} + +-(void)testUpperCaseMapper +{ + NSString* jsonString = @"{\"UPPERTEST\":\"TEST\"}"; + ModelForUpperCaseMapper * m = [[ModelForUpperCaseMapper alloc] initWithString:jsonString error:nil]; + XCTAssertNotNil(m, @"Could not initialize model from string"); + + //import + XCTAssertEqualObjects(m.uppertest, @"TEST", @"uppertest does not equal 'TEST'"); + + //export + NSDictionary* dict = [m toDictionary]; + XCTAssertNotNil(dict, @"toDictionary failed"); + + XCTAssertEqualObjects(dict[@"UPPERTEST"], m.uppertest, @"UPPERTEST does not equal 'TEST'"); +} + +-(void)testKeyMapperCaching +{ + //simulate fetching different models, so the keyMapper cache is used + + [self testUnderscoreMapper]; + [self testKeyMapping]; + [self testUnderscoreMapper]; + [self testKeyMapping]; + [self testUnderscoreMapper]; + [self testKeyMapping]; +} + +-(void)testKeyPathKeyMapping +{ + //input dictionary for TestModel + NSDictionary* dict = @ + { + @"texts": @ + { + @"text1": @"TEST!!!", + @"text2": @{@"value":@"MEST"} + } + }; + + NSError* err = nil; + TestModel* model = [[TestModel alloc] initWithDictionary:dict error:&err]; + + XCTAssertTrue(err==nil, @"Error creating TestModel: %@", [err localizedDescription]); + XCTAssertTrue(model!=nil, @"TestModel instance is nil"); + + XCTAssertTrue([model.text1 isEqualToString:@"TEST!!!"], @"text1 is not 'TEST!!!'"); + XCTAssertTrue([model.text2 isEqualToString:@"MEST"], @"text1 is not 'MEST'"); + + NSDictionary* toDict = [model toDictionary]; + + XCTAssertTrue([toDict[@"texts"][@"text1"] isEqualToString:@"TEST!!!"], @"toDict.texts.text1 is not 'TEST!!!'"); + XCTAssertTrue([toDict[@"texts"][@"text2"][@"value"] isEqualToString:@"MEST"], @"toDict.texts.text2.value is not 'MEST'"); + + NSString* toString = [model toJSONString]; + XCTAssertTrue([toString rangeOfString:@"text1\":\"TEST!!!"].location!=NSNotFound, @"model did not export text1 in string"); +} + +-(void)testGlobalKeyMapperImportAndExport +{ + //import + NSString* jsonString1 = @"{\"name\": \"NAME IN CAPITALS\"}"; + GlobalModel* global1 = [[GlobalModel alloc] initWithString:jsonString1 error:nil]; + XCTAssertNotNil(global1, @"model did not initialize with proper json"); + + + //test import via gloabl key mapper + [JSONModel setGlobalKeyMapper:[[JSONKeyMapper alloc] initWithDictionary:@{ + @"name1":@"name" + }]]; + + NSString* jsonString2 = @"{\"name1\": \"NAME IN CAPITALS\"}"; + GlobalModel* global2 = [[GlobalModel alloc] initWithString:jsonString2 error:nil]; + XCTAssertNotNil(global2, @"model did not initialize with proper json"); + + //export + NSDictionary* dict = [global2 toDictionary]; + XCTAssertNotNil(dict[@"name1"], @"model did not export name"); + NSString* exportedString = [global2 toJSONString]; + XCTAssertTrue([exportedString rangeOfString:@"name1\":\"NAME"].location!=NSNotFound, @"model did not export name in string"); + + [JSONModel setGlobalKeyMapper:nil]; + + GlobalModel* global3 = [[GlobalModel alloc] initWithString:jsonString2 error:nil]; + XCTAssertNil(global3, @"model supposed to be nil"); + + [JSONModel setGlobalKeyMapper:nil]; +} + +//https://github.com/JSONModel/JSONModel/issues/132 +-(void)testAtNameProperty +{ + AtNameModel* at = [[AtNameModel alloc] initWithString:@"{\"@type\":157}" error:nil]; + XCTAssertNotNil(at, @"model instance is nil"); +} + +-(void)testMergingData +{ + //import + GlobalModel* global1 = [[GlobalModel alloc] init]; + XCTAssertNotNil(global1, @"model did not initialize"); + XCTAssertNil(global1.name, @"name got a value when nil expected"); + + NSDictionary* data = @{@"name":@"NAME IN CAPITALS"}; + [global1 mergeFromDictionary:data useKeyMapping:NO error:nil]; + + XCTAssertEqualObjects(global1.name, @"NAME IN CAPITALS", @"did not import name property"); + + //test import via gloabl key mapper + [JSONModel setGlobalKeyMapper:[[JSONKeyMapper alloc] initWithDictionary:@ + { + @"name1":@"name" + }]]; + GlobalModel* global2 = [[GlobalModel alloc] init]; + NSDictionary* data2 = @{@"name1":@"NAME IN CAPITALS"}; + [global2 mergeFromDictionary:data2 useKeyMapping:YES error:nil]; + + XCTAssertEqualObjects(global2.name, @"NAME IN CAPITALS", @"did not import name property"); + + [JSONModel setGlobalKeyMapper:nil]; +} + +//https://github.com/JSONModel/JSONModel/issues/180 +-(void)testUsingBothGlobalAndCustomMappers +{ + //input dictionary for TestModel + NSDictionary* dict = @ + { + @"texts": @ + { + @"text1": @"TEST!!!", + @"text2": @{@"value":@"MEST"}, + @"text3": @"Marin" + } + }; + + //test import via gloabl key mapper + [JSONModel setGlobalKeyMapper:[[JSONKeyMapper alloc] initWithDictionary:@ + { + @"texts.text3":@"text3" + }]]; + + NSError* err = nil; + TestModel* model = [[TestModel alloc] initWithDictionary:dict error:&err]; + + XCTAssertTrue(err==nil, @"Error creating TestModel: %@", [err localizedDescription]); + XCTAssertTrue(model!=nil, @"TestModel instance is nil"); + + XCTAssertTrue([model.text3 isEqualToString:@"Marin"], @"text3 is not 'Marin'"); + + NSDictionary* toDict = [model toDictionary]; + + XCTAssertTrue([toDict[@"texts"][@"text3"] isEqualToString:@"Marin"], @"toDict.texts.text3 is not 'Marin'"); + + NSString* toString = [model toJSONString]; + XCTAssertTrue([toString rangeOfString:@"text3\":\"Marin"].location!=NSNotFound, @"model did not export text3 in string"); + + [JSONModel setGlobalKeyMapper:nil]; +} + +- (void)testExceptionsMapper +{ + NSString *jsonString = @"{\"ID\":\"12345\",\"NAME\":\"TEST\"}"; + RenamedPropertyModel *m = [[RenamedPropertyModel alloc] initWithString:jsonString error:nil]; + XCTAssertNotNil(m, @"Could not initialize model from string"); + + // import + XCTAssertEqualObjects(m.identifier, @"12345", @"identifier does not equal '12345'"); + XCTAssertEqualObjects(m.name, @"TEST", @"name does not equal 'TEST'"); + + // export + NSDictionary *dict = [m toDictionary]; + XCTAssertNotNil(dict, @"toDictionary failed"); + + XCTAssertEqualObjects(dict[@"ID"], m.identifier, @"ID does not equal '12345'"); + XCTAssertEqualObjects(dict[@"NAME"], m.name, @"NAME does not equal 'TEST'"); +} + +@end diff --git a/examples/Tests/Models/Headers/BuiltInConversionsModel.h b/examples/Tests/Models/Headers/BuiltInConversionsModel.h new file mode 100644 index 00000000..d95092e5 --- /dev/null +++ b/examples/Tests/Models/Headers/BuiltInConversionsModel.h @@ -0,0 +1,33 @@ +// +// BuiltInConversionsModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface BuiltInConversionsModel : JSONModel + +/* BOOL automatically converted from a number */ +@property (assign, nonatomic) BOOL isItYesOrNo; + +@property (assign, nonatomic) BOOL boolFromString; +@property (assign, nonatomic) BOOL boolFromNumber; +@property (assign, nonatomic) BOOL boolFromBoolean; + +@property (strong, nonatomic) NSSet* unorderedList; +@property (strong, nonatomic) NSMutableSet* dynamicUnorderedList; + +/* automatically convert JSON data types */ +@property (strong, nonatomic) NSString* stringFromNumber; +@property (strong, nonatomic) NSNumber* numberFromString; +@property (strong, nonatomic) NSNumber* doubleFromString; + +@property (strong, nonatomic) NSDate* importantEvent; +@property (strong, nonatomic) NSURL* websiteURL; +@property (strong, nonatomic) NSTimeZone *timeZone; +@property (strong, nonatomic) NSArray* stringArray; + +@end diff --git a/examples/Tests/Models/Headers/CopyrightModel.h b/examples/Tests/Models/Headers/CopyrightModel.h new file mode 100644 index 00000000..185f54c1 --- /dev/null +++ b/examples/Tests/Models/Headers/CopyrightModel.h @@ -0,0 +1,16 @@ +// +// CopyrightModel.h +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface CopyrightModel : JSONModel + +@property (strong, nonatomic) NSString* author; +@property (strong, nonatomic) NSNumber* year; + +@end diff --git a/examples/Tests/Models/Headers/CustomPropertyModel.h b/examples/Tests/Models/Headers/CustomPropertyModel.h new file mode 100644 index 00000000..bd16c615 --- /dev/null +++ b/examples/Tests/Models/Headers/CustomPropertyModel.h @@ -0,0 +1,22 @@ +// +// CustomPropertyModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface CustomPropertyModel : JSONModel + +/* custom transformer from JSONValueTransformer+UIColor.h */ +#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED +@property (strong, nonatomic) UIColor* redColor; +@property (strong, nonatomic) UIColor* blueColor; +#else +@property (strong, nonatomic) NSColor* redColor; +@property (strong, nonatomic) NSColor* blueColor; +#endif + +@end diff --git a/examples/Tests/Models/Headers/DrugModel.h b/examples/Tests/Models/Headers/DrugModel.h new file mode 100644 index 00000000..f327b397 --- /dev/null +++ b/examples/Tests/Models/Headers/DrugModel.h @@ -0,0 +1,16 @@ +// +// Created by Rahul Somasunderam on 9/4/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +@import Foundation; +@import JSONModel; + +@protocol InteractionModel; + +@interface DrugModel : JSONModel + +@property NSString *brand_name; +@property NSArray *interaction_list; + +@end diff --git a/examples/Tests/Models/Headers/EnumModel.h b/examples/Tests/Models/Headers/EnumModel.h new file mode 100644 index 00000000..32a67883 --- /dev/null +++ b/examples/Tests/Models/Headers/EnumModel.h @@ -0,0 +1,36 @@ +// +// EnumModel.h +// JSONModelDemo_iOS +// +// Created by Marin Todorov on 6/17/13. +// Copyright (c) 2013 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +//stock enum definition +typedef enum { + StatusOpen = 1000, + StatusClosed = 2000, +} Status; + +//marco enum definition +typedef NS_ENUM(NSInteger, NSE_Status) { + NSE_StatusOpen = 1001, + NSE_StatusClosed = 2001, +}; + +//marco enum definition NSUInteger +typedef NS_ENUM(NSUInteger, NSEU_Status) { + NSEU_StatusOpen = 1002, + NSEU_StatusClosed = 2002, +}; + +@interface EnumModel : JSONModel + +@property (nonatomic) Status status; +@property (nonatomic) NSE_Status nsStatus; +@property (nonatomic) NSEU_Status nsuStatus; +@property (nonatomic) Status nestedStatus; + +@end diff --git a/examples/Tests/Models/Headers/ExtremeNestingModel.h b/examples/Tests/Models/Headers/ExtremeNestingModel.h new file mode 100644 index 00000000..65139c80 --- /dev/null +++ b/examples/Tests/Models/Headers/ExtremeNestingModel.h @@ -0,0 +1,15 @@ +// +// Created by Rahul Somasunderam on 9/4/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +@import Foundation; +@import JSONModel; + +@protocol DrugModel; + +@interface ExtremeNestingModel : JSONModel + +@property NSArray *drugs; + +@end diff --git a/examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h b/examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h new file mode 100644 index 00000000..170fba8c --- /dev/null +++ b/examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h @@ -0,0 +1,21 @@ +// +// GitHubKeyMapRepoModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 19/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface GitHubKeyMapRepoModel : JSONModel + +@property (strong, nonatomic) NSString* __description; +@property (strong, nonatomic) NSString* language; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +@property (assign, nonatomic) NSString* name; +#pragma GCC diagnostic pop + +@end diff --git a/examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h b/examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h new file mode 100644 index 00000000..41eb046d --- /dev/null +++ b/examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h @@ -0,0 +1,13 @@ +// +// GitHubKeyMapRepoModelDict.h +// JSONModelDemo +// +// Created by Marin Todorov on 20/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "GitHubKeyMapRepoModel.h" + +@interface GitHubKeyMapRepoModelDict : GitHubKeyMapRepoModel + +@end diff --git a/examples/Tests/Models/Headers/GitHubRepoModel.h b/examples/Tests/Models/Headers/GitHubRepoModel.h new file mode 100644 index 00000000..58c2c945 --- /dev/null +++ b/examples/Tests/Models/Headers/GitHubRepoModel.h @@ -0,0 +1,28 @@ +// +// GitHubRepoModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 19/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface GitHubRepoModel : JSONModel + +@property (strong, nonatomic) NSDate* created; +@property (strong, nonatomic) NSDate* pushed; +@property (assign, nonatomic) int watchers; +@property (strong, nonatomic) NSString* owner; +@property (assign, nonatomic) int forks; +@property (strong, nonatomic) NSString* language; +@property (assign, nonatomic) BOOL fork; +@property (assign, nonatomic) double size; +@property (assign, nonatomic) int followers; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +@property (strong, nonatomic) NSString* name; +#pragma GCC diagnostic pop + +@end diff --git a/examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h b/examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h new file mode 100644 index 00000000..b11056e8 --- /dev/null +++ b/examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h @@ -0,0 +1,19 @@ +// +// GitHubRepoModelForUSMapper.h +// JSONModelDemo +// +// Created by Marin Todorov on 21/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface GitHubRepoModelForUSMapper : JSONModel + +@property (strong, nonatomic) NSDate* pushedAt; +@property (strong, nonatomic) NSDate* createdAt; +@property (assign, nonatomic) int aVeryLongPropertyName; +@property (strong, nonatomic) NSString* itemObject145; +@property (strong, nonatomic) NSString* itemObject176Details; + +@end diff --git a/examples/Tests/Models/Headers/ImageModel.h b/examples/Tests/Models/Headers/ImageModel.h new file mode 100644 index 00000000..6a86a1bb --- /dev/null +++ b/examples/Tests/Models/Headers/ImageModel.h @@ -0,0 +1,19 @@ +// +// ImageModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@class CopyrightModel; + +@interface ImageModel : JSONModel + +@property (strong, nonatomic) NSNumber* idImage; +@property (strong, nonatomic) NSString* name; +@property (strong, nonatomic) CopyrightModel* copyright; + +@end diff --git a/examples/Tests/Models/Headers/InteractionModel.h b/examples/Tests/Models/Headers/InteractionModel.h new file mode 100644 index 00000000..a620cc61 --- /dev/null +++ b/examples/Tests/Models/Headers/InteractionModel.h @@ -0,0 +1,14 @@ +// +// Created by Rahul Somasunderam on 9/4/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +@import Foundation; +@import JSONModel; + +@interface InteractionModel : JSONModel + +@property NSString *type; +@property NSString *title; + +@end diff --git a/examples/Tests/Models/Headers/JSONTypesModel.h b/examples/Tests/Models/Headers/JSONTypesModel.h new file mode 100644 index 00000000..5ab71881 --- /dev/null +++ b/examples/Tests/Models/Headers/JSONTypesModel.h @@ -0,0 +1,23 @@ +// +// JSONTypesModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface JSONTypesModel : JSONModel + +@property (strong, nonatomic) NSString* caption; +@property (strong, nonatomic) NSMutableString* dynamicString; +@property (strong, nonatomic) NSNumber* year; +@property (strong, nonatomic) NSNumber* pi; +@property (strong, nonatomic) NSArray* list; +@property (strong, nonatomic) NSMutableArray* dynamicList; +@property (strong, nonatomic) NSDictionary* dictionary; +@property (strong, nonatomic) NSMutableDictionary* dynamicDictionary; +@property (strong, nonatomic) NSString* notAvailable; + +@end diff --git a/examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h b/examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h new file mode 100644 index 00000000..52ba36fd --- /dev/null +++ b/examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h @@ -0,0 +1,13 @@ +// +// JSONTypesModelWithValidation1.h +// JSONModelDemo +// +// Created by Marin Todorov on 17/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONTypesModel.h" + +@interface JSONTypesModelWithValidation1 : JSONTypesModel + +@end diff --git a/examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h b/examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h new file mode 100644 index 00000000..71c37f0c --- /dev/null +++ b/examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h @@ -0,0 +1,13 @@ +// +// JSONTypesModelWithValidation2.h +// JSONModelDemo +// +// Created by Marin Todorov on 17/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONTypesModel.h" + +@interface JSONTypesModelWithValidation2 : JSONTypesModel + +@end diff --git a/examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h b/examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h new file mode 100644 index 00000000..d7c4305e --- /dev/null +++ b/examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h @@ -0,0 +1,25 @@ +// +// JSONValueTransformer+UIColor.h +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import Foundation; +@import JSONModel; + +@interface JSONValueTransformer (UIColor) + +#pragma mark - uicolor <-> hex color +/* uicolor <-> hex color for converting text hex representations to actual color objects */ + +#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED +-(UIColor*)UIColorFromNSString:(NSString*)string; +-(id)JSONObjectFromUIColor:(UIColor*)color; +#else +-(NSColor*)UIColorFromNSString:(NSString*)string; +-(id)JSONObjectFromUIColor:(NSColor*)color; +#endif + +@end diff --git a/examples/Tests/Models/Headers/ModelForUpperCaseMapper.h b/examples/Tests/Models/Headers/ModelForUpperCaseMapper.h new file mode 100644 index 00000000..ed43279f --- /dev/null +++ b/examples/Tests/Models/Headers/ModelForUpperCaseMapper.h @@ -0,0 +1,12 @@ +// +// Created by Petr Korolev on 21/02/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface ModelForUpperCaseMapper : JSONModel + +@property (strong, nonatomic) NSString* uppertest; + +@end diff --git a/examples/Tests/Models/Headers/NestedModel.h b/examples/Tests/Models/Headers/NestedModel.h new file mode 100644 index 00000000..d4f5fe09 --- /dev/null +++ b/examples/Tests/Models/Headers/NestedModel.h @@ -0,0 +1,20 @@ +// +// NestedModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@class ImageModel; +@protocol ImageModel; + +@interface NestedModel : JSONModel + +@property (strong, nonatomic) ImageModel* singleImage; +@property (strong, nonatomic) NSArray* images; +@property (strong, nonatomic) NSDictionary* imagesObject; + +@end diff --git a/examples/Tests/Models/Headers/OptionalPropModel.h b/examples/Tests/Models/Headers/OptionalPropModel.h new file mode 100644 index 00000000..08a736ce --- /dev/null +++ b/examples/Tests/Models/Headers/OptionalPropModel.h @@ -0,0 +1,20 @@ +// +// OptionalPropModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface OptionalPropModel : JSONModel + +@property (assign, nonatomic) int fillerNumber; +@property (strong, nonatomic) NSString* notRequredProperty; +@property (strong, nonatomic) NSString* ignoredProperty; +@property (assign, nonatomic) CGPoint notRequiredPoint; + ++(BOOL)propertyIsOptional:(NSString*)propertyName; + +@end diff --git a/examples/Tests/Models/Headers/PostModel.h b/examples/Tests/Models/Headers/PostModel.h new file mode 100644 index 00000000..a901e3f0 --- /dev/null +++ b/examples/Tests/Models/Headers/PostModel.h @@ -0,0 +1,20 @@ +// +// PostModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 13/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface PostModel : JSONModel + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +@property (strong, nonatomic) NSString* id; +#pragma GCC diagnostic pop + +@property (strong, nonatomic) NSString* name; + +@end diff --git a/examples/Tests/Models/Headers/PostsModel.h b/examples/Tests/Models/Headers/PostsModel.h new file mode 100644 index 00000000..5f968d21 --- /dev/null +++ b/examples/Tests/Models/Headers/PostsModel.h @@ -0,0 +1,17 @@ +// +// PostsModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 13/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@protocol PostModel; + +@interface PostsModel : JSONModel + +@property (strong, nonatomic) NSArray* posts; + +@end diff --git a/examples/Tests/Models/Headers/PrimitivesModel.h b/examples/Tests/Models/Headers/PrimitivesModel.h new file mode 100644 index 00000000..3c1b0f00 --- /dev/null +++ b/examples/Tests/Models/Headers/PrimitivesModel.h @@ -0,0 +1,21 @@ +// +// PrimitivesModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface PrimitivesModel : JSONModel + +@property (assign, nonatomic) short shortNumber; +@property (assign, nonatomic) int intNumber; +@property (assign, nonatomic) long longNumber; +@property (assign, nonatomic) float floatNumber; +@property (assign, nonatomic) double doubleNumber; +@property (assign, nonatomic) BOOL boolYES; +@property (assign, nonatomic) BOOL boolNO; + +@end diff --git a/examples/Tests/Models/Headers/RenamedPropertyModel.h b/examples/Tests/Models/Headers/RenamedPropertyModel.h new file mode 100644 index 00000000..6763cba3 --- /dev/null +++ b/examples/Tests/Models/Headers/RenamedPropertyModel.h @@ -0,0 +1,16 @@ +// +// RenamedPropertyModel.h +// JSONModelDemo_iOS +// +// Created by James Billingham on 16/12/2015. +// Copyright © 2015 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface RenamedPropertyModel : JSONModel + +@property (copy, nonatomic) NSString *identifier; +@property (copy, nonatomic) NSString *name; + +@end diff --git a/examples/Tests/Models/Headers/ReposModel.h b/examples/Tests/Models/Headers/ReposModel.h new file mode 100644 index 00000000..afa43094 --- /dev/null +++ b/examples/Tests/Models/Headers/ReposModel.h @@ -0,0 +1,23 @@ +// +// ReposModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 19/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@protocol GitHubRepoModel; + +@interface ReposModel : JSONModel + +@property (strong, nonatomic) NSMutableArray* repositories; + +@end + +@interface ReposProtocolArrayModel : JSONModel + +@property (strong, nonatomic) NSMutableArray* repositories; + +@end diff --git a/examples/Tests/Models/Headers/RpcRequestModel.h b/examples/Tests/Models/Headers/RpcRequestModel.h new file mode 100644 index 00000000..e7d615a1 --- /dev/null +++ b/examples/Tests/Models/Headers/RpcRequestModel.h @@ -0,0 +1,17 @@ +// +// RpcRequestModel.h +// JSONModelDemo_iOS +// +// Created by Marin Todorov on 4/2/13. +// Copyright (c) 2013 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface RpcRequestModel : JSONModel + +@property (strong, nonatomic) NSString* id; +@property (strong, nonatomic) NSArray* params; +@property (strong, nonatomic) NSString* method; + +@end diff --git a/examples/Tests/Models/Headers/SpecialPropertyModel.h b/examples/Tests/Models/Headers/SpecialPropertyModel.h new file mode 100644 index 00000000..a4eac021 --- /dev/null +++ b/examples/Tests/Models/Headers/SpecialPropertyModel.h @@ -0,0 +1,17 @@ +// +// SpecialPropertyModel.h +// JSONModelDemo_OSX +// +// Created by BB9z on 13-4-26. +// Copyright (c) 2013年 Underplot ltd. All rights reserved. +// + +@import JSONModel; + +@interface SpecialPropertyModel : JSONModel + +@property (strong, nonatomic) NSString *className; +@property (strong, nonatomic) NSString *indexPropertyName; +@property (strong, nonatomic) NSString *id; + +@end diff --git a/examples/Tests/Models/Implementations/BuiltInConversionsModel.m b/examples/Tests/Models/Implementations/BuiltInConversionsModel.m new file mode 100644 index 00000000..f358505f --- /dev/null +++ b/examples/Tests/Models/Implementations/BuiltInConversionsModel.m @@ -0,0 +1,12 @@ +// +// BuiltInConversionsModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "BuiltInConversionsModel.h" + +@implementation BuiltInConversionsModel +@end diff --git a/examples/Tests/Models/Implementations/CopyrightModel.m b/examples/Tests/Models/Implementations/CopyrightModel.m new file mode 100644 index 00000000..0e3d8129 --- /dev/null +++ b/examples/Tests/Models/Implementations/CopyrightModel.m @@ -0,0 +1,12 @@ +// +// CopyrightModel.m +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "CopyrightModel.h" + +@implementation CopyrightModel +@end diff --git a/examples/Tests/Models/Implementations/CustomPropertyModel.m b/examples/Tests/Models/Implementations/CustomPropertyModel.m new file mode 100644 index 00000000..01433dc7 --- /dev/null +++ b/examples/Tests/Models/Implementations/CustomPropertyModel.m @@ -0,0 +1,12 @@ +// +// CustomPropertyModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "CustomPropertyModel.h" + +@implementation CustomPropertyModel +@end diff --git a/examples/Tests/Models/Implementations/DrugModel.m b/examples/Tests/Models/Implementations/DrugModel.m new file mode 100644 index 00000000..5388f8e3 --- /dev/null +++ b/examples/Tests/Models/Implementations/DrugModel.m @@ -0,0 +1,9 @@ +// +// Created by Rahul Somasunderam on 9/4/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +#import "DrugModel.h" + +@implementation DrugModel +@end diff --git a/examples/Tests/Models/Implementations/EnumModel.m b/examples/Tests/Models/Implementations/EnumModel.m new file mode 100644 index 00000000..9caee2c8 --- /dev/null +++ b/examples/Tests/Models/Implementations/EnumModel.m @@ -0,0 +1,62 @@ +// +// EnumModel.m +// JSONModelDemo_iOS +// +// Created by Marin Todorov on 6/17/13. +// Copyright (c) 2013 Underplot ltd. All rights reserved. +// + +#import "EnumModel.h" + +@implementation EnumModel + +-(void)setStatusWithNSString:(NSString*)statusString +{ + _status = [statusString isEqualToString:@"open"]?StatusOpen:StatusClosed; +} + +-(void)setNsStatusWithNSString:(NSString*)statusString +{ + _nsStatus = [statusString isEqualToString:@"open"]?NSE_StatusOpen:NSE_StatusClosed; +} + +-(void)setNsuStatusWithNSString:(NSString*)statusString +{ + _nsuStatus = [statusString isEqualToString:@"open"]?NSEU_StatusOpen:NSEU_StatusClosed; +} + +-(void)setNestedStatusWithNSString:(NSString*)statusString +{ + _status = [statusString isEqualToString:@"open"]?StatusOpen:StatusClosed; +} + +-(id)JSONObjectForStatus +{ + return (self.status==StatusOpen)?@"open":@"closed"; +} + +-(id)JSONObjectForNsStatus +{ + return (self.nsStatus==NSE_StatusOpen)?@"open":@"closed"; +} + +-(id)JSONObjectForNsuStatus +{ + return (self.nsuStatus==NSEU_StatusOpen)?@"open":@"closed"; +} + +-(id)JSONObjectForNestedStatus +{ + return (self.status==StatusOpen)?@"open":@"closed"; +} + ++(JSONKeyMapper*)keyMapper +{ + return [[JSONKeyMapper alloc] initWithDictionary:@ + { + @"statusString":@"status", + @"nested.status":@"nestedStatus" + }]; +} + +@end diff --git a/examples/Tests/Models/Implementations/ExtremeNestingModel.m b/examples/Tests/Models/Implementations/ExtremeNestingModel.m new file mode 100644 index 00000000..cf6c892c --- /dev/null +++ b/examples/Tests/Models/Implementations/ExtremeNestingModel.m @@ -0,0 +1,18 @@ +// +// Created by Rahul Somasunderam on 9/4/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +#import "ExtremeNestingModel.h" + +@implementation ExtremeNestingModel + ++(JSONKeyMapper*)keyMapper +{ + return [[JSONKeyMapper alloc] initWithDictionary:@ + { + @"generic_alternatives.items.data" : @"drugs" + }]; +} + +@end diff --git a/examples/Tests/Models/Implementations/GitHubKeyMapRepoModel.m b/examples/Tests/Models/Implementations/GitHubKeyMapRepoModel.m new file mode 100644 index 00000000..9f3586cf --- /dev/null +++ b/examples/Tests/Models/Implementations/GitHubKeyMapRepoModel.m @@ -0,0 +1,24 @@ +// +// GitHubKeyMapRepoModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 19/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "GitHubKeyMapRepoModel.h" + +@implementation GitHubKeyMapRepoModel + ++(JSONKeyMapper*)keyMapper +{ + return [[JSONKeyMapper alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) + { + if ([keyName isEqual:@"__description"]) + return @"description"; + else + return keyName; + }]; +} + +@end diff --git a/examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m b/examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m new file mode 100644 index 00000000..c7568185 --- /dev/null +++ b/examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m @@ -0,0 +1,18 @@ +// +// GitHubKeyMapRepoModelDict.m +// JSONModelDemo +// +// Created by Marin Todorov on 20/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "GitHubKeyMapRepoModelDict.h" + +@implementation GitHubKeyMapRepoModelDict + ++(JSONKeyMapper*)keyMapper +{ + return [[JSONKeyMapper alloc] initWithDictionary:@{@"description":@"__description"}]; +} + +@end diff --git a/examples/Tests/Models/Implementations/GitHubRepoModel.m b/examples/Tests/Models/Implementations/GitHubRepoModel.m new file mode 100644 index 00000000..d6304feb --- /dev/null +++ b/examples/Tests/Models/Implementations/GitHubRepoModel.m @@ -0,0 +1,12 @@ +// +// GitHubRepoModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 19/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "GitHubRepoModel.h" + +@implementation GitHubRepoModel +@end diff --git a/examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m b/examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m new file mode 100644 index 00000000..5cf157a3 --- /dev/null +++ b/examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m @@ -0,0 +1,18 @@ +// +// GitHubRepoModelForUSMapper.m +// JSONModelDemo +// +// Created by Marin Todorov on 21/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "GitHubRepoModelForUSMapper.h" + +@implementation GitHubRepoModelForUSMapper + ++(JSONKeyMapper*)keyMapper +{ + return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase]; +} + +@end diff --git a/examples/Tests/Models/Implementations/ImageModel.m b/examples/Tests/Models/Implementations/ImageModel.m new file mode 100644 index 00000000..e9cba299 --- /dev/null +++ b/examples/Tests/Models/Implementations/ImageModel.m @@ -0,0 +1,12 @@ +// +// ImageModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "ImageModel.h" + +@implementation ImageModel +@end diff --git a/examples/Tests/Models/Implementations/InteractionModel.m b/examples/Tests/Models/Implementations/InteractionModel.m new file mode 100644 index 00000000..83d6d1bb --- /dev/null +++ b/examples/Tests/Models/Implementations/InteractionModel.m @@ -0,0 +1,9 @@ +// +// Created by Rahul Somasunderam on 9/4/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +#import "InteractionModel.h" + +@implementation InteractionModel +@end diff --git a/examples/Tests/Models/Implementations/JSONTypesModel.m b/examples/Tests/Models/Implementations/JSONTypesModel.m new file mode 100644 index 00000000..cdce538c --- /dev/null +++ b/examples/Tests/Models/Implementations/JSONTypesModel.m @@ -0,0 +1,12 @@ +// +// JSONTypesModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONTypesModel.h" + +@implementation JSONTypesModel +@end diff --git a/examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m b/examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m new file mode 100644 index 00000000..f3202afd --- /dev/null +++ b/examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m @@ -0,0 +1,23 @@ +// +// JSONTypesModelWithValidation1.m +// JSONModelDemo +// +// Created by Marin Todorov on 17/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONTypesModelWithValidation1.h" + +@implementation JSONTypesModelWithValidation1 + +-(BOOL)validate:(NSError**)err +{ + if (!([self.year intValue]>2011 && [self.pi floatValue]>3.10)) { + *err = [JSONModelError errorModelIsInvalid]; + return NO; + } + + return YES; +} + +@end diff --git a/examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m b/examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m new file mode 100644 index 00000000..ff9ba4a2 --- /dev/null +++ b/examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m @@ -0,0 +1,23 @@ +// +// JSONTypesModelWithValidation2.m +// JSONModelDemo +// +// Created by Marin Todorov on 17/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONTypesModelWithValidation2.h" + +@implementation JSONTypesModelWithValidation2 + +-(BOOL)validate:(NSError**)err +{ + if (!([self.year intValue]<2011 || [self.pi floatValue]<3.10)) { + *err = [JSONModelError errorModelIsInvalid]; + return NO; + } + + return YES; +} + +@end diff --git a/examples/Tests/Models/Implementations/JSONValueTransformer+UIColor.m b/examples/Tests/Models/Implementations/JSONValueTransformer+UIColor.m new file mode 100644 index 00000000..6d69e489 --- /dev/null +++ b/examples/Tests/Models/Implementations/JSONValueTransformer+UIColor.m @@ -0,0 +1,53 @@ +// +// JSONValueTransformer+UIColor.m +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONValueTransformer+UIColor.h" + +@implementation JSONValueTransformer (UIColor) + +#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED +-(UIColor*)UIColorFromNSString:(NSString *)string +#else +-(NSColor*)NSColorFromNSString:(NSString *)string +#endif +{ + // + // http://stackoverflow.com/a/13648705 + // + + NSString *noHashString = [string stringByReplacingOccurrencesOfString:@"#" withString:@""]; // remove the # + NSScanner *scanner = [NSScanner scannerWithString:noHashString]; + [scanner setCharactersToBeSkipped:[NSCharacterSet symbolCharacterSet]]; // remove + and $ + + unsigned hex; + if (![scanner scanHexInt:&hex]) return nil; + int r = (hex >> 16) & 0xFF; + int g = (hex >> 8) & 0xFF; + int b = (hex) & 0xFF; + +#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED + return [UIColor colorWithRed:r / 255.0f green:g / 255.0f blue:b / 255.0f alpha:1.0f]; +#else + return [NSColor colorWithCalibratedRed:r / 255.0f green:g / 255.0f blue:b / 255.0f alpha:1.0f]; +#endif +} + +#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED +-(id)JSONObjectFromUIColor:(UIColor*)color +#else +-(id)JSONObjectFromNSColor:(NSColor*)color +#endif +{ + // + // http://softteco.blogspot.de/2011/06/extract-hex-rgb-color-from-uicolor.mtml + // + + return [NSString stringWithFormat:@"#%02X%02X%02X", (int)((CGColorGetComponents(color.CGColor))[0]*255.0), (int)((CGColorGetComponents(color.CGColor))[1]*255.0), (int)((CGColorGetComponents(color.CGColor))[2]*255.0)]; +} + +@end diff --git a/examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m b/examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m new file mode 100644 index 00000000..eada8cc5 --- /dev/null +++ b/examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m @@ -0,0 +1,15 @@ +// +// Created by Petr Korolev on 21/02/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +#import "ModelForUpperCaseMapper.h" + +@implementation ModelForUpperCaseMapper + ++(JSONKeyMapper*)keyMapper +{ + return [JSONKeyMapper mapperFromUpperCaseToLowerCase]; +} + +@end diff --git a/examples/Tests/Models/Implementations/NestedModel.m b/examples/Tests/Models/Implementations/NestedModel.m new file mode 100644 index 00000000..81e1f278 --- /dev/null +++ b/examples/Tests/Models/Implementations/NestedModel.m @@ -0,0 +1,12 @@ +// +// NestedModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "NestedModel.h" + +@implementation NestedModel +@end diff --git a/examples/Tests/Models/Implementations/OptionalPropModel.m b/examples/Tests/Models/Implementations/OptionalPropModel.m new file mode 100644 index 00000000..f2fa04af --- /dev/null +++ b/examples/Tests/Models/Implementations/OptionalPropModel.m @@ -0,0 +1,24 @@ +// +// OptionalPropModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "OptionalPropModel.h" + +@implementation OptionalPropModel + ++(BOOL)propertyIsOptional:(NSString*)propertyName +{ + if ([super propertyIsOptional:propertyName]) + return YES; + + if ([propertyName isEqualToString:@"notRequiredPoint"]) + return YES; + + return NO; +} + +@end diff --git a/examples/Tests/Models/Implementations/PostModel.m b/examples/Tests/Models/Implementations/PostModel.m new file mode 100644 index 00000000..b9c3189c --- /dev/null +++ b/examples/Tests/Models/Implementations/PostModel.m @@ -0,0 +1,12 @@ +// +// PostModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 13/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "PostModel.h" + +@implementation PostModel +@end diff --git a/examples/Tests/Models/Implementations/PostsModel.m b/examples/Tests/Models/Implementations/PostsModel.m new file mode 100644 index 00000000..87af9e3b --- /dev/null +++ b/examples/Tests/Models/Implementations/PostsModel.m @@ -0,0 +1,12 @@ +// +// PostsModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 13/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "PostsModel.h" + +@implementation PostsModel +@end diff --git a/examples/Tests/Models/Implementations/PrimitivesModel.m b/examples/Tests/Models/Implementations/PrimitivesModel.m new file mode 100644 index 00000000..885d63f7 --- /dev/null +++ b/examples/Tests/Models/Implementations/PrimitivesModel.m @@ -0,0 +1,12 @@ +// +// PrimitivesModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "PrimitivesModel.h" + +@implementation PrimitivesModel +@end diff --git a/examples/Tests/Models/Implementations/RenamedPropertyModel.m b/examples/Tests/Models/Implementations/RenamedPropertyModel.m new file mode 100644 index 00000000..aa5b1db2 --- /dev/null +++ b/examples/Tests/Models/Implementations/RenamedPropertyModel.m @@ -0,0 +1,19 @@ +// +// RenamedPropertyModel.m +// JSONModelDemo_iOS +// +// Created by James Billingham on 16/12/2015. +// Copyright © 2015 Underplot ltd. All rights reserved. +// + +#import "RenamedPropertyModel.h" + +@implementation RenamedPropertyModel + ++ (JSONKeyMapper *)keyMapper +{ + JSONKeyMapper *base = [JSONKeyMapper mapperFromUpperCaseToLowerCase]; + return [JSONKeyMapper mapper:base withExceptions:@{@"ID": @"identifier"}]; +} + +@end diff --git a/examples/Tests/Models/Implementations/ReposModel.m b/examples/Tests/Models/Implementations/ReposModel.m new file mode 100644 index 00000000..76352d8e --- /dev/null +++ b/examples/Tests/Models/Implementations/ReposModel.m @@ -0,0 +1,27 @@ +// +// ReposModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 19/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "ReposModel.h" + +@implementation ReposModel +@end + +@implementation ReposProtocolArrayModel + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-implementations" ++(NSString*)protocolForArrayProperty:(NSString *)propertyName +#pragma GCC diagnostic pop +{ + if ([propertyName isEqualToString:@"repositories"]) { + return @"GitHubRepoModel"; + } + return nil; +} + +@end diff --git a/examples/Tests/Models/Implementations/RpcRequestModel.m b/examples/Tests/Models/Implementations/RpcRequestModel.m new file mode 100644 index 00000000..b22f13fa --- /dev/null +++ b/examples/Tests/Models/Implementations/RpcRequestModel.m @@ -0,0 +1,12 @@ +// +// RpcRequestModel.m +// JSONModelDemo_iOS +// +// Created by Marin Todorov on 4/2/13. +// Copyright (c) 2013 Underplot ltd. All rights reserved. +// + +#import "RpcRequestModel.h" + +@implementation RpcRequestModel +@end diff --git a/examples/Tests/Models/Implementations/SpecialPropertyModel.m b/examples/Tests/Models/Implementations/SpecialPropertyModel.m new file mode 100644 index 00000000..cc390143 --- /dev/null +++ b/examples/Tests/Models/Implementations/SpecialPropertyModel.m @@ -0,0 +1,12 @@ +// +// SpecialPropertyModel.m +// JSONModelDemo_OSX +// +// Created by BB9z on 13-4-26. +// Copyright (c) 2013年 Underplot ltd. All rights reserved. +// + +#import "SpecialPropertyModel.h" + +@implementation SpecialPropertyModel +@end diff --git a/examples/Tests/NestedModelsTests.m b/examples/Tests/NestedModelsTests.m new file mode 100644 index 00000000..e6658c0e --- /dev/null +++ b/examples/Tests/NestedModelsTests.m @@ -0,0 +1,56 @@ +// +// NestedModelsTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "NestedModel.h" +#import "ImageModel.h" +#import "CopyrightModel.h" + +@interface NestedModelsTests : XCTestCase +@end + +@implementation NestedModelsTests +{ + NestedModel* n; +} + +-(void)setUp +{ + [super setUp]; + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../nestedData.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + n = [[NestedModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(n, @"Could not load the test data file."); +} + +-(void)testNestedStructures +{ + XCTAssertTrue([n.singleImage isKindOfClass:[ImageModel class]], @"singleImage is not an ImageModel instance"); + XCTAssertTrue([n.singleImage.name isEqualToString:@"lake.jpg"], @"singleImage.name is not 'lake.jpg'"); + + XCTAssertTrue([n.images isKindOfClass:[NSArray class]], @"images is not an NSArray"); + XCTAssertTrue([n.images[0] isKindOfClass:[ImageModel class]], @"images[0] is not an ImageModel instance"); + XCTAssertTrue([[n.images[0] name] isEqualToString:@"house.jpg"], @"images[0].name is not 'house.jpg'"); + CopyrightModel* copy = [n.images[0] copyright]; + XCTAssertTrue([copy.author isEqualToString:@"Marin Todorov"], @"images[0].name.copyright is not 'Marin Todorov'"); + + XCTAssertTrue([n.imagesObject isKindOfClass:[NSDictionary class]], @"imagesObject is not an NSDictionary"); + ImageModel* img = n.imagesObject[@"image2"]; + XCTAssertTrue([img isKindOfClass:[ImageModel class]], @"images[image2] is not an ImageModel instance"); + XCTAssertTrue([img.name isEqualToString:@"lake.jpg"], @"imagesObject[image2].name is not 'lake.jpg'"); + +} + +@end diff --git a/examples/Tests/OptionalPropertiesTests.m b/examples/Tests/OptionalPropertiesTests.m new file mode 100644 index 00000000..845619e9 --- /dev/null +++ b/examples/Tests/OptionalPropertiesTests.m @@ -0,0 +1,65 @@ +// +// OptionalPropertiesTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "OptionalPropModel.h" + +@interface OptionalPropertiesTests : XCTestCase +@end + +@implementation OptionalPropertiesTests +{ + OptionalPropModel* o; +} + +-(void)testPropertyPresent +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../withOptProp.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + o = [[OptionalPropModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(o, @"Could not load the test data file."); + + XCTAssertTrue([o.notRequredProperty isEqualToString:@"I'm here this time!"], @"notRequredProperty' value is not 'I'm here this time!'"); +} + +-(void)testPropertyMissing +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../withoutOptProp.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + o = [[OptionalPropModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(o, @"Could not load the test data file."); + + XCTAssertTrue(!o.notRequredProperty, @"notRequredProperty' is not nil"); + +} + +-(void)testNullValuesForOptionalProperties +{ + NSString* jsonWithNulls = @"{\"notRequredProperty\":null,\"fillerNumber\":1}"; + + NSError* err; + o = [[OptionalPropModel alloc] initWithString: jsonWithNulls error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(o, @"Could not initialize the model"); + + XCTAssertTrue(!o.notRequredProperty, @"notRequredProperty' is not nil"); + +} + +@end diff --git a/examples/Tests/PersistTests.m b/examples/Tests/PersistTests.m new file mode 100644 index 00000000..3ac78399 --- /dev/null +++ b/examples/Tests/PersistTests.m @@ -0,0 +1,117 @@ +// +// PersistTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 16/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "JSONTypesModel.h" +#import "BuiltInConversionsModel.h" + +@interface PersistTests : XCTestCase +@end + +@implementation PersistTests + +-(void)testPersistJSONTypes +{ + //--------------------------------------- + // load JSON file + //--------------------------------------- + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../jsonTypes.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + JSONTypesModel* t = [[JSONTypesModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(t, @"Could not load the test data file."); + + //--------------------------------------- + // export model to NSDictionary + //--------------------------------------- + + NSDictionary* d = [t toDictionary]; + XCTAssertNotNil(d, @"toDictionary returned nil"); + XCTAssertTrue([d isKindOfClass:[NSDictionary class]], @"toDictionary didn't return NSDictionary object"); + + XCTAssertTrue( [t.caption isEqualToString: d[@"caption"] ], @"caption key is not equal to exported value"); + + //--------------------------------------- + // turn NSDictionary to a model + //--------------------------------------- + + JSONTypesModel* t1 = [[JSONTypesModel alloc] initWithDictionary:d error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + + XCTAssertTrue( [t1.caption isEqualToString:t.caption], @"t1.caption != t.caption" ); + XCTAssertTrue( t1.notAvailable==t.notAvailable, @"t1.notAvailable != t.notAvailable" ); + + //--------------------------------------- + // export model to JSON + //--------------------------------------- + + NSString* json = [t1 toJSONString]; + XCTAssertNotNil(json, @"Exported JSON is nil"); + + //--------------------------------------- + // turn exported JSON to a model + //--------------------------------------- + + JSONTypesModel* t2 = [[JSONTypesModel alloc] initWithString:json error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + + XCTAssertTrue([t1.caption isEqualToString:t2.caption], @"t1.caption != t2.caption" ); + XCTAssertTrue(t1.notAvailable==t2.notAvailable, @"t1.notAvailable != t2.notAvailable" ); +} + +-(void)testBoolExport +{ + //--------------------------------------- + // load JSON file + //--------------------------------------- + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../converts.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + BuiltInConversionsModel* b = [[BuiltInConversionsModel alloc] initWithString: jsonContents error:&err]; + + //--------------------------------------- + // export model to NSDictionary + //--------------------------------------- + + NSDictionary* d = [b toDictionary]; + XCTAssertNotNil(d, @"toDictionary returned nil"); + XCTAssertTrue([d isKindOfClass:[NSDictionary class]], @"toDictionary didn't return NSDictionary object"); + + XCTAssertTrue( [@(1) isEqualToNumber:d[@"boolFromString"]], @"boolFromString key is not equal to YES"); +} + +-(void)testCopy +{ + //load json + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../converts.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + BuiltInConversionsModel* b = [[BuiltInConversionsModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNotNil(b.importantEvent, @"Did not initialize model with data"); + + //test copying and coding at the same time + BuiltInConversionsModel* b1 = [b copy]; + + XCTAssertNotNil(b1, @"model copy did not succeed"); + XCTAssertTrue([b.importantEvent isEqualToDate: b1.importantEvent], @"date copy were not equal to original"); +} + +@end diff --git a/examples/Tests/PrimitiveTypesReadTests.m b/examples/Tests/PrimitiveTypesReadTests.m new file mode 100644 index 00000000..3923a7fd --- /dev/null +++ b/examples/Tests/PrimitiveTypesReadTests.m @@ -0,0 +1,84 @@ +// +// PrimitiveTypesReadTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "PrimitivesModel.h" + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 +#import "EnumModel.h" +#endif + +@interface PrimitiveTypesReadTests : XCTestCase +@end + +@implementation PrimitiveTypesReadTests +{ + PrimitivesModel* p; +} + +-(void)setUp +{ + [super setUp]; + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../primitives.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + p = [[PrimitivesModel alloc] initWithString: jsonContents error:&err]; + + XCTAssertNil(err, "%@", [err localizedDescription]); + + XCTAssertNotNil(p, @"Could not load the test data file."); +} + +-(void)testPrimitiveTypes +{ + XCTAssertTrue(p.shortNumber==114, @"shortNumber read fail"); + XCTAssertTrue(p.intNumber==12, @"intNumber read fail"); + XCTAssertTrue(p.longNumber==12124, @"longNumber read fail"); + + XCTAssertEqualWithAccuracy(p.floatNumber, 12.12, FLT_EPSILON, @"floatNumber read fail"); + XCTAssertEqualWithAccuracy(p.doubleNumber, 121231312.124, DBL_EPSILON, @"doubleNumber read fail"); + + XCTAssertTrue(p.boolNO==NO, @"boolNO read fail"); + XCTAssertTrue(p.boolYES==YES, @"boolYES read fail"); +} + +-(void)testBoolExport +{ + NSString* exportedJSON = [p toJSONString]; + XCTAssertTrue([exportedJSON rangeOfString:@"\"boolNO\":false"].location != NSNotFound, @"boolNO should export to 'false'"); + XCTAssertTrue([exportedJSON rangeOfString:@"\"boolYES\":true"].location != NSNotFound, @"boolYES should export to 'true'"); +} + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 +-(void)testEnumerationTypes +{ + NSString* jsonContents = @"{\"nested\":{\"status\":\"open\"},\"nsStatus\":\"closed\",\"nsuStatus\":\"open\",\"statusString\":\"open\"}"; + + NSError* err; + EnumModel* p1 = [[EnumModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + + XCTAssertNotNil(p1, @"Could not read input json text"); + + XCTAssertTrue(p1.status==StatusOpen, @"Status is not StatusOpen"); + XCTAssertTrue(p1.nsStatus==NSE_StatusClosed, @"nsStatus is not NSE_StatusClosed"); + XCTAssertTrue(p1.nsuStatus==NSEU_StatusOpen, @"nsuStatus is not NSEU_StatusOpen"); + + NSString* json = [p1 toJSONString]; + XCTAssertTrue([json rangeOfString:@"\"statusString\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([json rangeOfString:@"\"nsuStatus\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([json rangeOfString:@"\"nsStatus\":\"closed\""].location!=NSNotFound, @"Exporting enum value didn't work out"); +} +#endif + +@end diff --git a/examples/Tests/SanityTests.m b/examples/Tests/SanityTests.m index e8b038c2..70ee4d24 100644 --- a/examples/Tests/SanityTests.m +++ b/examples/Tests/SanityTests.m @@ -29,7 +29,7 @@ - (void)testSanity - (void)testJsonModel { - NSString *json = @"{\"foo\":\"bar\", \"a\": 1}"; + NSString *json = @"{\"foo\":\"bar\",\"a\":1}"; NSError *error = nil; MyModel *obj = [[MyModel alloc] initWithString:json error:&error]; diff --git a/examples/Tests/SimpleDataErrorTests.m b/examples/Tests/SimpleDataErrorTests.m new file mode 100644 index 00000000..b5b77906 --- /dev/null +++ b/examples/Tests/SimpleDataErrorTests.m @@ -0,0 +1,164 @@ +// +// SimpleDataErrorTests.m +// JSONModelDemo +// +// Created by Marin Todorov on 13/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "PrimitivesModel.h" +#import "NestedModel.h" +#import "CopyrightModel.h" + +@interface SimpleDataErrorTests : XCTestCase +@end + +@implementation SimpleDataErrorTests + +-(void)testMissingKeysError +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../primitivesWithErrors.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + PrimitivesModel* p = [[PrimitivesModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(p, @"Model is not nil, when input is invalid"); + XCTAssertNotNil(err, @"No error when keys are missing."); + + XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for missing keys"); + NSArray* missingKeys = err.userInfo[kJSONModelMissingKeys]; + missingKeys = [missingKeys sortedArrayUsingSelector:@selector(compare:)]; + XCTAssertTrue(missingKeys, @"error does not have kJSONModelMissingKeys keys in user info"); + XCTAssertTrue([missingKeys[0] isEqualToString:@"intNumber"],@"missing field intNumber not found in missingKeys"); + XCTAssertTrue([missingKeys[1] isEqualToString:@"longNumber"],@"missing field longNumber not found in missingKeys"); +} + +-(void)testTypeMismatchErrorImages +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../nestedDataWithTypeMismatchOnImages.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err = nil; + NestedModel* p = [[NestedModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(p, @"Model is not nil, when input is invalid"); + XCTAssertNotNil(err, @"No error when types mismatch."); + + XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for type mismatch"); + NSString* mismatchDescription = err.userInfo[kJSONModelTypeMismatch]; + XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info"); + XCTAssertTrue([mismatchDescription rangeOfString:@"'images'"].location != NSNotFound, @"error should mention that the 'images' property (expecting an Array) is mismatched."); + + // Make sure that the error is at the expected key-path + XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"images", @"kJSONModelKeyPath does not contain the expected path of the error."); +} + +-(void)testTypeMismatchErrorImagesObject +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../nestedDataWithTypeMismatchOnImagesObject.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + NestedModel* p = [[NestedModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(p, @"Model is not nil, when input is invalid"); + XCTAssertNotNil(err, @"No error when types mismatch."); + + XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for type mismatch"); + NSString* mismatchDescription = err.userInfo[kJSONModelTypeMismatch]; + XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info"); + XCTAssertTrue([mismatchDescription rangeOfString:@"'imagesObject'"].location != NSNotFound, @"error should mention that the 'imagesObject' property (expecting a Dictionary) is mismatched."); + + // Make sure that the error is at the expected key-path + XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"imagesObject", @"kJSONModelKeyPath does not contain the expected path of the error."); +} + +-(void)testBrokenJSON +{ + NSString* jsonContents = @"{[1,23,4],\"123\":123,}"; + + NSError* err; + PrimitivesModel* p = [[PrimitivesModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(p, @"Model is not nil, when input is invalid"); + XCTAssertNotNil(err, @"No error when keys are missing."); + + XCTAssertTrue(err.code == kJSONModelErrorBadJSON, @"Wrong error for bad JSON"); +} + +- (NSError*)performTestErrorsInNestedModelFile:(NSString*)jsonFilename +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:jsonFilename]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err = nil; + NestedModel* n = [[NestedModel alloc] initWithString: jsonContents error:&err]; + XCTAssertNotNil(err, @"No error thrown when loading invalid data"); + + XCTAssertNil(n, @"Model is not nil, when invalid data input"); + XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error for missing keys"); + + // Make sure that 'name' is listed as the missing key + XCTAssertEqualObjects(err.userInfo[kJSONModelMissingKeys][0], @"name", @"'name' should be the missing key."); + return err; +} + +-(void)testErrorsInNestedModelsArray +{ + NSError* err = [self performTestErrorsInNestedModelFile:@"../../nestedDataWithArrayError.json"]; + + // Make sure that the error is at the expected key-path + XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"images[1]", @"kJSONModelKeyPath does not contain the expected path of the error."); +} + +-(void)testErrorsInNestedModelsDictionary +{ + NSError* err = [self performTestErrorsInNestedModelFile:@"../../nestedDataWithDictionaryError.json"]; + + // Make sure that the error is at the expected key-path + XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"imagesObject.image2", @"kJSONModelKeyPath does not contain the expected path of the error."); +} + +-(void)testForNilInputFromString +{ + JSONModelError* err = nil; + + //test for nil string input + CopyrightModel* cpModel = [[CopyrightModel alloc] initWithString:nil error:&err]; + cpModel=nil; + + XCTAssertTrue(err!=nil, @"No error returned when initialized with nil string"); + XCTAssertTrue(err.code == kJSONModelErrorNilInput, @"Wrong error for nil string input"); +} + +-(void)testForNilInputFromDictionary +{ + JSONModelError* err = nil; + + //test for nil string input + CopyrightModel* cpModel = [[CopyrightModel alloc] initWithDictionary:nil error:&err]; + cpModel=nil; + + XCTAssertTrue(err!=nil, @"No error returned when initialized with nil dictionary"); + XCTAssertTrue(err.code == kJSONModelErrorNilInput, @"Wrong error for nil dictionary input"); +} + +-(void)testForNullValuesForRequiredProperty +{ + JSONModelError* err = nil; + NSString* jsonString = @"{\"author\":\"Marin\",\"year\":null}"; + + CopyrightModel* cpModel = [[CopyrightModel alloc] initWithString:jsonString error:&err]; + cpModel = nil; + XCTAssertTrue(err, @"No error returned when initialized with nil dictionary"); + XCTAssertTrue(err.code == kJSONModelErrorInvalidData, @"Wrong error null value for a required property"); +} + +@end diff --git a/examples/Tests/SpecialPropertiesTests.m b/examples/Tests/SpecialPropertiesTests.m new file mode 100644 index 00000000..52ceea9c --- /dev/null +++ b/examples/Tests/SpecialPropertiesTests.m @@ -0,0 +1,86 @@ +// +// SpecialPropertiesTests.m +// JSONModelDemo_iOS +// +// Created by Marin Todorov on 4/18/14. +// Copyright (c) 2014 Underplot ltd. All rights reserved. +// + +@import XCTest; +@import JSONModel; + +#pragma mark - model with block property +@interface BModel: JSONModel +@property (assign, nonatomic) int id; +@property (nonatomic, copy) void(^userLocationCompleted)(); +@end + +@implementation BModel +@end + +#pragma mark - model with read-only properties +@interface RModel: JSONModel +@property (assign, nonatomic) int id; +@property (assign, nonatomic, readonly) int rId; +@property (strong, nonatomic, readonly) NSNumber* nId; +@end + +@implementation RModel +@end + +#pragma mark - empty array/dictionary +@interface DModel: JSONModel +@property (strong, nonatomic) NSDictionary* dict; +@property (strong, nonatomic) NSMutableDictionary* mdict; +@end + +@implementation DModel +@end + +#pragma mark - test suite + +@interface SpecialPropertiesTests : XCTestCase +@end + +@implementation SpecialPropertiesTests + +- (void)setUp +{ + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown +{ + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +//test autoignoring block properties +- (void)testBlocks +{ + NSString* json = @"{\"id\":1}"; + BModel* bm = [[BModel alloc] initWithString:json error:nil]; + XCTAssertNotNil(bm, @"model failed to crate"); +} + +//test autoignoring read-only properties +- (void)testReadOnly +{ + NSString* json = @"{\"id\":1}"; + RModel* rm = [[RModel alloc] initWithString:json error:nil]; + XCTAssertNotNil(rm, @"model failed to crate"); +} + +//test auto-converting array to dict +-(void)testEmtpyDictionary +{ + NSString* json = @"{\"dict\":[],\"mdict\":[]}"; + DModel* dm = [[DModel alloc] initWithString:json error:nil]; + XCTAssertNotNil(dm, @"model failed to crate"); + XCTAssertTrue([dm.dict isKindOfClass:[NSDictionary class]], @"property did not convert to dictionary"); + XCTAssertTrue([dm.mdict isKindOfClass:[NSMutableDictionary class]], @"property did not convert to mutable dictionary"); +} + +@end + diff --git a/examples/Tests/SpecialPropertyNameTests.m b/examples/Tests/SpecialPropertyNameTests.m new file mode 100644 index 00000000..53e46357 --- /dev/null +++ b/examples/Tests/SpecialPropertyNameTests.m @@ -0,0 +1,39 @@ +// +// SpeicalPropertyNameTest.m +// JSONModelDemo_OSX +// +// Created by BB9z on 13-4-26. +// Copyright (c) 2013年 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "SpecialPropertyModel.h" + +@interface DescModel : JSONModel +@property (assign, nonatomic) int id; +@end + +@implementation DescModel +@end + +@interface SpecialPropertyNameTests : XCTestCase +@end + +@implementation SpecialPropertyNameTests + +- (void)testSpecialPropertyName +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../specialPropertyName.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + + XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); + + NSError* err; + SpecialPropertyModel *p = [[SpecialPropertyModel alloc] initWithString: jsonContents error:&err]; + + XCTAssertNotNil(p, @"Could not initialize model."); + XCTAssertNil(err, "%@", [err localizedDescription]); +} + +@end diff --git a/examples/Tests/SpecialValuesTests.m b/examples/Tests/SpecialValuesTests.m new file mode 100644 index 00000000..2db6691b --- /dev/null +++ b/examples/Tests/SpecialValuesTests.m @@ -0,0 +1,50 @@ + +// +// SpecialValuesTests.m +// JSONModelDemo_iOS +// +// Created by Marin Todorov on 3/23/16. +// Copyright © 2016 Underplot ltd. All rights reserved. +// + +@import XCTest; +@import JSONModel; + +//model class +@interface SpecialModel: JSONModel +@property (strong, nonatomic) NSString* name; +@end + +@implementation SpecialModel +@end + +//tests class +@interface SpecialValuesTests : XCTestCase +@end + +@implementation SpecialValuesTests +{ + SpecialModel* _model; +} + +- (void)setUp { + [super setUp]; + + NSString* jsonContents = @"{\"name\": \"FIRST_SECOND\"}"; + + NSError *err; + _model = [[SpecialModel alloc] initWithString:jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(_model, @"Could not load the test data file."); +} + +// tests: https://github.com/JSONModel/JSONModel/issues/460 +- (void)testExample { + XCTAssertTrue([_model.name isEqualToString:@"FIRST_SECOND"]); +} + +-(void)tearDown { + _model = nil; +} + +@end diff --git a/examples/Tests/ValidationTests.m b/examples/Tests/ValidationTests.m new file mode 100644 index 00000000..b822501c --- /dev/null +++ b/examples/Tests/ValidationTests.m @@ -0,0 +1,70 @@ +// +// ValidationTestSuite.m +// JSONModelDemo +// +// Created by Marin Todorov on 17/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +@import XCTest; + +#import "JSONTypesModelWithValidation1.h" +#import "JSONTypesModelWithValidation2.h" + +@interface ValidationTests : XCTestCase +@end + +@implementation ValidationTests +{ + NSString* jsonContents; +} + +-(void)setUp +{ + [super setUp]; + + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../jsonTypes.json"]; + jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; +} + +-(void)testValidData +{ + NSError* err; + JSONTypesModelWithValidation1* val1 = [[JSONTypesModelWithValidation1 alloc] initWithString:jsonContents error:&err]; + NSAssert(val1, @"Model didn't initialize"); + NSAssert(!err, @"Model is not nil, but there's an error back from init"); + +} + +-(void)testInvalidData +{ + NSError* err; + JSONTypesModelWithValidation2* val2 = [[JSONTypesModelWithValidation2 alloc] initWithString:jsonContents error:&err]; + NSAssert(!val2, @"Model did initialize with wrong data"); + NSAssert(err.code == kJSONModelErrorModelIsInvalid, @"Error code is not kJSONModelErrorModelIsInvalid"); + +} + +-(void)testBOOLValidationResult +{ + NSError* err; + JSONTypesModelWithValidation1* val1 = [[JSONTypesModelWithValidation1 alloc] initWithString:jsonContents error:&err]; + val1.pi = @1.0; + + NSError* valError = nil; + BOOL res = [val1 validate: &valError]; + + NSAssert(res==NO, @"JSONTypesModelWithValidation1 validate failed to return false"); + NSAssert(valError!=nil, @"JSONTypesModelWithValidation1 validate failed to return an error object"); + + val1.pi = @3.15; + + valError = nil; + res = [val1 validate: &valError]; + + NSAssert(res==YES, @"JSONTypesModelWithValidation1 validate failed to return true"); + NSAssert(valError==nil, @"JSONTypesModelWithValidation1 validate failed to return a nil error object"); + +} + +@end From c21a6059fa08a299798c7da31975a4b90c64a2f2 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 22:03:42 +0100 Subject: [PATCH 089/171] Switch to tabs on module map --- module.modulemap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module.modulemap b/module.modulemap index 67dbc70d..5788d49d 100644 --- a/module.modulemap +++ b/module.modulemap @@ -1,6 +1,6 @@ framework module JSONModel { - umbrella header "JSONModelLib.h" + umbrella header "JSONModelLib.h" - export * - module * { export * } + export * + module * { export * } } From c935fe130611e2a255c9393f8856ce915682354b Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 22:04:28 +0100 Subject: [PATCH 090/171] Reformat & rename license file --- JSONModel.podspec | 2 +- LICENSE | 18 ++++++++++++++++++ LICENSE_jsonmodel.txt | 23 ----------------------- 3 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 LICENSE delete mode 100644 LICENSE_jsonmodel.txt diff --git a/JSONModel.podspec b/JSONModel.podspec index a4b972b1..ca5a8331 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -4,7 +4,7 @@ Pod::Spec.new do |s| s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" - s.license = { :type => 'MIT', :file => 'LICENSE_jsonmodel.txt' } + s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { "Marin Todorov" => "touch-code-magazine@underplot.com" } s.source = { :git => "https://github.com/JSONModel/JSONModel.git", :tag => "1.2.0" } diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..babea518 --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2012-2016 Marin Todorov and JSONModel contributors + +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. diff --git a/LICENSE_jsonmodel.txt b/LICENSE_jsonmodel.txt deleted file mode 100644 index cbcdb3b7..00000000 --- a/LICENSE_jsonmodel.txt +++ /dev/null @@ -1,23 +0,0 @@ -JSONModel - -Copyright (c) 2012-2014 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 From 09973c6b1800d0dd5d4bf1b562f57fdd9e0a29d0 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 22:40:02 +0100 Subject: [PATCH 091/171] Minor overall improvements --- AppledocSettings.plist | 4 +-- JSONModel.xcodeproj/project.pbxproj | 38 +++++++++----------- JSONModel/Info.plist | 2 +- JSONModel/JSONModel/JSONModelClassProperty.h | 6 ++-- JSONModel/JSONModelLib.h | 13 ++++--- gendoc | 2 +- 6 files changed, 30 insertions(+), 35 deletions(-) diff --git a/AppledocSettings.plist b/AppledocSettings.plist index eda9db2f..b808c935 100644 --- a/AppledocSettings.plist +++ b/AppledocSettings.plist @@ -7,9 +7,9 @@ --print-settings --project-company - Marin Todorov, Underplot + JSONModel --company-id - com.underplot + com.jsonmodel --create-docset --verbose diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index 97efbb28..d6845a33 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -35,7 +35,7 @@ 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelClassProperty.m; sourceTree = ""; }; 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModelError.m; sourceTree = ""; }; - 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONModelLib.h; path = JSONModel/JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC711B19A5B600D79B06 /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 92C9BC721B19A5B600D79B06 /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPI.m; sourceTree = ""; }; 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONHTTPClient.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; @@ -59,14 +59,22 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 92C9BC331B19A51100D79B06 = { + 1A5B9D3F1D1C8D72006FE4B1 /* JSONModel */ = { isa = PBXGroup; children = ( + 92C9BC411B19A51100D79B06 /* Info.plist */, 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */, 92C9BC631B19A5B600D79B06 /* JSONModel */, 92C9BC701B19A5B600D79B06 /* JSONModelNetworking */, 92C9BC771B19A5B600D79B06 /* JSONModelTransformations */, - 92C9BC401B19A51100D79B06 /* Supporting Files */, + ); + path = JSONModel; + sourceTree = ""; + }; + 92C9BC331B19A51100D79B06 = { + isa = PBXGroup; + children = ( + 1A5B9D3F1D1C8D72006FE4B1 /* JSONModel */, 92C9BC3E1B19A51100D79B06 /* Products */, ); indentWidth = 4; @@ -82,15 +90,6 @@ name = Products; sourceTree = ""; }; - 92C9BC401B19A51100D79B06 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 92C9BC411B19A51100D79B06 /* Info.plist */, - ); - name = "Supporting Files"; - path = JSONModel; - sourceTree = ""; - }; 92C9BC631B19A5B600D79B06 /* JSONModel */ = { isa = PBXGroup; children = ( @@ -101,8 +100,7 @@ 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */, 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */, ); - name = JSONModel; - path = JSONModel/JSONModel; + path = JSONModel; sourceTree = ""; }; 92C9BC701B19A5B600D79B06 /* JSONModelNetworking */ = { @@ -115,8 +113,7 @@ 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */, 92C9BC761B19A5B600D79B06 /* JSONModel+networking.m */, ); - name = JSONModelNetworking; - path = JSONModel/JSONModelNetworking; + path = JSONModelNetworking; sourceTree = ""; }; 92C9BC771B19A5B600D79B06 /* JSONModelTransformations */ = { @@ -127,8 +124,7 @@ 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */, 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */, ); - name = JSONModelTransformations; - path = JSONModel/JSONModelTransformations; + path = JSONModelTransformations; sourceTree = ""; }; /* End PBXGroup section */ @@ -178,7 +174,7 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "com.touch-code-magazine"; + ORGANIZATIONNAME = com.jsonmodel; TargetAttributes = { 92C9BC3C1B19A51100D79B06 = { CreatedOnToolsVersion = 6.3.1; @@ -333,7 +329,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "$(PROJECT_DIR)/module.modulemap"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.JSONModel; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; @@ -350,7 +346,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "$(PROJECT_DIR)/module.modulemap"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.JSONModel; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index d3de8eef..602d8644 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.2 CFBundleSignature ???? CFBundleVersion diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index fc2cfdc1..75d8332f 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -34,6 +34,9 @@ typedef enum kCustomizationTypes PropertyGetterType; */ @interface JSONModelClassProperty : NSObject +// deprecated +@property (assign, nonatomic) BOOL isIndex DEPRECATED_ATTRIBUTE; + /** The name of the declared property (not the ivar name) */ @property (copy, nonatomic) NSString *name; @@ -55,9 +58,6 @@ typedef enum kCustomizationTypes PropertyGetterType; /** If YES - create a mutable object for the value of the property */ @property (assign, nonatomic) BOOL isMutable; -/** If YES - the value of this property determines equality to other models */ -@property (assign, nonatomic) BOOL isIndex DEPRECATED_ATTRIBUTE; - /** The status of property getter introspection in a model */ @property (assign, nonatomic) PropertyGetterType getterType; diff --git a/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index c0b6c5ba..9a3913fa 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -16,16 +16,15 @@ #import -//JSONModel transformations +// core +#import "JSONModel.h" +#import "JSONModelError.h" + +// transformations #import "JSONValueTransformer.h" #import "JSONKeyMapper.h" -//basic JSONModel classes -#import "JSONModelError.h" -#import "JSONModelClassProperty.h" -#import "JSONModel.h" - -//network classes +// networking (deprecated) #import "JSONHTTPClient.h" #import "JSONModel+networking.h" #import "JSONAPI.h" diff --git a/gendoc b/gendoc index 6f2ad483..010e16e5 100755 --- a/gendoc +++ b/gendoc @@ -1 +1 @@ -appledoc --project-name "JSONModel 1.2.0" --project-company "Marin Todorov, Underplot" --company-id com.underplot --output ~/help --no-create-docset --explicit-crossref JSONModel +appledoc --project-name "JSONModel 1.2.0" --project-company "JSONModel" --company-id com.jsonmodel --output ~/help --no-create-docset --explicit-crossref JSONModel From 118c43d9898a3d54aacde6f8c3e5928b96113723 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 11:32:36 +0100 Subject: [PATCH 092/171] Improved method of declaring collection element types - new method `classForCollectionProperty:` - deprecated `protocolForArrayProperty:` - return a class rather than a string - use `NSClassFromString` for backwards compatibility - relevant tests added --- JSONModel/JSONModel/JSONModel.h | 11 +++++----- JSONModel/JSONModel/JSONModel.m | 19 +++++++++++++--- examples/Tests/Models/Headers/NestedModel.h | 8 +++++++ .../Models/Implementations/NestedModel.m | 14 ++++++++++++ examples/Tests/NestedModelsTests.m | 22 +++++++++++++++++++ 5 files changed, 65 insertions(+), 9 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index ca025e53..e4c4bace 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -133,6 +133,7 @@ DEPRECATED_ATTRIBUTE // deprecated + (NSMutableArray *)arrayOfModelsFromDictionaries:(NSArray *)array DEPRECATED_MSG_ATTRIBUTE("use arrayOfModelsFromDictionaries:error:"); + (void)setGlobalKeyMapper:(JSONKeyMapper *)globalKeyMapper DEPRECATED_MSG_ATTRIBUTE("override +keyMapper in a base model class instead"); ++ (NSString *)protocolForArrayProperty:(NSString *)propertyName DEPRECATED_MSG_ATTRIBUTE("use classForCollectionProperty:"); - (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping DEPRECATED_MSG_ATTRIBUTE("use mergeFromDictionary:useKeyMapping:error:"); - (NSString *)indexPropertyName DEPRECATED_ATTRIBUTE; - (NSComparisonResult)compare:(id)object DEPRECATED_ATTRIBUTE; @@ -262,18 +263,16 @@ DEPRECATED_ATTRIBUTE + (BOOL)propertyIsIgnored:(NSString *)propertyName; /** - * Indicates the protocol name for an array property. + * Indicates the class used for the elements of a collection property. * Rather than using: * @property (strong) NSArray *things; - * You can implement protocolForArrayProperty: and keep your property + * You can implement classForCollectionProperty: and keep your property * defined like: * @property (strong) NSArray *things; * @param propertyName the name of the property - * @return an NSString result indicating the name of the protocol/class - * that should be contained in this array property. Return nil to indicate - * no contained protocol. + * @return Class the class used to deserialize the elements of the collection */ -+ (NSString *)protocolForArrayProperty:(NSString *)propertyName; ++ (Class)classForCollectionProperty:(NSString *)propertyName; /** * Merges values from the given dictionary into the model instance. diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index a7d3a896..81d195a7 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -678,9 +678,9 @@ -(void)__inspectProperties p = nil; } - NSString* customProtocol = [[self class] protocolForArrayProperty:nsPropertyName]; - if (customProtocol) { - p.protocol = customProtocol; + Class customClass = [[self class] classForCollectionProperty:nsPropertyName]; + if (customClass) { + p.protocol = NSStringFromClass(customClass); } //few cases where JSONModel will ignore properties automatically @@ -1352,6 +1352,19 @@ +(NSString*)protocolForArrayProperty:(NSString *)propertyName return nil; } ++(Class)classForCollectionProperty:(NSString *)propertyName +{ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + NSString *protocolName = [self protocolForArrayProperty:propertyName]; +#pragma GCC diagnostic pop + + if (!protocolName) + return nil; + + return NSClassFromString(protocolName); +} + #pragma mark - working with incomplete models - (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping { diff --git a/examples/Tests/Models/Headers/NestedModel.h b/examples/Tests/Models/Headers/NestedModel.h index d4f5fe09..2c5278b3 100644 --- a/examples/Tests/Models/Headers/NestedModel.h +++ b/examples/Tests/Models/Headers/NestedModel.h @@ -18,3 +18,11 @@ @property (strong, nonatomic) NSDictionary* imagesObject; @end + +@interface NestedModelWithoutProtocols : JSONModel + +@property (strong, nonatomic) ImageModel* singleImage; +@property (strong, nonatomic) NSArray* images; +@property (strong, nonatomic) NSDictionary* imagesObject; + +@end diff --git a/examples/Tests/Models/Implementations/NestedModel.m b/examples/Tests/Models/Implementations/NestedModel.m index 81e1f278..19661d2c 100644 --- a/examples/Tests/Models/Implementations/NestedModel.m +++ b/examples/Tests/Models/Implementations/NestedModel.m @@ -7,6 +7,20 @@ // #import "NestedModel.h" +#import "ImageModel.h" @implementation NestedModel @end + +@implementation NestedModelWithoutProtocols + ++ (Class)classForCollectionProperty:(NSString *)propertyName +{ + if ([propertyName isEqualToString:@"images"]) + return [ImageModel class]; + if ([propertyName isEqualToString:@"imagesObject"]) + return [ImageModel class]; + return nil; +} + +@end diff --git a/examples/Tests/NestedModelsTests.m b/examples/Tests/NestedModelsTests.m index e6658c0e..f51a779b 100644 --- a/examples/Tests/NestedModelsTests.m +++ b/examples/Tests/NestedModelsTests.m @@ -18,6 +18,7 @@ @interface NestedModelsTests : XCTestCase @implementation NestedModelsTests { NestedModel* n; + NestedModelWithoutProtocols* b; } -(void)setUp @@ -30,9 +31,14 @@ -(void)setUp XCTAssertNotNil(jsonContents, @"Can't fetch test data file contents."); NSError* err; + n = [[NestedModel alloc] initWithString: jsonContents error:&err]; XCTAssertNil(err, "%@", [err localizedDescription]); XCTAssertNotNil(n, @"Could not load the test data file."); + + b = [[NestedModelWithoutProtocols alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(b, @"Could not load the test data file."); } -(void)testNestedStructures @@ -50,7 +56,23 @@ -(void)testNestedStructures ImageModel* img = n.imagesObject[@"image2"]; XCTAssertTrue([img isKindOfClass:[ImageModel class]], @"images[image2] is not an ImageModel instance"); XCTAssertTrue([img.name isEqualToString:@"lake.jpg"], @"imagesObject[image2].name is not 'lake.jpg'"); +} + +-(void)testNestedStructuresWithoutProtocols +{ + XCTAssertTrue([b.singleImage isKindOfClass:[ImageModel class]], @"singleImage is not an ImageModel instance"); + XCTAssertTrue([b.singleImage.name isEqualToString:@"lake.jpg"], @"singleImage.name is not 'lake.jpg'"); + + XCTAssertTrue([b.images isKindOfClass:[NSArray class]], @"images is not an NSArray"); + XCTAssertTrue([b.images[0] isKindOfClass:[ImageModel class]], @"images[0] is not an ImageModel instance"); + XCTAssertTrue([[b.images[0] name] isEqualToString:@"house.jpg"], @"images[0].name is not 'house.jpg'"); + CopyrightModel* copy = [b.images[0] copyright]; + XCTAssertTrue([copy.author isEqualToString:@"Marin Todorov"], @"images[0].name.copyright is not 'Marin Todorov'"); + XCTAssertTrue([b.imagesObject isKindOfClass:[NSDictionary class]], @"imagesObject is not an NSDictionary"); + ImageModel* img = b.imagesObject[@"image2"]; + XCTAssertTrue([img isKindOfClass:[ImageModel class]], @"images[image2] is not an ImageModel instance"); + XCTAssertTrue([img.name isEqualToString:@"lake.jpg"], @"imagesObject[image2].name is not 'lake.jpg'"); } @end From 78cf2419d19fb6a21a6a1594a705551710ef7f9c Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 23:25:54 +0100 Subject: [PATCH 093/171] Remove Appledoc config Should be handled automatically by CocoaDocs --- AppledocSettings.plist | 20 -------------------- gendoc | 1 - 2 files changed, 21 deletions(-) delete mode 100644 AppledocSettings.plist delete mode 100755 gendoc diff --git a/AppledocSettings.plist b/AppledocSettings.plist deleted file mode 100644 index b808c935..00000000 --- a/AppledocSettings.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - --project-name - JSONModel 1.2.0 - --print-settings - - --project-company - JSONModel - --company-id - com.jsonmodel - --create-docset - - --verbose - 4 - --logformat - 1 - - diff --git a/gendoc b/gendoc deleted file mode 100755 index 010e16e5..00000000 --- a/gendoc +++ /dev/null @@ -1 +0,0 @@ -appledoc --project-name "JSONModel 1.2.0" --project-company "JSONModel" --company-id com.jsonmodel --output ~/help --no-create-docset --explicit-crossref JSONModel From 3bfa31633508f2b859876ef177f7d16fd75812fb Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 23 Jun 2016 23:28:43 +0100 Subject: [PATCH 094/171] Move modulemap inside JSONModel folder --- JSONModel.xcodeproj/project.pbxproj | 4 ++-- module.modulemap => JSONModel/module.modulemap | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename module.modulemap => JSONModel/module.modulemap (100%) diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index d6845a33..442f5a54 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -328,7 +328,7 @@ INFOPLIST_FILE = JSONModel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "$(PROJECT_DIR)/module.modulemap"; + MODULEMAP_FILE = JSONModel/module.modulemap; PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.JSONModel; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -345,7 +345,7 @@ INFOPLIST_FILE = JSONModel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "$(PROJECT_DIR)/module.modulemap"; + MODULEMAP_FILE = JSONModel/module.modulemap; PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.JSONModel; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/module.modulemap b/JSONModel/module.modulemap similarity index 100% rename from module.modulemap rename to JSONModel/module.modulemap From 42770050215271e7b0128a690ef4665c9794ecfd Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 24 Jun 2016 11:03:13 +0100 Subject: [PATCH 095/171] Very minor change to changelog file --- Changelog.md => CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename Changelog.md => CHANGELOG.md (99%) diff --git a/Changelog.md b/CHANGELOG.md similarity index 99% rename from Changelog.md rename to CHANGELOG.md index 6aecf3b4..d42e3141 100644 --- a/Changelog.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -Change-log +Changelog ========== **Version 1.2.0** @2015-12-30 From de08c16a430140f8b36383040c1c1f486998255d Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 24 Jun 2016 11:07:00 +0100 Subject: [PATCH 096/171] Rename examples and apply gitignore --- .../Examples.xcodeproj/project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../contents.xcworkspacedata | 0 {examples => Examples}/Podfile | 0 {examples => Examples}/Tests/ArrayTests.m | 0 .../Tests/BuiltInConversionsTests.m | 0 .../Tests/CustomPropsTests.m | 0 {examples => Examples}/Tests/Data/colors.json | 0 .../Tests/Data/converts.json | 0 .../Tests/Data/github-iphone.json | 0 .../Tests/Data/jsonTypes.json | 0 .../Tests/Data/nestedData.json | 0 .../Tests/Data/nestedDataWithArrayError.json | 0 .../Data/nestedDataWithDictionaryError.json | 0 .../nestedDataWithTypeMismatchOnImages.json | 0 ...tedDataWithTypeMismatchOnImagesObject.json | 0 {examples => Examples}/Tests/Data/post.json | 0 .../Tests/Data/primitives.json | 0 .../Tests/Data/primitivesWithErrors.json | 0 .../Tests/Data/specialPropertyName.json | 0 .../Tests/Data/withOptProp.json | 0 .../Tests/Data/withoutOptProp.json | 0 .../Tests/ExtremeNestingTests.m | 0 .../Tests/IdPropertyTests.m | 0 {examples => Examples}/Tests/Info.plist | 0 .../Tests/InitWithDataTests.m | 0 .../Tests/JSONTypesReadTests.m | 0 .../Tests/KeyMappingTests.m | 0 .../Models/Headers/BuiltInConversionsModel.h | 0 .../Tests/Models/Headers/CopyrightModel.h | 0 .../Models/Headers/CustomPropertyModel.h | 0 .../Tests/Models/Headers/DrugModel.h | 0 .../Tests/Models/Headers/EnumModel.h | 0 .../Models/Headers/ExtremeNestingModel.h | 0 .../Models/Headers/GitHubKeyMapRepoModel.h | 0 .../Headers/GitHubKeyMapRepoModelDict.h | 0 .../Tests/Models/Headers/GitHubRepoModel.h | 0 .../Headers/GitHubRepoModelForUSMapper.h | 0 .../Tests/Models/Headers/ImageModel.h | 0 .../Tests/Models/Headers/InteractionModel.h | 0 .../Tests/Models/Headers/JSONTypesModel.h | 0 .../Headers/JSONTypesModelWithValidation1.h | 0 .../Headers/JSONTypesModelWithValidation2.h | 0 .../Headers/JSONValueTransformer+UIColor.h | 0 .../Models/Headers/ModelForUpperCaseMapper.h | 0 .../Tests/Models/Headers/NestedModel.h | 0 .../Tests/Models/Headers/OptionalPropModel.h | 0 .../Tests/Models/Headers/PostModel.h | 0 .../Tests/Models/Headers/PostsModel.h | 0 .../Tests/Models/Headers/PrimitivesModel.h | 0 .../Models/Headers/RenamedPropertyModel.h | 0 .../Tests/Models/Headers/ReposModel.h | 0 .../Tests/Models/Headers/RpcRequestModel.h | 0 .../Models/Headers/SpecialPropertyModel.h | 0 .../Implementations/BuiltInConversionsModel.m | 0 .../Models/Implementations/CopyrightModel.m | 0 .../Implementations/CustomPropertyModel.m | 0 .../Tests/Models/Implementations/DrugModel.m | 0 .../Tests/Models/Implementations/EnumModel.m | 0 .../Implementations/ExtremeNestingModel.m | 0 .../Implementations/GitHubKeyMapRepoModel.m | 0 .../GitHubKeyMapRepoModelDict.m | 0 .../Models/Implementations/GitHubRepoModel.m | 0 .../GitHubRepoModelForUSMapper.m | 0 .../Tests/Models/Implementations/ImageModel.m | 0 .../Models/Implementations/InteractionModel.m | 0 .../Models/Implementations/JSONTypesModel.m | 0 .../JSONTypesModelWithValidation1.m | 0 .../JSONTypesModelWithValidation2.m | 0 .../JSONValueTransformer+UIColor.m | 0 .../Implementations/ModelForUpperCaseMapper.m | 0 .../Models/Implementations/NestedModel.m | 0 .../Implementations/OptionalPropModel.m | 0 .../Tests/Models/Implementations/PostModel.m | 0 .../Tests/Models/Implementations/PostsModel.m | 0 .../Models/Implementations/PrimitivesModel.m | 0 .../Implementations/RenamedPropertyModel.m | 0 .../Tests/Models/Implementations/ReposModel.m | 0 .../Models/Implementations/RpcRequestModel.m | 0 .../Implementations/SpecialPropertyModel.m | 0 .../Tests/NestedModelsTests.m | 0 .../Tests/OptionalPropertiesTests.m | 0 {examples => Examples}/Tests/PersistTests.m | 0 .../Tests/PrimitiveTypesReadTests.m | 0 {examples => Examples}/Tests/SanityTests.m | 0 .../Tests/SimpleDataErrorTests.m | 0 .../Tests/SpecialPropertiesTests.m | 0 .../Tests/SpecialPropertyNameTests.m | 0 .../Tests/SpecialValuesTests.m | 0 .../Tests/ValidationTests.m | 0 {examples => Examples}/iOS/AppDelegate.h | 0 {examples => Examples}/iOS/AppDelegate.m | 0 .../AppIcon.appiconset/Contents.json | 0 .../iOS/Base.lproj/LaunchScreen.storyboard | 0 .../iOS/Base.lproj/Main.storyboard | 0 {examples => Examples}/iOS/Info.plist | 0 {examples => Examples}/iOS/ViewController.h | 0 {examples => Examples}/iOS/ViewController.m | 0 {examples => Examples}/iOS/main.m | 0 {examples => Examples}/macOS/AppDelegate.h | 0 {examples => Examples}/macOS/AppDelegate.m | 0 .../AppIcon.appiconset/Contents.json | 0 .../macOS/Base.lproj/Main.storyboard | 0 {examples => Examples}/macOS/Info.plist | 0 {examples => Examples}/macOS/ViewController.h | 0 {examples => Examples}/macOS/ViewController.m | 0 {examples => Examples}/macOS/main.m | 0 {examples => Examples}/tvOS/AppDelegate.h | 0 {examples => Examples}/tvOS/AppDelegate.m | 0 .../Content.imageset/Contents.json | 0 .../Back.imagestacklayer/Contents.json | 0 .../App Icon - Large.imagestack/Contents.json | 0 .../Content.imageset/Contents.json | 0 .../Front.imagestacklayer/Contents.json | 0 .../Content.imageset/Contents.json | 0 .../Middle.imagestacklayer/Contents.json | 0 .../Content.imageset/Contents.json | 0 .../Back.imagestacklayer/Contents.json | 0 .../App Icon - Small.imagestack/Contents.json | 0 .../Content.imageset/Contents.json | 0 .../Front.imagestacklayer/Contents.json | 0 .../Content.imageset/Contents.json | 0 .../Middle.imagestacklayer/Contents.json | 0 .../Contents.json | 0 .../Contents.json | 0 .../Top Shelf Image.imageset/Contents.json | 0 .../tvOS/Assets.xcassets/Contents.json | 0 .../LaunchImage.launchimage/Contents.json | 0 .../tvOS/Base.lproj/Main.storyboard | 0 {examples => Examples}/tvOS/Info.plist | 0 {examples => Examples}/tvOS/ViewController.h | 0 {examples => Examples}/tvOS/ViewController.m | 0 {examples => Examples}/tvOS/main.m | 0 .../watchOS-extension/ExtensionDelegate.h | 0 .../watchOS-extension/ExtensionDelegate.m | 0 .../watchOS-extension/Info.plist | 0 .../watchOS-extension/InterfaceController.h | 0 .../watchOS-extension/InterfaceController.m | 0 .../AppIcon.appiconset/Contents.json | 0 .../watchOS/Base.lproj/Interface.storyboard | 0 {examples => Examples}/watchOS/Info.plist | 0 .../xcshareddata/JSONModel.xccheckout | 41 ------------------- 142 files changed, 41 deletions(-) rename {examples => Examples}/Examples.xcodeproj/project.pbxproj (100%) rename {examples => Examples}/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {examples => Examples}/Examples.xcworkspace/contents.xcworkspacedata (100%) rename {examples => Examples}/Podfile (100%) rename {examples => Examples}/Tests/ArrayTests.m (100%) rename {examples => Examples}/Tests/BuiltInConversionsTests.m (100%) rename {examples => Examples}/Tests/CustomPropsTests.m (100%) rename {examples => Examples}/Tests/Data/colors.json (100%) rename {examples => Examples}/Tests/Data/converts.json (100%) rename {examples => Examples}/Tests/Data/github-iphone.json (100%) rename {examples => Examples}/Tests/Data/jsonTypes.json (100%) rename {examples => Examples}/Tests/Data/nestedData.json (100%) rename {examples => Examples}/Tests/Data/nestedDataWithArrayError.json (100%) rename {examples => Examples}/Tests/Data/nestedDataWithDictionaryError.json (100%) rename {examples => Examples}/Tests/Data/nestedDataWithTypeMismatchOnImages.json (100%) rename {examples => Examples}/Tests/Data/nestedDataWithTypeMismatchOnImagesObject.json (100%) rename {examples => Examples}/Tests/Data/post.json (100%) rename {examples => Examples}/Tests/Data/primitives.json (100%) rename {examples => Examples}/Tests/Data/primitivesWithErrors.json (100%) rename {examples => Examples}/Tests/Data/specialPropertyName.json (100%) rename {examples => Examples}/Tests/Data/withOptProp.json (100%) rename {examples => Examples}/Tests/Data/withoutOptProp.json (100%) rename {examples => Examples}/Tests/ExtremeNestingTests.m (100%) rename {examples => Examples}/Tests/IdPropertyTests.m (100%) rename {examples => Examples}/Tests/Info.plist (100%) rename {examples => Examples}/Tests/InitWithDataTests.m (100%) rename {examples => Examples}/Tests/JSONTypesReadTests.m (100%) rename {examples => Examples}/Tests/KeyMappingTests.m (100%) rename {examples => Examples}/Tests/Models/Headers/BuiltInConversionsModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/CopyrightModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/CustomPropertyModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/DrugModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/EnumModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/ExtremeNestingModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/GitHubKeyMapRepoModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h (100%) rename {examples => Examples}/Tests/Models/Headers/GitHubRepoModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/GitHubRepoModelForUSMapper.h (100%) rename {examples => Examples}/Tests/Models/Headers/ImageModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/InteractionModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/JSONTypesModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/JSONTypesModelWithValidation1.h (100%) rename {examples => Examples}/Tests/Models/Headers/JSONTypesModelWithValidation2.h (100%) rename {examples => Examples}/Tests/Models/Headers/JSONValueTransformer+UIColor.h (100%) rename {examples => Examples}/Tests/Models/Headers/ModelForUpperCaseMapper.h (100%) rename {examples => Examples}/Tests/Models/Headers/NestedModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/OptionalPropModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/PostModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/PostsModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/PrimitivesModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/RenamedPropertyModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/ReposModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/RpcRequestModel.h (100%) rename {examples => Examples}/Tests/Models/Headers/SpecialPropertyModel.h (100%) rename {examples => Examples}/Tests/Models/Implementations/BuiltInConversionsModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/CopyrightModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/CustomPropertyModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/DrugModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/EnumModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/ExtremeNestingModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/GitHubKeyMapRepoModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m (100%) rename {examples => Examples}/Tests/Models/Implementations/GitHubRepoModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m (100%) rename {examples => Examples}/Tests/Models/Implementations/ImageModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/InteractionModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/JSONTypesModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/JSONTypesModelWithValidation1.m (100%) rename {examples => Examples}/Tests/Models/Implementations/JSONTypesModelWithValidation2.m (100%) rename {examples => Examples}/Tests/Models/Implementations/JSONValueTransformer+UIColor.m (100%) rename {examples => Examples}/Tests/Models/Implementations/ModelForUpperCaseMapper.m (100%) rename {examples => Examples}/Tests/Models/Implementations/NestedModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/OptionalPropModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/PostModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/PostsModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/PrimitivesModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/RenamedPropertyModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/ReposModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/RpcRequestModel.m (100%) rename {examples => Examples}/Tests/Models/Implementations/SpecialPropertyModel.m (100%) rename {examples => Examples}/Tests/NestedModelsTests.m (100%) rename {examples => Examples}/Tests/OptionalPropertiesTests.m (100%) rename {examples => Examples}/Tests/PersistTests.m (100%) rename {examples => Examples}/Tests/PrimitiveTypesReadTests.m (100%) rename {examples => Examples}/Tests/SanityTests.m (100%) rename {examples => Examples}/Tests/SimpleDataErrorTests.m (100%) rename {examples => Examples}/Tests/SpecialPropertiesTests.m (100%) rename {examples => Examples}/Tests/SpecialPropertyNameTests.m (100%) rename {examples => Examples}/Tests/SpecialValuesTests.m (100%) rename {examples => Examples}/Tests/ValidationTests.m (100%) rename {examples => Examples}/iOS/AppDelegate.h (100%) rename {examples => Examples}/iOS/AppDelegate.m (100%) rename {examples => Examples}/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {examples => Examples}/iOS/Base.lproj/LaunchScreen.storyboard (100%) rename {examples => Examples}/iOS/Base.lproj/Main.storyboard (100%) rename {examples => Examples}/iOS/Info.plist (100%) rename {examples => Examples}/iOS/ViewController.h (100%) rename {examples => Examples}/iOS/ViewController.m (100%) rename {examples => Examples}/iOS/main.m (100%) rename {examples => Examples}/macOS/AppDelegate.h (100%) rename {examples => Examples}/macOS/AppDelegate.m (100%) rename {examples => Examples}/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {examples => Examples}/macOS/Base.lproj/Main.storyboard (100%) rename {examples => Examples}/macOS/Info.plist (100%) rename {examples => Examples}/macOS/ViewController.h (100%) rename {examples => Examples}/macOS/ViewController.m (100%) rename {examples => Examples}/macOS/main.m (100%) rename {examples => Examples}/tvOS/AppDelegate.h (100%) rename {examples => Examples}/tvOS/AppDelegate.m (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/Contents.json (100%) rename {examples => Examples}/tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json (100%) rename {examples => Examples}/tvOS/Base.lproj/Main.storyboard (100%) rename {examples => Examples}/tvOS/Info.plist (100%) rename {examples => Examples}/tvOS/ViewController.h (100%) rename {examples => Examples}/tvOS/ViewController.m (100%) rename {examples => Examples}/tvOS/main.m (100%) rename {examples => Examples}/watchOS-extension/ExtensionDelegate.h (100%) rename {examples => Examples}/watchOS-extension/ExtensionDelegate.m (100%) rename {examples => Examples}/watchOS-extension/Info.plist (100%) rename {examples => Examples}/watchOS-extension/InterfaceController.h (100%) rename {examples => Examples}/watchOS-extension/InterfaceController.m (100%) rename {examples => Examples}/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {examples => Examples}/watchOS/Base.lproj/Interface.storyboard (100%) rename {examples => Examples}/watchOS/Info.plist (100%) delete mode 100644 JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout diff --git a/examples/Examples.xcodeproj/project.pbxproj b/Examples/Examples.xcodeproj/project.pbxproj similarity index 100% rename from examples/Examples.xcodeproj/project.pbxproj rename to Examples/Examples.xcodeproj/project.pbxproj diff --git a/examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/examples/Examples.xcworkspace/contents.xcworkspacedata b/Examples/Examples.xcworkspace/contents.xcworkspacedata similarity index 100% rename from examples/Examples.xcworkspace/contents.xcworkspacedata rename to Examples/Examples.xcworkspace/contents.xcworkspacedata diff --git a/examples/Podfile b/Examples/Podfile similarity index 100% rename from examples/Podfile rename to Examples/Podfile diff --git a/examples/Tests/ArrayTests.m b/Examples/Tests/ArrayTests.m similarity index 100% rename from examples/Tests/ArrayTests.m rename to Examples/Tests/ArrayTests.m diff --git a/examples/Tests/BuiltInConversionsTests.m b/Examples/Tests/BuiltInConversionsTests.m similarity index 100% rename from examples/Tests/BuiltInConversionsTests.m rename to Examples/Tests/BuiltInConversionsTests.m diff --git a/examples/Tests/CustomPropsTests.m b/Examples/Tests/CustomPropsTests.m similarity index 100% rename from examples/Tests/CustomPropsTests.m rename to Examples/Tests/CustomPropsTests.m diff --git a/examples/Tests/Data/colors.json b/Examples/Tests/Data/colors.json similarity index 100% rename from examples/Tests/Data/colors.json rename to Examples/Tests/Data/colors.json diff --git a/examples/Tests/Data/converts.json b/Examples/Tests/Data/converts.json similarity index 100% rename from examples/Tests/Data/converts.json rename to Examples/Tests/Data/converts.json diff --git a/examples/Tests/Data/github-iphone.json b/Examples/Tests/Data/github-iphone.json similarity index 100% rename from examples/Tests/Data/github-iphone.json rename to Examples/Tests/Data/github-iphone.json diff --git a/examples/Tests/Data/jsonTypes.json b/Examples/Tests/Data/jsonTypes.json similarity index 100% rename from examples/Tests/Data/jsonTypes.json rename to Examples/Tests/Data/jsonTypes.json diff --git a/examples/Tests/Data/nestedData.json b/Examples/Tests/Data/nestedData.json similarity index 100% rename from examples/Tests/Data/nestedData.json rename to Examples/Tests/Data/nestedData.json diff --git a/examples/Tests/Data/nestedDataWithArrayError.json b/Examples/Tests/Data/nestedDataWithArrayError.json similarity index 100% rename from examples/Tests/Data/nestedDataWithArrayError.json rename to Examples/Tests/Data/nestedDataWithArrayError.json diff --git a/examples/Tests/Data/nestedDataWithDictionaryError.json b/Examples/Tests/Data/nestedDataWithDictionaryError.json similarity index 100% rename from examples/Tests/Data/nestedDataWithDictionaryError.json rename to Examples/Tests/Data/nestedDataWithDictionaryError.json diff --git a/examples/Tests/Data/nestedDataWithTypeMismatchOnImages.json b/Examples/Tests/Data/nestedDataWithTypeMismatchOnImages.json similarity index 100% rename from examples/Tests/Data/nestedDataWithTypeMismatchOnImages.json rename to Examples/Tests/Data/nestedDataWithTypeMismatchOnImages.json diff --git a/examples/Tests/Data/nestedDataWithTypeMismatchOnImagesObject.json b/Examples/Tests/Data/nestedDataWithTypeMismatchOnImagesObject.json similarity index 100% rename from examples/Tests/Data/nestedDataWithTypeMismatchOnImagesObject.json rename to Examples/Tests/Data/nestedDataWithTypeMismatchOnImagesObject.json diff --git a/examples/Tests/Data/post.json b/Examples/Tests/Data/post.json similarity index 100% rename from examples/Tests/Data/post.json rename to Examples/Tests/Data/post.json diff --git a/examples/Tests/Data/primitives.json b/Examples/Tests/Data/primitives.json similarity index 100% rename from examples/Tests/Data/primitives.json rename to Examples/Tests/Data/primitives.json diff --git a/examples/Tests/Data/primitivesWithErrors.json b/Examples/Tests/Data/primitivesWithErrors.json similarity index 100% rename from examples/Tests/Data/primitivesWithErrors.json rename to Examples/Tests/Data/primitivesWithErrors.json diff --git a/examples/Tests/Data/specialPropertyName.json b/Examples/Tests/Data/specialPropertyName.json similarity index 100% rename from examples/Tests/Data/specialPropertyName.json rename to Examples/Tests/Data/specialPropertyName.json diff --git a/examples/Tests/Data/withOptProp.json b/Examples/Tests/Data/withOptProp.json similarity index 100% rename from examples/Tests/Data/withOptProp.json rename to Examples/Tests/Data/withOptProp.json diff --git a/examples/Tests/Data/withoutOptProp.json b/Examples/Tests/Data/withoutOptProp.json similarity index 100% rename from examples/Tests/Data/withoutOptProp.json rename to Examples/Tests/Data/withoutOptProp.json diff --git a/examples/Tests/ExtremeNestingTests.m b/Examples/Tests/ExtremeNestingTests.m similarity index 100% rename from examples/Tests/ExtremeNestingTests.m rename to Examples/Tests/ExtremeNestingTests.m diff --git a/examples/Tests/IdPropertyTests.m b/Examples/Tests/IdPropertyTests.m similarity index 100% rename from examples/Tests/IdPropertyTests.m rename to Examples/Tests/IdPropertyTests.m diff --git a/examples/Tests/Info.plist b/Examples/Tests/Info.plist similarity index 100% rename from examples/Tests/Info.plist rename to Examples/Tests/Info.plist diff --git a/examples/Tests/InitWithDataTests.m b/Examples/Tests/InitWithDataTests.m similarity index 100% rename from examples/Tests/InitWithDataTests.m rename to Examples/Tests/InitWithDataTests.m diff --git a/examples/Tests/JSONTypesReadTests.m b/Examples/Tests/JSONTypesReadTests.m similarity index 100% rename from examples/Tests/JSONTypesReadTests.m rename to Examples/Tests/JSONTypesReadTests.m diff --git a/examples/Tests/KeyMappingTests.m b/Examples/Tests/KeyMappingTests.m similarity index 100% rename from examples/Tests/KeyMappingTests.m rename to Examples/Tests/KeyMappingTests.m diff --git a/examples/Tests/Models/Headers/BuiltInConversionsModel.h b/Examples/Tests/Models/Headers/BuiltInConversionsModel.h similarity index 100% rename from examples/Tests/Models/Headers/BuiltInConversionsModel.h rename to Examples/Tests/Models/Headers/BuiltInConversionsModel.h diff --git a/examples/Tests/Models/Headers/CopyrightModel.h b/Examples/Tests/Models/Headers/CopyrightModel.h similarity index 100% rename from examples/Tests/Models/Headers/CopyrightModel.h rename to Examples/Tests/Models/Headers/CopyrightModel.h diff --git a/examples/Tests/Models/Headers/CustomPropertyModel.h b/Examples/Tests/Models/Headers/CustomPropertyModel.h similarity index 100% rename from examples/Tests/Models/Headers/CustomPropertyModel.h rename to Examples/Tests/Models/Headers/CustomPropertyModel.h diff --git a/examples/Tests/Models/Headers/DrugModel.h b/Examples/Tests/Models/Headers/DrugModel.h similarity index 100% rename from examples/Tests/Models/Headers/DrugModel.h rename to Examples/Tests/Models/Headers/DrugModel.h diff --git a/examples/Tests/Models/Headers/EnumModel.h b/Examples/Tests/Models/Headers/EnumModel.h similarity index 100% rename from examples/Tests/Models/Headers/EnumModel.h rename to Examples/Tests/Models/Headers/EnumModel.h diff --git a/examples/Tests/Models/Headers/ExtremeNestingModel.h b/Examples/Tests/Models/Headers/ExtremeNestingModel.h similarity index 100% rename from examples/Tests/Models/Headers/ExtremeNestingModel.h rename to Examples/Tests/Models/Headers/ExtremeNestingModel.h diff --git a/examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h b/Examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h similarity index 100% rename from examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h rename to Examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h diff --git a/examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h b/Examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h similarity index 100% rename from examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h rename to Examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h diff --git a/examples/Tests/Models/Headers/GitHubRepoModel.h b/Examples/Tests/Models/Headers/GitHubRepoModel.h similarity index 100% rename from examples/Tests/Models/Headers/GitHubRepoModel.h rename to Examples/Tests/Models/Headers/GitHubRepoModel.h diff --git a/examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h b/Examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h similarity index 100% rename from examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h rename to Examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h diff --git a/examples/Tests/Models/Headers/ImageModel.h b/Examples/Tests/Models/Headers/ImageModel.h similarity index 100% rename from examples/Tests/Models/Headers/ImageModel.h rename to Examples/Tests/Models/Headers/ImageModel.h diff --git a/examples/Tests/Models/Headers/InteractionModel.h b/Examples/Tests/Models/Headers/InteractionModel.h similarity index 100% rename from examples/Tests/Models/Headers/InteractionModel.h rename to Examples/Tests/Models/Headers/InteractionModel.h diff --git a/examples/Tests/Models/Headers/JSONTypesModel.h b/Examples/Tests/Models/Headers/JSONTypesModel.h similarity index 100% rename from examples/Tests/Models/Headers/JSONTypesModel.h rename to Examples/Tests/Models/Headers/JSONTypesModel.h diff --git a/examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h b/Examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h similarity index 100% rename from examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h rename to Examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h diff --git a/examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h b/Examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h similarity index 100% rename from examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h rename to Examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h diff --git a/examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h b/Examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h similarity index 100% rename from examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h rename to Examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h diff --git a/examples/Tests/Models/Headers/ModelForUpperCaseMapper.h b/Examples/Tests/Models/Headers/ModelForUpperCaseMapper.h similarity index 100% rename from examples/Tests/Models/Headers/ModelForUpperCaseMapper.h rename to Examples/Tests/Models/Headers/ModelForUpperCaseMapper.h diff --git a/examples/Tests/Models/Headers/NestedModel.h b/Examples/Tests/Models/Headers/NestedModel.h similarity index 100% rename from examples/Tests/Models/Headers/NestedModel.h rename to Examples/Tests/Models/Headers/NestedModel.h diff --git a/examples/Tests/Models/Headers/OptionalPropModel.h b/Examples/Tests/Models/Headers/OptionalPropModel.h similarity index 100% rename from examples/Tests/Models/Headers/OptionalPropModel.h rename to Examples/Tests/Models/Headers/OptionalPropModel.h diff --git a/examples/Tests/Models/Headers/PostModel.h b/Examples/Tests/Models/Headers/PostModel.h similarity index 100% rename from examples/Tests/Models/Headers/PostModel.h rename to Examples/Tests/Models/Headers/PostModel.h diff --git a/examples/Tests/Models/Headers/PostsModel.h b/Examples/Tests/Models/Headers/PostsModel.h similarity index 100% rename from examples/Tests/Models/Headers/PostsModel.h rename to Examples/Tests/Models/Headers/PostsModel.h diff --git a/examples/Tests/Models/Headers/PrimitivesModel.h b/Examples/Tests/Models/Headers/PrimitivesModel.h similarity index 100% rename from examples/Tests/Models/Headers/PrimitivesModel.h rename to Examples/Tests/Models/Headers/PrimitivesModel.h diff --git a/examples/Tests/Models/Headers/RenamedPropertyModel.h b/Examples/Tests/Models/Headers/RenamedPropertyModel.h similarity index 100% rename from examples/Tests/Models/Headers/RenamedPropertyModel.h rename to Examples/Tests/Models/Headers/RenamedPropertyModel.h diff --git a/examples/Tests/Models/Headers/ReposModel.h b/Examples/Tests/Models/Headers/ReposModel.h similarity index 100% rename from examples/Tests/Models/Headers/ReposModel.h rename to Examples/Tests/Models/Headers/ReposModel.h diff --git a/examples/Tests/Models/Headers/RpcRequestModel.h b/Examples/Tests/Models/Headers/RpcRequestModel.h similarity index 100% rename from examples/Tests/Models/Headers/RpcRequestModel.h rename to Examples/Tests/Models/Headers/RpcRequestModel.h diff --git a/examples/Tests/Models/Headers/SpecialPropertyModel.h b/Examples/Tests/Models/Headers/SpecialPropertyModel.h similarity index 100% rename from examples/Tests/Models/Headers/SpecialPropertyModel.h rename to Examples/Tests/Models/Headers/SpecialPropertyModel.h diff --git a/examples/Tests/Models/Implementations/BuiltInConversionsModel.m b/Examples/Tests/Models/Implementations/BuiltInConversionsModel.m similarity index 100% rename from examples/Tests/Models/Implementations/BuiltInConversionsModel.m rename to Examples/Tests/Models/Implementations/BuiltInConversionsModel.m diff --git a/examples/Tests/Models/Implementations/CopyrightModel.m b/Examples/Tests/Models/Implementations/CopyrightModel.m similarity index 100% rename from examples/Tests/Models/Implementations/CopyrightModel.m rename to Examples/Tests/Models/Implementations/CopyrightModel.m diff --git a/examples/Tests/Models/Implementations/CustomPropertyModel.m b/Examples/Tests/Models/Implementations/CustomPropertyModel.m similarity index 100% rename from examples/Tests/Models/Implementations/CustomPropertyModel.m rename to Examples/Tests/Models/Implementations/CustomPropertyModel.m diff --git a/examples/Tests/Models/Implementations/DrugModel.m b/Examples/Tests/Models/Implementations/DrugModel.m similarity index 100% rename from examples/Tests/Models/Implementations/DrugModel.m rename to Examples/Tests/Models/Implementations/DrugModel.m diff --git a/examples/Tests/Models/Implementations/EnumModel.m b/Examples/Tests/Models/Implementations/EnumModel.m similarity index 100% rename from examples/Tests/Models/Implementations/EnumModel.m rename to Examples/Tests/Models/Implementations/EnumModel.m diff --git a/examples/Tests/Models/Implementations/ExtremeNestingModel.m b/Examples/Tests/Models/Implementations/ExtremeNestingModel.m similarity index 100% rename from examples/Tests/Models/Implementations/ExtremeNestingModel.m rename to Examples/Tests/Models/Implementations/ExtremeNestingModel.m diff --git a/examples/Tests/Models/Implementations/GitHubKeyMapRepoModel.m b/Examples/Tests/Models/Implementations/GitHubKeyMapRepoModel.m similarity index 100% rename from examples/Tests/Models/Implementations/GitHubKeyMapRepoModel.m rename to Examples/Tests/Models/Implementations/GitHubKeyMapRepoModel.m diff --git a/examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m b/Examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m similarity index 100% rename from examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m rename to Examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m diff --git a/examples/Tests/Models/Implementations/GitHubRepoModel.m b/Examples/Tests/Models/Implementations/GitHubRepoModel.m similarity index 100% rename from examples/Tests/Models/Implementations/GitHubRepoModel.m rename to Examples/Tests/Models/Implementations/GitHubRepoModel.m diff --git a/examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m b/Examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m similarity index 100% rename from examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m rename to Examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m diff --git a/examples/Tests/Models/Implementations/ImageModel.m b/Examples/Tests/Models/Implementations/ImageModel.m similarity index 100% rename from examples/Tests/Models/Implementations/ImageModel.m rename to Examples/Tests/Models/Implementations/ImageModel.m diff --git a/examples/Tests/Models/Implementations/InteractionModel.m b/Examples/Tests/Models/Implementations/InteractionModel.m similarity index 100% rename from examples/Tests/Models/Implementations/InteractionModel.m rename to Examples/Tests/Models/Implementations/InteractionModel.m diff --git a/examples/Tests/Models/Implementations/JSONTypesModel.m b/Examples/Tests/Models/Implementations/JSONTypesModel.m similarity index 100% rename from examples/Tests/Models/Implementations/JSONTypesModel.m rename to Examples/Tests/Models/Implementations/JSONTypesModel.m diff --git a/examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m b/Examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m similarity index 100% rename from examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m rename to Examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m diff --git a/examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m b/Examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m similarity index 100% rename from examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m rename to Examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m diff --git a/examples/Tests/Models/Implementations/JSONValueTransformer+UIColor.m b/Examples/Tests/Models/Implementations/JSONValueTransformer+UIColor.m similarity index 100% rename from examples/Tests/Models/Implementations/JSONValueTransformer+UIColor.m rename to Examples/Tests/Models/Implementations/JSONValueTransformer+UIColor.m diff --git a/examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m b/Examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m similarity index 100% rename from examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m rename to Examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m diff --git a/examples/Tests/Models/Implementations/NestedModel.m b/Examples/Tests/Models/Implementations/NestedModel.m similarity index 100% rename from examples/Tests/Models/Implementations/NestedModel.m rename to Examples/Tests/Models/Implementations/NestedModel.m diff --git a/examples/Tests/Models/Implementations/OptionalPropModel.m b/Examples/Tests/Models/Implementations/OptionalPropModel.m similarity index 100% rename from examples/Tests/Models/Implementations/OptionalPropModel.m rename to Examples/Tests/Models/Implementations/OptionalPropModel.m diff --git a/examples/Tests/Models/Implementations/PostModel.m b/Examples/Tests/Models/Implementations/PostModel.m similarity index 100% rename from examples/Tests/Models/Implementations/PostModel.m rename to Examples/Tests/Models/Implementations/PostModel.m diff --git a/examples/Tests/Models/Implementations/PostsModel.m b/Examples/Tests/Models/Implementations/PostsModel.m similarity index 100% rename from examples/Tests/Models/Implementations/PostsModel.m rename to Examples/Tests/Models/Implementations/PostsModel.m diff --git a/examples/Tests/Models/Implementations/PrimitivesModel.m b/Examples/Tests/Models/Implementations/PrimitivesModel.m similarity index 100% rename from examples/Tests/Models/Implementations/PrimitivesModel.m rename to Examples/Tests/Models/Implementations/PrimitivesModel.m diff --git a/examples/Tests/Models/Implementations/RenamedPropertyModel.m b/Examples/Tests/Models/Implementations/RenamedPropertyModel.m similarity index 100% rename from examples/Tests/Models/Implementations/RenamedPropertyModel.m rename to Examples/Tests/Models/Implementations/RenamedPropertyModel.m diff --git a/examples/Tests/Models/Implementations/ReposModel.m b/Examples/Tests/Models/Implementations/ReposModel.m similarity index 100% rename from examples/Tests/Models/Implementations/ReposModel.m rename to Examples/Tests/Models/Implementations/ReposModel.m diff --git a/examples/Tests/Models/Implementations/RpcRequestModel.m b/Examples/Tests/Models/Implementations/RpcRequestModel.m similarity index 100% rename from examples/Tests/Models/Implementations/RpcRequestModel.m rename to Examples/Tests/Models/Implementations/RpcRequestModel.m diff --git a/examples/Tests/Models/Implementations/SpecialPropertyModel.m b/Examples/Tests/Models/Implementations/SpecialPropertyModel.m similarity index 100% rename from examples/Tests/Models/Implementations/SpecialPropertyModel.m rename to Examples/Tests/Models/Implementations/SpecialPropertyModel.m diff --git a/examples/Tests/NestedModelsTests.m b/Examples/Tests/NestedModelsTests.m similarity index 100% rename from examples/Tests/NestedModelsTests.m rename to Examples/Tests/NestedModelsTests.m diff --git a/examples/Tests/OptionalPropertiesTests.m b/Examples/Tests/OptionalPropertiesTests.m similarity index 100% rename from examples/Tests/OptionalPropertiesTests.m rename to Examples/Tests/OptionalPropertiesTests.m diff --git a/examples/Tests/PersistTests.m b/Examples/Tests/PersistTests.m similarity index 100% rename from examples/Tests/PersistTests.m rename to Examples/Tests/PersistTests.m diff --git a/examples/Tests/PrimitiveTypesReadTests.m b/Examples/Tests/PrimitiveTypesReadTests.m similarity index 100% rename from examples/Tests/PrimitiveTypesReadTests.m rename to Examples/Tests/PrimitiveTypesReadTests.m diff --git a/examples/Tests/SanityTests.m b/Examples/Tests/SanityTests.m similarity index 100% rename from examples/Tests/SanityTests.m rename to Examples/Tests/SanityTests.m diff --git a/examples/Tests/SimpleDataErrorTests.m b/Examples/Tests/SimpleDataErrorTests.m similarity index 100% rename from examples/Tests/SimpleDataErrorTests.m rename to Examples/Tests/SimpleDataErrorTests.m diff --git a/examples/Tests/SpecialPropertiesTests.m b/Examples/Tests/SpecialPropertiesTests.m similarity index 100% rename from examples/Tests/SpecialPropertiesTests.m rename to Examples/Tests/SpecialPropertiesTests.m diff --git a/examples/Tests/SpecialPropertyNameTests.m b/Examples/Tests/SpecialPropertyNameTests.m similarity index 100% rename from examples/Tests/SpecialPropertyNameTests.m rename to Examples/Tests/SpecialPropertyNameTests.m diff --git a/examples/Tests/SpecialValuesTests.m b/Examples/Tests/SpecialValuesTests.m similarity index 100% rename from examples/Tests/SpecialValuesTests.m rename to Examples/Tests/SpecialValuesTests.m diff --git a/examples/Tests/ValidationTests.m b/Examples/Tests/ValidationTests.m similarity index 100% rename from examples/Tests/ValidationTests.m rename to Examples/Tests/ValidationTests.m diff --git a/examples/iOS/AppDelegate.h b/Examples/iOS/AppDelegate.h similarity index 100% rename from examples/iOS/AppDelegate.h rename to Examples/iOS/AppDelegate.h diff --git a/examples/iOS/AppDelegate.m b/Examples/iOS/AppDelegate.m similarity index 100% rename from examples/iOS/AppDelegate.m rename to Examples/iOS/AppDelegate.m diff --git a/examples/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Examples/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/iOS/Base.lproj/LaunchScreen.storyboard b/Examples/iOS/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from examples/iOS/Base.lproj/LaunchScreen.storyboard rename to Examples/iOS/Base.lproj/LaunchScreen.storyboard diff --git a/examples/iOS/Base.lproj/Main.storyboard b/Examples/iOS/Base.lproj/Main.storyboard similarity index 100% rename from examples/iOS/Base.lproj/Main.storyboard rename to Examples/iOS/Base.lproj/Main.storyboard diff --git a/examples/iOS/Info.plist b/Examples/iOS/Info.plist similarity index 100% rename from examples/iOS/Info.plist rename to Examples/iOS/Info.plist diff --git a/examples/iOS/ViewController.h b/Examples/iOS/ViewController.h similarity index 100% rename from examples/iOS/ViewController.h rename to Examples/iOS/ViewController.h diff --git a/examples/iOS/ViewController.m b/Examples/iOS/ViewController.m similarity index 100% rename from examples/iOS/ViewController.m rename to Examples/iOS/ViewController.m diff --git a/examples/iOS/main.m b/Examples/iOS/main.m similarity index 100% rename from examples/iOS/main.m rename to Examples/iOS/main.m diff --git a/examples/macOS/AppDelegate.h b/Examples/macOS/AppDelegate.h similarity index 100% rename from examples/macOS/AppDelegate.h rename to Examples/macOS/AppDelegate.h diff --git a/examples/macOS/AppDelegate.m b/Examples/macOS/AppDelegate.m similarity index 100% rename from examples/macOS/AppDelegate.m rename to Examples/macOS/AppDelegate.m diff --git a/examples/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Examples/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/macOS/Base.lproj/Main.storyboard b/Examples/macOS/Base.lproj/Main.storyboard similarity index 100% rename from examples/macOS/Base.lproj/Main.storyboard rename to Examples/macOS/Base.lproj/Main.storyboard diff --git a/examples/macOS/Info.plist b/Examples/macOS/Info.plist similarity index 100% rename from examples/macOS/Info.plist rename to Examples/macOS/Info.plist diff --git a/examples/macOS/ViewController.h b/Examples/macOS/ViewController.h similarity index 100% rename from examples/macOS/ViewController.h rename to Examples/macOS/ViewController.h diff --git a/examples/macOS/ViewController.m b/Examples/macOS/ViewController.m similarity index 100% rename from examples/macOS/ViewController.m rename to Examples/macOS/ViewController.m diff --git a/examples/macOS/main.m b/Examples/macOS/main.m similarity index 100% rename from examples/macOS/main.m rename to Examples/macOS/main.m diff --git a/examples/tvOS/AppDelegate.h b/Examples/tvOS/AppDelegate.h similarity index 100% rename from examples/tvOS/AppDelegate.h rename to Examples/tvOS/AppDelegate.h diff --git a/examples/tvOS/AppDelegate.m b/Examples/tvOS/AppDelegate.m similarity index 100% rename from examples/tvOS/AppDelegate.m rename to Examples/tvOS/AppDelegate.m diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json diff --git a/examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json rename to Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json diff --git a/examples/tvOS/Assets.xcassets/Contents.json b/Examples/tvOS/Assets.xcassets/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/Contents.json rename to Examples/tvOS/Assets.xcassets/Contents.json diff --git a/examples/tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/Examples/tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json similarity index 100% rename from examples/tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json rename to Examples/tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json diff --git a/examples/tvOS/Base.lproj/Main.storyboard b/Examples/tvOS/Base.lproj/Main.storyboard similarity index 100% rename from examples/tvOS/Base.lproj/Main.storyboard rename to Examples/tvOS/Base.lproj/Main.storyboard diff --git a/examples/tvOS/Info.plist b/Examples/tvOS/Info.plist similarity index 100% rename from examples/tvOS/Info.plist rename to Examples/tvOS/Info.plist diff --git a/examples/tvOS/ViewController.h b/Examples/tvOS/ViewController.h similarity index 100% rename from examples/tvOS/ViewController.h rename to Examples/tvOS/ViewController.h diff --git a/examples/tvOS/ViewController.m b/Examples/tvOS/ViewController.m similarity index 100% rename from examples/tvOS/ViewController.m rename to Examples/tvOS/ViewController.m diff --git a/examples/tvOS/main.m b/Examples/tvOS/main.m similarity index 100% rename from examples/tvOS/main.m rename to Examples/tvOS/main.m diff --git a/examples/watchOS-extension/ExtensionDelegate.h b/Examples/watchOS-extension/ExtensionDelegate.h similarity index 100% rename from examples/watchOS-extension/ExtensionDelegate.h rename to Examples/watchOS-extension/ExtensionDelegate.h diff --git a/examples/watchOS-extension/ExtensionDelegate.m b/Examples/watchOS-extension/ExtensionDelegate.m similarity index 100% rename from examples/watchOS-extension/ExtensionDelegate.m rename to Examples/watchOS-extension/ExtensionDelegate.m diff --git a/examples/watchOS-extension/Info.plist b/Examples/watchOS-extension/Info.plist similarity index 100% rename from examples/watchOS-extension/Info.plist rename to Examples/watchOS-extension/Info.plist diff --git a/examples/watchOS-extension/InterfaceController.h b/Examples/watchOS-extension/InterfaceController.h similarity index 100% rename from examples/watchOS-extension/InterfaceController.h rename to Examples/watchOS-extension/InterfaceController.h diff --git a/examples/watchOS-extension/InterfaceController.m b/Examples/watchOS-extension/InterfaceController.m similarity index 100% rename from examples/watchOS-extension/InterfaceController.m rename to Examples/watchOS-extension/InterfaceController.m diff --git a/examples/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Examples/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/watchOS/Base.lproj/Interface.storyboard b/Examples/watchOS/Base.lproj/Interface.storyboard similarity index 100% rename from examples/watchOS/Base.lproj/Interface.storyboard rename to Examples/watchOS/Base.lproj/Interface.storyboard diff --git a/examples/watchOS/Info.plist b/Examples/watchOS/Info.plist similarity index 100% rename from examples/watchOS/Info.plist rename to Examples/watchOS/Info.plist diff --git a/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout b/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout deleted file mode 100644 index 1b5b23d5..00000000 --- a/JSONModel.xcodeproj/project.xcworkspace/xcshareddata/JSONModel.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 3B7742E4-67BB-4BEC-9806-1DAFD44187D5 - IDESourceControlProjectName - JSONModel - IDESourceControlProjectOriginsDictionary - - 2454A7C0A4BC2A09472718EB55354F320600B245 - github.com:JSONModel/JSONModel.git - - IDESourceControlProjectPath - JSONModel.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 2454A7C0A4BC2A09472718EB55354F320600B245 - ../.. - - IDESourceControlProjectURL - github.com:JSONModel/JSONModel.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 2454A7C0A4BC2A09472718EB55354F320600B245 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 2454A7C0A4BC2A09472718EB55354F320600B245 - IDESourceControlWCCName - JSONModel - - - - From a7d7cbe2c4c65740166fe268507bb893b49d1909 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 24 Jun 2016 11:10:44 +0100 Subject: [PATCH 097/171] Lowercase Github URL --- Examples/Tests/ArrayTests.m | 4 ++-- Examples/Tests/BuiltInConversionsTests.m | 4 ++-- Examples/Tests/KeyMappingTests.m | 4 ++-- Examples/Tests/SpecialValuesTests.m | 2 +- JSONModel.podspec | 2 +- .../JSONValueTransformer.m | 4 ++-- README.md | 16 ++++++++-------- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Examples/Tests/ArrayTests.m b/Examples/Tests/ArrayTests.m index ac85f1f1..fffbdc35 100644 --- a/Examples/Tests/ArrayTests.m +++ b/Examples/Tests/ArrayTests.m @@ -74,7 +74,7 @@ -(void)testFirstObject } /* - * https://github.com/JSONModel/JSONModel/pull/14 + * https://github.com/jsonmodel/jsonmodel/pull/14 */ -(void)testArrayReverseTransformGitHubIssue_14 { @@ -86,7 +86,7 @@ -(void)testArrayReverseTransformGitHubIssue_14 } /* - * https://github.com/JSONModel/JSONModel/issues/15 + * https://github.com/jsonmodel/jsonmodel/issues/15 */ -(void)testArrayReverseTransformGitHubIssue_15 { diff --git a/Examples/Tests/BuiltInConversionsTests.m b/Examples/Tests/BuiltInConversionsTests.m index dd2cc9ab..a3298ec7 100644 --- a/Examples/Tests/BuiltInConversionsTests.m +++ b/Examples/Tests/BuiltInConversionsTests.m @@ -67,11 +67,11 @@ -(void)testConversions XCTAssertTrue((long)[b.importantEvent timeIntervalSince1970] == 1353916801, @"importantEvent value was not read properly"); //test for a valid URL - //https://github.com/JSONModel/JSONModel/pull/60 + //https://github.com/jsonmodel/jsonmodel/pull/60 XCTAssertNotNil(b.websiteURL, @"URL parsing did return nil"); XCTAssertNotNil(b.websiteURL.query, @"key1=test"); - // see: https://github.com/JSONModel/JSONModel/pull/119 + // see: https://github.com/jsonmodel/jsonmodel/pull/119 XCTAssertEqualObjects(b.websiteURL.absoluteString, @"http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test&q=search%20terms"); XCTAssertNotNil(b.timeZone, @"Time zone parsing did return nil"); diff --git a/Examples/Tests/KeyMappingTests.m b/Examples/Tests/KeyMappingTests.m index c804839b..eb3bdb45 100644 --- a/Examples/Tests/KeyMappingTests.m +++ b/Examples/Tests/KeyMappingTests.m @@ -228,7 +228,7 @@ -(void)testGlobalKeyMapperImportAndExport [JSONModel setGlobalKeyMapper:nil]; } -//https://github.com/JSONModel/JSONModel/issues/132 +//https://github.com/jsonmodel/jsonmodel/issues/132 -(void)testAtNameProperty { AtNameModel* at = [[AtNameModel alloc] initWithString:@"{\"@type\":157}" error:nil]; @@ -261,7 +261,7 @@ -(void)testMergingData [JSONModel setGlobalKeyMapper:nil]; } -//https://github.com/JSONModel/JSONModel/issues/180 +//https://github.com/jsonmodel/jsonmodel/issues/180 -(void)testUsingBothGlobalAndCustomMappers { //input dictionary for TestModel diff --git a/Examples/Tests/SpecialValuesTests.m b/Examples/Tests/SpecialValuesTests.m index 2db6691b..cd4031f1 100644 --- a/Examples/Tests/SpecialValuesTests.m +++ b/Examples/Tests/SpecialValuesTests.m @@ -38,7 +38,7 @@ - (void)setUp { XCTAssertNotNil(_model, @"Could not load the test data file."); } -// tests: https://github.com/JSONModel/JSONModel/issues/460 +// tests: https://github.com/jsonmodel/jsonmodel/issues/460 - (void)testExample { XCTAssertTrue([_model.name isEqualToString:@"FIRST_SECOND"]); } diff --git a/JSONModel.podspec b/JSONModel.podspec index ca5a8331..21de82f5 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { "Marin Todorov" => "touch-code-magazine@underplot.com" } - s.source = { :git => "https://github.com/JSONModel/JSONModel.git", :tag => "1.2.0" } + s.source = { :git => "https://github.com/jsonmodel/jsonmodel.git", :tag => "1.2.0" } s.ios.deployment_target = '6.0' s.osx.deployment_target = '10.7' diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 699eb829..fc3256a5 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -183,7 +183,7 @@ -(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number -(NSURL*)NSURLFromNSString:(NSString*)string { // do not change this behavior - there are other ways of overriding it - // see: https://github.com/JSONModel/JSONModel/pull/119 + // see: https://github.com/jsonmodel/jsonmodel/pull/119 return [NSURL URLWithString:string]; } @@ -240,7 +240,7 @@ - (id)JSONObjectFromNSTimeZone:(NSTimeZone *)timeZone { } #pragma mark - hidden transform for empty dictionaries -//https://github.com/JSONModel/JSONModel/issues/163 +//https://github.com/jsonmodel/jsonmodel/issues/163 -(NSDictionary*)__NSDictionaryFromNSArray:(NSArray*)array { if (array.count==0) return @{}; diff --git a/README.md b/README.md index 32e8c293..bab3f81b 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Adding JSONModel to your project #### Get it as: 1) source files -1. Download the JSONModel repository as a [zip file](https://github.com/JSONModel/JSONModel/archive/master.zip) or clone it +1. Download the JSONModel repository as a [zip file](https://github.com/jsonmodel/jsonmodel/archive/master.zip) or clone it 2. Copy the JSONModel sub-folder into your Xcode project 3. Link your app to SystemConfiguration.framework @@ -51,12 +51,12 @@ If you want to read more about CocoaPods, have a look at [this short tutorial](h In your project's **Cartfile** add the JSONModel: ```ruby -github "JSONModel/JSONModel" +github "jsonmodel/jsonmodel" ``` #### Docs -You can find the generated docs online at: [http://cocoadocs.org/docsets/JSONModel/](http://cocoadocs.org/docsets/JSONModel/) +You can find the generated docs online at: [http://cocoadocs.org/docsets/JSONModel](http://cocoadocs.org/docsets/JSONModel) ------------------------------------ Basic usage @@ -64,7 +64,7 @@ Basic usage Consider you have a JSON like this: ```javascript -{"id":"10", "country":"Germany", "dialCode": 49, "isInEurope":true} +{ "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. @@ -496,12 +496,12 @@ NSString* string = [pm toJSONString]; - (BOOL)validate:(NSError *__autoreleasing *)error { BOOL valid = [super validate:error]; - + if (self.name.length < self.minNameLength.integerValue) { *error = [NSError errorWithDomain:@"me.mycompany.com" code:1 userInfo:nil]; valid = NO; } - + return valid; } @@ -521,9 +521,9 @@ Misc Author: [Marin Todorov](http://www.touch-code-magazine.com) Contributors: Christian Hoffmann, Mark Joslin, Julien Vignali, Symvaro GmbH, BB9z. -Also everyone who did successful [pull requests](https://github.com/JSONModel/JSONModel/graphs/contributors). +Also everyone who did successful [pull requests](https://github.com/jsonmodel/jsonmodel/graphs/contributors). -Change log : [https://github.com/JSONModel/JSONModel/blob/master/Changelog.md](https://github.com/JSONModel/JSONModel/blob/master/Changelog.md) +Change log : [https://github.com/jsonmodel/jsonmodel/blob/master/Changelog.md](https://github.com/jsonmodel/jsonmodel/blob/master/Changelog.md) Utility to generate JSONModel classes from JSON data: https://github.com/dofork/json2object From 8886ae463ad1874d5858c9b383c36cdc5f645de3 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 24 Jun 2016 11:15:48 +0100 Subject: [PATCH 098/171] Consistent spacing Tabs represented with four spaces --- JSONModel/JSONModel/JSONModel.m | 426 +++++++++--------- JSONModel/JSONModel/JSONModelClassProperty.m | 8 +- JSONModel/JSONModel/JSONModelError.m | 4 +- JSONModel/JSONModelNetworking/JSONAPI.m | 12 +- .../JSONModelNetworking/JSONHTTPClient.m | 34 +- .../JSONModel+networking.m | 84 ++-- .../JSONModelTransformations/JSONKeyMapper.m | 44 +- .../JSONValueTransformer.m | 12 +- 8 files changed, 312 insertions(+), 312 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 81d195a7..ded0139a 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -55,13 +55,13 @@ +(void)load dispatch_once(&once, ^{ // initialize all class static objects, // which are common for ALL JSONModel subclasses - - @autoreleasepool { + + @autoreleasepool { allowedJSONTypes = @[ [NSString class], [NSNumber class], [NSDecimalNumber class], [NSArray class], [NSDictionary class], [NSNull class], //immutable JSON classes [NSMutableString class], [NSMutableArray class], [NSMutableDictionary class] //mutable JSON classes ]; - + allowedPrimitiveTypes = @[ @"BOOL", @"float", @"int", @"long", @"double", @"short", //and some famous aliases @@ -70,15 +70,15 @@ +(void)load ]; valueTransformer = [[JSONValueTransformer alloc] init]; - + // This is quite strange, but I found the test isSubclassOfClass: (line ~291) to fail if using [JSONModel class]. // somewhat related: https://stackoverflow.com/questions/6524165/nsclassfromstring-vs-classnamednsstring // //; seems to break the unit tests - + // Using NSClassFromString instead of [JSONModel class], as this was breaking unit tests, see below //http://stackoverflow.com/questions/21394919/xcode-5-unit-test-seeing-wrong-class JSONModelClass = NSClassFromString(NSStringFromClass(self)); - } + } }); } @@ -123,12 +123,12 @@ -(instancetype)initWithData:(NSData *)data error:(NSError *__autoreleasing *)err id obj = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&initError]; - + if (initError) { if (err) *err = [JSONModelError errorBadJSON]; return nil; } - + //init with dictionary id objModel = [self initWithDictionary:obj error:&initError]; if (initError && err) *err = initError; @@ -150,7 +150,7 @@ -(id)initWithString:(NSString *)string usingEncoding:(NSStringEncoding)encoding if (err) *err = [JSONModelError errorInputIsNil]; return nil; } - + JSONModelError* initError = nil; id objModel = [self initWithData:[string dataUsingEncoding:encoding] error:&initError]; if (initError && err) *err = initError; @@ -175,27 +175,27 @@ -(id)initWithDictionary:(NSDictionary*)dict error:(NSError**)err //create a class instance self = [self init]; if (!self) { - + //super init didn't succeed if (err) *err = [JSONModelError errorModelIsInvalid]; return nil; } - + //check incoming data structure if (![self __doesDictionary:dict matchModelWithKeyMapper:self.__keyMapper error:err]) { return nil; } - + //import the data from a dictionary if (![self __importDictionary:dict withKeyMapper:self.__keyMapper validation:YES error:err]) { return nil; } - + //run any custom model validation if (![self validate:err]) { return nil; } - + //model is valid! yay! return self; } @@ -212,18 +212,18 @@ -(BOOL)__doesDictionary:(NSDictionary*)dict matchModelWithKeyMapper:(JSONKeyMapp NSArray* incomingKeysArray = [dict allKeys]; NSMutableSet* requiredProperties = [self __requiredPropertyNames].mutableCopy; NSSet* incomingKeys = [NSSet setWithArray: incomingKeysArray]; - + //transform the key names, if necessary if (keyMapper || globalKeyMapper) { - + NSMutableSet* transformedIncomingKeys = [NSMutableSet setWithCapacity: requiredProperties.count]; NSString* transformedName = nil; - + //loop over the required properties list for (JSONModelClassProperty* property in [self __properties__]) { - + transformedName = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper] : property.name; - + //check if exists and if so, add to incoming keys id value; @try { @@ -232,33 +232,33 @@ -(BOOL)__doesDictionary:(NSDictionary*)dict matchModelWithKeyMapper:(JSONKeyMapp @catch (NSException *exception) { value = dict[transformedName]; } - + if (value) { [transformedIncomingKeys addObject: property.name]; } } - + //overwrite the raw incoming list with the mapped key names incomingKeys = transformedIncomingKeys; } - + //check for missing input keys if (![requiredProperties isSubsetOfSet:incomingKeys]) { - + //get a list of the missing properties [requiredProperties minusSet:incomingKeys]; - + //not all required properties are in - invalid input JMLog(@"Incoming data was invalid [%@ initWithDictionary:]. Keys missing: %@", self.class, requiredProperties); - + if (err) *err = [JSONModelError errorInvalidDataWithMissingKeys:requiredProperties]; return NO; } - + //not needed anymore incomingKeys= nil; requiredProperties= nil; - + return YES; } @@ -275,7 +275,7 @@ -(NSString*)__mapString:(NSString*)string withKeyMapper:(JSONKeyMapper*)keyMappe //global keymapper string = [globalKeyMapper convertValue:string]; } - + return string; } @@ -283,11 +283,11 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM { //loop over the incoming keys and set self's properties for (JSONModelClassProperty* property in [self __properties__]) { - + //convert key name to model keys, if a mapper is provided NSString* jsonKeyPath = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper] : property.name; //JMLog(@"keyPath: %@", jsonKeyPath); - + //general check for data type compliance id jsonValue; @try { @@ -296,12 +296,12 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM @catch (NSException *exception) { jsonValue = dict[jsonKeyPath]; } - + //check for Optional properties if (isNull(jsonValue)) { //skip this property, continue with next property if (property.isOptional || !validation) continue; - + if (err) { //null value for required property NSString* msg = [NSString stringWithFormat:@"Value of required model key %@ is null", property.name]; @@ -310,51 +310,51 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM } return NO; } - + Class jsonValueClass = [jsonValue class]; BOOL isValueOfAllowedType = NO; - + for (Class allowedType in allowedJSONTypes) { if ( [jsonValueClass isSubclassOfClass: allowedType] ) { isValueOfAllowedType = YES; break; } } - + if (isValueOfAllowedType==NO) { //type not allowed JMLog(@"Type %@ is not allowed in JSON.", NSStringFromClass(jsonValueClass)); - + if (err) { - NSString* msg = [NSString stringWithFormat:@"Type %@ is not allowed in JSON.", NSStringFromClass(jsonValueClass)]; - JSONModelError* dataErr = [JSONModelError errorInvalidDataWithMessage:msg]; - *err = [dataErr errorByPrependingKeyPathComponent:property.name]; - } + NSString* msg = [NSString stringWithFormat:@"Type %@ is not allowed in JSON.", NSStringFromClass(jsonValueClass)]; + JSONModelError* dataErr = [JSONModelError errorInvalidDataWithMessage:msg]; + *err = [dataErr errorByPrependingKeyPathComponent:property.name]; + } return NO; } - + //check if there's matching property in the model if (property) { - + // check for custom setter, than the model doesn't need to do any guessing // how to read the property's value from JSON if ([self __customSetValue:jsonValue forProperty:property]) { //skip to next JSON key continue; }; - + // 0) handle primitives if (property.type == nil && property.structName==nil) { - + //generic setter if (jsonValue != [self valueForKey:property.name]) { [self setValue:jsonValue forKey: property.name]; } - + //skip directly to the next key continue; } - + // 0.5) handle nils if (isNull(jsonValue)) { if ([self valueForKey:property.name] != nil) { @@ -362,66 +362,66 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM } continue; } - - + + // 1) check if property is itself a JSONModel if ([self __isJSONModelSubClass:property.type]) { - + //initialize the property's model, store it JSONModelError* initErr = nil; id value = [[property.type alloc] initWithDictionary: jsonValue error:&initErr]; - + if (!value) { //skip this property, continue with next property if (property.isOptional || !validation) continue; - - // Propagate the error, including the property name as the key-path component - if((err != nil) && (initErr != nil)) - { - *err = [initErr errorByPrependingKeyPathComponent:property.name]; - } + + // Propagate the error, including the property name as the key-path component + if((err != nil) && (initErr != nil)) + { + *err = [initErr errorByPrependingKeyPathComponent:property.name]; + } return NO; } if (![value isEqual:[self valueForKey:property.name]]) { [self setValue:value forKey: property.name]; } - + //for clarity, does the same without continue continue; - + } else { - + // 2) check if there's a protocol to the property // ) might or not be the case there's a built in transform for it if (property.protocol) { - + //JMLog(@"proto: %@", p.protocol); jsonValue = [self __transform:jsonValue forProperty:property error:err]; if (!jsonValue) { if ((err != nil) && (*err == nil)) { - NSString* msg = [NSString stringWithFormat:@"Failed to transform value, but no error was set during transformation. (%@)", property]; - JSONModelError* dataErr = [JSONModelError errorInvalidDataWithMessage:msg]; - *err = [dataErr errorByPrependingKeyPathComponent:property.name]; - } + NSString* msg = [NSString stringWithFormat:@"Failed to transform value, but no error was set during transformation. (%@)", property]; + JSONModelError* dataErr = [JSONModelError errorInvalidDataWithMessage:msg]; + *err = [dataErr errorByPrependingKeyPathComponent:property.name]; + } return NO; } } - + // 3.1) handle matching standard JSON types if (property.isStandardJSONType && [jsonValue isKindOfClass: property.type]) { - + //mutable properties if (property.isMutable) { jsonValue = [jsonValue mutableCopy]; } - + //set the property value if (![jsonValue isEqual:[self valueForKey:property.name]]) { [self setValue:jsonValue forKey: property.name]; } continue; } - + // 3.3) handle values to transform if ( (![jsonValue isKindOfClass:property.type] && !isNull(jsonValue)) @@ -432,19 +432,19 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM //custom struct property property.structName ) { - + // searched around the web how to do this better // but did not find any solution, maybe that's the best idea? (hardly) Class sourceClass = [JSONValueTransformer classByResolvingClusterClasses:[jsonValue class]]; - + //JMLog(@"to type: [%@] from type: [%@] transformer: [%@]", p.type, sourceClass, selectorName); - + //build a method selector for the property and json object classes NSString* selectorName = [NSString stringWithFormat:@"%@From%@:", (property.structName? property.structName : property.type), //target name sourceClass]; //source name SEL selector = NSSelectorFromString(selectorName); - + //check for custom transformer BOOL foundCustomTransformer = NO; if ([valueTransformer respondsToSelector:selector]) { @@ -457,23 +457,23 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM foundCustomTransformer = YES; } } - + //check if there's a transformer with that name if (foundCustomTransformer) { - + //it's OK, believe me... #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks" //transform the value jsonValue = [valueTransformer performSelector:selector withObject:jsonValue]; #pragma clang diagnostic pop - + if (![jsonValue isEqual:[self valueForKey:property.name]]) { [self setValue:jsonValue forKey: property.name]; } - + } 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 mistake -> exception @throw [NSException exceptionWithName:@"Type not allowed" @@ -481,7 +481,7 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM userInfo:nil]; return NO; } - + } else { // 3.4) handle "all other" cases (if any) if (![jsonValue isEqual:[self valueForKey:property.name]]) { @@ -491,7 +491,7 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM } } } - + return YES; } @@ -512,13 +512,13 @@ -(NSMutableSet*)__requiredPropertyNames { //fetch the associated property names NSMutableSet* classRequiredPropertyNames = objc_getAssociatedObject(self.class, &kClassRequiredPropertyNamesKey); - + if (!classRequiredPropertyNames) { classRequiredPropertyNames = [NSMutableSet set]; [[self __properties__] enumerateObjectsUsingBlock:^(JSONModelClassProperty* p, NSUInteger idx, BOOL *stop) { if (!p.isOptional) [classRequiredPropertyNames addObject:p.name]; }]; - + //persist the list objc_setAssociatedObject( self.class, @@ -539,7 +539,7 @@ -(NSArray*)__properties__ //if here, the class needs to inspect itself [self __setup__]; - + //return the property list classProperties = objc_getAssociatedObject(self.class, &kClassPropertiesKey); return [classProperties allValues]; @@ -549,21 +549,21 @@ -(NSArray*)__properties__ -(void)__inspectProperties { //JMLog(@"Inspect class: %@", [self class]); - + NSMutableDictionary* propertyIndex = [NSMutableDictionary dictionary]; - + //temp variables for the loops Class class = [self class]; NSScanner* scanner = nil; NSString* propertyType = nil; - + // inspect inherited properties up to the JSONModel class while (class != [JSONModel class]) { //JMLog(@"inspecting: %@", NSStringFromClass(class)); - + unsigned int propertyCount; objc_property_t *properties = class_copyPropertyList(class, &propertyCount); - + //loop over the class properties for (unsigned int i = 0; i < propertyCount; i++) { @@ -573,49 +573,49 @@ -(void)__inspectProperties objc_property_t property = properties[i]; const char *propertyName = property_getName(property); p.name = @(propertyName); - + //JMLog(@"property: %@", p.name); - + //get property attributes const char *attrs = property_getAttributes(property); NSString* propertyAttributes = @(attrs); NSArray* attributeItems = [propertyAttributes componentsSeparatedByString:@","]; - + //ignore read-only properties if ([attributeItems containsObject:@"R"]) { continue; //to next property } - + //check for 64b BOOLs if ([propertyAttributes hasPrefix:@"Tc,"]) { //mask BOOLs as structs so they can have custom converters p.structName = @"BOOL"; } - + scanner = [NSScanner scannerWithString: propertyAttributes]; - + //JMLog(@"attr: %@", [NSString stringWithCString:attrs encoding:NSUTF8StringEncoding]); [scanner scanUpToString:@"T" intoString: nil]; [scanner scanString:@"T" intoString:nil]; - + //check if the property is an instance of a class if ([scanner scanString:@"@\"" intoString: &propertyType]) { - + [scanner scanUpToCharactersFromSet:[NSCharacterSet characterSetWithCharactersInString:@"\"<"] intoString:&propertyType]; - + //JMLog(@"type: %@", propertyClassName); p.type = NSClassFromString(propertyType); p.isMutable = ([propertyType rangeOfString:@"Mutable"].location != NSNotFound); p.isStandardJSONType = [allowedJSONTypes containsObject:p.type]; - + //read through the property protocols while ([scanner scanString:@"<" intoString:NULL]) { - + NSString* protocolName = nil; - + [scanner scanUpToString:@">" intoString: &protocolName]; - + if ([protocolName isEqualToString:@"Optional"]) { p.isOptional = YES; } else if([protocolName isEqualToString:@"Index"]) { @@ -635,7 +635,7 @@ -(void)__inspectProperties } else { p.protocol = protocolName; } - + [scanner scanString:@">" intoString:NULL]; } @@ -644,7 +644,7 @@ -(void)__inspectProperties else if ([scanner scanString:@"{" intoString: &propertyType]) { [scanner scanCharactersFromSet:[NSCharacterSet alphanumericCharacterSet] intoString:&propertyType]; - + p.isStandardJSONType = NO; p.structName = propertyType; @@ -655,12 +655,12 @@ -(void)__inspectProperties //the property contains a primitive data type [scanner scanUpToCharactersFromSet:[NSCharacterSet characterSetWithCharactersInString:@","] intoString:&propertyType]; - + //get the full name of the primitive type propertyType = valueTransformer.primitivesNames[propertyType]; - + if (![allowedPrimitiveTypes containsObject:propertyType]) { - + //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] @@ -673,7 +673,7 @@ -(void)__inspectProperties if([[self class] propertyIsOptional:nsPropertyName]){ p.isOptional = YES; } - + if([[self class] propertyIsIgnored:nsPropertyName]){ p = nil; } @@ -682,25 +682,25 @@ -(void)__inspectProperties if (customClass) { p.protocol = NSStringFromClass(customClass); } - + //few cases where JSONModel will ignore properties automatically if ([propertyType isEqualToString:@"Block"]) { p = nil; } - + //add the property object to the temp index if (p && ![propertyIndex objectForKey:p.name]) { [propertyIndex setValue:p forKey:p.name]; } } - + free(properties); - + //ascend to the super of the class //(will do that until it reaches the root class - JSONModel) class = [class superclass]; } - + //finally store the property index in the static property index objc_setAssociatedObject( self.class, @@ -726,24 +726,24 @@ -(id)__transform:(id)value forProperty:(JSONModelClassProperty*)property error:( } return value; } - + //if the protocol is actually a JSONModel class if ([self __isJSONModelSubClass:protocolClass]) { //check if it's a list of models if ([property.type isSubclassOfClass:[NSArray class]]) { - // Expecting an array, make sure 'value' is an array - if(![[value class] isSubclassOfClass:[NSArray class]]) - { - if(err != nil) - { - NSString* mismatch = [NSString stringWithFormat:@"Property '%@' is declared as NSArray<%@>* but the corresponding JSON value is not a JSON Array.", property.name, property.protocol]; - JSONModelError* typeErr = [JSONModelError errorInvalidDataWithTypeMismatch:mismatch]; - *err = [typeErr errorByPrependingKeyPathComponent:property.name]; - } - return nil; - } + // Expecting an array, make sure 'value' is an array + if(![[value class] isSubclassOfClass:[NSArray class]]) + { + if(err != nil) + { + NSString* mismatch = [NSString stringWithFormat:@"Property '%@' is declared as NSArray<%@>* but the corresponding JSON value is not a JSON Array.", property.name, property.protocol]; + JSONModelError* typeErr = [JSONModelError errorInvalidDataWithTypeMismatch:mismatch]; + *err = [typeErr errorByPrependingKeyPathComponent:property.name]; + } + return nil; + } //one shot conversion JSONModelError* arrayErr = nil; @@ -754,35 +754,35 @@ -(id)__transform:(id)value forProperty:(JSONModelClassProperty*)property error:( return nil; } } - + //check if it's a dictionary of models if ([property.type isSubclassOfClass:[NSDictionary class]]) { - // Expecting a dictionary, make sure 'value' is a dictionary - if(![[value class] isSubclassOfClass:[NSDictionary class]]) - { - if(err != nil) - { - NSString* mismatch = [NSString stringWithFormat:@"Property '%@' is declared as NSDictionary<%@>* but the corresponding JSON value is not a JSON Object.", property.name, property.protocol]; - JSONModelError* typeErr = [JSONModelError errorInvalidDataWithTypeMismatch:mismatch]; - *err = [typeErr errorByPrependingKeyPathComponent:property.name]; - } - return nil; - } + // Expecting a dictionary, make sure 'value' is a dictionary + if(![[value class] isSubclassOfClass:[NSDictionary class]]) + { + if(err != nil) + { + NSString* mismatch = [NSString stringWithFormat:@"Property '%@' is declared as NSDictionary<%@>* but the corresponding JSON value is not a JSON Object.", property.name, property.protocol]; + JSONModelError* typeErr = [JSONModelError errorInvalidDataWithTypeMismatch:mismatch]; + *err = [typeErr errorByPrependingKeyPathComponent:property.name]; + } + return nil; + } NSMutableDictionary* res = [NSMutableDictionary dictionary]; for (NSString* key in [value allKeys]) { - JSONModelError* initErr = nil; + JSONModelError* initErr = nil; id obj = [[[protocolClass class] alloc] initWithDictionary:value[key] error:&initErr]; - if (obj == nil) - { - // Propagate the error, including the property name as the key-path component - if((err != nil) && (initErr != nil)) - { - initErr = [initErr errorByPrependingKeyPathComponent:key]; - *err = [initErr errorByPrependingKeyPathComponent:property.name]; - } + if (obj == nil) + { + // Propagate the error, including the property name as the key-path component + if((err != nil) && (initErr != nil)) + { + initErr = [initErr errorByPrependingKeyPathComponent:key]; + *err = [initErr errorByPrependingKeyPathComponent:property.name]; + } return nil; } [res setValue:obj forKey:key]; @@ -799,7 +799,7 @@ -(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property { Class protocolClass = NSClassFromString(property.protocol); if (!protocolClass) return value; - + //if the protocol is actually a JSONModel class if ([self __isJSONModelSubClass:protocolClass]) { @@ -814,7 +814,7 @@ -(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property } return [tempArray copy]; } - + //check if should export dictionary of dictionaries if (property.type == [NSDictionary class] || property.type == [NSMutableDictionary class]) { NSMutableDictionary* res = [NSMutableDictionary dictionary]; @@ -825,7 +825,7 @@ -(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property return [NSDictionary dictionaryWithDictionary:res]; } } - + return value; } @@ -844,17 +844,17 @@ -(BOOL)__customSetValue:(id)value forProperty:(JSONModelClassProperty* 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.customSetters[className] = [NSNull null]; return NO; } - + //cache the custom setter selector property.customSetters[className] = selectorName; } - + if (property.customSetters[className] != [NSNull null]) { //call the custom setter //https://github.com/steipete @@ -862,7 +862,7 @@ -(BOOL)__customSetValue:(id)value forProperty:(JSONModelClassProperty* ((void (*) (id, SEL, id))objc_msgSend)(self, selector, value); return YES; } - + return NO; } @@ -873,18 +873,18 @@ -(BOOL)__customGetValue:(id*)value forProperty:(JSONModelClassProperty NSString* ucfirstName = [property.name stringByReplacingCharactersInRange: NSMakeRange(0,1) withString: [[property.name substringToIndex:1] uppercaseString]]; NSString* selectorName = [NSString stringWithFormat:@"JSONObjectFor%@", ucfirstName]; - + SEL customPropertyGetter = NSSelectorFromString(selectorName); if (![self respondsToSelector: customPropertyGetter]) { property.getterType = kNo; return NO; } - + property.getterType = kCustom; property.customGetter = customPropertyGetter; } - + if (property.getterType==kCustom) { //call the custom getter #pragma clang diagnostic push @@ -893,7 +893,7 @@ -(BOOL)__customGetValue:(id*)value forProperty:(JSONModelClassProperty #pragma clang diagnostic pop return YES; } - + return NO; } @@ -903,7 +903,7 @@ -(void)__createDictionariesForKeyPath:(NSString*)keyPath inDictionary:(NSMutable //find if there's a dot left in the keyPath NSUInteger dotLocation = [keyPath rangeOfString:@"."].location; if (dotLocation==NSNotFound) return; - + //inspect next level NSString* nextHierarchyLevelKeyName = [keyPath substringToIndex: dotLocation]; NSDictionary* nextLevelDictionary = (*dict)[nextHierarchyLevelKeyName]; @@ -912,11 +912,11 @@ -(void)__createDictionariesForKeyPath:(NSString*)keyPath inDictionary:(NSMutable //create non-existing next level here nextLevelDictionary = [NSMutableDictionary dictionary]; } - + //recurse levels [self __createDictionariesForKeyPath:[keyPath substringFromIndex: dotLocation+1] inDictionary:&nextLevelDictionary ]; - + //create the hierarchy level [*dict setValue:nextLevelDictionary forKeyPath: nextHierarchyLevelKeyName]; } @@ -933,7 +933,7 @@ -(NSString*)toJSONString -(NSData*)toJSONData { - return [self toJSONDataWithKeys:nil]; + return [self toJSONDataWithKeys:nil]; } //exports the model as a dictionary of JSON compliant objects @@ -950,29 +950,29 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames //skip if unwanted if (propertyNames != nil && ![propertyNames containsObject:p.name]) continue; - + //fetch key and value NSString* keyPath = (self.__keyMapper||globalKeyMapper) ? [self __mapString:p.name withKeyMapper:self.__keyMapper] : p.name; value = [self valueForKey: p.name]; - + //JMLog(@"toDictionary[%@]->[%@] = '%@'", p.name, keyPath, value); if ([keyPath rangeOfString:@"."].location != NSNotFound) { //there are sub-keys, introduce dictionaries for them [self __createDictionariesForKeyPath:keyPath inDictionary:&tempDictionary]; } - + //check for custom getter if ([self __customGetValue:&value forProperty:p]) { //custom getter, all done [tempDictionary setValue:value forKeyPath:keyPath]; continue; } - + //export nil when they are not optional values as JSON null, so that the structure of the exported data //is still valid if it's to be imported as a model again if (isNull(value)) { - + if (p.isOptional) { [tempDictionary removeObjectForKey:keyPath]; @@ -983,40 +983,40 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames } continue; } - + //check if the property is another model if ([value isKindOfClass:JSONModelClass]) { //recurse models value = [(JSONModel*)value toDictionary]; [tempDictionary setValue:value forKeyPath: keyPath]; - + //for clarity continue; - + } else { - + // 1) check for built-in transformation if (p.protocol) { value = [self __reverseTransform:value forProperty:p]; } - + // 2) check for standard types OR 2.1) primitives if (p.structName==nil && (p.isStandardJSONType || p.type==nil)) { //generic get value [tempDictionary setValue:value forKeyPath: keyPath]; - + continue; } - + // 3) try to apply a value transformer if (YES) { - + //create selector from the property's class name NSString* selectorName = [NSString stringWithFormat:@"%@From%@:", @"JSONObject", p.type?p.type:p.structName]; SEL selector = NSSelectorFromString(selectorName); - + BOOL foundCustomTransformer = NO; if ([valueTransformer respondsToSelector:selector]) { foundCustomTransformer = YES; @@ -1028,18 +1028,18 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames foundCustomTransformer = YES; } } - + //check if there's a transformer declared if (foundCustomTransformer) { - + //it's OK, believe me... #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks" value = [valueTransformer performSelector:selector withObject:value]; #pragma clang diagnostic pop - + [tempDictionary setValue:value forKeyPath: keyPath]; - + } else { //in this case most probably a custom property was defined in a model @@ -1052,48 +1052,48 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames } } } - + return [tempDictionary copy]; } //exports model to a dictionary and then to a JSON string -(NSData*)toJSONDataWithKeys:(NSArray*)propertyNames { - NSData* jsonData = nil; - NSError* jsonError = nil; - - @try { - NSDictionary* dict = [self toDictionaryWithKeys:propertyNames]; - jsonData = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&jsonError]; - } - @catch (NSException *exception) { - //this should not happen in properly design JSONModel - //usually means there was no reverse transformer for a custom property - JMLog(@"EXCEPTION: %@", exception.description); - return nil; - } - - return jsonData; + NSData* jsonData = nil; + NSError* jsonError = nil; + + @try { + NSDictionary* dict = [self toDictionaryWithKeys:propertyNames]; + jsonData = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&jsonError]; + } + @catch (NSException *exception) { + //this should not happen in properly design JSONModel + //usually means there was no reverse transformer for a custom property + JMLog(@"EXCEPTION: %@", exception.description); + return nil; + } + + return jsonData; } -(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames { return [[NSString alloc] initWithData: [self toJSONDataWithKeys: propertyNames] - encoding: NSUTF8StringEncoding]; + encoding: NSUTF8StringEncoding]; } #pragma mark - import/export of lists //loop over an NSArray of JSON objects and turn them into models +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array { - return [self arrayOfModelsFromDictionaries:array error:nil]; + return [self arrayOfModelsFromDictionaries:array error:nil]; } + (NSMutableArray *)arrayOfModelsFromData:(NSData *)data error:(NSError **)err { id json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:err]; if (!json || ![json isKindOfClass:[NSArray class]]) return nil; - + return [self arrayOfModelsFromDictionaries:json error:err]; } @@ -1115,14 +1115,14 @@ +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array error:(NSError** { if ([d isKindOfClass:NSDictionary.class]) { - JSONModelError* initErr = nil; + JSONModelError* initErr = nil; id obj = [[self alloc] initWithDictionary:d error:&initErr]; if (obj == nil) { // Propagate the error, including the array index as the key-path component - if((err != nil) && (initErr != nil)) + if((err != nil) && (initErr != nil)) { - NSString* path = [NSString stringWithFormat:@"[%lu]", (unsigned long)list.count]; + NSString* path = [NSString stringWithFormat:@"[%lu]", (unsigned long)list.count]; *err = [initErr errorByPrependingKeyPathComponent:path]; } return nil; @@ -1193,12 +1193,12 @@ +(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array //convert to dictionaries NSMutableArray* list = [NSMutableArray arrayWithCapacity: [array count]]; - + for (id object in array) { - + id obj = [object toDictionary]; if (!obj) return nil; - + [list addObject: obj]; } return list; @@ -1209,15 +1209,15 @@ +(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array propertyNamesToE { //bail early if (isNull(array)) return nil; - + //convert to dictionaries NSMutableArray* list = [NSMutableArray arrayWithCapacity: [array count]]; - + for (id object in array) { - + id obj = [object toDictionaryWithKeys:propertyNamesToExport]; if (!obj) return nil; - + [list addObject: obj]; } return list; @@ -1254,13 +1254,13 @@ -(BOOL)isEqual:(id)object { //bail early if different classes if (![object isMemberOfClass:[self class]]) return NO; - + if (self.indexPropertyName) { //there's a defined ID property id objectId = [object valueForKey: self.indexPropertyName]; return [[self valueForKey: self.indexPropertyName] isEqual:objectId]; } - + //default isEqual implementation return [super isEqual:object]; } @@ -1307,12 +1307,12 @@ -(BOOL)validate:(NSError**)error -(NSString*)description { NSMutableString* text = [NSMutableString stringWithFormat:@"<%@> \n", [self class]]; - + for (JSONModelClassProperty *p in [self __properties__]) { - + id value = ([p.name isEqualToString:@"description"])?self->_description:[self valueForKey:p.name]; NSString* valueDescription = (value)?[value description]:@""; - + if (p.isStandardJSONType && ![value respondsToSelector:@selector(count)] && [valueDescription length]>60) { //cap description for longer values @@ -1321,7 +1321,7 @@ -(NSString*)description valueDescription = [valueDescription stringByReplacingOccurrencesOfString:@"\n" withString:@"\n "]; [text appendFormat:@" [%@]: %@\n", p.name, valueDescription]; } - + [text appendFormat:@"", [self class]]; return text; } @@ -1387,7 +1387,7 @@ -(instancetype)copyWithZone:(NSZone *)zone -(instancetype)initWithCoder:(NSCoder *)decoder { NSString* json = [decoder decodeObjectForKey:@"json"]; - + JSONModelError *error = nil; self = [self initWithString:json error:&error]; if (error) { diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index bc543e9e..45856056 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -22,12 +22,12 @@ -(NSString*)description { //build the properties string for the current class property NSMutableArray* properties = [NSMutableArray arrayWithCapacity:8]; - + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" if (self.isIndex) [properties addObject:@"Index"]; #pragma GCC diagnostic pop - + if (self.isOptional) [properties addObject:@"Optional"]; if (self.isMutable) [properties addObject:@"Mutable"]; if (self.isStandardJSONType) [properties addObject:@"Standard JSON type"]; @@ -45,12 +45,12 @@ -(NSString*)description [properties addObject:[NSString stringWithFormat: @"Setters = [%@]", [setters componentsJoinedByString:@", "]]]; } - + NSString* propertiesString = @""; if (properties.count>0) { propertiesString = [NSString stringWithFormat:@"(%@)", [properties componentsJoinedByString:@", "]]; } - + //return the name, type and additional properties return [NSString stringWithFormat:@"@property %@%@ %@ %@", self.type?[NSString stringWithFormat:@"%@*",self.type]:(self.structName?self.structName:@"primitive"), diff --git a/JSONModel/JSONModel/JSONModelError.m b/JSONModel/JSONModel/JSONModelError.m index ffbf2fb6..17e5e042 100644 --- a/JSONModel/JSONModel/JSONModelError.m +++ b/JSONModel/JSONModel/JSONModelError.m @@ -25,7 +25,7 @@ @implementation JSONModelError +(id)errorInvalidDataWithMessage:(NSString*)message { - message = [NSString stringWithFormat:@"Invalid JSON data: %@", message]; + message = [NSString stringWithFormat:@"Invalid JSON data: %@", message]; return [JSONModelError errorWithDomain:JSONModelErrorDomain code:kJSONModelErrorInvalidData userInfo:@{NSLocalizedDescriptionKey:message}]; @@ -56,7 +56,7 @@ +(id)errorBadJSON { return [JSONModelError errorWithDomain:JSONModelErrorDomain code:kJSONModelErrorBadJSON - userInfo:@{NSLocalizedDescriptionKey:@"Malformed JSON. Check the JSONModel data input."}]; + userInfo:@{NSLocalizedDescriptionKey:@"Malformed JSON. Check the JSONModel data input."}]; } +(id)errorModelIsInvalid diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index 6d4bec86..a9420d95 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -68,7 +68,7 @@ +(void)setContentType:(NSString*)ctype +(void)getWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock { NSString* fullURL = [NSString stringWithFormat:@"%@%@", sharedInstance.baseURLString, path]; - + [JSONHTTPClient getJSONFromURLWithString: fullURL params:params completion:^(NSDictionary *json, JSONModelError *e) { completeBlock(json, e); }]; @@ -78,7 +78,7 @@ +(void)getWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(J +(void)postWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock { NSString* fullURL = [NSString stringWithFormat:@"%@%@", sharedInstance.baseURLString, path]; - + [JSONHTTPClient postJSONFromURLWithString: fullURL params:params completion:^(NSDictionary *json, JSONModelError *e) { completeBlock(json, e); }]; @@ -87,7 +87,7 @@ +(void)postWithPath:(NSString*)path andParams:(NSDictionary*)params completion:( #pragma mark - RPC methods +(void)__rpcRequestWithObject:(id)jsonObject completion:(JSONObjectBlock)completeBlock { - + NSData* jsonRequestData = [NSJSONSerialization dataWithJSONObject:jsonObject options:kNilOptions error:nil]; @@ -115,7 +115,7 @@ +(void)__rpcRequestWithObject:(id)jsonObject completion:(JSONObjectBlock)complet e = [JSONModelError errorBadResponse]; } } - + //invoke the callback completeBlock(result, e); } @@ -126,7 +126,7 @@ +(void)rpcWithMethodName:(NSString*)method andArguments:(NSArray*)args completio { NSAssert(method, @"No method specified"); if (!args) args = @[]; - + [self __rpcRequestWithObject:@{ //rpc 1.0 @"id": @(++jsonRpcId), @@ -139,7 +139,7 @@ +(void)rpc2WithMethodName:(NSString*)method andParams:(id)params completion:(JSO { NSAssert(method, @"No method specified"); if (!params) params = @[]; - + [self __rpcRequestWithObject:@{ //rpc 2.0 @"jsonrpc": @"2.0", diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index 56f2f9d5..f8888333 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -100,7 +100,7 @@ +(NSString*)contentTypeForRequestString:(NSString*)requestString [requestString substringToIndex:1], [requestString substringFromIndex: requestString.length -1] ]; - + if ([firstAndLastChar isEqualToString:@"{}"] || [firstAndLastChar isEqualToString:@"[]"]) { //guessing for a JSON request contentType = kContentTypeJSON; @@ -121,7 +121,7 @@ +(NSString*)urlEncode:(id)value if ([value isKindOfClass:[NSNumber class]]) { value = [(NSNumber*)value stringValue]; } - + 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; @@ -145,7 +145,7 @@ +(void)requestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSDa NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: url cachePolicy: defaultCachePolicy timeoutInterval: defaultTimeoutInSeconds]; - [request setHTTPMethod:method]; + [request setHTTPMethod:method]; if ([requestContentType isEqualToString:kContentTypeAutomatic]) { //automatic content type @@ -157,17 +157,17 @@ +(void)requestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSDa //user set content type [request setValue: requestContentType forHTTPHeaderField:@"Content-type"]; } - + //add all the custom headers defined for (NSString* key in [requestHeaders allKeys]) { [request setValue:requestHeaders[key] forHTTPHeaderField:key]; } - + //add the custom headers for (NSString* key in [headers allKeys]) { [request setValue:headers[key] forHTTPHeaderField:key]; } - + if (bodyData) { [request setHTTPBody: bodyData]; [request setValue:[NSString stringWithFormat:@"%lu", (unsigned long)bodyData.length] forHTTPHeaderField:@"Content-Length"]; @@ -201,7 +201,7 @@ +(void)requestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSDa if (!data.length) { data = nil; } - + handler(data, error); }; @@ -234,7 +234,7 @@ +(void)requestDataFromURL:(NSURL*)url method:(NSString*)method params:(NSDiction paramsString = [[NSMutableString alloc] initWithString: [paramsString substringToIndex: paramsString.length-1]]; } } - + //set the request params if ([method isEqualToString:kHTTPMethodGET] && params) { @@ -245,7 +245,7 @@ +(void)requestDataFromURL:(NSURL*)url method:(NSString*)method params:(NSDiction paramsString ]]; } - + //call the more general synq request method [self requestDataFromURL: url method: method @@ -288,13 +288,13 @@ +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method param //step 4: if there's a response at this and no errors, convert to object if (error==nil) { - // Note: it is possible to have a valid response with empty response data (204 No Content). - // So only create the JSON object if there is some response data. - if(responseData.length > 0) - { - //convert to an object - jsonObject = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error]; - } + // Note: it is possible to have a valid response with empty response data (204 No Content). + // So only create the JSON object if there is some response data. + if(responseData.length > 0) + { + //convert to an object + jsonObject = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error]; + } } //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) { @@ -303,7 +303,7 @@ +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method param //keep responseData just in case it contains error information error.responseData = responseData; } - + //step 5: invoke the complete block dispatch_async(dispatch_get_main_queue(), ^{ if (completeBlock) { diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index 0d306de8..3f710833 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -40,25 +40,25 @@ -(instancetype)initFromURLWithString:(NSString *)urlString completion:(JSONModel { id placeholder = [super init]; __block id blockSelf = self; - + if (placeholder) { //initialization self.isLoading = YES; - + [JSONHTTPClient getJSONFromURLWithString:urlString completion:^(NSDictionary *json, JSONModelError* e) { - + JSONModelError* initError = nil; blockSelf = [self initWithDictionary:json error:&initError]; - + if (completeBlock) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{ completeBlock(blockSelf, e?e:initError ); }); } - + self.isLoading = NO; - + }]; } return placeholder; @@ -66,47 +66,47 @@ -(instancetype)initFromURLWithString:(NSString *)urlString completion:(JSONModel + (void)getModelFromURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock { - [JSONHTTPClient getJSONFromURLWithString:urlString - completion:^(NSDictionary* jsonDict, JSONModelError* err) - { - JSONModel* model = nil; - - if(err == nil) - { - model = [[self alloc] initWithDictionary:jsonDict error:&err]; - } - - if(completeBlock != nil) - { - dispatch_async(dispatch_get_main_queue(), ^ - { - completeBlock(model, err); - }); - } + [JSONHTTPClient getJSONFromURLWithString:urlString + completion:^(NSDictionary* jsonDict, JSONModelError* err) + { + JSONModel* model = nil; + + if(err == nil) + { + model = [[self alloc] initWithDictionary:jsonDict error:&err]; + } + + if(completeBlock != nil) + { + dispatch_async(dispatch_get_main_queue(), ^ + { + completeBlock(model, err); + }); + } }]; } + (void)postModel:(JSONModel*)post toURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock { - [JSONHTTPClient postJSONFromURLWithString:urlString - bodyString:[post toJSONString] - completion:^(NSDictionary* jsonDict, JSONModelError* err) - { - JSONModel* model = nil; - - if(err == nil) - { - model = [[self alloc] initWithDictionary:jsonDict error:&err]; - } - - if(completeBlock != nil) - { - dispatch_async(dispatch_get_main_queue(), ^ - { - completeBlock(model, err); - }); - } - }]; + [JSONHTTPClient postJSONFromURLWithString:urlString + bodyString:[post toJSONString] + completion:^(NSDictionary* jsonDict, JSONModelError* err) + { + JSONModel* model = nil; + + if(err == nil) + { + model = [[self alloc] initWithDictionary:jsonDict error:&err]; + } + + if(completeBlock != nil) + { + dispatch_async(dispatch_get_main_queue(), ^ + { + completeBlock(model, err); + }); + } + }]; } @end diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 61787fb5..6cb8f0d6 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -43,33 +43,33 @@ -(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel -(instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON { self = [self init]; - + if (self) { - + __weak JSONKeyMapper* weakSelf = self; - + _modelToJSONKeyBlock = [^NSString* (NSString* keyName) { - + __strong JSONKeyMapper *strongSelf = weakSelf; - + //try to return cached transformed key if (strongSelf.toJSONMap[keyName]) { return strongSelf.toJSONMap[keyName]; } - + //try to convert the key, and store in the cache NSString* result = toJSON(keyName); - + OSSpinLockLock(&strongSelf->_lock); strongSelf.toJSONMap[keyName] = result; OSSpinLockUnlock(&strongSelf->_lock); - + return result; - + } copy]; - + } - + return self; } @@ -77,28 +77,28 @@ -(instancetype)initWithDictionary:(NSDictionary *)map { self = [super init]; if (self) { - + NSDictionary *userToJSONMap = [self swapKeysAndValuesInDictionary:map]; - + _modelToJSONKeyBlock = ^NSString *(NSString *keyName) { NSString *result = [userToJSONMap valueForKeyPath:keyName]; return result ? result : keyName; }; } - + return self; } - (NSDictionary *)swapKeysAndValuesInDictionary:(NSDictionary *)dictionary { NSMutableDictionary *swapped = [NSMutableDictionary new]; - + [dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) { NSAssert([value isKindOfClass:[NSString class]], @"Expect keys and values to be NSString"); NSAssert([key isKindOfClass:[NSString class]], @"Expect keys and values to be NSString"); swapped[value] = key; }]; - + return swapped; } @@ -115,7 +115,7 @@ -(NSString*)convertValue:(NSString*)value +(instancetype)mapperFromUnderscoreCaseToCamelCase { JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) { - + NSMutableString* result = [NSMutableString stringWithString:keyName]; NSRange upperCharRange = [result rangeOfCharacterFromSet:[NSCharacterSet uppercaseLetterCharacterSet]]; @@ -131,25 +131,25 @@ +(instancetype)mapperFromUnderscoreCaseToCamelCase //handle numbers NSRange digitsRange = [result rangeOfCharacterFromSet:[NSCharacterSet decimalDigitCharacterSet]]; while ( digitsRange.location!=NSNotFound) { - + NSRange digitsRangeEnd = [result rangeOfString:@"\\D" options:NSRegularExpressionSearch range:NSMakeRange(digitsRange.location, result.length-digitsRange.location)]; if (digitsRangeEnd.location == NSNotFound) { //spands till the end of the key name digitsRangeEnd = NSMakeRange(result.length, 1); } - + NSRange replaceRange = NSMakeRange(digitsRange.location, digitsRangeEnd.location - digitsRange.location); NSString* digits = [result substringWithRange:replaceRange]; - + [result replaceCharactersInRange:replaceRange withString:[NSString stringWithFormat:@"_%@", digits]]; digitsRange = [result rangeOfCharacterFromSet:[NSCharacterSet decimalDigitCharacterSet] options:kNilOptions range:NSMakeRange(digitsRangeEnd.location+1, result.length-digitsRangeEnd.location-1)]; } - + return result; }; return [[self alloc] initWithModelToJSONBlock:toJSON]; - + } +(instancetype)mapperFromUpperCaseToLowerCase diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index fc3256a5..01b6c76d 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -21,7 +21,7 @@ extern BOOL isNull(id value) { if (!value) return YES; if ([value isKindOfClass:[NSNull class]]) return YES; - + return NO; } @@ -35,7 +35,7 @@ -(id)init //and some famous aliases of primitive types // BOOL is now "B" on iOS __LP64 builds @"I":@"NSInteger", @"Q":@"NSUInteger", @"B":@"BOOL", - + @"@?":@"Block"}; } return self; @@ -47,7 +47,7 @@ +(Class)classByResolvingClusterClasses:(Class)sourceClass if ([sourceClass isSubclassOfClass:[NSString class]]) { return [NSString class]; } - + //check for all variations of numbers if ([sourceClass isSubclassOfClass:[NSNumber class]]) { return [NSNumber class]; @@ -57,7 +57,7 @@ +(Class)classByResolvingClusterClasses:(Class)sourceClass if ([sourceClass isSubclassOfClass:[NSArray class]]) { return [NSArray class]; } - + //check for all variations of arrays if ([sourceClass isSubclassOfClass:[NSDictionary class]]) { return [NSDictionary class]; @@ -124,7 +124,7 @@ -(NSNumber*)BOOLFromNSNumber:(NSNumber*)number -(NSNumber*)BOOLFromNSString:(NSString*)string { - if (string != nil && + if (string != nil && ([string caseInsensitiveCompare:@"true"] == NSOrderedSame || [string caseInsensitiveCompare:@"yes"] == NSOrderedSame)) { return [NSNumber numberWithBool:YES]; @@ -214,7 +214,7 @@ -(NSDate*)__NSDateFromNSString:(NSString*)string -(NSString*)__JSONObjectFromNSDate:(NSDate*)date { static dispatch_once_t onceOutput; - static NSDateFormatter *outputDateFormatter; + static NSDateFormatter *outputDateFormatter; dispatch_once(&onceOutput, ^{ outputDateFormatter = [[NSDateFormatter alloc] init]; [outputDateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]]; From dda1a2d72630c9815917178bb0d1577f5beed169 Mon Sep 17 00:00:00 2001 From: Kerr Marin Miller Date: Thu, 7 Jul 2016 16:07:30 +0100 Subject: [PATCH 099/171] Add return value to mergeFromDictionary:useKeyMapping:error: --- Examples/Tests/KeyMappingTests.m | 57 ++++++++++++++++++++++++++++++++ JSONModel/JSONModel/JSONModel.h | 2 +- JSONModel/JSONModel/JSONModel.m | 4 +-- 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/Examples/Tests/KeyMappingTests.m b/Examples/Tests/KeyMappingTests.m index eb3bdb45..b2a1ba67 100644 --- a/Examples/Tests/KeyMappingTests.m +++ b/Examples/Tests/KeyMappingTests.m @@ -14,6 +14,7 @@ #import "GitHubRepoModelForUSMapper.h" #import "ModelForUpperCaseMapper.h" #import "RenamedPropertyModel.h" +#import "NestedModel.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" @@ -261,6 +262,62 @@ -(void)testMergingData [JSONModel setGlobalKeyMapper:nil]; } +-(void)testMergingDataWithInvalidType +{ + GlobalModel* global1 = [[GlobalModel alloc] init]; + XCTAssertNotNil(global1, @"model did not initialize"); + XCTAssertNil(global1.name, @"name got a value when nil expected"); + + NSDictionary* data = @{@"name":[NSDate date]}; + BOOL glob1Success = [global1 mergeFromDictionary:data useKeyMapping:NO error:nil]; + + XCTAssertNil(global1.name, @"should not be able to parse NSDate"); + XCTAssertEqual(glob1Success, NO); + + //test import via global key mapper + [JSONModel setGlobalKeyMapper:[[JSONKeyMapper alloc] initWithDictionary:@ + { + @"name1":@"name" + }]]; + + GlobalModel* global2 = [[GlobalModel alloc] init]; + NSDictionary* data2 = @{@"name1":[NSDate date]}; + BOOL glob2Success = [global2 mergeFromDictionary:data2 useKeyMapping:YES error:nil]; + + XCTAssertNil(global2.name, @"should not be able to parse NSDate"); + XCTAssertEqual(glob2Success, NO); + + [JSONModel setGlobalKeyMapper:nil]; +} + +-(void)testMergingWithInvalidNestedModel +{ + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../nestedDataWithArrayError.json"]; + NSString* jsonContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:[jsonContents dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil]; + + XCTAssertNotNil(jsonDict, @"Can't fetch test data file contents."); + + //import + NestedModel* nested1 = [[NestedModel alloc] init]; + XCTAssertNotNil(nested1, @"model did not initialize"); + BOOL glob1Success = [nested1 mergeFromDictionary:jsonDict useKeyMapping:NO error:nil]; + XCTAssertEqual(glob1Success, NO); + + //test import via global key mapper + [JSONModel setGlobalKeyMapper:[[JSONKeyMapper alloc] initWithDictionary:@ + { + @"name1":@"name" + }]]; + + NestedModel* nested2 = [[NestedModel alloc] init]; + XCTAssertNotNil(nested2, @"model did not initialize"); + BOOL glob2Success = [nested2 mergeFromDictionary:jsonDict useKeyMapping:YES error:nil]; + XCTAssertEqual(glob2Success, NO); + + [JSONModel setGlobalKeyMapper:nil]; +} + //https://github.com/jsonmodel/jsonmodel/issues/180 -(void)testUsingBothGlobalAndCustomMappers { diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index e4c4bace..67c5baf1 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -280,6 +280,6 @@ DEPRECATED_ATTRIBUTE * @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 error:(NSError **)error; +- (BOOL)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error; @end diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index ded0139a..f5575780 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1371,9 +1371,9 @@ - (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMappi [self mergeFromDictionary:dict useKeyMapping:useKeyMapping error:nil]; } -- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error +- (BOOL)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error { - [self __importDictionary:dict withKeyMapper:(useKeyMapping)? self.__keyMapper:nil validation:NO error:error]; + return [self __importDictionary:dict withKeyMapper:(useKeyMapping)? self.__keyMapper:nil validation:NO error:error]; } #pragma mark - NSCopying, NSCoding From 2148c166cad7e61cd79fb84287e5606c3c6fdf65 Mon Sep 17 00:00:00 2001 From: Vojta Stavik Date: Fri, 15 Jul 2016 16:32:37 +0200 Subject: [PATCH 100/171] Use NSSecureCoding instead of NSCoding when possible (#509) --- JSONModel/JSONModel/JSONModel.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index f5575780..41da4ddd 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1386,7 +1386,13 @@ -(instancetype)copyWithZone:(NSZone *)zone -(instancetype)initWithCoder:(NSCoder *)decoder { - NSString* json = [decoder decodeObjectForKey:@"json"]; + NSString* json; + + if ([decoder respondsToSelector:@selector(decodeObjectOfClass:forKey:)]) { + json = [decoder decodeObjectOfClass:[NSString class] forKey:@"json"]; + } else { + json = [decoder decodeObjectForKey:@"json"]; + } JSONModelError *error = nil; self = [self initWithString:json error:&error]; From af10168882c01f4ec0ed8964fa24ca79d7c40835 Mon Sep 17 00:00:00 2001 From: Morton Fox Date: Fri, 15 Jul 2016 16:52:50 -0400 Subject: [PATCH 101/171] Update link to the change log (#510) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bab3f81b..dcc09a75 100644 --- a/README.md +++ b/README.md @@ -523,7 +523,7 @@ Author: [Marin Todorov](http://www.touch-code-magazine.com) Contributors: Christian Hoffmann, Mark Joslin, Julien Vignali, Symvaro GmbH, BB9z. Also everyone who did successful [pull requests](https://github.com/jsonmodel/jsonmodel/graphs/contributors). -Change log : [https://github.com/jsonmodel/jsonmodel/blob/master/Changelog.md](https://github.com/jsonmodel/jsonmodel/blob/master/Changelog.md) +Change log : [https://github.com/jsonmodel/jsonmodel/blob/master/CHANGELOG.md](https://github.com/jsonmodel/jsonmodel/blob/master/CHANGELOG.md) Utility to generate JSONModel classes from JSON data: https://github.com/dofork/json2object From 9909a7ad1115a29c8d895d24d45845fb7e2a5b2d Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 22 Jul 2016 13:12:12 +0100 Subject: [PATCH 102/171] =?UTF-8?q?When=20NSNull=20is=20set,=20always=20ou?= =?UTF-8?q?tput=20=E2=80=9Cnull=E2=80=9D=20in=20the=20JSON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves #348 --- Examples/Examples.xcodeproj/project.pbxproj | 8 ++ Examples/Tests/NullTests.m | 84 +++++++++++++++++++++ JSONModel/JSONModel/JSONModel.m | 2 +- 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 Examples/Tests/NullTests.m diff --git a/Examples/Examples.xcodeproj/project.pbxproj b/Examples/Examples.xcodeproj/project.pbxproj index 0da20903..36b0c182 100644 --- a/Examples/Examples.xcodeproj/project.pbxproj +++ b/Examples/Examples.xcodeproj/project.pbxproj @@ -207,6 +207,9 @@ 1A84BC421D1C0359005234F4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC411D1C0359005234F4 /* ViewController.m */; }; 1A84BC451D1C0359005234F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BC431D1C0359005234F4 /* Main.storyboard */; }; 1A84BC471D1C0359005234F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BC461D1C0359005234F4 /* Assets.xcassets */; }; + 1AF8B9171D423D5500A1AAD3 /* NullTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8B9151D423B9300A1AAD3 /* NullTests.m */; }; + 1AF8B9181D423D5500A1AAD3 /* NullTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8B9151D423B9300A1AAD3 /* NullTests.m */; }; + 1AF8B9191D423D5700A1AAD3 /* NullTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8B9151D423B9300A1AAD3 /* NullTests.m */; }; 5CB2A425167A8E07ED4DE275 /* Pods_watchOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52B339E24F89A9DA2A76B966 /* Pods_watchOS.framework */; }; 72EAF1AC1B81C8A14DD60AD9 /* Pods_watchOS_extension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5692CCAD15B02E148B7DA7 /* Pods_watchOS_extension.framework */; }; 781D56C813A5E3442DB017EB /* Pods_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7CAA3D8D5BD344CFA7833A86 /* Pods_iOS.framework */; }; @@ -389,6 +392,7 @@ 1A84BC441D1C0359005234F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 1A84BC461D1C0359005234F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 1A84BC481D1C0359005234F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1AF8B9151D423B9300A1AAD3 /* NullTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NullTests.m; sourceTree = ""; }; 21CE3B1BB8B2A3D33C54BE59 /* Pods-macOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-macOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-macOSTests/Pods-macOSTests.debug.xcconfig"; sourceTree = ""; }; 38F03B2DA2344C07E5EF16B1 /* Pods-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-tvOSTests/Pods-tvOSTests.debug.xcconfig"; sourceTree = ""; }; 3C370B412DC108AAC99B3A13 /* Pods_tvOSTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_tvOSTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -496,6 +500,7 @@ 1A4BAA141D1C79260069D735 /* JSONTypesReadTests.m */, 1A4BAA151D1C79260069D735 /* KeyMappingTests.m */, 1A4BAA311D1C79260069D735 /* NestedModelsTests.m */, + 1AF8B9151D423B9300A1AAD3 /* NullTests.m */, 1A4BAA321D1C79260069D735 /* OptionalPropertiesTests.m */, 1A4BAA331D1C79260069D735 /* PersistTests.m */, 1A4BAA341D1C79260069D735 /* PrimitiveTypesReadTests.m */, @@ -1474,6 +1479,7 @@ 1A4BAB081D1C7DA80069D735 /* DrugModel.m in Sources */, 1A4BAB0B1D1C7DA80069D735 /* GitHubKeyMapRepoModel.m in Sources */, 1A4BAB171D1C7DA80069D735 /* OptionalPropModel.m in Sources */, + 1AF8B9171D423D5500A1AAD3 /* NullTests.m in Sources */, 1A4BAB151D1C7DA80069D735 /* ModelForUpperCaseMapper.m in Sources */, 1A4BAA891D1C79480069D735 /* CustomPropsTests.m in Sources */, 1A4BAA931D1C79480069D735 /* OptionalPropertiesTests.m in Sources */, @@ -1525,6 +1531,7 @@ 1A4BAB221D1C7DA80069D735 /* DrugModel.m in Sources */, 1A4BAB251D1C7DA80069D735 /* GitHubKeyMapRepoModel.m in Sources */, 1A4BAB311D1C7DA80069D735 /* OptionalPropModel.m in Sources */, + 1AF8B9181D423D5500A1AAD3 /* NullTests.m in Sources */, 1A4BAB2F1D1C7DA80069D735 /* ModelForUpperCaseMapper.m in Sources */, 1A4BAA751D1C79460069D735 /* CustomPropsTests.m in Sources */, 1A4BAA7F1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */, @@ -1576,6 +1583,7 @@ 1A4BAB3C1D1C7DA90069D735 /* DrugModel.m in Sources */, 1A4BAB3F1D1C7DA90069D735 /* GitHubKeyMapRepoModel.m in Sources */, 1A4BAB4B1D1C7DA90069D735 /* OptionalPropModel.m in Sources */, + 1AF8B9191D423D5700A1AAD3 /* NullTests.m in Sources */, 1A4BAB491D1C7DA90069D735 /* ModelForUpperCaseMapper.m in Sources */, 1A4BAA611D1C79460069D735 /* CustomPropsTests.m in Sources */, 1A4BAA6B1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */, diff --git a/Examples/Tests/NullTests.m b/Examples/Tests/NullTests.m new file mode 100644 index 00000000..60b217cf --- /dev/null +++ b/Examples/Tests/NullTests.m @@ -0,0 +1,84 @@ +// +// NullTests.m +// Examples +// +// Created by James Billingham on 22/07/2016. +// Copyright © 2016 JSONModel. All rights reserved. +// + +@import XCTest; +@import JSONModel; + +@interface NullModelA : JSONModel +@property (nonatomic) NSString *optional; +@property (nonatomic) NSString *required; +@end + +@implementation NullModelA +@end + +@interface NullModelB : JSONModel +@property (nonatomic) NSString *prop; +@end + +@implementation NullModelB +@end + +@interface NullTests : XCTestCase +@end + +@implementation NullTests + +- (void)testNullSerialization +{ + NullModelA *model1 = [NullModelA new]; + model1.optional = (id)[NSNull null]; + model1.required = (id)[NSNull null]; + NullModelA *model2 = [NullModelA new]; + model2.optional = nil; + model2.required = nil; + NullModelA *model3 = [NullModelA new]; + model3.optional = @"foo"; + model3.required = @"bar"; + + NSDictionary *dict1 = [model1 toDictionary]; + NSDictionary *dict2 = [model2 toDictionary]; + NSDictionary *dict3 = [model3 toDictionary]; + + XCTAssertNotNil(dict1); + XCTAssertEqual(dict1[@"optional"], [NSNull null]); + XCTAssertEqual(dict1[@"required"], [NSNull null]); + XCTAssertNotNil(dict2); + XCTAssertEqual(dict2[@"optional"], nil); + XCTAssertEqual(dict2[@"required"], nil); + XCTAssertNotNil(dict3); + XCTAssertEqual(dict3[@"optional"], @"foo"); + XCTAssertEqual(dict3[@"required"], @"bar"); +} + +- (void)testNullDeserialization +{ + NSDictionary *dict1 = @{ @"prop": [NSNull null] }; + NSDictionary *dict2 = @{}; + NSDictionary *dict3 = @{ @"prop": @"foo" }; + + NSError *error1 = nil; + NSError *error2 = nil; + NSError *error3 = nil; + + NullModelB *model1 = [[NullModelB alloc] initWithDictionary:dict1 error:&error1]; + NullModelB *model2 = [[NullModelB alloc] initWithDictionary:dict2 error:&error2]; + NullModelB *model3 = [[NullModelB alloc] initWithDictionary:dict3 error:&error3]; + + XCTAssertNil(error1); + XCTAssertNotNil(model1); + XCTAssertNil(model1.prop); + XCTAssertNil(error2); + XCTAssertNotNil(model2); + XCTAssertNil(model2.prop); + XCTAssertNil(error3); + XCTAssertNotNil(model3); + XCTAssertEqual(model3.prop, @"foo"); +} + +@end diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 41da4ddd..b2c3c0ac 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -973,7 +973,7 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames //is still valid if it's to be imported as a model again if (isNull(value)) { - if (p.isOptional) + if (value == nil) { [tempDictionary removeObjectForKey:keyPath]; } From 69002141983939aa6cca2871e3a134e1a613dcbb Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 22 Jul 2016 13:12:21 +0100 Subject: [PATCH 103/171] Fix issue with tests building --- Examples/Examples.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Examples/Examples.xcodeproj/project.pbxproj b/Examples/Examples.xcodeproj/project.pbxproj index 36b0c182..2e2db5f3 100644 --- a/Examples/Examples.xcodeproj/project.pbxproj +++ b/Examples/Examples.xcodeproj/project.pbxproj @@ -1763,6 +1763,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -1807,6 +1808,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; From e2a6c6771c0ea2c880a7f475918be70c6de86267 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 22 Jul 2016 14:32:39 +0100 Subject: [PATCH 104/171] Changelog styling improvement/consistency --- CHANGELOG.md | 78 ++++++++++++++++++++++------------------------------ 1 file changed, 33 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d42e3141..7c881eae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,6 @@ -Changelog -========== +# Changelog -**Version 1.2.0** @2015-12-30 +## v1.2.0 (2015-12-30) - support added for watchOS and tvOS - minimum iOS version bumped to 6.0 @@ -18,89 +17,78 @@ Changelog - updated project files to latest Xcode - updated demo apps to work with the latest JSONModel & external API code -**Version 1.1.2** @2015-10-19 +## v1.1.2 (2015-10-19) -Merging more requests re: iOS9 +- merging more pull requests RE: iOS 9 -**Version 1.1** @2015-05 +## v1.1.0 (2015-05-10) -Merging more requests +- merging more pull requests -**Version 1.0.2** @ 2015-01-21 +## v1.0.2 (2015-01-21) - merged a number of pull requests that fix compatibility with iOS 8 and other issues - -**Version 1.0** @ 2014-08-12 +## v1.0.0 (2014-08-12) - bug fix and merged pull requests -**Version 0.13** @ 2014-04-17 +## v0.13.0 (2014-04-17) - methods to merge data into existing model - - automatic NSCopying and NSCoding for all JSONModel subclasses - - merged number of fixes for the networking library - - XCTest unit tests, demo app runs only on iOS7+ - - -**Version 0.12** @ 2014-02-17 +## v0.12.0 (2014-02-17) - fixes for BOOLs - - hacked solution for unit tests checking subclassing - - added experimental Core Data support -**Version 0.10** @ 2013-11-10 +## v0.10.0 (2013-11-10) - fixed handling of *null* values in JSON, which was **broken until now**, make sure to test after upgrading. Now *null* values for required properties will result in a failed init of the model class. - - a number of pull requests for *JSONHTTPClient*, slowly trying to polish it - - added propertyIsIgnored: method, for ignoring primitive properties - - fixes in globalKeyMapper import/export JSON, fixes for automatic snake_case convertions, added masking of BOOL as struct for custom convertors -**Version 0.9.3** @ 2013-09-25 +## v0.9.3 (2013-09-25) -- Bug fixes up to issue #90 -- Added "Ignore" protocol, all Optional properties, better documentation +- bug fixes up to issue #90 +- added "Ignore" protocol, all Optional properties, better documentation -**Version 0.9.2** @ 2013-08-23 +## v0.9.2 (2013-08-23) -- Bug fixes up to issue #74 -- Documentation instructions, ignore nils for optional properties on export, special method for optional struct and primitive properties, refactor unit tests +- bug fixes up to issue #74 +- documentation instructions, ignore nils for optional properties on export, special method for optional struct and primitive properties, refactor unit tests -**Version 0.9.1** @ 2013-07-04 +## v0.9.1 (2013-07-04) -- Bug fixes up to issue #61 -- Custom name based conversions, more thread safety, new data types supported +- bug fixes up to issue #61 +- custom name based conversions, more thread safety, new data types supported -**Version 0.9** @ 2013-05-01 +## v0.9.0 (2013-05-01) -- Bug fixes up to issue #37 -- Refactor of all networking code, Removing all sync request methods (breaking change) +- bug fixes up to issue #37 +- refactor of all networking code, Removing all sync request methods (breaking change) -**Version 0.8.3** @ 2013-01-24 +## v0.8.3 (2013-01-24) -- Bug fixes up to issue #15 +- bug fixes up to issue #15 -**Version 0.8.2** @ 2013-01-01 +## v0.8.2 (2013-01-01) -- Added distribution as a Cocoa Pod +- added distribution as a Cocoa Pod -**Version 0.8.1** @ 2012-12-31 +## v0.8.1 (2012-12-31) -- Fixed Xcode workspace for the demo apps +- fixed Xcode workspace for the demo apps -**Version 0.8.0** @ 2012-12-31 +## v0.8.0 (2012-12-31) -- OSX support, automatic network indicator for iOS, speed improvements, better README +- OS X support, automatic network indicator for iOS, speed improvements, better README -**Version 0.7.8** @ 2012-12-25 +## v0.7.8 (2012-12-25) -- Initial release with semantic versioning +- initial release with semantic versioning From 573e8129854fa456fc9348ed85e5e08880ad41d3 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 22 Jul 2016 14:33:12 +0100 Subject: [PATCH 105/171] v1.3.0 --- CHANGELOG.md | 23 + Demos/iOS.xcodeproj/project.pbxproj | 1022 ++++++++++++++++ .../contents.xcworkspacedata | 7 + Demos/iOS/AppDelegate.h | 17 + Demos/iOS/AppDelegate.m | 55 + Demos/iOS/Default-568h@2x.png | Bin 0 -> 18594 bytes Demos/iOS/Default.png | Bin 0 -> 6540 bytes Demos/iOS/Default@2x.png | Bin 0 -> 16107 bytes Demos/iOS/GitHubUserModel.h | 19 + Demos/iOS/GitHubUserModel.m | 13 + Demos/iOS/GitHubViewController.h | 13 + Demos/iOS/GitHubViewController.m | 95 ++ Demos/iOS/GitHubViewController.xib | 24 + Demos/iOS/HUD.h | 45 + Demos/iOS/HUD.m | 201 ++++ Demos/iOS/Info.plist | 48 + Demos/iOS/KivaFeed.h | 16 + Demos/iOS/KivaFeed.m | 13 + Demos/iOS/KivaViewController.h | 13 + Demos/iOS/KivaViewController.m | 111 ++ Demos/iOS/KivaViewController.xib | 37 + Demos/iOS/KivaViewControllerNetworking.h | 13 + Demos/iOS/KivaViewControllerNetworking.m | 92 ++ Demos/iOS/KivaViewControllerNetworking.xib | 37 + Demos/iOS/LoanModel.h | 22 + Demos/iOS/LoanModel.m | 13 + Demos/iOS/LocationModel.h | 16 + Demos/iOS/LocationModel.m | 19 + Demos/iOS/MBProgressHUD.h | 521 +++++++++ Demos/iOS/MBProgressHUD.m | 1033 +++++++++++++++++ Demos/iOS/MasterViewController.h | 12 + Demos/iOS/MasterViewController.m | 95 ++ Demos/iOS/MyDataModel.h | 16 + Demos/iOS/MyDataModel.m | 13 + Demos/iOS/StorageViewController.h | 13 + Demos/iOS/StorageViewController.m | 67 ++ Demos/iOS/StorageViewController.xib | 72 ++ Demos/iOS/btnCheck.png | Bin 0 -> 1334 bytes Demos/iOS/btnCheck@2x.png | Bin 0 -> 3252 bytes Demos/iOS/en.lproj/InfoPlist.strings | 2 + Demos/iOS/en.lproj/MasterViewController.xib | 31 + Demos/iOS/main.m | 18 + Demos/macOS.xcodeproj/project.pbxproj | 953 +++++++++++++++ .../contents.xcworkspacedata | 7 + Demos/macOS/AppDelegate.h | 15 + Demos/macOS/AppDelegate.m | 35 + Demos/macOS/Info.plist | 34 + Demos/macOS/KivaFeed.h | 16 + Demos/macOS/KivaFeed.m | 13 + Demos/macOS/LoanModel.h | 22 + Demos/macOS/LoanModel.m | 13 + Demos/macOS/LocationModel.h | 16 + Demos/macOS/LocationModel.m | 19 + Demos/macOS/ViewController.h | 13 + Demos/macOS/ViewController.m | 174 +++ Demos/macOS/ViewController.xib | 131 +++ Demos/macOS/en.lproj/Credits.rtf | 36 + Demos/macOS/en.lproj/InfoPlist.strings | 2 + Demos/macOS/en.lproj/MainMenu.xib | 667 +++++++++++ Demos/macOS/main.m | 14 + JSONModel.podspec | 4 +- JSONModel/Info.plist | 2 +- JSONModel/JSONModel/JSONModel.h | 2 +- JSONModel/JSONModel/JSONModel.m | 2 +- JSONModel/JSONModel/JSONModelClassProperty.h | 2 +- JSONModel/JSONModel/JSONModelClassProperty.m | 2 +- JSONModel/JSONModel/JSONModelError.h | 2 +- JSONModel/JSONModel/JSONModelError.m | 2 +- JSONModel/JSONModelLib.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.m | 2 +- .../JSONModelNetworking/JSONHTTPClient.h | 2 +- .../JSONModelNetworking/JSONHTTPClient.m | 2 +- .../JSONModel+networking.h | 2 +- .../JSONModel+networking.m | 2 +- .../JSONModelTransformations/JSONKeyMapper.h | 2 +- .../JSONModelTransformations/JSONKeyMapper.m | 2 +- .../JSONValueTransformer.h | 2 +- .../JSONValueTransformer.m | 2 +- README.md | 4 +- 80 files changed, 6078 insertions(+), 23 deletions(-) create mode 100644 Demos/iOS.xcodeproj/project.pbxproj create mode 100644 Demos/iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Demos/iOS/AppDelegate.h create mode 100644 Demos/iOS/AppDelegate.m create mode 100644 Demos/iOS/Default-568h@2x.png create mode 100644 Demos/iOS/Default.png create mode 100644 Demos/iOS/Default@2x.png create mode 100644 Demos/iOS/GitHubUserModel.h create mode 100644 Demos/iOS/GitHubUserModel.m create mode 100644 Demos/iOS/GitHubViewController.h create mode 100644 Demos/iOS/GitHubViewController.m create mode 100644 Demos/iOS/GitHubViewController.xib create mode 100644 Demos/iOS/HUD.h create mode 100644 Demos/iOS/HUD.m create mode 100644 Demos/iOS/Info.plist create mode 100644 Demos/iOS/KivaFeed.h create mode 100644 Demos/iOS/KivaFeed.m create mode 100644 Demos/iOS/KivaViewController.h create mode 100644 Demos/iOS/KivaViewController.m create mode 100644 Demos/iOS/KivaViewController.xib create mode 100644 Demos/iOS/KivaViewControllerNetworking.h create mode 100644 Demos/iOS/KivaViewControllerNetworking.m create mode 100644 Demos/iOS/KivaViewControllerNetworking.xib create mode 100644 Demos/iOS/LoanModel.h create mode 100644 Demos/iOS/LoanModel.m create mode 100644 Demos/iOS/LocationModel.h create mode 100644 Demos/iOS/LocationModel.m create mode 100755 Demos/iOS/MBProgressHUD.h create mode 100755 Demos/iOS/MBProgressHUD.m create mode 100644 Demos/iOS/MasterViewController.h create mode 100644 Demos/iOS/MasterViewController.m create mode 100644 Demos/iOS/MyDataModel.h create mode 100644 Demos/iOS/MyDataModel.m create mode 100644 Demos/iOS/StorageViewController.h create mode 100644 Demos/iOS/StorageViewController.m create mode 100644 Demos/iOS/StorageViewController.xib create mode 100644 Demos/iOS/btnCheck.png create mode 100644 Demos/iOS/btnCheck@2x.png create mode 100644 Demos/iOS/en.lproj/InfoPlist.strings create mode 100644 Demos/iOS/en.lproj/MasterViewController.xib create mode 100644 Demos/iOS/main.m create mode 100644 Demos/macOS.xcodeproj/project.pbxproj create mode 100644 Demos/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Demos/macOS/AppDelegate.h create mode 100644 Demos/macOS/AppDelegate.m create mode 100644 Demos/macOS/Info.plist create mode 100644 Demos/macOS/KivaFeed.h create mode 100644 Demos/macOS/KivaFeed.m create mode 100644 Demos/macOS/LoanModel.h create mode 100644 Demos/macOS/LoanModel.m create mode 100644 Demos/macOS/LocationModel.h create mode 100644 Demos/macOS/LocationModel.m create mode 100644 Demos/macOS/ViewController.h create mode 100644 Demos/macOS/ViewController.m create mode 100644 Demos/macOS/ViewController.xib create mode 100644 Demos/macOS/en.lproj/Credits.rtf create mode 100644 Demos/macOS/en.lproj/InfoPlist.strings create mode 100644 Demos/macOS/en.lproj/MainMenu.xib create mode 100644 Demos/macOS/main.m diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c881eae..7d5beadd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## v1.3.0 (2016-07-22) + +Sorry for the long time since the last release. We'll be trying to maintain a +more rapid release schedule going forwards. + +- precision issue fixed with deserializing numbers +- support added for deserializing into a 'root' dictionary (`dictionaryOfModelsFromDictionary:error:`, etc.) +- lazy collection-type conversion (`ConvertOnDemand`) is no longer supported +- deprecated two way key mapping deprecated - only Model->JSON has ever worked anyway +- deprecated all networking support +- deprecated the global key mapper +- deprecated `Index` protocol +- deprecated `protocolForArrayProperty:` in favor of `classForCollectionProperty:` +- modulemap file added to handle use as a framework better +- success return value added to `mergeFromDictionary:useKeyMapping:error:` +- JSONModel has now been moved out into its own GitHub organization, etc. - now maintained by multiple people + +### Potentially breaking changes + +- new behavior for handling null values when serializing: + - values of `NSNull` will now always `null` in JSON output + - values of `nil` will now never be included in JSON output + ## v1.2.0 (2015-12-30) - support added for watchOS and tvOS diff --git a/Demos/iOS.xcodeproj/project.pbxproj b/Demos/iOS.xcodeproj/project.pbxproj new file mode 100644 index 00000000..63887d57 --- /dev/null +++ b/Demos/iOS.xcodeproj/project.pbxproj @@ -0,0 +1,1022 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1AE9CA901C21F47600B8F5C1 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */; }; + 358FD078D3C0D56C77ACD770 /* ExtremeNestingModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */; }; + 358FD179E0B41C47C67713B5 /* InteractionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */; }; + 358FD61804BD21F41035348E /* ExtremeNestingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */; }; + 358FD640BFEAB00349FBBA4A /* DrugModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FD25356988AC33EA6A935 /* DrugModel.m */; }; + 4A50001D19C5DCCF00C161A0 /* InitWithDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */; }; + 69286BDA17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */; }; + 69286BDB17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */; }; + 697852FD17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */; }; + 697852FF17D93547006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */; }; + 9C0D0240166E6BBF001EA645 /* KivaViewControllerNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C0D023E166E6BBF001EA645 /* KivaViewControllerNetworking.m */; }; + 9C0D0241166E6BBF001EA645 /* KivaViewControllerNetworking.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9C0D023F166E6BBF001EA645 /* KivaViewControllerNetworking.xib */; }; + 9C28A14118B2A4D2002AEC1E /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C55AF0618903127004EBD8A /* CoreData.framework */; }; + 9C55AF0718903127004EBD8A /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C55AF0618903127004EBD8A /* CoreData.framework */; }; + 9C55AF0E18903300004EBD8A /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C5176E977C007B7DFA /* ReposModel.m */; }; + 9C55AF0F189033AE004EBD8A /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */; }; + 9C66DFA8168CEF420015CCDF /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF60168CEF420015CCDF /* ArrayTests.m */; }; + 9C66DFA9168CEF420015CCDF /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF62168CEF420015CCDF /* BuiltInConversionsTests.m */; }; + 9C66DFAB168CEF420015CCDF /* CustomPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF66168CEF420015CCDF /* CustomPropsTests.m */; }; + 9C66DFAC168CEF420015CCDF /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF68168CEF420015CCDF /* colors.json */; }; + 9C66DFAD168CEF420015CCDF /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF69168CEF420015CCDF /* converts.json */; }; + 9C66DFAE168CEF420015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6A168CEF420015CCDF /* github-iphone.json */; }; + 9C66DFAF168CEF420015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6B168CEF420015CCDF /* jsonTypes.json */; }; + 9C66DFB0168CEF420015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6C168CEF420015CCDF /* nestedData.json */; }; + 9C66DFB1168CEF420015CCDF /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */; }; + 9C66DFB2168CEF420015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6E168CEF420015CCDF /* post.json */; }; + 9C66DFB3168CEF420015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6F168CEF420015CCDF /* primitives.json */; }; + 9C66DFB4168CEF420015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */; }; + 9C66DFB5168CEF420015CCDF /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF71168CEF420015CCDF /* withOptProp.json */; }; + 9C66DFB6168CEF420015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF72168CEF420015CCDF /* withoutOptProp.json */; }; + 9C66DFB7168CEF420015CCDF /* IdPropertyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF74168CEF420015CCDF /* IdPropertyTests.m */; }; + 9C66DFB8168CEF420015CCDF /* JSONTypesModelWithValidation1.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF76168CEF420015CCDF /* JSONTypesModelWithValidation1.m */; }; + 9C66DFB9168CEF420015CCDF /* JSONTypesModelWithValidation2.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF78168CEF420015CCDF /* JSONTypesModelWithValidation2.m */; }; + 9C66DFBA168CEF420015CCDF /* JSONTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF7A168CEF420015CCDF /* JSONTypesReadTests.m */; }; + 9C66DFBB168CEF420015CCDF /* JSONValueTransformer+UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF7C168CEF420015CCDF /* JSONValueTransformer+UIColor.m */; }; + 9C66DFBC168CEF420015CCDF /* KeyMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF7E168CEF420015CCDF /* KeyMappingTests.m */; }; + 9C66DFBD168CEF420015CCDF /* NestedModelsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF80168CEF420015CCDF /* NestedModelsTests.m */; }; + 9C66DFBE168CEF420015CCDF /* OptionalPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF82168CEF420015CCDF /* OptionalPropertiesTests.m */; }; + 9C66DFBF168CEF420015CCDF /* PersistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF84168CEF420015CCDF /* PersistTests.m */; }; + 9C66DFC0168CEF420015CCDF /* PrimitiveTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF86168CEF420015CCDF /* PrimitiveTypesReadTests.m */; }; + 9C66DFC1168CEF420015CCDF /* SimpleDataErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF88168CEF420015CCDF /* SimpleDataErrorTests.m */; }; + 9C66DFD0168CEF420015CCDF /* ValidationTestSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */; }; + 9C66DFD1168CEF530015CCDF /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF68168CEF420015CCDF /* colors.json */; }; + 9C66DFD2168CEF530015CCDF /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF69168CEF420015CCDF /* converts.json */; }; + 9C66DFD3168CEF530015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6A168CEF420015CCDF /* github-iphone.json */; }; + 9C66DFD4168CEF530015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6B168CEF420015CCDF /* jsonTypes.json */; }; + 9C66DFD5168CEF530015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6C168CEF420015CCDF /* nestedData.json */; }; + 9C66DFD6168CEF530015CCDF /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */; }; + 9C66DFD7168CEF530015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6E168CEF420015CCDF /* post.json */; }; + 9C66DFD8168CEF530015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6F168CEF420015CCDF /* primitives.json */; }; + 9C66DFD9168CEF530015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */; }; + 9C66DFDA168CEF530015CCDF /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF71168CEF420015CCDF /* withOptProp.json */; }; + 9C66DFDB168CEF530015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF72168CEF420015CCDF /* withoutOptProp.json */; }; + 9C735D64170B716300FF96F5 /* JSONAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D63170B716300FF96F5 /* JSONAPITests.m */; }; + 9C735D70170C007900FF96F5 /* InitFromWebTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D6F170C007900FF96F5 /* InitFromWebTests.m */; }; + 9CA6B10016FCA5B400B3E78E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */; }; + 9CA6B10216FCAAEE00B3E78E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */; }; + 9CB1EE42172C1136004BAA07 /* SpecialPropertyNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB1EE41172C1136004BAA07 /* SpecialPropertyNameTests.m */; }; + 9CB1EE47172C1205004BAA07 /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = 9CB1EE46172C1205004BAA07 /* specialPropertyName.json */; }; + 9CBBBEDD166B6CF0008B4326 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */; }; + 9CBBBEDF166B6CF0008B4326 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */; }; + 9CBBBEE1166B6CF0008B4326 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */; }; + 9CBBBEE7166B6CF0008B4326 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEE5166B6CF0008B4326 /* InfoPlist.strings */; }; + 9CBBBEE9166B6CF0008B4326 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBEE8166B6CF0008B4326 /* main.m */; }; + 9CBBBEED166B6CF0008B4326 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBEEC166B6CF0008B4326 /* AppDelegate.m */; }; + 9CBBBEEF166B6CF0008B4326 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEEE166B6CF0008B4326 /* Default.png */; }; + 9CBBBEF1166B6CF0008B4326 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEF0166B6CF0008B4326 /* Default@2x.png */; }; + 9CBBBEF3166B6CF0008B4326 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEF2166B6CF0008B4326 /* Default-568h@2x.png */; }; + 9CBBBEF6166B6CF0008B4326 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBEF5166B6CF0008B4326 /* MasterViewController.m */; }; + 9CBBBEFC166B6CF0008B4326 /* MasterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEFA166B6CF0008B4326 /* MasterViewController.xib */; }; + 9CBBBF08166B6CF0008B4326 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */; }; + 9CBBBF09166B6CF0008B4326 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */; }; + 9CBBBF65166B9E3E008B4326 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */; }; + 9CBBBF77166BA80F008B4326 /* KivaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF75166BA80F008B4326 /* KivaViewController.m */; }; + 9CBBBF78166BA80F008B4326 /* KivaViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF76166BA80F008B4326 /* KivaViewController.xib */; }; + 9CBBBF80166BA86A008B4326 /* LoanModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF7B166BA86A008B4326 /* LoanModel.m */; }; + 9CBBBF81166BA86A008B4326 /* LocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF7D166BA86A008B4326 /* LocationModel.m */; }; + 9CBBBF82166BA86A008B4326 /* KivaFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF7F166BA86A008B4326 /* KivaFeed.m */; }; + 9CBBBF8F166BAC54008B4326 /* btnCheck.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF89166BAC54008B4326 /* btnCheck.png */; }; + 9CBBBF90166BAC54008B4326 /* btnCheck@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF8A166BAC54008B4326 /* btnCheck@2x.png */; }; + 9CBBBF91166BAC54008B4326 /* HUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF8C166BAC54008B4326 /* HUD.m */; }; + 9CBBBF92166BAC54008B4326 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF8E166BAC54008B4326 /* MBProgressHUD.m */; }; + 9CBBBF97166BAED2008B4326 /* GitHubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */; }; + 9CBBBF98166BAED2008B4326 /* GitHubViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */; }; + 9CBBBF9C166BAEF5008B4326 /* GitHubUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */; }; + 9CBBBFB1166BBB05008B4326 /* MyDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */; }; + 9CBBBFB5166BBB21008B4326 /* StorageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */; }; + 9CBBBFB6166BBB21008B4326 /* StorageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */; }; + 9CC2FD2B168CE7830059FE67 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9CC2FCD5168CE7830059FE67 /* Info.plist */; }; + 9CCAFD921901B44300314886 /* SpecialPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CCAFD911901B44300314886 /* SpecialPropertiesTests.m */; }; + 9CD425751701FE0000A42AA1 /* HTTPClientSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */; }; + 9CD425781701FF2100A42AA1 /* MTTestSemaphor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */; }; + 9CD4257B1702002900A42AA1 /* MockNSURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */; }; + 9CF21CE91CA28A200076A4C7 /* SpecialValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */; }; + 9CFDD0CA176E977C007B7DFA /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */; }; + 9CFDD0CB176E977C007B7DFA /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */; }; + 9CFDD0CC176E977C007B7DFA /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */; }; + 9CFDD0CD176E977C007B7DFA /* EnumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AD176E977C007B7DFA /* EnumModel.m */; }; + 9CFDD0CE176E977C007B7DFA /* GitHubKeyMapRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AF176E977C007B7DFA /* GitHubKeyMapRepoModel.m */; }; + 9CFDD0CF176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B1176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m */; }; + 9CFDD0D0176E977C007B7DFA /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */; }; + 9CFDD0D1176E977C007B7DFA /* GitHubRepoModelForUSMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B5176E977C007B7DFA /* GitHubRepoModelForUSMapper.m */; }; + 9CFDD0D2176E977C007B7DFA /* ImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B7176E977C007B7DFA /* ImageModel.m */; }; + 9CFDD0D3176E977C007B7DFA /* JSONTypesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B9176E977C007B7DFA /* JSONTypesModel.m */; }; + 9CFDD0D4176E977C007B7DFA /* NestedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0BB176E977C007B7DFA /* NestedModel.m */; }; + 9CFDD0D5176E977C007B7DFA /* OptionalPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0BD176E977C007B7DFA /* OptionalPropModel.m */; }; + 9CFDD0D6176E977C007B7DFA /* PostModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0BF176E977C007B7DFA /* PostModel.m */; }; + 9CFDD0D7176E977C007B7DFA /* PostsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C1176E977C007B7DFA /* PostsModel.m */; }; + 9CFDD0D8176E977C007B7DFA /* PrimitivesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C3176E977C007B7DFA /* PrimitivesModel.m */; }; + 9CFDD0D9176E977C007B7DFA /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C5176E977C007B7DFA /* ReposModel.m */; }; + 9CFDD0DA176E977C007B7DFA /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C7176E977C007B7DFA /* RpcRequestModel.m */; }; + 9CFDD0DB176E977C007B7DFA /* SpecialPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C9176E977C007B7DFA /* SpecialPropertyModel.m */; }; + D66F5792A312B021F52F7BFF /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = D66F58FBC6313C65C9357A2F /* ModelForUpperCaseMapper.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 9CBBBF0A166B6CF0008B4326 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9CBBBECF166B6CEF008B4326 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9CBBBED7166B6CF0008B4326; + remoteInfo = JSONModelDemo; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1AE9CA8E1C21F47600B8F5C1 /* RenamedPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenamedPropertyModel.h; sourceTree = ""; }; + 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RenamedPropertyModel.m; sourceTree = ""; }; + 358FD25356988AC33EA6A935 /* DrugModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrugModel.m; sourceTree = ""; }; + 358FD7AD55FD213CBAAB460F /* ExtremeNestingModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingModel.h; sourceTree = ""; }; + 358FD807C3E86F5DC4058645 /* ExtremeNestingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingTests.h; sourceTree = ""; }; + 358FDA6A1D0805B6ABE4720D /* DrugModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrugModel.h; sourceTree = ""; }; + 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtremeNestingTests.m; sourceTree = ""; }; + 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtremeNestingModel.m; sourceTree = ""; }; + 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteractionModel.m; sourceTree = ""; }; + 358FDED5E028AA00D3E6564D /* InteractionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteractionModel.h; sourceTree = ""; }; + 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitWithDataTests.m; sourceTree = ""; }; + 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = ""; }; + 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = ""; }; + 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImagesObject.json; sourceTree = ""; }; + 9C0D023D166E6BBF001EA645 /* KivaViewControllerNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaViewControllerNetworking.h; sourceTree = ""; }; + 9C0D023E166E6BBF001EA645 /* KivaViewControllerNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaViewControllerNetworking.m; sourceTree = ""; }; + 9C0D023F166E6BBF001EA645 /* KivaViewControllerNetworking.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KivaViewControllerNetworking.xib; sourceTree = ""; }; + 9C55AF0618903127004EBD8A /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 9C66DF5F168CEF420015CCDF /* ArrayTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayTests.h; sourceTree = ""; }; + 9C66DF60168CEF420015CCDF /* ArrayTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrayTests.m; sourceTree = ""; }; + 9C66DF61168CEF420015CCDF /* BuiltInConversionsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsTests.h; sourceTree = ""; }; + 9C66DF62168CEF420015CCDF /* BuiltInConversionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsTests.m; sourceTree = ""; }; + 9C66DF65168CEF420015CCDF /* CustomPropsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropsTests.h; sourceTree = ""; }; + 9C66DF66168CEF420015CCDF /* CustomPropsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropsTests.m; sourceTree = ""; }; + 9C66DF68168CEF420015CCDF /* colors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = colors.json; sourceTree = ""; }; + 9C66DF69168CEF420015CCDF /* converts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = converts.json; sourceTree = ""; }; + 9C66DF6A168CEF420015CCDF /* github-iphone.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "github-iphone.json"; sourceTree = ""; }; + 9C66DF6B168CEF420015CCDF /* jsonTypes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = jsonTypes.json; sourceTree = ""; }; + 9C66DF6C168CEF420015CCDF /* nestedData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedData.json; sourceTree = ""; }; + 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithArrayError.json; sourceTree = ""; }; + 9C66DF6E168CEF420015CCDF /* post.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = post.json; sourceTree = ""; }; + 9C66DF6F168CEF420015CCDF /* primitives.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitives.json; sourceTree = ""; }; + 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitivesWithErrors.json; sourceTree = ""; }; + 9C66DF71168CEF420015CCDF /* withOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withOptProp.json; sourceTree = ""; }; + 9C66DF72168CEF420015CCDF /* withoutOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withoutOptProp.json; sourceTree = ""; }; + 9C66DF73168CEF420015CCDF /* IdPropertyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdPropertyTests.h; sourceTree = ""; }; + 9C66DF74168CEF420015CCDF /* IdPropertyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = IdPropertyTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DF75168CEF420015CCDF /* JSONTypesModelWithValidation1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation1.h; sourceTree = ""; }; + 9C66DF76168CEF420015CCDF /* JSONTypesModelWithValidation1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation1.m; sourceTree = ""; }; + 9C66DF77168CEF420015CCDF /* JSONTypesModelWithValidation2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation2.h; sourceTree = ""; }; + 9C66DF78168CEF420015CCDF /* JSONTypesModelWithValidation2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation2.m; sourceTree = ""; }; + 9C66DF79168CEF420015CCDF /* JSONTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesReadTests.h; sourceTree = ""; }; + 9C66DF7A168CEF420015CCDF /* JSONTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONTypesReadTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DF7B168CEF420015CCDF /* JSONValueTransformer+UIColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONValueTransformer+UIColor.h"; sourceTree = ""; }; + 9C66DF7C168CEF420015CCDF /* JSONValueTransformer+UIColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONValueTransformer+UIColor.m"; sourceTree = ""; }; + 9C66DF7D168CEF420015CCDF /* KeyMappingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyMappingTests.h; sourceTree = ""; }; + 9C66DF7E168CEF420015CCDF /* KeyMappingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = KeyMappingTests.m; sourceTree = ""; }; + 9C66DF7F168CEF420015CCDF /* NestedModelsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModelsTests.h; sourceTree = ""; }; + 9C66DF80168CEF420015CCDF /* NestedModelsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = NestedModelsTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DF81168CEF420015CCDF /* OptionalPropertiesTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropertiesTests.h; sourceTree = ""; }; + 9C66DF82168CEF420015CCDF /* OptionalPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = OptionalPropertiesTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C66DF83168CEF420015CCDF /* PersistTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistTests.h; sourceTree = ""; }; + 9C66DF84168CEF420015CCDF /* PersistTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PersistTests.m; sourceTree = ""; }; + 9C66DF85168CEF420015CCDF /* PrimitiveTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitiveTypesReadTests.h; sourceTree = ""; }; + 9C66DF86168CEF420015CCDF /* PrimitiveTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PrimitiveTypesReadTests.m; sourceTree = ""; }; + 9C66DF87168CEF420015CCDF /* SimpleDataErrorTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleDataErrorTests.h; sourceTree = ""; }; + 9C66DF88168CEF420015CCDF /* SimpleDataErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleDataErrorTests.m; sourceTree = ""; }; + 9C66DFA6168CEF420015CCDF /* ValidationTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidationTestSuite.h; sourceTree = ""; }; + 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidationTestSuite.m; sourceTree = ""; }; + 9C735D62170B716300FF96F5 /* JSONAPITests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPITests.h; sourceTree = ""; }; + 9C735D63170B716300FF96F5 /* JSONAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPITests.m; sourceTree = ""; }; + 9C735D6E170C007900FF96F5 /* InitFromWebTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitFromWebTests.h; sourceTree = ""; }; + 9C735D6F170C007900FF96F5 /* InitFromWebTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitFromWebTests.m; sourceTree = ""; }; + 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 9CB1EE40172C1136004BAA07 /* SpecialPropertyNameTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyNameTests.h; sourceTree = ""; }; + 9CB1EE41172C1136004BAA07 /* SpecialPropertyNameTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SpecialPropertyNameTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9CB1EE46172C1205004BAA07 /* specialPropertyName.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = specialPropertyName.json; sourceTree = ""; }; + 9CBBBED8166B6CF0008B4326 /* iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 9CBBBEE4166B6CF0008B4326 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9CBBBEE6166B6CF0008B4326 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 9CBBBEE8166B6CF0008B4326 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 9CBBBEEB166B6CF0008B4326 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 9CBBBEEC166B6CF0008B4326 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 9CBBBEEE166B6CF0008B4326 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 9CBBBEF0166B6CF0008B4326 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 9CBBBEF2166B6CF0008B4326 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 9CBBBEF4166B6CF0008B4326 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = ""; }; + 9CBBBEF5166B6CF0008B4326 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = ""; }; + 9CBBBEFB166B6CF0008B4326 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MasterViewController.xib; sourceTree = ""; }; + 9CBBBF05166B6CF0008B4326 /* iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 9CBBBF74166BA80F008B4326 /* KivaViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaViewController.h; sourceTree = ""; }; + 9CBBBF75166BA80F008B4326 /* KivaViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaViewController.m; sourceTree = ""; }; + 9CBBBF76166BA80F008B4326 /* KivaViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KivaViewController.xib; sourceTree = ""; }; + 9CBBBF7A166BA86A008B4326 /* LoanModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoanModel.h; sourceTree = ""; }; + 9CBBBF7B166BA86A008B4326 /* LoanModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoanModel.m; sourceTree = ""; }; + 9CBBBF7C166BA86A008B4326 /* LocationModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationModel.h; sourceTree = ""; }; + 9CBBBF7D166BA86A008B4326 /* LocationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationModel.m; sourceTree = ""; }; + 9CBBBF7E166BA86A008B4326 /* KivaFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaFeed.h; sourceTree = ""; }; + 9CBBBF7F166BA86A008B4326 /* KivaFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaFeed.m; sourceTree = ""; }; + 9CBBBF89166BAC54008B4326 /* btnCheck.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btnCheck.png; sourceTree = ""; }; + 9CBBBF8A166BAC54008B4326 /* btnCheck@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btnCheck@2x.png"; sourceTree = ""; }; + 9CBBBF8B166BAC54008B4326 /* HUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HUD.h; sourceTree = ""; }; + 9CBBBF8C166BAC54008B4326 /* HUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HUD.m; sourceTree = ""; }; + 9CBBBF8D166BAC54008B4326 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = ""; }; + 9CBBBF8E166BAC54008B4326 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = ""; }; + 9CBBBF94166BAED2008B4326 /* GitHubViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubViewController.h; sourceTree = ""; }; + 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubViewController.m; sourceTree = ""; }; + 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GitHubViewController.xib; sourceTree = ""; }; + 9CBBBF9A166BAEF5008B4326 /* GitHubUserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubUserModel.h; sourceTree = ""; }; + 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubUserModel.m; sourceTree = ""; }; + 9CBBBFAF166BBB05008B4326 /* MyDataModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyDataModel.h; sourceTree = ""; }; + 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDataModel.m; sourceTree = ""; }; + 9CBBBFB2166BBB21008B4326 /* StorageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageViewController.h; sourceTree = ""; }; + 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StorageViewController.m; sourceTree = ""; }; + 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = StorageViewController.xib; sourceTree = ""; }; + 9CBD6D4F18FF2D7D00DE66EC /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 9CC2FCD2168CE7830059FE67 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 9CC2FCD5168CE7830059FE67 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9CCAFD911901B44300314886 /* SpecialPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertiesTests.m; sourceTree = ""; }; + 9CD425721701FDE500A42AA1 /* HTTPClientSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPClientSuite.h; sourceTree = ""; }; + 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPClientSuite.m; sourceTree = ""; }; + 9CD425761701FF2100A42AA1 /* MTTestSemaphor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTTestSemaphor.h; sourceTree = ""; }; + 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTTestSemaphor.m; sourceTree = ""; }; + 9CD425791702002900A42AA1 /* MockNSURLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockNSURLConnection.h; sourceTree = ""; }; + 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MockNSURLConnection.m; sourceTree = ""; }; + 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialValuesTests.m; sourceTree = ""; }; + 9CFDD0A6176E977C007B7DFA /* BuiltInConversionsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsModel.h; sourceTree = ""; }; + 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsModel.m; sourceTree = ""; }; + 9CFDD0A8176E977C007B7DFA /* CopyrightModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyrightModel.h; sourceTree = ""; }; + 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyrightModel.m; sourceTree = ""; }; + 9CFDD0AA176E977C007B7DFA /* CustomPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropertyModel.h; sourceTree = ""; }; + 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropertyModel.m; sourceTree = ""; }; + 9CFDD0AC176E977C007B7DFA /* EnumModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumModel.h; sourceTree = ""; }; + 9CFDD0AD176E977C007B7DFA /* EnumModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EnumModel.m; sourceTree = ""; }; + 9CFDD0AE176E977C007B7DFA /* GitHubKeyMapRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModel.h; sourceTree = ""; }; + 9CFDD0AF176E977C007B7DFA /* GitHubKeyMapRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModel.m; sourceTree = ""; }; + 9CFDD0B0176E977C007B7DFA /* GitHubKeyMapRepoModelDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModelDict.h; sourceTree = ""; }; + 9CFDD0B1176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModelDict.m; sourceTree = ""; }; + 9CFDD0B2176E977C007B7DFA /* GitHubRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModel.h; sourceTree = ""; }; + 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModel.m; sourceTree = ""; }; + 9CFDD0B4176E977C007B7DFA /* GitHubRepoModelForUSMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModelForUSMapper.h; sourceTree = ""; }; + 9CFDD0B5176E977C007B7DFA /* GitHubRepoModelForUSMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModelForUSMapper.m; sourceTree = ""; }; + 9CFDD0B6176E977C007B7DFA /* ImageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageModel.h; sourceTree = ""; }; + 9CFDD0B7176E977C007B7DFA /* ImageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageModel.m; sourceTree = ""; }; + 9CFDD0B8176E977C007B7DFA /* JSONTypesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModel.h; sourceTree = ""; }; + 9CFDD0B9176E977C007B7DFA /* JSONTypesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModel.m; sourceTree = ""; }; + 9CFDD0BA176E977C007B7DFA /* NestedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModel.h; sourceTree = ""; }; + 9CFDD0BB176E977C007B7DFA /* NestedModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModel.m; sourceTree = ""; }; + 9CFDD0BC176E977C007B7DFA /* OptionalPropModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropModel.h; sourceTree = ""; }; + 9CFDD0BD176E977C007B7DFA /* OptionalPropModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropModel.m; sourceTree = ""; }; + 9CFDD0BE176E977C007B7DFA /* PostModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostModel.h; sourceTree = ""; }; + 9CFDD0BF176E977C007B7DFA /* PostModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostModel.m; sourceTree = ""; }; + 9CFDD0C0176E977C007B7DFA /* PostsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostsModel.h; sourceTree = ""; }; + 9CFDD0C1176E977C007B7DFA /* PostsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostsModel.m; sourceTree = ""; }; + 9CFDD0C2176E977C007B7DFA /* PrimitivesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitivesModel.h; sourceTree = ""; }; + 9CFDD0C3176E977C007B7DFA /* PrimitivesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitivesModel.m; sourceTree = ""; }; + 9CFDD0C4176E977C007B7DFA /* ReposModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReposModel.h; sourceTree = ""; }; + 9CFDD0C5176E977C007B7DFA /* ReposModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReposModel.m; sourceTree = ""; }; + 9CFDD0C6176E977C007B7DFA /* RpcRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RpcRequestModel.h; sourceTree = ""; }; + 9CFDD0C7176E977C007B7DFA /* RpcRequestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RpcRequestModel.m; sourceTree = ""; }; + 9CFDD0C8176E977C007B7DFA /* SpecialPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyModel.h; sourceTree = ""; }; + 9CFDD0C9176E977C007B7DFA /* SpecialPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyModel.m; sourceTree = ""; }; + D66F555A1EB344B7A5FF0D85 /* ModelForUpperCaseMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelForUpperCaseMapper.h; sourceTree = ""; }; + D66F58FBC6313C65C9357A2F /* ModelForUpperCaseMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelForUpperCaseMapper.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9CBBBED5166B6CF0008B4326 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9C55AF0718903127004EBD8A /* CoreData.framework in Frameworks */, + 9CA6B10216FCAAEE00B3E78E /* SystemConfiguration.framework in Frameworks */, + 9CBBBEDD166B6CF0008B4326 /* UIKit.framework in Frameworks */, + 9CBBBEDF166B6CF0008B4326 /* Foundation.framework in Frameworks */, + 9CBBBEE1166B6CF0008B4326 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9CBBBF01166B6CF0008B4326 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9C28A14118B2A4D2002AEC1E /* CoreData.framework in Frameworks */, + 9CA6B10016FCA5B400B3E78E /* SystemConfiguration.framework in Frameworks */, + 9CBBBF65166B9E3E008B4326 /* CoreGraphics.framework in Frameworks */, + 9CBBBF08166B6CF0008B4326 /* UIKit.framework in Frameworks */, + 9CBBBF09166B6CF0008B4326 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9C05B2BB168CE9DE0054215E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 9CC2FCD1168CE7830059FE67 /* InfoPlist.strings */, + 9CC2FCD5168CE7830059FE67 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 9C0D023C166E6B7A001EA645 /* KivaJSONDemo+networking */ = { + isa = PBXGroup; + children = ( + 9C0D023D166E6BBF001EA645 /* KivaViewControllerNetworking.h */, + 9C0D023E166E6BBF001EA645 /* KivaViewControllerNetworking.m */, + 9C0D023F166E6BBF001EA645 /* KivaViewControllerNetworking.xib */, + ); + name = "KivaJSONDemo+networking"; + sourceTree = ""; + }; + 9C66DF5E168CEF420015CCDF /* UnitTests */ = { + isa = PBXGroup; + children = ( + 9CFDD0A5176E977B007B7DFA /* TestModels */, + 9C66DF5F168CEF420015CCDF /* ArrayTests.h */, + 9C66DF60168CEF420015CCDF /* ArrayTests.m */, + 9C66DF61168CEF420015CCDF /* BuiltInConversionsTests.h */, + 9C66DF62168CEF420015CCDF /* BuiltInConversionsTests.m */, + 9C66DF65168CEF420015CCDF /* CustomPropsTests.h */, + 9C66DF66168CEF420015CCDF /* CustomPropsTests.m */, + 9C66DF73168CEF420015CCDF /* IdPropertyTests.h */, + 9C66DF74168CEF420015CCDF /* IdPropertyTests.m */, + 9C66DF75168CEF420015CCDF /* JSONTypesModelWithValidation1.h */, + 9C66DF76168CEF420015CCDF /* JSONTypesModelWithValidation1.m */, + 9C66DF77168CEF420015CCDF /* JSONTypesModelWithValidation2.h */, + 9C66DF78168CEF420015CCDF /* JSONTypesModelWithValidation2.m */, + 9C66DF79168CEF420015CCDF /* JSONTypesReadTests.h */, + 9C66DF7A168CEF420015CCDF /* JSONTypesReadTests.m */, + 9C66DF7B168CEF420015CCDF /* JSONValueTransformer+UIColor.h */, + 9C66DF7C168CEF420015CCDF /* JSONValueTransformer+UIColor.m */, + 9C66DF7D168CEF420015CCDF /* KeyMappingTests.h */, + 9C66DF7E168CEF420015CCDF /* KeyMappingTests.m */, + 9C66DF7F168CEF420015CCDF /* NestedModelsTests.h */, + 9C66DF80168CEF420015CCDF /* NestedModelsTests.m */, + 9C66DF81168CEF420015CCDF /* OptionalPropertiesTests.h */, + 9C66DF82168CEF420015CCDF /* OptionalPropertiesTests.m */, + 9C66DF83168CEF420015CCDF /* PersistTests.h */, + 9C66DF84168CEF420015CCDF /* PersistTests.m */, + 9C66DF85168CEF420015CCDF /* PrimitiveTypesReadTests.h */, + 9C66DF86168CEF420015CCDF /* PrimitiveTypesReadTests.m */, + 9C66DF87168CEF420015CCDF /* SimpleDataErrorTests.h */, + 9C66DF88168CEF420015CCDF /* SimpleDataErrorTests.m */, + 9CB1EE40172C1136004BAA07 /* SpecialPropertyNameTests.h */, + 9CB1EE41172C1136004BAA07 /* SpecialPropertyNameTests.m */, + 9C66DFA6168CEF420015CCDF /* ValidationTestSuite.h */, + 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */, + 9CD425721701FDE500A42AA1 /* HTTPClientSuite.h */, + 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */, + 9C735D62170B716300FF96F5 /* JSONAPITests.h */, + 9C735D63170B716300FF96F5 /* JSONAPITests.m */, + 9C735D6E170C007900FF96F5 /* InitFromWebTests.h */, + 9C735D6F170C007900FF96F5 /* InitFromWebTests.m */, + 9CCAFD911901B44300314886 /* SpecialPropertiesTests.m */, + 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */, + 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */, + 358FD807C3E86F5DC4058645 /* ExtremeNestingTests.h */, + 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */, + ); + path = UnitTests; + sourceTree = ""; + }; + 9C66DF67168CEF420015CCDF /* DataFiles */ = { + isa = PBXGroup; + children = ( + 9C66DF68168CEF420015CCDF /* colors.json */, + 9C66DF69168CEF420015CCDF /* converts.json */, + 9C66DF6A168CEF420015CCDF /* github-iphone.json */, + 9C66DF6B168CEF420015CCDF /* jsonTypes.json */, + 9C66DF6C168CEF420015CCDF /* nestedData.json */, + 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */, + 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */, + 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */, + 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */, + 9C66DF6E168CEF420015CCDF /* post.json */, + 9C66DF6F168CEF420015CCDF /* primitives.json */, + 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */, + 9C66DF71168CEF420015CCDF /* withOptProp.json */, + 9C66DF72168CEF420015CCDF /* withoutOptProp.json */, + 9CB1EE46172C1205004BAA07 /* specialPropertyName.json */, + ); + name = DataFiles; + path = UnitTests/DataFiles; + sourceTree = ""; + }; + 9CBBBECD166B6CEF008B4326 = { + isa = PBXGroup; + children = ( + 9CBBBEE2166B6CF0008B4326 /* iOS */, + 9CC2FCBC168CE7830059FE67 /* Tests */, + 9CBBBEDB166B6CF0008B4326 /* Frameworks */, + 9CBBBED9166B6CF0008B4326 /* Products */, + ); + indentWidth = 4; + sourceTree = ""; + tabWidth = 4; + usesTabs = 0; + }; + 9CBBBED9166B6CF0008B4326 /* Products */ = { + isa = PBXGroup; + children = ( + 9CBBBED8166B6CF0008B4326 /* iOS.app */, + 9CBBBF05166B6CF0008B4326 /* iOSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 9CBBBEDB166B6CF0008B4326 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 9CBD6D4F18FF2D7D00DE66EC /* XCTest.framework */, + 9C55AF0618903127004EBD8A /* CoreData.framework */, + 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */, + 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */, + 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */, + 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 9CBBBEE2166B6CF0008B4326 /* iOS */ = { + isa = PBXGroup; + children = ( + 9CBBBFAD166BB87B008B4326 /* DemoApp */, + 9CBBBF87166BAC31008B4326 /* libs */, + 9CBBBF93166BAEB2008B4326 /* GitHubDemo */, + 9CBBBFAE166BBADA008B4326 /* UsedAsStorageDemo */, + 9CBBBF73166BA7E1008B4326 /* KivaJSONDemo */, + 9C0D023C166E6B7A001EA645 /* KivaJSONDemo+networking */, + ); + path = iOS; + sourceTree = ""; + }; + 9CBBBEE3166B6CF0008B4326 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 9CBBBEE4166B6CF0008B4326 /* Info.plist */, + 9CBBBEE5166B6CF0008B4326 /* InfoPlist.strings */, + 9CBBBEE8166B6CF0008B4326 /* main.m */, + 9CBBBEEE166B6CF0008B4326 /* Default.png */, + 9CBBBEF0166B6CF0008B4326 /* Default@2x.png */, + 9CBBBEF2166B6CF0008B4326 /* Default-568h@2x.png */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 9CBBBF73166BA7E1008B4326 /* KivaJSONDemo */ = { + isa = PBXGroup; + children = ( + 9CBBBF79166BA857008B4326 /* KivaModels */, + 9CBBBF74166BA80F008B4326 /* KivaViewController.h */, + 9CBBBF75166BA80F008B4326 /* KivaViewController.m */, + 9CBBBF76166BA80F008B4326 /* KivaViewController.xib */, + ); + name = KivaJSONDemo; + sourceTree = ""; + }; + 9CBBBF79166BA857008B4326 /* KivaModels */ = { + isa = PBXGroup; + children = ( + 9CBBBF7A166BA86A008B4326 /* LoanModel.h */, + 9CBBBF7B166BA86A008B4326 /* LoanModel.m */, + 9CBBBF7C166BA86A008B4326 /* LocationModel.h */, + 9CBBBF7D166BA86A008B4326 /* LocationModel.m */, + 9CBBBF7E166BA86A008B4326 /* KivaFeed.h */, + 9CBBBF7F166BA86A008B4326 /* KivaFeed.m */, + ); + name = KivaModels; + sourceTree = ""; + }; + 9CBBBF87166BAC31008B4326 /* libs */ = { + isa = PBXGroup; + children = ( + 9CBBBF88166BAC43008B4326 /* HUD */, + ); + name = libs; + sourceTree = ""; + }; + 9CBBBF88166BAC43008B4326 /* HUD */ = { + isa = PBXGroup; + children = ( + 9CBBBF89166BAC54008B4326 /* btnCheck.png */, + 9CBBBF8A166BAC54008B4326 /* btnCheck@2x.png */, + 9CBBBF8B166BAC54008B4326 /* HUD.h */, + 9CBBBF8C166BAC54008B4326 /* HUD.m */, + 9CBBBF8D166BAC54008B4326 /* MBProgressHUD.h */, + 9CBBBF8E166BAC54008B4326 /* MBProgressHUD.m */, + ); + name = HUD; + sourceTree = ""; + }; + 9CBBBF93166BAEB2008B4326 /* GitHubDemo */ = { + isa = PBXGroup; + children = ( + 9CBBBF99166BAEDF008B4326 /* GitHubModels */, + 9CBBBF94166BAED2008B4326 /* GitHubViewController.h */, + 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */, + 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */, + ); + name = GitHubDemo; + sourceTree = ""; + }; + 9CBBBF99166BAEDF008B4326 /* GitHubModels */ = { + isa = PBXGroup; + children = ( + 9CBBBF9A166BAEF5008B4326 /* GitHubUserModel.h */, + 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */, + ); + name = GitHubModels; + sourceTree = ""; + }; + 9CBBBFAD166BB87B008B4326 /* DemoApp */ = { + isa = PBXGroup; + children = ( + 9CBBBEE3166B6CF0008B4326 /* Supporting Files */, + 9CBBBEEB166B6CF0008B4326 /* AppDelegate.h */, + 9CBBBEEC166B6CF0008B4326 /* AppDelegate.m */, + 9CBBBEF4166B6CF0008B4326 /* MasterViewController.h */, + 9CBBBEF5166B6CF0008B4326 /* MasterViewController.m */, + 9CBBBEFA166B6CF0008B4326 /* MasterViewController.xib */, + ); + name = DemoApp; + sourceTree = ""; + }; + 9CBBBFAE166BBADA008B4326 /* UsedAsStorageDemo */ = { + isa = PBXGroup; + children = ( + 9CBBBFB7166BBB27008B4326 /* StorageModel */, + 9CBBBFB2166BBB21008B4326 /* StorageViewController.h */, + 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */, + 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */, + ); + name = UsedAsStorageDemo; + sourceTree = ""; + }; + 9CBBBFB7166BBB27008B4326 /* StorageModel */ = { + isa = PBXGroup; + children = ( + 9CBBBFAF166BBB05008B4326 /* MyDataModel.h */, + 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */, + ); + name = StorageModel; + sourceTree = ""; + }; + 9CC2FCBC168CE7830059FE67 /* Tests */ = { + isa = PBXGroup; + children = ( + 9CD4257C1702003600A42AA1 /* Class */, + 9C66DF67168CEF420015CCDF /* DataFiles */, + 9C66DF5E168CEF420015CCDF /* UnitTests */, + 9C05B2BB168CE9DE0054215E /* Supporting Files */, + ); + path = Tests; + sourceTree = ""; + }; + 9CD4257C1702003600A42AA1 /* Class */ = { + isa = PBXGroup; + children = ( + 9CD425791702002900A42AA1 /* MockNSURLConnection.h */, + 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */, + 9CD425761701FF2100A42AA1 /* MTTestSemaphor.h */, + 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */, + ); + name = Class; + sourceTree = ""; + }; + 9CFDD0A5176E977B007B7DFA /* TestModels */ = { + isa = PBXGroup; + children = ( + 9CFDD0A6176E977C007B7DFA /* BuiltInConversionsModel.h */, + 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */, + 9CFDD0A8176E977C007B7DFA /* CopyrightModel.h */, + 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */, + 9CFDD0AA176E977C007B7DFA /* CustomPropertyModel.h */, + 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */, + 9CFDD0AC176E977C007B7DFA /* EnumModel.h */, + 9CFDD0AD176E977C007B7DFA /* EnumModel.m */, + 9CFDD0AE176E977C007B7DFA /* GitHubKeyMapRepoModel.h */, + 9CFDD0AF176E977C007B7DFA /* GitHubKeyMapRepoModel.m */, + 9CFDD0B0176E977C007B7DFA /* GitHubKeyMapRepoModelDict.h */, + 9CFDD0B1176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m */, + 9CFDD0B2176E977C007B7DFA /* GitHubRepoModel.h */, + 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */, + 9CFDD0B4176E977C007B7DFA /* GitHubRepoModelForUSMapper.h */, + 9CFDD0B5176E977C007B7DFA /* GitHubRepoModelForUSMapper.m */, + 9CFDD0B6176E977C007B7DFA /* ImageModel.h */, + 9CFDD0B7176E977C007B7DFA /* ImageModel.m */, + 9CFDD0B8176E977C007B7DFA /* JSONTypesModel.h */, + 9CFDD0B9176E977C007B7DFA /* JSONTypesModel.m */, + 9CFDD0BA176E977C007B7DFA /* NestedModel.h */, + 9CFDD0BB176E977C007B7DFA /* NestedModel.m */, + 9CFDD0BC176E977C007B7DFA /* OptionalPropModel.h */, + 9CFDD0BD176E977C007B7DFA /* OptionalPropModel.m */, + 9CFDD0BE176E977C007B7DFA /* PostModel.h */, + 9CFDD0BF176E977C007B7DFA /* PostModel.m */, + 9CFDD0C0176E977C007B7DFA /* PostsModel.h */, + 9CFDD0C1176E977C007B7DFA /* PostsModel.m */, + 9CFDD0C2176E977C007B7DFA /* PrimitivesModel.h */, + 9CFDD0C3176E977C007B7DFA /* PrimitivesModel.m */, + 9CFDD0C4176E977C007B7DFA /* ReposModel.h */, + 9CFDD0C5176E977C007B7DFA /* ReposModel.m */, + 9CFDD0C6176E977C007B7DFA /* RpcRequestModel.h */, + 9CFDD0C7176E977C007B7DFA /* RpcRequestModel.m */, + 9CFDD0C8176E977C007B7DFA /* SpecialPropertyModel.h */, + 9CFDD0C9176E977C007B7DFA /* SpecialPropertyModel.m */, + D66F555A1EB344B7A5FF0D85 /* ModelForUpperCaseMapper.h */, + D66F58FBC6313C65C9357A2F /* ModelForUpperCaseMapper.m */, + 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */, + 358FD7AD55FD213CBAAB460F /* ExtremeNestingModel.h */, + 358FD25356988AC33EA6A935 /* DrugModel.m */, + 358FDA6A1D0805B6ABE4720D /* DrugModel.h */, + 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */, + 358FDED5E028AA00D3E6564D /* InteractionModel.h */, + 1AE9CA8E1C21F47600B8F5C1 /* RenamedPropertyModel.h */, + 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */, + ); + path = TestModels; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 9CBBBED7166B6CF0008B4326 /* iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9CBBBF17166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "iOS" */; + buildPhases = ( + 9CBBBED4166B6CF0008B4326 /* Sources */, + 9CBBBED5166B6CF0008B4326 /* Frameworks */, + 9CBBBED6166B6CF0008B4326 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iOS; + productName = JSONModelDemo; + productReference = 9CBBBED8166B6CF0008B4326 /* iOS.app */; + productType = "com.apple.product-type.application"; + }; + 9CBBBF04166B6CF0008B4326 /* iOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9CBBBF1A166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "iOSTests" */; + buildPhases = ( + 9CBBBF00166B6CF0008B4326 /* Sources */, + 9CBBBF01166B6CF0008B4326 /* Frameworks */, + 9CBBBF02166B6CF0008B4326 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 9CBBBF0B166B6CF0008B4326 /* PBXTargetDependency */, + ); + name = iOSTests; + productName = JSONModelDemoTests; + productReference = 9CBBBF05166B6CF0008B4326 /* iOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 9CBBBECF166B6CEF008B4326 /* Project object */ = { + isa = PBXProject; + attributes = { + LastTestingUpgradeCheck = 0510; + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = "Underplot ltd."; + }; + buildConfigurationList = 9CBBBED2166B6CEF008B4326 /* Build configuration list for PBXProject "iOS" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 9CBBBECD166B6CEF008B4326; + productRefGroup = 9CBBBED9166B6CF0008B4326 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9CBBBED7166B6CF0008B4326 /* iOS */, + 9CBBBF04166B6CF0008B4326 /* iOSTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 9CBBBED6166B6CF0008B4326 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9CBBBEE7166B6CF0008B4326 /* InfoPlist.strings in Resources */, + 9CBBBEEF166B6CF0008B4326 /* Default.png in Resources */, + 9CBBBEF1166B6CF0008B4326 /* Default@2x.png in Resources */, + 9CBBBEF3166B6CF0008B4326 /* Default-568h@2x.png in Resources */, + 9CBBBEFC166B6CF0008B4326 /* MasterViewController.xib in Resources */, + 9CBBBF78166BA80F008B4326 /* KivaViewController.xib in Resources */, + 9CBBBF8F166BAC54008B4326 /* btnCheck.png in Resources */, + 9CBBBF90166BAC54008B4326 /* btnCheck@2x.png in Resources */, + 69286BDA17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */, + 9CBBBF98166BAED2008B4326 /* GitHubViewController.xib in Resources */, + 9CBBBFB6166BBB21008B4326 /* StorageViewController.xib in Resources */, + 9C0D0241166E6BBF001EA645 /* KivaViewControllerNetworking.xib in Resources */, + 9CC2FD2B168CE7830059FE67 /* Info.plist in Resources */, + 9C66DFD1168CEF530015CCDF /* colors.json in Resources */, + 9C66DFD2168CEF530015CCDF /* converts.json in Resources */, + 9C66DFD3168CEF530015CCDF /* github-iphone.json in Resources */, + 9C66DFD4168CEF530015CCDF /* jsonTypes.json in Resources */, + 9C66DFD5168CEF530015CCDF /* nestedData.json in Resources */, + 9C66DFD6168CEF530015CCDF /* nestedDataWithArrayError.json in Resources */, + 9C66DFD7168CEF530015CCDF /* post.json in Resources */, + 9C66DFD8168CEF530015CCDF /* primitives.json in Resources */, + 9C66DFD9168CEF530015CCDF /* primitivesWithErrors.json in Resources */, + 9C66DFDA168CEF530015CCDF /* withOptProp.json in Resources */, + 9C66DFDB168CEF530015CCDF /* withoutOptProp.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9CBBBF02166B6CF0008B4326 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9C66DFAC168CEF420015CCDF /* colors.json in Resources */, + 9C66DFAD168CEF420015CCDF /* converts.json in Resources */, + 9C66DFAE168CEF420015CCDF /* github-iphone.json in Resources */, + 9C66DFAF168CEF420015CCDF /* jsonTypes.json in Resources */, + 9C66DFB0168CEF420015CCDF /* nestedData.json in Resources */, + 9C66DFB1168CEF420015CCDF /* nestedDataWithArrayError.json in Resources */, + 9C66DFB2168CEF420015CCDF /* post.json in Resources */, + 9C66DFB3168CEF420015CCDF /* primitives.json in Resources */, + 9C66DFB4168CEF420015CCDF /* primitivesWithErrors.json in Resources */, + 9C66DFB5168CEF420015CCDF /* withOptProp.json in Resources */, + 9C66DFB6168CEF420015CCDF /* withoutOptProp.json in Resources */, + 9CB1EE47172C1205004BAA07 /* specialPropertyName.json in Resources */, + 697852FD17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json in Resources */, + 69286BDB17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */, + 697852FF17D93547006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 9CBBBED4166B6CF0008B4326 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9CBBBEE9166B6CF0008B4326 /* main.m in Sources */, + 9CBBBEED166B6CF0008B4326 /* AppDelegate.m in Sources */, + 9CBBBEF6166B6CF0008B4326 /* MasterViewController.m in Sources */, + 9CBBBF77166BA80F008B4326 /* KivaViewController.m in Sources */, + 9CBBBF80166BA86A008B4326 /* LoanModel.m in Sources */, + 9CBBBF81166BA86A008B4326 /* LocationModel.m in Sources */, + 9CBBBF82166BA86A008B4326 /* KivaFeed.m in Sources */, + 9CBBBF91166BAC54008B4326 /* HUD.m in Sources */, + 9CBBBF92166BAC54008B4326 /* MBProgressHUD.m in Sources */, + 9CBBBF97166BAED2008B4326 /* GitHubViewController.m in Sources */, + 9CBBBF9C166BAEF5008B4326 /* GitHubUserModel.m in Sources */, + 9C55AF0F189033AE004EBD8A /* GitHubRepoModel.m in Sources */, + 9CBBBFB1166BBB05008B4326 /* MyDataModel.m in Sources */, + 9CBBBFB5166BBB21008B4326 /* StorageViewController.m in Sources */, + 9C0D0240166E6BBF001EA645 /* KivaViewControllerNetworking.m in Sources */, + 1AE9CA901C21F47600B8F5C1 /* RenamedPropertyModel.m in Sources */, + 9C55AF0E18903300004EBD8A /* ReposModel.m in Sources */, + 358FD078D3C0D56C77ACD770 /* ExtremeNestingModel.m in Sources */, + 358FD640BFEAB00349FBBA4A /* DrugModel.m in Sources */, + 358FD179E0B41C47C67713B5 /* InteractionModel.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9CBBBF00166B6CF0008B4326 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9C66DFA8168CEF420015CCDF /* ArrayTests.m in Sources */, + 9C66DFA9168CEF420015CCDF /* BuiltInConversionsTests.m in Sources */, + 9C66DFAB168CEF420015CCDF /* CustomPropsTests.m in Sources */, + 9C66DFB7168CEF420015CCDF /* IdPropertyTests.m in Sources */, + 9C66DFB8168CEF420015CCDF /* JSONTypesModelWithValidation1.m in Sources */, + 9C66DFB9168CEF420015CCDF /* JSONTypesModelWithValidation2.m in Sources */, + 9C66DFBA168CEF420015CCDF /* JSONTypesReadTests.m in Sources */, + 9CF21CE91CA28A200076A4C7 /* SpecialValuesTests.m in Sources */, + 9C66DFBB168CEF420015CCDF /* JSONValueTransformer+UIColor.m in Sources */, + 9C66DFBC168CEF420015CCDF /* KeyMappingTests.m in Sources */, + 9C66DFBD168CEF420015CCDF /* NestedModelsTests.m in Sources */, + 9C66DFBE168CEF420015CCDF /* OptionalPropertiesTests.m in Sources */, + 9C66DFBF168CEF420015CCDF /* PersistTests.m in Sources */, + 9C66DFC0168CEF420015CCDF /* PrimitiveTypesReadTests.m in Sources */, + 9C66DFC1168CEF420015CCDF /* SimpleDataErrorTests.m in Sources */, + 9C66DFD0168CEF420015CCDF /* ValidationTestSuite.m in Sources */, + 9CCAFD921901B44300314886 /* SpecialPropertiesTests.m in Sources */, + 9CB1EE42172C1136004BAA07 /* SpecialPropertyNameTests.m in Sources */, + 4A50001D19C5DCCF00C161A0 /* InitWithDataTests.m in Sources */, + 9CD425751701FE0000A42AA1 /* HTTPClientSuite.m in Sources */, + 9CD425781701FF2100A42AA1 /* MTTestSemaphor.m in Sources */, + 9CD4257B1702002900A42AA1 /* MockNSURLConnection.m in Sources */, + 9C735D64170B716300FF96F5 /* JSONAPITests.m in Sources */, + 9C735D70170C007900FF96F5 /* InitFromWebTests.m in Sources */, + 9CFDD0CA176E977C007B7DFA /* BuiltInConversionsModel.m in Sources */, + 9CFDD0CB176E977C007B7DFA /* CopyrightModel.m in Sources */, + 9CFDD0CC176E977C007B7DFA /* CustomPropertyModel.m in Sources */, + 9CFDD0CD176E977C007B7DFA /* EnumModel.m in Sources */, + 9CFDD0CE176E977C007B7DFA /* GitHubKeyMapRepoModel.m in Sources */, + 9CFDD0CF176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m in Sources */, + 9CFDD0D0176E977C007B7DFA /* GitHubRepoModel.m in Sources */, + 9CFDD0D1176E977C007B7DFA /* GitHubRepoModelForUSMapper.m in Sources */, + 9CFDD0D2176E977C007B7DFA /* ImageModel.m in Sources */, + 9CFDD0D3176E977C007B7DFA /* JSONTypesModel.m in Sources */, + 9CFDD0D4176E977C007B7DFA /* NestedModel.m in Sources */, + 9CFDD0D5176E977C007B7DFA /* OptionalPropModel.m in Sources */, + 9CFDD0D6176E977C007B7DFA /* PostModel.m in Sources */, + 9CFDD0D7176E977C007B7DFA /* PostsModel.m in Sources */, + 9CFDD0D8176E977C007B7DFA /* PrimitivesModel.m in Sources */, + 9CFDD0D9176E977C007B7DFA /* ReposModel.m in Sources */, + 9CFDD0DA176E977C007B7DFA /* RpcRequestModel.m in Sources */, + 9CFDD0DB176E977C007B7DFA /* SpecialPropertyModel.m in Sources */, + D66F5792A312B021F52F7BFF /* ModelForUpperCaseMapper.m in Sources */, + 358FD61804BD21F41035348E /* ExtremeNestingTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 9CBBBF0B166B6CF0008B4326 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9CBBBED7166B6CF0008B4326 /* iOS */; + targetProxy = 9CBBBF0A166B6CF0008B4326 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 9CBBBEE5166B6CF0008B4326 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 9CBBBEE6166B6CF0008B4326 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 9CBBBEFA166B6CF0008B4326 /* MasterViewController.xib */ = { + isa = PBXVariantGroup; + children = ( + 9CBBBEFB166B6CF0008B4326 /* en */, + ); + name = MasterViewController.xib; + sourceTree = ""; + }; + 9CC2FCD1168CE7830059FE67 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 9CC2FCD2168CE7830059FE67 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 9CBBBF15166B6CF0008B4326 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 9CBBBF16166B6CF0008B4326 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 9CBBBF18166B6CF0008B4326 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = iOS; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 9CBBBF19166B6CF0008B4326 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = iOS; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 9CBBBF1B166B6CF0008B4326 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS.app/iOS"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + "UNIT_TESTING=1", + ); + INFOPLIST_FILE = Tests/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = iOSTests; + TEST_HOST = "$(BUNDLE_LOADER)"; + }; + name = Debug; + }; + 9CBBBF1C166B6CF0008B4326 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS.app/iOS"; + INFOPLIST_FILE = Tests/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = iOSTests; + TEST_HOST = "$(BUNDLE_LOADER)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 9CBBBED2166B6CEF008B4326 /* Build configuration list for PBXProject "iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9CBBBF15166B6CF0008B4326 /* Debug */, + 9CBBBF16166B6CF0008B4326 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9CBBBF17166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9CBBBF18166B6CF0008B4326 /* Debug */, + 9CBBBF19166B6CF0008B4326 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9CBBBF1A166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "iOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9CBBBF1B166B6CF0008B4326 /* Debug */, + 9CBBBF1C166B6CF0008B4326 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 9CBBBECF166B6CEF008B4326 /* Project object */; +} diff --git a/Demos/iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Demos/iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..7648c4a7 --- /dev/null +++ b/Demos/iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Demos/iOS/AppDelegate.h b/Demos/iOS/AppDelegate.h new file mode 100644 index 00000000..913f91e6 --- /dev/null +++ b/Demos/iOS/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@property (strong, nonatomic) UINavigationController *navigationController; + +@end diff --git a/Demos/iOS/AppDelegate.m b/Demos/iOS/AppDelegate.m new file mode 100644 index 00000000..4349247f --- /dev/null +++ b/Demos/iOS/AppDelegate.m @@ -0,0 +1,55 @@ +// +// AppDelegate.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "AppDelegate.h" + +#import "MasterViewController.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + // Override point for customization after application launch. + + MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil]; + self.navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController]; + self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; + self.window.rootViewController = self.navigationController; + [self.window makeKeyAndVisible]; + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/Demos/iOS/Default-568h@2x.png b/Demos/iOS/Default-568h@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0891b7aabfcf3422423b109c8beed2bab838c607 GIT binary patch literal 18594 zcmeI4X;f257Jx&9fS`ixvS;&$x8J@slQFSel)6zJN=?13FB7H(lQjRkSy8x_-S~tvu2gzn1oS+dLcF#eqtq$ z%tf9TTvX?`)R@}3uBI;jzS-=ZR-Td&MHaS&;!0?Ni*#$#`n*~CcQK)Q9vAQ~TUpnI!j)a2biYK^R)M~A5wUDZhx?ULMX z3x1P&qt=trOY6P2U67L=m=U?F|5#Uj(eCueNTZaHs_ceWiHeET+j+tp3Jt9g(ekqP z2WOvfR{qV+9r+o4J5?qK>7;;^+I7tGv-i)es$X_D=EoKF+S?zsyj^oRFElP}c}JT< zd8SUs-?O?}2YD#ngKbnHgzHBcboxK_2r9l(?eNCl-pEzkJm}fY?WC*jnS?VBE4EpY zO$fEejz6fU;W2Kl>JeQBZBl-%Irg`obSlg*@4QB;Dd1H7^Oi5wvt4d{RZ!8Og?^aE z)k0$1g+V3fd(gdQ3d&q2q-FL*uy#}|bc^=VhFsl0jBgUGJ+-s3U8MK9A!YJJMxpci z5hJ%|{DwV48fZn0{n5l$N_KcSb#NKE4plB`9I6Zt=Z!~-zw0{9tg$L&Ju1F0X)Cy8 zKF;(&lJ>x)Jw(=;p~sF(Sd9VWGwFE2rnyS9!f^DZ8+aCLq zQ};>lcJ1GDLqjm6Hd>|Eabno@P`~Bn(~6^aD_#yoEH(a?Nm1S<;S+hSxI5d16^<1lEM3NPFi zkqPrpL)+ zgnseFikg`gJVBha1&7C4;O6>h=dt~`ND+;Zd?W(4v2JIb7Pt>Td42%M-Ju-XAH#Pns762L}K3 zDhvsRqN0Ni(1UrishD2YvV?4*h2iFj$+&N||Fn$4n|^NSU+o?~jq`0jVQt8T9l{7b zXiwwODFh2V!Q6sqP9S>WH$oOf$N~=d0-bqTlD61!=`&0eAP-F>XN?*|gtOXX{ zQVTWyYo4ZK0GAw!GHf|pz9`D;-bbb*5LBX*{bnz|+)$@&P9|ORM2o?95{;ejvo&r- zq8cBhTN6nn)7~W>54U)%-F_-b?YKdfk5I8MHcuzBD5)!;yv#Z&R&^y=@=>VTIMy#r zX&U<=BsPkdqcMe<_}2+>H%XKyrr5ZR8_KVe>ZqYN z^=^~TFD};;rHJ$U;{~w^hYojl4hRI@SH$^K{YEo=sg)WY87r!*7blQK&qnpDo0`Vn zkl)9u9g=mCh&ZCJS(L4yN3k0kQ zuvg$h2KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u literal 0 HcmV?d00001 diff --git a/Demos/iOS/Default.png b/Demos/iOS/Default.png new file mode 100644 index 0000000000000000000000000000000000000000..4c8ca6f693f96d511e9113c0eb59eec552354e42 GIT binary patch literal 6540 zcmeAS@N?(olHy`uVBq!ia0y~yU~~ZD2OMlbkt;o0To@QwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoOb(*3gH$%aYWC zkHmcab=va2<#X%jakpJ;<1@F;k__#bwtC&%^D0v(FBh9K&$sK+<}2RJS609D)17$w ztdQP8(eLM8Ka}m_IQ@3wyMKP)l=oM4-?`YS_*P?4V_ORLPxsj&7Ju#kH;>6^Kp?T7~ zl+q?{UOOqV==?+d{=)5s|M~T1mwtH@+Z^$G&eEO9JNP^AX@3jZ*J*!!>lc|1-W%fA z@AOQpXZ_Lt>rxFXrGp*zLPiW@uo_c7C{As>j zWeX)wi+LTp_)@KYZCX{j;H?|1yXT4DnlS(Fr8gyP5|uaX_gLvaW0ScZdnG7o+u{T6 zFI-%d{ls*WuCDa5UJ@|RXv&ejZe}*BMkiWY51&pnRPw(hlykSzvj6e%mYz-GdvzBD zF10?szF_~!jS=?2HyQuPCvARXAe}C}WP|yQ*>5~~=*Nxq8+HHW1~FMDRCP^TcacKuk$ z(U#REVv)D!PhJ*ecH-ELFUrfyV&*)Z)>UCOuS?yd^L@Afk>ihynYPc{^CRwu+JHX+#$@YsC4c|l0tGigsn@jy) zXD($Ouk>H+V(Mr6NQT0S9BFM~V6nkj;1OBOz`zY;a|<&v%$g$sEJPk;hD4M^`1)8S z=jZArrsOB3>Q&?x097+E*i={nnYpPYi3%0DIeEoa6}C!X6;?ntNLXJ<0j#7X+g2&U zH$cHTzbI9~RL@Y)NXd>%K|#T$C?(A*$i)q+9mum)$|xx*u+rBrFE7_CH`dE9O4m2E zw6xSWFw!?N(gmu}Ew0QfNvzP#D^`XW0yD=YwK%ybv!En1KTiQ3|)OBHVcpi zp&D%TL4k-AsNfg_g$9~9p}$+4Ynr|VULLgiakg&)DD)EWO!OHC@snXr}UI${nVUP zpr1>Mf#G6^ng~;pt%^&NvQm>vU@-wn)!_JWN=(;B61LIDR86%A1?G9U(@`={MPdPF zbOKdd`R1o&rd7HmmZaJl85kPr8kp-EnTHsfS{ayIfdU*&4N@e5WSomq6HD@oLh|!- z?7;Dr3*ssm=^5w&a}>G?yzvAH17L|`#|6|0E4}QvA~xC{V_*wu2^AHZU}H9f($4F$btFf{}TLQXUhF5fht1@YV$^ z9BUdFV+73^nIsvRXRM40U}6b7z_6}kHbY}i1LK(xT@6Mi?F5GKBfbp|ZU-3BR*6kv zXcRSQ(0-)mprD+wTr)o_4I;(%zOu)+jEgNB)_SXCVoSa}|F?cfwR!69+L=W3IX z!UiU`0@ph%94Rb33Cpq^IY*r_8XBW%V>G9XmK&p`=xCiXTEmXEH%41uqixaAmicH0 zVYIt6!aI*K%s=kP-v##6IXGZ2Cama>{@)81;C?K-P&M2k<0!GL}5+H~XTq*@SQi|Ft z2*0X`$`8S!qO#)xBeJRkf?;t189=ZB6Imw-h=`q;FP(2UpWZvmJ@=k-@45M(dtb7r zyVEiaLk$=Vw#>zu;st}j6Jf9=m1+nXCFe!$1PrEZ%5Ze_ba8YX_9-*rJujiLuQmJo&2v+Cxes}ec zU|qeux&7*yz#W=X_|wGQskL7*OHNjwFs@sEC+64Hb$Z(#H21Gh$Pe2WzOubdr6fzg z{l{!k%OD?N5Z7j33SoK?YdV6Scm>})U+MIQLNRgIvkZQEc^mP9XBPg%y|S$~Br|;N zk?-!-(Qqh_mQ|6WINQ{hHAjBRV#O#!FkAJ+oxy`L#f8V45*VvWMJFBB5m zG6vOLtDvgoDjHlSq-*h5xM56O>Jjau2f2IxKItIb@coX4XTyf$^{LZG&lI|D95wN1 z!fo0)q>WV7-V;q|A?HR!*bgozJw%j98-~gwBKVV0;=hZIF>7oJSr2YjOWO*rSxz#& z;KXnDrJVZp;Yduiy1-H%s$ZFz6Q=x@$V_B@Tqwl?>6e;EHt|MiK<(#hXQMuj@Jseeh&eN{FxsQ$iw>D1aX1HMMlUbh?Z zmhY4eHffn5&LUbL_}o8|$JYz&$WFiLWmEg0ZPX+;W>@CxQz-%{E5+P7dH9&ey_y$R z@Zzje>2B%z!i!7Brqi{t5Y)~5>vpqRs~2aXD8DVE8vKl=`k(`duI1-k@?!pJ^HA6S zS;3WpuhjQHyoC>X>Xf8gze%_8^#+^RTV>V9&YPAWMjd~%xpSg?ON?kK^X*Pb(o8jR zz;DmaOWMMr6=M~K?MFx4_xDkARTxLJ@W@ohAx z5RD0jGgk?QL@H`VubD2k4}?VtB8@g`%hHBA$2pJ(gK5g1HMNysXEF_BNu-p!&+Qa8_APgopHWnRgg=TZZF*sXWTMQPD z!Q(Au5|+F;7M~`tWbsU98~NA{h0Y7%GB|t&n}w9OOABU4^X*V5xuN;rY(M#ouuqm) zyt!e?28fY!FgP?8GvBsMl_aM^UUVKiGFsleFN?t^<46kO#pF-cX0;sIOb(aM z)^jQgX^Z6pKA9mC@N)_aiHj9HxD2|?A@Y9B_h}(*v3%ek8CXc1Qy^jFPF&zrMa1OZ zSVaF{&ZY|(|H0XE&X>-XQz1`=fF2n@VKC_|h3jlKVM&-jmyMavllcYr`6LVtfq2ou zd+8zkkCB+2)rxq0Lkq_&Ad@g(O8;pAm96>tu79?81T@Z<;gm^3ZtPG-SR94Mr<3tm z9NrR3u*4I5aMlo(09g@8m_;%Rf+XiSa_KZao9n}7N0JrsV#;5Ucr+F*TTzQ8{%f3O zeIUy?WDS|-$LvMc@Z7320)tr}bfIka5hx9H;8H|%our=C+Do0CSFRWue14o5#r8v2 zw=|&r4*eMX%lgCV(ka?*j%H^UuP4LmBC(ON`)&7>NF-|PDRU{-7o`CU0HNbd&c~))@yl9IKu_ zXA+A-!khpP_yx=f#qt2_0ptmgBf4gF!{Y)MW6R$cC1d7@$Yb?+_j zYwfE^5_e`vhT zX=u3r>4$fsxP&apbm@Rcbyuc2T=giqZiMo9@9=oua6#YH0hO-1ak9^rJTPMM qY4Yr5Cu^v99p{E9VdroUHKlRW;M8#BJ^AOQE?e9wSHJo8(7yq;BYKSh literal 0 HcmV?d00001 diff --git a/Demos/iOS/GitHubUserModel.h b/Demos/iOS/GitHubUserModel.h new file mode 100644 index 00000000..17ec618b --- /dev/null +++ b/Demos/iOS/GitHubUserModel.h @@ -0,0 +1,19 @@ +// +// GitHubUserModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONModel.h" + +@interface GitHubUserModel : JSONModel + +@property (strong, nonatomic) NSString* login; +@property (strong, nonatomic) NSURL* html_url; +@property (strong, nonatomic) NSString* company; +@property (strong, nonatomic) NSString* name; +@property (strong, nonatomic) NSURL* blog; + +@end diff --git a/Demos/iOS/GitHubUserModel.m b/Demos/iOS/GitHubUserModel.m new file mode 100644 index 00000000..9bee0ce5 --- /dev/null +++ b/Demos/iOS/GitHubUserModel.m @@ -0,0 +1,13 @@ +// +// GitHubUserModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "GitHubUserModel.h" + +@implementation GitHubUserModel + +@end diff --git a/Demos/iOS/GitHubViewController.h b/Demos/iOS/GitHubViewController.h new file mode 100644 index 00000000..eaaeee66 --- /dev/null +++ b/Demos/iOS/GitHubViewController.h @@ -0,0 +1,13 @@ +// +// GitHubViewController.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +@interface GitHubViewController : UITableViewController + +@end diff --git a/Demos/iOS/GitHubViewController.m b/Demos/iOS/GitHubViewController.m new file mode 100644 index 00000000..c68e7101 --- /dev/null +++ b/Demos/iOS/GitHubViewController.m @@ -0,0 +1,95 @@ +// +// GitHubViewController.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "GitHubViewController.h" +#import "GitHubUserModel.h" +#import "HUD.h" + +@interface GitHubViewController () +{ + GitHubUserModel* user; + NSArray* items; +} +@end + +@implementation GitHubViewController + +-(void)viewDidAppear:(BOOL)animated +{ + self.title = @"GitHub.com user lookup"; + [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; + + //1 + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + //code executed in the background + //2 + NSData* ghData = [NSData dataWithContentsOfURL: + [NSURL URLWithString:@"https://api.github.com/users/icanzilb"] + ]; + //3 + NSDictionary* json = nil; + if (ghData) { + json = [NSJSONSerialization + JSONObjectWithData:ghData + options:kNilOptions + error:nil]; + } + + //4 + dispatch_async(dispatch_get_main_queue(), ^{ + //code executed on the main queue + //5 + + user = [[GitHubUserModel alloc] initWithDictionary:json error:NULL]; + items = @[user.login, user.html_url, user.company, user.name, user.blog]; + + [self.tableView reloadData]; + [HUD hideUIBlockingIndicator]; + }); + + }); +} + +#pragma mark - table methods +-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} + +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return items.count; +} + +-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KivaCell"]; + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KivaCell"]; + } + + cell.textLabel.text = [items[indexPath.row] description]; + + if ([items[indexPath.row] isKindOfClass:[NSURL class]]) { + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + } + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; + + if ([items[indexPath.row] isKindOfClass:[NSURL class]]) { + [[UIApplication sharedApplication] openURL:items[indexPath.row]]; + } +} + + +@end diff --git a/Demos/iOS/GitHubViewController.xib b/Demos/iOS/GitHubViewController.xib new file mode 100644 index 00000000..18d65e35 --- /dev/null +++ b/Demos/iOS/GitHubViewController.xib @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demos/iOS/HUD.h b/Demos/iOS/HUD.h new file mode 100644 index 00000000..0ffb44ed --- /dev/null +++ b/Demos/iOS/HUD.h @@ -0,0 +1,45 @@ +// +// HUD.h +// BeatGuide +// +// Created by Marin Todorov on 22/04/2012. +// +// This code is distributed under the terms and conditions of the MIT license. +// +// Copyright (c) 2011 Marin Todorov +// +// 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 "MBProgressHUD.h" + +@interface HUD : NSObject + ++(MBProgressHUD*)showUIBlockingIndicator; ++(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str; ++(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str withTimeout:(int)seconds; + ++(MBProgressHUD*)showUIBlockingProgressIndicatorWithText:(NSString*)str andProgress:(float)progress; + ++(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text; ++(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text target:(id)t action:(SEL)sel; + ++(void)hideUIBlockingIndicator; + +@end diff --git a/Demos/iOS/HUD.m b/Demos/iOS/HUD.m new file mode 100644 index 00000000..58703b0e --- /dev/null +++ b/Demos/iOS/HUD.m @@ -0,0 +1,201 @@ +// +// HUD.m +// BeatGuide +// +// This code is distributed under the terms and conditions of the MIT license. +// +// Copyright (c) 2011 Marin Todorov +// +// 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 "HUD.h" +#import "QuartzCore/QuartzCore.h" + +static UIView* lastViewWithHUD = nil; + +@interface GlowButton : UIButton + +@end + +@implementation GlowButton +{ + NSTimer* timer; + float glowDelta; +} + +-(id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + //effect + self.layer.shadowColor = [UIColor whiteColor].CGColor; + self.layer.shadowOffset = CGSizeMake(1,1); + self.layer.shadowOpacity = 0.9; + + glowDelta = 0.2; + timer = [NSTimer timerWithTimeInterval:0.05 + target:self + selector:@selector(glow) + userInfo:nil + repeats:YES]; + + [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode]; + } + return self; +} + +-(void)glow +{ + if (self.layer.shadowRadius>7.0 || self.layer.shadowRadius<0.1) { + glowDelta *= -1; + } + self.layer.shadowRadius += glowDelta; +} + +-(void)dealloc +{ + [timer invalidate]; + timer = nil; +} + +@end + +@implementation HUD + ++(UIView*)rootView +{ + //return [UIApplication sharedApplication].keyWindow.rootViewController.view; + + UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController; + + while (topController.presentedViewController) { + topController = topController.presentedViewController; + } + + return topController.view; +} + ++(MBProgressHUD*)showUIBlockingIndicator +{ + return [self showUIBlockingIndicatorWithText:nil]; +} + ++(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str +{ + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; + + //show the HUD + UIView* targetView = [self rootView]; + if (targetView==nil) return nil; + + lastViewWithHUD = targetView; + + [MBProgressHUD hideHUDForView:targetView animated:YES]; + + MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES]; + if (str!=nil) { + hud.labelText = str; + } else { + hud.labelText = @"Loading..."; + } + + return hud; +} + ++(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str withTimeout:(int)seconds +{ + MBProgressHUD* hud = [self showUIBlockingIndicatorWithText:str]; + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; + hud.customView = [[UIView alloc] initWithFrame:CGRectMake(0,0,37,37)]; + hud.mode = MBProgressHUDModeDeterminate; + [hud hide:YES afterDelay:seconds]; + return hud; +} + ++(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text +{ + return [self showAlertWithTitle:titleText text:text target:nil action:NULL]; +} + ++(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text target:(id)t action:(SEL)sel +{ + [HUD hideUIBlockingIndicator]; + + //show the HUD + UIView* targetView = [self rootView]; + if (targetView==nil) return nil; + + lastViewWithHUD = targetView; + + MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES]; + + //set the text + hud.labelText = titleText; + hud.detailsLabelText = text; + + //set the close button + GlowButton* btnClose = [GlowButton buttonWithType:UIButtonTypeCustom]; + if (t!=nil && sel!=NULL) { + [btnClose addTarget:t action:sel forControlEvents:UIControlEventTouchUpInside]; + } else { + [btnClose addTarget:hud action:@selector(hide:) forControlEvents:UIControlEventTouchUpInside]; + } + + UIImage* imgClose = [UIImage imageNamed:@"btnCheck.png"]; + [btnClose setImage:imgClose forState:UIControlStateNormal]; + [btnClose setFrame:CGRectMake(0,0,imgClose.size.width,imgClose.size.height)]; + + //hud settings + hud.customView = btnClose; + hud.mode = MBProgressHUDModeCustomView; + hud.removeFromSuperViewOnHide = YES; + + return hud; +} + ++(void)hideUIBlockingIndicator +{ + [MBProgressHUD hideHUDForView:lastViewWithHUD animated:YES]; + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; +} + + ++(MBProgressHUD*)showUIBlockingProgressIndicatorWithText:(NSString*)str andProgress:(float)progress +{ + [HUD hideUIBlockingIndicator]; + + //show the HUD + UIView* targetView = [self rootView]; + if (targetView==nil) return nil; + + lastViewWithHUD = targetView; + + MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES]; + + //set the text + hud.labelText = str; + + hud.mode = MBProgressHUDModeDeterminate; + hud.progress = progress; + hud.removeFromSuperViewOnHide = YES; + + return hud; +} + +@end \ No newline at end of file diff --git a/Demos/iOS/Info.plist b/Demos/iOS/Info.plist new file mode 100644 index 00000000..b7bc4ba1 --- /dev/null +++ b/Demos/iOS/Info.plist @@ -0,0 +1,48 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarTintParameters + + UINavigationBar + + Style + UIBarStyleDefault + Translucent + + + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Demos/iOS/KivaFeed.h b/Demos/iOS/KivaFeed.h new file mode 100644 index 00000000..3e1b3a3f --- /dev/null +++ b/Demos/iOS/KivaFeed.h @@ -0,0 +1,16 @@ +// +// KivaFeed.h +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONModel.h" +#import "LoanModel.h" + +@interface KivaFeed : JSONModel + +@property (strong, nonatomic) NSArray* loans; + +@end \ No newline at end of file diff --git a/Demos/iOS/KivaFeed.m b/Demos/iOS/KivaFeed.m new file mode 100644 index 00000000..185d023d --- /dev/null +++ b/Demos/iOS/KivaFeed.m @@ -0,0 +1,13 @@ +// +// KivaFeed.m +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "KivaFeed.h" + +@implementation KivaFeed + +@end diff --git a/Demos/iOS/KivaViewController.h b/Demos/iOS/KivaViewController.h new file mode 100644 index 00000000..4ed3aef2 --- /dev/null +++ b/Demos/iOS/KivaViewController.h @@ -0,0 +1,13 @@ +// +// KivaViewController.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +@interface KivaViewController : UIViewController + +@end diff --git a/Demos/iOS/KivaViewController.m b/Demos/iOS/KivaViewController.m new file mode 100644 index 00000000..58d12b1c --- /dev/null +++ b/Demos/iOS/KivaViewController.m @@ -0,0 +1,111 @@ +// +// KivaViewController.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "KivaViewController.h" +#import "KivaFeed.h" +#import "HUD.h" +#import "JSONModel+networking.h" + +@interface KivaViewController () +{ + IBOutlet UITableView* table; + KivaFeed* feed; + + double benchStart; + double benchObj; + double benchEnd; +} + +@end + +@implementation KivaViewController + +-(void)viewDidAppear:(BOOL)animated +{ + self.title = @"Kiva.org latest loans"; + [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + [JSONHTTPClient getJSONFromURLWithString:@"https://api.kivaws.org/v1/loans/search.json" +#pragma GCC diagnostic pop + params:@{@"status":@"fundraising"} + completion:^(NSDictionary *json, JSONModelError *err) { + + benchStart = CFAbsoluteTimeGetCurrent(); + feed = [[KivaFeed alloc] initWithDictionary: json error:nil]; + benchEnd = CFAbsoluteTimeGetCurrent(); + + [HUD hideUIBlockingIndicator]; + + if (feed) { + [table reloadData]; + + [self logBenchmark]; + } else { + //show error + [[[UIAlertView alloc] initWithTitle:@"Error" + message:[err localizedDescription] + delegate:nil + cancelButtonTitle:@"Close" + otherButtonTitles:nil] show]; + } + }]; +} + +-(void)logBenchmark +{ + NSLog(@"start: %f", benchStart); + NSLog(@"model: %f", benchEnd); + NSLog(@"-------------------------"); + NSLog(@"json -> model: %.4f", benchEnd - benchStart); +} + +#pragma mark - table methods +-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} + +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return feed.loans.count; +} + +-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KivaCell"]; + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KivaCell"]; + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + } + + LoanModel* loan = feed.loans[indexPath.row]; + + cell.textLabel.text = [NSString stringWithFormat:@"%@ from %@ (%@)", + loan.name, loan.location.country, loan.location.countryCode + ]; + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [table deselectRowAtIndexPath:indexPath animated:YES]; + + LoanModel* loan = feed.loans[indexPath.row]; + + NSString* message = [NSString stringWithFormat:@"%@ from %@(%@) needs a loan %@", + loan.name, loan.location.country, loan.location.countryCode, loan.use + ]; + + + [HUD showAlertWithTitle:@"Loan details" text:message]; +} + +@end diff --git a/Demos/iOS/KivaViewController.xib b/Demos/iOS/KivaViewController.xib new file mode 100644 index 00000000..edb8d586 --- /dev/null +++ b/Demos/iOS/KivaViewController.xib @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demos/iOS/KivaViewControllerNetworking.h b/Demos/iOS/KivaViewControllerNetworking.h new file mode 100644 index 00000000..a29fd53d --- /dev/null +++ b/Demos/iOS/KivaViewControllerNetworking.h @@ -0,0 +1,13 @@ +// +// KivaViewControllerNetworking.h +// JSONModelDemo +// +// Created by Marin Todorov on 04/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +@interface KivaViewControllerNetworking : UIViewController + +@end diff --git a/Demos/iOS/KivaViewControllerNetworking.m b/Demos/iOS/KivaViewControllerNetworking.m new file mode 100644 index 00000000..d736532d --- /dev/null +++ b/Demos/iOS/KivaViewControllerNetworking.m @@ -0,0 +1,92 @@ +// +// KivaViewControllerNetworking.m +// JSONModelDemo +// +// Created by Marin Todorov on 04/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "KivaViewControllerNetworking.h" + +#import "JSONModel+networking.h" +#import "KivaFeed.h" + +#import "HUD.h" + +@interface KivaViewControllerNetworking () +{ + IBOutlet UITableView* table; + KivaFeed* feed; +} + +@end + +@implementation KivaViewControllerNetworking + +-(void)viewDidAppear:(BOOL)animated +{ + self.title = @"Kiva.org latest loans"; + + [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + feed = [[KivaFeed alloc] initFromURLWithString:@"http://api.kivaws.org/v1/loans/search.json?status=fundraising" +#pragma GCC diagnostic pop + completion:^(JSONModel *model, JSONModelError* e) { + + [HUD hideUIBlockingIndicator]; + + if (model) { + [table reloadData]; + } else { + [HUD showAlertWithTitle:@"Error" text:e.localizedDescription]; + } + + }]; + +} + +#pragma mark - table methods +-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} + +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return feed.loans.count; +} + +-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KivaCell"]; + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KivaCell"]; + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + } + + LoanModel* loan = feed.loans[indexPath.row]; + + cell.textLabel.text = [NSString stringWithFormat:@"%@ from %@", + loan.name, loan.location.country + ]; + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [table deselectRowAtIndexPath:indexPath animated:YES]; + + LoanModel* loan = feed.loans[indexPath.row]; + + NSString* message = [NSString stringWithFormat:@"%@ from %@ needs a loan %@", + loan.name, loan.location.country, loan.use + ]; + + + [HUD showAlertWithTitle:@"Loan details" text:message]; +} + +@end diff --git a/Demos/iOS/KivaViewControllerNetworking.xib b/Demos/iOS/KivaViewControllerNetworking.xib new file mode 100644 index 00000000..b8cfdbc6 --- /dev/null +++ b/Demos/iOS/KivaViewControllerNetworking.xib @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demos/iOS/LoanModel.h b/Demos/iOS/LoanModel.h new file mode 100644 index 00000000..36ead02e --- /dev/null +++ b/Demos/iOS/LoanModel.h @@ -0,0 +1,22 @@ +// +// LoanModel.h +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONModel.h" +#import "LocationModel.h" + +@protocol LoanModel @end + +@interface LoanModel : JSONModel + +@property (strong, nonatomic) NSString* name; +@property (strong, nonatomic) NSString* status; +@property (strong, nonatomic) NSString* use; + +@property (strong, nonatomic) LocationModel* location; + +@end \ No newline at end of file diff --git a/Demos/iOS/LoanModel.m b/Demos/iOS/LoanModel.m new file mode 100644 index 00000000..d3678d9b --- /dev/null +++ b/Demos/iOS/LoanModel.m @@ -0,0 +1,13 @@ +// +// LoanModel.m +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "LoanModel.h" + +@implementation LoanModel + +@end diff --git a/Demos/iOS/LocationModel.h b/Demos/iOS/LocationModel.h new file mode 100644 index 00000000..d5e877b3 --- /dev/null +++ b/Demos/iOS/LocationModel.h @@ -0,0 +1,16 @@ +// +// LocationModel.h +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONModel.h" + +@interface LocationModel : JSONModel + +@property (strong, nonatomic) NSString* countryCode; +@property (strong, nonatomic) NSString* country; + +@end diff --git a/Demos/iOS/LocationModel.m b/Demos/iOS/LocationModel.m new file mode 100644 index 00000000..4d58dddc --- /dev/null +++ b/Demos/iOS/LocationModel.m @@ -0,0 +1,19 @@ +// +// LocationModel.m +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "LocationModel.h" +#import "JSONKeyMapper.h" + +@implementation LocationModel + ++(JSONKeyMapper*)keyMapper +{ + return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase]; +} + +@end \ No newline at end of file diff --git a/Demos/iOS/MBProgressHUD.h b/Demos/iOS/MBProgressHUD.h new file mode 100755 index 00000000..cfcbe5c5 --- /dev/null +++ b/Demos/iOS/MBProgressHUD.h @@ -0,0 +1,521 @@ +// +// MBProgressHUD.h +// Version 0.9.1 +// Created by Matej Bukovinski on 2.4.09. +// + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2009-2015 Matej Bukovinski +// +// 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 + +@protocol MBProgressHUDDelegate; + + +typedef NS_ENUM(NSInteger, MBProgressHUDMode) { + /** Progress is shown using an UIActivityIndicatorView. This is the default. */ + MBProgressHUDModeIndeterminate, + /** Progress is shown using a round, pie-chart like, progress view. */ + MBProgressHUDModeDeterminate, + /** Progress is shown using a horizontal progress bar */ + MBProgressHUDModeDeterminateHorizontalBar, + /** Progress is shown using a ring-shaped progress view. */ + MBProgressHUDModeAnnularDeterminate, + /** Shows a custom view */ + MBProgressHUDModeCustomView, + /** Shows only labels */ + MBProgressHUDModeText +}; + +typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) { + /** Opacity animation */ + MBProgressHUDAnimationFade, + /** Opacity + scale animation */ + MBProgressHUDAnimationZoom, + MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom, + MBProgressHUDAnimationZoomIn +}; + + +#ifndef MB_INSTANCETYPE +#if __has_feature(objc_instancetype) + #define MB_INSTANCETYPE instancetype +#else + #define MB_INSTANCETYPE id +#endif +#endif + +#ifndef MB_STRONG +#if __has_feature(objc_arc) + #define MB_STRONG strong +#else + #define MB_STRONG retain +#endif +#endif + +#ifndef MB_WEAK +#if __has_feature(objc_arc_weak) + #define MB_WEAK weak +#elif __has_feature(objc_arc) + #define MB_WEAK unsafe_unretained +#else + #define MB_WEAK assign +#endif +#endif + +#if NS_BLOCKS_AVAILABLE +typedef void (^MBProgressHUDCompletionBlock)(); +#endif + + +/** + * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. + * + * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. + * The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all + * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is + * drawn centered as a rounded semi-transparent view which resizes depending on the user specified content. + * + * This view supports four modes of operation: + * - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView + * - MBProgressHUDModeDeterminate - shows a custom round progress indicator + * - MBProgressHUDModeAnnularDeterminate - shows a custom annular progress indicator + * - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (see `customView`) + * + * All three modes can have optional labels assigned: + * - If the labelText property is set and non-empty then a label containing the provided content is placed below the + * indicator view. + * - If also the detailsLabelText property is set then another label is placed below the first label. + */ +@interface MBProgressHUD : UIView + +/** + * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. + * + * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden. + * + * @param view The view that the HUD will be added to + * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use + * animations while appearing. + * @return A reference to the created HUD. + * + * @see hideHUDForView:animated: + * @see animationType + */ ++ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; + +/** + * Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:. + * + * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden. + * + * @param view The view that is going to be searched for a HUD subview. + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use + * animations while disappearing. + * @return YES if a HUD was found and removed, NO otherwise. + * + * @see showHUDAddedTo:animated: + * @see animationType + */ ++ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; + +/** + * Finds all the HUD subviews and hides them. + * + * @note This method sets `removeFromSuperViewOnHide`. The HUDs will automatically be removed from the view hierarchy when hidden. + * + * @param view The view that is going to be searched for HUD subviews. + * @param animated If set to YES the HUDs will disappear using the current animationType. If set to NO the HUDs will not use + * animations while disappearing. + * @return the number of HUDs found and removed. + * + * @see hideHUDForView:animated: + * @see animationType + */ ++ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated; + +/** + * Finds the top-most HUD subview and returns it. + * + * @param view The view that is going to be searched. + * @return A reference to the last HUD subview discovered. + */ ++ (MB_INSTANCETYPE)HUDForView:(UIView *)view; + +/** + * Finds all HUD subviews and returns them. + * + * @param view The view that is going to be searched. + * @return All found HUD views (array of MBProgressHUD objects). + */ ++ (NSArray *)allHUDsForView:(UIView *)view; + +/** + * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with + * window.bounds as the parameter. + * + * @param window The window instance that will provide the bounds for the HUD. Should be the same instance as + * the HUD's superview (i.e., the window that the HUD will be added to). + */ +- (id)initWithWindow:(UIWindow *)window; + +/** + * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with + * view.bounds as the parameter + * + * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as + * the HUD's superview (i.e., the view that the HUD will be added to). + */ +- (id)initWithView:(UIView *)view; + +/** + * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so + * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread + * (e.g., when using something like NSOperation or calling an asynchronous call like NSURLRequest). + * + * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use + * animations while appearing. + * + * @see animationType + */ +- (void)show:(BOOL)animated; + +/** + * Hide the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to + * hide the HUD when your task completes. + * + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use + * animations while disappearing. + * + * @see animationType + */ +- (void)hide:(BOOL)animated; + +/** + * Hide the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to + * hide the HUD when your task completes. + * + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use + * animations while disappearing. + * @param delay Delay in seconds until the HUD is hidden. + * + * @see animationType + */ +- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay; + +/** + * Shows the HUD while a background task is executing in a new thread, then hides the HUD. + * + * This method also takes care of autorelease pools so your method does not have to be concerned with setting up a + * pool. + * + * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread. + * @param target The object that the target method belongs to. + * @param object An optional object to be passed to the method. + * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will not use + * animations while (dis)appearing. + */ +- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated; + +#if NS_BLOCKS_AVAILABLE + +/** + * Shows the HUD while a block is executing on a background queue, then hides the HUD. + * + * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: + */ +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block; + +/** + * Shows the HUD while a block is executing on a background queue, then hides the HUD. + * + * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: + */ +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion; + +/** + * Shows the HUD while a block is executing on the specified dispatch queue, then hides the HUD. + * + * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: + */ +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue; + +/** + * Shows the HUD while a block is executing on the specified dispatch queue, executes completion block on the main queue, and then hides the HUD. + * + * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will + * not use animations while (dis)appearing. + * @param block The block to be executed while the HUD is shown. + * @param queue The dispatch queue on which the block should be executed. + * @param completion The block to be executed on completion. + * + * @see completionBlock + */ +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue + completionBlock:(MBProgressHUDCompletionBlock)completion; + +/** + * A block that gets called after the HUD was completely hidden. + */ +@property (copy) MBProgressHUDCompletionBlock completionBlock; + +#endif + +/** + * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate. + * + * @see MBProgressHUDMode + */ +@property (assign) MBProgressHUDMode mode; + +/** + * The animation type that should be used when the HUD is shown and hidden. + * + * @see MBProgressHUDAnimation + */ +@property (assign) MBProgressHUDAnimation animationType; + +/** + * The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView. + * For best results use a 37 by 37 pixel view (so the bounds match the built in indicator bounds). + */ +@property (MB_STRONG) UIView *customView; + +/** + * The HUD delegate object. + * + * @see MBProgressHUDDelegate + */ +@property (MB_WEAK) id delegate; + +/** + * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit + * the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or + * set to @"", then no message is displayed. + */ +@property (copy) NSString *labelText; + +/** + * An optional details message displayed below the labelText message. This message is displayed only if the labelText + * property is also set and is different from an empty string (@""). The details text can span multiple lines. + */ +@property (copy) NSString *detailsLabelText; + +/** + * The opacity of the HUD window. Defaults to 0.8 (80% opacity). + */ +@property (assign) float opacity; + +/** + * The color of the HUD window. Defaults to black. If this property is set, color is set using + * this UIColor and the opacity property is not used. using retain because performing copy on + * UIColor base colors (like [UIColor greenColor]) cause problems with the copyZone. + */ +@property (MB_STRONG) UIColor *color; + +/** + * The x-axis offset of the HUD relative to the centre of the superview. + */ +@property (assign) float xOffset; + +/** + * The y-axis offset of the HUD relative to the centre of the superview. + */ +@property (assign) float yOffset; + +/** + * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). + * Defaults to 20.0 + */ +@property (assign) float margin; + +/** + * The corner radius for the HUD + * Defaults to 10.0 + */ +@property (assign) float cornerRadius; + +/** + * Cover the HUD background view with a radial gradient. + */ +@property (assign) BOOL dimBackground; + +/* + * Grace period is the time (in seconds) that the invoked method may be run without + * showing the HUD. If the task finishes before the grace time runs out, the HUD will + * not be shown at all. + * This may be used to prevent HUD display for very short tasks. + * Defaults to 0 (no grace time). + * Grace time functionality is only supported when the task status is known! + * @see taskInProgress + */ +@property (assign) float graceTime; + +/** + * The minimum time (in seconds) that the HUD is shown. + * This avoids the problem of the HUD being shown and than instantly hidden. + * Defaults to 0 (no minimum show time). + */ +@property (assign) float minShowTime; + +/** + * Indicates that the executed operation is in progress. Needed for correct graceTime operation. + * If you don't set a graceTime (different than 0.0) this does nothing. + * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:. + * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly), + * you need to set this property when your task starts and completes in order to have normal graceTime + * functionality. + */ +@property (assign) BOOL taskInProgress; + +/** + * Removes the HUD from its parent view when hidden. + * Defaults to NO. + */ +@property (assign) BOOL removeFromSuperViewOnHide; + +/** + * Font to be used for the main label. Set this property if the default is not adequate. + */ +@property (MB_STRONG) UIFont* labelFont; + +/** + * Color to be used for the main label. Set this property if the default is not adequate. + */ +@property (MB_STRONG) UIColor* labelColor; + +/** + * Font to be used for the details label. Set this property if the default is not adequate. + */ +@property (MB_STRONG) UIFont* detailsLabelFont; + +/** + * Color to be used for the details label. Set this property if the default is not adequate. + */ +@property (MB_STRONG) UIColor* detailsLabelColor; + +/** + * The color of the activity indicator. Defaults to [UIColor whiteColor] + * Does nothing on pre iOS 5. + */ +@property (MB_STRONG) UIColor *activityIndicatorColor; + +/** + * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. + */ +@property (assign) float progress; + +/** + * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size). + */ +@property (assign) CGSize minSize; + + +/** + * The actual size of the HUD bezel. + * You can use this to limit touch handling on the bezel area only. + * @see https://github.com/jdg/MBProgressHUD/pull/200 + */ +@property (atomic, assign, readonly) CGSize size; + + +/** + * Force the HUD dimensions to be equal if possible. + */ +@property (assign, getter = isSquare) BOOL square; + +@end + + +@protocol MBProgressHUDDelegate + +@optional + +/** + * Called after the HUD was fully hidden from the screen. + */ +- (void)hudWasHidden:(MBProgressHUD *)hud; + +@end + + +/** + * A progress view for showing definite progress by filling up a circle (pie chart). + */ +@interface MBRoundProgressView : UIView + +/** + * Progress (0.0 to 1.0) + */ +@property (nonatomic, assign) float progress; + +/** + * Indicator progress color. + * Defaults to white [UIColor whiteColor] + */ +@property (nonatomic, MB_STRONG) UIColor *progressTintColor; + +/** + * Indicator background (non-progress) color. + * Defaults to translucent white (alpha 0.1) + */ +@property (nonatomic, MB_STRONG) UIColor *backgroundTintColor; + +/* + * Display mode - NO = round or YES = annular. Defaults to round. + */ +@property (nonatomic, assign, getter = isAnnular) BOOL annular; + +@end + + +/** + * A flat bar progress view. + */ +@interface MBBarProgressView : UIView + +/** + * Progress (0.0 to 1.0) + */ +@property (nonatomic, assign) float progress; + +/** + * Bar border line color. + * Defaults to white [UIColor whiteColor]. + */ +@property (nonatomic, MB_STRONG) UIColor *lineColor; + +/** + * Bar background color. + * Defaults to clear [UIColor clearColor]; + */ +@property (nonatomic, MB_STRONG) UIColor *progressRemainingColor; + +/** + * Bar progress color. + * Defaults to white [UIColor whiteColor]. + */ +@property (nonatomic, MB_STRONG) UIColor *progressColor; + +@end diff --git a/Demos/iOS/MBProgressHUD.m b/Demos/iOS/MBProgressHUD.m new file mode 100755 index 00000000..996b1cb8 --- /dev/null +++ b/Demos/iOS/MBProgressHUD.m @@ -0,0 +1,1033 @@ +// +// MBProgressHUD.m +// Version 0.9.1 +// Created by Matej Bukovinski on 2.4.09. +// + +#import "MBProgressHUD.h" +#import + + +#if __has_feature(objc_arc) + #define MB_AUTORELEASE(exp) exp + #define MB_RELEASE(exp) exp + #define MB_RETAIN(exp) exp +#else + #define MB_AUTORELEASE(exp) [exp autorelease] + #define MB_RELEASE(exp) [exp release] + #define MB_RETAIN(exp) [exp retain] +#endif + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 + #define MBLabelAlignmentCenter NSTextAlignmentCenter +#else + #define MBLabelAlignmentCenter UITextAlignmentCenter +#endif + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text \ + sizeWithAttributes:@{NSFontAttributeName:font}] : CGSizeZero; +#else + #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text sizeWithFont:font] : CGSizeZero; +#endif + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ + boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \ + attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero; +#else + #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ + sizeWithFont:font constrainedToSize:maxSize lineBreakMode:mode] : CGSizeZero; +#endif + +#ifndef kCFCoreFoundationVersionNumber_iOS_7_0 + #define kCFCoreFoundationVersionNumber_iOS_7_0 847.20 +#endif + +#ifndef kCFCoreFoundationVersionNumber_iOS_8_0 + #define kCFCoreFoundationVersionNumber_iOS_8_0 1129.15 +#endif + + +static const CGFloat kPadding = 4.f; +static const CGFloat kLabelFontSize = 16.f; +static const CGFloat kDetailsLabelFontSize = 12.f; + + +@interface MBProgressHUD () { + BOOL useAnimation; + SEL methodForExecution; + id targetForExecution; + id objectForExecution; + UILabel *label; + UILabel *detailsLabel; + BOOL isFinished; + CGAffineTransform rotationTransform; +} + +@property (atomic, MB_STRONG) UIView *indicator; +@property (atomic, MB_STRONG) NSTimer *graceTimer; +@property (atomic, MB_STRONG) NSTimer *minShowTimer; +@property (atomic, MB_STRONG) NSDate *showStarted; + +@end + + +@implementation MBProgressHUD + +#pragma mark - Properties + +@synthesize animationType; +@synthesize delegate; +@synthesize opacity; +@synthesize color; +@synthesize labelFont; +@synthesize labelColor; +@synthesize detailsLabelFont; +@synthesize detailsLabelColor; +@synthesize indicator; +@synthesize xOffset; +@synthesize yOffset; +@synthesize minSize; +@synthesize square; +@synthesize margin; +@synthesize dimBackground; +@synthesize graceTime; +@synthesize minShowTime; +@synthesize graceTimer; +@synthesize minShowTimer; +@synthesize taskInProgress; +@synthesize removeFromSuperViewOnHide; +@synthesize customView; +@synthesize showStarted; +@synthesize mode; +@synthesize labelText; +@synthesize detailsLabelText; +@synthesize progress; +@synthesize size; +@synthesize activityIndicatorColor; +#if NS_BLOCKS_AVAILABLE +@synthesize completionBlock; +#endif + +#pragma mark - Class methods + ++ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated { + MBProgressHUD *hud = [[self alloc] initWithView:view]; + hud.removeFromSuperViewOnHide = YES; + [view addSubview:hud]; + [hud show:animated]; + return MB_AUTORELEASE(hud); +} + ++ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated { + MBProgressHUD *hud = [self HUDForView:view]; + if (hud != nil) { + hud.removeFromSuperViewOnHide = YES; + [hud hide:animated]; + return YES; + } + return NO; +} + ++ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated { + NSArray *huds = [MBProgressHUD allHUDsForView:view]; + for (MBProgressHUD *hud in huds) { + hud.removeFromSuperViewOnHide = YES; + [hud hide:animated]; + } + return [huds count]; +} + ++ (MB_INSTANCETYPE)HUDForView:(UIView *)view { + NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator]; + for (UIView *subview in subviewsEnum) { + if ([subview isKindOfClass:self]) { + return (MBProgressHUD *)subview; + } + } + return nil; +} + ++ (NSArray *)allHUDsForView:(UIView *)view { + NSMutableArray *huds = [NSMutableArray array]; + NSArray *subviews = view.subviews; + for (UIView *aView in subviews) { + if ([aView isKindOfClass:self]) { + [huds addObject:aView]; + } + } + return [NSArray arrayWithArray:huds]; +} + +#pragma mark - Lifecycle + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + // Set default values for properties + self.animationType = MBProgressHUDAnimationFade; + self.mode = MBProgressHUDModeIndeterminate; + self.labelText = nil; + self.detailsLabelText = nil; + self.opacity = 0.8f; + self.color = nil; + self.labelFont = [UIFont boldSystemFontOfSize:kLabelFontSize]; + self.labelColor = [UIColor whiteColor]; + self.detailsLabelFont = [UIFont boldSystemFontOfSize:kDetailsLabelFontSize]; + self.detailsLabelColor = [UIColor whiteColor]; + self.activityIndicatorColor = [UIColor whiteColor]; + self.xOffset = 0.0f; + self.yOffset = 0.0f; + self.dimBackground = NO; + self.margin = 20.0f; + self.cornerRadius = 10.0f; + self.graceTime = 0.0f; + self.minShowTime = 0.0f; + self.removeFromSuperViewOnHide = NO; + self.minSize = CGSizeZero; + self.square = NO; + self.contentMode = UIViewContentModeCenter; + self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin + | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + + // Transparent background + self.opaque = NO; + self.backgroundColor = [UIColor clearColor]; + // Make it invisible for now + self.alpha = 0.0f; + + taskInProgress = NO; + rotationTransform = CGAffineTransformIdentity; + + [self setupLabels]; + [self updateIndicators]; + [self registerForKVO]; + [self registerForNotifications]; + } + return self; +} + +- (id)initWithView:(UIView *)view { + NSAssert(view, @"View must not be nil."); + return [self initWithFrame:view.bounds]; +} + +- (id)initWithWindow:(UIWindow *)window { + return [self initWithView:window]; +} + +- (void)dealloc { + [self unregisterFromNotifications]; + [self unregisterFromKVO]; +#if !__has_feature(objc_arc) + [color release]; + [indicator release]; + [label release]; + [detailsLabel release]; + [labelText release]; + [detailsLabelText release]; + [graceTimer release]; + [minShowTimer release]; + [showStarted release]; + [customView release]; + [labelFont release]; + [labelColor release]; + [detailsLabelFont release]; + [detailsLabelColor release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock release]; +#endif + [super dealloc]; +#endif +} + +#pragma mark - Show & hide + +- (void)show:(BOOL)animated { + NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); + useAnimation = animated; + // If the grace time is set postpone the HUD display + if (self.graceTime > 0.0) { + NSTimer *newGraceTimer = [NSTimer timerWithTimeInterval:self.graceTime target:self selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO]; + [[NSRunLoop currentRunLoop] addTimer:newGraceTimer forMode:NSRunLoopCommonModes]; + self.graceTimer = newGraceTimer; + } + // ... otherwise show the HUD imediately + else { + [self showUsingAnimation:useAnimation]; + } +} + +- (void)hide:(BOOL)animated { + NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); + useAnimation = animated; + // If the minShow time is set, calculate how long the hud was shown, + // and pospone the hiding operation if necessary + if (self.minShowTime > 0.0 && showStarted) { + NSTimeInterval interv = [[NSDate date] timeIntervalSinceDate:showStarted]; + if (interv < self.minShowTime) { + self.minShowTimer = [NSTimer scheduledTimerWithTimeInterval:(self.minShowTime - interv) target:self + selector:@selector(handleMinShowTimer:) userInfo:nil repeats:NO]; + return; + } + } + // ... otherwise hide the HUD immediately + [self hideUsingAnimation:useAnimation]; +} + +- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay { + [self performSelector:@selector(hideDelayed:) withObject:[NSNumber numberWithBool:animated] afterDelay:delay]; +} + +- (void)hideDelayed:(NSNumber *)animated { + [self hide:[animated boolValue]]; +} + +#pragma mark - Timer callbacks + +- (void)handleGraceTimer:(NSTimer *)theTimer { + // Show the HUD only if the task is still running + if (taskInProgress) { + [self showUsingAnimation:useAnimation]; + } +} + +- (void)handleMinShowTimer:(NSTimer *)theTimer { + [self hideUsingAnimation:useAnimation]; +} + +#pragma mark - View Hierrarchy + +- (void)didMoveToSuperview { + [self updateForCurrentOrientationAnimated:NO]; +} + +#pragma mark - Internal show & hide operations + +- (void)showUsingAnimation:(BOOL)animated { + // Cancel any scheduled hideDelayed: calls + [NSObject cancelPreviousPerformRequestsWithTarget:self]; + [self setNeedsDisplay]; + + if (animated && animationType == MBProgressHUDAnimationZoomIn) { + self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f)); + } else if (animated && animationType == MBProgressHUDAnimationZoomOut) { + self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f)); + } + self.showStarted = [NSDate date]; + // Fade in + if (animated) { + [UIView beginAnimations:nil context:NULL]; + [UIView setAnimationDuration:0.30]; + self.alpha = 1.0f; + if (animationType == MBProgressHUDAnimationZoomIn || animationType == MBProgressHUDAnimationZoomOut) { + self.transform = rotationTransform; + } + [UIView commitAnimations]; + } + else { + self.alpha = 1.0f; + } +} + +- (void)hideUsingAnimation:(BOOL)animated { + // Fade out + if (animated && showStarted) { + [UIView beginAnimations:nil context:NULL]; + [UIView setAnimationDuration:0.30]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)]; + // 0.02 prevents the hud from passing through touches during the animation the hud will get completely hidden + // in the done method + if (animationType == MBProgressHUDAnimationZoomIn) { + self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f)); + } else if (animationType == MBProgressHUDAnimationZoomOut) { + self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f)); + } + + self.alpha = 0.02f; + [UIView commitAnimations]; + } + else { + self.alpha = 0.0f; + [self done]; + } + self.showStarted = nil; +} + +- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context { + [self done]; +} + +- (void)done { + [NSObject cancelPreviousPerformRequestsWithTarget:self]; + isFinished = YES; + self.alpha = 0.0f; + if (removeFromSuperViewOnHide) { + [self removeFromSuperview]; + } +#if NS_BLOCKS_AVAILABLE + if (self.completionBlock) { + self.completionBlock(); + self.completionBlock = NULL; + } +#endif + if ([delegate respondsToSelector:@selector(hudWasHidden:)]) { + [delegate performSelector:@selector(hudWasHidden:) withObject:self]; + } +} + +#pragma mark - Threading + +- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated { + methodForExecution = method; + targetForExecution = MB_RETAIN(target); + objectForExecution = MB_RETAIN(object); + // Launch execution in new thread + self.taskInProgress = YES; + [NSThread detachNewThreadSelector:@selector(launchExecution) toTarget:self withObject:nil]; + // Show HUD view + [self show:animated]; +} + +#if NS_BLOCKS_AVAILABLE + +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block { + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; +} + +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)())completion { + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:completion]; +} + +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue { + [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; +} + +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue + completionBlock:(MBProgressHUDCompletionBlock)completion { + self.taskInProgress = YES; + self.completionBlock = completion; + dispatch_async(queue, ^(void) { + block(); + dispatch_async(dispatch_get_main_queue(), ^(void) { + [self cleanUp]; + }); + }); + [self show:animated]; +} + +#endif + +- (void)launchExecution { + @autoreleasepool { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + // Start executing the requested task + [targetForExecution performSelector:methodForExecution withObject:objectForExecution]; +#pragma clang diagnostic pop + // Task completed, update view in main thread (note: view operations should + // be done only in the main thread) + [self performSelectorOnMainThread:@selector(cleanUp) withObject:nil waitUntilDone:NO]; + } +} + +- (void)cleanUp { + taskInProgress = NO; +#if !__has_feature(objc_arc) + [targetForExecution release]; + [objectForExecution release]; +#else + targetForExecution = nil; + objectForExecution = nil; +#endif + [self hide:useAnimation]; +} + +#pragma mark - UI + +- (void)setupLabels { + label = [[UILabel alloc] initWithFrame:self.bounds]; + label.adjustsFontSizeToFitWidth = NO; + label.textAlignment = MBLabelAlignmentCenter; + label.opaque = NO; + label.backgroundColor = [UIColor clearColor]; + label.textColor = self.labelColor; + label.font = self.labelFont; + label.text = self.labelText; + [self addSubview:label]; + + detailsLabel = [[UILabel alloc] initWithFrame:self.bounds]; + detailsLabel.font = self.detailsLabelFont; + detailsLabel.adjustsFontSizeToFitWidth = NO; + detailsLabel.textAlignment = MBLabelAlignmentCenter; + detailsLabel.opaque = NO; + detailsLabel.backgroundColor = [UIColor clearColor]; + detailsLabel.textColor = self.detailsLabelColor; + detailsLabel.numberOfLines = 0; + detailsLabel.font = self.detailsLabelFont; + detailsLabel.text = self.detailsLabelText; + [self addSubview:detailsLabel]; +} + +- (void)updateIndicators { + + BOOL isActivityIndicator = [indicator isKindOfClass:[UIActivityIndicatorView class]]; + BOOL isRoundIndicator = [indicator isKindOfClass:[MBRoundProgressView class]]; + + if (mode == MBProgressHUDModeIndeterminate) { + if (!isActivityIndicator) { + // Update to indeterminate indicator + [indicator removeFromSuperview]; + self.indicator = MB_AUTORELEASE([[UIActivityIndicatorView alloc] + initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]); + [(UIActivityIndicatorView *)indicator startAnimating]; + [self addSubview:indicator]; + } +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000 + [(UIActivityIndicatorView *)indicator setColor:self.activityIndicatorColor]; +#endif + } + else if (mode == MBProgressHUDModeDeterminateHorizontalBar) { + // Update to bar determinate indicator + [indicator removeFromSuperview]; + self.indicator = MB_AUTORELEASE([[MBBarProgressView alloc] init]); + [self addSubview:indicator]; + } + else if (mode == MBProgressHUDModeDeterminate || mode == MBProgressHUDModeAnnularDeterminate) { + if (!isRoundIndicator) { + // Update to determinante indicator + [indicator removeFromSuperview]; + self.indicator = MB_AUTORELEASE([[MBRoundProgressView alloc] init]); + [self addSubview:indicator]; + } + if (mode == MBProgressHUDModeAnnularDeterminate) { + [(MBRoundProgressView *)indicator setAnnular:YES]; + } + [(MBRoundProgressView *)indicator setProgressTintColor:self.activityIndicatorColor]; + [(MBRoundProgressView *)indicator setBackgroundTintColor:[self.activityIndicatorColor colorWithAlphaComponent:0.1f]]; + } + else if (mode == MBProgressHUDModeCustomView && customView != indicator) { + // Update custom view indicator + [indicator removeFromSuperview]; + self.indicator = customView; + [self addSubview:indicator]; + } else if (mode == MBProgressHUDModeText) { + [indicator removeFromSuperview]; + self.indicator = nil; + } +} + +#pragma mark - Layout + +- (void)layoutSubviews { + [super layoutSubviews]; + + // Entirely cover the parent view + UIView *parent = self.superview; + if (parent) { + self.frame = parent.bounds; + } + CGRect bounds = self.bounds; + + // Determine the total width and height needed + CGFloat maxWidth = bounds.size.width - 4 * margin; + CGSize totalSize = CGSizeZero; + + CGRect indicatorF = indicator.bounds; + indicatorF.size.width = MIN(indicatorF.size.width, maxWidth); + totalSize.width = MAX(totalSize.width, indicatorF.size.width); + totalSize.height += indicatorF.size.height; + + CGSize labelSize = MB_TEXTSIZE(label.text, label.font); + labelSize.width = MIN(labelSize.width, maxWidth); + totalSize.width = MAX(totalSize.width, labelSize.width); + totalSize.height += labelSize.height; + if (labelSize.height > 0.f && indicatorF.size.height > 0.f) { + totalSize.height += kPadding; + } + + CGFloat remainingHeight = bounds.size.height - totalSize.height - kPadding - 4 * margin; + CGSize maxSize = CGSizeMake(maxWidth, remainingHeight); + CGSize detailsLabelSize = MB_MULTILINE_TEXTSIZE(detailsLabel.text, detailsLabel.font, maxSize, detailsLabel.lineBreakMode); + totalSize.width = MAX(totalSize.width, detailsLabelSize.width); + totalSize.height += detailsLabelSize.height; + if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) { + totalSize.height += kPadding; + } + + totalSize.width += 2 * margin; + totalSize.height += 2 * margin; + + // Position elements + CGFloat yPos = round(((bounds.size.height - totalSize.height) / 2)) + margin + yOffset; + CGFloat xPos = xOffset; + indicatorF.origin.y = yPos; + indicatorF.origin.x = round((bounds.size.width - indicatorF.size.width) / 2) + xPos; + indicator.frame = indicatorF; + yPos += indicatorF.size.height; + + if (labelSize.height > 0.f && indicatorF.size.height > 0.f) { + yPos += kPadding; + } + CGRect labelF; + labelF.origin.y = yPos; + labelF.origin.x = round((bounds.size.width - labelSize.width) / 2) + xPos; + labelF.size = labelSize; + label.frame = labelF; + yPos += labelF.size.height; + + if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) { + yPos += kPadding; + } + CGRect detailsLabelF; + detailsLabelF.origin.y = yPos; + detailsLabelF.origin.x = round((bounds.size.width - detailsLabelSize.width) / 2) + xPos; + detailsLabelF.size = detailsLabelSize; + detailsLabel.frame = detailsLabelF; + + // Enforce minsize and quare rules + if (square) { + CGFloat max = MAX(totalSize.width, totalSize.height); + if (max <= bounds.size.width - 2 * margin) { + totalSize.width = max; + } + if (max <= bounds.size.height - 2 * margin) { + totalSize.height = max; + } + } + if (totalSize.width < minSize.width) { + totalSize.width = minSize.width; + } + if (totalSize.height < minSize.height) { + totalSize.height = minSize.height; + } + + size = totalSize; +} + +#pragma mark BG Drawing + +- (void)drawRect:(CGRect)rect { + + CGContextRef context = UIGraphicsGetCurrentContext(); + UIGraphicsPushContext(context); + + if (self.dimBackground) { + //Gradient colours + size_t gradLocationsNum = 2; + CGFloat gradLocations[2] = {0.0f, 1.0f}; + CGFloat gradColors[8] = {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.75f}; + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, gradColors, gradLocations, gradLocationsNum); + CGColorSpaceRelease(colorSpace); + //Gradient center + CGPoint gradCenter= CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); + //Gradient radius + float gradRadius = MIN(self.bounds.size.width , self.bounds.size.height) ; + //Gradient draw + CGContextDrawRadialGradient (context, gradient, gradCenter, + 0, gradCenter, gradRadius, + kCGGradientDrawsAfterEndLocation); + CGGradientRelease(gradient); + } + + // Set background rect color + if (self.color) { + CGContextSetFillColorWithColor(context, self.color.CGColor); + } else { + CGContextSetGrayFillColor(context, 0.0f, self.opacity); + } + + + // Center HUD + CGRect allRect = self.bounds; + // Draw rounded HUD backgroud rect + CGRect boxRect = CGRectMake(round((allRect.size.width - size.width) / 2) + self.xOffset, + round((allRect.size.height - size.height) / 2) + self.yOffset, size.width, size.height); + float radius = self.cornerRadius; + CGContextBeginPath(context); + CGContextMoveToPoint(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect)); + CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMinY(boxRect) + radius, radius, 3 * (float)M_PI / 2, 0, 0); + CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMaxY(boxRect) - radius, radius, 0, (float)M_PI / 2, 0); + CGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMaxY(boxRect) - radius, radius, (float)M_PI / 2, (float)M_PI, 0); + CGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect) + radius, radius, (float)M_PI, 3 * (float)M_PI / 2, 0); + CGContextClosePath(context); + CGContextFillPath(context); + + UIGraphicsPopContext(); +} + +#pragma mark - KVO + +- (void)registerForKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; + } +} + +- (void)unregisterFromKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self removeObserver:self forKeyPath:keyPath]; + } +} + +- (NSArray *)observableKeypaths { + return [NSArray arrayWithObjects:@"mode", @"customView", @"labelText", @"labelFont", @"labelColor", + @"detailsLabelText", @"detailsLabelFont", @"detailsLabelColor", @"progress", @"activityIndicatorColor", nil]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (![NSThread isMainThread]) { + [self performSelectorOnMainThread:@selector(updateUIForKeypath:) withObject:keyPath waitUntilDone:NO]; + } else { + [self updateUIForKeypath:keyPath]; + } +} + +- (void)updateUIForKeypath:(NSString *)keyPath { + if ([keyPath isEqualToString:@"mode"] || [keyPath isEqualToString:@"customView"] || + [keyPath isEqualToString:@"activityIndicatorColor"]) { + [self updateIndicators]; + } else if ([keyPath isEqualToString:@"labelText"]) { + label.text = self.labelText; + } else if ([keyPath isEqualToString:@"labelFont"]) { + label.font = self.labelFont; + } else if ([keyPath isEqualToString:@"labelColor"]) { + label.textColor = self.labelColor; + } else if ([keyPath isEqualToString:@"detailsLabelText"]) { + detailsLabel.text = self.detailsLabelText; + } else if ([keyPath isEqualToString:@"detailsLabelFont"]) { + detailsLabel.font = self.detailsLabelFont; + } else if ([keyPath isEqualToString:@"detailsLabelColor"]) { + detailsLabel.textColor = self.detailsLabelColor; + } else if ([keyPath isEqualToString:@"progress"]) { + if ([indicator respondsToSelector:@selector(setProgress:)]) { + [(id)indicator setValue:@(progress) forKey:@"progress"]; + } + return; + } + [self setNeedsLayout]; + [self setNeedsDisplay]; +} + +#pragma mark - Notifications + +- (void)registerForNotifications { +#if !TARGET_OS_TV + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + [nc addObserver:self selector:@selector(statusBarOrientationDidChange:) + name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; +#endif +} + +- (void)unregisterFromNotifications { +#if !TARGET_OS_TV + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; +#endif +} + +#if !TARGET_OS_TV +- (void)statusBarOrientationDidChange:(NSNotification *)notification { + UIView *superview = self.superview; + if (!superview) { + return; + } else { + [self updateForCurrentOrientationAnimated:YES]; + } +} +#endif + +- (void)updateForCurrentOrientationAnimated:(BOOL)animated { + // Stay in sync with the superview in any case + if (self.superview) { + self.bounds = self.superview.bounds; + [self setNeedsDisplay]; + } + + // Not needed on iOS 8+, compile out when the deployment target allows, + // to avoid sharedApplication problems on extension targets +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 + // Only needed pre iOS 7 when added to a window + BOOL iOS8OrLater = kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0; + if (iOS8OrLater || ![self.superview isKindOfClass:[UIWindow class]]) return; + + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + CGFloat radians = 0; + if (UIInterfaceOrientationIsLandscape(orientation)) { + if (orientation == UIInterfaceOrientationLandscapeLeft) { radians = -(CGFloat)M_PI_2; } + else { radians = (CGFloat)M_PI_2; } + // Window coordinates differ! + self.bounds = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.width); + } else { + if (orientation == UIInterfaceOrientationPortraitUpsideDown) { radians = (CGFloat)M_PI; } + else { radians = 0; } + } + rotationTransform = CGAffineTransformMakeRotation(radians); + + if (animated) { + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:0.3]; + } + [self setTransform:rotationTransform]; + if (animated) { + [UIView commitAnimations]; + } +#endif +} + +@end + + +@implementation MBRoundProgressView + +#pragma mark - Lifecycle + +- (id)init { + return [self initWithFrame:CGRectMake(0.f, 0.f, 37.f, 37.f)]; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + self.backgroundColor = [UIColor clearColor]; + self.opaque = NO; + _progress = 0.f; + _annular = NO; + _progressTintColor = [[UIColor alloc] initWithWhite:1.f alpha:1.f]; + _backgroundTintColor = [[UIColor alloc] initWithWhite:1.f alpha:.1f]; + [self registerForKVO]; + } + return self; +} + +- (void)dealloc { + [self unregisterFromKVO]; +#if !__has_feature(objc_arc) + [_progressTintColor release]; + [_backgroundTintColor release]; + [super dealloc]; +#endif +} + +#pragma mark - Drawing + +- (void)drawRect:(CGRect)rect { + + CGRect allRect = self.bounds; + CGRect circleRect = CGRectInset(allRect, 2.0f, 2.0f); + CGContextRef context = UIGraphicsGetCurrentContext(); + + if (_annular) { + // Draw background + BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; + CGFloat lineWidth = isPreiOS7 ? 5.f : 2.f; + UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath]; + processBackgroundPath.lineWidth = lineWidth; + processBackgroundPath.lineCapStyle = kCGLineCapButt; + CGPoint center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); + CGFloat radius = (self.bounds.size.width - lineWidth)/2; + CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees + CGFloat endAngle = (2 * (float)M_PI) + startAngle; + [processBackgroundPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; + [_backgroundTintColor set]; + [processBackgroundPath stroke]; + // Draw progress + UIBezierPath *processPath = [UIBezierPath bezierPath]; + processPath.lineCapStyle = isPreiOS7 ? kCGLineCapRound : kCGLineCapSquare; + processPath.lineWidth = lineWidth; + endAngle = (self.progress * 2 * (float)M_PI) + startAngle; + [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; + [_progressTintColor set]; + [processPath stroke]; + } else { + // Draw background + [_progressTintColor setStroke]; + [_backgroundTintColor setFill]; + CGContextSetLineWidth(context, 2.0f); + CGContextFillEllipseInRect(context, circleRect); + CGContextStrokeEllipseInRect(context, circleRect); + // Draw progress + CGPoint center = CGPointMake(allRect.size.width / 2, allRect.size.height / 2); + CGFloat radius = (allRect.size.width - 4) / 2; + CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees + CGFloat endAngle = (self.progress * 2 * (float)M_PI) + startAngle; + [_progressTintColor setFill]; + CGContextMoveToPoint(context, center.x, center.y); + CGContextAddArc(context, center.x, center.y, radius, startAngle, endAngle, 0); + CGContextClosePath(context); + CGContextFillPath(context); + } +} + +#pragma mark - KVO + +- (void)registerForKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; + } +} + +- (void)unregisterFromKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self removeObserver:self forKeyPath:keyPath]; + } +} + +- (NSArray *)observableKeypaths { + return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", @"progress", @"annular", nil]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + [self setNeedsDisplay]; +} + +@end + + +@implementation MBBarProgressView + +#pragma mark - Lifecycle + +- (id)init { + return [self initWithFrame:CGRectMake(.0f, .0f, 120.0f, 20.0f)]; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + _progress = 0.f; + _lineColor = [UIColor whiteColor]; + _progressColor = [UIColor whiteColor]; + _progressRemainingColor = [UIColor clearColor]; + self.backgroundColor = [UIColor clearColor]; + self.opaque = NO; + [self registerForKVO]; + } + return self; +} + +- (void)dealloc { + [self unregisterFromKVO]; +#if !__has_feature(objc_arc) + [_lineColor release]; + [_progressColor release]; + [_progressRemainingColor release]; + [super dealloc]; +#endif +} + +#pragma mark - Drawing + +- (void)drawRect:(CGRect)rect { + CGContextRef context = UIGraphicsGetCurrentContext(); + + CGContextSetLineWidth(context, 2); + CGContextSetStrokeColorWithColor(context,[_lineColor CGColor]); + CGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]); + + // Draw background + float radius = (rect.size.height / 2) - 2; + CGContextMoveToPoint(context, 2, rect.size.height/2); + CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); + CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); + CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); + CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); + CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); + CGContextFillPath(context); + + // Draw border + CGContextMoveToPoint(context, 2, rect.size.height/2); + CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); + CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); + CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); + CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); + CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); + CGContextStrokePath(context); + + CGContextSetFillColorWithColor(context, [_progressColor CGColor]); + radius = radius - 2; + float amount = self.progress * rect.size.width; + + // Progress in the middle area + if (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) { + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); + CGContextAddLineToPoint(context, amount, 4); + CGContextAddLineToPoint(context, amount, radius + 4); + + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); + CGContextAddLineToPoint(context, amount, rect.size.height - 4); + CGContextAddLineToPoint(context, amount, radius + 4); + + CGContextFillPath(context); + } + + // Progress in the right arc + else if (amount > radius + 4) { + float x = amount - (rect.size.width - radius - 4); + + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 4, 4); + float angle = -acos(x/radius); + if (isnan(angle)) angle = 0; + CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, M_PI, angle, 0); + CGContextAddLineToPoint(context, amount, rect.size.height/2); + + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 4, rect.size.height - 4); + angle = acos(x/radius); + if (isnan(angle)) angle = 0; + CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1); + CGContextAddLineToPoint(context, amount, rect.size.height/2); + + CGContextFillPath(context); + } + + // Progress is in the left arc + else if (amount < radius + 4 && amount > 0) { + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); + CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); + + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); + CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); + + CGContextFillPath(context); + } +} + +#pragma mark - KVO + +- (void)registerForKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; + } +} + +- (void)unregisterFromKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self removeObserver:self forKeyPath:keyPath]; + } +} + +- (NSArray *)observableKeypaths { + return [NSArray arrayWithObjects:@"lineColor", @"progressRemainingColor", @"progressColor", @"progress", nil]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + [self setNeedsDisplay]; +} + +@end diff --git a/Demos/iOS/MasterViewController.h b/Demos/iOS/MasterViewController.h new file mode 100644 index 00000000..02ded327 --- /dev/null +++ b/Demos/iOS/MasterViewController.h @@ -0,0 +1,12 @@ +// +// MasterViewController.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +@interface MasterViewController : UITableViewController +@end diff --git a/Demos/iOS/MasterViewController.m b/Demos/iOS/MasterViewController.m new file mode 100644 index 00000000..9f7c61d6 --- /dev/null +++ b/Demos/iOS/MasterViewController.m @@ -0,0 +1,95 @@ +// +// MasterViewController.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "MasterViewController.h" + +#import "KivaViewController.h" +#import "GitHubViewController.h" +#import "StorageViewController.h" +#import "KivaViewControllerNetworking.h" + +#import "JSONModel+networking.h" + +@interface MasterViewController () { + NSMutableArray *_objects; +} +@end + +@implementation MasterViewController + +-(void)viewDidAppear:(BOOL)animated +{ + +} + +-(IBAction)actionLoadCall:(id)sender +{ + +} + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + self.title = @"Demos"; + _objects = [NSMutableArray arrayWithArray:@[@"Kiva.org demo", @"GitHub demo", @"Used for storage"]]; + } + return self; +} + +#pragma mark - Table View +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return _objects.count; +} + +// Customize the appearance of table view cells. +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Cell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + } + + NSDate *object = _objects[indexPath.row]; + cell.textLabel.text = [object description]; + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + switch (indexPath.row) { + case 0:{ + KivaViewController* kiva = [[KivaViewController alloc] initWithNibName:@"KivaViewController" bundle:nil]; + [self.navigationController pushViewController:kiva animated:YES]; + }break; + + case 1:{ + GitHubViewController* gh = [[GitHubViewController alloc] initWithNibName:@"GitHubViewController" bundle:nil]; + [self.navigationController pushViewController:gh animated:YES]; + }break; + + case 2:{ + StorageViewController* sc = [[StorageViewController alloc] initWithNibName:@"StorageViewController" bundle:nil]; + [self.navigationController pushViewController:sc animated:YES]; + }break; + + default: + break; + } +} + +@end diff --git a/Demos/iOS/MyDataModel.h b/Demos/iOS/MyDataModel.h new file mode 100644 index 00000000..df20623b --- /dev/null +++ b/Demos/iOS/MyDataModel.h @@ -0,0 +1,16 @@ +// +// MyDataModel.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONModel.h" + +@interface MyDataModel : JSONModel + +@property (strong, nonatomic) NSString* content; +@property (assign, nonatomic) int timesSaved; + +@end diff --git a/Demos/iOS/MyDataModel.m b/Demos/iOS/MyDataModel.m new file mode 100644 index 00000000..781f889e --- /dev/null +++ b/Demos/iOS/MyDataModel.m @@ -0,0 +1,13 @@ +// +// MyDataModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "MyDataModel.h" + +@implementation MyDataModel + +@end diff --git a/Demos/iOS/StorageViewController.h b/Demos/iOS/StorageViewController.h new file mode 100644 index 00000000..1e779100 --- /dev/null +++ b/Demos/iOS/StorageViewController.h @@ -0,0 +1,13 @@ +// +// StorageViewController.h +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +@interface StorageViewController : UIViewController + +@end diff --git a/Demos/iOS/StorageViewController.m b/Demos/iOS/StorageViewController.m new file mode 100644 index 00000000..a586aa3f --- /dev/null +++ b/Demos/iOS/StorageViewController.m @@ -0,0 +1,67 @@ +// +// StorageViewController.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "StorageViewController.h" +#import "MyDataModel.h" + +@interface StorageViewController () +{ + IBOutlet UITextField* txtContent; + IBOutlet UILabel* lblTimes; + + NSString* filePath; + MyDataModel* data; +} + +@end + +@implementation StorageViewController + +-(void)viewDidAppear:(BOOL)animated +{ + NSString* libraryDir = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory , NSUserDomainMask, YES)[0]; + filePath = [libraryDir stringByAppendingPathComponent:@"saved.plist"]; + + [self loadFromFile]; +} + +-(void)loadFromFile +{ + //load from file + NSDictionary* object = [NSDictionary dictionaryWithContentsOfFile:filePath]; + + //initialize model with data + JSONModelError* initError; + data = [[MyDataModel alloc] initWithDictionary: object error:&initError]; + + if (!data) { + data = [[MyDataModel alloc] init]; + } + + //update the UI + lblTimes.text = [NSString stringWithFormat:@"Times saved: %i", data.timesSaved]; + txtContent.text = data.content; +} + +-(IBAction)actionSave:(id)sender +{ + [txtContent resignFirstResponder]; + + //update model + data.timesSaved++; + data.content = txtContent.text; + + //update UI + lblTimes.text = [NSString stringWithFormat:@"Times saved: %i", data.timesSaved]; + + //save to disc + [[data toDictionary] writeToFile:filePath atomically:YES]; + NSLog(@"%@", [data toDictionary]); +} + +@end diff --git a/Demos/iOS/StorageViewController.xib b/Demos/iOS/StorageViewController.xib new file mode 100644 index 00000000..1cda668e --- /dev/null +++ b/Demos/iOS/StorageViewController.xib @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + This screen uses a JSONModel object to save data to the device's disc. The model persists the text that you can edit in the text box below + the number of times you saved to the file. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demos/iOS/btnCheck.png b/Demos/iOS/btnCheck.png new file mode 100644 index 0000000000000000000000000000000000000000..fbab71ddf26edc71549235bdbc128f5bb961aa45 GIT binary patch literal 1334 zcmV-61g$jY+W6wudC-twn-Z$TenplIjq)0*OLJLx(SGkjI0+5 zg>RsGYHI3nRi>%{stN%2u?sMpOrJ!HqTazUFWu(x!icxtKJ>0KHdY1AXaN4$1ei?5 zV)0gS5l(P0oFIS+0mouwF~Wj^f)8NGGk}Po0%{C3q)w+3LX|)&S4(a*8Ve*6iJk+b zG+><^0tcWcf$iIu8h1jg{Sb!k;08{vt*MD3V`JN+L{Wc2^Ax}im|ZD(Q&ZEMGO6S& z2Qe-dRQ3PbqC}!Zcs#qrff%{G8UiO-p-|+Nm6e@?uAP8QDs7U9*@r_V5JDO z1F&+s&Y+{CW4fxUsvm`gpMaK@i@GgaHXlQSxqys}jQzz$Mdk2QT;TV+WY3Mpy(CF~ z6~^ZaACdtv7YSLg9`#@E>YDxR%$c6~`T6TGt!Hry&Yw5GER)JAI1nflShnCFh2`bt z<-p+SYJ=e;=okXHg9O|TQbD%z`FzO|w|&|-Zr+$H*Xw_Axm-U$^Ls!a0XAa^@$qqF zEZG{y50l^=Q0of_proghc7d%zi^b9dlcq5CyMof(+$@vF#I%PC!gq24=K=@-dZ)#5 z+XY;AW@cut!nE%IcK|cA13>(WKp=RER*F+Tve_pWKde@(U2}8OCbRid=&%7ETxk9> zS|*cSij0WZ6ZBhQUSYNN%$Jsy_D)SrbucUc6_KM6v;%2rFaDmmE0I)g-=4gnoCzM- z4z|tXaXGv9?0#-`c4oe}x3~ZF=~JGR=Tk0-M51i}RpWjR^!4?-OG--m#>dBh1j26t zR=_m7F*rJma2)5M99^L=H{|9X$f4*c@b`dS;P}LZtG4#+$H$HyNl+@4YAQsc7#J9I zzkl-NU5CSQl_9qPCViuX6@W2O9#>geS$!Zk=haYWq}%QGK)?~pi9}^+c;tRzVc~$y zW<$1L0o-E9y}s}A6~Ky!HyEmGUdztjj|Cy1f}|BZVB7z)*&b-L+QFfrVMN{r_!%$} zNFGc8D?PV|13uyN&qV&!E83wLq<$nX2FYwK$Lqm z8tq7TcXubV@-D#N08gk48cF~yg3IM5f`~8D)6-M^BF%?o!40MYXIk? z$X9wN+ysZy-b*blx9p>%lzsFbjZx+~IB?gSot=eF&StraUcNmx z=AgzLb{c<-jCcv)QivTr%Tow5$Z^Z(!So}g;+ZC(R>7?xTQEz^J{ypfw3^)o< zu9|!e*K&bWDotx|Z|~9R-b07U*MQ@IC)Py1f*=f5A^=H%WG1JhB!gn${(1?Zoj|uL sbRsh8bxq{!_Rr{%4*akGoc=4o04zDvJ>92s{Qv*}07*qoM6N<$f`j#UtN;K2 literal 0 HcmV?d00001 diff --git a/Demos/iOS/btnCheck@2x.png b/Demos/iOS/btnCheck@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..1071f3eb270736fadaf1aeb3aeb67edfcf7251f8 GIT binary patch literal 3252 zcmV;l3`_HgP)9Rv8Fx}p$0W=O;WYuQ9c&=eGWAYiKjR50k#o|5+1oW^Pz zTaBqP%0m{SIg%Ps5H=#>I=y%1zcY7-4o zZvJ^jz%v4#5zx&)Kd>l(cJJO5mXea<1De21IbzXt z3j#K7*x=*q<5#57XxyD$^bv7!algmi?mzwu{Kz)Vhq&}YW z@$(xV8yovueA3sJKj^9i@cZ}gOYY@rc$?#4(es=lG9gl9%;?dxX3m^B&6YptiUgp& zd$X6iySc|BjRqs(IfONi$R8p{+{Yuy3V7VcO?)386&blYC@5$o{(et(DReagP*zsv zFN~gEDFh@EogDxtKt(b*vCZRuc(D(O_w+OvdM{qQcr*SANs^o>30;W*l#!7!$;;@K zrGP~slnCj_Aq3}Ao977`Jm>4%GarTkl$(>gaP_LyZouA?BoFP{ zxpT~O0|p$^Xf--w-XduB4=GE502T?r=VF`VWpZA6Y3%G7GiFT2&+J3|0pDTM%glVE zuZR2Y(9qDojv6(}6Zh%cOEc~DNl#B7?Ca-y9D{d6vT0Kb;6?DnOO`AlxwiL{AYtp)tv&$*2mV8+)wvN! zJOH6u7Aqdn=}F*u(I1GgrF-aoU^S)+Q+?vvq|flzh!UOKC1B~2B|ZK9{R?$ktw9<9 zaYmzY?D}=sAt7O1H^n4~>c z7{DB}1Z1ZO_aWuHva<5ts#UAX&1Unr`0+$;Vrgt^(kSmh?&3au`plugiJ9>{buv6R zeE9IG$;rt{P<8dN7YXy`&C`u}VGK@jox)k|vchQqq=uS04@-j~14(^VRaMO^S0V z@8f0-mL}!q&SiPWjvdQ&bu~mw!>Q*cZ~~bRVrM|^5~Q{OXW~VH`>wkBeoRbEd3AMl z1@5_k<#Qn5I+iD{YWwDmwTb}7a)7ZB~IR3Sx4)zvkYWy_XTVDLoqUt#$I%VjK81Uwc? z3j!h|XF3E2kIZv$aPXEH=M+|v^=zc;cv7!Ue)YY(jg1Yd+qUK4&RbZTACd%ASXdbE z;o-5IA``6>MkKR9fKY79`bVltU%GnxcAX_QHm(wze+6j#b2WH!x0(Qc?%cUa27~L% zbPxfIUEx@;QVlM<#XcU#*BP(R*nmB3ZT8;1$8l#Zmirwf0p;f(!YOXQWcFsVmIYbs z3gM6hGgJu7AUxM_`}TvSOP76p?b@{p0DT^g#O%L^dBOY@AAkJ%h68Zd2o)%suZMJb35?KCJ_$+x+_Bg8XS-Ui}Z_nnfqDPZXGTOIILTgiH%G zu$O3Li zBOc$@Jmjzy8y9CTDK6O~h7p=WlaNOe4GrznV6)W7#RadCGA!{3A%}>eXV2a-ixy>0 z7(YG)%1>L)79BctFxX#AakY-p7)t08$EI_k;~_}FG7&_TjbEg!A&EBCSx+d<;+ea#eYbEM^78q27BaKnYeMMy8{mbGY>VFm z&s~|Eyd^ikpx{edbnr}SDQAMrQKMnna^WHM8I7KUQ&Us2yo|;HgoOC`<%W=u=l|@4 z(`)uQyp`s8Yi+B9S_i?kHgWB@Cr+Fo;7cLSlQsV}mfIbPLRL`#(pi$$4#e`KHEUMC z6BQX5B-rryG!0?n15)`br4w+p=X#bxuyM8hiyU=+KZ`-!5CMzqOft(Y2HJFg_{?@JYr@Z#sAfzr#R5>EDY1#r) z)F`>7`g-f(UirrEjNP}=($XpT&q4F$0REwCkk$xbNpJ@eLetW=&wu5WNdvhS0BkP- zHINqfvpJUh9f7Gdl_P2WY2UuO&6|@;aPtai{yc#1bOF{D0W1l9sU_^%xpU#9NfZ6# zLP#JXN-0k`SPsaBeF#udBCAAF`T{}CCj^{ZE}DF(nS_(v+i+ao|t!VsNK zH!3|neg4FW6MfaDD=^x!9UZI}h`^YFdI_*kIDY(i!}8_vB>?yfF#R%n>_2pb07`-* zwFFE;*q%KZ3&xEb_ne|zsd6LMV7+?f+EyG#(K_8vV68+29UuNu^pQC>Hn!Aav0MT0 z=VAR*@DCnozrBM5uq1d;OW2#8wQy`igtuh9l5Mm4RiXslORz4o@!(MKQGz(8_!hXo zpZNIBqL`QxoadK=vpWZx|IQxZAC>?$2}AXIeOPvO_JS8*{BeJ^-*3N&Zaa%Oefo6c zym|8ocoTppW?ur}@7e==X9%Dq=qU*}r49dJ|NaHx;o(Ns^@CDvrG--7z}YUP$%V7$ z&fT3m_pQ>##zq!=F@SHh7x>N+z>?5UBEcy3l}alz4>Nz zso88cF`JkK{Qv9?{!s`}lMv`?FuahH`@#Is&`=Knvcq=sTS4}ZqQzYL>his)sHoE0 z_4RZI_Z$QMj=jM@Dgl%PCz%9S*U<+K z;Uz|6TQ&XDB!Gh&Uk~rv0u2Vk=z@a$1;HbO-H~b)&>c0{)|YqMuYP^C`Hh(~%d4uY zOi;_8g)ObB#|hqE1lT0u$dL~h4j(?kt?e=gBdof9f9lj}<=3x^+t**hn*WNvxOkl4 z?fC-<3uub0)#Cd4`hU-w6`gtca`7!*eyPdqCczHSjT<*CQBkuhFnIdn;=HZB`>sGh z3leVLym=-%Iy$Sgw4|2)Oof%Y+FA>~UTHF!Z0+4Y5%7|6+W*JWWI4FNUcz)w&wg9} z_35Xz)z#k#L~5{Hxl(Eg4h|;k{cl)Ou#i__Be3*pWe2%S5x|l_D##h$-rj#WbLO+U znwn~%veIM;3kxG!CofLO>-D)<$gj70KXLGnkpM~pc_%=2l3w@q^+`Q->g3Jw1qB+IKeLQLC^l{ mY&ZWrBj6bU-Td=^0R{kiNRO)@qT$B?0000(y literal 0 HcmV?d00001 diff --git a/Demos/iOS/en.lproj/InfoPlist.strings b/Demos/iOS/en.lproj/InfoPlist.strings new file mode 100644 index 00000000..477b28ff --- /dev/null +++ b/Demos/iOS/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Demos/iOS/en.lproj/MasterViewController.xib b/Demos/iOS/en.lproj/MasterViewController.xib new file mode 100644 index 00000000..4e642eb7 --- /dev/null +++ b/Demos/iOS/en.lproj/MasterViewController.xib @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demos/iOS/main.m b/Demos/iOS/main.m new file mode 100644 index 00000000..b332e8bf --- /dev/null +++ b/Demos/iOS/main.m @@ -0,0 +1,18 @@ +// +// main.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Demos/macOS.xcodeproj/project.pbxproj b/Demos/macOS.xcodeproj/project.pbxproj new file mode 100644 index 00000000..d67f851d --- /dev/null +++ b/Demos/macOS.xcodeproj/project.pbxproj @@ -0,0 +1,953 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1AE9CA931C21F50C00B8F5C1 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */; }; + 1C008FE518B7AE54002DFD3A /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */; }; + 9C05B43F168CEB220054215E /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3F7168CEB220054215E /* ArrayTests.m */; }; + 9C05B440168CEB220054215E /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */; }; + 9C05B442168CEB220054215E /* CustomPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3FD168CEB220054215E /* CustomPropsTests.m */; }; + 9C05B443168CEB220054215E /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B3FF168CEB220054215E /* colors.json */; }; + 9C05B444168CEB220054215E /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B400168CEB220054215E /* converts.json */; }; + 9C05B445168CEB220054215E /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B401168CEB220054215E /* github-iphone.json */; }; + 9C05B446168CEB220054215E /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B402168CEB220054215E /* jsonTypes.json */; }; + 9C05B447168CEB220054215E /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B403168CEB220054215E /* nestedData.json */; }; + 9C05B449168CEB220054215E /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B405168CEB220054215E /* post.json */; }; + 9C05B44A168CEB220054215E /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B406168CEB220054215E /* primitives.json */; }; + 9C05B44B168CEB220054215E /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B407168CEB220054215E /* primitivesWithErrors.json */; }; + 9C05B44C168CEB220054215E /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B408168CEB220054215E /* withOptProp.json */; }; + 9C05B44D168CEB220054215E /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B409168CEB220054215E /* withoutOptProp.json */; }; + 9C05B44E168CEB220054215E /* IdPropertyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B40B168CEB220054215E /* IdPropertyTests.m */; }; + 9C05B44F168CEB220054215E /* JSONTypesModelWithValidation1.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */; }; + 9C05B450168CEB220054215E /* JSONTypesModelWithValidation2.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */; }; + 9C05B451168CEB220054215E /* JSONTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B411168CEB220054215E /* JSONTypesReadTests.m */; }; + 9C05B452168CEB220054215E /* JSONValueTransformer+UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */; }; + 9C05B453168CEB220054215E /* KeyMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B415168CEB220054215E /* KeyMappingTests.m */; }; + 9C05B454168CEB220054215E /* NestedModelsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B417168CEB220054215E /* NestedModelsTests.m */; }; + 9C05B455168CEB220054215E /* OptionalPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */; }; + 9C05B456168CEB220054215E /* PersistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B41B168CEB220054215E /* PersistTests.m */; }; + 9C05B457168CEB220054215E /* PrimitiveTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B41D168CEB220054215E /* PrimitiveTypesReadTests.m */; }; + 9C05B458168CEB220054215E /* SimpleDataErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B41F168CEB220054215E /* SimpleDataErrorTests.m */; }; + 9C05B459168CEB220054215E /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B422168CEB220054215E /* BuiltInConversionsModel.m */; }; + 9C05B45A168CEB220054215E /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B424168CEB220054215E /* CustomPropertyModel.m */; }; + 9C05B45B168CEB220054215E /* GitHubKeyMapRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B426168CEB220054215E /* GitHubKeyMapRepoModel.m */; }; + 9C05B45C168CEB220054215E /* GitHubKeyMapRepoModelDict.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B428168CEB220054215E /* GitHubKeyMapRepoModelDict.m */; }; + 9C05B45D168CEB220054215E /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B42A168CEB220054215E /* GitHubRepoModel.m */; }; + 9C05B45E168CEB220054215E /* GitHubRepoModelForUSMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B42C168CEB220054215E /* GitHubRepoModelForUSMapper.m */; }; + 9C05B45F168CEB220054215E /* ImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B42E168CEB220054215E /* ImageModel.m */; }; + 9C05B460168CEB220054215E /* JSONTypesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B430168CEB220054215E /* JSONTypesModel.m */; }; + 9C05B461168CEB220054215E /* NestedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B432168CEB220054215E /* NestedModel.m */; }; + 9C05B462168CEB220054215E /* OptionalPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B434168CEB220054215E /* OptionalPropModel.m */; }; + 9C05B463168CEB220054215E /* PostModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B436168CEB220054215E /* PostModel.m */; }; + 9C05B464168CEB220054215E /* PostsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B438168CEB220054215E /* PostsModel.m */; }; + 9C05B465168CEB220054215E /* PrimitivesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B43A168CEB220054215E /* PrimitivesModel.m */; }; + 9C05B466168CEB220054215E /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B43C168CEB220054215E /* ReposModel.m */; }; + 9C05B467168CEB220054215E /* ValidationTestSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B43E168CEB220054215E /* ValidationTestSuite.m */; }; + 9C08C1AF1749750100AA8CC9 /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */; }; + 9C66DF47168CEECF0015CCDF /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B3FF168CEB220054215E /* colors.json */; }; + 9C66DF48168CEECF0015CCDF /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B400168CEB220054215E /* converts.json */; }; + 9C66DF49168CEECF0015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B401168CEB220054215E /* github-iphone.json */; }; + 9C66DF4A168CEECF0015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B402168CEB220054215E /* jsonTypes.json */; }; + 9C66DF4B168CEECF0015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B403168CEB220054215E /* nestedData.json */; }; + 9C66DF4D168CEECF0015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B405168CEB220054215E /* post.json */; }; + 9C66DF4E168CEECF0015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B406168CEB220054215E /* primitives.json */; }; + 9C66DF4F168CEECF0015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B407168CEB220054215E /* primitivesWithErrors.json */; }; + 9C66DF50168CEECF0015CCDF /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B408168CEB220054215E /* withOptProp.json */; }; + 9C66DF51168CEECF0015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B409168CEB220054215E /* withoutOptProp.json */; }; + 9C66DFF6168CF09A0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFDF168CF09A0015CCDF /* JSONModel.m */; }; + 9C66DFF7168CF09A0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFDF168CF09A0015CCDF /* JSONModel.m */; }; + 9C66DFFA168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */; }; + 9C66DFFB168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */; }; + 9C66DFFC168CF09A0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */; }; + 9C66DFFD168CF09A0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */; }; + 9C66E000168CF09A0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */; }; + 9C66E001168CF09A0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */; }; + 9C66E002168CF09A0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */; }; + 9C66E003168CF09A0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */; }; + 9C66E004168CF09A0015CCDF /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */; }; + 9C66E005168CF09A0015CCDF /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */; }; + 9C66E006168CF09A0015CCDF /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */; }; + 9C66E007168CF09A0015CCDF /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */; }; + 9C66E008168CF09A0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */; }; + 9C66E009168CF09A0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */; }; + 9C6C35DF181CF7B500BEE72D /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */; }; + 9C6C35E0181CF7B500BEE72D /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */; }; + 9C6C35E1181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */; }; + 9C6C35E2181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */; }; + 9C72A49D171447F70047C6AE /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */; }; + 9C735D67170B717F00FF96F5 /* JSONAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D66170B717F00FF96F5 /* JSONAPITests.m */; }; + 9C735D6D170B7A2D00FF96F5 /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */; }; + 9C735D73170C048C00FF96F5 /* InitFromWebTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */; }; + 9C97441C168CF255004DA333 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C97441B168CF255004DA333 /* Cocoa.framework */; }; + 9C97441E168CF264004DA333 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C97441D168CF264004DA333 /* Cocoa.framework */; }; + 9CB6BC2E168E07730002535B /* GitHubUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB6BC2D168E07730002535B /* GitHubUserModel.m */; }; + 9CC27C9C1689B7BE008B5411 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */; }; + 9CC27C9E1689B7BE008B5411 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27C9D1689B7BE008B5411 /* main.m */; }; + 9CC27CA21689B7BE008B5411 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27CA01689B7BE008B5411 /* Credits.rtf */; }; + 9CC27CA51689B7BE008B5411 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27CA41689B7BE008B5411 /* AppDelegate.m */; }; + 9CC27CA81689B7BE008B5411 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27CA61689B7BE008B5411 /* MainMenu.xib */; }; + 9CC27CCD1689B92A008B5411 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27CCB1689B92A008B5411 /* ViewController.m */; }; + 9CC27CCE1689B92A008B5411 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27CCC1689B92A008B5411 /* ViewController.xib */; }; + 9CC2FCB9168CE7340059FE67 /* KivaFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC2FCB4168CE7340059FE67 /* KivaFeed.m */; }; + 9CC2FCBA168CE7340059FE67 /* LoanModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC2FCB6168CE7340059FE67 /* LoanModel.m */; }; + 9CC2FCBB168CE7340059FE67 /* LocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC2FCB8168CE7340059FE67 /* LocationModel.m */; }; + 9CCAFD941901B7F500314886 /* SpecialPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CCAFD931901B7F500314886 /* SpecialPropertiesTests.m */; }; + 9CD22C8618FF32F7003E66AD /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */; }; + 9CD425861702224F00A42AA1 /* HTTPClientSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425851702224F00A42AA1 /* HTTPClientSuite.m */; }; + 9CD4258B170222AF00A42AA1 /* MockNSURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD42588170222AF00A42AA1 /* MockNSURLConnection.m */; }; + 9CD4258C170222AF00A42AA1 /* MTTestSemaphor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD4258A170222AF00A42AA1 /* MTTestSemaphor.m */; }; + 9CFDD0A4176E9742007B7DFA /* EnumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A3176E9742007B7DFA /* EnumModel.m */; }; + D5F918E5172AD99600AC2C8E /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */; }; + D5F918EB172ADA3F00AC2C8E /* SpecialPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */; }; + D5F918EE172ADAF900AC2C8E /* SpecialPropertyNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D5F918ED172ADAF800AC2C8E /* SpecialPropertyNameTests.m */; }; + D5F918EF172ADC2400AC2C8E /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1AE9CA911C21F50C00B8F5C1 /* RenamedPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenamedPropertyModel.h; sourceTree = ""; }; + 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RenamedPropertyModel.m; sourceTree = ""; }; + 1C008FE318B7AE54002DFD3A /* ModelForUpperCaseMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelForUpperCaseMapper.h; sourceTree = ""; }; + 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelForUpperCaseMapper.m; sourceTree = ""; }; + 9C05B2A8168CE9600054215E /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 9C05B2B0168CE9600054215E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info.plist"; sourceTree = ""; }; + 9C05B3F6168CEB220054215E /* ArrayTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayTests.h; sourceTree = ""; }; + 9C05B3F7168CEB220054215E /* ArrayTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrayTests.m; sourceTree = ""; }; + 9C05B3F8168CEB220054215E /* BuiltInConversionsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsTests.h; sourceTree = ""; }; + 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsTests.m; sourceTree = ""; }; + 9C05B3FC168CEB220054215E /* CustomPropsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropsTests.h; sourceTree = ""; }; + 9C05B3FD168CEB220054215E /* CustomPropsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropsTests.m; sourceTree = ""; }; + 9C05B3FF168CEB220054215E /* colors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = colors.json; sourceTree = ""; }; + 9C05B400168CEB220054215E /* converts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = converts.json; sourceTree = ""; }; + 9C05B401168CEB220054215E /* github-iphone.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "github-iphone.json"; sourceTree = ""; }; + 9C05B402168CEB220054215E /* jsonTypes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = jsonTypes.json; sourceTree = ""; }; + 9C05B403168CEB220054215E /* nestedData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedData.json; sourceTree = ""; }; + 9C05B405168CEB220054215E /* post.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = post.json; sourceTree = ""; }; + 9C05B406168CEB220054215E /* primitives.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitives.json; sourceTree = ""; }; + 9C05B407168CEB220054215E /* primitivesWithErrors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitivesWithErrors.json; sourceTree = ""; }; + 9C05B408168CEB220054215E /* withOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withOptProp.json; sourceTree = ""; }; + 9C05B409168CEB220054215E /* withoutOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withoutOptProp.json; sourceTree = ""; }; + 9C05B40A168CEB220054215E /* IdPropertyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdPropertyTests.h; sourceTree = ""; }; + 9C05B40B168CEB220054215E /* IdPropertyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdPropertyTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C05B40C168CEB220054215E /* JSONTypesModelWithValidation1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation1.h; sourceTree = ""; }; + 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation1.m; sourceTree = ""; }; + 9C05B40E168CEB220054215E /* JSONTypesModelWithValidation2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation2.h; sourceTree = ""; }; + 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation2.m; sourceTree = ""; }; + 9C05B410168CEB220054215E /* JSONTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesReadTests.h; sourceTree = ""; }; + 9C05B411168CEB220054215E /* JSONTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesReadTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C05B412168CEB220054215E /* JSONValueTransformer+UIColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONValueTransformer+UIColor.h"; sourceTree = ""; }; + 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONValueTransformer+UIColor.m"; sourceTree = ""; }; + 9C05B414168CEB220054215E /* KeyMappingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyMappingTests.h; sourceTree = ""; }; + 9C05B415168CEB220054215E /* KeyMappingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeyMappingTests.m; sourceTree = ""; }; + 9C05B416168CEB220054215E /* NestedModelsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModelsTests.h; sourceTree = ""; }; + 9C05B417168CEB220054215E /* NestedModelsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModelsTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C05B418168CEB220054215E /* OptionalPropertiesTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropertiesTests.h; sourceTree = ""; }; + 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropertiesTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9C05B41A168CEB220054215E /* PersistTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistTests.h; sourceTree = ""; }; + 9C05B41B168CEB220054215E /* PersistTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersistTests.m; sourceTree = ""; }; + 9C05B41C168CEB220054215E /* PrimitiveTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitiveTypesReadTests.h; sourceTree = ""; }; + 9C05B41D168CEB220054215E /* PrimitiveTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitiveTypesReadTests.m; sourceTree = ""; }; + 9C05B41E168CEB220054215E /* SimpleDataErrorTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleDataErrorTests.h; sourceTree = ""; }; + 9C05B41F168CEB220054215E /* SimpleDataErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleDataErrorTests.m; sourceTree = ""; }; + 9C05B421168CEB220054215E /* BuiltInConversionsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsModel.h; sourceTree = ""; }; + 9C05B422168CEB220054215E /* BuiltInConversionsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsModel.m; sourceTree = ""; }; + 9C05B423168CEB220054215E /* CustomPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropertyModel.h; sourceTree = ""; }; + 9C05B424168CEB220054215E /* CustomPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropertyModel.m; sourceTree = ""; }; + 9C05B425168CEB220054215E /* GitHubKeyMapRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModel.h; sourceTree = ""; }; + 9C05B426168CEB220054215E /* GitHubKeyMapRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModel.m; sourceTree = ""; }; + 9C05B427168CEB220054215E /* GitHubKeyMapRepoModelDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModelDict.h; sourceTree = ""; }; + 9C05B428168CEB220054215E /* GitHubKeyMapRepoModelDict.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModelDict.m; sourceTree = ""; }; + 9C05B429168CEB220054215E /* GitHubRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModel.h; sourceTree = ""; }; + 9C05B42A168CEB220054215E /* GitHubRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModel.m; sourceTree = ""; }; + 9C05B42B168CEB220054215E /* GitHubRepoModelForUSMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModelForUSMapper.h; sourceTree = ""; }; + 9C05B42C168CEB220054215E /* GitHubRepoModelForUSMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModelForUSMapper.m; sourceTree = ""; }; + 9C05B42D168CEB220054215E /* ImageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageModel.h; sourceTree = ""; }; + 9C05B42E168CEB220054215E /* ImageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageModel.m; sourceTree = ""; }; + 9C05B42F168CEB220054215E /* JSONTypesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModel.h; sourceTree = ""; }; + 9C05B430168CEB220054215E /* JSONTypesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModel.m; sourceTree = ""; }; + 9C05B431168CEB220054215E /* NestedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModel.h; sourceTree = ""; }; + 9C05B432168CEB220054215E /* NestedModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModel.m; sourceTree = ""; }; + 9C05B433168CEB220054215E /* OptionalPropModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropModel.h; sourceTree = ""; }; + 9C05B434168CEB220054215E /* OptionalPropModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropModel.m; sourceTree = ""; }; + 9C05B435168CEB220054215E /* PostModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostModel.h; sourceTree = ""; }; + 9C05B436168CEB220054215E /* PostModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostModel.m; sourceTree = ""; }; + 9C05B437168CEB220054215E /* PostsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostsModel.h; sourceTree = ""; }; + 9C05B438168CEB220054215E /* PostsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostsModel.m; sourceTree = ""; }; + 9C05B439168CEB220054215E /* PrimitivesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitivesModel.h; sourceTree = ""; }; + 9C05B43A168CEB220054215E /* PrimitivesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitivesModel.m; sourceTree = ""; }; + 9C05B43B168CEB220054215E /* ReposModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReposModel.h; sourceTree = ""; }; + 9C05B43C168CEB220054215E /* ReposModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReposModel.m; sourceTree = ""; }; + 9C05B43D168CEB220054215E /* ValidationTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidationTestSuite.h; sourceTree = ""; }; + 9C05B43E168CEB220054215E /* ValidationTestSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidationTestSuite.m; sourceTree = ""; }; + 9C08C1AD1749750100AA8CC9 /* CopyrightModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyrightModel.h; sourceTree = ""; }; + 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyrightModel.m; sourceTree = ""; }; + 9C66DFDE168CF09A0015CCDF /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 9C66DFDF168CF09A0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; }; + 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; }; + 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; }; + 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 9C66DFEB168CF09A0015CCDF /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; }; + 9C66DFED168CF09A0015CCDF /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONHTTPClient.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONHTTPClient.m; sourceTree = ""; }; + 9C66DFEF168CF09A0015CCDF /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "JSONModel+networking.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "JSONModel+networking.m"; sourceTree = ""; }; + 9C66DFF2168CF09A0015CCDF /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONKeyMapper.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONKeyMapper.m; sourceTree = ""; }; + 9C66DFF4168CF09A0015CCDF /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONValueTransformer.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONValueTransformer.m; sourceTree = ""; }; + 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithArrayError.json; sourceTree = ""; }; + 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = ""; }; + 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = ""; }; + 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImagesObject.json; sourceTree = ""; }; + 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 9C735D65170B717F00FF96F5 /* JSONAPITests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPITests.h; sourceTree = ""; }; + 9C735D66170B717F00FF96F5 /* JSONAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPITests.m; sourceTree = ""; }; + 9C735D6B170B7A2D00FF96F5 /* RpcRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RpcRequestModel.h; sourceTree = ""; }; + 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RpcRequestModel.m; sourceTree = ""; }; + 9C735D71170C048C00FF96F5 /* InitFromWebTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitFromWebTests.h; sourceTree = ""; }; + 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitFromWebTests.m; sourceTree = ""; }; + 9C97441B168CF255004DA333 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 9C97441D168CF264004DA333 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 9CB6BC2C168E07730002535B /* GitHubUserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GitHubUserModel.h; path = JSONModelDemo_iOS/GitHubUserModel.h; sourceTree = SOURCE_ROOT; }; + 9CB6BC2D168E07730002535B /* GitHubUserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GitHubUserModel.m; path = JSONModelDemo_iOS/GitHubUserModel.m; sourceTree = SOURCE_ROOT; }; + 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 9CC27C8D1689B7BE008B5411 /* macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = macOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 9CC27C941689B7BE008B5411 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 9CC27C951689B7BE008B5411 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 9CC27C961689B7BE008B5411 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 9CC27C991689B7BE008B5411 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info.plist"; sourceTree = ""; }; + 9CC27C9B1689B7BE008B5411 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 9CC27C9D1689B7BE008B5411 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 9CC27CA11689B7BE008B5411 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 9CC27CA31689B7BE008B5411 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 9CC27CA41689B7BE008B5411 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 9CC27CA71689B7BE008B5411 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; + 9CC27CAF1689B7BE008B5411 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; + 9CC27CCA1689B92A008B5411 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 9CC27CCB1689B92A008B5411 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 9CC27CCC1689B92A008B5411 /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = ""; }; + 9CC2FCB3168CE7340059FE67 /* KivaFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaFeed.h; sourceTree = ""; }; + 9CC2FCB4168CE7340059FE67 /* KivaFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaFeed.m; sourceTree = ""; }; + 9CC2FCB5168CE7340059FE67 /* LoanModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoanModel.h; sourceTree = ""; }; + 9CC2FCB6168CE7340059FE67 /* LoanModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoanModel.m; sourceTree = ""; }; + 9CC2FCB7168CE7340059FE67 /* LocationModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationModel.h; sourceTree = ""; }; + 9CC2FCB8168CE7340059FE67 /* LocationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationModel.m; sourceTree = ""; }; + 9CCAFD931901B7F500314886 /* SpecialPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertiesTests.m; sourceTree = ""; }; + 9CD425841702224F00A42AA1 /* HTTPClientSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPClientSuite.h; sourceTree = ""; }; + 9CD425851702224F00A42AA1 /* HTTPClientSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPClientSuite.m; sourceTree = ""; }; + 9CD42587170222AF00A42AA1 /* MockNSURLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockNSURLConnection.h; path = Tests/MockNSURLConnection.h; sourceTree = SOURCE_ROOT; }; + 9CD42588170222AF00A42AA1 /* MockNSURLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MockNSURLConnection.m; path = Tests/MockNSURLConnection.m; sourceTree = SOURCE_ROOT; }; + 9CD42589170222AF00A42AA1 /* MTTestSemaphor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MTTestSemaphor.h; path = Tests/MTTestSemaphor.h; sourceTree = SOURCE_ROOT; }; + 9CD4258A170222AF00A42AA1 /* MTTestSemaphor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MTTestSemaphor.m; path = Tests/MTTestSemaphor.m; sourceTree = SOURCE_ROOT; }; + 9CFDD0A2176E9742007B7DFA /* EnumModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumModel.h; sourceTree = ""; }; + 9CFDD0A3176E9742007B7DFA /* EnumModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EnumModel.m; sourceTree = ""; }; + D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = specialPropertyName.json; sourceTree = ""; }; + D5F918E9172ADA3F00AC2C8E /* SpecialPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyModel.h; sourceTree = ""; }; + D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyModel.m; sourceTree = ""; }; + D5F918EC172ADAF800AC2C8E /* SpecialPropertyNameTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyNameTests.h; sourceTree = ""; }; + D5F918ED172ADAF800AC2C8E /* SpecialPropertyNameTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyNameTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9C05B2A4168CE9600054215E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9CD22C8618FF32F7003E66AD /* XCTest.framework in Frameworks */, + 9C97441E168CF264004DA333 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9CC27C8A1689B7BE008B5411 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9C72A49D171447F70047C6AE /* SystemConfiguration.framework in Frameworks */, + 9C97441C168CF255004DA333 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9C05B2AE168CE9600054215E /* Tests */ = { + isa = PBXGroup; + children = ( + 9C05B3F5168CEB220054215E /* UnitTests */, + 9C05B2AF168CE9600054215E /* Supporting Files */, + ); + path = Tests; + sourceTree = ""; + }; + 9C05B2AF168CE9600054215E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 9C05B2B0168CE9600054215E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 9C05B3F5168CEB220054215E /* UnitTests */ = { + isa = PBXGroup; + children = ( + 9CD4257D1702220300A42AA1 /* Class */, + 9C05B3FE168CEB220054215E /* DataFiles */, + 9C05B3F6168CEB220054215E /* ArrayTests.h */, + 9C05B3F7168CEB220054215E /* ArrayTests.m */, + 9C05B3F8168CEB220054215E /* BuiltInConversionsTests.h */, + 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */, + 9C05B3FC168CEB220054215E /* CustomPropsTests.h */, + 9C05B3FD168CEB220054215E /* CustomPropsTests.m */, + 9C05B40A168CEB220054215E /* IdPropertyTests.h */, + 9C05B40B168CEB220054215E /* IdPropertyTests.m */, + 9C05B40C168CEB220054215E /* JSONTypesModelWithValidation1.h */, + 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */, + 9C05B40E168CEB220054215E /* JSONTypesModelWithValidation2.h */, + 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */, + 9C05B410168CEB220054215E /* JSONTypesReadTests.h */, + 9C05B411168CEB220054215E /* JSONTypesReadTests.m */, + 9C05B412168CEB220054215E /* JSONValueTransformer+UIColor.h */, + 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */, + 9C05B414168CEB220054215E /* KeyMappingTests.h */, + 9C05B415168CEB220054215E /* KeyMappingTests.m */, + 9C05B416168CEB220054215E /* NestedModelsTests.h */, + 9C05B417168CEB220054215E /* NestedModelsTests.m */, + 9C05B418168CEB220054215E /* OptionalPropertiesTests.h */, + 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */, + 9C05B41A168CEB220054215E /* PersistTests.h */, + 9C05B41B168CEB220054215E /* PersistTests.m */, + 9C05B41C168CEB220054215E /* PrimitiveTypesReadTests.h */, + 9C05B41D168CEB220054215E /* PrimitiveTypesReadTests.m */, + 9C05B41E168CEB220054215E /* SimpleDataErrorTests.h */, + 9C05B41F168CEB220054215E /* SimpleDataErrorTests.m */, + D5F918EC172ADAF800AC2C8E /* SpecialPropertyNameTests.h */, + D5F918ED172ADAF800AC2C8E /* SpecialPropertyNameTests.m */, + 9C05B420168CEB220054215E /* TestModels */, + 9C05B43D168CEB220054215E /* ValidationTestSuite.h */, + 9C05B43E168CEB220054215E /* ValidationTestSuite.m */, + 9CD425841702224F00A42AA1 /* HTTPClientSuite.h */, + 9CD425851702224F00A42AA1 /* HTTPClientSuite.m */, + 9C735D65170B717F00FF96F5 /* JSONAPITests.h */, + 9C735D66170B717F00FF96F5 /* JSONAPITests.m */, + 9C735D71170C048C00FF96F5 /* InitFromWebTests.h */, + 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */, + 9CCAFD931901B7F500314886 /* SpecialPropertiesTests.m */, + ); + path = UnitTests; + sourceTree = ""; + }; + 9C05B3FE168CEB220054215E /* DataFiles */ = { + isa = PBXGroup; + children = ( + 9C05B3FF168CEB220054215E /* colors.json */, + 9C05B400168CEB220054215E /* converts.json */, + 9C05B401168CEB220054215E /* github-iphone.json */, + 9C05B402168CEB220054215E /* jsonTypes.json */, + 9C05B403168CEB220054215E /* nestedData.json */, + 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */, + 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */, + 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */, + 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */, + 9C05B405168CEB220054215E /* post.json */, + 9C05B406168CEB220054215E /* primitives.json */, + 9C05B407168CEB220054215E /* primitivesWithErrors.json */, + D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */, + 9C05B408168CEB220054215E /* withOptProp.json */, + 9C05B409168CEB220054215E /* withoutOptProp.json */, + ); + path = DataFiles; + sourceTree = ""; + }; + 9C05B420168CEB220054215E /* TestModels */ = { + isa = PBXGroup; + children = ( + 9CFDD0A2176E9742007B7DFA /* EnumModel.h */, + 9CFDD0A3176E9742007B7DFA /* EnumModel.m */, + 9C08C1AD1749750100AA8CC9 /* CopyrightModel.h */, + 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */, + 9C05B421168CEB220054215E /* BuiltInConversionsModel.h */, + 9C05B422168CEB220054215E /* BuiltInConversionsModel.m */, + 9C05B423168CEB220054215E /* CustomPropertyModel.h */, + 9C05B424168CEB220054215E /* CustomPropertyModel.m */, + 9C05B425168CEB220054215E /* GitHubKeyMapRepoModel.h */, + 9C05B426168CEB220054215E /* GitHubKeyMapRepoModel.m */, + 9C05B427168CEB220054215E /* GitHubKeyMapRepoModelDict.h */, + 9C05B428168CEB220054215E /* GitHubKeyMapRepoModelDict.m */, + 9C05B429168CEB220054215E /* GitHubRepoModel.h */, + 9C05B42A168CEB220054215E /* GitHubRepoModel.m */, + 9C05B42B168CEB220054215E /* GitHubRepoModelForUSMapper.h */, + 9C05B42C168CEB220054215E /* GitHubRepoModelForUSMapper.m */, + 1C008FE318B7AE54002DFD3A /* ModelForUpperCaseMapper.h */, + 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */, + 9C05B42D168CEB220054215E /* ImageModel.h */, + 9C05B42E168CEB220054215E /* ImageModel.m */, + 9C05B42F168CEB220054215E /* JSONTypesModel.h */, + 9C05B430168CEB220054215E /* JSONTypesModel.m */, + 9C05B431168CEB220054215E /* NestedModel.h */, + 9C05B432168CEB220054215E /* NestedModel.m */, + 9C05B433168CEB220054215E /* OptionalPropModel.h */, + 9C05B434168CEB220054215E /* OptionalPropModel.m */, + 9C05B435168CEB220054215E /* PostModel.h */, + 9C05B436168CEB220054215E /* PostModel.m */, + 9C05B437168CEB220054215E /* PostsModel.h */, + 9C05B438168CEB220054215E /* PostsModel.m */, + 9C05B439168CEB220054215E /* PrimitivesModel.h */, + 9C05B43A168CEB220054215E /* PrimitivesModel.m */, + 9C05B43B168CEB220054215E /* ReposModel.h */, + 9C05B43C168CEB220054215E /* ReposModel.m */, + D5F918E9172ADA3F00AC2C8E /* SpecialPropertyModel.h */, + D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */, + 9C735D6B170B7A2D00FF96F5 /* RpcRequestModel.h */, + 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */, + 1AE9CA911C21F50C00B8F5C1 /* RenamedPropertyModel.h */, + 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */, + ); + path = TestModels; + sourceTree = ""; + }; + 9C66DFDC168CF09A0015CCDF /* JSONModel */ = { + isa = PBXGroup; + children = ( + 9C66DFDD168CF09A0015CCDF /* JSONModel */, + 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */, + 9C66DFEA168CF09A0015CCDF /* JSONModelNetworking */, + 9C66DFF1168CF09A0015CCDF /* JSONModelTransformations */, + ); + path = JSONModel; + sourceTree = ""; + }; + 9C66DFDD168CF09A0015CCDF /* JSONModel */ = { + isa = PBXGroup; + children = ( + 9C66DFDE168CF09A0015CCDF /* JSONModel.h */, + 9C66DFDF168CF09A0015CCDF /* JSONModel.m */, + 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */, + 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */, + 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */, + 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */, + ); + path = JSONModel; + sourceTree = ""; + }; + 9C66DFEA168CF09A0015CCDF /* JSONModelNetworking */ = { + isa = PBXGroup; + children = ( + 9C66DFEB168CF09A0015CCDF /* JSONAPI.h */, + 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */, + 9C66DFED168CF09A0015CCDF /* JSONHTTPClient.h */, + 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */, + 9C66DFEF168CF09A0015CCDF /* JSONModel+networking.h */, + 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */, + ); + path = JSONModelNetworking; + sourceTree = ""; + }; + 9C66DFF1168CF09A0015CCDF /* JSONModelTransformations */ = { + isa = PBXGroup; + children = ( + 9C66DFF2168CF09A0015CCDF /* JSONKeyMapper.h */, + 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */, + 9C66DFF4168CF09A0015CCDF /* JSONValueTransformer.h */, + 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */, + ); + path = JSONModelTransformations; + sourceTree = ""; + }; + 9CB6BC2B168E07640002535B /* GithubDemo */ = { + isa = PBXGroup; + children = ( + 9CB6BC2C168E07730002535B /* GitHubUserModel.h */, + 9CB6BC2D168E07730002535B /* GitHubUserModel.m */, + ); + name = GithubDemo; + sourceTree = ""; + }; + 9CC27C821689B7BE008B5411 = { + isa = PBXGroup; + children = ( + 9C66DFDC168CF09A0015CCDF /* JSONModel */, + 9CC27C971689B7BE008B5411 /* macOS */, + 9C05B2AE168CE9600054215E /* Tests */, + 9CC27C901689B7BE008B5411 /* Frameworks */, + 9CC27C8E1689B7BE008B5411 /* Products */, + ); + indentWidth = 4; + sourceTree = ""; + tabWidth = 4; + usesTabs = 0; + }; + 9CC27C8E1689B7BE008B5411 /* Products */ = { + isa = PBXGroup; + children = ( + 9CC27C8D1689B7BE008B5411 /* macOS.app */, + 9C05B2A8168CE9600054215E /* Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 9CC27C901689B7BE008B5411 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */, + 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */, + 9C97441D168CF264004DA333 /* Cocoa.framework */, + 9C97441B168CF255004DA333 /* Cocoa.framework */, + 9CC27CAF1689B7BE008B5411 /* SenTestingKit.framework */, + 9CC27C931689B7BE008B5411 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 9CC27C931689B7BE008B5411 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 9CC27C941689B7BE008B5411 /* AppKit.framework */, + 9CC27C951689B7BE008B5411 /* CoreData.framework */, + 9CC27C961689B7BE008B5411 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 9CC27C971689B7BE008B5411 /* macOS */ = { + isa = PBXGroup; + children = ( + 9CC2FCB2168CE6F00059FE67 /* DemoApp */, + ); + path = macOS; + sourceTree = ""; + }; + 9CC27C981689B7BE008B5411 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 9CC27C991689B7BE008B5411 /* Info.plist */, + 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */, + 9CC27C9D1689B7BE008B5411 /* main.m */, + 9CC27CA01689B7BE008B5411 /* Credits.rtf */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 9CC27CC91689B8EE008B5411 /* ViewController */ = { + isa = PBXGroup; + children = ( + 9CC27CCA1689B92A008B5411 /* ViewController.h */, + 9CC27CCB1689B92A008B5411 /* ViewController.m */, + 9CC27CCC1689B92A008B5411 /* ViewController.xib */, + ); + name = ViewController; + sourceTree = ""; + }; + 9CC2FCB1168CE6E60059FE67 /* KivaDemo */ = { + isa = PBXGroup; + children = ( + 9CC2FCB3168CE7340059FE67 /* KivaFeed.h */, + 9CC2FCB4168CE7340059FE67 /* KivaFeed.m */, + 9CC2FCB5168CE7340059FE67 /* LoanModel.h */, + 9CC2FCB6168CE7340059FE67 /* LoanModel.m */, + 9CC2FCB7168CE7340059FE67 /* LocationModel.h */, + 9CC2FCB8168CE7340059FE67 /* LocationModel.m */, + ); + name = KivaDemo; + sourceTree = ""; + }; + 9CC2FCB2168CE6F00059FE67 /* DemoApp */ = { + isa = PBXGroup; + children = ( + 9CB6BC2B168E07640002535B /* GithubDemo */, + 9CC2FCB1168CE6E60059FE67 /* KivaDemo */, + 9CC27CC91689B8EE008B5411 /* ViewController */, + 9CC27CA31689B7BE008B5411 /* AppDelegate.h */, + 9CC27CA41689B7BE008B5411 /* AppDelegate.m */, + 9CC27CA61689B7BE008B5411 /* MainMenu.xib */, + 9CC27C981689B7BE008B5411 /* Supporting Files */, + ); + name = DemoApp; + sourceTree = ""; + }; + 9CD4257D1702220300A42AA1 /* Class */ = { + isa = PBXGroup; + children = ( + 9CD42587170222AF00A42AA1 /* MockNSURLConnection.h */, + 9CD42588170222AF00A42AA1 /* MockNSURLConnection.m */, + 9CD42589170222AF00A42AA1 /* MTTestSemaphor.h */, + 9CD4258A170222AF00A42AA1 /* MTTestSemaphor.m */, + ); + name = Class; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 9C05B2A7168CE9600054215E /* Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9C05B2B8168CE9600054215E /* Build configuration list for PBXNativeTarget "Tests" */; + buildPhases = ( + 9C05B2A3168CE9600054215E /* Sources */, + 9C05B2A4168CE9600054215E /* Frameworks */, + 9C05B2A5168CE9600054215E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Tests; + productName = Tests; + productReference = 9C05B2A8168CE9600054215E /* Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 9CC27C8C1689B7BE008B5411 /* macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9CC27CBF1689B7BE008B5411 /* Build configuration list for PBXNativeTarget "macOS" */; + buildPhases = ( + 9CC27C891689B7BE008B5411 /* Sources */, + 9CC27C8A1689B7BE008B5411 /* Frameworks */, + 9CC27C8B1689B7BE008B5411 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + path = macOS; + productReference = 9CC27C8D1689B7BE008B5411 /* macOS.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 9CC27C841689B7BE008B5411 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = "Underplot ltd."; + TargetAttributes = { + 9C05B2A7168CE9600054215E = { + TestTargetID = 9CC27C8C1689B7BE008B5411; + }; + }; + }; + buildConfigurationList = 9CC27C871689B7BE008B5411 /* Build configuration list for PBXProject "macOS" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 9CC27C821689B7BE008B5411; + productRefGroup = 9CC27C8E1689B7BE008B5411 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9CC27C8C1689B7BE008B5411 /* macOS */, + 9C05B2A7168CE9600054215E /* Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 9C05B2A5168CE9600054215E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9C6C35E0181CF7B500BEE72D /* nestedDataWithDictionaryError.json in Resources */, + 9C05B443168CEB220054215E /* colors.json in Resources */, + 9C05B444168CEB220054215E /* converts.json in Resources */, + 9C05B445168CEB220054215E /* github-iphone.json in Resources */, + 9C6C35DF181CF7B500BEE72D /* nestedDataWithArrayError.json in Resources */, + 9C05B446168CEB220054215E /* jsonTypes.json in Resources */, + 9C6C35E2181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */, + 9C05B447168CEB220054215E /* nestedData.json in Resources */, + 9C05B449168CEB220054215E /* post.json in Resources */, + 9C05B44A168CEB220054215E /* primitives.json in Resources */, + 9C05B44B168CEB220054215E /* primitivesWithErrors.json in Resources */, + D5F918E5172AD99600AC2C8E /* specialPropertyName.json in Resources */, + 9C6C35E1181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json in Resources */, + 9C05B44C168CEB220054215E /* withOptProp.json in Resources */, + 9C05B44D168CEB220054215E /* withoutOptProp.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9CC27C8B1689B7BE008B5411 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9CC27C9C1689B7BE008B5411 /* InfoPlist.strings in Resources */, + 9CC27CA21689B7BE008B5411 /* Credits.rtf in Resources */, + 9CC27CA81689B7BE008B5411 /* MainMenu.xib in Resources */, + 9CC27CCE1689B92A008B5411 /* ViewController.xib in Resources */, + 9C66DF47168CEECF0015CCDF /* colors.json in Resources */, + 9C66DF48168CEECF0015CCDF /* converts.json in Resources */, + 9C66DF49168CEECF0015CCDF /* github-iphone.json in Resources */, + 9C66DF4A168CEECF0015CCDF /* jsonTypes.json in Resources */, + 9C66DF4B168CEECF0015CCDF /* nestedData.json in Resources */, + 9C66DF4D168CEECF0015CCDF /* post.json in Resources */, + 9C66DF4E168CEECF0015CCDF /* primitives.json in Resources */, + 9C66DF4F168CEECF0015CCDF /* primitivesWithErrors.json in Resources */, + D5F918EF172ADC2400AC2C8E /* specialPropertyName.json in Resources */, + 9C66DF50168CEECF0015CCDF /* withOptProp.json in Resources */, + 9C66DF51168CEECF0015CCDF /* withoutOptProp.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 9C05B2A3168CE9600054215E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9C05B43F168CEB220054215E /* ArrayTests.m in Sources */, + 9C05B440168CEB220054215E /* BuiltInConversionsTests.m in Sources */, + 9C05B442168CEB220054215E /* CustomPropsTests.m in Sources */, + 9C05B44E168CEB220054215E /* IdPropertyTests.m in Sources */, + 9C05B44F168CEB220054215E /* JSONTypesModelWithValidation1.m in Sources */, + 9C05B450168CEB220054215E /* JSONTypesModelWithValidation2.m in Sources */, + 9C05B451168CEB220054215E /* JSONTypesReadTests.m in Sources */, + 9C05B452168CEB220054215E /* JSONValueTransformer+UIColor.m in Sources */, + 9C05B453168CEB220054215E /* KeyMappingTests.m in Sources */, + 9C05B454168CEB220054215E /* NestedModelsTests.m in Sources */, + 9C05B455168CEB220054215E /* OptionalPropertiesTests.m in Sources */, + 9C05B456168CEB220054215E /* PersistTests.m in Sources */, + 9C05B457168CEB220054215E /* PrimitiveTypesReadTests.m in Sources */, + 9C05B458168CEB220054215E /* SimpleDataErrorTests.m in Sources */, + 1C008FE518B7AE54002DFD3A /* ModelForUpperCaseMapper.m in Sources */, + 9C05B459168CEB220054215E /* BuiltInConversionsModel.m in Sources */, + 9C05B45A168CEB220054215E /* CustomPropertyModel.m in Sources */, + 9C05B45B168CEB220054215E /* GitHubKeyMapRepoModel.m in Sources */, + 9C05B45C168CEB220054215E /* GitHubKeyMapRepoModelDict.m in Sources */, + 9C05B45D168CEB220054215E /* GitHubRepoModel.m in Sources */, + 9C05B45E168CEB220054215E /* GitHubRepoModelForUSMapper.m in Sources */, + 9C05B45F168CEB220054215E /* ImageModel.m in Sources */, + 9C05B460168CEB220054215E /* JSONTypesModel.m in Sources */, + 9C05B461168CEB220054215E /* NestedModel.m in Sources */, + 9C05B462168CEB220054215E /* OptionalPropModel.m in Sources */, + 9C05B463168CEB220054215E /* PostModel.m in Sources */, + 9C05B464168CEB220054215E /* PostsModel.m in Sources */, + 9C05B465168CEB220054215E /* PrimitivesModel.m in Sources */, + 9C05B466168CEB220054215E /* ReposModel.m in Sources */, + 9C05B467168CEB220054215E /* ValidationTestSuite.m in Sources */, + 9C66DFF7168CF09A0015CCDF /* JSONModel.m in Sources */, + 9C66DFFB168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */, + 9C66DFFD168CF09A0015CCDF /* JSONModelError.m in Sources */, + 9C66E001168CF09A0015CCDF /* JSONAPI.m in Sources */, + 9C66E003168CF09A0015CCDF /* JSONHTTPClient.m in Sources */, + 9C66E005168CF09A0015CCDF /* JSONModel+networking.m in Sources */, + 9C66E007168CF09A0015CCDF /* JSONKeyMapper.m in Sources */, + 9CCAFD941901B7F500314886 /* SpecialPropertiesTests.m in Sources */, + 9C66E009168CF09A0015CCDF /* JSONValueTransformer.m in Sources */, + D5F918EB172ADA3F00AC2C8E /* SpecialPropertyModel.m in Sources */, + D5F918EE172ADAF900AC2C8E /* SpecialPropertyNameTests.m in Sources */, + 9CD425861702224F00A42AA1 /* HTTPClientSuite.m in Sources */, + 9CD4258B170222AF00A42AA1 /* MockNSURLConnection.m in Sources */, + 9CD4258C170222AF00A42AA1 /* MTTestSemaphor.m in Sources */, + 9C735D67170B717F00FF96F5 /* JSONAPITests.m in Sources */, + 1AE9CA931C21F50C00B8F5C1 /* RenamedPropertyModel.m in Sources */, + 9C735D6D170B7A2D00FF96F5 /* RpcRequestModel.m in Sources */, + 9C735D73170C048C00FF96F5 /* InitFromWebTests.m in Sources */, + 9C08C1AF1749750100AA8CC9 /* CopyrightModel.m in Sources */, + 9CFDD0A4176E9742007B7DFA /* EnumModel.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9CC27C891689B7BE008B5411 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9CC27C9E1689B7BE008B5411 /* main.m in Sources */, + 9CC27CA51689B7BE008B5411 /* AppDelegate.m in Sources */, + 9CC27CCD1689B92A008B5411 /* ViewController.m in Sources */, + 9CC2FCB9168CE7340059FE67 /* KivaFeed.m in Sources */, + 9CC2FCBA168CE7340059FE67 /* LoanModel.m in Sources */, + 9CC2FCBB168CE7340059FE67 /* LocationModel.m in Sources */, + 9C66DFF6168CF09A0015CCDF /* JSONModel.m in Sources */, + 9C66DFFA168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */, + 9C66DFFC168CF09A0015CCDF /* JSONModelError.m in Sources */, + 9C66E000168CF09A0015CCDF /* JSONAPI.m in Sources */, + 9C66E002168CF09A0015CCDF /* JSONHTTPClient.m in Sources */, + 9C66E004168CF09A0015CCDF /* JSONModel+networking.m in Sources */, + 9C66E006168CF09A0015CCDF /* JSONKeyMapper.m in Sources */, + 9C66E008168CF09A0015CCDF /* JSONValueTransformer.m in Sources */, + 9CB6BC2E168E07730002535B /* GitHubUserModel.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 9CC27C9B1689B7BE008B5411 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 9CC27CA01689B7BE008B5411 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 9CC27CA11689B7BE008B5411 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 9CC27CA61689B7BE008B5411 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 9CC27CA71689B7BE008B5411 /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 9C05B2B9168CE9600054215E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/macOS.app/Contents/MacOS/macOS"; + COMBINE_HIDPI_IMAGES = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + "UNIT_TESTING=1", + ); + INFOPLIST_FILE = "Tests/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = ""; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + 9C05B2BA168CE9600054215E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/macOS.app/Contents/MacOS/macOS"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "Tests/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = ""; + TEST_HOST = "$(BUNDLE_LOADER)"; + VALIDATE_PRODUCT = YES; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; + 9CC27CBD1689B7BE008B5411 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 9CC27CBE1689B7BE008B5411 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx; + }; + name = Release; + }; + 9CC27CC01689B7BE008B5411 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "JSONModelOSX/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = macOS; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 9CC27CC11689B7BE008B5411 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "JSONModelOSX/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = macOS; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 9C05B2B8168CE9600054215E /* Build configuration list for PBXNativeTarget "Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9C05B2B9168CE9600054215E /* Debug */, + 9C05B2BA168CE9600054215E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9CC27C871689B7BE008B5411 /* Build configuration list for PBXProject "macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9CC27CBD1689B7BE008B5411 /* Debug */, + 9CC27CBE1689B7BE008B5411 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9CC27CBF1689B7BE008B5411 /* Build configuration list for PBXNativeTarget "macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9CC27CC01689B7BE008B5411 /* Debug */, + 9CC27CC11689B7BE008B5411 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 9CC27C841689B7BE008B5411 /* Project object */; +} diff --git a/Demos/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Demos/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..85d597ac --- /dev/null +++ b/Demos/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Demos/macOS/AppDelegate.h b/Demos/macOS/AppDelegate.h new file mode 100644 index 00000000..7d3bb017 --- /dev/null +++ b/Demos/macOS/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// JSONModelOSX +// +// Created by Marin Todorov on 25/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +@interface AppDelegate : NSObject + +@property (assign) IBOutlet NSWindow *window; + +@end diff --git a/Demos/macOS/AppDelegate.m b/Demos/macOS/AppDelegate.m new file mode 100644 index 00000000..ddd41d53 --- /dev/null +++ b/Demos/macOS/AppDelegate.m @@ -0,0 +1,35 @@ +// +// AppDelegate.m +// JSONModelOSX +// +// Created by Marin Todorov on 25/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "AppDelegate.h" +#import "ViewController.h" + +@interface AppDelegate() +@property (strong, nonatomic) ViewController* controller; +@end + + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + // Insert code here to initialize your application + + self.controller = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; + self.window.contentView = self.controller.view; + + self.controller.view.frame = ((NSView*)self.window.contentView).bounds; + self.controller.view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; + +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { + return YES; +} + +@end diff --git a/Demos/macOS/Info.plist b/Demos/macOS/Info.plist new file mode 100644 index 00000000..1d5e1057 --- /dev/null +++ b/Demos/macOS/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2012 Underplot ltd. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Demos/macOS/KivaFeed.h b/Demos/macOS/KivaFeed.h new file mode 100644 index 00000000..3e1b3a3f --- /dev/null +++ b/Demos/macOS/KivaFeed.h @@ -0,0 +1,16 @@ +// +// KivaFeed.h +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONModel.h" +#import "LoanModel.h" + +@interface KivaFeed : JSONModel + +@property (strong, nonatomic) NSArray* loans; + +@end \ No newline at end of file diff --git a/Demos/macOS/KivaFeed.m b/Demos/macOS/KivaFeed.m new file mode 100644 index 00000000..185d023d --- /dev/null +++ b/Demos/macOS/KivaFeed.m @@ -0,0 +1,13 @@ +// +// KivaFeed.m +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "KivaFeed.h" + +@implementation KivaFeed + +@end diff --git a/Demos/macOS/LoanModel.h b/Demos/macOS/LoanModel.h new file mode 100644 index 00000000..36ead02e --- /dev/null +++ b/Demos/macOS/LoanModel.h @@ -0,0 +1,22 @@ +// +// LoanModel.h +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONModel.h" +#import "LocationModel.h" + +@protocol LoanModel @end + +@interface LoanModel : JSONModel + +@property (strong, nonatomic) NSString* name; +@property (strong, nonatomic) NSString* status; +@property (strong, nonatomic) NSString* use; + +@property (strong, nonatomic) LocationModel* location; + +@end \ No newline at end of file diff --git a/Demos/macOS/LoanModel.m b/Demos/macOS/LoanModel.m new file mode 100644 index 00000000..d3678d9b --- /dev/null +++ b/Demos/macOS/LoanModel.m @@ -0,0 +1,13 @@ +// +// LoanModel.m +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "LoanModel.h" + +@implementation LoanModel + +@end diff --git a/Demos/macOS/LocationModel.h b/Demos/macOS/LocationModel.h new file mode 100644 index 00000000..d5e877b3 --- /dev/null +++ b/Demos/macOS/LocationModel.h @@ -0,0 +1,16 @@ +// +// LocationModel.h +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "JSONModel.h" + +@interface LocationModel : JSONModel + +@property (strong, nonatomic) NSString* countryCode; +@property (strong, nonatomic) NSString* country; + +@end diff --git a/Demos/macOS/LocationModel.m b/Demos/macOS/LocationModel.m new file mode 100644 index 00000000..4d58dddc --- /dev/null +++ b/Demos/macOS/LocationModel.m @@ -0,0 +1,19 @@ +// +// LocationModel.m +// JSONModel_Demo +// +// Created by Marin Todorov on 26/11/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "LocationModel.h" +#import "JSONKeyMapper.h" + +@implementation LocationModel + ++(JSONKeyMapper*)keyMapper +{ + return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase]; +} + +@end \ No newline at end of file diff --git a/Demos/macOS/ViewController.h b/Demos/macOS/ViewController.h new file mode 100644 index 00000000..e2ae3387 --- /dev/null +++ b/Demos/macOS/ViewController.h @@ -0,0 +1,13 @@ +// +// ViewController.h +// JSONModelOSX +// +// Created by Marin Todorov on 25/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +@interface ViewController : NSViewController + +@end diff --git a/Demos/macOS/ViewController.m b/Demos/macOS/ViewController.m new file mode 100644 index 00000000..636b9132 --- /dev/null +++ b/Demos/macOS/ViewController.m @@ -0,0 +1,174 @@ +// +// ViewController.m +// JSONModelOSX +// +// Created by Marin Todorov on 25/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import "ViewController.h" + +//kiva models +#import "KivaFeed.h" +#import "LoanModel.h" + +//github +#import "GitHubUserModel.h" + +#import "JSONModel+networking.h" + +enum kServices { + kServiceKiva = 1, + kServiceYoutube, + kServiceGithub + }; + +@interface ViewController () +{ + IBOutlet NSTableView* table; + IBOutlet NSProgressIndicator* spinner; + + int currentService; + + //kiva + KivaFeed* kiva; + + //youtube + NSArray* videos; + + //github + GitHubUserModel* user; + NSArray* items; + +} + +@end + +@implementation ViewController + +-(void)awakeFromNib +{ + [spinner setHidden:YES]; +} + +-(void)setLoaderVisible:(BOOL)isVis +{ + [spinner setHidden:!isVis]; + if (isVis) [spinner startAnimation:nil]; + else [spinner stopAnimation:nil]; +} + +- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row +{ + NSTableCellView *cellView = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self]; + + switch (currentService) { + case kServiceKiva: + { + if (row>=kiva.loans.count) return nil; + + LoanModel* loan = kiva.loans[row]; + NSString* message = [NSString stringWithFormat:@"%@ from %@(%@) needs a loan %@", + loan.name, loan.location.country, loan.location.countryCode, loan.use + ]; + + cellView.textField.stringValue = message; + + } break; + + case kServiceGithub: + { + if (row>=items.count) return nil; + cellView.textField.stringValue = [items[row] description]; + + } break; + + default: + cellView.textField.stringValue = @"n/a"; + break; + } + + return cellView; +} + + +- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView +{ + switch (currentService) { + case kServiceKiva: + return kiva.loans.count; + break; + case kServiceGithub: + return items.count; + break; + default: + return 0; + break; + } +} + +- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(NSInteger)rowIndex +{ + switch (currentService) { + case kServiceGithub: + { + id item = items[rowIndex]; + if ([item isKindOfClass:[NSURL class]]) { + [[NSWorkspace sharedWorkspace] openURL:item]; + } + + } break; + + default: + break; + } + return YES; +} + +#pragma mark - button actions +-(IBAction)actionKiva:(id)sender +{ + currentService = kServiceKiva; + [self setLoaderVisible:YES]; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + kiva = [[KivaFeed alloc] initFromURLWithString:@"https://api.kivaws.org/v1/loans/search.json?status=fundraising" +#pragma GCC diagnostic pop + completion:^(JSONModel *model, JSONModelError *e) { + + [table reloadData]; + + if (e) { + [[NSAlert alertWithError:e] beginSheetModalForWindow:self.view.window modalDelegate:nil didEndSelector:nil contextInfo:nil]; + } + + [self setLoaderVisible:NO]; + }]; + +} + +-(IBAction)actionGithub:(id)sender +{ + currentService = kServiceGithub; + [self setLoaderVisible:YES]; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + user = [[GitHubUserModel alloc] initFromURLWithString:@"https://api.github.com/users/icanzilb" +#pragma GCC diagnostic pop + completion:^(JSONModel *model, JSONModelError *e) { + + items = @[user.login, user.html_url, user.company, user.name, user.blog]; + [table performSelector:@selector(reloadData) withObject:nil afterDelay:0.1]; + + if (e) { + [[NSAlert alertWithError:e] beginSheetModalForWindow:self.view.window modalDelegate:nil didEndSelector:nil contextInfo:nil]; + } + + [self setLoaderVisible:NO]; + }]; + +} + +@end diff --git a/Demos/macOS/ViewController.xib b/Demos/macOS/ViewController.xib new file mode 100644 index 00000000..85e2bf0b --- /dev/null +++ b/Demos/macOS/ViewController.xib @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demos/macOS/en.lproj/Credits.rtf b/Demos/macOS/en.lproj/Credits.rtf new file mode 100644 index 00000000..9033dfe4 --- /dev/null +++ b/Demos/macOS/en.lproj/Credits.rtf @@ -0,0 +1,36 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 + +\f0\b\fs24 \cf0 Engineering: +\b0 \ + Marin Todorov\ +\ + +\b Human Interface Design: +\b0 \ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 +\cf0 Marin Todorov\ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 +\cf0 \ + +\b Testing: +\b0 \ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 +\cf0 Marin Todorov\ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 +\cf0 \ + +\b Documentation: +\b0 \ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 +\cf0 Marin Todorov\ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 +\cf0 \ + +\b With special thanks to: +\b0 \ + Mom and Dad\ +} \ No newline at end of file diff --git a/Demos/macOS/en.lproj/InfoPlist.strings b/Demos/macOS/en.lproj/InfoPlist.strings new file mode 100644 index 00000000..477b28ff --- /dev/null +++ b/Demos/macOS/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Demos/macOS/en.lproj/MainMenu.xib b/Demos/macOS/en.lproj/MainMenu.xib new file mode 100644 index 00000000..79a67ab6 --- /dev/null +++ b/Demos/macOS/en.lproj/MainMenu.xib @@ -0,0 +1,667 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demos/macOS/main.m b/Demos/macOS/main.m new file mode 100644 index 00000000..592f5e07 --- /dev/null +++ b/Demos/macOS/main.m @@ -0,0 +1,14 @@ +// +// main.m +// JSONModelOSX +// +// Created by Marin Todorov on 25/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +} diff --git a/JSONModel.podspec b/JSONModel.podspec index 21de82f5..f0472ea3 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,13 +1,13 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.2.0" + s.version = "1.3.0" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { "Marin Todorov" => "touch-code-magazine@underplot.com" } - s.source = { :git => "https://github.com/jsonmodel/jsonmodel.git", :tag => "1.2.0" } + s.source = { :git => "https://github.com/jsonmodel/jsonmodel.git", :tag => s.version } s.ios.deployment_target = '6.0' s.osx.deployment_target = '10.7' diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index 602d8644..4bbc96d3 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.2 + 1.3 CFBundleSignature ???? CFBundleVersion diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 67c5baf1..ab17989e 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -1,7 +1,7 @@ // // JSONModel.h // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index b2c3c0ac..ea66f69c 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1,7 +1,7 @@ // // JSONModel.m // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index 75d8332f..afb39b17 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -1,7 +1,7 @@ // // JSONModelClassProperty.h // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index 45856056..0671085a 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -1,7 +1,7 @@ // // JSONModelClassProperty.m // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index 3a7772b0..2434f605 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -1,7 +1,7 @@ // // JSONModelError.h // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelError.m b/JSONModel/JSONModel/JSONModelError.m index 17e5e042..1e4cb18a 100644 --- a/JSONModel/JSONModel/JSONModelError.m +++ b/JSONModel/JSONModel/JSONModelError.m @@ -1,7 +1,7 @@ // // JSONModelError.m // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index 9a3913fa..81e1d9a4 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -1,7 +1,7 @@ // // JSONModelLib.h // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index 96ffdde7..7c9c359f 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.h @@ -1,7 +1,7 @@ // // JSONAPI.h // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index a9420d95..f612fb59 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -1,7 +1,7 @@ // // JSONAPI.m // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index daa20c9a..32f7c19f 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -1,7 +1,7 @@ // // JSONModelHTTPClient.h // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index f8888333..e67c3e3f 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -1,7 +1,7 @@ // // JSONModelHTTPClient.m // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index ffa9eb4d..bc3b69e0 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -1,7 +1,7 @@ // // JSONModel+networking.h // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index 3f710833..bf480ea3 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -1,7 +1,7 @@ // // JSONModel+networking.m // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 9d37ff4f..1d53074b 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -1,7 +1,7 @@ // // JSONKeyMapper.h // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 6cb8f0d6..6975773b 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -1,7 +1,7 @@ // // JSONKeyMapper.m // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index b6c89e9b..2bbbfdf5 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -1,7 +1,7 @@ // // JSONValueTransformer.h // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 01b6c76d..36762559 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -1,7 +1,7 @@ // // JSONValueTransformer.m // -// @version 1.2 +// @version 1.3 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/README.md b/README.md index dcc09a75..5a11cedf 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ ## Magical Data Modeling Framework for JSON -### 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. +### Version 1.3.0 --- If you like JSONModel and use it, could you please: From a81d0d62b2469d3bb086dc7e644e12a32f366166 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 22 Jul 2016 14:34:28 +0100 Subject: [PATCH 106/171] Minor changelog improvement --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d5beadd..2d15f91e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ more rapid release schedule going forwards. - success return value added to `mergeFromDictionary:useKeyMapping:error:` - JSONModel has now been moved out into its own GitHub organization, etc. - now maintained by multiple people -### Potentially breaking changes +### Potential Breaking Changes - new behavior for handling null values when serializing: - values of `NSNull` will now always `null` in JSON output From 8fb2202e4c9ed04667341760272bd11db6d565ad Mon Sep 17 00:00:00 2001 From: Andrius Janauskas Date: Wed, 3 Aug 2016 16:40:58 +0300 Subject: [PATCH 107/171] Change access control of JSONModelClassProperty header to internal (#518) --- JSONModel.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index 442f5a54..4773edec 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -9,7 +9,7 @@ /* Begin PBXBuildFile section */ 92C9BC7C1B19A5B600D79B06 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC641B19A5B600D79B06 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC7D1B19A5B600D79B06 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC651B19A5B600D79B06 /* JSONModel.m */; }; - 92C9BC801B19A5B600D79B06 /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 92C9BC801B19A5B600D79B06 /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; }; 92C9BC811B19A5B600D79B06 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */; }; 92C9BC821B19A5B600D79B06 /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC831B19A5B600D79B06 /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */; }; From 9740996db71ccb96167fc95f92ee6fffa41cc798 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 18 Aug 2016 22:01:31 +0100 Subject: [PATCH 108/171] Minor documentation correction --- JSONModel/JSONModelTransformations/JSONKeyMapper.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 1d53074b..de08a1f1 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -61,7 +61,6 @@ typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); /** Combined converter method * @param value the source name - * @param importing YES invokes JSONToModelKeyBlock, NO - modelToJSONKeyBlock * @return JSONKeyMapper instance */ - (NSString *)convertValue:(NSString *)value; @@ -69,7 +68,7 @@ typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); /** @name Creating a key mapper */ /** - * Creates a JSONKeyMapper instance, based on the two blocks you provide this initializer. + * Creates a JSONKeyMapper instance, based on the block you provide this initializer. * The parameter takes in a JSONModelKeyMapBlock block: *
NSString *(^JSONModelKeyMapBlock)(NSString *keyName)
* The block takes in a string and returns the transformed (if at all) string. From 5e439927a1a93523f8e760af956abe7f2c9d21a3 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 18 Aug 2016 22:14:03 +0100 Subject: [PATCH 109/171] Deprecate ambiguous/inconsistent JSONKeyMapper methods Now all methods are model -> JSON, never JSON -> model --- .../JSONModelTransformations/JSONKeyMapper.h | 15 +++--- .../JSONModelTransformations/JSONKeyMapper.m | 54 +++++++++---------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index de08a1f1..1bfd80b2 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -53,7 +53,9 @@ typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); // deprecated @property (readonly, nonatomic) JSONModelKeyMapBlock JSONToModelKeyBlock DEPRECATED_ATTRIBUTE; - (NSString *)convertValue:(NSString *)value isImportingToModel:(BOOL)importing DEPRECATED_MSG_ATTRIBUTE("use convertValue:"); +- (instancetype)initWithDictionary:(NSDictionary *)map DEPRECATED_MSG_ATTRIBUTE("use initWithModelToJSONDictionary:"); - (instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel modelToJSONBlock:(JSONModelKeyMapBlock)toJSON DEPRECATED_MSG_ATTRIBUTE("use initWithModelToJSONBlock:"); ++ (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions DEPRECATED_MSG_ATTRIBUTE("use baseMapper:withModelToJSONExceptions:"); /** @name Name converters */ /** Block, which takes in a property name and converts it to the corresponding JSON key name */ @@ -77,13 +79,12 @@ typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); - (instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON; /** - * Creates a JSONKeyMapper instance, based on the mapping you provide - * in the map parameter. Use the JSON key names as keys, your JSONModel - * property names as values. - * @param map map dictionary, in the format:
@{@"crazy_JSON_name":@"myCamelCaseName"}
+ * Creates a JSONKeyMapper instance, based on the mapping you provide. + * Use your JSONModel property names as keys, and the JSON key names as values. + * @param toJSON map dictionary, in the format:
@{@"myCamelCaseName":@"crazy_JSON_name"}
* @return JSONKeyMapper instance */ -- (instancetype)initWithDictionary:(NSDictionary *)map; +- (instancetype)initWithModelToJSONDictionary:(NSDictionary *)toJSON; /** * Creates a JSONKeyMapper, which converts underscore_case to camelCase and vice versa. @@ -94,8 +95,8 @@ typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); /** * 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. + * Use your JSONModel property names as keys, and the JSON key names as values. */ -+ (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions; ++ (instancetype)baseMapper:(JSONKeyMapper *)baseKeyMapper withModelToJSONExceptions:(NSDictionary *)toJSON; @end diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 6975773b..e66e894f 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -73,33 +73,32 @@ -(instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON return self; } --(instancetype)initWithDictionary:(NSDictionary *)map +- (instancetype)initWithDictionary:(NSDictionary *)map { - self = [super init]; - if (self) { + NSDictionary *toJSON = [JSONKeyMapper swapKeysAndValuesInDictionary:map]; - NSDictionary *userToJSONMap = [self swapKeysAndValuesInDictionary:map]; + return [self initWithModelToJSONDictionary:toJSON]; +} - _modelToJSONKeyBlock = ^NSString *(NSString *keyName) { - NSString *result = [userToJSONMap valueForKeyPath:keyName]; - return result ? result : keyName; - }; - } +- (instancetype)initWithModelToJSONDictionary:(NSDictionary *)toJSON +{ + if (!(self = [super init])) + return nil; + + _modelToJSONKeyBlock = ^NSString *(NSString *keyName) + { + return [toJSON valueForKeyPath:keyName] ?: keyName; + }; return self; } -- (NSDictionary *)swapKeysAndValuesInDictionary:(NSDictionary *)dictionary ++ (NSDictionary *)swapKeysAndValuesInDictionary:(NSDictionary *)dictionary { - NSMutableDictionary *swapped = [NSMutableDictionary new]; + NSArray *keys = dictionary.allKeys; + NSArray *values = [dictionary objectsForKeys:keys notFoundMarker:[NSNull null]]; - [dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) { - NSAssert([value isKindOfClass:[NSString class]], @"Expect keys and values to be NSString"); - NSAssert([key isKindOfClass:[NSString class]], @"Expect keys and values to be NSString"); - swapped[value] = key; - }]; - - return swapped; + return [NSDictionary dictionaryWithObjects:keys forKeys:values]; } -(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing @@ -167,22 +166,23 @@ +(instancetype)mapperFromUpperCaseToLowerCase + (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions { - NSArray *keys = exceptions.allKeys; - NSArray *values = [exceptions objectsForKeys:keys notFoundMarker:[NSNull null]]; + NSDictionary *toJSON = [JSONKeyMapper swapKeysAndValuesInDictionary:exceptions]; - NSDictionary *toJsonMap = [NSDictionary dictionaryWithObjects:keys forKeys:values]; + return [self baseMapper:baseKeyMapper withModelToJSONExceptions:toJSON]; +} - JSONModelKeyMapBlock toJson = ^NSString *(NSString *keyName) { ++ (instancetype)baseMapper:(JSONKeyMapper *)baseKeyMapper withModelToJSONExceptions:(NSDictionary *)toJSON +{ + return [[self alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) + { if (!keyName) return nil; - if (toJsonMap[keyName]) - return toJsonMap[keyName]; + if (toJSON[keyName]) + return toJSON[keyName]; return baseKeyMapper.modelToJSONKeyBlock(keyName); - }; - - return [[self alloc] initWithModelToJSONBlock:toJson]; + }]; } @end From ebc94c4d86ebc763b3cc81a066c4a95da3ad8618 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 18 Aug 2016 22:14:44 +0100 Subject: [PATCH 110/171] Update tests to use new JSONKeyMapper methods --- Examples/Tests/Models/Implementations/EnumModel.m | 6 +++--- Examples/Tests/Models/Implementations/ExtremeNestingModel.m | 4 ++-- .../Models/Implementations/GitHubKeyMapRepoModelDict.m | 2 +- .../Tests/Models/Implementations/RenamedPropertyModel.m | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Examples/Tests/Models/Implementations/EnumModel.m b/Examples/Tests/Models/Implementations/EnumModel.m index 9caee2c8..518f2503 100644 --- a/Examples/Tests/Models/Implementations/EnumModel.m +++ b/Examples/Tests/Models/Implementations/EnumModel.m @@ -52,10 +52,10 @@ -(id)JSONObjectForNestedStatus +(JSONKeyMapper*)keyMapper { - return [[JSONKeyMapper alloc] initWithDictionary:@ + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@ { - @"statusString":@"status", - @"nested.status":@"nestedStatus" + @"status":@"statusString", + @"nestedStatus":@"nested.status" }]; } diff --git a/Examples/Tests/Models/Implementations/ExtremeNestingModel.m b/Examples/Tests/Models/Implementations/ExtremeNestingModel.m index cf6c892c..bc3b9c7e 100644 --- a/Examples/Tests/Models/Implementations/ExtremeNestingModel.m +++ b/Examples/Tests/Models/Implementations/ExtremeNestingModel.m @@ -9,9 +9,9 @@ @implementation ExtremeNestingModel +(JSONKeyMapper*)keyMapper { - return [[JSONKeyMapper alloc] initWithDictionary:@ + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@ { - @"generic_alternatives.items.data" : @"drugs" + @"drugs" : @"generic_alternatives.items.data" }]; } diff --git a/Examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m b/Examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m index c7568185..4e299ebd 100644 --- a/Examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m +++ b/Examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m @@ -12,7 +12,7 @@ @implementation GitHubKeyMapRepoModelDict +(JSONKeyMapper*)keyMapper { - return [[JSONKeyMapper alloc] initWithDictionary:@{@"description":@"__description"}]; + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{@"__description":@"description"}]; } @end diff --git a/Examples/Tests/Models/Implementations/RenamedPropertyModel.m b/Examples/Tests/Models/Implementations/RenamedPropertyModel.m index aa5b1db2..86c82480 100644 --- a/Examples/Tests/Models/Implementations/RenamedPropertyModel.m +++ b/Examples/Tests/Models/Implementations/RenamedPropertyModel.m @@ -13,7 +13,7 @@ @implementation RenamedPropertyModel + (JSONKeyMapper *)keyMapper { JSONKeyMapper *base = [JSONKeyMapper mapperFromUpperCaseToLowerCase]; - return [JSONKeyMapper mapper:base withExceptions:@{@"ID": @"identifier"}]; + return [JSONKeyMapper baseMapper:base withModelToJSONExceptions:@{@"identifier": @"ID"}]; } @end From 44a37beb8a6ddee9a7acb95aa396cf6af0b352d5 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 18 Aug 2016 22:20:00 +0100 Subject: [PATCH 111/171] Remove deprecated features from readme --- README.md | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/README.md b/README.md index 5a11cedf..4f513abb 100644 --- a/README.md +++ b/README.md @@ -276,23 +276,6 @@ Note: the angle brackets after NSArray contain a protocol. This is -#### Global key mapping (applies to all models in your app) - - - - -
-
-[JSONModel setGlobalKeyMapper:[
-    [JSONKeyMapper alloc] initWithDictionary:@{
-      @"item_id":@"ID",
-      @"item.name": @"itemName"
-   }]
-];
-
-
-
- #### Map automatically under_score case to camelCase @@ -398,23 +381,6 @@ Note: the angle brackets after NSArray contain a protocol. This is
-#### Using the built-in thin HTTP client - -```objective-c - -//add extra headers -[[JSONHTTPClient requestHeaders] setValue:@"MySecret" forKey:@"AuthorizationToken"]; - -//make post, get requests -[JSONHTTPClient postJSONFromURLWithString:@"http://mydomain.com/api" - params:@{@"postParam1":@"value1"} - completion:^(id json, JSONModelError *err) { - - //check err, process json ... - - }]; -``` - #### Export model to NSDictionary or to JSON text ```objective-c From c2039a945ae9376c8390f9da9dad16c991ce8d66 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 18 Aug 2016 22:20:09 +0100 Subject: [PATCH 112/171] Added myself to contributors list --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f513abb..bd046455 100644 --- a/README.md +++ b/README.md @@ -484,7 +484,7 @@ Misc Author: [Marin Todorov](http://www.touch-code-magazine.com) -Contributors: Christian Hoffmann, Mark Joslin, Julien Vignali, Symvaro GmbH, BB9z. +Contributors: James Billingham, Christian Hoffmann, Mark Joslin, Julien Vignali, Symvaro GmbH, BB9z. Also everyone who did successful [pull requests](https://github.com/jsonmodel/jsonmodel/graphs/contributors). Change log : [https://github.com/jsonmodel/jsonmodel/blob/master/CHANGELOG.md](https://github.com/jsonmodel/jsonmodel/blob/master/CHANGELOG.md) From 818eba3b442a5d4fffd88ea15c1e4a5d4bdea756 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 18 Aug 2016 22:20:25 +0100 Subject: [PATCH 113/171] Update readme to non-deprecated method --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bd046455..d1fddcce 100644 --- a/README.md +++ b/README.md @@ -263,10 +263,10 @@ Note: the angle brackets after NSArray contain a protocol. This is +(JSONKeyMapper*)keyMapper { - return [[JSONKeyMapper alloc] initWithDictionary:@{ - @"order_id": @"id", - @"order_details.name": @"productName", - @"order_details.price.usd": @"price" + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ + @"id": @"order_id", + @"productName": @"order_details.name", + @"price": @"order_details.price.usd" }]; } From 142d6e14af573ea105b7f053c864de6895573744 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 18 Aug 2016 22:25:39 +0100 Subject: [PATCH 114/171] v1.4.0 --- CHANGELOG.md | 4 ++++ JSONModel.podspec | 2 +- JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme | 2 +- JSONModel/Info.plist | 2 +- JSONModel/JSONModel/JSONModel.h | 2 +- JSONModel/JSONModel/JSONModel.m | 2 +- JSONModel/JSONModel/JSONModelClassProperty.h | 2 +- JSONModel/JSONModel/JSONModelClassProperty.m | 2 +- JSONModel/JSONModel/JSONModelError.h | 2 +- JSONModel/JSONModel/JSONModelError.m | 2 +- JSONModel/JSONModelLib.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.m | 2 +- JSONModel/JSONModelNetworking/JSONHTTPClient.h | 2 +- JSONModel/JSONModelNetworking/JSONHTTPClient.m | 2 +- JSONModel/JSONModelNetworking/JSONModel+networking.h | 2 +- JSONModel/JSONModelNetworking/JSONModel+networking.m | 2 +- JSONModel/JSONModelTransformations/JSONKeyMapper.h | 2 +- JSONModel/JSONModelTransformations/JSONKeyMapper.m | 2 +- JSONModel/JSONModelTransformations/JSONValueTransformer.h | 2 +- JSONModel/JSONModelTransformations/JSONValueTransformer.m | 2 +- README.md | 2 +- 22 files changed, 25 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d15f91e..0695da16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.4.0 (2016-08-18) + +- deprecated all JSON->Model key mapper methods for consistency's sake - replaced with equivalent Model->JSON methods with clearer naming + ## v1.3.0 (2016-07-22) Sorry for the long time since the last release. We'll be trying to maintain a diff --git a/JSONModel.podspec b/JSONModel.podspec index f0472ea3..6e28394d 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.3.0" + s.version = "1.4.0" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme index ca3fb1a2..333d783f 100644 --- a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -1,7 +1,7 @@ + version = "1.4"> diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index 4bbc96d3..fff908ac 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.3 + 1.4 CFBundleSignature ???? CFBundleVersion diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index ab17989e..086ad664 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -1,7 +1,7 @@ // // JSONModel.h // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index ea66f69c..2982f93a 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1,7 +1,7 @@ // // JSONModel.m // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index afb39b17..ef621017 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -1,7 +1,7 @@ // // JSONModelClassProperty.h // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index 0671085a..dfb225b2 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -1,7 +1,7 @@ // // JSONModelClassProperty.m // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index 2434f605..bb529631 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -1,7 +1,7 @@ // // JSONModelError.h // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelError.m b/JSONModel/JSONModel/JSONModelError.m index 1e4cb18a..b0e64c92 100644 --- a/JSONModel/JSONModel/JSONModelError.m +++ b/JSONModel/JSONModel/JSONModelError.m @@ -1,7 +1,7 @@ // // JSONModelError.m // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index 81e1d9a4..7bb8dee2 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -1,7 +1,7 @@ // // JSONModelLib.h // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index 7c9c359f..933173af 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.h @@ -1,7 +1,7 @@ // // JSONAPI.h // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index f612fb59..9ffe9e9d 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -1,7 +1,7 @@ // // JSONAPI.m // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index 32f7c19f..7e21b7e2 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -1,7 +1,7 @@ // // JSONModelHTTPClient.h // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index e67c3e3f..bc5476df 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -1,7 +1,7 @@ // // JSONModelHTTPClient.m // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index bc3b69e0..c856d1b8 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -1,7 +1,7 @@ // // JSONModel+networking.h // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index bf480ea3..0ac4428f 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -1,7 +1,7 @@ // // JSONModel+networking.m // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 1bfd80b2..2471fc1c 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -1,7 +1,7 @@ // // JSONKeyMapper.h // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index e66e894f..89579a34 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -1,7 +1,7 @@ // // JSONKeyMapper.m // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index 2bbbfdf5..528908c0 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -1,7 +1,7 @@ // // JSONValueTransformer.h // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 36762559..5f922cde 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -1,7 +1,7 @@ // // JSONValueTransformer.m // -// @version 1.3 +// @version 1.4 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/README.md b/README.md index d1fddcce..390e4b7f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Magical Data Modeling Framework for JSON -### Version 1.3.0 +### Version 1.4.0 --- If you like JSONModel and use it, could you please: From bf9662294c996b34f097a1078641ce560d1374fb Mon Sep 17 00:00:00 2001 From: Robin Zhang Date: Sat, 10 Sep 2016 16:44:49 +0800 Subject: [PATCH 115/171] Setup Travis-CI. (#534) --- .travis.yml | 20 +++++++ .../xcshareddata/xcschemes/iOSTests.xcscheme | 56 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .travis.yml create mode 100644 Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..ffe8e902 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ +language: objective-c +osx_image: xcode8 +before_install: + - cd Examples/ + - pod install +script: + - xcodebuild $XCODE_ACTION + -workspace "Examples.xcworkspace" + -scheme "$TRAVIS_XCODE_SCHEME" + -sdk "$XCODE_SDK" + -destination "$XCODE_DESTINATION" + | xcpretty +matrix: + include: + - xcode_scheme: "iOSTests" + osx_image: xcode7.3 + env: + - XCODE_ACTION=test + - XCODE_SDK=iphonesimulator + - XCODE_DESTINATION="name=iPhone 6s" diff --git a/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme b/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme new file mode 100644 index 00000000..872ff561 --- /dev/null +++ b/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + From 429afbe197c784f859c5bc3e69778ef33ece3011 Mon Sep 17 00:00:00 2001 From: Robin Zhang Date: Sun, 11 Sep 2016 21:30:47 +0800 Subject: [PATCH 116/171] Output test result to Travis. (#535) --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ffe8e902..e2e3aba2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ before_install: - cd Examples/ - pod install script: + - set -o pipefail - xcodebuild $XCODE_ACTION -workspace "Examples.xcworkspace" -scheme "$TRAVIS_XCODE_SCHEME" From a9fe1b47e9563cf92d67ba983f53bc07c6231d80 Mon Sep 17 00:00:00 2001 From: Robin Zhang Date: Sun, 11 Sep 2016 21:33:36 +0800 Subject: [PATCH 117/171] Fix custom setter dictionary crash when multithreading(#436) (#533) * Fix custom setter dictionary crash when multithreading(#436) * Add concurrent test case. * Move custom getter resolution to __inspectProperties. Adjust code according to comments. --- Examples/Examples.xcodeproj/project.pbxproj | 10 +++ Examples/Tests/ConcurrentTests.m | 60 +++++++++++++++ .../Models/Headers/ConcurrentReposModel.h | 37 +++++++++ .../Models/Headers/ConcurrentReposModel.m | 17 +++++ JSONModel/JSONModel/JSONModel.m | 75 +++++++++---------- JSONModel/JSONModel/JSONModelClassProperty.h | 11 --- 6 files changed, 158 insertions(+), 52 deletions(-) create mode 100644 Examples/Tests/ConcurrentTests.m create mode 100644 Examples/Tests/Models/Headers/ConcurrentReposModel.h create mode 100644 Examples/Tests/Models/Headers/ConcurrentReposModel.m diff --git a/Examples/Examples.xcodeproj/project.pbxproj b/Examples/Examples.xcodeproj/project.pbxproj index 2e2db5f3..fc980a06 100644 --- a/Examples/Examples.xcodeproj/project.pbxproj +++ b/Examples/Examples.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 008077B81D81B91C006A0187 /* ConcurrentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 008077B71D81B91C006A0187 /* ConcurrentTests.m */; }; + 008077BD1D81C035006A0187 /* ConcurrentReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 008077BC1D81C035006A0187 /* ConcurrentReposModel.m */; }; 0DB9D559E428E7124986BF07 /* Pods_iOSTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F37BF9082B944335670E6BC4 /* Pods_iOSTests.framework */; }; 1A46AB611D1C71CB00E10D9D /* SanityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A46AB601D1C71CB00E10D9D /* SanityTests.m */; }; 1A46AB7A1D1C741900E10D9D /* SanityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A46AB601D1C71CB00E10D9D /* SanityTests.m */; }; @@ -262,6 +264,9 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 008077B71D81B91C006A0187 /* ConcurrentTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConcurrentTests.m; sourceTree = ""; }; + 008077B91D81BEF1006A0187 /* ConcurrentReposModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConcurrentReposModel.h; sourceTree = ""; }; + 008077BC1D81C035006A0187 /* ConcurrentReposModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ConcurrentReposModel.m; path = ../Headers/ConcurrentReposModel.m; sourceTree = ""; }; 0A4DE5B5DC624A64AA75870C /* Pods-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-macOS/Pods-macOS.debug.xcconfig"; sourceTree = ""; }; 107DC0780200A72176B28827 /* Pods-iOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-iOSTests/Pods-iOSTests.release.xcconfig"; sourceTree = ""; }; 10A3600BED7471EF4FB3C34D /* Pods_macOSTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_macOSTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -509,6 +514,7 @@ 1A4BAA371D1C79260069D735 /* SpecialPropertyNameTests.m */, 1A4BAA381D1C79260069D735 /* SpecialValuesTests.m */, 1A4BAA391D1C79260069D735 /* ValidationTests.m */, + 008077B71D81B91C006A0187 /* ConcurrentTests.m */, ); path = Tests; sourceTree = ""; @@ -573,6 +579,7 @@ 1A4BAA2E1D1C79260069D735 /* ReposModel.h */, 1A4BAA2F1D1C79260069D735 /* RpcRequestModel.h */, 1A4BAA301D1C79260069D735 /* SpecialPropertyModel.h */, + 008077B91D81BEF1006A0187 /* ConcurrentReposModel.h */, ); path = Headers; sourceTree = ""; @@ -606,6 +613,7 @@ 1A4BAAE81D1C7D590069D735 /* ReposModel.m */, 1A4BAAE91D1C7D590069D735 /* RpcRequestModel.m */, 1A4BAAEA1D1C7D590069D735 /* SpecialPropertyModel.m */, + 008077BC1D81C035006A0187 /* ConcurrentReposModel.m */, ); path = Implementations; sourceTree = ""; @@ -1472,6 +1480,7 @@ 1A4BAA921D1C79480069D735 /* NestedModelsTests.m in Sources */, 1A4BAA9A1D1C79480069D735 /* ValidationTests.m in Sources */, 1A4BAA971D1C79480069D735 /* SpecialPropertiesTests.m in Sources */, + 008077BD1D81C035006A0187 /* ConcurrentReposModel.m in Sources */, 1A4BAA871D1C79480069D735 /* ArrayTests.m in Sources */, 1A4BAB131D1C7DA80069D735 /* JSONTypesModelWithValidation2.m in Sources */, 1A4BAB0D1D1C7DA80069D735 /* GitHubRepoModel.m in Sources */, @@ -1483,6 +1492,7 @@ 1A4BAB151D1C7DA80069D735 /* ModelForUpperCaseMapper.m in Sources */, 1A4BAA891D1C79480069D735 /* CustomPropsTests.m in Sources */, 1A4BAA931D1C79480069D735 /* OptionalPropertiesTests.m in Sources */, + 008077B81D81B91C006A0187 /* ConcurrentTests.m in Sources */, 1A4BAA901D1C79480069D735 /* JSONTypesReadTests.m in Sources */, 1A4BAB101D1C7DA80069D735 /* InteractionModel.m in Sources */, 1A4BAB071D1C7DA80069D735 /* CustomPropertyModel.m in Sources */, diff --git a/Examples/Tests/ConcurrentTests.m b/Examples/Tests/ConcurrentTests.m new file mode 100644 index 00000000..542ef5d5 --- /dev/null +++ b/Examples/Tests/ConcurrentTests.m @@ -0,0 +1,60 @@ +// +// ConcurrentTests.m +// Examples +// +// Created by robin on 9/8/16. +// Copyright © 2016 JSONModel. All rights reserved. +// + +@import JSONModel; + +#import +#import "ConcurrentReposModel.h" + +@interface ConcurrentTests : XCTestCase + +@property (nonatomic, strong) id jsonDict; + +@end + +@implementation ConcurrentTests + +- (void)setUp { + [super setUp]; + NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../github-iphone.json"]; + NSData* jsonData = [NSData dataWithContentsOfFile:filePath]; + + XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); + + NSError* err; + self.jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:&err]; +} + +- (void)tearDown { + [super tearDown]; +} + +- (void)testConcurrentMapping { + // Because the uncertainty of concurrency. Need multiple run to confirm the result. + NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + queue.maxConcurrentOperationCount = 50; + [queue setSuspended:YES]; + + XCTestExpectation *expectation = [self expectationWithDescription:@"Wait for queue...."]; + + __block int count = 0; + for (int i = 0; i < 100; i++) { + [queue addOperationWithBlock:^{ + ConcurrentReposModel *model = [[ConcurrentReposModel alloc] initWithDictionary:self.jsonDict error:nil]; +#pragma unused(model) + count++; + if (count == 100) { + [expectation fulfill]; + } + }]; + } + [queue setSuspended:NO]; + [self waitForExpectationsWithTimeout:10 handler:nil]; +} + +@end diff --git a/Examples/Tests/Models/Headers/ConcurrentReposModel.h b/Examples/Tests/Models/Headers/ConcurrentReposModel.h new file mode 100644 index 00000000..003f4884 --- /dev/null +++ b/Examples/Tests/Models/Headers/ConcurrentReposModel.h @@ -0,0 +1,37 @@ +// +// ConcurrentReposModel.h +// Examples +// +// Created by robin on 9/8/16. +// Copyright © 2016 JSONModel. All rights reserved. +// + +@import JSONModel; + +@interface ConcurrentModel : JSONModel +// Same as GitHubRepoModel. Concurrent testing need a model that not run test yet. + +@property (strong, nonatomic) NSDate* created; +@property (strong, nonatomic) NSDate* pushed; +@property (assign, nonatomic) int watchers; +@property (strong, nonatomic) NSString* owner; +@property (assign, nonatomic) int forks; +@property (strong, nonatomic) NSString* language; +@property (assign, nonatomic) BOOL fork; +@property (assign, nonatomic) double size; +@property (assign, nonatomic) int followers; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +@property (strong, nonatomic) NSString* name; +#pragma GCC diagnostic pop + +@end + +@protocol ConcurrentModel; + +@interface ConcurrentReposModel : JSONModel + +@property (strong, nonatomic) NSMutableArray* repositories; + +@end \ No newline at end of file diff --git a/Examples/Tests/Models/Headers/ConcurrentReposModel.m b/Examples/Tests/Models/Headers/ConcurrentReposModel.m new file mode 100644 index 00000000..932499b6 --- /dev/null +++ b/Examples/Tests/Models/Headers/ConcurrentReposModel.m @@ -0,0 +1,17 @@ +// +// ConcurrentModel.m +// Examples +// +// Created by robin on 9/8/16. +// Copyright © 2016 JSONModel. All rights reserved. +// + +#import "ConcurrentReposModel.h" + +@implementation ConcurrentModel + +@end + +@implementation ConcurrentReposModel + +@end diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 2982f93a..0377f997 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -692,6 +692,37 @@ -(void)__inspectProperties if (p && ![propertyIndex objectForKey:p.name]) { [propertyIndex setValue:p forKey:p.name]; } + + //generate custom setters and getter + if (p) { + NSString* ucfirstName = [p.name stringByReplacingCharactersInRange: NSMakeRange(0,1) + withString: [[p.name substringToIndex:1] uppercaseString]]; + // setters + p.customSetters = [NSMutableDictionary new]; + for (Class allowedType in allowedJSONTypes) { + NSString *className = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:allowedType]); + + if (!p.customSetters[className]) { + //check for a custom property setter method + 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]) { + //cache the custom setter selector + p.customSetters[className] = selectorName; + } + } + } + + // getter + NSString* selectorName = [NSString stringWithFormat:@"JSONObjectFor%@", ucfirstName]; + SEL customPropertyGetter = NSSelectorFromString(selectorName); + + if ([self respondsToSelector: customPropertyGetter]) { + p.customGetter = customPropertyGetter; + } + } } free(properties); @@ -832,30 +863,9 @@ -(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property #pragma mark - custom transformations -(BOOL)__customSetValue:(id)value forProperty:(JSONModelClassProperty*)property { - 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, className]; - - SEL customPropertySetter = NSSelectorFromString(selectorName); - - //check if there's a custom selector like this - if (![self respondsToSelector: customPropertySetter]) { - property.customSetters[className] = [NSNull null]; - return NO; - } - - //cache the custom setter selector - property.customSetters[className] = selectorName; - } - - if (property.customSetters[className] != [NSNull null]) { + + if (property.customSetters[className]) { //call the custom setter //https://github.com/steipete SEL selector = NSSelectorFromString(property.customSetters[className]); @@ -868,24 +878,7 @@ -(BOOL)__customSetValue:(id)value forProperty:(JSONModelClassProperty* -(BOOL)__customGetValue:(id*)value forProperty:(JSONModelClassProperty*)property { - if (property.getterType == kNotInspected) { - //check for a custom property getter method - NSString* ucfirstName = [property.name stringByReplacingCharactersInRange: NSMakeRange(0,1) - withString: [[property.name substringToIndex:1] uppercaseString]]; - NSString* selectorName = [NSString stringWithFormat:@"JSONObjectFor%@", ucfirstName]; - - SEL customPropertyGetter = NSSelectorFromString(selectorName); - if (![self respondsToSelector: customPropertyGetter]) { - property.getterType = kNo; - return NO; - } - - property.getterType = kCustom; - property.customGetter = customPropertyGetter; - - } - - if (property.getterType==kCustom) { + if (property.customGetter) { //call the custom getter #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks" diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index ef621017..edb685e6 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -16,14 +16,6 @@ #import -enum kCustomizationTypes { - kNotInspected = 0, - kCustom, - kNo -}; - -typedef enum kCustomizationTypes PropertyGetterType; - /** * **You do not need to instantiate this class yourself.** This class is used internally by JSONModel * to inspect the declared properties of your model class. @@ -58,9 +50,6 @@ typedef enum kCustomizationTypes PropertyGetterType; /** If YES - create a mutable object for the value of the property */ @property (assign, nonatomic) BOOL isMutable; -/** The status of property getter introspection in a model */ -@property (assign, nonatomic) PropertyGetterType getterType; - /** a custom getter for this property, found in the owning model */ @property (assign, nonatomic) SEL customGetter; From ca2e0980d9c65f83639f249f5c7e9b61319253cc Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 14:54:59 +0100 Subject: [PATCH 118/171] Xcode 8.0 & macOS 10.12 upgrade --- Examples/Examples.xcodeproj/project.pbxproj | 6 +++++- .../xcshareddata/xcschemes/iOSTests.xcscheme | 2 +- .../Assets.xcassets/AppIcon.appiconset/Contents.json | 10 ++++++++++ Examples/iOS/Base.lproj/LaunchScreen.storyboard | 12 ++++++------ Examples/iOS/Base.lproj/Main.storyboard | 9 +++++---- Examples/macOS/Base.lproj/Main.storyboard | 4 ++-- Examples/tvOS/Base.lproj/Main.storyboard | 12 +++++++++--- Examples/watchOS/Base.lproj/Interface.storyboard | 11 ++++++----- 8 files changed, 44 insertions(+), 22 deletions(-) diff --git a/Examples/Examples.xcodeproj/project.pbxproj b/Examples/Examples.xcodeproj/project.pbxproj index fc980a06..94dc5c4e 100644 --- a/Examples/Examples.xcodeproj/project.pbxproj +++ b/Examples/Examples.xcodeproj/project.pbxproj @@ -928,7 +928,7 @@ 1A84BBD31D1BFB0D005234F4 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0730; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = JSONModel; TargetAttributes = { 1A46AB651D1C735C00E10D9D = { @@ -1782,8 +1782,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; @@ -1827,8 +1829,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; diff --git a/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme b/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme index 872ff561..05e5d76b 100644 --- a/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme +++ b/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme @@ -1,6 +1,6 @@ - + + - + + @@ -13,10 +14,9 @@ - + - - + diff --git a/Examples/iOS/Base.lproj/Main.storyboard b/Examples/iOS/Base.lproj/Main.storyboard index ada9d7ff..6a11980f 100644 --- a/Examples/iOS/Base.lproj/Main.storyboard +++ b/Examples/iOS/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -13,9 +14,9 @@ - + - + diff --git a/Examples/macOS/Base.lproj/Main.storyboard b/Examples/macOS/Base.lproj/Main.storyboard index 1f52b501..3828f956 100644 --- a/Examples/macOS/Base.lproj/Main.storyboard +++ b/Examples/macOS/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + diff --git a/Examples/tvOS/Base.lproj/Main.storyboard b/Examples/tvOS/Base.lproj/Main.storyboard index 3771b7f2..571ee6fe 100644 --- a/Examples/tvOS/Base.lproj/Main.storyboard +++ b/Examples/tvOS/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -15,11 +16,16 @@ - + + + + + + diff --git a/Examples/watchOS/Base.lproj/Interface.storyboard b/Examples/watchOS/Base.lproj/Interface.storyboard index 5f52cb6c..0b1a9e04 100644 --- a/Examples/watchOS/Base.lproj/Interface.storyboard +++ b/Examples/watchOS/Base.lproj/Interface.storyboard @@ -1,14 +1,15 @@ - - + + - - + + + - + From 270762bc770cfd085a98b8debd5b5bcf9b394618 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 14:57:07 +0100 Subject: [PATCH 119/171] General code style update --- JSONModel/JSONModel/JSONModel.m | 52 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 0377f997..d8a3e2ee 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -692,35 +692,35 @@ -(void)__inspectProperties if (p && ![propertyIndex objectForKey:p.name]) { [propertyIndex setValue:p forKey:p.name]; } - - //generate custom setters and getter - if (p) { - NSString* ucfirstName = [p.name stringByReplacingCharactersInRange: NSMakeRange(0,1) - withString: [[p.name substringToIndex:1] uppercaseString]]; + + // generate custom setters and getter + if (p) + { + NSString *ucfirstName = [p.name stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[p.name substringToIndex:1].uppercaseString]; + + // getter + SEL customPropertyGetter = NSSelectorFromString([NSString stringWithFormat:@"JSONObjectFor%@", ucfirstName]); + + if ([self respondsToSelector:customPropertyGetter]) + p.customGetter = customPropertyGetter; + // setters p.customSetters = [NSMutableDictionary new]; - for (Class allowedType in allowedJSONTypes) { + + for (Class allowedType in allowedJSONTypes) + { NSString *className = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:allowedType]); - - if (!p.customSetters[className]) { - //check for a custom property setter method - 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]) { - //cache the custom setter selector - p.customSetters[className] = selectorName; - } - } - } - - // getter - NSString* selectorName = [NSString stringWithFormat:@"JSONObjectFor%@", ucfirstName]; - SEL customPropertyGetter = NSSelectorFromString(selectorName); - - if ([self respondsToSelector: customPropertyGetter]) { - p.customGetter = customPropertyGetter; + + if (p.customSetters[className]) + continue; + + //check for a custom property setter method + 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]) + p.customSetters[className] = selectorName; } } } From 6581500d823c362cfe5b68fe2ae42eeda47e37ff Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 15:02:18 +0100 Subject: [PATCH 120/171] Less verbose variable naming --- JSONModel/JSONModel/JSONModel.m | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index d8a3e2ee..59bc4487 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -696,31 +696,28 @@ -(void)__inspectProperties // generate custom setters and getter if (p) { - NSString *ucfirstName = [p.name stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[p.name substringToIndex:1].uppercaseString]; + NSString *name = [p.name stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[p.name substringToIndex:1].uppercaseString]; // getter - SEL customPropertyGetter = NSSelectorFromString([NSString stringWithFormat:@"JSONObjectFor%@", ucfirstName]); + SEL getter = NSSelectorFromString([NSString stringWithFormat:@"JSONObjectFor%@", name]); - if ([self respondsToSelector:customPropertyGetter]) - p.customGetter = customPropertyGetter; + if ([self respondsToSelector:getter]) + p.customGetter = getter; // setters p.customSetters = [NSMutableDictionary new]; - for (Class allowedType in allowedJSONTypes) + for (Class type in allowedJSONTypes) { - NSString *className = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:allowedType]); + NSString *class = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:type]); - if (p.customSetters[className]) + if (p.customSetters[class]) continue; - //check for a custom property setter method - NSString *selectorName = [NSString stringWithFormat:@"set%@With%@:", ucfirstName, className]; - SEL customPropertySetter = NSSelectorFromString(selectorName); + SEL setter = NSSelectorFromString([NSString stringWithFormat:@"set%@With%@:", name, class]); - //check if there's a custom selector like this - if ([self respondsToSelector:customPropertySetter]) - p.customSetters[className] = selectorName; + if ([self respondsToSelector:setter]) + p.customSetters[class] = NSStringFromSelector(setter); } } } From ce20de76f4803b017eac8c66a55f24289f5e5a0e Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 15:20:39 +0100 Subject: [PATCH 121/171] Restructured getter/setter handling code --- JSONModel/JSONModel/JSONModel.m | 38 ++++++++++++++------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 59bc4487..64154463 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -717,7 +717,7 @@ -(void)__inspectProperties SEL setter = NSSelectorFromString([NSString stringWithFormat:@"set%@With%@:", name, class]); if ([self respondsToSelector:setter]) - p.customSetters[class] = NSStringFromSelector(setter); + p.customSetters[class] = [NSValue valueWithBytes:&setter objCType:@encode(SEL)]; } } } @@ -858,33 +858,27 @@ -(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property } #pragma mark - custom transformations --(BOOL)__customSetValue:(id)value forProperty:(JSONModelClassProperty*)property +- (BOOL)__customSetValue:(id )value forProperty:(JSONModelClassProperty *)property { - NSString *className = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:[value class]]); - - if (property.customSetters[className]) { - //call the custom setter - //https://github.com/steipete - SEL selector = NSSelectorFromString(property.customSetters[className]); - ((void (*) (id, SEL, id))objc_msgSend)(self, selector, value); - return YES; - } + NSString *class = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:[value class]]); - return NO; + SEL setter = nil; + [property.customSetters[class] getValue:&setter]; + + if (!setter) + return NO; + + [self performSelector:setter withObject:value]; + return YES; } --(BOOL)__customGetValue:(id*)value forProperty:(JSONModelClassProperty*)property +- (BOOL)__customGetValue:(id *)value forProperty:(JSONModelClassProperty *)property { - if (property.customGetter) { - //call the custom getter - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Warc-performSelector-leaks" - *value = [self performSelector:property.customGetter]; - #pragma clang diagnostic pop - return YES; - } + if (!property.customGetter) + return NO; - return NO; + *value = [self performSelector:property.customGetter]; + return YES; } #pragma mark - persistance From 2cba2985727aff40894ac4d57a163fff3c09f763 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 15:20:49 +0100 Subject: [PATCH 122/171] Better tests for custom setters --- .../Tests/Models/Implementations/EnumModel.m | 5 +++ Examples/Tests/PrimitiveTypesReadTests.m | 36 +++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Examples/Tests/Models/Implementations/EnumModel.m b/Examples/Tests/Models/Implementations/EnumModel.m index 518f2503..68b13be1 100644 --- a/Examples/Tests/Models/Implementations/EnumModel.m +++ b/Examples/Tests/Models/Implementations/EnumModel.m @@ -30,6 +30,11 @@ -(void)setNestedStatusWithNSString:(NSString*)statusString _status = [statusString isEqualToString:@"open"]?StatusOpen:StatusClosed; } +-(void)setNestedStatusWithNSNumber:(NSNumber*)statusNumber +{ + _status = statusNumber.boolValue?StatusOpen:StatusClosed; +} + -(id)JSONObjectForStatus { return (self.status==StatusOpen)?@"open":@"closed"; diff --git a/Examples/Tests/PrimitiveTypesReadTests.m b/Examples/Tests/PrimitiveTypesReadTests.m index 3923a7fd..1812777c 100644 --- a/Examples/Tests/PrimitiveTypesReadTests.m +++ b/Examples/Tests/PrimitiveTypesReadTests.m @@ -59,7 +59,6 @@ -(void)testBoolExport XCTAssertTrue([exportedJSON rangeOfString:@"\"boolYES\":true"].location != NSNotFound, @"boolYES should export to 'true'"); } -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 -(void)testEnumerationTypes { NSString* jsonContents = @"{\"nested\":{\"status\":\"open\"},\"nsStatus\":\"closed\",\"nsuStatus\":\"open\",\"statusString\":\"open\"}"; @@ -79,6 +78,39 @@ -(void)testEnumerationTypes XCTAssertTrue([json rangeOfString:@"\"nsuStatus\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); XCTAssertTrue([json rangeOfString:@"\"nsStatus\":\"closed\""].location!=NSNotFound, @"Exporting enum value didn't work out"); } -#endif + +-(void)testCustomSetters +{ + NSString* json1 = @"{\"nested\":{\"status\":\"open\"},\"nsStatus\":\"closed\",\"nsuStatus\":\"open\",\"statusString\":\"open\"}"; + NSString* json2 = @"{\"nested\":{\"status\":true},\"nsStatus\":\"closed\",\"nsuStatus\":\"open\",\"statusString\":\"open\"}"; + + NSError* err; + + EnumModel* p1 = [[EnumModel alloc] initWithString: json1 error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(p1, @"Could not read input json text"); + + EnumModel* p2 = [[EnumModel alloc] initWithString: json2 error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(p2, @"Could not read input json text"); + + XCTAssertTrue(p1.status==StatusOpen, @"Status is not StatusOpen"); + XCTAssertTrue(p1.nsStatus==NSE_StatusClosed, @"nsStatus is not NSE_StatusClosed"); + XCTAssertTrue(p1.nsuStatus==NSEU_StatusOpen, @"nsuStatus is not NSEU_StatusOpen"); + + XCTAssertTrue(p2.status==StatusOpen, @"Status is not StatusOpen"); + XCTAssertTrue(p2.nsStatus==NSE_StatusClosed, @"nsStatus is not NSE_StatusClosed"); + XCTAssertTrue(p2.nsuStatus==NSEU_StatusOpen, @"nsuStatus is not NSEU_StatusOpen"); + + NSString* out1 = [p1 toJSONString]; + XCTAssertTrue([out1 rangeOfString:@"\"statusString\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([out1 rangeOfString:@"\"nsuStatus\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([out1 rangeOfString:@"\"nsStatus\":\"closed\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + + NSString* out2 = [p2 toJSONString]; + XCTAssertTrue([out2 rangeOfString:@"\"statusString\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([out2 rangeOfString:@"\"nsuStatus\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([out2 rangeOfString:@"\"nsStatus\":\"closed\""].location!=NSNotFound, @"Exporting enum value didn't work out"); +} @end From 9c8aa578518f3abd6823c5d107f20405ed3c8f67 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 16:12:39 +0100 Subject: [PATCH 123/171] v1.4.1 --- CHANGELOG.md | 4 ++++ JSONModel.podspec | 2 +- JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme | 2 +- JSONModel/Info.plist | 2 +- JSONModel/JSONModel/JSONModel.h | 2 +- JSONModel/JSONModel/JSONModel.m | 4 ++-- JSONModel/JSONModel/JSONModelClassProperty.h | 2 +- JSONModel/JSONModel/JSONModelClassProperty.m | 2 +- JSONModel/JSONModel/JSONModelError.h | 2 +- JSONModel/JSONModel/JSONModelError.m | 2 +- JSONModel/JSONModelLib.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.m | 2 +- JSONModel/JSONModelNetworking/JSONHTTPClient.h | 2 +- JSONModel/JSONModelNetworking/JSONHTTPClient.m | 2 +- JSONModel/JSONModelNetworking/JSONModel+networking.h | 2 +- JSONModel/JSONModelNetworking/JSONModel+networking.m | 2 +- JSONModel/JSONModelTransformations/JSONKeyMapper.h | 2 +- JSONModel/JSONModelTransformations/JSONKeyMapper.m | 2 +- JSONModel/JSONModelTransformations/JSONValueTransformer.h | 2 +- JSONModel/JSONModelTransformations/JSONValueTransformer.m | 2 +- README.md | 2 +- 22 files changed, 26 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0695da16..940299b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.4.1 (2016-09-11) + +- restructured custom getter/setter system to resolve crash reported in #436 (thanks @robinzhangx & @hfossli) + ## v1.4.0 (2016-08-18) - deprecated all JSON->Model key mapper methods for consistency's sake - replaced with equivalent Model->JSON methods with clearer naming diff --git a/JSONModel.podspec b/JSONModel.podspec index 6e28394d..d0bfe9d6 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.4.0" + s.version = "1.4.1" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme index 333d783f..b218f135 100644 --- a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -1,7 +1,7 @@ + version = "1.4.1"> diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index fff908ac..07b3f7e7 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.4 + 1.4.1 CFBundleSignature ???? CFBundleVersion diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 086ad664..ce902d98 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -1,7 +1,7 @@ // // JSONModel.h // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 64154463..060b593a 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1,7 +1,7 @@ // // JSONModel.m // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // @@ -1371,7 +1371,7 @@ -(instancetype)copyWithZone:(NSZone *)zone -(instancetype)initWithCoder:(NSCoder *)decoder { NSString* json; - + if ([decoder respondsToSelector:@selector(decodeObjectOfClass:forKey:)]) { json = [decoder decodeObjectOfClass:[NSString class] forKey:@"json"]; } else { diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index edb685e6..48c4034e 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -1,7 +1,7 @@ // // JSONModelClassProperty.h // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index dfb225b2..264d0235 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -1,7 +1,7 @@ // // JSONModelClassProperty.m // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index bb529631..866ae4cd 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -1,7 +1,7 @@ // // JSONModelError.h // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelError.m b/JSONModel/JSONModel/JSONModelError.m index b0e64c92..e3d09260 100644 --- a/JSONModel/JSONModel/JSONModelError.m +++ b/JSONModel/JSONModel/JSONModelError.m @@ -1,7 +1,7 @@ // // JSONModelError.m // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index 7bb8dee2..61ffe701 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -1,7 +1,7 @@ // // JSONModelLib.h // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index 933173af..7acfe34d 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.h @@ -1,7 +1,7 @@ // // JSONAPI.h // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index 9ffe9e9d..ee8245b1 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -1,7 +1,7 @@ // // JSONAPI.m // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index 7e21b7e2..5f7c018e 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -1,7 +1,7 @@ // // JSONModelHTTPClient.h // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index bc5476df..dc249edc 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -1,7 +1,7 @@ // // JSONModelHTTPClient.m // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index c856d1b8..faebae27 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -1,7 +1,7 @@ // // JSONModel+networking.h // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index 0ac4428f..25dd47a7 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -1,7 +1,7 @@ // // JSONModel+networking.m // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 2471fc1c..b98fae0e 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -1,7 +1,7 @@ // // JSONKeyMapper.h // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 89579a34..6c96fd5e 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -1,7 +1,7 @@ // // JSONKeyMapper.m // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index 528908c0..2497680a 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -1,7 +1,7 @@ // // JSONValueTransformer.h // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 5f922cde..e17cbba4 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -1,7 +1,7 @@ // // JSONValueTransformer.m // -// @version 1.4 +// @version 1.4.1 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/README.md b/README.md index 390e4b7f..a22c787b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Magical Data Modeling Framework for JSON -### Version 1.4.0 +### Version 1.4.1 --- If you like JSONModel and use it, could you please: From 210613564473a2f5d00ee6a485898f3f60fc8bb1 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 16:30:25 +0100 Subject: [PATCH 124/171] Corrected use of `performSelector` to the safer `methodForSelector` --- JSONModel/JSONModel/JSONModel.m | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 060b593a..431c43b2 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -868,16 +868,24 @@ - (BOOL)__customSetValue:(id )value forProperty:(JSONModelClassPropert if (!setter) return NO; - [self performSelector:setter withObject:value]; + IMP imp = [self methodForSelector:setter]; + void (*func)(id, SEL, id ) = (void *)imp; + func(self, setter, value); + return YES; } - (BOOL)__customGetValue:(id *)value forProperty:(JSONModelClassProperty *)property { - if (!property.customGetter) + SEL getter = property.customGetter; + + if (!getter) return NO; - *value = [self performSelector:property.customGetter]; + IMP imp = [self methodForSelector:getter]; + id (*func)(id, SEL) = (void *)imp; + *value = func(self, getter); + return YES; } From d69ebfce11a13aa9e336451ceae476385f72cca2 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 16:34:08 +0100 Subject: [PATCH 125/171] v1.4.2 --- CHANGELOG.md | 4 ++++ JSONModel.podspec | 2 +- JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme | 2 +- JSONModel/Info.plist | 2 +- JSONModel/JSONModel/JSONModel.h | 2 +- JSONModel/JSONModel/JSONModel.m | 2 +- JSONModel/JSONModel/JSONModelClassProperty.h | 2 +- JSONModel/JSONModel/JSONModelClassProperty.m | 2 +- JSONModel/JSONModel/JSONModelError.h | 2 +- JSONModel/JSONModel/JSONModelError.m | 2 +- JSONModel/JSONModelLib.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.h | 2 +- JSONModel/JSONModelNetworking/JSONAPI.m | 2 +- JSONModel/JSONModelNetworking/JSONHTTPClient.h | 2 +- JSONModel/JSONModelNetworking/JSONHTTPClient.m | 2 +- JSONModel/JSONModelNetworking/JSONModel+networking.h | 2 +- JSONModel/JSONModelNetworking/JSONModel+networking.m | 2 +- JSONModel/JSONModelTransformations/JSONKeyMapper.h | 2 +- JSONModel/JSONModelTransformations/JSONKeyMapper.m | 2 +- JSONModel/JSONModelTransformations/JSONValueTransformer.h | 2 +- JSONModel/JSONModelTransformations/JSONValueTransformer.m | 2 +- README.md | 2 +- 22 files changed, 25 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 940299b8..bdb4eda1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.4.2 (2016-09-11) + +- change use of `performSelector` to [a safer implementation](https://stackoverflow.com/a/20058585/743957) + ## v1.4.1 (2016-09-11) - restructured custom getter/setter system to resolve crash reported in #436 (thanks @robinzhangx & @hfossli) diff --git a/JSONModel.podspec b/JSONModel.podspec index d0bfe9d6..5e1d5428 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.4.1" + s.version = "1.4.2" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme index b218f135..3c4fe96a 100644 --- a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -1,7 +1,7 @@ + version = "1.4.2"> diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index 07b3f7e7..222de541 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.4.1 + 1.4.2 CFBundleSignature ???? CFBundleVersion diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index ce902d98..d045230f 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -1,7 +1,7 @@ // // JSONModel.h // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 431c43b2..dc717701 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1,7 +1,7 @@ // // JSONModel.m // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index 48c4034e..1813ffd5 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -1,7 +1,7 @@ // // JSONModelClassProperty.h // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index 264d0235..aee39098 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -1,7 +1,7 @@ // // JSONModelClassProperty.m // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index 866ae4cd..419353cc 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -1,7 +1,7 @@ // // JSONModelError.h // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModel/JSONModelError.m b/JSONModel/JSONModel/JSONModelError.m index e3d09260..89f5f7f9 100644 --- a/JSONModel/JSONModel/JSONModelError.m +++ b/JSONModel/JSONModel/JSONModelError.m @@ -1,7 +1,7 @@ // // JSONModelError.m // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index 61ffe701..13e5eb40 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -1,7 +1,7 @@ // // JSONModelLib.h // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index 7acfe34d..5fec6b91 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.h @@ -1,7 +1,7 @@ // // JSONAPI.h // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index ee8245b1..0af7a1e4 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -1,7 +1,7 @@ // // JSONAPI.m // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index 5f7c018e..f76447ee 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -1,7 +1,7 @@ // // JSONModelHTTPClient.h // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index dc249edc..5e6ed87b 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -1,7 +1,7 @@ // // JSONModelHTTPClient.m // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index faebae27..bbd73d46 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -1,7 +1,7 @@ // // JSONModel+networking.h // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index 25dd47a7..d90b8a1d 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -1,7 +1,7 @@ // // JSONModel+networking.m // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index b98fae0e..6d179194 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -1,7 +1,7 @@ // // JSONKeyMapper.h // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 6c96fd5e..fa406743 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -1,7 +1,7 @@ // // JSONKeyMapper.m // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index 2497680a..54a053fa 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -1,7 +1,7 @@ // // JSONValueTransformer.h // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index e17cbba4..46385f8d 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -1,7 +1,7 @@ // // JSONValueTransformer.m // -// @version 1.4.1 +// @version 1.4.2 // @author Marin Todorov (http://www.underplot.com) and contributors // diff --git a/README.md b/README.md index a22c787b..bcee35d4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Magical Data Modeling Framework for JSON -### Version 1.4.1 +### Version 1.4.2 --- If you like JSONModel and use it, could you please: From 53278507077e5bbaad11b3ff3a9f955a44a16d36 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 16:42:53 +0100 Subject: [PATCH 126/171] Remove all broken/out of date links --- README.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/README.md b/README.md index bcee35d4..04a88fe4 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,6 @@ JSONModel is a library, which allows rapid creation of smart data models. You ca JSONModel automatically introspects your model classes and the structure of your JSON input and reduces drastically the amount of code you have to write. -[![](http://www.touch-code-magazine.com/img/json.png)](http://www.touch-code-magazine.com/img/json.png) - - ------------------------------------ Adding JSONModel to your project ==================================== @@ -106,19 +103,6 @@ And the good news is all you had to do is define the properties and their expect ------- #### Online tutorials - -Official website: [http://www.jsonmodel.com](http://www.jsonmodel.com) - -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/) - - * [Performance optimisation for working with JSON feeds via JSONModel](http://www.touch-code-magazine.com/performance-optimisation-for-working-with-json-feeds-via-jsonmodel/) - - * [How to make a YouTube app using MGBox and JSONModel](http://www.touch-code-magazine.com/how-to-make-a-youtube-app-using-mgbox-and-jsonmodel/) - ------- Examples ======= @@ -482,7 +466,7 @@ NSString* string = [pm toJSONString]; Misc ======= -Author: [Marin Todorov](http://www.touch-code-magazine.com) +Author: [Marin Todorov](http://www.underplot.com) Contributors: James Billingham, Christian Hoffmann, Mark Joslin, Julien Vignali, Symvaro GmbH, BB9z. Also everyone who did successful [pull requests](https://github.com/jsonmodel/jsonmodel/graphs/contributors). From 85a4de54d1ba5c17fc91c2d74e128cf600c49fe5 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 21:19:13 +0100 Subject: [PATCH 127/171] Simply built-in key mappers --- JSONModel/JSONModelTransformations/JSONKeyMapper.h | 8 ++++---- JSONModel/JSONModelTransformations/JSONKeyMapper.m | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 6d179194..0957eff3 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -56,6 +56,8 @@ typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); - (instancetype)initWithDictionary:(NSDictionary *)map DEPRECATED_MSG_ATTRIBUTE("use initWithModelToJSONDictionary:"); - (instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel modelToJSONBlock:(JSONModelKeyMapBlock)toJSON DEPRECATED_MSG_ATTRIBUTE("use initWithModelToJSONBlock:"); + (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions DEPRECATED_MSG_ATTRIBUTE("use baseMapper:withModelToJSONExceptions:"); ++ (instancetype)mapperFromUnderscoreCaseToCamelCase DEPRECATED_MSG_ATTRIBUTE("use mapperForSnakeCase:"); ++ (instancetype)mapperFromUpperCaseToLowerCase DEPRECATED_ATTRIBUTE; /** @name Name converters */ /** Block, which takes in a property name and converts it to the corresponding JSON key name */ @@ -87,11 +89,9 @@ typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); - (instancetype)initWithModelToJSONDictionary:(NSDictionary *)toJSON; /** - * Creates a JSONKeyMapper, which converts underscore_case to camelCase and vice versa. + * Given a camelCase model property, this mapper finds JSON keys using the snake_case equivalent. */ -+ (instancetype)mapperFromUnderscoreCaseToCamelCase; - -+ (instancetype)mapperFromUpperCaseToLowerCase; ++ (instancetype)mapperForSnakeCase; /** * Creates a JSONKeyMapper based on a built-in JSONKeyMapper, with specific exceptions. diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index fa406743..fd597433 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -111,7 +111,12 @@ -(NSString*)convertValue:(NSString*)value return _modelToJSONKeyBlock(value); } -+(instancetype)mapperFromUnderscoreCaseToCamelCase ++ (instancetype)mapperFromUnderscoreCaseToCamelCase +{ + return [self mapperForSnakeCase]; +} + ++ (instancetype)mapperForSnakeCase { JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) { From e5c2f8334e9bb33dac7c98b108fc046a637fd683 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 21:44:09 +0100 Subject: [PATCH 128/171] Handle `nil` values in key mapper caching --- .../JSONModelTransformations/JSONKeyMapper.m | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index fd597433..a67d76b1 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -45,25 +45,26 @@ -(instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON self = [self init]; if (self) { + __weak JSONKeyMapper *weakSelf = self; - __weak JSONKeyMapper* weakSelf = self; + _modelToJSONKeyBlock = ^NSString *(NSString *keyName) + { + __strong JSONKeyMapper *strongSelf = weakSelf; - _modelToJSONKeyBlock = [^NSString* (NSString* keyName) { + id cached = strongSelf.toJSONMap[keyName]; - __strong JSONKeyMapper *strongSelf = weakSelf; + if (cached == [NSNull null]) + return nil; - //try to return cached transformed key - if (strongSelf.toJSONMap[keyName]) { + if (cached) return strongSelf.toJSONMap[keyName]; - } - //try to convert the key, and store in the cache - NSString* result = toJSON(keyName); + NSString *result = toJSON(keyName); OSSpinLockLock(&strongSelf->_lock); - strongSelf.toJSONMap[keyName] = result; + strongSelf.toJSONMap[keyName] = result ? result : [NSNull null]; OSSpinLockUnlock(&strongSelf->_lock); - + return result; } copy]; From 3c8e7b6317e80bd95a41a5c9b65f8e5e74b417d7 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 21:46:04 +0100 Subject: [PATCH 129/171] Key mapper implementation cleanup --- .../JSONModelTransformations/JSONKeyMapper.m | 125 ++++++++---------- 1 file changed, 56 insertions(+), 69 deletions(-) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index a67d76b1..3a646ccd 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -24,52 +24,48 @@ @interface JSONKeyMapper() @implementation JSONKeyMapper --(instancetype)init +- (instancetype)init { - self = [super init]; - if (self) { - //initialization - self.toJSONMap = [NSMutableDictionary dictionary]; - } + if (!(self = [super init])) + return nil; + + _toJSONMap = [NSMutableDictionary new]; + return self; } --(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel - modelToJSONBlock:(JSONModelKeyMapBlock)toJSON +- (instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel modelToJSONBlock:(JSONModelKeyMapBlock)toJSON { return [self initWithModelToJSONBlock:toJSON]; } --(instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON +- (instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON { - self = [self init]; - - if (self) { - __weak JSONKeyMapper *weakSelf = self; + if (!(self = [self init])) + return nil; - _modelToJSONKeyBlock = ^NSString *(NSString *keyName) - { - __strong JSONKeyMapper *strongSelf = weakSelf; + __weak JSONKeyMapper *weakSelf = self; - id cached = strongSelf.toJSONMap[keyName]; + _modelToJSONKeyBlock = ^NSString *(NSString *keyName) + { + __strong JSONKeyMapper *strongSelf = weakSelf; - if (cached == [NSNull null]) - return nil; + id cached = strongSelf.toJSONMap[keyName]; - if (cached) - return strongSelf.toJSONMap[keyName]; + if (cached == [NSNull null]) + return nil; - NSString *result = toJSON(keyName); + if (cached) + return strongSelf.toJSONMap[keyName]; - OSSpinLockLock(&strongSelf->_lock); - strongSelf.toJSONMap[keyName] = result ? result : [NSNull null]; - OSSpinLockUnlock(&strongSelf->_lock); - - return result; + NSString *result = toJSON(keyName); - } copy]; + OSSpinLockLock(&strongSelf->_lock); + strongSelf.toJSONMap[keyName] = result ? result : [NSNull null]; + OSSpinLockUnlock(&strongSelf->_lock); - } + return result; + }; return self; } @@ -102,12 +98,12 @@ + (NSDictionary *)swapKeysAndValuesInDictionary:(NSDictionary *)dictionary return [NSDictionary dictionaryWithObjects:keys forKeys:values]; } --(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing +- (NSString *)convertValue:(NSString *)value isImportingToModel:(BOOL)importing { return [self convertValue:value]; } --(NSString*)convertValue:(NSString*)value +- (NSString *)convertValue:(NSString *)value { return _modelToJSONKeyBlock(value); } @@ -119,60 +115,51 @@ + (instancetype)mapperFromUnderscoreCaseToCamelCase + (instancetype)mapperForSnakeCase { - JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) { - - NSMutableString* result = [NSMutableString stringWithString:keyName]; - NSRange upperCharRange = [result rangeOfCharacterFromSet:[NSCharacterSet uppercaseLetterCharacterSet]]; - - //handle upper case chars - while ( upperCharRange.location!=NSNotFound) { + return [[self alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) + { + NSMutableString *result = [NSMutableString stringWithString:keyName]; + NSRange range; - NSString* lowerChar = [[result substringWithRange:upperCharRange] lowercaseString]; - [result replaceCharactersInRange:upperCharRange - withString:[NSString stringWithFormat:@"_%@", lowerChar]]; - upperCharRange = [result rangeOfCharacterFromSet:[NSCharacterSet uppercaseLetterCharacterSet]]; + // handle upper case chars + range = [result rangeOfCharacterFromSet:[NSCharacterSet uppercaseLetterCharacterSet]]; + while (range.location != NSNotFound) + { + NSString *lower = [result substringWithRange:range].lowercaseString; + [result replaceCharactersInRange:range withString:[NSString stringWithFormat:@"_%@", lower]]; + range = [result rangeOfCharacterFromSet:[NSCharacterSet uppercaseLetterCharacterSet]]; } - //handle numbers - NSRange digitsRange = [result rangeOfCharacterFromSet:[NSCharacterSet decimalDigitCharacterSet]]; - while ( digitsRange.location!=NSNotFound) { - - NSRange digitsRangeEnd = [result rangeOfString:@"\\D" options:NSRegularExpressionSearch range:NSMakeRange(digitsRange.location, result.length-digitsRange.location)]; - if (digitsRangeEnd.location == NSNotFound) { - //spands till the end of the key name - digitsRangeEnd = NSMakeRange(result.length, 1); - } + // handle numbers + range = [result rangeOfCharacterFromSet:[NSCharacterSet decimalDigitCharacterSet]]; + while (range.location != NSNotFound) + { + NSRange end = [result rangeOfString:@"\\D" options:NSRegularExpressionSearch range:NSMakeRange(range.location, result.length - range.location)]; - NSRange replaceRange = NSMakeRange(digitsRange.location, digitsRangeEnd.location - digitsRange.location); - NSString* digits = [result substringWithRange:replaceRange]; + // spans to the end of the key name + if (end.location == NSNotFound) + end = NSMakeRange(result.length, 1); + NSRange replaceRange = NSMakeRange(range.location, end.location - range.location); + NSString *digits = [result substringWithRange:replaceRange]; [result replaceCharactersInRange:replaceRange withString:[NSString stringWithFormat:@"_%@", digits]]; - digitsRange = [result rangeOfCharacterFromSet:[NSCharacterSet decimalDigitCharacterSet] options:kNilOptions range:NSMakeRange(digitsRangeEnd.location+1, result.length-digitsRangeEnd.location-1)]; + range = [result rangeOfCharacterFromSet:[NSCharacterSet decimalDigitCharacterSet] options:0 range:NSMakeRange(end.location + 1, result.length - end.location - 1)]; } return result; - }; - - return [[self alloc] initWithModelToJSONBlock:toJSON]; - + }]; } -+(instancetype)mapperFromUpperCaseToLowerCase ++ (instancetype)mapperFromUpperCaseToLowerCase { - JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) { - - NSString *uppercaseString = [keyName uppercaseString]; - - return uppercaseString; - }; - - return [[self alloc] initWithModelToJSONBlock:toJSON]; - + return [[self alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) + { + return keyName.uppercaseString; + }]; } + (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions { - NSDictionary *toJSON = [JSONKeyMapper swapKeysAndValuesInDictionary:exceptions]; + NSDictionary *toJSON = [JSONKeyMapper swapKeysAndValuesInDictionary:exceptions]; return [self baseMapper:baseKeyMapper withModelToJSONExceptions:toJSON]; } From 79b331b14d04377aec3d2b587d5ba7e3226990ba Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 21:58:26 +0100 Subject: [PATCH 130/171] Rewritten readme --- README.md | 598 ++++++++++++++++++++++++------------------------------ 1 file changed, 260 insertions(+), 338 deletions(-) diff --git a/README.md b/README.md index 04a88fe4..d5b24de8 100644 --- a/README.md +++ b/README.md @@ -1,486 +1,408 @@ -## Magical Data Modeling Framework for JSON - -### Version 1.4.2 - ---- -If you like JSONModel and use it, could you please: - - * star this repo - - * send me some feedback. Thanks! - ---- +# JSONModel - Magical Data Modeling Framework for JSON ![JSONModel for iOS and OSX](http://jsonmodel.com/img/jsonmodel_logolike.png) -JSONModel is a library, which allows rapid creation of smart data models. You can use it in your iOS or OSX apps. - -JSONModel automatically introspects your model classes and the structure of your JSON input and reduces drastically the amount of code you have to write. +JSONModel is a library, which allows rapid creation of smart data models. You +can use it in your iOS and macOS apps. ------------------------------------- -Adding JSONModel to your project -==================================== +JSONModel automatically introspects your model classes and the structure of your +JSON input and reduces drastically the amount of code you have to write. -#### Requirements +## Installation -* ARC only; iOS 5.0+ / OSX 10.7+ -* **SystemConfiguration.framework** +### CocoaPods -#### Get it as: 1) source files - -1. Download the JSONModel repository as a [zip file](https://github.com/jsonmodel/jsonmodel/archive/master.zip) or clone it -2. Copy the JSONModel sub-folder into your Xcode project -3. Link your app to SystemConfiguration.framework - -#### or 2) via CocoaPods - -In your project's **Podfile** add the JSONModel pod: +Add to your `Podfile`: ```ruby 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 +### Carthage -In your project's **Cartfile** add the JSONModel: +Add to your `Cartfile`: ```ruby github "jsonmodel/jsonmodel" ``` -#### Docs +### Manual -You can find the generated docs online at: [http://cocoadocs.org/docsets/JSONModel](http://cocoadocs.org/docsets/JSONModel) +0. download the JSONModel repository +0. copy the JSONModel sub-folder into your Xcode project +0. link your app to SystemConfiguration.framework ------------------------------------- -Basic usage -==================================== +## Docs -Consider you have a JSON like this: -```javascript -{ "id": "10", "country": "Germany", "dialCode": 49, "isInEurope": true } -``` +You can find the generated docs at: http://cocoadocs.org/docsets/JSONModel - * 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: +## Basic usage -```objective-c -#import "JSONModel.h" +Consider you have JSON like this: -@interface CountryModel : JSONModel +```json +{ "id": 10, "country": "Germany", "dialCode": 49, "isInEurope": true } +``` -@property (assign, nonatomic) int id; -@property (strong, nonatomic) NSString* country; -@property (strong, nonatomic) NSString* dialCode; -@property (assign, nonatomic) BOOL isInEurope; +- create a JSONModel subclass for your data model +- declare properties in your header file with the name of the JSON keys: +```objc +@interface CountryModel : JSONModel +@property (nonatomic) NSInteger id; +@property (nonatomic) NSString *country; +@property (nonatomic) NSString *dialCode; +@property (nonatomic) BOOL isInEurope; @end ``` -There's no need to do anything in the **.m** file. - - * Initialize your model with data: -```objective-c -#import "CountryModel.h" -... +There's no need to do anything in the implementation (`.m`) file. -NSString* json = (fetch here JSON from Internet) ... -NSError* err = nil; -CountryModel* country = [[CountryModel alloc] initWithString:json error:&err]; +- initialize your model with data: +```objc +NSError *error; +CountryModel *country = [[CountryModel alloc] initWithString:myJson error:&error]; ``` -If the validation of the JSON passes you have all the corresponding properties in your model populated from the JSON. JSONModel will also try to convert as much data to the types you expect, in the example above it will: +If the validation of the JSON passes. you have all the corresponding properties +in your model populated from the JSON. JSONModel will also try to convert as +much data to the types you expect. In the example above it will: -* 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 -* finally convert isInEurope to a BOOL for your BOOL property +- convert `id` from string (in the JSON) to an `int` for your class +- copy the `country` value +- convert `dialCode` from a number (in the JSON) to an `NSString` value +- copy the `isInEurope` value -And the good news is all you had to do is define the properties and their expected types. +All you have to do is define the properties and their expected types. -------- -#### Online tutorials +## Examples -------- -Examples -======= +### Automatic name based mapping -#### Automatic name based mapping - - - - - -
-
+```json
 {
-  "id": "123",
-  "name": "Product name",
-  "price": 12.95
+	"id": 123,
+	"name": "Product name",
+	"price": 12.95
 }
-
-
-
+```
+
+```objc
 @interface ProductModel : JSONModel
-@property (assign, nonatomic) int id;
-@property (strong, nonatomic) NSString* name;
-@property (assign, nonatomic) float price;
+@property (nonatomic) NSInteger id;
+@property (nonatomic) NSString *name;
+@property (nonatomic) float price;
 @end
+```
 
-@implementation ProductModel
-@end
-
-
- -#### Model cascading (models including other models) - - - - - -
-
+### Model cascading (models including other models)
+
+```json
 {
-  "order_id": 104,
-  "total_price": 13.45,
-  "product" : {
-    "id": "123",
-    "name": "Product name",
-    "price": 12.95
-  }
+	"orderId": 104,
+	"totalPrice": 13.45,
+	"product": {
+		"id": 123,
+		"name": "Product name",
+		"price": 12.95
+	}
 }
-
-
-
-@interface OrderModel : JSONModel
-@property (assign, nonatomic) int order_id;
-@property (assign, nonatomic) float total_price;
-@property (strong, nonatomic) ProductModel* product;
+```
+
+```objc
+@interface ProductModel : JSONModel
+@property (nonatomic) NSInteger id;
+@property (nonatomic) NSString *name;
+@property (nonatomic) float price;
 @end
 
-@implementation OrderModel
+@interface OrderModel : JSONModel
+@property (nonatomic) NSInteger orderId;
+@property (nonatomic) float totalPrice;
+@property (nonatomic) ProductModel *product;
 @end
-
-
- -#### Model collections - - - - - -
-
+```
+
+### Model collections
+
+```json
 {
-  "order_id": 104,
-  "total_price": 103.45,
-  "products" : [
-    {
-      "id": "123",
-      "name": "Product #1",
-      "price": 12.95
-    },
-    {
-      "id": "137",
-      "name": "Product #2",
-      "price": 82.95
-    }
-  ]
+	"orderId": 104,
+	"totalPrice": 103.45,
+	"products": [
+		{
+			"id": 123,
+			"name": "Product #1",
+			"price": 12.95
+		},
+		{
+			"id": 137,
+			"name": "Product #2",
+			"price": 82.95
+		}
+	]
 }
-
-
-
-@protocol ProductModel
-@end
+```
 
-@interface ProductModel : JSONModel
-@property (assign, nonatomic) int id;
-@property (strong, nonatomic) NSString* name;
-@property (assign, nonatomic) float price;
-@end
+```objc
+@protocol ProductModel;
 
-@implementation ProductModel
+@interface ProductModel : JSONModel
+@property (nonatomic) NSInteger id;
+@property (nonatomic) NSString *name;
+@property (nonatomic) float price;
 @end
 
 @interface OrderModel : JSONModel
-@property (assign, nonatomic) int order_id;
-@property (assign, nonatomic) float total_price;
-@property (strong, nonatomic) NSArray<ProductModel>* products;
+@property (nonatomic) NSInteger orderId;
+@property (nonatomic) float totalPrice;
+@property (nonatomic) NSArray  *products;
 @end
+```
 
-@implementation OrderModel
-@end
-
- -Note: the angle brackets after NSArray contain a protocol. This is not the same as the new Objective-C generics system. They are not mutually exclusive, but for JSONModel to work, the protocol must be in place. -
- -#### Key mapping - - - - - -
-
+Note: the angle brackets after `NSArray` contain a protocol. This is not the
+same as the Objective-C generics system. They are not mutually exclusive, but
+for JSONModel to work, the protocol must be in place.
+
+### Nested key mapping
+
+```json
 {
-  "order_id": 104,
-  "order_details" : [
-    {
-      "name": "Product#1",
-      "price": {
-        "usd": 12.95
-      }
-    }
-  ]
+	"orderId": 104,
+	"orderDetails": [
+		{
+			"name": "Product #1",
+			"price": {
+				"usd": 12.95
+			}
+		}
+	]
 }
-
-
-
+```
+
+```objc
 @interface OrderModel : JSONModel
-@property (assign, nonatomic) int id;
-@property (assign, nonatomic) float price;
-@property (strong, nonatomic) NSString* productName;
+@property (nonatomic) NSInteger id;
+@property (nonatomic) NSString *productName;
+@property (nonatomic) float price;
 @end
 
 @implementation OrderModel
 
-+(JSONKeyMapper*)keyMapper
++ (JSONKeyMapper *)keyMapper
 {
-  return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{
-    @"id": @"order_id",
-    @"productName": @"order_details.name",
-    @"price": @"order_details.price.usd"
-  }];
+	return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{
+		@"id": @"orderId",
+		@"productName": @"orderDetails.name",
+		@"price": @"orderDetails.price.usd"
+	}];
 }
 
 @end
-
-
- -#### Map automatically under_score case to camelCase - - - - - -
-
+```
+
+### Map automatically to snake_case
+
+```json
 {
-  "order_id": 104,
-  "order_product" : @"Product#1",
-  "order_price" : 12.95
+	"order_id": 104,
+	"order_product": "Product #1",
+	"order_price": 12.95
 }
-
-
-
-@interface OrderModel : JSONModel
-
-@property (assign, nonatomic) int orderId;
-@property (assign, nonatomic) float orderPrice;
-@property (strong, nonatomic) NSString* orderProduct;
+```
 
+```objc
+@interface OrderModel : JSONModel
+@property (nonatomic) NSInteger orderId;
+@property (nonatomic) NSString *orderProduct;
+@property (nonatomic) float orderPrice;
 @end
 
 @implementation OrderModel
 
-+(JSONKeyMapper*)keyMapper
++ (JSONKeyMapper *)keyMapper
 {
-  return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase];
+	return [JSONKeyMapper mapperForSnakeCase];
 }
 
 @end
-
-
- -#### Optional properties (i.e. can be missing or null) - - - - - -
-
+```
+
+### Optional properties (i.e. can be missing or null)
+
+```json
 {
-  "id": "123",
-  "name": null,
-  "price": 12.95
+	"id": 123,
+	"name": null,
+	"price": 12.95
 }
-
-
-
+```
+
+```objc
 @interface ProductModel : JSONModel
-@property (assign, nonatomic) int id;
-@property (strong, nonatomic) NSString<Optional>* name;
-@property (assign, nonatomic) float price;
-@property (strong, nonatomic) NSNumber<Optional>* uuid;
+@property (nonatomic) NSInteger id;
+@property (nonatomic) NSString  *name;
+@property (nonatomic) float price;
+@property (nonatomic) NSNumber  *uuid;
 @end
+```
 
-@implementation ProductModel
-@end
-
-
- -#### Ignored properties (i.e. JSONModel completely ignores them) - - - - - -
-
+### Ignored properties (i.e. JSONModel completely ignores them)
+
+```json
 {
-  "id": "123",
-  "name": null
+	"id": 123,
+	"name": null
 }
-
-
-
+```
+
+```objc
 @interface ProductModel : JSONModel
-@property (assign, nonatomic) int id;
-@property (strong, nonatomic) NSString<Ignore>* customProperty;
+@property (nonatomic) NSInteger id;
+@property (nonatomic) NSString  *customProperty;
 @end
+```
 
-@implementation ProductModel
-@end
-
-
+### Making scalar types optional + +```json +{ + "id": null +} +``` +```objc +@interface ProductModel : JSONModel +@property (nonatomic) NSInteger id; +@end -#### Make all model properties optional (avoid if possible) - - - - -
-
 @implementation ProductModel
-+(BOOL)propertyIsOptional:(NSString*)propertyName
+
++ (BOOL)propertyIsOptional:(NSString *)propertyName
 {
-  return YES;
-}
-@end
-
-
+ if ([propertyName isEqualToString:@"id"]) + return YES; -#### Export model to NSDictionary or to JSON text + return NO; +} -```objective-c +@end +``` -ProductModel* pm = [[ProductModel alloc] initWithString:jsonString error:nil]; -pm.name = @"Changed Name"; +### Export model to `NSDictionary` or JSON -//convert to dictionary -NSDictionary* dict = [pm toDictionary]; +```objc +ProductModel *pm = [ProductModel new]; +pm.name = @"Some Name"; -//convert to text -NSString* string = [pm toJSONString]; +// convert to dictionary +NSDictionary *dict = [pm toDictionary]; +// convert to json +NSString *string = [pm toJSONString]; ``` -#### Custom data transformers +### Custom data transformers -```objective-c +```objc +@interface JSONValueTransformer (CustomNSDate) +@end @implementation JSONValueTransformer (CustomTransformer) -- (NSDate *)NSDateFromNSString:(NSString*)string { - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - [formatter setDateFormat:APIDateFormat]; - return [formatter dateFromString:string]; +- (NSDate *)NSDateFromNSString:(NSString *)string +{ + NSDateFormatter *formatter = [NSDateFormatter new]; + formatter.dateFormat = APIDateFormat; + return [formatter dateFromString:string]; } -- (NSString *)JSONObjectFromNSDate:(NSDate *)date { - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - [formatter setDateFormat:APIDateFormat]; - return [formatter stringFromDate:date]; +- (NSString *)JSONObjectFromNSDate:(NSDate *)date +{ + NSDateFormatter *formatter = [NSDateFormatter new]; + formatter.dateFormat = APIDateFormat; + return [formatter stringFromDate:date]; } @end - ``` -#### Custom handling for specific properties - -```objective-c +### Custom getters/setters +```objc @interface ProductModel : JSONModel -@property (assign, nonatomic) int id; -@property (strong, nonatomic) NSString* name; -@property (assign, nonatomic) float price; -@property (strong, nonatomic) NSLocale *locale; +@property (nonatomic) NSInteger id; +@property (nonatomic) NSString *name; +@property (nonatomic) float price; +@property (nonatomic) NSLocale *locale; @end @implementation ProductModel -// Convert and assign the locale property -- (void)setLocaleWithNSString:(NSString*)string { - self.locale = [NSLocale localeWithLocaleIdentifier:string]; +- (void)setLocaleWithNSString:(NSString *)string +{ + self.locale = [NSLocale localeWithLocaleIdentifier:string]; } -- (NSString *)JSONObjectForLocale { - return self.locale.localeIdentifier; +- (void)setLocaleWithNSDictionary:(NSDictionary *)dictionary +{ + self.locale = [NSLocale localeWithLocaleIdentifier:dictionary[@"identifier"]]; } -@end +- (NSString *)JSONObjectForLocale +{ + return self.locale.localeIdentifier; +} +@end ``` -#### Custom JSON validation +### Custom JSON validation -```objective-c +```objc @interface ProductModel : JSONModel -@property (assign, nonatomic) int id; -@property (strong, nonatomic) NSString* name; -@property (assign, nonatomic) float price; -@property (strong, nonatomic) NSLocale *locale; -@property (strong, nonatomic) NSNumber *minNameLength; +@property (nonatomic) NSInteger id; +@property (nonatomic) NSString *name; +@property (nonatomic) float price; +@property (nonatomic) NSLocale *locale; +@property (nonatomic) NSNumber *minNameLength; @end @implementation ProductModel -- (BOOL)validate:(NSError *__autoreleasing *)error { - BOOL valid = [super validate:error]; +- (BOOL)validate:(NSError **)error +{ + if (![super validate:error]) + return NO; - if (self.name.length < self.minNameLength.integerValue) { - *error = [NSError errorWithDomain:@"me.mycompany.com" code:1 userInfo:nil]; - valid = NO; - } + if (self.name.length < self.minNameLength.integerValue) + { + *error = [NSError errorWithDomain:@"me.mycompany.com" code:1 userInfo:nil]; + return NO; + } - return valid; + return YES; } @end - ``` -* error handling -* custom data validation -* automatic compare and equality features -* and more. -------- - -Misc -======= +## Misc Author: [Marin Todorov](http://www.underplot.com) -Contributors: James Billingham, Christian Hoffmann, Mark Joslin, Julien Vignali, Symvaro GmbH, BB9z. -Also everyone who did successful [pull requests](https://github.com/jsonmodel/jsonmodel/graphs/contributors). +Contributors: James Billingham, Christian Hoffmann, Mark Joslin, Julien Vignali, +Symvaro GmbH, BB9z. Also everyone who did successful +[pull requests](https://github.com/jsonmodel/jsonmodel/graphs/contributors). -Change log : [https://github.com/jsonmodel/jsonmodel/blob/master/CHANGELOG.md](https://github.com/jsonmodel/jsonmodel/blob/master/CHANGELOG.md) +Change log: [CHANGELOG.md](CHANGELOG.md) -Utility to generate JSONModel classes from JSON data: https://github.com/dofork/json2object +## License -------- -#### License This code is distributed under the terms and conditions of the MIT license. -------- -#### Contribution guidelines - -**NB!** If you are fixing a bug you discovered, please add also a unit test so I know how exactly to reproduce the bug before merging. +## Contributing +See [CONTRIBUTING.md](CONTRIBUTING.md). From f772ecb207f8cde9f4ce8f2f836abf74ac04e6ec Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 22:28:56 +0100 Subject: [PATCH 131/171] Further docs improvements --- CONTRIBUTING.md | 86 +++++++++++++++++++++++++++++++++++++------------ README.md | 16 +++------ 2 files changed, 69 insertions(+), 33 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4aaabb0f..684ec957 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,34 +1,78 @@ -Since JSONModel is becoming more and more popular I need to set some ground rules. +# Contribution Rules -Reporting an issue on GitHub -==================================== +## General Help/Support ------------------------------------- - -#### What to report? +If you're struggling to use JSONModel, the following options are available to +you: -Be sure you are reporting either 1) a bug you have discovered or 2) a feature request. +- read the [readme](README.md) in detail +- check out [StackOverflow](https://stackoverflow.com/questions/tagged/jsonmodel) -People have been abusing the GitHub issues system for a while to ask all kind of vague questions and I’ve been helping some, but to be honest I just don’t have the time to clarify with the reporting what they need and try to find a solution for each and every case. +You should not open an issue on GitHub if you are simply struggling to +understand JSONModel. Issues are only for bugs and feature requests. -Long story short - make sure you are reporting something and not just asking how this or that is done. +## Issues - -#### How to report a problem/request a feature? +### Bugs -1. Describe what you expected to happen. -2. What actually happened instead? -3. Add the piece of JSON relevant to the problem -4. Your Objective-C model code. +First and foremost - you must be running the latest version of JSONModel. No +support will be offered if you are running anything other than the latest. +Even if you think you're on the latest version, please quickly check for any new +releases. -I need to be able to **reproduce the problem** in order to fix it. +First, create the smallest/simplest possible example which exhibits the bug. -Of course the best would be if you already have fixed the problem yourself, then create a pull request. If you do - before you send a pull request run ALL TEST CASES on both IOS and OSX! Add a test case for what you have fixed, since it obviously haven’t been covered with one if there was a problem to be fixed. +Then open an issue providing the following code: - -#### In case you need help with your code/models … +- the JSON you're (de)serializing +- your model class(es) - both interface and implementation +- the code you're running -In case you **do need help** with your code: your best start is to **read the repo README**, many people don’t and it really is the best place to find many answers. +Then explain: -In case the README does not answer your question, try StackOverflow. There’s a **hashtag jsonmodel** - search the questions [answered so far](http://stackoverflow.com/questions/tagged/jsonmodel), and if you don’t find a solution create a new question and give it the tag **jsonmodel**. +- what you expected to happen +- what actually happened +- what debugging steps you have taken +- any additional context/details +Remember: if we can't reproduce the problem, we can't fix it. If we aren't able +to replicate, your issue will be closed. + +Please also consider opening a pull request with the fix, if you are able. + +### Improvements + +Feel free to open an issue requesting a change. Provide the following details: + +- what JSONModel should do +- why this would be helpful (use cases, etc.) +- why the existing code is insufficient +- an example of how it could work + +The maintainers are quite opinionated about what JSONModel should/shouldn't do, +so be aware that we may not agree with you. + +Assuming we agree on a way forward for the change, please consider opening a +pull request with the implementation. + +## Pull Requests + +### Bugs + +Before fixing the bug, you must write a unit test which fails, but should pass. +After that, write the relevant code to fix the bug. Ensure that all tests pass +on **all** platforms. + +Then please open a pull request with the changes. If you haven't added unit +any tests to cover the bug, or the tests don't pass, your PR _will not_ be +merged. + +Please also provide the same details as above. + +### Improvements + +For any complex changes, please open an issue to discuss the changes before +implementing them. If you implement before discussion, there is a chance that +we will disagree and decide not to merge. + +Please also provide the same details as above. diff --git a/README.md b/README.md index d5b24de8..80ff133d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ can use it in your iOS and macOS apps. JSONModel automatically introspects your model classes and the structure of your JSON input and reduces drastically the amount of code you have to write. +See [CHANGELOG.md] file for details on changes. + ## Installation ### CocoaPods @@ -389,20 +391,10 @@ NSString *string = [pm toJSONString]; @end ``` -## Misc - -Author: [Marin Todorov](http://www.underplot.com) - -Contributors: James Billingham, Christian Hoffmann, Mark Joslin, Julien Vignali, -Symvaro GmbH, BB9z. Also everyone who did successful -[pull requests](https://github.com/jsonmodel/jsonmodel/graphs/contributors). - -Change log: [CHANGELOG.md](CHANGELOG.md) - ## License -This code is distributed under the terms and conditions of the MIT license. +MIT licensed - see [LICENSE](LICENSE) file ## Contributing -See [CONTRIBUTING.md](CONTRIBUTING.md). +We love pull requests! See [CONTRIBUTING.md](CONTRIBUTING.md) file for full details. From 2ed34eec9aaeecede11f7502b4d44ca081fe4cbc Mon Sep 17 00:00:00 2001 From: James Billingham Date: Sun, 11 Sep 2016 22:29:05 +0100 Subject: [PATCH 132/171] Allow for longer on the concurrency test --- Examples/Tests/ConcurrentTests.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Examples/Tests/ConcurrentTests.m b/Examples/Tests/ConcurrentTests.m index 542ef5d5..e4120604 100644 --- a/Examples/Tests/ConcurrentTests.m +++ b/Examples/Tests/ConcurrentTests.m @@ -23,9 +23,9 @@ - (void)setUp { [super setUp]; NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../github-iphone.json"]; NSData* jsonData = [NSData dataWithContentsOfFile:filePath]; - + XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); - + NSError* err; self.jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:&err]; } @@ -39,9 +39,9 @@ - (void)testConcurrentMapping { NSOperationQueue *queue = [[NSOperationQueue alloc] init]; queue.maxConcurrentOperationCount = 50; [queue setSuspended:YES]; - + XCTestExpectation *expectation = [self expectationWithDescription:@"Wait for queue...."]; - + __block int count = 0; for (int i = 0; i < 100; i++) { [queue addOperationWithBlock:^{ @@ -54,7 +54,7 @@ - (void)testConcurrentMapping { }]; } [queue setSuspended:NO]; - [self waitForExpectationsWithTimeout:10 handler:nil]; + [self waitForExpectationsWithTimeout:30 handler:nil]; } @end From 6c8b6b5fe30c102bf8159c6b62542fbb6f06ac3f Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 09:28:21 +0100 Subject: [PATCH 133/171] Clean up file headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - no need for copyright notice - it’s in the LICENSE file - having a version number in every file makes it painful to do releases - author info is in the README & contributors info - add ‘project name’ line as per Xcode convention --- JSONModel/JSONModel/JSONModel.h | 13 +------------ JSONModel/JSONModel/JSONModel.m | 13 +------------ JSONModel/JSONModel/JSONModelClassProperty.h | 13 +------------ JSONModel/JSONModel/JSONModelClassProperty.m | 13 +------------ JSONModel/JSONModel/JSONModelError.h | 13 +------------ JSONModel/JSONModel/JSONModelError.m | 13 +------------ JSONModel/JSONModelLib.h | 13 +------------ JSONModel/JSONModelNetworking/JSONAPI.h | 12 +----------- JSONModel/JSONModelNetworking/JSONAPI.m | 13 +------------ JSONModel/JSONModelNetworking/JSONHTTPClient.h | 12 +----------- JSONModel/JSONModelNetworking/JSONHTTPClient.m | 13 +------------ .../JSONModelNetworking/JSONModel+networking.h | 12 +----------- .../JSONModelNetworking/JSONModel+networking.m | 13 +------------ JSONModel/JSONModelTransformations/JSONKeyMapper.h | 13 +------------ JSONModel/JSONModelTransformations/JSONKeyMapper.m | 13 +------------ .../JSONModelTransformations/JSONValueTransformer.h | 13 +------------ .../JSONModelTransformations/JSONValueTransformer.m | 13 +------------ 17 files changed, 17 insertions(+), 201 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index d045230f..ca673bcc 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -1,18 +1,7 @@ // // JSONModel.h +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index dc717701..3e1e0ff1 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1,18 +1,7 @@ // // JSONModel.m +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #if !__has_feature(objc_arc) #error The JSONMOdel framework is ARC only, you can enable ARC on per file basis. diff --git a/JSONModel/JSONModel/JSONModelClassProperty.h b/JSONModel/JSONModel/JSONModelClassProperty.h index 1813ffd5..67405abf 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -1,18 +1,7 @@ // // JSONModelClassProperty.h +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index aee39098..67fe4e34 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -1,18 +1,7 @@ // // JSONModelClassProperty.m +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import "JSONModelClassProperty.h" diff --git a/JSONModel/JSONModel/JSONModelError.h b/JSONModel/JSONModel/JSONModelError.h index 419353cc..266e6ccc 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -1,18 +1,7 @@ // // JSONModelError.h +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import diff --git a/JSONModel/JSONModel/JSONModelError.m b/JSONModel/JSONModel/JSONModelError.m index 89f5f7f9..f357e707 100644 --- a/JSONModel/JSONModel/JSONModelError.m +++ b/JSONModel/JSONModel/JSONModelError.m @@ -1,18 +1,7 @@ // // JSONModelError.m +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import "JSONModelError.h" diff --git a/JSONModel/JSONModelLib.h b/JSONModel/JSONModelLib.h index 13e5eb40..564ca46e 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -1,18 +1,7 @@ // // JSONModelLib.h +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import diff --git a/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index 5fec6b91..30a8743a 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.h @@ -1,16 +1,6 @@ // // JSONAPI.h -// -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. +// JSONModel // #import diff --git a/JSONModel/JSONModelNetworking/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index 0af7a1e4..a7e33262 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -1,18 +1,7 @@ // // JSONAPI.m +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import "JSONAPI.h" diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index f76447ee..0f47cef9 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -1,16 +1,6 @@ // // JSONModelHTTPClient.h -// -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. +// JSONModel // #import "JSONModel.h" diff --git a/JSONModel/JSONModelNetworking/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index 5e6ed87b..6c72dc5b 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -1,18 +1,7 @@ // // JSONModelHTTPClient.m +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import "JSONHTTPClient.h" diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index bbd73d46..444f26d9 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -1,16 +1,6 @@ // // JSONModel+networking.h -// -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. +// JSONModel // #import "JSONModel.h" diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index d90b8a1d..b3e0aa42 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -1,18 +1,7 @@ // // JSONModel+networking.m +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import "JSONModel+networking.h" #import "JSONHTTPClient.h" diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 0957eff3..7ba09672 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -1,18 +1,7 @@ // // JSONKeyMapper.h +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 3a646ccd..15bda34c 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -1,18 +1,7 @@ // // JSONKeyMapper.m +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import "JSONKeyMapper.h" #import diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index 54a053fa..7dd585c9 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -1,18 +1,7 @@ // // JSONValueTransformer.h +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 46385f8d..8ffc00e5 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -1,18 +1,7 @@ // // JSONValueTransformer.m +// JSONModel // -// @version 1.4.2 -// @author Marin Todorov (http://www.underplot.com) and contributors -// - -// 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. -// - #import "JSONValueTransformer.h" From 508abd7bc1c2bb0bf6ab91e867ba3d16466e8dc0 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 09:48:23 +0100 Subject: [PATCH 134/171] Handle deprecated methods in tests --- Examples/Tests/KeyMappingTests.m | 8 ++++---- Examples/Tests/Models/Headers/RenamedPropertyModel.h | 2 +- .../Models/Implementations/GitHubRepoModelForUSMapper.m | 2 +- .../Models/Implementations/ModelForUpperCaseMapper.m | 2 ++ .../Tests/Models/Implementations/RenamedPropertyModel.m | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Examples/Tests/KeyMappingTests.m b/Examples/Tests/KeyMappingTests.m index b2a1ba67..25741572 100644 --- a/Examples/Tests/KeyMappingTests.m +++ b/Examples/Tests/KeyMappingTests.m @@ -358,20 +358,20 @@ -(void)testUsingBothGlobalAndCustomMappers - (void)testExceptionsMapper { - NSString *jsonString = @"{\"ID\":\"12345\",\"NAME\":\"TEST\"}"; + NSString *jsonString = @"{\"id\":\"12345\",\"prop_name\":\"TEST\"}"; RenamedPropertyModel *m = [[RenamedPropertyModel alloc] initWithString:jsonString error:nil]; XCTAssertNotNil(m, @"Could not initialize model from string"); // import XCTAssertEqualObjects(m.identifier, @"12345", @"identifier does not equal '12345'"); - XCTAssertEqualObjects(m.name, @"TEST", @"name does not equal 'TEST'"); + XCTAssertEqualObjects(m.propName, @"TEST", @"propName does not equal 'TEST'"); // export NSDictionary *dict = [m toDictionary]; XCTAssertNotNil(dict, @"toDictionary failed"); - XCTAssertEqualObjects(dict[@"ID"], m.identifier, @"ID does not equal '12345'"); - XCTAssertEqualObjects(dict[@"NAME"], m.name, @"NAME does not equal 'TEST'"); + XCTAssertEqualObjects(dict[@"id"], m.identifier, @"id does not equal '12345'"); + XCTAssertEqualObjects(dict[@"prop_name"], m.propName, @"prop_name does not equal 'TEST'"); } @end diff --git a/Examples/Tests/Models/Headers/RenamedPropertyModel.h b/Examples/Tests/Models/Headers/RenamedPropertyModel.h index 6763cba3..2d8aad4b 100644 --- a/Examples/Tests/Models/Headers/RenamedPropertyModel.h +++ b/Examples/Tests/Models/Headers/RenamedPropertyModel.h @@ -11,6 +11,6 @@ @interface RenamedPropertyModel : JSONModel @property (copy, nonatomic) NSString *identifier; -@property (copy, nonatomic) NSString *name; +@property (copy, nonatomic) NSString *propName; @end diff --git a/Examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m b/Examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m index 5cf157a3..dc940f12 100644 --- a/Examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m +++ b/Examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m @@ -12,7 +12,7 @@ @implementation GitHubRepoModelForUSMapper +(JSONKeyMapper*)keyMapper { - return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase]; + return [JSONKeyMapper mapperForSnakeCase]; } @end diff --git a/Examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m b/Examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m index eada8cc5..8bf3eb14 100644 --- a/Examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m +++ b/Examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m @@ -5,6 +5,8 @@ #import "ModelForUpperCaseMapper.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + @implementation ModelForUpperCaseMapper +(JSONKeyMapper*)keyMapper diff --git a/Examples/Tests/Models/Implementations/RenamedPropertyModel.m b/Examples/Tests/Models/Implementations/RenamedPropertyModel.m index 86c82480..f353e2e9 100644 --- a/Examples/Tests/Models/Implementations/RenamedPropertyModel.m +++ b/Examples/Tests/Models/Implementations/RenamedPropertyModel.m @@ -12,8 +12,8 @@ @implementation RenamedPropertyModel + (JSONKeyMapper *)keyMapper { - JSONKeyMapper *base = [JSONKeyMapper mapperFromUpperCaseToLowerCase]; - return [JSONKeyMapper baseMapper:base withModelToJSONExceptions:@{@"identifier": @"ID"}]; + JSONKeyMapper *base = [JSONKeyMapper mapperForSnakeCase]; + return [JSONKeyMapper baseMapper:base withModelToJSONExceptions:@{@"identifier": @"id"}]; } @end From df29dd3a7e15f01b26054665e3944d3ed9b9bea5 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 09:48:32 +0100 Subject: [PATCH 135/171] v1.5.0 --- CHANGELOG.md | 5 +++++ JSONModel.podspec | 2 +- .../xcshareddata/xcschemes/JSONModel.xcscheme | 2 +- JSONModel/Info.plist | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdb4eda1..aca3a537 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v1.5.0 (2016-09-12) + +- deprecated `mapperFromUpperCaseToLowerCase` (not replaced - it didn't really make sense) +- renamed `mapperFromUnderscoreCaseToCamelCase` to `mapperForSnakeCase` for clarity + ## v1.4.2 (2016-09-11) - change use of `performSelector` to [a safer implementation](https://stackoverflow.com/a/20058585/743957) diff --git a/JSONModel.podspec b/JSONModel.podspec index 5e1d5428..523dde44 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.4.2" + s.version = "1.5.0" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme index 3c4fe96a..a561e844 100644 --- a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -1,7 +1,7 @@ + version = "1.5.0"> diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index 222de541..beed82a5 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.4.2 + 1.5.0 CFBundleSignature ???? CFBundleVersion From f68cfacc54f672aab28bdc8e56b8b557187ad66e Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 09:50:42 +0100 Subject: [PATCH 136/171] Added extra details to v1.5.0 changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aca3a537..d87bc6d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## v1.5.0 (2016-09-12) +Minor version bump due to deprecations. No breaking changes. + +- lots of improvements to readme/contribution docs - deprecated `mapperFromUpperCaseToLowerCase` (not replaced - it didn't really make sense) - renamed `mapperFromUnderscoreCaseToCamelCase` to `mapperForSnakeCase` for clarity From 5ec506f6ac6a5cf8e70c0bbd78267bc9bd606ea7 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 09:54:24 +0100 Subject: [PATCH 137/171] Disable email notifications --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e2e3aba2..a96872c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +notifications: + email: false language: objective-c osx_image: xcode8 before_install: @@ -5,7 +7,7 @@ before_install: - pod install script: - set -o pipefail - - xcodebuild $XCODE_ACTION + - xcodebuild $XCODE_ACTION -workspace "Examples.xcworkspace" -scheme "$TRAVIS_XCODE_SCHEME" -sdk "$XCODE_SDK" From 822221e1f85428581d0b5c0f4420d724566ab8c8 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 09:55:41 +0100 Subject: [PATCH 138/171] Remove demos Unintentionally committed a while ago --- Demos/iOS.xcodeproj/project.pbxproj | 1022 ---------------- .../contents.xcworkspacedata | 7 - Demos/iOS/AppDelegate.h | 17 - Demos/iOS/AppDelegate.m | 55 - Demos/iOS/Default-568h@2x.png | Bin 18594 -> 0 bytes Demos/iOS/Default.png | Bin 6540 -> 0 bytes Demos/iOS/Default@2x.png | Bin 16107 -> 0 bytes Demos/iOS/GitHubUserModel.h | 19 - Demos/iOS/GitHubUserModel.m | 13 - Demos/iOS/GitHubViewController.h | 13 - Demos/iOS/GitHubViewController.m | 95 -- Demos/iOS/GitHubViewController.xib | 24 - Demos/iOS/HUD.h | 45 - Demos/iOS/HUD.m | 201 ---- Demos/iOS/Info.plist | 48 - Demos/iOS/KivaFeed.h | 16 - Demos/iOS/KivaFeed.m | 13 - Demos/iOS/KivaViewController.h | 13 - Demos/iOS/KivaViewController.m | 111 -- Demos/iOS/KivaViewController.xib | 37 - Demos/iOS/KivaViewControllerNetworking.h | 13 - Demos/iOS/KivaViewControllerNetworking.m | 92 -- Demos/iOS/KivaViewControllerNetworking.xib | 37 - Demos/iOS/LoanModel.h | 22 - Demos/iOS/LoanModel.m | 13 - Demos/iOS/LocationModel.h | 16 - Demos/iOS/LocationModel.m | 19 - Demos/iOS/MBProgressHUD.h | 521 --------- Demos/iOS/MBProgressHUD.m | 1033 ----------------- Demos/iOS/MasterViewController.h | 12 - Demos/iOS/MasterViewController.m | 95 -- Demos/iOS/MyDataModel.h | 16 - Demos/iOS/MyDataModel.m | 13 - Demos/iOS/StorageViewController.h | 13 - Demos/iOS/StorageViewController.m | 67 -- Demos/iOS/StorageViewController.xib | 72 -- Demos/iOS/btnCheck.png | Bin 1334 -> 0 bytes Demos/iOS/btnCheck@2x.png | Bin 3252 -> 0 bytes Demos/iOS/en.lproj/InfoPlist.strings | 2 - Demos/iOS/en.lproj/MasterViewController.xib | 31 - Demos/iOS/main.m | 18 - Demos/macOS.xcodeproj/project.pbxproj | 953 --------------- .../contents.xcworkspacedata | 7 - Demos/macOS/AppDelegate.h | 15 - Demos/macOS/AppDelegate.m | 35 - Demos/macOS/Info.plist | 34 - Demos/macOS/KivaFeed.h | 16 - Demos/macOS/KivaFeed.m | 13 - Demos/macOS/LoanModel.h | 22 - Demos/macOS/LoanModel.m | 13 - Demos/macOS/LocationModel.h | 16 - Demos/macOS/LocationModel.m | 19 - Demos/macOS/ViewController.h | 13 - Demos/macOS/ViewController.m | 174 --- Demos/macOS/ViewController.xib | 131 --- Demos/macOS/en.lproj/Credits.rtf | 36 - Demos/macOS/en.lproj/InfoPlist.strings | 2 - Demos/macOS/en.lproj/MainMenu.xib | 667 ----------- Demos/macOS/main.m | 14 - 59 files changed, 6034 deletions(-) delete mode 100644 Demos/iOS.xcodeproj/project.pbxproj delete mode 100644 Demos/iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Demos/iOS/AppDelegate.h delete mode 100644 Demos/iOS/AppDelegate.m delete mode 100644 Demos/iOS/Default-568h@2x.png delete mode 100644 Demos/iOS/Default.png delete mode 100644 Demos/iOS/Default@2x.png delete mode 100644 Demos/iOS/GitHubUserModel.h delete mode 100644 Demos/iOS/GitHubUserModel.m delete mode 100644 Demos/iOS/GitHubViewController.h delete mode 100644 Demos/iOS/GitHubViewController.m delete mode 100644 Demos/iOS/GitHubViewController.xib delete mode 100644 Demos/iOS/HUD.h delete mode 100644 Demos/iOS/HUD.m delete mode 100644 Demos/iOS/Info.plist delete mode 100644 Demos/iOS/KivaFeed.h delete mode 100644 Demos/iOS/KivaFeed.m delete mode 100644 Demos/iOS/KivaViewController.h delete mode 100644 Demos/iOS/KivaViewController.m delete mode 100644 Demos/iOS/KivaViewController.xib delete mode 100644 Demos/iOS/KivaViewControllerNetworking.h delete mode 100644 Demos/iOS/KivaViewControllerNetworking.m delete mode 100644 Demos/iOS/KivaViewControllerNetworking.xib delete mode 100644 Demos/iOS/LoanModel.h delete mode 100644 Demos/iOS/LoanModel.m delete mode 100644 Demos/iOS/LocationModel.h delete mode 100644 Demos/iOS/LocationModel.m delete mode 100755 Demos/iOS/MBProgressHUD.h delete mode 100755 Demos/iOS/MBProgressHUD.m delete mode 100644 Demos/iOS/MasterViewController.h delete mode 100644 Demos/iOS/MasterViewController.m delete mode 100644 Demos/iOS/MyDataModel.h delete mode 100644 Demos/iOS/MyDataModel.m delete mode 100644 Demos/iOS/StorageViewController.h delete mode 100644 Demos/iOS/StorageViewController.m delete mode 100644 Demos/iOS/StorageViewController.xib delete mode 100644 Demos/iOS/btnCheck.png delete mode 100644 Demos/iOS/btnCheck@2x.png delete mode 100644 Demos/iOS/en.lproj/InfoPlist.strings delete mode 100644 Demos/iOS/en.lproj/MasterViewController.xib delete mode 100644 Demos/iOS/main.m delete mode 100644 Demos/macOS.xcodeproj/project.pbxproj delete mode 100644 Demos/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Demos/macOS/AppDelegate.h delete mode 100644 Demos/macOS/AppDelegate.m delete mode 100644 Demos/macOS/Info.plist delete mode 100644 Demos/macOS/KivaFeed.h delete mode 100644 Demos/macOS/KivaFeed.m delete mode 100644 Demos/macOS/LoanModel.h delete mode 100644 Demos/macOS/LoanModel.m delete mode 100644 Demos/macOS/LocationModel.h delete mode 100644 Demos/macOS/LocationModel.m delete mode 100644 Demos/macOS/ViewController.h delete mode 100644 Demos/macOS/ViewController.m delete mode 100644 Demos/macOS/ViewController.xib delete mode 100644 Demos/macOS/en.lproj/Credits.rtf delete mode 100644 Demos/macOS/en.lproj/InfoPlist.strings delete mode 100644 Demos/macOS/en.lproj/MainMenu.xib delete mode 100644 Demos/macOS/main.m diff --git a/Demos/iOS.xcodeproj/project.pbxproj b/Demos/iOS.xcodeproj/project.pbxproj deleted file mode 100644 index 63887d57..00000000 --- a/Demos/iOS.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1022 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1AE9CA901C21F47600B8F5C1 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */; }; - 358FD078D3C0D56C77ACD770 /* ExtremeNestingModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */; }; - 358FD179E0B41C47C67713B5 /* InteractionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */; }; - 358FD61804BD21F41035348E /* ExtremeNestingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */; }; - 358FD640BFEAB00349FBBA4A /* DrugModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 358FD25356988AC33EA6A935 /* DrugModel.m */; }; - 4A50001D19C5DCCF00C161A0 /* InitWithDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */; }; - 69286BDA17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */; }; - 69286BDB17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */; }; - 697852FD17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */; }; - 697852FF17D93547006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */; }; - 9C0D0240166E6BBF001EA645 /* KivaViewControllerNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C0D023E166E6BBF001EA645 /* KivaViewControllerNetworking.m */; }; - 9C0D0241166E6BBF001EA645 /* KivaViewControllerNetworking.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9C0D023F166E6BBF001EA645 /* KivaViewControllerNetworking.xib */; }; - 9C28A14118B2A4D2002AEC1E /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C55AF0618903127004EBD8A /* CoreData.framework */; }; - 9C55AF0718903127004EBD8A /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C55AF0618903127004EBD8A /* CoreData.framework */; }; - 9C55AF0E18903300004EBD8A /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C5176E977C007B7DFA /* ReposModel.m */; }; - 9C55AF0F189033AE004EBD8A /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */; }; - 9C66DFA8168CEF420015CCDF /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF60168CEF420015CCDF /* ArrayTests.m */; }; - 9C66DFA9168CEF420015CCDF /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF62168CEF420015CCDF /* BuiltInConversionsTests.m */; }; - 9C66DFAB168CEF420015CCDF /* CustomPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF66168CEF420015CCDF /* CustomPropsTests.m */; }; - 9C66DFAC168CEF420015CCDF /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF68168CEF420015CCDF /* colors.json */; }; - 9C66DFAD168CEF420015CCDF /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF69168CEF420015CCDF /* converts.json */; }; - 9C66DFAE168CEF420015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6A168CEF420015CCDF /* github-iphone.json */; }; - 9C66DFAF168CEF420015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6B168CEF420015CCDF /* jsonTypes.json */; }; - 9C66DFB0168CEF420015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6C168CEF420015CCDF /* nestedData.json */; }; - 9C66DFB1168CEF420015CCDF /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */; }; - 9C66DFB2168CEF420015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6E168CEF420015CCDF /* post.json */; }; - 9C66DFB3168CEF420015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6F168CEF420015CCDF /* primitives.json */; }; - 9C66DFB4168CEF420015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */; }; - 9C66DFB5168CEF420015CCDF /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF71168CEF420015CCDF /* withOptProp.json */; }; - 9C66DFB6168CEF420015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF72168CEF420015CCDF /* withoutOptProp.json */; }; - 9C66DFB7168CEF420015CCDF /* IdPropertyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF74168CEF420015CCDF /* IdPropertyTests.m */; }; - 9C66DFB8168CEF420015CCDF /* JSONTypesModelWithValidation1.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF76168CEF420015CCDF /* JSONTypesModelWithValidation1.m */; }; - 9C66DFB9168CEF420015CCDF /* JSONTypesModelWithValidation2.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF78168CEF420015CCDF /* JSONTypesModelWithValidation2.m */; }; - 9C66DFBA168CEF420015CCDF /* JSONTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF7A168CEF420015CCDF /* JSONTypesReadTests.m */; }; - 9C66DFBB168CEF420015CCDF /* JSONValueTransformer+UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF7C168CEF420015CCDF /* JSONValueTransformer+UIColor.m */; }; - 9C66DFBC168CEF420015CCDF /* KeyMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF7E168CEF420015CCDF /* KeyMappingTests.m */; }; - 9C66DFBD168CEF420015CCDF /* NestedModelsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF80168CEF420015CCDF /* NestedModelsTests.m */; }; - 9C66DFBE168CEF420015CCDF /* OptionalPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF82168CEF420015CCDF /* OptionalPropertiesTests.m */; }; - 9C66DFBF168CEF420015CCDF /* PersistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF84168CEF420015CCDF /* PersistTests.m */; }; - 9C66DFC0168CEF420015CCDF /* PrimitiveTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF86168CEF420015CCDF /* PrimitiveTypesReadTests.m */; }; - 9C66DFC1168CEF420015CCDF /* SimpleDataErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DF88168CEF420015CCDF /* SimpleDataErrorTests.m */; }; - 9C66DFD0168CEF420015CCDF /* ValidationTestSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */; }; - 9C66DFD1168CEF530015CCDF /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF68168CEF420015CCDF /* colors.json */; }; - 9C66DFD2168CEF530015CCDF /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF69168CEF420015CCDF /* converts.json */; }; - 9C66DFD3168CEF530015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6A168CEF420015CCDF /* github-iphone.json */; }; - 9C66DFD4168CEF530015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6B168CEF420015CCDF /* jsonTypes.json */; }; - 9C66DFD5168CEF530015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6C168CEF420015CCDF /* nestedData.json */; }; - 9C66DFD6168CEF530015CCDF /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */; }; - 9C66DFD7168CEF530015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6E168CEF420015CCDF /* post.json */; }; - 9C66DFD8168CEF530015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF6F168CEF420015CCDF /* primitives.json */; }; - 9C66DFD9168CEF530015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */; }; - 9C66DFDA168CEF530015CCDF /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF71168CEF420015CCDF /* withOptProp.json */; }; - 9C66DFDB168CEF530015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C66DF72168CEF420015CCDF /* withoutOptProp.json */; }; - 9C735D64170B716300FF96F5 /* JSONAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D63170B716300FF96F5 /* JSONAPITests.m */; }; - 9C735D70170C007900FF96F5 /* InitFromWebTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D6F170C007900FF96F5 /* InitFromWebTests.m */; }; - 9CA6B10016FCA5B400B3E78E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */; }; - 9CA6B10216FCAAEE00B3E78E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */; }; - 9CB1EE42172C1136004BAA07 /* SpecialPropertyNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB1EE41172C1136004BAA07 /* SpecialPropertyNameTests.m */; }; - 9CB1EE47172C1205004BAA07 /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = 9CB1EE46172C1205004BAA07 /* specialPropertyName.json */; }; - 9CBBBEDD166B6CF0008B4326 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */; }; - 9CBBBEDF166B6CF0008B4326 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */; }; - 9CBBBEE1166B6CF0008B4326 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */; }; - 9CBBBEE7166B6CF0008B4326 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEE5166B6CF0008B4326 /* InfoPlist.strings */; }; - 9CBBBEE9166B6CF0008B4326 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBEE8166B6CF0008B4326 /* main.m */; }; - 9CBBBEED166B6CF0008B4326 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBEEC166B6CF0008B4326 /* AppDelegate.m */; }; - 9CBBBEEF166B6CF0008B4326 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEEE166B6CF0008B4326 /* Default.png */; }; - 9CBBBEF1166B6CF0008B4326 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEF0166B6CF0008B4326 /* Default@2x.png */; }; - 9CBBBEF3166B6CF0008B4326 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEF2166B6CF0008B4326 /* Default-568h@2x.png */; }; - 9CBBBEF6166B6CF0008B4326 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBEF5166B6CF0008B4326 /* MasterViewController.m */; }; - 9CBBBEFC166B6CF0008B4326 /* MasterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBEFA166B6CF0008B4326 /* MasterViewController.xib */; }; - 9CBBBF08166B6CF0008B4326 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */; }; - 9CBBBF09166B6CF0008B4326 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */; }; - 9CBBBF65166B9E3E008B4326 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */; }; - 9CBBBF77166BA80F008B4326 /* KivaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF75166BA80F008B4326 /* KivaViewController.m */; }; - 9CBBBF78166BA80F008B4326 /* KivaViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF76166BA80F008B4326 /* KivaViewController.xib */; }; - 9CBBBF80166BA86A008B4326 /* LoanModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF7B166BA86A008B4326 /* LoanModel.m */; }; - 9CBBBF81166BA86A008B4326 /* LocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF7D166BA86A008B4326 /* LocationModel.m */; }; - 9CBBBF82166BA86A008B4326 /* KivaFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF7F166BA86A008B4326 /* KivaFeed.m */; }; - 9CBBBF8F166BAC54008B4326 /* btnCheck.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF89166BAC54008B4326 /* btnCheck.png */; }; - 9CBBBF90166BAC54008B4326 /* btnCheck@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF8A166BAC54008B4326 /* btnCheck@2x.png */; }; - 9CBBBF91166BAC54008B4326 /* HUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF8C166BAC54008B4326 /* HUD.m */; }; - 9CBBBF92166BAC54008B4326 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF8E166BAC54008B4326 /* MBProgressHUD.m */; }; - 9CBBBF97166BAED2008B4326 /* GitHubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */; }; - 9CBBBF98166BAED2008B4326 /* GitHubViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */; }; - 9CBBBF9C166BAEF5008B4326 /* GitHubUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */; }; - 9CBBBFB1166BBB05008B4326 /* MyDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */; }; - 9CBBBFB5166BBB21008B4326 /* StorageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */; }; - 9CBBBFB6166BBB21008B4326 /* StorageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */; }; - 9CC2FD2B168CE7830059FE67 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9CC2FCD5168CE7830059FE67 /* Info.plist */; }; - 9CCAFD921901B44300314886 /* SpecialPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CCAFD911901B44300314886 /* SpecialPropertiesTests.m */; }; - 9CD425751701FE0000A42AA1 /* HTTPClientSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */; }; - 9CD425781701FF2100A42AA1 /* MTTestSemaphor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */; }; - 9CD4257B1702002900A42AA1 /* MockNSURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */; }; - 9CF21CE91CA28A200076A4C7 /* SpecialValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */; }; - 9CFDD0CA176E977C007B7DFA /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */; }; - 9CFDD0CB176E977C007B7DFA /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */; }; - 9CFDD0CC176E977C007B7DFA /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */; }; - 9CFDD0CD176E977C007B7DFA /* EnumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AD176E977C007B7DFA /* EnumModel.m */; }; - 9CFDD0CE176E977C007B7DFA /* GitHubKeyMapRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0AF176E977C007B7DFA /* GitHubKeyMapRepoModel.m */; }; - 9CFDD0CF176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B1176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m */; }; - 9CFDD0D0176E977C007B7DFA /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */; }; - 9CFDD0D1176E977C007B7DFA /* GitHubRepoModelForUSMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B5176E977C007B7DFA /* GitHubRepoModelForUSMapper.m */; }; - 9CFDD0D2176E977C007B7DFA /* ImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B7176E977C007B7DFA /* ImageModel.m */; }; - 9CFDD0D3176E977C007B7DFA /* JSONTypesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0B9176E977C007B7DFA /* JSONTypesModel.m */; }; - 9CFDD0D4176E977C007B7DFA /* NestedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0BB176E977C007B7DFA /* NestedModel.m */; }; - 9CFDD0D5176E977C007B7DFA /* OptionalPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0BD176E977C007B7DFA /* OptionalPropModel.m */; }; - 9CFDD0D6176E977C007B7DFA /* PostModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0BF176E977C007B7DFA /* PostModel.m */; }; - 9CFDD0D7176E977C007B7DFA /* PostsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C1176E977C007B7DFA /* PostsModel.m */; }; - 9CFDD0D8176E977C007B7DFA /* PrimitivesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C3176E977C007B7DFA /* PrimitivesModel.m */; }; - 9CFDD0D9176E977C007B7DFA /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C5176E977C007B7DFA /* ReposModel.m */; }; - 9CFDD0DA176E977C007B7DFA /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C7176E977C007B7DFA /* RpcRequestModel.m */; }; - 9CFDD0DB176E977C007B7DFA /* SpecialPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0C9176E977C007B7DFA /* SpecialPropertyModel.m */; }; - D66F5792A312B021F52F7BFF /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = D66F58FBC6313C65C9357A2F /* ModelForUpperCaseMapper.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 9CBBBF0A166B6CF0008B4326 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9CBBBECF166B6CEF008B4326 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9CBBBED7166B6CF0008B4326; - remoteInfo = JSONModelDemo; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1AE9CA8E1C21F47600B8F5C1 /* RenamedPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenamedPropertyModel.h; sourceTree = ""; }; - 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RenamedPropertyModel.m; sourceTree = ""; }; - 358FD25356988AC33EA6A935 /* DrugModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrugModel.m; sourceTree = ""; }; - 358FD7AD55FD213CBAAB460F /* ExtremeNestingModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingModel.h; sourceTree = ""; }; - 358FD807C3E86F5DC4058645 /* ExtremeNestingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtremeNestingTests.h; sourceTree = ""; }; - 358FDA6A1D0805B6ABE4720D /* DrugModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrugModel.h; sourceTree = ""; }; - 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtremeNestingTests.m; sourceTree = ""; }; - 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtremeNestingModel.m; sourceTree = ""; }; - 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteractionModel.m; sourceTree = ""; }; - 358FDED5E028AA00D3E6564D /* InteractionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteractionModel.h; sourceTree = ""; }; - 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitWithDataTests.m; sourceTree = ""; }; - 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = ""; }; - 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = ""; }; - 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImagesObject.json; sourceTree = ""; }; - 9C0D023D166E6BBF001EA645 /* KivaViewControllerNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaViewControllerNetworking.h; sourceTree = ""; }; - 9C0D023E166E6BBF001EA645 /* KivaViewControllerNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaViewControllerNetworking.m; sourceTree = ""; }; - 9C0D023F166E6BBF001EA645 /* KivaViewControllerNetworking.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KivaViewControllerNetworking.xib; sourceTree = ""; }; - 9C55AF0618903127004EBD8A /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 9C66DF5F168CEF420015CCDF /* ArrayTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayTests.h; sourceTree = ""; }; - 9C66DF60168CEF420015CCDF /* ArrayTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrayTests.m; sourceTree = ""; }; - 9C66DF61168CEF420015CCDF /* BuiltInConversionsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsTests.h; sourceTree = ""; }; - 9C66DF62168CEF420015CCDF /* BuiltInConversionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsTests.m; sourceTree = ""; }; - 9C66DF65168CEF420015CCDF /* CustomPropsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropsTests.h; sourceTree = ""; }; - 9C66DF66168CEF420015CCDF /* CustomPropsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropsTests.m; sourceTree = ""; }; - 9C66DF68168CEF420015CCDF /* colors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = colors.json; sourceTree = ""; }; - 9C66DF69168CEF420015CCDF /* converts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = converts.json; sourceTree = ""; }; - 9C66DF6A168CEF420015CCDF /* github-iphone.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "github-iphone.json"; sourceTree = ""; }; - 9C66DF6B168CEF420015CCDF /* jsonTypes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = jsonTypes.json; sourceTree = ""; }; - 9C66DF6C168CEF420015CCDF /* nestedData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedData.json; sourceTree = ""; }; - 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithArrayError.json; sourceTree = ""; }; - 9C66DF6E168CEF420015CCDF /* post.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = post.json; sourceTree = ""; }; - 9C66DF6F168CEF420015CCDF /* primitives.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitives.json; sourceTree = ""; }; - 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitivesWithErrors.json; sourceTree = ""; }; - 9C66DF71168CEF420015CCDF /* withOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withOptProp.json; sourceTree = ""; }; - 9C66DF72168CEF420015CCDF /* withoutOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withoutOptProp.json; sourceTree = ""; }; - 9C66DF73168CEF420015CCDF /* IdPropertyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdPropertyTests.h; sourceTree = ""; }; - 9C66DF74168CEF420015CCDF /* IdPropertyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = IdPropertyTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C66DF75168CEF420015CCDF /* JSONTypesModelWithValidation1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation1.h; sourceTree = ""; }; - 9C66DF76168CEF420015CCDF /* JSONTypesModelWithValidation1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation1.m; sourceTree = ""; }; - 9C66DF77168CEF420015CCDF /* JSONTypesModelWithValidation2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation2.h; sourceTree = ""; }; - 9C66DF78168CEF420015CCDF /* JSONTypesModelWithValidation2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation2.m; sourceTree = ""; }; - 9C66DF79168CEF420015CCDF /* JSONTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesReadTests.h; sourceTree = ""; }; - 9C66DF7A168CEF420015CCDF /* JSONTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONTypesReadTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C66DF7B168CEF420015CCDF /* JSONValueTransformer+UIColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONValueTransformer+UIColor.h"; sourceTree = ""; }; - 9C66DF7C168CEF420015CCDF /* JSONValueTransformer+UIColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONValueTransformer+UIColor.m"; sourceTree = ""; }; - 9C66DF7D168CEF420015CCDF /* KeyMappingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyMappingTests.h; sourceTree = ""; }; - 9C66DF7E168CEF420015CCDF /* KeyMappingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = KeyMappingTests.m; sourceTree = ""; }; - 9C66DF7F168CEF420015CCDF /* NestedModelsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModelsTests.h; sourceTree = ""; }; - 9C66DF80168CEF420015CCDF /* NestedModelsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = NestedModelsTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C66DF81168CEF420015CCDF /* OptionalPropertiesTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropertiesTests.h; sourceTree = ""; }; - 9C66DF82168CEF420015CCDF /* OptionalPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = OptionalPropertiesTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C66DF83168CEF420015CCDF /* PersistTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistTests.h; sourceTree = ""; }; - 9C66DF84168CEF420015CCDF /* PersistTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PersistTests.m; sourceTree = ""; }; - 9C66DF85168CEF420015CCDF /* PrimitiveTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitiveTypesReadTests.h; sourceTree = ""; }; - 9C66DF86168CEF420015CCDF /* PrimitiveTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PrimitiveTypesReadTests.m; sourceTree = ""; }; - 9C66DF87168CEF420015CCDF /* SimpleDataErrorTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleDataErrorTests.h; sourceTree = ""; }; - 9C66DF88168CEF420015CCDF /* SimpleDataErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleDataErrorTests.m; sourceTree = ""; }; - 9C66DFA6168CEF420015CCDF /* ValidationTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidationTestSuite.h; sourceTree = ""; }; - 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidationTestSuite.m; sourceTree = ""; }; - 9C735D62170B716300FF96F5 /* JSONAPITests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPITests.h; sourceTree = ""; }; - 9C735D63170B716300FF96F5 /* JSONAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPITests.m; sourceTree = ""; }; - 9C735D6E170C007900FF96F5 /* InitFromWebTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitFromWebTests.h; sourceTree = ""; }; - 9C735D6F170C007900FF96F5 /* InitFromWebTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitFromWebTests.m; sourceTree = ""; }; - 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - 9CB1EE40172C1136004BAA07 /* SpecialPropertyNameTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyNameTests.h; sourceTree = ""; }; - 9CB1EE41172C1136004BAA07 /* SpecialPropertyNameTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SpecialPropertyNameTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9CB1EE46172C1205004BAA07 /* specialPropertyName.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = specialPropertyName.json; sourceTree = ""; }; - 9CBBBED8166B6CF0008B4326 /* iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 9CBBBEE4166B6CF0008B4326 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9CBBBEE6166B6CF0008B4326 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 9CBBBEE8166B6CF0008B4326 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 9CBBBEEB166B6CF0008B4326 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 9CBBBEEC166B6CF0008B4326 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9CBBBEEE166B6CF0008B4326 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - 9CBBBEF0166B6CF0008B4326 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; - 9CBBBEF2166B6CF0008B4326 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 9CBBBEF4166B6CF0008B4326 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = ""; }; - 9CBBBEF5166B6CF0008B4326 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = ""; }; - 9CBBBEFB166B6CF0008B4326 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MasterViewController.xib; sourceTree = ""; }; - 9CBBBF05166B6CF0008B4326 /* iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 9CBBBF74166BA80F008B4326 /* KivaViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaViewController.h; sourceTree = ""; }; - 9CBBBF75166BA80F008B4326 /* KivaViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaViewController.m; sourceTree = ""; }; - 9CBBBF76166BA80F008B4326 /* KivaViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KivaViewController.xib; sourceTree = ""; }; - 9CBBBF7A166BA86A008B4326 /* LoanModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoanModel.h; sourceTree = ""; }; - 9CBBBF7B166BA86A008B4326 /* LoanModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoanModel.m; sourceTree = ""; }; - 9CBBBF7C166BA86A008B4326 /* LocationModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationModel.h; sourceTree = ""; }; - 9CBBBF7D166BA86A008B4326 /* LocationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationModel.m; sourceTree = ""; }; - 9CBBBF7E166BA86A008B4326 /* KivaFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaFeed.h; sourceTree = ""; }; - 9CBBBF7F166BA86A008B4326 /* KivaFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaFeed.m; sourceTree = ""; }; - 9CBBBF89166BAC54008B4326 /* btnCheck.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btnCheck.png; sourceTree = ""; }; - 9CBBBF8A166BAC54008B4326 /* btnCheck@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btnCheck@2x.png"; sourceTree = ""; }; - 9CBBBF8B166BAC54008B4326 /* HUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HUD.h; sourceTree = ""; }; - 9CBBBF8C166BAC54008B4326 /* HUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HUD.m; sourceTree = ""; }; - 9CBBBF8D166BAC54008B4326 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = ""; }; - 9CBBBF8E166BAC54008B4326 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = ""; }; - 9CBBBF94166BAED2008B4326 /* GitHubViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubViewController.h; sourceTree = ""; }; - 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubViewController.m; sourceTree = ""; }; - 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GitHubViewController.xib; sourceTree = ""; }; - 9CBBBF9A166BAEF5008B4326 /* GitHubUserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubUserModel.h; sourceTree = ""; }; - 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubUserModel.m; sourceTree = ""; }; - 9CBBBFAF166BBB05008B4326 /* MyDataModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyDataModel.h; sourceTree = ""; }; - 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDataModel.m; sourceTree = ""; }; - 9CBBBFB2166BBB21008B4326 /* StorageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageViewController.h; sourceTree = ""; }; - 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StorageViewController.m; sourceTree = ""; }; - 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = StorageViewController.xib; sourceTree = ""; }; - 9CBD6D4F18FF2D7D00DE66EC /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 9CC2FCD2168CE7830059FE67 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 9CC2FCD5168CE7830059FE67 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9CCAFD911901B44300314886 /* SpecialPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertiesTests.m; sourceTree = ""; }; - 9CD425721701FDE500A42AA1 /* HTTPClientSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPClientSuite.h; sourceTree = ""; }; - 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPClientSuite.m; sourceTree = ""; }; - 9CD425761701FF2100A42AA1 /* MTTestSemaphor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTTestSemaphor.h; sourceTree = ""; }; - 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTTestSemaphor.m; sourceTree = ""; }; - 9CD425791702002900A42AA1 /* MockNSURLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockNSURLConnection.h; sourceTree = ""; }; - 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MockNSURLConnection.m; sourceTree = ""; }; - 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialValuesTests.m; sourceTree = ""; }; - 9CFDD0A6176E977C007B7DFA /* BuiltInConversionsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsModel.h; sourceTree = ""; }; - 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsModel.m; sourceTree = ""; }; - 9CFDD0A8176E977C007B7DFA /* CopyrightModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyrightModel.h; sourceTree = ""; }; - 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyrightModel.m; sourceTree = ""; }; - 9CFDD0AA176E977C007B7DFA /* CustomPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropertyModel.h; sourceTree = ""; }; - 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropertyModel.m; sourceTree = ""; }; - 9CFDD0AC176E977C007B7DFA /* EnumModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumModel.h; sourceTree = ""; }; - 9CFDD0AD176E977C007B7DFA /* EnumModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EnumModel.m; sourceTree = ""; }; - 9CFDD0AE176E977C007B7DFA /* GitHubKeyMapRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModel.h; sourceTree = ""; }; - 9CFDD0AF176E977C007B7DFA /* GitHubKeyMapRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModel.m; sourceTree = ""; }; - 9CFDD0B0176E977C007B7DFA /* GitHubKeyMapRepoModelDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModelDict.h; sourceTree = ""; }; - 9CFDD0B1176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModelDict.m; sourceTree = ""; }; - 9CFDD0B2176E977C007B7DFA /* GitHubRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModel.h; sourceTree = ""; }; - 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModel.m; sourceTree = ""; }; - 9CFDD0B4176E977C007B7DFA /* GitHubRepoModelForUSMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModelForUSMapper.h; sourceTree = ""; }; - 9CFDD0B5176E977C007B7DFA /* GitHubRepoModelForUSMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModelForUSMapper.m; sourceTree = ""; }; - 9CFDD0B6176E977C007B7DFA /* ImageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageModel.h; sourceTree = ""; }; - 9CFDD0B7176E977C007B7DFA /* ImageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageModel.m; sourceTree = ""; }; - 9CFDD0B8176E977C007B7DFA /* JSONTypesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModel.h; sourceTree = ""; }; - 9CFDD0B9176E977C007B7DFA /* JSONTypesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModel.m; sourceTree = ""; }; - 9CFDD0BA176E977C007B7DFA /* NestedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModel.h; sourceTree = ""; }; - 9CFDD0BB176E977C007B7DFA /* NestedModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModel.m; sourceTree = ""; }; - 9CFDD0BC176E977C007B7DFA /* OptionalPropModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropModel.h; sourceTree = ""; }; - 9CFDD0BD176E977C007B7DFA /* OptionalPropModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropModel.m; sourceTree = ""; }; - 9CFDD0BE176E977C007B7DFA /* PostModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostModel.h; sourceTree = ""; }; - 9CFDD0BF176E977C007B7DFA /* PostModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostModel.m; sourceTree = ""; }; - 9CFDD0C0176E977C007B7DFA /* PostsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostsModel.h; sourceTree = ""; }; - 9CFDD0C1176E977C007B7DFA /* PostsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostsModel.m; sourceTree = ""; }; - 9CFDD0C2176E977C007B7DFA /* PrimitivesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitivesModel.h; sourceTree = ""; }; - 9CFDD0C3176E977C007B7DFA /* PrimitivesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitivesModel.m; sourceTree = ""; }; - 9CFDD0C4176E977C007B7DFA /* ReposModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReposModel.h; sourceTree = ""; }; - 9CFDD0C5176E977C007B7DFA /* ReposModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReposModel.m; sourceTree = ""; }; - 9CFDD0C6176E977C007B7DFA /* RpcRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RpcRequestModel.h; sourceTree = ""; }; - 9CFDD0C7176E977C007B7DFA /* RpcRequestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RpcRequestModel.m; sourceTree = ""; }; - 9CFDD0C8176E977C007B7DFA /* SpecialPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyModel.h; sourceTree = ""; }; - 9CFDD0C9176E977C007B7DFA /* SpecialPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyModel.m; sourceTree = ""; }; - D66F555A1EB344B7A5FF0D85 /* ModelForUpperCaseMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelForUpperCaseMapper.h; sourceTree = ""; }; - D66F58FBC6313C65C9357A2F /* ModelForUpperCaseMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelForUpperCaseMapper.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9CBBBED5166B6CF0008B4326 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C55AF0718903127004EBD8A /* CoreData.framework in Frameworks */, - 9CA6B10216FCAAEE00B3E78E /* SystemConfiguration.framework in Frameworks */, - 9CBBBEDD166B6CF0008B4326 /* UIKit.framework in Frameworks */, - 9CBBBEDF166B6CF0008B4326 /* Foundation.framework in Frameworks */, - 9CBBBEE1166B6CF0008B4326 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CBBBF01166B6CF0008B4326 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C28A14118B2A4D2002AEC1E /* CoreData.framework in Frameworks */, - 9CA6B10016FCA5B400B3E78E /* SystemConfiguration.framework in Frameworks */, - 9CBBBF65166B9E3E008B4326 /* CoreGraphics.framework in Frameworks */, - 9CBBBF08166B6CF0008B4326 /* UIKit.framework in Frameworks */, - 9CBBBF09166B6CF0008B4326 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9C05B2BB168CE9DE0054215E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9CC2FCD1168CE7830059FE67 /* InfoPlist.strings */, - 9CC2FCD5168CE7830059FE67 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9C0D023C166E6B7A001EA645 /* KivaJSONDemo+networking */ = { - isa = PBXGroup; - children = ( - 9C0D023D166E6BBF001EA645 /* KivaViewControllerNetworking.h */, - 9C0D023E166E6BBF001EA645 /* KivaViewControllerNetworking.m */, - 9C0D023F166E6BBF001EA645 /* KivaViewControllerNetworking.xib */, - ); - name = "KivaJSONDemo+networking"; - sourceTree = ""; - }; - 9C66DF5E168CEF420015CCDF /* UnitTests */ = { - isa = PBXGroup; - children = ( - 9CFDD0A5176E977B007B7DFA /* TestModels */, - 9C66DF5F168CEF420015CCDF /* ArrayTests.h */, - 9C66DF60168CEF420015CCDF /* ArrayTests.m */, - 9C66DF61168CEF420015CCDF /* BuiltInConversionsTests.h */, - 9C66DF62168CEF420015CCDF /* BuiltInConversionsTests.m */, - 9C66DF65168CEF420015CCDF /* CustomPropsTests.h */, - 9C66DF66168CEF420015CCDF /* CustomPropsTests.m */, - 9C66DF73168CEF420015CCDF /* IdPropertyTests.h */, - 9C66DF74168CEF420015CCDF /* IdPropertyTests.m */, - 9C66DF75168CEF420015CCDF /* JSONTypesModelWithValidation1.h */, - 9C66DF76168CEF420015CCDF /* JSONTypesModelWithValidation1.m */, - 9C66DF77168CEF420015CCDF /* JSONTypesModelWithValidation2.h */, - 9C66DF78168CEF420015CCDF /* JSONTypesModelWithValidation2.m */, - 9C66DF79168CEF420015CCDF /* JSONTypesReadTests.h */, - 9C66DF7A168CEF420015CCDF /* JSONTypesReadTests.m */, - 9C66DF7B168CEF420015CCDF /* JSONValueTransformer+UIColor.h */, - 9C66DF7C168CEF420015CCDF /* JSONValueTransformer+UIColor.m */, - 9C66DF7D168CEF420015CCDF /* KeyMappingTests.h */, - 9C66DF7E168CEF420015CCDF /* KeyMappingTests.m */, - 9C66DF7F168CEF420015CCDF /* NestedModelsTests.h */, - 9C66DF80168CEF420015CCDF /* NestedModelsTests.m */, - 9C66DF81168CEF420015CCDF /* OptionalPropertiesTests.h */, - 9C66DF82168CEF420015CCDF /* OptionalPropertiesTests.m */, - 9C66DF83168CEF420015CCDF /* PersistTests.h */, - 9C66DF84168CEF420015CCDF /* PersistTests.m */, - 9C66DF85168CEF420015CCDF /* PrimitiveTypesReadTests.h */, - 9C66DF86168CEF420015CCDF /* PrimitiveTypesReadTests.m */, - 9C66DF87168CEF420015CCDF /* SimpleDataErrorTests.h */, - 9C66DF88168CEF420015CCDF /* SimpleDataErrorTests.m */, - 9CB1EE40172C1136004BAA07 /* SpecialPropertyNameTests.h */, - 9CB1EE41172C1136004BAA07 /* SpecialPropertyNameTests.m */, - 9C66DFA6168CEF420015CCDF /* ValidationTestSuite.h */, - 9C66DFA7168CEF420015CCDF /* ValidationTestSuite.m */, - 9CD425721701FDE500A42AA1 /* HTTPClientSuite.h */, - 9CD425731701FDE500A42AA1 /* HTTPClientSuite.m */, - 9C735D62170B716300FF96F5 /* JSONAPITests.h */, - 9C735D63170B716300FF96F5 /* JSONAPITests.m */, - 9C735D6E170C007900FF96F5 /* InitFromWebTests.h */, - 9C735D6F170C007900FF96F5 /* InitFromWebTests.m */, - 9CCAFD911901B44300314886 /* SpecialPropertiesTests.m */, - 4A50001C19C5DCCF00C161A0 /* InitWithDataTests.m */, - 358FDBA42551FF88466BD5C3 /* ExtremeNestingTests.m */, - 358FD807C3E86F5DC4058645 /* ExtremeNestingTests.h */, - 9CF21CE81CA28A200076A4C7 /* SpecialValuesTests.m */, - ); - path = UnitTests; - sourceTree = ""; - }; - 9C66DF67168CEF420015CCDF /* DataFiles */ = { - isa = PBXGroup; - children = ( - 9C66DF68168CEF420015CCDF /* colors.json */, - 9C66DF69168CEF420015CCDF /* converts.json */, - 9C66DF6A168CEF420015CCDF /* github-iphone.json */, - 9C66DF6B168CEF420015CCDF /* jsonTypes.json */, - 9C66DF6C168CEF420015CCDF /* nestedData.json */, - 9C66DF6D168CEF420015CCDF /* nestedDataWithArrayError.json */, - 69286BD917FA280900D1BA81 /* nestedDataWithDictionaryError.json */, - 697852FC17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json */, - 697852FE17D93546006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json */, - 9C66DF6E168CEF420015CCDF /* post.json */, - 9C66DF6F168CEF420015CCDF /* primitives.json */, - 9C66DF70168CEF420015CCDF /* primitivesWithErrors.json */, - 9C66DF71168CEF420015CCDF /* withOptProp.json */, - 9C66DF72168CEF420015CCDF /* withoutOptProp.json */, - 9CB1EE46172C1205004BAA07 /* specialPropertyName.json */, - ); - name = DataFiles; - path = UnitTests/DataFiles; - sourceTree = ""; - }; - 9CBBBECD166B6CEF008B4326 = { - isa = PBXGroup; - children = ( - 9CBBBEE2166B6CF0008B4326 /* iOS */, - 9CC2FCBC168CE7830059FE67 /* Tests */, - 9CBBBEDB166B6CF0008B4326 /* Frameworks */, - 9CBBBED9166B6CF0008B4326 /* Products */, - ); - indentWidth = 4; - sourceTree = ""; - tabWidth = 4; - usesTabs = 0; - }; - 9CBBBED9166B6CF0008B4326 /* Products */ = { - isa = PBXGroup; - children = ( - 9CBBBED8166B6CF0008B4326 /* iOS.app */, - 9CBBBF05166B6CF0008B4326 /* iOSTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 9CBBBEDB166B6CF0008B4326 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9CBD6D4F18FF2D7D00DE66EC /* XCTest.framework */, - 9C55AF0618903127004EBD8A /* CoreData.framework */, - 9CA6B0FF16FCA5B400B3E78E /* SystemConfiguration.framework */, - 9CBBBEDC166B6CF0008B4326 /* UIKit.framework */, - 9CBBBEDE166B6CF0008B4326 /* Foundation.framework */, - 9CBBBEE0166B6CF0008B4326 /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9CBBBEE2166B6CF0008B4326 /* iOS */ = { - isa = PBXGroup; - children = ( - 9CBBBFAD166BB87B008B4326 /* DemoApp */, - 9CBBBF87166BAC31008B4326 /* libs */, - 9CBBBF93166BAEB2008B4326 /* GitHubDemo */, - 9CBBBFAE166BBADA008B4326 /* UsedAsStorageDemo */, - 9CBBBF73166BA7E1008B4326 /* KivaJSONDemo */, - 9C0D023C166E6B7A001EA645 /* KivaJSONDemo+networking */, - ); - path = iOS; - sourceTree = ""; - }; - 9CBBBEE3166B6CF0008B4326 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9CBBBEE4166B6CF0008B4326 /* Info.plist */, - 9CBBBEE5166B6CF0008B4326 /* InfoPlist.strings */, - 9CBBBEE8166B6CF0008B4326 /* main.m */, - 9CBBBEEE166B6CF0008B4326 /* Default.png */, - 9CBBBEF0166B6CF0008B4326 /* Default@2x.png */, - 9CBBBEF2166B6CF0008B4326 /* Default-568h@2x.png */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9CBBBF73166BA7E1008B4326 /* KivaJSONDemo */ = { - isa = PBXGroup; - children = ( - 9CBBBF79166BA857008B4326 /* KivaModels */, - 9CBBBF74166BA80F008B4326 /* KivaViewController.h */, - 9CBBBF75166BA80F008B4326 /* KivaViewController.m */, - 9CBBBF76166BA80F008B4326 /* KivaViewController.xib */, - ); - name = KivaJSONDemo; - sourceTree = ""; - }; - 9CBBBF79166BA857008B4326 /* KivaModels */ = { - isa = PBXGroup; - children = ( - 9CBBBF7A166BA86A008B4326 /* LoanModel.h */, - 9CBBBF7B166BA86A008B4326 /* LoanModel.m */, - 9CBBBF7C166BA86A008B4326 /* LocationModel.h */, - 9CBBBF7D166BA86A008B4326 /* LocationModel.m */, - 9CBBBF7E166BA86A008B4326 /* KivaFeed.h */, - 9CBBBF7F166BA86A008B4326 /* KivaFeed.m */, - ); - name = KivaModels; - sourceTree = ""; - }; - 9CBBBF87166BAC31008B4326 /* libs */ = { - isa = PBXGroup; - children = ( - 9CBBBF88166BAC43008B4326 /* HUD */, - ); - name = libs; - sourceTree = ""; - }; - 9CBBBF88166BAC43008B4326 /* HUD */ = { - isa = PBXGroup; - children = ( - 9CBBBF89166BAC54008B4326 /* btnCheck.png */, - 9CBBBF8A166BAC54008B4326 /* btnCheck@2x.png */, - 9CBBBF8B166BAC54008B4326 /* HUD.h */, - 9CBBBF8C166BAC54008B4326 /* HUD.m */, - 9CBBBF8D166BAC54008B4326 /* MBProgressHUD.h */, - 9CBBBF8E166BAC54008B4326 /* MBProgressHUD.m */, - ); - name = HUD; - sourceTree = ""; - }; - 9CBBBF93166BAEB2008B4326 /* GitHubDemo */ = { - isa = PBXGroup; - children = ( - 9CBBBF99166BAEDF008B4326 /* GitHubModels */, - 9CBBBF94166BAED2008B4326 /* GitHubViewController.h */, - 9CBBBF95166BAED2008B4326 /* GitHubViewController.m */, - 9CBBBF96166BAED2008B4326 /* GitHubViewController.xib */, - ); - name = GitHubDemo; - sourceTree = ""; - }; - 9CBBBF99166BAEDF008B4326 /* GitHubModels */ = { - isa = PBXGroup; - children = ( - 9CBBBF9A166BAEF5008B4326 /* GitHubUserModel.h */, - 9CBBBF9B166BAEF5008B4326 /* GitHubUserModel.m */, - ); - name = GitHubModels; - sourceTree = ""; - }; - 9CBBBFAD166BB87B008B4326 /* DemoApp */ = { - isa = PBXGroup; - children = ( - 9CBBBEE3166B6CF0008B4326 /* Supporting Files */, - 9CBBBEEB166B6CF0008B4326 /* AppDelegate.h */, - 9CBBBEEC166B6CF0008B4326 /* AppDelegate.m */, - 9CBBBEF4166B6CF0008B4326 /* MasterViewController.h */, - 9CBBBEF5166B6CF0008B4326 /* MasterViewController.m */, - 9CBBBEFA166B6CF0008B4326 /* MasterViewController.xib */, - ); - name = DemoApp; - sourceTree = ""; - }; - 9CBBBFAE166BBADA008B4326 /* UsedAsStorageDemo */ = { - isa = PBXGroup; - children = ( - 9CBBBFB7166BBB27008B4326 /* StorageModel */, - 9CBBBFB2166BBB21008B4326 /* StorageViewController.h */, - 9CBBBFB3166BBB21008B4326 /* StorageViewController.m */, - 9CBBBFB4166BBB21008B4326 /* StorageViewController.xib */, - ); - name = UsedAsStorageDemo; - sourceTree = ""; - }; - 9CBBBFB7166BBB27008B4326 /* StorageModel */ = { - isa = PBXGroup; - children = ( - 9CBBBFAF166BBB05008B4326 /* MyDataModel.h */, - 9CBBBFB0166BBB05008B4326 /* MyDataModel.m */, - ); - name = StorageModel; - sourceTree = ""; - }; - 9CC2FCBC168CE7830059FE67 /* Tests */ = { - isa = PBXGroup; - children = ( - 9CD4257C1702003600A42AA1 /* Class */, - 9C66DF67168CEF420015CCDF /* DataFiles */, - 9C66DF5E168CEF420015CCDF /* UnitTests */, - 9C05B2BB168CE9DE0054215E /* Supporting Files */, - ); - path = Tests; - sourceTree = ""; - }; - 9CD4257C1702003600A42AA1 /* Class */ = { - isa = PBXGroup; - children = ( - 9CD425791702002900A42AA1 /* MockNSURLConnection.h */, - 9CD4257A1702002900A42AA1 /* MockNSURLConnection.m */, - 9CD425761701FF2100A42AA1 /* MTTestSemaphor.h */, - 9CD425771701FF2100A42AA1 /* MTTestSemaphor.m */, - ); - name = Class; - sourceTree = ""; - }; - 9CFDD0A5176E977B007B7DFA /* TestModels */ = { - isa = PBXGroup; - children = ( - 9CFDD0A6176E977C007B7DFA /* BuiltInConversionsModel.h */, - 9CFDD0A7176E977C007B7DFA /* BuiltInConversionsModel.m */, - 9CFDD0A8176E977C007B7DFA /* CopyrightModel.h */, - 9CFDD0A9176E977C007B7DFA /* CopyrightModel.m */, - 9CFDD0AA176E977C007B7DFA /* CustomPropertyModel.h */, - 9CFDD0AB176E977C007B7DFA /* CustomPropertyModel.m */, - 9CFDD0AC176E977C007B7DFA /* EnumModel.h */, - 9CFDD0AD176E977C007B7DFA /* EnumModel.m */, - 9CFDD0AE176E977C007B7DFA /* GitHubKeyMapRepoModel.h */, - 9CFDD0AF176E977C007B7DFA /* GitHubKeyMapRepoModel.m */, - 9CFDD0B0176E977C007B7DFA /* GitHubKeyMapRepoModelDict.h */, - 9CFDD0B1176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m */, - 9CFDD0B2176E977C007B7DFA /* GitHubRepoModel.h */, - 9CFDD0B3176E977C007B7DFA /* GitHubRepoModel.m */, - 9CFDD0B4176E977C007B7DFA /* GitHubRepoModelForUSMapper.h */, - 9CFDD0B5176E977C007B7DFA /* GitHubRepoModelForUSMapper.m */, - 9CFDD0B6176E977C007B7DFA /* ImageModel.h */, - 9CFDD0B7176E977C007B7DFA /* ImageModel.m */, - 9CFDD0B8176E977C007B7DFA /* JSONTypesModel.h */, - 9CFDD0B9176E977C007B7DFA /* JSONTypesModel.m */, - 9CFDD0BA176E977C007B7DFA /* NestedModel.h */, - 9CFDD0BB176E977C007B7DFA /* NestedModel.m */, - 9CFDD0BC176E977C007B7DFA /* OptionalPropModel.h */, - 9CFDD0BD176E977C007B7DFA /* OptionalPropModel.m */, - 9CFDD0BE176E977C007B7DFA /* PostModel.h */, - 9CFDD0BF176E977C007B7DFA /* PostModel.m */, - 9CFDD0C0176E977C007B7DFA /* PostsModel.h */, - 9CFDD0C1176E977C007B7DFA /* PostsModel.m */, - 9CFDD0C2176E977C007B7DFA /* PrimitivesModel.h */, - 9CFDD0C3176E977C007B7DFA /* PrimitivesModel.m */, - 9CFDD0C4176E977C007B7DFA /* ReposModel.h */, - 9CFDD0C5176E977C007B7DFA /* ReposModel.m */, - 9CFDD0C6176E977C007B7DFA /* RpcRequestModel.h */, - 9CFDD0C7176E977C007B7DFA /* RpcRequestModel.m */, - 9CFDD0C8176E977C007B7DFA /* SpecialPropertyModel.h */, - 9CFDD0C9176E977C007B7DFA /* SpecialPropertyModel.m */, - D66F555A1EB344B7A5FF0D85 /* ModelForUpperCaseMapper.h */, - D66F58FBC6313C65C9357A2F /* ModelForUpperCaseMapper.m */, - 358FDBE28A19497358D1A6DA /* ExtremeNestingModel.m */, - 358FD7AD55FD213CBAAB460F /* ExtremeNestingModel.h */, - 358FD25356988AC33EA6A935 /* DrugModel.m */, - 358FDA6A1D0805B6ABE4720D /* DrugModel.h */, - 358FDCB3CFE05DBA0DE27E5F /* InteractionModel.m */, - 358FDED5E028AA00D3E6564D /* InteractionModel.h */, - 1AE9CA8E1C21F47600B8F5C1 /* RenamedPropertyModel.h */, - 1AE9CA8F1C21F47600B8F5C1 /* RenamedPropertyModel.m */, - ); - path = TestModels; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9CBBBED7166B6CF0008B4326 /* iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9CBBBF17166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "iOS" */; - buildPhases = ( - 9CBBBED4166B6CF0008B4326 /* Sources */, - 9CBBBED5166B6CF0008B4326 /* Frameworks */, - 9CBBBED6166B6CF0008B4326 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = iOS; - productName = JSONModelDemo; - productReference = 9CBBBED8166B6CF0008B4326 /* iOS.app */; - productType = "com.apple.product-type.application"; - }; - 9CBBBF04166B6CF0008B4326 /* iOSTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9CBBBF1A166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "iOSTests" */; - buildPhases = ( - 9CBBBF00166B6CF0008B4326 /* Sources */, - 9CBBBF01166B6CF0008B4326 /* Frameworks */, - 9CBBBF02166B6CF0008B4326 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 9CBBBF0B166B6CF0008B4326 /* PBXTargetDependency */, - ); - name = iOSTests; - productName = JSONModelDemoTests; - productReference = 9CBBBF05166B6CF0008B4326 /* iOSTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9CBBBECF166B6CEF008B4326 /* Project object */ = { - isa = PBXProject; - attributes = { - LastTestingUpgradeCheck = 0510; - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "Underplot ltd."; - }; - buildConfigurationList = 9CBBBED2166B6CEF008B4326 /* Build configuration list for PBXProject "iOS" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 9CBBBECD166B6CEF008B4326; - productRefGroup = 9CBBBED9166B6CF0008B4326 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9CBBBED7166B6CF0008B4326 /* iOS */, - 9CBBBF04166B6CF0008B4326 /* iOSTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9CBBBED6166B6CF0008B4326 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CBBBEE7166B6CF0008B4326 /* InfoPlist.strings in Resources */, - 9CBBBEEF166B6CF0008B4326 /* Default.png in Resources */, - 9CBBBEF1166B6CF0008B4326 /* Default@2x.png in Resources */, - 9CBBBEF3166B6CF0008B4326 /* Default-568h@2x.png in Resources */, - 9CBBBEFC166B6CF0008B4326 /* MasterViewController.xib in Resources */, - 9CBBBF78166BA80F008B4326 /* KivaViewController.xib in Resources */, - 9CBBBF8F166BAC54008B4326 /* btnCheck.png in Resources */, - 9CBBBF90166BAC54008B4326 /* btnCheck@2x.png in Resources */, - 69286BDA17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */, - 9CBBBF98166BAED2008B4326 /* GitHubViewController.xib in Resources */, - 9CBBBFB6166BBB21008B4326 /* StorageViewController.xib in Resources */, - 9C0D0241166E6BBF001EA645 /* KivaViewControllerNetworking.xib in Resources */, - 9CC2FD2B168CE7830059FE67 /* Info.plist in Resources */, - 9C66DFD1168CEF530015CCDF /* colors.json in Resources */, - 9C66DFD2168CEF530015CCDF /* converts.json in Resources */, - 9C66DFD3168CEF530015CCDF /* github-iphone.json in Resources */, - 9C66DFD4168CEF530015CCDF /* jsonTypes.json in Resources */, - 9C66DFD5168CEF530015CCDF /* nestedData.json in Resources */, - 9C66DFD6168CEF530015CCDF /* nestedDataWithArrayError.json in Resources */, - 9C66DFD7168CEF530015CCDF /* post.json in Resources */, - 9C66DFD8168CEF530015CCDF /* primitives.json in Resources */, - 9C66DFD9168CEF530015CCDF /* primitivesWithErrors.json in Resources */, - 9C66DFDA168CEF530015CCDF /* withOptProp.json in Resources */, - 9C66DFDB168CEF530015CCDF /* withoutOptProp.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CBBBF02166B6CF0008B4326 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C66DFAC168CEF420015CCDF /* colors.json in Resources */, - 9C66DFAD168CEF420015CCDF /* converts.json in Resources */, - 9C66DFAE168CEF420015CCDF /* github-iphone.json in Resources */, - 9C66DFAF168CEF420015CCDF /* jsonTypes.json in Resources */, - 9C66DFB0168CEF420015CCDF /* nestedData.json in Resources */, - 9C66DFB1168CEF420015CCDF /* nestedDataWithArrayError.json in Resources */, - 9C66DFB2168CEF420015CCDF /* post.json in Resources */, - 9C66DFB3168CEF420015CCDF /* primitives.json in Resources */, - 9C66DFB4168CEF420015CCDF /* primitivesWithErrors.json in Resources */, - 9C66DFB5168CEF420015CCDF /* withOptProp.json in Resources */, - 9C66DFB6168CEF420015CCDF /* withoutOptProp.json in Resources */, - 9CB1EE47172C1205004BAA07 /* specialPropertyName.json in Resources */, - 697852FD17D934B5006BFCD0 /* nestedDataWithTypeMismatchOnImages.json in Resources */, - 69286BDB17FA280900D1BA81 /* nestedDataWithDictionaryError.json in Resources */, - 697852FF17D93547006BFCD0 /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9CBBBED4166B6CF0008B4326 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CBBBEE9166B6CF0008B4326 /* main.m in Sources */, - 9CBBBEED166B6CF0008B4326 /* AppDelegate.m in Sources */, - 9CBBBEF6166B6CF0008B4326 /* MasterViewController.m in Sources */, - 9CBBBF77166BA80F008B4326 /* KivaViewController.m in Sources */, - 9CBBBF80166BA86A008B4326 /* LoanModel.m in Sources */, - 9CBBBF81166BA86A008B4326 /* LocationModel.m in Sources */, - 9CBBBF82166BA86A008B4326 /* KivaFeed.m in Sources */, - 9CBBBF91166BAC54008B4326 /* HUD.m in Sources */, - 9CBBBF92166BAC54008B4326 /* MBProgressHUD.m in Sources */, - 9CBBBF97166BAED2008B4326 /* GitHubViewController.m in Sources */, - 9CBBBF9C166BAEF5008B4326 /* GitHubUserModel.m in Sources */, - 9C55AF0F189033AE004EBD8A /* GitHubRepoModel.m in Sources */, - 9CBBBFB1166BBB05008B4326 /* MyDataModel.m in Sources */, - 9CBBBFB5166BBB21008B4326 /* StorageViewController.m in Sources */, - 9C0D0240166E6BBF001EA645 /* KivaViewControllerNetworking.m in Sources */, - 1AE9CA901C21F47600B8F5C1 /* RenamedPropertyModel.m in Sources */, - 9C55AF0E18903300004EBD8A /* ReposModel.m in Sources */, - 358FD078D3C0D56C77ACD770 /* ExtremeNestingModel.m in Sources */, - 358FD640BFEAB00349FBBA4A /* DrugModel.m in Sources */, - 358FD179E0B41C47C67713B5 /* InteractionModel.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CBBBF00166B6CF0008B4326 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C66DFA8168CEF420015CCDF /* ArrayTests.m in Sources */, - 9C66DFA9168CEF420015CCDF /* BuiltInConversionsTests.m in Sources */, - 9C66DFAB168CEF420015CCDF /* CustomPropsTests.m in Sources */, - 9C66DFB7168CEF420015CCDF /* IdPropertyTests.m in Sources */, - 9C66DFB8168CEF420015CCDF /* JSONTypesModelWithValidation1.m in Sources */, - 9C66DFB9168CEF420015CCDF /* JSONTypesModelWithValidation2.m in Sources */, - 9C66DFBA168CEF420015CCDF /* JSONTypesReadTests.m in Sources */, - 9CF21CE91CA28A200076A4C7 /* SpecialValuesTests.m in Sources */, - 9C66DFBB168CEF420015CCDF /* JSONValueTransformer+UIColor.m in Sources */, - 9C66DFBC168CEF420015CCDF /* KeyMappingTests.m in Sources */, - 9C66DFBD168CEF420015CCDF /* NestedModelsTests.m in Sources */, - 9C66DFBE168CEF420015CCDF /* OptionalPropertiesTests.m in Sources */, - 9C66DFBF168CEF420015CCDF /* PersistTests.m in Sources */, - 9C66DFC0168CEF420015CCDF /* PrimitiveTypesReadTests.m in Sources */, - 9C66DFC1168CEF420015CCDF /* SimpleDataErrorTests.m in Sources */, - 9C66DFD0168CEF420015CCDF /* ValidationTestSuite.m in Sources */, - 9CCAFD921901B44300314886 /* SpecialPropertiesTests.m in Sources */, - 9CB1EE42172C1136004BAA07 /* SpecialPropertyNameTests.m in Sources */, - 4A50001D19C5DCCF00C161A0 /* InitWithDataTests.m in Sources */, - 9CD425751701FE0000A42AA1 /* HTTPClientSuite.m in Sources */, - 9CD425781701FF2100A42AA1 /* MTTestSemaphor.m in Sources */, - 9CD4257B1702002900A42AA1 /* MockNSURLConnection.m in Sources */, - 9C735D64170B716300FF96F5 /* JSONAPITests.m in Sources */, - 9C735D70170C007900FF96F5 /* InitFromWebTests.m in Sources */, - 9CFDD0CA176E977C007B7DFA /* BuiltInConversionsModel.m in Sources */, - 9CFDD0CB176E977C007B7DFA /* CopyrightModel.m in Sources */, - 9CFDD0CC176E977C007B7DFA /* CustomPropertyModel.m in Sources */, - 9CFDD0CD176E977C007B7DFA /* EnumModel.m in Sources */, - 9CFDD0CE176E977C007B7DFA /* GitHubKeyMapRepoModel.m in Sources */, - 9CFDD0CF176E977C007B7DFA /* GitHubKeyMapRepoModelDict.m in Sources */, - 9CFDD0D0176E977C007B7DFA /* GitHubRepoModel.m in Sources */, - 9CFDD0D1176E977C007B7DFA /* GitHubRepoModelForUSMapper.m in Sources */, - 9CFDD0D2176E977C007B7DFA /* ImageModel.m in Sources */, - 9CFDD0D3176E977C007B7DFA /* JSONTypesModel.m in Sources */, - 9CFDD0D4176E977C007B7DFA /* NestedModel.m in Sources */, - 9CFDD0D5176E977C007B7DFA /* OptionalPropModel.m in Sources */, - 9CFDD0D6176E977C007B7DFA /* PostModel.m in Sources */, - 9CFDD0D7176E977C007B7DFA /* PostsModel.m in Sources */, - 9CFDD0D8176E977C007B7DFA /* PrimitivesModel.m in Sources */, - 9CFDD0D9176E977C007B7DFA /* ReposModel.m in Sources */, - 9CFDD0DA176E977C007B7DFA /* RpcRequestModel.m in Sources */, - 9CFDD0DB176E977C007B7DFA /* SpecialPropertyModel.m in Sources */, - D66F5792A312B021F52F7BFF /* ModelForUpperCaseMapper.m in Sources */, - 358FD61804BD21F41035348E /* ExtremeNestingTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 9CBBBF0B166B6CF0008B4326 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9CBBBED7166B6CF0008B4326 /* iOS */; - targetProxy = 9CBBBF0A166B6CF0008B4326 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 9CBBBEE5166B6CF0008B4326 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 9CBBBEE6166B6CF0008B4326 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 9CBBBEFA166B6CF0008B4326 /* MasterViewController.xib */ = { - isa = PBXVariantGroup; - children = ( - 9CBBBEFB166B6CF0008B4326 /* en */, - ); - name = MasterViewController.xib; - sourceTree = ""; - }; - 9CC2FCD1168CE7830059FE67 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 9CC2FCD2168CE7830059FE67 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 9CBBBF15166B6CF0008B4326 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 9CBBBF16166B6CF0008B4326 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 9CBBBF18166B6CF0008B4326 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = iOS/Info.plist; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = iOS; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 9CBBBF19166B6CF0008B4326 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = iOS/Info.plist; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = iOS; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - 9CBBBF1B166B6CF0008B4326 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS.app/iOS"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - "UNIT_TESTING=1", - ); - INFOPLIST_FILE = Tests/Info.plist; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = iOSTests; - TEST_HOST = "$(BUNDLE_LOADER)"; - }; - name = Debug; - }; - 9CBBBF1C166B6CF0008B4326 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS.app/iOS"; - INFOPLIST_FILE = Tests/Info.plist; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = iOSTests; - TEST_HOST = "$(BUNDLE_LOADER)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9CBBBED2166B6CEF008B4326 /* Build configuration list for PBXProject "iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CBBBF15166B6CF0008B4326 /* Debug */, - 9CBBBF16166B6CF0008B4326 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9CBBBF17166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CBBBF18166B6CF0008B4326 /* Debug */, - 9CBBBF19166B6CF0008B4326 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9CBBBF1A166B6CF0008B4326 /* Build configuration list for PBXNativeTarget "iOSTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CBBBF1B166B6CF0008B4326 /* Debug */, - 9CBBBF1C166B6CF0008B4326 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9CBBBECF166B6CEF008B4326 /* Project object */; -} diff --git a/Demos/iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Demos/iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7648c4a7..00000000 --- a/Demos/iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Demos/iOS/AppDelegate.h b/Demos/iOS/AppDelegate.h deleted file mode 100644 index 913f91e6..00000000 --- a/Demos/iOS/AppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// AppDelegate.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@property (strong, nonatomic) UINavigationController *navigationController; - -@end diff --git a/Demos/iOS/AppDelegate.m b/Demos/iOS/AppDelegate.m deleted file mode 100644 index 4349247f..00000000 --- a/Demos/iOS/AppDelegate.m +++ /dev/null @@ -1,55 +0,0 @@ -// -// AppDelegate.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "AppDelegate.h" - -#import "MasterViewController.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - // Override point for customization after application launch. - - MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil]; - self.navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController]; - self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; - self.window.rootViewController = self.navigationController; - [self.window makeKeyAndVisible]; - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end diff --git a/Demos/iOS/Default-568h@2x.png b/Demos/iOS/Default-568h@2x.png deleted file mode 100644 index 0891b7aabfcf3422423b109c8beed2bab838c607..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18594 zcmeI4X;f257Jx&9fS`ixvS;&$x8J@slQFSel)6zJN=?13FB7H(lQjRkSy8x_-S~tvu2gzn1oS+dLcF#eqtq$ z%tf9TTvX?`)R@}3uBI;jzS-=ZR-Td&MHaS&;!0?Ni*#$#`n*~CcQK)Q9vAQ~TUpnI!j)a2biYK^R)M~A5wUDZhx?ULMX z3x1P&qt=trOY6P2U67L=m=U?F|5#Uj(eCueNTZaHs_ceWiHeET+j+tp3Jt9g(ekqP z2WOvfR{qV+9r+o4J5?qK>7;;^+I7tGv-i)es$X_D=EoKF+S?zsyj^oRFElP}c}JT< zd8SUs-?O?}2YD#ngKbnHgzHBcboxK_2r9l(?eNCl-pEzkJm}fY?WC*jnS?VBE4EpY zO$fEejz6fU;W2Kl>JeQBZBl-%Irg`obSlg*@4QB;Dd1H7^Oi5wvt4d{RZ!8Og?^aE z)k0$1g+V3fd(gdQ3d&q2q-FL*uy#}|bc^=VhFsl0jBgUGJ+-s3U8MK9A!YJJMxpci z5hJ%|{DwV48fZn0{n5l$N_KcSb#NKE4plB`9I6Zt=Z!~-zw0{9tg$L&Ju1F0X)Cy8 zKF;(&lJ>x)Jw(=;p~sF(Sd9VWGwFE2rnyS9!f^DZ8+aCLq zQ};>lcJ1GDLqjm6Hd>|Eabno@P`~Bn(~6^aD_#yoEH(a?Nm1S<;S+hSxI5d16^<1lEM3NPFi zkqPrpL)+ zgnseFikg`gJVBha1&7C4;O6>h=dt~`ND+;Zd?W(4v2JIb7Pt>Td42%M-Ju-XAH#Pns762L}K3 zDhvsRqN0Ni(1UrishD2YvV?4*h2iFj$+&N||Fn$4n|^NSU+o?~jq`0jVQt8T9l{7b zXiwwODFh2V!Q6sqP9S>WH$oOf$N~=d0-bqTlD61!=`&0eAP-F>XN?*|gtOXX{ zQVTWyYo4ZK0GAw!GHf|pz9`D;-bbb*5LBX*{bnz|+)$@&P9|ORM2o?95{;ejvo&r- zq8cBhTN6nn)7~W>54U)%-F_-b?YKdfk5I8MHcuzBD5)!;yv#Z&R&^y=@=>VTIMy#r zX&U<=BsPkdqcMe<_}2+>H%XKyrr5ZR8_KVe>ZqYN z^=^~TFD};;rHJ$U;{~w^hYojl4hRI@SH$^K{YEo=sg)WY87r!*7blQK&qnpDo0`Vn zkl)9u9g=mCh&ZCJS(L4yN3k0kQ zuvg$h2KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u diff --git a/Demos/iOS/Default.png b/Demos/iOS/Default.png deleted file mode 100644 index 4c8ca6f693f96d511e9113c0eb59eec552354e42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6540 zcmeAS@N?(olHy`uVBq!ia0y~yU~~ZD2OMlbkt;o0To@QwR5G2N13aCb6#|O#(=u~X z85k@CTSM>X-wqM6>&y>YB4)1;;ojbLbbV-W^iFB1wa3^zCog^LCAReC4K0-?R_2{6 zrP*)4+_uWUy3w5N52M3PW_}MFMP9a~>YLvVZ1D_k*IMQ2QT^fwzoOb(*3gH$%aYWC zkHmcab=va2<#X%jakpJ;<1@F;k__#bwtC&%^D0v(FBh9K&$sK+<}2RJS609D)17$w ztdQP8(eLM8Ka}m_IQ@3wyMKP)l=oM4-?`YS_*P?4V_ORLPxsj&7Ju#kH;>6^Kp?T7~ zl+q?{UOOqV==?+d{=)5s|M~T1mwtH@+Z^$G&eEO9JNP^AX@3jZ*J*!!>lc|1-W%fA z@AOQpXZ_Lt>rxFXrGp*zLPiW@uo_c7C{As>j zWeX)wi+LTp_)@KYZCX{j;H?|1yXT4DnlS(Fr8gyP5|uaX_gLvaW0ScZdnG7o+u{T6 zFI-%d{ls*WuCDa5UJ@|RXv&ejZe}*BMkiWY51&pnRPw(hlykSzvj6e%mYz-GdvzBD zF10?szF_~!jS=?2HyQuPCvARXAe}C}WP|yQ*>5~~=*Nxq8+HHW1~FMDRCP^TcacKuk$ z(U#REVv)D!PhJ*ecH-ELFUrfyV&*)Z)>UCOuS?yd^L@Afk>ihynYPc{^CRwu+JHX+#$@YsC4c|l0tGigsn@jy) zXD($Ouk>H+V(Mr6NQT0S9BFM~V6nkj;1OBOz`zY;a|<&v%$g$sEJPk;hD4M^`1)8S z=jZArrsOB3>Q&?x097+E*i={nnYpPYi3%0DIeEoa6}C!X6;?ntNLXJ<0j#7X+g2&U zH$cHTzbI9~RL@Y)NXd>%K|#T$C?(A*$i)q+9mum)$|xx*u+rBrFE7_CH`dE9O4m2E zw6xSWFw!?N(gmu}Ew0QfNvzP#D^`XW0yD=YwK%ybv!En1KTiQ3|)OBHVcpi zp&D%TL4k-AsNfg_g$9~9p}$+4Ynr|VULLgiakg&)DD)EWO!OHC@snXr}UI${nVUP zpr1>Mf#G6^ng~;pt%^&NvQm>vU@-wn)!_JWN=(;B61LIDR86%A1?G9U(@`={MPdPF zbOKdd`R1o&rd7HmmZaJl85kPr8kp-EnTHsfS{ayIfdU*&4N@e5WSomq6HD@oLh|!- z?7;Dr3*ssm=^5w&a}>G?yzvAH17L|`#|6|0E4}QvA~xC{V_*wu2^AHZU}H9f($4F$btFf{}TLQXUhF5fht1@YV$^ z9BUdFV+73^nIsvRXRM40U}6b7z_6}kHbY}i1LK(xT@6Mi?F5GKBfbp|ZU-3BR*6kv zXcRSQ(0-)mprD+wTr)o_4I;(%zOu)+jEgNB)_SXCVoSa}|F?cfwR!69+L=W3IX z!UiU`0@ph%94Rb33Cpq^IY*r_8XBW%V>G9XmK&p`=xCiXTEmXEH%41uqixaAmicH0 zVYIt6!aI*K%s=kP-v##6IXGZ2Cama>{@)81;C?K-P&M2k<0!GL}5+H~XTq*@SQi|Ft z2*0X`$`8S!qO#)xBeJRkf?;t189=ZB6Imw-h=`q;FP(2UpWZvmJ@=k-@45M(dtb7r zyVEiaLk$=Vw#>zu;st}j6Jf9=m1+nXCFe!$1PrEZ%5Ze_ba8YX_9-*rJujiLuQmJo&2v+Cxes}ec zU|qeux&7*yz#W=X_|wGQskL7*OHNjwFs@sEC+64Hb$Z(#H21Gh$Pe2WzOubdr6fzg z{l{!k%OD?N5Z7j33SoK?YdV6Scm>})U+MIQLNRgIvkZQEc^mP9XBPg%y|S$~Br|;N zk?-!-(Qqh_mQ|6WINQ{hHAjBRV#O#!FkAJ+oxy`L#f8V45*VvWMJFBB5m zG6vOLtDvgoDjHlSq-*h5xM56O>Jjau2f2IxKItIb@coX4XTyf$^{LZG&lI|D95wN1 z!fo0)q>WV7-V;q|A?HR!*bgozJw%j98-~gwBKVV0;=hZIF>7oJSr2YjOWO*rSxz#& z;KXnDrJVZp;Yduiy1-H%s$ZFz6Q=x@$V_B@Tqwl?>6e;EHt|MiK<(#hXQMuj@Jseeh&eN{FxsQ$iw>D1aX1HMMlUbh?Z zmhY4eHffn5&LUbL_}o8|$JYz&$WFiLWmEg0ZPX+;W>@CxQz-%{E5+P7dH9&ey_y$R z@Zzje>2B%z!i!7Brqi{t5Y)~5>vpqRs~2aXD8DVE8vKl=`k(`duI1-k@?!pJ^HA6S zS;3WpuhjQHyoC>X>Xf8gze%_8^#+^RTV>V9&YPAWMjd~%xpSg?ON?kK^X*Pb(o8jR zz;DmaOWMMr6=M~K?MFx4_xDkARTxLJ@W@ohAx z5RD0jGgk?QL@H`VubD2k4}?VtB8@g`%hHBA$2pJ(gK5g1HMNysXEF_BNu-p!&+Qa8_APgopHWnRgg=TZZF*sXWTMQPD z!Q(Au5|+F;7M~`tWbsU98~NA{h0Y7%GB|t&n}w9OOABU4^X*V5xuN;rY(M#ouuqm) zyt!e?28fY!FgP?8GvBsMl_aM^UUVKiGFsleFN?t^<46kO#pF-cX0;sIOb(aM z)^jQgX^Z6pKA9mC@N)_aiHj9HxD2|?A@Y9B_h}(*v3%ek8CXc1Qy^jFPF&zrMa1OZ zSVaF{&ZY|(|H0XE&X>-XQz1`=fF2n@VKC_|h3jlKVM&-jmyMavllcYr`6LVtfq2ou zd+8zkkCB+2)rxq0Lkq_&Ad@g(O8;pAm96>tu79?81T@Z<;gm^3ZtPG-SR94Mr<3tm z9NrR3u*4I5aMlo(09g@8m_;%Rf+XiSa_KZao9n}7N0JrsV#;5Ucr+F*TTzQ8{%f3O zeIUy?WDS|-$LvMc@Z7320)tr}bfIka5hx9H;8H|%our=C+Do0CSFRWue14o5#r8v2 zw=|&r4*eMX%lgCV(ka?*j%H^UuP4LmBC(ON`)&7>NF-|PDRU{-7o`CU0HNbd&c~))@yl9IKu_ zXA+A-!khpP_yx=f#qt2_0ptmgBf4gF!{Y)MW6R$cC1d7@$Yb?+_j zYwfE^5_e`vhT zX=u3r>4$fsxP&apbm@Rcbyuc2T=giqZiMo9@9=oua6#YH0hO-1ak9^rJTPMM qY4Yr5Cu^v99p{E9VdroUHKlRW;M8#BJ^AOQE?e9wSHJo8(7yq;BYKSh diff --git a/Demos/iOS/GitHubUserModel.h b/Demos/iOS/GitHubUserModel.h deleted file mode 100644 index 17ec618b..00000000 --- a/Demos/iOS/GitHubUserModel.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// GitHubUserModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface GitHubUserModel : JSONModel - -@property (strong, nonatomic) NSString* login; -@property (strong, nonatomic) NSURL* html_url; -@property (strong, nonatomic) NSString* company; -@property (strong, nonatomic) NSString* name; -@property (strong, nonatomic) NSURL* blog; - -@end diff --git a/Demos/iOS/GitHubUserModel.m b/Demos/iOS/GitHubUserModel.m deleted file mode 100644 index 9bee0ce5..00000000 --- a/Demos/iOS/GitHubUserModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// GitHubUserModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "GitHubUserModel.h" - -@implementation GitHubUserModel - -@end diff --git a/Demos/iOS/GitHubViewController.h b/Demos/iOS/GitHubViewController.h deleted file mode 100644 index eaaeee66..00000000 --- a/Demos/iOS/GitHubViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// GitHubViewController.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface GitHubViewController : UITableViewController - -@end diff --git a/Demos/iOS/GitHubViewController.m b/Demos/iOS/GitHubViewController.m deleted file mode 100644 index c68e7101..00000000 --- a/Demos/iOS/GitHubViewController.m +++ /dev/null @@ -1,95 +0,0 @@ -// -// GitHubViewController.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "GitHubViewController.h" -#import "GitHubUserModel.h" -#import "HUD.h" - -@interface GitHubViewController () -{ - GitHubUserModel* user; - NSArray* items; -} -@end - -@implementation GitHubViewController - --(void)viewDidAppear:(BOOL)animated -{ - self.title = @"GitHub.com user lookup"; - [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; - - //1 - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - //code executed in the background - //2 - NSData* ghData = [NSData dataWithContentsOfURL: - [NSURL URLWithString:@"https://api.github.com/users/icanzilb"] - ]; - //3 - NSDictionary* json = nil; - if (ghData) { - json = [NSJSONSerialization - JSONObjectWithData:ghData - options:kNilOptions - error:nil]; - } - - //4 - dispatch_async(dispatch_get_main_queue(), ^{ - //code executed on the main queue - //5 - - user = [[GitHubUserModel alloc] initWithDictionary:json error:NULL]; - items = @[user.login, user.html_url, user.company, user.name, user.blog]; - - [self.tableView reloadData]; - [HUD hideUIBlockingIndicator]; - }); - - }); -} - -#pragma mark - table methods --(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - --(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return items.count; -} - --(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KivaCell"]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KivaCell"]; - } - - cell.textLabel.text = [items[indexPath.row] description]; - - if ([items[indexPath.row] isKindOfClass:[NSURL class]]) { - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - return cell; -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; - - if ([items[indexPath.row] isKindOfClass:[NSURL class]]) { - [[UIApplication sharedApplication] openURL:items[indexPath.row]]; - } -} - - -@end diff --git a/Demos/iOS/GitHubViewController.xib b/Demos/iOS/GitHubViewController.xib deleted file mode 100644 index 18d65e35..00000000 --- a/Demos/iOS/GitHubViewController.xib +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demos/iOS/HUD.h b/Demos/iOS/HUD.h deleted file mode 100644 index 0ffb44ed..00000000 --- a/Demos/iOS/HUD.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// HUD.h -// BeatGuide -// -// Created by Marin Todorov on 22/04/2012. -// -// This code is distributed under the terms and conditions of the MIT license. -// -// Copyright (c) 2011 Marin Todorov -// -// 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 "MBProgressHUD.h" - -@interface HUD : NSObject - -+(MBProgressHUD*)showUIBlockingIndicator; -+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str; -+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str withTimeout:(int)seconds; - -+(MBProgressHUD*)showUIBlockingProgressIndicatorWithText:(NSString*)str andProgress:(float)progress; - -+(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text; -+(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text target:(id)t action:(SEL)sel; - -+(void)hideUIBlockingIndicator; - -@end diff --git a/Demos/iOS/HUD.m b/Demos/iOS/HUD.m deleted file mode 100644 index 58703b0e..00000000 --- a/Demos/iOS/HUD.m +++ /dev/null @@ -1,201 +0,0 @@ -// -// HUD.m -// BeatGuide -// -// This code is distributed under the terms and conditions of the MIT license. -// -// Copyright (c) 2011 Marin Todorov -// -// 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 "HUD.h" -#import "QuartzCore/QuartzCore.h" - -static UIView* lastViewWithHUD = nil; - -@interface GlowButton : UIButton - -@end - -@implementation GlowButton -{ - NSTimer* timer; - float glowDelta; -} - --(id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - //effect - self.layer.shadowColor = [UIColor whiteColor].CGColor; - self.layer.shadowOffset = CGSizeMake(1,1); - self.layer.shadowOpacity = 0.9; - - glowDelta = 0.2; - timer = [NSTimer timerWithTimeInterval:0.05 - target:self - selector:@selector(glow) - userInfo:nil - repeats:YES]; - - [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode]; - } - return self; -} - --(void)glow -{ - if (self.layer.shadowRadius>7.0 || self.layer.shadowRadius<0.1) { - glowDelta *= -1; - } - self.layer.shadowRadius += glowDelta; -} - --(void)dealloc -{ - [timer invalidate]; - timer = nil; -} - -@end - -@implementation HUD - -+(UIView*)rootView -{ - //return [UIApplication sharedApplication].keyWindow.rootViewController.view; - - UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController; - - while (topController.presentedViewController) { - topController = topController.presentedViewController; - } - - return topController.view; -} - -+(MBProgressHUD*)showUIBlockingIndicator -{ - return [self showUIBlockingIndicatorWithText:nil]; -} - -+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str -{ - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; - - //show the HUD - UIView* targetView = [self rootView]; - if (targetView==nil) return nil; - - lastViewWithHUD = targetView; - - [MBProgressHUD hideHUDForView:targetView animated:YES]; - - MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES]; - if (str!=nil) { - hud.labelText = str; - } else { - hud.labelText = @"Loading..."; - } - - return hud; -} - -+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str withTimeout:(int)seconds -{ - MBProgressHUD* hud = [self showUIBlockingIndicatorWithText:str]; - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; - hud.customView = [[UIView alloc] initWithFrame:CGRectMake(0,0,37,37)]; - hud.mode = MBProgressHUDModeDeterminate; - [hud hide:YES afterDelay:seconds]; - return hud; -} - -+(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text -{ - return [self showAlertWithTitle:titleText text:text target:nil action:NULL]; -} - -+(MBProgressHUD*)showAlertWithTitle:(NSString*)titleText text:(NSString*)text target:(id)t action:(SEL)sel -{ - [HUD hideUIBlockingIndicator]; - - //show the HUD - UIView* targetView = [self rootView]; - if (targetView==nil) return nil; - - lastViewWithHUD = targetView; - - MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES]; - - //set the text - hud.labelText = titleText; - hud.detailsLabelText = text; - - //set the close button - GlowButton* btnClose = [GlowButton buttonWithType:UIButtonTypeCustom]; - if (t!=nil && sel!=NULL) { - [btnClose addTarget:t action:sel forControlEvents:UIControlEventTouchUpInside]; - } else { - [btnClose addTarget:hud action:@selector(hide:) forControlEvents:UIControlEventTouchUpInside]; - } - - UIImage* imgClose = [UIImage imageNamed:@"btnCheck.png"]; - [btnClose setImage:imgClose forState:UIControlStateNormal]; - [btnClose setFrame:CGRectMake(0,0,imgClose.size.width,imgClose.size.height)]; - - //hud settings - hud.customView = btnClose; - hud.mode = MBProgressHUDModeCustomView; - hud.removeFromSuperViewOnHide = YES; - - return hud; -} - -+(void)hideUIBlockingIndicator -{ - [MBProgressHUD hideHUDForView:lastViewWithHUD animated:YES]; - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; -} - - -+(MBProgressHUD*)showUIBlockingProgressIndicatorWithText:(NSString*)str andProgress:(float)progress -{ - [HUD hideUIBlockingIndicator]; - - //show the HUD - UIView* targetView = [self rootView]; - if (targetView==nil) return nil; - - lastViewWithHUD = targetView; - - MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES]; - - //set the text - hud.labelText = str; - - hud.mode = MBProgressHUDModeDeterminate; - hud.progress = progress; - hud.removeFromSuperViewOnHide = YES; - - return hud; -} - -@end \ No newline at end of file diff --git a/Demos/iOS/Info.plist b/Demos/iOS/Info.plist deleted file mode 100644 index b7bc4ba1..00000000 --- a/Demos/iOS/Info.plist +++ /dev/null @@ -1,48 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UIStatusBarTintParameters - - UINavigationBar - - Style - UIBarStyleDefault - Translucent - - - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Demos/iOS/KivaFeed.h b/Demos/iOS/KivaFeed.h deleted file mode 100644 index 3e1b3a3f..00000000 --- a/Demos/iOS/KivaFeed.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// KivaFeed.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "LoanModel.h" - -@interface KivaFeed : JSONModel - -@property (strong, nonatomic) NSArray* loans; - -@end \ No newline at end of file diff --git a/Demos/iOS/KivaFeed.m b/Demos/iOS/KivaFeed.m deleted file mode 100644 index 185d023d..00000000 --- a/Demos/iOS/KivaFeed.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// KivaFeed.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "KivaFeed.h" - -@implementation KivaFeed - -@end diff --git a/Demos/iOS/KivaViewController.h b/Demos/iOS/KivaViewController.h deleted file mode 100644 index 4ed3aef2..00000000 --- a/Demos/iOS/KivaViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// KivaViewController.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface KivaViewController : UIViewController - -@end diff --git a/Demos/iOS/KivaViewController.m b/Demos/iOS/KivaViewController.m deleted file mode 100644 index 58d12b1c..00000000 --- a/Demos/iOS/KivaViewController.m +++ /dev/null @@ -1,111 +0,0 @@ -// -// KivaViewController.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "KivaViewController.h" -#import "KivaFeed.h" -#import "HUD.h" -#import "JSONModel+networking.h" - -@interface KivaViewController () -{ - IBOutlet UITableView* table; - KivaFeed* feed; - - double benchStart; - double benchObj; - double benchEnd; -} - -@end - -@implementation KivaViewController - --(void)viewDidAppear:(BOOL)animated -{ - self.title = @"Kiva.org latest loans"; - [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - [JSONHTTPClient getJSONFromURLWithString:@"https://api.kivaws.org/v1/loans/search.json" -#pragma GCC diagnostic pop - params:@{@"status":@"fundraising"} - completion:^(NSDictionary *json, JSONModelError *err) { - - benchStart = CFAbsoluteTimeGetCurrent(); - feed = [[KivaFeed alloc] initWithDictionary: json error:nil]; - benchEnd = CFAbsoluteTimeGetCurrent(); - - [HUD hideUIBlockingIndicator]; - - if (feed) { - [table reloadData]; - - [self logBenchmark]; - } else { - //show error - [[[UIAlertView alloc] initWithTitle:@"Error" - message:[err localizedDescription] - delegate:nil - cancelButtonTitle:@"Close" - otherButtonTitles:nil] show]; - } - }]; -} - --(void)logBenchmark -{ - NSLog(@"start: %f", benchStart); - NSLog(@"model: %f", benchEnd); - NSLog(@"-------------------------"); - NSLog(@"json -> model: %.4f", benchEnd - benchStart); -} - -#pragma mark - table methods --(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - --(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return feed.loans.count; -} - --(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KivaCell"]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KivaCell"]; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - LoanModel* loan = feed.loans[indexPath.row]; - - cell.textLabel.text = [NSString stringWithFormat:@"%@ from %@ (%@)", - loan.name, loan.location.country, loan.location.countryCode - ]; - - return cell; -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [table deselectRowAtIndexPath:indexPath animated:YES]; - - LoanModel* loan = feed.loans[indexPath.row]; - - NSString* message = [NSString stringWithFormat:@"%@ from %@(%@) needs a loan %@", - loan.name, loan.location.country, loan.location.countryCode, loan.use - ]; - - - [HUD showAlertWithTitle:@"Loan details" text:message]; -} - -@end diff --git a/Demos/iOS/KivaViewController.xib b/Demos/iOS/KivaViewController.xib deleted file mode 100644 index edb8d586..00000000 --- a/Demos/iOS/KivaViewController.xib +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demos/iOS/KivaViewControllerNetworking.h b/Demos/iOS/KivaViewControllerNetworking.h deleted file mode 100644 index a29fd53d..00000000 --- a/Demos/iOS/KivaViewControllerNetworking.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// KivaViewControllerNetworking.h -// JSONModelDemo -// -// Created by Marin Todorov on 04/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface KivaViewControllerNetworking : UIViewController - -@end diff --git a/Demos/iOS/KivaViewControllerNetworking.m b/Demos/iOS/KivaViewControllerNetworking.m deleted file mode 100644 index d736532d..00000000 --- a/Demos/iOS/KivaViewControllerNetworking.m +++ /dev/null @@ -1,92 +0,0 @@ -// -// KivaViewControllerNetworking.m -// JSONModelDemo -// -// Created by Marin Todorov on 04/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "KivaViewControllerNetworking.h" - -#import "JSONModel+networking.h" -#import "KivaFeed.h" - -#import "HUD.h" - -@interface KivaViewControllerNetworking () -{ - IBOutlet UITableView* table; - KivaFeed* feed; -} - -@end - -@implementation KivaViewControllerNetworking - --(void)viewDidAppear:(BOOL)animated -{ - self.title = @"Kiva.org latest loans"; - - [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - feed = [[KivaFeed alloc] initFromURLWithString:@"http://api.kivaws.org/v1/loans/search.json?status=fundraising" -#pragma GCC diagnostic pop - completion:^(JSONModel *model, JSONModelError* e) { - - [HUD hideUIBlockingIndicator]; - - if (model) { - [table reloadData]; - } else { - [HUD showAlertWithTitle:@"Error" text:e.localizedDescription]; - } - - }]; - -} - -#pragma mark - table methods --(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - --(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return feed.loans.count; -} - --(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KivaCell"]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KivaCell"]; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - LoanModel* loan = feed.loans[indexPath.row]; - - cell.textLabel.text = [NSString stringWithFormat:@"%@ from %@", - loan.name, loan.location.country - ]; - - return cell; -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [table deselectRowAtIndexPath:indexPath animated:YES]; - - LoanModel* loan = feed.loans[indexPath.row]; - - NSString* message = [NSString stringWithFormat:@"%@ from %@ needs a loan %@", - loan.name, loan.location.country, loan.use - ]; - - - [HUD showAlertWithTitle:@"Loan details" text:message]; -} - -@end diff --git a/Demos/iOS/KivaViewControllerNetworking.xib b/Demos/iOS/KivaViewControllerNetworking.xib deleted file mode 100644 index b8cfdbc6..00000000 --- a/Demos/iOS/KivaViewControllerNetworking.xib +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demos/iOS/LoanModel.h b/Demos/iOS/LoanModel.h deleted file mode 100644 index 36ead02e..00000000 --- a/Demos/iOS/LoanModel.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// LoanModel.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "LocationModel.h" - -@protocol LoanModel @end - -@interface LoanModel : JSONModel - -@property (strong, nonatomic) NSString* name; -@property (strong, nonatomic) NSString* status; -@property (strong, nonatomic) NSString* use; - -@property (strong, nonatomic) LocationModel* location; - -@end \ No newline at end of file diff --git a/Demos/iOS/LoanModel.m b/Demos/iOS/LoanModel.m deleted file mode 100644 index d3678d9b..00000000 --- a/Demos/iOS/LoanModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// LoanModel.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "LoanModel.h" - -@implementation LoanModel - -@end diff --git a/Demos/iOS/LocationModel.h b/Demos/iOS/LocationModel.h deleted file mode 100644 index d5e877b3..00000000 --- a/Demos/iOS/LocationModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// LocationModel.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface LocationModel : JSONModel - -@property (strong, nonatomic) NSString* countryCode; -@property (strong, nonatomic) NSString* country; - -@end diff --git a/Demos/iOS/LocationModel.m b/Demos/iOS/LocationModel.m deleted file mode 100644 index 4d58dddc..00000000 --- a/Demos/iOS/LocationModel.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// LocationModel.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "LocationModel.h" -#import "JSONKeyMapper.h" - -@implementation LocationModel - -+(JSONKeyMapper*)keyMapper -{ - return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase]; -} - -@end \ No newline at end of file diff --git a/Demos/iOS/MBProgressHUD.h b/Demos/iOS/MBProgressHUD.h deleted file mode 100755 index cfcbe5c5..00000000 --- a/Demos/iOS/MBProgressHUD.h +++ /dev/null @@ -1,521 +0,0 @@ -// -// MBProgressHUD.h -// Version 0.9.1 -// Created by Matej Bukovinski on 2.4.09. -// - -// This code is distributed under the terms and conditions of the MIT license. - -// Copyright (c) 2009-2015 Matej Bukovinski -// -// 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 - -@protocol MBProgressHUDDelegate; - - -typedef NS_ENUM(NSInteger, MBProgressHUDMode) { - /** Progress is shown using an UIActivityIndicatorView. This is the default. */ - MBProgressHUDModeIndeterminate, - /** Progress is shown using a round, pie-chart like, progress view. */ - MBProgressHUDModeDeterminate, - /** Progress is shown using a horizontal progress bar */ - MBProgressHUDModeDeterminateHorizontalBar, - /** Progress is shown using a ring-shaped progress view. */ - MBProgressHUDModeAnnularDeterminate, - /** Shows a custom view */ - MBProgressHUDModeCustomView, - /** Shows only labels */ - MBProgressHUDModeText -}; - -typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) { - /** Opacity animation */ - MBProgressHUDAnimationFade, - /** Opacity + scale animation */ - MBProgressHUDAnimationZoom, - MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom, - MBProgressHUDAnimationZoomIn -}; - - -#ifndef MB_INSTANCETYPE -#if __has_feature(objc_instancetype) - #define MB_INSTANCETYPE instancetype -#else - #define MB_INSTANCETYPE id -#endif -#endif - -#ifndef MB_STRONG -#if __has_feature(objc_arc) - #define MB_STRONG strong -#else - #define MB_STRONG retain -#endif -#endif - -#ifndef MB_WEAK -#if __has_feature(objc_arc_weak) - #define MB_WEAK weak -#elif __has_feature(objc_arc) - #define MB_WEAK unsafe_unretained -#else - #define MB_WEAK assign -#endif -#endif - -#if NS_BLOCKS_AVAILABLE -typedef void (^MBProgressHUDCompletionBlock)(); -#endif - - -/** - * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. - * - * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. - * The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all - * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is - * drawn centered as a rounded semi-transparent view which resizes depending on the user specified content. - * - * This view supports four modes of operation: - * - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView - * - MBProgressHUDModeDeterminate - shows a custom round progress indicator - * - MBProgressHUDModeAnnularDeterminate - shows a custom annular progress indicator - * - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (see `customView`) - * - * All three modes can have optional labels assigned: - * - If the labelText property is set and non-empty then a label containing the provided content is placed below the - * indicator view. - * - If also the detailsLabelText property is set then another label is placed below the first label. - */ -@interface MBProgressHUD : UIView - -/** - * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. - * - * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden. - * - * @param view The view that the HUD will be added to - * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use - * animations while appearing. - * @return A reference to the created HUD. - * - * @see hideHUDForView:animated: - * @see animationType - */ -+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; - -/** - * Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:. - * - * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden. - * - * @param view The view that is going to be searched for a HUD subview. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return YES if a HUD was found and removed, NO otherwise. - * - * @see showHUDAddedTo:animated: - * @see animationType - */ -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; - -/** - * Finds all the HUD subviews and hides them. - * - * @note This method sets `removeFromSuperViewOnHide`. The HUDs will automatically be removed from the view hierarchy when hidden. - * - * @param view The view that is going to be searched for HUD subviews. - * @param animated If set to YES the HUDs will disappear using the current animationType. If set to NO the HUDs will not use - * animations while disappearing. - * @return the number of HUDs found and removed. - * - * @see hideHUDForView:animated: - * @see animationType - */ -+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated; - -/** - * Finds the top-most HUD subview and returns it. - * - * @param view The view that is going to be searched. - * @return A reference to the last HUD subview discovered. - */ -+ (MB_INSTANCETYPE)HUDForView:(UIView *)view; - -/** - * Finds all HUD subviews and returns them. - * - * @param view The view that is going to be searched. - * @return All found HUD views (array of MBProgressHUD objects). - */ -+ (NSArray *)allHUDsForView:(UIView *)view; - -/** - * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with - * window.bounds as the parameter. - * - * @param window The window instance that will provide the bounds for the HUD. Should be the same instance as - * the HUD's superview (i.e., the window that the HUD will be added to). - */ -- (id)initWithWindow:(UIWindow *)window; - -/** - * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with - * view.bounds as the parameter - * - * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as - * the HUD's superview (i.e., the view that the HUD will be added to). - */ -- (id)initWithView:(UIView *)view; - -/** - * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so - * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread - * (e.g., when using something like NSOperation or calling an asynchronous call like NSURLRequest). - * - * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use - * animations while appearing. - * - * @see animationType - */ -- (void)show:(BOOL)animated; - -/** - * Hide the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * - * @see animationType - */ -- (void)hide:(BOOL)animated; - -/** - * Hide the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @param delay Delay in seconds until the HUD is hidden. - * - * @see animationType - */ -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay; - -/** - * Shows the HUD while a background task is executing in a new thread, then hides the HUD. - * - * This method also takes care of autorelease pools so your method does not have to be concerned with setting up a - * pool. - * - * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread. - * @param target The object that the target method belongs to. - * @param object An optional object to be passed to the method. - * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will not use - * animations while (dis)appearing. - */ -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated; - -#if NS_BLOCKS_AVAILABLE - -/** - * Shows the HUD while a block is executing on a background queue, then hides the HUD. - * - * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block; - -/** - * Shows the HUD while a block is executing on a background queue, then hides the HUD. - * - * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion; - -/** - * Shows the HUD while a block is executing on the specified dispatch queue, then hides the HUD. - * - * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue; - -/** - * Shows the HUD while a block is executing on the specified dispatch queue, executes completion block on the main queue, and then hides the HUD. - * - * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will - * not use animations while (dis)appearing. - * @param block The block to be executed while the HUD is shown. - * @param queue The dispatch queue on which the block should be executed. - * @param completion The block to be executed on completion. - * - * @see completionBlock - */ -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue - completionBlock:(MBProgressHUDCompletionBlock)completion; - -/** - * A block that gets called after the HUD was completely hidden. - */ -@property (copy) MBProgressHUDCompletionBlock completionBlock; - -#endif - -/** - * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate. - * - * @see MBProgressHUDMode - */ -@property (assign) MBProgressHUDMode mode; - -/** - * The animation type that should be used when the HUD is shown and hidden. - * - * @see MBProgressHUDAnimation - */ -@property (assign) MBProgressHUDAnimation animationType; - -/** - * The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView. - * For best results use a 37 by 37 pixel view (so the bounds match the built in indicator bounds). - */ -@property (MB_STRONG) UIView *customView; - -/** - * The HUD delegate object. - * - * @see MBProgressHUDDelegate - */ -@property (MB_WEAK) id delegate; - -/** - * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit - * the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or - * set to @"", then no message is displayed. - */ -@property (copy) NSString *labelText; - -/** - * An optional details message displayed below the labelText message. This message is displayed only if the labelText - * property is also set and is different from an empty string (@""). The details text can span multiple lines. - */ -@property (copy) NSString *detailsLabelText; - -/** - * The opacity of the HUD window. Defaults to 0.8 (80% opacity). - */ -@property (assign) float opacity; - -/** - * The color of the HUD window. Defaults to black. If this property is set, color is set using - * this UIColor and the opacity property is not used. using retain because performing copy on - * UIColor base colors (like [UIColor greenColor]) cause problems with the copyZone. - */ -@property (MB_STRONG) UIColor *color; - -/** - * The x-axis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float xOffset; - -/** - * The y-axis offset of the HUD relative to the centre of the superview. - */ -@property (assign) float yOffset; - -/** - * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). - * Defaults to 20.0 - */ -@property (assign) float margin; - -/** - * The corner radius for the HUD - * Defaults to 10.0 - */ -@property (assign) float cornerRadius; - -/** - * Cover the HUD background view with a radial gradient. - */ -@property (assign) BOOL dimBackground; - -/* - * Grace period is the time (in seconds) that the invoked method may be run without - * showing the HUD. If the task finishes before the grace time runs out, the HUD will - * not be shown at all. - * This may be used to prevent HUD display for very short tasks. - * Defaults to 0 (no grace time). - * Grace time functionality is only supported when the task status is known! - * @see taskInProgress - */ -@property (assign) float graceTime; - -/** - * The minimum time (in seconds) that the HUD is shown. - * This avoids the problem of the HUD being shown and than instantly hidden. - * Defaults to 0 (no minimum show time). - */ -@property (assign) float minShowTime; - -/** - * Indicates that the executed operation is in progress. Needed for correct graceTime operation. - * If you don't set a graceTime (different than 0.0) this does nothing. - * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:. - * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly), - * you need to set this property when your task starts and completes in order to have normal graceTime - * functionality. - */ -@property (assign) BOOL taskInProgress; - -/** - * Removes the HUD from its parent view when hidden. - * Defaults to NO. - */ -@property (assign) BOOL removeFromSuperViewOnHide; - -/** - * Font to be used for the main label. Set this property if the default is not adequate. - */ -@property (MB_STRONG) UIFont* labelFont; - -/** - * Color to be used for the main label. Set this property if the default is not adequate. - */ -@property (MB_STRONG) UIColor* labelColor; - -/** - * Font to be used for the details label. Set this property if the default is not adequate. - */ -@property (MB_STRONG) UIFont* detailsLabelFont; - -/** - * Color to be used for the details label. Set this property if the default is not adequate. - */ -@property (MB_STRONG) UIColor* detailsLabelColor; - -/** - * The color of the activity indicator. Defaults to [UIColor whiteColor] - * Does nothing on pre iOS 5. - */ -@property (MB_STRONG) UIColor *activityIndicatorColor; - -/** - * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. - */ -@property (assign) float progress; - -/** - * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size). - */ -@property (assign) CGSize minSize; - - -/** - * The actual size of the HUD bezel. - * You can use this to limit touch handling on the bezel area only. - * @see https://github.com/jdg/MBProgressHUD/pull/200 - */ -@property (atomic, assign, readonly) CGSize size; - - -/** - * Force the HUD dimensions to be equal if possible. - */ -@property (assign, getter = isSquare) BOOL square; - -@end - - -@protocol MBProgressHUDDelegate - -@optional - -/** - * Called after the HUD was fully hidden from the screen. - */ -- (void)hudWasHidden:(MBProgressHUD *)hud; - -@end - - -/** - * A progress view for showing definite progress by filling up a circle (pie chart). - */ -@interface MBRoundProgressView : UIView - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -/** - * Indicator progress color. - * Defaults to white [UIColor whiteColor] - */ -@property (nonatomic, MB_STRONG) UIColor *progressTintColor; - -/** - * Indicator background (non-progress) color. - * Defaults to translucent white (alpha 0.1) - */ -@property (nonatomic, MB_STRONG) UIColor *backgroundTintColor; - -/* - * Display mode - NO = round or YES = annular. Defaults to round. - */ -@property (nonatomic, assign, getter = isAnnular) BOOL annular; - -@end - - -/** - * A flat bar progress view. - */ -@interface MBBarProgressView : UIView - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -/** - * Bar border line color. - * Defaults to white [UIColor whiteColor]. - */ -@property (nonatomic, MB_STRONG) UIColor *lineColor; - -/** - * Bar background color. - * Defaults to clear [UIColor clearColor]; - */ -@property (nonatomic, MB_STRONG) UIColor *progressRemainingColor; - -/** - * Bar progress color. - * Defaults to white [UIColor whiteColor]. - */ -@property (nonatomic, MB_STRONG) UIColor *progressColor; - -@end diff --git a/Demos/iOS/MBProgressHUD.m b/Demos/iOS/MBProgressHUD.m deleted file mode 100755 index 996b1cb8..00000000 --- a/Demos/iOS/MBProgressHUD.m +++ /dev/null @@ -1,1033 +0,0 @@ -// -// MBProgressHUD.m -// Version 0.9.1 -// Created by Matej Bukovinski on 2.4.09. -// - -#import "MBProgressHUD.h" -#import - - -#if __has_feature(objc_arc) - #define MB_AUTORELEASE(exp) exp - #define MB_RELEASE(exp) exp - #define MB_RETAIN(exp) exp -#else - #define MB_AUTORELEASE(exp) [exp autorelease] - #define MB_RELEASE(exp) [exp release] - #define MB_RETAIN(exp) [exp retain] -#endif - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 - #define MBLabelAlignmentCenter NSTextAlignmentCenter -#else - #define MBLabelAlignmentCenter UITextAlignmentCenter -#endif - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 - #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text \ - sizeWithAttributes:@{NSFontAttributeName:font}] : CGSizeZero; -#else - #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text sizeWithFont:font] : CGSizeZero; -#endif - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 - #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ - boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \ - attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero; -#else - #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ - sizeWithFont:font constrainedToSize:maxSize lineBreakMode:mode] : CGSizeZero; -#endif - -#ifndef kCFCoreFoundationVersionNumber_iOS_7_0 - #define kCFCoreFoundationVersionNumber_iOS_7_0 847.20 -#endif - -#ifndef kCFCoreFoundationVersionNumber_iOS_8_0 - #define kCFCoreFoundationVersionNumber_iOS_8_0 1129.15 -#endif - - -static const CGFloat kPadding = 4.f; -static const CGFloat kLabelFontSize = 16.f; -static const CGFloat kDetailsLabelFontSize = 12.f; - - -@interface MBProgressHUD () { - BOOL useAnimation; - SEL methodForExecution; - id targetForExecution; - id objectForExecution; - UILabel *label; - UILabel *detailsLabel; - BOOL isFinished; - CGAffineTransform rotationTransform; -} - -@property (atomic, MB_STRONG) UIView *indicator; -@property (atomic, MB_STRONG) NSTimer *graceTimer; -@property (atomic, MB_STRONG) NSTimer *minShowTimer; -@property (atomic, MB_STRONG) NSDate *showStarted; - -@end - - -@implementation MBProgressHUD - -#pragma mark - Properties - -@synthesize animationType; -@synthesize delegate; -@synthesize opacity; -@synthesize color; -@synthesize labelFont; -@synthesize labelColor; -@synthesize detailsLabelFont; -@synthesize detailsLabelColor; -@synthesize indicator; -@synthesize xOffset; -@synthesize yOffset; -@synthesize minSize; -@synthesize square; -@synthesize margin; -@synthesize dimBackground; -@synthesize graceTime; -@synthesize minShowTime; -@synthesize graceTimer; -@synthesize minShowTimer; -@synthesize taskInProgress; -@synthesize removeFromSuperViewOnHide; -@synthesize customView; -@synthesize showStarted; -@synthesize mode; -@synthesize labelText; -@synthesize detailsLabelText; -@synthesize progress; -@synthesize size; -@synthesize activityIndicatorColor; -#if NS_BLOCKS_AVAILABLE -@synthesize completionBlock; -#endif - -#pragma mark - Class methods - -+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [[self alloc] initWithView:view]; - hud.removeFromSuperViewOnHide = YES; - [view addSubview:hud]; - [hud show:animated]; - return MB_AUTORELEASE(hud); -} - -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [self HUDForView:view]; - if (hud != nil) { - hud.removeFromSuperViewOnHide = YES; - [hud hide:animated]; - return YES; - } - return NO; -} - -+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated { - NSArray *huds = [MBProgressHUD allHUDsForView:view]; - for (MBProgressHUD *hud in huds) { - hud.removeFromSuperViewOnHide = YES; - [hud hide:animated]; - } - return [huds count]; -} - -+ (MB_INSTANCETYPE)HUDForView:(UIView *)view { - NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator]; - for (UIView *subview in subviewsEnum) { - if ([subview isKindOfClass:self]) { - return (MBProgressHUD *)subview; - } - } - return nil; -} - -+ (NSArray *)allHUDsForView:(UIView *)view { - NSMutableArray *huds = [NSMutableArray array]; - NSArray *subviews = view.subviews; - for (UIView *aView in subviews) { - if ([aView isKindOfClass:self]) { - [huds addObject:aView]; - } - } - return [NSArray arrayWithArray:huds]; -} - -#pragma mark - Lifecycle - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - // Set default values for properties - self.animationType = MBProgressHUDAnimationFade; - self.mode = MBProgressHUDModeIndeterminate; - self.labelText = nil; - self.detailsLabelText = nil; - self.opacity = 0.8f; - self.color = nil; - self.labelFont = [UIFont boldSystemFontOfSize:kLabelFontSize]; - self.labelColor = [UIColor whiteColor]; - self.detailsLabelFont = [UIFont boldSystemFontOfSize:kDetailsLabelFontSize]; - self.detailsLabelColor = [UIColor whiteColor]; - self.activityIndicatorColor = [UIColor whiteColor]; - self.xOffset = 0.0f; - self.yOffset = 0.0f; - self.dimBackground = NO; - self.margin = 20.0f; - self.cornerRadius = 10.0f; - self.graceTime = 0.0f; - self.minShowTime = 0.0f; - self.removeFromSuperViewOnHide = NO; - self.minSize = CGSizeZero; - self.square = NO; - self.contentMode = UIViewContentModeCenter; - self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin - | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; - - // Transparent background - self.opaque = NO; - self.backgroundColor = [UIColor clearColor]; - // Make it invisible for now - self.alpha = 0.0f; - - taskInProgress = NO; - rotationTransform = CGAffineTransformIdentity; - - [self setupLabels]; - [self updateIndicators]; - [self registerForKVO]; - [self registerForNotifications]; - } - return self; -} - -- (id)initWithView:(UIView *)view { - NSAssert(view, @"View must not be nil."); - return [self initWithFrame:view.bounds]; -} - -- (id)initWithWindow:(UIWindow *)window { - return [self initWithView:window]; -} - -- (void)dealloc { - [self unregisterFromNotifications]; - [self unregisterFromKVO]; -#if !__has_feature(objc_arc) - [color release]; - [indicator release]; - [label release]; - [detailsLabel release]; - [labelText release]; - [detailsLabelText release]; - [graceTimer release]; - [minShowTimer release]; - [showStarted release]; - [customView release]; - [labelFont release]; - [labelColor release]; - [detailsLabelFont release]; - [detailsLabelColor release]; -#if NS_BLOCKS_AVAILABLE - [completionBlock release]; -#endif - [super dealloc]; -#endif -} - -#pragma mark - Show & hide - -- (void)show:(BOOL)animated { - NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); - useAnimation = animated; - // If the grace time is set postpone the HUD display - if (self.graceTime > 0.0) { - NSTimer *newGraceTimer = [NSTimer timerWithTimeInterval:self.graceTime target:self selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO]; - [[NSRunLoop currentRunLoop] addTimer:newGraceTimer forMode:NSRunLoopCommonModes]; - self.graceTimer = newGraceTimer; - } - // ... otherwise show the HUD imediately - else { - [self showUsingAnimation:useAnimation]; - } -} - -- (void)hide:(BOOL)animated { - NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); - useAnimation = animated; - // If the minShow time is set, calculate how long the hud was shown, - // and pospone the hiding operation if necessary - if (self.minShowTime > 0.0 && showStarted) { - NSTimeInterval interv = [[NSDate date] timeIntervalSinceDate:showStarted]; - if (interv < self.minShowTime) { - self.minShowTimer = [NSTimer scheduledTimerWithTimeInterval:(self.minShowTime - interv) target:self - selector:@selector(handleMinShowTimer:) userInfo:nil repeats:NO]; - return; - } - } - // ... otherwise hide the HUD immediately - [self hideUsingAnimation:useAnimation]; -} - -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay { - [self performSelector:@selector(hideDelayed:) withObject:[NSNumber numberWithBool:animated] afterDelay:delay]; -} - -- (void)hideDelayed:(NSNumber *)animated { - [self hide:[animated boolValue]]; -} - -#pragma mark - Timer callbacks - -- (void)handleGraceTimer:(NSTimer *)theTimer { - // Show the HUD only if the task is still running - if (taskInProgress) { - [self showUsingAnimation:useAnimation]; - } -} - -- (void)handleMinShowTimer:(NSTimer *)theTimer { - [self hideUsingAnimation:useAnimation]; -} - -#pragma mark - View Hierrarchy - -- (void)didMoveToSuperview { - [self updateForCurrentOrientationAnimated:NO]; -} - -#pragma mark - Internal show & hide operations - -- (void)showUsingAnimation:(BOOL)animated { - // Cancel any scheduled hideDelayed: calls - [NSObject cancelPreviousPerformRequestsWithTarget:self]; - [self setNeedsDisplay]; - - if (animated && animationType == MBProgressHUDAnimationZoomIn) { - self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f)); - } else if (animated && animationType == MBProgressHUDAnimationZoomOut) { - self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f)); - } - self.showStarted = [NSDate date]; - // Fade in - if (animated) { - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:0.30]; - self.alpha = 1.0f; - if (animationType == MBProgressHUDAnimationZoomIn || animationType == MBProgressHUDAnimationZoomOut) { - self.transform = rotationTransform; - } - [UIView commitAnimations]; - } - else { - self.alpha = 1.0f; - } -} - -- (void)hideUsingAnimation:(BOOL)animated { - // Fade out - if (animated && showStarted) { - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:0.30]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)]; - // 0.02 prevents the hud from passing through touches during the animation the hud will get completely hidden - // in the done method - if (animationType == MBProgressHUDAnimationZoomIn) { - self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f)); - } else if (animationType == MBProgressHUDAnimationZoomOut) { - self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f)); - } - - self.alpha = 0.02f; - [UIView commitAnimations]; - } - else { - self.alpha = 0.0f; - [self done]; - } - self.showStarted = nil; -} - -- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context { - [self done]; -} - -- (void)done { - [NSObject cancelPreviousPerformRequestsWithTarget:self]; - isFinished = YES; - self.alpha = 0.0f; - if (removeFromSuperViewOnHide) { - [self removeFromSuperview]; - } -#if NS_BLOCKS_AVAILABLE - if (self.completionBlock) { - self.completionBlock(); - self.completionBlock = NULL; - } -#endif - if ([delegate respondsToSelector:@selector(hudWasHidden:)]) { - [delegate performSelector:@selector(hudWasHidden:) withObject:self]; - } -} - -#pragma mark - Threading - -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated { - methodForExecution = method; - targetForExecution = MB_RETAIN(target); - objectForExecution = MB_RETAIN(object); - // Launch execution in new thread - self.taskInProgress = YES; - [NSThread detachNewThreadSelector:@selector(launchExecution) toTarget:self withObject:nil]; - // Show HUD view - [self show:animated]; -} - -#if NS_BLOCKS_AVAILABLE - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)())completion { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:completion]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue { - [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue - completionBlock:(MBProgressHUDCompletionBlock)completion { - self.taskInProgress = YES; - self.completionBlock = completion; - dispatch_async(queue, ^(void) { - block(); - dispatch_async(dispatch_get_main_queue(), ^(void) { - [self cleanUp]; - }); - }); - [self show:animated]; -} - -#endif - -- (void)launchExecution { - @autoreleasepool { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-performSelector-leaks" - // Start executing the requested task - [targetForExecution performSelector:methodForExecution withObject:objectForExecution]; -#pragma clang diagnostic pop - // Task completed, update view in main thread (note: view operations should - // be done only in the main thread) - [self performSelectorOnMainThread:@selector(cleanUp) withObject:nil waitUntilDone:NO]; - } -} - -- (void)cleanUp { - taskInProgress = NO; -#if !__has_feature(objc_arc) - [targetForExecution release]; - [objectForExecution release]; -#else - targetForExecution = nil; - objectForExecution = nil; -#endif - [self hide:useAnimation]; -} - -#pragma mark - UI - -- (void)setupLabels { - label = [[UILabel alloc] initWithFrame:self.bounds]; - label.adjustsFontSizeToFitWidth = NO; - label.textAlignment = MBLabelAlignmentCenter; - label.opaque = NO; - label.backgroundColor = [UIColor clearColor]; - label.textColor = self.labelColor; - label.font = self.labelFont; - label.text = self.labelText; - [self addSubview:label]; - - detailsLabel = [[UILabel alloc] initWithFrame:self.bounds]; - detailsLabel.font = self.detailsLabelFont; - detailsLabel.adjustsFontSizeToFitWidth = NO; - detailsLabel.textAlignment = MBLabelAlignmentCenter; - detailsLabel.opaque = NO; - detailsLabel.backgroundColor = [UIColor clearColor]; - detailsLabel.textColor = self.detailsLabelColor; - detailsLabel.numberOfLines = 0; - detailsLabel.font = self.detailsLabelFont; - detailsLabel.text = self.detailsLabelText; - [self addSubview:detailsLabel]; -} - -- (void)updateIndicators { - - BOOL isActivityIndicator = [indicator isKindOfClass:[UIActivityIndicatorView class]]; - BOOL isRoundIndicator = [indicator isKindOfClass:[MBRoundProgressView class]]; - - if (mode == MBProgressHUDModeIndeterminate) { - if (!isActivityIndicator) { - // Update to indeterminate indicator - [indicator removeFromSuperview]; - self.indicator = MB_AUTORELEASE([[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]); - [(UIActivityIndicatorView *)indicator startAnimating]; - [self addSubview:indicator]; - } -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000 - [(UIActivityIndicatorView *)indicator setColor:self.activityIndicatorColor]; -#endif - } - else if (mode == MBProgressHUDModeDeterminateHorizontalBar) { - // Update to bar determinate indicator - [indicator removeFromSuperview]; - self.indicator = MB_AUTORELEASE([[MBBarProgressView alloc] init]); - [self addSubview:indicator]; - } - else if (mode == MBProgressHUDModeDeterminate || mode == MBProgressHUDModeAnnularDeterminate) { - if (!isRoundIndicator) { - // Update to determinante indicator - [indicator removeFromSuperview]; - self.indicator = MB_AUTORELEASE([[MBRoundProgressView alloc] init]); - [self addSubview:indicator]; - } - if (mode == MBProgressHUDModeAnnularDeterminate) { - [(MBRoundProgressView *)indicator setAnnular:YES]; - } - [(MBRoundProgressView *)indicator setProgressTintColor:self.activityIndicatorColor]; - [(MBRoundProgressView *)indicator setBackgroundTintColor:[self.activityIndicatorColor colorWithAlphaComponent:0.1f]]; - } - else if (mode == MBProgressHUDModeCustomView && customView != indicator) { - // Update custom view indicator - [indicator removeFromSuperview]; - self.indicator = customView; - [self addSubview:indicator]; - } else if (mode == MBProgressHUDModeText) { - [indicator removeFromSuperview]; - self.indicator = nil; - } -} - -#pragma mark - Layout - -- (void)layoutSubviews { - [super layoutSubviews]; - - // Entirely cover the parent view - UIView *parent = self.superview; - if (parent) { - self.frame = parent.bounds; - } - CGRect bounds = self.bounds; - - // Determine the total width and height needed - CGFloat maxWidth = bounds.size.width - 4 * margin; - CGSize totalSize = CGSizeZero; - - CGRect indicatorF = indicator.bounds; - indicatorF.size.width = MIN(indicatorF.size.width, maxWidth); - totalSize.width = MAX(totalSize.width, indicatorF.size.width); - totalSize.height += indicatorF.size.height; - - CGSize labelSize = MB_TEXTSIZE(label.text, label.font); - labelSize.width = MIN(labelSize.width, maxWidth); - totalSize.width = MAX(totalSize.width, labelSize.width); - totalSize.height += labelSize.height; - if (labelSize.height > 0.f && indicatorF.size.height > 0.f) { - totalSize.height += kPadding; - } - - CGFloat remainingHeight = bounds.size.height - totalSize.height - kPadding - 4 * margin; - CGSize maxSize = CGSizeMake(maxWidth, remainingHeight); - CGSize detailsLabelSize = MB_MULTILINE_TEXTSIZE(detailsLabel.text, detailsLabel.font, maxSize, detailsLabel.lineBreakMode); - totalSize.width = MAX(totalSize.width, detailsLabelSize.width); - totalSize.height += detailsLabelSize.height; - if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) { - totalSize.height += kPadding; - } - - totalSize.width += 2 * margin; - totalSize.height += 2 * margin; - - // Position elements - CGFloat yPos = round(((bounds.size.height - totalSize.height) / 2)) + margin + yOffset; - CGFloat xPos = xOffset; - indicatorF.origin.y = yPos; - indicatorF.origin.x = round((bounds.size.width - indicatorF.size.width) / 2) + xPos; - indicator.frame = indicatorF; - yPos += indicatorF.size.height; - - if (labelSize.height > 0.f && indicatorF.size.height > 0.f) { - yPos += kPadding; - } - CGRect labelF; - labelF.origin.y = yPos; - labelF.origin.x = round((bounds.size.width - labelSize.width) / 2) + xPos; - labelF.size = labelSize; - label.frame = labelF; - yPos += labelF.size.height; - - if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) { - yPos += kPadding; - } - CGRect detailsLabelF; - detailsLabelF.origin.y = yPos; - detailsLabelF.origin.x = round((bounds.size.width - detailsLabelSize.width) / 2) + xPos; - detailsLabelF.size = detailsLabelSize; - detailsLabel.frame = detailsLabelF; - - // Enforce minsize and quare rules - if (square) { - CGFloat max = MAX(totalSize.width, totalSize.height); - if (max <= bounds.size.width - 2 * margin) { - totalSize.width = max; - } - if (max <= bounds.size.height - 2 * margin) { - totalSize.height = max; - } - } - if (totalSize.width < minSize.width) { - totalSize.width = minSize.width; - } - if (totalSize.height < minSize.height) { - totalSize.height = minSize.height; - } - - size = totalSize; -} - -#pragma mark BG Drawing - -- (void)drawRect:(CGRect)rect { - - CGContextRef context = UIGraphicsGetCurrentContext(); - UIGraphicsPushContext(context); - - if (self.dimBackground) { - //Gradient colours - size_t gradLocationsNum = 2; - CGFloat gradLocations[2] = {0.0f, 1.0f}; - CGFloat gradColors[8] = {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.75f}; - CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, gradColors, gradLocations, gradLocationsNum); - CGColorSpaceRelease(colorSpace); - //Gradient center - CGPoint gradCenter= CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); - //Gradient radius - float gradRadius = MIN(self.bounds.size.width , self.bounds.size.height) ; - //Gradient draw - CGContextDrawRadialGradient (context, gradient, gradCenter, - 0, gradCenter, gradRadius, - kCGGradientDrawsAfterEndLocation); - CGGradientRelease(gradient); - } - - // Set background rect color - if (self.color) { - CGContextSetFillColorWithColor(context, self.color.CGColor); - } else { - CGContextSetGrayFillColor(context, 0.0f, self.opacity); - } - - - // Center HUD - CGRect allRect = self.bounds; - // Draw rounded HUD backgroud rect - CGRect boxRect = CGRectMake(round((allRect.size.width - size.width) / 2) + self.xOffset, - round((allRect.size.height - size.height) / 2) + self.yOffset, size.width, size.height); - float radius = self.cornerRadius; - CGContextBeginPath(context); - CGContextMoveToPoint(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect)); - CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMinY(boxRect) + radius, radius, 3 * (float)M_PI / 2, 0, 0); - CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMaxY(boxRect) - radius, radius, 0, (float)M_PI / 2, 0); - CGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMaxY(boxRect) - radius, radius, (float)M_PI / 2, (float)M_PI, 0); - CGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect) + radius, radius, (float)M_PI, 3 * (float)M_PI / 2, 0); - CGContextClosePath(context); - CGContextFillPath(context); - - UIGraphicsPopContext(); -} - -#pragma mark - KVO - -- (void)registerForKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; - } -} - -- (void)unregisterFromKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self removeObserver:self forKeyPath:keyPath]; - } -} - -- (NSArray *)observableKeypaths { - return [NSArray arrayWithObjects:@"mode", @"customView", @"labelText", @"labelFont", @"labelColor", - @"detailsLabelText", @"detailsLabelFont", @"detailsLabelColor", @"progress", @"activityIndicatorColor", nil]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if (![NSThread isMainThread]) { - [self performSelectorOnMainThread:@selector(updateUIForKeypath:) withObject:keyPath waitUntilDone:NO]; - } else { - [self updateUIForKeypath:keyPath]; - } -} - -- (void)updateUIForKeypath:(NSString *)keyPath { - if ([keyPath isEqualToString:@"mode"] || [keyPath isEqualToString:@"customView"] || - [keyPath isEqualToString:@"activityIndicatorColor"]) { - [self updateIndicators]; - } else if ([keyPath isEqualToString:@"labelText"]) { - label.text = self.labelText; - } else if ([keyPath isEqualToString:@"labelFont"]) { - label.font = self.labelFont; - } else if ([keyPath isEqualToString:@"labelColor"]) { - label.textColor = self.labelColor; - } else if ([keyPath isEqualToString:@"detailsLabelText"]) { - detailsLabel.text = self.detailsLabelText; - } else if ([keyPath isEqualToString:@"detailsLabelFont"]) { - detailsLabel.font = self.detailsLabelFont; - } else if ([keyPath isEqualToString:@"detailsLabelColor"]) { - detailsLabel.textColor = self.detailsLabelColor; - } else if ([keyPath isEqualToString:@"progress"]) { - if ([indicator respondsToSelector:@selector(setProgress:)]) { - [(id)indicator setValue:@(progress) forKey:@"progress"]; - } - return; - } - [self setNeedsLayout]; - [self setNeedsDisplay]; -} - -#pragma mark - Notifications - -- (void)registerForNotifications { -#if !TARGET_OS_TV - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - - [nc addObserver:self selector:@selector(statusBarOrientationDidChange:) - name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; -#endif -} - -- (void)unregisterFromNotifications { -#if !TARGET_OS_TV - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; -#endif -} - -#if !TARGET_OS_TV -- (void)statusBarOrientationDidChange:(NSNotification *)notification { - UIView *superview = self.superview; - if (!superview) { - return; - } else { - [self updateForCurrentOrientationAnimated:YES]; - } -} -#endif - -- (void)updateForCurrentOrientationAnimated:(BOOL)animated { - // Stay in sync with the superview in any case - if (self.superview) { - self.bounds = self.superview.bounds; - [self setNeedsDisplay]; - } - - // Not needed on iOS 8+, compile out when the deployment target allows, - // to avoid sharedApplication problems on extension targets -#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 - // Only needed pre iOS 7 when added to a window - BOOL iOS8OrLater = kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0; - if (iOS8OrLater || ![self.superview isKindOfClass:[UIWindow class]]) return; - - UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; - CGFloat radians = 0; - if (UIInterfaceOrientationIsLandscape(orientation)) { - if (orientation == UIInterfaceOrientationLandscapeLeft) { radians = -(CGFloat)M_PI_2; } - else { radians = (CGFloat)M_PI_2; } - // Window coordinates differ! - self.bounds = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.width); - } else { - if (orientation == UIInterfaceOrientationPortraitUpsideDown) { radians = (CGFloat)M_PI; } - else { radians = 0; } - } - rotationTransform = CGAffineTransformMakeRotation(radians); - - if (animated) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:0.3]; - } - [self setTransform:rotationTransform]; - if (animated) { - [UIView commitAnimations]; - } -#endif -} - -@end - - -@implementation MBRoundProgressView - -#pragma mark - Lifecycle - -- (id)init { - return [self initWithFrame:CGRectMake(0.f, 0.f, 37.f, 37.f)]; -} - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - self.backgroundColor = [UIColor clearColor]; - self.opaque = NO; - _progress = 0.f; - _annular = NO; - _progressTintColor = [[UIColor alloc] initWithWhite:1.f alpha:1.f]; - _backgroundTintColor = [[UIColor alloc] initWithWhite:1.f alpha:.1f]; - [self registerForKVO]; - } - return self; -} - -- (void)dealloc { - [self unregisterFromKVO]; -#if !__has_feature(objc_arc) - [_progressTintColor release]; - [_backgroundTintColor release]; - [super dealloc]; -#endif -} - -#pragma mark - Drawing - -- (void)drawRect:(CGRect)rect { - - CGRect allRect = self.bounds; - CGRect circleRect = CGRectInset(allRect, 2.0f, 2.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - - if (_annular) { - // Draw background - BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; - CGFloat lineWidth = isPreiOS7 ? 5.f : 2.f; - UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath]; - processBackgroundPath.lineWidth = lineWidth; - processBackgroundPath.lineCapStyle = kCGLineCapButt; - CGPoint center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); - CGFloat radius = (self.bounds.size.width - lineWidth)/2; - CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees - CGFloat endAngle = (2 * (float)M_PI) + startAngle; - [processBackgroundPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; - [_backgroundTintColor set]; - [processBackgroundPath stroke]; - // Draw progress - UIBezierPath *processPath = [UIBezierPath bezierPath]; - processPath.lineCapStyle = isPreiOS7 ? kCGLineCapRound : kCGLineCapSquare; - processPath.lineWidth = lineWidth; - endAngle = (self.progress * 2 * (float)M_PI) + startAngle; - [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; - [_progressTintColor set]; - [processPath stroke]; - } else { - // Draw background - [_progressTintColor setStroke]; - [_backgroundTintColor setFill]; - CGContextSetLineWidth(context, 2.0f); - CGContextFillEllipseInRect(context, circleRect); - CGContextStrokeEllipseInRect(context, circleRect); - // Draw progress - CGPoint center = CGPointMake(allRect.size.width / 2, allRect.size.height / 2); - CGFloat radius = (allRect.size.width - 4) / 2; - CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees - CGFloat endAngle = (self.progress * 2 * (float)M_PI) + startAngle; - [_progressTintColor setFill]; - CGContextMoveToPoint(context, center.x, center.y); - CGContextAddArc(context, center.x, center.y, radius, startAngle, endAngle, 0); - CGContextClosePath(context); - CGContextFillPath(context); - } -} - -#pragma mark - KVO - -- (void)registerForKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; - } -} - -- (void)unregisterFromKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self removeObserver:self forKeyPath:keyPath]; - } -} - -- (NSArray *)observableKeypaths { - return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", @"progress", @"annular", nil]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - [self setNeedsDisplay]; -} - -@end - - -@implementation MBBarProgressView - -#pragma mark - Lifecycle - -- (id)init { - return [self initWithFrame:CGRectMake(.0f, .0f, 120.0f, 20.0f)]; -} - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - _progress = 0.f; - _lineColor = [UIColor whiteColor]; - _progressColor = [UIColor whiteColor]; - _progressRemainingColor = [UIColor clearColor]; - self.backgroundColor = [UIColor clearColor]; - self.opaque = NO; - [self registerForKVO]; - } - return self; -} - -- (void)dealloc { - [self unregisterFromKVO]; -#if !__has_feature(objc_arc) - [_lineColor release]; - [_progressColor release]; - [_progressRemainingColor release]; - [super dealloc]; -#endif -} - -#pragma mark - Drawing - -- (void)drawRect:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - - CGContextSetLineWidth(context, 2); - CGContextSetStrokeColorWithColor(context,[_lineColor CGColor]); - CGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]); - - // Draw background - float radius = (rect.size.height / 2) - 2; - CGContextMoveToPoint(context, 2, rect.size.height/2); - CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); - CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); - CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); - CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); - CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); - CGContextFillPath(context); - - // Draw border - CGContextMoveToPoint(context, 2, rect.size.height/2); - CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); - CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); - CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); - CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); - CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); - CGContextStrokePath(context); - - CGContextSetFillColorWithColor(context, [_progressColor CGColor]); - radius = radius - 2; - float amount = self.progress * rect.size.width; - - // Progress in the middle area - if (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) { - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); - CGContextAddLineToPoint(context, amount, 4); - CGContextAddLineToPoint(context, amount, radius + 4); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); - CGContextAddLineToPoint(context, amount, rect.size.height - 4); - CGContextAddLineToPoint(context, amount, radius + 4); - - CGContextFillPath(context); - } - - // Progress in the right arc - else if (amount > radius + 4) { - float x = amount - (rect.size.width - radius - 4); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 4, 4); - float angle = -acos(x/radius); - if (isnan(angle)) angle = 0; - CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, M_PI, angle, 0); - CGContextAddLineToPoint(context, amount, rect.size.height/2); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 4, rect.size.height - 4); - angle = acos(x/radius); - if (isnan(angle)) angle = 0; - CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1); - CGContextAddLineToPoint(context, amount, rect.size.height/2); - - CGContextFillPath(context); - } - - // Progress is in the left arc - else if (amount < radius + 4 && amount > 0) { - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); - CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); - CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); - - CGContextFillPath(context); - } -} - -#pragma mark - KVO - -- (void)registerForKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; - } -} - -- (void)unregisterFromKVO { - for (NSString *keyPath in [self observableKeypaths]) { - [self removeObserver:self forKeyPath:keyPath]; - } -} - -- (NSArray *)observableKeypaths { - return [NSArray arrayWithObjects:@"lineColor", @"progressRemainingColor", @"progressColor", @"progress", nil]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - [self setNeedsDisplay]; -} - -@end diff --git a/Demos/iOS/MasterViewController.h b/Demos/iOS/MasterViewController.h deleted file mode 100644 index 02ded327..00000000 --- a/Demos/iOS/MasterViewController.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// MasterViewController.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface MasterViewController : UITableViewController -@end diff --git a/Demos/iOS/MasterViewController.m b/Demos/iOS/MasterViewController.m deleted file mode 100644 index 9f7c61d6..00000000 --- a/Demos/iOS/MasterViewController.m +++ /dev/null @@ -1,95 +0,0 @@ -// -// MasterViewController.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "MasterViewController.h" - -#import "KivaViewController.h" -#import "GitHubViewController.h" -#import "StorageViewController.h" -#import "KivaViewControllerNetworking.h" - -#import "JSONModel+networking.h" - -@interface MasterViewController () { - NSMutableArray *_objects; -} -@end - -@implementation MasterViewController - --(void)viewDidAppear:(BOOL)animated -{ - -} - --(IBAction)actionLoadCall:(id)sender -{ - -} - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - self.title = @"Demos"; - _objects = [NSMutableArray arrayWithArray:@[@"Kiva.org demo", @"GitHub demo", @"Used for storage"]]; - } - return self; -} - -#pragma mark - Table View -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return _objects.count; -} - -// Customize the appearance of table view cells. -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - NSDate *object = _objects[indexPath.row]; - cell.textLabel.text = [object description]; - return cell; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - switch (indexPath.row) { - case 0:{ - KivaViewController* kiva = [[KivaViewController alloc] initWithNibName:@"KivaViewController" bundle:nil]; - [self.navigationController pushViewController:kiva animated:YES]; - }break; - - case 1:{ - GitHubViewController* gh = [[GitHubViewController alloc] initWithNibName:@"GitHubViewController" bundle:nil]; - [self.navigationController pushViewController:gh animated:YES]; - }break; - - case 2:{ - StorageViewController* sc = [[StorageViewController alloc] initWithNibName:@"StorageViewController" bundle:nil]; - [self.navigationController pushViewController:sc animated:YES]; - }break; - - default: - break; - } -} - -@end diff --git a/Demos/iOS/MyDataModel.h b/Demos/iOS/MyDataModel.h deleted file mode 100644 index df20623b..00000000 --- a/Demos/iOS/MyDataModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// MyDataModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface MyDataModel : JSONModel - -@property (strong, nonatomic) NSString* content; -@property (assign, nonatomic) int timesSaved; - -@end diff --git a/Demos/iOS/MyDataModel.m b/Demos/iOS/MyDataModel.m deleted file mode 100644 index 781f889e..00000000 --- a/Demos/iOS/MyDataModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// MyDataModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "MyDataModel.h" - -@implementation MyDataModel - -@end diff --git a/Demos/iOS/StorageViewController.h b/Demos/iOS/StorageViewController.h deleted file mode 100644 index 1e779100..00000000 --- a/Demos/iOS/StorageViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// StorageViewController.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface StorageViewController : UIViewController - -@end diff --git a/Demos/iOS/StorageViewController.m b/Demos/iOS/StorageViewController.m deleted file mode 100644 index a586aa3f..00000000 --- a/Demos/iOS/StorageViewController.m +++ /dev/null @@ -1,67 +0,0 @@ -// -// StorageViewController.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "StorageViewController.h" -#import "MyDataModel.h" - -@interface StorageViewController () -{ - IBOutlet UITextField* txtContent; - IBOutlet UILabel* lblTimes; - - NSString* filePath; - MyDataModel* data; -} - -@end - -@implementation StorageViewController - --(void)viewDidAppear:(BOOL)animated -{ - NSString* libraryDir = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory , NSUserDomainMask, YES)[0]; - filePath = [libraryDir stringByAppendingPathComponent:@"saved.plist"]; - - [self loadFromFile]; -} - --(void)loadFromFile -{ - //load from file - NSDictionary* object = [NSDictionary dictionaryWithContentsOfFile:filePath]; - - //initialize model with data - JSONModelError* initError; - data = [[MyDataModel alloc] initWithDictionary: object error:&initError]; - - if (!data) { - data = [[MyDataModel alloc] init]; - } - - //update the UI - lblTimes.text = [NSString stringWithFormat:@"Times saved: %i", data.timesSaved]; - txtContent.text = data.content; -} - --(IBAction)actionSave:(id)sender -{ - [txtContent resignFirstResponder]; - - //update model - data.timesSaved++; - data.content = txtContent.text; - - //update UI - lblTimes.text = [NSString stringWithFormat:@"Times saved: %i", data.timesSaved]; - - //save to disc - [[data toDictionary] writeToFile:filePath atomically:YES]; - NSLog(@"%@", [data toDictionary]); -} - -@end diff --git a/Demos/iOS/StorageViewController.xib b/Demos/iOS/StorageViewController.xib deleted file mode 100644 index 1cda668e..00000000 --- a/Demos/iOS/StorageViewController.xib +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - This screen uses a JSONModel object to save data to the device's disc. The model persists the text that you can edit in the text box below + the number of times you saved to the file. - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demos/iOS/btnCheck.png b/Demos/iOS/btnCheck.png deleted file mode 100644 index fbab71ddf26edc71549235bdbc128f5bb961aa45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1334 zcmV-61g$jY+W6wudC-twn-Z$TenplIjq)0*OLJLx(SGkjI0+5 zg>RsGYHI3nRi>%{stN%2u?sMpOrJ!HqTazUFWu(x!icxtKJ>0KHdY1AXaN4$1ei?5 zV)0gS5l(P0oFIS+0mouwF~Wj^f)8NGGk}Po0%{C3q)w+3LX|)&S4(a*8Ve*6iJk+b zG+><^0tcWcf$iIu8h1jg{Sb!k;08{vt*MD3V`JN+L{Wc2^Ax}im|ZD(Q&ZEMGO6S& z2Qe-dRQ3PbqC}!Zcs#qrff%{G8UiO-p-|+Nm6e@?uAP8QDs7U9*@r_V5JDO z1F&+s&Y+{CW4fxUsvm`gpMaK@i@GgaHXlQSxqys}jQzz$Mdk2QT;TV+WY3Mpy(CF~ z6~^ZaACdtv7YSLg9`#@E>YDxR%$c6~`T6TGt!Hry&Yw5GER)JAI1nflShnCFh2`bt z<-p+SYJ=e;=okXHg9O|TQbD%z`FzO|w|&|-Zr+$H*Xw_Axm-U$^Ls!a0XAa^@$qqF zEZG{y50l^=Q0of_proghc7d%zi^b9dlcq5CyMof(+$@vF#I%PC!gq24=K=@-dZ)#5 z+XY;AW@cut!nE%IcK|cA13>(WKp=RER*F+Tve_pWKde@(U2}8OCbRid=&%7ETxk9> zS|*cSij0WZ6ZBhQUSYNN%$Jsy_D)SrbucUc6_KM6v;%2rFaDmmE0I)g-=4gnoCzM- z4z|tXaXGv9?0#-`c4oe}x3~ZF=~JGR=Tk0-M51i}RpWjR^!4?-OG--m#>dBh1j26t zR=_m7F*rJma2)5M99^L=H{|9X$f4*c@b`dS;P}LZtG4#+$H$HyNl+@4YAQsc7#J9I zzkl-NU5CSQl_9qPCViuX6@W2O9#>geS$!Zk=haYWq}%QGK)?~pi9}^+c;tRzVc~$y zW<$1L0o-E9y}s}A6~Ky!HyEmGUdztjj|Cy1f}|BZVB7z)*&b-L+QFfrVMN{r_!%$} zNFGc8D?PV|13uyN&qV&!E83wLq<$nX2FYwK$Lqm z8tq7TcXubV@-D#N08gk48cF~yg3IM5f`~8D)6-M^BF%?o!40MYXIk? z$X9wN+ysZy-b*blx9p>%lzsFbjZx+~IB?gSot=eF&StraUcNmx z=AgzLb{c<-jCcv)QivTr%Tow5$Z^Z(!So}g;+ZC(R>7?xTQEz^J{ypfw3^)o< zu9|!e*K&bWDotx|Z|~9R-b07U*MQ@IC)Py1f*=f5A^=H%WG1JhB!gn${(1?Zoj|uL sbRsh8bxq{!_Rr{%4*akGoc=4o04zDvJ>92s{Qv*}07*qoM6N<$f`j#UtN;K2 diff --git a/Demos/iOS/btnCheck@2x.png b/Demos/iOS/btnCheck@2x.png deleted file mode 100644 index 1071f3eb270736fadaf1aeb3aeb67edfcf7251f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3252 zcmV;l3`_HgP)9Rv8Fx}p$0W=O;WYuQ9c&=eGWAYiKjR50k#o|5+1oW^Pz zTaBqP%0m{SIg%Ps5H=#>I=y%1zcY7-4o zZvJ^jz%v4#5zx&)Kd>l(cJJO5mXea<1De21IbzXt z3j#K7*x=*q<5#57XxyD$^bv7!algmi?mzwu{Kz)Vhq&}YW z@$(xV8yovueA3sJKj^9i@cZ}gOYY@rc$?#4(es=lG9gl9%;?dxX3m^B&6YptiUgp& zd$X6iySc|BjRqs(IfONi$R8p{+{Yuy3V7VcO?)386&blYC@5$o{(et(DReagP*zsv zFN~gEDFh@EogDxtKt(b*vCZRuc(D(O_w+OvdM{qQcr*SANs^o>30;W*l#!7!$;;@K zrGP~slnCj_Aq3}Ao977`Jm>4%GarTkl$(>gaP_LyZouA?BoFP{ zxpT~O0|p$^Xf--w-XduB4=GE502T?r=VF`VWpZA6Y3%G7GiFT2&+J3|0pDTM%glVE zuZR2Y(9qDojv6(}6Zh%cOEc~DNl#B7?Ca-y9D{d6vT0Kb;6?DnOO`AlxwiL{AYtp)tv&$*2mV8+)wvN! zJOH6u7Aqdn=}F*u(I1GgrF-aoU^S)+Q+?vvq|flzh!UOKC1B~2B|ZK9{R?$ktw9<9 zaYmzY?D}=sAt7O1H^n4~>c z7{DB}1Z1ZO_aWuHva<5ts#UAX&1Unr`0+$;Vrgt^(kSmh?&3au`plugiJ9>{buv6R zeE9IG$;rt{P<8dN7YXy`&C`u}VGK@jox)k|vchQqq=uS04@-j~14(^VRaMO^S0V z@8f0-mL}!q&SiPWjvdQ&bu~mw!>Q*cZ~~bRVrM|^5~Q{OXW~VH`>wkBeoRbEd3AMl z1@5_k<#Qn5I+iD{YWwDmwTb}7a)7ZB~IR3Sx4)zvkYWy_XTVDLoqUt#$I%VjK81Uwc? z3j!h|XF3E2kIZv$aPXEH=M+|v^=zc;cv7!Ue)YY(jg1Yd+qUK4&RbZTACd%ASXdbE z;o-5IA``6>MkKR9fKY79`bVltU%GnxcAX_QHm(wze+6j#b2WH!x0(Qc?%cUa27~L% zbPxfIUEx@;QVlM<#XcU#*BP(R*nmB3ZT8;1$8l#Zmirwf0p;f(!YOXQWcFsVmIYbs z3gM6hGgJu7AUxM_`}TvSOP76p?b@{p0DT^g#O%L^dBOY@AAkJ%h68Zd2o)%suZMJb35?KCJ_$+x+_Bg8XS-Ui}Z_nnfqDPZXGTOIILTgiH%G zu$O3Li zBOc$@Jmjzy8y9CTDK6O~h7p=WlaNOe4GrznV6)W7#RadCGA!{3A%}>eXV2a-ixy>0 z7(YG)%1>L)79BctFxX#AakY-p7)t08$EI_k;~_}FG7&_TjbEg!A&EBCSx+d<;+ea#eYbEM^78q27BaKnYeMMy8{mbGY>VFm z&s~|Eyd^ikpx{edbnr}SDQAMrQKMnna^WHM8I7KUQ&Us2yo|;HgoOC`<%W=u=l|@4 z(`)uQyp`s8Yi+B9S_i?kHgWB@Cr+Fo;7cLSlQsV}mfIbPLRL`#(pi$$4#e`KHEUMC z6BQX5B-rryG!0?n15)`br4w+p=X#bxuyM8hiyU=+KZ`-!5CMzqOft(Y2HJFg_{?@JYr@Z#sAfzr#R5>EDY1#r) z)F`>7`g-f(UirrEjNP}=($XpT&q4F$0REwCkk$xbNpJ@eLetW=&wu5WNdvhS0BkP- zHINqfvpJUh9f7Gdl_P2WY2UuO&6|@;aPtai{yc#1bOF{D0W1l9sU_^%xpU#9NfZ6# zLP#JXN-0k`SPsaBeF#udBCAAF`T{}CCj^{ZE}DF(nS_(v+i+ao|t!VsNK zH!3|neg4FW6MfaDD=^x!9UZI}h`^YFdI_*kIDY(i!}8_vB>?yfF#R%n>_2pb07`-* zwFFE;*q%KZ3&xEb_ne|zsd6LMV7+?f+EyG#(K_8vV68+29UuNu^pQC>Hn!Aav0MT0 z=VAR*@DCnozrBM5uq1d;OW2#8wQy`igtuh9l5Mm4RiXslORz4o@!(MKQGz(8_!hXo zpZNIBqL`QxoadK=vpWZx|IQxZAC>?$2}AXIeOPvO_JS8*{BeJ^-*3N&Zaa%Oefo6c zym|8ocoTppW?ur}@7e==X9%Dq=qU*}r49dJ|NaHx;o(Ns^@CDvrG--7z}YUP$%V7$ z&fT3m_pQ>##zq!=F@SHh7x>N+z>?5UBEcy3l}alz4>Nz zso88cF`JkK{Qv9?{!s`}lMv`?FuahH`@#Is&`=Knvcq=sTS4}ZqQzYL>his)sHoE0 z_4RZI_Z$QMj=jM@Dgl%PCz%9S*U<+K z;Uz|6TQ&XDB!Gh&Uk~rv0u2Vk=z@a$1;HbO-H~b)&>c0{)|YqMuYP^C`Hh(~%d4uY zOi;_8g)ObB#|hqE1lT0u$dL~h4j(?kt?e=gBdof9f9lj}<=3x^+t**hn*WNvxOkl4 z?fC-<3uub0)#Cd4`hU-w6`gtca`7!*eyPdqCczHSjT<*CQBkuhFnIdn;=HZB`>sGh z3leVLym=-%Iy$Sgw4|2)Oof%Y+FA>~UTHF!Z0+4Y5%7|6+W*JWWI4FNUcz)w&wg9} z_35Xz)z#k#L~5{Hxl(Eg4h|;k{cl)Ou#i__Be3*pWe2%S5x|l_D##h$-rj#WbLO+U znwn~%veIM;3kxG!CofLO>-D)<$gj70KXLGnkpM~pc_%=2l3w@q^+`Q->g3Jw1qB+IKeLQLC^l{ mY&ZWrBj6bU-Td=^0R{kiNRO)@qT$B?0000(y diff --git a/Demos/iOS/en.lproj/InfoPlist.strings b/Demos/iOS/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/Demos/iOS/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Demos/iOS/en.lproj/MasterViewController.xib b/Demos/iOS/en.lproj/MasterViewController.xib deleted file mode 100644 index 4e642eb7..00000000 --- a/Demos/iOS/en.lproj/MasterViewController.xib +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demos/iOS/main.m b/Demos/iOS/main.m deleted file mode 100644 index b332e8bf..00000000 --- a/Demos/iOS/main.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// main.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -#import "AppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/Demos/macOS.xcodeproj/project.pbxproj b/Demos/macOS.xcodeproj/project.pbxproj deleted file mode 100644 index d67f851d..00000000 --- a/Demos/macOS.xcodeproj/project.pbxproj +++ /dev/null @@ -1,953 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1AE9CA931C21F50C00B8F5C1 /* RenamedPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */; }; - 1C008FE518B7AE54002DFD3A /* ModelForUpperCaseMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */; }; - 9C05B43F168CEB220054215E /* ArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3F7168CEB220054215E /* ArrayTests.m */; }; - 9C05B440168CEB220054215E /* BuiltInConversionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */; }; - 9C05B442168CEB220054215E /* CustomPropsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B3FD168CEB220054215E /* CustomPropsTests.m */; }; - 9C05B443168CEB220054215E /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B3FF168CEB220054215E /* colors.json */; }; - 9C05B444168CEB220054215E /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B400168CEB220054215E /* converts.json */; }; - 9C05B445168CEB220054215E /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B401168CEB220054215E /* github-iphone.json */; }; - 9C05B446168CEB220054215E /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B402168CEB220054215E /* jsonTypes.json */; }; - 9C05B447168CEB220054215E /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B403168CEB220054215E /* nestedData.json */; }; - 9C05B449168CEB220054215E /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B405168CEB220054215E /* post.json */; }; - 9C05B44A168CEB220054215E /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B406168CEB220054215E /* primitives.json */; }; - 9C05B44B168CEB220054215E /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B407168CEB220054215E /* primitivesWithErrors.json */; }; - 9C05B44C168CEB220054215E /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B408168CEB220054215E /* withOptProp.json */; }; - 9C05B44D168CEB220054215E /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B409168CEB220054215E /* withoutOptProp.json */; }; - 9C05B44E168CEB220054215E /* IdPropertyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B40B168CEB220054215E /* IdPropertyTests.m */; }; - 9C05B44F168CEB220054215E /* JSONTypesModelWithValidation1.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */; }; - 9C05B450168CEB220054215E /* JSONTypesModelWithValidation2.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */; }; - 9C05B451168CEB220054215E /* JSONTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B411168CEB220054215E /* JSONTypesReadTests.m */; }; - 9C05B452168CEB220054215E /* JSONValueTransformer+UIColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */; }; - 9C05B453168CEB220054215E /* KeyMappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B415168CEB220054215E /* KeyMappingTests.m */; }; - 9C05B454168CEB220054215E /* NestedModelsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B417168CEB220054215E /* NestedModelsTests.m */; }; - 9C05B455168CEB220054215E /* OptionalPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */; }; - 9C05B456168CEB220054215E /* PersistTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B41B168CEB220054215E /* PersistTests.m */; }; - 9C05B457168CEB220054215E /* PrimitiveTypesReadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B41D168CEB220054215E /* PrimitiveTypesReadTests.m */; }; - 9C05B458168CEB220054215E /* SimpleDataErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B41F168CEB220054215E /* SimpleDataErrorTests.m */; }; - 9C05B459168CEB220054215E /* BuiltInConversionsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B422168CEB220054215E /* BuiltInConversionsModel.m */; }; - 9C05B45A168CEB220054215E /* CustomPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B424168CEB220054215E /* CustomPropertyModel.m */; }; - 9C05B45B168CEB220054215E /* GitHubKeyMapRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B426168CEB220054215E /* GitHubKeyMapRepoModel.m */; }; - 9C05B45C168CEB220054215E /* GitHubKeyMapRepoModelDict.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B428168CEB220054215E /* GitHubKeyMapRepoModelDict.m */; }; - 9C05B45D168CEB220054215E /* GitHubRepoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B42A168CEB220054215E /* GitHubRepoModel.m */; }; - 9C05B45E168CEB220054215E /* GitHubRepoModelForUSMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B42C168CEB220054215E /* GitHubRepoModelForUSMapper.m */; }; - 9C05B45F168CEB220054215E /* ImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B42E168CEB220054215E /* ImageModel.m */; }; - 9C05B460168CEB220054215E /* JSONTypesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B430168CEB220054215E /* JSONTypesModel.m */; }; - 9C05B461168CEB220054215E /* NestedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B432168CEB220054215E /* NestedModel.m */; }; - 9C05B462168CEB220054215E /* OptionalPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B434168CEB220054215E /* OptionalPropModel.m */; }; - 9C05B463168CEB220054215E /* PostModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B436168CEB220054215E /* PostModel.m */; }; - 9C05B464168CEB220054215E /* PostsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B438168CEB220054215E /* PostsModel.m */; }; - 9C05B465168CEB220054215E /* PrimitivesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B43A168CEB220054215E /* PrimitivesModel.m */; }; - 9C05B466168CEB220054215E /* ReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B43C168CEB220054215E /* ReposModel.m */; }; - 9C05B467168CEB220054215E /* ValidationTestSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C05B43E168CEB220054215E /* ValidationTestSuite.m */; }; - 9C08C1AF1749750100AA8CC9 /* CopyrightModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */; }; - 9C66DF47168CEECF0015CCDF /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B3FF168CEB220054215E /* colors.json */; }; - 9C66DF48168CEECF0015CCDF /* converts.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B400168CEB220054215E /* converts.json */; }; - 9C66DF49168CEECF0015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B401168CEB220054215E /* github-iphone.json */; }; - 9C66DF4A168CEECF0015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B402168CEB220054215E /* jsonTypes.json */; }; - 9C66DF4B168CEECF0015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B403168CEB220054215E /* nestedData.json */; }; - 9C66DF4D168CEECF0015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B405168CEB220054215E /* post.json */; }; - 9C66DF4E168CEECF0015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B406168CEB220054215E /* primitives.json */; }; - 9C66DF4F168CEECF0015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B407168CEB220054215E /* primitivesWithErrors.json */; }; - 9C66DF50168CEECF0015CCDF /* withOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B408168CEB220054215E /* withOptProp.json */; }; - 9C66DF51168CEECF0015CCDF /* withoutOptProp.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B409168CEB220054215E /* withoutOptProp.json */; }; - 9C66DFF6168CF09A0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFDF168CF09A0015CCDF /* JSONModel.m */; }; - 9C66DFF7168CF09A0015CCDF /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFDF168CF09A0015CCDF /* JSONModel.m */; }; - 9C66DFFA168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */; }; - 9C66DFFB168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */; }; - 9C66DFFC168CF09A0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */; }; - 9C66DFFD168CF09A0015CCDF /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */; }; - 9C66E000168CF09A0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */; }; - 9C66E001168CF09A0015CCDF /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */; }; - 9C66E002168CF09A0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */; }; - 9C66E003168CF09A0015CCDF /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */; }; - 9C66E004168CF09A0015CCDF /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */; }; - 9C66E005168CF09A0015CCDF /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */; }; - 9C66E006168CF09A0015CCDF /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */; }; - 9C66E007168CF09A0015CCDF /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */; }; - 9C66E008168CF09A0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */; }; - 9C66E009168CF09A0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */; }; - 9C6C35DF181CF7B500BEE72D /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */; }; - 9C6C35E0181CF7B500BEE72D /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */; }; - 9C6C35E1181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */; }; - 9C6C35E2181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */; }; - 9C72A49D171447F70047C6AE /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */; }; - 9C735D67170B717F00FF96F5 /* JSONAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D66170B717F00FF96F5 /* JSONAPITests.m */; }; - 9C735D6D170B7A2D00FF96F5 /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */; }; - 9C735D73170C048C00FF96F5 /* InitFromWebTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */; }; - 9C97441C168CF255004DA333 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C97441B168CF255004DA333 /* Cocoa.framework */; }; - 9C97441E168CF264004DA333 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C97441D168CF264004DA333 /* Cocoa.framework */; }; - 9CB6BC2E168E07730002535B /* GitHubUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB6BC2D168E07730002535B /* GitHubUserModel.m */; }; - 9CC27C9C1689B7BE008B5411 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */; }; - 9CC27C9E1689B7BE008B5411 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27C9D1689B7BE008B5411 /* main.m */; }; - 9CC27CA21689B7BE008B5411 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27CA01689B7BE008B5411 /* Credits.rtf */; }; - 9CC27CA51689B7BE008B5411 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27CA41689B7BE008B5411 /* AppDelegate.m */; }; - 9CC27CA81689B7BE008B5411 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27CA61689B7BE008B5411 /* MainMenu.xib */; }; - 9CC27CCD1689B92A008B5411 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC27CCB1689B92A008B5411 /* ViewController.m */; }; - 9CC27CCE1689B92A008B5411 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9CC27CCC1689B92A008B5411 /* ViewController.xib */; }; - 9CC2FCB9168CE7340059FE67 /* KivaFeed.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC2FCB4168CE7340059FE67 /* KivaFeed.m */; }; - 9CC2FCBA168CE7340059FE67 /* LoanModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC2FCB6168CE7340059FE67 /* LoanModel.m */; }; - 9CC2FCBB168CE7340059FE67 /* LocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CC2FCB8168CE7340059FE67 /* LocationModel.m */; }; - 9CCAFD941901B7F500314886 /* SpecialPropertiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CCAFD931901B7F500314886 /* SpecialPropertiesTests.m */; }; - 9CD22C8618FF32F7003E66AD /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */; }; - 9CD425861702224F00A42AA1 /* HTTPClientSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD425851702224F00A42AA1 /* HTTPClientSuite.m */; }; - 9CD4258B170222AF00A42AA1 /* MockNSURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD42588170222AF00A42AA1 /* MockNSURLConnection.m */; }; - 9CD4258C170222AF00A42AA1 /* MTTestSemaphor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CD4258A170222AF00A42AA1 /* MTTestSemaphor.m */; }; - 9CFDD0A4176E9742007B7DFA /* EnumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CFDD0A3176E9742007B7DFA /* EnumModel.m */; }; - D5F918E5172AD99600AC2C8E /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */; }; - D5F918EB172ADA3F00AC2C8E /* SpecialPropertyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */; }; - D5F918EE172ADAF900AC2C8E /* SpecialPropertyNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D5F918ED172ADAF800AC2C8E /* SpecialPropertyNameTests.m */; }; - D5F918EF172ADC2400AC2C8E /* specialPropertyName.json in Resources */ = {isa = PBXBuildFile; fileRef = D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1AE9CA911C21F50C00B8F5C1 /* RenamedPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenamedPropertyModel.h; sourceTree = ""; }; - 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RenamedPropertyModel.m; sourceTree = ""; }; - 1C008FE318B7AE54002DFD3A /* ModelForUpperCaseMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelForUpperCaseMapper.h; sourceTree = ""; }; - 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelForUpperCaseMapper.m; sourceTree = ""; }; - 9C05B2A8168CE9600054215E /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 9C05B2B0168CE9600054215E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info.plist"; sourceTree = ""; }; - 9C05B3F6168CEB220054215E /* ArrayTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayTests.h; sourceTree = ""; }; - 9C05B3F7168CEB220054215E /* ArrayTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArrayTests.m; sourceTree = ""; }; - 9C05B3F8168CEB220054215E /* BuiltInConversionsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsTests.h; sourceTree = ""; }; - 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsTests.m; sourceTree = ""; }; - 9C05B3FC168CEB220054215E /* CustomPropsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropsTests.h; sourceTree = ""; }; - 9C05B3FD168CEB220054215E /* CustomPropsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropsTests.m; sourceTree = ""; }; - 9C05B3FF168CEB220054215E /* colors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = colors.json; sourceTree = ""; }; - 9C05B400168CEB220054215E /* converts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = converts.json; sourceTree = ""; }; - 9C05B401168CEB220054215E /* github-iphone.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "github-iphone.json"; sourceTree = ""; }; - 9C05B402168CEB220054215E /* jsonTypes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = jsonTypes.json; sourceTree = ""; }; - 9C05B403168CEB220054215E /* nestedData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedData.json; sourceTree = ""; }; - 9C05B405168CEB220054215E /* post.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = post.json; sourceTree = ""; }; - 9C05B406168CEB220054215E /* primitives.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitives.json; sourceTree = ""; }; - 9C05B407168CEB220054215E /* primitivesWithErrors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitivesWithErrors.json; sourceTree = ""; }; - 9C05B408168CEB220054215E /* withOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withOptProp.json; sourceTree = ""; }; - 9C05B409168CEB220054215E /* withoutOptProp.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = withoutOptProp.json; sourceTree = ""; }; - 9C05B40A168CEB220054215E /* IdPropertyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdPropertyTests.h; sourceTree = ""; }; - 9C05B40B168CEB220054215E /* IdPropertyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdPropertyTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C05B40C168CEB220054215E /* JSONTypesModelWithValidation1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation1.h; sourceTree = ""; }; - 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation1.m; sourceTree = ""; }; - 9C05B40E168CEB220054215E /* JSONTypesModelWithValidation2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModelWithValidation2.h; sourceTree = ""; }; - 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModelWithValidation2.m; sourceTree = ""; }; - 9C05B410168CEB220054215E /* JSONTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesReadTests.h; sourceTree = ""; }; - 9C05B411168CEB220054215E /* JSONTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesReadTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C05B412168CEB220054215E /* JSONValueTransformer+UIColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JSONValueTransformer+UIColor.h"; sourceTree = ""; }; - 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "JSONValueTransformer+UIColor.m"; sourceTree = ""; }; - 9C05B414168CEB220054215E /* KeyMappingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyMappingTests.h; sourceTree = ""; }; - 9C05B415168CEB220054215E /* KeyMappingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeyMappingTests.m; sourceTree = ""; }; - 9C05B416168CEB220054215E /* NestedModelsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModelsTests.h; sourceTree = ""; }; - 9C05B417168CEB220054215E /* NestedModelsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModelsTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C05B418168CEB220054215E /* OptionalPropertiesTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropertiesTests.h; sourceTree = ""; }; - 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropertiesTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 9C05B41A168CEB220054215E /* PersistTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistTests.h; sourceTree = ""; }; - 9C05B41B168CEB220054215E /* PersistTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersistTests.m; sourceTree = ""; }; - 9C05B41C168CEB220054215E /* PrimitiveTypesReadTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitiveTypesReadTests.h; sourceTree = ""; }; - 9C05B41D168CEB220054215E /* PrimitiveTypesReadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitiveTypesReadTests.m; sourceTree = ""; }; - 9C05B41E168CEB220054215E /* SimpleDataErrorTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleDataErrorTests.h; sourceTree = ""; }; - 9C05B41F168CEB220054215E /* SimpleDataErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleDataErrorTests.m; sourceTree = ""; }; - 9C05B421168CEB220054215E /* BuiltInConversionsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInConversionsModel.h; sourceTree = ""; }; - 9C05B422168CEB220054215E /* BuiltInConversionsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuiltInConversionsModel.m; sourceTree = ""; }; - 9C05B423168CEB220054215E /* CustomPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPropertyModel.h; sourceTree = ""; }; - 9C05B424168CEB220054215E /* CustomPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPropertyModel.m; sourceTree = ""; }; - 9C05B425168CEB220054215E /* GitHubKeyMapRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModel.h; sourceTree = ""; }; - 9C05B426168CEB220054215E /* GitHubKeyMapRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModel.m; sourceTree = ""; }; - 9C05B427168CEB220054215E /* GitHubKeyMapRepoModelDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubKeyMapRepoModelDict.h; sourceTree = ""; }; - 9C05B428168CEB220054215E /* GitHubKeyMapRepoModelDict.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubKeyMapRepoModelDict.m; sourceTree = ""; }; - 9C05B429168CEB220054215E /* GitHubRepoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModel.h; sourceTree = ""; }; - 9C05B42A168CEB220054215E /* GitHubRepoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModel.m; sourceTree = ""; }; - 9C05B42B168CEB220054215E /* GitHubRepoModelForUSMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitHubRepoModelForUSMapper.h; sourceTree = ""; }; - 9C05B42C168CEB220054215E /* GitHubRepoModelForUSMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitHubRepoModelForUSMapper.m; sourceTree = ""; }; - 9C05B42D168CEB220054215E /* ImageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageModel.h; sourceTree = ""; }; - 9C05B42E168CEB220054215E /* ImageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageModel.m; sourceTree = ""; }; - 9C05B42F168CEB220054215E /* JSONTypesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONTypesModel.h; sourceTree = ""; }; - 9C05B430168CEB220054215E /* JSONTypesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONTypesModel.m; sourceTree = ""; }; - 9C05B431168CEB220054215E /* NestedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NestedModel.h; sourceTree = ""; }; - 9C05B432168CEB220054215E /* NestedModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NestedModel.m; sourceTree = ""; }; - 9C05B433168CEB220054215E /* OptionalPropModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalPropModel.h; sourceTree = ""; }; - 9C05B434168CEB220054215E /* OptionalPropModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OptionalPropModel.m; sourceTree = ""; }; - 9C05B435168CEB220054215E /* PostModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostModel.h; sourceTree = ""; }; - 9C05B436168CEB220054215E /* PostModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostModel.m; sourceTree = ""; }; - 9C05B437168CEB220054215E /* PostsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostsModel.h; sourceTree = ""; }; - 9C05B438168CEB220054215E /* PostsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostsModel.m; sourceTree = ""; }; - 9C05B439168CEB220054215E /* PrimitivesModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrimitivesModel.h; sourceTree = ""; }; - 9C05B43A168CEB220054215E /* PrimitivesModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimitivesModel.m; sourceTree = ""; }; - 9C05B43B168CEB220054215E /* ReposModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReposModel.h; sourceTree = ""; }; - 9C05B43C168CEB220054215E /* ReposModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReposModel.m; sourceTree = ""; }; - 9C05B43D168CEB220054215E /* ValidationTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidationTestSuite.h; sourceTree = ""; }; - 9C05B43E168CEB220054215E /* ValidationTestSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidationTestSuite.m; sourceTree = ""; }; - 9C08C1AD1749750100AA8CC9 /* CopyrightModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyrightModel.h; sourceTree = ""; }; - 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyrightModel.m; sourceTree = ""; }; - 9C66DFDE168CF09A0015CCDF /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFDF168CF09A0015CCDF /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModel.m; sourceTree = ""; }; - 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelClassProperty.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelClassProperty.m; sourceTree = ""; }; - 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelError.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONModelError.m; sourceTree = ""; }; - 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONModelLib.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFEB168CF09A0015CCDF /* JSONAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONAPI.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONAPI.m; sourceTree = ""; }; - 9C66DFED168CF09A0015CCDF /* JSONHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONHTTPClient.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONHTTPClient.m; sourceTree = ""; }; - 9C66DFEF168CF09A0015CCDF /* JSONModel+networking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "JSONModel+networking.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "JSONModel+networking.m"; sourceTree = ""; }; - 9C66DFF2168CF09A0015CCDF /* JSONKeyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONKeyMapper.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONKeyMapper.m; sourceTree = ""; }; - 9C66DFF4168CF09A0015CCDF /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = JSONValueTransformer.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JSONValueTransformer.m; sourceTree = ""; }; - 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithArrayError.json; sourceTree = ""; }; - 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = ""; }; - 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = ""; }; - 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImagesObject.json; sourceTree = ""; }; - 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - 9C735D65170B717F00FF96F5 /* JSONAPITests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPITests.h; sourceTree = ""; }; - 9C735D66170B717F00FF96F5 /* JSONAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPITests.m; sourceTree = ""; }; - 9C735D6B170B7A2D00FF96F5 /* RpcRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RpcRequestModel.h; sourceTree = ""; }; - 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RpcRequestModel.m; sourceTree = ""; }; - 9C735D71170C048C00FF96F5 /* InitFromWebTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitFromWebTests.h; sourceTree = ""; }; - 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitFromWebTests.m; sourceTree = ""; }; - 9C97441B168CF255004DA333 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 9C97441D168CF264004DA333 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 9CB6BC2C168E07730002535B /* GitHubUserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GitHubUserModel.h; path = JSONModelDemo_iOS/GitHubUserModel.h; sourceTree = SOURCE_ROOT; }; - 9CB6BC2D168E07730002535B /* GitHubUserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GitHubUserModel.m; path = JSONModelDemo_iOS/GitHubUserModel.m; sourceTree = SOURCE_ROOT; }; - 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 9CC27C8D1689B7BE008B5411 /* macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = macOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 9CC27C941689B7BE008B5411 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 9CC27C951689B7BE008B5411 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 9CC27C961689B7BE008B5411 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 9CC27C991689B7BE008B5411 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info.plist"; sourceTree = ""; }; - 9CC27C9B1689B7BE008B5411 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 9CC27C9D1689B7BE008B5411 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 9CC27CA11689B7BE008B5411 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; - 9CC27CA31689B7BE008B5411 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 9CC27CA41689B7BE008B5411 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9CC27CA71689B7BE008B5411 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - 9CC27CAF1689B7BE008B5411 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; - 9CC27CCA1689B92A008B5411 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 9CC27CCB1689B92A008B5411 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 9CC27CCC1689B92A008B5411 /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = ""; }; - 9CC2FCB3168CE7340059FE67 /* KivaFeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KivaFeed.h; sourceTree = ""; }; - 9CC2FCB4168CE7340059FE67 /* KivaFeed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KivaFeed.m; sourceTree = ""; }; - 9CC2FCB5168CE7340059FE67 /* LoanModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoanModel.h; sourceTree = ""; }; - 9CC2FCB6168CE7340059FE67 /* LoanModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoanModel.m; sourceTree = ""; }; - 9CC2FCB7168CE7340059FE67 /* LocationModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationModel.h; sourceTree = ""; }; - 9CC2FCB8168CE7340059FE67 /* LocationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationModel.m; sourceTree = ""; }; - 9CCAFD931901B7F500314886 /* SpecialPropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertiesTests.m; sourceTree = ""; }; - 9CD425841702224F00A42AA1 /* HTTPClientSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPClientSuite.h; sourceTree = ""; }; - 9CD425851702224F00A42AA1 /* HTTPClientSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPClientSuite.m; sourceTree = ""; }; - 9CD42587170222AF00A42AA1 /* MockNSURLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockNSURLConnection.h; path = Tests/MockNSURLConnection.h; sourceTree = SOURCE_ROOT; }; - 9CD42588170222AF00A42AA1 /* MockNSURLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MockNSURLConnection.m; path = Tests/MockNSURLConnection.m; sourceTree = SOURCE_ROOT; }; - 9CD42589170222AF00A42AA1 /* MTTestSemaphor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MTTestSemaphor.h; path = Tests/MTTestSemaphor.h; sourceTree = SOURCE_ROOT; }; - 9CD4258A170222AF00A42AA1 /* MTTestSemaphor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MTTestSemaphor.m; path = Tests/MTTestSemaphor.m; sourceTree = SOURCE_ROOT; }; - 9CFDD0A2176E9742007B7DFA /* EnumModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumModel.h; sourceTree = ""; }; - 9CFDD0A3176E9742007B7DFA /* EnumModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EnumModel.m; sourceTree = ""; }; - D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = specialPropertyName.json; sourceTree = ""; }; - D5F918E9172ADA3F00AC2C8E /* SpecialPropertyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyModel.h; sourceTree = ""; }; - D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyModel.m; sourceTree = ""; }; - D5F918EC172ADAF800AC2C8E /* SpecialPropertyNameTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPropertyNameTests.h; sourceTree = ""; }; - D5F918ED172ADAF800AC2C8E /* SpecialPropertyNameTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpecialPropertyNameTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9C05B2A4168CE9600054215E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CD22C8618FF32F7003E66AD /* XCTest.framework in Frameworks */, - 9C97441E168CF264004DA333 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CC27C8A1689B7BE008B5411 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C72A49D171447F70047C6AE /* SystemConfiguration.framework in Frameworks */, - 9C97441C168CF255004DA333 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9C05B2AE168CE9600054215E /* Tests */ = { - isa = PBXGroup; - children = ( - 9C05B3F5168CEB220054215E /* UnitTests */, - 9C05B2AF168CE9600054215E /* Supporting Files */, - ); - path = Tests; - sourceTree = ""; - }; - 9C05B2AF168CE9600054215E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9C05B2B0168CE9600054215E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9C05B3F5168CEB220054215E /* UnitTests */ = { - isa = PBXGroup; - children = ( - 9CD4257D1702220300A42AA1 /* Class */, - 9C05B3FE168CEB220054215E /* DataFiles */, - 9C05B3F6168CEB220054215E /* ArrayTests.h */, - 9C05B3F7168CEB220054215E /* ArrayTests.m */, - 9C05B3F8168CEB220054215E /* BuiltInConversionsTests.h */, - 9C05B3F9168CEB220054215E /* BuiltInConversionsTests.m */, - 9C05B3FC168CEB220054215E /* CustomPropsTests.h */, - 9C05B3FD168CEB220054215E /* CustomPropsTests.m */, - 9C05B40A168CEB220054215E /* IdPropertyTests.h */, - 9C05B40B168CEB220054215E /* IdPropertyTests.m */, - 9C05B40C168CEB220054215E /* JSONTypesModelWithValidation1.h */, - 9C05B40D168CEB220054215E /* JSONTypesModelWithValidation1.m */, - 9C05B40E168CEB220054215E /* JSONTypesModelWithValidation2.h */, - 9C05B40F168CEB220054215E /* JSONTypesModelWithValidation2.m */, - 9C05B410168CEB220054215E /* JSONTypesReadTests.h */, - 9C05B411168CEB220054215E /* JSONTypesReadTests.m */, - 9C05B412168CEB220054215E /* JSONValueTransformer+UIColor.h */, - 9C05B413168CEB220054215E /* JSONValueTransformer+UIColor.m */, - 9C05B414168CEB220054215E /* KeyMappingTests.h */, - 9C05B415168CEB220054215E /* KeyMappingTests.m */, - 9C05B416168CEB220054215E /* NestedModelsTests.h */, - 9C05B417168CEB220054215E /* NestedModelsTests.m */, - 9C05B418168CEB220054215E /* OptionalPropertiesTests.h */, - 9C05B419168CEB220054215E /* OptionalPropertiesTests.m */, - 9C05B41A168CEB220054215E /* PersistTests.h */, - 9C05B41B168CEB220054215E /* PersistTests.m */, - 9C05B41C168CEB220054215E /* PrimitiveTypesReadTests.h */, - 9C05B41D168CEB220054215E /* PrimitiveTypesReadTests.m */, - 9C05B41E168CEB220054215E /* SimpleDataErrorTests.h */, - 9C05B41F168CEB220054215E /* SimpleDataErrorTests.m */, - D5F918EC172ADAF800AC2C8E /* SpecialPropertyNameTests.h */, - D5F918ED172ADAF800AC2C8E /* SpecialPropertyNameTests.m */, - 9C05B420168CEB220054215E /* TestModels */, - 9C05B43D168CEB220054215E /* ValidationTestSuite.h */, - 9C05B43E168CEB220054215E /* ValidationTestSuite.m */, - 9CD425841702224F00A42AA1 /* HTTPClientSuite.h */, - 9CD425851702224F00A42AA1 /* HTTPClientSuite.m */, - 9C735D65170B717F00FF96F5 /* JSONAPITests.h */, - 9C735D66170B717F00FF96F5 /* JSONAPITests.m */, - 9C735D71170C048C00FF96F5 /* InitFromWebTests.h */, - 9C735D72170C048C00FF96F5 /* InitFromWebTests.m */, - 9CCAFD931901B7F500314886 /* SpecialPropertiesTests.m */, - ); - path = UnitTests; - sourceTree = ""; - }; - 9C05B3FE168CEB220054215E /* DataFiles */ = { - isa = PBXGroup; - children = ( - 9C05B3FF168CEB220054215E /* colors.json */, - 9C05B400168CEB220054215E /* converts.json */, - 9C05B401168CEB220054215E /* github-iphone.json */, - 9C05B402168CEB220054215E /* jsonTypes.json */, - 9C05B403168CEB220054215E /* nestedData.json */, - 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */, - 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */, - 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */, - 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */, - 9C05B405168CEB220054215E /* post.json */, - 9C05B406168CEB220054215E /* primitives.json */, - 9C05B407168CEB220054215E /* primitivesWithErrors.json */, - D5F918E1172AD8CF00AC2C8E /* specialPropertyName.json */, - 9C05B408168CEB220054215E /* withOptProp.json */, - 9C05B409168CEB220054215E /* withoutOptProp.json */, - ); - path = DataFiles; - sourceTree = ""; - }; - 9C05B420168CEB220054215E /* TestModels */ = { - isa = PBXGroup; - children = ( - 9CFDD0A2176E9742007B7DFA /* EnumModel.h */, - 9CFDD0A3176E9742007B7DFA /* EnumModel.m */, - 9C08C1AD1749750100AA8CC9 /* CopyrightModel.h */, - 9C08C1AE1749750100AA8CC9 /* CopyrightModel.m */, - 9C05B421168CEB220054215E /* BuiltInConversionsModel.h */, - 9C05B422168CEB220054215E /* BuiltInConversionsModel.m */, - 9C05B423168CEB220054215E /* CustomPropertyModel.h */, - 9C05B424168CEB220054215E /* CustomPropertyModel.m */, - 9C05B425168CEB220054215E /* GitHubKeyMapRepoModel.h */, - 9C05B426168CEB220054215E /* GitHubKeyMapRepoModel.m */, - 9C05B427168CEB220054215E /* GitHubKeyMapRepoModelDict.h */, - 9C05B428168CEB220054215E /* GitHubKeyMapRepoModelDict.m */, - 9C05B429168CEB220054215E /* GitHubRepoModel.h */, - 9C05B42A168CEB220054215E /* GitHubRepoModel.m */, - 9C05B42B168CEB220054215E /* GitHubRepoModelForUSMapper.h */, - 9C05B42C168CEB220054215E /* GitHubRepoModelForUSMapper.m */, - 1C008FE318B7AE54002DFD3A /* ModelForUpperCaseMapper.h */, - 1C008FE418B7AE54002DFD3A /* ModelForUpperCaseMapper.m */, - 9C05B42D168CEB220054215E /* ImageModel.h */, - 9C05B42E168CEB220054215E /* ImageModel.m */, - 9C05B42F168CEB220054215E /* JSONTypesModel.h */, - 9C05B430168CEB220054215E /* JSONTypesModel.m */, - 9C05B431168CEB220054215E /* NestedModel.h */, - 9C05B432168CEB220054215E /* NestedModel.m */, - 9C05B433168CEB220054215E /* OptionalPropModel.h */, - 9C05B434168CEB220054215E /* OptionalPropModel.m */, - 9C05B435168CEB220054215E /* PostModel.h */, - 9C05B436168CEB220054215E /* PostModel.m */, - 9C05B437168CEB220054215E /* PostsModel.h */, - 9C05B438168CEB220054215E /* PostsModel.m */, - 9C05B439168CEB220054215E /* PrimitivesModel.h */, - 9C05B43A168CEB220054215E /* PrimitivesModel.m */, - 9C05B43B168CEB220054215E /* ReposModel.h */, - 9C05B43C168CEB220054215E /* ReposModel.m */, - D5F918E9172ADA3F00AC2C8E /* SpecialPropertyModel.h */, - D5F918EA172ADA3F00AC2C8E /* SpecialPropertyModel.m */, - 9C735D6B170B7A2D00FF96F5 /* RpcRequestModel.h */, - 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */, - 1AE9CA911C21F50C00B8F5C1 /* RenamedPropertyModel.h */, - 1AE9CA921C21F50C00B8F5C1 /* RenamedPropertyModel.m */, - ); - path = TestModels; - sourceTree = ""; - }; - 9C66DFDC168CF09A0015CCDF /* JSONModel */ = { - isa = PBXGroup; - children = ( - 9C66DFDD168CF09A0015CCDF /* JSONModel */, - 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */, - 9C66DFEA168CF09A0015CCDF /* JSONModelNetworking */, - 9C66DFF1168CF09A0015CCDF /* JSONModelTransformations */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66DFDD168CF09A0015CCDF /* JSONModel */ = { - isa = PBXGroup; - children = ( - 9C66DFDE168CF09A0015CCDF /* JSONModel.h */, - 9C66DFDF168CF09A0015CCDF /* JSONModel.m */, - 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */, - 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */, - 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */, - 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66DFEA168CF09A0015CCDF /* JSONModelNetworking */ = { - isa = PBXGroup; - children = ( - 9C66DFEB168CF09A0015CCDF /* JSONAPI.h */, - 9C66DFEC168CF09A0015CCDF /* JSONAPI.m */, - 9C66DFED168CF09A0015CCDF /* JSONHTTPClient.h */, - 9C66DFEE168CF09A0015CCDF /* JSONHTTPClient.m */, - 9C66DFEF168CF09A0015CCDF /* JSONModel+networking.h */, - 9C66DFF0168CF09A0015CCDF /* JSONModel+networking.m */, - ); - path = JSONModelNetworking; - sourceTree = ""; - }; - 9C66DFF1168CF09A0015CCDF /* JSONModelTransformations */ = { - isa = PBXGroup; - children = ( - 9C66DFF2168CF09A0015CCDF /* JSONKeyMapper.h */, - 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */, - 9C66DFF4168CF09A0015CCDF /* JSONValueTransformer.h */, - 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */, - ); - path = JSONModelTransformations; - sourceTree = ""; - }; - 9CB6BC2B168E07640002535B /* GithubDemo */ = { - isa = PBXGroup; - children = ( - 9CB6BC2C168E07730002535B /* GitHubUserModel.h */, - 9CB6BC2D168E07730002535B /* GitHubUserModel.m */, - ); - name = GithubDemo; - sourceTree = ""; - }; - 9CC27C821689B7BE008B5411 = { - isa = PBXGroup; - children = ( - 9C66DFDC168CF09A0015CCDF /* JSONModel */, - 9CC27C971689B7BE008B5411 /* macOS */, - 9C05B2AE168CE9600054215E /* Tests */, - 9CC27C901689B7BE008B5411 /* Frameworks */, - 9CC27C8E1689B7BE008B5411 /* Products */, - ); - indentWidth = 4; - sourceTree = ""; - tabWidth = 4; - usesTabs = 0; - }; - 9CC27C8E1689B7BE008B5411 /* Products */ = { - isa = PBXGroup; - children = ( - 9CC27C8D1689B7BE008B5411 /* macOS.app */, - 9C05B2A8168CE9600054215E /* Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 9CC27C901689B7BE008B5411 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9CBD6D5118FF2FDD00DE66EC /* XCTest.framework */, - 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */, - 9C97441D168CF264004DA333 /* Cocoa.framework */, - 9C97441B168CF255004DA333 /* Cocoa.framework */, - 9CC27CAF1689B7BE008B5411 /* SenTestingKit.framework */, - 9CC27C931689B7BE008B5411 /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9CC27C931689B7BE008B5411 /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 9CC27C941689B7BE008B5411 /* AppKit.framework */, - 9CC27C951689B7BE008B5411 /* CoreData.framework */, - 9CC27C961689B7BE008B5411 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 9CC27C971689B7BE008B5411 /* macOS */ = { - isa = PBXGroup; - children = ( - 9CC2FCB2168CE6F00059FE67 /* DemoApp */, - ); - path = macOS; - sourceTree = ""; - }; - 9CC27C981689B7BE008B5411 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9CC27C991689B7BE008B5411 /* Info.plist */, - 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */, - 9CC27C9D1689B7BE008B5411 /* main.m */, - 9CC27CA01689B7BE008B5411 /* Credits.rtf */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9CC27CC91689B8EE008B5411 /* ViewController */ = { - isa = PBXGroup; - children = ( - 9CC27CCA1689B92A008B5411 /* ViewController.h */, - 9CC27CCB1689B92A008B5411 /* ViewController.m */, - 9CC27CCC1689B92A008B5411 /* ViewController.xib */, - ); - name = ViewController; - sourceTree = ""; - }; - 9CC2FCB1168CE6E60059FE67 /* KivaDemo */ = { - isa = PBXGroup; - children = ( - 9CC2FCB3168CE7340059FE67 /* KivaFeed.h */, - 9CC2FCB4168CE7340059FE67 /* KivaFeed.m */, - 9CC2FCB5168CE7340059FE67 /* LoanModel.h */, - 9CC2FCB6168CE7340059FE67 /* LoanModel.m */, - 9CC2FCB7168CE7340059FE67 /* LocationModel.h */, - 9CC2FCB8168CE7340059FE67 /* LocationModel.m */, - ); - name = KivaDemo; - sourceTree = ""; - }; - 9CC2FCB2168CE6F00059FE67 /* DemoApp */ = { - isa = PBXGroup; - children = ( - 9CB6BC2B168E07640002535B /* GithubDemo */, - 9CC2FCB1168CE6E60059FE67 /* KivaDemo */, - 9CC27CC91689B8EE008B5411 /* ViewController */, - 9CC27CA31689B7BE008B5411 /* AppDelegate.h */, - 9CC27CA41689B7BE008B5411 /* AppDelegate.m */, - 9CC27CA61689B7BE008B5411 /* MainMenu.xib */, - 9CC27C981689B7BE008B5411 /* Supporting Files */, - ); - name = DemoApp; - sourceTree = ""; - }; - 9CD4257D1702220300A42AA1 /* Class */ = { - isa = PBXGroup; - children = ( - 9CD42587170222AF00A42AA1 /* MockNSURLConnection.h */, - 9CD42588170222AF00A42AA1 /* MockNSURLConnection.m */, - 9CD42589170222AF00A42AA1 /* MTTestSemaphor.h */, - 9CD4258A170222AF00A42AA1 /* MTTestSemaphor.m */, - ); - name = Class; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9C05B2A7168CE9600054215E /* Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9C05B2B8168CE9600054215E /* Build configuration list for PBXNativeTarget "Tests" */; - buildPhases = ( - 9C05B2A3168CE9600054215E /* Sources */, - 9C05B2A4168CE9600054215E /* Frameworks */, - 9C05B2A5168CE9600054215E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Tests; - productName = Tests; - productReference = 9C05B2A8168CE9600054215E /* Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 9CC27C8C1689B7BE008B5411 /* macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9CC27CBF1689B7BE008B5411 /* Build configuration list for PBXNativeTarget "macOS" */; - buildPhases = ( - 9CC27C891689B7BE008B5411 /* Sources */, - 9CC27C8A1689B7BE008B5411 /* Frameworks */, - 9CC27C8B1689B7BE008B5411 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - path = macOS; - productReference = 9CC27C8D1689B7BE008B5411 /* macOS.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9CC27C841689B7BE008B5411 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "Underplot ltd."; - TargetAttributes = { - 9C05B2A7168CE9600054215E = { - TestTargetID = 9CC27C8C1689B7BE008B5411; - }; - }; - }; - buildConfigurationList = 9CC27C871689B7BE008B5411 /* Build configuration list for PBXProject "macOS" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 9CC27C821689B7BE008B5411; - productRefGroup = 9CC27C8E1689B7BE008B5411 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9CC27C8C1689B7BE008B5411 /* macOS */, - 9C05B2A7168CE9600054215E /* Tests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9C05B2A5168CE9600054215E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C6C35E0181CF7B500BEE72D /* nestedDataWithDictionaryError.json in Resources */, - 9C05B443168CEB220054215E /* colors.json in Resources */, - 9C05B444168CEB220054215E /* converts.json in Resources */, - 9C05B445168CEB220054215E /* github-iphone.json in Resources */, - 9C6C35DF181CF7B500BEE72D /* nestedDataWithArrayError.json in Resources */, - 9C05B446168CEB220054215E /* jsonTypes.json in Resources */, - 9C6C35E2181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */, - 9C05B447168CEB220054215E /* nestedData.json in Resources */, - 9C05B449168CEB220054215E /* post.json in Resources */, - 9C05B44A168CEB220054215E /* primitives.json in Resources */, - 9C05B44B168CEB220054215E /* primitivesWithErrors.json in Resources */, - D5F918E5172AD99600AC2C8E /* specialPropertyName.json in Resources */, - 9C6C35E1181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json in Resources */, - 9C05B44C168CEB220054215E /* withOptProp.json in Resources */, - 9C05B44D168CEB220054215E /* withoutOptProp.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CC27C8B1689B7BE008B5411 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CC27C9C1689B7BE008B5411 /* InfoPlist.strings in Resources */, - 9CC27CA21689B7BE008B5411 /* Credits.rtf in Resources */, - 9CC27CA81689B7BE008B5411 /* MainMenu.xib in Resources */, - 9CC27CCE1689B92A008B5411 /* ViewController.xib in Resources */, - 9C66DF47168CEECF0015CCDF /* colors.json in Resources */, - 9C66DF48168CEECF0015CCDF /* converts.json in Resources */, - 9C66DF49168CEECF0015CCDF /* github-iphone.json in Resources */, - 9C66DF4A168CEECF0015CCDF /* jsonTypes.json in Resources */, - 9C66DF4B168CEECF0015CCDF /* nestedData.json in Resources */, - 9C66DF4D168CEECF0015CCDF /* post.json in Resources */, - 9C66DF4E168CEECF0015CCDF /* primitives.json in Resources */, - 9C66DF4F168CEECF0015CCDF /* primitivesWithErrors.json in Resources */, - D5F918EF172ADC2400AC2C8E /* specialPropertyName.json in Resources */, - 9C66DF50168CEECF0015CCDF /* withOptProp.json in Resources */, - 9C66DF51168CEECF0015CCDF /* withoutOptProp.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9C05B2A3168CE9600054215E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9C05B43F168CEB220054215E /* ArrayTests.m in Sources */, - 9C05B440168CEB220054215E /* BuiltInConversionsTests.m in Sources */, - 9C05B442168CEB220054215E /* CustomPropsTests.m in Sources */, - 9C05B44E168CEB220054215E /* IdPropertyTests.m in Sources */, - 9C05B44F168CEB220054215E /* JSONTypesModelWithValidation1.m in Sources */, - 9C05B450168CEB220054215E /* JSONTypesModelWithValidation2.m in Sources */, - 9C05B451168CEB220054215E /* JSONTypesReadTests.m in Sources */, - 9C05B452168CEB220054215E /* JSONValueTransformer+UIColor.m in Sources */, - 9C05B453168CEB220054215E /* KeyMappingTests.m in Sources */, - 9C05B454168CEB220054215E /* NestedModelsTests.m in Sources */, - 9C05B455168CEB220054215E /* OptionalPropertiesTests.m in Sources */, - 9C05B456168CEB220054215E /* PersistTests.m in Sources */, - 9C05B457168CEB220054215E /* PrimitiveTypesReadTests.m in Sources */, - 9C05B458168CEB220054215E /* SimpleDataErrorTests.m in Sources */, - 1C008FE518B7AE54002DFD3A /* ModelForUpperCaseMapper.m in Sources */, - 9C05B459168CEB220054215E /* BuiltInConversionsModel.m in Sources */, - 9C05B45A168CEB220054215E /* CustomPropertyModel.m in Sources */, - 9C05B45B168CEB220054215E /* GitHubKeyMapRepoModel.m in Sources */, - 9C05B45C168CEB220054215E /* GitHubKeyMapRepoModelDict.m in Sources */, - 9C05B45D168CEB220054215E /* GitHubRepoModel.m in Sources */, - 9C05B45E168CEB220054215E /* GitHubRepoModelForUSMapper.m in Sources */, - 9C05B45F168CEB220054215E /* ImageModel.m in Sources */, - 9C05B460168CEB220054215E /* JSONTypesModel.m in Sources */, - 9C05B461168CEB220054215E /* NestedModel.m in Sources */, - 9C05B462168CEB220054215E /* OptionalPropModel.m in Sources */, - 9C05B463168CEB220054215E /* PostModel.m in Sources */, - 9C05B464168CEB220054215E /* PostsModel.m in Sources */, - 9C05B465168CEB220054215E /* PrimitivesModel.m in Sources */, - 9C05B466168CEB220054215E /* ReposModel.m in Sources */, - 9C05B467168CEB220054215E /* ValidationTestSuite.m in Sources */, - 9C66DFF7168CF09A0015CCDF /* JSONModel.m in Sources */, - 9C66DFFB168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */, - 9C66DFFD168CF09A0015CCDF /* JSONModelError.m in Sources */, - 9C66E001168CF09A0015CCDF /* JSONAPI.m in Sources */, - 9C66E003168CF09A0015CCDF /* JSONHTTPClient.m in Sources */, - 9C66E005168CF09A0015CCDF /* JSONModel+networking.m in Sources */, - 9C66E007168CF09A0015CCDF /* JSONKeyMapper.m in Sources */, - 9CCAFD941901B7F500314886 /* SpecialPropertiesTests.m in Sources */, - 9C66E009168CF09A0015CCDF /* JSONValueTransformer.m in Sources */, - D5F918EB172ADA3F00AC2C8E /* SpecialPropertyModel.m in Sources */, - D5F918EE172ADAF900AC2C8E /* SpecialPropertyNameTests.m in Sources */, - 9CD425861702224F00A42AA1 /* HTTPClientSuite.m in Sources */, - 9CD4258B170222AF00A42AA1 /* MockNSURLConnection.m in Sources */, - 9CD4258C170222AF00A42AA1 /* MTTestSemaphor.m in Sources */, - 9C735D67170B717F00FF96F5 /* JSONAPITests.m in Sources */, - 1AE9CA931C21F50C00B8F5C1 /* RenamedPropertyModel.m in Sources */, - 9C735D6D170B7A2D00FF96F5 /* RpcRequestModel.m in Sources */, - 9C735D73170C048C00FF96F5 /* InitFromWebTests.m in Sources */, - 9C08C1AF1749750100AA8CC9 /* CopyrightModel.m in Sources */, - 9CFDD0A4176E9742007B7DFA /* EnumModel.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9CC27C891689B7BE008B5411 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9CC27C9E1689B7BE008B5411 /* main.m in Sources */, - 9CC27CA51689B7BE008B5411 /* AppDelegate.m in Sources */, - 9CC27CCD1689B92A008B5411 /* ViewController.m in Sources */, - 9CC2FCB9168CE7340059FE67 /* KivaFeed.m in Sources */, - 9CC2FCBA168CE7340059FE67 /* LoanModel.m in Sources */, - 9CC2FCBB168CE7340059FE67 /* LocationModel.m in Sources */, - 9C66DFF6168CF09A0015CCDF /* JSONModel.m in Sources */, - 9C66DFFA168CF09A0015CCDF /* JSONModelClassProperty.m in Sources */, - 9C66DFFC168CF09A0015CCDF /* JSONModelError.m in Sources */, - 9C66E000168CF09A0015CCDF /* JSONAPI.m in Sources */, - 9C66E002168CF09A0015CCDF /* JSONHTTPClient.m in Sources */, - 9C66E004168CF09A0015CCDF /* JSONModel+networking.m in Sources */, - 9C66E006168CF09A0015CCDF /* JSONKeyMapper.m in Sources */, - 9C66E008168CF09A0015CCDF /* JSONValueTransformer.m in Sources */, - 9CB6BC2E168E07730002535B /* GitHubUserModel.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 9CC27C9A1689B7BE008B5411 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 9CC27C9B1689B7BE008B5411 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 9CC27CA01689B7BE008B5411 /* Credits.rtf */ = { - isa = PBXVariantGroup; - children = ( - 9CC27CA11689B7BE008B5411 /* en */, - ); - name = Credits.rtf; - sourceTree = ""; - }; - 9CC27CA61689B7BE008B5411 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 9CC27CA71689B7BE008B5411 /* en */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 9C05B2B9168CE9600054215E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/macOS.app/Contents/MacOS/macOS"; - COMBINE_HIDPI_IMAGES = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - "UNIT_TESTING=1", - ); - INFOPLIST_FILE = "Tests/Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = ""; - TEST_HOST = "$(BUNDLE_LOADER)"; - WRAPPER_EXTENSION = xctest; - }; - name = Debug; - }; - 9C05B2BA168CE9600054215E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/macOS.app/Contents/MacOS/macOS"; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = "Tests/Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = ""; - TEST_HOST = "$(BUNDLE_LOADER)"; - VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = xctest; - }; - name = Release; - }; - 9CC27CBD1689B7BE008B5411 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 9CC27CBE1689B7BE008B5411 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - 9CC27CC01689B7BE008B5411 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = "JSONModelOSX/Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = macOS; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 9CC27CC11689B7BE008B5411 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = "JSONModelOSX/Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = macOS; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9C05B2B8168CE9600054215E /* Build configuration list for PBXNativeTarget "Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9C05B2B9168CE9600054215E /* Debug */, - 9C05B2BA168CE9600054215E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9CC27C871689B7BE008B5411 /* Build configuration list for PBXProject "macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CC27CBD1689B7BE008B5411 /* Debug */, - 9CC27CBE1689B7BE008B5411 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9CC27CBF1689B7BE008B5411 /* Build configuration list for PBXNativeTarget "macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CC27CC01689B7BE008B5411 /* Debug */, - 9CC27CC11689B7BE008B5411 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9CC27C841689B7BE008B5411 /* Project object */; -} diff --git a/Demos/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Demos/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 85d597ac..00000000 --- a/Demos/macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Demos/macOS/AppDelegate.h b/Demos/macOS/AppDelegate.h deleted file mode 100644 index 7d3bb017..00000000 --- a/Demos/macOS/AppDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// AppDelegate.h -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface AppDelegate : NSObject - -@property (assign) IBOutlet NSWindow *window; - -@end diff --git a/Demos/macOS/AppDelegate.m b/Demos/macOS/AppDelegate.m deleted file mode 100644 index ddd41d53..00000000 --- a/Demos/macOS/AppDelegate.m +++ /dev/null @@ -1,35 +0,0 @@ -// -// AppDelegate.m -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "AppDelegate.h" -#import "ViewController.h" - -@interface AppDelegate() -@property (strong, nonatomic) ViewController* controller; -@end - - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Insert code here to initialize your application - - self.controller = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; - self.window.contentView = self.controller.view; - - self.controller.view.frame = ((NSView*)self.window.contentView).bounds; - self.controller.view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; - -} - -- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { - return YES; -} - -@end diff --git a/Demos/macOS/Info.plist b/Demos/macOS/Info.plist deleted file mode 100644 index 1d5e1057..00000000 --- a/Demos/macOS/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2012 Underplot ltd. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/Demos/macOS/KivaFeed.h b/Demos/macOS/KivaFeed.h deleted file mode 100644 index 3e1b3a3f..00000000 --- a/Demos/macOS/KivaFeed.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// KivaFeed.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "LoanModel.h" - -@interface KivaFeed : JSONModel - -@property (strong, nonatomic) NSArray* loans; - -@end \ No newline at end of file diff --git a/Demos/macOS/KivaFeed.m b/Demos/macOS/KivaFeed.m deleted file mode 100644 index 185d023d..00000000 --- a/Demos/macOS/KivaFeed.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// KivaFeed.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "KivaFeed.h" - -@implementation KivaFeed - -@end diff --git a/Demos/macOS/LoanModel.h b/Demos/macOS/LoanModel.h deleted file mode 100644 index 36ead02e..00000000 --- a/Demos/macOS/LoanModel.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// LoanModel.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" -#import "LocationModel.h" - -@protocol LoanModel @end - -@interface LoanModel : JSONModel - -@property (strong, nonatomic) NSString* name; -@property (strong, nonatomic) NSString* status; -@property (strong, nonatomic) NSString* use; - -@property (strong, nonatomic) LocationModel* location; - -@end \ No newline at end of file diff --git a/Demos/macOS/LoanModel.m b/Demos/macOS/LoanModel.m deleted file mode 100644 index d3678d9b..00000000 --- a/Demos/macOS/LoanModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// LoanModel.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "LoanModel.h" - -@implementation LoanModel - -@end diff --git a/Demos/macOS/LocationModel.h b/Demos/macOS/LocationModel.h deleted file mode 100644 index d5e877b3..00000000 --- a/Demos/macOS/LocationModel.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// LocationModel.h -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface LocationModel : JSONModel - -@property (strong, nonatomic) NSString* countryCode; -@property (strong, nonatomic) NSString* country; - -@end diff --git a/Demos/macOS/LocationModel.m b/Demos/macOS/LocationModel.m deleted file mode 100644 index 4d58dddc..00000000 --- a/Demos/macOS/LocationModel.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// LocationModel.m -// JSONModel_Demo -// -// Created by Marin Todorov on 26/11/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "LocationModel.h" -#import "JSONKeyMapper.h" - -@implementation LocationModel - -+(JSONKeyMapper*)keyMapper -{ - return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase]; -} - -@end \ No newline at end of file diff --git a/Demos/macOS/ViewController.h b/Demos/macOS/ViewController.h deleted file mode 100644 index e2ae3387..00000000 --- a/Demos/macOS/ViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ViewController.h -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface ViewController : NSViewController - -@end diff --git a/Demos/macOS/ViewController.m b/Demos/macOS/ViewController.m deleted file mode 100644 index 636b9132..00000000 --- a/Demos/macOS/ViewController.m +++ /dev/null @@ -1,174 +0,0 @@ -// -// ViewController.m -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "ViewController.h" - -//kiva models -#import "KivaFeed.h" -#import "LoanModel.h" - -//github -#import "GitHubUserModel.h" - -#import "JSONModel+networking.h" - -enum kServices { - kServiceKiva = 1, - kServiceYoutube, - kServiceGithub - }; - -@interface ViewController () -{ - IBOutlet NSTableView* table; - IBOutlet NSProgressIndicator* spinner; - - int currentService; - - //kiva - KivaFeed* kiva; - - //youtube - NSArray* videos; - - //github - GitHubUserModel* user; - NSArray* items; - -} - -@end - -@implementation ViewController - --(void)awakeFromNib -{ - [spinner setHidden:YES]; -} - --(void)setLoaderVisible:(BOOL)isVis -{ - [spinner setHidden:!isVis]; - if (isVis) [spinner startAnimation:nil]; - else [spinner stopAnimation:nil]; -} - -- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row -{ - NSTableCellView *cellView = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self]; - - switch (currentService) { - case kServiceKiva: - { - if (row>=kiva.loans.count) return nil; - - LoanModel* loan = kiva.loans[row]; - NSString* message = [NSString stringWithFormat:@"%@ from %@(%@) needs a loan %@", - loan.name, loan.location.country, loan.location.countryCode, loan.use - ]; - - cellView.textField.stringValue = message; - - } break; - - case kServiceGithub: - { - if (row>=items.count) return nil; - cellView.textField.stringValue = [items[row] description]; - - } break; - - default: - cellView.textField.stringValue = @"n/a"; - break; - } - - return cellView; -} - - -- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView -{ - switch (currentService) { - case kServiceKiva: - return kiva.loans.count; - break; - case kServiceGithub: - return items.count; - break; - default: - return 0; - break; - } -} - -- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(NSInteger)rowIndex -{ - switch (currentService) { - case kServiceGithub: - { - id item = items[rowIndex]; - if ([item isKindOfClass:[NSURL class]]) { - [[NSWorkspace sharedWorkspace] openURL:item]; - } - - } break; - - default: - break; - } - return YES; -} - -#pragma mark - button actions --(IBAction)actionKiva:(id)sender -{ - currentService = kServiceKiva; - [self setLoaderVisible:YES]; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - kiva = [[KivaFeed alloc] initFromURLWithString:@"https://api.kivaws.org/v1/loans/search.json?status=fundraising" -#pragma GCC diagnostic pop - completion:^(JSONModel *model, JSONModelError *e) { - - [table reloadData]; - - if (e) { - [[NSAlert alertWithError:e] beginSheetModalForWindow:self.view.window modalDelegate:nil didEndSelector:nil contextInfo:nil]; - } - - [self setLoaderVisible:NO]; - }]; - -} - --(IBAction)actionGithub:(id)sender -{ - currentService = kServiceGithub; - [self setLoaderVisible:YES]; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - user = [[GitHubUserModel alloc] initFromURLWithString:@"https://api.github.com/users/icanzilb" -#pragma GCC diagnostic pop - completion:^(JSONModel *model, JSONModelError *e) { - - items = @[user.login, user.html_url, user.company, user.name, user.blog]; - [table performSelector:@selector(reloadData) withObject:nil afterDelay:0.1]; - - if (e) { - [[NSAlert alertWithError:e] beginSheetModalForWindow:self.view.window modalDelegate:nil didEndSelector:nil contextInfo:nil]; - } - - [self setLoaderVisible:NO]; - }]; - -} - -@end diff --git a/Demos/macOS/ViewController.xib b/Demos/macOS/ViewController.xib deleted file mode 100644 index 85e2bf0b..00000000 --- a/Demos/macOS/ViewController.xib +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demos/macOS/en.lproj/Credits.rtf b/Demos/macOS/en.lproj/Credits.rtf deleted file mode 100644 index 9033dfe4..00000000 --- a/Demos/macOS/en.lproj/Credits.rtf +++ /dev/null @@ -1,36 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 - -\f0\b\fs24 \cf0 Engineering: -\b0 \ - Marin Todorov\ -\ - -\b Human Interface Design: -\b0 \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 Marin Todorov\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 \ - -\b Testing: -\b0 \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 Marin Todorov\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 \ - -\b Documentation: -\b0 \ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 Marin Todorov\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 -\cf0 \ - -\b With special thanks to: -\b0 \ - Mom and Dad\ -} \ No newline at end of file diff --git a/Demos/macOS/en.lproj/InfoPlist.strings b/Demos/macOS/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/Demos/macOS/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Demos/macOS/en.lproj/MainMenu.xib b/Demos/macOS/en.lproj/MainMenu.xib deleted file mode 100644 index 79a67ab6..00000000 --- a/Demos/macOS/en.lproj/MainMenu.xib +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demos/macOS/main.m b/Demos/macOS/main.m deleted file mode 100644 index 592f5e07..00000000 --- a/Demos/macOS/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// JSONModelOSX -// -// Created by Marin Todorov on 25/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **)argv); -} From f28917e176c89a04ad1aecfc9b8eb4aa7df621bd Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 10:12:46 +0100 Subject: [PATCH 139/171] Further simplify readme a bit --- README.md | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 80ff133d..4ac121df 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,21 @@ # JSONModel - Magical Data Modeling Framework for JSON -![JSONModel for iOS and OSX](http://jsonmodel.com/img/jsonmodel_logolike.png) +JSONModel allows rapid creation of smart data models. You can use it in your iOS +and macOS apps. Automatic introspection of your model classes and JSON input +drastically reduces the amount of code you have to write. -JSONModel is a library, which allows rapid creation of smart data models. You -can use it in your iOS and macOS apps. - -JSONModel automatically introspects your model classes and the structure of your -JSON input and reduces drastically the amount of code you have to write. - -See [CHANGELOG.md] file for details on changes. +See the [CHANGELOG.md]([CHANGELOG.md]) file for details on changes. ## Installation ### CocoaPods -Add to your `Podfile`: - ```ruby pod 'JSONModel' ``` ### Carthage -Add to your `Cartfile`: - ```ruby github "jsonmodel/jsonmodel" ``` @@ -34,11 +26,7 @@ github "jsonmodel/jsonmodel" 0. copy the JSONModel sub-folder into your Xcode project 0. link your app to SystemConfiguration.framework -## Docs - -You can find the generated docs at: http://cocoadocs.org/docsets/JSONModel - -## Basic usage +## Basic Usage Consider you have JSON like this: @@ -393,8 +381,9 @@ NSString *string = [pm toJSONString]; ## License -MIT licensed - see [LICENSE](LICENSE) file +MIT licensed - see the [LICENSE](LICENSE) file. ## Contributing -We love pull requests! See [CONTRIBUTING.md](CONTRIBUTING.md) file for full details. +We love pull requests! See the [CONTRIBUTING.md](CONTRIBUTING.md) file for full +details. From b7e5baf5a8138b82bd29be6f4d489168e391ffbe Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 10:13:46 +0100 Subject: [PATCH 140/171] Readme brevity --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4ac121df..1a7415d1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ JSONModel allows rapid creation of smart data models. You can use it in your iOS and macOS apps. Automatic introspection of your model classes and JSON input drastically reduces the amount of code you have to write. -See the [CHANGELOG.md]([CHANGELOG.md]) file for details on changes. +See [CHANGELOG.md]([CHANGELOG.md]) for details on changes. ## Installation @@ -381,9 +381,8 @@ NSString *string = [pm toJSONString]; ## License -MIT licensed - see the [LICENSE](LICENSE) file. +MIT licensed - see [LICENSE](LICENSE) file. ## Contributing -We love pull requests! See the [CONTRIBUTING.md](CONTRIBUTING.md) file for full -details. +We love pull requests! See [CONTRIBUTING.md](CONTRIBUTING.md) for full details. From fa107ddff73b7286506584d660f472298988d692 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 10:18:29 +0100 Subject: [PATCH 141/171] Include concurrent tests in other targets --- Examples/Examples.xcodeproj/project.pbxproj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Examples/Examples.xcodeproj/project.pbxproj b/Examples/Examples.xcodeproj/project.pbxproj index 94dc5c4e..c6d3d8cc 100644 --- a/Examples/Examples.xcodeproj/project.pbxproj +++ b/Examples/Examples.xcodeproj/project.pbxproj @@ -209,6 +209,10 @@ 1A84BC421D1C0359005234F4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A84BC411D1C0359005234F4 /* ViewController.m */; }; 1A84BC451D1C0359005234F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BC431D1C0359005234F4 /* Main.storyboard */; }; 1A84BC471D1C0359005234F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A84BC461D1C0359005234F4 /* Assets.xcassets */; }; + 1AB943561D86AA3E0031E315 /* ConcurrentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 008077B71D81B91C006A0187 /* ConcurrentTests.m */; }; + 1AB943571D86AA3F0031E315 /* ConcurrentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 008077B71D81B91C006A0187 /* ConcurrentTests.m */; }; + 1AB943581D86AA540031E315 /* ConcurrentReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 008077BC1D81C035006A0187 /* ConcurrentReposModel.m */; }; + 1AB943591D86AA540031E315 /* ConcurrentReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 008077BC1D81C035006A0187 /* ConcurrentReposModel.m */; }; 1AF8B9171D423D5500A1AAD3 /* NullTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8B9151D423B9300A1AAD3 /* NullTests.m */; }; 1AF8B9181D423D5500A1AAD3 /* NullTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8B9151D423B9300A1AAD3 /* NullTests.m */; }; 1AF8B9191D423D5700A1AAD3 /* NullTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8B9151D423B9300A1AAD3 /* NullTests.m */; }; @@ -1505,6 +1509,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1AB943581D86AA540031E315 /* ConcurrentReposModel.m in Sources */, 1A4BAB231D1C7DA80069D735 /* EnumModel.m in Sources */, 1A4BAB201D1C7DA80069D735 /* CopyrightModel.m in Sources */, 1A4BAB291D1C7DA80069D735 /* ImageModel.m in Sources */, @@ -1545,6 +1550,7 @@ 1A4BAB2F1D1C7DA80069D735 /* ModelForUpperCaseMapper.m in Sources */, 1A4BAA751D1C79460069D735 /* CustomPropsTests.m in Sources */, 1A4BAA7F1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */, + 1AB943571D86AA3F0031E315 /* ConcurrentTests.m in Sources */, 1A4BAA7C1D1C79460069D735 /* JSONTypesReadTests.m in Sources */, 1A4BAB2A1D1C7DA80069D735 /* InteractionModel.m in Sources */, 1A4BAB211D1C7DA80069D735 /* CustomPropertyModel.m in Sources */, @@ -1557,6 +1563,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1AB943591D86AA540031E315 /* ConcurrentReposModel.m in Sources */, 1A4BAB3D1D1C7DA90069D735 /* EnumModel.m in Sources */, 1A4BAB3A1D1C7DA90069D735 /* CopyrightModel.m in Sources */, 1A4BAB431D1C7DA90069D735 /* ImageModel.m in Sources */, @@ -1597,6 +1604,7 @@ 1A4BAB491D1C7DA90069D735 /* ModelForUpperCaseMapper.m in Sources */, 1A4BAA611D1C79460069D735 /* CustomPropsTests.m in Sources */, 1A4BAA6B1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */, + 1AB943561D86AA3E0031E315 /* ConcurrentTests.m in Sources */, 1A4BAA681D1C79460069D735 /* JSONTypesReadTests.m in Sources */, 1A4BAB441D1C7DA90069D735 /* InteractionModel.m in Sources */, 1A4BAB3B1D1C7DA90069D735 /* CustomPropertyModel.m in Sources */, From f48298110f2cf36057eea31f45b3be4441d373ad Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 10:26:14 +0100 Subject: [PATCH 142/171] test cleanup --- Examples/Tests/ConcurrentTests.m | 41 +++++++++++++++++--------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/Examples/Tests/ConcurrentTests.m b/Examples/Tests/ConcurrentTests.m index e4120604..ff4019f2 100644 --- a/Examples/Tests/ConcurrentTests.m +++ b/Examples/Tests/ConcurrentTests.m @@ -7,53 +7,56 @@ // @import JSONModel; +@import XCTest; -#import #import "ConcurrentReposModel.h" @interface ConcurrentTests : XCTestCase - @property (nonatomic, strong) id jsonDict; - @end @implementation ConcurrentTests -- (void)setUp { +- (void)setUp +{ [super setUp]; - NSString* filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../github-iphone.json"]; - NSData* jsonData = [NSData dataWithContentsOfFile:filePath]; + + NSString *filePath = [[NSBundle bundleForClass:[JSONModel class]].resourcePath stringByAppendingPathComponent:@"../../github-iphone.json"]; + NSData *jsonData = [NSData dataWithContentsOfFile:filePath]; XCTAssertNotNil(jsonData, @"Can't fetch test data file contents."); - NSError* err; + NSError *err; self.jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:&err]; } -- (void)tearDown { - [super tearDown]; -} - -- (void)testConcurrentMapping { +- (void)testConcurrentMapping +{ // Because the uncertainty of concurrency. Need multiple run to confirm the result. - NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + NSOperationQueue *queue = [NSOperationQueue new]; queue.maxConcurrentOperationCount = 50; - [queue setSuspended:YES]; + queue.suspended = YES; XCTestExpectation *expectation = [self expectationWithDescription:@"Wait for queue...."]; __block int count = 0; - for (int i = 0; i < 100; i++) { - [queue addOperationWithBlock:^{ + + for (int i = 0; i < 100; i++) + { + [queue addOperationWithBlock:^ + { ConcurrentReposModel *model = [[ConcurrentReposModel alloc] initWithDictionary:self.jsonDict error:nil]; #pragma unused(model) + count++; - if (count == 100) { + + if (count == 100) [expectation fulfill]; - } }]; } - [queue setSuspended:NO]; + + queue.suspended = NO; + [self waitForExpectationsWithTimeout:30 handler:nil]; } From 531308ceff19dfa546f4a7a36576e6aa01ea1212 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 10:40:44 +0100 Subject: [PATCH 143/171] Added failing test for #333 --- Examples/Examples.xcodeproj/project.pbxproj | 8 +++++ Examples/Tests/TransformerExceptionTests.m | 39 +++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 Examples/Tests/TransformerExceptionTests.m diff --git a/Examples/Examples.xcodeproj/project.pbxproj b/Examples/Examples.xcodeproj/project.pbxproj index c6d3d8cc..029aa004 100644 --- a/Examples/Examples.xcodeproj/project.pbxproj +++ b/Examples/Examples.xcodeproj/project.pbxproj @@ -213,6 +213,9 @@ 1AB943571D86AA3F0031E315 /* ConcurrentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 008077B71D81B91C006A0187 /* ConcurrentTests.m */; }; 1AB943581D86AA540031E315 /* ConcurrentReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 008077BC1D81C035006A0187 /* ConcurrentReposModel.m */; }; 1AB943591D86AA540031E315 /* ConcurrentReposModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 008077BC1D81C035006A0187 /* ConcurrentReposModel.m */; }; + 1AB9435D1D86ACAB0031E315 /* TransformerExceptionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AB9435B1D86AB260031E315 /* TransformerExceptionTests.m */; }; + 1AB9435E1D86ACAC0031E315 /* TransformerExceptionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AB9435B1D86AB260031E315 /* TransformerExceptionTests.m */; }; + 1AB9435F1D86ACAC0031E315 /* TransformerExceptionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AB9435B1D86AB260031E315 /* TransformerExceptionTests.m */; }; 1AF8B9171D423D5500A1AAD3 /* NullTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8B9151D423B9300A1AAD3 /* NullTests.m */; }; 1AF8B9181D423D5500A1AAD3 /* NullTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8B9151D423B9300A1AAD3 /* NullTests.m */; }; 1AF8B9191D423D5700A1AAD3 /* NullTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF8B9151D423B9300A1AAD3 /* NullTests.m */; }; @@ -401,6 +404,7 @@ 1A84BC441D1C0359005234F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 1A84BC461D1C0359005234F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 1A84BC481D1C0359005234F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1AB9435B1D86AB260031E315 /* TransformerExceptionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TransformerExceptionTests.m; sourceTree = ""; }; 1AF8B9151D423B9300A1AAD3 /* NullTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NullTests.m; sourceTree = ""; }; 21CE3B1BB8B2A3D33C54BE59 /* Pods-macOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-macOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-macOSTests/Pods-macOSTests.debug.xcconfig"; sourceTree = ""; }; 38F03B2DA2344C07E5EF16B1 /* Pods-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tvOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-tvOSTests/Pods-tvOSTests.debug.xcconfig"; sourceTree = ""; }; @@ -519,6 +523,7 @@ 1A4BAA381D1C79260069D735 /* SpecialValuesTests.m */, 1A4BAA391D1C79260069D735 /* ValidationTests.m */, 008077B71D81B91C006A0187 /* ConcurrentTests.m */, + 1AB9435B1D86AB260031E315 /* TransformerExceptionTests.m */, ); path = Tests; sourceTree = ""; @@ -1498,6 +1503,7 @@ 1A4BAA931D1C79480069D735 /* OptionalPropertiesTests.m in Sources */, 008077B81D81B91C006A0187 /* ConcurrentTests.m in Sources */, 1A4BAA901D1C79480069D735 /* JSONTypesReadTests.m in Sources */, + 1AB9435D1D86ACAB0031E315 /* TransformerExceptionTests.m in Sources */, 1A4BAB101D1C7DA80069D735 /* InteractionModel.m in Sources */, 1A4BAB071D1C7DA80069D735 /* CustomPropertyModel.m in Sources */, 1A4BAB111D1C7DA80069D735 /* JSONTypesModel.m in Sources */, @@ -1552,6 +1558,7 @@ 1A4BAA7F1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */, 1AB943571D86AA3F0031E315 /* ConcurrentTests.m in Sources */, 1A4BAA7C1D1C79460069D735 /* JSONTypesReadTests.m in Sources */, + 1AB9435E1D86ACAC0031E315 /* TransformerExceptionTests.m in Sources */, 1A4BAB2A1D1C7DA80069D735 /* InteractionModel.m in Sources */, 1A4BAB211D1C7DA80069D735 /* CustomPropertyModel.m in Sources */, 1A4BAB2B1D1C7DA80069D735 /* JSONTypesModel.m in Sources */, @@ -1606,6 +1613,7 @@ 1A4BAA6B1D1C79460069D735 /* OptionalPropertiesTests.m in Sources */, 1AB943561D86AA3E0031E315 /* ConcurrentTests.m in Sources */, 1A4BAA681D1C79460069D735 /* JSONTypesReadTests.m in Sources */, + 1AB9435F1D86ACAC0031E315 /* TransformerExceptionTests.m in Sources */, 1A4BAB441D1C7DA90069D735 /* InteractionModel.m in Sources */, 1A4BAB3B1D1C7DA90069D735 /* CustomPropertyModel.m in Sources */, 1A4BAB451D1C7DA90069D735 /* JSONTypesModel.m in Sources */, diff --git a/Examples/Tests/TransformerExceptionTests.m b/Examples/Tests/TransformerExceptionTests.m new file mode 100644 index 00000000..e3c58ab1 --- /dev/null +++ b/Examples/Tests/TransformerExceptionTests.m @@ -0,0 +1,39 @@ +// +// TransformerExceptionTests.m +// Examples +// +// Created by James Billingham on 12/09/2016. +// Copyright © 2016 JSONModel. All rights reserved. +// + +@import JSONModel; +@import XCTest; + +@interface User : JSONModel +@property (nonatomic, strong) NSDate *birthday; +@end + +@implementation User +@end + +@interface TransformerExceptionTests : XCTestCase +@end + +@implementation TransformerExceptionTests + +- (void)testTransformerExceptions +{ + NSDictionary *goodJSON = @{@"birthday":@"1992-03-15 00:00:00.000000"}; + NSDictionary *badJSON = @{@"birthday":@{@"date":@"1992-03-15 00:00:00.000000", @"time":@123}}; + NSError *error = nil; + + User *goodObj = [[User alloc] initWithDictionary:goodJSON error:&error]; + XCTAssertNotNil(goodObj); + XCTAssertNil(error); + + User *badObj = [[User alloc] initWithDictionary:badJSON error:&error]; + XCTAssertNil(badObj); + XCTAssertNotNil(error); +} + +@end From ec380de9e8243d36ce67c201d1f3936c8172fbf8 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 10:42:28 +0100 Subject: [PATCH 144/171] =?UTF-8?q?Missing=20transformer=20isn=E2=80=99t?= =?UTF-8?q?=20necessarily=20a=20programmer=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JSONModel/JSONModel/JSONModel.m | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 3e1e0ff1..ba86499d 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -462,12 +462,9 @@ -(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 mistake -> exception - @throw [NSException exceptionWithName:@"Type not allowed" - reason:[NSString stringWithFormat:@"%@ type not supported for %@.%@", property.type, [self class], property.name] - userInfo:nil]; + NSString* msg = [NSString stringWithFormat:@"%@ type not supported for %@.%@", property.type, [self class], property.name]; + JSONModelError* dataErr = [JSONModelError errorInvalidDataWithTypeMismatch:msg]; + *err = [dataErr errorByPrependingKeyPathComponent:property.name]; return NO; } From 5c88c5e73912c856cb18d1fce05315d9ba612e73 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 10:44:58 +0100 Subject: [PATCH 145/171] v1.5.1 Resolves #333 --- CHANGELOG.md | 4 ++++ JSONModel.podspec | 2 +- JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme | 2 +- JSONModel/Info.plist | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d87bc6d9..3dd7c471 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.5.1 (2016-09-12) + +- when a data transformer is missing, we now return an error rather than throwing an exception + ## v1.5.0 (2016-09-12) Minor version bump due to deprecations. No breaking changes. diff --git a/JSONModel.podspec b/JSONModel.podspec index 523dde44..50890061 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.5.0" + s.version = "1.5.1" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme index a561e844..e9bf3744 100644 --- a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -1,7 +1,7 @@ + version = "1.5.1"> diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index beed82a5..d18bd0a4 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.5.0 + 1.5.1 CFBundleSignature ???? CFBundleVersion From 8c5c8ee8ca4d7109d4860619c98ec9ad1c624b07 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 10:51:13 +0100 Subject: [PATCH 146/171] Fix changelog link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a7415d1..0458a587 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ JSONModel allows rapid creation of smart data models. You can use it in your iOS and macOS apps. Automatic introspection of your model classes and JSON input drastically reduces the amount of code you have to write. -See [CHANGELOG.md]([CHANGELOG.md]) for details on changes. +See [CHANGELOG.md](CHANGELOG.md) for details on changes. ## Installation From 9401793810521fab9ea0f1fedab3e92e672e3783 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Mon, 12 Sep 2016 14:04:51 +0100 Subject: [PATCH 147/171] Note support for watchOS/tvOS --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0458a587..3850165e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # JSONModel - Magical Data Modeling Framework for JSON -JSONModel allows rapid creation of smart data models. You can use it in your iOS -and macOS apps. Automatic introspection of your model classes and JSON input -drastically reduces the amount of code you have to write. +JSONModel allows rapid creation of smart data models. You can use it in your +iOS, macOS, watchOS and tvOS apps. Automatic introspection of your model classes +and JSON input drastically reduces the amount of code you have to write. See [CHANGELOG.md](CHANGELOG.md) for details on changes. From d28447cf1c36b5bbf44f61e22962f71afccfa57d Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 5 Oct 2016 17:59:01 +0100 Subject: [PATCH 148/171] Add `mapperForTitleCase` --- Examples/Tests/KeyMappingTests.m | 6 +++--- .../Tests/Models/Implementations/RenamedPropertyModel.m | 4 ++-- JSONModel/JSONModelTransformations/JSONKeyMapper.h | 5 +++++ JSONModel/JSONModelTransformations/JSONKeyMapper.m | 8 ++++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Examples/Tests/KeyMappingTests.m b/Examples/Tests/KeyMappingTests.m index 25741572..b02b4a19 100644 --- a/Examples/Tests/KeyMappingTests.m +++ b/Examples/Tests/KeyMappingTests.m @@ -358,7 +358,7 @@ -(void)testUsingBothGlobalAndCustomMappers - (void)testExceptionsMapper { - NSString *jsonString = @"{\"id\":\"12345\",\"prop_name\":\"TEST\"}"; + NSString *jsonString = @"{\"ID\":\"12345\",\"PropName\":\"TEST\"}"; RenamedPropertyModel *m = [[RenamedPropertyModel alloc] initWithString:jsonString error:nil]; XCTAssertNotNil(m, @"Could not initialize model from string"); @@ -370,8 +370,8 @@ - (void)testExceptionsMapper NSDictionary *dict = [m toDictionary]; XCTAssertNotNil(dict, @"toDictionary failed"); - XCTAssertEqualObjects(dict[@"id"], m.identifier, @"id does not equal '12345'"); - XCTAssertEqualObjects(dict[@"prop_name"], m.propName, @"prop_name does not equal 'TEST'"); + XCTAssertEqualObjects(dict[@"ID"], m.identifier, @"ID does not equal '12345'"); + XCTAssertEqualObjects(dict[@"PropName"], m.propName, @"PropName does not equal 'TEST'"); } @end diff --git a/Examples/Tests/Models/Implementations/RenamedPropertyModel.m b/Examples/Tests/Models/Implementations/RenamedPropertyModel.m index f353e2e9..8173b7b0 100644 --- a/Examples/Tests/Models/Implementations/RenamedPropertyModel.m +++ b/Examples/Tests/Models/Implementations/RenamedPropertyModel.m @@ -12,8 +12,8 @@ @implementation RenamedPropertyModel + (JSONKeyMapper *)keyMapper { - JSONKeyMapper *base = [JSONKeyMapper mapperForSnakeCase]; - return [JSONKeyMapper baseMapper:base withModelToJSONExceptions:@{@"identifier": @"id"}]; + JSONKeyMapper *base = [JSONKeyMapper mapperForTitleCase]; + return [JSONKeyMapper baseMapper:base withModelToJSONExceptions:@{@"identifier": @"ID"}]; } @end diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 7ba09672..35e44a84 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -82,6 +82,11 @@ typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); */ + (instancetype)mapperForSnakeCase; +/** + * Given a camelCase model property, this mapper finds JSON keys using the TitleCase equivalent. + */ ++ (instancetype)mapperForTitleCase; + /** * Creates a JSONKeyMapper based on a built-in JSONKeyMapper, with specific exceptions. * Use your JSONModel property names as keys, and the JSON key names as values. diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 15bda34c..e7f01d8e 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -138,6 +138,14 @@ + (instancetype)mapperForSnakeCase }]; } ++ (instancetype)mapperForTitleCase +{ + return [[self alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) + { + return [keyName stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[keyName substringToIndex:1].uppercaseString]; + }]; +} + + (instancetype)mapperFromUpperCaseToLowerCase { return [[self alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) From af3a17f324e7ed27e137b280e52694217e7ed241 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 5 Oct 2016 18:05:51 +0100 Subject: [PATCH 149/171] v1.6.0 --- CHANGELOG.md | 4 ++++ JSONModel.podspec | 2 +- JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme | 2 +- JSONModel/Info.plist | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dd7c471..0c0bf480 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.6.0 (2016-10-05) + +- added `mapperForTitleCase` + ## v1.5.1 (2016-09-12) - when a data transformer is missing, we now return an error rather than throwing an exception diff --git a/JSONModel.podspec b/JSONModel.podspec index 50890061..fbbd2372 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.5.1" + s.version = "1.6.0" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme index e9bf3744..8f52fcc1 100644 --- a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -1,7 +1,7 @@ + version = "1.6.0"> diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index d18bd0a4..a1dfe14d 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.5.1 + 1.6.0 CFBundleSignature ???? CFBundleVersion From 112e645a9b6c4de2603293a648cdbdf5792600bb Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 7 Oct 2016 13:27:26 +0100 Subject: [PATCH 150/171] =?UTF-8?q?Support=20=E2=80=9Cgeneric=E2=80=9D=20s?= =?UTF-8?q?etters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JSONModel/JSONModel/JSONModel.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index ba86499d..7cbafbda 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -693,6 +693,11 @@ -(void)__inspectProperties // setters p.customSetters = [NSMutableDictionary new]; + SEL genericSetter = NSSelectorFromString([NSString stringWithFormat:@"set%@WithJSONObject:", name]); + + if ([self respondsToSelector:genericSetter]) + p.customSetters[@"generic"] = [NSValue valueWithBytes:&genericSetter objCType:@encode(SEL)]; + for (Class type in allowedJSONTypes) { NSString *class = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:type]); @@ -851,6 +856,9 @@ - (BOOL)__customSetValue:(id )value forProperty:(JSONModelClassPropert SEL setter = nil; [property.customSetters[class] getValue:&setter]; + if (!setter) + [property.customSetters[@"generic"] getValue:&setter]; + if (!setter) return NO; From 533040abe124f8e93543ec8ed6bc152d921cc821 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 7 Oct 2016 13:27:39 +0100 Subject: [PATCH 151/171] Fix setter rendering in property description --- JSONModel/JSONModel/JSONModelClassProperty.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/JSONModel/JSONModel/JSONModelClassProperty.m b/JSONModel/JSONModel/JSONModelClassProperty.m index 67fe4e34..5330c921 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -28,8 +28,9 @@ -(NSString*)description for (id obj in self.customSetters.allValues) { - if (obj != [NSNull null]) - [setters addObject:obj]; + SEL selector; + [obj getValue:&selector]; + [setters addObject:NSStringFromSelector(selector)]; } [properties addObject:[NSString stringWithFormat: @"Setters = [%@]", [setters componentsJoinedByString:@", "]]]; From 242b400b169d88ecf18c8cba8c8d9e0f2ff483d6 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 7 Oct 2016 13:34:35 +0100 Subject: [PATCH 152/171] Tests for `setPropNameWithJSONObject:` --- .../Tests/Models/Implementations/EnumModel.m | 8 ++++++ Examples/Tests/PrimitiveTypesReadTests.m | 28 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Examples/Tests/Models/Implementations/EnumModel.m b/Examples/Tests/Models/Implementations/EnumModel.m index 68b13be1..bb8a5e62 100644 --- a/Examples/Tests/Models/Implementations/EnumModel.m +++ b/Examples/Tests/Models/Implementations/EnumModel.m @@ -35,6 +35,14 @@ -(void)setNestedStatusWithNSNumber:(NSNumber*)statusNumber _status = statusNumber.boolValue?StatusOpen:StatusClosed; } +- (void)setNestedStatusWithJSONObject:(id )object +{ + if ([object isKindOfClass:[NSArray class]]) + _status = [((NSArray *)object).firstObject isEqualToString:@"open"] ? StatusOpen : StatusClosed; + else + _status = StatusClosed; +} + -(id)JSONObjectForStatus { return (self.status==StatusOpen)?@"open":@"closed"; diff --git a/Examples/Tests/PrimitiveTypesReadTests.m b/Examples/Tests/PrimitiveTypesReadTests.m index 1812777c..bd65727f 100644 --- a/Examples/Tests/PrimitiveTypesReadTests.m +++ b/Examples/Tests/PrimitiveTypesReadTests.m @@ -83,6 +83,8 @@ -(void)testCustomSetters { NSString* json1 = @"{\"nested\":{\"status\":\"open\"},\"nsStatus\":\"closed\",\"nsuStatus\":\"open\",\"statusString\":\"open\"}"; NSString* json2 = @"{\"nested\":{\"status\":true},\"nsStatus\":\"closed\",\"nsuStatus\":\"open\",\"statusString\":\"open\"}"; + NSString* json3 = @"{\"nested\":{\"status\":[\"open\"]},\"nsStatus\":\"closed\",\"nsuStatus\":\"open\",\"statusString\":\"open\"}"; + NSString* json4 = @"{\"nested\":{\"status\":{}},\"nsStatus\":\"closed\",\"nsuStatus\":\"open\",\"statusString\":\"open\"}"; NSError* err; @@ -94,6 +96,14 @@ -(void)testCustomSetters XCTAssertNil(err, "%@", [err localizedDescription]); XCTAssertNotNil(p2, @"Could not read input json text"); + EnumModel* p3 = [[EnumModel alloc] initWithString: json3 error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(p3, @"Could not read input json text"); + + EnumModel* p4 = [[EnumModel alloc] initWithString: json4 error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(p4, @"Could not read input json text"); + XCTAssertTrue(p1.status==StatusOpen, @"Status is not StatusOpen"); XCTAssertTrue(p1.nsStatus==NSE_StatusClosed, @"nsStatus is not NSE_StatusClosed"); XCTAssertTrue(p1.nsuStatus==NSEU_StatusOpen, @"nsuStatus is not NSEU_StatusOpen"); @@ -102,6 +112,14 @@ -(void)testCustomSetters XCTAssertTrue(p2.nsStatus==NSE_StatusClosed, @"nsStatus is not NSE_StatusClosed"); XCTAssertTrue(p2.nsuStatus==NSEU_StatusOpen, @"nsuStatus is not NSEU_StatusOpen"); + XCTAssertTrue(p3.status==StatusOpen, @"Status is not StatusOpen"); + XCTAssertTrue(p3.nsStatus==NSE_StatusClosed, @"nsStatus is not NSE_StatusClosed"); + XCTAssertTrue(p3.nsuStatus==NSEU_StatusOpen, @"nsuStatus is not NSEU_StatusOpen"); + + XCTAssertTrue(p4.status==StatusClosed, @"Status is not StatusOpen"); + XCTAssertTrue(p4.nsStatus==NSE_StatusClosed, @"nsStatus is not NSE_StatusClosed"); + XCTAssertTrue(p4.nsuStatus==NSEU_StatusOpen, @"nsuStatus is not NSEU_StatusOpen"); + NSString* out1 = [p1 toJSONString]; XCTAssertTrue([out1 rangeOfString:@"\"statusString\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); XCTAssertTrue([out1 rangeOfString:@"\"nsuStatus\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); @@ -111,6 +129,16 @@ -(void)testCustomSetters XCTAssertTrue([out2 rangeOfString:@"\"statusString\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); XCTAssertTrue([out2 rangeOfString:@"\"nsuStatus\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); XCTAssertTrue([out2 rangeOfString:@"\"nsStatus\":\"closed\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + + NSString* out3 = [p3 toJSONString]; + XCTAssertTrue([out3 rangeOfString:@"\"statusString\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([out3 rangeOfString:@"\"nsuStatus\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([out3 rangeOfString:@"\"nsStatus\":\"closed\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + + NSString* out4 = [p4 toJSONString]; + XCTAssertTrue([out4 rangeOfString:@"\"statusString\":\"closed\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([out4 rangeOfString:@"\"nsuStatus\":\"open\""].location!=NSNotFound, @"Exporting enum value didn't work out"); + XCTAssertTrue([out4 rangeOfString:@"\"nsStatus\":\"closed\""].location!=NSNotFound, @"Exporting enum value didn't work out"); } @end From 9f68c43f74cd40160b44b2b37a5c92613fc2ce3f Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 7 Oct 2016 13:36:35 +0100 Subject: [PATCH 153/171] Improve v1.6.0 changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c0bf480..ca546087 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## v1.6.0 (2016-10-05) -- added `mapperForTitleCase` +- added new built-in key mapper - `mapperForTitleCase` ## v1.5.1 (2016-09-12) From b99e14cf32e9b03fca96cd1a2beeb2e0fff1503a Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 7 Oct 2016 13:37:29 +0100 Subject: [PATCH 154/171] v1.7.0 --- CHANGELOG.md | 4 ++++ JSONModel.podspec | 2 +- JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme | 2 +- JSONModel/Info.plist | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca546087..62df7195 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.7.0 (2016-10-07) + +- added generic custom setter method - `setPropertyNameWithJSONObject` + ## v1.6.0 (2016-10-05) - added new built-in key mapper - `mapperForTitleCase` diff --git a/JSONModel.podspec b/JSONModel.podspec index fbbd2372..15e0cd79 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.6.0" + s.version = "1.7.0" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme index 8f52fcc1..5fbaa404 100644 --- a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -1,7 +1,7 @@ + version = "1.7.0"> diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index a1dfe14d..01a700fd 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.6.0 + 1.7.0 CFBundleSignature ???? CFBundleVersion From b677215e2cc80a10b9ba4b71cddd2b4afaa05e20 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 7 Oct 2016 13:52:34 +0100 Subject: [PATCH 155/171] Remove key mapper caching --- .../JSONModelTransformations/JSONKeyMapper.m | 39 +------------------ 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index e7f01d8e..2c6382e7 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -4,25 +4,9 @@ // #import "JSONKeyMapper.h" -#import - -@interface JSONKeyMapper() -@property (nonatomic, strong) NSMutableDictionary *toJSONMap; -@property (nonatomic, assign) OSSpinLock lock; -@end @implementation JSONKeyMapper -- (instancetype)init -{ - if (!(self = [super init])) - return nil; - - _toJSONMap = [NSMutableDictionary new]; - - return self; -} - - (instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel modelToJSONBlock:(JSONModelKeyMapBlock)toJSON { return [self initWithModelToJSONBlock:toJSON]; @@ -33,28 +17,7 @@ - (instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON if (!(self = [self init])) return nil; - __weak JSONKeyMapper *weakSelf = self; - - _modelToJSONKeyBlock = ^NSString *(NSString *keyName) - { - __strong JSONKeyMapper *strongSelf = weakSelf; - - id cached = strongSelf.toJSONMap[keyName]; - - if (cached == [NSNull null]) - return nil; - - if (cached) - return strongSelf.toJSONMap[keyName]; - - NSString *result = toJSON(keyName); - - OSSpinLockLock(&strongSelf->_lock); - strongSelf.toJSONMap[keyName] = result ? result : [NSNull null]; - OSSpinLockUnlock(&strongSelf->_lock); - - return result; - }; + _modelToJSONKeyBlock = toJSON; return self; } From d8fe323c891820d733f909cf02f70806a26958d3 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 7 Oct 2016 13:56:09 +0100 Subject: [PATCH 156/171] Implement unused readonly property --- JSONModel/JSONModelTransformations/JSONKeyMapper.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 2c6382e7..9cdb8f27 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -42,6 +42,11 @@ - (instancetype)initWithModelToJSONDictionary:(NSDictionary *)toJSON return self; } +- (JSONModelKeyMapBlock)JSONToModelKeyBlock +{ + return nil; +} + + (NSDictionary *)swapKeysAndValuesInDictionary:(NSDictionary *)dictionary { NSArray *keys = dictionary.allKeys; From 961b3099ebb8a970b72f6c788e47f37036230655 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Fri, 7 Oct 2016 16:28:31 +0100 Subject: [PATCH 157/171] Remove use of `performSelector` As per http://stackoverflow.com/a/20058585/743957 --- JSONModel/JSONModel/JSONModel.m | 35 +++++++++++---------------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 7cbafbda..6ad83688 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -449,30 +449,22 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM //check if there's a transformer with that name if (foundCustomTransformer) { + IMP imp = [valueTransformer methodForSelector:selector]; + id (*func)(id, SEL, id) = (void *)imp; + jsonValue = func(valueTransformer, selector, jsonValue); - //it's OK, believe me... -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-performSelector-leaks" - //transform the value - jsonValue = [valueTransformer performSelector:selector withObject:jsonValue]; -#pragma clang diagnostic pop - - if (![jsonValue isEqual:[self valueForKey:property.name]]) { - [self setValue:jsonValue forKey: property.name]; - } - + if (![jsonValue isEqual:[self valueForKey:property.name]]) + [self setValue:jsonValue forKey:property.name]; } else { NSString* msg = [NSString stringWithFormat:@"%@ type not supported for %@.%@", property.type, [self class], property.name]; JSONModelError* dataErr = [JSONModelError errorInvalidDataWithTypeMismatch:msg]; *err = [dataErr errorByPrependingKeyPathComponent:property.name]; return NO; } - } else { // 3.4) handle "all other" cases (if any) - if (![jsonValue isEqual:[self valueForKey:property.name]]) { - [self setValue:jsonValue forKey: property.name]; - } + if (![jsonValue isEqual:[self valueForKey:property.name]]) + [self setValue:jsonValue forKey:property.name]; } } } @@ -1017,17 +1009,12 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames //check if there's a transformer declared if (foundCustomTransformer) { + IMP imp = [valueTransformer methodForSelector:selector]; + id (*func)(id, SEL, id) = (void *)imp; + value = func(valueTransformer, selector, value); - //it's OK, believe me... -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-performSelector-leaks" - value = [valueTransformer performSelector:selector withObject:value]; -#pragma clang diagnostic pop - - [tempDictionary setValue:value forKeyPath: keyPath]; - + [tempDictionary setValue:value forKeyPath:keyPath]; } else { - //in this case most probably a custom property was defined in a model //but no default reverse transformer for it @throw [NSException exceptionWithName:@"Value transformer not found" From 1a56aca8cd43d945cea8b23a89515d0171215826 Mon Sep 17 00:00:00 2001 From: Joshua Wang Date: Fri, 28 Oct 2016 14:58:21 -0700 Subject: [PATCH 158/171] Add APPLICATION_EXTENSION_API_ONLY = YES; resolve linking against dylib not safe for application extension issue --- JSONModel.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index 4773edec..fb662cff 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -231,6 +231,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -280,6 +281,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -321,6 +323,7 @@ 92C9BC541B19A51100D79B06 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -338,6 +341,7 @@ 92C9BC551B19A51100D79B06 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; From 25f6ce123ca638665e112699ff772f299da979fe Mon Sep 17 00:00:00 2001 From: Priya Tirounarayanane Date: Tue, 21 Feb 2017 12:48:52 +0100 Subject: [PATCH 159/171] Support for macOS, tvOS and macOS (#563) * Added support for macOS, tvOS and watchOS. * Changed version to 1.7.0 for macOS, watchOS and tvOS. * Shared schemes * fix carthage error: Dependency "jsonmodel" has no shared framework schemes for any of the platforms: Mac --- JSONModel-mac/Info.plist | 26 + JSONModel-tvOS/Info.plist | 24 + JSONModel-watchOS/Info.plist | 24 + JSONModel.xcodeproj/project.pbxproj | 471 ++++++++++++++++++ .../xcschemes/JSONModel-mac.xcscheme | 80 +++ .../xcschemes/JSONModel-tvOS.xcscheme | 80 +++ .../xcschemes/JSONModel-watchOS.xcscheme | 80 +++ .../xcshareddata/xcschemes/JSONModel.xcscheme | 2 +- 8 files changed, 786 insertions(+), 1 deletion(-) create mode 100644 JSONModel-mac/Info.plist create mode 100644 JSONModel-tvOS/Info.plist create mode 100644 JSONModel-watchOS/Info.plist create mode 100644 JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-mac.xcscheme create mode 100644 JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-tvOS.xcscheme create mode 100644 JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-watchOS.xcscheme diff --git a/JSONModel-mac/Info.plist b/JSONModel-mac/Info.plist new file mode 100644 index 00000000..952e92ab --- /dev/null +++ b/JSONModel-mac/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.7.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2017 com.jsonmodel. All rights reserved. + NSPrincipalClass + + + diff --git a/JSONModel-tvOS/Info.plist b/JSONModel-tvOS/Info.plist new file mode 100644 index 00000000..67183244 --- /dev/null +++ b/JSONModel-tvOS/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.7.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/JSONModel-watchOS/Info.plist b/JSONModel-watchOS/Info.plist new file mode 100644 index 00000000..67183244 --- /dev/null +++ b/JSONModel-watchOS/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.7.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index fb662cff..770ee91b 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -7,6 +7,57 @@ objects = { /* Begin PBXBuildFile section */ + 01D68A031E4219B800CFE82F /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A041E4219BE00CFE82F /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC641B19A5B600D79B06 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A051E4219C300CFE82F /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC651B19A5B600D79B06 /* JSONModel.m */; }; + 01D68A061E4219C800CFE82F /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; }; + 01D68A071E4219CC00CFE82F /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */; }; + 01D68A081E4219D000CFE82F /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A091E4219D600CFE82F /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */; }; + 01D68A0A1E4219DA00CFE82F /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC711B19A5B600D79B06 /* JSONAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A0B1E4219DF00CFE82F /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC721B19A5B600D79B06 /* JSONAPI.m */; }; + 01D68A0C1E4219E100CFE82F /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A0D1E4219E600CFE82F /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC741B19A5B600D79B06 /* JSONHTTPClient.m */; }; + 01D68A0E1E4219E900CFE82F /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A0F1E4219ED00CFE82F /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC761B19A5B600D79B06 /* JSONModel+networking.m */; }; + 01D68A101E4219F100CFE82F /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A111E4219F600CFE82F /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC791B19A5B600D79B06 /* JSONKeyMapper.m */; }; + 01D68A121E4219F900CFE82F /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A131E4219FE00CFE82F /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */; }; + 01D68A2F1E421B9000CFE82F /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A301E421B9300CFE82F /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A311E421B9A00CFE82F /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC641B19A5B600D79B06 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A321E421B9C00CFE82F /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC641B19A5B600D79B06 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A331E421BA100CFE82F /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC651B19A5B600D79B06 /* JSONModel.m */; }; + 01D68A341E421BA100CFE82F /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC651B19A5B600D79B06 /* JSONModel.m */; }; + 01D68A351E421BA500CFE82F /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; }; + 01D68A361E421BA500CFE82F /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; }; + 01D68A371E421BA800CFE82F /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */; }; + 01D68A381E421BA900CFE82F /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */; }; + 01D68A391E421BAB00CFE82F /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A3A1E421BAE00CFE82F /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A3B1E421BB300CFE82F /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */; }; + 01D68A3C1E421BB300CFE82F /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */; }; + 01D68A3D1E421BB600CFE82F /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC711B19A5B600D79B06 /* JSONAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A3E1E421BB900CFE82F /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC711B19A5B600D79B06 /* JSONAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A3F1E421BBE00CFE82F /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC721B19A5B600D79B06 /* JSONAPI.m */; }; + 01D68A401E421BBE00CFE82F /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC721B19A5B600D79B06 /* JSONAPI.m */; }; + 01D68A411E421BC100CFE82F /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A421E421BC300CFE82F /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC731B19A5B600D79B06 /* JSONHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A431E421BC800CFE82F /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC741B19A5B600D79B06 /* JSONHTTPClient.m */; }; + 01D68A441E421BC800CFE82F /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC741B19A5B600D79B06 /* JSONHTTPClient.m */; }; + 01D68A451E421BCB00CFE82F /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A461E421BCD00CFE82F /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC751B19A5B600D79B06 /* JSONModel+networking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A471E421BD200CFE82F /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC761B19A5B600D79B06 /* JSONModel+networking.m */; }; + 01D68A481E421BD200CFE82F /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC761B19A5B600D79B06 /* JSONModel+networking.m */; }; + 01D68A491E421BD500CFE82F /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A4A1E421BD800CFE82F /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A4B1E421BDD00CFE82F /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC791B19A5B600D79B06 /* JSONKeyMapper.m */; }; + 01D68A4C1E421BDD00CFE82F /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC791B19A5B600D79B06 /* JSONKeyMapper.m */; }; + 01D68A4D1E421BE000CFE82F /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A4E1E421BE300CFE82F /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 01D68A4F1E421BE900CFE82F /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */; }; + 01D68A501E421BE900CFE82F /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */; }; 92C9BC7C1B19A5B600D79B06 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC641B19A5B600D79B06 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92C9BC7D1B19A5B600D79B06 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC651B19A5B600D79B06 /* JSONModel.m */; }; 92C9BC801B19A5B600D79B06 /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */; }; @@ -27,6 +78,12 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 01D689FB1E42150100CFE82F /* JSONModel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JSONModel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 01D689FE1E42150100CFE82F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 01D68A1A1E421A8400CFE82F /* JSONModel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JSONModel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 01D68A1D1E421A8500CFE82F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 01D68A271E421AC100CFE82F /* JSONModel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JSONModel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 01D68A2A1E421AC100CFE82F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 92C9BC3D1B19A51100D79B06 /* JSONModel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JSONModel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 92C9BC411B19A51100D79B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 92C9BC641B19A5B600D79B06 /* JSONModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONModel.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; @@ -49,6 +106,27 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 01D689F71E42150100CFE82F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 01D68A161E421A8400CFE82F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 01D68A231E421AC100CFE82F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 92C9BC391B19A51100D79B06 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -59,6 +137,30 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 01D689FC1E42150100CFE82F /* JSONModel-mac */ = { + isa = PBXGroup; + children = ( + 01D689FE1E42150100CFE82F /* Info.plist */, + ); + path = "JSONModel-mac"; + sourceTree = ""; + }; + 01D68A1B1E421A8400CFE82F /* JSONModel-watchOS */ = { + isa = PBXGroup; + children = ( + 01D68A1D1E421A8500CFE82F /* Info.plist */, + ); + path = "JSONModel-watchOS"; + sourceTree = ""; + }; + 01D68A281E421AC100CFE82F /* JSONModel-tvOS */ = { + isa = PBXGroup; + children = ( + 01D68A2A1E421AC100CFE82F /* Info.plist */, + ); + path = "JSONModel-tvOS"; + sourceTree = ""; + }; 1A5B9D3F1D1C8D72006FE4B1 /* JSONModel */ = { isa = PBXGroup; children = ( @@ -75,6 +177,9 @@ isa = PBXGroup; children = ( 1A5B9D3F1D1C8D72006FE4B1 /* JSONModel */, + 01D689FC1E42150100CFE82F /* JSONModel-mac */, + 01D68A1B1E421A8400CFE82F /* JSONModel-watchOS */, + 01D68A281E421AC100CFE82F /* JSONModel-tvOS */, 92C9BC3E1B19A51100D79B06 /* Products */, ); indentWidth = 4; @@ -86,6 +191,9 @@ isa = PBXGroup; children = ( 92C9BC3D1B19A51100D79B06 /* JSONModel.framework */, + 01D689FB1E42150100CFE82F /* JSONModel.framework */, + 01D68A1A1E421A8400CFE82F /* JSONModel.framework */, + 01D68A271E421AC100CFE82F /* JSONModel.framework */, ); name = Products; sourceTree = ""; @@ -130,6 +238,54 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 01D689F81E42150100CFE82F /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 01D68A061E4219C800CFE82F /* JSONModelClassProperty.h in Headers */, + 01D68A041E4219BE00CFE82F /* JSONModel.h in Headers */, + 01D68A0E1E4219E900CFE82F /* JSONModel+networking.h in Headers */, + 01D68A101E4219F100CFE82F /* JSONKeyMapper.h in Headers */, + 01D68A031E4219B800CFE82F /* JSONModelLib.h in Headers */, + 01D68A081E4219D000CFE82F /* JSONModelError.h in Headers */, + 01D68A0A1E4219DA00CFE82F /* JSONAPI.h in Headers */, + 01D68A121E4219F900CFE82F /* JSONValueTransformer.h in Headers */, + 01D68A0C1E4219E100CFE82F /* JSONHTTPClient.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 01D68A171E421A8400CFE82F /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 01D68A351E421BA500CFE82F /* JSONModelClassProperty.h in Headers */, + 01D68A311E421B9A00CFE82F /* JSONModel.h in Headers */, + 01D68A451E421BCB00CFE82F /* JSONModel+networking.h in Headers */, + 01D68A491E421BD500CFE82F /* JSONKeyMapper.h in Headers */, + 01D68A2F1E421B9000CFE82F /* JSONModelLib.h in Headers */, + 01D68A391E421BAB00CFE82F /* JSONModelError.h in Headers */, + 01D68A3D1E421BB600CFE82F /* JSONAPI.h in Headers */, + 01D68A4D1E421BE000CFE82F /* JSONValueTransformer.h in Headers */, + 01D68A411E421BC100CFE82F /* JSONHTTPClient.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 01D68A241E421AC100CFE82F /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 01D68A361E421BA500CFE82F /* JSONModelClassProperty.h in Headers */, + 01D68A321E421B9C00CFE82F /* JSONModel.h in Headers */, + 01D68A461E421BCD00CFE82F /* JSONModel+networking.h in Headers */, + 01D68A4A1E421BD800CFE82F /* JSONKeyMapper.h in Headers */, + 01D68A301E421B9300CFE82F /* JSONModelLib.h in Headers */, + 01D68A3A1E421BAE00CFE82F /* JSONModelError.h in Headers */, + 01D68A3E1E421BB900CFE82F /* JSONAPI.h in Headers */, + 01D68A4E1E421BE300CFE82F /* JSONValueTransformer.h in Headers */, + 01D68A421E421BC300CFE82F /* JSONHTTPClient.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 92C9BC3A1B19A51100D79B06 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -149,6 +305,60 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 01D689FA1E42150100CFE82F /* JSONModel-mac */ = { + isa = PBXNativeTarget; + buildConfigurationList = 01D68A021E42150100CFE82F /* Build configuration list for PBXNativeTarget "JSONModel-mac" */; + buildPhases = ( + 01D689F61E42150100CFE82F /* Sources */, + 01D689F71E42150100CFE82F /* Frameworks */, + 01D689F81E42150100CFE82F /* Headers */, + 01D689F91E42150100CFE82F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "JSONModel-mac"; + productName = "JSONModel-mac"; + productReference = 01D689FB1E42150100CFE82F /* JSONModel.framework */; + productType = "com.apple.product-type.framework"; + }; + 01D68A191E421A8400CFE82F /* JSONModel-watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 01D68A1F1E421A8500CFE82F /* Build configuration list for PBXNativeTarget "JSONModel-watchOS" */; + buildPhases = ( + 01D68A151E421A8400CFE82F /* Sources */, + 01D68A161E421A8400CFE82F /* Frameworks */, + 01D68A171E421A8400CFE82F /* Headers */, + 01D68A181E421A8400CFE82F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "JSONModel-watchOS"; + productName = "JSONModel-watchOS"; + productReference = 01D68A1A1E421A8400CFE82F /* JSONModel.framework */; + productType = "com.apple.product-type.framework"; + }; + 01D68A261E421AC100CFE82F /* JSONModel-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 01D68A2C1E421AC100CFE82F /* Build configuration list for PBXNativeTarget "JSONModel-tvOS" */; + buildPhases = ( + 01D68A221E421AC100CFE82F /* Sources */, + 01D68A231E421AC100CFE82F /* Frameworks */, + 01D68A241E421AC100CFE82F /* Headers */, + 01D68A251E421AC100CFE82F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "JSONModel-tvOS"; + productName = "JSONModel-tvOS"; + productReference = 01D68A271E421AC100CFE82F /* JSONModel.framework */; + productType = "com.apple.product-type.framework"; + }; 92C9BC3C1B19A51100D79B06 /* JSONModel */ = { isa = PBXNativeTarget; buildConfigurationList = 92C9BC531B19A51100D79B06 /* Build configuration list for PBXNativeTarget "JSONModel" */; @@ -176,6 +386,18 @@ LastUpgradeCheck = 0720; ORGANIZATIONNAME = com.jsonmodel; TargetAttributes = { + 01D689FA1E42150100CFE82F = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; + 01D68A191E421A8400CFE82F = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; + 01D68A261E421AC100CFE82F = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; 92C9BC3C1B19A51100D79B06 = { CreatedOnToolsVersion = 6.3.1; }; @@ -194,11 +416,35 @@ projectRoot = ""; targets = ( 92C9BC3C1B19A51100D79B06 /* JSONModel */, + 01D689FA1E42150100CFE82F /* JSONModel-mac */, + 01D68A191E421A8400CFE82F /* JSONModel-watchOS */, + 01D68A261E421AC100CFE82F /* JSONModel-tvOS */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 01D689F91E42150100CFE82F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 01D68A181E421A8400CFE82F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 01D68A251E421AC100CFE82F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 92C9BC3B1B19A51100D79B06 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -209,6 +455,51 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 01D689F61E42150100CFE82F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 01D68A0D1E4219E600CFE82F /* JSONHTTPClient.m in Sources */, + 01D68A0F1E4219ED00CFE82F /* JSONModel+networking.m in Sources */, + 01D68A0B1E4219DF00CFE82F /* JSONAPI.m in Sources */, + 01D68A131E4219FE00CFE82F /* JSONValueTransformer.m in Sources */, + 01D68A091E4219D600CFE82F /* JSONModelError.m in Sources */, + 01D68A111E4219F600CFE82F /* JSONKeyMapper.m in Sources */, + 01D68A051E4219C300CFE82F /* JSONModel.m in Sources */, + 01D68A071E4219CC00CFE82F /* JSONModelClassProperty.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 01D68A151E421A8400CFE82F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 01D68A431E421BC800CFE82F /* JSONHTTPClient.m in Sources */, + 01D68A471E421BD200CFE82F /* JSONModel+networking.m in Sources */, + 01D68A3F1E421BBE00CFE82F /* JSONAPI.m in Sources */, + 01D68A4F1E421BE900CFE82F /* JSONValueTransformer.m in Sources */, + 01D68A3B1E421BB300CFE82F /* JSONModelError.m in Sources */, + 01D68A4B1E421BDD00CFE82F /* JSONKeyMapper.m in Sources */, + 01D68A331E421BA100CFE82F /* JSONModel.m in Sources */, + 01D68A371E421BA800CFE82F /* JSONModelClassProperty.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 01D68A221E421AC100CFE82F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 01D68A441E421BC800CFE82F /* JSONHTTPClient.m in Sources */, + 01D68A481E421BD200CFE82F /* JSONModel+networking.m in Sources */, + 01D68A401E421BBE00CFE82F /* JSONAPI.m in Sources */, + 01D68A501E421BE900CFE82F /* JSONValueTransformer.m in Sources */, + 01D68A3C1E421BB300CFE82F /* JSONModelError.m in Sources */, + 01D68A4C1E421BDD00CFE82F /* JSONKeyMapper.m in Sources */, + 01D68A341E421BA100CFE82F /* JSONModel.m in Sources */, + 01D68A381E421BA900CFE82F /* JSONModelClassProperty.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 92C9BC381B19A51100D79B06 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -227,6 +518,159 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ + 01D68A001E42150100CFE82F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = "JSONModel-mac/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-mac"; + PRODUCT_NAME = "$(PROJECT_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 01D68A011E42150100CFE82F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = "JSONModel-mac/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-mac"; + PRODUCT_NAME = "$(PROJECT_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 01D68A201E421A8500CFE82F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = ""; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "JSONModel-watchOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-watchOS"; + PRODUCT_NAME = "$(PROJECT_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 3.1; + }; + name = Debug; + }; + 01D68A211E421A8500CFE82F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "JSONModel-watchOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-watchOS"; + PRODUCT_NAME = "$(PROJECT_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 3.1; + }; + name = Release; + }; + 01D68A2D1E421AC100CFE82F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = ""; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "JSONModel-tvOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-tvOS"; + PRODUCT_NAME = "$(PROJECT_NAME)"; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Debug; + }; + 01D68A2E1E421AC100CFE82F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "JSONModel-tvOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-tvOS"; + PRODUCT_NAME = "$(PROJECT_NAME)"; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Release; + }; 92C9BC511B19A51100D79B06 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -359,6 +803,33 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 01D68A021E42150100CFE82F /* Build configuration list for PBXNativeTarget "JSONModel-mac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 01D68A001E42150100CFE82F /* Debug */, + 01D68A011E42150100CFE82F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 01D68A1F1E421A8500CFE82F /* Build configuration list for PBXNativeTarget "JSONModel-watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 01D68A201E421A8500CFE82F /* Debug */, + 01D68A211E421A8500CFE82F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 01D68A2C1E421AC100CFE82F /* Build configuration list for PBXNativeTarget "JSONModel-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 01D68A2D1E421AC100CFE82F /* Debug */, + 01D68A2E1E421AC100CFE82F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 92C9BC371B19A51100D79B06 /* Build configuration list for PBXProject "JSONModel" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-mac.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-mac.xcscheme new file mode 100644 index 00000000..661532da --- /dev/null +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-mac.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-tvOS.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-tvOS.xcscheme new file mode 100644 index 00000000..8cac74ca --- /dev/null +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-tvOS.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-watchOS.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-watchOS.xcscheme new file mode 100644 index 00000000..0221e069 --- /dev/null +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel-watchOS.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme index 5fbaa404..ca3fb1a2 100644 --- a/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -1,7 +1,7 @@ + version = "1.3"> From c59840cc7f151674020634c49cc0952bdc8c0a6f Mon Sep 17 00:00:00 2001 From: Frank van Vliet Date: Thu, 23 Feb 2017 16:14:27 +0100 Subject: [PATCH 160/171] Swift 3.0 support added (#568) --- JSONModel/JSONModel/JSONModel.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index ca673bcc..95cf61a6 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -260,8 +260,18 @@ DEPRECATED_ATTRIBUTE * @property (strong) NSArray *things; * @param propertyName the name of the property * @return Class the class used to deserialize the elements of the collection + * + * Example in Swift 3.0: + * override static func classForCollectionProperty(propertyName: String) -> AnyClass? { + * switch propertyName { + * case "childModel": + * return ChildModel.self + * default: + * return nil + * } + * } */ -+ (Class)classForCollectionProperty:(NSString *)propertyName; ++ (Class)classForCollectionProperty:(NSString *)propertyName NS_SWIFT_NAME(classForCollectionProperty(propertyName:)); /** * Merges values from the given dictionary into the model instance. From cd940e7ae0e74c927cd4293931f5d7e6465c343d Mon Sep 17 00:00:00 2001 From: Jboy Date: Fri, 24 Mar 2017 20:29:01 +0800 Subject: [PATCH 161/171] fix bug (#570) --- JSONModel/JSONModel/JSONModel.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 6ad83688..75440824 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -456,9 +456,11 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM if (![jsonValue isEqual:[self valueForKey:property.name]]) [self setValue:jsonValue forKey:property.name]; } else { - NSString* msg = [NSString stringWithFormat:@"%@ type not supported for %@.%@", property.type, [self class], property.name]; - JSONModelError* dataErr = [JSONModelError errorInvalidDataWithTypeMismatch:msg]; - *err = [dataErr errorByPrependingKeyPathComponent:property.name]; + if (err) { + NSString* msg = [NSString stringWithFormat:@"%@ type not supported for %@.%@", property.type, [self class], property.name]; + JSONModelError* dataErr = [JSONModelError errorInvalidDataWithTypeMismatch:msg]; + *err = [dataErr errorByPrependingKeyPathComponent:property.name]; + } return NO; } } else { @@ -1150,7 +1152,9 @@ + (NSMutableDictionary *)dictionaryOfModelsFromDictionary:(NSDictionary *)dictio } else { - *err = [JSONModelError errorInvalidDataWithTypeMismatch:@"Only dictionaries and arrays are supported"]; + if (err) { + *err = [JSONModelError errorInvalidDataWithTypeMismatch:@"Only dictionaries and arrays are supported"]; + } return nil; } } From 9db401306b35e836e497c81ab0bf2d0256c007ab Mon Sep 17 00:00:00 2001 From: HuangTianhui Date: Tue, 28 Mar 2017 23:17:00 +0800 Subject: [PATCH 162/171] add more primitive types support (#569) * add more primitive types support * fix char convert to BOOL bugs * add Unit Test for primitive support * remove commented codes --- Examples/Tests/Data/primitives.json | 12 ++++++++++-- Examples/Tests/Data/primitivesWithErrors.json | 10 +++++++++- Examples/Tests/Models/Headers/PrimitivesModel.h | 8 ++++++++ Examples/Tests/PrimitiveTypesReadTests.m | 8 ++++++++ JSONModel/JSONModel/JSONModel.m | 7 +------ .../JSONModelTransformations/JSONValueTransformer.m | 3 ++- 6 files changed, 38 insertions(+), 10 deletions(-) diff --git a/Examples/Tests/Data/primitives.json b/Examples/Tests/Data/primitives.json index ac05246a..d815a5ff 100644 --- a/Examples/Tests/Data/primitives.json +++ b/Examples/Tests/Data/primitives.json @@ -5,7 +5,15 @@ "floatNumber": 12.12, "doubleNumber": 121231312.124, - + "boolYES": true, - "boolNO": false + "boolNO": false, + + "unsignedIntNumber": 6666, + "unsignedLongNumber": 666666, + "longLongNumber": 121231312, + "unsignedLongLongNumber": 4121231312, + "unsignedShortNumber": 5555, + "charNumber": 30, + "unsignedCharNumber": 255 } diff --git a/Examples/Tests/Data/primitivesWithErrors.json b/Examples/Tests/Data/primitivesWithErrors.json index 47fa4c56..9dc5d0df 100644 --- a/Examples/Tests/Data/primitivesWithErrors.json +++ b/Examples/Tests/Data/primitivesWithErrors.json @@ -6,5 +6,13 @@ "doubleNumber": 121231312.124, "boolYES": true, - "boolNO": false + "boolNO": false, + + "unsignedIntNumber": 6666, + "unsignedLongNumber": 666666, + "longLongNumber": 121231312, + "unsignedLongLongNumber": 4121231312, + "unsignedShortNumber": 5555, + "charNumber": 30, + "unsignedCharNumber": 255 } diff --git a/Examples/Tests/Models/Headers/PrimitivesModel.h b/Examples/Tests/Models/Headers/PrimitivesModel.h index 3c1b0f00..f1fe652e 100644 --- a/Examples/Tests/Models/Headers/PrimitivesModel.h +++ b/Examples/Tests/Models/Headers/PrimitivesModel.h @@ -18,4 +18,12 @@ @property (assign, nonatomic) BOOL boolYES; @property (assign, nonatomic) BOOL boolNO; +@property (assign, nonatomic) unsigned int unsignedIntNumber; +@property (assign, nonatomic) unsigned long unsignedLongNumber; +@property (assign, nonatomic) long long longLongNumber; +@property (assign, nonatomic) unsigned long long unsignedLongLongNumber; +@property (assign, nonatomic) unsigned short unsignedShortNumber; +@property (assign, nonatomic) char charNumber; +@property (assign, nonatomic) unsigned char unsignedCharNumber; + @end diff --git a/Examples/Tests/PrimitiveTypesReadTests.m b/Examples/Tests/PrimitiveTypesReadTests.m index bd65727f..c70e7a85 100644 --- a/Examples/Tests/PrimitiveTypesReadTests.m +++ b/Examples/Tests/PrimitiveTypesReadTests.m @@ -50,6 +50,14 @@ -(void)testPrimitiveTypes XCTAssertTrue(p.boolNO==NO, @"boolNO read fail"); XCTAssertTrue(p.boolYES==YES, @"boolYES read fail"); + + XCTAssertTrue(p.unsignedIntNumber==6666, @"unsignedIntNumber read fail"); + XCTAssertTrue(p.unsignedLongNumber==666666, @"unsignedLongNumber read fail"); + XCTAssertTrue(p.longLongNumber==121231312, @"longLongNumber read fail"); + XCTAssertTrue(p.unsignedLongLongNumber==4121231312, @"unsignedLongLongNumber read fail"); + XCTAssertTrue(p.unsignedShortNumber==5555, @"unsignedShortNumber read fail"); + XCTAssertTrue(p.charNumber==30, @"charNumber read fail"); + XCTAssertTrue(p.unsignedCharNumber==255, @"unsignedCharNumber read fail"); } -(void)testBoolExport diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 75440824..18d46dbf 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -53,6 +53,7 @@ +(void)load allowedPrimitiveTypes = @[ @"BOOL", @"float", @"int", @"long", @"double", @"short", + @"unsigned int", @"usigned long", @"long long", @"unsigned long long", @"unsigned short", @"char", @"unsigned char", //and some famous aliases @"NSInteger", @"NSUInteger", @"Block" @@ -566,12 +567,6 @@ -(void)__inspectProperties continue; //to next property } - //check for 64b BOOLs - if ([propertyAttributes hasPrefix:@"Tc,"]) { - //mask BOOLs as structs so they can have custom converters - p.structName = @"BOOL"; - } - scanner = [NSScanner scannerWithString: propertyAttributes]; //JMLog(@"attr: %@", [NSString stringWithCString:attrs encoding:NSUTF8StringEncoding]); diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 8ffc00e5..0fc55714 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -20,7 +20,8 @@ -(id)init { self = [super init]; if (self) { - _primitivesNames = @{@"f":@"float", @"i":@"int", @"d":@"double", @"l":@"long", @"c":@"BOOL", @"s":@"short", @"q":@"long", + _primitivesNames = @{@"f":@"float", @"i":@"int", @"d":@"double", @"l":@"long", @"B":@"BOOL", @"s":@"short", + @"I":@"unsigned int", @"L":@"usigned long", @"q":@"long long", @"Q":@"unsigned long long", @"S":@"unsigned short", @"c":@"char", @"C":@"unsigned char", //and some famous aliases of primitive types // BOOL is now "B" on iOS __LP64 builds @"I":@"NSInteger", @"Q":@"NSUInteger", @"B":@"BOOL", From e581b876977e4fb01de82b8499c2525aa0042b11 Mon Sep 17 00:00:00 2001 From: mingming Date: Thu, 30 Mar 2017 17:35:59 +0800 Subject: [PATCH 163/171] Fix JSONModel Objective-C compilation with Xcode 8.3 (#573) --- JSONModel.xcodeproj/project.pbxproj | 4 ++-- JSONModel/{module.modulemap => JSONModel.modulemap} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename JSONModel/{module.modulemap => JSONModel.modulemap} (100%) diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index 770ee91b..40717dbe 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -775,7 +775,7 @@ INFOPLIST_FILE = JSONModel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = JSONModel/module.modulemap; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.JSONModel; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -793,7 +793,7 @@ INFOPLIST_FILE = JSONModel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = JSONModel/module.modulemap; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.JSONModel; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/JSONModel/module.modulemap b/JSONModel/JSONModel.modulemap similarity index 100% rename from JSONModel/module.modulemap rename to JSONModel/JSONModel.modulemap From 1e80ecaec8314c7d367676ed0e8545c10c563612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Znamen=C3=A1=C4=8Dek?= Date: Sat, 29 Apr 2017 12:29:02 +0200 Subject: [PATCH 164/171] Add module map file to targets other than iOS (#583) In #482 a module map file was added that fixed an issue when installing JSONModel with Carthage. But it seems to me that the fix was only applied to the iOS target (or maybe the other targets were only added later?), which means I can still see the issue when trying to install on macOS: :1:1: error: umbrella header for module 'JSONModel' does not include header 'JSONAPI.h' [-Werror,-Wincomplete-umbrella] #import "Headers/JSONModel.h" ^ :1:1: error: umbrella header for module 'JSONModel' does not include header 'JSONHTTPClient.h' [-Werror,-Wincomplete-umbre :1:1: error: umbrella header for module 'JSONModel' does not include header 'JSONModel+networking.h' [-Werror,-Wincomplete :1:1: error: umbrella header for module 'JSONModel' does not include header 'JSONModelLib.h' [-Werror,-Wincomplete-umbrell 4 errors generated. This change adds the module map from #482 to all targets. --- JSONModel.xcodeproj/project.pbxproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj index 40717dbe..e342a725 100644 --- a/JSONModel.xcodeproj/project.pbxproj +++ b/JSONModel.xcodeproj/project.pbxproj @@ -538,6 +538,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-mac"; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = macosx; @@ -564,6 +565,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-mac"; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = macosx; @@ -588,6 +590,7 @@ INFOPLIST_FILE = "JSONModel-watchOS/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-watchOS"; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = watchos; @@ -613,6 +616,7 @@ INFOPLIST_FILE = "JSONModel-watchOS/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-watchOS"; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = watchos; @@ -638,6 +642,7 @@ INFOPLIST_FILE = "JSONModel-tvOS/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-tvOS"; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = appletvos; @@ -662,6 +667,7 @@ INFOPLIST_FILE = "JSONModel-tvOS/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = "com.jsonmodel.JSONModel-tvOS"; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = appletvos; From 364f57ba9671af417b35762049d8aed482fcf075 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 6 Jul 2017 10:29:10 +0100 Subject: [PATCH 165/171] Correct readme example - thanks to @yxjxx --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3850165e..06cebee6 100644 --- a/README.md +++ b/README.md @@ -160,14 +160,12 @@ for JSONModel to work, the protocol must be in place. ```json { "orderId": 104, - "orderDetails": [ - { - "name": "Product #1", - "price": { - "usd": 12.95 - } + "orderDetails": { + "name": "Product #1", + "price": { + "usd": 12.95 } - ] + } } ``` From 9ecd4f718d61bb13b7d301aeaa6c50d3462404a2 Mon Sep 17 00:00:00 2001 From: Xinghua Fan Date: Fri, 29 Sep 2017 15:06:06 +0800 Subject: [PATCH 166/171] Add generics attribute for collection. (#600) * Add generics attribute for collection. * Seperate generics info --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 06cebee6..6b4b7d4f 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,15 @@ Note: the angle brackets after `NSArray` contain a protocol. This is not the same as the Objective-C generics system. They are not mutually exclusive, but for JSONModel to work, the protocol must be in place. +Also property can have generics info for compiler +```objc +@interface OrderModel : JSONModel +@property (nonatomic) NSInteger orderId; +@property (nonatomic) float totalPrice; +@property (nonatomic) NSArray *products; +@end +``` + ### Nested key mapping ```json From aa850c3905a43776e0d54fa4baf284b100bb5624 Mon Sep 17 00:00:00 2001 From: heistings Date: Fri, 26 Jan 2018 22:02:26 +0800 Subject: [PATCH 167/171] Specify array type for properyNames (#611) --- JSONModel/JSONModel/JSONModel.h | 6 +++--- JSONModel/JSONModel/JSONModel.m | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 95cf61a6..5c4c1061 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -106,7 +106,7 @@ DEPRECATED_ATTRIBUTE * @exception JSONModelTypeNotAllowedException thrown when one of your model's custom class properties * does not have matching transformer method in an JSONValueTransformer. */ -- (NSDictionary *)toDictionaryWithKeys:(NSArray *)propertyNames; +- (NSDictionary *)toDictionaryWithKeys:(NSArray *)propertyNames; @end ///////////////////////////////////////////////////////////////////////////////////////////// @@ -168,14 +168,14 @@ DEPRECATED_ATTRIBUTE * @param propertyNames the properties to export; if nil, all properties exported * @return JSON text describing the data model */ -- (NSString *)toJSONStringWithKeys:(NSArray *)propertyNames; +- (NSString *)toJSONStringWithKeys:(NSArray *)propertyNames; /** * Export the specified properties of the object to a JSON data text string * @param propertyNames the properties to export; if nil, all properties exported * @return JSON text data describing the data model */ -- (NSData *)toJSONDataWithKeys:(NSArray *)propertyNames; +- (NSData *)toJSONDataWithKeys:(NSArray *)propertyNames; /** @name Batch methods */ diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 18d46dbf..4ae211a1 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -912,7 +912,7 @@ -(NSData*)toJSONData } //exports the model as a dictionary of JSON compliant objects --(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames +- (NSDictionary *)toDictionaryWithKeys:(NSArray *)propertyNames { NSArray* properties = [self __properties__]; NSMutableDictionary* tempDictionary = [NSMutableDictionary dictionaryWithCapacity:properties.count]; @@ -1027,7 +1027,7 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames } //exports model to a dictionary and then to a JSON string --(NSData*)toJSONDataWithKeys:(NSArray*)propertyNames +- (NSData *)toJSONDataWithKeys:(NSArray *)propertyNames { NSData* jsonData = nil; NSError* jsonError = nil; @@ -1046,7 +1046,7 @@ -(NSData*)toJSONDataWithKeys:(NSArray*)propertyNames return jsonData; } --(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames +- (NSString *)toJSONStringWithKeys:(NSArray *)propertyNames { return [[NSString alloc] initWithData: [self toJSONDataWithKeys: propertyNames] encoding: NSUTF8StringEncoding]; From 3af839af88f53018007c972bb823beb83acb0b62 Mon Sep 17 00:00:00 2001 From: heistings Date: Mon, 29 Jan 2018 21:12:01 +0800 Subject: [PATCH 168/171] Fix comment & specify NSDictionary type (#613) * Specify dictionary type for key & value * fix comment --- JSONModel/JSONModel/JSONModel.h | 4 ++-- JSONModel/JSONModelTransformations/JSONKeyMapper.h | 2 +- JSONModel/JSONModelTransformations/JSONKeyMapper.m | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 5c4c1061..c4ca47cc 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -31,7 +31,7 @@ DEPRECATED_ATTRIBUTE * Protocol for defining properties in a JSON Model class that should not be considered at all * neither while importing nor when exporting JSON. * - * @property (strong, nonatomic) NSString<Ignore> *propertyName; + * @property (strong, nonatomic) NSString *propertyName; * */ @protocol Ignore @@ -41,7 +41,7 @@ DEPRECATED_ATTRIBUTE * Protocol for defining optional properties in a JSON Model class. Use like below to define * model properties that are not required to have values in the JSON input: * - * @property (strong, nonatomic) NSString<Optional> *propertyName; + * @property (strong, nonatomic) NSString *propertyName; * */ @protocol Optional diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 35e44a84..61ea929f 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -75,7 +75,7 @@ typedef NSString *(^JSONModelKeyMapBlock)(NSString *keyName); * @param toJSON map dictionary, in the format:
@{@"myCamelCaseName":@"crazy_JSON_name"}
* @return JSONKeyMapper instance */ -- (instancetype)initWithModelToJSONDictionary:(NSDictionary *)toJSON; +- (instancetype)initWithModelToJSONDictionary:(NSDictionary *)toJSON; /** * Given a camelCase model property, this mapper finds JSON keys using the snake_case equivalent. diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index 9cdb8f27..e1daa17f 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -29,7 +29,7 @@ - (instancetype)initWithDictionary:(NSDictionary *)map return [self initWithModelToJSONDictionary:toJSON]; } -- (instancetype)initWithModelToJSONDictionary:(NSDictionary *)toJSON +- (instancetype)initWithModelToJSONDictionary:(NSDictionary *)toJSON { if (!(self = [super init])) return nil; From cebb6d9cc1320eb20b61adea31a0c894b3cb7266 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Thu, 1 Feb 2018 10:26:52 +0000 Subject: [PATCH 169/171] Fix typo in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b4b7d4f..67089d95 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ NSString *string = [pm toJSONString]; ### Custom data transformers ```objc -@interface JSONValueTransformer (CustomNSDate) +@interface JSONValueTransformer (CustomTransformer) @end @implementation JSONValueTransformer (CustomTransformer) From 7af01524b0a86dbcc8aa2b9f09a999372b11430d Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 19 Sep 2018 13:34:34 +0100 Subject: [PATCH 170/171] v1.8.0 --- CHANGELOG.md | 9 +++++++++ JSONModel-mac/Info.plist | 2 +- JSONModel-tvOS/Info.plist | 2 +- JSONModel-watchOS/Info.plist | 2 +- JSONModel.podspec | 2 +- JSONModel/Info.plist | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62df7195..d7c899f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## v1.8.0 (2018-09-19) + +See: https://github.com/jsonmodel/jsonmodel/compare/1.7.0...1.8.0 + +- support for macOS, tvOS, watchOS +- support for Swift 3 +- support for more primitive types +- lots of small fixes + ## v1.7.0 (2016-10-07) - added generic custom setter method - `setPropertyNameWithJSONObject` diff --git a/JSONModel-mac/Info.plist b/JSONModel-mac/Info.plist index 952e92ab..4037ab6b 100644 --- a/JSONModel-mac/Info.plist +++ b/JSONModel-mac/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.7.0 + 1.8.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSHumanReadableCopyright diff --git a/JSONModel-tvOS/Info.plist b/JSONModel-tvOS/Info.plist index 67183244..47276bff 100644 --- a/JSONModel-tvOS/Info.plist +++ b/JSONModel-tvOS/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.7.0 + 1.8.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/JSONModel-watchOS/Info.plist b/JSONModel-watchOS/Info.plist index 67183244..47276bff 100644 --- a/JSONModel-watchOS/Info.plist +++ b/JSONModel-watchOS/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.7.0 + 1.8.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/JSONModel.podspec b/JSONModel.podspec index 15e0cd79..61b41263 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.7.0" + s.version = "1.8.0" s.summary = "Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smart data model classes." s.homepage = "http://www.jsonmodel.com" diff --git a/JSONModel/Info.plist b/JSONModel/Info.plist index 01a700fd..9e0be357 100644 --- a/JSONModel/Info.plist +++ b/JSONModel/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.7.0 + 1.8.0 CFBundleSignature ???? CFBundleVersion From 78f8da09899348e203cd9ac7b729c92b4a24c458 Mon Sep 17 00:00:00 2001 From: James Billingham Date: Wed, 19 Sep 2018 13:40:11 +0100 Subject: [PATCH 171/171] macOS 10.7 does not support keyed subscripting --- JSONModel.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSONModel.podspec b/JSONModel.podspec index 61b41263..f44aa9b8 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/jsonmodel/jsonmodel.git", :tag => s.version } s.ios.deployment_target = '6.0' - s.osx.deployment_target = '10.7' + s.osx.deployment_target = '10.8' s.watchos.deployment_target = '2.0' s.tvos.deployment_target = '9.0'