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/.travis.yml b/.travis.yml new file mode 100644 index 00000000..a96872c6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +notifications: + email: false +language: objective-c +osx_image: xcode8 +before_install: + - cd Examples/ + - pod install +script: + - set -o pipefail + - 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/AppledocSettings.plist b/AppledocSettings.plist deleted file mode 100644 index 0c8c8b41..00000000 --- a/AppledocSettings.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - --project-name - JSONModel 1.0.2 - --print-settings - - --project-company - Marin Todorov, Underplot - --company-id - com.underplot - --create-docset - - --verbose - 4 - --logformat - 1 - - diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..d7c899f8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,158 @@ +# 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` + +## v1.6.0 (2016-10-05) + +- added new built-in key mapper - `mapperForTitleCase` + +## 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. + +- lots of improvements to readme/contribution docs +- 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) + +## 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 + +## 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 + +### Potential 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 +- 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 + +## v1.1.2 (2015-10-19) + +- merging more pull requests RE: iOS 9 + +## v1.1.0 (2015-05-10) + +- merging more pull requests + +## v1.0.2 (2015-01-21) + +- merged a number of pull requests that fix compatibility with iOS 8 and other issues + +## v1.0.0 (2014-08-12) + +- bug fix and merged pull requests + +## 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+ + +## v0.12.0 (2014-02-17) + +- fixes for BOOLs +- hacked solution for unit tests checking subclassing +- added experimental Core Data support + +## 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 + +## v0.9.3 (2013-09-25) + +- bug fixes up to issue #90 +- added "Ignore" protocol, all Optional properties, better documentation + +## 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 + +## v0.9.1 (2013-07-04) + +- bug fixes up to issue #61 +- custom name based conversions, more thread safety, new data types supported + +## v0.9.0 (2013-05-01) + +- bug fixes up to issue #37 +- refactor of all networking code, Removing all sync request methods (breaking change) + +## v0.8.3 (2013-01-24) + +- bug fixes up to issue #15 + +## v0.8.2 (2013-01-01) + +- added distribution as a Cocoa Pod + +## v0.8.1 (2012-12-31) + +- fixed Xcode workspace for the demo apps + +## v0.8.0 (2012-12-31) + +- OS X support, automatic network indicator for iOS, speed improvements, better README + +## v0.7.8 (2012-12-25) + +- initial release with semantic versioning diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..684ec957 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,78 @@ +# Contribution Rules + +## General Help/Support + +If you're struggling to use JSONModel, the following options are available to +you: + +- read the [readme](README.md) in detail +- check out [StackOverflow](https://stackoverflow.com/questions/tagged/jsonmodel) + +You should not open an issue on GitHub if you are simply struggling to +understand JSONModel. Issues are only for bugs and feature requests. + +## Issues + +### Bugs + +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. + +First, create the smallest/simplest possible example which exhibits the bug. + +Then open an issue providing the following code: + +- the JSON you're (de)serializing +- your model class(es) - both interface and implementation +- the code you're running + +Then explain: + +- 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/Changelog.md b/Changelog.md deleted file mode 100644 index c74e9259..00000000 --- a/Changelog.md +++ /dev/null @@ -1,81 +0,0 @@ -Change-log -========== - -**Version 1.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 - -- bug fix and merged pull requests - -**Version 0.13** @ 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 - -- fixes for BOOLs - -- hacked solution for unit tests checking subclassing - -- added experimental Core Data support - -**Version 0.10** @ 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 - -- Bug fixes up to issue #90 -- Added "Ignore" protocol, all Optional properties, better documentation - -**Version 0.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 - -**Version 0.9.1** @ 2013-07-04 - -- Bug fixes up to issue #61 -- Custom name based conversions, more thread safety, new data types supported - -**Version 0.9** @ 2013-05-01 - -- 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 - -- Bug fixes up to issue #15 - -**Version 0.8.2** @ 2013-01-01 - -- Added distribution as a Cocoa Pod - -**Version 0.8.1** @ 2012-12-31 - -- Fixed Xcode workspace for the demo apps - -**Version 0.8.0** @ 2012-12-31 - -- OSX support, automatic network indicator for iOS, speed improvements, better README - -**Version 0.7.8** @ 2012-12-25 - -- Initial release with semantic versioning diff --git a/Examples/Examples.xcodeproj/project.pbxproj b/Examples/Examples.xcodeproj/project.pbxproj new file mode 100644 index 00000000..029aa004 --- /dev/null +++ b/Examples/Examples.xcodeproj/project.pbxproj @@ -0,0 +1,2096 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 */; }; + 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 */; }; + 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 */; }; + 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 */; }; + 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 */; }; + 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 */ + 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; }; + 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; }; + 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 = ""; }; + 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 = ""; }; + 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 = ""; }; + 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 */, + 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 */, + 1AF8B9151D423B9300A1AAD3 /* NullTests.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 */, + 008077B71D81B91C006A0187 /* ConcurrentTests.m */, + 1AB9435B1D86AB260031E315 /* TransformerExceptionTests.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 */, + 008077B91D81BEF1006A0187 /* ConcurrentReposModel.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 */, + 008077BC1D81C035006A0187 /* ConcurrentReposModel.m */, + ); + path = Implementations; + 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 = 0800; + 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 = ( + 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; + }; + 1A46AB641D1C735C00E10D9D /* Resources */ = { + 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; + }; + 1A46AB701D1C738400E10D9D /* Resources */ = { + 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; + }; + 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 = ( + 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 */, + 008077BD1D81C035006A0187 /* ConcurrentReposModel.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 */, + 1AF8B9171D423D5500A1AAD3 /* NullTests.m in Sources */, + 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 */, + 1AB9435D1D86ACAB0031E315 /* TransformerExceptionTests.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; + }; + 1A46AB621D1C735C00E10D9D /* Sources */ = { + 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 */, + 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 */, + 1AF8B9181D423D5500A1AAD3 /* NullTests.m in Sources */, + 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 */, + 1AB9435E1D86ACAC0031E315 /* TransformerExceptionTests.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; + }; + 1A46AB6E1D1C738400E10D9D /* Sources */ = { + 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 */, + 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 */, + 1AF8B9191D423D5700A1AAD3 /* NullTests.m in Sources */, + 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 */, + 1AB9435F1D86ACAC0031E315 /* TransformerExceptionTests.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; + }; + 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_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + 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_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; + 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_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + 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_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; + 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/JSONModelDemo_OSX.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 69% rename from JSONModelDemo_OSX.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 85d597ac..25bf9070 100644 --- a/JSONModelDemo_OSX.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:Examples.xcodeproj"> diff --git a/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme b/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme new file mode 100644 index 00000000..05e5d76b --- /dev/null +++ b/Examples/Examples.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 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/ArrayTests.m b/Examples/Tests/ArrayTests.m new file mode 100644 index 00000000..fffbdc35 --- /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..a3298ec7 --- /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/ConcurrentTests.m b/Examples/Tests/ConcurrentTests.m new file mode 100644 index 00000000..ff4019f2 --- /dev/null +++ b/Examples/Tests/ConcurrentTests.m @@ -0,0 +1,63 @@ +// +// ConcurrentTests.m +// Examples +// +// Created by robin on 9/8/16. +// Copyright © 2016 JSONModel. All rights reserved. +// + +@import JSONModel; +@import XCTest; + +#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)testConcurrentMapping +{ + // Because the uncertainty of concurrency. Need multiple run to confirm the result. + NSOperationQueue *queue = [NSOperationQueue new]; + queue.maxConcurrentOperationCount = 50; + queue.suspended = 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.suspended = NO; + + [self waitForExpectationsWithTimeout:30 handler:nil]; +} + +@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..d815a5ff --- /dev/null +++ b/Examples/Tests/Data/primitives.json @@ -0,0 +1,19 @@ +{ + "shortNumber": 114, + "intNumber": 12, + "longNumber": 12124, + + "floatNumber": 12.12, + "doubleNumber": 121231312.124, + + "boolYES": true, + "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 new file mode 100644 index 00000000..9dc5d0df --- /dev/null +++ b/Examples/Tests/Data/primitivesWithErrors.json @@ -0,0 +1,18 @@ +{ + "shortNumber": 114, + "longNumber1": 12124, + + "floatNumber": 12.12, + "doubleNumber": 121231312.124, + + "boolYES": true, + "boolNO": false, + + "unsignedIntNumber": 6666, + "unsignedLongNumber": 666666, + "longLongNumber": 121231312, + "unsignedLongLongNumber": 4121231312, + "unsignedShortNumber": 5555, + "charNumber": 30, + "unsignedCharNumber": 255 +} 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/JSONModelDemoTests/JSONModelDemoTests-Info.plist b/Examples/Tests/Info.plist similarity index 80% rename from JSONModelDemoTests/JSONModelDemoTests-Info.plist rename to Examples/Tests/Info.plist index 5dc7ada4..ba72822e 100644 --- a/JSONModelDemoTests/JSONModelDemoTests-Info.plist +++ b/Examples/Tests/Info.plist @@ -5,11 +5,13 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIdentifier - com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 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..b02b4a19 --- /dev/null +++ b/Examples/Tests/KeyMappingTests.m @@ -0,0 +1,377 @@ +// +// 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" +#import "NestedModel.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]; +} + +-(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 +{ + //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\",\"PropName\":\"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.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[@"PropName"], m.propName, @"PropName does not equal 'TEST'"); +} + +@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h b/Examples/Tests/Models/Headers/BuiltInConversionsModel.h similarity index 86% rename from JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h rename to Examples/Tests/Models/Headers/BuiltInConversionsModel.h index c6f2c75b..d95092e5 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.h +++ b/Examples/Tests/Models/Headers/BuiltInConversionsModel.h @@ -6,7 +6,7 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@import JSONModel; @interface BuiltInConversionsModel : JSONModel @@ -17,26 +17,17 @@ @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/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/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.h b/Examples/Tests/Models/Headers/CopyrightModel.h similarity index 93% rename from JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.h rename to Examples/Tests/Models/Headers/CopyrightModel.h index 5d634676..185f54c1 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.h +++ b/Examples/Tests/Models/Headers/CopyrightModel.h @@ -6,7 +6,7 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@import JSONModel; @interface CopyrightModel : JSONModel diff --git a/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.h b/Examples/Tests/Models/Headers/CustomPropertyModel.h similarity index 76% rename from JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.h rename to Examples/Tests/Models/Headers/CustomPropertyModel.h index ab53131a..bd16c615 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.h +++ b/Examples/Tests/Models/Headers/CustomPropertyModel.h @@ -6,10 +6,7 @@ // 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" +@import JSONModel; @interface CustomPropertyModel : JSONModel diff --git a/JSONModelDemoTests/UnitTests/TestModels/DrugModel.h b/Examples/Tests/Models/Headers/DrugModel.h similarity index 76% rename from JSONModelDemoTests/UnitTests/TestModels/DrugModel.h rename to Examples/Tests/Models/Headers/DrugModel.h index 233f8ad6..f327b397 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/DrugModel.h +++ b/Examples/Tests/Models/Headers/DrugModel.h @@ -3,14 +3,14 @@ // Copyright (c) 2014 Underplot ltd. All rights reserved. // -#import -#import "JSONModel.h" +@import Foundation; +@import JSONModel; @protocol InteractionModel; -@protocol DrugModel -@end @interface DrugModel : JSONModel + @property NSString *brand_name; @property NSArray *interaction_list; -@end \ No newline at end of file + +@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/EnumModel.h b/Examples/Tests/Models/Headers/EnumModel.h similarity index 75% rename from JSONModelDemoTests/UnitTests/TestModels/EnumModel.h rename to Examples/Tests/Models/Headers/EnumModel.h index 0911e41e..32a67883 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/EnumModel.h +++ b/Examples/Tests/Models/Headers/EnumModel.h @@ -6,24 +6,24 @@ // Copyright (c) 2013 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@import JSONModel; //stock enum definition typedef enum { - StatusOpen = 1000, - StatusClosed = 2000, + StatusOpen = 1000, + StatusClosed = 2000, } Status; //marco enum definition typedef NS_ENUM(NSInteger, NSE_Status) { - NSE_StatusOpen = 1001, - NSE_StatusClosed = 2001, + NSE_StatusOpen = 1001, + NSE_StatusClosed = 2001, }; //marco enum definition NSUInteger typedef NS_ENUM(NSUInteger, NSEU_Status) { - NSEU_StatusOpen = 1002, - NSEU_StatusClosed = 2002, + NSEU_StatusOpen = 1002, + NSEU_StatusClosed = 2002, }; @interface EnumModel : JSONModel diff --git a/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.h b/Examples/Tests/Models/Headers/ExtremeNestingModel.h similarity index 78% rename from JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.h rename to Examples/Tests/Models/Headers/ExtremeNestingModel.h index 307aecac..65139c80 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.h +++ b/Examples/Tests/Models/Headers/ExtremeNestingModel.h @@ -3,12 +3,13 @@ // Copyright (c) 2014 Underplot ltd. All rights reserved. // -#import -#import "JSONModel.h" - +@import Foundation; +@import JSONModel; @protocol DrugModel; @interface ExtremeNestingModel : JSONModel + @property NSArray *drugs; -@end \ No newline at end of file + +@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h b/Examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h similarity index 73% rename from JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h rename to Examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h index b4b1dfc5..170fba8c 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.h +++ b/Examples/Tests/Models/Headers/GitHubKeyMapRepoModel.h @@ -6,12 +6,16 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@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/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.h b/Examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h similarity index 100% rename from JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.h rename to Examples/Tests/Models/Headers/GitHubKeyMapRepoModelDict.h diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h b/Examples/Tests/Models/Headers/GitHubRepoModel.h similarity index 74% rename from JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h rename to Examples/Tests/Models/Headers/GitHubRepoModel.h index 6c8a2756..58c2c945 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.h +++ b/Examples/Tests/Models/Headers/GitHubRepoModel.h @@ -6,10 +6,7 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" - -@protocol GitHubRepoModel -@end +@import JSONModel; @interface GitHubRepoModel : JSONModel @@ -18,12 +15,14 @@ @property (assign, nonatomic) int watchers; @property (strong, nonatomic) NSString* owner; @property (assign, nonatomic) int forks; -// It is not a good idea to have a description property, because description can not be used for debugging properly anymore. -@property (strong, nonatomic) NSString* description; @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/GitHubRepoModelForUSMapper.h b/Examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h similarity index 94% rename from JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.h rename to Examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h index b350bc18..b11056e8 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.h +++ b/Examples/Tests/Models/Headers/GitHubRepoModelForUSMapper.h @@ -6,15 +6,14 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@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 \ No newline at end of file +@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/ImageModel.h b/Examples/Tests/Models/Headers/ImageModel.h similarity index 82% rename from JSONModelDemoTests/UnitTests/TestModels/ImageModel.h rename to Examples/Tests/Models/Headers/ImageModel.h index ee1e3e08..6a86a1bb 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/ImageModel.h +++ b/Examples/Tests/Models/Headers/ImageModel.h @@ -6,17 +6,14 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" -#import "CopyrightModel.h" +@import JSONModel; -@protocol ImageModel @end +@class CopyrightModel; @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/InteractionModel.h b/Examples/Tests/Models/Headers/InteractionModel.h similarity index 70% rename from JSONModelDemoTests/UnitTests/TestModels/InteractionModel.h rename to Examples/Tests/Models/Headers/InteractionModel.h index ff0a2660..a620cc61 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/InteractionModel.h +++ b/Examples/Tests/Models/Headers/InteractionModel.h @@ -3,12 +3,12 @@ // Copyright (c) 2014 Underplot ltd. All rights reserved. // -#import -#import "JSONModel.h" +@import Foundation; +@import JSONModel; -@protocol InteractionModel -@end @interface InteractionModel : JSONModel + @property NSString *type; @property NSString *title; -@end \ No newline at end of file + +@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.h b/Examples/Tests/Models/Headers/JSONTypesModel.h similarity index 79% rename from JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.h rename to Examples/Tests/Models/Headers/JSONTypesModel.h index 39d055c7..5ab71881 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.h +++ b/Examples/Tests/Models/Headers/JSONTypesModel.h @@ -6,35 +6,18 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@import JSONModel; @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/JSONTypesModelWithValidation1.h b/Examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h similarity index 100% rename from JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.h rename to Examples/Tests/Models/Headers/JSONTypesModelWithValidation1.h diff --git a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.h b/Examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h similarity index 100% rename from JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.h rename to Examples/Tests/Models/Headers/JSONTypesModelWithValidation2.h diff --git a/JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.h b/Examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h similarity index 69% rename from JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.h rename to Examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h index 2aed7ee1..d7c4305e 100644 --- a/JSONModelDemoTests/UnitTests/JSONValueTransformer+UIColor.h +++ b/Examples/Tests/Models/Headers/JSONValueTransformer+UIColor.h @@ -6,13 +6,13 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import -#import "JSONValueTransformer.h" +@import Foundation; +@import JSONModel; -@interface JSONValueTransformer(Color) +@interface JSONValueTransformer (UIColor) #pragma mark - uicolor <-> hex color -/* uicolor <-> hex color for converting text hex representations to actual color objects */ +/* uicolor <-> hex color for converting text hex representations to actual color objects */ #ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -(UIColor*)UIColorFromNSString:(NSString*)string; @@ -21,4 +21,5 @@ -(NSColor*)UIColorFromNSString:(NSString*)string; -(id)JSONObjectFromUIColor:(NSColor*)color; #endif + @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.h b/Examples/Tests/Models/Headers/ModelForUpperCaseMapper.h similarity index 88% rename from JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.h rename to Examples/Tests/Models/Headers/ModelForUpperCaseMapper.h index 15266b3a..ed43279f 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.h +++ b/Examples/Tests/Models/Headers/ModelForUpperCaseMapper.h @@ -3,10 +3,10 @@ // Copyright (c) 2014 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@import JSONModel; @interface ModelForUpperCaseMapper : JSONModel @property (strong, nonatomic) NSString* uppertest; -@end \ No newline at end of file +@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/NestedModel.h b/Examples/Tests/Models/Headers/NestedModel.h similarity index 57% rename from JSONModelDemoTests/UnitTests/TestModels/NestedModel.h rename to Examples/Tests/Models/Headers/NestedModel.h index a5294e99..2c5278b3 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/NestedModel.h +++ b/Examples/Tests/Models/Headers/NestedModel.h @@ -6,19 +6,23 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" -#import "ImageModel.h" +@import JSONModel; + +@class ImageModel; +@protocol ImageModel; @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 + +@interface NestedModelWithoutProtocols : JSONModel + +@property (strong, nonatomic) ImageModel* singleImage; +@property (strong, nonatomic) NSArray* images; +@property (strong, nonatomic) NSDictionary* imagesObject; @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.h b/Examples/Tests/Models/Headers/OptionalPropModel.h similarity index 70% rename from JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.h rename to Examples/Tests/Models/Headers/OptionalPropModel.h index 80d87fb6..08a736ce 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.h +++ b/Examples/Tests/Models/Headers/OptionalPropModel.h @@ -6,20 +6,13 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@import JSONModel; @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; diff --git a/JSONModelDemoTests/UnitTests/TestModels/PostModel.h b/Examples/Tests/Models/Headers/PostModel.h similarity index 68% rename from JSONModelDemoTests/UnitTests/TestModels/PostModel.h rename to Examples/Tests/Models/Headers/PostModel.h index 7bf8bee8..a901e3f0 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/PostModel.h +++ b/Examples/Tests/Models/Headers/PostModel.h @@ -6,13 +6,15 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" - -@protocol PostModel @end +@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/JSONModelDemoTests/UnitTests/TestModels/PostsModel.h b/Examples/Tests/Models/Headers/PostsModel.h similarity index 84% rename from JSONModelDemoTests/UnitTests/TestModels/PostsModel.h rename to Examples/Tests/Models/Headers/PostsModel.h index c67dcc26..5f968d21 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/PostsModel.h +++ b/Examples/Tests/Models/Headers/PostsModel.h @@ -6,8 +6,9 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" -#import "PostModel.h" +@import JSONModel; + +@protocol PostModel; @interface PostsModel : JSONModel diff --git a/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.h b/Examples/Tests/Models/Headers/PrimitivesModel.h similarity index 53% rename from JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.h rename to Examples/Tests/Models/Headers/PrimitivesModel.h index 360dde27..f1fe652e 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.h +++ b/Examples/Tests/Models/Headers/PrimitivesModel.h @@ -6,29 +6,24 @@ // Copyright (c) 2012 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@import JSONModel; @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; +@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/Models/Headers/RenamedPropertyModel.h b/Examples/Tests/Models/Headers/RenamedPropertyModel.h new file mode 100644 index 00000000..2d8aad4b --- /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 *propName; + +@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/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.h b/Examples/Tests/Models/Headers/RpcRequestModel.h similarity index 93% rename from JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.h rename to Examples/Tests/Models/Headers/RpcRequestModel.h index d1e5722e..e7d615a1 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.h +++ b/Examples/Tests/Models/Headers/RpcRequestModel.h @@ -6,7 +6,7 @@ // Copyright (c) 2013 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@import JSONModel; @interface RpcRequestModel : JSONModel diff --git a/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.h b/Examples/Tests/Models/Headers/SpecialPropertyModel.h similarity index 94% rename from JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.h rename to Examples/Tests/Models/Headers/SpecialPropertyModel.h index f141c9db..a4eac021 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.h +++ b/Examples/Tests/Models/Headers/SpecialPropertyModel.h @@ -6,9 +6,10 @@ // Copyright (c) 2013年 Underplot ltd. All rights reserved. // -#import "JSONModel.h" +@import JSONModel; @interface SpecialPropertyModel : JSONModel + @property (strong, nonatomic) NSString *className; @property (strong, nonatomic) NSString *indexPropertyName; @property (strong, nonatomic) NSString *id; diff --git a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.m b/Examples/Tests/Models/Implementations/BuiltInConversionsModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.m rename to Examples/Tests/Models/Implementations/BuiltInConversionsModel.m index 7302a4d7..f358505f 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/BuiltInConversionsModel.m +++ b/Examples/Tests/Models/Implementations/BuiltInConversionsModel.m @@ -9,5 +9,4 @@ #import "BuiltInConversionsModel.h" @implementation BuiltInConversionsModel - @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.m b/Examples/Tests/Models/Implementations/CopyrightModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.m rename to Examples/Tests/Models/Implementations/CopyrightModel.m index b38095d4..0e3d8129 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/CopyrightModel.m +++ b/Examples/Tests/Models/Implementations/CopyrightModel.m @@ -9,5 +9,4 @@ #import "CopyrightModel.h" @implementation CopyrightModel - @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.m b/Examples/Tests/Models/Implementations/CustomPropertyModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.m rename to Examples/Tests/Models/Implementations/CustomPropertyModel.m index 80082f69..01433dc7 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/CustomPropertyModel.m +++ b/Examples/Tests/Models/Implementations/CustomPropertyModel.m @@ -9,5 +9,4 @@ #import "CustomPropertyModel.h" @implementation CustomPropertyModel - @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/DrugModel.m b/Examples/Tests/Models/Implementations/DrugModel.m similarity index 80% rename from JSONModelDemoTests/UnitTests/TestModels/DrugModel.m rename to Examples/Tests/Models/Implementations/DrugModel.m index 39feaba2..5388f8e3 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/DrugModel.m +++ b/Examples/Tests/Models/Implementations/DrugModel.m @@ -4,11 +4,6 @@ // #import "DrugModel.h" -#import "InteractionModel.h" - @implementation DrugModel -{ - -} -@end \ No newline at end of file +@end diff --git a/Examples/Tests/Models/Implementations/EnumModel.m b/Examples/Tests/Models/Implementations/EnumModel.m new file mode 100644 index 00000000..bb8a5e62 --- /dev/null +++ b/Examples/Tests/Models/Implementations/EnumModel.m @@ -0,0 +1,75 @@ +// +// 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; +} + +-(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"; +} + +-(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] initWithModelToJSONDictionary:@ + { + @"status":@"statusString", + @"nestedStatus":@"nested.status" + }]; +} + +@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.m b/Examples/Tests/Models/Implementations/ExtremeNestingModel.m similarity index 61% rename from JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.m rename to Examples/Tests/Models/Implementations/ExtremeNestingModel.m index 5a985fe9..bc3b9c7e 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/ExtremeNestingModel.m +++ b/Examples/Tests/Models/Implementations/ExtremeNestingModel.m @@ -5,17 +5,14 @@ #import "ExtremeNestingModel.h" - @implementation ExtremeNestingModel -{ - -} +(JSONKeyMapper*)keyMapper { - return [[JSONKeyMapper alloc] initWithDictionary:@{ - @"generic_alternatives.items.data" : @"drugs" - }]; + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@ + { + @"drugs" : @"generic_alternatives.items.data" + }]; } -@end \ No newline at end of file +@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/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.m b/Examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m similarity index 70% rename from JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.m rename to Examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m index aef6f289..4e299ebd 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModelDict.m +++ b/Examples/Tests/Models/Implementations/GitHubKeyMapRepoModelDict.m @@ -12,9 +12,7 @@ @implementation GitHubKeyMapRepoModelDict +(JSONKeyMapper*)keyMapper { - return [[JSONKeyMapper alloc] initWithDictionary: - @{@"description":@"__description"} - ]; + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{@"__description":@"description"}]; } @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.m b/Examples/Tests/Models/Implementations/GitHubRepoModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.m rename to Examples/Tests/Models/Implementations/GitHubRepoModel.m index 327c98f3..d6304feb 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModel.m +++ b/Examples/Tests/Models/Implementations/GitHubRepoModel.m @@ -9,5 +9,4 @@ #import "GitHubRepoModel.h" @implementation GitHubRepoModel - @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.m b/Examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m similarity index 81% rename from JSONModelDemoTests/UnitTests/TestModels/GitHubRepoModelForUSMapper.m rename to Examples/Tests/Models/Implementations/GitHubRepoModelForUSMapper.m index a9d06f25..dc940f12 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/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/JSONModelDemoTests/UnitTests/TestModels/ImageModel.m b/Examples/Tests/Models/Implementations/ImageModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/ImageModel.m rename to Examples/Tests/Models/Implementations/ImageModel.m index 42374700..e9cba299 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/ImageModel.m +++ b/Examples/Tests/Models/Implementations/ImageModel.m @@ -9,5 +9,4 @@ #import "ImageModel.h" @implementation ImageModel - @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/InteractionModel.m b/Examples/Tests/Models/Implementations/InteractionModel.m similarity index 94% rename from JSONModelDemoTests/UnitTests/TestModels/InteractionModel.m rename to Examples/Tests/Models/Implementations/InteractionModel.m index cfa08533..83d6d1bb 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/InteractionModel.m +++ b/Examples/Tests/Models/Implementations/InteractionModel.m @@ -5,9 +5,5 @@ #import "InteractionModel.h" - @implementation InteractionModel -{ - -} -@end \ No newline at end of file +@end diff --git a/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.m b/Examples/Tests/Models/Implementations/JSONTypesModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.m rename to Examples/Tests/Models/Implementations/JSONTypesModel.m index 50205fa4..cdce538c 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/JSONTypesModel.m +++ b/Examples/Tests/Models/Implementations/JSONTypesModel.m @@ -9,5 +9,4 @@ #import "JSONTypesModel.h" @implementation JSONTypesModel - @end diff --git a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.m b/Examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m similarity index 63% rename from JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.m rename to Examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m index 1aa57417..f3202afd 100644 --- a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation1.m +++ b/Examples/Tests/Models/Implementations/JSONTypesModelWithValidation1.m @@ -12,12 +12,12 @@ @implementation JSONTypesModelWithValidation1 -(BOOL)validate:(NSError**)err { - if (!([self.year intValue]>2011 && [self.pi floatValue]>3.10)) { - *err = [JSONModelError errorModelIsInvalid]; - return NO; - } - - return YES; + if (!([self.year intValue]>2011 && [self.pi floatValue]>3.10)) { + *err = [JSONModelError errorModelIsInvalid]; + return NO; + } + + return YES; } @end diff --git a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.m b/Examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m similarity index 64% rename from JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.m rename to Examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m index 200d5c28..ff9ba4a2 100644 --- a/JSONModelDemoTests/UnitTests/JSONTypesModelWithValidation2.m +++ b/Examples/Tests/Models/Implementations/JSONTypesModelWithValidation2.m @@ -12,11 +12,12 @@ @implementation JSONTypesModelWithValidation2 -(BOOL)validate:(NSError**)err { - if (!([self.year intValue]<2011 || [self.pi floatValue]<3.10)) { - *err = [JSONModelError errorModelIsInvalid]; - return NO; - } - return YES; + 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/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.m b/Examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m similarity index 65% rename from JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.m rename to Examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m index caaacb18..8bf3eb14 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/ModelForUpperCaseMapper.m +++ b/Examples/Tests/Models/Implementations/ModelForUpperCaseMapper.m @@ -5,11 +5,13 @@ #import "ModelForUpperCaseMapper.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + @implementation ModelForUpperCaseMapper +(JSONKeyMapper*)keyMapper { - return [JSONKeyMapper mapperFromUpperCaseToLowerCase]; + 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..19661d2c --- /dev/null +++ b/Examples/Tests/Models/Implementations/NestedModel.m @@ -0,0 +1,26 @@ +// +// NestedModel.m +// JSONModelDemo +// +// Created by Marin Todorov on 02/12/2012. +// Copyright (c) 2012 Underplot ltd. All rights reserved. +// + +#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/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.m b/Examples/Tests/Models/Implementations/OptionalPropModel.m similarity index 51% rename from JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.m rename to Examples/Tests/Models/Implementations/OptionalPropModel.m index f4aa28ec..f2fa04af 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/OptionalPropModel.m +++ b/Examples/Tests/Models/Implementations/OptionalPropModel.m @@ -10,13 +10,15 @@ @implementation OptionalPropModel -+(BOOL)propertyIsOptional:(NSString*)propertyName{ - if(![super propertyIsOptional:propertyName]){ - if([@[@"notRequiredPoint"] containsObject:propertyName]){ - return YES; - } - } - return NO; ++(BOOL)propertyIsOptional:(NSString*)propertyName +{ + if ([super propertyIsOptional:propertyName]) + return YES; + + if ([propertyName isEqualToString:@"notRequiredPoint"]) + return YES; + + return NO; } @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PostModel.m b/Examples/Tests/Models/Implementations/PostModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/PostModel.m rename to Examples/Tests/Models/Implementations/PostModel.m index e8183360..b9c3189c 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/PostModel.m +++ b/Examples/Tests/Models/Implementations/PostModel.m @@ -9,5 +9,4 @@ #import "PostModel.h" @implementation PostModel - @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PostsModel.m b/Examples/Tests/Models/Implementations/PostsModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/PostsModel.m rename to Examples/Tests/Models/Implementations/PostsModel.m index 68dfd462..87af9e3b 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/PostsModel.m +++ b/Examples/Tests/Models/Implementations/PostsModel.m @@ -9,5 +9,4 @@ #import "PostsModel.h" @implementation PostsModel - @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.m b/Examples/Tests/Models/Implementations/PrimitivesModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.m rename to Examples/Tests/Models/Implementations/PrimitivesModel.m index ff4beecc..885d63f7 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/PrimitivesModel.m +++ b/Examples/Tests/Models/Implementations/PrimitivesModel.m @@ -9,5 +9,4 @@ #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..8173b7b0 --- /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 mapperForTitleCase]; + return [JSONKeyMapper baseMapper:base withModelToJSONExceptions:@{@"identifier": @"ID"}]; +} + +@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/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.m b/Examples/Tests/Models/Implementations/RpcRequestModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.m rename to Examples/Tests/Models/Implementations/RpcRequestModel.m index 0ad9aecc..b22f13fa 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/RpcRequestModel.m +++ b/Examples/Tests/Models/Implementations/RpcRequestModel.m @@ -9,5 +9,4 @@ #import "RpcRequestModel.h" @implementation RpcRequestModel - @end diff --git a/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.m b/Examples/Tests/Models/Implementations/SpecialPropertyModel.m similarity index 99% rename from JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.m rename to Examples/Tests/Models/Implementations/SpecialPropertyModel.m index 686c6473..cc390143 100644 --- a/JSONModelDemoTests/UnitTests/TestModels/SpecialPropertyModel.m +++ b/Examples/Tests/Models/Implementations/SpecialPropertyModel.m @@ -9,5 +9,4 @@ #import "SpecialPropertyModel.h" @implementation SpecialPropertyModel - @end diff --git a/Examples/Tests/NestedModelsTests.m b/Examples/Tests/NestedModelsTests.m new file mode 100644 index 00000000..f51a779b --- /dev/null +++ b/Examples/Tests/NestedModelsTests.m @@ -0,0 +1,78 @@ +// +// 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; + NestedModelWithoutProtocols* b; +} + +-(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."); + + b = [[NestedModelWithoutProtocols alloc] initWithString: jsonContents error:&err]; + XCTAssertNil(err, "%@", [err localizedDescription]); + XCTAssertNotNil(b, @"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'"); +} + +-(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 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/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..c70e7a85 --- /dev/null +++ b/Examples/Tests/PrimitiveTypesReadTests.m @@ -0,0 +1,152 @@ +// +// 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"); + + 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 +{ + 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'"); +} + +-(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"); +} + +-(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; + + 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"); + + 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"); + + 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"); + + 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"); + 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"); + + 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 diff --git a/Examples/Tests/SanityTests.m b/Examples/Tests/SanityTests.m new file mode 100644 index 00000000..70ee4d24 --- /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/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/JSONModelDemoTests/UnitTests/SpecialPropertiesTests.m b/Examples/Tests/SpecialPropertiesTests.m similarity index 54% rename from JSONModelDemoTests/UnitTests/SpecialPropertiesTests.m rename to Examples/Tests/SpecialPropertiesTests.m index ee8d1e02..52ceea9c 100644 --- a/JSONModelDemoTests/UnitTests/SpecialPropertiesTests.m +++ b/Examples/Tests/SpecialPropertiesTests.m @@ -6,8 +6,8 @@ // Copyright (c) 2014 Underplot ltd. All rights reserved. // -#import -#import "JSONModel.h" +@import XCTest; +@import JSONModel; #pragma mark - model with block property @interface BModel: JSONModel @@ -40,47 +40,46 @@ @implementation DModel #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. + [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]; + // 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"); + 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"); + 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"); + 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..cd4031f1 --- /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/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 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 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..b8236c65 --- /dev/null +++ b/Examples/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,48 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "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..4bd51cf6 --- /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..6a11980f --- /dev/null +++ b/Examples/iOS/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist b/Examples/iOS/Info.plist similarity index 62% rename from JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist rename to Examples/iOS/Info.plist index 025bf26e..06c072a1 100644 --- a/JSONModelDemo_iOS/JSONModelDemo_iOS-Info.plist +++ b/Examples/iOS/Info.plist @@ -5,15 +5,15 @@ CFBundleDevelopmentRegion en CFBundleDisplayName - ${PRODUCT_NAME} + JSONModel CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIdentifier - com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString @@ -21,28 +21,20 @@ CFBundleSignature ???? CFBundleVersion - 1.0 + 1 LSRequiresIPhoneOS + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main UIRequiredDeviceCapabilities armv7 - UIStatusBarTintParameters - - UINavigationBar - - Style - UIBarStyleDefault - Translucent - - - UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight 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..3828f956 --- /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/JSONModelOSX/JSONModelDemo_OSX-Info.plist b/Examples/macOS/Info.plist similarity index 71% rename from JSONModelOSX/JSONModelDemo_OSX-Info.plist rename to Examples/macOS/Info.plist index 3c99c75f..a1723878 100644 --- a/JSONModelOSX/JSONModelDemo_OSX-Info.plist +++ b/Examples/macOS/Info.plist @@ -5,15 +5,15 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIconFile CFBundleIdentifier - com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + JSONModel CFBundlePackageType APPL CFBundleShortVersionString @@ -23,11 +23,11 @@ CFBundleVersion 1 LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} + $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright - Copyright © 2012 Underplot ltd. All rights reserved. - NSMainNibFile - MainMenu + 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..571ee6fe --- /dev/null +++ b/Examples/tvOS/Base.lproj/Main.storyboard @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..0b1a9e04 --- /dev/null +++ b/Examples/watchOS/Base.lproj/Interface.storyboard @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + 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 + + + diff --git a/JSONModel-mac/Info.plist b/JSONModel-mac/Info.plist new file mode 100644 index 00000000..4037ab6b --- /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.8.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..47276bff --- /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.8.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/JSONModel-watchOS/Info.plist b/JSONModel-watchOS/Info.plist new file mode 100644 index 00000000..47276bff --- /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.8.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/JSONModel.podspec b/JSONModel.podspec index 957932be..f44aa9b8 100644 --- a/JSONModel.podspec +++ b/JSONModel.podspec @@ -1,16 +1,18 @@ Pod::Spec.new do |s| s.name = "JSONModel" - s.version = "1.0.2" + 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" - 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/icanzilb/JSONModel.git", :tag => "1.0.2" } + s.source = { :git => "https://github.com/jsonmodel/jsonmodel.git", :tag => s.version } - s.ios.deployment_target = '5.0' - s.osx.deployment_target = '10.7' + s.ios.deployment_target = '6.0' + s.osx.deployment_target = '10.8' + s.watchos.deployment_target = '2.0' + s.tvos.deployment_target = '9.0' s.source_files = 'JSONModel/**/*.{m,h}' s.public_header_files = 'JSONModel/**/*.h' diff --git a/JSONModel.xcodeproj/project.pbxproj b/JSONModel.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e342a725 --- /dev/null +++ b/JSONModel.xcodeproj/project.pbxproj @@ -0,0 +1,860 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 */; }; + 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 */; }; + 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 */; 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 */; 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 */; 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 */; settings = {ATTRIBUTES = (Public, ); }; }; + 92C9BC901B19A5B600D79B06 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */; }; +/* 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; }; + 92C9BC651B19A5B600D79B06 /* JSONModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONModel.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 = ""; }; + 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; }; + 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 = ""; 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 = ""; 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 = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONValueTransformer.m; sourceTree = ""; }; +/* 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; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* 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 = ( + 92C9BC411B19A51100D79B06 /* Info.plist */, + 92C9BC6F1B19A5B600D79B06 /* JSONModelLib.h */, + 92C9BC631B19A5B600D79B06 /* JSONModel */, + 92C9BC701B19A5B600D79B06 /* JSONModelNetworking */, + 92C9BC771B19A5B600D79B06 /* JSONModelTransformations */, + ); + path = JSONModel; + sourceTree = ""; + }; + 92C9BC331B19A51100D79B06 = { + isa = PBXGroup; + children = ( + 1A5B9D3F1D1C8D72006FE4B1 /* JSONModel */, + 01D689FC1E42150100CFE82F /* JSONModel-mac */, + 01D68A1B1E421A8400CFE82F /* JSONModel-watchOS */, + 01D68A281E421AC100CFE82F /* JSONModel-tvOS */, + 92C9BC3E1B19A51100D79B06 /* Products */, + ); + indentWidth = 4; + sourceTree = ""; + tabWidth = 4; + usesTabs = 0; + }; + 92C9BC3E1B19A51100D79B06 /* Products */ = { + isa = PBXGroup; + children = ( + 92C9BC3D1B19A51100D79B06 /* JSONModel.framework */, + 01D689FB1E42150100CFE82F /* JSONModel.framework */, + 01D68A1A1E421A8400CFE82F /* JSONModel.framework */, + 01D68A271E421AC100CFE82F /* JSONModel.framework */, + ); + name = Products; + sourceTree = ""; + }; + 92C9BC631B19A5B600D79B06 /* JSONModel */ = { + isa = PBXGroup; + children = ( + 92C9BC641B19A5B600D79B06 /* JSONModel.h */, + 92C9BC651B19A5B600D79B06 /* JSONModel.m */, + 92C9BC681B19A5B600D79B06 /* JSONModelClassProperty.h */, + 92C9BC691B19A5B600D79B06 /* JSONModelClassProperty.m */, + 92C9BC6A1B19A5B600D79B06 /* JSONModelError.h */, + 92C9BC6B1B19A5B600D79B06 /* JSONModelError.m */, + ); + path = JSONModel; + 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 */, + ); + path = JSONModelNetworking; + sourceTree = ""; + }; + 92C9BC771B19A5B600D79B06 /* JSONModelTransformations */ = { + isa = PBXGroup; + children = ( + 92C9BC781B19A5B600D79B06 /* JSONKeyMapper.h */, + 92C9BC791B19A5B600D79B06 /* JSONKeyMapper.m */, + 92C9BC7A1B19A5B600D79B06 /* JSONValueTransformer.h */, + 92C9BC7B1B19A5B600D79B06 /* JSONValueTransformer.m */, + ); + path = JSONModelTransformations; + sourceTree = ""; + }; +/* 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; + files = ( + 92C9BC8B1B19A5B600D79B06 /* JSONModel+networking.h in Headers */, + 92C9BC861B19A5B600D79B06 /* JSONModelLib.h in Headers */, + 92C9BC8F1B19A5B600D79B06 /* JSONValueTransformer.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 */ + 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" */; + 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 = 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; + }; + }; + }; + 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 */, + 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; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* 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; + files = ( + 92C9BC8A1B19A5B600D79B06 /* JSONHTTPClient.m in Sources */, + 92C9BC831B19A5B600D79B06 /* JSONModelError.m in Sources */, + 92C9BC901B19A5B600D79B06 /* JSONValueTransformer.m in Sources */, + 92C9BC8E1B19A5B600D79B06 /* JSONKeyMapper.m in Sources */, + 92C9BC881B19A5B600D79B06 /* JSONAPI.m in Sources */, + 92C9BC7D1B19A5B600D79B06 /* JSONModel.m in Sources */, + 92C9BC811B19A5B600D79B06 /* JSONModelClassProperty.m in Sources */, + 92C9BC8C1B19A5B600D79B06 /* JSONModel+networking.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* 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; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; + 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; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; + 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"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; + 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"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; + 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"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; + 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"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; + 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 = { + ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; + 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; + 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; + 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; + APPLICATION_EXTENSION_API_ONLY = YES; + 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; + 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 = { + APPLICATION_EXTENSION_API_ONLY = YES; + 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"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.JSONModel; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 92C9BC551B19A51100D79B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + 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"; + MODULEMAP_FILE = "$(SRCROOT)/JSONModel/JSONModel.modulemap"; + PRODUCT_BUNDLE_IDENTIFIER = com.jsonmodel.JSONModel; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* 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 = ( + 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/JSONModelDemo_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/JSONModel.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 68% rename from JSONModelDemo_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to JSONModel.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 7648c4a7..c00329a8 100644 --- a/JSONModelDemo_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/JSONModel.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:JSONModel.xcodeproj"> 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 new file mode 100644 index 00000000..ca3fb1a2 --- /dev/null +++ b/JSONModel.xcodeproj/xcshareddata/xcschemes/JSONModel.xcscheme @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist b/JSONModel/Info.plist similarity index 64% rename from JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist rename to JSONModel/Info.plist index 5dc7ada4..9e0be357 100644 --- a/JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist +++ b/JSONModel/Info.plist @@ -5,18 +5,22 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIdentifier - com.touch-code-magazine.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + $(PRODUCT_NAME) CFBundlePackageType - BNDL + FMWK CFBundleShortVersionString - 1.0 + 1.8.0 CFBundleSignature ???? CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + diff --git a/JSONModel/JSONModel.modulemap b/JSONModel/JSONModel.modulemap new file mode 100644 index 00000000..5788d49d --- /dev/null +++ b/JSONModel/JSONModel.modulemap @@ -0,0 +1,6 @@ +framework module JSONModel { + umbrella header "JSONModelLib.h" + + export * + module * { export * } +} diff --git a/JSONModel/JSONModel/JSONModel.h b/JSONModel/JSONModel/JSONModel.h index 0e6dab04..c4ca47cc 100644 --- a/JSONModel/JSONModel/JSONModel.h +++ b/JSONModel/JSONModel/JSONModel.h @@ -1,19 +1,8 @@ // // JSONModel.h -// -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// 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 - #import #import "JSONModelError.h" @@ -29,55 +18,39 @@ 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 * neither while importing nor when exporting JSON. * - * @property (strong, nonatomic) NSString<Ignore>* propertyName; + * @property (strong, nonatomic) NSString *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; * - */ -@protocol Optional -@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 - */ -@interface NSObject(JSONModelPropertyCompatibility) -@end - -/** - * ConvertOnDemand enables lazy model initialization for NSArrays of models + * @property (strong, nonatomic) NSString *propertyName; * - * @property (strong, nonatomic) NSArray<JSONModel, ConvertOnDemand>* propertyName; */ -@protocol ConvertOnDemand +@protocol Optional @end /** - * Make all arrays ConvertOnDemand compatible to avoid compiler warnings + * Make all objects compatible to avoid compiler warnings */ -@interface NSArray(JSONModelPropertyCompatibility) +@interface NSObject (JSONModelPropertyCompatibility) @end ///////////////////////////////////////////////////////////////////////////////////////////// @@ -89,28 +62,28 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) @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 ot 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; /** * 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 err an error or NULL + * @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 @@ -123,174 +96,142 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * @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 ///////////////////////////////////////////////////////////////////////////////////////////// #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. */ @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"); ++ (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; + /** @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 unsported 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 unsported 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; /** @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 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 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 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 unsported type is found in the incoming JSON, - * or a property type in your model is not supported by JSONValueTransformer and its categories - * @exception JSONModelInvalidDataException thrown when the input data does not include all required keys - * @see arrayOfDictionariesFromModels: - */ - +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array; - - +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array error:(NSError**)err; - - +(NSMutableArray*)arrayOfModelsFromData:(NSData*)data error:(NSError**)err; - - /** - * If you have an NSArray of data model objects, this method takes it in and outputs a list of the - * matching dictionaries. This method does the opposite of arrayOfObjectsFromDictionaries: - * @param array list of JSONModel objects - * @return a list of NSDictionary objects - * @exception JSONModelTypeNotAllowedException thrown when unsported type is found in the incoming JSON, - * or a property type in your model is not supported by JSONValueTransformer and its categories - * @see arrayOfModelsFromDictionaries: - */ - +(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array; - - - -/** @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; - - /** - * Overriden 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. - * 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; +/** + * 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 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 initialzed. 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; - /** - * 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. - * @param globalKeyMapper a key mapper to apply to all models in your project. - * + * Overwrite in your models if your property names don't match your JSON key names. * Lookup JSONKeyMapper docs for more details. */ -+(void)setGlobalKeyMapper:(JSONKeyMapper*)globalKeyMapper; ++ (JSONKeyMapper *)keyMapper; /** * Indicates whether the property with the given name is Optional. @@ -299,7 +240,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * @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. @@ -308,14 +249,36 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) * @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 class used for the elements of a collection property. + * Rather than using: + * @property (strong) NSArray *things; + * You can implement classForCollectionProperty: and keep your property + * defined like: + * @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 NS_SWIFT_NAME(classForCollectionProperty(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; +- (BOOL)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error; @end diff --git a/JSONModel/JSONModel/JSONModel.m b/JSONModel/JSONModel/JSONModel.m index 0354ad01..4ae211a1 100644 --- a/JSONModel/JSONModel/JSONModel.m +++ b/JSONModel/JSONModel/JSONModel.m @@ -1,19 +1,8 @@ // // JSONModel.m -// -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// 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 - #if !__has_feature(objc_arc) #error The JSONMOdel framework is ARC only, you can enable ARC on per file basis. #endif @@ -25,7 +14,6 @@ #import "JSONModel.h" #import "JSONModelClassProperty.h" -#import "JSONModelArray.h" #pragma mark - associated objects names static const char * kMapperObjectKey; @@ -56,30 +44,31 @@ +(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", + @"unsigned int", @"usigned long", @"long long", @"unsigned long long", @"unsigned short", @"char", @"unsigned char", //and some famous aliases @"NSInteger", @"NSUInteger", @"Block" ]; 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)); - } + } }); } @@ -124,12 +113,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; @@ -151,7 +140,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; @@ -176,27 +165,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; } @@ -211,21 +200,21 @@ -(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 + + //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 importing:YES] : property.name; - - //chek if exists and if so, add to incoming keys + + transformedName = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper] : property.name; + + //check if exists and if so, add to incoming keys id value; @try { value = [dict valueForKeyPath:transformedName]; @@ -233,50 +222,50 @@ -(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; } --(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; } @@ -284,11 +273,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 ot model keys, if a mapper is provided - NSString* jsonKeyPath = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper importing:YES] : property.name; + + //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 { @@ -297,12 +286,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]; @@ -311,51 +300,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) { @@ -363,66 +352,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 transofrm for it + // ) 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)) @@ -433,19 +422,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]) { @@ -458,41 +447,32 @@ -(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]; - } - + IMP imp = [valueTransformer methodForSelector:selector]; + id (*func)(id, SEL, id) = (void *)imp; + jsonValue = func(valueTransformer, selector, jsonValue); + + 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 mistaked -> exception - @throw [NSException exceptionWithName:@"Type not allowed" - reason:[NSString stringWithFormat:@"%@ type not supported for %@.%@", property.type, [self class], property.name] - userInfo:nil]; + 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 { // 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]; } } } } - + return YES; } @@ -513,13 +493,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, @@ -540,7 +520,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]; @@ -550,21 +530,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++) { @@ -574,67 +554,63 @@ -(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 convertors - 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"]) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" p.isIndex = YES; +#pragma GCC diagnostic pop + objc_setAssociatedObject( self.class, &kIndexPropertyNameKey, p.name, OBJC_ASSOCIATION_RETAIN // This is atomic ); - } else if([protocolName isEqualToString:@"ConvertOnDemand"]) { - p.convertsOnDemand = YES; } else if([protocolName isEqualToString:@"Ignore"]) { p = nil; } else { p.protocol = protocolName; } - + [scanner scanString:@">" intoString:NULL]; } @@ -643,7 +619,7 @@ -(void)__inspectProperties else if ([scanner scanString:@"{" intoString: &propertyType]) { [scanner scanCharactersFromSet:[NSCharacterSet alphanumericCharacterSet] intoString:&propertyType]; - + p.isStandardJSONType = NO; p.structName = propertyType; @@ -654,13 +630,13 @@ -(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 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]; @@ -672,29 +648,67 @@ -(void)__inspectProperties if([[self class] propertyIsOptional:nsPropertyName]){ p.isOptional = YES; } - + if([[self class] propertyIsIgnored:nsPropertyName]){ p = nil; } - + + Class customClass = [[self class] classForCollectionProperty:nsPropertyName]; + 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]; } + + // generate custom setters and getter + if (p) + { + NSString *name = [p.name stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[p.name substringToIndex:1].uppercaseString]; + + // getter + SEL getter = NSSelectorFromString([NSString stringWithFormat:@"JSONObjectFor%@", name]); + + if ([self respondsToSelector:getter]) + p.customGetter = getter; + + // 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]); + + if (p.customSetters[class]) + continue; + + SEL setter = NSSelectorFromString([NSString stringWithFormat:@"set%@With%@:", name, class]); + + if ([self respondsToSelector:setter]) + p.customSetters[class] = [NSValue valueWithBytes:&setter objCType:@encode(SEL)]; + } + } } - + 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, @@ -720,69 +734,63 @@ -(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; - } - - 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; - } + // 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; + value = [[protocolClass class] arrayOfModelsFromDictionaries:value error:&arrayErr]; + if((err != nil) && (arrayErr != nil)) + { + *err = [arrayErr errorByPrependingKeyPathComponent:property.name]; + 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]; @@ -794,12 +802,12 @@ -(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); if (!protocolClass) return value; - + //if the protocol is actually a JSONModel class if ([self __isJSONModelSubClass:protocolClass]) { @@ -814,7 +822,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,73 +833,43 @@ -(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property return [NSDictionary dictionaryWithDictionary:res]; } } - + return value; } #pragma mark - custom transformations --(BOOL)__customSetValue:(id)value forProperty:(JSONModelClassProperty*)property +- (BOOL)__customSetValue:(id )value forProperty:(JSONModelClassProperty *)property { - if (property.setterType == kNotInspected) { - //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]] - ]; - - SEL customPropertySetter = NSSelectorFromString(selectorName); - - //check if there's a custom selector like this - if (![self respondsToSelector: customPropertySetter]) { - property.setterType = kNo; - return NO; - } - - //cache the custom setter selector - property.setterType = kCustom; - property.customSetter = customPropertySetter; - } - - if (property.setterType==kCustom) { - //call the custom setter - //https://github.com/steipete - ((void (*) (id, SEL, id))objc_msgSend)(self, property.customSetter, value); - return YES; - } - - return NO; + NSString *class = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:[value class]]); + + SEL setter = nil; + [property.customSetters[class] getValue:&setter]; + + if (!setter) + [property.customSetters[@"generic"] getValue:&setter]; + + if (!setter) + return NO; + + 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 +- (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; + SEL getter = property.customGetter; - } - - if (property.getterType==kCustom) { - //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; - } - - return NO; + if (!getter) + return NO; + + IMP imp = [self methodForSelector:getter]; + id (*func)(id, SEL) = (void *)imp; + *value = func(self, getter); + + return YES; } #pragma mark - persistance @@ -900,7 +878,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]; @@ -909,11 +887,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]; } @@ -928,8 +906,13 @@ -(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 +- (NSDictionary *)toDictionaryWithKeys:(NSArray *)propertyNames { NSArray* properties = [self __properties__]; NSMutableDictionary* tempDictionary = [NSMutableDictionary dictionaryWithCapacity:properties.count]; @@ -942,30 +925,30 @@ -(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 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); 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) + + if (value == nil) { [tempDictionary removeObjectForKey:keyPath]; } @@ -975,40 +958,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; @@ -1020,22 +1003,17 @@ -(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 { + IMP imp = [valueTransformer methodForSelector:selector]; + id (*func)(id, SEL, id) = (void *)imp; + value = func(valueTransformer, selector, value); + [tempDictionary setValue:value forKeyPath:keyPath]; + } 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]; @@ -1044,16 +1022,16 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames } } } - + return [tempDictionary copy]; } //exports model to a dictionary and then to a JSON string --(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames +- (NSData *)toJSONDataWithKeys:(NSArray *)propertyNames { NSData* jsonData = nil; NSError* jsonError = nil; - + @try { NSDictionary* dict = [self toDictionaryWithKeys:propertyNames]; jsonData = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&jsonError]; @@ -1064,25 +1042,36 @@ -(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames JMLog(@"EXCEPTION: %@", exception.description); return nil; } - - return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + + return jsonData; +} + +- (NSString *)toJSONStringWithKeys:(NSArray *)propertyNames +{ + return [[NSString alloc] initWithData: [self toJSONDataWithKeys: propertyNames] + 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 *__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; - + 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 { @@ -1096,14 +1085,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; @@ -1123,6 +1112,51 @@ +(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 + { + if (err) { + *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 { @@ -1131,12 +1165,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; @@ -1147,21 +1181,41 @@ +(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; } ++(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 + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -(NSString*)indexPropertyName { //custom getter for an associated object @@ -1172,13 +1226,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]; } @@ -1202,12 +1256,18 @@ -(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]; } +#pragma GCC diagnostic pop + #pragma mark - custom data validation -(BOOL)validate:(NSError**)error { @@ -1219,13 +1279,13 @@ -(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 && !p.convertsOnDemand) { + + if (p.isStandardJSONType && ![value respondsToSelector:@selector(count)] && [valueDescription length]>60) { //cap description for longer values valueDescription = [NSString stringWithFormat:@"%@...", [valueDescription substringToIndex:59]]; @@ -1233,7 +1293,7 @@ -(NSString*)description valueDescription = [valueDescription stringByReplacingOccurrencesOfString:@"\n" withString:@"\n "]; [text appendFormat:@" [%@]: %@\n", p.name, valueDescription]; } - + [text appendFormat:@"", [self class]]; return text; } @@ -1259,10 +1319,33 @@ +(BOOL)propertyIsIgnored:(NSString *)propertyName return NO; } ++(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 +- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping +{ + [self mergeFromDictionary:dict useKeyMapping:useKeyMapping error:nil]; +} + +- (BOOL)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error { - [self __importDictionary:dict withKeyMapper:(useKeyMapping)? self.__keyMapper:nil validation:NO error:nil]; + return [self __importDictionary:dict withKeyMapper:(useKeyMapping)? self.__keyMapper:nil validation:NO error:error]; } #pragma mark - NSCopying, NSCoding @@ -1275,9 +1358,19 @@ -(instancetype)copyWithZone:(NSZone *)zone -(instancetype)initWithCoder:(NSCoder *)decoder { - NSString* json = [decoder decodeObjectForKey:@"json"]; - - self = [self initWithString:json error:nil]; + 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]; + if (error) { + JMLog(@"%@",[error localizedDescription]); + } return self; } diff --git a/JSONModel/JSONModel/JSONModelArray.h b/JSONModel/JSONModel/JSONModelArray.h deleted file mode 100644 index e858ad78..00000000 --- a/JSONModel/JSONModel/JSONModelArray.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// JSONModelArray.h -// -// @version 0.8.0 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 - -#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 homogenous 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 88eddc7a..00000000 --- a/JSONModel/JSONModel/JSONModelArray.m +++ /dev/null @@ -1,145 +0,0 @@ -// -// JSONModelArray.m -// -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 - -#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* overridenMethods = nil; - if (!overridenMethods) overridenMethods = @[@"initWithArray:modelClass:",@"objectAtIndex:",@"objectAtIndexedSubscript:", @"count",@"modelWithIndexValue:",@"description",@"mutableCopy",@"firstObject",@"lastObject",@"countByEnumeratingWithState:objects:count:"]; - if ([overridenMethods 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 7e470707..67405abf 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.h +++ b/JSONModel/JSONModel/JSONModelClassProperty.h @@ -1,51 +1,34 @@ // // JSONModelClassProperty.h +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #import -enum kCustomizationTypes { - kNotInspected = 0, - kCustom, - kNo - }; - -typedef enum kCustomizationTypes PropertySetterType; -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. * * 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 +// deprecated +@property (assign, nonatomic) BOOL isIndex DEPRECATED_ATTRIBUTE; + /** 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; @@ -56,22 +39,10 @@ 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; - -/** 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; -/** 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..5330c921 100644 --- a/JSONModel/JSONModel/JSONModelClassProperty.m +++ b/JSONModel/JSONModel/JSONModelClassProperty.m @@ -1,18 +1,7 @@ // // JSONModelClassProperty.m +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #import "JSONModelClassProperty.h" @@ -22,20 +11,36 @@ -(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.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) + { + SEL selector; + [obj getValue:&selector]; + [setters addObject:NSStringFromSelector(selector)]; + } + + [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.h b/JSONModel/JSONModel/JSONModelError.h index 36f41ef5..266e6ccc 100644 --- a/JSONModel/JSONModel/JSONModelError.h +++ b/JSONModel/JSONModel/JSONModelError.h @@ -1,18 +1,7 @@ // // JSONModelError.h +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #import @@ -28,15 +17,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,60 +33,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; /** * 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 A description of the type mismatch that was encountered. + * @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. @@ -106,7 +97,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/JSONModel/JSONModelError.m b/JSONModel/JSONModel/JSONModelError.m index de80446a..f357e707 100644 --- a/JSONModel/JSONModel/JSONModelError.m +++ b/JSONModel/JSONModel/JSONModelError.m @@ -1,18 +1,7 @@ // // JSONModelError.m +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #import "JSONModelError.h" @@ -25,7 +14,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 +45,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/JSONModelCategories/NSArray+JSONModel.h b/JSONModel/JSONModelCategories/NSArray+JSONModel.h deleted file mode 100644 index d4e18dab..00000000 --- a/JSONModel/JSONModelCategories/NSArray+JSONModel.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// NSArray+JSONModel.h -// -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 - - -#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 homogenous 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 41475a47..00000000 --- a/JSONModel/JSONModelCategories/NSArray+JSONModel.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// NSArray+JSONModel.m -// -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 - - -#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 b8f5a178..564ca46e 100644 --- a/JSONModel/JSONModelLib.h +++ b/JSONModel/JSONModelLib.h @@ -1,35 +1,19 @@ // // JSONModelLib.h +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #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" - -//models array -#import "NSArray+JSONModel.h" -#import "JSONModelArray.h" \ No newline at end of file diff --git a/JSONModel/JSONModelNetworking/JSONAPI.h b/JSONModel/JSONModelNetworking/JSONAPI.h index dd27aa23..30a8743a 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.h +++ b/JSONModel/JSONModelNetworking/JSONAPI.h @@ -1,90 +1,19 @@ // // JSONAPI.h +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #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; - -/** - * 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; - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** @name Making GET API requests */ -/** - * Makes an asynchronious 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; - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** @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; - -///////////////////////////////////////////////////////////////////////////////////////////// - -/** @name JSON RPC methods */ -/** - * Makes an asynchronious 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; - -/** @name JSON RPC (2.0) request method */ -/** - * Makes an asynchronious 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; - -///////////////////////////////////////////////////////////////////////////////////////////// ++ (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/JSONAPI.m b/JSONModel/JSONModelNetworking/JSONAPI.m index 212803d7..a7e33262 100644 --- a/JSONModel/JSONModelNetworking/JSONAPI.m +++ b/JSONModel/JSONModelNetworking/JSONAPI.m @@ -1,21 +1,13 @@ // // JSONAPI.m +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #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; @@ -26,6 +18,7 @@ @interface JSONAPIRPCErrorModel: JSONModel #pragma mark - static variables static JSONAPI* sharedInstance = nil; + static long jsonRpcId = 0; #pragma mark - JSONAPI() private interface @@ -64,7 +57,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); }]; @@ -74,7 +67,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); }]; @@ -83,7 +76,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]; @@ -111,7 +104,7 @@ +(void)__rpcRequestWithObject:(id)jsonObject completion:(JSONObjectBlock)complet e = [JSONModelError errorBadResponse]; } } - + //invoke the callback completeBlock(result, e); } @@ -122,7 +115,7 @@ +(void)rpcWithMethodName:(NSString*)method andArguments:(NSArray*)args completio { NSAssert(method, @"No method specified"); if (!args) args = @[]; - + [self __rpcRequestWithObject:@{ //rpc 1.0 @"id": @(++jsonRpcId), @@ -135,7 +128,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.h b/JSONModel/JSONModelNetworking/JSONHTTPClient.h index f946c788..0f47cef9 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.h +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.h @@ -1,184 +1,33 @@ // // JSONModelHTTPClient.h +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #import "JSONModel.h" -#pragma mark - definitions - -/** - * HTTP Request methods - */ -extern NSString* const kHTTPMethodGET; -extern NSString* const kHTTPMethodPOST; - -/** - * Content-type strings - */ -extern NSString* const kContentTypeAutomatic; -extern NSString* const kContentTypeJSON; -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 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); +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; -///////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - configuration methods +typedef void (^JSONObjectBlock)(id json, JSONModelError *err) DEPRECATED_ATTRIBUTE; -/** - * @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 modifyable 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; - -/** - * 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; - -/** - * 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; - -/** - * Sets the timeout for network calls - * @param seconds the amount of seconds to wait before considering the call failed - */ -+(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 - * which checks the body request and decides between "application/json" - * and "application/x-www-form-urlencoded" - */ -+(void)setRequestContentType:(NSString*)contentTypeString; - -///////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - GET asynchronious JSON calls - -/** @name Making asynchronious 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; - -/** - * 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; - -/** - * 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; - -/** - * 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; - -/** - * 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; - -///////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - POST synchronious 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; - -/** - * 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; - -/** - * 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; - ++ (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/JSONHTTPClient.m b/JSONModel/JSONModelNetworking/JSONHTTPClient.m index b5e5d263..6c72dc5b 100644 --- a/JSONModel/JSONModelNetworking/JSONHTTPClient.m +++ b/JSONModel/JSONModelNetworking/JSONHTTPClient.m @@ -1,21 +1,15 @@ // // JSONModelHTTPClient.m +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #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 NSString* const kHTTPMethodGET = @"GET"; NSString* const kHTTPMethodPOST = @"POST"; @@ -34,11 +28,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 +72,6 @@ +(void)setTimeoutInSeconds:(int)seconds defaultTimeoutInSeconds = seconds; } -+(void)setControlsNetworkIndicator:(BOOL)does -{ - doesControlIndicator = does; -} - +(void)setRequestContentType:(NSString*)contentTypeString { requestContentType = contentTypeString; @@ -105,7 +89,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; @@ -126,27 +110,31 @@ +(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; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9 + return [str stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; + +#else return (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes( NULL, - (__bridge CFStringRef) value, + (__bridge CFStringRef)str, NULL, (CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8)); +#endif } #pragma mark - networking worker methods -+(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSData*)bodyData headers:(NSDictionary*)headers etag:(NSString**)etag error:(JSONModelError**)err ++(void)requestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSData*)bodyData headers:(NSDictionary*)headers handler:(RequestResultBlock)handler { - //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]; - [request setHTTPMethod:method]; + [request setHTTPMethod:method]; if ([requestContentType isEqualToString:kContentTypeAutomatic]) { //automatic content type @@ -158,60 +146,69 @@ +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method requestBod //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"]; } - - //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]; - } - - //turn off network indicator - if (doesControlIndicator) dispatch_async(dispatch_get_main_queue(), ^{[self setNetworkIndicatorVisible:NO];}); - - //if not OK status set the err to a JSONModelError instance - if (response.statusCode >= 300 || response.statusCode < 200) { - //create a new error - if (*err==nil) *err = [JSONModelError errorBadResponse]; - } - - //if there was an error, include the HTTP response and return - if (*err) { - //assign the response to the JSONModel instance - [*err setHttpResponse: [response copy]]; + + void (^completionHandler)(NSData *, NSURLResponse *, NSError *) = ^(NSData *data, NSURLResponse *origResponse, NSError *origError) { + NSHTTPURLResponse *response = (NSHTTPURLResponse *)origResponse; + JSONModelError *error = nil; + + //convert an NSError to a JSONModelError + if (origError) { + error = [JSONModelError errorWithDomain:origError.domain code:origError.code userInfo:origError.userInfo]; + } + + //special case for http error code 401 + if (error.code == NSURLErrorUserCancelledAuthentication) { + response = [[NSHTTPURLResponse alloc] initWithURL:url statusCode:401 HTTPVersion:@"HTTP/1.1" headerFields:@{}]; + } + + //if not OK status set the err to a JSONModelError instance + if (!error && (response.statusCode >= 300 || response.statusCode < 200)) { + error = [JSONModelError errorBadResponse]; + } + + //if there was an error, assign the response to the JSONModel instance + if (error) { + error.httpResponse = [response copy]; + } //empty respone, return nil instead - if ([responseData length]<1) { - return nil; + if (!data.length) { + data = nil; } - } - - //return the data fetched from web - return responseData; + + handler(data, error); + }; + + //fire the request + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 + NSURLSessionTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:completionHandler]; + [task resume]; +#else + NSOperationQueue *queue = [NSOperationQueue new]; + + [NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { + completionHandler(data, response, error); + }]; +#endif } -+(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method params:(NSDictionary*)params headers:(NSDictionary*)headers etag:(NSString**)etag error:(JSONModelError**)err ++(void)requestDataFromURL:(NSURL*)url method:(NSString*)method params:(NSDictionary*)params headers:(NSDictionary*)headers handler:(RequestResultBlock)handler { //create the request body NSMutableString* paramsString = nil; @@ -226,7 +223,7 @@ +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method params:(NS paramsString = [[NSMutableString alloc] initWithString: [paramsString substringToIndex: paramsString.length-1]]; } } - + //set the request params if ([method isEqualToString:kHTTPMethodGET] && params) { @@ -237,14 +234,13 @@ +(NSData*)syncRequestDataFromURL:(NSURL*)url method:(NSString*)method params:(NS paramsString ]]; } - + //call the more general synq request method - return [self syncRequestDataFromURL: url - method: method - requestBody: [method isEqualToString:kHTTPMethodPOST]?[paramsString dataUsingEncoding:NSUTF8StringEncoding]:nil - headers: headers - etag: etag - error: err]; + [self requestDataFromURL: url + method: method + requestBody: [method isEqualToString:kHTTPMethodPOST]?[paramsString dataUsingEncoding:NSUTF8StringEncoding]:nil + headers: headers + handler:handler]; } #pragma mark - Async network request @@ -270,65 +266,48 @@ +(void)JSONFromURLWithString:(NSString *)urlString method:(NSString *)method par +(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary *)params orBodyData:(NSData*)bodyData headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock { - NSDictionary* customHeaders = headers; - - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - + RequestResultBlock handler = ^(NSData *responseData, JSONModelError *error) { id jsonObject = nil; - JSONModelError* error = nil; - NSData* responseData = nil; - NSString* etag = nil; - - @try { - if (bodyData) { - responseData = [self syncRequestDataFromURL: [NSURL URLWithString:urlString] - method: method - requestBody: bodyData - headers: customHeaders - etag: &etag - error: &error]; - } else { - responseData = [self syncRequestDataFromURL: [NSURL URLWithString:urlString] - method: method - params: params - headers: customHeaders - etag: &etag - error: &error]; - } - } - @catch (NSException *exception) { - error = [JSONModelError errorBadResponse]; - } - + //step 3: if there's no response so far, return a basic error - if (!responseData && !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) { - // 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]; - } + 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]; + } } //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 dispatch_async(dispatch_get_main_queue(), ^{ if (completeBlock) { 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 @@ -379,12 +358,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 diff --git a/JSONModel/JSONModelNetworking/JSONModel+networking.h b/JSONModel/JSONModelNetworking/JSONModel+networking.h index 88e329ef..444f26d9 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.h +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.h @@ -1,66 +1,18 @@ // // JSONModel+networking.h +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #import "JSONModel.h" #import "JSONHTTPClient.h" -typedef void (^JSONModelBlock)(id model, JSONModelError* err); - -/** - * 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) - -@property (assign, nonatomic) BOOL isLoading; -/** @name Asynchroniously 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 - * @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; - -/** - * 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; +typedef void (^JSONModelBlock)(id model, JSONModelError *err) 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; +@interface JSONModel (Networking) +@property (assign, nonatomic) BOOL isLoading 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/JSONModelNetworking/JSONModel+networking.m b/JSONModel/JSONModelNetworking/JSONModel+networking.m index 7d4d1ff3..b3e0aa42 100644 --- a/JSONModel/JSONModelNetworking/JSONModel+networking.m +++ b/JSONModel/JSONModelNetworking/JSONModel+networking.m @@ -1,22 +1,14 @@ // // JSONModel+networking.m +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #import "JSONModel+networking.h" #import "JSONHTTPClient.h" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wdeprecated-implementations" + BOOL _isLoading; @implementation JSONModel(Networking) @@ -37,25 +29,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; @@ -63,47 +55,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.h b/JSONModel/JSONModelTransformations/JSONKeyMapper.h index 75822c6e..61ea929f 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.h +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.h @@ -1,26 +1,15 @@ // // JSONKeyMapper.h +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #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,65 +20,77 @@ 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];
  * }
  * 
