├── .swift-version ├── Cartfile ├── Cartfile.resolved ├── AlamofireJsonToObjects.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcshareddata │ └── xcschemes │ │ ├── AlamofireJsonToObjects OSX.xcscheme │ │ ├── AlamofireJsonToObjects iOS.xcscheme │ │ ├── AlamofireJsonToObjectsTests.xcscheme │ │ └── AlamofireJsonToObjectsTestsOSX.xcscheme └── project.pbxproj ├── ISSUE_TEMPLATE.md ├── AlamofireJsonToObjects.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ ├── AlamofireJsonToObjects.xccheckout │ └── AlamofireJsonToObjects.xcscmblueprint ├── AlamofireJsonToObjectsTests ├── sample_array_json ├── sample_json ├── ios-Info.plist ├── osx-Info.plist ├── NestedGenericsIssue25_json ├── AlamofireJsonToObjectsExternalTests.swift ├── ArrayConversionIssue.swift ├── NestedGenericsIssue25.swift ├── ArrayConversionIssue_json ├── sample_users_array_json └── AlamofireJsonToObjectsTests.swift ├── .travis.yml ├── Podfile ├── AlamofireJsonToObjects ├── AlamofireJsonToObjects.h └── AlamofireJsonToObjects.swift ├── .gitignore ├── Podfile.lock ├── LICENSE ├── AlamofireJsonToObjects.podspec └── README.md /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "Alamofire/Alamofire" 2 | github "evermeer/EVReflection" 3 | 4 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "Alamofire/Alamofire" "3.2.0" 2 | github "evermeer/EVReflection" "2.18.0" 3 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | Both AlamofireJsonToObjects and AlamofireXmlToObjects are moved into EVReflection. 3 | You can use these by puting this in your podfile: 4 | 5 | pod 'EVReflection/Alamofire' 6 | 7 | There are now also sub specs for Moya, RxSwift and ReactiveSwift 8 | 9 | 10 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/sample_array_json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "conditions": "Partly cloudy", 4 | "day" : "Monday", 5 | "temperature": 20 6 | }, 7 | { 8 | "conditions": "Showers", 9 | "day" : "Tuesday", 10 | "temperature": 22 11 | }, 12 | { 13 | "conditions": "Sunny", 14 | "day" : "Wednesday", 15 | "temperature": 28 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | podfile: Podfile 3 | osx_image: xcode8 4 | 5 | before_install: 6 | - gem install cocoapods 7 | - export LANG=en_US.UTF-8 8 | - brew update 9 | - if brew outdated | grep -qx xctool; then brew upgrade xctool; fi 10 | - pod install 11 | 12 | script: 13 | - xctool clean build -workspace AlamofireJsonToObjects.xcworkspace -scheme AlamofireJsonToObjectsTests -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO 14 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/sample_json: -------------------------------------------------------------------------------- 1 | { 2 | "location": "Toronto, Canada", 3 | "three_day_forecast": [ 4 | { 5 | "conditions": "Partly cloudy", 6 | "day" : "Monday", 7 | "temperature": 20 8 | }, 9 | { 10 | "conditions": "Showers", 11 | "day" : "Tuesday", 12 | "temperature": 22 13 | }, 14 | { 15 | "conditions": "Sunny", 16 | "day" : "Wednesday", 17 | "temperature": 28 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | use_frameworks! 3 | 4 | target 'AlamofireJsonToObjectsTests' do 5 | platform :ios, '9.0' 6 | pod 'EVReflection', :git => 'https://github.com/evermeer/EVReflection.git' 7 | pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git' 8 | end 9 | 10 | target 'AlamofireJsonToObjectsTestsOSX' do 11 | platform :osx, '10.11' 12 | pod 'EVReflection', :git => 'https://github.com/evermeer/EVReflection.git' 13 | pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git' 14 | end 15 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects/AlamofireJsonToObjects.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlamofireJsonToObjects.h 3 | // AlamofireJsonToObjects 4 | // 5 | // Created by David Wu on 2/19/16. 6 | // Copyright © 2016 evict. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for AlamofireJsonToObjects. 12 | FOUNDATION_EXPORT double AlamofireJsonToObjectsVersionNumber; 13 | 14 | //! Project version string for AlamofireJsonToObjects. 15 | FOUNDATION_EXPORT const unsigned char AlamofireJsonToObjectsVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | Pods/ 27 | 28 | # Carthage 29 | # 30 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 31 | # Carthage/Checkouts 32 | Carthage/Build 33 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/ios-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/osx-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.4.0) 3 | - EVReflection (4.4.1): 4 | - EVReflection/Core (= 4.4.1) 5 | - EVReflection/Core (4.4.1) 6 | 7 | DEPENDENCIES: 8 | - Alamofire (from `https://github.com/Alamofire/Alamofire.git`) 9 | - EVReflection (from `https://github.com/evermeer/EVReflection.git`) 10 | 11 | EXTERNAL SOURCES: 12 | Alamofire: 13 | :git: https://github.com/Alamofire/Alamofire.git 14 | EVReflection: 15 | :git: https://github.com/evermeer/EVReflection.git 16 | 17 | CHECKOUT OPTIONS: 18 | Alamofire: 19 | :commit: b03b43cc381ec02eb9855085427186ef89055eef 20 | :git: https://github.com/Alamofire/Alamofire.git 21 | EVReflection: 22 | :commit: 4a228d9995625bc4fa719901519a502833f1a371 23 | :git: https://github.com/evermeer/EVReflection.git 24 | 25 | SPEC CHECKSUMS: 26 | Alamofire: 4c2bf7fa03c4a626163606de0a417568c270575e 27 | EVReflection: c6afc215ed19c9d1cc204c0d970ead9657dd5937 28 | 29 | PODFILE CHECKSUM: b23d0f295b1db58b718a1a6c6d39516f37f4e932 30 | 31 | COCOAPODS: 1.2.0 32 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/NestedGenericsIssue25_json: -------------------------------------------------------------------------------- 1 | { 2 | "success":true, 3 | "reason":"OK", 4 | "content":[ 5 | { 6 | "total":1, 7 | "per_page":15, 8 | "current_page":1, 9 | "last_page":1, 10 | "next_page_url":null, 11 | "prev_page_url":null, 12 | "from":1, 13 | "to":1, 14 | "data":[ 15 | { 16 | "id":1, 17 | "newsTypeId":"2", 18 | "newsOrder":"0", 19 | "isCommentActive":"1", 20 | "placeTypeId":"1", 21 | "link":"11111", 22 | "title":"22222", 23 | "description":"33333", 24 | "pubDate":"", 25 | "imageUrl":"uploads\/74d41d1a8b39541ce2e7b6fc1f844ef0_04_IP-MAN-3_Courtesy-of-Well-Go-USA_0-752x440.jpg", 26 | "imageThumUrl":"", 27 | "appId":"1", 28 | "projectId":"1", 29 | "isValid":"1", 30 | "created_at":"2016-06-29 12:15:23", 31 | "updated_at":"2016-06-29 12:15:23" 32 | } 33 | ] 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT 3 License 2 | 3 | Copyright (c) 2015, EVICT B.V. 4 | All rights reserved. 5 | http://evict.nl, mailto://edwin@evict.nl 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of EVICT B.V. nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects.xcworkspace/xcshareddata/AlamofireJsonToObjects.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 41F844AD-AE84-4A13-9F0B-546D079DE9F0 9 | IDESourceControlProjectName 10 | AlamofireJsonToObjects 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 2610CEC535D215E472B67F0331FC31EA5E7AA5A7 14 | https://github.com/evermeer/AlamofireJsonToObjects.git 15 | 16 | IDESourceControlProjectPath 17 | AlamofireJsonToObjects.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 2610CEC535D215E472B67F0331FC31EA5E7AA5A7 21 | .. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/evermeer/AlamofireJsonToObjects.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 2610CEC535D215E472B67F0331FC31EA5E7AA5A7 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 2610CEC535D215E472B67F0331FC31EA5E7AA5A7 36 | IDESourceControlWCCName 37 | AlamofireJsonToObjects 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects.xcworkspace/xcshareddata/AlamofireJsonToObjects.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "2610CEC535D215E472B67F0331FC31EA5E7AA5A7", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "2610CEC535D215E472B67F0331FC31EA5E7AA5A7" : 0, 8 | "C340B50EE85733D3EA247F313D2350126F116920" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "41F844AD-AE84-4A13-9F0B-546D079DE9F0", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "2610CEC535D215E472B67F0331FC31EA5E7AA5A7" : "AlamofireJsonToObjects\/", 13 | "C340B50EE85733D3EA247F313D2350126F116920" : "EVReflection\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "AlamofireJsonToObjects", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "AlamofireJsonToObjects.xcworkspace", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/evermeer\/AlamofireJsonToObjects.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "2610CEC535D215E472B67F0331FC31EA5E7AA5A7" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/evermeer\/EVReflection.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "C340B50EE85733D3EA247F313D2350126F116920" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /AlamofireJsonToObjects.xcodeproj/xcshareddata/xcschemes/AlamofireJsonToObjects OSX.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects.xcodeproj/xcshareddata/xcschemes/AlamofireJsonToObjects iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/AlamofireJsonToObjectsExternalTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AlamofireJsonToObjectsExternalTests.swift 3 | // AlamofireJsonToObjects 4 | // 5 | // Created by Edwin Vermeer on 6/30/15. 6 | // Copyright (c) 2015 evict. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Alamofire 11 | import EVReflection 12 | 13 | class User: EVObject { 14 | var id: Int = 0 15 | var name: String? 16 | var username: String? 17 | var email: String? 18 | var address: Address? 19 | var phone: String? 20 | var website: String? 21 | var company: Company? 22 | 23 | 24 | } 25 | 26 | class Address: EVObject { 27 | var street: String? 28 | var suite: String? 29 | var city: String? 30 | var zipcode: String? 31 | var geo: Geo? 32 | } 33 | 34 | class Company: EVObject { 35 | var name: String? 36 | var catchPhrase: String? 37 | var bs: String? 38 | } 39 | 40 | class Geo: EVObject { 41 | var lat: String? 42 | var lng: String? 43 | } 44 | 45 | class AlamofireJsonToObjectsExternalTests: XCTestCase { 46 | override func setUp() { 47 | super.setUp() 48 | // Put setup code here. This method is called before the invocation of each test method in the class. 49 | EVReflection.setBundleIdentifier(User.self) 50 | } 51 | 52 | override func tearDown() { 53 | // Put teardown code here. This method is called after the invocation of each test method in the class. 54 | super.tearDown() 55 | } 56 | 57 | func testResponseObject() { 58 | let URL:URLConvertible = "http://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/master/AlamofireJsonToObjectsTests/sample_users_array_json" 59 | let exp = expectation(description: "\(URL)") 60 | 61 | Alamofire.request(URL) 62 | .responseArray { (response: DataResponse<[User]>) in 63 | exp.fulfill() 64 | 65 | if let result = response.result.value { 66 | print("\(result.description)") 67 | 68 | XCTAssertTrue(result.count == 10, "We should have 10 users") 69 | 70 | if result.count > 2 { 71 | let testUser:User = result[2] 72 | XCTAssertTrue(testUser.id == 3, "3rd user id should be 3") 73 | XCTAssertTrue(testUser.name == "Clementine Bauch", "3rd user name should be Clementine Bauch") 74 | 75 | if let address:Address = testUser.address { 76 | XCTAssertTrue(address.street == "Douglas Extension", "3rd user address street should be Douglas Extension") 77 | XCTAssertTrue(address.suite == "Suite 847", "3rd user address suite should be Suite 847") 78 | 79 | if let geo:Geo = address.geo { 80 | XCTAssertTrue(geo.lat == "-68.6102", "3rd user address geo lat should be -68.6102") 81 | XCTAssertTrue(geo.lng == "-47.0653", "3rd user address geo lat should be -47.0653") 82 | } 83 | } else { 84 | XCTFail("No 3rd user address in response") 85 | } 86 | } 87 | } 88 | } 89 | waitForExpectations(timeout: 10) { error in 90 | XCTAssertNil(error, "\(error)") 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 4 | # 5 | # These will help people to find your library, and whilst it 6 | # can feel like a chore to fill in it's definitely to your advantage. The 7 | # summary should be tweet-length, and the description more in depth. 8 | # 9 | 10 | s.name = "AlamofireJsonToObjects" 11 | s.version = "2.4.1" 12 | s.summary = "An Alamofire extension which converts JSON response data into swift objects using EVReflection" 13 | s.description = "An Alamofire extension which converts JSON response data into swift objects using EVReflection. " 14 | s.homepage = "https://github.com/evermeer/AlamofireJsonToObjects" 15 | 16 | 17 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 18 | # 19 | # Licensing your code is important. See http://choosealicense.com for more info. 20 | # CocoaPods will detect a license file if there is a named LICENSE* 21 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 22 | # 23 | 24 | s.license = { :type => "MIT", :file => "LICENSE" } 25 | 26 | 27 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 28 | # 29 | # Specify the authors of the library, with email addresses. Email addresses 30 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 31 | # accepts just a name if you'd rather not provide an email address. 32 | # 33 | # Specify a social_media_url where others can refer to, for example a twitter 34 | # profile URL. 35 | # 36 | 37 | s.author = "evermeer" 38 | s.authors = { 'Edwin Vermeer' => 'edwin@evict.nl' } 39 | s.social_media_url = "https://twitter.com/evermeer" 40 | 41 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 42 | # 43 | # If this Pod runs only on iOS or OS X, then specify the platform and 44 | # the deployment target. You can optionally include the target after the platform. 45 | # 46 | # s.platform = :ios, "8.0" 47 | 48 | # ――― Deployment targets ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 49 | # 50 | # Specify the minimum deployment target 51 | # 52 | s.ios.deployment_target = '8.0' 53 | s.osx.deployment_target = '10.10' 54 | s.tvos.deployment_target = '9.0' 55 | s.watchos.deployment_target = '2.0' 56 | 57 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 58 | # 59 | # Specify the location from where the source should be retrieved. 60 | # Supports git, hg, bzr, svn and HTTP. 61 | # 62 | 63 | s.source = { :git => "https://github.com/evermeer/AlamofireJsonToObjects.git", :tag => s.version.to_s } 64 | 65 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 66 | # 67 | # CocoaPods is smart about how it includes source code. For source files 68 | # giving a folder will include any h, m, mm, c & cpp files. For header 69 | # files it will include any header in the folder. 70 | # Not including the public_header_files will make all headers public. 71 | # 72 | 73 | s.source_files = 'AlamofireJsonToObjects/*' 74 | 75 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 76 | # 77 | # Link your library with frameworks, or libraries. Libraries do not include 78 | # the lib prefix of their name. 79 | # 80 | 81 | s.frameworks = "Foundation" 82 | 83 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 84 | # 85 | # If your library depends on compiler flags you can set them in the xcconfig hash 86 | # where they will only apply to your library. If you depend on other Podspecs 87 | # you can include multiple dependencies to ensure it works. 88 | 89 | s.requires_arc = true 90 | 91 | s.dependency "Alamofire" 92 | s.dependency "EVReflection" 93 | 94 | end 95 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects.xcodeproj/xcshareddata/xcschemes/AlamofireJsonToObjectsTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 55 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 74 | 80 | 81 | 82 | 83 | 85 | 86 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects.xcodeproj/xcshareddata/xcschemes/AlamofireJsonToObjectsTestsOSX.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 55 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 74 | 80 | 81 | 82 | 83 | 85 | 86 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/ArrayConversionIssue.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArrayConversionIssue.swift 3 | // AlamofireJsonToObjects 4 | // 5 | // Created by Edwin Vermeer on 26/09/2016. 6 | // Copyright © 2016 evict. All rights reserved. 7 | // 8 | 9 | 10 | import XCTest 11 | import Alamofire 12 | import EVReflection 13 | 14 | 15 | class ListResponse: EVObject, EVGenericsKVC { 16 | var status : Int = 0 17 | var reason : String = "" 18 | var model : Array = Array() 19 | 20 | override func setValue(_ value: Any!, forUndefinedKey key: String) { 21 | switch key { 22 | case "model": 23 | model = value as! Array 24 | break 25 | default: 26 | print("Missing expected field <\(key)> in list response!") 27 | break 28 | } 29 | } 30 | 31 | func getGenericType() -> NSObject { 32 | return T() 33 | } 34 | 35 | func setGenericValue(_ value: AnyObject!, forUndefinedKey key: String) { 36 | print(key) 37 | } 38 | } 39 | 40 | 41 | class ShoppingList: EVObject { 42 | var id: Int64 = 0 43 | var name: String = "" 44 | var products: [ShoppingListProduct] = [] 45 | } 46 | 47 | class ShoppingListProduct: BaseProduct { 48 | var amount: Int = 0 49 | } 50 | 51 | 52 | enum ProductStatus { 53 | case None 54 | case Visible 55 | } 56 | 57 | class BaseProduct: EVObject { 58 | var id: Int64 = 0 59 | var name: String = "" 60 | var retailPrice: Double = 0.0 61 | var maxOrderAmount: Int = 0 62 | var image: String = "" 63 | var sale: Sale = Sale() 64 | var features: Array = Array() 65 | var status: ProductStatus = .None 66 | var shortDescription: String = "" 67 | var brand: String = "" 68 | 69 | override func setValue(_ value: Any!, forUndefinedKey key: String) { 70 | if key == "status" { 71 | if (value as? String ?? "") == "Visible" { 72 | status = .Visible 73 | } else { 74 | status = .None 75 | } 76 | return 77 | } 78 | print("Key <\(key)> is not defined for sale!") 79 | } 80 | } 81 | 82 | 83 | 84 | class Sale: EVObject, EVArrayConvertable { 85 | var desc: String = "" 86 | var salePercent: String = "" 87 | var salePrice: Double = 0 88 | var amount: Int = 0 89 | var endDate: String = "" 90 | var productIds: [Int] = [] 91 | var images: Array = Array() 92 | 93 | 94 | override func setValue(_ value: Any!, forUndefinedKey key: String) { 95 | switch key { 96 | case "description": 97 | desc = value as! String 98 | break 99 | default: 100 | print("Key <\(key)> is not defined for sale!") 101 | } 102 | } 103 | 104 | func convertArray(_ key: String, array: Any) -> NSArray { 105 | switch key { 106 | case "productIds": 107 | print("\(array)") 108 | default: 109 | break 110 | } 111 | return [] 112 | } 113 | } 114 | 115 | 116 | class ArrayConversionIssue: XCTestCase { 117 | override func setUp() { 118 | super.setUp() 119 | // Put setup code here. This method is called before the invocation of each test method in the class. 120 | EVReflection.setBundleIdentifier(Sale.self) 121 | } 122 | 123 | override func tearDown() { 124 | // Put teardown code here. This method is called after the invocation of each test method in the class. 125 | super.tearDown() 126 | } 127 | 128 | func testResponseObject() { 129 | let URL:URLConvertible = "https://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/Swift3/AlamofireJsonToObjectsTests/ArrayConversionIssue_json" 130 | let exp = expectation(description: "\(URL)") 131 | 132 | Alamofire.request(URL) 133 | .responseObject { (response: DataResponse>) in 134 | exp.fulfill() 135 | 136 | if let result = response.result.value { 137 | print("\(result.description)") 138 | } 139 | } 140 | waitForExpectations(timeout: 10) { error in 141 | XCTAssertNil(error, "\(error)") 142 | } 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/NestedGenericsIssue25.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NestedGenericsIssue25.swift 3 | // AlamofireJsonToObjects 4 | // 5 | // Created by Edwin Vermeer on 8/3/16. 6 | // Copyright © 2016 evict. All rights reserved. 7 | // 8 | 9 | 10 | import XCTest 11 | import Alamofire 12 | import EVReflection 13 | 14 | 15 | class BaseModel: EVObject { 16 | } 17 | 18 | class ResponseModel: EVObject, EVGenericsKVC { 19 | required init() { 20 | super.init() 21 | } 22 | 23 | var success: String? 24 | var reason: String? 25 | var content: [T]? 26 | 27 | internal func setGenericValue(_ value: AnyObject!, forUndefinedKey key: String) { 28 | if(key == "content") { 29 | content = value as? [T] 30 | } 31 | } 32 | 33 | internal func getGenericType() -> NSObject { 34 | return T() as! NSObject 35 | } 36 | } 37 | 38 | 39 | class PagerModel: BaseModel, EVGenericsKVC { 40 | required override init() { 41 | super.init() 42 | } 43 | 44 | var total: String? 45 | var per_page: String? 46 | var current_page: String? 47 | var last_page: String? 48 | var next_page_url: String? 49 | var prev_page_url: String? 50 | var from: String? 51 | var to: String? 52 | var data: [T]? 53 | 54 | internal func setGenericValue(_ value: AnyObject!, forUndefinedKey key: String) { 55 | if(key == "data") { 56 | data = value as? [T] 57 | } 58 | } 59 | 60 | internal func getGenericType() -> NSObject { 61 | return T() as! NSObject 62 | } 63 | } 64 | 65 | class NewsHeader: BaseModel { 66 | var id: String? 67 | var Description: String? 68 | var newsTypeId: String? 69 | var newsOrder: String? 70 | var isCommentActive: String? 71 | var placeTypeId: String? 72 | var link: String? 73 | var title: String? 74 | var pubDate: String? 75 | var imageUrl: String? 76 | var imageThumUrl: String? 77 | var appId: String? 78 | var projectId: String? 79 | var isValid: String? 80 | var created_at: String? 81 | var updated_at: String? 82 | } 83 | 84 | protocol ResponseListener: class { 85 | func onResponseSuccess(result: ResponseModel) 86 | func onResponseFail(error: NSError) 87 | } 88 | 89 | class BaseWebServices : NSObject { 90 | let BASE_URL: String = "http://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/master/AlamofireJsonToObjectsTests/" 91 | var listener: ResponseListener? 92 | 93 | func executeService(serviceUrl: String, parameters: [String: Any]) { 94 | let URL: String = "\(self.BASE_URL)\(serviceUrl)" 95 | 96 | Alamofire.request(URL) //, method: HTTPMethod.get, parameters: parameters, encoding: .UTF8, headers: nil) 97 | .responseObject { (response: DataResponse>) in 98 | switch response.result { 99 | case .success(let result) : 100 | print("result = \(result)") 101 | self.listener?.onResponseSuccess(result: result) 102 | break 103 | case .failure(let error) : 104 | print("error = \(error)") 105 | self.listener?.onResponseFail(error: error as NSError) 106 | break 107 | } 108 | } 109 | } 110 | } 111 | 112 | 113 | 114 | class NewsHeaderService: BaseWebServices>, ResponseListener { 115 | override init() { 116 | super.init() 117 | super.listener = self 118 | executeService(serviceUrl: "NestedGenericsIssue25_json", parameters: ["token": "testtoken"]) 119 | } 120 | 121 | // This initializer is just to let the test continue 122 | var continueTest: (() -> ())? 123 | convenience init(continueTest: @escaping () -> ()) { 124 | self.init() 125 | self.continueTest = continueTest 126 | } 127 | 128 | 129 | func onResponseSuccess(result response: ResponseModel) { 130 | continueTest?() 131 | } 132 | 133 | func onResponseFail(error failMessage: NSError) { 134 | continueTest?() 135 | } 136 | } 137 | 138 | 139 | 140 | class NestedGenericsIssue25: XCTestCase { 141 | override func setUp() { 142 | super.setUp() 143 | // Put setup code here. This method is called before the invocation of each test method in the class. 144 | EVReflection.setBundleIdentifier(BaseModel.self) 145 | } 146 | 147 | override func tearDown() { 148 | // Put teardown code here. This method is called after the invocation of each test method in the class. 149 | super.tearDown() 150 | } 151 | 152 | func testResponseObject() { 153 | let exp = expectation(description: "test") 154 | 155 | let _: NewsHeaderService = NewsHeaderService() { 156 | exp.fulfill() 157 | } 158 | 159 | // Fail if the test takes longer than 10 seconds. 160 | waitForExpectations(timeout: 10) { error in 161 | XCTAssertNil(error, "\(error)") 162 | } 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/ArrayConversionIssue_json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 200, 3 | "reason": "success", 4 | "model": [ 5 | { 6 | "id": 28, 7 | "name": "ff", 8 | "products": [] 9 | }, 10 | { 11 | "id": 27, 12 | "name": "sudgd", 13 | "products": [] 14 | }, 15 | { 16 | "id": 13, 17 | "name": "Testt", 18 | "products": [ 19 | { 20 | "id": 2079, 21 | "name": "Coca Cola", 22 | "shortDescription": "250 g (1 kg = 12,99 €)", 23 | "retailPrice": 1.45, 24 | "brand": "Ülker", 25 | "maxOrderAmount": 10, 26 | "qualityGroup": null, 27 | "features": [ 28 | "Halal", 29 | "Laktosefrei" 30 | ], 31 | "image": "https://files.billa.at/files/artikel/00-74150_01__1200x1200.jpg", 32 | "sale": null, 33 | "status": "VISIBLE", 34 | "amount": 8 35 | }, 36 | { 37 | "id": 3278, 38 | "name": "Nöm Vollmilch 3,5%", 39 | "shortDescription": "250 g (1 kg = 12,99 €)", 40 | "retailPrice": 0.79, 41 | "brand": "Ülker", 42 | "maxOrderAmount": 10, 43 | "qualityGroup": null, 44 | "features": [ 45 | "Halal" 46 | ], 47 | "image": "http://noem.at/media/products/image/15/NOEM_Vollmilch_ESL_500ml_Tetra-Eifel_V2-img.png", 48 | "sale": { 49 | "description": "Falan Filan", 50 | "salePercent": 25, 51 | "salePrice": 5.65346400657789, 52 | "amount": 5, 53 | "endDate": "30.09.2016 23:00", 54 | "productIds": [ 55 | 3278 56 | ], 57 | "images": [] 58 | }, 59 | "status": "VISIBLE", 60 | "amount": 2 61 | }, 62 | { 63 | "id": 3898, 64 | "name": "Türkische Gurken", 65 | "shortDescription": "250 g (1 kg = 12,99 €)", 66 | "retailPrice": 4.38, 67 | "brand": "Ülker", 68 | "maxOrderAmount": 10, 69 | "qualityGroup": null, 70 | "features": [ 71 | "Halal" 72 | ], 73 | "image": "http://www.kalorien-guide.de/images/gurke-kalorien.jpg", 74 | "sale": null, 75 | "status": "HIDDEN", 76 | "amount": 19 77 | }, 78 | { 79 | "id": 3818, 80 | "name": "Orangen 1 kg", 81 | "shortDescription": "250 g (1 kg = 12,99 €)", 82 | "retailPrice": 5, 83 | "brand": "Ülker", 84 | "maxOrderAmount": 10, 85 | "qualityGroup": null, 86 | "features": [ 87 | "Halal" 88 | ], 89 | "image": "http://www.kochform.de/artikelbilder/Orangen_kk.jpg", 90 | "sale": null, 91 | "status": "VISIBLE", 92 | "amount": 1 93 | } 94 | ] 95 | }, 96 | { 97 | "id": 1, 98 | "name": "aaaaa", 99 | "products": [ 100 | { 101 | "id": 2004, 102 | "name": "12 ntm Rouge Pomegranate/Black Currant Sparkling Beverage", 103 | "shortDescription": "250 g (1 kg = 12,99 €)", 104 | "retailPrice": 11.68, 105 | "brand": "Ülker", 106 | "maxOrderAmount": 10, 107 | "qualityGroup": null, 108 | "features": [ 109 | "Halal" 110 | ], 111 | "image": "http://cdn.foodfacts.com/images/products/137213.jpg", 112 | "sale": null, 113 | "status": "VISIBLE", 114 | "amount": 8 115 | }, 116 | { 117 | "id": 3278, 118 | "name": "Nöm Vollmilch 3,5%", 119 | "shortDescription": "250 g (1 kg = 12,99 €)", 120 | "retailPrice": 0.79, 121 | "brand": "Ülker", 122 | "maxOrderAmount": 10, 123 | "qualityGroup": null, 124 | "features": [ 125 | "Halal" 126 | ], 127 | "image": "http://noem.at/media/products/image/15/NOEM_Vollmilch_ESL_500ml_Tetra-Eifel_V2-img.png", 128 | "sale": { 129 | "description": "Falan Filan", 130 | "salePercent": 25, 131 | "salePrice": 5.65346400657789, 132 | "amount": 5, 133 | "endDate": "30.09.2016 23:00", 134 | "productIds": [ 135 | 3278 136 | ], 137 | "images": [] 138 | }, 139 | "status": "VISIBLE", 140 | "amount": 6 141 | }, 142 | { 143 | "id": 3019, 144 | "name": "Red Bull Cola", 145 | "shortDescription": "250 g (1 kg = 12,99 €)", 146 | "retailPrice": 5.16, 147 | "brand": "Ülker", 148 | "maxOrderAmount": 10, 149 | "qualityGroup": null, 150 | "features": [ 151 | "Halal" 152 | ], 153 | "image": "https://files.billa.at/files/artikel/00-905298_01__600x600.jpg", 154 | "sale": null, 155 | "status": "VISIBLE", 156 | "amount": 1 157 | }, 158 | { 159 | "id": 3898, 160 | "name": "Türkische Gurken", 161 | "shortDescription": "250 g (1 kg = 12,99 €)", 162 | "retailPrice": 4.38, 163 | "brand": "Ülker", 164 | "maxOrderAmount": 10, 165 | "qualityGroup": null, 166 | "features": [ 167 | "Halal" 168 | ], 169 | "image": "http://www.kalorien-guide.de/images/gurke-kalorien.jpg", 170 | "sale": null, 171 | "status": "HIDDEN", 172 | "amount": 13 173 | }, 174 | { 175 | "id": 3818, 176 | "name": "Orangen 1 kg", 177 | "shortDescription": "250 g (1 kg = 12,99 €)", 178 | "retailPrice": 5, 179 | "brand": "Ülker", 180 | "maxOrderAmount": 10, 181 | "qualityGroup": null, 182 | "features": [ 183 | "Halal" 184 | ], 185 | "image": "http://www.kochform.de/artikelbilder/Orangen_kk.jpg", 186 | "sale": null, 187 | "status": "VISIBLE", 188 | "amount": 3 189 | } 190 | ] 191 | }, 192 | { 193 | "id": 3, 194 | "name": "Liste 3", 195 | "products": [ 196 | { 197 | "id": 2004, 198 | "name": "12 ntm Rouge Pomegranate/Black Currant Sparkling Beverage", 199 | "shortDescription": "250 g (1 kg = 12,99 €)", 200 | "retailPrice": 11.68, 201 | "brand": "Ülker", 202 | "maxOrderAmount": 10, 203 | "qualityGroup": null, 204 | "features": [ 205 | "Halal" 206 | ], 207 | "image": "http://cdn.foodfacts.com/images/products/137213.jpg", 208 | "sale": null, 209 | "status": "VISIBLE", 210 | "amount": 1 211 | }, 212 | { 213 | "id": 3898, 214 | "name": "Türkische Gurken", 215 | "shortDescription": "250 g (1 kg = 12,99 €)", 216 | "retailPrice": 4.38, 217 | "brand": "Ülker", 218 | "maxOrderAmount": 10, 219 | "qualityGroup": null, 220 | "features": [ 221 | "Halal" 222 | ], 223 | "image": "http://www.kalorien-guide.de/images/gurke-kalorien.jpg", 224 | "sale": null, 225 | "status": "HIDDEN", 226 | "amount": 1 227 | }, 228 | { 229 | "id": 3818, 230 | "name": "Orangen 1 kg", 231 | "shortDescription": "250 g (1 kg = 12,99 €)", 232 | "retailPrice": 5, 233 | "brand": "Ülker", 234 | "maxOrderAmount": 10, 235 | "qualityGroup": null, 236 | "features": [ 237 | "Halal" 238 | ], 239 | "image": "http://www.kochform.de/artikelbilder/Orangen_kk.jpg", 240 | "sale": null, 241 | "status": "VISIBLE", 242 | "amount": 2 243 | }, 244 | { 245 | "id": 3278, 246 | "name": "Nöm Vollmilch 3,5%", 247 | "shortDescription": "250 g (1 kg = 12,99 €)", 248 | "retailPrice": 0.79, 249 | "brand": "Ülker", 250 | "maxOrderAmount": 10, 251 | "qualityGroup": null, 252 | "features": [ 253 | "Halal" 254 | ], 255 | "image": "http://noem.at/media/products/image/15/NOEM_Vollmilch_ESL_500ml_Tetra-Eifel_V2-img.png", 256 | "sale": { 257 | "description": "Falan Filan", 258 | "salePercent": 25, 259 | "salePrice": 5.65346400657789, 260 | "amount": 5, 261 | "endDate": "30.09.2016 23:00", 262 | "productIds": [ 263 | 3278 264 | ], 265 | "images": [] 266 | }, 267 | "status": "VISIBLE", 268 | "amount": 2 269 | } 270 | ] 271 | } 272 | ] 273 | } 274 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/sample_users_array_json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "name": "Leanne Graham", 5 | "username": "Bret", 6 | "email": "Sincere@april.biz", 7 | "address": { 8 | "street": "Kulas Light", 9 | "suite": "Apt. 556", 10 | "city": "Gwenborough", 11 | "zipcode": "92998-3874", 12 | "geo": { 13 | "lat": "-37.3159", 14 | "lng": "81.1496" 15 | } 16 | }, 17 | "phone": "1-770-736-8031 x56442", 18 | "website": "hildegard.org", 19 | "company": { 20 | "name": "Romaguera-Crona", 21 | "catchPhrase": "Multi-layered client-server neural-net", 22 | "bs": "harness real-time e-markets" 23 | } 24 | }, 25 | { 26 | "id": 2, 27 | "name": "Ervin Howell", 28 | "username": "Antonette", 29 | "email": "Shanna@melissa.tv", 30 | "address": { 31 | "street": "Victor Plains", 32 | "suite": "Suite 879", 33 | "city": "Wisokyburgh", 34 | "zipcode": "90566-7771", 35 | "geo": { 36 | "lat": "-43.9509", 37 | "lng": "-34.4618" 38 | } 39 | }, 40 | "phone": "010-692-6593 x09125", 41 | "website": "anastasia.net", 42 | "company": { 43 | "name": "Deckow-Crist", 44 | "catchPhrase": "Proactive didactic contingency", 45 | "bs": "synergize scalable supply-chains" 46 | } 47 | }, 48 | { 49 | "id": 3, 50 | "name": "Clementine Bauch", 51 | "username": "Samantha", 52 | "email": "Nathan@yesenia.net", 53 | "address": { 54 | "street": "Douglas Extension", 55 | "suite": "Suite 847", 56 | "city": "McKenziehaven", 57 | "zipcode": "59590-4157", 58 | "geo": { 59 | "lat": "-68.6102", 60 | "lng": "-47.0653" 61 | } 62 | }, 63 | "phone": "1-463-123-4447", 64 | "website": "ramiro.info", 65 | "company": { 66 | "name": "Romaguera-Jacobson", 67 | "catchPhrase": "Face to face bifurcated interface", 68 | "bs": "e-enable strategic applications" 69 | } 70 | }, 71 | { 72 | "id": 4, 73 | "name": "Patricia Lebsack", 74 | "username": "Karianne", 75 | "email": "Julianne.OConner@kory.org", 76 | "address": { 77 | "street": "Hoeger Mall", 78 | "suite": "Apt. 692", 79 | "city": "South Elvis", 80 | "zipcode": "53919-4257", 81 | "geo": { 82 | "lat": "29.4572", 83 | "lng": "-164.2990" 84 | } 85 | }, 86 | "phone": "493-170-9623 x156", 87 | "website": "kale.biz", 88 | "company": { 89 | "name": "Robel-Corkery", 90 | "catchPhrase": "Multi-tiered zero tolerance productivity", 91 | "bs": "transition cutting-edge web services" 92 | } 93 | }, 94 | { 95 | "id": 5, 96 | "name": "Chelsey Dietrich", 97 | "username": "Kamren", 98 | "email": "Lucio_Hettinger@annie.ca", 99 | "address": { 100 | "street": "Skiles Walks", 101 | "suite": "Suite 351", 102 | "city": "Roscoeview", 103 | "zipcode": "33263", 104 | "geo": { 105 | "lat": "-31.8129", 106 | "lng": "62.5342" 107 | } 108 | }, 109 | "phone": "(254)954-1289", 110 | "website": "demarco.info", 111 | "company": { 112 | "name": "Keebler LLC", 113 | "catchPhrase": "User-centric fault-tolerant solution", 114 | "bs": "revolutionize end-to-end systems" 115 | } 116 | }, 117 | { 118 | "id": 6, 119 | "name": "Mrs. Dennis Schulist", 120 | "username": "Leopoldo_Corkery", 121 | "email": "Karley_Dach@jasper.info", 122 | "address": { 123 | "street": "Norberto Crossing", 124 | "suite": "Apt. 950", 125 | "city": "South Christy", 126 | "zipcode": "23505-1337", 127 | "geo": { 128 | "lat": "-71.4197", 129 | "lng": "71.7478" 130 | } 131 | }, 132 | "phone": "1-477-935-8478 x6430", 133 | "website": "ola.org", 134 | "company": { 135 | "name": "Considine-Lockman", 136 | "catchPhrase": "Synchronised bottom-line interface", 137 | "bs": "e-enable innovative applications" 138 | } 139 | }, 140 | { 141 | "id": 7, 142 | "name": "Kurtis Weissnat", 143 | "username": "Elwyn.Skiles", 144 | "email": "Telly.Hoeger@billy.biz", 145 | "address": { 146 | "street": "Rex Trail", 147 | "suite": "Suite 280", 148 | "city": "Howemouth", 149 | "zipcode": "58804-1099", 150 | "geo": { 151 | "lat": "24.8918", 152 | "lng": "21.8984" 153 | } 154 | }, 155 | "phone": "210.067.6132", 156 | "website": "elvis.io", 157 | "company": { 158 | "name": "Johns Group", 159 | "catchPhrase": "Configurable multimedia task-force", 160 | "bs": "generate enterprise e-tailers" 161 | } 162 | }, 163 | { 164 | "id": 8, 165 | "name": "Nicholas Runolfsdottir V", 166 | "username": "Maxime_Nienow", 167 | "email": "Sherwood@rosamond.me", 168 | "address": { 169 | "street": "Ellsworth Summit", 170 | "suite": "Suite 729", 171 | "city": "Aliyaview", 172 | "zipcode": "45169", 173 | "geo": { 174 | "lat": "-14.3990", 175 | "lng": "-120.7677" 176 | } 177 | }, 178 | "phone": "586.493.6943 x140", 179 | "website": "jacynthe.com", 180 | "company": { 181 | "name": "Abernathy Group", 182 | "catchPhrase": "Implemented secondary concept", 183 | "bs": "e-enable extensible e-tailers" 184 | } 185 | }, 186 | { 187 | "id": 9, 188 | "name": "Glenna Reichert", 189 | "username": "Delphine", 190 | "email": "Chaim_McDermott@dana.io", 191 | "address": { 192 | "street": "Dayna Park", 193 | "suite": "Suite 449", 194 | "city": "Bartholomebury", 195 | "zipcode": "76495-3109", 196 | "geo": { 197 | "lat": "24.6463", 198 | "lng": "-168.8889" 199 | } 200 | }, 201 | "phone": "(775)976-6794 x41206", 202 | "website": "conrad.com", 203 | "company": { 204 | "name": "Yost and Sons", 205 | "catchPhrase": "Switchable contextually-based project", 206 | "bs": "aggregate real-time technologies" 207 | } 208 | }, 209 | { 210 | "id": 10, 211 | "name": "Clementina DuBuque", 212 | "username": "Moriah.Stanton", 213 | "email": "Rey.Padberg@karina.biz", 214 | "address": { 215 | "street": "Kattie Turnpike", 216 | "suite": "Suite 198", 217 | "city": "Lebsackbury", 218 | "zipcode": "31428-2261", 219 | "geo": { 220 | "lat": "-38.2386", 221 | "lng": "57.2232" 222 | } 223 | }, 224 | "phone": "024-648-3804", 225 | "website": "ambrose.net", 226 | "company": { 227 | "name": "Hoeger LLC", 228 | "catchPhrase": "Centralized empowering task-force", 229 | "bs": "target end-to-end models" 230 | } 231 | } 232 | ] -------------------------------------------------------------------------------- /AlamofireJsonToObjects/AlamofireJsonToObjects.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AlamofireJsonToObjects.swift 3 | // AlamofireJsonToObjects 4 | // 5 | // Created by Edwin Vermeer on 6/21/15. 6 | // Copyright (c) 2015 evict. All rights reserved. 7 | // 8 | // This Alamofire DataRequest extension is based on https://github.com/tristanhimmelman/AlamofireObjectMapper 9 | 10 | import Foundation 11 | import EVReflection 12 | import Alamofire 13 | 14 | 15 | open class EVNetworkingObject: EVObject { 16 | override open func initValidation(_ dict: NSDictionary) { 17 | if dict["__response_statusCode"] != nil { 18 | self.addStatusMessage(DeserializationStatus.Custom, message: "HTTP Status = \(dict["__response_statusCode"]!)") 19 | } 20 | } 21 | 22 | override open func propertyMapping() -> [(keyInObject: String?, keyInResource: String?)] { 23 | return [(keyInObject: "__response_statusCode", keyInResource: nil)] 24 | } 25 | } 26 | 27 | 28 | extension DataRequest { 29 | 30 | enum ErrorCode: Int { 31 | case noData = 1 32 | } 33 | 34 | internal static func newError(_ code: ErrorCode, failureReason: String) -> NSError { 35 | let errorDomain = "com.alamofirejsontoobjects.error" 36 | 37 | let userInfo = [NSLocalizedFailureReasonErrorKey: failureReason] 38 | let returnError = NSError(domain: errorDomain, code: code.rawValue, userInfo: userInfo) 39 | 40 | return returnError 41 | } 42 | 43 | internal static func EVReflectionSerializer(_ keyPath: String?, mapToObject object: T? = nil) -> DataResponseSerializer { 44 | return DataResponseSerializer { request, response, data, error in 45 | guard error == nil else { 46 | return .failure(error!) 47 | } 48 | 49 | guard let _ = data else { 50 | let failureReason = "Data could not be serialized. Input data was nil." 51 | let error = newError(.noData, failureReason: failureReason) 52 | return .failure(error) 53 | } 54 | 55 | let jsonResponseSerializer = DataRequest.jsonResponseSerializer(options: .allowFragments) 56 | let result = jsonResponseSerializer.serializeResponse(request, response, data, error) 57 | 58 | var JSONToMap: NSDictionary? 59 | if let keyPath = keyPath , keyPath.isEmpty == false { 60 | JSONToMap = (result.value as AnyObject?)?.value(forKeyPath: keyPath) as? NSDictionary 61 | } else { 62 | JSONToMap = result.value as? NSDictionary 63 | } 64 | if JSONToMap == nil { 65 | JSONToMap = NSDictionary() 66 | } 67 | if response?.statusCode ?? 0 > 300 { 68 | let newDict = NSMutableDictionary(dictionary: JSONToMap!) 69 | newDict["__response_statusCode"] = response?.statusCode ?? 0 70 | JSONToMap = newDict 71 | } 72 | 73 | if object == nil { 74 | let instance: T = T() 75 | let parsedObject: T = ((instance.getSpecificType(JSONToMap!) as? T) ?? instance) 76 | let _ = EVReflection.setPropertiesfromDictionary(JSONToMap!, anyObject: parsedObject) 77 | return .success(parsedObject) 78 | } else { 79 | let _ = EVReflection.setPropertiesfromDictionary(JSONToMap!, anyObject: object!) 80 | return .success(object!) 81 | } 82 | } 83 | } 84 | 85 | /** 86 | Adds a handler to be called once the request has finished. 87 | 88 | - parameter queue: The queue on which the completion handler is dispatched. 89 | - parameter keyPath: The key path where EVReflection mapping should be performed 90 | - parameter object: An object to perform the mapping on to 91 | - parameter completionHandler: A closure to be executed once the request has finished and the data has been mapped by EVReflection. 92 | 93 | - returns: The request. 94 | */ 95 | @discardableResult 96 | open func responseObject(queue: DispatchQueue? = nil, keyPath: String? = nil, mapToObject object: T? = nil, completionHandler: @escaping (DataResponse) -> Void) -> Self { 97 | 98 | let serializer = DataRequest.EVReflectionSerializer(keyPath, mapToObject: object) 99 | return response(queue: queue, responseSerializer: serializer, completionHandler: completionHandler) 100 | } 101 | 102 | 103 | internal static func EVReflectionArraySerializer(_ keyPath: String?, mapToObject object: T? = nil) -> DataResponseSerializer<[T]> { 104 | return DataResponseSerializer { request, response, data, error in 105 | guard error == nil else { 106 | return .failure(error!) 107 | } 108 | 109 | guard let _ = data else { 110 | let failureReason = "Data could not be serialized. Input data was nil." 111 | let error = newError(.noData, failureReason: failureReason) 112 | return .failure(error) 113 | } 114 | 115 | let jsonResponseSerializer = DataRequest.jsonResponseSerializer(options: .allowFragments) 116 | let result = jsonResponseSerializer.serializeResponse(request, response, data, error) 117 | 118 | var JSONToMap: NSArray? 119 | if let keyPath = keyPath, keyPath.isEmpty == false { 120 | JSONToMap = (result.value as AnyObject?)?.value(forKeyPath: keyPath) as? NSArray 121 | } else { 122 | JSONToMap = result.value as? NSArray 123 | } 124 | if JSONToMap == nil { 125 | JSONToMap = NSArray() 126 | } 127 | 128 | if response?.statusCode ?? 0 > 300 { 129 | if JSONToMap?.count ?? 0 > 0 { 130 | let newDict = NSMutableDictionary(dictionary: JSONToMap![0] as? NSDictionary ?? NSDictionary()) 131 | newDict["__response_statusCode"] = response?.statusCode ?? 0 132 | let newArray: NSMutableArray = NSMutableArray(array: JSONToMap!) 133 | newArray.replaceObject(at: 0, with: newDict) 134 | JSONToMap = newArray 135 | } 136 | } 137 | 138 | let parsedObject:[T] = (JSONToMap!).map { 139 | let instance: T = T() 140 | let _ = EVReflection.setPropertiesfromDictionary($0 as? NSDictionary ?? NSDictionary(), anyObject: instance) 141 | return instance 142 | } as [T] 143 | 144 | return .success(parsedObject) 145 | } 146 | } 147 | 148 | /** 149 | Adds a handler to be called once the request has finished. 150 | 151 | - parameter queue: The queue on which the completion handler is dispatched. 152 | - parameter keyPath: The key path where EVReflection mapping should be performed 153 | - parameter object: An object to perform the mapping on to (parameter is not used, only here to make the generics work) 154 | - parameter completionHandler: A closure to be executed once the request has finished and the data has been mapped by EVReflection. 155 | 156 | - returns: The request. 157 | */ 158 | @discardableResult 159 | open func responseArray(queue: DispatchQueue? = nil, keyPath: String? = nil, mapToObject object: T? = nil, completionHandler: @escaping (DataResponse<[T]>) -> Void) -> Self { 160 | let serializer = DataRequest.EVReflectionArraySerializer(keyPath, mapToObject: object) 161 | return response(queue: queue, responseSerializer: serializer, completionHandler: completionHandler) 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AlamofireJsonToObjects 2 | 3 | 🚨 This is now a subspec of **[EVReflection](https://github.com/evermeer/EVReflection/tree/master/Source/Alamofire)** and the code is maintained there. 🚨 4 | 5 | You can install it as a subspec like this: 6 | 7 | ``` 8 | use_frameworks! 9 | pod "EVReflection/Alamofire" 10 | ``` 11 | 12 | Besideds this subspec there are also subspecs for: XML, AlamofireXML, Moya, MoyaRxSwift and MoyaReflectiveSwift 13 | 14 | 15 | 19 | [![Issues](https://img.shields.io/github/issues-raw/evermeer/AlamofireJsonToObjects.svg?style=flat)](https://github.com/evermeer/AlamofireJsonToObjects/issues) 20 | [![Documentation](https://img.shields.io/badge/documented-100%-brightgreen.svg?style=flat)](http://cocoadocs.org/docsets/AlamofireJsonToObjects) 21 | [![Stars](https://img.shields.io/github/stars/evermeer/AlamofireJsonToObjects.svg?style=flat)](https://github.com/evermeer/AlamofireJsonToObjects/stargazers) 22 | [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/matteocrippa/awesome-swift#json) 23 | 24 | [![Version](https://img.shields.io/cocoapods/v/AlamofireJsonToObjects.svg?style=flat)](http://cocoadocs.org/docsets/AlamofireJsonToObjects) 25 | [![Language](https://img.shields.io/badge/language-swift3-f48041.svg?style=flat)](https://developer.apple.com/swift) 26 | [![Platform](https://img.shields.io/cocoapods/p/AlamofireJsonToObjects.svg?style=flat)](http://cocoadocs.org/docsets/AlamofireJsonToObjects) 27 | [![Support](https://img.shields.io/badge/support-iOS%208%2B%20|%20OSX%2010.9+%20|%20WOS%202+-blue.svg?style=flat)](https://www.apple.com/nl/ios/) 28 | [![License](https://img.shields.io/cocoapods/l/AlamofireJsonToObjects.svg?style=flat)](http://cocoadocs.org/docsets/AlamofireJsonToObjects) 29 | 30 | [![Git](https://img.shields.io/badge/GitHub-evermeer-blue.svg?style=flat)](https://github.com/evermeer) 31 | [![Twitter](https://img.shields.io/badge/twitter-@evermeer-blue.svg?style=flat)](http://twitter.com/evermeer) 32 | [![LinkedIn](https://img.shields.io/badge/linkedin-Edwin%20Vermeer-blue.svg?style=flat)](http://nl.linkedin.com/in/evermeer/en) 33 | [![Website](https://img.shields.io/badge/website-evict.nl-blue.svg?style=flat)](http://evict.nl) 34 | [![eMail](https://img.shields.io/badge/email-edwin@evict.nl-blue.svg?style=flat)](mailto:edwin@evict.nl?SUBJECT=About%20AlamofireJsonToObjects) 35 | 36 | If you have a question and don't want to create an issue, then we can [![Join the chat at https://gitter.im/evermeer/EVReflection](https://badges.gitter.im/evermeer/EVReflection.svg)](https://gitter.im/evermeer/EVReflection?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) (EVReflection is the base of AlamofireJsonToObjects) 37 | 38 | With AlamofireJsonToObjects it's extremely easy to fetch a json feed and parse it into objects. No property mapping is required. Reflection is used to put the values in the corresponding properties. 39 | 40 | AlamofireJsonToObjects is based on the folowing libraries: 41 | - [Alamofire](https://github.com/Alamofire/Alamofire) is an elegant HTTP Networking library in Swift 42 | - [EVReflection](https://github.com/evermeer/EVReflection) is used to parse the JSON result to your objects 43 | 44 | This library was greatly inspired by [AlamofireObjectMapper](https://github.com/tristanhimmelman/AlamofireObjectMapper) 45 | 46 | At this moment the master branch is for Swift3. If you want to continue using Swift 2.2 (or 2.3) then switch to the Swift2.2 branch. 47 | Run the tests to see AlamofireJsonToObjects in action. 48 | 49 | ## Using AlamofireJsonToObjects in your own App 50 | 51 | 'AlamofireJsonToObjects' is available through the dependency manager [CocoaPods](http://cocoapods.org). 52 | 53 | You can just add AlamofireJsonToObjects to your workspace by adding the folowing 2 lines to your Podfile: 54 | 55 | ``` 56 | use_frameworks! 57 | pod "AlamofireJsonToObjects" 58 | ``` 59 | 60 | you also have to add an import at the top of your swift file like this: 61 | 62 | ``` 63 | import AlamofireJsonToObjects 64 | ``` 65 | 66 | ## Sample code 67 | 68 | ``` 69 | class WeatherResponse: EVNetworkingObject { 70 | var location: String? 71 | var three_day_forecast: [Forecast] = [Forecast]() 72 | } 73 | 74 | class Forecast: EVNetworkingObject { 75 | var day: String? 76 | var temperature: NSNumber? 77 | var conditions: String? 78 | } 79 | 80 | class AlamofireJsonToObjectsTests: XCTestCase { 81 | func testResponseObject() { 82 | let URL = "https://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/master/AlamofireJsonToObjectsTests/sample_json" 83 | Alamofire.request(URL) 84 | .responseObject { (response: DataResponse) in 85 | if let result = response.result.value { 86 | // That was all... You now have a WeatherResponse object with data 87 | } 88 | } 89 | waitForExpectationsWithTimeout(10, handler: { (error: NSError!) -> Void in 90 | XCTAssertNil(error, "\(error)") 91 | }) 92 | } 93 | } 94 | ``` 95 | 96 | The code above will pass the folowing json to the objects: 97 | 98 | ``` 99 | { "location": "Toronto, Canada", 100 | "three_day_forecast": [ 101 | { "conditions": "Partly cloudy", 102 | "day" : "Monday", 103 | "temperature": 20 104 | }, { 105 | "conditions": "Showers", 106 | "day" : "Tuesday", 107 | "temperature": 22 108 | }, { 109 | "conditions": "Sunny", 110 | "day" : "Wednesday", 111 | "temperature": 28 112 | } 113 | ] 114 | } 115 | ``` 116 | 117 | ## Advanced object mapping 118 | AlamofireJsonToObjects is based on [EVReflection](https://github.com/evermeer/EVReflection) and you can use all [EVReflection](https://github.com/evermeer/EVReflection) features like property mapping, converters, validators and key kleanup. See [EVReflection](https://github.com/evermeer/EVReflection) for more information. 119 | 120 | ## Handling HTTP status >= 300 121 | When a network call returns a [HTTP error status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) (300 or highter) then this will be added to the evReflectionStatuses as a custom error. see the unit test testErrorResponse as a sample. In order to make this work, you do have to set EVNetworkingObject as your bass class and not EVObject. You then also have to be aware that if you override the initValidation or the propertyMapping function, that you also have to call the super for that function. 122 | 123 | 124 | ## License 125 | 126 | AlamofireJsonToObjects is available under the MIT 3 license. See the LICENSE file for more info. 127 | 128 | ## My other libraries: 129 | Also see my other open source iOS libraries: 130 | 131 | - [EVReflection](https://github.com/evermeer/EVReflection) - Swift library with reflection functions with support for NSCoding, Printable, Hashable, Equatable and JSON 132 | - [EVCloudKitDao](https://github.com/evermeer/EVCloudKitDao) - Simplified access to Apple's CloudKit 133 | - [EVFaceTracker](https://github.com/evermeer/EVFaceTracker) - Calculate the distance and angle of your device with regards to your face in order to simulate a 3D effect 134 | - [EVURLCache](https://github.com/evermeer/EVURLCache) - a NSURLCache subclass for handling all web requests that use NSURLReques 135 | - [AlamofireJsonToObject](https://github.com/evermeer/AlamofireJsonToObjects) - An Alamofire extension which converts JSON response data into swift objects using EVReflection 136 | - [AlamofireXmlToObject](https://github.com/evermeer/AlamofireXmlToObjects) - An Alamofire extension which converts XML response data into swift objects using EVReflection and XMLDictionary 137 | - [AlamofireOauth2](https://github.com/evermeer/AlamofireOauth2) - A swift implementation of OAuth2 using Alamofire 138 | - [EVWordPressAPI](https://github.com/evermeer/EVWordPressAPI) - Swift Implementation of the WordPress (Jetpack) API using AlamofireOauth2, AlomofireJsonToObjects and EVReflection (work in progress) 139 | - [PassportScanner](https://github.com/evermeer/PassportScanner) - Scan the MRZ code of a passport and extract the firstname, lastname, passport number, nationality, date of birth, expiration date and personal numer. 140 | -------------------------------------------------------------------------------- /AlamofireJsonToObjectsTests/AlamofireJsonToObjectsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AlamofireJsonToObjectsTests.swift 3 | // AlamofireJsonToObjectsTests 4 | // 5 | // Created by Edwin Vermeer on 6/21/15. 6 | // Copyright (c) 2015 evict. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Alamofire 11 | import EVReflection 12 | 13 | class WeatherResponse: EVNetworkingObject { 14 | var location: String? 15 | var three_day_forecast: [Forecast] = [Forecast]() 16 | } 17 | 18 | class Forecast: EVNetworkingObject { 19 | var day: String? 20 | var temperature: NSNumber? 21 | var conditions: String? 22 | } 23 | 24 | 25 | class AlamofireJsonToObjectsTests: XCTestCase { 26 | 27 | override func setUp() { 28 | super.setUp() 29 | // Put setup code here. This method is called before the invocation of each test method in the class. 30 | EVReflection.setBundleIdentifier(Forecast.self) 31 | } 32 | 33 | override func tearDown() { 34 | // Put teardown code here. This method is called after the invocation of each test method in the class. 35 | super.tearDown() 36 | } 37 | 38 | 39 | func testResponseObject() { 40 | // This is an example of a functional test case. 41 | let URL: URLConvertible = "http://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/master/AlamofireJsonToObjectsTests/sample_json" 42 | let exp = expectation(description: "\(URL)") 43 | 44 | Alamofire.request(URL) 45 | .responseObject { (response: DataResponse) in 46 | 47 | if let result = response.result.value { 48 | print("\(result.description)") 49 | XCTAssertNotNil(result.location, "Location should not be nil") 50 | XCTAssertNotNil(result.three_day_forecast, "ThreeDayForcast should not be nil") 51 | XCTAssertEqual(result.three_day_forecast.count, 3, "ThreeDayForcast should have 2 items.") 52 | for forecast in result.three_day_forecast { 53 | XCTAssertNotNil(forecast.day, "day should not be nil") 54 | XCTAssertNotNil(forecast.conditions, "conditions should not be nil") 55 | XCTAssertNotNil(forecast.temperature, "temperature should not be nil") 56 | } 57 | 58 | } else { 59 | XCTAssert(true, "no result from service") 60 | } 61 | exp.fulfill() 62 | } 63 | 64 | waitForExpectations(timeout: 10) { error in 65 | XCTAssertNil(error, "\(error)") 66 | } 67 | } 68 | 69 | 70 | func testErrorResponse() { 71 | let URL: URLConvertible = "http://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/master/AlamofireJsonToObjectsTests/non_existing_file" 72 | let exp = expectation(description: "\(URL)") 73 | 74 | Alamofire.request(URL) 75 | .responseObject { (response: DataResponse) in 76 | 77 | if let result = response.result.value { 78 | print("\(result.description)") 79 | print("\(result.evReflectionStatuses)") 80 | XCTAssertNotNil(result.evReflectionStatuses.first?.0 == DeserializationStatus.Custom, "A custom validation error should have been added") 81 | XCTAssertNotNil(result.evReflectionStatuses.first?.1 == "HTTP Status = 404", "The custom validation error should be for a 404 HTTP status error") 82 | } else { 83 | XCTAssert(true, "no result from service") 84 | } 85 | exp.fulfill() 86 | } 87 | 88 | waitForExpectations(timeout: 10) { error in 89 | XCTAssertNil(error, "\(error)") 90 | } 91 | } 92 | 93 | 94 | func testResponseObject2() { 95 | // This is an example of a functional test case. 96 | 97 | let exp = expectation(description: "router") 98 | 99 | Alamofire.request(Router.list1()) 100 | .responseObject { (response: DataResponse) in 101 | 102 | if let result = response.result.value { 103 | XCTAssertNotNil(result.location, "Location should not be nil") 104 | XCTAssertNotNil(result.three_day_forecast, "ThreeDayForcast should not be nil") 105 | XCTAssertEqual(result.three_day_forecast.count, 3, "ThreeDayForcast should have 2 items.") 106 | for forecast in result.three_day_forecast { 107 | XCTAssertNotNil(forecast.day, "day should not be nil") 108 | XCTAssertNotNil(forecast.conditions, "conditions should not be nil") 109 | XCTAssertNotNil(forecast.temperature, "temperature should not be nil") 110 | } 111 | } else { 112 | XCTAssert(true, "Could not get result from service") 113 | } 114 | exp.fulfill() 115 | } 116 | 117 | waitForExpectations(timeout: 10) { error in 118 | XCTAssertNil(error, "\(error)") 119 | } 120 | } 121 | 122 | func testResponseObject3() { 123 | // This is an example of a functional test case. 124 | 125 | let URL: URLConvertible = "http://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/master/AlamofireJsonToObjectsTests/sample_json" 126 | let exp = expectation(description: "router") 127 | 128 | Alamofire.request(URL, method: HTTPMethod.get, parameters: nil, encoding: URLEncoding.default, headers: nil) 129 | .responseObject { (response: DataResponse) in 130 | 131 | if let result = response.result.value { 132 | XCTAssertNotNil(result.location, "Location should not be nil") 133 | XCTAssertNotNil(result.three_day_forecast, "ThreeDayForcast should not be nil") 134 | XCTAssertEqual(result.three_day_forecast.count, 3, "ThreeDayForcast should have 2 items.") 135 | for forecast in result.three_day_forecast { 136 | XCTAssertNotNil(forecast.day, "day should not be nil") 137 | XCTAssertNotNil(forecast.conditions, "conditions should not be nil") 138 | XCTAssertNotNil(forecast.temperature, "temperature should not be nil") 139 | } 140 | } else { 141 | XCTAssert(true, "Could not get result from service") 142 | } 143 | exp.fulfill() 144 | } 145 | 146 | waitForExpectations(timeout: 10) { error in 147 | XCTAssertNil(error, "\(error)") 148 | } 149 | } 150 | 151 | func testArrayResponseObject() { 152 | // This is an example of a functional test case. 153 | let URL = "http://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/master/AlamofireJsonToObjectsTests/sample_array_json" 154 | let exp = expectation(description: "\(URL)") 155 | 156 | Alamofire.request(URL) 157 | .responseArray { (response: DataResponse<[Forecast]>) in 158 | 159 | if let result = response.result.value { 160 | for forecast in result { 161 | XCTAssertNotNil(forecast.day, "day should not be nil") 162 | XCTAssertNotNil(forecast.conditions, "conditions should not be nil") 163 | XCTAssertNotNil(forecast.temperature, "temperature should not be nil") 164 | } 165 | } else { 166 | XCTAssert(true, "Service did not return a result") 167 | } 168 | exp.fulfill() 169 | } 170 | 171 | waitForExpectations(timeout: 10) { error in 172 | XCTAssertNil(error, "\(error)") 173 | } 174 | } 175 | 176 | 177 | func testArrayResponseObject2() { 178 | // This is an example of a functional test case. 179 | let URL = "http://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/master/AlamofireJsonToObjectsTests/sample_array_json" 180 | let exp = expectation(description: "\(URL)") 181 | 182 | Alamofire.request(URL) 183 | .responseArray { (response: DataResponse<[Forecast]>) in 184 | exp.fulfill() 185 | 186 | if let result = response.result.value { 187 | for forecast in result { 188 | XCTAssertNotNil(forecast.day, "day should not be nil") 189 | XCTAssertNotNil(forecast.conditions, "conditions should not be nil") 190 | XCTAssertNotNil(forecast.temperature, "temperature should not be nil") 191 | } 192 | } else { 193 | XCTAssert(true, "service did not return a result") 194 | } 195 | 196 | } 197 | 198 | waitForExpectations(timeout: 10) { error in 199 | XCTAssertNil(error, "\(error)") 200 | } 201 | } 202 | 203 | } 204 | 205 | 206 | enum Router: URLRequestConvertible { 207 | case list1() 208 | case list2() 209 | 210 | static let baseURLString = "http://raw.githubusercontent.com/evermeer/AlamofireJsonToObjects/master/AlamofireJsonToObjectsTests/" 211 | static let perPage = 50 212 | 213 | // MARK: URLRequestConvertible 214 | 215 | func asURLRequest() throws -> URLRequest { 216 | let result: (path: String, parameters: Parameters) = { 217 | switch self { 218 | case .list1: 219 | return ("sample_json", [:]) 220 | case .list2: 221 | return ("sample_array_json", [:]) 222 | } 223 | }() 224 | 225 | let url = try Router.baseURLString.asURL() 226 | let urlRequest = URLRequest(url: url.appendingPathComponent(result.path)) 227 | 228 | return try URLEncoding.default.encode(urlRequest, with: result.parameters) 229 | } 230 | } 231 | 232 | 233 | 234 | -------------------------------------------------------------------------------- /AlamofireJsonToObjects.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 270B9F1ACE6501314F2B1371 /* Pods_AlamofireJsonToObjectsTestsOSX.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0F4ACBA4B184404144F32A7 /* Pods_AlamofireJsonToObjectsTestsOSX.framework */; }; 11 | 4A828B841C7802670045D2D6 /* AlamofireJsonToObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A828B811C78024F0045D2D6 /* AlamofireJsonToObjects.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 4A828B861C7802D80045D2D6 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A828B851C7802D80045D2D6 /* Alamofire.framework */; }; 13 | 4A828B891C7802F60045D2D6 /* AlamofireJsonToObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F193D241B36E69A000C1C34 /* AlamofireJsonToObjects.swift */; }; 14 | 4A828B8B1C7804540045D2D6 /* EVReflection.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A828B8A1C7804540045D2D6 /* EVReflection.framework */; }; 15 | 4A828B991C7805430045D2D6 /* AlamofireJsonToObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F193D241B36E69A000C1C34 /* AlamofireJsonToObjects.swift */; }; 16 | 4A828B9A1C7805490045D2D6 /* AlamofireJsonToObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A828B811C78024F0045D2D6 /* AlamofireJsonToObjects.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | 4A828B9C1C7805610045D2D6 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A828B9B1C7805610045D2D6 /* Alamofire.framework */; }; 18 | 4A828B9E1C7805690045D2D6 /* EVReflection.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A828B9D1C7805690045D2D6 /* EVReflection.framework */; }; 19 | 7C542FB612E15EC390450057 /* Pods_AlamofireJsonToObjectsTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88F1D9E1204293E3BF5BEFD0 /* Pods_AlamofireJsonToObjectsTests.framework */; }; 20 | 7F0AB8D41B429B40009DBBE1 /* AlamofireJsonToObjectsExternalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F0AB8D31B429B40009DBBE1 /* AlamofireJsonToObjectsExternalTests.swift */; }; 21 | 7F0AB8D61B42A597009DBBE1 /* sample_users_array_json in Resources */ = {isa = PBXBuildFile; fileRef = 7F0AB8D51B42A597009DBBE1 /* sample_users_array_json */; }; 22 | 7F193D1B1B36E629000C1C34 /* AlamofireJsonToObjectsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F193D1A1B36E629000C1C34 /* AlamofireJsonToObjectsTests.swift */; }; 23 | 7F193D251B36E69A000C1C34 /* AlamofireJsonToObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F193D241B36E69A000C1C34 /* AlamofireJsonToObjects.swift */; }; 24 | 7F2976681BB964410074C85A /* AlamofireJsonToObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F193D241B36E69A000C1C34 /* AlamofireJsonToObjects.swift */; }; 25 | 7F2976691BB9645F0074C85A /* sample_array_json in Resources */ = {isa = PBXBuildFile; fileRef = 7F0859E51B3FF67B009F0B0D /* sample_array_json */; }; 26 | 7F29766A1BB9645F0074C85A /* sample_json in Resources */ = {isa = PBXBuildFile; fileRef = 7F0859E61B3FF67B009F0B0D /* sample_json */; }; 27 | 7F29766B1BB9645F0074C85A /* sample_users_array_json in Resources */ = {isa = PBXBuildFile; fileRef = 7F0AB8D51B42A597009DBBE1 /* sample_users_array_json */; }; 28 | 7F29766C1BB9645F0074C85A /* AlamofireJsonToObjectsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F193D1A1B36E629000C1C34 /* AlamofireJsonToObjectsTests.swift */; }; 29 | 7F29766D1BB9645F0074C85A /* AlamofireJsonToObjectsExternalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F0AB8D31B429B40009DBBE1 /* AlamofireJsonToObjectsExternalTests.swift */; }; 30 | 7F29766E1BB964600074C85A /* sample_array_json in Resources */ = {isa = PBXBuildFile; fileRef = 7F0859E51B3FF67B009F0B0D /* sample_array_json */; }; 31 | 7F29766F1BB964600074C85A /* sample_json in Resources */ = {isa = PBXBuildFile; fileRef = 7F0859E61B3FF67B009F0B0D /* sample_json */; }; 32 | 7F7009251D98F49600F94936 /* ArrayConversionIssue_json in Resources */ = {isa = PBXBuildFile; fileRef = 7F7009241D98F49600F94936 /* ArrayConversionIssue_json */; }; 33 | 7F7009261D98F53F00F94936 /* ArrayConversionIssue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7009221D98F46A00F94936 /* ArrayConversionIssue.swift */; }; 34 | 7F7009271D98F54000F94936 /* ArrayConversionIssue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7009221D98F46A00F94936 /* ArrayConversionIssue.swift */; }; 35 | 7FA6A6931D522E8C00DF83E9 /* NestedGenericsIssue25.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FA6A6921D522E8C00DF83E9 /* NestedGenericsIssue25.swift */; }; 36 | 7FA6A6951D5230CC00DF83E9 /* NestedGenericsIssue25_json in Resources */ = {isa = PBXBuildFile; fileRef = 7FA6A6941D5230CC00DF83E9 /* NestedGenericsIssue25_json */; }; 37 | 7FAF28AD1DB7ACDB008EB612 /* .swift-version in Resources */ = {isa = PBXBuildFile; fileRef = 7FAF28AC1DB7ACDB008EB612 /* .swift-version */; }; 38 | /* End PBXBuildFile section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 28587610FBC70EFBD308B524 /* Pods-AlamofireJsonToObjectsTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireJsonToObjectsTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireJsonToObjectsTests/Pods-AlamofireJsonToObjectsTests.debug.xcconfig"; sourceTree = ""; }; 42 | 44053659CBEA703FF31F494B /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 4A828B791C7801F50045D2D6 /* AlamofireJsonToObjects.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AlamofireJsonToObjects.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 4A828B811C78024F0045D2D6 /* AlamofireJsonToObjects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlamofireJsonToObjects.h; sourceTree = ""; }; 45 | 4A828B851C7802D80045D2D6 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = ""; }; 46 | 4A828B8A1C7804540045D2D6 /* EVReflection.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EVReflection.framework; path = Carthage/Build/iOS/EVReflection.framework; sourceTree = ""; }; 47 | 4A828B911C7804E60045D2D6 /* AlamofireJsonToObjects.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AlamofireJsonToObjects.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 4A828B9B1C7805610045D2D6 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/Mac/Alamofire.framework; sourceTree = ""; }; 49 | 4A828B9D1C7805690045D2D6 /* EVReflection.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EVReflection.framework; path = Carthage/Build/Mac/EVReflection.framework; sourceTree = ""; }; 50 | 4BD1DED4AA69FA1528D8DA93 /* Pods-AlamofireJsonToObjectsTestsOSX.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireJsonToObjectsTestsOSX.release.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireJsonToObjectsTestsOSX/Pods-AlamofireJsonToObjectsTestsOSX.release.xcconfig"; sourceTree = ""; }; 51 | 7F0859E51B3FF67B009F0B0D /* sample_array_json */ = {isa = PBXFileReference; lastKnownFileType = text; path = sample_array_json; sourceTree = ""; }; 52 | 7F0859E61B3FF67B009F0B0D /* sample_json */ = {isa = PBXFileReference; lastKnownFileType = text; path = sample_json; sourceTree = ""; }; 53 | 7F0859E71B4008B0009F0B0D /* AlamofireJsonToObjects.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = AlamofireJsonToObjects.podspec; sourceTree = ""; }; 54 | 7F0AB8D31B429B40009DBBE1 /* AlamofireJsonToObjectsExternalTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlamofireJsonToObjectsExternalTests.swift; sourceTree = ""; }; 55 | 7F0AB8D51B42A597009DBBE1 /* sample_users_array_json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sample_users_array_json; sourceTree = ""; }; 56 | 7F159DFC1BA2FA6900247CB1 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; 57 | 7F159DFE1BA307F500247CB1 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = ""; }; 58 | 7F193D141B36E629000C1C34 /* AlamofireJsonToObjectsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AlamofireJsonToObjectsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | 7F193D191B36E629000C1C34 /* ios-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ios-Info.plist"; sourceTree = ""; }; 60 | 7F193D1A1B36E629000C1C34 /* AlamofireJsonToObjectsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireJsonToObjectsTests.swift; sourceTree = ""; }; 61 | 7F193D241B36E69A000C1C34 /* AlamofireJsonToObjects.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlamofireJsonToObjects.swift; sourceTree = ""; }; 62 | 7F193D271B371199000C1C34 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 63 | 7F193D281B371199000C1C34 /* Podfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Podfile; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 64 | 7F193D291B371199000C1C34 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 65 | 7F2976601BB963100074C85A /* AlamofireJsonToObjectsTestsOSX.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AlamofireJsonToObjectsTestsOSX.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 66 | 7F2976641BB963100074C85A /* osx-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "osx-Info.plist"; path = "AlamofireJsonToObjectsTests/osx-Info.plist"; sourceTree = SOURCE_ROOT; }; 67 | 7F479E161C79000D00F03BEF /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; 68 | 7F7009221D98F46A00F94936 /* ArrayConversionIssue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArrayConversionIssue.swift; sourceTree = ""; }; 69 | 7F7009241D98F49600F94936 /* ArrayConversionIssue_json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ArrayConversionIssue_json; sourceTree = ""; }; 70 | 7FA6A6921D522E8C00DF83E9 /* NestedGenericsIssue25.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NestedGenericsIssue25.swift; sourceTree = ""; }; 71 | 7FA6A6941D5230CC00DF83E9 /* NestedGenericsIssue25_json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NestedGenericsIssue25_json; sourceTree = ""; }; 72 | 7FAF28AC1DB7ACDB008EB612 /* .swift-version */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ".swift-version"; sourceTree = ""; }; 73 | 801E44061F0ECE6A4F81EC71 /* Pods-AlamofireJsonToObjectsTestsOSX.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireJsonToObjectsTestsOSX.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireJsonToObjectsTestsOSX/Pods-AlamofireJsonToObjectsTestsOSX.debug.xcconfig"; sourceTree = ""; }; 74 | 88F1D9E1204293E3BF5BEFD0 /* Pods_AlamofireJsonToObjectsTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AlamofireJsonToObjectsTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | 8F45A0F447339976CDFE4FA7 /* Pods-AlamofireJsonToObjectsTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireJsonToObjectsTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireJsonToObjectsTests/Pods-AlamofireJsonToObjectsTests.release.xcconfig"; sourceTree = ""; }; 76 | C0F4ACBA4B184404144F32A7 /* Pods_AlamofireJsonToObjectsTestsOSX.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AlamofireJsonToObjectsTestsOSX.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | /* End PBXFileReference section */ 78 | 79 | /* Begin PBXFrameworksBuildPhase section */ 80 | 4A828B751C7801F50045D2D6 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | 4A828B8B1C7804540045D2D6 /* EVReflection.framework in Frameworks */, 85 | 4A828B861C7802D80045D2D6 /* Alamofire.framework in Frameworks */, 86 | ); 87 | runOnlyForDeploymentPostprocessing = 0; 88 | }; 89 | 4A828B8D1C7804E60045D2D6 /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | 4A828B9E1C7805690045D2D6 /* EVReflection.framework in Frameworks */, 94 | 4A828B9C1C7805610045D2D6 /* Alamofire.framework in Frameworks */, 95 | ); 96 | runOnlyForDeploymentPostprocessing = 0; 97 | }; 98 | 7F193D111B36E629000C1C34 /* Frameworks */ = { 99 | isa = PBXFrameworksBuildPhase; 100 | buildActionMask = 2147483647; 101 | files = ( 102 | 7C542FB612E15EC390450057 /* Pods_AlamofireJsonToObjectsTests.framework in Frameworks */, 103 | ); 104 | runOnlyForDeploymentPostprocessing = 0; 105 | }; 106 | 7F29765D1BB963100074C85A /* Frameworks */ = { 107 | isa = PBXFrameworksBuildPhase; 108 | buildActionMask = 2147483647; 109 | files = ( 110 | 270B9F1ACE6501314F2B1371 /* Pods_AlamofireJsonToObjectsTestsOSX.framework in Frameworks */, 111 | ); 112 | runOnlyForDeploymentPostprocessing = 0; 113 | }; 114 | /* End PBXFrameworksBuildPhase section */ 115 | 116 | /* Begin PBXGroup section */ 117 | 7F193CF61B36E628000C1C34 = { 118 | isa = PBXGroup; 119 | children = ( 120 | 7FAF28AC1DB7ACDB008EB612 /* .swift-version */, 121 | 7F159DFC1BA2FA6900247CB1 /* .gitignore */, 122 | 7F159DFE1BA307F500247CB1 /* .travis.yml */, 123 | 7F479E161C79000D00F03BEF /* Cartfile */, 124 | 7F193D271B371199000C1C34 /* LICENSE */, 125 | 7F193D281B371199000C1C34 /* Podfile */, 126 | 7F193D291B371199000C1C34 /* README.md */, 127 | 7F0859E71B4008B0009F0B0D /* AlamofireJsonToObjects.podspec */, 128 | 7F193D011B36E628000C1C34 /* AlamofireJsonToObjects */, 129 | 7F193D171B36E629000C1C34 /* AlamofireJsonToObjectsTests */, 130 | 7F193D001B36E628000C1C34 /* Products */, 131 | DB030DA169071DDCA87797D1 /* Frameworks */, 132 | BD1217F53E72D1B0079AB237 /* Pods */, 133 | ); 134 | sourceTree = ""; 135 | }; 136 | 7F193D001B36E628000C1C34 /* Products */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 7F193D141B36E629000C1C34 /* AlamofireJsonToObjectsTests.xctest */, 140 | 7F2976601BB963100074C85A /* AlamofireJsonToObjectsTestsOSX.xctest */, 141 | 4A828B791C7801F50045D2D6 /* AlamofireJsonToObjects.framework */, 142 | 4A828B911C7804E60045D2D6 /* AlamofireJsonToObjects.framework */, 143 | ); 144 | name = Products; 145 | sourceTree = ""; 146 | }; 147 | 7F193D011B36E628000C1C34 /* AlamofireJsonToObjects */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 7F193D241B36E69A000C1C34 /* AlamofireJsonToObjects.swift */, 151 | 4A828B811C78024F0045D2D6 /* AlamofireJsonToObjects.h */, 152 | ); 153 | path = AlamofireJsonToObjects; 154 | sourceTree = ""; 155 | }; 156 | 7F193D171B36E629000C1C34 /* AlamofireJsonToObjectsTests */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 7FA6A6911D522E5700DF83E9 /* Issues */, 160 | 7F0859E51B3FF67B009F0B0D /* sample_array_json */, 161 | 7F0859E61B3FF67B009F0B0D /* sample_json */, 162 | 7F0AB8D51B42A597009DBBE1 /* sample_users_array_json */, 163 | 7F193D1A1B36E629000C1C34 /* AlamofireJsonToObjectsTests.swift */, 164 | 7F0AB8D31B429B40009DBBE1 /* AlamofireJsonToObjectsExternalTests.swift */, 165 | 7F193D181B36E629000C1C34 /* Supporting Files */, 166 | ); 167 | path = AlamofireJsonToObjectsTests; 168 | sourceTree = ""; 169 | }; 170 | 7F193D181B36E629000C1C34 /* Supporting Files */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 7F2976641BB963100074C85A /* osx-Info.plist */, 174 | 7F193D191B36E629000C1C34 /* ios-Info.plist */, 175 | ); 176 | name = "Supporting Files"; 177 | sourceTree = ""; 178 | }; 179 | 7FA6A6911D522E5700DF83E9 /* Issues */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 7FA6A6921D522E8C00DF83E9 /* NestedGenericsIssue25.swift */, 183 | 7FA6A6941D5230CC00DF83E9 /* NestedGenericsIssue25_json */, 184 | 7F7009221D98F46A00F94936 /* ArrayConversionIssue.swift */, 185 | 7F7009241D98F49600F94936 /* ArrayConversionIssue_json */, 186 | ); 187 | name = Issues; 188 | sourceTree = ""; 189 | }; 190 | BD1217F53E72D1B0079AB237 /* Pods */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | 28587610FBC70EFBD308B524 /* Pods-AlamofireJsonToObjectsTests.debug.xcconfig */, 194 | 8F45A0F447339976CDFE4FA7 /* Pods-AlamofireJsonToObjectsTests.release.xcconfig */, 195 | 801E44061F0ECE6A4F81EC71 /* Pods-AlamofireJsonToObjectsTestsOSX.debug.xcconfig */, 196 | 4BD1DED4AA69FA1528D8DA93 /* Pods-AlamofireJsonToObjectsTestsOSX.release.xcconfig */, 197 | ); 198 | name = Pods; 199 | sourceTree = ""; 200 | }; 201 | DB030DA169071DDCA87797D1 /* Frameworks */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | 44053659CBEA703FF31F494B /* Pods.framework */, 205 | 4A828B9D1C7805690045D2D6 /* EVReflection.framework */, 206 | 4A828B9B1C7805610045D2D6 /* Alamofire.framework */, 207 | 4A828B8A1C7804540045D2D6 /* EVReflection.framework */, 208 | 4A828B851C7802D80045D2D6 /* Alamofire.framework */, 209 | 88F1D9E1204293E3BF5BEFD0 /* Pods_AlamofireJsonToObjectsTests.framework */, 210 | C0F4ACBA4B184404144F32A7 /* Pods_AlamofireJsonToObjectsTestsOSX.framework */, 211 | ); 212 | name = Frameworks; 213 | sourceTree = ""; 214 | }; 215 | /* End PBXGroup section */ 216 | 217 | /* Begin PBXHeadersBuildPhase section */ 218 | 4A828B761C7801F50045D2D6 /* Headers */ = { 219 | isa = PBXHeadersBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | 4A828B841C7802670045D2D6 /* AlamofireJsonToObjects.h in Headers */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | 4A828B8E1C7804E60045D2D6 /* Headers */ = { 227 | isa = PBXHeadersBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | 4A828B9A1C7805490045D2D6 /* AlamofireJsonToObjects.h in Headers */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXHeadersBuildPhase section */ 235 | 236 | /* Begin PBXNativeTarget section */ 237 | 4A828B781C7801F50045D2D6 /* AlamofireJsonToObjects iOS */ = { 238 | isa = PBXNativeTarget; 239 | buildConfigurationList = 4A828B801C7801F50045D2D6 /* Build configuration list for PBXNativeTarget "AlamofireJsonToObjects iOS" */; 240 | buildPhases = ( 241 | 4A828B741C7801F50045D2D6 /* Sources */, 242 | 4A828B751C7801F50045D2D6 /* Frameworks */, 243 | 4A828B761C7801F50045D2D6 /* Headers */, 244 | 4A828B771C7801F50045D2D6 /* Resources */, 245 | ); 246 | buildRules = ( 247 | ); 248 | dependencies = ( 249 | ); 250 | name = "AlamofireJsonToObjects iOS"; 251 | productName = "AlamofireJsonToObjects iOS"; 252 | productReference = 4A828B791C7801F50045D2D6 /* AlamofireJsonToObjects.framework */; 253 | productType = "com.apple.product-type.framework"; 254 | }; 255 | 4A828B901C7804E60045D2D6 /* AlamofireJsonToObjects OSX */ = { 256 | isa = PBXNativeTarget; 257 | buildConfigurationList = 4A828B961C7804E60045D2D6 /* Build configuration list for PBXNativeTarget "AlamofireJsonToObjects OSX" */; 258 | buildPhases = ( 259 | 4A828B8C1C7804E60045D2D6 /* Sources */, 260 | 4A828B8D1C7804E60045D2D6 /* Frameworks */, 261 | 4A828B8E1C7804E60045D2D6 /* Headers */, 262 | 4A828B8F1C7804E60045D2D6 /* Resources */, 263 | ); 264 | buildRules = ( 265 | ); 266 | dependencies = ( 267 | ); 268 | name = "AlamofireJsonToObjects OSX"; 269 | productName = "AlamofireJsonToObjects OSX"; 270 | productReference = 4A828B911C7804E60045D2D6 /* AlamofireJsonToObjects.framework */; 271 | productType = "com.apple.product-type.framework"; 272 | }; 273 | 7F193D131B36E629000C1C34 /* AlamofireJsonToObjectsTests */ = { 274 | isa = PBXNativeTarget; 275 | buildConfigurationList = 7F193D211B36E629000C1C34 /* Build configuration list for PBXNativeTarget "AlamofireJsonToObjectsTests" */; 276 | buildPhases = ( 277 | 4CB5924DB607F542D1A3E25C /* [CP] Check Pods Manifest.lock */, 278 | 7F193D101B36E629000C1C34 /* Sources */, 279 | 7F193D111B36E629000C1C34 /* Frameworks */, 280 | 7F193D121B36E629000C1C34 /* Resources */, 281 | 87F2C6AFDB632A093911AE5D /* [CP] Embed Pods Frameworks */, 282 | C4194050139D9FC2E4600FA2 /* [CP] Copy Pods Resources */, 283 | ); 284 | buildRules = ( 285 | ); 286 | dependencies = ( 287 | ); 288 | name = AlamofireJsonToObjectsTests; 289 | productName = "Alamofire-JsonToObjectsTests"; 290 | productReference = 7F193D141B36E629000C1C34 /* AlamofireJsonToObjectsTests.xctest */; 291 | productType = "com.apple.product-type.bundle.unit-test"; 292 | }; 293 | 7F29765F1BB963100074C85A /* AlamofireJsonToObjectsTestsOSX */ = { 294 | isa = PBXNativeTarget; 295 | buildConfigurationList = 7F2976671BB963100074C85A /* Build configuration list for PBXNativeTarget "AlamofireJsonToObjectsTestsOSX" */; 296 | buildPhases = ( 297 | 92A9DFB34E6E493636050707 /* [CP] Check Pods Manifest.lock */, 298 | 7F29765C1BB963100074C85A /* Sources */, 299 | 7F29765D1BB963100074C85A /* Frameworks */, 300 | 7F29765E1BB963100074C85A /* Resources */, 301 | 10924885B6C6C991D949F059 /* [CP] Embed Pods Frameworks */, 302 | 2C05F8552ADB40AA73C86FBA /* [CP] Copy Pods Resources */, 303 | ); 304 | buildRules = ( 305 | ); 306 | dependencies = ( 307 | ); 308 | name = AlamofireJsonToObjectsTestsOSX; 309 | productName = AlamofireJsonToObjectsTestsOSX; 310 | productReference = 7F2976601BB963100074C85A /* AlamofireJsonToObjectsTestsOSX.xctest */; 311 | productType = "com.apple.product-type.bundle.unit-test"; 312 | }; 313 | /* End PBXNativeTarget section */ 314 | 315 | /* Begin PBXProject section */ 316 | 7F193CF71B36E628000C1C34 /* Project object */ = { 317 | isa = PBXProject; 318 | attributes = { 319 | LastSwiftUpdateCheck = 0700; 320 | LastUpgradeCheck = 0820; 321 | ORGANIZATIONNAME = evict; 322 | TargetAttributes = { 323 | 4A828B781C7801F50045D2D6 = { 324 | CreatedOnToolsVersion = 7.2.1; 325 | DevelopmentTeam = WTH4QGEA23; 326 | LastSwiftMigration = 0800; 327 | }; 328 | 4A828B901C7804E60045D2D6 = { 329 | CreatedOnToolsVersion = 7.2.1; 330 | DevelopmentTeam = WTH4QGEA23; 331 | }; 332 | 7F193D131B36E629000C1C34 = { 333 | CreatedOnToolsVersion = 6.3.2; 334 | DevelopmentTeam = WTH4QGEA23; 335 | LastSwiftMigration = 0820; 336 | }; 337 | 7F29765F1BB963100074C85A = { 338 | CreatedOnToolsVersion = 7.0; 339 | DevelopmentTeam = WTH4QGEA23; 340 | ProvisioningStyle = Automatic; 341 | }; 342 | }; 343 | }; 344 | buildConfigurationList = 7F193CFA1B36E628000C1C34 /* Build configuration list for PBXProject "AlamofireJsonToObjects" */; 345 | compatibilityVersion = "Xcode 3.2"; 346 | developmentRegion = English; 347 | hasScannedForEncodings = 0; 348 | knownRegions = ( 349 | en, 350 | Base, 351 | ); 352 | mainGroup = 7F193CF61B36E628000C1C34; 353 | productRefGroup = 7F193D001B36E628000C1C34 /* Products */; 354 | projectDirPath = ""; 355 | projectRoot = ""; 356 | targets = ( 357 | 7F193D131B36E629000C1C34 /* AlamofireJsonToObjectsTests */, 358 | 7F29765F1BB963100074C85A /* AlamofireJsonToObjectsTestsOSX */, 359 | 4A828B781C7801F50045D2D6 /* AlamofireJsonToObjects iOS */, 360 | 4A828B901C7804E60045D2D6 /* AlamofireJsonToObjects OSX */, 361 | ); 362 | }; 363 | /* End PBXProject section */ 364 | 365 | /* Begin PBXResourcesBuildPhase section */ 366 | 4A828B771C7801F50045D2D6 /* Resources */ = { 367 | isa = PBXResourcesBuildPhase; 368 | buildActionMask = 2147483647; 369 | files = ( 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | 4A828B8F1C7804E60045D2D6 /* Resources */ = { 374 | isa = PBXResourcesBuildPhase; 375 | buildActionMask = 2147483647; 376 | files = ( 377 | ); 378 | runOnlyForDeploymentPostprocessing = 0; 379 | }; 380 | 7F193D121B36E629000C1C34 /* Resources */ = { 381 | isa = PBXResourcesBuildPhase; 382 | buildActionMask = 2147483647; 383 | files = ( 384 | 7F29766E1BB964600074C85A /* sample_array_json in Resources */, 385 | 7F0AB8D61B42A597009DBBE1 /* sample_users_array_json in Resources */, 386 | 7FA6A6951D5230CC00DF83E9 /* NestedGenericsIssue25_json in Resources */, 387 | 7F29766F1BB964600074C85A /* sample_json in Resources */, 388 | 7FAF28AD1DB7ACDB008EB612 /* .swift-version in Resources */, 389 | 7F7009251D98F49600F94936 /* ArrayConversionIssue_json in Resources */, 390 | ); 391 | runOnlyForDeploymentPostprocessing = 0; 392 | }; 393 | 7F29765E1BB963100074C85A /* Resources */ = { 394 | isa = PBXResourcesBuildPhase; 395 | buildActionMask = 2147483647; 396 | files = ( 397 | 7F29766A1BB9645F0074C85A /* sample_json in Resources */, 398 | 7F2976691BB9645F0074C85A /* sample_array_json in Resources */, 399 | 7F29766B1BB9645F0074C85A /* sample_users_array_json in Resources */, 400 | ); 401 | runOnlyForDeploymentPostprocessing = 0; 402 | }; 403 | /* End PBXResourcesBuildPhase section */ 404 | 405 | /* Begin PBXShellScriptBuildPhase section */ 406 | 10924885B6C6C991D949F059 /* [CP] Embed Pods Frameworks */ = { 407 | isa = PBXShellScriptBuildPhase; 408 | buildActionMask = 2147483647; 409 | files = ( 410 | ); 411 | inputPaths = ( 412 | ); 413 | name = "[CP] Embed Pods Frameworks"; 414 | outputPaths = ( 415 | ); 416 | runOnlyForDeploymentPostprocessing = 0; 417 | shellPath = /bin/sh; 418 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AlamofireJsonToObjectsTestsOSX/Pods-AlamofireJsonToObjectsTestsOSX-frameworks.sh\"\n"; 419 | showEnvVarsInLog = 0; 420 | }; 421 | 2C05F8552ADB40AA73C86FBA /* [CP] Copy Pods Resources */ = { 422 | isa = PBXShellScriptBuildPhase; 423 | buildActionMask = 2147483647; 424 | files = ( 425 | ); 426 | inputPaths = ( 427 | ); 428 | name = "[CP] Copy Pods Resources"; 429 | outputPaths = ( 430 | ); 431 | runOnlyForDeploymentPostprocessing = 0; 432 | shellPath = /bin/sh; 433 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AlamofireJsonToObjectsTestsOSX/Pods-AlamofireJsonToObjectsTestsOSX-resources.sh\"\n"; 434 | showEnvVarsInLog = 0; 435 | }; 436 | 4CB5924DB607F542D1A3E25C /* [CP] Check Pods Manifest.lock */ = { 437 | isa = PBXShellScriptBuildPhase; 438 | buildActionMask = 2147483647; 439 | files = ( 440 | ); 441 | inputPaths = ( 442 | ); 443 | name = "[CP] Check Pods Manifest.lock"; 444 | outputPaths = ( 445 | ); 446 | runOnlyForDeploymentPostprocessing = 0; 447 | shellPath = /bin/sh; 448 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 449 | showEnvVarsInLog = 0; 450 | }; 451 | 87F2C6AFDB632A093911AE5D /* [CP] Embed Pods Frameworks */ = { 452 | isa = PBXShellScriptBuildPhase; 453 | buildActionMask = 2147483647; 454 | files = ( 455 | ); 456 | inputPaths = ( 457 | ); 458 | name = "[CP] Embed Pods Frameworks"; 459 | outputPaths = ( 460 | ); 461 | runOnlyForDeploymentPostprocessing = 0; 462 | shellPath = /bin/sh; 463 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AlamofireJsonToObjectsTests/Pods-AlamofireJsonToObjectsTests-frameworks.sh\"\n"; 464 | showEnvVarsInLog = 0; 465 | }; 466 | 92A9DFB34E6E493636050707 /* [CP] Check Pods Manifest.lock */ = { 467 | isa = PBXShellScriptBuildPhase; 468 | buildActionMask = 2147483647; 469 | files = ( 470 | ); 471 | inputPaths = ( 472 | ); 473 | name = "[CP] Check Pods Manifest.lock"; 474 | outputPaths = ( 475 | ); 476 | runOnlyForDeploymentPostprocessing = 0; 477 | shellPath = /bin/sh; 478 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 479 | showEnvVarsInLog = 0; 480 | }; 481 | C4194050139D9FC2E4600FA2 /* [CP] Copy Pods Resources */ = { 482 | isa = PBXShellScriptBuildPhase; 483 | buildActionMask = 2147483647; 484 | files = ( 485 | ); 486 | inputPaths = ( 487 | ); 488 | name = "[CP] Copy Pods Resources"; 489 | outputPaths = ( 490 | ); 491 | runOnlyForDeploymentPostprocessing = 0; 492 | shellPath = /bin/sh; 493 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AlamofireJsonToObjectsTests/Pods-AlamofireJsonToObjectsTests-resources.sh\"\n"; 494 | showEnvVarsInLog = 0; 495 | }; 496 | /* End PBXShellScriptBuildPhase section */ 497 | 498 | /* Begin PBXSourcesBuildPhase section */ 499 | 4A828B741C7801F50045D2D6 /* Sources */ = { 500 | isa = PBXSourcesBuildPhase; 501 | buildActionMask = 2147483647; 502 | files = ( 503 | 4A828B891C7802F60045D2D6 /* AlamofireJsonToObjects.swift in Sources */, 504 | ); 505 | runOnlyForDeploymentPostprocessing = 0; 506 | }; 507 | 4A828B8C1C7804E60045D2D6 /* Sources */ = { 508 | isa = PBXSourcesBuildPhase; 509 | buildActionMask = 2147483647; 510 | files = ( 511 | 4A828B991C7805430045D2D6 /* AlamofireJsonToObjects.swift in Sources */, 512 | ); 513 | runOnlyForDeploymentPostprocessing = 0; 514 | }; 515 | 7F193D101B36E629000C1C34 /* Sources */ = { 516 | isa = PBXSourcesBuildPhase; 517 | buildActionMask = 2147483647; 518 | files = ( 519 | 7F193D251B36E69A000C1C34 /* AlamofireJsonToObjects.swift in Sources */, 520 | 7FA6A6931D522E8C00DF83E9 /* NestedGenericsIssue25.swift in Sources */, 521 | 7F0AB8D41B429B40009DBBE1 /* AlamofireJsonToObjectsExternalTests.swift in Sources */, 522 | 7F193D1B1B36E629000C1C34 /* AlamofireJsonToObjectsTests.swift in Sources */, 523 | 7F7009261D98F53F00F94936 /* ArrayConversionIssue.swift in Sources */, 524 | ); 525 | runOnlyForDeploymentPostprocessing = 0; 526 | }; 527 | 7F29765C1BB963100074C85A /* Sources */ = { 528 | isa = PBXSourcesBuildPhase; 529 | buildActionMask = 2147483647; 530 | files = ( 531 | 7F29766C1BB9645F0074C85A /* AlamofireJsonToObjectsTests.swift in Sources */, 532 | 7F29766D1BB9645F0074C85A /* AlamofireJsonToObjectsExternalTests.swift in Sources */, 533 | 7F2976681BB964410074C85A /* AlamofireJsonToObjects.swift in Sources */, 534 | 7F7009271D98F54000F94936 /* ArrayConversionIssue.swift in Sources */, 535 | ); 536 | runOnlyForDeploymentPostprocessing = 0; 537 | }; 538 | /* End PBXSourcesBuildPhase section */ 539 | 540 | /* Begin XCBuildConfiguration section */ 541 | 4A828B7E1C7801F50045D2D6 /* Debug */ = { 542 | isa = XCBuildConfiguration; 543 | buildSettings = { 544 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 545 | CURRENT_PROJECT_VERSION = 1; 546 | DEBUG_INFORMATION_FORMAT = dwarf; 547 | DEFINES_MODULE = YES; 548 | DEVELOPMENT_TEAM = WTH4QGEA23; 549 | DYLIB_COMPATIBILITY_VERSION = 1; 550 | DYLIB_CURRENT_VERSION = 1; 551 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 552 | FRAMEWORK_SEARCH_PATHS = ( 553 | "$(inherited)", 554 | "$(PROJECT_DIR)/Carthage/Build/iOS", 555 | ); 556 | INFOPLIST_FILE = "$(SRCROOT)/AlamofireJsonToObjectsTests/ios-Info.plist"; 557 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 558 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 559 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 560 | PRODUCT_BUNDLE_IDENTIFIER = ""; 561 | PRODUCT_NAME = AlamofireJsonToObjects; 562 | SKIP_INSTALL = YES; 563 | SWIFT_VERSION = 3.0; 564 | VERSIONING_SYSTEM = "apple-generic"; 565 | VERSION_INFO_PREFIX = ""; 566 | }; 567 | name = Debug; 568 | }; 569 | 4A828B7F1C7801F50045D2D6 /* Release */ = { 570 | isa = XCBuildConfiguration; 571 | buildSettings = { 572 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 573 | CURRENT_PROJECT_VERSION = 1; 574 | DEFINES_MODULE = YES; 575 | DEVELOPMENT_TEAM = WTH4QGEA23; 576 | DYLIB_COMPATIBILITY_VERSION = 1; 577 | DYLIB_CURRENT_VERSION = 1; 578 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 579 | FRAMEWORK_SEARCH_PATHS = ( 580 | "$(inherited)", 581 | "$(PROJECT_DIR)/Carthage/Build/iOS", 582 | ); 583 | INFOPLIST_FILE = "$(SRCROOT)/AlamofireJsonToObjectsTests/ios-Info.plist"; 584 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 585 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 586 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 587 | PRODUCT_BUNDLE_IDENTIFIER = ""; 588 | PRODUCT_NAME = AlamofireJsonToObjects; 589 | SKIP_INSTALL = YES; 590 | SWIFT_VERSION = 3.0; 591 | VERSIONING_SYSTEM = "apple-generic"; 592 | VERSION_INFO_PREFIX = ""; 593 | }; 594 | name = Release; 595 | }; 596 | 4A828B971C7804E60045D2D6 /* Debug */ = { 597 | isa = XCBuildConfiguration; 598 | buildSettings = { 599 | CODE_SIGN_IDENTITY = ""; 600 | COMBINE_HIDPI_IMAGES = YES; 601 | CURRENT_PROJECT_VERSION = 1; 602 | DEBUG_INFORMATION_FORMAT = dwarf; 603 | DEFINES_MODULE = YES; 604 | DEVELOPMENT_TEAM = WTH4QGEA23; 605 | DYLIB_COMPATIBILITY_VERSION = 1; 606 | DYLIB_CURRENT_VERSION = 1; 607 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 608 | FRAMEWORK_SEARCH_PATHS = ( 609 | "$(inherited)", 610 | "$(PROJECT_DIR)/Carthage/Build/Mac", 611 | ); 612 | FRAMEWORK_VERSION = A; 613 | INFOPLIST_FILE = "$(SRCROOT)/AlamofireJsonToObjectsTests/osx-Info.plist"; 614 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 615 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 616 | MACOSX_DEPLOYMENT_TARGET = 10.11; 617 | PRODUCT_BUNDLE_IDENTIFIER = ""; 618 | PRODUCT_NAME = AlamofireJsonToObjects; 619 | SDKROOT = macosx; 620 | SKIP_INSTALL = YES; 621 | VERSIONING_SYSTEM = "apple-generic"; 622 | VERSION_INFO_PREFIX = ""; 623 | }; 624 | name = Debug; 625 | }; 626 | 4A828B981C7804E60045D2D6 /* Release */ = { 627 | isa = XCBuildConfiguration; 628 | buildSettings = { 629 | COMBINE_HIDPI_IMAGES = YES; 630 | CURRENT_PROJECT_VERSION = 1; 631 | DEFINES_MODULE = YES; 632 | DYLIB_COMPATIBILITY_VERSION = 1; 633 | DYLIB_CURRENT_VERSION = 1; 634 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 635 | FRAMEWORK_SEARCH_PATHS = ( 636 | "$(inherited)", 637 | "$(PROJECT_DIR)/Carthage/Build/Mac", 638 | ); 639 | FRAMEWORK_VERSION = A; 640 | INFOPLIST_FILE = "$(SRCROOT)/AlamofireJsonToObjectsTests/osx-Info.plist"; 641 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 642 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 643 | MACOSX_DEPLOYMENT_TARGET = 10.11; 644 | PRODUCT_BUNDLE_IDENTIFIER = ""; 645 | PRODUCT_NAME = AlamofireJsonToObjects; 646 | SDKROOT = macosx; 647 | SKIP_INSTALL = YES; 648 | VERSIONING_SYSTEM = "apple-generic"; 649 | VERSION_INFO_PREFIX = ""; 650 | }; 651 | name = Release; 652 | }; 653 | 7F193D1C1B36E629000C1C34 /* Debug */ = { 654 | isa = XCBuildConfiguration; 655 | buildSettings = { 656 | ALWAYS_SEARCH_USER_PATHS = NO; 657 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 658 | CLANG_CXX_LIBRARY = "libc++"; 659 | CLANG_ENABLE_MODULES = YES; 660 | CLANG_ENABLE_OBJC_ARC = YES; 661 | CLANG_WARN_BOOL_CONVERSION = YES; 662 | CLANG_WARN_CONSTANT_CONVERSION = YES; 663 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 664 | CLANG_WARN_EMPTY_BODY = YES; 665 | CLANG_WARN_ENUM_CONVERSION = YES; 666 | CLANG_WARN_INFINITE_RECURSION = YES; 667 | CLANG_WARN_INT_CONVERSION = YES; 668 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 669 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 670 | CLANG_WARN_UNREACHABLE_CODE = YES; 671 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 672 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 673 | COPY_PHASE_STRIP = NO; 674 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 675 | ENABLE_STRICT_OBJC_MSGSEND = YES; 676 | ENABLE_TESTABILITY = YES; 677 | GCC_C_LANGUAGE_STANDARD = gnu99; 678 | GCC_DYNAMIC_NO_PIC = NO; 679 | GCC_NO_COMMON_BLOCKS = YES; 680 | GCC_OPTIMIZATION_LEVEL = 0; 681 | GCC_PREPROCESSOR_DEFINITIONS = ( 682 | "DEBUG=1", 683 | "$(inherited)", 684 | ); 685 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 686 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 687 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 688 | GCC_WARN_UNDECLARED_SELECTOR = YES; 689 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 690 | GCC_WARN_UNUSED_FUNCTION = YES; 691 | GCC_WARN_UNUSED_VARIABLE = YES; 692 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 693 | MTL_ENABLE_DEBUG_INFO = YES; 694 | ONLY_ACTIVE_ARCH = YES; 695 | SDKROOT = iphoneos; 696 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 697 | TARGETED_DEVICE_FAMILY = "1,2"; 698 | }; 699 | name = Debug; 700 | }; 701 | 7F193D1D1B36E629000C1C34 /* Release */ = { 702 | isa = XCBuildConfiguration; 703 | buildSettings = { 704 | ALWAYS_SEARCH_USER_PATHS = NO; 705 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 706 | CLANG_CXX_LIBRARY = "libc++"; 707 | CLANG_ENABLE_MODULES = YES; 708 | CLANG_ENABLE_OBJC_ARC = YES; 709 | CLANG_WARN_BOOL_CONVERSION = YES; 710 | CLANG_WARN_CONSTANT_CONVERSION = YES; 711 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 712 | CLANG_WARN_EMPTY_BODY = YES; 713 | CLANG_WARN_ENUM_CONVERSION = YES; 714 | CLANG_WARN_INFINITE_RECURSION = YES; 715 | CLANG_WARN_INT_CONVERSION = YES; 716 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 717 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 718 | CLANG_WARN_UNREACHABLE_CODE = YES; 719 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 720 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 721 | COPY_PHASE_STRIP = NO; 722 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 723 | ENABLE_NS_ASSERTIONS = NO; 724 | ENABLE_STRICT_OBJC_MSGSEND = YES; 725 | GCC_C_LANGUAGE_STANDARD = gnu99; 726 | GCC_NO_COMMON_BLOCKS = YES; 727 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 728 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 729 | GCC_WARN_UNDECLARED_SELECTOR = YES; 730 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 731 | GCC_WARN_UNUSED_FUNCTION = YES; 732 | GCC_WARN_UNUSED_VARIABLE = YES; 733 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 734 | MTL_ENABLE_DEBUG_INFO = NO; 735 | SDKROOT = iphoneos; 736 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 737 | TARGETED_DEVICE_FAMILY = "1,2"; 738 | VALIDATE_PRODUCT = YES; 739 | }; 740 | name = Release; 741 | }; 742 | 7F193D221B36E629000C1C34 /* Debug */ = { 743 | isa = XCBuildConfiguration; 744 | baseConfigurationReference = 28587610FBC70EFBD308B524 /* Pods-AlamofireJsonToObjectsTests.debug.xcconfig */; 745 | buildSettings = { 746 | DEVELOPMENT_TEAM = WTH4QGEA23; 747 | INFOPLIST_FILE = "AlamofireJsonToObjectsTests/ios-Info.plist"; 748 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 749 | PRODUCT_BUNDLE_IDENTIFIER = "nl.evict.$(PRODUCT_NAME:rfc1034identifier)"; 750 | PRODUCT_NAME = AlamofireJsonToObjectsTests; 751 | SWIFT_VERSION = 3.0; 752 | }; 753 | name = Debug; 754 | }; 755 | 7F193D231B36E629000C1C34 /* Release */ = { 756 | isa = XCBuildConfiguration; 757 | baseConfigurationReference = 8F45A0F447339976CDFE4FA7 /* Pods-AlamofireJsonToObjectsTests.release.xcconfig */; 758 | buildSettings = { 759 | DEVELOPMENT_TEAM = WTH4QGEA23; 760 | INFOPLIST_FILE = "AlamofireJsonToObjectsTests/ios-Info.plist"; 761 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 762 | PRODUCT_BUNDLE_IDENTIFIER = "nl.evict.$(PRODUCT_NAME:rfc1034identifier)"; 763 | PRODUCT_NAME = AlamofireJsonToObjectsTests; 764 | SWIFT_VERSION = 3.0; 765 | }; 766 | name = Release; 767 | }; 768 | 7F2976651BB963100074C85A /* Debug */ = { 769 | isa = XCBuildConfiguration; 770 | baseConfigurationReference = 801E44061F0ECE6A4F81EC71 /* Pods-AlamofireJsonToObjectsTestsOSX.debug.xcconfig */; 771 | buildSettings = { 772 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 773 | CODE_SIGN_IDENTITY = "Mac Developer"; 774 | COMBINE_HIDPI_IMAGES = YES; 775 | DEBUG_INFORMATION_FORMAT = dwarf; 776 | DEVELOPMENT_TEAM = WTH4QGEA23; 777 | INFOPLIST_FILE = "AlamofireJsonToObjectsTests/osx-Info.plist"; 778 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 779 | MACOSX_DEPLOYMENT_TARGET = 10.8; 780 | PRODUCT_BUNDLE_IDENTIFIER = nl.evict.AlamofireJsonToObjectsTestsOSX; 781 | PRODUCT_NAME = "$(TARGET_NAME)"; 782 | SDKROOT = macosx; 783 | }; 784 | name = Debug; 785 | }; 786 | 7F2976661BB963100074C85A /* Release */ = { 787 | isa = XCBuildConfiguration; 788 | baseConfigurationReference = 4BD1DED4AA69FA1528D8DA93 /* Pods-AlamofireJsonToObjectsTestsOSX.release.xcconfig */; 789 | buildSettings = { 790 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 791 | CODE_SIGN_IDENTITY = "Mac Developer"; 792 | COMBINE_HIDPI_IMAGES = YES; 793 | DEVELOPMENT_TEAM = WTH4QGEA23; 794 | INFOPLIST_FILE = "AlamofireJsonToObjectsTests/osx-Info.plist"; 795 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 796 | MACOSX_DEPLOYMENT_TARGET = 10.8; 797 | PRODUCT_BUNDLE_IDENTIFIER = nl.evict.AlamofireJsonToObjectsTestsOSX; 798 | PRODUCT_NAME = "$(TARGET_NAME)"; 799 | SDKROOT = macosx; 800 | }; 801 | name = Release; 802 | }; 803 | /* End XCBuildConfiguration section */ 804 | 805 | /* Begin XCConfigurationList section */ 806 | 4A828B801C7801F50045D2D6 /* Build configuration list for PBXNativeTarget "AlamofireJsonToObjects iOS" */ = { 807 | isa = XCConfigurationList; 808 | buildConfigurations = ( 809 | 4A828B7E1C7801F50045D2D6 /* Debug */, 810 | 4A828B7F1C7801F50045D2D6 /* Release */, 811 | ); 812 | defaultConfigurationIsVisible = 0; 813 | defaultConfigurationName = Release; 814 | }; 815 | 4A828B961C7804E60045D2D6 /* Build configuration list for PBXNativeTarget "AlamofireJsonToObjects OSX" */ = { 816 | isa = XCConfigurationList; 817 | buildConfigurations = ( 818 | 4A828B971C7804E60045D2D6 /* Debug */, 819 | 4A828B981C7804E60045D2D6 /* Release */, 820 | ); 821 | defaultConfigurationIsVisible = 0; 822 | defaultConfigurationName = Release; 823 | }; 824 | 7F193CFA1B36E628000C1C34 /* Build configuration list for PBXProject "AlamofireJsonToObjects" */ = { 825 | isa = XCConfigurationList; 826 | buildConfigurations = ( 827 | 7F193D1C1B36E629000C1C34 /* Debug */, 828 | 7F193D1D1B36E629000C1C34 /* Release */, 829 | ); 830 | defaultConfigurationIsVisible = 0; 831 | defaultConfigurationName = Release; 832 | }; 833 | 7F193D211B36E629000C1C34 /* Build configuration list for PBXNativeTarget "AlamofireJsonToObjectsTests" */ = { 834 | isa = XCConfigurationList; 835 | buildConfigurations = ( 836 | 7F193D221B36E629000C1C34 /* Debug */, 837 | 7F193D231B36E629000C1C34 /* Release */, 838 | ); 839 | defaultConfigurationIsVisible = 0; 840 | defaultConfigurationName = Release; 841 | }; 842 | 7F2976671BB963100074C85A /* Build configuration list for PBXNativeTarget "AlamofireJsonToObjectsTestsOSX" */ = { 843 | isa = XCConfigurationList; 844 | buildConfigurations = ( 845 | 7F2976651BB963100074C85A /* Debug */, 846 | 7F2976661BB963100074C85A /* Release */, 847 | ); 848 | defaultConfigurationIsVisible = 0; 849 | defaultConfigurationName = Release; 850 | }; 851 | /* End XCConfigurationList section */ 852 | }; 853 | rootObject = 7F193CF71B36E628000C1C34 /* Project object */; 854 | } 855 | --------------------------------------------------------------------------------