├── .circle.yml
├── Gemfile
├── APIBase.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcshareddata
│ └── xcschemes
│ │ ├── Podspec Lint.xcscheme
│ │ ├── APIBaseOSX.xcscheme
│ │ └── APIBaseiOS.xcscheme
└── project.pbxproj
├── Tools
├── generateDocs.sh
└── generateChangelog.sh
├── Package.swift
├── Sources
├── APIBase.h
├── Info.plist
├── API.swift
├── NSError+Utility.swift
└── RouteBase.swift
├── .gitignore
├── AdorkableAPIBase.podspec
├── .travis.yml
├── Tests
├── Info.plist
├── RouteBaseTests.swift
└── RouteBaseOSXTests.swift
├── LICENSE.md
├── README.md
├── CHANGELOG.md
└── .overcommit.yml
/.circle.yml:
--------------------------------------------------------------------------------
1 | machine:
2 | xcode:
3 | version: "7.1"
4 |
5 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'cocoapods'
4 | gem 'xcpretty'
--------------------------------------------------------------------------------
/APIBase.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tools/generateDocs.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | jazzy -o docs --swift-version 2.1
4 | find ./docs/Classes/*.html | xargs grep 'Undocumented'
5 | find ./docs/Classes/**/*.html | xargs grep 'Undocumented'
6 | find ./docs/Extensions/*.html | xargs grep 'Undocumented'
7 |
--------------------------------------------------------------------------------
/Tools/generateChangelog.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | github_changelog_generator --no-verbose
4 |
5 | checkFileUncommitted() {
6 | if git status --porcelain | grep -q $1; then
7 | echo "* $1 is dirty"
8 | return 1
9 | else
10 | return 0
11 | fi
12 | }
13 |
14 | checkFileUncommitted "CHANGELOG.md"
15 | result=$?
16 |
17 | exit $result
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Package.swift
3 | // APIBase
4 | //
5 | // Created by Ian Grossberg on 12/23/15.
6 | // Copyright © 2015 Adorkable. All rights reserved.
7 | //
8 |
9 | import PackageDescription
10 |
11 | let package = Package(
12 | name: "AdorkableAPIBase",
13 | targets: [
14 | Target(name: "AdorkableAPIBase")
15 | ],
16 | exclude: [
17 | "Tests"
18 | ]
19 | )
--------------------------------------------------------------------------------
/Sources/APIBase.h:
--------------------------------------------------------------------------------
1 | //
2 | // APIBase.h
3 | // APIBase
4 | //
5 | // Created by Ian Grossberg on 8/10/15.
6 | // Copyright (c) 2015 Adorkable. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for APIBase.
12 | FOUNDATION_EXPORT double APIBaseVersionNumber;
13 |
14 | //! Project version string for APIBase.
15 | FOUNDATION_EXPORT const unsigned char APIBaseVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | .DS_Store
3 |
4 | # rbenv
5 | .ruby-version
6 |
7 | # Xcode
8 | #
9 | build/
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata
19 | *.xccheckout
20 | *.moved-aside
21 | DerivedData
22 | *.hmap
23 | *.ipa
24 | *.xcuserstate
25 |
26 | # Cocoapods
27 | #
28 | Pods/
29 |
30 | # Carthage
31 | #
32 | Carthage/Checkouts
33 | Carthage/Build
34 |
35 | # Documentation
36 | #
37 | docs
38 |
39 | # swiftenv
40 | .swift-version
41 |
42 | # Swift Package Manager
43 | .build
44 |
--------------------------------------------------------------------------------
/AdorkableAPIBase.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'AdorkableAPIBase'
3 | s.version = '0.4'
4 | s.license = 'MIT'
5 | s.homepage = 'https://github.com/Adorkable/APIBaseiOS'
6 | s.authors = { 'Ian Grossberg' => 'yo.ian.g@gmail.com' }
7 | s.summary = 'A purdy simple API base'
8 |
9 | s.ios.deployment_target = '9.1'
10 | s.osx.deployment_target = '10.11'
11 | s.watchos.deployment_target = '2.0'
12 | s.tvos.deployment_target = '9.0'
13 |
14 | s.source = { :git => 'https://github.com/Adorkable/APIBaseiOS.git', :tag => s.version.to_s }
15 | s.source_files = 'Sources/*.swift'
16 |
17 | s.requires_arc = true
18 | end
19 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | osx_image: xcode8.2
3 | before_install:
4 | #- gem install cocoapods
5 | script:
6 | - xcodebuild -project APIBase.xcodeproj -scheme 'APIBaseiOS' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch)' build test GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES
7 | - xcodebuild -project APIBase.xcodeproj -scheme 'APIBaseOSX' -sdk macosx -destination 'platform=OS X,arch=x86_64' build test GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES
8 | #- xcodebuild -project APIBase.xcodeproj -scheme 'Podspec Lint'
9 | after_success:
10 | - bash <(curl -s https://codecov.io/bash)
11 | env:
12 | global:
13 | - TIMEOUT=1000
14 | matrix:
15 | - USE_NETWORK=true
16 |
--------------------------------------------------------------------------------
/Tests/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 |
--------------------------------------------------------------------------------
/Sources/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 | 0.4
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 |
2 | The MIT License (MIT)
3 |
4 | Copyright (c) 2015 Ian Grossberg, Adorkable.
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Tests/RouteBaseTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RouteBaseTests.swift
3 | // RouteBaseTests
4 | //
5 | // Created by Ian Grossberg on 8/10/15.
6 | // Copyright (c) 2015 Adorkable. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | #if os(iOS)
12 | @testable import APIBaseiOS
13 | #elseif os(OSX)
14 | @testable import APIBaseOSX
15 | #endif
16 |
17 | struct TestAPI : API {
18 | static var domain : String {
19 | return "www.asdf.com"
20 | }
21 | static var port : String {
22 | return "80"
23 | }
24 | }
25 |
26 | // TODO: Test creating a subclass of RouteBase
27 | class RouteBaseTests: XCTestCase {
28 |
29 | func testBaseUrl() {
30 | let base = RouteBase()
31 |
32 | XCTAssertNotNil(base.baseUrl, "Base Url should not be nil")
33 | XCTAssertNotEqual(SubclassShouldOverrideUrl!, base.baseUrl!, "Base Url should not equal Subclass Should Override Url")
34 | }
35 |
36 | func testQuery() {
37 | let base = RouteBase()
38 |
39 | XCTAssertEqual(SubclassShouldOverrideString, base.query, "Query should equal Subclass Should Override String")
40 | }
41 |
42 | func testHTTPMethod() {
43 | XCTAssertEqual(SubclassShouldOverrideString, RouteBase.httpMethod, "HTTP Method should equal Subclass Should Override String")
44 | }
45 |
46 | func testHTTPBody() {
47 | let base = RouteBase()
48 |
49 | XCTAssertEqual(SubclassShouldOverrideString, base.httpBody, "HTTP Body should equal Subclass Should Override String")
50 | }
51 |
52 | // TODO: test encodeString
53 |
54 | // TODO: test JSON Task
55 | // TODO: test Data Task
56 | }
57 |
--------------------------------------------------------------------------------
/Tests/RouteBaseOSXTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RouteBaseTests.swift
3 | // RouteBaseTests
4 | //
5 | // Created by Ian Grossberg on 8/10/15.
6 | // Copyright (c) 2015 Adorkable. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | @testable import APIBaseOSX
12 |
13 | struct TestAPI : API {
14 | static var domain : String {
15 | get
16 | {
17 | return "www.asdf.com"
18 | }
19 | }
20 | }
21 |
22 | // TODO: Test creating a subclass of RouteBase
23 | class RouteBaseTests: XCTestCase {
24 |
25 | func testBaseUrl() {
26 | XCTAssertNotNil(RouteBase.baseUrl, "Base Url should not be nil")
27 | XCTAssertNotEqual(SubclassShouldOverrideUrl!, RouteBase.baseUrl!, "Base Url should not equal Subclass Should Override Url")
28 | }
29 |
30 | func testPath() {
31 | XCTAssertEqual(SubclassShouldOverrideString, RouteBase.path, "Path should equal Subclass Should Override String")
32 | }
33 |
34 | func testQuery() {
35 | let base = RouteBase()
36 |
37 | XCTAssertEqual(SubclassShouldOverrideString, base.query, "Query should equal Subclass Should Override String")
38 | }
39 |
40 | func testHTTPMethod() {
41 | XCTAssertEqual(SubclassShouldOverrideString, RouteBase.httpMethod, "HTTP Method should equal Subclass Should Override String")
42 | }
43 |
44 | func testHTTPBody() {
45 | let base = RouteBase()
46 |
47 | XCTAssertEqual(SubclassShouldOverrideString, base.httpBody, "HTTP Body should equal Subclass Should Override String")
48 | }
49 |
50 | // TODO: test encodeString
51 |
52 | // TODO: test JSON Task
53 | // TODO: test Data Task
54 | }
55 |
--------------------------------------------------------------------------------
/Sources/API.swift:
--------------------------------------------------------------------------------
1 | //
2 | // API.swift
3 | // APIBase
4 | //
5 | // Created by Ian Grossberg on 11/19/15.
6 | // Copyright © 2015 Adorkable. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public protocol API {
12 |
13 | static var requestProtocol : String { get }
14 | static var domain : String { get }
15 | static var port : String { get }
16 | static var baseUrl : URL? { get }
17 |
18 | static var cachePolicy : NSURLRequest.CachePolicy { get }
19 | static var timeoutInterval : TimeInterval { get }
20 |
21 | static func encodeString(_ string : String) -> String?
22 |
23 | static func addParameter(_ addTo : inout String, name : String, value : String)
24 | }
25 |
26 | public extension API {
27 | static var requestProtocol : String {
28 | get {
29 | return "http"
30 | }
31 | }
32 |
33 | static var baseUrl : URL? {
34 | get {
35 | return URL(string: self.requestProtocol + "://" + self.domain + ":" + self.port)
36 | }
37 | }
38 |
39 | static var cachePolicy : NSURLRequest.CachePolicy {
40 | get {
41 | return NSURLRequest.CachePolicy.reloadRevalidatingCacheData
42 | }
43 | }
44 | static var timeoutInterval : TimeInterval {
45 | get {
46 | return 30
47 | }
48 | }
49 |
50 | static func encodeString(_ string : String) -> String? {
51 |
52 | return string.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)
53 | }
54 |
55 | static func addParameter(_ addTo : inout String, name : String, value : String) {
56 |
57 | guard name.characters.count > 0 else { return }
58 | guard value.characters.count > 0 else { return }
59 |
60 | guard let encodedValue = self.encodeString(value) else {
61 | // TODO: report failure
62 | return
63 | }
64 |
65 | let add = name + "=" + encodedValue
66 |
67 | if addTo.characters.count > 0 {
68 | addTo += "&" + add
69 | } else {
70 | addTo = add
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | APIBase
2 | ===
3 | [](https://travis-ci.org/Adorkable/APIBaseiOS)
4 | [](https://codecov.io/github/Adorkable/APIBaseiOS?branch=master)
5 | [](https://codebeat.co/projects/github-com-adorkable-apibaseios)
6 | [](http://cocoadocs.org/docsets/AdorkableAPIBase/)
7 | [](http://cocoadocs.org/docsets/AdorkableAPIBase/)
8 | [](https://github.com/Carthage/Carthage)
9 | [](http://cocoadocs.org/docsets/AdorkableAPIBase/)
10 |
11 | **APIBase** a purdy simple base for an framework to access an API. Now with **iOS, OSX, watchos,** and **tvos** support!
12 |
13 | It features two protocols: `API` and `Route`.
14 |
15 | ### `API`
16 |
17 | * defines overall settings and work for communicating with your API
18 | * usually is made to provide access to individual routes
19 | * can be used statically or by creating an instance of the object that conforms to it
20 |
21 | ### `Route`
22 |
23 | * defines a worker for accessing a single route of your API
24 | * must be instantiated, usually created and managed by an `API` object to simplify the interface for consumers of your API accessing library
25 | * includes a number of default implementations for accessing basic and JSON routes
26 |
27 | Additionally `RouteBase` is a useful base class that includes common route functionality.
28 |
29 |
30 | Example
31 | ---
32 | Until this README is updated please see [BingAPIiOS](https://github.com/Adorkable/BingAPIiOS)
33 |
34 |
35 | Contributing
36 | ---
37 | If you have any ideas, suggestions or bugs to report please [create an issue](https://github.com/Adorkable/APIBaseiOS/issues/new) labeled *feature* or *bug* (check to see if the issue exists first please!). Or suggest a pull request!
38 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | ## [0.4](https://github.com/Adorkable/APIBaseiOS/tree/0.4) (2017-02-28)
4 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.3.4...0.4)
5 |
6 | ## [0.3.4](https://github.com/Adorkable/APIBaseiOS/tree/0.3.4) (2016-01-03)
7 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.3.3...0.3.4)
8 |
9 | ## [0.3.3](https://github.com/Adorkable/APIBaseiOS/tree/0.3.3) (2016-01-03)
10 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.3.2...0.3.3)
11 |
12 | ## [0.3.2](https://github.com/Adorkable/APIBaseiOS/tree/0.3.2) (2015-12-23)
13 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.3.1...0.3.2)
14 |
15 | ## [0.3.1](https://github.com/Adorkable/APIBaseiOS/tree/0.3.1) (2015-12-16)
16 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.3.0...0.3.1)
17 |
18 | ## [0.3.0](https://github.com/Adorkable/APIBaseiOS/tree/0.3.0) (2015-12-10)
19 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.2.0...0.3.0)
20 |
21 | ## [0.2.0](https://github.com/Adorkable/APIBaseiOS/tree/0.2.0) (2015-12-04)
22 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.1.0...0.2.0)
23 |
24 | **Implemented enhancements:**
25 |
26 | - update README [\#2](https://github.com/Adorkable/APIBaseiOS/issues/2)
27 |
28 | ## [0.1.0](https://github.com/Adorkable/APIBaseiOS/tree/0.1.0) (2015-11-24)
29 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.0.5...0.1.0)
30 |
31 | ## [0.0.5](https://github.com/Adorkable/APIBaseiOS/tree/0.0.5) (2015-11-19)
32 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.0.4...0.0.5)
33 |
34 | ## [0.0.4](https://github.com/Adorkable/APIBaseiOS/tree/0.0.4) (2015-11-19)
35 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.0.3...0.0.4)
36 |
37 | ## [0.0.3](https://github.com/Adorkable/APIBaseiOS/tree/0.0.3) (2015-11-19)
38 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.0.2...0.0.3)
39 |
40 | ## [0.0.2](https://github.com/Adorkable/APIBaseiOS/tree/0.0.2) (2015-08-10)
41 | [Full Changelog](https://github.com/Adorkable/APIBaseiOS/compare/0.0.1...0.0.2)
42 |
43 | ## [0.0.1](https://github.com/Adorkable/APIBaseiOS/tree/0.0.1) (2015-08-10)
44 |
45 |
46 | \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
--------------------------------------------------------------------------------
/Sources/NSError+Utility.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NSError+Utility.swift
3 | // APIBase
4 | //
5 | // Created by Ian Grossberg on 7/26/15.
6 | // Copyright © 2015 Adorkable. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public let NSFunctionErrorKey = "FunctionError"
12 | public let NSLineErrorKey = "LineError"
13 |
14 | extension NSError {
15 |
16 | // TODO: support NSLocalizedString
17 | // TODO: support Recovery Attempter
18 | static func userInfo(_ description : String, underlyingError : NSError? = nil, failureReason : String? = nil, recoverySuggestion : String? = nil, recoveryOptions : [String]? = nil, fileName : String = #file, functionName : String = #function, line : Int = #line) -> [String : AnyObject] {
19 |
20 | var userInfo = [
21 | NSFilePathErrorKey : fileName,
22 | NSFunctionErrorKey : functionName,
23 | NSLineErrorKey : NSNumber(value: line as Int),
24 |
25 | NSLocalizedDescriptionKey : description
26 | ] as [String : Any]
27 |
28 | if let underlyingError = underlyingError {
29 | userInfo[NSUnderlyingErrorKey] = underlyingError
30 | }
31 |
32 | if let failureReason = failureReason {
33 | userInfo[NSLocalizedFailureReasonErrorKey] = failureReason
34 | }
35 |
36 | if let recoverySuggestion = recoverySuggestion {
37 | userInfo[NSLocalizedRecoverySuggestionErrorKey] = recoverySuggestion
38 | }
39 |
40 | if let recoveryOptions = recoveryOptions {
41 | userInfo[NSLocalizedRecoveryOptionsErrorKey] = recoveryOptions
42 | }
43 |
44 | return userInfo as [String : AnyObject]
45 | }
46 |
47 | convenience init(domain : String? = nil, code : Int = 0, description : String, underlyingError : NSError? = nil, failureReason : String? = nil, recoverySuggestion : String? = nil, recoveryOptions : [String]? = nil, fileName : String = #file, functionName : String = #function, line : Int = #line) {
48 |
49 | let useDomain : String
50 | if let domain = domain {
51 | useDomain = domain
52 | } else {
53 | useDomain = description
54 | }
55 |
56 | let userInfo = NSError.userInfo(description, underlyingError: underlyingError, failureReason: failureReason, recoverySuggestion: recoverySuggestion, recoveryOptions: recoveryOptions, fileName: fileName, functionName: functionName, line: line)
57 |
58 | self.init(domain: useDomain, code: 0, userInfo: userInfo)
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/.overcommit.yml:
--------------------------------------------------------------------------------
1 | # Use this file to configure the Overcommit hooks you wish to use. This will
2 | # extend the default configuration defined in:
3 | # https://github.com/brigade/overcommit/blob/master/config/default.yml
4 | #
5 | # At the topmost level of this YAML file is a key representing type of hook
6 | # being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
7 | # customize each hook, such as whether to only run it on certain files (via
8 | # `include`), whether to only display output if it fails (via `quiet`), etc.
9 | #
10 | # For a complete list of hooks, see:
11 | # https://github.com/brigade/overcommit/tree/master/lib/overcommit/hook
12 | #
13 | # For a complete list of options that you can use to customize hooks, see:
14 | # https://github.com/brigade/overcommit#configuration
15 | #
16 | # Uncomment the following lines to make the configuration take effect.
17 |
18 | #PreCommit:
19 | # RuboCop:
20 | # enabled: true
21 | # on_warn: fail # Treat all warnings as failures
22 | #
23 | # TrailingWhitespace:
24 | # exclude:
25 | # - '**/db/structure.sql' # Ignore trailing whitespace in generated files
26 | #
27 | #PostCheckout:
28 | # ALL: # Special hook name that customizes all hooks of this type
29 | # quiet: true # Change all post-checkout hooks to only display output on failure
30 | #
31 | # IndexTags:
32 | # enabled: true # Generate a tags file with `ctags` each time HEAD changes
33 |
34 | CommitMsg:
35 | ALL:
36 | enabled: false
37 | EmptyMessage:
38 | enabled: true
39 | HardTabs:
40 | enabled: true
41 | SpellCheck:
42 | enabled: false
43 |
44 | PostCheckout:
45 | ALL:
46 | enabled: false
47 | BundleInstall:
48 | enabled: true
49 | SubmoduleStatus:
50 | enabled: true
51 |
52 | PostCommit:
53 | ALL:
54 | enabled: false
55 | BundleInstall:
56 | enabled: true
57 | SubmoduleStatus:
58 | enabled: true
59 |
60 | PostMerge:
61 | ALL:
62 | enabled: false
63 | BundleInstall:
64 | enabled: true
65 | SubmoduleStatus:
66 | enabled: true
67 |
68 | PostRewrite:
69 | ALL:
70 | enabled: false
71 | BundleInstall:
72 | enabled: true
73 | SubmoduleStatus:
74 | enabled: true
75 |
76 | PreCommit:
77 | ALL:
78 | enabled: false
79 | AuthorEmail:
80 | enabled: true
81 | BrokenSymlinks:
82 | enabled: true
83 | BundleCheck:
84 | enabled: true
85 | CaseConflicts:
86 | enabled: true
87 | GoLint:
88 | enabled: true
89 | GoVet:
90 | enabled: true
91 | JsonSyntax:
92 | enabled: true
93 | LocalPathsInGemfile:
94 | enabled: true
95 | MergeConflicts:
96 | enabled: true
97 | ShellCheck:
98 | enabled: true
99 | TravisLint:
100 | enabled: true
101 |
102 | PrePush:
103 | ALL:
104 | enabled: false
105 | Changelog:
106 | enabled: true
107 | required_executable: './Tools/generateChangelog.sh'
108 |
109 |
110 | PreRebase:
111 | ALL:
112 | enabled: false
113 |
114 |
--------------------------------------------------------------------------------
/APIBase.xcodeproj/xcshareddata/xcschemes/Podspec Lint.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/APIBase.xcodeproj/xcshareddata/xcschemes/APIBaseOSX.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
34 |
40 |
41 |
42 |
43 |
44 |
50 |
51 |
52 |
53 |
54 |
55 |
65 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
83 |
84 |
90 |
91 |
92 |
93 |
95 |
96 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/APIBase.xcodeproj/xcshareddata/xcschemes/APIBaseiOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
45 |
46 |
48 |
54 |
55 |
56 |
57 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
79 |
80 |
86 |
87 |
88 |
89 |
90 |
91 |
97 |
98 |
104 |
105 |
106 |
107 |
109 |
110 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/Sources/RouteBase.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RouteBase.swift
3 | // APIBase
4 | //
5 | // Created by Ian Grossberg on 8/10/15.
6 | // Copyright (c) 2015 Adorkable. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | internal let SubclassShouldOverrideString = "Subclass should override"
12 |
13 | internal let SubclassShouldOverrideUrl : URL? = URL(string: "subclassShouldOverride://asdf")
14 |
15 | public enum SuccessResult {
16 | case success(T)
17 | case failure(Error)
18 | }
19 |
20 | public typealias ConfigureUrlRequestHandler = (_ urlRequest : inout URLRequest) -> Void
21 | public typealias DataTaskCompletionHandler = (_ result : SuccessResult, _ urlResponse : URLResponse?) -> Void
22 | public typealias JsonTaskCompletionHandler = (_ result : SuccessResult) -> Void
23 |
24 | public protocol Route {
25 | // TODO: once Swift supports protocol class vars as this should be overridable (when inheriting from RouteBase for example)
26 | var baseUrl : URL? { get }
27 |
28 | var timeoutInterval : TimeInterval { get }
29 | var cachePolicy : NSURLRequest.CachePolicy { get }
30 |
31 | var path : String { get }
32 | var query : String { get }
33 | static var httpMethod : String { get }
34 | var httpBody : String { get }
35 |
36 | func buildUrl() -> URL?
37 |
38 | func dataTask(configureUrlRequest : ConfigureUrlRequestHandler?, completionHandler : @escaping DataTaskCompletionHandler) -> URLSessionDataTask?
39 | func jsonTask(_ configureUrlRequest : ConfigureUrlRequestHandler?, completionHandler : @escaping JsonTaskCompletionHandler) -> URLSessionDataTask?
40 | }
41 |
42 | public extension Route {
43 |
44 | func buildUrl() -> URL? {
45 |
46 | // TODO: proper way to tell clients of this library the reason for this failure
47 | guard self.path != SubclassShouldOverrideString else {
48 | return nil
49 | }
50 |
51 | var combinedPath = self.path
52 |
53 | var query = String()
54 | if self.query != SubclassShouldOverrideString
55 | {
56 | query += self.query
57 | }
58 |
59 | if query.characters.count > 0
60 | {
61 | combinedPath += "?" + query
62 | }
63 |
64 | return URL(string: combinedPath, relativeTo: self.baseUrl)
65 | }
66 |
67 | internal func createURLRequest(_ url : URL) -> URLRequest {
68 |
69 | var result = URLRequest(url: url, cachePolicy: self.cachePolicy, timeoutInterval: self.timeoutInterval)
70 | result.setValue("text/plain", forHTTPHeaderField: "Content-Type")
71 |
72 | result.httpMethod = type(of: self).httpMethod
73 |
74 | if self.httpBody != SubclassShouldOverrideString
75 | {
76 | if let bodyData = self.httpBody.data(using: String.Encoding.utf8, allowLossyConversion: false)
77 | {
78 | result.httpBody = bodyData
79 | result.setValue("\(bodyData.count)", forHTTPHeaderField: "Content-Length")
80 | }
81 | }
82 |
83 | return result
84 | }
85 |
86 | internal func handleDataTaskCompletion(_ data : Data?, urlResponse : URLResponse?, error: Error?, completionHandler : DataTaskCompletionHandler) {
87 |
88 | guard let data = data else {
89 |
90 | guard let error = error else {
91 | completionHandler(.failure(NSError(description: "Response is empty") ), urlResponse)
92 | return
93 | }
94 |
95 | completionHandler(.failure(error), urlResponse)
96 | return
97 | }
98 |
99 | completionHandler(.success(data), urlResponse)
100 | }
101 |
102 | public func dataTask(configureUrlRequest : ConfigureUrlRequestHandler? = nil, completionHandler : @escaping DataTaskCompletionHandler) -> URLSessionDataTask? {
103 |
104 | guard let url = self.buildUrl() else {
105 | // TODO: notify client?
106 | return nil
107 | }
108 |
109 | guard type(of: self).httpMethod != SubclassShouldOverrideString else {
110 | // TODO: notify client
111 | return nil
112 | }
113 |
114 | var urlRequest = self.createURLRequest(url)
115 |
116 | if let configureUrlRequest = configureUrlRequest {
117 | configureUrlRequest(&urlRequest)
118 | }
119 |
120 | let urlSession = URLSession.shared
121 |
122 | return urlSession.dataTask(with: urlRequest, completionHandler: { (data, urlResponse, error) in
123 | self.handleDataTaskCompletion(data, urlResponse: urlResponse, error: error, completionHandler: completionHandler)
124 | })
125 | }
126 |
127 | internal func handleJsonTaskCompletion(_ data : SuccessResult, completionHandler : JsonTaskCompletionHandler) {
128 | switch data {
129 | case .success(let data):
130 |
131 | do
132 | {
133 | let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as AnyObject
134 | completionHandler(SuccessResult.success(jsonObject))
135 | } catch let error as NSError
136 | {
137 | if error.code == 3840, // Invalid JSON format, may be straight text
138 | let decodedErrorString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) {
139 |
140 | let decodedError = NSError(description: decodedErrorString as String)
141 | completionHandler(.failure(decodedError))
142 |
143 | } else {
144 | completionHandler(.failure(error))
145 | }
146 | }
147 |
148 | break
149 |
150 | case .failure(let error):
151 | completionHandler(.failure(error))
152 | break
153 | }
154 | }
155 |
156 | public func jsonTask(_ configureUrlRequest : ConfigureUrlRequestHandler? = nil, completionHandler : @escaping JsonTaskCompletionHandler) -> URLSessionDataTask? {
157 |
158 | return self.dataTask(configureUrlRequest: { (urlRequest : inout URLRequest) -> Void in
159 |
160 | if let configureUrlRequest = configureUrlRequest
161 | {
162 | configureUrlRequest(&urlRequest)
163 | }
164 | urlRequest.setValue("application/json", forHTTPHeaderField: "Accept") // TODO: should this go before or after the calls closer to the client?
165 |
166 | }, completionHandler: { (result, urlResponse) -> Void in
167 |
168 | self.handleJsonTaskCompletion(result, completionHandler: completionHandler)
169 | })
170 | }
171 | }
172 |
173 | // TODO: currently Generic Protocols are not supported
174 | open class RouteBase: NSObject, Route {
175 |
176 | open var baseUrl : URL? {
177 | return T.baseUrl as URL?
178 | }
179 |
180 | open let timeoutInterval : TimeInterval
181 | open let cachePolicy : NSURLRequest.CachePolicy
182 |
183 | public init(timeoutInterval : TimeInterval = T.timeoutInterval, cachePolicy : NSURLRequest.CachePolicy = T.cachePolicy) {
184 | self.timeoutInterval = timeoutInterval
185 | self.cachePolicy = cachePolicy
186 |
187 | super.init()
188 | }
189 |
190 | // TODO: Figure out better abstact function mechanism
191 | open var path : String {
192 | return SubclassShouldOverrideString
193 | }
194 |
195 | // TODO: Figure out better abstact function mechanism
196 | open var query : String {
197 | return SubclassShouldOverrideString
198 | }
199 |
200 | // TODO: Figure out better abstact function mechanism
201 | open class var httpMethod : String {
202 | return SubclassShouldOverrideString
203 | }
204 |
205 | // TODO: Figure out better abstact function mechanism
206 | open var httpBody : String {
207 | return SubclassShouldOverrideString
208 | }
209 |
210 | open class func addParameter(_ addTo : inout String, name : String, value : String) {
211 |
212 | T.addParameter(&addTo, name: name, value: value)
213 | }
214 | }
215 |
--------------------------------------------------------------------------------
/APIBase.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXAggregateTarget section */
10 | 3C686FDE1B792F1500E6E326 /* Podspec Lint */ = {
11 | isa = PBXAggregateTarget;
12 | buildConfigurationList = 3C686FDF1B792F1500E6E326 /* Build configuration list for PBXAggregateTarget "Podspec Lint" */;
13 | buildPhases = (
14 | 3C686FE21B792F1900E6E326 /* ShellScript */,
15 | );
16 | dependencies = (
17 | );
18 | name = "Podspec Lint";
19 | productName = "Podspec Lint";
20 | };
21 | /* End PBXAggregateTarget section */
22 |
23 | /* Begin PBXBuildFile section */
24 | 3C4A68CF1BFE95D200A8BA80 /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4A68CE1BFE95D200A8BA80 /* API.swift */; };
25 | 3C4A68D01BFE963E00A8BA80 /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4A68CE1BFE95D200A8BA80 /* API.swift */; };
26 | 3C5EC7081C12028A003D3801 /* RouteBaseTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C633E571BFE8BD50095FEB9 /* RouteBaseTests.swift */; };
27 | 3C633E431BFE8ADA0095FEB9 /* APIBaseOSX.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C633E391BFE8ADA0095FEB9 /* APIBaseOSX.framework */; };
28 | 3C633E561BFE8BC00095FEB9 /* RouteBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C686FDB1B79250500E6E326 /* RouteBase.swift */; };
29 | 3C633E5A1BFE8BDF0095FEB9 /* RouteBaseTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C633E571BFE8BD50095FEB9 /* RouteBaseTests.swift */; };
30 | 3C686FC11B79233100E6E326 /* APIBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C686FC01B79233100E6E326 /* APIBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
31 | 3C686FC71B79233100E6E326 /* APIBaseiOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C686FBB1B79233100E6E326 /* APIBaseiOS.framework */; };
32 | 3C686FDC1B79250500E6E326 /* RouteBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C686FDB1B79250500E6E326 /* RouteBase.swift */; };
33 | 3C686FE41B7933DD00E6E326 /* LICENSE.md in Resources */ = {isa = PBXBuildFile; fileRef = 3C686FE31B7933DD00E6E326 /* LICENSE.md */; };
34 | 3CB210921C21E60900026BE0 /* NSError+Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CB210911C21E60900026BE0 /* NSError+Utility.swift */; };
35 | 3CD330C71BFE88F500167264 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 3C686FDA1B7924F900E6E326 /* README.md */; };
36 | 3CE9693A1C359370007C43C6 /* NSError+Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CB210911C21E60900026BE0 /* NSError+Utility.swift */; };
37 | 3CE9693B1C359379007C43C6 /* APIBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C686FC01B79233100E6E326 /* APIBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
38 | /* End PBXBuildFile section */
39 |
40 | /* Begin PBXContainerItemProxy section */
41 | 3C633E441BFE8ADA0095FEB9 /* PBXContainerItemProxy */ = {
42 | isa = PBXContainerItemProxy;
43 | containerPortal = 3C686FB21B79233100E6E326 /* Project object */;
44 | proxyType = 1;
45 | remoteGlobalIDString = 3C633E381BFE8ADA0095FEB9;
46 | remoteInfo = APIBaseOSX;
47 | };
48 | 3C686FC81B79233100E6E326 /* PBXContainerItemProxy */ = {
49 | isa = PBXContainerItemProxy;
50 | containerPortal = 3C686FB21B79233100E6E326 /* Project object */;
51 | proxyType = 1;
52 | remoteGlobalIDString = 3C686FBA1B79233100E6E326;
53 | remoteInfo = APIBase;
54 | };
55 | /* End PBXContainerItemProxy section */
56 |
57 | /* Begin PBXFileReference section */
58 | 3C4A68CE1BFE95D200A8BA80 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = ""; };
59 | 3C633E391BFE8ADA0095FEB9 /* APIBaseOSX.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = APIBaseOSX.framework; sourceTree = BUILT_PRODUCTS_DIR; };
60 | 3C633E421BFE8ADA0095FEB9 /* APIBaseOSXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = APIBaseOSXTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
61 | 3C633E571BFE8BD50095FEB9 /* RouteBaseTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouteBaseTests.swift; sourceTree = ""; };
62 | 3C686FBB1B79233100E6E326 /* APIBaseiOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = APIBaseiOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
63 | 3C686FBF1B79233100E6E326 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
64 | 3C686FC01B79233100E6E326 /* APIBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APIBase.h; sourceTree = ""; };
65 | 3C686FC61B79233100E6E326 /* APIBaseiOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = APIBaseiOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
66 | 3C686FCC1B79233100E6E326 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
67 | 3C686FD81B7924F900E6E326 /* Gemfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Gemfile; sourceTree = SOURCE_ROOT; };
68 | 3C686FD91B7924F900E6E326 /* AdorkableAPIBase.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = AdorkableAPIBase.podspec; sourceTree = SOURCE_ROOT; };
69 | 3C686FDA1B7924F900E6E326 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
70 | 3C686FDB1B79250500E6E326 /* RouteBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteBase.swift; sourceTree = ""; };
71 | 3C686FDD1B792EB000E6E326 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = SOURCE_ROOT; };
72 | 3C686FE31B7933DD00E6E326 /* LICENSE.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = SOURCE_ROOT; };
73 | 3CB210911C21E60900026BE0 /* NSError+Utility.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSError+Utility.swift"; sourceTree = ""; };
74 | 3CB2C78D1C2B387800BBC529 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = SOURCE_ROOT; };
75 | /* End PBXFileReference section */
76 |
77 | /* Begin PBXFrameworksBuildPhase section */
78 | 3C633E351BFE8ADA0095FEB9 /* Frameworks */ = {
79 | isa = PBXFrameworksBuildPhase;
80 | buildActionMask = 2147483647;
81 | files = (
82 | );
83 | runOnlyForDeploymentPostprocessing = 0;
84 | };
85 | 3C633E3F1BFE8ADA0095FEB9 /* Frameworks */ = {
86 | isa = PBXFrameworksBuildPhase;
87 | buildActionMask = 2147483647;
88 | files = (
89 | 3C633E431BFE8ADA0095FEB9 /* APIBaseOSX.framework in Frameworks */,
90 | );
91 | runOnlyForDeploymentPostprocessing = 0;
92 | };
93 | 3C686FB71B79233100E6E326 /* Frameworks */ = {
94 | isa = PBXFrameworksBuildPhase;
95 | buildActionMask = 2147483647;
96 | files = (
97 | );
98 | runOnlyForDeploymentPostprocessing = 0;
99 | };
100 | 3C686FC31B79233100E6E326 /* Frameworks */ = {
101 | isa = PBXFrameworksBuildPhase;
102 | buildActionMask = 2147483647;
103 | files = (
104 | 3C686FC71B79233100E6E326 /* APIBaseiOS.framework in Frameworks */,
105 | );
106 | runOnlyForDeploymentPostprocessing = 0;
107 | };
108 | /* End PBXFrameworksBuildPhase section */
109 |
110 | /* Begin PBXGroup section */
111 | 3C686FB11B79233100E6E326 = {
112 | isa = PBXGroup;
113 | children = (
114 | 3C686FBD1B79233100E6E326 /* Sources */,
115 | 3C686FCA1B79233100E6E326 /* Tests */,
116 | 3C686FBE1B79233100E6E326 /* Supporting Files */,
117 | 3C686FBC1B79233100E6E326 /* Products */,
118 | );
119 | sourceTree = "";
120 | };
121 | 3C686FBC1B79233100E6E326 /* Products */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 3C686FBB1B79233100E6E326 /* APIBaseiOS.framework */,
125 | 3C686FC61B79233100E6E326 /* APIBaseiOSTests.xctest */,
126 | 3C633E391BFE8ADA0095FEB9 /* APIBaseOSX.framework */,
127 | 3C633E421BFE8ADA0095FEB9 /* APIBaseOSXTests.xctest */,
128 | );
129 | name = Products;
130 | sourceTree = "";
131 | };
132 | 3C686FBD1B79233100E6E326 /* Sources */ = {
133 | isa = PBXGroup;
134 | children = (
135 | 3C686FC01B79233100E6E326 /* APIBase.h */,
136 | 3C4A68CE1BFE95D200A8BA80 /* API.swift */,
137 | 3C686FDB1B79250500E6E326 /* RouteBase.swift */,
138 | 3CB210911C21E60900026BE0 /* NSError+Utility.swift */,
139 | 3C686FBF1B79233100E6E326 /* Info.plist */,
140 | );
141 | path = Sources;
142 | sourceTree = "";
143 | };
144 | 3C686FBE1B79233100E6E326 /* Supporting Files */ = {
145 | isa = PBXGroup;
146 | children = (
147 | 3C686FD81B7924F900E6E326 /* Gemfile */,
148 | 3C686FD91B7924F900E6E326 /* AdorkableAPIBase.podspec */,
149 | 3C686FE31B7933DD00E6E326 /* LICENSE.md */,
150 | 3C686FDA1B7924F900E6E326 /* README.md */,
151 | 3C686FDD1B792EB000E6E326 /* .travis.yml */,
152 | 3CB2C78D1C2B387800BBC529 /* Package.swift */,
153 | );
154 | name = "Supporting Files";
155 | path = APIBase;
156 | sourceTree = "";
157 | };
158 | 3C686FCA1B79233100E6E326 /* Tests */ = {
159 | isa = PBXGroup;
160 | children = (
161 | 3C633E571BFE8BD50095FEB9 /* RouteBaseTests.swift */,
162 | 3C686FCC1B79233100E6E326 /* Info.plist */,
163 | );
164 | path = Tests;
165 | sourceTree = "";
166 | };
167 | /* End PBXGroup section */
168 |
169 | /* Begin PBXHeadersBuildPhase section */
170 | 3C633E361BFE8ADA0095FEB9 /* Headers */ = {
171 | isa = PBXHeadersBuildPhase;
172 | buildActionMask = 2147483647;
173 | files = (
174 | 3CE9693B1C359379007C43C6 /* APIBase.h in Headers */,
175 | );
176 | runOnlyForDeploymentPostprocessing = 0;
177 | };
178 | 3C686FB81B79233100E6E326 /* Headers */ = {
179 | isa = PBXHeadersBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | 3C686FC11B79233100E6E326 /* APIBase.h in Headers */,
183 | );
184 | runOnlyForDeploymentPostprocessing = 0;
185 | };
186 | /* End PBXHeadersBuildPhase section */
187 |
188 | /* Begin PBXNativeTarget section */
189 | 3C633E381BFE8ADA0095FEB9 /* APIBaseOSX */ = {
190 | isa = PBXNativeTarget;
191 | buildConfigurationList = 3C633E4A1BFE8ADA0095FEB9 /* Build configuration list for PBXNativeTarget "APIBaseOSX" */;
192 | buildPhases = (
193 | 3C633E341BFE8ADA0095FEB9 /* Sources */,
194 | 3C633E351BFE8ADA0095FEB9 /* Frameworks */,
195 | 3C633E361BFE8ADA0095FEB9 /* Headers */,
196 | 3C633E371BFE8ADA0095FEB9 /* Resources */,
197 | );
198 | buildRules = (
199 | );
200 | dependencies = (
201 | );
202 | name = APIBaseOSX;
203 | productName = APIBaseOSX;
204 | productReference = 3C633E391BFE8ADA0095FEB9 /* APIBaseOSX.framework */;
205 | productType = "com.apple.product-type.framework";
206 | };
207 | 3C633E411BFE8ADA0095FEB9 /* APIBaseOSXTests */ = {
208 | isa = PBXNativeTarget;
209 | buildConfigurationList = 3C633E4D1BFE8ADA0095FEB9 /* Build configuration list for PBXNativeTarget "APIBaseOSXTests" */;
210 | buildPhases = (
211 | 3C633E3E1BFE8ADA0095FEB9 /* Sources */,
212 | 3C633E3F1BFE8ADA0095FEB9 /* Frameworks */,
213 | 3C633E401BFE8ADA0095FEB9 /* Resources */,
214 | );
215 | buildRules = (
216 | );
217 | dependencies = (
218 | 3C633E451BFE8ADA0095FEB9 /* PBXTargetDependency */,
219 | );
220 | name = APIBaseOSXTests;
221 | productName = APIBaseOSXTests;
222 | productReference = 3C633E421BFE8ADA0095FEB9 /* APIBaseOSXTests.xctest */;
223 | productType = "com.apple.product-type.bundle.unit-test";
224 | };
225 | 3C686FBA1B79233100E6E326 /* APIBaseiOS */ = {
226 | isa = PBXNativeTarget;
227 | buildConfigurationList = 3C686FD11B79233100E6E326 /* Build configuration list for PBXNativeTarget "APIBaseiOS" */;
228 | buildPhases = (
229 | 3C686FB61B79233100E6E326 /* Sources */,
230 | 3C686FB71B79233100E6E326 /* Frameworks */,
231 | 3C686FB81B79233100E6E326 /* Headers */,
232 | 3C686FB91B79233100E6E326 /* Resources */,
233 | );
234 | buildRules = (
235 | );
236 | dependencies = (
237 | );
238 | name = APIBaseiOS;
239 | productName = APIBase;
240 | productReference = 3C686FBB1B79233100E6E326 /* APIBaseiOS.framework */;
241 | productType = "com.apple.product-type.framework";
242 | };
243 | 3C686FC51B79233100E6E326 /* APIBaseiOSTests */ = {
244 | isa = PBXNativeTarget;
245 | buildConfigurationList = 3C686FD41B79233100E6E326 /* Build configuration list for PBXNativeTarget "APIBaseiOSTests" */;
246 | buildPhases = (
247 | 3C686FC21B79233100E6E326 /* Sources */,
248 | 3C686FC31B79233100E6E326 /* Frameworks */,
249 | 3C686FC41B79233100E6E326 /* Resources */,
250 | );
251 | buildRules = (
252 | );
253 | dependencies = (
254 | 3C686FC91B79233100E6E326 /* PBXTargetDependency */,
255 | );
256 | name = APIBaseiOSTests;
257 | productName = APIBaseTests;
258 | productReference = 3C686FC61B79233100E6E326 /* APIBaseiOSTests.xctest */;
259 | productType = "com.apple.product-type.bundle.unit-test";
260 | };
261 | /* End PBXNativeTarget section */
262 |
263 | /* Begin PBXProject section */
264 | 3C686FB21B79233100E6E326 /* Project object */ = {
265 | isa = PBXProject;
266 | attributes = {
267 | LastSwiftMigration = 0710;
268 | LastSwiftUpdateCheck = 0710;
269 | LastUpgradeCheck = 0820;
270 | ORGANIZATIONNAME = Adorkable;
271 | TargetAttributes = {
272 | 3C633E381BFE8ADA0095FEB9 = {
273 | CreatedOnToolsVersion = 7.1.1;
274 | };
275 | 3C633E411BFE8ADA0095FEB9 = {
276 | CreatedOnToolsVersion = 7.1.1;
277 | };
278 | 3C686FBA1B79233100E6E326 = {
279 | CreatedOnToolsVersion = 6.4;
280 | LastSwiftMigration = 0820;
281 | };
282 | 3C686FC51B79233100E6E326 = {
283 | CreatedOnToolsVersion = 6.4;
284 | LastSwiftMigration = 0820;
285 | };
286 | 3C686FDE1B792F1500E6E326 = {
287 | CreatedOnToolsVersion = 6.4;
288 | };
289 | };
290 | };
291 | buildConfigurationList = 3C686FB51B79233100E6E326 /* Build configuration list for PBXProject "APIBase" */;
292 | compatibilityVersion = "Xcode 3.2";
293 | developmentRegion = English;
294 | hasScannedForEncodings = 0;
295 | knownRegions = (
296 | en,
297 | );
298 | mainGroup = 3C686FB11B79233100E6E326;
299 | productRefGroup = 3C686FBC1B79233100E6E326 /* Products */;
300 | projectDirPath = "";
301 | projectRoot = "";
302 | targets = (
303 | 3C686FBA1B79233100E6E326 /* APIBaseiOS */,
304 | 3C686FC51B79233100E6E326 /* APIBaseiOSTests */,
305 | 3C633E381BFE8ADA0095FEB9 /* APIBaseOSX */,
306 | 3C633E411BFE8ADA0095FEB9 /* APIBaseOSXTests */,
307 | 3C686FDE1B792F1500E6E326 /* Podspec Lint */,
308 | );
309 | };
310 | /* End PBXProject section */
311 |
312 | /* Begin PBXResourcesBuildPhase section */
313 | 3C633E371BFE8ADA0095FEB9 /* Resources */ = {
314 | isa = PBXResourcesBuildPhase;
315 | buildActionMask = 2147483647;
316 | files = (
317 | );
318 | runOnlyForDeploymentPostprocessing = 0;
319 | };
320 | 3C633E401BFE8ADA0095FEB9 /* Resources */ = {
321 | isa = PBXResourcesBuildPhase;
322 | buildActionMask = 2147483647;
323 | files = (
324 | );
325 | runOnlyForDeploymentPostprocessing = 0;
326 | };
327 | 3C686FB91B79233100E6E326 /* Resources */ = {
328 | isa = PBXResourcesBuildPhase;
329 | buildActionMask = 2147483647;
330 | files = (
331 | 3C686FE41B7933DD00E6E326 /* LICENSE.md in Resources */,
332 | 3CD330C71BFE88F500167264 /* README.md in Resources */,
333 | );
334 | runOnlyForDeploymentPostprocessing = 0;
335 | };
336 | 3C686FC41B79233100E6E326 /* Resources */ = {
337 | isa = PBXResourcesBuildPhase;
338 | buildActionMask = 2147483647;
339 | files = (
340 | );
341 | runOnlyForDeploymentPostprocessing = 0;
342 | };
343 | /* End PBXResourcesBuildPhase section */
344 |
345 | /* Begin PBXShellScriptBuildPhase section */
346 | 3C686FE21B792F1900E6E326 /* ShellScript */ = {
347 | isa = PBXShellScriptBuildPhase;
348 | buildActionMask = 2147483647;
349 | files = (
350 | );
351 | inputPaths = (
352 | );
353 | outputPaths = (
354 | );
355 | runOnlyForDeploymentPostprocessing = 0;
356 | shellPath = /bin/sh;
357 | shellScript = "pod spec lint AdorkableAPIBase.podspec";
358 | };
359 | /* End PBXShellScriptBuildPhase section */
360 |
361 | /* Begin PBXSourcesBuildPhase section */
362 | 3C633E341BFE8ADA0095FEB9 /* Sources */ = {
363 | isa = PBXSourcesBuildPhase;
364 | buildActionMask = 2147483647;
365 | files = (
366 | 3CE9693A1C359370007C43C6 /* NSError+Utility.swift in Sources */,
367 | 3C4A68D01BFE963E00A8BA80 /* API.swift in Sources */,
368 | 3C633E561BFE8BC00095FEB9 /* RouteBase.swift in Sources */,
369 | );
370 | runOnlyForDeploymentPostprocessing = 0;
371 | };
372 | 3C633E3E1BFE8ADA0095FEB9 /* Sources */ = {
373 | isa = PBXSourcesBuildPhase;
374 | buildActionMask = 2147483647;
375 | files = (
376 | 3C5EC7081C12028A003D3801 /* RouteBaseTests.swift in Sources */,
377 | );
378 | runOnlyForDeploymentPostprocessing = 0;
379 | };
380 | 3C686FB61B79233100E6E326 /* Sources */ = {
381 | isa = PBXSourcesBuildPhase;
382 | buildActionMask = 2147483647;
383 | files = (
384 | 3CB210921C21E60900026BE0 /* NSError+Utility.swift in Sources */,
385 | 3C4A68CF1BFE95D200A8BA80 /* API.swift in Sources */,
386 | 3C686FDC1B79250500E6E326 /* RouteBase.swift in Sources */,
387 | );
388 | runOnlyForDeploymentPostprocessing = 0;
389 | };
390 | 3C686FC21B79233100E6E326 /* Sources */ = {
391 | isa = PBXSourcesBuildPhase;
392 | buildActionMask = 2147483647;
393 | files = (
394 | 3C633E5A1BFE8BDF0095FEB9 /* RouteBaseTests.swift in Sources */,
395 | );
396 | runOnlyForDeploymentPostprocessing = 0;
397 | };
398 | /* End PBXSourcesBuildPhase section */
399 |
400 | /* Begin PBXTargetDependency section */
401 | 3C633E451BFE8ADA0095FEB9 /* PBXTargetDependency */ = {
402 | isa = PBXTargetDependency;
403 | target = 3C633E381BFE8ADA0095FEB9 /* APIBaseOSX */;
404 | targetProxy = 3C633E441BFE8ADA0095FEB9 /* PBXContainerItemProxy */;
405 | };
406 | 3C686FC91B79233100E6E326 /* PBXTargetDependency */ = {
407 | isa = PBXTargetDependency;
408 | target = 3C686FBA1B79233100E6E326 /* APIBaseiOS */;
409 | targetProxy = 3C686FC81B79233100E6E326 /* PBXContainerItemProxy */;
410 | };
411 | /* End PBXTargetDependency section */
412 |
413 | /* Begin XCBuildConfiguration section */
414 | 3C633E4B1BFE8ADA0095FEB9 /* Debug */ = {
415 | isa = XCBuildConfiguration;
416 | buildSettings = {
417 | CODE_SIGN_IDENTITY = "-";
418 | COMBINE_HIDPI_IMAGES = YES;
419 | DEBUG_INFORMATION_FORMAT = dwarf;
420 | DEFINES_MODULE = YES;
421 | DYLIB_COMPATIBILITY_VERSION = 1;
422 | DYLIB_CURRENT_VERSION = 1;
423 | DYLIB_INSTALL_NAME_BASE = "@rpath";
424 | FRAMEWORK_VERSION = A;
425 | INFOPLIST_FILE = Sources/Info.plist;
426 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
427 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
428 | MACOSX_DEPLOYMENT_TARGET = 10.11;
429 | PRODUCT_BUNDLE_IDENTIFIER = "cc.adorkable.APIBase.$(PRODUCT_NAME:rfc1034identifier)";
430 | PRODUCT_NAME = "$(TARGET_NAME)";
431 | SDKROOT = macosx;
432 | SKIP_INSTALL = YES;
433 | SWIFT_VERSION = 3.0;
434 | };
435 | name = Debug;
436 | };
437 | 3C633E4C1BFE8ADA0095FEB9 /* Release */ = {
438 | isa = XCBuildConfiguration;
439 | buildSettings = {
440 | CODE_SIGN_IDENTITY = "-";
441 | COMBINE_HIDPI_IMAGES = YES;
442 | DEFINES_MODULE = YES;
443 | DYLIB_COMPATIBILITY_VERSION = 1;
444 | DYLIB_CURRENT_VERSION = 1;
445 | DYLIB_INSTALL_NAME_BASE = "@rpath";
446 | FRAMEWORK_VERSION = A;
447 | INFOPLIST_FILE = Sources/Info.plist;
448 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
449 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
450 | MACOSX_DEPLOYMENT_TARGET = 10.11;
451 | PRODUCT_BUNDLE_IDENTIFIER = "cc.adorkable.APIBase.$(PRODUCT_NAME:rfc1034identifier)";
452 | PRODUCT_NAME = "$(TARGET_NAME)";
453 | SDKROOT = macosx;
454 | SKIP_INSTALL = YES;
455 | SWIFT_VERSION = 3.0;
456 | };
457 | name = Release;
458 | };
459 | 3C633E4E1BFE8ADA0095FEB9 /* Debug */ = {
460 | isa = XCBuildConfiguration;
461 | buildSettings = {
462 | CODE_SIGN_IDENTITY = "-";
463 | COMBINE_HIDPI_IMAGES = YES;
464 | DEBUG_INFORMATION_FORMAT = dwarf;
465 | INFOPLIST_FILE = Tests/Info.plist;
466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
467 | MACOSX_DEPLOYMENT_TARGET = 10.11;
468 | PRODUCT_BUNDLE_IDENTIFIER = "cc.adorkable.APIBase.$(PRODUCT_NAME:rfc1034identifier)";
469 | PRODUCT_NAME = "$(TARGET_NAME)";
470 | SDKROOT = macosx;
471 | SWIFT_VERSION = 3.0;
472 | };
473 | name = Debug;
474 | };
475 | 3C633E4F1BFE8ADA0095FEB9 /* Release */ = {
476 | isa = XCBuildConfiguration;
477 | buildSettings = {
478 | CODE_SIGN_IDENTITY = "-";
479 | COMBINE_HIDPI_IMAGES = YES;
480 | INFOPLIST_FILE = Tests/Info.plist;
481 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
482 | MACOSX_DEPLOYMENT_TARGET = 10.11;
483 | PRODUCT_BUNDLE_IDENTIFIER = "cc.adorkable.APIBase.$(PRODUCT_NAME:rfc1034identifier)";
484 | PRODUCT_NAME = "$(TARGET_NAME)";
485 | SDKROOT = macosx;
486 | SWIFT_VERSION = 3.0;
487 | };
488 | name = Release;
489 | };
490 | 3C686FCF1B79233100E6E326 /* Debug */ = {
491 | isa = XCBuildConfiguration;
492 | buildSettings = {
493 | ALWAYS_SEARCH_USER_PATHS = NO;
494 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
495 | CLANG_CXX_LIBRARY = "libc++";
496 | CLANG_ENABLE_MODULES = YES;
497 | CLANG_ENABLE_OBJC_ARC = YES;
498 | CLANG_WARN_BOOL_CONVERSION = YES;
499 | CLANG_WARN_CONSTANT_CONVERSION = YES;
500 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
501 | CLANG_WARN_EMPTY_BODY = YES;
502 | CLANG_WARN_ENUM_CONVERSION = YES;
503 | CLANG_WARN_INFINITE_RECURSION = YES;
504 | CLANG_WARN_INT_CONVERSION = YES;
505 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
506 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
507 | CLANG_WARN_UNREACHABLE_CODE = YES;
508 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
509 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
510 | COPY_PHASE_STRIP = NO;
511 | CURRENT_PROJECT_VERSION = 1;
512 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
513 | ENABLE_STRICT_OBJC_MSGSEND = YES;
514 | ENABLE_TESTABILITY = YES;
515 | GCC_C_LANGUAGE_STANDARD = gnu99;
516 | GCC_DYNAMIC_NO_PIC = NO;
517 | GCC_NO_COMMON_BLOCKS = YES;
518 | GCC_OPTIMIZATION_LEVEL = 0;
519 | GCC_PREPROCESSOR_DEFINITIONS = (
520 | "DEBUG=1",
521 | "$(inherited)",
522 | );
523 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
524 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
525 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
526 | GCC_WARN_UNDECLARED_SELECTOR = YES;
527 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
528 | GCC_WARN_UNUSED_FUNCTION = YES;
529 | GCC_WARN_UNUSED_VARIABLE = YES;
530 | IPHONEOS_DEPLOYMENT_TARGET = 8.4;
531 | MTL_ENABLE_DEBUG_INFO = YES;
532 | ONLY_ACTIVE_ARCH = YES;
533 | SDKROOT = iphoneos;
534 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
535 | TARGETED_DEVICE_FAMILY = "1,2";
536 | VERSIONING_SYSTEM = "apple-generic";
537 | VERSION_INFO_PREFIX = "";
538 | };
539 | name = Debug;
540 | };
541 | 3C686FD01B79233100E6E326 /* Release */ = {
542 | isa = XCBuildConfiguration;
543 | buildSettings = {
544 | ALWAYS_SEARCH_USER_PATHS = NO;
545 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
546 | CLANG_CXX_LIBRARY = "libc++";
547 | CLANG_ENABLE_MODULES = YES;
548 | CLANG_ENABLE_OBJC_ARC = YES;
549 | CLANG_WARN_BOOL_CONVERSION = YES;
550 | CLANG_WARN_CONSTANT_CONVERSION = YES;
551 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
552 | CLANG_WARN_EMPTY_BODY = YES;
553 | CLANG_WARN_ENUM_CONVERSION = YES;
554 | CLANG_WARN_INFINITE_RECURSION = YES;
555 | CLANG_WARN_INT_CONVERSION = YES;
556 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
557 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
558 | CLANG_WARN_UNREACHABLE_CODE = YES;
559 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
560 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
561 | COPY_PHASE_STRIP = NO;
562 | CURRENT_PROJECT_VERSION = 1;
563 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
564 | ENABLE_NS_ASSERTIONS = NO;
565 | ENABLE_STRICT_OBJC_MSGSEND = YES;
566 | GCC_C_LANGUAGE_STANDARD = gnu99;
567 | GCC_NO_COMMON_BLOCKS = YES;
568 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
569 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
570 | GCC_WARN_UNDECLARED_SELECTOR = YES;
571 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
572 | GCC_WARN_UNUSED_FUNCTION = YES;
573 | GCC_WARN_UNUSED_VARIABLE = YES;
574 | IPHONEOS_DEPLOYMENT_TARGET = 8.4;
575 | MTL_ENABLE_DEBUG_INFO = NO;
576 | SDKROOT = iphoneos;
577 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
578 | TARGETED_DEVICE_FAMILY = "1,2";
579 | VALIDATE_PRODUCT = YES;
580 | VERSIONING_SYSTEM = "apple-generic";
581 | VERSION_INFO_PREFIX = "";
582 | };
583 | name = Release;
584 | };
585 | 3C686FD21B79233100E6E326 /* Debug */ = {
586 | isa = XCBuildConfiguration;
587 | buildSettings = {
588 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
589 | DEFINES_MODULE = YES;
590 | DYLIB_COMPATIBILITY_VERSION = 1;
591 | DYLIB_CURRENT_VERSION = 1;
592 | DYLIB_INSTALL_NAME_BASE = "@rpath";
593 | INFOPLIST_FILE = Sources/Info.plist;
594 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
595 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
596 | PRODUCT_BUNDLE_IDENTIFIER = "cc.adorkable.APIBase.$(PRODUCT_NAME:rfc1034identifier)";
597 | PRODUCT_NAME = "$(TARGET_NAME)";
598 | SKIP_INSTALL = YES;
599 | SWIFT_VERSION = 3.0;
600 | };
601 | name = Debug;
602 | };
603 | 3C686FD31B79233100E6E326 /* Release */ = {
604 | isa = XCBuildConfiguration;
605 | buildSettings = {
606 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
607 | DEFINES_MODULE = YES;
608 | DYLIB_COMPATIBILITY_VERSION = 1;
609 | DYLIB_CURRENT_VERSION = 1;
610 | DYLIB_INSTALL_NAME_BASE = "@rpath";
611 | INFOPLIST_FILE = Sources/Info.plist;
612 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
613 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
614 | PRODUCT_BUNDLE_IDENTIFIER = "cc.adorkable.APIBase.$(PRODUCT_NAME:rfc1034identifier)";
615 | PRODUCT_NAME = "$(TARGET_NAME)";
616 | SKIP_INSTALL = YES;
617 | SWIFT_VERSION = 3.0;
618 | };
619 | name = Release;
620 | };
621 | 3C686FD51B79233100E6E326 /* Debug */ = {
622 | isa = XCBuildConfiguration;
623 | buildSettings = {
624 | FRAMEWORK_SEARCH_PATHS = (
625 | "$(SDKROOT)/Developer/Library/Frameworks",
626 | "$(inherited)",
627 | );
628 | GCC_PREPROCESSOR_DEFINITIONS = (
629 | "DEBUG=1",
630 | "$(inherited)",
631 | );
632 | INFOPLIST_FILE = Tests/Info.plist;
633 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
634 | PRODUCT_BUNDLE_IDENTIFIER = "cc.adorkable.APIBase.$(PRODUCT_NAME:rfc1034identifier)";
635 | PRODUCT_NAME = "$(TARGET_NAME)";
636 | SWIFT_VERSION = 3.0;
637 | };
638 | name = Debug;
639 | };
640 | 3C686FD61B79233100E6E326 /* Release */ = {
641 | isa = XCBuildConfiguration;
642 | buildSettings = {
643 | FRAMEWORK_SEARCH_PATHS = (
644 | "$(SDKROOT)/Developer/Library/Frameworks",
645 | "$(inherited)",
646 | );
647 | INFOPLIST_FILE = Tests/Info.plist;
648 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
649 | PRODUCT_BUNDLE_IDENTIFIER = "cc.adorkable.APIBase.$(PRODUCT_NAME:rfc1034identifier)";
650 | PRODUCT_NAME = "$(TARGET_NAME)";
651 | SWIFT_VERSION = 3.0;
652 | };
653 | name = Release;
654 | };
655 | 3C686FE01B792F1500E6E326 /* Debug */ = {
656 | isa = XCBuildConfiguration;
657 | buildSettings = {
658 | PRODUCT_NAME = "$(TARGET_NAME)";
659 | };
660 | name = Debug;
661 | };
662 | 3C686FE11B792F1500E6E326 /* Release */ = {
663 | isa = XCBuildConfiguration;
664 | buildSettings = {
665 | PRODUCT_NAME = "$(TARGET_NAME)";
666 | };
667 | name = Release;
668 | };
669 | /* End XCBuildConfiguration section */
670 |
671 | /* Begin XCConfigurationList section */
672 | 3C633E4A1BFE8ADA0095FEB9 /* Build configuration list for PBXNativeTarget "APIBaseOSX" */ = {
673 | isa = XCConfigurationList;
674 | buildConfigurations = (
675 | 3C633E4B1BFE8ADA0095FEB9 /* Debug */,
676 | 3C633E4C1BFE8ADA0095FEB9 /* Release */,
677 | );
678 | defaultConfigurationIsVisible = 0;
679 | defaultConfigurationName = Release;
680 | };
681 | 3C633E4D1BFE8ADA0095FEB9 /* Build configuration list for PBXNativeTarget "APIBaseOSXTests" */ = {
682 | isa = XCConfigurationList;
683 | buildConfigurations = (
684 | 3C633E4E1BFE8ADA0095FEB9 /* Debug */,
685 | 3C633E4F1BFE8ADA0095FEB9 /* Release */,
686 | );
687 | defaultConfigurationIsVisible = 0;
688 | defaultConfigurationName = Release;
689 | };
690 | 3C686FB51B79233100E6E326 /* Build configuration list for PBXProject "APIBase" */ = {
691 | isa = XCConfigurationList;
692 | buildConfigurations = (
693 | 3C686FCF1B79233100E6E326 /* Debug */,
694 | 3C686FD01B79233100E6E326 /* Release */,
695 | );
696 | defaultConfigurationIsVisible = 0;
697 | defaultConfigurationName = Release;
698 | };
699 | 3C686FD11B79233100E6E326 /* Build configuration list for PBXNativeTarget "APIBaseiOS" */ = {
700 | isa = XCConfigurationList;
701 | buildConfigurations = (
702 | 3C686FD21B79233100E6E326 /* Debug */,
703 | 3C686FD31B79233100E6E326 /* Release */,
704 | );
705 | defaultConfigurationIsVisible = 0;
706 | defaultConfigurationName = Release;
707 | };
708 | 3C686FD41B79233100E6E326 /* Build configuration list for PBXNativeTarget "APIBaseiOSTests" */ = {
709 | isa = XCConfigurationList;
710 | buildConfigurations = (
711 | 3C686FD51B79233100E6E326 /* Debug */,
712 | 3C686FD61B79233100E6E326 /* Release */,
713 | );
714 | defaultConfigurationIsVisible = 0;
715 | defaultConfigurationName = Release;
716 | };
717 | 3C686FDF1B792F1500E6E326 /* Build configuration list for PBXAggregateTarget "Podspec Lint" */ = {
718 | isa = XCConfigurationList;
719 | buildConfigurations = (
720 | 3C686FE01B792F1500E6E326 /* Debug */,
721 | 3C686FE11B792F1500E6E326 /* Release */,
722 | );
723 | defaultConfigurationIsVisible = 0;
724 | defaultConfigurationName = Release;
725 | };
726 | /* End XCConfigurationList section */
727 | };
728 | rootObject = 3C686FB21B79233100E6E326 /* Project object */;
729 | }
730 |
--------------------------------------------------------------------------------