*/ @interface JSONKeyMapper : NSObject -/** @name Name convertors */ -/** Block, which takes in a JSON key and converts it to the corresponding property name */ -@property (readonly, nonatomic) JSONModelKeyMapBlock JSONToModelKeyBlock; +// 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:"); ++ (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 */ @property (readonly, nonatomic) JSONModelKeyMapBlock modelToJSONKeyBlock; -/** Combined convertor method -* @param value the source name -* @param importing YES invokes JSONToModelKeyBlock, NO - modelToJSONKeyBlock -* @return JSONKeyMapper instance -*/ --(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing; +/** Combined converter method + * @param value the source name + * @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 two parameters take in a JSONModelKeyMapBlock block: - *
NSString* (^JSONModelKeyMapBlock)(NSString* keyName)
+ * 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. - * @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; +- (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; + +/** + * Given a camelCase model property, this mapper finds JSON keys using the snake_case equivalent. + */ ++ (instancetype)mapperForSnakeCase; + +/** + * Given a camelCase model property, this mapper finds JSON keys using the TitleCase equivalent. + */ ++ (instancetype)mapperForTitleCase; /** - * Creates a JSONKeyMapper, which converts underscore_case to camelCase and vice versa. + * 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. */ -+(instancetype)mapperFromUnderscoreCaseToCamelCase; ++ (instancetype)baseMapper:(JSONKeyMapper *)baseKeyMapper withModelToJSONExceptions:(NSDictionary *)toJSON; -+(instancetype)mapperFromUpperCaseToLowerCase; @end diff --git a/JSONModel/JSONModelTransformations/JSONKeyMapper.m b/JSONModel/JSONModelTransformations/JSONKeyMapper.m index c3007dad..e1daa17f 100644 --- a/JSONModel/JSONModelTransformations/JSONKeyMapper.m +++ b/JSONModel/JSONModelTransformations/JSONKeyMapper.m @@ -1,174 +1,146 @@ // // JSONKeyMapper.m -// -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// 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 - #import "JSONKeyMapper.h" -@interface JSONKeyMapper() -@property (nonatomic, strong) NSMutableDictionary *toModelMap; -@property (nonatomic, strong) NSMutableDictionary *toJSONMap; -@end - @implementation JSONKeyMapper --(instancetype)init +- (instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel modelToJSONBlock:(JSONModelKeyMapBlock)toJSON { - self = [super init]; - if (self) { - //initialization - self.toModelMap = [NSMutableDictionary dictionary]; - self.toJSONMap = [NSMutableDictionary dictionary]; - } - return self; + return [self initWithModelToJSONBlock:toJSON]; } --(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel - modelToJSONBlock:(JSONModelKeyMapBlock)toJSON +- (instancetype)initWithModelToJSONBlock:(JSONModelKeyMapBlock)toJSON { - self = [self init]; - - if (self) { - __weak JSONKeyMapper *myself = self; - //the json to model convertion block - _JSONToModelKeyBlock = ^NSString*(NSString* keyName) { - - //try to return cached transformed key - if (myself.toModelMap[keyName]) return myself.toModelMap[keyName]; - - //try to convert the key, and store in the cache - NSString* result = toModel(keyName); - myself.toModelMap[keyName] = result; - return result; - }; - - _modelToJSONKeyBlock = ^NSString*(NSString* keyName) { - - //try to return cached transformed key - if (myself.toJSONMap[keyName]) return myself.toJSONMap[keyName]; - - //try to convert the key, and store in the cache - NSString* result = toJSON(keyName); - myself.toJSONMap[keyName] = result; - return result; - - }; - - } - + if (!(self = [self init])) + return nil; + + _modelToJSONKeyBlock = toJSON; + 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; - }; - - _modelToJSONKeyBlock = ^NSString*(NSString* keyName) { - NSString* result = [userToJSONMap valueForKeyPath: keyName]; - return result?result:keyName; - }; - } - + NSDictionary *toJSON = [JSONKeyMapper swapKeysAndValuesInDictionary:map]; + + return [self initWithModelToJSONDictionary:toJSON]; +} + +- (instancetype)initWithModelToJSONDictionary:(NSDictionary *)toJSON +{ + if (!(self = [super init])) + return nil; + + _modelToJSONKeyBlock = ^NSString *(NSString *keyName) + { + return [toJSON valueForKeyPath:keyName] ?: keyName; + }; + return self; } --(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing +- (JSONModelKeyMapBlock)JSONToModelKeyBlock { - return !importing?_JSONToModelKeyBlock(value):_modelToJSONKeyBlock(value); + return nil; } -+(instancetype)mapperFromUnderscoreCaseToCamelCase ++ (NSDictionary *)swapKeysAndValuesInDictionary:(NSDictionary *)dictionary { - JSONModelKeyMapBlock toModel = ^ NSString* (NSString* keyName) { + NSArray *keys = dictionary.allKeys; + NSArray *values = [dictionary objectsForKeys:keys notFoundMarker:[NSNull null]]; - //bail early if no transformation required - if ([keyName rangeOfString:@"_"].location==NSNotFound) return keyName; + return [NSDictionary dictionaryWithObjects:keys forKeys:values]; +} - //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; - }; +- (NSString *)convertValue:(NSString *)value isImportingToModel:(BOOL)importing +{ + return [self convertValue:value]; +} - JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) { - - NSMutableString* result = [NSMutableString stringWithString:keyName]; - NSRange upperCharRange = [result rangeOfCharacterFromSet:[NSCharacterSet uppercaseLetterCharacterSet]]; +- (NSString *)convertValue:(NSString *)value +{ + return _modelToJSONKeyBlock(value); +} - //handle upper case chars - while ( upperCharRange.location!=NSNotFound) { ++ (instancetype)mapperFromUnderscoreCaseToCamelCase +{ + return [self mapperForSnakeCase]; +} - NSString* lowerChar = [[result substringWithRange:upperCharRange] lowercaseString]; - [result replaceCharactersInRange:upperCharRange - withString:[NSString stringWithFormat:@"_%@", lowerChar]]; - upperCharRange = [result rangeOfCharacterFromSet:[NSCharacterSet uppercaseLetterCharacterSet]]; ++ (instancetype)mapperForSnakeCase +{ + return [[self alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) + { + NSMutableString *result = [NSMutableString stringWithString:keyName]; + NSRange range; + + // 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); - } - - NSRange replaceRange = NSMakeRange(digitsRange.location, digitsRangeEnd.location - digitsRange.location); - NSString* digits = [result substringWithRange:replaceRange]; - + // 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)]; + + // 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] initWithJSONToModelBlock:toModel - modelToJSONBlock:toJSON]; - ++ (instancetype)mapperForTitleCase +{ + return [[self alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) + { + return [keyName stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[keyName substringToIndex:1].uppercaseString]; + }]; } -+(instancetype)mapperFromUpperCaseToLowerCase ++ (instancetype)mapperFromUpperCaseToLowerCase { - JSONModelKeyMapBlock toModel = ^ NSString* (NSString* keyName) { - NSString*lowercaseString = [keyName lowercaseString]; - return lowercaseString; - }; + return [[self alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) + { + return keyName.uppercaseString; + }]; +} - JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) { ++ (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions +{ + NSDictionary *toJSON = [JSONKeyMapper swapKeysAndValuesInDictionary:exceptions]; - NSString *uppercaseString = [keyName uppercaseString]; + return [self baseMapper:baseKeyMapper withModelToJSONExceptions:toJSON]; +} - return uppercaseString; - }; ++ (instancetype)baseMapper:(JSONKeyMapper *)baseKeyMapper withModelToJSONExceptions:(NSDictionary *)toJSON +{ + return [[self alloc] initWithModelToJSONBlock:^NSString *(NSString *keyName) + { + if (!keyName) + return nil; - return [[self alloc] initWithJSONToModelBlock:toModel - modelToJSONBlock:toJSON]; + if (toJSON[keyName]) + return toJSON[keyName]; + return baseKeyMapper.modelToJSONKeyBlock(keyName); + }]; } @end diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.h b/JSONModel/JSONModelTransformations/JSONValueTransformer.h index 8c40ce85..7dd585c9 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.h +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.h @@ -1,25 +1,13 @@ // // JSONValueTransformer.h +// JSONModel // -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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 #import -#import "JSONModelArray.h" ///////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - extern definitons +#pragma mark - extern definitions /** * Boolean function to check for null values. Handy when you need to both check * for nil and [NSNUll null] @@ -30,7 +18,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 @@ -44,51 +32,42 @@ 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 */ /** - * 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; ++ (Class)classByResolvingClusterClasses:(Class)sourceClass; #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 */ --(NSMutableString*)NSMutableStringFromNSString:(NSString*)string; +- (NSMutableString *)NSMutableStringFromNSString:(NSString *)string; #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 */ --(NSMutableArray*)NSMutableArrayFromNSArray:(NSArray*)array; - -#pragma mark - NS(Mutable)Array <- JSONModelArray -/** - * Trasnforms an array to a JSONModelArray - * @param array incoming array - * @return JSONModelArray - */ --(NSArray*)NSArrayFromJSONModelArray:(JSONModelArray*)array; --(NSMutableArray*)NSMutableArrayFromJSONModelArray:(JSONModelArray*)array; +- (NSMutableArray *)NSMutableArrayFromNSArray:(NSArray *)array; #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 */ --(NSMutableDictionary*)NSMutableDictionaryFromNSDictionary:(NSDictionary*)dict; +- (NSMutableDictionary *)NSMutableDictionaryFromNSDictionary:(NSDictionary *)dict; #pragma mark - NSSet <-> NSArray /** @name Transforming Sets */ @@ -97,28 +76,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 */ @@ -127,21 +106,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 /** @@ -149,28 +128,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 @@ -180,14 +159,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 @@ -197,7 +176,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 @@ -209,14 +188,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 @@ -225,6 +204,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 diff --git a/JSONModel/JSONModelTransformations/JSONValueTransformer.m b/JSONModel/JSONModelTransformations/JSONValueTransformer.m index 2a37f8dd..0fc55714 100644 --- a/JSONModel/JSONModelTransformations/JSONValueTransformer.m +++ b/JSONModel/JSONModelTransformations/JSONValueTransformer.m @@ -1,44 +1,31 @@ // // JSONValueTransformer.m -// -// @version 1.0.2 -// @author Marin Todorov, http://www.touch-code-magazine.com +// 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 - #import "JSONValueTransformer.h" -#import "JSONModelArray.h" #pragma mark - functions extern BOOL isNull(id value) { if (!value) return YES; if ([value isKindOfClass:[NSNull class]]) return YES; - + return NO; } -static NSDateFormatter *_dateFormatter; - @implementation JSONValueTransformer -(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 + _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", - + @"@?":@"Block"}; } return self; @@ -50,7 +37,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]; @@ -60,7 +47,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]; @@ -84,26 +71,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 { @@ -144,7 +114,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]; @@ -181,7 +151,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 @@ -202,6 +172,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/jsonmodel/jsonmodel/pull/119 return [NSURL URLWithString:string]; } @@ -213,14 +185,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 +203,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 @@ -254,7 +230,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/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/MTTestSemaphor.h b/JSONModelDemoTests/MTTestSemaphor.h deleted file mode 100644 index 8ce6e30a..00000000 --- a/JSONModelDemoTests/MTTestSemaphor.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// MTTestSemaphor -// -// @version 0.1 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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. - -#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 359a0e83..00000000 --- a/JSONModelDemoTests/MTTestSemaphor.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// MTTestSemaphor -// -// @version 0.1 -// @author Marin Todorov, http://www.touch-code-magazine.com -// - -// 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. - -#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 3da00fb3..00000000 --- a/JSONModelDemoTests/MockNSURLConnection.m +++ /dev/null @@ -1,50 +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)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 b3f88b79..00000000 --- a/JSONModelDemoTests/UnitTests/ArrayTests.m +++ /dev/null @@ -1,88 +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; -} - --(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]); - - XCTAssertNotNil(repos, @"Could not load the test data file."); - -} - --(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"); -} - --(void)testCount -{ - XCTAssertEqualObjects(@(repos.repositories.count), @100, @"wrong count"); -} - --(void)testFastEnumeration -{ - for (GitHubRepoModel *m in repos.repositories) { - XCTAssertNoThrow([m created], @"should not throw exception"); - } -} - --(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"); -} - -/* - * https://github.com/icanzilb/JSONModel/pull/14 - */ --(void)testArrayReverseTransformGitHubIssue_14 -{ - NSDictionary* dict = [repos toDictionary]; - XCTAssertNotNil(dict, @"Could not convert ReposModel back to an NSDictionary"); -} - -/* - * https://github.com/icanzilb/JSONModel/issues/15 - */ --(void)testArrayReverseTransformGitHubIssue_15 -{ - NSString* string = [repos toJSONString]; - XCTAssertNotNil(string, @"Could not convert ReposModel 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 d492cc50..00000000 --- a/JSONModelDemoTests/UnitTests/BuiltInConversionsTests.m +++ /dev/null @@ -1,75 +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"); - - //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"); - - 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/icanzilb/JSONModel/pull/60 - XCTAssertNotNil(b.websiteURL, @"URL parsing did return nil"); - XCTAssertNotNil(b.websiteURL.query, @"key1=test"); - - 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 e5fbff32..00000000 --- a/JSONModelDemoTests/UnitTests/DataFiles/converts.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "isItYesOrNo": 1, - "boolFromString" : "1", - "boolFromNumber" : 1, - "boolFromBoolean" : true, - - "unorderedList": ["1","5","7","2"], - "dynamicUnorderedList": ["a", "3"], - - "stringFromNumber": 19.95, - "numberFromString": "1230.99", - - "importantEvent": "2012-11-26T10:00:01+02:00", - - "websiteURL": "http://www.visir.is/jordan-slaer-milljard-af-villunni-sinni/article/2013130709873?key1=test", - - "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 b31665ae..00000000 --- a/JSONModelDemoTests/UnitTests/HTTPClientSuite.m +++ /dev/null @@ -1,429 +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" - -@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"); - NSAssert(err.code==kJSONModelErrorBadResponse, @"Error code didn't match kJSONModelErrorBadResponse"); - - //release the semaphore lock - [[MTTestSemaphor semaphore] lift: semaphorKey]; - }]; - - [[MTTestSemaphor semaphore] waitForKey: semaphorKey]; -} - -//https://github.com/icanzilb/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/icanzilb/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 05d351f5..00000000 --- a/JSONModelDemoTests/UnitTests/InitFromWebTests.m +++ /dev/null @@ -1,58 +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" - -@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 64f86fb1..00000000 --- a/JSONModelDemoTests/UnitTests/JSONAPITests.m +++ /dev/null @@ -1,185 +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" - -@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/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 84e03a07..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"); - XCTAssertTrue(fabsf([t.pi floatValue]-3.14159)> 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 c0cbb690..00000000 --- a/JSONModelDemoTests/UnitTests/KeyMappingTests.m +++ /dev/null @@ -1,290 +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" - - -#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/icanzilb/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]; - - 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]; - - XCTAssertEqualObjects(global2.name, @"NAME IN CAPITALS", @"did not import name property"); - - [JSONModel setGlobalKeyMapper:nil]; -} - -//https://github.com/icanzilb/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]; -} - -@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 4c9dbfcf..00000000 --- a/JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.m +++ /dev/null @@ -1,81 +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"); - - XCTAssertTrue(fabsf(p.floatNumber-12.12)= 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/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/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/GitHubKeyMapRepoModel.m b/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m deleted file mode 100644 index 9921b902..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/GitHubKeyMapRepoModel.m +++ /dev/null @@ -1,34 +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] initWithJSONToModelBlock:^NSString *(NSString *keyName) { - - if ([keyName isEqual:@"description"]) { - return @"__description"; - } else { - return keyName; - } - - } modelToJSONBlock:^NSString *(NSString *keyName) { - - if ([keyName isEqual:@"__description"]) { - return @"description"; - } else { - return keyName; - } - - }]; -} - -@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/ReposModel.h b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h deleted file mode 100644 index cfdb16e3..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.h +++ /dev/null @@ -1,16 +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 diff --git a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m b/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m deleted file mode 100644 index ef95b80f..00000000 --- a/JSONModelDemoTests/UnitTests/TestModels/ReposModel.m +++ /dev/null @@ -1,13 +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 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 d718f83b..00000000 --- a/JSONModelDemo_OSX.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1016 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 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 */; }; - 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 */; }; - 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 */; }; - 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 */; }; - 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 */ - 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 = ""; }; - 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 = ""; }; - 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 = ""; }; - 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 = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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 = ""; }; - 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; }; - 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 */, - 9C05B420168CEB220054215E /* TestModels */, - 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 */, - ); - path = TestModels; - sourceTree = ""; - }; - 9C66DFDC168CF09A0015CCDF /* JSONModel */ = { - isa = PBXGroup; - children = ( - 9C66DFDD168CF09A0015CCDF /* JSONModel */, - 9C66DFE6168CF09A0015CCDF /* JSONModelCategories */, - 9C66DFE9168CF09A0015CCDF /* JSONModelLib.h */, - 9C66DFEA168CF09A0015CCDF /* JSONModelNetworking */, - 9C66DFF1168CF09A0015CCDF /* JSONModelTransformations */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66DFDD168CF09A0015CCDF /* JSONModel */ = { - isa = PBXGroup; - children = ( - 9C66DFDE168CF09A0015CCDF /* JSONModel.h */, - 9C66DFDF168CF09A0015CCDF /* JSONModel.m */, - 9C66DFE0168CF09A0015CCDF /* JSONModelArray.h */, - 9C66DFE1168CF09A0015CCDF /* JSONModelArray.m */, - 9C66DFE2168CF09A0015CCDF /* JSONModelClassProperty.h */, - 9C66DFE3168CF09A0015CCDF /* JSONModelClassProperty.m */, - 9C66DFE4168CF09A0015CCDF /* JSONModelError.h */, - 9C66DFE5168CF09A0015CCDF /* JSONModelError.m */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66DFE6168CF09A0015CCDF /* JSONModelCategories */ = { - isa = PBXGroup; - children = ( - 9C66DFE7168CF09A0015CCDF /* NSArray+JSONModel.h */, - 9C66DFE8168CF09A0015CCDF /* NSArray+JSONModel.m */, - ); - path = JSONModelCategories; - 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 = ""; - }; - 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 = ( - 9CB6BC2C168E07730002535B /* GitHubUserModel.h */, - 9CB6BC2D168E07730002535B /* GitHubUserModel.m */, - ); - name = GithubDemo; - sourceTree = ""; - }; - 9CC27C821689B7BE008B5411 = { - isa = PBXGroup; - children = ( - 9C66DFDC168CF09A0015CCDF /* JSONModel */, - 9CC27C971689B7BE008B5411 /* JSONModelDemo_OSX */, - 9C05B2AE168CE9600054215E /* JSONModelDemoTests */, - 9CC27C901689B7BE008B5411 /* Frameworks */, - 9CC27C8E1689B7BE008B5411 /* Products */, - ); - sourceTree = ""; - }; - 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 */, - 9CB6BC21168DE3250002535B /* YoutubeDemo */, - 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"; - }; - 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 = 0460; - 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 */, - 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 */, - 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 */, - 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 */, - 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 */, - 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; - }; -/* 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; - 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 = ( - "DEBUG=1", - "$(inherited)", - "UNIT_TESTING=1", - ); - INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemoTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - 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; - 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"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - 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; - 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; - 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; - 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 = 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_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_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_iOS.xcodeproj/project.pbxproj b/JSONModelDemo_iOS.xcodeproj/project.pbxproj deleted file mode 100644 index 1ba85343..00000000 --- a/JSONModelDemo_iOS.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1196 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - 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 */; }; - 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 */; }; - 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 */; }; - 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 */; }; - 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 */; }; - 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 */; }; - 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 */ - 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 = ""; }; - 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 = ""; }; - 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 = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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; }; - 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 = ""; }; - 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 = ""; }; - 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 = ""; }; - 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 */, - ); - 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 */, - 9C66E014168CF0AA0015CCDF /* JSONModelCategories */, - 9C66E017168CF0AA0015CCDF /* JSONModelLib.h */, - 9C66E018168CF0AA0015CCDF /* JSONModelNetworking */, - 9C66E01F168CF0AA0015CCDF /* JSONModelTransformations */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66E00B168CF0AA0015CCDF /* JSONModel */ = { - isa = PBXGroup; - children = ( - 9C66E00C168CF0AA0015CCDF /* JSONModel.h */, - 9C66E00D168CF0AA0015CCDF /* JSONModel.m */, - 9C66E00E168CF0AA0015CCDF /* JSONModelArray.h */, - 9C66E00F168CF0AA0015CCDF /* JSONModelArray.m */, - 9C66E010168CF0AA0015CCDF /* JSONModelClassProperty.h */, - 9C66E011168CF0AA0015CCDF /* JSONModelClassProperty.m */, - 9C66E012168CF0AA0015CCDF /* JSONModelError.h */, - 9C66E013168CF0AA0015CCDF /* JSONModelError.m */, - ); - path = JSONModel; - sourceTree = ""; - }; - 9C66E014168CF0AA0015CCDF /* JSONModelCategories */ = { - isa = PBXGroup; - children = ( - 9C66E015168CF0AA0015CCDF /* NSArray+JSONModel.h */, - 9C66E016168CF0AA0015CCDF /* NSArray+JSONModel.m */, - ); - path = JSONModelCategories; - 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 */, - ); - sourceTree = ""; - }; - 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 */, - 9CBBBF9D166BB27E008B4326 /* YouTubeDemo */, - 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 = ""; - }; - 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 = ( - 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 */, - ); - 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 = 0500; - 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 */, - 9CBBBFA2166BB29B008B4326 /* YouTubeViewController.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 */, - 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 */, - 9C0D0240166E6BBF001EA645 /* KivaViewControllerNetworking.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 */, - 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 */, - 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 */, - 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 */, - 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_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - 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_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"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - 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"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - PRODUCT_NAME = JSONModelDemo_iOS; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - 9CBBBF1B166B6CF0008B4326 /* Debug */ = { - 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 = ( - "DEBUG=1", - "$(inherited)", - "UNIT_TESTING=1", - ); - INFOPLIST_FILE = "JSONModelDemoTests/JSONModelDemo_iOSTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - OTHER_LDFLAGS = "$(inherited)"; - 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"; - 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_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/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 0891b7aa..00000000 Binary files a/JSONModelDemo_iOS/Default-568h@2x.png and /dev/null differ diff --git a/JSONModelDemo_iOS/Default.png b/JSONModelDemo_iOS/Default.png deleted file mode 100644 index 4c8ca6f6..00000000 Binary files a/JSONModelDemo_iOS/Default.png and /dev/null differ diff --git a/JSONModelDemo_iOS/Default@2x.png b/JSONModelDemo_iOS/Default@2x.png deleted file mode 100644 index 35b84cff..00000000 Binary files a/JSONModelDemo_iOS/Default@2x.png and /dev/null differ 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 83d3d155..00000000 --- a/JSONModelDemo_iOS/GitHubViewController.xib +++ /dev/null @@ -1,159 +0,0 @@ - - - - 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/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-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 18753b14..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 a327bf55..00000000 --- a/JSONModelDemo_iOS/KivaViewController.m +++ /dev/null @@ -1,108 +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"]; - - [JSONHTTPClient getJSONFromURLWithString:@"http://api.kivaws.org/v1/loans/search.json" - 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 5f1bfe69..00000000 --- a/JSONModelDemo_iOS/KivaViewController.xib +++ /dev/null @@ -1,321 +0,0 @@ - - - - 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.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 2af57f9a..00000000 --- a/JSONModelDemo_iOS/KivaViewControllerNetworking.m +++ /dev/null @@ -1,89 +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"]; - - feed = [[KivaFeed alloc] initFromURLWithString:@"http://api.kivaws.org/v1/loans/search.json?status=fundraising" - 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 db7a65e6..00000000 --- a/JSONModelDemo_iOS/KivaViewControllerNetworking.xib +++ /dev/null @@ -1,309 +0,0 @@ - - - - 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/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 deee8bb4..00000000 --- a/JSONModelDemo_iOS/MBProgressHUD.h +++ /dev/null @@ -1,451 +0,0 @@ -// -// MBProgressHUD.h -// Version 0.5 -// 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 -// -// 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 enum { - /** 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 ring-shaped progress view. */ - MBProgressHUDModeAnnularDeterminate, - /** Shows a custom view */ - MBProgressHUDModeCustomView, - /** Shows only labels */ - MBProgressHUDModeText -} MBProgressHUDMode; - -typedef enum { - /** Opacity animation */ - MBProgressHUDAnimationFade, - /** Opacity + scale animation */ - MBProgressHUDAnimationZoom, - MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom, - MBProgressHUDAnimationZoomIn -} MBProgressHUDAnimation; - - -#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 __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. - * - * 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:. - * - * @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 - */ -+ (MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; - -/** - * Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:. - * - * @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. - * - * @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 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. - */ -+ (MBProgressHUD *)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 secons 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:completion: - */ -- (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: - */ -- (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: - */ -- (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 execouted. - * @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 hiden. - */ -@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-ayis 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). - * Defaults to 20.0 - */ -@property (assign) float margin; - -/** - * 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; - -/** - * Font to be used for the details label. Set this property if the default is not adequate. - */ -@property (MB_STRONG) UIFont* detailsLabelFont; - -/** - * 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; - -/** - * 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 diff --git a/JSONModelDemo_iOS/MBProgressHUD.m b/JSONModelDemo_iOS/MBProgressHUD.m deleted file mode 100755 index 3626fe44..00000000 --- a/JSONModelDemo_iOS/MBProgressHUD.m +++ /dev/null @@ -1,857 +0,0 @@ -// -// MBProgressHUD.m -// Version 0.5 -// Created by Matej Bukovinski on 2.4.09. -// - -#import "MBProgressHUD.h" - - -#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 - - -static const CGFloat kPadding = 4.f; -static const CGFloat kLabelFontSize = 16.f; -static const CGFloat kDetailsLabelFontSize = 12.f; - - -@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; - -@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; - -@end - - -@implementation MBProgressHUD { - BOOL useAnimation; - SEL methodForExecution; - id targetForExecution; - id objectForExecution; - UILabel *label; - UILabel *detailsLabel; - BOOL isFinished; - CGAffineTransform rotationTransform; -} - -#pragma mark - Properties - -@synthesize animationType; -@synthesize delegate; -@synthesize opacity; -@synthesize color; -@synthesize labelFont; -@synthesize detailsLabelFont; -@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; -#if NS_BLOCKS_AVAILABLE -@synthesize completionBlock; -#endif - -#pragma mark - Class methods - -+ (MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:view]; - [view addSubview:hud]; - [hud show:animated]; - return MB_AUTORELEASE(hud); -} - -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [MBProgressHUD HUDForView:view]; - if (hud != nil) { - hud.removeFromSuperViewOnHide = YES; - [hud hide:animated]; - return YES; - } - return NO; -} - -+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated { - NSArray *huds = [self allHUDsForView:view]; - for (MBProgressHUD *hud in huds) { - hud.removeFromSuperViewOnHide = YES; - [hud hide:animated]; - } - return [huds count]; -} - -+ (MBProgressHUD *)HUDForView:(UIView *)view { - Class hudClass = [MBProgressHUD class]; - NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator]; - for (UIView *subview in subviewsEnum) { - if ([subview isKindOfClass:hudClass]) { - return (MBProgressHUD *)subview; - } - } - return nil; -} - -+ (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]) { - [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.detailsLabelFont = [UIFont boldSystemFontOfSize:kDetailsLabelFontSize]; - self.xOffset = 0.0f; - self.yOffset = 0.0f; - self.dimBackground = NO; - self.margin = 20.0f; - self.graceTime = 0.0f; - self.minShowTime = 0.0f; - self.removeFromSuperViewOnHide = NO; - self.minSize = CGSizeZero; - self.square = NO; - 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."); - 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; -} - -- (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]; -#if NS_BLOCKS_AVAILABLE - [completionBlock release]; -#endif - [super dealloc]; -#endif -} - -#pragma mark - Show & hide - -- (void)show:(BOOL)animated { - 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]; - } - // ... otherwise show the HUD imediately - else { - [self setNeedsDisplay]; - [self showUsingAnimation:useAnimation]; - } -} - -- (void)hide:(BOOL)animated { - 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 setNeedsDisplay]; - [self showUsingAnimation:useAnimation]; - } -} - -- (void)handleMinShowTimer:(NSTimer *)theTimer { - [self hideUsingAnimation:useAnimation]; -} - -#pragma mark - Internal show & hide operations - -- (void)showUsingAnimation:(BOOL)animated { - 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 { - isFinished = YES; - self.alpha = 0.0f; - if ([delegate respondsToSelector:@selector(hudWasHidden:)]) { - [delegate performSelector:@selector(hudWasHidden:) withObject:self]; - } -#if NS_BLOCKS_AVAILABLE - if (self.completionBlock) { - self.completionBlock(); - self.completionBlock = NULL; - } -#endif - if (removeFromSuperViewOnHide) { - [self removeFromSuperview]; - } -} - -#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; - self.indicator = nil; -#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 = [UIColor whiteColor]; - 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 = [UIColor whiteColor]; - 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 && !isActivityIndicator) { - // Update to indeterminate indicator - [indicator removeFromSuperview]; - self.indicator = MB_AUTORELEASE([[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]); - [(UIActivityIndicatorView *)indicator startAnimating]; - [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]; - } - } - 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 { - - // Entirely cover the parent view - UIView *parent = self.superview; - if (parent) { - self.frame = parent.bounds; - } - CGRect bounds = self.bounds; - - // Determine the total widt 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 = [label.text sizeWithAttributes:@{NSFontAttributeName: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 = [detailsLabel.text sizeWithFont:detailsLabel.font - constrainedToSize:maxSize lineBreakMode: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 = roundf(((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; - 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 = roundf((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 = roundf((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; - } - - self.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(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; - 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", - @"detailsLabelText", @"detailsLabelFont", @"progress", 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"]) { - [self updateIndicators]; - } else if ([keyPath isEqualToString:@"labelText"]) { - label.text = self.labelText; - } else if ([keyPath isEqualToString:@"labelFont"]) { - label.font = self.labelFont; - } else if ([keyPath isEqualToString:@"detailsLabelText"]) { - detailsLabel.text = self.detailsLabelText; - } else if ([keyPath isEqualToString:@"detailsLabelFont"]) { - detailsLabel.font = self.detailsLabelFont; - } else if ([keyPath isEqualToString:@"progress"]) { - if ([indicator respondsToSelector:@selector(setProgress:)]) { - [(id)indicator setProgress:progress]; - } - return; - } - [self setNeedsLayout]; - [self setNeedsDisplay]; -} - -#pragma mark - Notifications - -- (void)registerForNotifications { - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc addObserver:self selector:@selector(deviceOrientationDidChange:) - name:UIDeviceOrientationDidChangeNotification object:nil]; -} - -- (void)unregisterFromNotifications { - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -- (void)deviceOrientationDidChange:(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]; - } -} - -- (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)) { - 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]; - } - [self setTransform:rotationTransform]; - if (animated) { - [UIView commitAnimations]; - } -} - -@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]; -} - -#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 - CGFloat lineWidth = 5.f; - UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath]; - processBackgroundPath.lineWidth = lineWidth; - processBackgroundPath.lineCapStyle = kCGLineCapRound; - 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 = kCGLineCapRound; - 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; - CGContextSetRGBFillColor(context, 1.0f, 1.0f, 1.0f, 1.0f); // white - 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", 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 a09f1a58..00000000 --- a/JSONModelDemo_iOS/MasterViewController.m +++ /dev/null @@ -1,205 +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 "YouTubeViewController.h" -#import "StorageViewController.h" -#import "KivaViewControllerNetworking.h" - -#import "JSONModel+networking.h" -#import "VideoModel.h" - -#import -#import - -@interface MasterViewController () { - NSMutableArray *_objects; -} -@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; -@property (strong, nonatomic) NSString* description; -@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 -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - self.title = @"Demos"; - _objects = [NSMutableArray arrayWithArray:@[@"Kiva.org demo", @"GitHub demo", @"Youtube 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:{ - 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; - - 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 2f8410dc..00000000 --- a/JSONModelDemo_iOS/StorageViewController.m +++ /dev/null @@ -1,66 +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 UITextView* 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]; -} - -@end diff --git a/JSONModelDemo_iOS/StorageViewController.xib b/JSONModelDemo_iOS/StorageViewController.xib deleted file mode 100644 index c1454a08..00000000 --- a/JSONModelDemo_iOS/StorageViewController.xib +++ /dev/null @@ -1,85 +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 gray box below + the number of times you saved to the file. - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemo_iOS/VideoLink.h b/JSONModelDemo_iOS/VideoLink.h deleted file mode 100644 index eaa5ac0d..00000000 --- a/JSONModelDemo_iOS/VideoLink.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// VideoLink.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface VideoLink : JSONModel - -@property (strong, nonatomic) NSString* type; -@property (strong, nonatomic) NSURL* href; - -@end diff --git a/JSONModelDemo_iOS/VideoLink.m b/JSONModelDemo_iOS/VideoLink.m deleted file mode 100644 index 5edbfa0f..00000000 --- a/JSONModelDemo_iOS/VideoLink.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// VideoLink.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "VideoLink.h" - -@implementation VideoLink - -@end diff --git a/JSONModelDemo_iOS/VideoModel.h b/JSONModelDemo_iOS/VideoModel.h deleted file mode 100644 index e1a3e72b..00000000 --- a/JSONModelDemo_iOS/VideoModel.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// VideoModel.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -#import "VideoLink.h" -#import "VideoTitle.h" - -@interface VideoModel : JSONModel - --(id)initWithDictionary:(NSDictionary*)d error:(NSError *__autoreleasing *)err; - -@property (strong, nonatomic) VideoTitle* title; -@property (strong, nonatomic) VideoLink* link; - -@end diff --git a/JSONModelDemo_iOS/VideoModel.m b/JSONModelDemo_iOS/VideoModel.m deleted file mode 100644 index a48d0882..00000000 --- a/JSONModelDemo_iOS/VideoModel.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// VideoModel.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "VideoModel.h" - -@implementation VideoModel - --(id)initWithDictionary:(NSDictionary*)d error:(NSError *__autoreleasing *)err -{ - self = [super init]; - - if (self) { - self.title = [[VideoTitle alloc] initWithDictionary: d[@"title"] error:err]; - if (!self.title) return nil; - - self.link = [[VideoLink alloc] initWithDictionary: d[@"link"][0] error:err]; - if (!self.link) return nil; - } - - return self; -} - -@end diff --git a/JSONModelDemo_iOS/VideoTitle.h b/JSONModelDemo_iOS/VideoTitle.h deleted file mode 100644 index 4a24ed13..00000000 --- a/JSONModelDemo_iOS/VideoTitle.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// VideoTitle.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "JSONModel.h" - -@interface VideoTitle : JSONModel - -@property (strong, nonatomic) NSString* $t; - -@end diff --git a/JSONModelDemo_iOS/VideoTitle.m b/JSONModelDemo_iOS/VideoTitle.m deleted file mode 100644 index 7a27aac0..00000000 --- a/JSONModelDemo_iOS/VideoTitle.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// VideoTitle.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "VideoTitle.h" - -@implementation VideoTitle - -@end diff --git a/JSONModelDemo_iOS/YouTubeViewController.h b/JSONModelDemo_iOS/YouTubeViewController.h deleted file mode 100644 index 1f3c75d6..00000000 --- a/JSONModelDemo_iOS/YouTubeViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// YouTubeViewController.h -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import - -@interface YouTubeViewController : UIViewController - -@end diff --git a/JSONModelDemo_iOS/YouTubeViewController.m b/JSONModelDemo_iOS/YouTubeViewController.m deleted file mode 100644 index 39608d4e..00000000 --- a/JSONModelDemo_iOS/YouTubeViewController.m +++ /dev/null @@ -1,96 +0,0 @@ -// -// YouTubeViewController.m -// JSONModelDemo -// -// Created by Marin Todorov on 02/12/2012. -// Copyright (c) 2012 Underplot ltd. All rights reserved. -// - -#import "YouTubeViewController.h" -#import "VideoModel.h" -#import "HUD.h" - -@interface YouTubeViewController () -{ - IBOutlet UITableView *table; - NSArray* items; -} - -@end - -@implementation YouTubeViewController - --(void)viewDidAppear:(BOOL)animated -{ - self.title = @"Youtube video search"; - [HUD showUIBlockingIndicatorWithText:@"Fetching JSON"]; - - //1 - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - //code executed in the background - //2 - NSData* ytData = [NSData dataWithContentsOfURL: - [NSURL URLWithString:@"http://gdata.youtube.com/feeds/api/videos?q=pomplamoose&max-results=50&alt=json"] - ]; - //3 - NSDictionary* json = [NSJSONSerialization - JSONObjectWithData:ytData - options:kNilOptions - error:nil]; - - //4 - dispatch_async(dispatch_get_main_queue(), ^{ - //code executed on the main queue - //5 - - items = [VideoModel arrayOfModelsFromDictionaries: - json[@"feed"][@"entry"] - ]; - - [HUD hideUIBlockingIndicator]; - - if (items) { - [table reloadData]; - } else { - [HUD showAlertWithTitle:@"Error" text:@"Sorry, invalid JSON data"]; - } - }); - - }); -} - -#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.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - } - - VideoModel* video = items[indexPath.row]; - cell.textLabel.text = video.title.$t; - - return cell; -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [table deselectRowAtIndexPath:indexPath animated:YES]; - - VideoModel* video = items[indexPath.row]; - [[UIApplication sharedApplication] openURL: video.link.href]; -} - - -@end diff --git a/JSONModelDemo_iOS/YouTubeViewController.xib b/JSONModelDemo_iOS/YouTubeViewController.xib deleted file mode 100644 index 87a68306..00000000 --- a/JSONModelDemo_iOS/YouTubeViewController.xib +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/JSONModelDemo_iOS/btnCheck.png b/JSONModelDemo_iOS/btnCheck.png deleted file mode 100644 index fbab71dd..00000000 Binary files a/JSONModelDemo_iOS/btnCheck.png and /dev/null differ diff --git a/JSONModelDemo_iOS/btnCheck@2x.png b/JSONModelDemo_iOS/btnCheck@2x.png deleted file mode 100644 index 1071f3eb..00000000 Binary files a/JSONModelDemo_iOS/btnCheck@2x.png and /dev/null differ 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 47496393..00000000 --- a/JSONModelDemo_iOS/en.lproj/MasterViewController.xib +++ /dev/null @@ -1,27 +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/JSONModelDemos.xcworkspace/contents.xcworkspacedata b/JSONModelDemos.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 38b606ac..00000000 --- a/JSONModelDemos.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout b/JSONModelDemos.xcworkspace/xcshareddata/JSONModelDemos.xccheckout deleted file mode 100644 index c4f47edf..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/icanzilb/JSONModel.git - - IDESourceControlProjectPath - JSONModelDemos.xcworkspace - IDESourceControlProjectRelativeInstallPathDictionary - - 2454A7C0A4BC2A09472718EB55354F320600B245 - .. - - IDESourceControlProjectURL - https://github.com/icanzilb/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-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 18753b14..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 2d0fe33c..00000000 --- a/JSONModelOSX/ViewController.m +++ /dev/null @@ -1,215 +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" - -//youtube models -#import "VideoLink.h" -#import "VideoTitle.h" -#import "VideoModel.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 kServiceYoutube: - { - if (row>=videos.count) return nil; - - VideoModel* video = videos[row]; - NSString* message = [NSString stringWithFormat:@"%@", - video.title.$t - ]; - 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 kServiceYoutube: - return videos.count; - break; - case kServiceGithub: - return items.count; - break; - default: - return 0; - break; - } -} - -- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(NSInteger)rowIndex -{ - switch (currentService) { - case kServiceYoutube: - { - VideoModel* video = videos[rowIndex]; - [[NSWorkspace sharedWorkspace] openURL:video.link.href]; - - } break; - - 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]; - - kiva = [[KivaFeed alloc] initFromURLWithString:@"http://api.kivaws.org/v1/loans/search.json?status=fundraising" - 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)actionYoutube:(id)sender -{ - currentService = kServiceYoutube; - [self setLoaderVisible:YES]; - - [JSONHTTPClient getJSONFromURLWithString:@"http://gdata.youtube.com/feeds/api/videos?q=pomplamoose&max-results=50&alt=json" - completion:^(NSDictionary *json, JSONModelError *e) { - - videos = [VideoModel arrayOfModelsFromDictionaries: - json[@"feed"][@"entry"] - ]; - [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]; - - user = [[GitHubUserModel alloc] initFromURLWithString:@"https://api.github.com/users/icanzilb" - 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 74f1e59b..00000000 --- a/JSONModelOSX/ViewController.xib +++ /dev/null @@ -1,1043 +0,0 @@ - - - - 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/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 557fab51..00000000 --- a/JSONModelOSX/en.lproj/MainMenu.xib +++ /dev/null @@ -1,4666 +0,0 @@ - - - - 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 - - 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); -} 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 diff --git a/README.md b/README.md index 996fe0f9..67089d95 100644 --- a/README.md +++ b/README.md @@ -1,527 +1,395 @@ -## Magical Data Modelling Framework for JSON +# JSONModel - Magical Data Modeling Framework for JSON -### Version 1.0.2 +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. -#####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. +See [CHANGELOG.md](CHANGELOG.md) for details on changes. ---- -If you like JSONModel and use it, could you please: +## Installation - * star this repo - - * send me some feedback. Thanks! - ---- - -![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. - -[![](http://www.touch-code-magazine.com/img/json.png)](http://www.touch-code-magazine.com/img/json.png) - - ------------------------------------- -Adding JSONModel to your project -==================================== - -#### Requirements - -* ARC only; iOS 5.0+ / OSX 10.7+ -* **SystemConfiguration.framework** - -#### 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 -2. Copy the JSONModel sub-folder into your Xcode project -3. Link your app to SystemConfiguration.framework - -#### or 2) via Cocoa pods - -In your project's **Podfile** add the JSONModel pod: +### CocoaPods ```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). - -#### Source code documentation -The source code includes class docs, which you can build yourself and import into Xcode: -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. +### Carthage ------------------------------------- -Basic usage -==================================== - -Consider you have a JSON like this: -```javascript -{"id":"10", "country":"Germany", "dialCode": 49, "isInEurope":true} +```ruby +github "jsonmodel/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: +### Manual -```objective-c -#import "JSONModel.h" +0. download the JSONModel repository +0. copy the JSONModel sub-folder into your Xcode project +0. link your app to SystemConfiguration.framework -@interface CountryModel : JSONModel +## Basic Usage -@property (assign, nonatomic) int id; -@property (strong, nonatomic) NSString* country; -@property (strong, nonatomic) NSString* dialCode; -@property (assign, nonatomic) BOOL isInEurope; +Consider you have JSON like this: -@end +```json +{ "id": 10, "country": "Germany", "dialCode": 49, "isInEurope": true } ``` -There's no need to do anything in the **.m** file. - * Initialize your model with data: - -```objective-c -#import "CountryModel.h" -... - -NSString* json = (fetch here JSON from Internet) ... -NSError* err = nil; -CountryModel* country = [[CountryModel alloc] initWithString:json error:&err]; +- 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 ``` -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: +There's no need to do anything in the implementation (`.m`) file. -* 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 +- initialize your model with data: -And the good news is all you had to do is define the properties and their expected types. - -------- -#### Online tutorials +```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: -Official website: [http://www.jsonmodel.com](http://www.jsonmodel.com) +- 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 -Class docs online: [http://jsonmodel.com/docs/](http://jsonmodel.com/docs/) +All you have to do is define the properties and their expected types. -Step-by-step tutorials: +## Examples - * [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/) +### Automatic name based mapping - * [Performance optimisation for working with JSON feeds via JSONModel](http://www.touch-code-magazine.com/performance-optimisation-for-working-with-json-feeds-via-jsonmodel/) +```json +{ + "id": 123, + "name": "Product name", + "price": 12.95 +} +``` - * [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/) +```objc +@interface ProductModel : JSONModel +@property (nonatomic) NSInteger id; +@property (nonatomic) NSString *name; +@property (nonatomic) float price; +@end +``` -------- -Examples -======= +### Model cascading (models including other models) -#### Automatic name based mapping - - - - - -
-
+```json
 {
-  "id": "123",
-  "name": "Product name",
-  "price": 12.95
+	"orderId": 104,
+	"totalPrice": 13.45,
+	"product": {
+		"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) - - - - - -
-
-{
-  "order_id": 104,
-  "total_price": 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;
+@property (nonatomic) NSInteger orderId;
+@property (nonatomic) float totalPrice;
+@property (nonatomic) ProductModel *product;
 @end
+```
 
-@implementation OrderModel
-@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
+```
+
+```objc
+@protocol ProductModel;
 
 @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
+@interface OrderModel : JSONModel
+@property (nonatomic) NSInteger orderId;
+@property (nonatomic) float totalPrice;
+@property (nonatomic) NSArray  *products;
 @end
+```
+
+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 (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
-
-
- -#### Key mapping - - - - - -
-
+### 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] initWithDictionary:@{
-    @"order_id": @"id",
-    @"order_details.name": @"productName",
-    @"order_details.price.usd": @"price"
-  }];
+	return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{
+		@"id": @"orderId",
+		@"productName": @"orderDetails.name",
+		@"price": @"orderDetails.price.usd"
+	}];
 }
 
 @end
-
-
- -#### 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 - - - - - -
-
+```
+
+### 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
 }
