├── LICENSE
├── Example
├── Example
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ ├── Info.plist
│ ├── AppDelegate.swift
│ └── ViewController.swift
├── Example.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── project.pbxproj
├── Example.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Podfile
├── movie.json
├── AlamofireMapper.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcuserdata
│ └── kem.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── project.pbxproj
├── AlamofireMapper.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── Podfile
├── user2.json
├── .gitignore
├── AlamofireMapper
├── AlamofireMapper.h
├── Info.plist
└── AlamofireMapper.swift
├── user1.json
├── AlamofireMapperTests
├── Info.plist
├── Model.swift
└── AlamofireMapperTests.swift
├── AlamofireMapper.podspec
└── README.md
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT license (MIT)
2 |
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/movie.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"paul rudd",
3 | "movies[]":[
4 | "I Love You Man",
5 | "Role Models"
6 | ],
7 | "id":"243",
8 | "createdAt":"2014-10-18T12:09:05.255Z"
9 | }
10 |
--------------------------------------------------------------------------------
/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AlamofireMapper.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/Example.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/AlamofireMapper.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/AlamofireMapper.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | target 'Example' do
5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
6 | use_frameworks!
7 |
8 | # Pods for Example
9 | pod 'AlamofireMapper'
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/AlamofireMapper.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/AlamofireMapper.xcodeproj/xcuserdata/kem.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AlamofireMapper.xcscheme
8 |
9 | orderHint
10 | 3
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | target 'AlamofireMapper' do
5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
6 | use_frameworks!
7 |
8 | # Pods for AlamofreMapper
9 | pod 'Alamofire', '~> 4.7'
10 |
11 | target 'AlamofireMapperTests' do
12 | inherit! :search_paths
13 | # Pods for testing
14 | pod 'Alamofire', '~> 4.7'
15 | end
16 |
17 | end
18 |
--------------------------------------------------------------------------------
/user2.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id":1,
4 | "first_name":"George",
5 | "last_name":"Bluth",
6 | "avatar":"https://s3.amazonaws.com/uifaces/faces/twitter/calebogden/128.jpg"
7 | },
8 | {
9 | "id":2,
10 | "first_name":"Janet",
11 | "last_name":"Weaver",
12 | "avatar":"https://s3.amazonaws.com/uifaces/faces/twitter/josephstein/128.jpg"
13 | },
14 | {
15 | "id":3,
16 | "first_name":"Emma",
17 | "last_name":"Wong",
18 | "avatar":"https://s3.amazonaws.com/uifaces/faces/twitter/olegpogodaev/128.jpg"
19 | }
20 | ]
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## User settings
6 | xcuserdata/
7 |
8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9 | *.xcscmblueprint
10 | *.xccheckout
11 |
12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13 | build/
14 | DerivedData/
15 | *.moved-aside
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 | Pods
25 |
--------------------------------------------------------------------------------
/AlamofireMapper/AlamofireMapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // AlamofireMapper.h
3 | // AlamofireMapper
4 | //
5 | // Created by Sua Le on 8/21/18.
6 | // Copyright © 2018 Sua Le. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for AlamofireMapper.
12 | FOUNDATION_EXPORT double AlamofireMapperVersionNumber;
13 |
14 | //! Project version string for AlamofireMapper.
15 | FOUNDATION_EXPORT const unsigned char AlamofireMapperVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/user1.json:
--------------------------------------------------------------------------------
1 | {
2 | "page":1,
3 | "per_page":3,
4 | "total":12,
5 | "total_pages":4,
6 | "data":[
7 | {
8 | "id":1,
9 | "first_name":"George",
10 | "last_name":"Bluth",
11 | "avatar":"https://s3.amazonaws.com/uifaces/faces/twitter/calebogden/128.jpg"
12 | },
13 | {
14 | "id":2,
15 | "first_name":"Janet",
16 | "last_name":"Weaver",
17 | "avatar":"https://s3.amazonaws.com/uifaces/faces/twitter/josephstein/128.jpg"
18 | },
19 | {
20 | "id":3,
21 | "first_name":"Emma",
22 | "last_name":"Wong",
23 | "avatar":"https://s3.amazonaws.com/uifaces/faces/twitter/olegpogodaev/128.jpg"
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/AlamofireMapperTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/AlamofireMapper.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 |
3 | s.name = "AlamofireMapper"
4 | s.version = "1.0.0"
5 | s.license = { :type => "MIT"}
6 | s.summary = "An extension to Alamofire which automatically converts JSON response data into swift objects using Decodeable"
7 | s.homepage = "https://github.com/sua8051/AlamofireMapper"
8 | s.author = { "Sua Le" => "sua8051@gmail.com" }
9 | s.source = { :git => 'https://github.com/sua8051/AlamofireMapper.git', :tag => s.version.to_s }
10 |
11 | s.ios.deployment_target = '8.0'
12 | s.osx.deployment_target = '10.10'
13 | s.watchos.deployment_target = '2.0'
14 | s.tvos.deployment_target = '9.0'
15 |
16 | s.swift_version = '4.0'
17 |
18 | s.requires_arc = true
19 | s.source_files = 'AlamofireMapper/**/*.swift'
20 | s.dependency 'Alamofire', '~> 4.1'
21 | end
22 |
--------------------------------------------------------------------------------
/AlamofireMapper/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/AlamofireMapperTests/Model.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Model.swift
3 | // AlamofreMapperTests
4 | //
5 | // Created by Sua Le on 8/21/18.
6 | // Copyright © 2018 Sua Le. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class UserResponse: Decodable {
12 | var page: Int!
13 | var per_page: Int!
14 | var total: Int!
15 | var total_pages: Int!
16 |
17 | var data: [User]?
18 | }
19 |
20 | class User: Decodable {
21 | var id: Double!
22 | var first_name: String!
23 | var last_name: String!
24 | var avatar: String!
25 | }
26 |
27 | class Movie: Decodable {
28 | var id: String!
29 | var name: String!
30 | var movies: Array!
31 | var createdAt: Date?
32 |
33 | enum CodingKeys: String, CodingKey {
34 | case id
35 | case name
36 | case movies = "movies[]"
37 | case createdAt
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/AlamofireMapperTests/AlamofireMapperTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AlamofreMapperTests.swift
3 | // AlamofreMapperTests
4 | //
5 | // Created by Sua Le on 8/21/18.
6 | // Copyright © 2018 Sua Le. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import Alamofire
11 | @testable import AlamofreMapper
12 |
13 | class AlamofreMapperTests: XCTestCase {
14 |
15 | override func setUp() {
16 | super.setUp()
17 | // Put setup code here. This method is called before the invocation of each test method in the class.
18 | }
19 |
20 | override func tearDown() {
21 | // Put teardown code here. This method is called after the invocation of each test method in the class.
22 | super.tearDown()
23 | }
24 |
25 | func testGetListUsers() {
26 | Alamofire.request("https://reqres.in/api/users", method: .get
27 | , parameters: nil, encoding: URLEncoding.default, headers: nil).responseObject { (response: DataResponse) in
28 | switch response.result {
29 | case let .success(data):
30 | dump(data)
31 | case let .failure(error):
32 | dump(error)
33 | }
34 | }
35 |
36 | assert(true)
37 | }
38 |
39 | func testPerformanceExample() {
40 | // This is an example of a performance test case.
41 | self.measure {
42 | // Put the code you want to measure the time of here.
43 | }
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/Example/Example/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Example/Example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | NSAppTransportSecurity
38 |
39 | NSAllowsArbitraryLoads
40 |
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/Example/Example/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/Example/Example/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Example
4 | //
5 | // Created by Sua Le on 8/21/18.
6 | // Copyright © 2018 Sua Le. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Example/Example/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Example
4 | //
5 | // Created by Sua Le on 8/21/18.
6 | // Copyright © 2018 Sua Le. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import Alamofire
11 | import AlamofireMapper
12 |
13 | class ViewController: UIViewController {
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | //default key
18 | let url1 = "https://raw.githubusercontent.com/sua8051/AlamofireMapper/master/user1.json"
19 | Alamofire.request(url1, method: .get
20 | , parameters: nil, encoding: URLEncoding.default, headers: nil).responseObject { (response: DataResponse) in
21 | switch response.result {
22 | case let .success(data):
23 | dump(data)
24 | case let .failure(error):
25 | dump(error)
26 | }
27 | }
28 |
29 | //custom coding key
30 | let url2 = "https://raw.githubusercontent.com/sua8051/AlamofireMapper/master/movie.json"
31 | Alamofire.request(url2, method: .get
32 | , parameters: nil, encoding: URLEncoding.default, headers: nil).responseObject { (response: DataResponse) in
33 | switch response.result {
34 | case let .success(data):
35 | dump(data)
36 | case let .failure(error):
37 | dump(error)
38 | }
39 | }
40 |
41 | //response array
42 | let url3 = "https://raw.githubusercontent.com/sua8051/AlamofireMapper/master/user2.json"
43 | Alamofire.request(url3, method: .get
44 | , parameters: nil, encoding: URLEncoding.default, headers: nil).responseObject { (response: DataResponse<[User]>) in
45 | switch response.result {
46 | case let .success(data):
47 | dump(data)
48 | case let .failure(error):
49 | dump(error)
50 | }
51 | }
52 |
53 | // Do any additional setup after loading the view, typically from a nib.
54 | }
55 |
56 | override func didReceiveMemoryWarning() {
57 | super.didReceiveMemoryWarning()
58 | // Dispose of any resources that can be recreated.
59 | }
60 |
61 |
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/AlamofireMapper/AlamofireMapper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AlamofreMapper.swift
3 | // AlamofireMapper
4 | //
5 | // Created by Sua Le on 8/21/18.
6 | // Copyright © 2018 Sua Le. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import Alamofire
11 |
12 | extension DataRequest {
13 |
14 | @discardableResult
15 | public func responseObject(queue: DispatchQueue? = nil, decoder: JSONDecoder? = nil, completionHandler: @escaping (DataResponse) -> Void) -> Self {
16 | return response(queue: queue, responseSerializer: DataRequest.serializer(decoder: decoder ?? defaultDecoder), completionHandler: completionHandler)
17 | }
18 |
19 | public static func serializer(decoder: JSONDecoder) -> DataResponseSerializer {
20 | return DataResponseSerializer { request, response, data, error in
21 | let domain = "come.kesu.AlamofireMapper"
22 | guard error == nil, let data = data else {
23 | return .failure(error ?? NSError(domain: domain, code: -1, userInfo: [NSLocalizedFailureReasonErrorKey: "Data is nil"]))
24 | }
25 |
26 | var reason = "JSONDecoder failed to serialize response."
27 | do {
28 | let parsed = try decoder.decode(T.self, from: data)
29 | return .success(parsed)
30 | } catch let error {
31 | dump(error)
32 | let json = try? JSONSerialization.jsonObject(with: data, options: [])
33 | dump(json)
34 | reason = error.localizedDescription
35 | }
36 | return .failure(NSError(domain: domain, code: -2, userInfo: [NSLocalizedFailureReasonErrorKey: reason]))
37 | }
38 | }
39 |
40 | open var defaultDecoder: JSONDecoder {
41 | let decoder = JSONDecoder()
42 | decoder.dateDecodingStrategy = .dateDecoding
43 | return decoder
44 | }
45 | }
46 |
47 | private extension JSONDecoder.DateDecodingStrategy {
48 | static let dateDecoding = custom { decoder -> Date in
49 | let container = try decoder.singleValueContainer()
50 | let string = try? container.decode(String.self)
51 | if let string = string {
52 | if let date = Formatter.iso8601.date(from: string) ?? Formatter.iso8601noFS.date(from: string) {
53 | return date
54 | }
55 | } else if let timestamp = try? container.decode(Double.self) {
56 | return Date(timeIntervalSince1970: timestamp)
57 | }
58 | return Date()
59 | }
60 | }
61 |
62 |
63 | private extension Formatter {
64 | static let iso8601: DateFormatter = {
65 | let formatter = DateFormatter()
66 | formatter.calendar = Calendar(identifier: .iso8601)
67 | formatter.locale = Locale(identifier: "en_US_POSIX")
68 | formatter.timeZone = TimeZone(secondsFromGMT: 0)
69 | formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
70 | return formatter
71 | }()
72 | static let iso8601noFS: DateFormatter = {
73 | let formatter = DateFormatter()
74 | formatter.calendar = Calendar(identifier: .iso8601)
75 | formatter.locale = Locale(identifier: "en_US_POSIX")
76 | formatter.timeZone = TimeZone(secondsFromGMT: 0)
77 | formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssXXXXX"
78 | return formatter
79 | }()
80 | }
81 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Alamofire Mapper
2 | An extension to [Alamofire](https://github.com/Alamofire/Alamofire) which automatically converts JSON response data into swift objects using **Switf 4 Decodeable**
3 |
4 | # Features
5 | * Automatically convert JSON to Swift object
6 | * Don't need to map field by field, allow custom field name
7 | * Support object & array & nested object
8 | * Support decode Datetime field with timestamp, iso8601 format
9 | * Easy to use
10 |
11 |
12 | # Installation
13 | **AlamofireMapper** can be added to your project using Cocoapods by adding the following line to your Podfile:
14 |
15 | ```
16 | pod 'AlamofireMapper'
17 | ```
18 | Note: maybe you need to run ***pod repo update*** before ***pod install***
19 |
20 |
21 |
22 |
23 | # Usage
24 | Raw json response from server
25 |
26 | ```
27 | {
28 | "page":1,
29 | "per_page":3,
30 | "total":12,
31 | "total_pages":4,
32 | "data":[
33 | {
34 | "id":1,
35 | "first_name":"George",
36 | "last_name":"Bluth",
37 | "avatar":"https://s3.amazonaws.com/uifaces/faces/twitter/calebogden/128.jpg"
38 | },
39 | {
40 | "id":2,
41 | "first_name":"Janet",
42 | "last_name":"Weaver",
43 | "avatar":"https://s3.amazonaws.com/uifaces/faces/twitter/josephstein/128.jpg"
44 | },
45 | {
46 | "id":3,
47 | "first_name":"Emma",
48 | "last_name":"Wong",
49 | "avatar":"https://s3.amazonaws.com/uifaces/faces/twitter/olegpogodaev/128.jpg"
50 | }
51 | ]
52 | }
53 |
54 | ```
55 |
56 | Swift class just conform Decodeable
57 |
58 | ```swift
59 |
60 | class UserResponse: Decodable {
61 | var page: Int!
62 | var per_page: Int!
63 | var total: Int!
64 | var total_pages: Int!
65 |
66 | var data: [User]?
67 | }
68 |
69 | class User: Decodable {
70 | var id: Double!
71 | var first_name: String!
72 | var last_name: String!
73 | var avatar: String!
74 | }
75 |
76 | ```
77 |
78 |
79 | Then you can use the extension as the follows:
80 |
81 | ```swift
82 | import Alamofire
83 | import AlamofireMapper
84 |
85 | let url1 = "https://raw.githubusercontent.com/sua8051/AlamofireMapper/master/user1.json"
86 | Alamofire.request(url1, method: .get
87 | , parameters: nil, encoding: URLEncoding.default, headers: nil).responseObject { (response: DataResponse) in
88 | switch response.result {
89 | case let .success(data):
90 | dump(data)
91 | case let .failure(error):
92 | dump(error)
93 | }
94 | }
95 | ```
96 |
97 |
98 | Support array response:
99 |
100 | ```swift
101 | let url3 = "https://raw.githubusercontent.com/sua8051/AlamofireMapper/master/user2.json"
102 | Alamofire.request(url3, method: .get
103 | , parameters: nil, encoding: URLEncoding.default, headers: nil).responseObject { (response: DataResponse<[User]>) in
104 | switch response.result {
105 | case let .success(data):
106 | dump(data)
107 | case let .failure(error):
108 | dump(error)
109 | }
110 | }
111 | ```
112 |
113 | You can custom decode key
114 | ```swift
115 | class Movie: Decodable {
116 | var id: String!
117 | var name: String!
118 | var movies: Array!
119 | var createdAt: Date?
120 |
121 | enum CodingKeys: String, CodingKey {
122 | case id
123 | case name
124 | case movies = "movies[]"
125 | case createdAt
126 | }
127 | }
128 | ```
129 |
130 | with json as the follows:
131 |
132 | ```
133 | {
134 | "name":"paul rudd",
135 | "movies[]":[
136 | "I Love You Man",
137 | "Role Models"
138 | ],
139 | "id":"243",
140 | "createdAt":"2014-10-18T12:09:05.255Z"
141 | }
142 |
143 | ```
144 |
145 |
--------------------------------------------------------------------------------
/Example/Example.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 7B2E955B4EC1DC96D75A491B /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B36FD8185C652A9432E9DEF1 /* Pods_Example.framework */; };
11 | BA3B0A56212BE56B00A90C48 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA3B0A55212BE56B00A90C48 /* AppDelegate.swift */; };
12 | BA3B0A58212BE56B00A90C48 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA3B0A57212BE56B00A90C48 /* ViewController.swift */; };
13 | BA3B0A5B212BE56B00A90C48 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BA3B0A59212BE56B00A90C48 /* Main.storyboard */; };
14 | BA3B0A5D212BE56C00A90C48 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BA3B0A5C212BE56C00A90C48 /* Assets.xcassets */; };
15 | BA3B0A60212BE56C00A90C48 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BA3B0A5E212BE56C00A90C48 /* LaunchScreen.storyboard */; };
16 | BA3B0A68212BE64F00A90C48 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA3B0A67212BE64F00A90C48 /* Model.swift */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXFileReference section */
20 | 387F002CD0F39FC706D85B3C /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; };
21 | B36FD8185C652A9432E9DEF1 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
22 | BA3B0A52212BE56B00A90C48 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
23 | BA3B0A55212BE56B00A90C48 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
24 | BA3B0A57212BE56B00A90C48 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
25 | BA3B0A5A212BE56B00A90C48 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
26 | BA3B0A5C212BE56C00A90C48 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
27 | BA3B0A5F212BE56C00A90C48 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
28 | BA3B0A61212BE56C00A90C48 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
29 | BA3B0A67212BE64F00A90C48 /* Model.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Model.swift; path = ../../AlamofireMapperTests/Model.swift; sourceTree = ""; };
30 | E496A47BAA633D2CCDA87A2D /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; };
31 | /* End PBXFileReference section */
32 |
33 | /* Begin PBXFrameworksBuildPhase section */
34 | BA3B0A4F212BE56B00A90C48 /* Frameworks */ = {
35 | isa = PBXFrameworksBuildPhase;
36 | buildActionMask = 2147483647;
37 | files = (
38 | 7B2E955B4EC1DC96D75A491B /* Pods_Example.framework in Frameworks */,
39 | );
40 | runOnlyForDeploymentPostprocessing = 0;
41 | };
42 | /* End PBXFrameworksBuildPhase section */
43 |
44 | /* Begin PBXGroup section */
45 | 296B6591DBE5FA5C744743C1 /* Pods */ = {
46 | isa = PBXGroup;
47 | children = (
48 | 387F002CD0F39FC706D85B3C /* Pods-Example.debug.xcconfig */,
49 | E496A47BAA633D2CCDA87A2D /* Pods-Example.release.xcconfig */,
50 | );
51 | name = Pods;
52 | sourceTree = "";
53 | };
54 | BA3B0A49212BE56B00A90C48 = {
55 | isa = PBXGroup;
56 | children = (
57 | BA3B0A54212BE56B00A90C48 /* Example */,
58 | BA3B0A53212BE56B00A90C48 /* Products */,
59 | 296B6591DBE5FA5C744743C1 /* Pods */,
60 | D058E30E8F53E7008CE3E4BC /* Frameworks */,
61 | );
62 | sourceTree = "";
63 | };
64 | BA3B0A53212BE56B00A90C48 /* Products */ = {
65 | isa = PBXGroup;
66 | children = (
67 | BA3B0A52212BE56B00A90C48 /* Example.app */,
68 | );
69 | name = Products;
70 | sourceTree = "";
71 | };
72 | BA3B0A54212BE56B00A90C48 /* Example */ = {
73 | isa = PBXGroup;
74 | children = (
75 | BA3B0A67212BE64F00A90C48 /* Model.swift */,
76 | BA3B0A55212BE56B00A90C48 /* AppDelegate.swift */,
77 | BA3B0A57212BE56B00A90C48 /* ViewController.swift */,
78 | BA3B0A59212BE56B00A90C48 /* Main.storyboard */,
79 | BA3B0A5C212BE56C00A90C48 /* Assets.xcassets */,
80 | BA3B0A5E212BE56C00A90C48 /* LaunchScreen.storyboard */,
81 | BA3B0A61212BE56C00A90C48 /* Info.plist */,
82 | );
83 | path = Example;
84 | sourceTree = "";
85 | };
86 | D058E30E8F53E7008CE3E4BC /* Frameworks */ = {
87 | isa = PBXGroup;
88 | children = (
89 | B36FD8185C652A9432E9DEF1 /* Pods_Example.framework */,
90 | );
91 | name = Frameworks;
92 | sourceTree = "";
93 | };
94 | /* End PBXGroup section */
95 |
96 | /* Begin PBXNativeTarget section */
97 | BA3B0A51212BE56B00A90C48 /* Example */ = {
98 | isa = PBXNativeTarget;
99 | buildConfigurationList = BA3B0A64212BE56C00A90C48 /* Build configuration list for PBXNativeTarget "Example" */;
100 | buildPhases = (
101 | 53679D084943AA2F58CF671C /* [CP] Check Pods Manifest.lock */,
102 | BA3B0A4E212BE56B00A90C48 /* Sources */,
103 | BA3B0A4F212BE56B00A90C48 /* Frameworks */,
104 | BA3B0A50212BE56B00A90C48 /* Resources */,
105 | E1725C10AF30DE1279ECEDD4 /* [CP] Embed Pods Frameworks */,
106 | );
107 | buildRules = (
108 | );
109 | dependencies = (
110 | );
111 | name = Example;
112 | productName = Example;
113 | productReference = BA3B0A52212BE56B00A90C48 /* Example.app */;
114 | productType = "com.apple.product-type.application";
115 | };
116 | /* End PBXNativeTarget section */
117 |
118 | /* Begin PBXProject section */
119 | BA3B0A4A212BE56B00A90C48 /* Project object */ = {
120 | isa = PBXProject;
121 | attributes = {
122 | LastSwiftUpdateCheck = 0940;
123 | LastUpgradeCheck = 0940;
124 | ORGANIZATIONNAME = "Sua Le";
125 | TargetAttributes = {
126 | BA3B0A51212BE56B00A90C48 = {
127 | CreatedOnToolsVersion = 9.4.1;
128 | };
129 | };
130 | };
131 | buildConfigurationList = BA3B0A4D212BE56B00A90C48 /* Build configuration list for PBXProject "Example" */;
132 | compatibilityVersion = "Xcode 9.3";
133 | developmentRegion = en;
134 | hasScannedForEncodings = 0;
135 | knownRegions = (
136 | en,
137 | Base,
138 | );
139 | mainGroup = BA3B0A49212BE56B00A90C48;
140 | productRefGroup = BA3B0A53212BE56B00A90C48 /* Products */;
141 | projectDirPath = "";
142 | projectRoot = "";
143 | targets = (
144 | BA3B0A51212BE56B00A90C48 /* Example */,
145 | );
146 | };
147 | /* End PBXProject section */
148 |
149 | /* Begin PBXResourcesBuildPhase section */
150 | BA3B0A50212BE56B00A90C48 /* Resources */ = {
151 | isa = PBXResourcesBuildPhase;
152 | buildActionMask = 2147483647;
153 | files = (
154 | BA3B0A60212BE56C00A90C48 /* LaunchScreen.storyboard in Resources */,
155 | BA3B0A5D212BE56C00A90C48 /* Assets.xcassets in Resources */,
156 | BA3B0A5B212BE56B00A90C48 /* Main.storyboard in Resources */,
157 | );
158 | runOnlyForDeploymentPostprocessing = 0;
159 | };
160 | /* End PBXResourcesBuildPhase section */
161 |
162 | /* Begin PBXShellScriptBuildPhase section */
163 | 53679D084943AA2F58CF671C /* [CP] Check Pods Manifest.lock */ = {
164 | isa = PBXShellScriptBuildPhase;
165 | buildActionMask = 2147483647;
166 | files = (
167 | );
168 | inputPaths = (
169 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
170 | "${PODS_ROOT}/Manifest.lock",
171 | );
172 | name = "[CP] Check Pods Manifest.lock";
173 | outputPaths = (
174 | "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt",
175 | );
176 | runOnlyForDeploymentPostprocessing = 0;
177 | shellPath = /bin/sh;
178 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
179 | showEnvVarsInLog = 0;
180 | };
181 | E1725C10AF30DE1279ECEDD4 /* [CP] Embed Pods Frameworks */ = {
182 | isa = PBXShellScriptBuildPhase;
183 | buildActionMask = 2147483647;
184 | files = (
185 | );
186 | inputPaths = (
187 | "${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh",
188 | "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
189 | "${BUILT_PRODUCTS_DIR}/AlamofireMapper/AlamofireMapper.framework",
190 | );
191 | name = "[CP] Embed Pods Frameworks";
192 | outputPaths = (
193 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
194 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AlamofireMapper.framework",
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
199 | showEnvVarsInLog = 0;
200 | };
201 | /* End PBXShellScriptBuildPhase section */
202 |
203 | /* Begin PBXSourcesBuildPhase section */
204 | BA3B0A4E212BE56B00A90C48 /* Sources */ = {
205 | isa = PBXSourcesBuildPhase;
206 | buildActionMask = 2147483647;
207 | files = (
208 | BA3B0A68212BE64F00A90C48 /* Model.swift in Sources */,
209 | BA3B0A58212BE56B00A90C48 /* ViewController.swift in Sources */,
210 | BA3B0A56212BE56B00A90C48 /* AppDelegate.swift in Sources */,
211 | );
212 | runOnlyForDeploymentPostprocessing = 0;
213 | };
214 | /* End PBXSourcesBuildPhase section */
215 |
216 | /* Begin PBXVariantGroup section */
217 | BA3B0A59212BE56B00A90C48 /* Main.storyboard */ = {
218 | isa = PBXVariantGroup;
219 | children = (
220 | BA3B0A5A212BE56B00A90C48 /* Base */,
221 | );
222 | name = Main.storyboard;
223 | sourceTree = "";
224 | };
225 | BA3B0A5E212BE56C00A90C48 /* LaunchScreen.storyboard */ = {
226 | isa = PBXVariantGroup;
227 | children = (
228 | BA3B0A5F212BE56C00A90C48 /* Base */,
229 | );
230 | name = LaunchScreen.storyboard;
231 | sourceTree = "";
232 | };
233 | /* End PBXVariantGroup section */
234 |
235 | /* Begin XCBuildConfiguration section */
236 | BA3B0A62212BE56C00A90C48 /* Debug */ = {
237 | isa = XCBuildConfiguration;
238 | buildSettings = {
239 | ALWAYS_SEARCH_USER_PATHS = NO;
240 | CLANG_ANALYZER_NONNULL = YES;
241 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
242 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
243 | CLANG_CXX_LIBRARY = "libc++";
244 | CLANG_ENABLE_MODULES = YES;
245 | CLANG_ENABLE_OBJC_ARC = YES;
246 | CLANG_ENABLE_OBJC_WEAK = YES;
247 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
248 | CLANG_WARN_BOOL_CONVERSION = YES;
249 | CLANG_WARN_COMMA = YES;
250 | CLANG_WARN_CONSTANT_CONVERSION = YES;
251 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
252 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
253 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
254 | CLANG_WARN_EMPTY_BODY = YES;
255 | CLANG_WARN_ENUM_CONVERSION = YES;
256 | CLANG_WARN_INFINITE_RECURSION = YES;
257 | CLANG_WARN_INT_CONVERSION = YES;
258 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
259 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
260 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
261 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
262 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
263 | CLANG_WARN_STRICT_PROTOTYPES = YES;
264 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
265 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
266 | CLANG_WARN_UNREACHABLE_CODE = YES;
267 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
268 | CODE_SIGN_IDENTITY = "iPhone Developer";
269 | COPY_PHASE_STRIP = NO;
270 | DEBUG_INFORMATION_FORMAT = dwarf;
271 | ENABLE_STRICT_OBJC_MSGSEND = YES;
272 | ENABLE_TESTABILITY = YES;
273 | GCC_C_LANGUAGE_STANDARD = gnu11;
274 | GCC_DYNAMIC_NO_PIC = NO;
275 | GCC_NO_COMMON_BLOCKS = YES;
276 | GCC_OPTIMIZATION_LEVEL = 0;
277 | GCC_PREPROCESSOR_DEFINITIONS = (
278 | "DEBUG=1",
279 | "$(inherited)",
280 | );
281 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
282 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
283 | GCC_WARN_UNDECLARED_SELECTOR = YES;
284 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
285 | GCC_WARN_UNUSED_FUNCTION = YES;
286 | GCC_WARN_UNUSED_VARIABLE = YES;
287 | IPHONEOS_DEPLOYMENT_TARGET = 11.4;
288 | MTL_ENABLE_DEBUG_INFO = YES;
289 | ONLY_ACTIVE_ARCH = YES;
290 | SDKROOT = iphoneos;
291 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
292 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
293 | };
294 | name = Debug;
295 | };
296 | BA3B0A63212BE56C00A90C48 /* Release */ = {
297 | isa = XCBuildConfiguration;
298 | buildSettings = {
299 | ALWAYS_SEARCH_USER_PATHS = NO;
300 | CLANG_ANALYZER_NONNULL = YES;
301 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
302 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
303 | CLANG_CXX_LIBRARY = "libc++";
304 | CLANG_ENABLE_MODULES = YES;
305 | CLANG_ENABLE_OBJC_ARC = YES;
306 | CLANG_ENABLE_OBJC_WEAK = YES;
307 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
308 | CLANG_WARN_BOOL_CONVERSION = YES;
309 | CLANG_WARN_COMMA = YES;
310 | CLANG_WARN_CONSTANT_CONVERSION = YES;
311 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
312 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
313 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
314 | CLANG_WARN_EMPTY_BODY = YES;
315 | CLANG_WARN_ENUM_CONVERSION = YES;
316 | CLANG_WARN_INFINITE_RECURSION = YES;
317 | CLANG_WARN_INT_CONVERSION = YES;
318 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
319 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
320 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
321 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
322 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
323 | CLANG_WARN_STRICT_PROTOTYPES = YES;
324 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
325 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
326 | CLANG_WARN_UNREACHABLE_CODE = YES;
327 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
328 | CODE_SIGN_IDENTITY = "iPhone Developer";
329 | COPY_PHASE_STRIP = NO;
330 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
331 | ENABLE_NS_ASSERTIONS = NO;
332 | ENABLE_STRICT_OBJC_MSGSEND = YES;
333 | GCC_C_LANGUAGE_STANDARD = gnu11;
334 | GCC_NO_COMMON_BLOCKS = YES;
335 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
336 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
337 | GCC_WARN_UNDECLARED_SELECTOR = YES;
338 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
339 | GCC_WARN_UNUSED_FUNCTION = YES;
340 | GCC_WARN_UNUSED_VARIABLE = YES;
341 | IPHONEOS_DEPLOYMENT_TARGET = 11.4;
342 | MTL_ENABLE_DEBUG_INFO = NO;
343 | SDKROOT = iphoneos;
344 | SWIFT_COMPILATION_MODE = wholemodule;
345 | SWIFT_OPTIMIZATION_LEVEL = "-O";
346 | VALIDATE_PRODUCT = YES;
347 | };
348 | name = Release;
349 | };
350 | BA3B0A65212BE56C00A90C48 /* Debug */ = {
351 | isa = XCBuildConfiguration;
352 | baseConfigurationReference = 387F002CD0F39FC706D85B3C /* Pods-Example.debug.xcconfig */;
353 | buildSettings = {
354 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
355 | CODE_SIGN_STYLE = Automatic;
356 | INFOPLIST_FILE = Example/Info.plist;
357 | LD_RUNPATH_SEARCH_PATHS = (
358 | "$(inherited)",
359 | "@executable_path/Frameworks",
360 | );
361 | PRODUCT_BUNDLE_IDENTIFIER = com.kesu.Example;
362 | PRODUCT_NAME = "$(TARGET_NAME)";
363 | SWIFT_VERSION = 4.0;
364 | TARGETED_DEVICE_FAMILY = "1,2";
365 | };
366 | name = Debug;
367 | };
368 | BA3B0A66212BE56C00A90C48 /* Release */ = {
369 | isa = XCBuildConfiguration;
370 | baseConfigurationReference = E496A47BAA633D2CCDA87A2D /* Pods-Example.release.xcconfig */;
371 | buildSettings = {
372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
373 | CODE_SIGN_STYLE = Automatic;
374 | INFOPLIST_FILE = Example/Info.plist;
375 | LD_RUNPATH_SEARCH_PATHS = (
376 | "$(inherited)",
377 | "@executable_path/Frameworks",
378 | );
379 | PRODUCT_BUNDLE_IDENTIFIER = com.kesu.Example;
380 | PRODUCT_NAME = "$(TARGET_NAME)";
381 | SWIFT_VERSION = 4.0;
382 | TARGETED_DEVICE_FAMILY = "1,2";
383 | };
384 | name = Release;
385 | };
386 | /* End XCBuildConfiguration section */
387 |
388 | /* Begin XCConfigurationList section */
389 | BA3B0A4D212BE56B00A90C48 /* Build configuration list for PBXProject "Example" */ = {
390 | isa = XCConfigurationList;
391 | buildConfigurations = (
392 | BA3B0A62212BE56C00A90C48 /* Debug */,
393 | BA3B0A63212BE56C00A90C48 /* Release */,
394 | );
395 | defaultConfigurationIsVisible = 0;
396 | defaultConfigurationName = Release;
397 | };
398 | BA3B0A64212BE56C00A90C48 /* Build configuration list for PBXNativeTarget "Example" */ = {
399 | isa = XCConfigurationList;
400 | buildConfigurations = (
401 | BA3B0A65212BE56C00A90C48 /* Debug */,
402 | BA3B0A66212BE56C00A90C48 /* Release */,
403 | );
404 | defaultConfigurationIsVisible = 0;
405 | defaultConfigurationName = Release;
406 | };
407 | /* End XCConfigurationList section */
408 | };
409 | rootObject = BA3B0A4A212BE56B00A90C48 /* Project object */;
410 | }
411 |
--------------------------------------------------------------------------------
/AlamofireMapper.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 7EDC19335EB3D3A2ADEF83EA /* Pods_AlamofireMapper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85A77CE9AD5EB2C98677668F /* Pods_AlamofireMapper.framework */; };
11 | BA3B0A37212BD7F600A90C48 /* AlamofireMapper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BA3B0A2D212BD7F600A90C48 /* AlamofireMapper.framework */; };
12 | BA3B0A3C212BD7F600A90C48 /* AlamofireMapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA3B0A3B212BD7F600A90C48 /* AlamofireMapperTests.swift */; };
13 | BA3B0A3E212BD7F600A90C48 /* AlamofireMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = BA3B0A30212BD7F600A90C48 /* AlamofireMapper.h */; settings = {ATTRIBUTES = (Public, ); }; };
14 | BA3B0A48212BD87900A90C48 /* AlamofireMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA3B0A47212BD87900A90C48 /* AlamofireMapper.swift */; };
15 | EF8EFA7BA69D8D221DF1CA9F /* Pods_AlamofireMapperTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22D769A3C392F4BAC4C5F654 /* Pods_AlamofireMapperTests.framework */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXContainerItemProxy section */
19 | BA3B0A38212BD7F600A90C48 /* PBXContainerItemProxy */ = {
20 | isa = PBXContainerItemProxy;
21 | containerPortal = BA3B0A24212BD7F600A90C48 /* Project object */;
22 | proxyType = 1;
23 | remoteGlobalIDString = BA3B0A2C212BD7F600A90C48;
24 | remoteInfo = AlamofireMapper;
25 | };
26 | /* End PBXContainerItemProxy section */
27 |
28 | /* Begin PBXFileReference section */
29 | 22D769A3C392F4BAC4C5F654 /* Pods_AlamofireMapperTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AlamofireMapperTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
30 | 49196078A6615D3BDBD4E173 /* Pods-AlamofireMapper.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireMapper.release.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireMapper/Pods-AlamofireMapper.release.xcconfig"; sourceTree = ""; };
31 | 85A77CE9AD5EB2C98677668F /* Pods_AlamofireMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AlamofireMapper.framework; sourceTree = BUILT_PRODUCTS_DIR; };
32 | B16C1F808B72A12D578C72E0 /* Pods-AlamofireMapperTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireMapperTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireMapperTests/Pods-AlamofireMapperTests.debug.xcconfig"; sourceTree = ""; };
33 | BA3B0A2D212BD7F600A90C48 /* AlamofireMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AlamofireMapper.framework; sourceTree = BUILT_PRODUCTS_DIR; };
34 | BA3B0A30212BD7F600A90C48 /* AlamofireMapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AlamofireMapper.h; sourceTree = ""; };
35 | BA3B0A31212BD7F600A90C48 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
36 | BA3B0A36212BD7F600A90C48 /* AlamofireMapperTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AlamofireMapperTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
37 | BA3B0A3B212BD7F600A90C48 /* AlamofireMapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireMapperTests.swift; sourceTree = ""; };
38 | BA3B0A3D212BD7F600A90C48 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
39 | BA3B0A47212BD87900A90C48 /* AlamofireMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlamofireMapper.swift; sourceTree = ""; };
40 | DF0CAFB8386CAC46B3B662BC /* Pods-AlamofireMapperTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireMapperTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireMapperTests/Pods-AlamofireMapperTests.release.xcconfig"; sourceTree = ""; };
41 | E908820F089940FAF834F6A8 /* Pods-AlamofireMapper.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireMapper.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireMapper/Pods-AlamofireMapper.debug.xcconfig"; sourceTree = ""; };
42 | /* End PBXFileReference section */
43 |
44 | /* Begin PBXFrameworksBuildPhase section */
45 | BA3B0A29212BD7F600A90C48 /* Frameworks */ = {
46 | isa = PBXFrameworksBuildPhase;
47 | buildActionMask = 2147483647;
48 | files = (
49 | 7EDC19335EB3D3A2ADEF83EA /* Pods_AlamofireMapper.framework in Frameworks */,
50 | );
51 | runOnlyForDeploymentPostprocessing = 0;
52 | };
53 | BA3B0A33212BD7F600A90C48 /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | BA3B0A37212BD7F600A90C48 /* AlamofireMapper.framework in Frameworks */,
58 | EF8EFA7BA69D8D221DF1CA9F /* Pods_AlamofireMapperTests.framework in Frameworks */,
59 | );
60 | runOnlyForDeploymentPostprocessing = 0;
61 | };
62 | /* End PBXFrameworksBuildPhase section */
63 |
64 | /* Begin PBXGroup section */
65 | 696B1A4FA4758588F989F3F9 /* Pods */ = {
66 | isa = PBXGroup;
67 | children = (
68 | E908820F089940FAF834F6A8 /* Pods-AlamofireMapper.debug.xcconfig */,
69 | 49196078A6615D3BDBD4E173 /* Pods-AlamofireMapper.release.xcconfig */,
70 | B16C1F808B72A12D578C72E0 /* Pods-AlamofireMapperTests.debug.xcconfig */,
71 | DF0CAFB8386CAC46B3B662BC /* Pods-AlamofireMapperTests.release.xcconfig */,
72 | );
73 | name = Pods;
74 | sourceTree = "";
75 | };
76 | BA3B0A23212BD7F600A90C48 = {
77 | isa = PBXGroup;
78 | children = (
79 | BA3B0A2F212BD7F600A90C48 /* AlamofireMapper */,
80 | BA3B0A3A212BD7F600A90C48 /* AlamofireMapperTests */,
81 | BA3B0A2E212BD7F600A90C48 /* Products */,
82 | 696B1A4FA4758588F989F3F9 /* Pods */,
83 | EDDDDE555E742FFDF09BE477 /* Frameworks */,
84 | );
85 | sourceTree = "";
86 | };
87 | BA3B0A2E212BD7F600A90C48 /* Products */ = {
88 | isa = PBXGroup;
89 | children = (
90 | BA3B0A2D212BD7F600A90C48 /* AlamofireMapper.framework */,
91 | BA3B0A36212BD7F600A90C48 /* AlamofireMapperTests.xctest */,
92 | );
93 | name = Products;
94 | sourceTree = "";
95 | };
96 | BA3B0A2F212BD7F600A90C48 /* AlamofireMapper */ = {
97 | isa = PBXGroup;
98 | children = (
99 | BA3B0A47212BD87900A90C48 /* AlamofireMapper.swift */,
100 | BA3B0A30212BD7F600A90C48 /* AlamofireMapper.h */,
101 | BA3B0A31212BD7F600A90C48 /* Info.plist */,
102 | );
103 | path = AlamofireMapper;
104 | sourceTree = "";
105 | };
106 | BA3B0A3A212BD7F600A90C48 /* AlamofireMapperTests */ = {
107 | isa = PBXGroup;
108 | children = (
109 | BA3B0A3B212BD7F600A90C48 /* AlamofireMapperTests.swift */,
110 | BA3B0A3D212BD7F600A90C48 /* Info.plist */,
111 | );
112 | path = AlamofireMapperTests;
113 | sourceTree = "";
114 | };
115 | EDDDDE555E742FFDF09BE477 /* Frameworks */ = {
116 | isa = PBXGroup;
117 | children = (
118 | 85A77CE9AD5EB2C98677668F /* Pods_AlamofireMapper.framework */,
119 | 22D769A3C392F4BAC4C5F654 /* Pods_AlamofireMapperTests.framework */,
120 | );
121 | name = Frameworks;
122 | sourceTree = "";
123 | };
124 | /* End PBXGroup section */
125 |
126 | /* Begin PBXHeadersBuildPhase section */
127 | BA3B0A2A212BD7F600A90C48 /* Headers */ = {
128 | isa = PBXHeadersBuildPhase;
129 | buildActionMask = 2147483647;
130 | files = (
131 | BA3B0A3E212BD7F600A90C48 /* AlamofireMapper.h in Headers */,
132 | );
133 | runOnlyForDeploymentPostprocessing = 0;
134 | };
135 | /* End PBXHeadersBuildPhase section */
136 |
137 | /* Begin PBXNativeTarget section */
138 | BA3B0A2C212BD7F600A90C48 /* AlamofireMapper */ = {
139 | isa = PBXNativeTarget;
140 | buildConfigurationList = BA3B0A41212BD7F600A90C48 /* Build configuration list for PBXNativeTarget "AlamofireMapper" */;
141 | buildPhases = (
142 | 4EB30DFB6D827B192D21A164 /* [CP] Check Pods Manifest.lock */,
143 | BA3B0A28212BD7F600A90C48 /* Sources */,
144 | BA3B0A29212BD7F600A90C48 /* Frameworks */,
145 | BA3B0A2A212BD7F600A90C48 /* Headers */,
146 | BA3B0A2B212BD7F600A90C48 /* Resources */,
147 | );
148 | buildRules = (
149 | );
150 | dependencies = (
151 | );
152 | name = AlamofireMapper;
153 | productName = AlamofireMapper;
154 | productReference = BA3B0A2D212BD7F600A90C48 /* AlamofireMapper.framework */;
155 | productType = "com.apple.product-type.framework";
156 | };
157 | BA3B0A35212BD7F600A90C48 /* AlamofireMapperTests */ = {
158 | isa = PBXNativeTarget;
159 | buildConfigurationList = BA3B0A44212BD7F600A90C48 /* Build configuration list for PBXNativeTarget "AlamofireMapperTests" */;
160 | buildPhases = (
161 | D3D380C0E27DCC05F2206C14 /* [CP] Check Pods Manifest.lock */,
162 | BA3B0A32212BD7F600A90C48 /* Sources */,
163 | BA3B0A33212BD7F600A90C48 /* Frameworks */,
164 | BA3B0A34212BD7F600A90C48 /* Resources */,
165 | 4065F5FE86C34D2A17ABF12B /* [CP] Embed Pods Frameworks */,
166 | );
167 | buildRules = (
168 | );
169 | dependencies = (
170 | BA3B0A39212BD7F600A90C48 /* PBXTargetDependency */,
171 | );
172 | name = AlamofireMapperTests;
173 | productName = AlamofireMapperTests;
174 | productReference = BA3B0A36212BD7F600A90C48 /* AlamofireMapperTests.xctest */;
175 | productType = "com.apple.product-type.bundle.unit-test";
176 | };
177 | /* End PBXNativeTarget section */
178 |
179 | /* Begin PBXProject section */
180 | BA3B0A24212BD7F600A90C48 /* Project object */ = {
181 | isa = PBXProject;
182 | attributes = {
183 | LastSwiftUpdateCheck = 0940;
184 | LastUpgradeCheck = 0940;
185 | ORGANIZATIONNAME = "Sua Le";
186 | TargetAttributes = {
187 | BA3B0A2C212BD7F600A90C48 = {
188 | CreatedOnToolsVersion = 9.4.1;
189 | LastSwiftMigration = 0940;
190 | };
191 | BA3B0A35212BD7F600A90C48 = {
192 | CreatedOnToolsVersion = 9.4.1;
193 | };
194 | };
195 | };
196 | buildConfigurationList = BA3B0A27212BD7F600A90C48 /* Build configuration list for PBXProject "AlamofireMapper" */;
197 | compatibilityVersion = "Xcode 9.3";
198 | developmentRegion = en;
199 | hasScannedForEncodings = 0;
200 | knownRegions = (
201 | en,
202 | );
203 | mainGroup = BA3B0A23212BD7F600A90C48;
204 | productRefGroup = BA3B0A2E212BD7F600A90C48 /* Products */;
205 | projectDirPath = "";
206 | projectRoot = "";
207 | targets = (
208 | BA3B0A2C212BD7F600A90C48 /* AlamofireMapper */,
209 | BA3B0A35212BD7F600A90C48 /* AlamofireMapperTests */,
210 | );
211 | };
212 | /* End PBXProject section */
213 |
214 | /* Begin PBXResourcesBuildPhase section */
215 | BA3B0A2B212BD7F600A90C48 /* Resources */ = {
216 | isa = PBXResourcesBuildPhase;
217 | buildActionMask = 2147483647;
218 | files = (
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | };
222 | BA3B0A34212BD7F600A90C48 /* Resources */ = {
223 | isa = PBXResourcesBuildPhase;
224 | buildActionMask = 2147483647;
225 | files = (
226 | );
227 | runOnlyForDeploymentPostprocessing = 0;
228 | };
229 | /* End PBXResourcesBuildPhase section */
230 |
231 | /* Begin PBXShellScriptBuildPhase section */
232 | 4065F5FE86C34D2A17ABF12B /* [CP] Embed Pods Frameworks */ = {
233 | isa = PBXShellScriptBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | );
237 | inputFileListPaths = (
238 | );
239 | inputPaths = (
240 | "${SRCROOT}/Pods/Target Support Files/Pods-AlamofireMapperTests/Pods-AlamofireMapperTests-frameworks.sh",
241 | "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
242 | );
243 | name = "[CP] Embed Pods Frameworks";
244 | outputFileListPaths = (
245 | );
246 | outputPaths = (
247 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | shellPath = /bin/sh;
251 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AlamofireMapperTests/Pods-AlamofireMapperTests-frameworks.sh\"\n";
252 | showEnvVarsInLog = 0;
253 | };
254 | 4EB30DFB6D827B192D21A164 /* [CP] Check Pods Manifest.lock */ = {
255 | isa = PBXShellScriptBuildPhase;
256 | buildActionMask = 2147483647;
257 | files = (
258 | );
259 | inputFileListPaths = (
260 | );
261 | inputPaths = (
262 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
263 | "${PODS_ROOT}/Manifest.lock",
264 | );
265 | name = "[CP] Check Pods Manifest.lock";
266 | outputFileListPaths = (
267 | );
268 | outputPaths = (
269 | "$(DERIVED_FILE_DIR)/Pods-AlamofireMapper-checkManifestLockResult.txt",
270 | );
271 | runOnlyForDeploymentPostprocessing = 0;
272 | shellPath = /bin/sh;
273 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
274 | showEnvVarsInLog = 0;
275 | };
276 | D3D380C0E27DCC05F2206C14 /* [CP] Check Pods Manifest.lock */ = {
277 | isa = PBXShellScriptBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | );
281 | inputFileListPaths = (
282 | );
283 | inputPaths = (
284 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
285 | "${PODS_ROOT}/Manifest.lock",
286 | );
287 | name = "[CP] Check Pods Manifest.lock";
288 | outputFileListPaths = (
289 | );
290 | outputPaths = (
291 | "$(DERIVED_FILE_DIR)/Pods-AlamofireMapperTests-checkManifestLockResult.txt",
292 | );
293 | runOnlyForDeploymentPostprocessing = 0;
294 | shellPath = /bin/sh;
295 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
296 | showEnvVarsInLog = 0;
297 | };
298 | /* End PBXShellScriptBuildPhase section */
299 |
300 | /* Begin PBXSourcesBuildPhase section */
301 | BA3B0A28212BD7F600A90C48 /* Sources */ = {
302 | isa = PBXSourcesBuildPhase;
303 | buildActionMask = 2147483647;
304 | files = (
305 | BA3B0A48212BD87900A90C48 /* AlamofireMapper.swift in Sources */,
306 | );
307 | runOnlyForDeploymentPostprocessing = 0;
308 | };
309 | BA3B0A32212BD7F600A90C48 /* Sources */ = {
310 | isa = PBXSourcesBuildPhase;
311 | buildActionMask = 2147483647;
312 | files = (
313 | BA3B0A3C212BD7F600A90C48 /* AlamofireMapperTests.swift in Sources */,
314 | );
315 | runOnlyForDeploymentPostprocessing = 0;
316 | };
317 | /* End PBXSourcesBuildPhase section */
318 |
319 | /* Begin PBXTargetDependency section */
320 | BA3B0A39212BD7F600A90C48 /* PBXTargetDependency */ = {
321 | isa = PBXTargetDependency;
322 | target = BA3B0A2C212BD7F600A90C48 /* AlamofireMapper */;
323 | targetProxy = BA3B0A38212BD7F600A90C48 /* PBXContainerItemProxy */;
324 | };
325 | /* End PBXTargetDependency section */
326 |
327 | /* Begin XCBuildConfiguration section */
328 | BA3B0A3F212BD7F600A90C48 /* Debug */ = {
329 | isa = XCBuildConfiguration;
330 | buildSettings = {
331 | ALWAYS_SEARCH_USER_PATHS = NO;
332 | CLANG_ANALYZER_NONNULL = YES;
333 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
335 | CLANG_CXX_LIBRARY = "libc++";
336 | CLANG_ENABLE_MODULES = YES;
337 | CLANG_ENABLE_OBJC_ARC = YES;
338 | CLANG_ENABLE_OBJC_WEAK = YES;
339 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
340 | CLANG_WARN_BOOL_CONVERSION = YES;
341 | CLANG_WARN_COMMA = YES;
342 | CLANG_WARN_CONSTANT_CONVERSION = YES;
343 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
344 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
345 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
346 | CLANG_WARN_EMPTY_BODY = YES;
347 | CLANG_WARN_ENUM_CONVERSION = YES;
348 | CLANG_WARN_INFINITE_RECURSION = YES;
349 | CLANG_WARN_INT_CONVERSION = YES;
350 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
351 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
352 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
353 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
354 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
355 | CLANG_WARN_STRICT_PROTOTYPES = YES;
356 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
357 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
358 | CLANG_WARN_UNREACHABLE_CODE = YES;
359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
360 | CODE_SIGN_IDENTITY = "iPhone Developer";
361 | COPY_PHASE_STRIP = NO;
362 | CURRENT_PROJECT_VERSION = 1;
363 | DEBUG_INFORMATION_FORMAT = dwarf;
364 | ENABLE_STRICT_OBJC_MSGSEND = YES;
365 | ENABLE_TESTABILITY = YES;
366 | GCC_C_LANGUAGE_STANDARD = gnu11;
367 | GCC_DYNAMIC_NO_PIC = NO;
368 | GCC_NO_COMMON_BLOCKS = YES;
369 | GCC_OPTIMIZATION_LEVEL = 0;
370 | GCC_PREPROCESSOR_DEFINITIONS = (
371 | "DEBUG=1",
372 | "$(inherited)",
373 | );
374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
376 | GCC_WARN_UNDECLARED_SELECTOR = YES;
377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
378 | GCC_WARN_UNUSED_FUNCTION = YES;
379 | GCC_WARN_UNUSED_VARIABLE = YES;
380 | IPHONEOS_DEPLOYMENT_TARGET = 11.4;
381 | MTL_ENABLE_DEBUG_INFO = YES;
382 | ONLY_ACTIVE_ARCH = YES;
383 | SDKROOT = iphoneos;
384 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
385 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
386 | VERSIONING_SYSTEM = "apple-generic";
387 | VERSION_INFO_PREFIX = "";
388 | };
389 | name = Debug;
390 | };
391 | BA3B0A40212BD7F600A90C48 /* Release */ = {
392 | isa = XCBuildConfiguration;
393 | buildSettings = {
394 | ALWAYS_SEARCH_USER_PATHS = NO;
395 | CLANG_ANALYZER_NONNULL = YES;
396 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
397 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
398 | CLANG_CXX_LIBRARY = "libc++";
399 | CLANG_ENABLE_MODULES = YES;
400 | CLANG_ENABLE_OBJC_ARC = YES;
401 | CLANG_ENABLE_OBJC_WEAK = YES;
402 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
403 | CLANG_WARN_BOOL_CONVERSION = YES;
404 | CLANG_WARN_COMMA = YES;
405 | CLANG_WARN_CONSTANT_CONVERSION = YES;
406 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
407 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
408 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
409 | CLANG_WARN_EMPTY_BODY = YES;
410 | CLANG_WARN_ENUM_CONVERSION = YES;
411 | CLANG_WARN_INFINITE_RECURSION = YES;
412 | CLANG_WARN_INT_CONVERSION = YES;
413 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
414 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
415 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
416 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
417 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
418 | CLANG_WARN_STRICT_PROTOTYPES = YES;
419 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
420 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
421 | CLANG_WARN_UNREACHABLE_CODE = YES;
422 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
423 | CODE_SIGN_IDENTITY = "iPhone Developer";
424 | COPY_PHASE_STRIP = NO;
425 | CURRENT_PROJECT_VERSION = 1;
426 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
427 | ENABLE_NS_ASSERTIONS = NO;
428 | ENABLE_STRICT_OBJC_MSGSEND = YES;
429 | GCC_C_LANGUAGE_STANDARD = gnu11;
430 | GCC_NO_COMMON_BLOCKS = YES;
431 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
432 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
433 | GCC_WARN_UNDECLARED_SELECTOR = YES;
434 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
435 | GCC_WARN_UNUSED_FUNCTION = YES;
436 | GCC_WARN_UNUSED_VARIABLE = YES;
437 | IPHONEOS_DEPLOYMENT_TARGET = 11.4;
438 | MTL_ENABLE_DEBUG_INFO = NO;
439 | SDKROOT = iphoneos;
440 | SWIFT_COMPILATION_MODE = wholemodule;
441 | SWIFT_OPTIMIZATION_LEVEL = "-O";
442 | VALIDATE_PRODUCT = YES;
443 | VERSIONING_SYSTEM = "apple-generic";
444 | VERSION_INFO_PREFIX = "";
445 | };
446 | name = Release;
447 | };
448 | BA3B0A42212BD7F600A90C48 /* Debug */ = {
449 | isa = XCBuildConfiguration;
450 | baseConfigurationReference = E908820F089940FAF834F6A8 /* Pods-AlamofireMapper.debug.xcconfig */;
451 | buildSettings = {
452 | CLANG_ENABLE_MODULES = YES;
453 | CODE_SIGN_IDENTITY = "";
454 | CODE_SIGN_STYLE = Automatic;
455 | DEFINES_MODULE = YES;
456 | DYLIB_COMPATIBILITY_VERSION = 1;
457 | DYLIB_CURRENT_VERSION = 1;
458 | DYLIB_INSTALL_NAME_BASE = "@rpath";
459 | INFOPLIST_FILE = AlamofireMapper/Info.plist;
460 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
461 | LD_RUNPATH_SEARCH_PATHS = (
462 | "$(inherited)",
463 | "@executable_path/Frameworks",
464 | "@loader_path/Frameworks",
465 | );
466 | PRODUCT_BUNDLE_IDENTIFIER = com.kesu.AlamofireMapper;
467 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
468 | SKIP_INSTALL = YES;
469 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
470 | SWIFT_VERSION = 4.0;
471 | TARGETED_DEVICE_FAMILY = "1,2";
472 | };
473 | name = Debug;
474 | };
475 | BA3B0A43212BD7F600A90C48 /* Release */ = {
476 | isa = XCBuildConfiguration;
477 | baseConfigurationReference = 49196078A6615D3BDBD4E173 /* Pods-AlamofireMapper.release.xcconfig */;
478 | buildSettings = {
479 | CLANG_ENABLE_MODULES = YES;
480 | CODE_SIGN_IDENTITY = "";
481 | CODE_SIGN_STYLE = Automatic;
482 | DEFINES_MODULE = YES;
483 | DYLIB_COMPATIBILITY_VERSION = 1;
484 | DYLIB_CURRENT_VERSION = 1;
485 | DYLIB_INSTALL_NAME_BASE = "@rpath";
486 | INFOPLIST_FILE = AlamofireMapper/Info.plist;
487 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
488 | LD_RUNPATH_SEARCH_PATHS = (
489 | "$(inherited)",
490 | "@executable_path/Frameworks",
491 | "@loader_path/Frameworks",
492 | );
493 | PRODUCT_BUNDLE_IDENTIFIER = com.kesu.AlamofireMapper;
494 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
495 | SKIP_INSTALL = YES;
496 | SWIFT_VERSION = 4.0;
497 | TARGETED_DEVICE_FAMILY = "1,2";
498 | };
499 | name = Release;
500 | };
501 | BA3B0A45212BD7F600A90C48 /* Debug */ = {
502 | isa = XCBuildConfiguration;
503 | baseConfigurationReference = B16C1F808B72A12D578C72E0 /* Pods-AlamofireMapperTests.debug.xcconfig */;
504 | buildSettings = {
505 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
506 | CODE_SIGN_STYLE = Automatic;
507 | INFOPLIST_FILE = AlamofireMapperTests/Info.plist;
508 | LD_RUNPATH_SEARCH_PATHS = (
509 | "$(inherited)",
510 | "@executable_path/Frameworks",
511 | "@loader_path/Frameworks",
512 | );
513 | PRODUCT_BUNDLE_IDENTIFIER = com.kesu.AlamofireMapperTests;
514 | PRODUCT_NAME = "$(TARGET_NAME)";
515 | SWIFT_VERSION = 4.0;
516 | TARGETED_DEVICE_FAMILY = "1,2";
517 | };
518 | name = Debug;
519 | };
520 | BA3B0A46212BD7F600A90C48 /* Release */ = {
521 | isa = XCBuildConfiguration;
522 | baseConfigurationReference = DF0CAFB8386CAC46B3B662BC /* Pods-AlamofireMapperTests.release.xcconfig */;
523 | buildSettings = {
524 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
525 | CODE_SIGN_STYLE = Automatic;
526 | INFOPLIST_FILE = AlamofireMapperTests/Info.plist;
527 | LD_RUNPATH_SEARCH_PATHS = (
528 | "$(inherited)",
529 | "@executable_path/Frameworks",
530 | "@loader_path/Frameworks",
531 | );
532 | PRODUCT_BUNDLE_IDENTIFIER = com.kesu.AlamofireMapperTests;
533 | PRODUCT_NAME = "$(TARGET_NAME)";
534 | SWIFT_VERSION = 4.0;
535 | TARGETED_DEVICE_FAMILY = "1,2";
536 | };
537 | name = Release;
538 | };
539 | /* End XCBuildConfiguration section */
540 |
541 | /* Begin XCConfigurationList section */
542 | BA3B0A27212BD7F600A90C48 /* Build configuration list for PBXProject "AlamofireMapper" */ = {
543 | isa = XCConfigurationList;
544 | buildConfigurations = (
545 | BA3B0A3F212BD7F600A90C48 /* Debug */,
546 | BA3B0A40212BD7F600A90C48 /* Release */,
547 | );
548 | defaultConfigurationIsVisible = 0;
549 | defaultConfigurationName = Release;
550 | };
551 | BA3B0A41212BD7F600A90C48 /* Build configuration list for PBXNativeTarget "AlamofireMapper" */ = {
552 | isa = XCConfigurationList;
553 | buildConfigurations = (
554 | BA3B0A42212BD7F600A90C48 /* Debug */,
555 | BA3B0A43212BD7F600A90C48 /* Release */,
556 | );
557 | defaultConfigurationIsVisible = 0;
558 | defaultConfigurationName = Release;
559 | };
560 | BA3B0A44212BD7F600A90C48 /* Build configuration list for PBXNativeTarget "AlamofireMapperTests" */ = {
561 | isa = XCConfigurationList;
562 | buildConfigurations = (
563 | BA3B0A45212BD7F600A90C48 /* Debug */,
564 | BA3B0A46212BD7F600A90C48 /* Release */,
565 | );
566 | defaultConfigurationIsVisible = 0;
567 | defaultConfigurationName = Release;
568 | };
569 | /* End XCConfigurationList section */
570 | };
571 | rootObject = BA3B0A24212BD7F600A90C48 /* Project object */;
572 | }
573 |
--------------------------------------------------------------------------------