From b326774f3f42c5bd24e77c4f9c5f81ac9c3139dc Mon Sep 17 00:00:00 2001 From: Brad Philips Date: Sun, 18 Mar 2018 09:46:26 -0400 Subject: [PATCH 1/5] Updated to alamofire 4.5 --- Example/InkwellExample.xcodeproj/project.pbxproj | 10 +++++++++- Example/Podfile.lock | 12 ++++++------ Inkwell.podspec | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Example/InkwellExample.xcodeproj/project.pbxproj b/Example/InkwellExample.xcodeproj/project.pbxproj index d4e8c52..d60713d 100644 --- a/Example/InkwellExample.xcodeproj/project.pbxproj +++ b/Example/InkwellExample.xcodeproj/project.pbxproj @@ -206,13 +206,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-InkwellExample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - 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"; + 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"; showEnvVarsInLog = 0; }; A743D976ED03342E619CF9A6 /* [CP] Embed Pods Frameworks */ = { @@ -221,9 +224,14 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-InkwellExample/Pods-InkwellExample-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/Inkwell/Inkwell.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Inkwell.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/Example/Podfile.lock b/Example/Podfile.lock index f0579d6..5d47921 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,19 +1,19 @@ PODS: - - Alamofire (4.4.0) + - Alamofire (4.5.1) - Inkwell (1.2.1): - - Alamofire (~> 4.4.0) + - Alamofire (~> 4.5.0) DEPENDENCIES: - Inkwell (from `../`) EXTERNAL SOURCES: Inkwell: - :path: "../" + :path: ../ SPEC CHECKSUMS: - Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d - Inkwell: b38624d679a722baa4222b161d72fb8407a16b63 + Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a + Inkwell: 34dbb2671deb3ac1118a5510e9ea7187dbd9cb3c PODFILE CHECKSUM: 44deffad5fd16cd63e25c367cd7ac75c9b3b5f07 -COCOAPODS: 1.2.1 +COCOAPODS: 1.4.0 diff --git a/Inkwell.podspec b/Inkwell.podspec index 19f52c7..68e4d17 100644 --- a/Inkwell.podspec +++ b/Inkwell.podspec @@ -22,5 +22,5 @@ Pod::Spec.new do |s| s.source_files = 'Inkwell/Inkwell/**/*.swift' s.frameworks = 'Foundation', 'CoreText' - s.dependency 'Alamofire', '~> 4.4.0' + s.dependency 'Alamofire', '~> 4.5.0' end From 94fb1a692006bdbbef89711b61fe98d1b0df16b5 Mon Sep 17 00:00:00 2001 From: Brad Philips Date: Sun, 18 Mar 2018 09:58:03 -0400 Subject: [PATCH 2/5] Updated to swift 4 --- Inkwell/Inkwell.xcodeproj/project.pbxproj | 47 +- .../xcshareddata/xcschemes/Inkwell.xcscheme | 4 +- Inkwell/Inkwell/FontRegister.swift | 6 +- Inkwell/Inkwell/NameDictionary.swift | 2 +- Inkwell/InkwellTests/FontRegisterTests.swift | 2 +- Inkwell/Podfile | 2 +- Inkwell/Podfile.lock | 10 +- Inkwell/Pods/Alamofire/LICENSE | 2 +- Inkwell/Pods/Alamofire/README.md | 206 ++++---- Inkwell/Pods/Alamofire/Source/AFError.swift | 2 +- Inkwell/Pods/Alamofire/Source/Alamofire.swift | 4 +- .../Source/DispatchQueue+Alamofire.swift | 2 +- .../Alamofire/Source/MultipartFormData.swift | 4 +- .../Source/NetworkReachabilityManager.swift | 25 +- .../Pods/Alamofire/Source/Notifications.swift | 2 +- .../Alamofire/Source/ParameterEncoding.swift | 7 +- Inkwell/Pods/Alamofire/Source/Request.swift | 18 +- Inkwell/Pods/Alamofire/Source/Response.swift | 2 +- .../Source/ResponseSerialization.swift | 5 +- Inkwell/Pods/Alamofire/Source/Result.swift | 101 +++- .../Alamofire/Source/ServerTrustPolicy.swift | 2 +- .../Alamofire/Source/SessionDelegate.swift | 18 +- .../Alamofire/Source/SessionManager.swift | 2 +- .../Pods/Alamofire/Source/TaskDelegate.swift | 19 +- Inkwell/Pods/Alamofire/Source/Timeline.swift | 2 +- .../Pods/Alamofire/Source/Validation.swift | 8 +- Inkwell/Pods/Manifest.lock | 10 +- Inkwell/Pods/Pods.xcodeproj/project.pbxproj | 439 +++++++++--------- .../Alamofire/Alamofire.xcconfig | 6 +- .../Target Support Files/Alamofire/Info.plist | 2 +- .../Pods-Inkwell-acknowledgements.markdown | 2 +- .../Pods-Inkwell-acknowledgements.plist | 2 +- .../Pods-Inkwell/Pods-Inkwell-resources.sh | 22 +- .../Pods-Inkwell/Pods-Inkwell.debug.xcconfig | 8 +- .../Pods-Inkwell.release.xcconfig | 8 +- ...ods-InkwellTests-acknowledgements.markdown | 2 +- .../Pods-InkwellTests-acknowledgements.plist | 2 +- .../Pods-InkwellTests-frameworks.sh | 63 ++- .../Pods-InkwellTests-resources.sh | 22 +- .../Pods-InkwellTests.debug.xcconfig | 8 +- .../Pods-InkwellTests.release.xcconfig | 8 +- 41 files changed, 663 insertions(+), 445 deletions(-) diff --git a/Inkwell/Inkwell.xcodeproj/project.pbxproj b/Inkwell/Inkwell.xcodeproj/project.pbxproj index 5ffe3c4..39b8453 100644 --- a/Inkwell/Inkwell.xcodeproj/project.pbxproj +++ b/Inkwell/Inkwell.xcodeproj/project.pbxproj @@ -249,16 +249,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0920; TargetAttributes = { 1F17B5011E9E614C00BF1239 = { CreatedOnToolsVersion = 8.3; - LastSwiftMigration = 0830; + LastSwiftMigration = 0920; ProvisioningStyle = Automatic; }; 1F17B50A1E9E614D00BF1239 = { CreatedOnToolsVersion = 8.3; - LastSwiftMigration = 0830; + LastSwiftMigration = 0920; ProvisioningStyle = Automatic; }; }; @@ -306,13 +306,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Inkwell-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - 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"; + 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"; showEnvVarsInLog = 0; }; 834473AC2B5100F731C94874 /* [CP] Copy Pods Resources */ = { @@ -336,9 +339,12 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -366,13 +372,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-InkwellTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - 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"; + 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"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -421,12 +430,18 @@ 1F17B4FB1E9E60D000BF1239 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -448,12 +463,18 @@ 1F17B4FC1E9E60D000BF1239 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -494,7 +515,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; @@ -532,7 +553,8 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -563,7 +585,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -593,7 +615,8 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -656,7 +679,8 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -707,7 +731,8 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/Inkwell/Inkwell.xcodeproj/xcshareddata/xcschemes/Inkwell.xcscheme b/Inkwell/Inkwell.xcodeproj/xcshareddata/xcschemes/Inkwell.xcscheme index 7e4b237..a40b439 100644 --- a/Inkwell/Inkwell.xcodeproj/xcshareddata/xcschemes/Inkwell.xcscheme +++ b/Inkwell/Inkwell.xcodeproj/xcshareddata/xcschemes/Inkwell.xcscheme @@ -1,6 +1,6 @@ Bool { - let range = NSRange(location: 0, length: string.characters.count) + let range = NSRange(location: 0, length: string.count) return regex.matches(in: string, options: [], range: range).count > 0 } diff --git a/Inkwell/InkwellTests/FontRegisterTests.swift b/Inkwell/InkwellTests/FontRegisterTests.swift index 90d2f0c..d5c7c15 100644 --- a/Inkwell/InkwellTests/FontRegisterTests.swift +++ b/Inkwell/InkwellTests/FontRegisterTests.swift @@ -53,7 +53,7 @@ class FontRegisterTests: XCTestCase { let provider = CGDataProvider(data: data as CFData) let cgfont = CGFont(provider!) - CTFontManagerUnregisterGraphicsFont(cgfont, nil) + CTFontManagerUnregisterGraphicsFont(cgfont!, nil) try? FileManager.default.removeItem(atPath: nameDictionaryURL.path) fontURL = nil diff --git a/Inkwell/Podfile b/Inkwell/Podfile index 79e7699..8b08588 100644 --- a/Inkwell/Podfile +++ b/Inkwell/Podfile @@ -2,7 +2,7 @@ use_frameworks! platform :ios, '8.0' target 'Inkwell' do - pod 'Alamofire', '~> 4.4.0' + pod 'Alamofire', '~> 4.5.0' target 'InkwellTests' do inherit! :search_paths diff --git a/Inkwell/Podfile.lock b/Inkwell/Podfile.lock index 7d513c6..920ceb7 100644 --- a/Inkwell/Podfile.lock +++ b/Inkwell/Podfile.lock @@ -1,12 +1,12 @@ PODS: - - Alamofire (4.4.0) + - Alamofire (4.5.1) DEPENDENCIES: - - Alamofire (~> 4.4.0) + - Alamofire (~> 4.5.0) SPEC CHECKSUMS: - Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d + Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a -PODFILE CHECKSUM: e7e16bea11cf9944902356f1e7ab316119943496 +PODFILE CHECKSUM: aef9dddf19f23d7974b52bd5521b1e0ca91cbb24 -COCOAPODS: 1.2.1 +COCOAPODS: 1.4.0 diff --git a/Inkwell/Pods/Alamofire/LICENSE b/Inkwell/Pods/Alamofire/LICENSE index 4cfbf72..1654602 100644 --- a/Inkwell/Pods/Alamofire/LICENSE +++ b/Inkwell/Pods/Alamofire/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Alamofire/README.md b/Inkwell/Pods/Alamofire/README.md index 12ea4c7..f190df9 100644 --- a/Inkwell/Pods/Alamofire/README.md +++ b/Inkwell/Pods/Alamofire/README.md @@ -1,9 +1,9 @@ -![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/assets/alamofire.png) +![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/master/alamofire.png) [![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg?branch=master)](https://travis-ci.org/Alamofire/Alamofire) [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](http://cocoadocs.org/docsets/Alamofire) +[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](https://alamofire.github.io/Alamofire) [![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](http://twitter.com/AlamofireSF) [![Gitter](https://badges.gitter.im/Alamofire/Alamofire.svg)](https://gitter.im/Alamofire/Alamofire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) @@ -45,7 +45,7 @@ Alamofire is an HTTP networking library written in Swift. - [x] TLS Certificate and Public Key Pinning - [x] Network Reachability - [x] Comprehensive Unit and Integration Test Coverage -- [x] [Complete Documentation](http://cocoadocs.org/docsets/Alamofire) +- [x] [Complete Documentation](https://alamofire.github.io/Alamofire) ## Component Libraries @@ -57,8 +57,8 @@ In order to keep Alamofire focused specifically on core networking implementatio ## Requirements - iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 8.1+ -- Swift 3.0+ +- Xcode 8.3+ +- Swift 3.1+ ## Migration Guides @@ -84,7 +84,7 @@ In order to keep Alamofire focused specifically on core networking implementatio $ gem install cocoapods ``` -> CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+. +> CocoaPods 1.1+ is required to build Alamofire 4.0+. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: @@ -94,7 +94,7 @@ platform :ios, '10.0' use_frameworks! target '' do - pod 'Alamofire', '~> 4.4' + pod 'Alamofire', '~> 4.5' end ``` @@ -118,7 +118,7 @@ $ brew install carthage To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "Alamofire/Alamofire" ~> 4.4 +github "Alamofire/Alamofire" ~> 4.5 ``` Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. @@ -137,21 +137,21 @@ dependencies: [ ### Manually -If you prefer not to use either of the aforementioned dependency managers, you can integrate Alamofire into your project manually. +If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually. #### Embedded Framework - Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: ```bash -$ git init -``` + $ git init + ``` - Add Alamofire as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command: ```bash -$ git submodule add https://github.com/Alamofire/Alamofire.git -``` + $ git submodule add https://github.com/Alamofire/Alamofire.git + ``` - Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. @@ -191,13 +191,16 @@ Handling the `Response` of a `Request` made in Alamofire involves chaining a res ```swift Alamofire.request("https://httpbin.org/get").responseJSON { response in - print(response.request) // original URL request - print(response.response) // HTTP URL response - print(response.data) // server data - print(response.result) // result of response serialization + print("Request: \(String(describing: response.request))") // original url request + print("Response: \(String(describing: response.response))") // http url response + print("Result: \(response.result)") // response serialization result + + if let json = response.result.value { + print("JSON: \(json)") // serialized json response + } - if let JSON = response.result.value { - print("JSON: \(JSON)") + if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) { + print("Data: \(utf8Text)") // original server data as UTF8 string } } ``` @@ -243,7 +246,7 @@ func responsePropertyList( None of the response handlers perform any validation of the `HTTPURLResponse` it gets back from the server. -> For example, response status codes in the `400..<499` and `500..<599` ranges do NOT automatically trigger an `Error`. Alamofire uses [Response Validation](#response-validation) method chaining to achieve this. +> For example, response status codes in the `400..<500` and `500..<600` ranges do NOT automatically trigger an `Error`. Alamofire uses [Response Validation](#response-validation) method chaining to achieve this. #### Response Handler @@ -345,18 +348,18 @@ Alamofire.request("https://httpbin.org/get") .validate(statusCode: 200..<300) .validate(contentType: ["application/json"]) .responseData { response in - switch response.result { - case .success: - print("Validation Successful") - case .failure(let error): - print(error) - } + switch response.result { + case .success: + print("Validation Successful") + case .failure(let error): + print(error) + } } ``` #### Automatic Validation -Automatically validates status code within `200...299` range, and that the `Content-Type` header of the response matches the `Accept` header of the request, if one is provided. +Automatically validates status code within `200..<300` range, and that the `Content-Type` header of the response matches the `Accept` header of the request, if one is provided. ```swift Alamofire.request("https://httpbin.org/get").validate().responseJSON { response in @@ -491,7 +494,7 @@ struct JSONStringArrayEncoding: ParameterEncoding { } func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = urlRequest.urlRequest + var urlRequest = try urlRequest.asURLRequest() let data = try JSONSerialization.data(withJSONObject: array, options: []) @@ -612,9 +615,9 @@ Requests made in Alamofire that fetch data from a server can download the data i ```swift Alamofire.download("https://httpbin.org/image/png").responseData { response in - if let data = response.result.value { - let image = UIImage(data: data) - } + if let data = response.result.value { + let image = UIImage(data: data) + } } ``` @@ -629,8 +632,8 @@ You can also provide a `DownloadFileDestination` closure to move the file from t ```swift let destination: DownloadRequest.DownloadFileDestination = { _, _ in - let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] - let fileURL = documentsURL.appendPathComponent("pig.png") + let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] + let fileURL = documentsURL.appendingPathComponent("pig.png") return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) } @@ -638,16 +641,16 @@ let destination: DownloadRequest.DownloadFileDestination = { _, _ in Alamofire.download(urlString, to: destination).response { response in print(response) - if response.error == nil, let imagePath = response.destinationURL?.path { - let image = UIImage(contentsOfFile: imagePath) - } + if response.error == nil, let imagePath = response.destinationURL?.path { + let image = UIImage(contentsOfFile: imagePath) + } } ``` You can also use the suggested download destination API. ```swift -let destination = DownloadRequest.suggestedDownloadDestination(directory: .documentDirectory) +let destination = DownloadRequest.suggestedDownloadDestination(for: .documentDirectory) Alamofire.download("https://httpbin.org/image/png", to: destination) ``` @@ -661,9 +664,9 @@ Alamofire.download("https://httpbin.org/image/png") print("Download Progress: \(progress.fractionCompleted)") } .responseData { response in - if let data = response.result.value { - let image = UIImage(data: data) - } + if let data = response.result.value { + let image = UIImage(data: data) + } } ``` @@ -677,9 +680,9 @@ Alamofire.download("https://httpbin.org/image/png") print("Download Progress: \(progress.fractionCompleted)") } .responseData { response in - if let data = response.result.value { - let image = UIImage(data: data) - } + if let data = response.result.value { + let image = UIImage(data: data) + } } ``` @@ -691,34 +694,34 @@ If a `DownloadRequest` is cancelled or interrupted, the underlying URL session m ```swift class ImageRequestor { - private var resumeData: Data? - private var image: UIImage? + private var resumeData: Data? + private var image: UIImage? func fetchImage(completion: (UIImage?) -> Void) { - guard image == nil else { completion(image) ; return } + guard image == nil else { completion(image) ; return } - let destination: DownloadRequest.DownloadFileDestination = { _, _ in - let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] - let fileURL = documentsURL.appendPathComponent("pig.png") + let destination: DownloadRequest.DownloadFileDestination = { _, _ in + let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] + let fileURL = documentsURL.appendingPathComponent("pig.png") - return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) - } + return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) + } - let request: DownloadRequest + let request: DownloadRequest if let resumeData = resumeData { - request = Alamofire.download(resumingWith: resumeData) - } else { - request = Alamofire.download("https://httpbin.org/image/png") + request = Alamofire.download(resumingWith: resumeData) + } else { + request = Alamofire.download("https://httpbin.org/image/png") } request.responseData { response in - switch response.result { - case .success(let data): - self.image = UIImage(data: data) - case .failure: - self.resumeData = response.resumeData - } + switch response.result { + case .success(let data): + self.image = UIImage(data: data) + case .failure: + self.resumeData = response.resumeData + } } } } @@ -733,7 +736,7 @@ When sending relatively small amounts of data to a server using JSON or URL enco #### Uploading Data ```swift -let imageData = UIPNGRepresentation(image)! +let imageData = UIImagePNGRepresentation(image)! Alamofire.upload(imageData, to: "https://httpbin.org/post").responseJSON { response in debugPrint(response) @@ -816,7 +819,7 @@ In iOS and tvOS 10 and macOS 10.12, Apple introduced the new [URLSessionTaskMetr ```swift Alamofire.request("https://httpbin.org/get").responseJSON { response in - print(response.metrics) + print(response.metrics) } ``` @@ -824,8 +827,8 @@ It's important to note that these APIs are only available on iOS and tvOS 10 and ```swift Alamofire.request("https://httpbin.org/get").responseJSON { response in - if #available(iOS 10.0. *) { - print(response.metrics) + if #available(iOS 10.0, *) { + print(response.metrics) } } ``` @@ -854,10 +857,10 @@ Outputs: ```bash $ curl -i \ - -H "User-Agent: Alamofire/4.0.0" \ - -H "Accept-Encoding: gzip;q=1.0, compress;q=0.5" \ - -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \ - "https://httpbin.org/get?foo=bar" + -H "User-Agent: Alamofire/4.0.0" \ + -H "Accept-Encoding: gzip;q=1.0, compress;q=0.5" \ + -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \ + "https://httpbin.org/get?foo=bar" ``` --- @@ -1183,20 +1186,20 @@ The `RequestAdapter` protocol allows each `Request` made on a `SessionManager` t ```swift class AccessTokenAdapter: RequestAdapter { - private let accessToken: String + private let accessToken: String - init(accessToken: String) { - self.accessToken = accessToken - } + init(accessToken: String) { + self.accessToken = accessToken + } - func adapt(_ urlRequest: URLRequest) throws -> URLRequest { - var urlRequest = urlRequest + func adapt(_ urlRequest: URLRequest) throws -> URLRequest { + var urlRequest = urlRequest if let urlString = urlRequest.url?.absoluteString, urlString.hasPrefix("https://httpbin.org") { - urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") - } + urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") + } - return urlRequest + return urlRequest } } ``` @@ -1414,7 +1417,7 @@ func loadUser(completionHandler: @escaping (DataResponse) -> Void) -> Alam } loadUser { response in - if let user = userResponse.value { + if let user = response.value { print("User: { username: \(user.username), name: \(user.name) }") } } @@ -1749,24 +1752,24 @@ If you run into this problem (high probability with self-signed certificates), y ```xml - NSAppTransportSecurity - - NSExceptionDomains - - example.com - - NSExceptionAllowsInsecureHTTPLoads - - NSExceptionRequiresForwardSecrecy - - NSIncludesSubdomains - - - NSTemporaryExceptionMinimumTLSVersion - TLSv1.2 - - - + NSAppTransportSecurity + + NSExceptionDomains + + example.com + + NSExceptionAllowsInsecureHTTPLoads + + NSExceptionRequiresForwardSecrecy + + NSIncludesSubdomains + + + NSTemporaryExceptionMinimumTLSVersion + TLSv1.2 + + + ``` @@ -1809,10 +1812,15 @@ There are some important things to remember when using network reachability to d The following radars have some effect on the current implementation of Alamofire. - [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case -- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage - `rdar://26870455` - Background URL Session Configurations do not work in the simulator - `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` +## Resolved Radars + +The following radars have been resolved over time after being filed against the Alamofire project. + +- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage (Resolved on 9/1/17 in Xcode 9 beta 6). + ## FAQ ### What's the origin of the name Alamofire? @@ -1851,4 +1859,4 @@ The community adoption of the ASF libraries has been amazing. We are greatly hum ## License -Alamofire is released under the MIT license. See LICENSE for details. +Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details. diff --git a/Inkwell/Pods/Alamofire/Source/AFError.swift b/Inkwell/Pods/Alamofire/Source/AFError.swift index f047695..585ae14 100644 --- a/Inkwell/Pods/Alamofire/Source/AFError.swift +++ b/Inkwell/Pods/Alamofire/Source/AFError.swift @@ -1,7 +1,7 @@ // // AFError.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Alamofire/Source/Alamofire.swift b/Inkwell/Pods/Alamofire/Source/Alamofire.swift index 86d54d8..e971613 100644 --- a/Inkwell/Pods/Alamofire/Source/Alamofire.swift +++ b/Inkwell/Pods/Alamofire/Source/Alamofire.swift @@ -1,7 +1,7 @@ // // Alamofire.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -53,7 +53,7 @@ extension URL: URLConvertible { } extension URLComponents: URLConvertible { - /// Returns a URL if `url` is not nil, otherise throws an `Error`. + /// Returns a URL if `url` is not nil, otherwise throws an `Error`. /// /// - throws: An `AFError.invalidURL` if `url` is `nil`. /// diff --git a/Inkwell/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/Inkwell/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift index 78e214e..9031395 100644 --- a/Inkwell/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +++ b/Inkwell/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift @@ -1,7 +1,7 @@ // // DispatchQueue+Alamofire.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Alamofire/Source/MultipartFormData.swift b/Inkwell/Pods/Alamofire/Source/MultipartFormData.swift index 6d0d556..ba02d24 100644 --- a/Inkwell/Pods/Alamofire/Source/MultipartFormData.swift +++ b/Inkwell/Pods/Alamofire/Source/MultipartFormData.swift @@ -1,7 +1,7 @@ // // MultipartFormData.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -92,7 +92,7 @@ open class MultipartFormData { // MARK: - Properties /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - open var contentType: String { return "multipart/form-data; boundary=\(boundary)" } + open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)" /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } diff --git a/Inkwell/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/Inkwell/Pods/Alamofire/Source/NetworkReachabilityManager.swift index 888818d..cdb5a02 100644 --- a/Inkwell/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/Inkwell/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -1,7 +1,7 @@ // // NetworkReachabilityManager.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -182,21 +182,24 @@ public class NetworkReachabilityManager { // MARK: - Internal - Network Reachability Status func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { - guard flags.contains(.reachable) else { return .notReachable } + guard isNetworkReachable(with: flags) else { return .notReachable } - var networkStatus: NetworkReachabilityStatus = .notReachable + var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) - if !flags.contains(.connectionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } + #if os(iOS) + if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } + #endif - if flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) { - if !flags.contains(.interventionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } - } + return networkStatus + } - #if os(iOS) - if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } - #endif + func isNetworkReachable(with flags: SCNetworkReachabilityFlags) -> Bool { + let isReachable = flags.contains(.reachable) + let needsConnection = flags.contains(.connectionRequired) + let canConnectAutomatically = flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) + let canConnectWithoutUserInteraction = canConnectAutomatically && !flags.contains(.interventionRequired) - return networkStatus + return isReachable && (!needsConnection || canConnectWithoutUserInteraction) } } diff --git a/Inkwell/Pods/Alamofire/Source/Notifications.swift b/Inkwell/Pods/Alamofire/Source/Notifications.swift index 81f6e37..df41505 100644 --- a/Inkwell/Pods/Alamofire/Source/Notifications.swift +++ b/Inkwell/Pods/Alamofire/Source/Notifications.swift @@ -1,7 +1,7 @@ // // Notifications.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Alamofire/Source/ParameterEncoding.swift b/Inkwell/Pods/Alamofire/Source/ParameterEncoding.swift index 242f6a8..dabb562 100644 --- a/Inkwell/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/Inkwell/Pods/Alamofire/Source/ParameterEncoding.swift @@ -1,7 +1,7 @@ // // ParameterEncoding.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -223,9 +223,9 @@ public struct URLEncoding: ParameterEncoding { let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex let range = startIndex.. String { - var components = ["$ curl -i"] + var components = ["$ curl -v"] guard let request = self.request, let url = request.url, @@ -293,11 +293,12 @@ extension Request: CustomDebugStringConvertible { if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { for credential in credentials { - components.append("-u \(credential.user!):\(credential.password!)") + guard let user = credential.user, let password = credential.password else { continue } + components.append("-u \(user):\(password)") } } else { - if let credential = delegate.credential { - components.append("-u \(credential.user!):\(credential.password!)") + if let credential = delegate.credential, let user = credential.user, let password = credential.password { + components.append("-u \(user):\(password)") } } } @@ -308,7 +309,12 @@ extension Request: CustomDebugStringConvertible { let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty { let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value);" } + + #if swift(>=3.2) + components.append("-b \"\(string[..: DownloadResponseSerializerProto extension Request { var timeline: Timeline { + let requestStartTime = self.startTime ?? CFAbsoluteTimeGetCurrent() let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime return Timeline( - requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), + requestStartTime: requestStartTime, initialResponseTime: initialResponseTime, requestCompletedTime: requestCompletedTime, serializationCompletedTime: CFAbsoluteTimeGetCurrent() diff --git a/Inkwell/Pods/Alamofire/Source/Result.swift b/Inkwell/Pods/Alamofire/Source/Result.swift index c13b1fc..bbd3c61 100644 --- a/Inkwell/Pods/Alamofire/Source/Result.swift +++ b/Inkwell/Pods/Alamofire/Source/Result.swift @@ -1,7 +1,7 @@ // // Result.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -162,7 +162,7 @@ extension Result { /// try print(noInt.unwrap()) /// // Throws error /// - /// - parameter transform: A closure that takes the success value of the result instance. + /// - parameter transform: A closure that takes the success value of the `Result` instance. /// /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the /// same failure. @@ -200,4 +200,101 @@ extension Result { return .failure(error) } } + + /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `mapError` function with a closure that does not throw. For example: + /// + /// let possibleData: Result = .failure(someError) + /// let withMyError: Result = possibleData.mapError { MyError.error($0) } + /// + /// - Parameter transform: A closure that takes the error of the instance. + /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns + /// the same instance. + public func mapError(_ transform: (Error) -> T) -> Result { + switch self { + case .failure(let error): + return .failure(transform(error)) + case .success: + return self + } + } + + /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `flatMapError` function with a closure that may throw an error. For example: + /// + /// let possibleData: Result = .success(Data(...)) + /// let possibleObject = possibleData.flatMapError { + /// try someFailableFunction(taking: $0) + /// } + /// + /// - Parameter transform: A throwing closure that takes the error of the instance. + /// + /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns + /// the same instance. + public func flatMapError(_ transform: (Error) throws -> T) -> Result { + switch self { + case .failure(let error): + do { + return try .failure(transform(error)) + } catch { + return .failure(error) + } + case .success: + return self + } + } + + /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. + /// + /// Use the `withValue` function to evaluate the passed closure without modifying the `Result` instance. + /// + /// - Parameter closure: A closure that takes the success value of this instance. + /// - Returns: This `Result` instance, unmodified. + @discardableResult + public func withValue(_ closure: (Value) -> Void) -> Result { + if case let .success(value) = self { closure(value) } + + return self + } + + /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `withError` function to evaluate the passed closure without modifying the `Result` instance. + /// + /// - Parameter closure: A closure that takes the success value of this instance. + /// - Returns: This `Result` instance, unmodified. + @discardableResult + public func withError(_ closure: (Error) -> Void) -> Result { + if case let .failure(error) = self { closure(error) } + + return self + } + + /// Evaluates the specified closure when the `Result` is a success. + /// + /// Use the `ifSuccess` function to evaluate the passed closure without modifying the `Result` instance. + /// + /// - Parameter closure: A `Void` closure. + /// - Returns: This `Result` instance, unmodified. + @discardableResult + public func ifSuccess(_ closure: () -> Void) -> Result { + if isSuccess { closure() } + + return self + } + + /// Evaluates the specified closure when the `Result` is a failure. + /// + /// Use the `ifFailure` function to evaluate the passed closure without modifying the `Result` instance. + /// + /// - Parameter closure: A `Void` closure. + /// - Returns: This `Result` instance, unmodified. + @discardableResult + public func ifFailure(_ closure: () -> Void) -> Result { + if isFailure { closure() } + + return self + } } diff --git a/Inkwell/Pods/Alamofire/Source/ServerTrustPolicy.swift b/Inkwell/Pods/Alamofire/Source/ServerTrustPolicy.swift index 9c0e7c8..1ad3530 100644 --- a/Inkwell/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ b/Inkwell/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -1,7 +1,7 @@ // // ServerTrustPolicy.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Alamofire/Source/SessionDelegate.swift b/Inkwell/Pods/Alamofire/Source/SessionDelegate.swift index 27ad881..d38c253 100644 --- a/Inkwell/Pods/Alamofire/Source/SessionDelegate.swift +++ b/Inkwell/Pods/Alamofire/Source/SessionDelegate.swift @@ -1,7 +1,7 @@ // // SessionDelegate.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -36,7 +36,7 @@ open class SessionDelegate: NSObject { open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? /// Overrides all behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)` and requires the caller to call the `completionHandler`. - open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? + open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? @@ -48,21 +48,21 @@ open class SessionDelegate: NSObject { /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` and /// requires the caller to call the `completionHandler`. - open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, (URLRequest?) -> Void) -> Void)? + open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void)? /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)`. open var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)` and /// requires the caller to call the `completionHandler`. - open var taskDidReceiveChallengeWithCompletion: ((URLSession, URLSessionTask, URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? + open var taskDidReceiveChallengeWithCompletion: ((URLSession, URLSessionTask, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)`. open var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)` and /// requires the caller to call the `completionHandler`. - open var taskNeedNewBodyStreamWithCompletion: ((URLSession, URLSessionTask, (InputStream?) -> Void) -> Void)? + open var taskNeedNewBodyStreamWithCompletion: ((URLSession, URLSessionTask, @escaping (InputStream?) -> Void) -> Void)? /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)`. open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? @@ -77,7 +77,7 @@ open class SessionDelegate: NSObject { /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)` and /// requires caller to call the `completionHandler`. - open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, (URLSession.ResponseDisposition) -> Void) -> Void)? + open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, @escaping (URLSession.ResponseDisposition) -> Void) -> Void)? /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didBecome:)`. open var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? @@ -90,7 +90,7 @@ open class SessionDelegate: NSObject { /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)` and /// requires caller to call the `completionHandler`. - open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, (CachedURLResponse?) -> Void) -> Void)? + open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, @escaping (CachedURLResponse?) -> Void) -> Void)? // MARK: URLSessionDownloadDelegate Overrides @@ -462,8 +462,8 @@ extension SessionDelegate: URLSessionTaskDelegate { // Determine whether an error has occurred var error: Error? = error - if let taskDelegate = self[task]?.delegate, taskDelegate.error != nil { - error = taskDelegate.error + if request.delegate.error != nil { + error = request.delegate.error } /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request diff --git a/Inkwell/Pods/Alamofire/Source/SessionManager.swift b/Inkwell/Pods/Alamofire/Source/SessionManager.swift index 450f750..9bd8b54 100644 --- a/Inkwell/Pods/Alamofire/Source/SessionManager.swift +++ b/Inkwell/Pods/Alamofire/Source/SessionManager.swift @@ -1,7 +1,7 @@ // // SessionManager.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Alamofire/Source/TaskDelegate.swift b/Inkwell/Pods/Alamofire/Source/TaskDelegate.swift index d4fd216..0607758 100644 --- a/Inkwell/Pods/Alamofire/Source/TaskDelegate.swift +++ b/Inkwell/Pods/Alamofire/Source/TaskDelegate.swift @@ -1,7 +1,7 @@ // // TaskDelegate.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -40,17 +40,30 @@ open class TaskDelegate: NSObject { public var error: Error? var task: URLSessionTask? { - didSet { reset() } + set { + taskLock.lock(); defer { taskLock.unlock() } + _task = newValue + } + get { + taskLock.lock(); defer { taskLock.unlock() } + return _task + } } var initialResponseTime: CFAbsoluteTime? var credential: URLCredential? var metrics: AnyObject? // URLSessionTaskMetrics + private var _task: URLSessionTask? { + didSet { reset() } + } + + private let taskLock = NSLock() + // MARK: Lifecycle init(task: URLSessionTask?) { - self.task = task + _task = task self.queue = { let operationQueue = OperationQueue() diff --git a/Inkwell/Pods/Alamofire/Source/Timeline.swift b/Inkwell/Pods/Alamofire/Source/Timeline.swift index 1440989..c5dabd1 100644 --- a/Inkwell/Pods/Alamofire/Source/Timeline.swift +++ b/Inkwell/Pods/Alamofire/Source/Timeline.swift @@ -1,7 +1,7 @@ // // Timeline.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Alamofire/Source/Validation.swift b/Inkwell/Pods/Alamofire/Source/Validation.swift index c405d02..989ac20 100644 --- a/Inkwell/Pods/Alamofire/Source/Validation.swift +++ b/Inkwell/Pods/Alamofire/Source/Validation.swift @@ -1,7 +1,7 @@ // // Validation.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -48,7 +48,13 @@ extension Request { init?(_ string: String) { let components: [String] = { let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) + + #if swift(>=3.2) + let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)] + #else let split = stripped.substring(to: stripped.range(of: ";")?.lowerBound ?? stripped.endIndex) + #endif + return split.components(separatedBy: "/") }() diff --git a/Inkwell/Pods/Manifest.lock b/Inkwell/Pods/Manifest.lock index 7d513c6..920ceb7 100644 --- a/Inkwell/Pods/Manifest.lock +++ b/Inkwell/Pods/Manifest.lock @@ -1,12 +1,12 @@ PODS: - - Alamofire (4.4.0) + - Alamofire (4.5.1) DEPENDENCIES: - - Alamofire (~> 4.4.0) + - Alamofire (~> 4.5.0) SPEC CHECKSUMS: - Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d + Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a -PODFILE CHECKSUM: e7e16bea11cf9944902356f1e7ab316119943496 +PODFILE CHECKSUM: aef9dddf19f23d7974b52bd5521b1e0ca91cbb24 -COCOAPODS: 1.2.1 +COCOAPODS: 1.4.0 diff --git a/Inkwell/Pods/Pods.xcodeproj/project.pbxproj b/Inkwell/Pods/Pods.xcodeproj/project.pbxproj index 5943f2b..125332f 100644 --- a/Inkwell/Pods/Pods.xcodeproj/project.pbxproj +++ b/Inkwell/Pods/Pods.xcodeproj/project.pbxproj @@ -7,24 +7,24 @@ objects = { /* Begin PBXBuildFile section */ - 0F917C6D76D21DEDA29E619647C3FAC1 /* Pods-Inkwell-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 74C9A209584BB3C59A24656697557706 /* Pods-Inkwell-dummy.m */; }; + 0F917C6D76D21DEDA29E619647C3FAC1 /* Pods-Inkwell-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E4CED65A78AF8A664E4F2F053BF1ECB6 /* Pods-Inkwell-dummy.m */; }; 10EB23E9ECC4B33E16933BB1EA560B6A /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87882A1F5A92C8138D54545E51D51E6F /* Timeline.swift */; }; - 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B44A27EFBB0DA84D738057B77F3413B1 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DECE84DC850B04690604AB7C521277 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3626B94094672CB1C9DEA32B9F9502E1 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A01C037B4034EDA3D7955BC5E4E9D9D6 /* TaskDelegate.swift */; }; 3BB63E10DBD159B112FCCAC0747455E7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 5387216E723A3C68E851CA15573CDD71 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E230A0448B394DE26E688DAC8E6201E /* Request.swift */; }; - 569FBA1B5A65C354D09CF64988455B95 /* Pods-InkwellTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B3B3ABADE01A9AEB08C58AE0D2E4DC0 /* Pods-InkwellTests-dummy.m */; }; + 569FBA1B5A65C354D09CF64988455B95 /* Pods-InkwellTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 95251E9E34C365E8923E37712B53FF26 /* Pods-InkwellTests-dummy.m */; }; 61200D01A1855D7920CEF835C8BE00B0 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FCBF1EED873F61C6D46CE37FA5C39D3 /* DispatchQueue+Alamofire.swift */; }; 62F65AD8DC4F0F9610F4B8B4738EC094 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32B030D27CAC730C5EB0F22390645310 /* ServerTrustPolicy.swift */; }; - 65292BF4ECB0F676335695E6065C6AD8 /* Pods-InkwellTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E949DA3B1BE2C141B60A1D6D8DDEEB1E /* Pods-InkwellTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 65292BF4ECB0F676335695E6065C6AD8 /* Pods-InkwellTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 524A775FD1B9491A91C37D10D3DDD91A /* Pods-InkwellTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6EE96632FC552A3E45DCC6846EBEDF5D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 73B9C996AED49ED7CF8EC2A6F1738059 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 7B5FE28C7EA4122B0598738E54DBEBD8 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 195D73DD9EF275A3C56569E2B1CA8026 /* SessionDelegate.swift */; }; 7D8CC01E8C9EFFF9F4D65406CDE0AB66 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D60BC9955B4F7FFA62D7440CB385C11 /* Result.swift */; }; - 7DDEF04A963103F3CB778F8D851EE770 /* Pods-Inkwell-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B41DD104684796A96949AB195AA6C6FD /* Pods-Inkwell-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7DDEF04A963103F3CB778F8D851EE770 /* Pods-Inkwell-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C76265FDAF3FD8289F859FD5FC93466 /* Pods-Inkwell-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9ED2BB2981896E0A39EFA365503F58CE /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AF006B0AD5765D1BFA8253C2DCBB126 /* AFError.swift */; }; A2A6F71B727312BD45CC7A4AAD7B0AB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5A8AA5F9EDED0A0BDDE7E830BF4AEE0 /* NetworkReachabilityManager.swift */; }; - A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 22C1C119BCE81C53F76CAC2BE27C38E0 /* Alamofire-dummy.m */; }; + A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D1F50F37DFB6DC0B7B9D8C373E5A3EAE /* Alamofire-dummy.m */; }; AE1EF48399533730D0066E04B22CA2D6 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46CDAC6C1187C5467E576980E1062C8B /* SessionManager.swift */; }; B65FCF589DA398C3EFE0128064E510EC /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155538D91ACEEEDF82069ACF6C1A02E7 /* MultipartFormData.swift */; }; BBEFE2F9CEB73DC7BD97FFA66A0D9D4F /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B029DBC43E49A740F12B5E4D2E6DD452 /* Validation.swift */; }; @@ -53,53 +53,53 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 03DECE84DC850B04690604AB7C521277 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; 04F47F5C9CDB035C5AFADEBA5BF44F1C /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; 0B5CC8F027DFC7E6071084E87B446360 /* Pods_Inkwell.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Inkwell.framework; path = "Pods-Inkwell.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 0FCBF1EED873F61C6D46CE37FA5C39D3 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 13A0A663B36A229C69D5274A83E93F88 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 143875C0A944F5DC4CA7018E05B67D16 /* Pods-InkwellTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-InkwellTests-acknowledgements.plist"; sourceTree = ""; }; + 117EFB31D9AD9673BAF51B48596F19E2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 155538D91ACEEEDF82069ACF6C1A02E7 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 17BD386DC21191ED8233E0713237ABD3 /* Pods-Inkwell.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Inkwell.modulemap"; sourceTree = ""; }; 195D73DD9EF275A3C56569E2B1CA8026 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; 1E230A0448B394DE26E688DAC8E6201E /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - 22C1C119BCE81C53F76CAC2BE27C38E0 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - 2398D2D0EA1AFCAEFAF8EAF73B0F7B67 /* Pods-Inkwell-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Inkwell-acknowledgements.plist"; sourceTree = ""; }; - 288173C252C5F6495612DB7A90F8F8E2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 210971763CB2FC0DC4E378271A37BE32 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Alamofire.modulemap; sourceTree = ""; }; 32B030D27CAC730C5EB0F22390645310 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; + 33A04B5D27E86AF4B84D95E21CF3F452 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; 3D60BC9955B4F7FFA62D7440CB385C11 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - 43AA3805A6AAAB7CE02B3CB8E66D212A /* Pods-Inkwell-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Inkwell-acknowledgements.markdown"; sourceTree = ""; }; + 45C8B49711989BACB94198B7158EC0FF /* Pods-InkwellTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-InkwellTests-acknowledgements.plist"; sourceTree = ""; }; 46CDAC6C1187C5467E576980E1062C8B /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; - 497795B762B4CCB0FE4696F7061D3524 /* Pods-Inkwell-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Inkwell-resources.sh"; sourceTree = ""; }; 4AF006B0AD5765D1BFA8253C2DCBB126 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 4C8ADECD9958582612ACA386D84FEE4E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 622F5B185C647E10AE9E43743818D527 /* Pods-Inkwell.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Inkwell.debug.xcconfig"; sourceTree = ""; }; + 524A775FD1B9491A91C37D10D3DDD91A /* Pods-InkwellTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-InkwellTests-umbrella.h"; sourceTree = ""; }; + 5CED00B0FCF63290BC58D748A971B5F6 /* Pods-InkwellTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-InkwellTests-frameworks.sh"; sourceTree = ""; }; + 61D920D6E48023BCBF18CD83450D05F5 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; + 63AA004D8257DC6B43E1D876306C0F26 /* Pods-Inkwell.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Inkwell.release.xcconfig"; sourceTree = ""; }; 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 6639346628280A0D0FAD35196BF56108 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; 66A46F517F0AF7E85A16D723F6406896 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - 6A899326C44B039495FB016B52CE2A9C /* Pods-Inkwell.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Inkwell.release.xcconfig"; sourceTree = ""; }; - 6B3B3ABADE01A9AEB08C58AE0D2E4DC0 /* Pods-InkwellTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-InkwellTests-dummy.m"; sourceTree = ""; }; - 74C9A209584BB3C59A24656697557706 /* Pods-Inkwell-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Inkwell-dummy.m"; sourceTree = ""; }; - 7D141D1953E5C6E67E362CE73090E48A /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; + 68121B4E0A1A5D3482EB9DC289866F7F /* Pods-Inkwell.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Inkwell.debug.xcconfig"; sourceTree = ""; }; + 6C76265FDAF3FD8289F859FD5FC93466 /* Pods-Inkwell-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Inkwell-umbrella.h"; sourceTree = ""; }; + 7599AB916A8E7D845EC5C499280C1270 /* Pods-InkwellTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-InkwellTests-resources.sh"; sourceTree = ""; }; + 785BFF276245EBCB5FD9B38E94719B36 /* Pods-Inkwell-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Inkwell-acknowledgements.markdown"; sourceTree = ""; }; + 78CDF8715AEC1F342B3A437DA379B728 /* Pods-Inkwell-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Inkwell-resources.sh"; sourceTree = ""; }; 87882A1F5A92C8138D54545E51D51E6F /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; + 8B23CF0ED2F27526C7888B2CC9AB9DDB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9363C3DC7AD7182AA22068B20B9D54F4 /* Pods-InkwellTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-InkwellTests.release.xcconfig"; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 95251E9E34C365E8923E37712B53FF26 /* Pods-InkwellTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-InkwellTests-dummy.m"; sourceTree = ""; }; + 9C9C135E9976F0CC471AE803825BBFAA /* Pods-Inkwell.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Inkwell.modulemap"; sourceTree = ""; }; A01C037B4034EDA3D7955BC5E4E9D9D6 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; - AD38D4196109276A6033AD65D5A702E2 /* Pods-InkwellTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-InkwellTests.modulemap"; sourceTree = ""; }; B029DBC43E49A740F12B5E4D2E6DD452 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - B41DD104684796A96949AB195AA6C6FD /* Pods-Inkwell-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Inkwell-umbrella.h"; sourceTree = ""; }; - B44A27EFBB0DA84D738057B77F3413B1 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - B6C21DCCE365AE4ACADDEB372ADB54B1 /* Pods-InkwellTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-InkwellTests-resources.sh"; sourceTree = ""; }; - BCCA9CA7D9C1A2047BB93336C5708DFD /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - BF88DC4C22CF26D0C3ED0DF720B53561 /* Pods-InkwellTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-InkwellTests-frameworks.sh"; sourceTree = ""; }; - C070A85CCFB35E63DC3216D2B0D18D1C /* Pods-InkwellTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-InkwellTests.release.xcconfig"; sourceTree = ""; }; - D490A686C06F3B863777C5FC060A30C1 /* Pods-InkwellTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-InkwellTests-acknowledgements.markdown"; sourceTree = ""; }; + CC8AFBFB5E56340C355B4D6ECFE146DC /* Pods-Inkwell-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Inkwell-acknowledgements.plist"; sourceTree = ""; }; + CDFB65E466A8770DD545EC1E0A3C9388 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D1F50F37DFB6DC0B7B9D8C373E5A3EAE /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; D57703CA562E05AFC6355B3E908F51E9 /* Pods_InkwellTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_InkwellTests.framework; path = "Pods-InkwellTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; DE9D8DAE65A42DE436559F62721751BC /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DF83B17F66D649176E68E699295532AF /* Pods-InkwellTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-InkwellTests.debug.xcconfig"; sourceTree = ""; }; DFCB8C44DE758E906C0BCDA455937B85 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; E2F9510473F6FFD7AA66524DB16C2263 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; + E4CED65A78AF8A664E4F2F053BF1ECB6 /* Pods-Inkwell-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Inkwell-dummy.m"; sourceTree = ""; }; E5A8AA5F9EDED0A0BDDE7E830BF4AEE0 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - E6F34CCF86067ED508C12C676E298C69 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - E949DA3B1BE2C141B60A1D6D8DDEEB1E /* Pods-InkwellTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-InkwellTests-umbrella.h"; sourceTree = ""; }; - EA9006BFC41B335457D9B2F69FD14976 /* Pods-InkwellTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-InkwellTests.debug.xcconfig"; sourceTree = ""; }; + ED5F8904640F00CE1716374E0E96B4B8 /* Pods-InkwellTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-InkwellTests.modulemap"; sourceTree = ""; }; + F379F7C2A55A1F942F515BDD236C640A /* Pods-InkwellTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-InkwellTests-acknowledgements.markdown"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -130,19 +130,19 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 07E74F7B8A1520BC3AD93D9EF8A379EA /* Pods-InkwellTests */ = { + 1D418D5D53A2A73F2B3F973E6DF8AFA0 /* Pods-InkwellTests */ = { isa = PBXGroup; children = ( - 288173C252C5F6495612DB7A90F8F8E2 /* Info.plist */, - AD38D4196109276A6033AD65D5A702E2 /* Pods-InkwellTests.modulemap */, - D490A686C06F3B863777C5FC060A30C1 /* Pods-InkwellTests-acknowledgements.markdown */, - 143875C0A944F5DC4CA7018E05B67D16 /* Pods-InkwellTests-acknowledgements.plist */, - 6B3B3ABADE01A9AEB08C58AE0D2E4DC0 /* Pods-InkwellTests-dummy.m */, - BF88DC4C22CF26D0C3ED0DF720B53561 /* Pods-InkwellTests-frameworks.sh */, - B6C21DCCE365AE4ACADDEB372ADB54B1 /* Pods-InkwellTests-resources.sh */, - E949DA3B1BE2C141B60A1D6D8DDEEB1E /* Pods-InkwellTests-umbrella.h */, - EA9006BFC41B335457D9B2F69FD14976 /* Pods-InkwellTests.debug.xcconfig */, - C070A85CCFB35E63DC3216D2B0D18D1C /* Pods-InkwellTests.release.xcconfig */, + CDFB65E466A8770DD545EC1E0A3C9388 /* Info.plist */, + ED5F8904640F00CE1716374E0E96B4B8 /* Pods-InkwellTests.modulemap */, + F379F7C2A55A1F942F515BDD236C640A /* Pods-InkwellTests-acknowledgements.markdown */, + 45C8B49711989BACB94198B7158EC0FF /* Pods-InkwellTests-acknowledgements.plist */, + 95251E9E34C365E8923E37712B53FF26 /* Pods-InkwellTests-dummy.m */, + 5CED00B0FCF63290BC58D748A971B5F6 /* Pods-InkwellTests-frameworks.sh */, + 7599AB916A8E7D845EC5C499280C1270 /* Pods-InkwellTests-resources.sh */, + 524A775FD1B9491A91C37D10D3DDD91A /* Pods-InkwellTests-umbrella.h */, + DF83B17F66D649176E68E699295532AF /* Pods-InkwellTests.debug.xcconfig */, + 9363C3DC7AD7182AA22068B20B9D54F4 /* Pods-InkwellTests.release.xcconfig */, ); name = "Pods-InkwellTests"; path = "Target Support Files/Pods-InkwellTests"; @@ -178,41 +178,41 @@ A01C037B4034EDA3D7955BC5E4E9D9D6 /* TaskDelegate.swift */, 87882A1F5A92C8138D54545E51D51E6F /* Timeline.swift */, B029DBC43E49A740F12B5E4D2E6DD452 /* Validation.swift */, - 55F14F994FE7AB51F028BFE66CEF3106 /* Support Files */, + 2E5925946A4DE3B8F7E4137BACAD9618 /* Support Files */, ); name = Alamofire; path = Alamofire; sourceTree = ""; }; - 35F128EB69B6F7FB7DA93BBF6C130FAE /* Pods */ = { + 2E5925946A4DE3B8F7E4137BACAD9618 /* Support Files */ = { isa = PBXGroup; children = ( - 200D10EB20F0397D47F022B50CF0433F /* Alamofire */, + 210971763CB2FC0DC4E378271A37BE32 /* Alamofire.modulemap */, + 33A04B5D27E86AF4B84D95E21CF3F452 /* Alamofire.xcconfig */, + D1F50F37DFB6DC0B7B9D8C373E5A3EAE /* Alamofire-dummy.m */, + 61D920D6E48023BCBF18CD83450D05F5 /* Alamofire-prefix.pch */, + 03DECE84DC850B04690604AB7C521277 /* Alamofire-umbrella.h */, + 117EFB31D9AD9673BAF51B48596F19E2 /* Info.plist */, ); - name = Pods; + name = "Support Files"; + path = "../Target Support Files/Alamofire"; sourceTree = ""; }; - 3A2A726236E5C4AA22E12396AABAED21 /* Targets Support Files */ = { + 35F128EB69B6F7FB7DA93BBF6C130FAE /* Pods */ = { isa = PBXGroup; children = ( - A7235369F21BFB7989162D04E905BB29 /* Pods-Inkwell */, - 07E74F7B8A1520BC3AD93D9EF8A379EA /* Pods-InkwellTests */, + 200D10EB20F0397D47F022B50CF0433F /* Alamofire */, ); - name = "Targets Support Files"; + name = Pods; sourceTree = ""; }; - 55F14F994FE7AB51F028BFE66CEF3106 /* Support Files */ = { + 3A2A726236E5C4AA22E12396AABAED21 /* Targets Support Files */ = { isa = PBXGroup; children = ( - 7D141D1953E5C6E67E362CE73090E48A /* Alamofire.modulemap */, - E6F34CCF86067ED508C12C676E298C69 /* Alamofire.xcconfig */, - 22C1C119BCE81C53F76CAC2BE27C38E0 /* Alamofire-dummy.m */, - BCCA9CA7D9C1A2047BB93336C5708DFD /* Alamofire-prefix.pch */, - B44A27EFBB0DA84D738057B77F3413B1 /* Alamofire-umbrella.h */, - 13A0A663B36A229C69D5274A83E93F88 /* Info.plist */, + E70DE5BC09E0D0E08A6A897A4C22F355 /* Pods-Inkwell */, + 1D418D5D53A2A73F2B3F973E6DF8AFA0 /* Pods-InkwellTests */, ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; + name = "Targets Support Files"; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { @@ -226,23 +226,6 @@ ); sourceTree = ""; }; - A7235369F21BFB7989162D04E905BB29 /* Pods-Inkwell */ = { - isa = PBXGroup; - children = ( - 4C8ADECD9958582612ACA386D84FEE4E /* Info.plist */, - 17BD386DC21191ED8233E0713237ABD3 /* Pods-Inkwell.modulemap */, - 43AA3805A6AAAB7CE02B3CB8E66D212A /* Pods-Inkwell-acknowledgements.markdown */, - 2398D2D0EA1AFCAEFAF8EAF73B0F7B67 /* Pods-Inkwell-acknowledgements.plist */, - 74C9A209584BB3C59A24656697557706 /* Pods-Inkwell-dummy.m */, - 497795B762B4CCB0FE4696F7061D3524 /* Pods-Inkwell-resources.sh */, - B41DD104684796A96949AB195AA6C6FD /* Pods-Inkwell-umbrella.h */, - 622F5B185C647E10AE9E43743818D527 /* Pods-Inkwell.debug.xcconfig */, - 6A899326C44B039495FB016B52CE2A9C /* Pods-Inkwell.release.xcconfig */, - ); - name = "Pods-Inkwell"; - path = "Target Support Files/Pods-Inkwell"; - sourceTree = ""; - }; BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { isa = PBXGroup; children = ( @@ -259,6 +242,23 @@ name = iOS; sourceTree = ""; }; + E70DE5BC09E0D0E08A6A897A4C22F355 /* Pods-Inkwell */ = { + isa = PBXGroup; + children = ( + 8B23CF0ED2F27526C7888B2CC9AB9DDB /* Info.plist */, + 9C9C135E9976F0CC471AE803825BBFAA /* Pods-Inkwell.modulemap */, + 785BFF276245EBCB5FD9B38E94719B36 /* Pods-Inkwell-acknowledgements.markdown */, + CC8AFBFB5E56340C355B4D6ECFE146DC /* Pods-Inkwell-acknowledgements.plist */, + E4CED65A78AF8A664E4F2F053BF1ECB6 /* Pods-Inkwell-dummy.m */, + 78CDF8715AEC1F342B3A437DA379B728 /* Pods-Inkwell-resources.sh */, + 6C76265FDAF3FD8289F859FD5FC93466 /* Pods-Inkwell-umbrella.h */, + 68121B4E0A1A5D3482EB9DC289866F7F /* Pods-Inkwell.debug.xcconfig */, + 63AA004D8257DC6B43E1D876306C0F26 /* Pods-Inkwell.release.xcconfig */, + ); + name = "Pods-Inkwell"; + path = "Target Support Files/Pods-Inkwell"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -348,8 +348,8 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0700; + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -430,192 +430,163 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 34FE9531DA9AF2820790339988D5FF41 /* Release */ = { + 4CBB5C827C81EEDF763F913A10E92426 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = DF83B17F66D649176E68E699295532AF /* Pods-InkwellTests.debug.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-InkwellTests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-InkwellTests/Pods-InkwellTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_InkwellTests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 3D71357E5A51D2C72F32E332D06A9EAC /* Release */ = { + 5EC4DE18A1C5AB65842A34F783597200 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C070A85CCFB35E63DC3216D2B0D18D1C /* Pods-InkwellTests.release.xcconfig */; + baseConfigurationReference = 63AA004D8257DC6B43E1D876306C0F26 /* Pods-Inkwell.release.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-InkwellTests/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-Inkwell/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-InkwellTests/Pods-InkwellTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MODULEMAP_FILE = "Target Support Files/Pods-Inkwell/Pods-Inkwell.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_InkwellTests; + PRODUCT_NAME = Pods_Inkwell; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 7D072D0D174F12EAACC1862DA756E67A /* Release */ = { + 6CD2CF3CB56F8D2390B8CD744515AD17 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E6F34CCF86067ED508C12C676E298C69 /* Alamofire.xcconfig */; + baseConfigurationReference = 33A04B5D27E86AF4B84D95E21CF3F452 /* Alamofire.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 7DEA84EE597A36E48BF97DC4F2C43871 /* Debug */ = { + 843524F1BDDED1B7D05A54DE7516A5C6 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 622F5B185C647E10AE9E43743818D527 /* Pods-Inkwell.debug.xcconfig */; + baseConfigurationReference = 9363C3DC7AD7182AA22068B20B9D54F4 /* Pods-InkwellTests.release.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Inkwell/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-InkwellTests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Inkwell/Pods-Inkwell.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MODULEMAP_FILE = "Target Support Files/Pods-InkwellTests/Pods-InkwellTests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Inkwell; + PRODUCT_NAME = Pods_InkwellTests; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - AFD33EBDCD334F556B3B8D78B0149BF7 /* Debug */ = { + 972BD31D68F98035DE59A64D32AC1F3A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EA9006BFC41B335457D9B2F69FD14976 /* Pods-InkwellTests.debug.xcconfig */; + baseConfigurationReference = 33A04B5D27E86AF4B84D95E21CF3F452 /* Alamofire.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-InkwellTests/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-InkwellTests/Pods-InkwellTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_InkwellTests; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -624,121 +595,155 @@ }; name = Debug; }; - C104F7F091290C3D1E248192F07FE689 /* Debug */ = { + C3E37FB098AE76440E29106ADBF00CEB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", "DEBUG=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - C4074D41EC8E5F742F36BC0B6D71D991 /* Release */ = { + DA03565BE765DB55C6448FB363A44481 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6A899326C44B039495FB016B52CE2A9C /* Pods-Inkwell.release.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Inkwell/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Inkwell/Pods-Inkwell.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Inkwell; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; }; name = Release; }; - C9660A42FEDD040185578ADA021EC8E0 /* Debug */ = { + F3083F091842843A18D83704DA068539 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E6F34CCF86067ED508C12C676E298C69 /* Alamofire.xcconfig */; + baseConfigurationReference = 68121B4E0A1A5D3482EB9DC289866F7F /* Pods-Inkwell.debug.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-Inkwell/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Alamofire; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Inkwell/Pods-Inkwell.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_Inkwell; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -751,8 +756,8 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - C104F7F091290C3D1E248192F07FE689 /* Debug */, - 34FE9531DA9AF2820790339988D5FF41 /* Release */, + C3E37FB098AE76440E29106ADBF00CEB /* Debug */, + DA03565BE765DB55C6448FB363A44481 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -760,8 +765,8 @@ 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( - C9660A42FEDD040185578ADA021EC8E0 /* Debug */, - 7D072D0D174F12EAACC1862DA756E67A /* Release */, + 972BD31D68F98035DE59A64D32AC1F3A /* Debug */, + 6CD2CF3CB56F8D2390B8CD744515AD17 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -769,8 +774,8 @@ 475CBAFCBAEB00DAA3517E2FB68B936C /* Build configuration list for PBXNativeTarget "Pods-InkwellTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - AFD33EBDCD334F556B3B8D78B0149BF7 /* Debug */, - 3D71357E5A51D2C72F32E332D06A9EAC /* Release */, + 4CBB5C827C81EEDF763F913A10E92426 /* Debug */, + 843524F1BDDED1B7D05A54DE7516A5C6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -778,8 +783,8 @@ 77908C10BB39AD98BB063352CD339266 /* Build configuration list for PBXNativeTarget "Pods-Inkwell" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7DEA84EE597A36E48BF97DC4F2C43871 /* Debug */, - C4074D41EC8E5F742F36BC0B6D71D991 /* Release */, + F3083F091842843A18D83704DA068539 /* Debug */, + 5EC4DE18A1C5AB65842A34F783597200 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Inkwell/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/Inkwell/Pods/Target Support Files/Alamofire/Alamofire.xcconfig index 619e5f4..881c8ca 100644 --- a/Inkwell/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +++ b/Inkwell/Pods/Target Support Files/Alamofire/Alamofire.xcconfig @@ -1,9 +1,9 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} diff --git a/Inkwell/Pods/Target Support Files/Alamofire/Info.plist b/Inkwell/Pods/Target Support Files/Alamofire/Info.plist index df27649..eaa7c2e 100644 --- a/Inkwell/Pods/Target Support Files/Alamofire/Info.plist +++ b/Inkwell/Pods/Target Support Files/Alamofire/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.4.0 + 4.5.1 CFBundleSignature ???? CFBundleVersion diff --git a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-acknowledgements.markdown b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-acknowledgements.markdown index e04b910..2692156 100644 --- a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-acknowledgements.markdown +++ b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-acknowledgements.markdown @@ -3,7 +3,7 @@ This application makes use of the following third party libraries: ## Alamofire -Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-acknowledgements.plist b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-acknowledgements.plist index 9317477..d62aff0 100644 --- a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-acknowledgements.plist +++ b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-acknowledgements.plist @@ -14,7 +14,7 @@ FooterText - Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) + Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-resources.sh b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-resources.sh index aed060f..a7df440 100755 --- a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-resources.sh +++ b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell-resources.sh @@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" @@ -44,29 +48,29 @@ EOM fi case $RESOURCE_PATH in *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) @@ -74,7 +78,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac diff --git a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell.debug.xcconfig b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell.debug.xcconfig index 498f129..88bcc46 100644 --- a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell.debug.xcconfig +++ b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell.debug.xcconfig @@ -1,10 +1,10 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell.release.xcconfig b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell.release.xcconfig index 498f129..88bcc46 100644 --- a/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell.release.xcconfig +++ b/Inkwell/Pods/Target Support Files/Pods-Inkwell/Pods-Inkwell.release.xcconfig @@ -1,10 +1,10 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-acknowledgements.markdown b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-acknowledgements.markdown index e04b910..2692156 100644 --- a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-acknowledgements.markdown +++ b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-acknowledgements.markdown @@ -3,7 +3,7 @@ This application makes use of the following third party libraries: ## Alamofire -Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-acknowledgements.plist b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-acknowledgements.plist index 9317477..d62aff0 100644 --- a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-acknowledgements.plist +++ b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-acknowledgements.plist @@ -14,7 +14,7 @@ FooterText - Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) + Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-frameworks.sh b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-frameworks.sh index e2d5f6d..df310db 100755 --- a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-frameworks.sh +++ b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-frameworks.sh @@ -6,6 +6,14 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -23,9 +31,9 @@ install_framework() source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" @@ -54,6 +62,34 @@ install_framework() fi } +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then @@ -72,11 +108,19 @@ code_sign_if_enabled() { # Strip invalid architectures strip_invalid_archs() { binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -85,14 +129,15 @@ strip_invalid_archs() { if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi + STRIP_BINARY_RETVAL=1 } if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait diff --git a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-resources.sh b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-resources.sh index aed060f..a7df440 100755 --- a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-resources.sh +++ b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests-resources.sh @@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" @@ -44,29 +48,29 @@ EOM fi case $RESOURCE_PATH in *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) @@ -74,7 +78,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac diff --git a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests.debug.xcconfig b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests.debug.xcconfig index dbd0181..e710984 100644 --- a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests.debug.xcconfig +++ b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests.debug.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests.release.xcconfig b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests.release.xcconfig index dbd0181..e710984 100644 --- a/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests.release.xcconfig +++ b/Inkwell/Pods/Target Support Files/Pods-InkwellTests/Pods-InkwellTests.release.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods From 5cfd2febd0c56144556c01bfac4e10a07aa415f2 Mon Sep 17 00:00:00 2001 From: Brad Philips Date: Sun, 18 Mar 2018 12:35:48 -0400 Subject: [PATCH 3/5] Added all variants and fixed lookups --- Inkwell/Inkwell/Font.swift | 43 +++++++++--- Inkwell/Inkwell/GoogleFontsMetadata.swift | 2 +- Inkwell/Inkwell/NameDictionary.swift | 50 ++------------ Inkwell/InkwellTests/FontRegisterTests.swift | 2 +- Inkwell/InkwellTests/FontTests.swift | 18 ++--- .../InkwellTests/NameDictionaryTests.swift | 67 +++---------------- Inkwell/InkwellTests/StorageTests.swift | 4 +- 7 files changed, 60 insertions(+), 126 deletions(-) diff --git a/Inkwell/Inkwell/Font.swift b/Inkwell/Inkwell/Font.swift index acc2003..d5427e6 100644 --- a/Inkwell/Inkwell/Font.swift +++ b/Inkwell/Inkwell/Font.swift @@ -33,17 +33,24 @@ public struct Font { /// - italic: Italic. /// - _700italic: BoldItalic. public enum Variant: String { - /// Regular. - case regular - - /// Bold. - case _700 = "700" - - /// Italic. - case italic - - /// BoldItalic - case _700italic = "700italic" + case thin = "100" + case thinItalic = "100italic" + case extralight = "200" + case extralightItalic = "200italic" + case light = "300" + case lightItalic = "300italic" + case regular = "regular" + case regularItalic = "italic" + case medium = "500" + case mediumItalic = "500italic" + case semibold = "600" + case semiboldItalic = "600italic" + case bold = "700" + case boldItalic = "700italic" + case extrabold = "800" + case extraboldItalic = "800italic" + case black = "900" + case blackItalic = "900italic" } /// The font family. @@ -53,6 +60,10 @@ public struct Font { public let variant: Variant var name: String { + return "\(family)-\(String(describing: variant).capitalizingFirstLetter())" + } + + var idName: String { return "\(family)-\(variant.rawValue)" } @@ -70,3 +81,13 @@ public struct Font { self.variant = variant } } + +extension String { + func capitalizingFirstLetter() -> String { + return prefix(1).uppercased() + dropFirst() + } + + mutating func capitalizeFirstLetter() { + self = self.capitalizingFirstLetter() + } +} diff --git a/Inkwell/Inkwell/GoogleFontsMetadata.swift b/Inkwell/Inkwell/GoogleFontsMetadata.swift index abb18c7..a87fdde 100644 --- a/Inkwell/Inkwell/GoogleFontsMetadata.swift +++ b/Inkwell/Inkwell/GoogleFontsMetadata.swift @@ -40,7 +40,7 @@ final class GoogleFontsMetadata { private let storage: Storage private let queue: DispatchQueue? private let defaultVariantFilter: (String) -> Bool = { - let variants: [Font.Variant] = [.regular, ._700, .italic, ._700italic] + let variants: [Font.Variant] = [.thin, .thinItalic, .extralight, .extralightItalic, .light, .lightItalic, .regular, .regularItalic, .medium, .mediumItalic, .semibold, .semiboldItalic, .bold, .boldItalic, .extrabold, .extraboldItalic, .black, .blackItalic] return variants.map { $0.rawValue }.contains($0) } diff --git a/Inkwell/Inkwell/NameDictionary.swift b/Inkwell/Inkwell/NameDictionary.swift index ef7c7ef..e6f9d99 100644 --- a/Inkwell/Inkwell/NameDictionary.swift +++ b/Inkwell/Inkwell/NameDictionary.swift @@ -55,7 +55,7 @@ final class NameDictionary: NameDictionaryProtocol { } return lookUpPostscriptName(for: font) ?? - (nameDictionary.value(forKey: font.name) as? String) + (nameDictionary.value(forKey: font.idName) as? String) } /// Set the postscript name of specified font. @@ -68,7 +68,7 @@ final class NameDictionary: NameDictionaryProtocol { let URL = storage.nameDictionaryURL let nameDictionary = cache ?? NSMutableDictionary(contentsOf: URL) ?? NSMutableDictionary(capacity: 1) - nameDictionary.setValue(name, forKey: font.name) + nameDictionary.setValue(name, forKey: font.idName) if cache == nil { cache = nameDictionary } @@ -83,51 +83,9 @@ final class NameDictionary: NameDictionaryProtocol { /// - Parameter font: The font needed to get the postscript name. /// - Returns: The postscript name. private func lookUpPostscriptName(for font: Font) -> String? { - let weightNounRegex = try! NSRegularExpression(pattern: "(light|medium|bold|extrabold)", options: [.caseInsensitive]) - let obliqueNounRegex = try! NSRegularExpression(pattern: "(italic|oblique)", options: [.caseInsensitive]) - let boldRegex = try! NSRegularExpression(pattern: "(? 0 ? filteredFontNames[0] : nil diff --git a/Inkwell/InkwellTests/FontRegisterTests.swift b/Inkwell/InkwellTests/FontRegisterTests.swift index d5c7c15..8141a8d 100644 --- a/Inkwell/InkwellTests/FontRegisterTests.swift +++ b/Inkwell/InkwellTests/FontRegisterTests.swift @@ -100,7 +100,7 @@ class FontRegisterTests: XCTestCase { func test_register_fileNotFound() { storage.fontURL = URL(string: "fileNotFound")! - let font = Font(family: "ABeeZee", variant: ._700) + let font = Font(family: "ABeeZee", variant: .bold) let result = fontRegister.register(font) let postScriptName = nameDictionary.postscriptName(for: font) let uifont = UIFont(name: "ABeeZee-Bold", size: 10) diff --git a/Inkwell/InkwellTests/FontTests.swift b/Inkwell/InkwellTests/FontTests.swift index e17c36a..695f6e1 100644 --- a/Inkwell/InkwellTests/FontTests.swift +++ b/Inkwell/InkwellTests/FontTests.swift @@ -29,35 +29,35 @@ import XCTest class FontTests: XCTestCase { func test_init() { - let font = Font(family: "Arial", variant: ._700) + let font = Font(family: "Arial", variant: .bold) XCTAssertEqual(font.family, "Arial") - XCTAssertEqual(font.variant, ._700) + XCTAssertEqual(font.variant, .bold) } func test_name() { - let font = Font(family: "Arial", variant: ._700) + let font = Font(family: "Arial", variant: .bold) - XCTAssertEqual(font.name, "Arial-700") + XCTAssertEqual(font.name, "Arial-Bold") } func test_filname() { - let font = Font(family: "Arial", variant: ._700) + let font = Font(family: "Arial", variant: .bold) - XCTAssertEqual(font.filename, "Arial-700.ttf") + XCTAssertEqual(font.filename, "Arial-Bold.ttf") } func test_variant() { var variant: Font.Variant = .regular XCTAssertEqual(variant.rawValue, "regular") - variant = ._700 + variant = .bold XCTAssertEqual(variant.rawValue, "700") - variant = .italic + variant = .regularItalic XCTAssertEqual(variant.rawValue, "italic") - variant = ._700italic + variant = .boldItalic XCTAssertEqual(variant.rawValue, "700italic") } } diff --git a/Inkwell/InkwellTests/NameDictionaryTests.swift b/Inkwell/InkwellTests/NameDictionaryTests.swift index 7dc289a..822fec5 100644 --- a/Inkwell/InkwellTests/NameDictionaryTests.swift +++ b/Inkwell/InkwellTests/NameDictionaryTests.swift @@ -54,7 +54,7 @@ class NameDictionaryTests: XCTestCase { XCTAssertNotNil(postScriptName) XCTAssertEqual(postScriptName, "Roboto-regular") - font = Font(family: "Roboto", variant: ._700) + font = Font(family: "Roboto", variant: .bold) postScriptName = nameDictionary.postscriptName(for: font) XCTAssertNil(postScriptName) } @@ -69,91 +69,46 @@ class NameDictionaryTests: XCTestCase { func test_postscriptName_lookUpFromRegisteredFonts() { // Futura family - var font = Font(family: "Futura", variant: .regular) + var font = Font(family: "Futura", variant: .medium) var postScriptName = nameDictionary.postscriptName(for: font) XCTAssertNotNil(postScriptName) XCTAssertEqual(postScriptName, "Futura-Medium") - font = Font(family: "Futura", variant: ._700) + font = Font(family: "Futura", variant: .bold) postScriptName = nameDictionary.postscriptName(for: font) XCTAssertNotNil(postScriptName) XCTAssertEqual(postScriptName, "Futura-Bold") - font = Font(family: "Futura", variant: .italic) + font = Font(family: "Futura", variant: .mediumItalic) postScriptName = nameDictionary.postscriptName(for: font) XCTAssertNotNil(postScriptName) XCTAssertEqual(postScriptName, "Futura-MediumItalic") - font = Font(family: "Futura", variant: ._700italic) + font = Font(family: "Futura", variant: .boldItalic) postScriptName = nameDictionary.postscriptName(for: font) XCTAssertNil(postScriptName) - - // Arial family - - font = Font(family: "Arial", variant: .regular) - postScriptName = nameDictionary.postscriptName(for: font) - XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "ArialMT") - - font = Font(family: "Arial", variant: ._700) - postScriptName = nameDictionary.postscriptName(for: font) - XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "Arial-BoldMT") - - font = Font(family: "Arial", variant: .italic) - postScriptName = nameDictionary.postscriptName(for: font) - XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "Arial-ItalicMT") - - font = Font(family: "Arial", variant: ._700italic) - postScriptName = nameDictionary.postscriptName(for: font) - XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "Arial-BoldItalicMT") - - // Helvetica family - - font = Font(family: "Helvetica", variant: .regular) - postScriptName = nameDictionary.postscriptName(for: font) - XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "Helvetica") - - font = Font(family: "Helvetica", variant: ._700) - postScriptName = nameDictionary.postscriptName(for: font) - XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "Helvetica-Bold") - - font = Font(family: "Helvetica", variant: .italic) - postScriptName = nameDictionary.postscriptName(for: font) - XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "Helvetica-Oblique") - - font = Font(family: "Helvetica", variant: ._700italic) - postScriptName = nameDictionary.postscriptName(for: font) - XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "Helvetica-BoldOblique") - } func test_setPostscriptName() { - let font = Font(family: "Roboto", variant: ._700) - let result = nameDictionary.setPostscriptName("Roboto-bold", for: font) + let font = Font(family: "Roboto", variant: .bold) + let result = nameDictionary.setPostscriptName("Roboto-Bold", for: font) let postScriptName = nameDictionary.postscriptName(for: font) XCTAssertTrue(result) XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "Roboto-bold") + XCTAssertEqual(postScriptName, "Roboto-Bold") } func test_setPostscriptName_fileNotFound() { try? FileManager.default.removeItem(atPath: storage.nameDictionaryURL.path) - let font = Font(family: "Roboto", variant: ._700) - let result = nameDictionary.setPostscriptName("Roboto-bold", for: font) + let font = Font(family: "Roboto", variant: .bold) + let result = nameDictionary.setPostscriptName("Roboto-Bold", for: font) let postScriptName = nameDictionary.postscriptName(for: font) XCTAssertTrue(result) XCTAssertNotNil(postScriptName) - XCTAssertEqual(postScriptName, "Roboto-bold") + XCTAssertEqual(postScriptName, "Roboto-Bold") } } diff --git a/Inkwell/InkwellTests/StorageTests.swift b/Inkwell/InkwellTests/StorageTests.swift index f217ed9..606bdf4 100644 --- a/Inkwell/InkwellTests/StorageTests.swift +++ b/Inkwell/InkwellTests/StorageTests.swift @@ -74,7 +74,7 @@ class StorageTests: XCTestCase { var font = Font(family: "Arial", variant: .regular) XCTAssertTrue(storage.fileExists(for: font)) - font = Font(family: "Arial", variant: ._700) + font = Font(family: "Arial", variant: .bold) XCTAssertFalse(storage.fileExists(for: font)) } @@ -89,7 +89,7 @@ class StorageTests: XCTestCase { let font = Font(family: "Arial", variant: .regular) let url = storage.URL(for: font) - XCTAssertTrue(url.absoluteString.hasSuffix("/me.vinhis.Inkwell/fonts/Arial-regular.ttf")) + XCTAssertTrue(url.absoluteString.hasSuffix("/me.vinhis.Inkwell/fonts/Arial-Regular.ttf")) } func test_removeGoogleFontsMetadata() { From 66c574d26bbfb13c7857860fcfa597d3ad32f48b Mon Sep 17 00:00:00 2001 From: Brad Philips Date: Sun, 18 Mar 2018 13:04:02 -0400 Subject: [PATCH 4/5] Updates for everything else --- .../InkwellExample.xcodeproj/project.pbxproj | 25 ++++++++++++++++--- .../xcschemes/InkwellExample.xcscheme | 4 ++- .../InkwellExample/FontsViewController.swift | 2 +- Example/Podfile | 8 ++++++ Example/Podfile.lock | 2 +- Inkwell/Inkwell.xcodeproj/project.pbxproj | 4 +-- Inkwell/Inkwell/FontRegister.swift | 14 +++++++---- 7 files changed, 45 insertions(+), 14 deletions(-) diff --git a/Example/InkwellExample.xcodeproj/project.pbxproj b/Example/InkwellExample.xcodeproj/project.pbxproj index d60713d..27cd4e4 100644 --- a/Example/InkwellExample.xcodeproj/project.pbxproj +++ b/Example/InkwellExample.xcodeproj/project.pbxproj @@ -144,12 +144,13 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0820; + LastUpgradeCheck = 0920; ORGANIZATIONNAME = "Vinh Nguyen"; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0830; + DevelopmentTeam = WKQXW7N43D; + LastSwiftMigration = 0920; }; }; }; @@ -281,14 +282,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -329,14 +336,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -368,13 +381,15 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + DEVELOPMENT_TEAM = WKQXW7N43D; INFOPLIST_FILE = "$(SRCROOT)/InkwellExample/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = me.vinhis.InkwellExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -384,12 +399,14 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + DEVELOPMENT_TEAM = WKQXW7N43D; INFOPLIST_FILE = "$(SRCROOT)/InkwellExample/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = me.vinhis.InkwellExample; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Example/InkwellExample.xcodeproj/xcshareddata/xcschemes/InkwellExample.xcscheme b/Example/InkwellExample.xcodeproj/xcshareddata/xcschemes/InkwellExample.xcscheme index b5c6f9a..8b47be5 100644 --- a/Example/InkwellExample.xcodeproj/xcshareddata/xcschemes/InkwellExample.xcscheme +++ b/Example/InkwellExample.xcodeproj/xcshareddata/xcschemes/InkwellExample.xcscheme @@ -1,6 +1,6 @@ '../' end + +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['SWIFT_VERSION'] = '4' + end + end +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 5d47921..d3f66ed 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -14,6 +14,6 @@ SPEC CHECKSUMS: Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a Inkwell: 34dbb2671deb3ac1118a5510e9ea7187dbd9cb3c -PODFILE CHECKSUM: 44deffad5fd16cd63e25c367cd7ac75c9b3b5f07 +PODFILE CHECKSUM: 68b39a8a784dac3776cf21347516b776c963cedc COCOAPODS: 1.4.0 diff --git a/Inkwell/Inkwell.xcodeproj/project.pbxproj b/Inkwell/Inkwell.xcodeproj/project.pbxproj index 39b8453..1ebc808 100644 --- a/Inkwell/Inkwell.xcodeproj/project.pbxproj +++ b/Inkwell/Inkwell.xcodeproj/project.pbxproj @@ -456,7 +456,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -487,7 +487,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Inkwell/Inkwell/FontRegister.swift b/Inkwell/Inkwell/FontRegister.swift index e83d585..84a4f26 100644 --- a/Inkwell/Inkwell/FontRegister.swift +++ b/Inkwell/Inkwell/FontRegister.swift @@ -48,12 +48,16 @@ final class FontRegister { let cgfont = CGFont(provider) - guard CTFontManagerRegisterGraphicsFont(cgfont!, nil) else { return false } - guard let postscriptName = cgfont?.postScriptName as String?, - nameDictionary.setPostscriptName(postscriptName, for: font) else { - CTFontManagerUnregisterGraphicsFont(cgfont!, nil) + if let cgfont = cgfont { + guard CTFontManagerRegisterGraphicsFont(cgfont, nil) else { return false } + guard let postscriptName = cgfont.postScriptName as String?, + nameDictionary.setPostscriptName(postscriptName, for: font) else { + CTFontManagerUnregisterGraphicsFont(cgfont, nil) - return false + return false + } + } else { + return false } return true From 5e52dbe54073036031c714aafc61d3659fd82b96 Mon Sep 17 00:00:00 2001 From: Brad Philips Date: Sun, 18 Mar 2018 20:23:30 -0400 Subject: [PATCH 5/5] Added synchronous version for fetching fonts --- Inkwell/Inkwell/FontOperation.swift | 4 ++++ Inkwell/Inkwell/Inkwell.swift | 33 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/Inkwell/Inkwell/FontOperation.swift b/Inkwell/Inkwell/FontOperation.swift index 7bb3592..1387bbf 100644 --- a/Inkwell/Inkwell/FontOperation.swift +++ b/Inkwell/Inkwell/FontOperation.swift @@ -32,6 +32,10 @@ public final class FontOperation { init(operation: InternalFontOperation) { self.operation = operation } + + public func waitUntilFinished() { + self.operation.waitUntilFinished() + } /// Cancel the operation. public func cancel() { diff --git a/Inkwell/Inkwell/Inkwell.swift b/Inkwell/Inkwell/Inkwell.swift index dfa82b5..5dff344 100644 --- a/Inkwell/Inkwell/Inkwell.swift +++ b/Inkwell/Inkwell/Inkwell.swift @@ -97,4 +97,37 @@ public final class Inkwell { return FontOperation(operation: operation) } + + /// Create the `UIFont` with specified font information. + /// + /// - Note: Google Fonts has higher priority + /// that means the `at` param is only used unless the given font + /// information is found on Google Fonts, otherwise the `at` param + /// is ignored. + /// + /// - Parameters: + /// - font: The font information. + /// - size: The font size. + /// - at: The URL used to download the font file. Default is `nil`. + /// - Returns: The font. + @discardableResult + public func fontSync(for font: Font, + size: CGFloat, + at url: URL? = nil) -> UIFont? { + var foundFount: UIFont? = nil + let operation = InternalFontOperation(storage: storage, + nameDictionary: nameDictionary, + fontRegister: fontRegister, + fontDownloader: fontDownloader, + googleFontsMetadata: googleFontsMetadata, + font: font, + size: size, + url: url) { uifont in + foundFount = uifont + } + + operationQueue.addOperation(operation) + operation.waitUntilFinished() + return foundFount + } }