-
-
-
-@interface ProductModel : JSONModel
-@property (assign, nonatomic) int id;
-@property (strong, nonatomic) NSString<Ignore>* customProperty;
-@end
+```
 
-@implementation ProductModel
+```objc
+@interface ProductModel : JSONModel
+@property (nonatomic) NSInteger id;
+@property (nonatomic) NSString  *customProperty;
 @end
-
-
+``` +### Making scalar types optional -#### Make all model properties optional (avoid if possible) - - - - -
-
-@implementation ProductModel
-+(BOOL)propertyIsOptional:(NSString*)propertyName
+```json
 {
-  return YES;
-}
+	"id": null
+}
+```
+
+```objc
+@interface ProductModel : JSONModel
+@property (nonatomic) NSInteger id;
 @end
-
-
+@implementation ProductModel -#### Lazy convert collection items from dictionaries to models - - - - - -
-
++ (BOOL)propertyIsOptional:(NSString *)propertyName
 {
-  "order_id": 104,
-  "total_price": 103.45,
-  "products" : [
-    {
-      "id": "123",
-      "name": "Product #1",
-      "price": 12.95
-    },
-    {
-      "id": "137",
-      "name": "Product #2",
-      "price": 82.95
-    }
-  ]
+	if ([propertyName isEqualToString:@"id"])
+		return YES;
+
+	return NO;
 }
