├── .swift-version
├── .swiftlint.yml
├── Tests
└── AlamofireXMLRPCTests
│ ├── testFault.xml
│ ├── testArrayParam.xml
│ ├── testFaultStruct.xml
│ ├── call.xml
│ ├── testStructParam.xml
│ ├── XMLRPCNodeTests.swift
│ ├── Info.plist
│ ├── testParams.xml
│ ├── XMLRPCCallTests.swift
│ ├── XMLResponseSerializerTests.swift
│ └── XMLRPCResponseSerializerTests.swift
├── .travis.yml
├── .gitignore
├── Package.swift
├── Podfile
├── Podfile.lock
├── Sources
└── AlamofireXMLRPC
│ ├── AlamofireXMLRPC.h
│ ├── XMLRPCError.swift
│ ├── Info.plist
│ ├── Alamofire+XML.swift
│ ├── XMLRPCNode.swift
│ ├── AEXML+RPC.swift
│ ├── Value.swift
│ └── Alamofire+XMLRPC.swift
├── LICENSE
├── AlamofireXMLRPC.podspec
├── AlamofireXMLRPC.xcodeproj
├── xcshareddata
│ └── xcschemes
│ │ └── AlamofireXMLRPC.xcscheme
└── project.pbxproj
└── README.md
/.swift-version:
--------------------------------------------------------------------------------
1 | 5.0
2 |
--------------------------------------------------------------------------------
/.swiftlint.yml:
--------------------------------------------------------------------------------
1 | excluded:
2 | - Pods
3 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/testFault.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | No such method!
5 |
6 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | osx_image: xcode12
3 | cache:
4 | - bundler
5 | - cocoapods
6 | script:
7 | - xcodebuild -scheme AlamofireXMLRPC -workspace AlamofireXMLRPC.xcworkspace build test
8 | after_success:
9 | - bash <(curl -s https://codecov.io/bash) -J 'AlamofireXMLRPC'
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | _Store
2 | build/
3 | *.pbxuser
4 | !default.pbxuser
5 | *.mode1v3
6 | !default.mode1v3
7 | *.mode2v3
8 | !default.mode2v3
9 | *.perspectivev3
10 | !default.perspectivev3
11 | xcuserdata
12 | profile
13 | *.moved-aside
14 | DerivedData
15 | .idea/
16 | *.o
17 | */Iconr
18 | Pods/
19 | *.xcworkspace/
20 | .DS_Store
21 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.0
2 | import PackageDescription
3 |
4 | let package = Package(
5 | name: "AlamofireXMLRPC",
6 | dependencies: [
7 | .Package(url: "https://github.com/Alamofire/Alamofire", majorVersion: 5),
8 | .Package(url: "https://github.com/tadija/AEXML.git", majorVersion: 4)
9 | ]
10 | )
11 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'AlamofireXMLRPC' do
4 | pod 'AEXML', '~> 4.6.0'
5 | pod 'Alamofire', '~> 5.4.2'
6 | pod 'SwiftLint'
7 |
8 | target 'AlamofireXMLRPCTests' do
9 | end
10 | end
11 |
12 | post_install do |installer_representation|
13 | installer_representation.pods_project.targets.each do |target|
14 | target.build_configurations.each do |config|
15 | config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/testArrayParam.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello
6 |
7 |
8 |
9 |
10 |
11 | 42
12 | 1.61
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - AEXML (4.6.0)
3 | - Alamofire (5.4.2)
4 | - SwiftLint (0.43.1)
5 |
6 | DEPENDENCIES:
7 | - AEXML (~> 4.6.0)
8 | - Alamofire (~> 5.4.2)
9 | - SwiftLint
10 |
11 | SPEC REPOS:
12 | trunk:
13 | - AEXML
14 | - Alamofire
15 | - SwiftLint
16 |
17 | SPEC CHECKSUMS:
18 | AEXML: 2fbb73d8724797ed2cde888731e176fa4d44dd83
19 | Alamofire: bfbc4c2fe5909b1d94fb4ef2277c6b3727ef5dae
20 | SwiftLint: 99f82d07b837b942dd563c668de129a03fc3fb52
21 |
22 | PODFILE CHECKSUM: d3ec8a542581170f3be186381ec815171e6c31fc
23 |
24 | COCOAPODS: 1.10.1
25 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/testFaultStruct.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | faultCode
8 | 26
9 |
10 |
11 | faultString
12 | No such method!
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/call.xml:
--------------------------------------------------------------------------------
1 | helloHello423.14119870513T08:27:30VmFsYXIgbW9yZ2h1bGlznameJohn Doe
--------------------------------------------------------------------------------
/Sources/AlamofireXMLRPC/AlamofireXMLRPC.h:
--------------------------------------------------------------------------------
1 | //
2 | // AlamofireXMLRPC.h
3 | // AlamofireXMLRPC
4 | //
5 | // Created by Jeremy Marchand on 05/10/15.
6 | // Copyright © 2015 kodlian. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for AlamofireXMLRPC.
12 | FOUNDATION_EXPORT double AlamofireXMLRPCVersionNumber;
13 |
14 | //! Project version string for AlamofireXMLRPC.
15 | FOUNDATION_EXPORT const unsigned char AlamofireXMLRPCVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/testStructParam.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello
6 |
7 |
8 |
9 |
10 |
11 | name
12 | John Doe
13 |
14 |
15 | age
16 | 32
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Sources/AlamofireXMLRPC/XMLRPCError.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XMLRPCError.swift
3 | // AlamofireXMLRPC
4 | //
5 | // Created by Jeremy Marchand on 15/08/2016.
6 | // Copyright © 2016 kodlian. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public enum XMLRPCError: Error {
12 | public enum ResponseSerializationFailureReason {
13 | case inputDataNilOrZeroLength
14 | case nodeNotFound(node: XMLRPCNodeKind)
15 | case xmlSerializationFailed(error: Error)
16 | }
17 |
18 | case networkError(Error?)
19 | case xmlSerializationFailed
20 | case parseFailed
21 | case nodeNotFound(node: XMLRPCNodeKind)
22 | case fault(node: XMLRPCNode)
23 | case responseSerializationFailed(reason: ResponseSerializationFailureReason)
24 | }
25 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/XMLRPCNodeTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XMLRPCNodeTests.swift
3 | // AlamofireXMLRPCTests
4 | //
5 | // Created by Jonathan Foster on 04/06/2021.
6 | // Copyright © 2016 kodlian. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import AEXML
11 | @testable import AlamofireXMLRPC
12 |
13 | class XMLRPCNodeTests: XCTestCase {
14 | func testInt() {
15 | let element = AEXMLElement(rpcNode: XMLRPCNodeKind.parameter)
16 | element.addChild(rpcValue: 1)
17 | let node = XMLRPCNode(xml: element)
18 |
19 | XCTAssert(node.int == 1)
20 | }
21 |
22 | func testKind() {
23 | let element = AEXMLElement(rpcNode: XMLRPCNodeKind.methodResponse)
24 | let node = XMLRPCNode(xml: element)
25 |
26 | XCTAssert(node.kind == XMLRPCNodeKind.methodResponse)
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/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 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/testParams.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello
6 |
7 |
8 | Hello Again
9 |
10 |
11 | 42
12 |
13 |
14 | 42
15 |
16 |
17 | 3.14
18 |
19 |
20 | 1
21 |
22 |
23 | 19870513T08:27:30
24 |
25 |
26 | VmFsYXIgbW9yZ2h1bGlz
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Sources/AlamofireXMLRPC/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 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSHumanReadableCopyright
24 | Copyright © 2015 kodlian. All rights reserved.
25 | NSPrincipalClass
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Jeremy Marchand (kodlian.com)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/XMLRPCCallTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XMLRPCCallTests.swift
3 | // AlamofireXMLRPC
4 | //
5 | // Created by Jeremy Marchand on 15/08/2016.
6 | // Copyright © 2016 kodlian. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import Alamofire
11 | @testable import AlamofireXMLRPC
12 |
13 | class XMLRPCCallTests: XCTestCase {
14 | func testCall() {
15 | let parameters: [Any] = [
16 | "Hello",
17 | 42,
18 | 3.14,
19 | true, iso8601DateFormatter.date(from: "19870513T08:27:30")!,
20 | "Valar morghulis".data(using: String.Encoding.utf8)!,
21 | ["name": "John Doe"]
22 | ]
23 |
24 | let path = Bundle(for: XMLRPCCallTests.self).path(forResource: "call", ofType: "xml", inDirectory: nil)!
25 |
26 | guard let text = try? String(contentsOfFile: path, encoding: .utf8)
27 | .trimmingCharacters(in: CharacterSet(charactersIn: "\t\n"))
28 | else {
29 | XCTFail("reading contents of file '\(path)' failed")
30 | return
31 | }
32 |
33 | let call = XMLRPCCallDocument(methodName: "hello", parameters: parameters)
34 |
35 | XCTAssertEqual(call.xmlCompact, text)
36 |
37 | print(call.xmlCompact)
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/AlamofireXMLRPC.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
3 | s.name = "AlamofireXMLRPC"
4 | s.version = "2.2.0"
5 | s.summary = "AlamofireXMLRPC brings XMLRPC functionalities to Alamofire."
6 | s.description = "AlamofireXMLRPC brings XMLRPC functionalities to Alamofire. It aims to provide an easy way to perform XMLRPC call and to retrieve smoothly the response."
7 | s.homepage = "https://github.com/kodlian/AlamofireXMLRPC"
8 |
9 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
10 | s.license = "MIT"
11 |
12 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
13 | s.author = "Jérémy Marchand"
14 | s.social_media_url = "http://twitter.com/kodlian"
15 |
16 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
17 |
18 | # When using multiple platforms
19 | s.ios.deployment_target = "9.0"
20 | s.tvos.deployment_target = "9.0"
21 | s.osx.deployment_target = "10.12"
22 |
23 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
24 | s.source = { :git => "https://github.com/kodlian/AlamofireXMLRPC.git", :tag => s.version }
25 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
26 | s.source_files = "Sources/AlamofireXMLRPC/*.swift"
27 |
28 | # Dependency
29 | s.dependency 'AEXML', '~> 4.6.0'
30 | s.dependency 'Alamofire', '~> 5.4.2'
31 | end
32 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/XMLResponseSerializerTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XMLResponseSerializerTests.swift
3 | // AlamofireXMLRPCTests
4 | //
5 | // Created by Jonathan Foster on 04/06/2021.
6 | // Copyright © 2021 kodlian. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import AEXML
11 | import Alamofire
12 | @testable import AlamofireXMLRPC
13 |
14 | class XMLResponseSerializerTests: XCTestCase {
15 | func testEmptyResponse() {
16 | let serializer = XMLResponseSerializer()
17 | let responseURL = URL(string: "http://localhost")!
18 | let response = HTTPURLResponse(url: responseURL, statusCode: 200, httpVersion: nil, headerFields: nil)
19 |
20 | do {
21 | _ = try serializer.serialize(request: nil, response: response, data: nil, error: nil)
22 | } catch XMLRPCError.responseSerializationFailed(let reason) {
23 | switch reason {
24 | case .inputDataNilOrZeroLength:
25 | XCTAssertTrue(true)
26 | default:
27 | XCTFail("reason not input data nil or zero length: \(reason)")
28 | }
29 | } catch {
30 | XCTFail(error.localizedDescription)
31 | }
32 | }
33 |
34 | func testEmptyResponseWhenAllowed() {
35 | let serializer = XMLResponseSerializer()
36 | let responseURL = URL(string: "http://localhost")!
37 | let response = HTTPURLResponse(url: responseURL, statusCode: 204, httpVersion: nil, headerFields: nil)
38 |
39 | var result: AEXMLDocument?
40 |
41 | do {
42 | result = try serializer.serialize(request: nil, response: response, data: nil, error: nil)
43 | } catch {
44 | XCTFail(error.localizedDescription)
45 | return
46 | }
47 |
48 | guard let document = result else {
49 | XCTFail("node is nil")
50 | return
51 | }
52 |
53 | XCTAssert(document.root.error == AEXMLError.rootElementMissing)
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Sources/AlamofireXMLRPC/Alamofire+XML.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Alanofire+XML.swift
3 | // AlamofireXMLRPC
4 | //
5 | // Created by Jeremy Marchand on 08/10/2015.
6 | // Copyright © 2015 kodlian. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import AEXML
11 | import Alamofire
12 |
13 | extension DataRequest {
14 | @discardableResult public func responseXML(
15 | queue: DispatchQueue = .main,
16 | dataPreprocessor: DataPreprocessor = XMLResponseSerializer.defaultDataPreprocessor,
17 | emptyResponseCodes: Set = XMLResponseSerializer.defaultEmptyResponseCodes,
18 | emptyRequestMethods: Set = XMLResponseSerializer.defaultEmptyRequestMethods,
19 | completionHandler: @escaping (AFDataResponse) -> Void
20 | ) -> Self {
21 | response(
22 | queue: queue,
23 | responseSerializer: XMLResponseSerializer(
24 | dataPreprocessor: dataPreprocessor,
25 | emptyResponseCodes: emptyResponseCodes,
26 | emptyRequestMethods: emptyRequestMethods
27 | ),
28 | completionHandler: completionHandler)
29 | }
30 | }
31 |
32 | public class XMLResponseSerializer: ResponseSerializer {
33 | public let dataPreprocessor: DataPreprocessor
34 | public let emptyResponseCodes: Set
35 | public let emptyRequestMethods: Set
36 |
37 | public init(
38 | dataPreprocessor: DataPreprocessor = XMLResponseSerializer.defaultDataPreprocessor,
39 | emptyResponseCodes: Set = XMLResponseSerializer.defaultEmptyResponseCodes,
40 | emptyRequestMethods: Set = XMLResponseSerializer.defaultEmptyRequestMethods
41 | ) {
42 | self.dataPreprocessor = dataPreprocessor
43 | self.emptyResponseCodes = emptyResponseCodes
44 | self.emptyRequestMethods = emptyRequestMethods
45 | }
46 |
47 | public func serialize(
48 | request: URLRequest?,
49 | response: HTTPURLResponse?,
50 | data: Data?,
51 | error: Error?
52 | ) throws -> AEXMLDocument {
53 | guard error == nil else { throw error! }
54 |
55 | guard var data = data, !data.isEmpty else {
56 | guard emptyResponseAllowed(forRequest: request, response: response) else {
57 | throw XMLRPCError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)
58 | }
59 |
60 | return AEXMLDocument()
61 | }
62 |
63 | data = try dataPreprocessor.preprocess(data)
64 |
65 | do {
66 | return try AEXMLDocument(xml: data)
67 | } catch {
68 | throw XMLRPCError.responseSerializationFailed(reason: .xmlSerializationFailed(error: error))
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/AlamofireXMLRPC.xcodeproj/xcshareddata/xcschemes/AlamofireXMLRPC.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
38 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
64 |
70 |
71 |
72 |
73 |
79 |
80 |
86 |
87 |
88 |
89 |
91 |
92 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/Sources/AlamofireXMLRPC/XMLRPCNode.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XMLRPCNode.swift
3 | // AlamofireXMLRPC
4 | //
5 | // Created by Jeremy Marchand on 15/08/2016.
6 | // Copyright © 2016 kodlian. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import AEXML
11 |
12 | // MARK: - XMLRPCNode
13 | public struct XMLRPCNode {
14 | static var errorNode: XMLRPCNode = {
15 | let xml = AEXMLElement(name: "")
16 | xml.error = .elementNotFound
17 | return XMLRPCNode(xml: xml)
18 | }()
19 |
20 | var xml: AEXMLElement
21 |
22 | init(xml rootXML: AEXMLElement) {
23 | var xml = rootXML
24 | while (xml.rpcNode == .value || xml.rpcNode == .parameter) && xml.children.count > 0 {
25 | if let child = xml.children.first {
26 | xml = child
27 | }
28 | }
29 | self.xml = xml
30 | }
31 | }
32 |
33 | // MARK: - Array
34 | extension XMLRPCNode: Collection {
35 | public func index(after index: Int) -> Int {
36 | return xml.rpcChildren?.index(after: index) ?? 0
37 | }
38 |
39 | public var array: [XMLRPCNode]? {
40 | if let children = xml.rpcChildren {
41 | return children.map { element in
42 | if let value = element.children.first {
43 | return XMLRPCNode(xml: value)
44 | }
45 | return type(of: self).errorNode
46 | }
47 | }
48 |
49 | return nil
50 | }
51 |
52 | public var startIndex: Int {
53 | return 0
54 | }
55 |
56 | public var endIndex: Int {
57 | return xml.rpcChildren?.count ?? 0
58 | }
59 |
60 | public subscript(key: Int) -> XMLRPCNode {
61 | guard let children = xml.rpcChildren, (key >= 0 && key < children.count) else {
62 | return type(of: self).errorNode
63 | }
64 |
65 | return XMLRPCNode(xml: children[key])
66 | }
67 | }
68 |
69 | // MARK: - Struct
70 | extension XMLRPCNode {
71 | public subscript(key: String) -> XMLRPCNode {
72 | guard xml.rpcNode == XMLRPCNodeKind.structure else {
73 | return type(of: self).errorNode
74 | }
75 |
76 | for child in xml.children where child[XMLRPCNodeKind.name].value == key {
77 | return XMLRPCNode(xml: child[XMLRPCNodeKind.value])
78 | }
79 |
80 | return type(of: self).errorNode
81 | }
82 |
83 | public var dictionary: [String: XMLRPCNode]? {
84 | guard xml.rpcNode == XMLRPCNodeKind.structure else {
85 | return nil
86 | }
87 |
88 | var dictionary = [String: XMLRPCNode]()
89 |
90 | for child in xml.children {
91 | if let key = child[XMLRPCNodeKind.name].value {
92 | dictionary[key] = XMLRPCNode(xml: child[XMLRPCNodeKind.value])
93 | }
94 | }
95 |
96 | return dictionary
97 | }
98 | }
99 |
100 | // MARK: - Value
101 | extension XMLRPCNode {
102 | public var string: String? { return value() }
103 |
104 | public var int: Int? { return value() }
105 |
106 | public var int32: Int32? { return value() }
107 |
108 | public var double: Double? { return value() }
109 |
110 | public var bool: Bool? { return value() }
111 |
112 | public func value() -> V? {
113 | guard let value = xml.value, let nodeKind = XMLRPCValueKind(xml: xml), nodeKind == V.xmlRpcKind else {
114 | return nil
115 | }
116 |
117 | return V(xmlRpcRawValue: value)
118 | }
119 |
120 | public var date: Date? { return value() }
121 |
122 | public var data: Data? { return value() }
123 |
124 | public var error: AEXML.AEXMLError? {
125 | return xml.error
126 | }
127 |
128 | public var kind: XMLRPCNodeKind? {
129 | return self.xml.rpcNode
130 | }
131 | }
132 |
133 | extension XMLRPCNode: CustomStringConvertible {
134 | public var description: String {
135 | return xml.value ?? ""
136 | }
137 | }
138 |
139 | // MARK: - Object Value
140 | public protocol XMLRPCInitializable {
141 | init?(xmlRpcNode: XMLRPCNode)
142 | }
143 |
144 | extension XMLRPCNode {
145 | public func value() -> V? {
146 | if self.error != nil {
147 | return nil
148 | }
149 |
150 | return V(xmlRpcNode: self)
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/Sources/AlamofireXMLRPC/AEXML+RPC.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XML.swift
3 | // AlamofireXMLRPC
4 | //
5 | // Created by Jeremy Marchand on 08/10/2015.
6 | // Copyright © 2015 kodlian. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import AEXML
11 |
12 | public enum XMLRPCNodeKind: String {
13 | case methodCall = "methodCall"
14 | case methodName = "methodName"
15 | case methodResponse = "methodResponse"
16 | case fault = "fault"
17 | case structure = "struct"
18 | case member = "member"
19 |
20 | case parameters = "params"
21 | case parameter = "param"
22 |
23 | case array = "array"
24 | case data = "data"
25 |
26 | case value = "value"
27 | case name = "name"
28 | }
29 |
30 | extension XMLRPCValueKind {
31 | init?(xml: AEXMLElement) {
32 | if let kind = XMLRPCValueKind(rawValue: xml.name) {
33 | self = kind
34 | } else {
35 | switch (xml.name, xml.children.count) {
36 | case (XMLRPCNodeKind.value.rawValue, 0):
37 | self = .String
38 | case ("i4", _):
39 | self = .Integer
40 | default:
41 | return nil
42 | }
43 | }
44 | }
45 | }
46 |
47 | // MARK: RPC Node
48 | extension AEXMLElement {
49 | var rpcNode: XMLRPCNodeKind? { return XMLRPCNodeKind(rawValue: name) }
50 |
51 | convenience init(rpcNode: XMLRPCNodeKind) {
52 | self.init(name: rpcNode.rawValue)
53 | }
54 |
55 | @discardableResult func addChild(rpcNode: XMLRPCNodeKind, value: String? = nil) -> AEXMLElement {
56 | return addChild(name: rpcNode.rawValue, value: value)
57 | }
58 |
59 | subscript(key: XMLRPCNodeKind) -> AEXMLElement {
60 | return self[key.rawValue]
61 | }
62 | }
63 |
64 | // MARK: - Value
65 | extension AEXMLElement {
66 | // var rpcValueKind: XMLRPCValueKind? { return XMLRPCValueKind(rawValue: name) }
67 |
68 | convenience init(_ rpcValue: XMLRPCRawValueRepresentable) {
69 | self.init(name: type(of: rpcValue).xmlRpcKind.rawValue)
70 | name = type(of: rpcValue).xmlRpcKind.rawValue
71 | value = rpcValue.xmlRpcRawValue
72 | }
73 |
74 | @discardableResult func addChild(rpcValue: XMLRPCRawValueRepresentable) -> AEXMLElement {
75 | return addChild(name: type(of: rpcValue).xmlRpcKind.rawValue, value: rpcValue.xmlRpcRawValue)
76 | }
77 | }
78 |
79 | struct UnknownRPCValue: XMLRPCRawValueRepresentable {
80 | static var xmlRpcKind: XMLRPCValueKind { return .String }
81 | fileprivate(set) var xmlRpcRawValue: String
82 |
83 | init(_ value: Any) {
84 | xmlRpcRawValue = String(describing: value)
85 | }
86 | }
87 |
88 | // MARK: - Collectiom
89 | extension AEXMLElement {
90 | fileprivate func addRPCValue(_ value: Any) {
91 | let xmlValue = addChild(rpcNode: XMLRPCNodeKind.value)
92 | switch value {
93 | case let rawValue as XMLRPCRawValueRepresentable:
94 | xmlValue.addChild(rpcValue: rawValue)
95 | case let array as [Any]:
96 | xmlValue.addChild(AEXMLElement(rpcArray: array))
97 | case let dict as [String: Any]:
98 | xmlValue.addChild(AEXMLElement(rpcStructure: dict))
99 | default:
100 | xmlValue.addChild(rpcValue: UnknownRPCValue(value))
101 | }
102 | }
103 |
104 | convenience init(rpcArray: [Any]) {
105 | self.init(rpcNode: XMLRPCNodeKind.array)
106 |
107 | let xmlElement = addChild(rpcNode: XMLRPCNodeKind.data)
108 | for element in rpcArray {
109 | xmlElement.addRPCValue(element)
110 | }
111 | }
112 | convenience init(rpcParams: [Any]) {
113 | self.init(rpcNode: XMLRPCNodeKind.parameters)
114 |
115 | for item in rpcParams {
116 | addChild(rpcNode: .parameter).addRPCValue(item)
117 | }
118 | }
119 |
120 | convenience init(rpcStructure: [String: Any]) {
121 | self.init(rpcNode: XMLRPCNodeKind.structure)
122 |
123 | for (key, value) in rpcStructure {
124 | let member = addChild(rpcNode: XMLRPCNodeKind.member)
125 | member.addChild(rpcNode: XMLRPCNodeKind.name, value: key)
126 | member.addRPCValue(value)
127 | }
128 | }
129 |
130 | var rpcChildren: [AEXMLElement]? {
131 | guard rpcNode == XMLRPCNodeKind.array || rpcNode == XMLRPCNodeKind.parameters else {
132 | return nil
133 | }
134 |
135 | return rpcNode == XMLRPCNodeKind.array ? self[.data].children : children
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/Sources/AlamofireXMLRPC/Value.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Type.swift
3 | // AlamofireXMLRPC
4 | //
5 | // Created by Jeremy Marchand on 08/10/2015.
6 | // Copyright © 2015 kodlian. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public enum XMLRPCValueKind: String {
12 | // swiftlint:disable identifier_name
13 | case Integer = "int"
14 | case Double = "double"
15 | case Boolean = "boolean"
16 | case String = "string"
17 | case DateTime = "dateTime.iso8601"
18 | case Base64 = "base64"
19 | }
20 |
21 | public protocol XMLRPCRawValueRepresentable {
22 | static var xmlRpcKind: XMLRPCValueKind { get }
23 | var xmlRpcRawValue: String { get }
24 | init?(xmlRpcRawValue: String)
25 | }
26 |
27 | public extension XMLRPCRawValueRepresentable {
28 | static var xmlRpcKind: XMLRPCValueKind { return .String }
29 | var xmlRpcRawValue: String { return String(describing: self) }
30 | init?(xmlRpcRawValue: String) {
31 | return nil
32 | }
33 | }
34 |
35 | public extension RawRepresentable where RawValue == String, Self: XMLRPCRawValueRepresentable {
36 | init?(xmlRpcRawValue: String) {
37 | self.init(rawValue: xmlRpcRawValue)
38 | }
39 | var xmlRpcRawValue: String { return rawValue }
40 | }
41 |
42 | // MARK: String
43 | extension String: XMLRPCRawValueRepresentable {
44 | public static var xmlRpcKind: XMLRPCValueKind { return .String }
45 | public var xmlRpcRawValue: String { return self }
46 | public init?(xmlRpcRawValue: String) {
47 | self = xmlRpcRawValue
48 | }
49 | }
50 |
51 | // MARK: Bool
52 | extension Bool: XMLRPCRawValueRepresentable {
53 | public static var xmlRpcKind: XMLRPCValueKind { return .Boolean }
54 | public var xmlRpcRawValue: String { return self ? "1" : "0" }
55 | public init?(xmlRpcRawValue: String) {
56 | self.init(Int8(xmlRpcRawValue) == 1)
57 | }
58 | }
59 |
60 | // MARK: Integer
61 | extension XMLRPCRawValueRepresentable where Self: BinaryInteger {
62 | public static var xmlRpcKind: XMLRPCValueKind { return .Integer }
63 | }
64 |
65 | public protocol StringRadixParsable {
66 | init?(_ text: String, radix: Int)
67 | }
68 |
69 | extension XMLRPCRawValueRepresentable where Self: FixedWidthInteger {
70 | public init?(xmlRpcRawValue: String) {
71 | self.init(xmlRpcRawValue, radix: 10)
72 | }
73 | }
74 |
75 | extension Int: XMLRPCRawValueRepresentable { }
76 | extension Int32: XMLRPCRawValueRepresentable { }
77 | extension Int16: XMLRPCRawValueRepresentable { }
78 | extension Int8: XMLRPCRawValueRepresentable { }
79 | extension UInt16: XMLRPCRawValueRepresentable { }
80 | extension UInt8: XMLRPCRawValueRepresentable { }
81 |
82 | // MARK: Floating Point
83 | public extension XMLRPCRawValueRepresentable where Self: LosslessStringConvertible {
84 | init?(xmlRpcRawValue: String) {
85 | self.init(xmlRpcRawValue)
86 | }
87 | }
88 |
89 | public extension XMLRPCRawValueRepresentable where Self: FloatingPoint {
90 | static var xmlRpcKind: XMLRPCValueKind { return .Double }
91 | }
92 |
93 | extension Double: XMLRPCRawValueRepresentable { }
94 | extension Float: XMLRPCRawValueRepresentable { }
95 |
96 | // MARK: Date
97 | let iso8601DateFormatter: DateFormatter = {
98 | let dateFormatter = DateFormatter()
99 | dateFormatter.locale = Locale(identifier: "en_US_POSIX")
100 | dateFormatter.timeZone = TimeZone(abbreviation: "GMT")
101 | dateFormatter.dateFormat = "yyyyMMdd'T'HH:mm:ss"
102 | return dateFormatter
103 | }()
104 |
105 | extension Date {
106 | var iso8601String: String {
107 | return iso8601DateFormatter.string(from: self)
108 | }
109 | }
110 | extension Date: XMLRPCRawValueRepresentable {
111 | public static var xmlRpcKind: XMLRPCValueKind { return .DateTime }
112 | public var xmlRpcRawValue: String {
113 | return self.iso8601String
114 | }
115 | public init?(xmlRpcRawValue: String) {
116 | guard let date = iso8601DateFormatter.date(from: xmlRpcRawValue) else {
117 | return nil
118 | }
119 | self = date
120 | }
121 | }
122 |
123 | // MARK: Data
124 | extension Data: XMLRPCRawValueRepresentable {
125 | public static var xmlRpcKind: XMLRPCValueKind { return .Base64 }
126 | public var xmlRpcRawValue: String {
127 | return self.base64EncodedString(options: [])
128 | }
129 | public init?(xmlRpcRawValue: String) {
130 | guard let data = Data(base64Encoded: xmlRpcRawValue, options: .ignoreUnknownCharacters) else {
131 | return nil
132 | }
133 | self = data
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/Sources/AlamofireXMLRPC/Alamofire+XMLRPC.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Alamofire+XMLRPC.swift
3 | // AlamofireXMLRPC
4 | //
5 | // Created by Jeremy Marchand on 05/10/15.
6 | // Copyright © 2015 kodlian. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import Alamofire
11 | import AEXML
12 |
13 | // MARK: - Document Call
14 | class XMLRPCCallDocument: AEXMLDocument {
15 | init(methodName: String, parameters someParams: [Any]?) {
16 | // Build XMLRPC Call
17 | super.init()
18 | let xmlMethodCall = addChild(rpcNode: .methodCall)
19 | xmlMethodCall.addChild(rpcNode: .methodName, value: methodName)
20 | if let params = someParams {
21 | xmlMethodCall.addChild(AEXMLElement(rpcParams: params))
22 | }
23 | }
24 | }
25 |
26 | // MARK: - Session
27 | extension Session {
28 | public func requestXMLRPC(
29 | _ url: URLConvertible,
30 | methodName: String,
31 | parameters: [Any]?,
32 | headers: [String: String]? = nil
33 | ) -> DataRequest {
34 | let request = XMLRPCRequest(url: url, methodName: methodName, parameters: parameters, headers: headers)
35 | let dataRequest = self.request(request)
36 | return dataRequest
37 | }
38 | }
39 |
40 | public func request(
41 | _ url: URLConvertible,
42 | methodName: String,
43 | parameters: [Any]?,
44 | headers: [String: String]? = nil
45 | ) -> DataRequest {
46 | return Session.default.requestXMLRPC(
47 | url, methodName: methodName, parameters: parameters, headers: headers
48 | )
49 | }
50 |
51 | public func request(_ XMLRPCRequest: XMLRPCRequestConvertible) -> DataRequest {
52 | return Session.default.request(XMLRPCRequest)
53 | }
54 |
55 | // MARK: - RequestConvertible
56 | public protocol XMLRPCRequestConvertible: URLRequestConvertible {
57 | var url: URLConvertible { get }
58 | var methodName: String { get }
59 | var parameters: [Any]? { get }
60 | var headers: [String: String]? { get }
61 | }
62 |
63 | extension XMLRPCRequestConvertible {
64 | func asURLRequest() throws -> URLRequest {
65 | let url = try self.url.asURL()
66 |
67 | var request = URLRequest(url: url)
68 | request.httpMethod = HTTPMethod.post.rawValue
69 | if let headers = self.headers {
70 | for (key, value) in headers {
71 | request.setValue(value, forHTTPHeaderField: key)
72 | }
73 | }
74 | request.setValue("text/xml; charset=utf-8", forHTTPHeaderField: "Content-Type")
75 | guard let xmlData = XMLRPCCallDocument(
76 | methodName: methodName,
77 | parameters: parameters).xml.data(using: String.Encoding.utf8)
78 | else {
79 | throw XMLRPCError.parseFailed
80 | }
81 | request.httpBody = xmlData
82 |
83 | return request
84 | }
85 | }
86 |
87 | private struct XMLRPCRequest: XMLRPCRequestConvertible {
88 | var url: URLConvertible
89 | var methodName: String
90 | var parameters: [Any]?
91 | var headers: [String: String]?
92 | }
93 |
94 | // MARK: - Response
95 | extension DataRequest {
96 | @discardableResult public func responseXMLRPC(
97 | queue: DispatchQueue = .main,
98 | dataPreprocessor: DataPreprocessor = XMLRPCResponseSerializer.defaultDataPreprocessor,
99 | emptyResponseCodes: Set = XMLRPCResponseSerializer.defaultEmptyResponseCodes,
100 | emptyRequestMethods: Set = XMLRPCResponseSerializer.defaultEmptyRequestMethods,
101 | completionHandler: @escaping (AFDataResponse) -> Void
102 | ) -> Self {
103 | response(
104 | queue: queue,
105 | responseSerializer: XMLRPCResponseSerializer(
106 | dataPreprocessor: dataPreprocessor,
107 | emptyResponseCodes: emptyResponseCodes,
108 | emptyRequestMethods: emptyRequestMethods
109 | ),
110 | completionHandler: completionHandler)
111 | }
112 | }
113 |
114 | public class XMLRPCResponseSerializer: ResponseSerializer {
115 | public let dataPreprocessor: DataPreprocessor
116 | public let emptyResponseCodes: Set
117 | public let emptyRequestMethods: Set
118 |
119 | public init(
120 | dataPreprocessor: DataPreprocessor = XMLRPCResponseSerializer.defaultDataPreprocessor,
121 | emptyResponseCodes: Set = XMLRPCResponseSerializer.defaultEmptyResponseCodes,
122 | emptyRequestMethods: Set = XMLRPCResponseSerializer.defaultEmptyRequestMethods
123 | ) {
124 | self.dataPreprocessor = dataPreprocessor
125 | self.emptyResponseCodes = emptyResponseCodes
126 | self.emptyRequestMethods = emptyRequestMethods
127 | }
128 |
129 | public func serialize(
130 | request: URLRequest?,
131 | response: HTTPURLResponse?,
132 | data: Data?,
133 | error: Error?
134 | ) throws -> XMLRPCNode {
135 | guard error == nil else { throw error! }
136 |
137 | guard var data = data, !data.isEmpty else {
138 | guard emptyResponseAllowed(forRequest: request, response: response) else {
139 | throw XMLRPCError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)
140 | }
141 |
142 | let emptyMethodElement = AEXMLElement(rpcNode: XMLRPCNodeKind.methodResponse)
143 | return XMLRPCNode(xml: emptyMethodElement)
144 | }
145 |
146 | data = try dataPreprocessor.preprocess(data)
147 |
148 | let xmlDocument = try AEXMLDocument(xml: data)
149 | if let error = xmlDocument.error {
150 | throw XMLRPCError.responseSerializationFailed(reason: .xmlSerializationFailed(error: error))
151 | }
152 |
153 | let methodResponse = xmlDocument[.methodResponse]
154 | guard methodResponse.error == nil else {
155 | throw XMLRPCError.responseSerializationFailed(reason: .nodeNotFound(node: .methodResponse))
156 | }
157 |
158 | let fault = methodResponse[.fault]
159 | if fault.error == nil {
160 | throw XMLRPCError.fault(node: XMLRPCNode(xml: fault[.value]))
161 | }
162 |
163 | let params = methodResponse[.parameters]
164 | if params.error == nil {
165 | return XMLRPCNode(xml: params)
166 | }
167 |
168 | throw XMLRPCError.responseSerializationFailed(reason: .nodeNotFound(node: .parameters))
169 | }
170 | }
171 |
--------------------------------------------------------------------------------
/Tests/AlamofireXMLRPCTests/XMLRPCResponseSerializerTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XMLRPCSerializerTests.swift
3 | // AlamofireXMLRPC
4 | //
5 | // Created by Jeremy Marchand on 15/08/2016.
6 | // Copyright © 2016 kodlian. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import Alamofire
11 | @testable import AlamofireXMLRPC
12 |
13 | class XMLRPCResponseSerializerTests: XCTestCase {
14 | fileprivate func serialize(_ name: String) throws -> XMLRPCNode? {
15 | let url = Bundle(for: XMLRPCResponseSerializerTests.self).url(
16 | forResource: name,
17 | withExtension: "xml",
18 | subdirectory: nil)!
19 | let data = try? Data(contentsOf: url)
20 | return try XMLRPCResponseSerializer().serialize(request: nil, response: nil, data: data, error: nil)
21 | }
22 |
23 | func testEmptyResponse() {
24 | let serializer = XMLRPCResponseSerializer()
25 | let responseURL = URL(string: "http://localhost")!
26 | let response = HTTPURLResponse(url: responseURL, statusCode: 200, httpVersion: nil, headerFields: nil)
27 |
28 | do {
29 | _ = try serializer.serialize(request: nil, response: response, data: nil, error: nil)
30 | } catch XMLRPCError.responseSerializationFailed(let reason) {
31 | switch reason {
32 | case .inputDataNilOrZeroLength:
33 | XCTAssertTrue(true)
34 | default:
35 | XCTFail("reason not input data nil or zero length: \(reason)")
36 | }
37 | } catch {
38 | XCTFail(error.localizedDescription)
39 | }
40 | }
41 |
42 | func testEmptyResponseWhenAllowed() {
43 | let serializer = XMLRPCResponseSerializer()
44 | let responseURL = URL(string: "http://localhost")!
45 | let response = HTTPURLResponse(url: responseURL, statusCode: 204, httpVersion: nil, headerFields: nil)
46 |
47 | var result: XMLRPCNode?
48 |
49 | do {
50 | result = try serializer.serialize(request: nil, response: response, data: nil, error: nil)
51 | } catch {
52 | XCTFail(error.localizedDescription)
53 | return
54 | }
55 |
56 | guard let node = result else {
57 | XCTFail("node is nil")
58 | return
59 | }
60 |
61 | XCTAssert(node.kind == XMLRPCNodeKind.methodResponse)
62 | }
63 |
64 | func testParams() {
65 | var result: XMLRPCNode?
66 |
67 | do {
68 | result = try serialize("testParams")
69 | } catch {
70 | XCTFail(error.localizedDescription)
71 | return
72 | }
73 |
74 | guard let node = result else {
75 | XCTFail("node is nil")
76 | return
77 | }
78 |
79 | XCTAssertEqual(node[0].string, "Hello")
80 | XCTAssertEqual(node[1].string, "Hello Again")
81 | XCTAssertNil(node[1].int32)
82 |
83 | XCTAssertEqual(node[2].int32, 42)
84 | XCTAssertEqual(node[3].int32, 42)
85 | XCTAssertNil(node[2].string)
86 |
87 | XCTAssertEqual(node[4].double, 3.14)
88 | XCTAssertNil(node[4].string)
89 |
90 | XCTAssertEqual(node[5].bool, true)
91 | XCTAssertNil(node[5].string)
92 |
93 | XCTAssertEqual(node[6].date, iso8601DateFormatter.date(from: "19870513T08:27:30"))
94 | XCTAssertNil(node[6].string)
95 |
96 | XCTAssertEqual(node[7].data, "Valar morghulis".data(using: String.Encoding.utf8))
97 | XCTAssertNil(node[7].string)
98 | }
99 |
100 | func testStructParam() {
101 | var result: XMLRPCNode?
102 |
103 | do {
104 | result = try serialize("testStructParam")
105 | } catch {
106 | XCTFail(error.localizedDescription)
107 | return
108 | }
109 |
110 | guard let node = result else {
111 | XCTFail("node is nil")
112 | return
113 | }
114 |
115 | XCTAssertNil(node.error)
116 | XCTAssertNil(node[0].dictionary)
117 | XCTAssertNotNil(node[1].dictionary)
118 |
119 | let structNode = node[1]
120 |
121 | XCTAssertEqual(structNode["name"].string, "John Doe")
122 | XCTAssertEqual(structNode["age"].int32, 32)
123 | XCTAssertNil(structNode["notExist"].string)
124 | XCTAssertNotNil(structNode[0].error)
125 | }
126 |
127 | func testArrayParam() {
128 | var result: XMLRPCNode?
129 |
130 | do {
131 | result = try serialize("testArrayParam")
132 | } catch {
133 | XCTFail(error.localizedDescription)
134 | return
135 | }
136 |
137 | guard let node = result else {
138 | XCTFail("node is nil")
139 | return
140 | }
141 |
142 | XCTAssertNil(node.error)
143 | XCTAssertNil(node[0].array)
144 | XCTAssertNotNil(node[1].array)
145 | XCTAssertEqual(node[1].count, 2)
146 |
147 | let arrayNode = node[1]
148 |
149 | XCTAssertEqual(arrayNode[0].int32, 42)
150 | XCTAssertEqual(arrayNode[1].double, 1.61)
151 | XCTAssertNotNil(arrayNode["aKey"].error)
152 |
153 | var counter = 0
154 | for _ in node {
155 | counter += 1
156 | }
157 |
158 | XCTAssertEqual(counter, 2)
159 | }
160 |
161 | func testFault() {
162 | do {
163 | _ = try serialize("testFault")
164 | } catch XMLRPCError.fault(let node) {
165 | XCTAssertEqual(node.string, "No such method!")
166 | return
167 | } catch {
168 | XCTFail(error.localizedDescription)
169 | return
170 | }
171 | }
172 |
173 | func testFaultStruct() {
174 | do {
175 | _ = try serialize("testFaultStruct")
176 | } catch XMLRPCError.fault(let node) {
177 | XCTAssertEqual(node["faultCode"].int32, 26)
178 | XCTAssertEqual(node["faultString"].string, "No such method!")
179 | return
180 | } catch {
181 | XCTFail(error.localizedDescription)
182 | return
183 | }
184 | }
185 |
186 | func testXMLRPCInitializable() {
187 | struct Person: XMLRPCInitializable {
188 | let name: String
189 | let age: Int
190 |
191 | init?(xmlRpcNode node: XMLRPCNode) {
192 | guard let name = node["name"].string, let age = node["age"].int32 else {
193 | return nil
194 | }
195 |
196 | self.name = name
197 | self.age = Int(age)
198 | }
199 | }
200 |
201 | var result: XMLRPCNode?
202 |
203 | do {
204 | result = try serialize("testStructParam")
205 | } catch {
206 | XCTFail(error.localizedDescription)
207 | return
208 | }
209 |
210 | guard let node = result else {
211 | XCTFail("node is nil")
212 | return
213 | }
214 |
215 | guard let person: Person = node[1].value() else {
216 | XCTFail("person is nil")
217 | return
218 | }
219 |
220 | XCTAssertEqual(person.name, "John Doe")
221 | XCTAssertEqual(person.age, 32)
222 |
223 | let person2: Person? = node[0].value()
224 |
225 | XCTAssertNil(person2)
226 | }
227 | }
228 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # AlamofireXMLRPC #
3 |
4 | [](http://mit-license.org)
6 | [](https://developer.apple.com/resources/)
8 | [](https://developer.apple.com/swift)
10 | [](https://github.com/kodlian/AlamofireXMLRPC/issues)
12 | [](http://cocoadocs.org/docsets/AlamofireXMLRPC/)
13 | [](https://travis-ci.org/kodlian/AlamofireXMLRPC)
14 | [](https://codecov.io/gh/kodlian/AlamofireXMLRPC)
15 | [](https://codebeat.co/projects/github-com-kodlian-alamofirexmlrpc)
16 |
17 |
18 | AlamofireXMLRPC brings [XML RPC](http://xmlrpc.scripting.com/) functionalities to [Alamofire](https://github.com/Alamofire/Alamofire). It aims to provide an easy way to perform XMLRPC call and to retrieve smoothly the response.
19 |
20 | XML is handled internally with [AEXML](https://github.com/tadija/AEXML).
21 |
22 | ## Example
23 | Take the following request and response handler:
24 |
25 | ```swift
26 | let data: NSData = ...
27 | let params: [Any] = [42, "text", 3.44, Date(), data]
28 | AlamofireXMLRPC.request("http://localhost:8888/xmlrpc", methodName: "foo", parameters: params).responseXMLRPC { (response: DataResponse) -> Void in
29 | switch response.result {
30 | case .success(let value):
31 | if let message = value[0].string, age = value[1]["age"].int32 {
32 | ...
33 | }
34 | case .failure:
35 | ...
36 | }
37 |
38 | ```
39 |
40 | It will generate the following call and lets you parse the corresponding answer from the XMLRPC service:
41 |
42 | ```xml
43 |
44 |
45 | foo
46 |
47 |
48 |
49 | 42
50 |
51 |
52 |
53 |
54 | text
55 |
56 |
57 |
58 |
59 | 3.44
60 |
61 |
62 |
63 |
64 | 19980717T14:08:55
65 |
66 |
67 |
68 |
69 | eW91IGNhbid0IHJlYWQgdGhpcyE=
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | Hello world!
81 |
82 |
83 |
84 |
85 |
86 |
87 | name
88 |
89 | John Doe
90 |
91 |
92 |
93 | age
94 |
95 | 36
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | ```
104 |
105 | ## Requirements
106 | - iOS 9.0+ / Mac OS X 10.11+
107 | - Xcode 9
108 |
109 | ## Install CocoaPods
110 | You can use [CocoaPods](http://cocoapods.org/) to install `AlamofireXMLRPC`by adding it to your `Podfile`:
111 | ```ruby
112 | use_frameworks!
113 |
114 | target 'MyApp' do
115 | pod 'AlamofireXMLRPC', :git => 'https://github.com/kodlian/AlamofireXMLRPC.git'
116 | end
117 | ```
118 |
119 |
120 | ## Request
121 | ### Method request
122 | ```swift
123 | // Call XMLRPC service with the sharedManager of Alamofire
124 | AlamofireXMLRPC.request("https://xmlrpcservice", method:"foo" parameters: [1,2.0,"ddd",["key":"value"]])
125 | // Call XMLRPC service with your custom manager
126 | manager.requestXMLRPC("https://xmlrpcservice", method:"foo" parameters: [1,2.0,"ddd",["key":"value"]])
127 | ```
128 |
129 | ### XMLRPC Request convertible
130 | Types adopting the ```XMLRPCRequestConvertible``` protocol can be used to construct XMLRPC call.
131 |
132 | ```swift
133 | public protocol XMLRPCRequestConvertible {
134 | var url: URLConvertible { get }
135 | var methodName: String { get }
136 | var parameters: [Any]? { get }
137 | var headers: [String : String]? { get }
138 | }
139 |
140 | struct MyRequest: XMLRPCRequestConvertible {
141 | ...
142 | }
143 |
144 | let request = MyRequest(...)
145 | Alamofire.request(request) // Call XMLRPC service with Alamofire
146 | ```
147 |
148 | ### Values
149 | #### Mapping
150 | AlamofireXMLRPC uses the following mapping for swift values to XML RPC values:
151 |
152 | | Swift | Example | XMLRPC | note |
153 | |:---------------------------------------------:|:-------------:|:-------------------------------------------------------------:|:-------------------------------------------------------------:|
154 | | String | "foo" | ```foo``` | |
155 | | Int, Int32, Int16, Int8, UInt16, UInt8 | 42 | ```42``` | XML RPC Integer is 32bits, Int values are converted to Int32 |
156 | | Bool | true | ```1``` | |
157 | | Double, Float | 3.44 | ```3.44``` | |
158 | | Date | Date() | ```19980717T14:08:55``` | |
159 | | Data | Data() | ```eW91IGNhbid0IHJlYWQgdGhpcyE=``` | |
160 |
161 | By default other types will be mapped as XML RPC String and use the default String representation. Bu you can provide your own mapping for custom Types by adopting the protocol ```XMLRPCRawValueRepresentable```.
162 |
163 | ``` swift
164 | enum XMLRPCValueKind: String {
165 | case integer = "int"
166 | case double = "double"
167 | case boolean = "boolean"
168 | case string = "string"
169 | case dateTime = "dateTime.iso8601"
170 | case base64 = "base64"
171 | }
172 |
173 | protocol XMLRPCRawValueRepresentable {
174 | static var xmlrpcKind: XMLRPCValueKind { get }
175 | var xmlrpcRawValue: String { get }
176 | init?(xmlrpcRawValue: String)
177 | }
178 | ```
179 |
180 | #### Collection
181 | Swift arrays ```[Any]``` are convertible to XMLRPC arrays.
182 |
183 | ```swift
184 | [1,"too"]
185 | ```
186 |
187 | As well dictionaries ```[String:Any]``` are convertible to XMLRPC structure.
188 |
189 | ```swift
190 | ["name":"John Doe","age":35]
191 | ```
192 |
193 |
194 | ## Response
195 | ### Response
196 | XMLRPC Responses are handled with the method ```responseXMLRPC(completionHandler: DataResponse -> Void)```. The response's XMLRPC parameters are mapped to an ```XMLRPCNode```. This allows you to fetch easily data within complex structure or tree.
197 |
198 | #### Subscript
199 | For each XMLRPCNode you can access subnode by index or by String key. Internally children of XMLRPC Array and Structure will be fetched.
200 |
201 | ```swift
202 | aRequest.responseXMLRPC{ (response: DataResponse) -> Void in
203 | switch response.result {
204 | case .success(let value):
205 | if let message = value[0]["aKey"][9].string {
206 | ...
207 | }
208 | case .failure:
209 | ...
210 | }
211 | }
212 | ```
213 |
214 | Don't worry about unwrapping things and checking the value type or presence. The optional management is solely done when you request the swift value with one of the optional getters.
215 |
216 | For instance, you can call ```value[0]["aKey"][9]``` without worrying if the objects tree actually exists.
217 |
218 | #### Optional getters
219 |
220 | ```swift
221 | var array: [XMLRPCNode]?
222 | var dictionary: [String:XMLRPCNode]?
223 | var string: String?
224 | var int32: Int32?
225 | var double: Double?
226 | var bool: Bool?
227 | var date: Date?
228 | var data: Data?
229 | var count: Int?
230 | ```
231 |
232 | ## License
233 | AlamofireXMLRPC is released under the MIT license. See [LICENSE](LICENSE) for details.
234 |
--------------------------------------------------------------------------------
/AlamofireXMLRPC.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 3F1780291BC6D8AC00DFDB76 /* Value.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F1780281BC6D8AC00DFDB76 /* Value.swift */; };
11 | 3F17802B1BC6DC0100DFDB76 /* AEXML+RPC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F17802A1BC6DC0100DFDB76 /* AEXML+RPC.swift */; };
12 | 3F93F38E1D61BE74002B4D50 /* XMLRPCError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F93F38D1D61BE74002B4D50 /* XMLRPCError.swift */; };
13 | 3F93F3901D61DA92002B4D50 /* XMLRPCResponseSerializerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F93F38F1D61DA92002B4D50 /* XMLRPCResponseSerializerTests.swift */; };
14 | 3F93F3921D61DACE002B4D50 /* testFault.xml in Resources */ = {isa = PBXBuildFile; fileRef = 3F93F3911D61DACE002B4D50 /* testFault.xml */; };
15 | 3F93F3961D620A47002B4D50 /* testFaultStruct.xml in Resources */ = {isa = PBXBuildFile; fileRef = 3F93F3951D620A47002B4D50 /* testFaultStruct.xml */; };
16 | 3F93F3981D620B50002B4D50 /* testParams.xml in Resources */ = {isa = PBXBuildFile; fileRef = 3F93F3971D620B50002B4D50 /* testParams.xml */; };
17 | 3F93F39A1D62103F002B4D50 /* testStructParam.xml in Resources */ = {isa = PBXBuildFile; fileRef = 3F93F3991D62103F002B4D50 /* testStructParam.xml */; };
18 | 3F93F39C1D621163002B4D50 /* testArrayParam.xml in Resources */ = {isa = PBXBuildFile; fileRef = 3F93F39B1D621163002B4D50 /* testArrayParam.xml */; };
19 | 3F93F39E1D62288D002B4D50 /* XMLRPCNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F93F39D1D62288D002B4D50 /* XMLRPCNode.swift */; };
20 | 3F93F3A01D623BFE002B4D50 /* XMLRPCCallTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F93F39F1D623BFE002B4D50 /* XMLRPCCallTests.swift */; };
21 | 3F93F3A21D623C7B002B4D50 /* call.xml in Resources */ = {isa = PBXBuildFile; fileRef = 3F93F3A11D623C7B002B4D50 /* call.xml */; };
22 | 3F93F3A41D624780002B4D50 /* .travis.yml in Resources */ = {isa = PBXBuildFile; fileRef = 3F93F3A31D624780002B4D50 /* .travis.yml */; };
23 | 3FE18B6E1D8DB2110054AD1A /* Alamofire+XML.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F17802C1BC7008B00DFDB76 /* Alamofire+XML.swift */; };
24 | 3FE18B6F1D8DB4410054AD1A /* Alamofire+XMLRPC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 630682271BC29885005D7BC8 /* Alamofire+XMLRPC.swift */; };
25 | 3FF3D5511BC81FA300599A37 /* AlamofireXMLRPC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6306821C1BC27C28005D7BC8 /* AlamofireXMLRPC.framework */; };
26 | 630682201BC27C28005D7BC8 /* AlamofireXMLRPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 6306821F1BC27C28005D7BC8 /* AlamofireXMLRPC.h */; settings = {ATTRIBUTES = (Public, ); }; };
27 | 67CF01F64E5D22FCBF7DE484 /* Pods_AlamofireXMLRPC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8EB4BE68C4AC30489CCE89F1 /* Pods_AlamofireXMLRPC.framework */; };
28 | AB89E21E261CC0B500A064C4 /* XMLRPCNodeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB89E21D261CC0B500A064C4 /* XMLRPCNodeTests.swift */; };
29 | AB89E224261CC90400A064C4 /* XMLResponseSerializerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB89E223261CC90400A064C4 /* XMLResponseSerializerTests.swift */; };
30 | F80080FF84960F46D6064A2C /* Pods_AlamofireXMLRPC_AlamofireXMLRPCTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 734CA487D4E5B63EE1B805F9 /* Pods_AlamofireXMLRPC_AlamofireXMLRPCTests.framework */; };
31 | /* End PBXBuildFile section */
32 |
33 | /* Begin PBXContainerItemProxy section */
34 | 3FF3D5521BC81FA300599A37 /* PBXContainerItemProxy */ = {
35 | isa = PBXContainerItemProxy;
36 | containerPortal = 630682131BC27C28005D7BC8 /* Project object */;
37 | proxyType = 1;
38 | remoteGlobalIDString = 6306821B1BC27C28005D7BC8;
39 | remoteInfo = AlamofireXMLRPC;
40 | };
41 | /* End PBXContainerItemProxy section */
42 |
43 | /* Begin PBXFileReference section */
44 | 03490A74537FFB87195A71A1 /* Pods-AlamofireXMLRPCTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireXMLRPCTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireXMLRPCTests/Pods-AlamofireXMLRPCTests.release.xcconfig"; sourceTree = ""; };
45 | 24BCA26B28D0BF05D794B29D /* Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireXMLRPC-AlamofireXMLRPCTests/Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.release.xcconfig"; sourceTree = ""; };
46 | 3F1780281BC6D8AC00DFDB76 /* Value.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Value.swift; sourceTree = ""; };
47 | 3F17802A1BC6DC0100DFDB76 /* AEXML+RPC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AEXML+RPC.swift"; sourceTree = ""; };
48 | 3F17802C1BC7008B00DFDB76 /* Alamofire+XML.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Alamofire+XML.swift"; sourceTree = ""; };
49 | 3F93F38D1D61BE74002B4D50 /* XMLRPCError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLRPCError.swift; sourceTree = ""; };
50 | 3F93F38F1D61DA92002B4D50 /* XMLRPCResponseSerializerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLRPCResponseSerializerTests.swift; sourceTree = ""; };
51 | 3F93F3911D61DACE002B4D50 /* testFault.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testFault.xml; sourceTree = ""; };
52 | 3F93F3951D620A47002B4D50 /* testFaultStruct.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testFaultStruct.xml; sourceTree = ""; };
53 | 3F93F3971D620B50002B4D50 /* testParams.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testParams.xml; sourceTree = ""; };
54 | 3F93F3991D62103F002B4D50 /* testStructParam.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testStructParam.xml; sourceTree = ""; };
55 | 3F93F39B1D621163002B4D50 /* testArrayParam.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testArrayParam.xml; sourceTree = ""; };
56 | 3F93F39D1D62288D002B4D50 /* XMLRPCNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLRPCNode.swift; sourceTree = ""; };
57 | 3F93F39F1D623BFE002B4D50 /* XMLRPCCallTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLRPCCallTests.swift; sourceTree = ""; };
58 | 3F93F3A11D623C7B002B4D50 /* call.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = call.xml; sourceTree = ""; };
59 | 3F93F3A31D624780002B4D50 /* .travis.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .travis.yml; sourceTree = ""; };
60 | 3FF3D54C1BC81FA300599A37 /* AlamofireXMLRPCTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AlamofireXMLRPCTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
61 | 3FF3D5501BC81FA300599A37 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
62 | 41FE5237411009B80BB9127F /* Pods-AlamofireXMLRPC.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireXMLRPC.release.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireXMLRPC/Pods-AlamofireXMLRPC.release.xcconfig"; sourceTree = ""; };
63 | 5E513F774BDB1750A705D36C /* Pods-AlamofireXMLRPC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireXMLRPC.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireXMLRPC/Pods-AlamofireXMLRPC.debug.xcconfig"; sourceTree = ""; };
64 | 6306821C1BC27C28005D7BC8 /* AlamofireXMLRPC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AlamofireXMLRPC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
65 | 6306821F1BC27C28005D7BC8 /* AlamofireXMLRPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AlamofireXMLRPC.h; sourceTree = ""; };
66 | 630682211BC27C28005D7BC8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
67 | 630682271BC29885005D7BC8 /* Alamofire+XMLRPC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Alamofire+XMLRPC.swift"; sourceTree = ""; };
68 | 734CA487D4E5B63EE1B805F9 /* Pods_AlamofireXMLRPC_AlamofireXMLRPCTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AlamofireXMLRPC_AlamofireXMLRPCTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
69 | 832277C84E058678264DE9C8 /* Pods-AlamofireXMLRPCTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireXMLRPCTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireXMLRPCTests/Pods-AlamofireXMLRPCTests.debug.xcconfig"; sourceTree = ""; };
70 | 8EB4BE68C4AC30489CCE89F1 /* Pods_AlamofireXMLRPC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AlamofireXMLRPC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
71 | AB04114F261B82FE00C92732 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; };
72 | AB0411B8261B8B4B00C92732 /* AlamofireXMLRPC.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; indentWidth = 2; path = AlamofireXMLRPC.podspec; sourceTree = ""; tabWidth = 2; };
73 | AB4DE685261BA2670001A636 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = ""; };
74 | AB6A66A6261B7F3600DFE928 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; };
75 | AB6A66A8261B7F3600DFE928 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
76 | AB6A66A9261B7F3600DFE928 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; };
77 | AB89E21D261CC0B500A064C4 /* XMLRPCNodeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLRPCNodeTests.swift; sourceTree = ""; };
78 | AB89E223261CC90400A064C4 /* XMLResponseSerializerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XMLResponseSerializerTests.swift; sourceTree = ""; };
79 | ABD07445261BA9C30096E113 /* .swift-version */ = {isa = PBXFileReference; explicitFileType = text.yaml; path = ".swift-version"; sourceTree = ""; };
80 | E6A4D09B256C9E3D060D8585 /* Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AlamofireXMLRPC-AlamofireXMLRPCTests/Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.debug.xcconfig"; sourceTree = ""; };
81 | /* End PBXFileReference section */
82 |
83 | /* Begin PBXFrameworksBuildPhase section */
84 | 3FF3D5491BC81FA300599A37 /* Frameworks */ = {
85 | isa = PBXFrameworksBuildPhase;
86 | buildActionMask = 2147483647;
87 | files = (
88 | 3FF3D5511BC81FA300599A37 /* AlamofireXMLRPC.framework in Frameworks */,
89 | F80080FF84960F46D6064A2C /* Pods_AlamofireXMLRPC_AlamofireXMLRPCTests.framework in Frameworks */,
90 | );
91 | runOnlyForDeploymentPostprocessing = 0;
92 | };
93 | 630682181BC27C28005D7BC8 /* Frameworks */ = {
94 | isa = PBXFrameworksBuildPhase;
95 | buildActionMask = 2147483647;
96 | files = (
97 | 67CF01F64E5D22FCBF7DE484 /* Pods_AlamofireXMLRPC.framework in Frameworks */,
98 | );
99 | runOnlyForDeploymentPostprocessing = 0;
100 | };
101 | /* End PBXFrameworksBuildPhase section */
102 |
103 | /* Begin PBXGroup section */
104 | 3FF3D54D1BC81FA300599A37 /* AlamofireXMLRPCTests */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 3FF3D5501BC81FA300599A37 /* Info.plist */,
108 | 3F93F3A11D623C7B002B4D50 /* call.xml */,
109 | 3F93F39B1D621163002B4D50 /* testArrayParam.xml */,
110 | 3F93F3911D61DACE002B4D50 /* testFault.xml */,
111 | 3F93F3951D620A47002B4D50 /* testFaultStruct.xml */,
112 | 3F93F3971D620B50002B4D50 /* testParams.xml */,
113 | 3F93F3991D62103F002B4D50 /* testStructParam.xml */,
114 | AB89E223261CC90400A064C4 /* XMLResponseSerializerTests.swift */,
115 | 3F93F39F1D623BFE002B4D50 /* XMLRPCCallTests.swift */,
116 | AB89E21D261CC0B500A064C4 /* XMLRPCNodeTests.swift */,
117 | 3F93F38F1D61DA92002B4D50 /* XMLRPCResponseSerializerTests.swift */,
118 | );
119 | name = AlamofireXMLRPCTests;
120 | path = Tests/AlamofireXMLRPCTests;
121 | sourceTree = "";
122 | };
123 | 630682121BC27C28005D7BC8 = {
124 | isa = PBXGroup;
125 | children = (
126 | 6306821E1BC27C28005D7BC8 /* AlamofireXMLRPC */,
127 | 3FF3D54D1BC81FA300599A37 /* AlamofireXMLRPCTests */,
128 | F296BF02E35720E5C1B86BE0 /* Frameworks */,
129 | EB695486185E3E32D83E0F0D /* Pods */,
130 | 6306821D1BC27C28005D7BC8 /* Products */,
131 | AB4DE685261BA2670001A636 /* .gitignore */,
132 | AB04114F261B82FE00C92732 /* .swiftlint.yml */,
133 | ABD07445261BA9C30096E113 /* .swift-version */,
134 | 3F93F3A31D624780002B4D50 /* .travis.yml */,
135 | AB0411B8261B8B4B00C92732 /* AlamofireXMLRPC.podspec */,
136 | AB6A66A9261B7F3600DFE928 /* LICENSE */,
137 | AB6A66A6261B7F3600DFE928 /* Package.swift */,
138 | AB6A66A8261B7F3600DFE928 /* README.md */,
139 | );
140 | sourceTree = "";
141 | };
142 | 6306821D1BC27C28005D7BC8 /* Products */ = {
143 | isa = PBXGroup;
144 | children = (
145 | 6306821C1BC27C28005D7BC8 /* AlamofireXMLRPC.framework */,
146 | 3FF3D54C1BC81FA300599A37 /* AlamofireXMLRPCTests.xctest */,
147 | );
148 | name = Products;
149 | sourceTree = "";
150 | };
151 | 6306821E1BC27C28005D7BC8 /* AlamofireXMLRPC */ = {
152 | isa = PBXGroup;
153 | children = (
154 | 3F17802A1BC6DC0100DFDB76 /* AEXML+RPC.swift */,
155 | 6306821F1BC27C28005D7BC8 /* AlamofireXMLRPC.h */,
156 | 3F17802C1BC7008B00DFDB76 /* Alamofire+XML.swift */,
157 | 630682271BC29885005D7BC8 /* Alamofire+XMLRPC.swift */,
158 | 630682211BC27C28005D7BC8 /* Info.plist */,
159 | 3F1780281BC6D8AC00DFDB76 /* Value.swift */,
160 | 3F93F38D1D61BE74002B4D50 /* XMLRPCError.swift */,
161 | 3F93F39D1D62288D002B4D50 /* XMLRPCNode.swift */,
162 | );
163 | name = AlamofireXMLRPC;
164 | path = Sources/AlamofireXMLRPC;
165 | sourceTree = "";
166 | };
167 | EB695486185E3E32D83E0F0D /* Pods */ = {
168 | isa = PBXGroup;
169 | children = (
170 | 5E513F774BDB1750A705D36C /* Pods-AlamofireXMLRPC.debug.xcconfig */,
171 | 41FE5237411009B80BB9127F /* Pods-AlamofireXMLRPC.release.xcconfig */,
172 | 832277C84E058678264DE9C8 /* Pods-AlamofireXMLRPCTests.debug.xcconfig */,
173 | 03490A74537FFB87195A71A1 /* Pods-AlamofireXMLRPCTests.release.xcconfig */,
174 | E6A4D09B256C9E3D060D8585 /* Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.debug.xcconfig */,
175 | 24BCA26B28D0BF05D794B29D /* Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.release.xcconfig */,
176 | );
177 | name = Pods;
178 | sourceTree = "";
179 | };
180 | F296BF02E35720E5C1B86BE0 /* Frameworks */ = {
181 | isa = PBXGroup;
182 | children = (
183 | 8EB4BE68C4AC30489CCE89F1 /* Pods_AlamofireXMLRPC.framework */,
184 | 734CA487D4E5B63EE1B805F9 /* Pods_AlamofireXMLRPC_AlamofireXMLRPCTests.framework */,
185 | );
186 | name = Frameworks;
187 | sourceTree = "";
188 | };
189 | /* End PBXGroup section */
190 |
191 | /* Begin PBXHeadersBuildPhase section */
192 | 630682191BC27C28005D7BC8 /* Headers */ = {
193 | isa = PBXHeadersBuildPhase;
194 | buildActionMask = 2147483647;
195 | files = (
196 | 630682201BC27C28005D7BC8 /* AlamofireXMLRPC.h in Headers */,
197 | );
198 | runOnlyForDeploymentPostprocessing = 0;
199 | };
200 | /* End PBXHeadersBuildPhase section */
201 |
202 | /* Begin PBXNativeTarget section */
203 | 3FF3D54B1BC81FA300599A37 /* AlamofireXMLRPCTests */ = {
204 | isa = PBXNativeTarget;
205 | buildConfigurationList = 3FF3D5561BC81FA300599A37 /* Build configuration list for PBXNativeTarget "AlamofireXMLRPCTests" */;
206 | buildPhases = (
207 | 6CA247A782517A74BCA704F8 /* [CP] Check Pods Manifest.lock */,
208 | 517F746CE78592A28B284F7E /* [CP] Check Pods Manifest.lock */,
209 | 3FF3D5481BC81FA300599A37 /* Sources */,
210 | 3FF3D5491BC81FA300599A37 /* Frameworks */,
211 | 3FF3D54A1BC81FA300599A37 /* Resources */,
212 | B18820CD7B471CF827C3BA85 /* [CP] Embed Pods Frameworks */,
213 | );
214 | buildRules = (
215 | );
216 | dependencies = (
217 | 3FF3D5531BC81FA300599A37 /* PBXTargetDependency */,
218 | );
219 | name = AlamofireXMLRPCTests;
220 | productName = AlamofireXMLRPCTests;
221 | productReference = 3FF3D54C1BC81FA300599A37 /* AlamofireXMLRPCTests.xctest */;
222 | productType = "com.apple.product-type.bundle.unit-test";
223 | };
224 | 6306821B1BC27C28005D7BC8 /* AlamofireXMLRPC */ = {
225 | isa = PBXNativeTarget;
226 | buildConfigurationList = 630682241BC27C28005D7BC8 /* Build configuration list for PBXNativeTarget "AlamofireXMLRPC" */;
227 | buildPhases = (
228 | D39708A2023AE99D7BA87E8E /* [CP] Check Pods Manifest.lock */,
229 | 630682171BC27C28005D7BC8 /* Sources */,
230 | 630682181BC27C28005D7BC8 /* Frameworks */,
231 | 630682191BC27C28005D7BC8 /* Headers */,
232 | 6306821A1BC27C28005D7BC8 /* Resources */,
233 | AB6A66B7261B80FB00DFE928 /* SwiftLint */,
234 | );
235 | buildRules = (
236 | );
237 | dependencies = (
238 | );
239 | name = AlamofireXMLRPC;
240 | productName = AlamofireXMLRPC;
241 | productReference = 6306821C1BC27C28005D7BC8 /* AlamofireXMLRPC.framework */;
242 | productType = "com.apple.product-type.framework";
243 | };
244 | /* End PBXNativeTarget section */
245 |
246 | /* Begin PBXProject section */
247 | 630682131BC27C28005D7BC8 /* Project object */ = {
248 | isa = PBXProject;
249 | attributes = {
250 | LastSwiftUpdateCheck = 0700;
251 | LastUpgradeCheck = 1240;
252 | ORGANIZATIONNAME = kodlian;
253 | TargetAttributes = {
254 | 3FF3D54B1BC81FA300599A37 = {
255 | CreatedOnToolsVersion = 7.0;
256 | LastSwiftMigration = 1240;
257 | };
258 | 6306821B1BC27C28005D7BC8 = {
259 | CreatedOnToolsVersion = 7.0.1;
260 | LastSwiftMigration = 1240;
261 | };
262 | };
263 | };
264 | buildConfigurationList = 630682161BC27C28005D7BC8 /* Build configuration list for PBXProject "AlamofireXMLRPC" */;
265 | compatibilityVersion = "Xcode 3.2";
266 | developmentRegion = en;
267 | hasScannedForEncodings = 0;
268 | knownRegions = (
269 | en,
270 | Base,
271 | );
272 | mainGroup = 630682121BC27C28005D7BC8;
273 | productRefGroup = 6306821D1BC27C28005D7BC8 /* Products */;
274 | projectDirPath = "";
275 | projectRoot = "";
276 | targets = (
277 | 6306821B1BC27C28005D7BC8 /* AlamofireXMLRPC */,
278 | 3FF3D54B1BC81FA300599A37 /* AlamofireXMLRPCTests */,
279 | );
280 | };
281 | /* End PBXProject section */
282 |
283 | /* Begin PBXResourcesBuildPhase section */
284 | 3FF3D54A1BC81FA300599A37 /* Resources */ = {
285 | isa = PBXResourcesBuildPhase;
286 | buildActionMask = 2147483647;
287 | files = (
288 | 3F93F3981D620B50002B4D50 /* testParams.xml in Resources */,
289 | 3F93F39A1D62103F002B4D50 /* testStructParam.xml in Resources */,
290 | 3F93F3921D61DACE002B4D50 /* testFault.xml in Resources */,
291 | 3F93F3A21D623C7B002B4D50 /* call.xml in Resources */,
292 | 3F93F3961D620A47002B4D50 /* testFaultStruct.xml in Resources */,
293 | 3F93F3A41D624780002B4D50 /* .travis.yml in Resources */,
294 | 3F93F39C1D621163002B4D50 /* testArrayParam.xml in Resources */,
295 | );
296 | runOnlyForDeploymentPostprocessing = 0;
297 | };
298 | 6306821A1BC27C28005D7BC8 /* Resources */ = {
299 | isa = PBXResourcesBuildPhase;
300 | buildActionMask = 2147483647;
301 | files = (
302 | );
303 | runOnlyForDeploymentPostprocessing = 0;
304 | };
305 | /* End PBXResourcesBuildPhase section */
306 |
307 | /* Begin PBXShellScriptBuildPhase section */
308 | 517F746CE78592A28B284F7E /* [CP] Check Pods Manifest.lock */ = {
309 | isa = PBXShellScriptBuildPhase;
310 | buildActionMask = 2147483647;
311 | files = (
312 | );
313 | inputPaths = (
314 | );
315 | name = "[CP] Check Pods Manifest.lock";
316 | outputPaths = (
317 | );
318 | runOnlyForDeploymentPostprocessing = 0;
319 | shellPath = /bin/sh;
320 | 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";
321 | showEnvVarsInLog = 0;
322 | };
323 | 6CA247A782517A74BCA704F8 /* [CP] Check Pods Manifest.lock */ = {
324 | isa = PBXShellScriptBuildPhase;
325 | buildActionMask = 2147483647;
326 | files = (
327 | );
328 | inputPaths = (
329 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
330 | "${PODS_ROOT}/Manifest.lock",
331 | );
332 | name = "[CP] Check Pods Manifest.lock";
333 | outputPaths = (
334 | "$(DERIVED_FILE_DIR)/Pods-AlamofireXMLRPC-AlamofireXMLRPCTests-checkManifestLockResult.txt",
335 | );
336 | runOnlyForDeploymentPostprocessing = 0;
337 | shellPath = /bin/sh;
338 | 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";
339 | showEnvVarsInLog = 0;
340 | };
341 | AB6A66B7261B80FB00DFE928 /* SwiftLint */ = {
342 | isa = PBXShellScriptBuildPhase;
343 | buildActionMask = 2147483647;
344 | files = (
345 | );
346 | inputFileListPaths = (
347 | );
348 | inputPaths = (
349 | );
350 | name = SwiftLint;
351 | outputFileListPaths = (
352 | );
353 | outputPaths = (
354 | );
355 | runOnlyForDeploymentPostprocessing = 0;
356 | shellPath = /bin/sh;
357 | shellScript = "${PODS_ROOT}/SwiftLint/swiftlint\n\n";
358 | };
359 | B18820CD7B471CF827C3BA85 /* [CP] Embed Pods Frameworks */ = {
360 | isa = PBXShellScriptBuildPhase;
361 | buildActionMask = 2147483647;
362 | files = (
363 | );
364 | inputPaths = (
365 | "${PODS_ROOT}/Target Support Files/Pods-AlamofireXMLRPC-AlamofireXMLRPCTests/Pods-AlamofireXMLRPC-AlamofireXMLRPCTests-frameworks.sh",
366 | "${BUILT_PRODUCTS_DIR}/AEXML/AEXML.framework",
367 | "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
368 | );
369 | name = "[CP] Embed Pods Frameworks";
370 | outputPaths = (
371 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AEXML.framework",
372 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
373 | );
374 | runOnlyForDeploymentPostprocessing = 0;
375 | shellPath = /bin/sh;
376 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AlamofireXMLRPC-AlamofireXMLRPCTests/Pods-AlamofireXMLRPC-AlamofireXMLRPCTests-frameworks.sh\"\n";
377 | showEnvVarsInLog = 0;
378 | };
379 | D39708A2023AE99D7BA87E8E /* [CP] Check Pods Manifest.lock */ = {
380 | isa = PBXShellScriptBuildPhase;
381 | buildActionMask = 2147483647;
382 | files = (
383 | );
384 | inputPaths = (
385 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
386 | "${PODS_ROOT}/Manifest.lock",
387 | );
388 | name = "[CP] Check Pods Manifest.lock";
389 | outputPaths = (
390 | "$(DERIVED_FILE_DIR)/Pods-AlamofireXMLRPC-checkManifestLockResult.txt",
391 | );
392 | runOnlyForDeploymentPostprocessing = 0;
393 | shellPath = /bin/sh;
394 | 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";
395 | showEnvVarsInLog = 0;
396 | };
397 | /* End PBXShellScriptBuildPhase section */
398 |
399 | /* Begin PBXSourcesBuildPhase section */
400 | 3FF3D5481BC81FA300599A37 /* Sources */ = {
401 | isa = PBXSourcesBuildPhase;
402 | buildActionMask = 2147483647;
403 | files = (
404 | AB89E224261CC90400A064C4 /* XMLResponseSerializerTests.swift in Sources */,
405 | AB89E21E261CC0B500A064C4 /* XMLRPCNodeTests.swift in Sources */,
406 | 3F93F3A01D623BFE002B4D50 /* XMLRPCCallTests.swift in Sources */,
407 | 3F93F3901D61DA92002B4D50 /* XMLRPCResponseSerializerTests.swift in Sources */,
408 | );
409 | runOnlyForDeploymentPostprocessing = 0;
410 | };
411 | 630682171BC27C28005D7BC8 /* Sources */ = {
412 | isa = PBXSourcesBuildPhase;
413 | buildActionMask = 2147483647;
414 | files = (
415 | 3F93F38E1D61BE74002B4D50 /* XMLRPCError.swift in Sources */,
416 | 3F17802B1BC6DC0100DFDB76 /* AEXML+RPC.swift in Sources */,
417 | 3FE18B6F1D8DB4410054AD1A /* Alamofire+XMLRPC.swift in Sources */,
418 | 3FE18B6E1D8DB2110054AD1A /* Alamofire+XML.swift in Sources */,
419 | 3F1780291BC6D8AC00DFDB76 /* Value.swift in Sources */,
420 | 3F93F39E1D62288D002B4D50 /* XMLRPCNode.swift in Sources */,
421 | );
422 | runOnlyForDeploymentPostprocessing = 0;
423 | };
424 | /* End PBXSourcesBuildPhase section */
425 |
426 | /* Begin PBXTargetDependency section */
427 | 3FF3D5531BC81FA300599A37 /* PBXTargetDependency */ = {
428 | isa = PBXTargetDependency;
429 | target = 6306821B1BC27C28005D7BC8 /* AlamofireXMLRPC */;
430 | targetProxy = 3FF3D5521BC81FA300599A37 /* PBXContainerItemProxy */;
431 | };
432 | /* End PBXTargetDependency section */
433 |
434 | /* Begin XCBuildConfiguration section */
435 | 3FF3D5541BC81FA300599A37 /* Debug */ = {
436 | isa = XCBuildConfiguration;
437 | baseConfigurationReference = E6A4D09B256C9E3D060D8585 /* Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.debug.xcconfig */;
438 | buildSettings = {
439 | COMBINE_HIDPI_IMAGES = YES;
440 | INFOPLIST_FILE = "$(SRCROOT)/Tests/AlamofireXMLRPCTests/Info.plist";
441 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
442 | PRODUCT_BUNDLE_IDENTIFIER = com.kodlian.AlamofireXMLRPCTests;
443 | PRODUCT_NAME = "$(TARGET_NAME)";
444 | SWIFT_VERSION = 5.0;
445 | };
446 | name = Debug;
447 | };
448 | 3FF3D5551BC81FA300599A37 /* Release */ = {
449 | isa = XCBuildConfiguration;
450 | baseConfigurationReference = 24BCA26B28D0BF05D794B29D /* Pods-AlamofireXMLRPC-AlamofireXMLRPCTests.release.xcconfig */;
451 | buildSettings = {
452 | COMBINE_HIDPI_IMAGES = YES;
453 | INFOPLIST_FILE = "$(SRCROOT)/Tests/AlamofireXMLRPCTests/Info.plist";
454 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
455 | PRODUCT_BUNDLE_IDENTIFIER = com.kodlian.AlamofireXMLRPCTests;
456 | PRODUCT_NAME = "$(TARGET_NAME)";
457 | SWIFT_VERSION = 5.0;
458 | };
459 | name = Release;
460 | };
461 | 630682221BC27C28005D7BC8 /* Debug */ = {
462 | isa = XCBuildConfiguration;
463 | buildSettings = {
464 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
465 | ALWAYS_SEARCH_USER_PATHS = NO;
466 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
467 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
468 | CLANG_CXX_LIBRARY = "libc++";
469 | CLANG_ENABLE_MODULES = YES;
470 | CLANG_ENABLE_OBJC_ARC = YES;
471 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
472 | CLANG_WARN_BOOL_CONVERSION = YES;
473 | CLANG_WARN_COMMA = YES;
474 | CLANG_WARN_CONSTANT_CONVERSION = YES;
475 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
476 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
477 | CLANG_WARN_EMPTY_BODY = YES;
478 | CLANG_WARN_ENUM_CONVERSION = YES;
479 | CLANG_WARN_INFINITE_RECURSION = YES;
480 | CLANG_WARN_INT_CONVERSION = YES;
481 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
482 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
483 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
484 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
485 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
486 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
487 | CLANG_WARN_STRICT_PROTOTYPES = YES;
488 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
489 | CLANG_WARN_UNREACHABLE_CODE = YES;
490 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
491 | COPY_PHASE_STRIP = NO;
492 | CURRENT_PROJECT_VERSION = 1;
493 | DEBUG_INFORMATION_FORMAT = dwarf;
494 | ENABLE_STRICT_OBJC_MSGSEND = YES;
495 | ENABLE_TESTABILITY = YES;
496 | GCC_C_LANGUAGE_STANDARD = gnu99;
497 | GCC_DYNAMIC_NO_PIC = NO;
498 | GCC_NO_COMMON_BLOCKS = YES;
499 | GCC_OPTIMIZATION_LEVEL = 0;
500 | GCC_PREPROCESSOR_DEFINITIONS = (
501 | "DEBUG=1",
502 | "$(inherited)",
503 | );
504 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
505 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
506 | GCC_WARN_UNDECLARED_SELECTOR = YES;
507 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
508 | GCC_WARN_UNUSED_FUNCTION = YES;
509 | GCC_WARN_UNUSED_VARIABLE = YES;
510 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
511 | MACOSX_DEPLOYMENT_TARGET = 10.12;
512 | MTL_ENABLE_DEBUG_INFO = YES;
513 | ONLY_ACTIVE_ARCH = YES;
514 | SDKROOT = macosx;
515 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
516 | SWIFT_VERSION = 5.0;
517 | TVOS_DEPLOYMENT_TARGET = 12.0;
518 | VERSIONING_SYSTEM = "apple-generic";
519 | VERSION_INFO_PREFIX = "";
520 | };
521 | name = Debug;
522 | };
523 | 630682231BC27C28005D7BC8 /* Release */ = {
524 | isa = XCBuildConfiguration;
525 | buildSettings = {
526 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
527 | ALWAYS_SEARCH_USER_PATHS = NO;
528 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
529 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
530 | CLANG_CXX_LIBRARY = "libc++";
531 | CLANG_ENABLE_MODULES = YES;
532 | CLANG_ENABLE_OBJC_ARC = YES;
533 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
534 | CLANG_WARN_BOOL_CONVERSION = YES;
535 | CLANG_WARN_COMMA = YES;
536 | CLANG_WARN_CONSTANT_CONVERSION = YES;
537 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
538 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
539 | CLANG_WARN_EMPTY_BODY = YES;
540 | CLANG_WARN_ENUM_CONVERSION = YES;
541 | CLANG_WARN_INFINITE_RECURSION = YES;
542 | CLANG_WARN_INT_CONVERSION = YES;
543 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
544 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
545 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
546 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
547 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
548 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
549 | CLANG_WARN_STRICT_PROTOTYPES = YES;
550 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
551 | CLANG_WARN_UNREACHABLE_CODE = YES;
552 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
553 | COPY_PHASE_STRIP = NO;
554 | CURRENT_PROJECT_VERSION = 1;
555 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
556 | ENABLE_NS_ASSERTIONS = NO;
557 | ENABLE_STRICT_OBJC_MSGSEND = YES;
558 | GCC_C_LANGUAGE_STANDARD = gnu99;
559 | GCC_NO_COMMON_BLOCKS = YES;
560 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
561 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
562 | GCC_WARN_UNDECLARED_SELECTOR = YES;
563 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
564 | GCC_WARN_UNUSED_FUNCTION = YES;
565 | GCC_WARN_UNUSED_VARIABLE = YES;
566 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
567 | MACOSX_DEPLOYMENT_TARGET = 10.12;
568 | MTL_ENABLE_DEBUG_INFO = NO;
569 | SDKROOT = macosx;
570 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
571 | SWIFT_VERSION = 5.0;
572 | TVOS_DEPLOYMENT_TARGET = 12.0;
573 | VERSIONING_SYSTEM = "apple-generic";
574 | VERSION_INFO_PREFIX = "";
575 | };
576 | name = Release;
577 | };
578 | 630682251BC27C28005D7BC8 /* Debug */ = {
579 | isa = XCBuildConfiguration;
580 | baseConfigurationReference = 5E513F774BDB1750A705D36C /* Pods-AlamofireXMLRPC.debug.xcconfig */;
581 | buildSettings = {
582 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
583 | CLANG_ENABLE_MODULES = YES;
584 | COMBINE_HIDPI_IMAGES = YES;
585 | DEFINES_MODULE = YES;
586 | DYLIB_COMPATIBILITY_VERSION = 1;
587 | DYLIB_CURRENT_VERSION = 1;
588 | DYLIB_INSTALL_NAME_BASE = "@rpath";
589 | FRAMEWORK_VERSION = A;
590 | INFOPLIST_FILE = "$(SRCROOT)/Sources/AlamofireXMLRPC/Info.plist";
591 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
592 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
593 | ONLY_ACTIVE_ARCH = NO;
594 | PRODUCT_BUNDLE_IDENTIFIER = com.kodlian.AlamofireXMLRPC;
595 | PRODUCT_NAME = "$(TARGET_NAME)";
596 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
597 | SWIFT_VERSION = 5.0;
598 | TVOS_DEPLOYMENT_TARGET = 12.0;
599 | };
600 | name = Debug;
601 | };
602 | 630682261BC27C28005D7BC8 /* Release */ = {
603 | isa = XCBuildConfiguration;
604 | baseConfigurationReference = 41FE5237411009B80BB9127F /* Pods-AlamofireXMLRPC.release.xcconfig */;
605 | buildSettings = {
606 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
607 | CLANG_ENABLE_MODULES = YES;
608 | COMBINE_HIDPI_IMAGES = YES;
609 | DEFINES_MODULE = YES;
610 | DYLIB_COMPATIBILITY_VERSION = 1;
611 | DYLIB_CURRENT_VERSION = 1;
612 | DYLIB_INSTALL_NAME_BASE = "@rpath";
613 | FRAMEWORK_VERSION = A;
614 | INFOPLIST_FILE = "$(SRCROOT)/Sources/AlamofireXMLRPC/Info.plist";
615 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
616 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
617 | PRODUCT_BUNDLE_IDENTIFIER = com.kodlian.AlamofireXMLRPC;
618 | PRODUCT_NAME = "$(TARGET_NAME)";
619 | SWIFT_VERSION = 5.0;
620 | TVOS_DEPLOYMENT_TARGET = 12.0;
621 | };
622 | name = Release;
623 | };
624 | /* End XCBuildConfiguration section */
625 |
626 | /* Begin XCConfigurationList section */
627 | 3FF3D5561BC81FA300599A37 /* Build configuration list for PBXNativeTarget "AlamofireXMLRPCTests" */ = {
628 | isa = XCConfigurationList;
629 | buildConfigurations = (
630 | 3FF3D5541BC81FA300599A37 /* Debug */,
631 | 3FF3D5551BC81FA300599A37 /* Release */,
632 | );
633 | defaultConfigurationIsVisible = 0;
634 | defaultConfigurationName = Release;
635 | };
636 | 630682161BC27C28005D7BC8 /* Build configuration list for PBXProject "AlamofireXMLRPC" */ = {
637 | isa = XCConfigurationList;
638 | buildConfigurations = (
639 | 630682221BC27C28005D7BC8 /* Debug */,
640 | 630682231BC27C28005D7BC8 /* Release */,
641 | );
642 | defaultConfigurationIsVisible = 0;
643 | defaultConfigurationName = Release;
644 | };
645 | 630682241BC27C28005D7BC8 /* Build configuration list for PBXNativeTarget "AlamofireXMLRPC" */ = {
646 | isa = XCConfigurationList;
647 | buildConfigurations = (
648 | 630682251BC27C28005D7BC8 /* Debug */,
649 | 630682261BC27C28005D7BC8 /* Release */,
650 | );
651 | defaultConfigurationIsVisible = 0;
652 | defaultConfigurationName = Release;
653 | };
654 | /* End XCConfigurationList section */
655 | };
656 | rootObject = 630682131BC27C28005D7BC8 /* Project object */;
657 | }
658 |
--------------------------------------------------------------------------------