-
-
-
-@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
+### Export model to `NSDictionary` or JSON
 
-@interface OrderModel : JSONModel
-@property (assign, nonatomic) int order_id;
-@property (assign, nonatomic) float total_price;
-@property (strong, nonatomic) NSArray<ProductModel, ConvertOnDemand>* products;
-@end
+```objc
+ProductModel *pm = [ProductModel new];
+pm.name = @"Some Name";
 
-@implementation OrderModel
-@end
-
-
- -#### 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 ... - - }]; +// convert to dictionary +NSDictionary *dict = [pm toDictionary]; + +// convert to json +NSString *string = [pm toJSONString]; ``` -#### Export model to NSDictionary or to JSON text +### Custom data transformers -```objective-c +```objc +@interface JSONValueTransformer (CustomTransformer) +@end -ProductModel* pm = [[ProductModel alloc] initWithString:jsonString error:nil]; -pm.name = @"Changed Name"; +@implementation JSONValueTransformer (CustomTransformer) -//convert to dictionary -NSDictionary* dict = [pm toDictionary]; +- (NSDate *)NSDateFromNSString:(NSString *)string +{ + NSDateFormatter *formatter = [NSDateFormatter new]; + formatter.dateFormat = APIDateFormat; + return [formatter dateFromString:string]; +} -//convert to text -NSString* string = [pm toJSONString]; +- (NSString *)JSONObjectFromNSDate:(NSDate *)date +{ + NSDateFormatter *formatter = [NSDateFormatter new]; + formatter.dateFormat = APIDateFormat; + return [formatter stringFromDate:date]; +} +@end ``` -#### Custom data transformers +### Custom getters/setters -```objective-c +```objc +@interface ProductModel : JSONModel +@property (nonatomic) NSInteger id; +@property (nonatomic) NSString *name; +@property (nonatomic) float price; +@property (nonatomic) NSLocale *locale; +@end -@implementation JSONValueTransformer (CustomTransformer) +@implementation ProductModel -- (NSDate *)NSDateFromNSString:(NSString*)string { - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - [formatter setDateFormat:APIDateFormat]; - return [formatter dateFromString:string]; +- (void)setLocaleWithNSString:(NSString *)string +{ + self.locale = [NSLocale localeWithLocaleIdentifier:string]; } -- (NSString *)JSONObjectFromNSDate:(NSDate *)date { - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - [formatter setDateFormat:APIDateFormat]; - return [formatter stringFromDate:date]; +- (void)setLocaleWithNSDictionary:(NSDictionary *)dictionary +{ + self.locale = [NSLocale localeWithLocaleIdentifier:dictionary[@"identifier"]]; } -@end +- (NSString *)JSONObjectForLocale +{ + return self.locale.localeIdentifier; +} +@end ``` -* json validation -* error handling -* custom data validation -* automatic compare and equality features -* and more. +### Custom JSON validation + +```objc + +@interface ProductModel : JSONModel +@property (nonatomic) NSInteger id; +@property (nonatomic) NSString *name; +@property (nonatomic) float price; +@property (nonatomic) NSLocale *locale; +@property (nonatomic) NSNumber *minNameLength; +@end -------- +@implementation ProductModel -Misc -======= +- (BOOL)validate:(NSError **)error +{ + if (![super validate:error]) + return NO; -Author: [Marin Todorov](http://www.touch-code-magazine.com) + if (self.name.length < self.minNameLength.integerValue) + { + *error = [NSError errorWithDomain:@"me.mycompany.com" code:1 userInfo:nil]; + return NO; + } -Contributors: Christian Hoffmann, Mark Joslin, Julien Vignali, Symvaro GmbH, BB9z. -Also everyone who did successful [pull requests](https://github.com/icanzilb/JSONModel/graphs/contributors). + return YES; +} -Change log : [https://github.com/icanzilb/JSONModel/blob/master/Changelog.md](https://github.com/icanzilb/JSONModel/blob/master/Changelog.md) +@end +``` -------- -#### License -This code is distributed under the terms and conditions of the MIT license. +## License -------- -#### Contribution guidelines +MIT licensed - see [LICENSE](LICENSE) file. -**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 +We love pull requests! See [CONTRIBUTING.md](CONTRIBUTING.md) for full details. diff --git a/Repo.md b/Repo.md deleted file mode 100644 index 4aaabb0f..00000000 --- a/Repo.md +++ /dev/null @@ -1,34 +0,0 @@ -Since JSONModel is becoming more and more popular I need to set some ground rules. - -Reporting an issue on GitHub -==================================== - ------------------------------------- - -#### What to report? - -Be sure you are reporting either 1) a bug you have discovered or 2) a feature request. - -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. - -Long story short - make sure you are reporting something and not just asking how this or that is done. - - -#### How to report a problem/request a feature? - -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. - -I need to be able to **reproduce the problem** in order to fix it. - -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. - - -#### In case you need help with your code/models … - -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. - -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**. - diff --git a/gendoc b/gendoc deleted file mode 100755 index ff208d47..00000000 --- a/gendoc +++ /dev/null @@ -1 +0,0 @@ -appledoc --project-name "JSONModel 1.0.2" --project-company "Marin Todorov, Underplot" --company-id com.underplot --output ~/help --no-create-docset --explicit-crossref JSONModel