From 5e43a4299da56d39c032e3b267c06492b96df16d Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 2 Nov 2016 12:29:09 -0400 Subject: [PATCH 01/20] Swift 3.0 compatibility changes. Required bumping Alamofire up to 4.0. --- Example/LotameDMP.xcodeproj/project.pbxproj | 110 +- Example/LotameDMP/AppDelegate.swift | 12 +- Example/LotameDMP/Base.lproj/Main.storyboard | 47 +- .../AppIcon.appiconset/Contents.json | 12 +- Example/LotameDMP/ViewController.swift | 16 +- Example/ObjcExample.m | 6 +- Example/Podfile | 4 +- Example/Podfile.lock | 14 +- Example/Pods/Alamofire/LICENSE | 2 +- Example/Pods/Alamofire/README.md | 1732 ++++++++++++----- Example/Pods/Alamofire/Source/AFError.swift | 450 +++++ Example/Pods/Alamofire/Source/Alamofire.swift | 642 +++--- .../Source/DispatchQueue+Alamofire.swift | 43 + Example/Pods/Alamofire/Source/Download.swift | 244 --- Example/Pods/Alamofire/Source/Error.swift | 66 - Example/Pods/Alamofire/Source/Manager.swift | 668 ------- .../Alamofire/Source/MultipartFormData.swift | 692 +++---- .../Source/NetworkReachabilityManager.swift | 240 +++ .../Pods/Alamofire/Source/Notifications.swift | 52 + .../Alamofire/Source/ParameterEncoding.swift | 514 +++-- Example/Pods/Alamofire/Source/Request.swift | 864 ++++---- Example/Pods/Alamofire/Source/Response.swift | 296 +++ .../Source/ResponseSerialization.swift | 791 ++++++-- Example/Pods/Alamofire/Source/Result.swift | 100 +- .../Alamofire/Source/ServerTrustPolicy.swift | 288 ++- .../Alamofire/Source/SessionDelegate.swift | 681 +++++++ .../Alamofire/Source/SessionManager.swift | 776 ++++++++ Example/Pods/Alamofire/Source/Stream.swift | 180 -- .../Pods/Alamofire/Source/TaskDelegate.swift | 449 +++++ Example/Pods/Alamofire/Source/Timeline.swift | 136 ++ Example/Pods/Alamofire/Source/Upload.swift | 372 ---- .../Pods/Alamofire/Source/Validation.swift | 386 ++-- .../Private/OHHTTPStubs/Compatibility.h | 1 - .../Headers/Private/OHHTTPStubs/OHHTTPStubs.h | 1 - .../OHHTTPStubs/OHHTTPStubsResponse+JSON.h | 1 - .../Private/OHHTTPStubs/OHHTTPStubsResponse.h | 1 - .../Private/OHHTTPStubs/OHPathHelpers.h | 1 - .../Local Podspecs/LotameDMP.podspec.json | 8 +- Example/Pods/Manifest.lock | 14 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 1339 +++++++------ .../xcshareddata/xcschemes/LotameDMP.xcscheme | 62 - .../Alamofire/Alamofire-Private.xcconfig | 6 - .../Alamofire/Alamofire-umbrella.h | 2 + .../Alamofire/Alamofire.xcconfig | 9 + .../Target Support Files/Alamofire/Info.plist | 4 +- .../Target Support Files/LotameDMP/Info.plist | 4 +- .../LotameDMP/LotameDMP-Private.xcconfig | 7 - .../LotameDMP/LotameDMP-umbrella.h | 2 + .../LotameDMP/LotameDMP.xcconfig | 12 +- .../ResourceBundle-LotameDMP-Info.plist | 24 + .../OHHTTPStubs/Info.plist | 2 +- .../OHHTTPStubs/OHHTTPStubs-Private.xcconfig | 6 - .../OHHTTPStubs/OHHTTPStubs-umbrella.h | 2 + .../OHHTTPStubs/OHHTTPStubs.xcconfig | 10 +- .../Pods-LotameDMP_Example/Info.plist | 2 +- ...otameDMP_Example-acknowledgements.markdown | 4 +- ...s-LotameDMP_Example-acknowledgements.plist | 8 +- .../Pods-LotameDMP_Example-frameworks.sh | 68 +- .../Pods-LotameDMP_Example-resources.sh | 97 +- .../Pods-LotameDMP_Example-umbrella.h | 2 + .../Pods-LotameDMP_Example.debug.xcconfig | 10 +- .../Pods-LotameDMP_Example.release.xcconfig | 10 +- .../Pods-LotameDMP_Tests/Info.plist | 2 +- ...-LotameDMP_Tests-acknowledgements.markdown | 4 +- ...ods-LotameDMP_Tests-acknowledgements.plist | 10 +- .../Pods-LotameDMP_Tests-frameworks.sh | 72 +- .../Pods-LotameDMP_Tests-resources.sh | 97 +- .../Pods-LotameDMP_Tests-umbrella.h | 2 + .../Pods-LotameDMP_Tests.debug.xcconfig | 10 +- .../Pods-LotameDMP_Tests.release.xcconfig | 10 +- Example/Tests/Tests.swift | 52 +- LotameDMP.podspec | 6 +- Pod/Classes/DMP.swift | 184 +- Pod/Classes/LotameAudience.swift | 14 +- Pod/Classes/LotameError.swift | 16 +- Pod/Classes/LotameProfile.swift | 12 +- Pod/Classes/SwiftyJSON.swift | 974 +++++---- README.md | 6 +- 78 files changed, 8561 insertions(+), 5514 deletions(-) create mode 100644 Example/Pods/Alamofire/Source/AFError.swift create mode 100644 Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift delete mode 100644 Example/Pods/Alamofire/Source/Download.swift delete mode 100644 Example/Pods/Alamofire/Source/Error.swift delete mode 100644 Example/Pods/Alamofire/Source/Manager.swift create mode 100644 Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift create mode 100644 Example/Pods/Alamofire/Source/Notifications.swift create mode 100644 Example/Pods/Alamofire/Source/Response.swift create mode 100644 Example/Pods/Alamofire/Source/SessionDelegate.swift create mode 100644 Example/Pods/Alamofire/Source/SessionManager.swift delete mode 100644 Example/Pods/Alamofire/Source/Stream.swift create mode 100644 Example/Pods/Alamofire/Source/TaskDelegate.swift create mode 100644 Example/Pods/Alamofire/Source/Timeline.swift delete mode 100644 Example/Pods/Alamofire/Source/Upload.swift delete mode 120000 Example/Pods/Headers/Private/OHHTTPStubs/Compatibility.h delete mode 120000 Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubs.h delete mode 120000 Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubsResponse+JSON.h delete mode 120000 Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubsResponse.h delete mode 120000 Example/Pods/Headers/Private/OHHTTPStubs/OHPathHelpers.h delete mode 100644 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/LotameDMP.xcscheme delete mode 100644 Example/Pods/Target Support Files/Alamofire/Alamofire-Private.xcconfig delete mode 100644 Example/Pods/Target Support Files/LotameDMP/LotameDMP-Private.xcconfig create mode 100644 Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist delete mode 100644 Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-Private.xcconfig diff --git a/Example/LotameDMP.xcodeproj/project.pbxproj b/Example/LotameDMP.xcodeproj/project.pbxproj index 3f0bbe1..33e1063 100644 --- a/Example/LotameDMP.xcodeproj/project.pbxproj +++ b/Example/LotameDMP.xcodeproj/project.pbxproj @@ -7,15 +7,15 @@ objects = { /* Begin PBXBuildFile section */ - 311041731CC9832D7283825A /* Pods_LotameDMP_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 525845BFDBF8CE53D6B6A996 /* Pods_LotameDMP_Tests.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 32DEAC8FCC9449E100781B4B /* Pods_LotameDMP_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 999AEA689F6BCE25973BC733 /* Pods_LotameDMP_Example.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 5834CA581BC5B4BB00D245E4 /* ObjcExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 5834CA571BC5B4BB00D245E4 /* ObjcExample.m */; settings = {ASSET_TAGS = (); }; }; + 4EC92AB3F9D32BBDBF5630ED /* Pods_LotameDMP_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3D06D713BB18D797D99F6FA /* Pods_LotameDMP_Example.framework */; }; + 5834CA581BC5B4BB00D245E4 /* ObjcExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 5834CA571BC5B4BB00D245E4 /* ObjcExample.m */; }; 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; + 8D51A64CCC3C636F190654BF /* Pods_LotameDMP_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C38C3EE0F22BF2FECB37AA87 /* Pods_LotameDMP_Tests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -29,10 +29,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0AAE913FC97ABF21110EEA38 /* Pods-LotameDMP_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LotameDMP_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig"; sourceTree = ""; }; - 525845BFDBF8CE53D6B6A996 /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5834CA561BC5B4BB00D245E4 /* ObjcExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjcExample.h; path = ../ObjcExample.h; sourceTree = ""; }; 5834CA571BC5B4BB00D245E4 /* ObjcExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ObjcExample.m; path = ../ObjcExample.m; sourceTree = ""; }; + 5C26DC5676C205133A81B32D /* Pods-LotameDMP_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LotameDMP_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig"; sourceTree = ""; }; 607FACD01AFB9204008FA782 /* LotameDMP_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LotameDMP_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -43,13 +42,14 @@ 607FACE51AFB9204008FA782 /* LotameDMP_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LotameDMP_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; + 64F1A35CD2B8D691750FB063 /* Pods-LotameDMP_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LotameDMP_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig"; sourceTree = ""; }; 68A225BFFBE8E2A3FBDA7A24 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; - 999AEA689F6BCE25973BC733 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 70E16058F2811FDF2F67414F /* Pods-LotameDMP_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LotameDMP_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig"; sourceTree = ""; }; + C38C3EE0F22BF2FECB37AA87 /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C3D06D713BB18D797D99F6FA /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E0F887560874FC6BE9FC36A6 /* Pods-LotameDMP_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LotameDMP_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig"; sourceTree = ""; }; E1250959D9A53E3904AE529F /* LotameDMP.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LotameDMP.podspec; path = ../LotameDMP.podspec; sourceTree = ""; }; EACAD3F12B6BE04C206757A1 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - EBC76E966AF0681785D0C6A7 /* Pods-LotameDMP_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LotameDMP_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig"; sourceTree = ""; }; - F11ADE8BD105EE6B33B2C559 /* Pods-LotameDMP_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LotameDMP_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig"; sourceTree = ""; }; - FBE886B95B11D76E44F665E1 /* Pods-LotameDMP_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LotameDMP_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -57,7 +57,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 32DEAC8FCC9449E100781B4B /* Pods_LotameDMP_Example.framework in Frameworks */, + 4EC92AB3F9D32BBDBF5630ED /* Pods_LotameDMP_Example.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -65,18 +65,18 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 311041731CC9832D7283825A /* Pods_LotameDMP_Tests.framework in Frameworks */, + 8D51A64CCC3C636F190654BF /* Pods_LotameDMP_Tests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 24513AC19BBF10F470F7E917 /* Frameworks */ = { + 0467F1E8D9CAB9767B625E35 /* Frameworks */ = { isa = PBXGroup; children = ( - 999AEA689F6BCE25973BC733 /* Pods_LotameDMP_Example.framework */, - 525845BFDBF8CE53D6B6A996 /* Pods_LotameDMP_Tests.framework */, + C3D06D713BB18D797D99F6FA /* Pods_LotameDMP_Example.framework */, + C38C3EE0F22BF2FECB37AA87 /* Pods_LotameDMP_Tests.framework */, ); name = Frameworks; sourceTree = ""; @@ -88,8 +88,8 @@ 607FACD21AFB9204008FA782 /* Example for LotameDMP */, 607FACE81AFB9204008FA782 /* Tests */, 607FACD11AFB9204008FA782 /* Products */, - BA1853FCAEBE0FDC65D6A3B9 /* Pods */, - 24513AC19BBF10F470F7E917 /* Frameworks */, + FB240902E91EE869A00A17AE /* Pods */, + 0467F1E8D9CAB9767B625E35 /* Frameworks */, ); sourceTree = ""; }; @@ -153,13 +153,13 @@ name = "Podspec Metadata"; sourceTree = ""; }; - BA1853FCAEBE0FDC65D6A3B9 /* Pods */ = { + FB240902E91EE869A00A17AE /* Pods */ = { isa = PBXGroup; children = ( - 0AAE913FC97ABF21110EEA38 /* Pods-LotameDMP_Example.debug.xcconfig */, - EBC76E966AF0681785D0C6A7 /* Pods-LotameDMP_Example.release.xcconfig */, - FBE886B95B11D76E44F665E1 /* Pods-LotameDMP_Tests.debug.xcconfig */, - F11ADE8BD105EE6B33B2C559 /* Pods-LotameDMP_Tests.release.xcconfig */, + 5C26DC5676C205133A81B32D /* Pods-LotameDMP_Example.debug.xcconfig */, + E0F887560874FC6BE9FC36A6 /* Pods-LotameDMP_Example.release.xcconfig */, + 70E16058F2811FDF2F67414F /* Pods-LotameDMP_Tests.debug.xcconfig */, + 64F1A35CD2B8D691750FB063 /* Pods-LotameDMP_Tests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -171,12 +171,12 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "LotameDMP_Example" */; buildPhases = ( - B04DAC1C72ED6C0C7BCB844B /* Check Pods Manifest.lock */, + DFFF2D62FCE4EB3A33E22DC4 /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, - 41CEDF381F073F1CC352A7AC /* Embed Pods Frameworks */, - 1E0806D884CA494A40006962 /* Copy Pods Resources */, + A00628155799EF845FC58D1C /* [CP] Embed Pods Frameworks */, + A7B5AA28529EC1B0155B5926 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -191,12 +191,12 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "LotameDMP_Tests" */; buildPhases = ( - 5AAC90F1EF8764B679D68494 /* Check Pods Manifest.lock */, + 7AD6142C1B6198A73ED210BF /* [CP] Check Pods Manifest.lock */, 607FACE11AFB9204008FA782 /* Sources */, 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, - 509609D24F91B906A4B1741F /* Embed Pods Frameworks */, - 568BDFEB067C5721F098B062 /* Copy Pods Resources */, + 2A3DE9E072CC2766CD879577 /* [CP] Embed Pods Frameworks */, + DCE8B24C80B3D78A312B2796 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -220,9 +220,11 @@ TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; + LastSwiftMigration = 0800; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; + LastSwiftMigration = 0800; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -267,94 +269,94 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1E0806D884CA494A40006962 /* Copy Pods Resources */ = { + 2A3DE9E072CC2766CD879577 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 41CEDF381F073F1CC352A7AC /* Embed Pods Frameworks */ = { + 7AD6142C1B6198A73ED210BF /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 509609D24F91B906A4B1741F /* Embed Pods Frameworks */ = { + A00628155799EF845FC58D1C /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 568BDFEB067C5721F098B062 /* Copy Pods Resources */ = { + A7B5AA28529EC1B0155B5926 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 5AAC90F1EF8764B679D68494 /* Check Pods Manifest.lock */ = { + DCE8B24C80B3D78A312B2796 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - B04DAC1C72ED6C0C7BCB844B /* Check Pods Manifest.lock */ = { + DFFF2D62FCE4EB3A33E22DC4 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -445,7 +447,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -483,7 +485,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; @@ -492,34 +494,38 @@ }; 607FACF01AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0AAE913FC97ABF21110EEA38 /* Pods-LotameDMP_Example.debug.xcconfig */; + baseConfigurationReference = 5C26DC5676C205133A81B32D /* Pods-LotameDMP_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = LotameDMP/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; }; name = Debug; }; 607FACF11AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EBC76E966AF0681785D0C6A7 /* Pods-LotameDMP_Example.release.xcconfig */; + baseConfigurationReference = E0F887560874FC6BE9FC36A6 /* Pods-LotameDMP_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = LotameDMP/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Release; }; 607FACF31AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FBE886B95B11D76E44F665E1 /* Pods-LotameDMP_Tests.debug.xcconfig */; + baseConfigurationReference = 70E16058F2811FDF2F67414F /* Pods-LotameDMP_Tests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = ( @@ -533,13 +539,14 @@ INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LotameDMP_Example.app/LotameDMP_Example"; }; name = Debug; }; 607FACF41AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F11ADE8BD105EE6B33B2C559 /* Pods-LotameDMP_Tests.release.xcconfig */; + baseConfigurationReference = 64F1A35CD2B8D691750FB063 /* Pods-LotameDMP_Tests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = ( @@ -549,6 +556,7 @@ INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LotameDMP_Example.app/LotameDMP_Example"; }; name = Release; diff --git a/Example/LotameDMP/AppDelegate.swift b/Example/LotameDMP/AppDelegate.swift index bdd170a..b968f84 100644 --- a/Example/LotameDMP/AppDelegate.swift +++ b/Example/LotameDMP/AppDelegate.swift @@ -15,7 +15,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. //Set Lotame DMP client id here @@ -23,25 +23,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate { return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { + func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/Example/LotameDMP/Base.lproj/Main.storyboard b/Example/LotameDMP/Base.lproj/Main.storyboard index 5429d4f..51b5aaa 100644 --- a/Example/LotameDMP/Base.lproj/Main.storyboard +++ b/Example/LotameDMP/Base.lproj/Main.storyboard @@ -1,9 +1,10 @@ - - + + - + + @@ -15,51 +16,51 @@ - + - - - - - - + diff --git a/Example/LotameDMP/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/LotameDMP/Images.xcassets/AppIcon.appiconset/Contents.json index d3942e9..b8236c6 100644 --- a/Example/LotameDMP/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/LotameDMP/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -35,4 +45,4 @@ "version" : 1, "author" : "xcode" } -} +} \ No newline at end of file diff --git a/Example/LotameDMP/ViewController.swift b/Example/LotameDMP/ViewController.swift index cf3c09e..24b79d2 100644 --- a/Example/LotameDMP/ViewController.swift +++ b/Example/LotameDMP/ViewController.swift @@ -18,21 +18,21 @@ class ViewController: UIViewController { @IBOutlet var valueField: UITextField! - private var foregroundNotification: NSObjectProtocol! + fileprivate var foregroundNotification: NSObjectProtocol! override func viewDidLoad() { super.viewDidLoad() - foregroundNotification = NSNotificationCenter.defaultCenter().addObserverForName(UIApplicationWillEnterForegroundNotification, object: nil, queue: NSOperationQueue.mainQueue()) { + foregroundNotification = NotificationCenter.default.addObserver(forName: NSNotification.Name.UIApplicationWillEnterForeground, object: nil, queue: OperationQueue.main) { [unowned self] notification in self.showUUID() } } - override func viewDidAppear(animated: Bool) { + override func viewDidAppear(_ animated: Bool) { showUUID() } deinit { - NSNotificationCenter.defaultCenter().removeObserver(foregroundNotification) + NotificationCenter.default.removeObserver(foregroundNotification) } func showUUID(){ @@ -43,7 +43,7 @@ class ViewController: UIViewController { } } - @IBAction func addBehavior(sender: UIButton) { + @IBAction func addBehavior(_ sender: UIButton) { self.view.endEditing(true) if let behavior = behaviorField.text{ DMP.addBehaviorData(valueField.text, forType: behavior) @@ -57,7 +57,7 @@ class ViewController: UIViewController { } } - @IBAction func sendBehaviors(sender: UIButton) { + @IBAction func sendBehaviors(_ sender: UIButton) { self.view.endEditing(true) DMP.sendBehaviorData(){ result in @@ -69,7 +69,7 @@ class ViewController: UIViewController { } } - @IBAction func getAudience(sender: AnyObject) { + @IBAction func getAudience(_ sender: AnyObject) { self.view.endEditing(true) DMP.getAudienceData{ result in @@ -97,7 +97,7 @@ class ViewController: UIViewController { } - @IBAction func startNewSession(sender: AnyObject) { + @IBAction func startNewSession(_ sender: AnyObject) { DMP.startNewSession() } diff --git a/Example/ObjcExample.m b/Example/ObjcExample.m index 3cf484f..ae49dc7 100644 --- a/Example/ObjcExample.m +++ b/Example/ObjcExample.m @@ -8,11 +8,13 @@ #import "ObjcExample.h" +@import LotameDMP; + @implementation ObjcExample - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //Call initialize before making any calls. - [DMP initialize:@"25"] + [DMP initialize:@"25"]; return YES; } @@ -28,7 +30,7 @@ - (void) getAudience{ [DMP getAudienceDataWithHandler:^(LotameProfile * _Nullable profile, BOOL success) { if (success) { //Check for success for (LotameAudience * audience in profile.audiences) { //Loop through each audience - NSLog(audience.jsonString) + NSLog(audience.jsonString); } } }]; diff --git a/Example/Podfile b/Example/Podfile index 8165d06..8e90d74 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,11 +1,11 @@ source 'https://github.com/CocoaPods/Specs.git' use_frameworks! -target 'LotameDMP_Example', :exclusive => true do +target 'LotameDMP_Example' do pod "LotameDMP", :path => "../" end -target 'LotameDMP_Tests', :exclusive => true do +target 'LotameDMP_Tests' do pod "LotameDMP", :path => "../" pod 'OHHTTPStubs' diff --git a/Example/Podfile.lock b/Example/Podfile.lock index ad1f721..47ddcf1 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,7 +1,7 @@ PODS: - - Alamofire (2.0.2) - - LotameDMP (3.0.0): - - Alamofire (~> 2.0) + - Alamofire (4.0.1) + - LotameDMP (3.1.0): + - Alamofire (~> 4.0) - OHHTTPStubs (4.3.0): - OHHTTPStubs/Default (= 4.3.0) - OHHTTPStubs/Core (4.3.0) @@ -25,8 +25,10 @@ EXTERNAL SOURCES: :path: ../ SPEC CHECKSUMS: - Alamofire: 8edbab00802a752bb5240cc2abe70e7e881488ad - LotameDMP: 58ef9e6bd216a2af13d78c6aebdbb2bb21ffce99 + Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 + LotameDMP: 0ad1e60d8736730f1cb5b06332189754d021da02 OHHTTPStubs: 0aec5755528693a165bd616cb79f69387de306a8 -COCOAPODS: 0.38.2 +PODFILE CHECKSUM: 5e055f3d87d9e826bbffdaa946dd6844c802fc9c + +COCOAPODS: 1.1.1 diff --git a/Example/Pods/Alamofire/LICENSE b/Example/Pods/Alamofire/LICENSE index 5b7934d..4cfbf72 100644 --- a/Example/Pods/Alamofire/LICENSE +++ b/Example/Pods/Alamofire/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +Copyright (c) 2014-2016 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/Example/Pods/Alamofire/README.md b/Example/Pods/Alamofire/README.md index 0f8612d..bfaed03 100644 --- a/Example/Pods/Alamofire/README.md +++ b/Example/Pods/Alamofire/README.md @@ -1,34 +1,68 @@ ![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/assets/alamofire.png) -[![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg)](https://travis-ci.org/Alamofire/Alamofire) -[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) +[![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) [![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](http://twitter.com/AlamofireSF) Alamofire is an HTTP networking library written in Swift. +- [Features](#features) +- [Component Libraries](#component-libraries) +- [Requirements](#requirements) +- [Migration Guides](#migration-guides) +- [Communication](#communication) +- [Installation](#installation) +- [Usage](#usage) + - **Intro -** [Making a Request](#making-a-request), [Response Handling](#response-handling), [Response Validation](#response-validation), [Response Caching](#response-caching) + - **HTTP -** [HTTP Methods](#http-methods), [Parameter Encoding](#parameter-encoding), [HTTP Headers](#http-headers), [Authentication](#authentication) + - **Large Data -** [Downloading Data to a File](#downloading-data-to-a-file), [Uploading Data to a Server](#uploading-data-to-a-server) + - **Tools -** [Statistical Metrics](#statistical-metrics), [cURL Command Output](#curl-command-output) +- [Advanced Usage](#advanced-usage) + - **URL Session -** [Session Manager](#session-manager), [Session Delegate](#session-delegate), [Request](#request) + - **Routing -** [Routing Requests](#routing-requests), [Adapting and Retrying Requests](#adapting-and-retrying-requests) + - **Model Objects -** [Custom Response Serialization](#custom-response-serialization) + - **Connection -** [Security](#security), [Network Reachability](#network-reachability) +- [Open Radars](#open-radars) +- [FAQ](#faq) +- [Credits](#credits) +- [Donations](#donations) +- [License](#license) + ## Features -- [x] Chainable Request / Response methods +- [x] Chainable Request / Response Methods - [x] URL / JSON / plist Parameter Encoding - [x] Upload File / Data / Stream / MultipartFormData -- [x] Download using Request or Resume data -- [x] Authentication with NSURLCredential +- [x] Download File using Request or Resume Data +- [x] Authentication with URLCredential - [x] HTTP Response Validation +- [x] Upload and Download Progress Closures with Progress +- [x] cURL Command Output +- [x] Dynamically Adapt and Retry Requests - [x] TLS Certificate and Public Key Pinning -- [x] Progress Closure & NSProgress -- [x] cURL Debug Output -- [x] Comprehensive Unit Test Coverage +- [x] Network Reachability +- [x] Comprehensive Unit and Integration Test Coverage - [x] [Complete Documentation](http://cocoadocs.org/docsets/Alamofire) +## Component Libraries + +In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. + +- [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. +- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `URLSession` instances not managed by Alamofire. + ## Requirements -- iOS 8.0+ / Mac OS X 10.9+ / watchOS 2 -- Xcode 7.0+ +- iOS 9.0+ / macOS 10.11+ / tvOS 9.0+ / watchOS 2.0+ +- Xcode 8.0+ +- Swift 3.0+ ## Migration Guides +- [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md) +- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) - [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) ## Communication @@ -41,28 +75,26 @@ Alamofire is an HTTP networking library written in Swift. ## Installation -> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).** -> -> Alamofire is no longer supported on iOS 7 due to the lack of support for frameworks. Without frameworks, running Travis-CI against iOS 7 would require a second duplicated test target. The separate test suite would need to import all the Swift files and the tests would need to be duplicated and re-written. This split would be too difficult to maintain to ensure the highest possible quality of the Alamofire ecosystem. - ### CocoaPods -[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. - -CocoaPods 0.38.2 is required to build Alamofire on the `swift-2.0` branch. It adds support for Xcode 7, Swift 2.0 and embedded frameworks. You can install it with the following command: +[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: ```bash $ gem install cocoapods ``` +> CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+. + To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' +platform :ios, '10.0' use_frameworks! -pod 'Alamofire', '~> 2.0' +target '' do + pod 'Alamofire', '~> 4.0' +end ``` Then, run the following command: @@ -73,7 +105,7 @@ $ pod install ### Carthage -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application. +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. You can install Carthage with [Homebrew](http://brew.sh/) using the following command: @@ -85,9 +117,11 @@ $ brew install carthage To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "Alamofire/Alamofire" ~> 2.0 +github "Alamofire/Alamofire" ~> 4.0 ``` +Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. + ### Manually If you prefer not to use either of the aforementioned dependency managers, you can integrate Alamofire into your project manually. @@ -116,11 +150,11 @@ $ git submodule add https://github.com/Alamofire/Alamofire.git - Click on the `+` button under the "Embedded Binaries" section. - You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - + > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. + - Select the top `Alamofire.framework` for iOS and the bottom one for OS X. - > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS` or `Alamofire OSX`. + > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`. - And that's it! @@ -135,100 +169,260 @@ $ git submodule add https://github.com/Alamofire/Alamofire.git ```swift import Alamofire -Alamofire.request(.GET, "http://httpbin.org/get") +Alamofire.request("https://httpbin.org/get") ``` ### Response Handling +Handling the `Response` of a `Request` made in Alamofire involves chaining a response handler onto the `Request`. + ```swift -Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"]) - .response { request, response, data, error in - print(request) - print(response) - print(error) - } +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 + + if let JSON = response.result.value { + print("JSON: \(JSON)") + } +} ``` +In the above example, the `responseJSON` handler is appended to the `Request` to be executed once the `Request` is complete. Rather than blocking execution to wait for a response from the server, a [callback](http://en.wikipedia.org/wiki/Callback_%28computer_programming%29) in the form of a closure is specified to handle the response once it's received. The result of a request is only available inside the scope of a response closure. Any execution contingent on the response or data received from the server must be done within a response closure. + > Networking in Alamofire is done _asynchronously_. Asynchronous programming may be a source of frustration to programmers unfamiliar with the concept, but there are [very good reasons](https://developer.apple.com/library/ios/qa/qa1693/_index.html) for doing it this way. -> Rather than blocking execution to wait for a response from the server, a [callback](http://en.wikipedia.org/wiki/Callback_%28computer_programming%29) is specified to handle the response once it's received. The result of a request is only available inside the scope of a response handler. Any execution contingent on the response or data received from the server must be done within a handler. +Alamofire contains five different response handlers by default including: + +```swift +// Response Handler - Unserialized Response +func response( + queue: DispatchQueue?, + completionHandler: @escaping (DefaultDownloadResponse) -> Void) + -> Self + +// Response Data Handler - Serialized into Data +func responseData( + queue: DispatchQueue?, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + +// Response String Handler - Serialized into String +func responseString( + queue: DispatchQueue?, + encoding: String.Encoding?, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + +// Response JSON Handler - Serialized into Any +func responseJSON( + queue: DispatchQueue?, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + +// Response PropertyList (plist) Handler - Serialized into Any +func responsePropertyList( + queue: DispatchQueue?, + completionHandler: @escaping (DataResponse) -> Void)) + -> Self +``` + +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. + +#### Response Handler + +The `response` handler does NOT evaluate any of the response data. It merely forwards on all information directly from the URL session delegate. It is the Alamofire equivalent of using `cURL` to execute a `Request`. + +```swift +Alamofire.request("https://httpbin.org/get").response { response in + print("Request: \(response.request)") + print("Response: \(response.response)") + print("Error: \(response.data)") -### Response Serialization + if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) { + print("Data: \(utf8Text)") + } +} +``` + +> We strongly encourage you to leverage the other response serializers taking advantage of `Response` and `Result` types. + +#### Response Data Handler + +The `responseData` handler uses the `responseDataSerializer` (the object that serializes the server data into some other type) to extract the `Data` returned by the server. If no errors occur and `Data` is returned, the response `Result` will be a `.success` and the `value` will be of type `Data`. + +```swift +Alamofire.request("https://httpbin.org/get").responseData { response in + debugPrint("All Response Info: \(response)") -**Built-in Response Methods** + if let data = response.result.value, let utf8Text = String(data: data, encoding: .utf8) { + print("Data: \(utf8Text)") + } +} +``` -- `response()` -- `responseString(encoding: NSStringEncoding)` -- `responseJSON(options: NSJSONReadingOptions)` -- `responsePropertyList(options: NSPropertyListReadOptions)` +#### Response String Handler -#### Response String Handler +The `responseString` handler uses the `responseStringSerializer` to convert the `Data` returned by the server into a `String` with the specified encoding. If no errors occur and the server data is successfully serialized into a `String`, the response `Result` will be a `.success` and the `value` will be of type `String`. ```swift -Alamofire.request(.GET, "http://httpbin.org/get") - .responseString { _, _, result in - print("Success: \(result.isSuccess)") - print("Response String: \(result.value)") - } +Alamofire.request("https://httpbin.org/get").responseString { response in + print("Success: \(response.result.isSuccess)") + print("Response String: \(response.result.value)") +} ``` -#### Response JSON Handler +> If no encoding is specified, Alamofire will use the text encoding specified in the `HTTPURLResponse` from the server. If the text encoding cannot be determined by the server response, it defaults to `.isoLatin1`. + +#### Response JSON Handler + +The `responseJSON` handler uses the `responseJSONSerializer` to convert the `Data` returned by the server into an `Any` type using the specified `JSONSerialization.ReadingOptions`. If no errors occur and the server data is successfully serialized into a JSON object, the response `Result` will be a `.success` and the `value` will be of type `Any`. ```swift -Alamofire.request(.GET, "http://httpbin.org/get") - .responseJSON { _, _, result in - print(result) - debugPrint(result) - } +Alamofire.request("https://httpbin.org/get").responseJSON { response in + debugPrint(response) + + if let json = response.result.value { + print("JSON: \(json)") + } +} ``` +> All JSON serialization is handled by the `JSONSerialization` API in the `Foundation` framework. + #### Chained Response Handlers Response handlers can even be chained: ```swift -Alamofire.request(.GET, "http://httpbin.org/get") - .responseString { _, _, result in - print("Response String: \(result.value)") - } - .responseJSON { _, _, result in - print("Response JSON: \(result.value)") - } +Alamofire.request("https://httpbin.org/get") + .responseString { response in + print("Response String: \(response.result.value)") + } + .responseJSON { response in + print("Response JSON: \(response.result.value)") + } ``` -### HTTP Methods +> It is important to note that using multiple response handlers on the same `Request` requires the server data to be serialized multiple times. Once for each response handler. + +#### Response Handler Queue + +Response handlers by default are executed on the main dispatch queue. However, a custom dispatch queue can be provided instead. + +```swift +let utilityQueue = DispatchQueue.global(qos: .utility) + +Alamofire.request("https://httpbin.org/get").responseJSON(queue: utilityQueue) { response in + print("Executing response handler on utility queue") +} +``` + +### Response Validation + +By default, Alamofire treats any completed request to be successful, regardless of the content of the response. Calling `validate` before a response handler causes an error to be generated if the response had an unacceptable status code or MIME type. + +#### Manual Validation + +```swift +Alamofire.request("https://httpbin.org/get") + .validate(statusCode: 200..<300) + .validate(contentType: ["application/json"]) + .response { response in + switch response.result { + case .success: + print("Validation Successful") + case .failure(let error): + print(error) + } + } +``` + +#### Automatic Validation -`Alamofire.Method` lists the HTTP methods defined in [RFC 7231 §4.3](http://tools.ietf.org/html/rfc7231#section-4.3): +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. ```swift -public enum Method: String { - case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT +Alamofire.request("https://httpbin.org/get").validate().responseJSON { response in + switch response.result { + case .success: + print("Validation Successful") + case .failure(let error): + print(error) + } } ``` -These values can be passed as the first argument of the `Alamofire.request` method: +### Response Caching + +Response Caching is handled on the system framework level by [`URLCache`](https://developer.apple.com/reference/foundation/urlcache). It provides a composite in-memory and on-disk cache and lets you manipulate the sizes of both the in-memory and on-disk portions. + +> By default, Alamofire leverages the shared `URLCache`. In order to customize it, see the [Session Manager Configurations](#session-manager-configurations) section. + +### HTTP Methods + +The `HTTPMethod` enumeration lists the HTTP methods defined in [RFC 7231 §4.3](http://tools.ietf.org/html/rfc7231#section-4.3): ```swift -Alamofire.request(.POST, "http://httpbin.org/post") +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} +``` -Alamofire.request(.PUT, "http://httpbin.org/put") +These values can be passed as the `method` argument to the `Alamofire.request` API: -Alamofire.request(.DELETE, "http://httpbin.org/delete") +```swift +Alamofire.request("https://httpbin.org/get") // method defaults to `.get` + +Alamofire.request("https://httpbin.org/post", method: .post) +Alamofire.request("https://httpbin.org/put", method: .put) +Alamofire.request("https://httpbin.org/delete", method: .delete) ``` -### Parameters +> The `Alamofire.request` method parameter defaults to `.get`. + +### Parameter Encoding + +Alamofire supports three types of parameter encoding including: `URL`, `JSON` and `PropertyList`. It can also support any custom encoding that conforms to the `ParameterEncoding` protocol. + +#### URL Encoding + +The `URLEncoding` type creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP body of the URL request. Whether the query string is set or appended to any existing URL query string or set as the HTTP body depends on the `Destination` of the encoding. The `Destination` enumeration has three cases: + +- `.methodDependent` - Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` requests and sets as the HTTP body for requests with any other HTTP method. +- `.queryString` - Sets or appends encoded query string result to existing query string. +- `.httpBody` - Sets encoded query string result as the HTTP body of the URL request. -#### GET Request With URL-Encoded Parameters +The `Content-Type` HTTP header field of an encoded request with HTTP body is set to `application/x-www-form-urlencoded; charset=utf-8`. Since there is no published specification for how to encode collection types, the convention of appending `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested dictionary values (`foo[bar]=baz`). + +##### GET Request With URL-Encoded Parameters ```swift -Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"]) -// http://httpbin.org/get?foo=bar +let parameters: Parameters = ["foo": "bar"] + +// All three of these calls are equivalent +Alamofire.request("https://httpbin.org/get", parameters: parameters) // encoding defaults to `URLEncoding.default` +Alamofire.request("https://httpbin.org/get", parameters: parameters, encoding: URLEncoding.default) +Alamofire.request("https://httpbin.org/get", parameters: parameters, encoding: URLEncoding(destination: .methodDependent)) + +// https://httpbin.org/get?foo=bar ``` -#### POST Request With URL-Encoded Parameters +##### POST Request With URL-Encoded Parameters ```swift -let parameters = [ +let parameters: Parameters = [ "foo": "bar", "baz": ["a", 1], "qux": [ @@ -238,722 +432,1120 @@ let parameters = [ ] ] -Alamofire.request(.POST, "http://httpbin.org/post", parameters: parameters) +// All three of these calls are equivalent +Alamofire.request("https://httpbin.org/post", parameters: parameters) +Alamofire.request("https://httpbin.org/post", parameters: parameters, encoding: URLEncoding.default) +Alamofire.request("https://httpbin.org/post", parameters: parameters, encoding: URLEncoding.httpBody) + // HTTP body: foo=bar&baz[]=a&baz[]=1&qux[x]=1&qux[y]=2&qux[z]=3 ``` -### Parameter Encoding +#### JSON Encoding + +The `JSONEncoding` type creates a JSON representation of the parameters object, which is set as the HTTP body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -Parameters can also be encoded as JSON, Property List, or any custom format, using the `ParameterEncoding` enum: +##### POST Request with JSON-Encoded Parameters ```swift -enum ParameterEncoding { - case URL - case URLEncodedInURL - case JSON - case PropertyList(format: NSPropertyListFormat, options: NSPropertyListWriteOptions) - case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) +let parameters: Parameters = [ + "foo": [1,2,3], + "bar": [ + "baz": "qux" + ] +] - func encode(request: NSURLRequest, parameters: [String: AnyObject]?) -> (NSURLRequest, NSError?) - { ... } -} +// Both calls are equivalent +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: JSONEncoding.default) +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: JSONEncoding(options: [])) + +// HTTP body: {"foo": [1, 2, 3], "bar": {"baz": "qux"}} ``` -- `URL`: A query string to be set as or appended to any existing URL query for `GET`, `HEAD`, and `DELETE` requests, or set as the body for requests with any other HTTP method. The `Content-Type` HTTP header field of an encoded request with HTTP body is set to `application/x-www-form-urlencoded`. _Since there is no published specification for how to encode collection types, Alamofire follows the convention of appending `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested dictionary values (`foo[bar]=baz`)._ -- `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same implementation as the `.URL` case, but always applies the encoded result to the URL. -- `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -- `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/x-plist`. -- `Custom`: Uses the associated closure value to construct a new request given an existing request and parameters. +#### Property List Encoding + +The `PropertyListEncoding` uses `PropertyListSerialization` to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/x-plist`. + +#### Custom Encoding -#### Manual Parameter Encoding of an NSURLRequest +In the event that the provided `ParameterEncoding` types do not meet your needs, you can create your own custom encoding. Here's a quick example of how you could build a custom `JSONStringArrayEncoding` type to encode a JSON string array onto a `Request`. ```swift -let URL = NSURL(string: "http://httpbin.org/get")! -var request = NSURLRequest(URL: URL) +struct JSONStringArrayEncoding: ParameterEncoding { + private let array: [String] -let parameters = ["foo": "bar"] -let encoding = Alamofire.ParameterEncoding.URL -(request, _) = encoding.encode(request, parameters: parameters) + init(array: [String]) { + self.array = array + } + + func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = urlRequest.urlRequest + + let data = try JSONSerialization.data(withJSONObject: array, options: []) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = data + + return urlRequest + } +} ``` -#### POST Request with JSON-encoded Parameters +#### Manual Parameter Encoding of a URLRequest + +The `ParameterEncoding` APIs can be used outside of making network requests. ```swift -let parameters = [ - "foo": [1,2,3], - "bar": [ - "baz": "qux" - ] -] +let url = URL(string: "https://httpbin.org/get")! +var urlRequest = URLRequest(url: url) -Alamofire.request(.POST, "http://httpbin.org/post", parameters: parameters, encoding: .JSON) -// HTTP body: {"foo": [1, 2, 3], "bar": {"baz": "qux"}} +let parameters: Parameters = ["foo": "bar"] +let encodedURLRequest = try URLEncoding.queryString.encode(urlRequest, with: parameters) ``` ### HTTP Headers Adding a custom HTTP header to a `Request` is supported directly in the global `request` method. This makes it easy to attach HTTP headers to a `Request` that can be constantly changing. -> For HTTP headers that do not change, it is recommended to set them on the `NSURLSessionConfiguration` so they are automatically applied to any `NSURLSessionTask` created by the underlying `NSURLSession`. - ```swift -let headers = [ +let headers: HTTPHeaders = [ "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", - "Content-Type": "application/x-www-form-urlencoded" + "Accept": "application/json" ] -Alamofire.request(.GET, "http://httpbin.org/get", headers: headers) - .responseJSON { _, _, result in - debugPrint(result) - } +Alamofire.request("https://httpbin.org/headers", headers: headers).responseJSON { response in + debugPrint(response) +} ``` -### Caching +> For HTTP headers that do not change, it is recommended to set them on the `URLSessionConfiguration` so they are automatically applied to any `URLSessionTask` created by the underlying `URLSession`. For more information, see the [Session Manager Configurations](#session-manager-configurations) section. + +The default Alamofire `SessionManager` provides a default set of headers for every `Request`. These include: -Caching is handled on the system framework level by [`NSURLCache`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache). +- `Accept-Encoding`, which defaults to `gzip;q=1.0, compress;q=0.5`, per [RFC 7230 §4.2.3](https://tools.ietf.org/html/rfc7230#section-4.2.3). +- `Accept-Language`, which defaults to up to the top 6 preferred languages on the system, formatted like `en;q=1.0`, per [RFC 7231 §5.3.5](https://tools.ietf.org/html/rfc7231#section-5.3.5). +- `User-Agent`, which contains versioning information about the current app. For example: `iOS Example/1.0 (com.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0`, per [RFC 7231 §5.5.3](https://tools.ietf.org/html/rfc7231#section-5.5.3). -### Uploading +If you need to customize these headers, a custom `URLSessionManagerConfiguration` should be created, the `defaultHTTPHeaders` property updated and the configuration applied to a new `SessionManager` instance. -**Supported Upload Types** +### Authentication -- File -- Data -- Stream -- MultipartFormData +Authentication is handled on the system framework level by [`URLCredential`](https://developer.apple.com/reference/foundation/nsurlcredential) and [`URLAuthenticationChallenge`](https://developer.apple.com/reference/foundation/urlauthenticationchallenge). -#### Uploading a File +**Supported Authentication Schemes** + +- [HTTP Basic](http://en.wikipedia.org/wiki/Basic_access_authentication) +- [HTTP Digest](http://en.wikipedia.org/wiki/Digest_access_authentication) +- [Kerberos](http://en.wikipedia.org/wiki/Kerberos_%28protocol%29) +- [NTLM](http://en.wikipedia.org/wiki/NT_LAN_Manager) + +#### HTTP Basic Authentication + +The `authenticate` method on a `Request` will automatically provide a `URLCredential` to a `URLAuthenticationChallenge` when appropriate: ```swift -let fileURL = NSBundle.mainBundle().URLForResource("Default", withExtension: "png") -Alamofire.upload(.POST, "http://httpbin.org/post", file: fileURL) +let user = "user" +let password = "password" + +Alamofire.request("https://httpbin.org/basic-auth/\(user)/\(password)") + .authenticate(user: user, password: password) + .responseJSON { response in + debugPrint(response) + } ``` -#### Uploading with Progress +Depending upon your server implementation, an `Authorization` header may also be appropriate: ```swift -Alamofire.upload(.POST, "http://httpbin.org/post", file: fileURL) - .progress { bytesWritten, totalBytesWritten, totalBytesExpectedToWrite in - print(totalBytesWritten) +let user = "user" +let password = "password" + +var headers: HTTPHeaders = [:] + +if let authorizationHeader = Request.authorizationHeader(user: user, password: password) { + headers[authorizationHeader.key] = authorizationHeader.value +} - // This closure is NOT called on the main queue for performance - // reasons. To update your ui, dispatch to the main queue. - dispatch_async(dispatch_get_main_queue) { - print("Total bytes written on main queue: \(totalBytesWritten)") - } - } - .responseJSON { request, response, result in - debugPrint(result) - } +Alamofire.request("https://httpbin.org/basic-auth/user/password", headers: headers) + .responseJSON { response in + debugPrint(response) + } ``` -#### Uploading MultipartFormData +#### Authentication with URLCredential ```swift -Alamofire.upload( - .POST, - URLString: "http://httpbin.org/post", - multipartFormData: { multipartFormData in - multipartFormData.appendBodyPart(fileURL: unicornImageURL, name: "unicorn") - multipartFormData.appendBodyPart(fileURL: rainbowImageURL, name: "rainbow") - }, - encodingCompletion: { encodingResult in - switch encodingResult { - case .Success(let upload, _, _): - upload.responseJSON { request, response, result in - debugPrint(result) - } - case .Failure(let encodingError): - print(encodingError) - } +let user = "user" +let password = "password" + +let credential = URLCredential(user: user, password: password, persistence: .forSession) + +Alamofire.request("https://httpbin.org/basic-auth/\(user)/\(password)") + .authenticate(usingCredential: credential) + .responseJSON { response in + debugPrint(response) } -) ``` -### Downloading +> It is important to note that when using a `URLCredential` for authentication, the underlying `URLSession` will actually end up making two requests if a challenge is issued by the server. The first request will not include the credential which "may" trigger a challenge from the server. The challenge is then received by Alamofire, the credential is appended and the request is retried by the underlying `URLSession`. + +### Downloading Data to a File + +Requests made in Alamofire that fetch data from a server can download the data in-memory or on-disk. The `Alamofire.request` APIs used in all the examples so far always downloads the server data in-memory. This is great for smaller payloads because it's more efficient, but really bad for larger payloads because the download could run your entire application out-of-memory. Because of this, you can also use the `Alamofire.download` APIs to download the server data to a temporary file on-disk. + +```swift +Alamofire.download("https://httpbin.org/image/png").responseData { response in + if let data = response.result.value { + let image = UIImage(data: data) + } +} +``` + +> The `Alamofire.download` APIs should also be used if you need to download data while your app is in the background. For more information, please see the [Session Manager Configurations](#session-manager-configurations) section. -**Supported Download Types** +#### Download File Destination -- Request -- Resume Data +You can also provide a `DownloadFileDestination` closure to move the file from the temporary directory to a final destination. Before the temporary file is actually moved to the `destinationURL`, the `DownloadOptions` specified in the closure will be executed. The two currently supported `DownloadOptions` are: -#### Downloading a File +- `.createIntermediateDirectories` - Creates intermediate directories for the destination URL if specified. +- `.removePreviousFile` - Removes a previous file from the destination URL if specified. ```swift -Alamofire.download(.GET, "http://httpbin.org/stream/100") { temporaryURL, response in - let fileManager = NSFileManager.defaultManager() - if let directoryURL = fileManager.URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0] as? NSURL { - let pathComponent = response.suggestedFilename - return directoryURL.URLByAppendingPathComponent(pathComponent!) - } +let destination: DownloadRequest.DownloadFileDestination = { _, _ in + let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] + let fileURL = documentsURL.appendPathComponent("pig.png") + + return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) +} + +Alamofire.download(urlString, to: destination).response { response in + print(response) - return temporaryURL + if response.result.isSuccess, let imagePath = response.destinationURL?.path { + let image = UIImage(contentsOfFile: imagePath) + } } ``` -#### Using the Default Download Destination +You can also use the suggested download destination API. ```swift -let destination = Alamofire.Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask) -Alamofire.download(.GET, "http://httpbin.org/stream/100", destination: destination) +let destination = DownloadRequest.suggestedDownloadDestination(directory: .documentDirectory) +Alamofire.download("https://httpbin.org/image/png", to: destination) ``` -#### Downloading a File w/Progress +#### Download Progress -```swift -Alamofire.download(.GET, "http://httpbin.org/stream/100", destination: destination) - .progress { bytesRead, totalBytesRead, totalBytesExpectedToRead in - print(totalBytesRead) +Many times it can be helpful to report download progress to the user. Any `DownloadRequest` can report download progress using the `downloadProgress` API. - // This closure is NOT called on the main queue for performance - // reasons. To update your ui, dispatch to the main queue. - dispatch_async(dispatch_get_main_queue) { - print("Total bytes read on main queue: \(totalBytesRead)") - } - } - .response { request, response, _, error in - print(response) - } +```swift +Alamofire.download("https://httpbin.org/image/png") + .downloadProgress { progress in + print("Download Progress: \(progress.fractionCompleted)") + } + .responseData { response in + if let data = response.result.value { + let image = UIImage(data: data) + } + } ``` -#### Accessing Resume Data for Failed Downloads +The `downloadProgress` API also takes a `queue` parameter which defines which `DispatchQueue` the download progress closure should be called on. ```swift -Alamofire.download(.GET, "http://httpbin.org/stream/100", destination: destination) - .response { request, response, data, error in - if let - data = data, - resumeDataString = NSString(data: data, encoding: NSUTF8StringEncoding) - { - print("Resume Data: \(resumeDataString)") - } else { - print("Resume Data was empty") - } - } +let utilityQueue = DispatchQueue.global(qos: .utility) + +Alamofire.download("https://httpbin.org/image/png") + .downloadProgress(queue: utilityQueue) { progress in + print("Download Progress: \(progress.fractionCompleted)") + } + .responseData { response in + if let data = response.result.value { + let image = UIImage(data: data) + } + } ``` -> The `data` parameter is automatically populated with the `resumeData` if available. +#### Resuming a Download + +If a `DownloadRequest` is cancelled or interrupted, the underlying URL session may generate resume data for the active `DownloadRequest`. If this happens, the resume data can be re-used to restart the `DownloadRequest` where it left off. The resume data can be accessed through the download response, then reused when trying to restart the request. ```swift -let download = Alamofire.download(.GET, "http://httpbin.org/stream/100", destination: destination) -download.response { request, response, data, error in - if let - resumeData = download.resumeData, - resumeDataString = NSString(data: data, encoding: NSUTF8StringEncoding) - { - print("Resume Data: \(resumeDataString)") - } else { - print("Resume Data was empty") +class ImageRequestor { + private var resumeData: Data? + private var image: UIImage? + + func fetchImage(completion: (UIImage?) -> Void) { + 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") + + return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) + } + + let request: DownloadRequest + + if let resumeData = resumeData { + 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 + } + } } } ``` -### Authentication +### Uploading Data to a Server -Authentication is handled on the system framework level by [`NSURLCredential` and `NSURLAuthenticationChallenge`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html). +When sending relatively small amounts of data to a server using JSON or URL encoded parameters, the `Alamofire.request` APIs are usually sufficient. If you need to send much larger amounts of data from a file URL or an `InputStream`, then the `Alamofire.upload` APIs are what you want to use. -**Supported Authentication Schemes** +> The `Alamofire.upload` APIs should also be used if you need to upload data while your app is in the background. For more information, please see the [Session Manager Configurations](#session-manager-configurations) section. -- [HTTP Basic](http://en.wikipedia.org/wiki/Basic_access_authentication) -- [HTTP Digest](http://en.wikipedia.org/wiki/Digest_access_authentication) -- [Kerberos](http://en.wikipedia.org/wiki/Kerberos_%28protocol%29) -- [NTLM](http://en.wikipedia.org/wiki/NT_LAN_Manager) +#### Uploading Data -#### HTTP Basic Authentication +```swift +let imageData = UIPNGRepresentation(image)! -The `authenticate` method on a `Request` will automatically provide an `NSURLCredential` to an `NSURLAuthenticationChallenge` when appropriate: +Alamofire.upload(imageData, to: "https://httpbin.org/post").responseJSON { response in + debugPrint(response) +} +``` + +#### Uploading a File ```swift -let user = "user" -let password = "password" +let fileURL = Bundle.main.url(forResource: "video", withExtension: "mov") -Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") - .authenticate(user: user, password: password) - .response { request, response, _, error in - print(response) - } +Alamofire.upload(fileURL, to: "https://httpbin.org/post").responseJSON { response in + debugPrint(response) +} ``` -Depending upon your server implementation, an `Authorization` header may also be appropriate: +#### Uploading Multipart Form Data ```swift -let user = "user" -let password = "password" +Alamofire.upload( + multipartFormData: { multipartFormData in + multipartFormData.append(unicornImageURL, withName: "unicorn") + multipartFormData.append(rainbowImageURL, withName: "rainbow") + }, + to: "https://httpbin.org/post", + encodingCompletion: { encodingResult in + switch encodingResult { + case .success(let upload, _, _): + upload.responseJSON { response in + debugPrint(response) + } + case .failure(let encodingError): + print(encodingError) + } + } +) +``` -let credentialData = "\(user):\(password)".dataUsingEncoding(NSUTF8StringEncoding)! -let base64Credentials = credentialData.base64EncodedStringWithOptions(nil) +#### Upload Progress -let headers = ["Authorization": "Basic \(base64Credentials)"] +While your user is waiting for their upload to complete, sometimes it can be handy to show the progress of the upload to the user. Any `UploadRequest` can report both upload progress and download progress of the response data using the `uploadProgress` and `downloadProgress` APIs. + +```swift +let fileURL = Bundle.main.url(forResource: "video", withExtension: "mov") -Alamofire.request(.GET, "http://httpbin.org/basic-auth/user/password", headers: headers) - .responseJSON { _, _, result in - print(result) - } +Alamofire.upload(fileURL, to: "https://httpbin.org/post") + .uploadProgress { progress in // main queue by default + print("Upload Progress: \(progress.fractionCompleted)") + } + .downloadProgress { progress in // main queue by default + print("Download Progress: \(progress.fractionCompleted)") + } + .responseJSON { response in + debugPrint(response) + } ``` -#### Authentication with NSURLCredential +### Statistical Metrics -```swift -let user = "user" -let password = "password" +#### Timeline -let credential = NSURLCredential(user: user, password: password, persistence: .ForSession) +Alamofire collects timings throughout the lifecycle of a `Request` and creates a `Timeline` object exposed as a property on all response types. -Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") - .authenticate(usingCredential: credential) - .response { request, response, _, error in - print(response) - } +```swift +Alamofire.request("https://httpbin.org/get").responseJSON { response in + print(response.timeline) +} ``` -### Validation +The above reports the following `Timeline` info: -By default, Alamofire treats any completed request to be successful, regardless of the content of the response. Calling `validate` before a response handler causes an error to be generated if the response had an unacceptable status code or MIME type. +- `Latency`: 0.428 seconds +- `Request Duration`: 0.428 seconds +- `Serialization Duration`: 0.001 seconds +- `Total Duration`: 0.429 seconds -#### Manual Validation +#### URL Session Task Metrics + +In iOS and tvOS 10 and macOS 10.12, Apple introduced the new [URLSessionTaskMetrics](https://developer.apple.com/reference/foundation/urlsessiontaskmetrics) APIs. The task metrics encapsulate some fantastic statistical information about the request and response execution. The API is very similar to the `Timeline`, but provides many more statistics that Alamofire doesn't have access to compute. The metrics can be accessed through any response type. ```swift -Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"]) - .validate(statusCode: 200..<300) - .validate(contentType: ["application/json"]) - .response { _, _, _, error in - print(error) - } +Alamofire.request("https://httpbin.org/get").responseJSON { response in + print(response.metrics) +} ``` -#### 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. +It's important to note that these APIs are only available on iOS and tvOS 10 and macOS 10.12. Therefore, depending on your deployment target, you may need to use these inside availability checks: ```swift -Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .responseJSON { _, _, result in - switch result { - case .Success: - print("Validation Successful") - case .Failure(_, let error): - print(error) - } - } +Alamofire.request("https://httpbin.org/get").responseJSON { response in + if #available(iOS 10.0. *) { + print(response.metrics) + } +} ``` -### Printable +### cURL Command Output + +Debugging platform issues can be frustrating. Thankfully, Alamofire `Request` objects conform to both the `CustomStringConvertible` and `CustomDebugStringConvertible` protocols to provide some VERY helpful debugging tools. + +#### CustomStringConvertible ```swift -let request = Alamofire.request(.GET, "http://httpbin.org/ip") +let request = Alamofire.request("https://httpbin.org/ip") print(request) -// GET http://httpbin.org/ip (200) +// GET https://httpbin.org/ip (200) ``` -### DebugPrintable +#### CustomDebugStringConvertible ```swift -let request = Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"]) - +let request = Alamofire.request("https://httpbin.org/get", parameters: ["foo": "bar"]) debugPrint(request) ``` -#### Output (cURL) +Outputs: ```bash $ curl -i \ - -H "User-Agent: Alamofire" \ - -H "Accept-Encoding: Accept-Encoding: gzip;q=1.0,compress;q=0.5" \ + -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" \ - "http://httpbin.org/get?foo=bar" + "https://httpbin.org/get?foo=bar" ``` --- ## Advanced Usage -> Alamofire is built on `NSURLSession` and the Foundation URL Loading System. To make the most of -this framework, it is recommended that you be familiar with the concepts and capabilities of the underlying networking stack. +Alamofire is built on `URLSession` and the Foundation URL Loading System. To make the most of this framework, it is recommended that you be familiar with the concepts and capabilities of the underlying networking stack. **Recommended Reading** - [URL Loading System Programming Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html) -- [NSURLSession Class Reference](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/Introduction/Introduction.html#//apple_ref/occ/cl/NSURLSession) -- [NSURLCache Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache) -- [NSURLAuthenticationChallenge Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html) +- [URLSession Class Reference](https://developer.apple.com/reference/foundation/nsurlsession) +- [URLCache Class Reference](https://developer.apple.com/reference/foundation/urlcache) +- [URLAuthenticationChallenge Class Reference](https://developer.apple.com/reference/foundation/urlauthenticationchallenge) -### Manager +### Session Manager -Top-level convenience methods like `Alamofire.request` use a shared instance of `Alamofire.Manager`, which is configured with the default `NSURLSessionConfiguration`. +Top-level convenience methods like `Alamofire.request` use a default instance of `Alamofire.SessionManager`, which is configured with the default `URLSessionConfiguration`. As such, the following two statements are equivalent: ```swift -Alamofire.request(.GET, "http://httpbin.org/get") +Alamofire.request("https://httpbin.org/get") ``` ```swift -let manager = Alamofire.Manager.sharedInstance -manager.request(NSURLRequest(URL: NSURL(string: "http://httpbin.org/get"))) +let sessionManager = Alamofire.SessionManager.default +sessionManager.request("https://httpbin.org/get") ``` -Applications can create managers for background and ephemeral sessions, as well as new managers that customize the default session configuration, such as for default headers (`HTTPAdditionalHeaders`) or timeout interval (`timeoutIntervalForRequest`). +Applications can create session managers for background and ephemeral sessions, as well as new managers that customize the default session configuration, such as for default headers (`httpAdditionalHeaders`) or timeout interval (`timeoutIntervalForRequest`). -#### Creating a Manager with Default Configuration +#### Creating a Session Manager with Default Configuration ```swift -let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() -let manager = Alamofire.Manager(configuration: configuration) +let configuration = URLSessionConfiguration.default +let sessionManager = Alamofire.SessionManager(configuration: configuration) ``` -#### Creating a Manager with Background Configuration +#### Creating a Session Manager with Background Configuration ```swift -let configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier("com.example.app.background") -let manager = Alamofire.Manager(configuration: configuration) +let configuration = URLSessionConfiguration.background(withIdentifier: "com.example.app.background") +let sessionManager = Alamofire.SessionManager(configuration: configuration) ``` -#### Creating a Manager with Ephemeral Configuration +#### Creating a Session Manager with Ephemeral Configuration ```swift -let configuration = NSURLSessionConfiguration.ephemeralSessionConfiguration() -let manager = Alamofire.Manager(configuration: configuration) +let configuration = URLSessionConfiguration.ephemeral +let sessionManager = Alamofire.SessionManager(configuration: configuration) ``` -#### Modifying Session Configuration +#### Modifying the Session Configuration ```swift -var defaultHeaders = Alamofire.Manager.sharedInstance.session.configuration.HTTPAdditionalHeaders ?? [:] +var defaultHeaders = Alamofire.SessionManager.default.defaultHTTPHeaders defaultHeaders["DNT"] = "1 (Do Not Track Enabled)" -let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() -configuration.HTTPAdditionalHeaders = defaultHeaders +let configuration = URLSessionConfiguration.default +configuration.httpAdditionalHeaders = defaultHeaders -let manager = Alamofire.Manager(configuration: configuration) +let sessionManager = Alamofire.SessionManager(configuration: configuration) ``` -> This is **not** recommended for `Authorization` or `Content-Type` headers. Instead, use `URLRequestConvertible` and `ParameterEncoding`, respectively. +> This is **not** recommended for `Authorization` or `Content-Type` headers. Instead, use the `headers` parameter in the top-level `Alamofire.request` APIs, `URLRequestConvertible` and `ParameterEncoding`, respectively. -### Request +### Session Delegate -The result of a `request`, `upload`, or `download` method is an instance of `Alamofire.Request`. A request is always created using a constructor method from an owning manager, and never initialized directly. +By default, an Alamofire `SessionManager` instance creates a `SessionDelegate` object to handle all the various types of delegate callbacks that are generated by the underlying `URLSession`. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons. -Methods like `authenticate`, `validate`, and `response` return the caller in order to facilitate chaining. +#### Override Closures -Requests can be suspended, resumed, and cancelled: +The first way to customize the `SessionDelegate` behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching `SessionDelegate` API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available: -- `suspend()`: Suspends the underlying task and dispatch queue -- `resume()`: Resumes the underlying task and dispatch queue. If the owning manager does not have `startRequestsImmediately` set to `true`, the request must call `resume()` in order to start. -- `cancel()`: Cancels the underlying task, producing an error that is passed to any registered response handlers. +```swift +/// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`. +open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? -### Response Serialization +/// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. +open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? -#### Creating a Custom Response Serializer +/// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`. +open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? -Alamofire provides built-in response serialization for strings, JSON, and property lists, but others can be added in extensions on `Alamofire.Request`. +/// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`. +open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? +``` -For example, here's how a response handler using [Ono](https://github.com/mattt/Ono) might be implemented: +The following is a short example of how to use the `taskWillPerformHTTPRedirection` to avoid following redirects to any `apple.com` domains. ```swift -extension Request { - public static func XMLResponseSerializer() -> GenericResponseSerializer { - return GenericResponseSerializer { request, response, data in - guard let validData = data else { - let failureReason = "Data could not be serialized. Input data was nil." - let error = Error.errorWithCode(.DataSerializationFailed, failureReason: failureReason) - return .Failure(data, error) - } +let sessionManager = Alamofire.SessionManager(configuration: URLSessionConfiguration.default) +let delegate: Alamofire.SessionDelegate = sessionManager.delegate - do { - let XML = try ONOXMLDocument(data: validData) - return .Success(XML) - } catch { - return .Failure(data, error as NSError) - } - } - } +delegate.taskWillPerformHTTPRedirection = { session, task, response, request in + var finalRequest = request - public func responseXMLDocument(completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result) -> Void) -> Self { - return response(responseSerializer: Request.XMLResponseSerializer(), completionHandler: completionHandler) + if + let originalRequest = task.originalRequest, + let urlString = originalRequest.url?.urlString, + urlString.contains("apple.com") + { + finalRequest = originalRequest } + + return finalRequest } ``` -#### Generic Response Object Serialization +#### Subclassing -Generics can be used to provide automatic, type-safe response object serialization. +Another way to override the default implementation of the `SessionDelegate` is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here's a quick example of subclassing the `SessionDelegate` and logging a message when a redirect occurs. ```swift -public protocol ResponseObjectSerializable { - init?(response: NSHTTPURLResponse, representation: AnyObject) +class LoggingSessionDelegate: SessionDelegate { + override func urlSession( + _ session: URLSession, + task: URLSessionTask, + willPerformHTTPRedirection response: HTTPURLResponse, + newRequest request: URLRequest, + completionHandler: @escaping (URLRequest?) -> Void) + { + print("URLSession will perform HTTP redirection to request: \(request)") + + super.urlSession( + session, + task: task, + willPerformHTTPRedirection: response, + newRequest: request, + completionHandler: completionHandler + ) + } } +``` -extension Request { - public func responseObject(completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result) -> Void) -> Self { - let responseSerializer = GenericResponseSerializer { request, response, data in - let JSONResponseSerializer = Request.JSONResponseSerializer(options: .AllowFragments) - let result = JSONResponseSerializer.serializeResponse(request, response, data) - - switch result { - case .Success(let value): - if let - response = response, - responseObject = T(response: response, representation: value) - { - return .Success(responseObject) - } else { - let failureReason = "JSON could not be serialized into response object: \(value)" - let error = Error.errorWithCode(.JSONSerializationFailed, failureReason: failureReason) - return .Failure(data, error) - } - case .Failure(let data, let error): - return .Failure(data, error) - } - } +Generally speaking, either the default implementation or the override closures should provide the necessary functionality required. Subclassing should only be used as a last resort. - return response(responseSerializer: responseSerializer, completionHandler: completionHandler) - } -} +> It is important to keep in mind that the `subdelegates` are initialized and destroyed in the default implementation. Be careful when subclassing to not introduce memory leaks. + +### Request + +The result of a `request`, `download`, `upload` or `stream` methods are a `DataRequest`, `DownloadRequest`, `UploadRequest` and `StreamRequest` which all inherit from `Request`. All `Request` instances are always created by an owning session manager, and never initialized directly. + +Each subclass has specialized methods such as `authenticate`, `validate`, `responseJSON` and `uploadProgress` that each return the caller instance in order to facilitate method chaining. + +Requests can be suspended, resumed and cancelled: + +- `suspend()`: Suspends the underlying task and dispatch queue. +- `resume()`: Resumes the underlying task and dispatch queue. If the owning manager does not have `startRequestsImmediately` set to `true`, the request must call `resume()` in order to start. +- `cancel()`: Cancels the underlying task, producing an error that is passed to any registered response handlers. + +### Routing Requests + +As apps grow in size, it's important to adopt common patterns as you build out your network stack. An important part of that design is how to route your requests. The Alamofire `URLConvertible` and `URLRequestConvertible` protocols along with the `Router` design pattern are here to help. + +#### URLConvertible + +Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct URL requests internally. `String`, `URL`, and `URLComponents` conform to `URLConvertible` by default, allowing any of them to be passed as `url` parameters to the `request`, `upload`, and `download` methods: + +```swift +let urlString = "https://httpbin.org/post" +Alamofire.request(urlString, method: .post) + +let url = URL(string: urlString)! +Alamofire.request(url, method: .post) + +let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: true) +Alamofire.request(.post, URLComponents) ``` +Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLConvertible` as a convenient way to map domain-specific models to server resources. + +##### Type-Safe Routing + ```swift -final class User: ResponseObjectSerializable { - let username: String - let name: String +extension User: URLConvertible { + static let baseURLString = "https://example.com" - init?(response: NSHTTPURLResponse, representation: AnyObject) { - self.username = response.URL!.lastPathComponent! - self.name = representation.valueForKeyPath("name") as! String + func asURL() throws -> URL { + let urlString = User.baseURLString + "/users/\(username)/" + return try urlString.asURL() } } ``` ```swift -Alamofire.request(.GET, "http://example.com/users/mattt") - .responseObject { (_, _, result: Result) in - debugPrint(result) - } +let user = User(username: "mattt") +Alamofire.request(user) // https://example.com/users/mattt ``` -The same approach can also be used to handle endpoints that return a representation of a collection of objects: +#### URLRequestConvertible + +Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. `URLRequest` conforms to `URLRequestConvertible` by default, allowing it to be passed into `request`, `upload`, and `download` methods directly (this is the recommended way to specify custom HTTP body for individual requests): ```swift -public protocol ResponseCollectionSerializable { - static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [Self] +let url = URL(string: "https://httpbin.org/post")! +var urlRequest = URLRequest(url: url) +urlRequest.httpMethod = "POST" + +let parameters = ["foo": "bar"] + +do { + urlRequest.httpBody = try JSONSerialization.data(withJSONObject: parameters, options: []) +} catch { + // No-op } -extension Alamofire.Request { - public func responseCollection(completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result<[T]>) -> Void) -> Self { - let responseSerializer = GenericResponseSerializer<[T]> { request, response, data in - let JSONSerializer = Request.JSONResponseSerializer(options: .AllowFragments) - let result = JSONSerializer.serializeResponse(request, response, data) +urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - switch result { - case .Success(let value): - if let response = response { - return .Success(T.collection(response: response, representation: value)) - } else { - let failureReason = "Response collection could not be serialized due to nil response" - let error = Error.errorWithCode(.JSONSerializationFailed, failureReason: failureReason) - return .Failure(data, error) - } - case .Failure(let data, let error): - return .Failure(data, error) +Alamofire.request(urlRequest) +``` + +Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLRequestConvertible` as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state. + +##### API Parameter Abstraction + +```swift +enum Router: URLRequestConvertible { + case search(query: String, page: Int) + + static let baseURLString = "https://example.com" + static let perPage = 50 + + // MARK: URLRequestConvertible + + func asURLRequest() throws -> URLRequest { + let result: (path: String, parameters: Parameters) = { + switch self { + case let .search(query, page) where page > 0: + return ("/search", ["q": query, "offset": Router.perPage * page]) + case let .search(query, _): + return ("/search", ["q": query]) } - } + }() - return response(responseSerializer: responseSerializer, completionHandler: completionHandler) + let url = try Router.baseURLString.asURL() + let urlRequest = URLRequest(url: url.appendingPathComponent(result.path)) + + return try URLEncoding.default.encode(urlRequest, with: result.parameters) } } ``` ```swift -final class User: ResponseObjectSerializable, ResponseCollectionSerializable { - let username: String - let name: String +Alamofire.request(Router.search(query: "foo bar", page: 1)) // ?q=foo%20bar&offset=50 +``` + +##### CRUD & Authorization + +```swift +import Alamofire + +enum Router: URLRequestConvertible { + case createUser(parameters: Parameters) + case readUser(username: String) + case updateUser(username: String, parameters: Parameters) + case destroyUser(username: String) + + static let baseURLString = "https://example.com" - init?(response: NSHTTPURLResponse, representation: AnyObject) { - self.username = response.URL!.lastPathComponent! - self.name = representation.valueForKeyPath("name") as! String + var method: HTTPMethod { + switch self { + case .createUser: + return .post + case .readUser: + return .get + case .updateUser: + return .put + case .destroyUser: + return .delete + } + } + + var path: String { + switch self { + case .createUser: + return "/users" + case .readUser(let username): + return "/users/\(username)" + case .updateUser(let username, _): + return "/users/\(username)" + case .destroyUser(let username): + return "/users/\(username)" + } } - static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [User] { - var users: [User] = [] + // MARK: URLRequestConvertible + + func asURLRequest() throws -> URLRequest { + let url = try Router.baseURLString.asURL() - if let representation = representation as? [[String: AnyObject]] { - for userRepresentation in representation { - if let user = User(response: response, representation: userRepresentation) { - users.append(user) - } - } + var urlRequest = URLRequest(url: url.appendingPathComponent(path)) + urlRequest.httpMethod = method.rawValue + + switch self { + case .createUser(let parameters): + urlRequest = try URLEncoding.default.encode(urlRequest, with: parameters) + case .updateUser(_, let parameters): + urlRequest = try URLEncoding.default.encode(urlRequest, with: parameters) + default: + break } - return users + return urlRequest } } ``` ```swift -Alamofire.request(.GET, "http://example.com/users") - .responseCollection { (_, _, result: Result<[User]>) in - debugPrint(result) - } +Alamofire.request(Router.readUser("mattt")) // GET /users/mattt ``` -### URLStringConvertible +### Adapting and Retrying Requests + +Most web services these days are behind some sort of authentication system. One of the more common ones today is OAuth. This generally involves generating an access token authorizing your application or user to call the various supported web services. While creating these initial access tokens can be laborsome, it can be even more complicated when your access token expires and you need to fetch a new one. There are many thread-safety issues that need to be considered. + +The `RequestAdapter` and `RequestRetrier` protocols were created to make it much easier to create a thread-safe authentication system for a specific set of web services. -Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to construct URL requests. `NSString`, `NSURL`, `NSURLComponents`, and `NSURLRequest` conform to `URLStringConvertible` by default, allowing any of them to be passed as `URLString` parameters to the `request`, `upload`, and `download` methods: +#### RequestAdapter + +The `RequestAdapter` protocol allows each `Request` made on a `SessionManager` to be inspected and adapted before being created. One very specific way to use an adapter is to append an `Authorization` header to requests behind a certain type of authentication. ```swift -let string = NSString(string: "http://httpbin.org/post") -Alamofire.request(.POST, string) +class AccessTokenAdapter: RequestAdapter { + private let accessToken: String + + init(accessToken: String) { + self.accessToken = accessToken + } + + func adapt(_ urlRequest: URLRequest) throws -> URLRequest { + var urlRequest = urlRequest + + if urlRequest.urlString.hasPrefix("https://httpbin.org") { + urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") + } -let URL = NSURL(string: string)! -Alamofire.request(.POST, URL) + return urlRequest + } +} +``` -let URLRequest = NSURLRequest(URL: URL) -Alamofire.request(.POST, URLRequest) // overrides `HTTPMethod` of `URLRequest` +```swift +let sessionManager = SessionManager() +sessionManager.adapter = AccessTokenAdapter(accessToken: "1234") -let URLComponents = NSURLComponents(URL: URL, resolvingAgainstBaseURL: true) -Alamofire.request(.POST, URLComponents) +sessionManager.request("https://httpbin.org/get") ``` -Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLStringConvertible` as a convenient way to map domain-specific models to server resources. +#### RequestRetrier + +The `RequestRetrier` protocol allows a `Request` that encountered an `Error` while being executed to be retried. When using both the `RequestAdapter` and `RequestRetrier` protocols together, you can create credential refresh systems for OAuth1, OAuth2, Basic Auth and even exponential backoff retry policies. The possibilities are endless. Here's an example of how you could implement a refresh flow for OAuth2 access tokens. -#### Type-Safe Routing +> **DISCLAIMER:** This is **NOT** a global `OAuth2` solution. It is merely an example demonstrating how one could use the `RequestAdapter` in conjunction with the `RequestRetrier` to create a thread-safe refresh system. + +> To reiterate, **do NOT copy** this sample code and drop it into a production application. This is merely an example. Each authentication system must be tailored to a particular platform and authentication type. ```swift -extension User: URLStringConvertible { - static let baseURLString = "http://example.com" +class OAuth2Handler: RequestAdapter, RequestRetrier { + private typealias RefreshCompletion = (_ succeeded: Bool, _ accessToken: String?, _ refreshToken: String?) -> Void + + private let sessionManager: SessionManager = { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders + + return SessionManager(configuration: configuration) + }() + + private let lock = NSLock() - var URLString: String { - return User.baseURLString + "/users/\(username)/" + private var clientID: String + private var baseURLString: String + private var accessToken: String + private var refreshToken: String + + private var isRefreshing = false + private var requestsToRetry: [RequestRetryCompletion] = [] + + // MARK: - Initialization + + public init(clientID: String, baseURLString: String, accessToken: String, refreshToken: String) { + self.clientID = clientID + self.baseURLString = baseURLString + self.accessToken = accessToken + self.refreshToken = refreshToken + } + + // MARK: - RequestAdapter + + func adapt(_ urlRequest: URLRequest) throws -> URLRequest { + if let url = urlRequest.url, url.urlString.hasPrefix(baseURLString) { + var urlRequest = urlRequest + urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") + return urlRequest + } + + return urlRequest + } + + // MARK: - RequestRetrier + + func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) { + lock.lock() ; defer { lock.unlock() } + + if let response = request.task.response as? HTTPURLResponse, response.statusCode == 401 { + requestsToRetry.append(completion) + + if !isRefreshing { + refreshTokens { [weak self] succeeded, accessToken, refreshToken in + guard let strongSelf = self else { return } + + strongSelf.lock.lock() ; defer { strongSelf.lock.unlock() } + + if let accessToken = accessToken, let refreshToken = refreshToken { + strongSelf.accessToken = accessToken + strongSelf.refreshToken = refreshToken + } + + strongSelf.requestsToRetry.forEach { $0(succeeded, 0.0) } + strongSelf.requestsToRetry.removeAll() + } + } + } else { + completion(false, 0.0) + } + } + + // MARK: - Private - Refresh Tokens + + private func refreshTokens(completion: @escaping RefreshCompletion) { + guard !isRefreshing else { return } + + isRefreshing = true + + let urlString = "\(baseURLString)/oauth2/token" + + let parameters: [String: Any] = [ + "access_token": accessToken, + "refresh_token": refreshToken, + "client_id": clientID, + "grant_type": "refresh_token" + ] + + sessionManager.request(urlString, method: .post, parameters: parameters, encoding: JSONEncoding.default) + .responseJSON { [weak self] response in + guard let strongSelf = self else { return } + + if let json = response.result.value as? [String: String] { + completion(true, json["access_token"], json["refresh_token"]) + } else { + completion(false, nil, nil) + } + + strongSelf.isRefreshing = false + } } } ``` ```swift -let user = User(username: "mattt") -Alamofire.request(.GET, user) // http://example.com/users/mattt +let baseURLString = "https://some.domain-behind-oauth2.com" + +let oauthHandler = OAuth2Handler( + clientID: "12345678", + baseURLString: baseURLString, + accessToken: "abcd1234", + refreshToken: "ef56789a" +) + +let sessionManager = SessionManager() +sessionManager.adapter = oauthHandler +sessionManager.retrier = oauthHandler + +let urlString = "\(baseURLString)/some/endpoint" + +sessionManager.request(urlString).validate().responseJSON { response in + debugPrint(response) +} ``` -### URLRequestConvertible +Once the `OAuth2Handler` is applied as both the `adapter` and `retrier` for the `SessionManager`, it will handle an invalid access token error by automatically refreshing the access token and retrying all failed requests in the same order they failed. -Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. `NSURLRequest` conforms to `URLRequestConvertible` by default, allowing it to be passed into `request`, `upload`, and `download` methods directly (this is the recommended way to specify custom HTTP body for individual requests): +> If you needed them to execute in the same order they were created, you could sort them by their task identifiers. -```swift -let URL = NSURL(string: "http://httpbin.org/post")! -let mutableURLRequest = NSMutableURLRequest(URL: URL) -mutableURLRequest.HTTPMethod = "POST" +The example above only checks for a `401` response code which is not nearly robust enough, but does demonstrate how one could check for an invalid access token error. In a production application, one would want to check the `realm` and most likely the `www-authenticate` header response although it depends on the OAuth2 implementation. -let parameters = ["foo": "bar"] +Another important note is that this authentication system could be shared between multiple session managers. For example, you may need to use both a `default` and `ephemeral` session configuration for the same set of web services. The example above allows the same `oauthHandler` instance to be shared across multiple session managers to manage the single refresh flow. -do { - mutableURLRequest.HTTPBody = try NSJSONSerialization.dataWithJSONObject(parameters, options: NSJSONWritingOptions()) -} catch { - // No-op +### Custom Response Serialization + +#### Handling Errors + +Before implementing custom response serializers or object serialization methods, it's important to consider how to handle any errors that may occur. There are two basic options: passing existing errors along unmodified, to be dealt with at response time; or, wrapping all errors in an `Error` type specific to your app. + +For example, here's a simple `BackendError` enum which will be used in later examples: + +```swift +enum BackendError: Error { + case network(error: Error) // Capture any underlying Error from the URLSession API + case dataSerialization(error: Error) + case jsonSerialization(error: Error) + case xmlSerialization(error: Error) + case objectSerialization(reason: String) } +``` + +#### Creating a Custom Response Serializer + +Alamofire provides built-in response serialization for strings, JSON, and property lists, but others can be added in extensions on `Alamofire.DataRequest` and / or `Alamofire.DownloadRequest`. + +For example, here's how a response handler using [Ono](https://github.com/mattt/Ono) might be implemented: + +```swift +extension DataRequest { + static func xmlResponseSerializer() -> DataResponseSerializer { + return DataResponseSerializer { request, response, data, error in + // Pass through any underlying URLSession error to the .network case. + guard error == nil else { return .failure(BackendError.network(error: error!)) } + + // Use Alamofire's existing data serializer to extract the data, passing the error as nil, as it has + // already been handled. + let result = Request.serializeResponseData(response: response, data: data, error: nil) + + guard case let .success(validData) = result else { + return .failure(BackendError.dataSerialization(error: result.error! as! AFError)) + } -mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + do { + let xml = try ONOXMLDocument(data: validData) + return .success(xml) + } catch { + return .failure(BackendError.xmlSerialization(error: error)) + } + } + } -Alamofire.request(mutableURLRequest) + @discardableResult + func responseXMLDocument( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: DataRequest.xmlResponseSerializer(), + completionHandler: completionHandler + ) + } +} ``` -Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLRequestConvertible` as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state. +#### Generic Response Object Serialization -#### API Parameter Abstraction +Generics can be used to provide automatic, type-safe response object serialization. ```swift -enum Router: URLRequestConvertible { - static let baseURLString = "http://example.com" - static let perPage = 50 +protocol ResponseObjectSerializable { + init?(response: HTTPURLResponse, representation: Any) +} - case Search(query: String, page: Int) +extension DataRequest { + func responseObject( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + { + let responseSerializer = DataResponseSerializer { request, response, data, error in + guard error == nil else { return .failure(BackendError.network(error: error!)) } - // MARK: URLRequestConvertible + let jsonResponseSerializer = DataRequest.jsonResponseSerializer(options: .allowFragments) + let result = jsonResponseSerializer.serializeResponse(request, response, data, nil) - var URLRequest: NSMutableURLRequest { - let result: (path: String, parameters: [String: AnyObject]) = { - switch self { - case .Search(let query, let page) where page > 1: - return ("/search", ["q": query, "offset": Router.perPage * page]) - case .Search(let query, _): - return ("/search", ["q": query]) + guard case let .success(jsonObject) = result else { + return .failure(BackendError.jsonSerialization(error: result.error!)) + } + + guard let response = response, let responseObject = T(response: response, representation: jsonObject) else { + return .failure(BackendError.objectSerialization(reason: "JSON could not be serialized: \(jsonObject)")) } - }() - let URL = NSURL(string: Router.baseURLString)! - let URLRequest = NSURLRequest(URL: URL.URLByAppendingPathComponent(result.path)) - let encoding = Alamofire.ParameterEncoding.URL + return .success(responseObject) + } + + return response(queue: queue, responseSerializer: responseSerializer, completionHandler: completionHandler) + } +} +``` + +```swift +struct User: ResponseObjectSerializable, CustomStringConvertible { + let username: String + let name: String + + var description: String { + return "User: { username: \(username), name: \(name) }" + } + + init?(response: HTTPURLResponse, representation: Any) { + guard + let username = response.url?.lastPathComponent, + let representation = representation as? [String: Any], + let name = representation["name"] as? String + else { return nil } - return encoding.encode(URLRequest, parameters: result.parameters).0 + self.username = username + self.name = name } } ``` ```swift -Alamofire.request(Router.Search(query: "foo bar", page: 1)) // ?q=foo%20bar&offset=50 +Alamofire.request("https://example.com/users/mattt").responseObject { (response: DataResponse) in + debugPrint(response) + + if let user = response.result.value { + print("User: { username: \(user.username), name: \(user.name) }") + } +} ``` -#### CRUD & Authorization +The same approach can also be used to handle endpoints that return a representation of a collection of objects: ```swift -enum Router: URLRequestConvertible { - static let baseURLString = "http://example.com" - static var OAuthToken: String? +protocol ResponseCollectionSerializable { + static func collection(from response: HTTPURLResponse, withRepresentation representation: Any) -> [Self] +} - case CreateUser([String: AnyObject]) - case ReadUser(String) - case UpdateUser(String, [String: AnyObject]) - case DestroyUser(String) +extension ResponseCollectionSerializable where Self: ResponseObjectSerializable { + static func collection(from response: HTTPURLResponse, withRepresentation representation: Any) -> [Self] { + var collection: [Self] = [] - var method: Alamofire.Method { - switch self { - case .CreateUser: - return .POST - case .ReadUser: - return .GET - case .UpdateUser: - return .PUT - case .DestroyUser: - return .DELETE + if let representation = representation as? [[String: Any]] { + for itemRepresentation in representation { + if let item = Self(response: response, representation: itemRepresentation) { + collection.append(item) + } + } } + + return collection } +} +``` - var path: String { - switch self { - case .CreateUser: - return "/users" - case .ReadUser(let username): - return "/users/\(username)" - case .UpdateUser(let username, _): - return "/users/\(username)" - case .DestroyUser(let username): - return "/users/\(username)" +```swift +extension DataRequest { + @discardableResult + func responseCollection( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DataResponse<[T]>) -> Void) -> Self + { + let responseSerializer = DataResponseSerializer<[T]> { request, response, data, error in + guard error == nil else { return .failure(BackendError.network(error: error!)) } + + let jsonSerializer = DataRequest.jsonResponseSerializer(options: .allowFragments) + let result = jsonSerializer.serializeResponse(request, response, data, nil) + + guard case let .success(jsonObject) = result else { + return .failure(BackendError.jsonSerialization(error: result.error!)) + } + + guard let response = response else { + let reason = "Response collection could not be serialized due to nil response." + return .failure(BackendError.objectSerialization(reason: reason)) + } + + return .success(T.collection(from: response, withRepresentation: jsonObject)) } + + return response(responseSerializer: responseSerializer, completionHandler: completionHandler) } +} +``` - // MARK: URLRequestConvertible +```swift +struct User: ResponseObjectSerializable, ResponseCollectionSerializable, CustomStringConvertible { + let username: String + let name: String - var URLRequest: NSMutableURLRequest { - let URL = NSURL(string: Router.baseURLString)! - let mutableURLRequest = NSMutableURLRequest(URL: URL.URLByAppendingPathComponent(path)) - mutableURLRequest.HTTPMethod = method.rawValue + var description: String { + return "User: { username: \(username), name: \(name) }" + } - if let token = Router.OAuthToken { - mutableURLRequest.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization") - } + init?(response: HTTPURLResponse, representation: Any) { + guard + let username = response.url?.lastPathComponent, + let representation = representation as? [String: Any], + let name = representation["name"] as? String + else { return nil } - switch self { - case .CreateUser(let parameters): - return Alamofire.ParameterEncoding.JSON.encode(mutableURLRequest, parameters: parameters).0 - case .UpdateUser(_, let parameters): - return Alamofire.ParameterEncoding.URL.encode(mutableURLRequest, parameters: parameters).0 - default: - return mutableURLRequest - } + self.username = username + self.name = name } } ``` ```swift -Alamofire.request(Router.ReadUser("mattt")) // GET /users/mattt +Alamofire.request("https://example.com/users").responseCollection { (response: DataResponse<[User]>) in + debugPrint(response) + + if let users = response.result.value { + users.forEach { print("- \($0)") } + } +} ``` ### Security @@ -962,10 +1554,10 @@ Using a secure HTTPS connection when communicating with servers and web services #### ServerTrustPolicy -The `ServerTrustPolicy` enumeration evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when connecting to a server over a secure HTTPS connection. +The `ServerTrustPolicy` enumeration evaluates the server trust generally provided by an `URLAuthenticationChallenge` when connecting to a server over a secure HTTPS connection. ```swift -let serverTrustPolicy = ServerTrustPolicy.PinCertificates( +let serverTrustPolicy = ServerTrustPolicy.pinCertificates( certificates: ServerTrustPolicy.certificatesInBundle(), validateCertificateChain: true, validateHost: true @@ -974,42 +1566,41 @@ let serverTrustPolicy = ServerTrustPolicy.PinCertificates( There are many different cases of server trust evaluation giving you complete control over the validation process: -* `PerformDefaultEvaluation`: Uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge. -* `PinCertificates`: Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned certificates match one of the server certificates. -* `PinPublicKeys`: Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned public keys match one of the server certificate public keys. -* `DisableEvaluation`: Disables all evaluation which in turn will always consider any server trust as valid. -* `CustomEvaluation`: Uses the associated closure to evaluate the validity of the server trust thus giving you complete control over the validation process. Use with caution. +* `performDefaultEvaluation`: Uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge. +* `pinCertificates`: Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned certificates match one of the server certificates. +* `pinPublicKeys`: Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned public keys match one of the server certificate public keys. +* `disableEvaluation`: Disables all evaluation which in turn will always consider any server trust as valid. +* `customEvaluation`: Uses the associated closure to evaluate the validity of the server trust thus giving you complete control over the validation process. Use with caution. #### Server Trust Policy Manager -The `ServerTrustPolicyManager` is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy. +The `ServerTrustPolicyManager` is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy. ```swift let serverTrustPolicies: [String: ServerTrustPolicy] = [ - "test.example.com": .PinCertificates( + "test.example.com": .pinCertificates( certificates: ServerTrustPolicy.certificatesInBundle(), validateCertificateChain: true, validateHost: true ), - "insecure.expired-apis.com": .DisableEvaluation + "insecure.expired-apis.com": .disableEvaluation ] -let manager = Manager( - configuration: NSURLSessionConfiguration.defaultSessionConfiguration(), +let sessionManager = SessionManager( serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies) ) ``` -> Make sure to keep a reference to the new `Manager` instance, otherwise your requests will all get cancelled when your `manager` is deallocated. +> Make sure to keep a reference to the new `SessionManager` instance, otherwise your requests will all get cancelled when your `sessionManager` is deallocated. These server trust policies will result in the following behavior: -* `test.example.com` will always use certificate pinning with certificate chain and host validation enabled thus requiring the following criteria to be met to allow the TLS handshake to succeed: - * Certificate chain MUST be valid. - * Certificate chain MUST include one of the pinned certificates. - * Challenge host MUST match the host in the certificate chain's leaf certificate. -* `insecure.expired-apis.com` will never evaluate the certificate chain and will always allow the TLS handshake to succeed. -* All other hosts will use the default evaluation provided by Apple. +- `test.example.com` will always use certificate pinning with certificate chain and host validation enabled thus requiring the following criteria to be met to allow the TLS handshake to succeed: + - Certificate chain MUST be valid. + - Certificate chain MUST include one of the pinned certificates. + - Challenge host MUST match the host in the certificate chain's leaf certificate. +- `insecure.expired-apis.com` will never evaluate the certificate chain and will always allow the TLS handshake to succeed. +- All other hosts will use the default evaluation provided by Apple. ##### Subclassing Server Trust Policy Manager @@ -1017,7 +1608,7 @@ If you find yourself needing more flexible server trust policy matching behavior ```swift class CustomServerTrustPolicyManager: ServerTrustPolicyManager { - override func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { + override func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? { var policy: ServerTrustPolicy? // Implement your custom domain matching behavior... @@ -1029,33 +1620,88 @@ class CustomServerTrustPolicyManager: ServerTrustPolicyManager { #### Validating the Host -The `.PerformDefaultEvaluation`, `.PinCertificates` and `.PinPublicKeys` server trust policies all take a `validateHost` parameter. Setting the value to `true` will cause the server trust evaluation to verify that hostname in the certificate matches the hostname of the challenge. If they do not match, evaluation will fail. A `validateHost` value of `false` will still evaluate the full certificate chain, but will not validate the hostname of the leaf certificate. +The `.performDefaultEvaluation`, `.pinCertificates` and `.pinPublicKeys` server trust policies all take a `validateHost` parameter. Setting the value to `true` will cause the server trust evaluation to verify that hostname in the certificate matches the hostname of the challenge. If they do not match, evaluation will fail. A `validateHost` value of `false` will still evaluate the full certificate chain, but will not validate the hostname of the leaf certificate. > It is recommended that `validateHost` always be set to `true` in production environments. #### Validating the Certificate Chain -Pinning certificates and public keys both have the option of validating the certificate chain using the `validateCertificateChain` parameter. By setting this value to `true`, the full certificate chain will be evaluated in addition to performing a byte equality check against the pinned certficates or public keys. A value of `false` will skip the certificate chain validation, but will still perform the byte equality check. +Pinning certificates and public keys both have the option of validating the certificate chain using the `validateCertificateChain` parameter. By setting this value to `true`, the full certificate chain will be evaluated in addition to performing a byte equality check against the pinned certificates or public keys. A value of `false` will skip the certificate chain validation, but will still perform the byte equality check. There are several cases where it may make sense to disable certificate chain validation. The most common use cases for disabling validation are self-signed and expired certificates. The evaluation would always fail in both of these cases, but the byte equality check will still ensure you are receiving the certificate you expect from the server. > It is recommended that `validateCertificateChain` always be set to `true` in production environments. ---- +#### App Transport Security + +With the addition of App Transport Security (ATS) in iOS 9, it is possible that using a custom `ServerTrustPolicyManager` with several `ServerTrustPolicy` objects will have no effect. If you continuously see `CFNetwork SSLHandshake failed (-9806)` errors, you have probably run into this problem. Apple's ATS system overrides the entire challenge system unless you configure the ATS settings in your app's plist to disable enough of it to allow your app to evaluate the server trust. + +If you run into this problem (high probability with self-signed certificates), you can work around this issue by adding the following to your `Info.plist`. + +```xml + + NSAppTransportSecurity + + NSExceptionDomains + + example.com + + NSExceptionAllowsInsecureHTTPLoads + + NSExceptionRequiresForwardSecrecy + + NSIncludesSubdomains + + + NSTemporaryExceptionMinimumTLSVersion + TLSv1.2 + + + + +``` -## Component Libraries +Whether you need to set the `NSExceptionRequiresForwardSecrecy` to `NO` depends on whether your TLS connection is using an allowed cipher suite. In certain cases, it will need to be set to `NO`. The `NSExceptionAllowsInsecureHTTPLoads` MUST be set to `YES` in order to allow the `SessionDelegate` to receive challenge callbacks. Once the challenge callbacks are being called, the `ServerTrustPolicyManager` will take over the server trust evaluation. You may also need to specify the `NSTemporaryExceptionMinimumTLSVersion` if you're trying to connect to a host that only supports TLS versions less than `1.2`. -In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. +> It is recommended to always use valid certificates in production environments. + +### Network Reachability + +The `NetworkReachabilityManager` listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces. -* [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. +```swift +let manager = NetworkReachabilityManager(host: "www.apple.com") + +manager?.listener = { status in + print("Network Status Changed: \(status)") +} -## Open Rdars +manager?.startListening() +``` -The following rdars have some affect on the current implementation of Alamofire. +> Make sure to remember to retain the `manager` in the above example, or no status changes will be reported. -* [rdar://22024442](http://www.openradar.me/radar?id=6082025006039040) - Array of [SecCertificate] crashing Swift 2.0 compiler in optimized builds -* [rdar://21349340](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case -* [rdar://22307360](http://www.openradar.me/radar?id=4895563208196096) - Swift #available check not working properly with min deployment target +There are some important things to remember when using network reachability to determine what to do next. + +- **Do NOT** use Reachability to determine if a network request should be sent. + - You should **ALWAYS** send it. +- When Reachability is restored, use the event to retry failed network requests. + - Even though the network requests may still fail, this is a good moment to retry them. +- The network reachability status can be useful for determining why a network request may have failed. + - If a network request fails, it is more useful to tell the user that the network request failed due to being offline rather than a more technical error, such as "request timed out." + +> It is recommended to check out [WWDC 2012 Session 706, "Networking Best Practices"](https://developer.apple.com/videos/play/wwdc2012-706/) for more info. + +--- + +## Open Radars + +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` ## FAQ @@ -1063,6 +1709,12 @@ The following rdars have some affect on the current implementation of Alamofire. Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. +### What logic belongs in a Router vs. a Request Adapter? + +Simple, static data such as paths, parameters and common headers belong in the `Router`. Dynamic data such as an `Authorization` header whose value can changed based on an authentication system belongs in a `RequestAdapter`. + +The reason the dynamic data MUST be placed into the `RequestAdapter` is to support retry operations. When a `Request` is retried, the original request is not rebuilt meaning the `Router` will not be called again. The `RequestAdapter` is called again allowing the dynamic data to be updated on the original request before retrying the `Request`. + --- ## Credits @@ -1073,6 +1725,20 @@ Alamofire is owned and maintained by the [Alamofire Software Foundation](http:// If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. +## Donations + +The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially register as a federal non-profit organization. Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free. Donating to the ASF will enable us to: + +- Pay our legal fees to register as a federal non-profit organization +- Pay our yearly legal fees to keep the non-profit in good status +- Pay for our mail servers to help us stay on top of all questions and security issues +- Potentially fund test servers to make it easier for us to test the edge cases +- Potentially fund developers to work on one of our projects full-time + +The community adoption of the ASF libraries has been amazing. We are greatly humbled by your enthusiasm around the projects, and want to continue to do everything we can to move the needle forward. With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. If you use any of our libraries for work, see if your employers would be interested in donating. Our initial goal is to raise $1000 to get all our legal ducks in a row and kickstart this campaign. Any amount you can donate today to help us reach our goal would be greatly appreciated. + +Click here to lend your support to: Alamofire Software Foundation and make a donation at pledgie.com ! + ## License Alamofire is released under the MIT license. See LICENSE for details. diff --git a/Example/Pods/Alamofire/Source/AFError.swift b/Example/Pods/Alamofire/Source/AFError.swift new file mode 100644 index 0000000..82e8a25 --- /dev/null +++ b/Example/Pods/Alamofire/Source/AFError.swift @@ -0,0 +1,450 @@ +// +// AFError.swift +// +// Copyright (c) 2014-2016 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 +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// `AFError` is the error type returned by Alamofire. It encompasses a few different types of errors, each with +/// their own associated reasons. +/// +/// - invalidURL: Returned when a `URLConvertible` type fails to create a valid `URL`. +/// - parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process. +/// - multipartEncodingFailed: Returned when some step in the multipart encoding process fails. +/// - responseValidationFailed: Returned when a `validate()` call fails. +/// - responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process. +public enum AFError: Error { + /// The underlying reason the parameter encoding error occurred. + /// + /// - missingURL: The URL request did not have a URL to encode. + /// - jsonEncodingFailed: JSON serialization failed with an underlying system error during the + /// encoding process. + /// - propertyListEncodingFailed: Property list serialization failed with an underlying system error during + /// encoding process. + public enum ParameterEncodingFailureReason { + case missingURL + case jsonEncodingFailed(error: Error) + case propertyListEncodingFailed(error: Error) + } + + /// The underlying reason the multipart encoding error occurred. + /// + /// - bodyPartURLInvalid: The `fileURL` provided for reading an encodable body part isn't a + /// file URL. + /// - bodyPartFilenameInvalid: The filename of the `fileURL` provided has either an empty + /// `lastPathComponent` or `pathExtension. + /// - bodyPartFileNotReachable: The file at the `fileURL` provided was not reachable. + /// - bodyPartFileNotReachableWithError: Attempting to check the reachability of the `fileURL` provided threw + /// an error. + /// - bodyPartFileIsDirectory: The file at the `fileURL` provided is actually a directory. + /// - bodyPartFileSizeNotAvailable: The size of the file at the `fileURL` provided was not returned by + /// the system. + /// - bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the `fileURL` provided + /// threw an error. + /// - bodyPartInputStreamCreationFailed: An `InputStream` could not be created for the provided `fileURL`. + /// - outputStreamCreationFailed: An `OutputStream` could not be created when attempting to write the + /// encoded data to disk. + /// - outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file + /// already exists at the provided `fileURL`. + /// - outputStreamURLInvalid: The `fileURL` provided for writing the encoded body data to disk is + /// not a file URL. + /// - outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an + /// underlying error. + /// - inputStreamReadFailed: The attempt to read an encoded body part `InputStream` failed with + /// underlying system error. + public enum MultipartEncodingFailureReason { + case bodyPartURLInvalid(url: URL) + case bodyPartFilenameInvalid(in: URL) + case bodyPartFileNotReachable(at: URL) + case bodyPartFileNotReachableWithError(atURL: URL, error: Error) + case bodyPartFileIsDirectory(at: URL) + case bodyPartFileSizeNotAvailable(at: URL) + case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: Error) + case bodyPartInputStreamCreationFailed(for: URL) + + case outputStreamCreationFailed(for: URL) + case outputStreamFileAlreadyExists(at: URL) + case outputStreamURLInvalid(url: URL) + case outputStreamWriteFailed(error: Error) + + case inputStreamReadFailed(error: Error) + } + + /// The underlying reason the response validation error occurred. + /// + /// - dataFileNil: The data file containing the server response did not exist. + /// - dataFileReadFailed: The data file containing the server response could not be read. + /// - missingContentType: The response did not contain a `Content-Type` and the `acceptableContentTypes` + /// provided did not contain wildcard type. + /// - unacceptableContentType: The response `Content-Type` did not match any type in the provided + /// `acceptableContentTypes`. + /// - unacceptableStatusCode: The response status code was not acceptable. + public enum ResponseValidationFailureReason { + case dataFileNil + case dataFileReadFailed(at: URL) + case missingContentType(acceptableContentTypes: [String]) + case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String) + case unacceptableStatusCode(code: Int) + } + + /// The underlying reason the response serialization error occurred. + /// + /// - inputDataNil: The server response contained no data. + /// - inputDataNilOrZeroLength: The server response contained no data or the data was zero length. + /// - inputFileNil: The file containing the server response did not exist. + /// - inputFileReadFailed: The file containing the server response could not be read. + /// - stringSerializationFailed: String serialization failed using the provided `String.Encoding`. + /// - jsonSerializationFailed: JSON serialization failed with an underlying system error. + /// - propertyListSerializationFailed: Property list serialization failed with an underlying system error. + public enum ResponseSerializationFailureReason { + case inputDataNil + case inputDataNilOrZeroLength + case inputFileNil + case inputFileReadFailed(at: URL) + case stringSerializationFailed(encoding: String.Encoding) + case jsonSerializationFailed(error: Error) + case propertyListSerializationFailed(error: Error) + } + + case invalidURL(url: URLConvertible) + case parameterEncodingFailed(reason: ParameterEncodingFailureReason) + case multipartEncodingFailed(reason: MultipartEncodingFailureReason) + case responseValidationFailed(reason: ResponseValidationFailureReason) + case responseSerializationFailed(reason: ResponseSerializationFailureReason) +} + +// MARK: - Error Booleans + +extension AFError { + /// Returns whether the AFError is an invalid URL error. + public var isInvalidURLError: Bool { + if case .invalidURL = self { return true } + return false + } + + /// Returns whether the AFError is a parameter encoding error. When `true`, the `underlyingError` property will + /// contain the associated value. + public var isParameterEncodingError: Bool { + if case .parameterEncodingFailed = self { return true } + return false + } + + /// Returns whether the AFError is a multipart encoding error. When `true`, the `url` and `underlyingError` properties + /// will contain the associated values. + public var isMultipartEncodingError: Bool { + if case .multipartEncodingFailed = self { return true } + return false + } + + /// Returns whether the `AFError` is a response validation error. When `true`, the `acceptableContentTypes`, + /// `responseContentType`, and `responseCode` properties will contain the associated values. + public var isResponseValidationError: Bool { + if case .responseValidationFailed = self { return true } + return false + } + + /// Returns whether the `AFError` is a response serialization error. When `true`, the `failedStringEncoding` and + /// `underlyingError` properties will contain the associated values. + public var isResponseSerializationError: Bool { + if case .responseSerializationFailed = self { return true } + return false + } +} + +// MARK: - Convenience Properties + +extension AFError { + /// The `URLConvertible` associated with the error. + public var urlConvertible: URLConvertible? { + switch self { + case .invalidURL(let url): + return url + default: + return nil + } + } + + /// The `URL` associated with the error. + public var url: URL? { + switch self { + case .multipartEncodingFailed(let reason): + return reason.url + default: + return nil + } + } + + /// The `Error` returned by a system framework associated with a `.parameterEncodingFailed`, + /// `.multipartEncodingFailed` or `.responseSerializationFailed` error. + public var underlyingError: Error? { + switch self { + case .parameterEncodingFailed(let reason): + return reason.underlyingError + case .multipartEncodingFailed(let reason): + return reason.underlyingError + case .responseSerializationFailed(let reason): + return reason.underlyingError + default: + return nil + } + } + + /// The acceptable `Content-Type`s of a `.responseValidationFailed` error. + public var acceptableContentTypes: [String]? { + switch self { + case .responseValidationFailed(let reason): + return reason.acceptableContentTypes + default: + return nil + } + } + + /// The response `Content-Type` of a `.responseValidationFailed` error. + public var responseContentType: String? { + switch self { + case .responseValidationFailed(let reason): + return reason.responseContentType + default: + return nil + } + } + + /// The response code of a `.responseValidationFailed` error. + public var responseCode: Int? { + switch self { + case .responseValidationFailed(let reason): + return reason.responseCode + default: + return nil + } + } + + /// The `String.Encoding` associated with a failed `.stringResponse()` call. + public var failedStringEncoding: String.Encoding? { + switch self { + case .responseSerializationFailed(let reason): + return reason.failedStringEncoding + default: + return nil + } + } +} + +extension AFError.ParameterEncodingFailureReason { + var underlyingError: Error? { + switch self { + case .jsonEncodingFailed(let error), .propertyListEncodingFailed(let error): + return error + default: + return nil + } + } +} + +extension AFError.MultipartEncodingFailureReason { + var url: URL? { + switch self { + case .bodyPartURLInvalid(let url), .bodyPartFilenameInvalid(let url), .bodyPartFileNotReachable(let url), + .bodyPartFileIsDirectory(let url), .bodyPartFileSizeNotAvailable(let url), + .bodyPartInputStreamCreationFailed(let url), .outputStreamCreationFailed(let url), + .outputStreamFileAlreadyExists(let url), .outputStreamURLInvalid(let url), + .bodyPartFileNotReachableWithError(let url, _), .bodyPartFileSizeQueryFailedWithError(let url, _): + return url + default: + return nil + } + } + + var underlyingError: Error? { + switch self { + case .bodyPartFileNotReachableWithError(_, let error), .bodyPartFileSizeQueryFailedWithError(_, let error), + .outputStreamWriteFailed(let error), .inputStreamReadFailed(let error): + return error + default: + return nil + } + } +} + +extension AFError.ResponseValidationFailureReason { + var acceptableContentTypes: [String]? { + switch self { + case .missingContentType(let types), .unacceptableContentType(let types, _): + return types + default: + return nil + } + } + + var responseContentType: String? { + switch self { + case .unacceptableContentType(_, let responseType): + return responseType + default: + return nil + } + } + + var responseCode: Int? { + switch self { + case .unacceptableStatusCode(let code): + return code + default: + return nil + } + } +} + +extension AFError.ResponseSerializationFailureReason { + var failedStringEncoding: String.Encoding? { + switch self { + case .stringSerializationFailed(let encoding): + return encoding + default: + return nil + } + } + + var underlyingError: Error? { + switch self { + case .jsonSerializationFailed(let error), .propertyListSerializationFailed(let error): + return error + default: + return nil + } + } +} + +// MARK: - Error Descriptions + +extension AFError: LocalizedError { + public var errorDescription: String? { + switch self { + case .invalidURL(let url): + return "URL is not valid: \(url)" + case .parameterEncodingFailed(let reason): + return reason.localizedDescription + case .multipartEncodingFailed(let reason): + return reason.localizedDescription + case .responseValidationFailed(let reason): + return reason.localizedDescription + case .responseSerializationFailed(let reason): + return reason.localizedDescription + } + } +} + +extension AFError.ParameterEncodingFailureReason { + var localizedDescription: String { + switch self { + case .missingURL: + return "URL request to encode was missing a URL" + case .jsonEncodingFailed(let error): + return "JSON could not be encoded because of error:\n\(error.localizedDescription)" + case .propertyListEncodingFailed(let error): + return "PropertyList could not be encoded because of error:\n\(error.localizedDescription)" + } + } +} + +extension AFError.MultipartEncodingFailureReason { + var localizedDescription: String { + switch self { + case .bodyPartURLInvalid(let url): + return "The URL provided is not a file URL: \(url)" + case .bodyPartFilenameInvalid(let url): + return "The URL provided does not have a valid filename: \(url)" + case .bodyPartFileNotReachable(let url): + return "The URL provided is not reachable: \(url)" + case .bodyPartFileNotReachableWithError(let url, let error): + return ( + "The system returned an error while checking the provided URL for " + + "reachability.\nURL: \(url)\nError: \(error)" + ) + case .bodyPartFileIsDirectory(let url): + return "The URL provided is a directory: \(url)" + case .bodyPartFileSizeNotAvailable(let url): + return "Could not fetch the file size from the provided URL: \(url)" + case .bodyPartFileSizeQueryFailedWithError(let url, let error): + return ( + "The system returned an error while attempting to fetch the file size from the " + + "provided URL.\nURL: \(url)\nError: \(error)" + ) + case .bodyPartInputStreamCreationFailed(let url): + return "Failed to create an InputStream for the provided URL: \(url)" + case .outputStreamCreationFailed(let url): + return "Failed to create an OutputStream for URL: \(url)" + case .outputStreamFileAlreadyExists(let url): + return "A file already exists at the provided URL: \(url)" + case .outputStreamURLInvalid(let url): + return "The provided OutputStream URL is invalid: \(url)" + case .outputStreamWriteFailed(let error): + return "OutputStream write failed with error: \(error)" + case .inputStreamReadFailed(let error): + return "InputStream read failed with error: \(error)" + } + } +} + +extension AFError.ResponseSerializationFailureReason { + var localizedDescription: String { + switch self { + case .inputDataNil: + return "Response could not be serialized, input data was nil." + case .inputDataNilOrZeroLength: + return "Response could not be serialized, input data was nil or zero length." + case .inputFileNil: + return "Response could not be serialized, input file was nil." + case .inputFileReadFailed(let url): + return "Response could not be serialized, input file could not be read: \(url)." + case .stringSerializationFailed(let encoding): + return "String could not be serialized with encoding: \(encoding)." + case .jsonSerializationFailed(let error): + return "JSON could not be serialized because of error:\n\(error.localizedDescription)" + case .propertyListSerializationFailed(let error): + return "PropertyList could not be serialized because of error:\n\(error.localizedDescription)" + } + } +} + +extension AFError.ResponseValidationFailureReason { + var localizedDescription: String { + switch self { + case .dataFileNil: + return "Response could not be validated, data file was nil." + case .dataFileReadFailed(let url): + return "Response could not be validated, data file could not be read: \(url)." + case .missingContentType(let types): + return ( + "Response Content-Type was missing and acceptable content types " + + "(\(types.joined(separator: ","))) do not match \"*/*\"." + ) + case .unacceptableContentType(let acceptableTypes, let responseType): + return ( + "Response Content-Type \"\(responseType)\" does not match any acceptable types: " + + "\(acceptableTypes.joined(separator: ","))." + ) + case .unacceptableStatusCode(let code): + return "Response status code was unacceptable: \(code)." + } + } +} diff --git a/Example/Pods/Alamofire/Source/Alamofire.swift b/Example/Pods/Alamofire/Source/Alamofire.swift index 3b52d0f..7566587 100644 --- a/Example/Pods/Alamofire/Source/Alamofire.swift +++ b/Example/Pods/Alamofire/Source/Alamofire.swift @@ -1,368 +1,456 @@ -// Alamofire.swift // -// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// Alamofire.swift // -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. import Foundation -// MARK: - URLStringConvertible - -/** - Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to - construct URL requests. -*/ -public protocol URLStringConvertible { - /** - A URL that conforms to RFC 2396. - - Methods accepting a `URLStringConvertible` type parameter parse it according to RFCs 1738 and 1808. - - See https://tools.ietf.org/html/rfc2396 - See https://tools.ietf.org/html/rfc1738 - See https://tools.ietf.org/html/rfc1808 - */ - var URLString: String { get } +/// Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct +/// URL requests. +public protocol URLConvertible { + /// Returns a URL that conforms to RFC 2396 or throws an `Error`. + /// + /// - throws: An `Error` if the type cannot be converted to a `URL`. + /// + /// - returns: A URL or throws an `Error`. + func asURL() throws -> URL } -extension String: URLStringConvertible { - public var URLString: String { - return self +extension String: URLConvertible { + /// Returns a URL if `self` represents a valid URL string that conforms to RFC 2396 or throws an `AFError`. + /// + /// - throws: An `AFError.invalidURL` if `self` is not a valid URL string. + /// + /// - returns: A URL or throws an `AFError`. + public func asURL() throws -> URL { + guard let url = URL(string: self) else { throw AFError.invalidURL(url: self) } + return url } } -extension NSURL: URLStringConvertible { - public var URLString: String { - return absoluteString - } -} - -extension NSURLComponents: URLStringConvertible { - public var URLString: String { - return URL!.URLString - } +extension URL: URLConvertible { + /// Returns self. + public func asURL() throws -> URL { return self } } -extension NSURLRequest: URLStringConvertible { - public var URLString: String { - return URL!.URLString +extension URLComponents: URLConvertible { + /// Returns a URL if `url` is not nil, otherise throws an `Error`. + /// + /// - throws: An `AFError.invalidURL` if `url` is `nil`. + /// + /// - returns: A URL or throws an `AFError`. + public func asURL() throws -> URL { + guard let url = url else { throw AFError.invalidURL(url: self) } + return url } } -// MARK: - URLRequestConvertible +// MARK: - -/** - Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. -*/ +/// Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. public protocol URLRequestConvertible { + /// Returns a URL request or throws if an `Error` was encountered. + /// + /// - throws: An `Error` if the underlying `URLRequest` is `nil`. + /// + /// - returns: A URL request. + func asURLRequest() throws -> URLRequest +} + +extension URLRequestConvertible { /// The URL request. - var URLRequest: NSMutableURLRequest { get } + public var urlRequest: URLRequest? { return try? asURLRequest() } } -extension NSURLRequest: URLRequestConvertible { - public var URLRequest: NSMutableURLRequest { - return self.mutableCopy() as! NSMutableURLRequest - } +extension URLRequest: URLRequestConvertible { + /// Returns a URL request or throws if an `Error` was encountered. + public func asURLRequest() throws -> URLRequest { return self } } -// MARK: - Convenience +// MARK: - -func URLRequest( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil) - -> NSMutableURLRequest -{ - let mutableURLRequest = NSMutableURLRequest(URL: NSURL(string: URLString.URLString)!) - mutableURLRequest.HTTPMethod = method.rawValue +extension URLRequest { + /// Creates an instance with the specified `method`, `urlString` and `headers`. + /// + /// - parameter url: The URL. + /// - parameter method: The HTTP method. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The new `URLRequest` instance. + public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws { + let url = try url.asURL() - if let headers = headers { - for (headerField, headerValue) in headers { - mutableURLRequest.setValue(headerValue, forHTTPHeaderField: headerField) + self.init(url: url) + + httpMethod = method.rawValue + + if let headers = headers { + for (headerField, headerValue) in headers { + setValue(headerValue, forHTTPHeaderField: headerField) + } } } - return mutableURLRequest + func adapt(using adapter: RequestAdapter?) throws -> URLRequest { + guard let adapter = adapter else { return self } + return try adapter.adapt(self) + } } -// MARK: - Request Methods - -/** - Creates a request using the shared manager instance for the specified method, URL string, parameters, and - parameter encoding. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - - returns: The created request. -*/ +// MARK: - Data Request + +/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, +/// `method`, `parameters`, `encoding` and `headers`. +/// +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.get` by default. +/// - parameter parameters: The parameters. `nil` by default. +/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `DataRequest`. +@discardableResult public func request( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil) - -> Request + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil) + -> DataRequest { - return Manager.sharedInstance.request( - method, - URLString, + return SessionManager.default.request( + url, + method: method, parameters: parameters, encoding: encoding, headers: headers ) } -/** - Creates a request using the shared manager instance for the specified URL request. +/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of a URL based on the +/// specified `urlRequest`. +/// +/// - parameter urlRequest: The URL request +/// +/// - returns: The created `DataRequest`. +@discardableResult +public func request(_ urlRequest: URLRequestConvertible) -> DataRequest { + return SessionManager.default.request(urlRequest) +} + +// MARK: - Download Request - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. +// MARK: URL Request - - parameter URLRequest: The URL request +/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, +/// `method`, `parameters`, `encoding`, `headers` and save them to the `destination`. +/// +/// If `destination` is not specified, the contents will remain in the temporary location determined by the +/// underlying URL session. +/// +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.get` by default. +/// - parameter parameters: The parameters. `nil` by default. +/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. +/// +/// - returns: The created `DownloadRequest`. +@discardableResult +public func download( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest +{ + return SessionManager.default.download( + url, + method: method, + parameters: parameters, + encoding: encoding, + headers: headers, + to: destination + ) +} - - returns: The created request. -*/ -public func request(URLRequest: URLRequestConvertible) -> Request { - return Manager.sharedInstance.request(URLRequest.URLRequest) +/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of a URL based on the +/// specified `urlRequest` and save them to the `destination`. +/// +/// If `destination` is not specified, the contents will remain in the temporary location determined by the +/// underlying URL session. +/// +/// - parameter urlRequest: The URL request. +/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. +/// +/// - returns: The created `DownloadRequest`. +@discardableResult +public func download( + _ urlRequest: URLRequestConvertible, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest +{ + return SessionManager.default.download(urlRequest, to: destination) } -// MARK: - Upload Methods +// MARK: Resume Data -// MARK: File +/// Creates a `DownloadRequest` using the default `SessionManager` from the `resumeData` produced from a +/// previous request cancellation to retrieve the contents of the original request and save them to the `destination`. +/// +/// If `destination` is not specified, the contents will remain in the temporary location determined by the +/// underlying URL session. +/// +/// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` +/// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for additional +/// information. +/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. +/// +/// - returns: The created `DownloadRequest`. +@discardableResult +public func download( + resumingWith resumeData: Data, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest +{ + return SessionManager.default.download(resumingWith: resumeData, to: destination) +} -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and file. +// MARK: - Upload Request - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter file: The file to upload. +// MARK: File - - returns: The created upload request. -*/ +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// for uploading the `file`. +/// +/// - parameter file: The file to upload. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `UploadRequest`. +@discardableResult public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - file: NSURL) - -> Request + _ fileURL: URL, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { - return Manager.sharedInstance.upload(method, URLString, headers: headers, file: file) + return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) } -/** - Creates an upload request using the shared manager instance for the specified URL request and file. - - - parameter URLRequest: The URL request. - - parameter file: The file to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { - return Manager.sharedInstance.upload(URLRequest, file: file) +/// Creates a `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for +/// uploading the `file`. +/// +/// - parameter file: The file to upload. +/// - parameter urlRequest: The URL request. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { + return SessionManager.default.upload(fileURL, with: urlRequest) } // MARK: Data -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and data. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter data: The data to upload. - - - returns: The created upload request. -*/ +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// for uploading the `data`. +/// +/// - parameter data: The data to upload. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `UploadRequest`. +@discardableResult public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - data: NSData) - -> Request + _ data: Data, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { - return Manager.sharedInstance.upload(method, URLString, headers: headers, data: data) + return SessionManager.default.upload(data, to: url, method: method, headers: headers) } -/** - Creates an upload request using the shared manager instance for the specified URL request and data. - - - parameter URLRequest: The URL request. - - parameter data: The data to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { - return Manager.sharedInstance.upload(URLRequest, data: data) +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for +/// uploading the `data`. +/// +/// - parameter data: The data to upload. +/// - parameter urlRequest: The URL request. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { + return SessionManager.default.upload(data, with: urlRequest) } -// MARK: Stream - -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and stream. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter stream: The stream to upload. - - - returns: The created upload request. -*/ +// MARK: InputStream + +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` +/// for uploading the `stream`. +/// +/// - parameter stream: The stream to upload. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// +/// - returns: The created `UploadRequest`. +@discardableResult public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - stream: NSInputStream) - -> Request + _ stream: InputStream, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest { - return Manager.sharedInstance.upload(method, URLString, headers: headers, stream: stream) + return SessionManager.default.upload(stream, to: url, method: method, headers: headers) } -/** - Creates an upload request using the shared manager instance for the specified URL request and stream. - - - parameter URLRequest: The URL request. - - parameter stream: The stream to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { - return Manager.sharedInstance.upload(URLRequest, stream: stream) +/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for +/// uploading the `stream`. +/// +/// - parameter urlRequest: The URL request. +/// - parameter stream: The stream to upload. +/// +/// - returns: The created `UploadRequest`. +@discardableResult +public func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { + return SessionManager.default.upload(stream, with: urlRequest) } // MARK: MultipartFormData -/** - Creates an upload request using the shared manager instance for the specified method and URL string. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -*/ +/// Encodes `multipartFormData` using `encodingMemoryThreshold` with the default `SessionManager` and calls +/// `encodingCompletion` with new `UploadRequest` using the `url`, `method` and `headers`. +/// +/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative +/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +/// used for larger payloads such as video content. +/// +/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory +/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, +/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +/// technique was used. +/// +/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. +/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. +/// `multipartFormDataEncodingMemoryThreshold` by default. +/// - parameter url: The URL. +/// - parameter method: The HTTP method. `.post` by default. +/// - parameter headers: The HTTP headers. `nil` by default. +/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { - return Manager.sharedInstance.upload( - method, - URLString, - headers: headers, + return SessionManager.default.upload( multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, + usingThreshold: encodingMemoryThreshold, + to: url, + method: method, + headers: headers, encodingCompletion: encodingCompletion ) } -/** - Creates an upload request using the shared manager instance for the specified method and URL string. - - - parameter URLRequest: The URL request. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -*/ +/// Encodes `multipartFormData` using `encodingMemoryThreshold` and the default `SessionManager` and +/// calls `encodingCompletion` with new `UploadRequest` using the `urlRequest`. +/// +/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative +/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +/// used for larger payloads such as video content. +/// +/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory +/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, +/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +/// technique was used. +/// +/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. +/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. +/// `multipartFormDataEncodingMemoryThreshold` by default. +/// - parameter urlRequest: The URL request. +/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. public func upload( - URLRequest: URLRequestConvertible, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + with urlRequest: URLRequestConvertible, + encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) { - return Manager.sharedInstance.upload( - URLRequest, + return SessionManager.default.upload( multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, + usingThreshold: encodingMemoryThreshold, + with: urlRequest, encodingCompletion: encodingCompletion ) } -// MARK: - Download Methods - -// MARK: URL Request +#if !os(watchOS) -/** - Creates a download request using the shared manager instance for the specified method and URL string. +// MARK: - Stream Request - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - parameter destination: The closure used to determine the destination of the downloaded file. +// MARK: Hostname and Port - - returns: The created download request. -*/ -public func download( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil, - destination: Request.DownloadFileDestination) - -> Request -{ - return Manager.sharedInstance.download( - method, - URLString, - parameters: parameters, - encoding: encoding, - headers: headers, - destination: destination - ) +/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `hostname` +/// and `port`. +/// +/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. +/// +/// - parameter hostName: The hostname of the server to connect to. +/// - parameter port: The port of the server to connect to. +/// +/// - returns: The created `StreamRequest`. +@discardableResult +public func stream(withHostName hostName: String, port: Int) -> StreamRequest { + return SessionManager.default.stream(withHostName: hostName, port: port) } -/** - Creates a download request using the shared manager instance for the specified URL request. - - - parameter URLRequest: The URL request. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { - return Manager.sharedInstance.download(URLRequest, destination: destination) +// MARK: NetService + +/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `netService`. +/// +/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. +/// +/// - parameter netService: The net service used to identify the endpoint. +/// +/// - returns: The created `StreamRequest`. +@discardableResult +public func stream(with netService: NetService) -> StreamRequest { + return SessionManager.default.stream(with: netService) } -// MARK: Resume Data - -/** - Creates a request using the shared manager instance for downloading from the resume data produced from a - previous request cancellation. - - - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` - when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for additional - information. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download(resumeData data: NSData, destination: Request.DownloadFileDestination) -> Request { - return Manager.sharedInstance.download(data, destination: destination) -} +#endif diff --git a/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift new file mode 100644 index 0000000..5019d0d --- /dev/null +++ b/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift @@ -0,0 +1,43 @@ +// +// DispatchQueue+Alamofire.swift +// +// Copyright (c) 2014-2016 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 +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Dispatch +import Foundation + +extension DispatchQueue { + static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } + static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } + static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } + static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } + + func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { + asyncAfter(deadline: .now() + delay, execute: closure) + } + + func syncResult(_ closure: () -> T) -> T { + var result: T! + sync { result = closure() } + return result + } +} diff --git a/Example/Pods/Alamofire/Source/Download.swift b/Example/Pods/Alamofire/Source/Download.swift deleted file mode 100644 index 1df90cc..0000000 --- a/Example/Pods/Alamofire/Source/Download.swift +++ /dev/null @@ -1,244 +0,0 @@ -// Download.swift -// -// Copyright (c) 2014–2015 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 -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -extension Manager { - private enum Downloadable { - case Request(NSURLRequest) - case ResumeData(NSData) - } - - private func download(downloadable: Downloadable, destination: Request.DownloadFileDestination) -> Request { - var downloadTask: NSURLSessionDownloadTask! - - switch downloadable { - case .Request(let request): - dispatch_sync(queue) { - downloadTask = self.session.downloadTaskWithRequest(request) - } - case .ResumeData(let resumeData): - dispatch_sync(queue) { - downloadTask = self.session.downloadTaskWithResumeData(resumeData) - } - } - - let request = Request(session: session, task: downloadTask) - - if let downloadDelegate = request.delegate as? Request.DownloadTaskDelegate { - downloadDelegate.downloadTaskDidFinishDownloadingToURL = { session, downloadTask, URL in - return destination(URL, downloadTask.response as! NSHTTPURLResponse) - } - } - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: Request - - /** - Creates a download request for the specified method, URL string, parameters, parameter encoding, headers - and destination. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil, - destination: Request.DownloadFileDestination) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 - - return download(encodedURLRequest, destination: destination) - } - - /** - Creates a request for downloading from the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { - return download(.Request(URLRequest.URLRequest), destination: destination) - } - - // MARK: Resume Data - - /** - Creates a request for downloading from the resume data produced from a previous request cancellation. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` - when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for - additional information. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download(resumeData: NSData, destination: Request.DownloadFileDestination) -> Request { - return download(.ResumeData(resumeData), destination: destination) - } -} - -// MARK: - - -extension Request { - /** - A closure executed once a request has successfully completed in order to determine where to move the temporary - file written to during the download process. The closure takes two arguments: the temporary file URL and the URL - response, and returns a single argument: the file URL where the temporary file should be moved. - */ - public typealias DownloadFileDestination = (NSURL, NSHTTPURLResponse) -> NSURL - - /** - Creates a download file destination closure which uses the default file manager to move the temporary file to a - file URL in the first available directory with the specified search path directory and search path domain mask. - - - parameter directory: The search path directory. `.DocumentDirectory` by default. - - parameter domain: The search path domain mask. `.UserDomainMask` by default. - - - returns: A download file destination closure. - */ - public class func suggestedDownloadDestination( - directory directory: NSSearchPathDirectory = .DocumentDirectory, - domain: NSSearchPathDomainMask = .UserDomainMask) - -> DownloadFileDestination - { - return { temporaryURL, response -> NSURL in - let directoryURLs = NSFileManager.defaultManager().URLsForDirectory(directory, inDomains: domain) - - if !directoryURLs.isEmpty { - return directoryURLs[0].URLByAppendingPathComponent(response.suggestedFilename!) - } - - return temporaryURL - } - } - - /// The resume data of the underlying download task if available after a failure. - public var resumeData: NSData? { - var data: NSData? - - if let delegate = delegate as? DownloadTaskDelegate { - data = delegate.resumeData - } - - return data - } - - // MARK: - DownloadTaskDelegate - - class DownloadTaskDelegate: TaskDelegate, NSURLSessionDownloadDelegate { - var downloadTask: NSURLSessionDownloadTask? { return task as? NSURLSessionDownloadTask } - var downloadProgress: ((Int64, Int64, Int64) -> Void)? - - var resumeData: NSData? - override var data: NSData? { return resumeData } - - // MARK: - NSURLSessionDownloadDelegate - - // MARK: Override Closures - - var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> NSURL)? - var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - do { - let destination = downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - try NSFileManager.defaultManager().moveItemAtURL(location, toURL: destination) - } catch { - self.error = error as NSError - } - } - } - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData( - session, - downloadTask, - bytesWritten, - totalBytesWritten, - totalBytesExpectedToWrite - ) - } else { - progress.totalUnitCount = totalBytesExpectedToWrite - progress.completedUnitCount = totalBytesWritten - - downloadProgress?(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } - } - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else { - progress.totalUnitCount = expectedTotalBytes - progress.completedUnitCount = fileOffset - } - } - } -} diff --git a/Example/Pods/Alamofire/Source/Error.swift b/Example/Pods/Alamofire/Source/Error.swift deleted file mode 100644 index b776a3e..0000000 --- a/Example/Pods/Alamofire/Source/Error.swift +++ /dev/null @@ -1,66 +0,0 @@ -// Error.swift -// -// Copyright (c) 2014–2015 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 -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// The `Error` struct provides a convenience for creating custom Alamofire NSErrors. -public struct Error { - /// The domain used for creating all Alamofire errors. - public static let Domain = "com.alamofire.error" - - /// The custom error codes generated by Alamofire. - public enum Code: Int { - case InputStreamReadFailed = -6000 - case OutputStreamWriteFailed = -6001 - case ContentTypeValidationFailed = -6002 - case StatusCodeValidationFailed = -6003 - case DataSerializationFailed = -6004 - case StringSerializationFailed = -6005 - case JSONSerializationFailed = -6006 - case PropertyListSerializationFailed = -6007 - } - - /** - Creates an `NSError` with the given error code and failure reason. - - - parameter code: The error code. - - parameter failureReason: The failure reason. - - - returns: An `NSError` with the given error code and failure reason. - */ - public static func errorWithCode(code: Code, failureReason: String) -> NSError { - return errorWithCode(code.rawValue, failureReason: failureReason) - } - - /** - Creates an `NSError` with the given error code and failure reason. - - - parameter code: The error code. - - parameter failureReason: The failure reason. - - - returns: An `NSError` with the given error code and failure reason. - */ - public static func errorWithCode(code: Int, failureReason: String) -> NSError { - let userInfo = [NSLocalizedFailureReasonErrorKey: failureReason] - return NSError(domain: Domain, code: code, userInfo: userInfo) - } -} diff --git a/Example/Pods/Alamofire/Source/Manager.swift b/Example/Pods/Alamofire/Source/Manager.swift deleted file mode 100644 index 01f77da..0000000 --- a/Example/Pods/Alamofire/Source/Manager.swift +++ /dev/null @@ -1,668 +0,0 @@ -// Manager.swift -// -// Copyright (c) 2014–2015 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 -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/** - Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. -*/ -public class Manager { - - // MARK: - Properties - - /** - A shared instance of `Manager`, used by top-level Alamofire request methods, and suitable for use directly - for any ad hoc requests. - */ - public static let sharedInstance: Manager = { - let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() - configuration.HTTPAdditionalHeaders = Manager.defaultHTTPHeaders - - return Manager(configuration: configuration) - }() - - /** - Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. - */ - public static let defaultHTTPHeaders: [String: String] = { - // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 - let acceptEncoding: String = "gzip;q=1.0,compress;q=0.5" - - // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 - let acceptLanguage: String = { - var components: [String] = [] - for (index, languageCode) in (NSLocale.preferredLanguages() as [String]).enumerate() { - let q = 1.0 - (Double(index) * 0.1) - components.append("\(languageCode);q=\(q)") - if q <= 0.5 { - break - } - } - - return components.joinWithSeparator(",") - }() - - // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 - let userAgent: String = { - if let info = NSBundle.mainBundle().infoDictionary { - let executable: AnyObject = info[kCFBundleExecutableKey as String] ?? "Unknown" - let bundle: AnyObject = info[kCFBundleIdentifierKey as String] ?? "Unknown" - let version: AnyObject = info[kCFBundleVersionKey as String] ?? "Unknown" - let os: AnyObject = NSProcessInfo.processInfo().operatingSystemVersionString ?? "Unknown" - - var mutableUserAgent = NSMutableString(string: "\(executable)/\(bundle) (\(version); OS \(os))") as CFMutableString - let transform = NSString(string: "Any-Latin; Latin-ASCII; [:^ASCII:] Remove") as CFString - - if CFStringTransform(mutableUserAgent, UnsafeMutablePointer(nil), transform, false) { - return mutableUserAgent as String - } - } - - return "Alamofire" - }() - - return [ - "Accept-Encoding": acceptEncoding, - "Accept-Language": acceptLanguage, - "User-Agent": userAgent - ] - }() - - let queue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL) - - /// The underlying session. - public let session: NSURLSession - - /// The session delegate handling all the task and session delegate callbacks. - public let delegate: SessionDelegate - - /// Whether to start requests immediately after being constructed. `true` by default. - public var startRequestsImmediately: Bool = true - - /** - The background completion handler closure provided by the UIApplicationDelegate - `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background - completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation - will automatically call the handler. - - If you need to handle your own events before the handler is called, then you need to override the - SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. - - `nil` by default. - */ - public var backgroundCompletionHandler: (() -> Void)? - - // MARK: - Lifecycle - - /** - Initializes the `Manager` instance with the given configuration and server trust policy. - - - parameter configuration: The configuration used to construct the managed session. - `NSURLSessionConfiguration.defaultSessionConfiguration()` by default. - - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - challenges. `nil` by default. - - - returns: The new `Manager` instance. - */ - public init( - configuration: NSURLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - self.delegate = SessionDelegate() - self.session = NSURLSession(configuration: configuration, delegate: self.delegate, delegateQueue: nil) - self.session.serverTrustPolicyManager = serverTrustPolicyManager - - self.delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in - guard let strongSelf = self else { return } - dispatch_async(dispatch_get_main_queue()) { strongSelf.backgroundCompletionHandler?() } - } - } - - deinit { - session.invalidateAndCancel() - } - - // MARK: - Request - - /** - Creates a request for the specified method, URL string, parameters, parameter encoding and headers. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - - returns: The created request. - */ - public func request( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 - return request(encodedURLRequest) - } - - /** - Creates a request for the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - - returns: The created request. - */ - public func request(URLRequest: URLRequestConvertible) -> Request { - var dataTask: NSURLSessionDataTask! - - dispatch_sync(queue) { - dataTask = self.session.dataTaskWithRequest(URLRequest.URLRequest) - } - - let request = Request(session: session, task: dataTask) - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: - SessionDelegate - - /** - Responsible for handling all delegate callbacks for the underlying session. - */ - public final class SessionDelegate: NSObject, NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate { - private var subdelegates: [Int: Request.TaskDelegate] = [:] - private let subdelegateQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_CONCURRENT) - - subscript(task: NSURLSessionTask) -> Request.TaskDelegate? { - get { - var subdelegate: Request.TaskDelegate? - dispatch_sync(subdelegateQueue) { - subdelegate = self.subdelegates[task.taskIdentifier] - } - - return subdelegate - } - - set { - dispatch_barrier_async(subdelegateQueue) { - self.subdelegates[task.taskIdentifier] = newValue - } - } - } - - // MARK: - NSURLSessionDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didBecomeInvalidWithError:`. - public var sessionDidBecomeInvalidWithError: ((NSURLSession, NSError?) -> Void)? - - /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:`. - public var sessionDidReceiveChallenge: ((NSURLSession, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - - /// Overrides default behavior for NSURLSessionDelegate method `URLSessionDidFinishEventsForBackgroundURLSession:`. - public var sessionDidFinishEventsForBackgroundURLSession: ((NSURLSession) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the session has been invalidated. - - - parameter session: The session object that was invalidated. - - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. - */ - public func URLSession(session: NSURLSession, didBecomeInvalidWithError error: NSError?) { - sessionDidBecomeInvalidWithError?(session, error) - } - - /** - Requests credentials from the delegate in response to a session-level authentication request from the remote server. - - - parameter session: The session containing the task that requested authentication. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. - */ - public func URLSession( - session: NSURLSession, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling - var credential: NSURLCredential? - - if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { - (disposition, credential) = sessionDidReceiveChallenge(session, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if let - serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { - disposition = .UseCredential - credential = NSURLCredential(forTrust: serverTrust) - } else { - disposition = .CancelAuthenticationChallenge - } - } - } - - completionHandler(disposition, credential) - } - - /** - Tells the delegate that all messages enqueued for a session have been delivered. - - - parameter session: The session that no longer has any outstanding requests. - */ - public func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession) { - sessionDidFinishEventsForBackgroundURLSession?(session) - } - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:`. - public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didReceiveChallenge:completionHandler:`. - public var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:session:task:needNewBodyStream:`. - public var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream!)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. - public var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didCompleteWithError:`. - public var taskDidComplete: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the remote server requested an HTTP redirect. - - - parameter session: The session containing the task whose request resulted in a redirect. - - parameter task: The task whose request resulted in a redirect. - - parameter response: An object containing the server’s response to the original request. - - parameter request: A URL request object filled out with the new location. - - parameter completionHandler: A closure that your handler should call with either the value of the request - parameter, a modified URL request object, or NULL to refuse the redirect and - return the body of the redirect response. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: ((NSURLRequest?) -> Void)) - { - var redirectRequest: NSURLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - /** - Requests credentials from the delegate in response to an authentication request from the remote server. - - - parameter session: The session containing the task whose request requires authentication. - - parameter task: The task whose request requires authentication. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - completionHandler(taskDidReceiveChallenge(session, task, challenge)) - } else if let delegate = self[task] { - delegate.URLSession( - session, - task: task, - didReceiveChallenge: challenge, - completionHandler: completionHandler - ) - } else { - URLSession(session, didReceiveChallenge: challenge, completionHandler: completionHandler) - } - } - - /** - Tells the delegate when a task requires a new request body stream to send to the remote server. - - - parameter session: The session containing the task that needs a new body stream. - - parameter task: The task that needs a new body stream. - - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - needNewBodyStream completionHandler: ((NSInputStream?) -> Void)) - { - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - completionHandler(taskNeedNewBodyStream(session, task)) - } else if let delegate = self[task] { - delegate.URLSession(session, task: task, needNewBodyStream: completionHandler) - } - } - - /** - Periodically informs the delegate of the progress of sending body content to the server. - - - parameter session: The session containing the data task. - - parameter task: The data task. - - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. - - parameter totalBytesSent: The total number of bytes sent so far. - - parameter totalBytesExpectedToSend: The expected length of the body data. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else if let delegate = self[task] as? Request.UploadTaskDelegate { - delegate.URLSession( - session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend - ) - } - } - - /** - Tells the delegate that the task finished transferring data. - - - parameter session: The session containing the task whose request finished transferring data. - - parameter task: The task whose request finished transferring data. - - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. - */ - public func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { - if let taskDidComplete = taskDidComplete { - taskDidComplete(session, task, error) - } else if let delegate = self[task] { - delegate.URLSession(session, task: task, didCompleteWithError: error) - } - - self[task] = nil - } - - // MARK: - NSURLSessionDataDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveResponse:completionHandler:`. - public var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didBecomeDownloadTask:`. - public var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveData:`. - public var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:`. - public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse!)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the data task received the initial reply (headers) from the server. - - - parameter session: The session containing the data task that received an initial reply. - - parameter dataTask: The data task that received an initial reply. - - parameter response: A URL response object populated with headers. - - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a - constant to indicate whether the transfer should continue as a data task or - should become a download task. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didReceiveResponse response: NSURLResponse, - completionHandler: ((NSURLSessionResponseDisposition) -> Void)) - { - var disposition: NSURLSessionResponseDisposition = .Allow - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - /** - Tells the delegate that the data task was changed to a download task. - - - parameter session: The session containing the task that was replaced by a download task. - - parameter dataTask: The data task that was replaced by a download task. - - parameter downloadTask: The new download task that replaced the data task. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { - if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { - dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) - } else { - let downloadDelegate = Request.DownloadTaskDelegate(task: downloadTask) - self[downloadTask] = downloadDelegate - } - } - - /** - Tells the delegate that the data task has received some of the expected data. - - - parameter session: The session containing the data task that provided data. - - parameter dataTask: The data task that provided data. - - parameter data: A data object containing the transferred data. - */ - public func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { - delegate.URLSession(session, dataTask: dataTask, didReceiveData: data) - } - } - - /** - Asks the delegate whether the data (or upload) task should store the response in the cache. - - - parameter session: The session containing the data (or upload) task. - - parameter dataTask: The data (or upload) task. - - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current - caching policy and the values of certain received headers, such as the Pragma - and Cache-Control headers. - - parameter completionHandler: A block that your handler must call, providing either the original proposed - response, a modified version of that response, or NULL to prevent caching the - response. If your delegate implements this method, it must call this completion - handler; otherwise, your app leaks memory. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: ((NSCachedURLResponse?) -> Void)) - { - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) - } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { - delegate.URLSession( - session, - dataTask: dataTask, - willCacheResponse: proposedResponse, - completionHandler: completionHandler - ) - } else { - completionHandler(proposedResponse) - } - } - - // MARK: - NSURLSessionDownloadDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didFinishDownloadingToURL:`. - public var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> Void)? - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:`. - public var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. - public var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that a download task has finished downloading. - - - parameter session: The session containing the download task that finished. - - parameter downloadTask: The download task that finished. - - parameter location: A file URL for the temporary file. Because the file is temporary, you must either - open the file for reading or move it to a permanent location in your app’s sandbox - container directory before returning from this delegate method. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession(session, downloadTask: downloadTask, didFinishDownloadingToURL: location) - } - } - - /** - Periodically informs the delegate about the download’s progress. - - - parameter session: The session containing the download task. - - parameter downloadTask: The download task. - - parameter bytesWritten: The number of bytes transferred since the last time this delegate - method was called. - - parameter totalBytesWritten: The total number of bytes transferred so far. - - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length - header. If this header was not provided, the value is - `NSURLSessionTransferSizeUnknown`. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession( - session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite - ) - } - } - - /** - Tells the delegate that the download task has resumed downloading. - - - parameter session: The session containing the download task that finished. - - parameter downloadTask: The download task that resumed. See explanation in the discussion. - - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the - existing content, then this value is zero. Otherwise, this value is an - integer representing the number of bytes on disk that do not need to be - retrieved again. - - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. - If this header was not provided, the value is NSURLSessionTransferSizeUnknown. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession( - session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes - ) - } - } - - // MARK: - NSURLSessionStreamDelegate - - var _streamTaskReadClosed: Any? - var _streamTaskWriteClosed: Any? - var _streamTaskBetterRouteDiscovered: Any? - var _streamTaskDidBecomeInputStream: Any? - - // MARK: - NSObject - - public override func respondsToSelector(selector: Selector) -> Bool { - switch selector { - case "URLSession:didBecomeInvalidWithError:": - return sessionDidBecomeInvalidWithError != nil - case "URLSession:didReceiveChallenge:completionHandler:": - return sessionDidReceiveChallenge != nil - case "URLSessionDidFinishEventsForBackgroundURLSession:": - return sessionDidFinishEventsForBackgroundURLSession != nil - case "URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:": - return taskWillPerformHTTPRedirection != nil - case "URLSession:dataTask:didReceiveResponse:completionHandler:": - return dataTaskDidReceiveResponse != nil - default: - return self.dynamicType.instancesRespondToSelector(selector) - } - } - } -} diff --git a/Example/Pods/Alamofire/Source/MultipartFormData.swift b/Example/Pods/Alamofire/Source/MultipartFormData.swift index 24d952c..1ce4d19 100644 --- a/Example/Pods/Alamofire/Source/MultipartFormData.swift +++ b/Example/Pods/Alamofire/Source/MultipartFormData.swift @@ -1,88 +1,88 @@ -// MultipartFormData.swift // -// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// MultipartFormData.swift // -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. import Foundation -#if os(iOS) || os(watchOS) +#if os(iOS) || os(watchOS) || os(tvOS) import MobileCoreServices -#elseif os(OSX) +#elseif os(macOS) import CoreServices #endif -/** - Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode - multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead - to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the - data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for - larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. - - For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well - and the w3 form documentation. - - - https://www.ietf.org/rfc/rfc2388.txt - - https://www.ietf.org/rfc/rfc2045.txt - - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 -*/ -public class MultipartFormData { +/// Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode +/// multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead +/// to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the +/// data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for +/// larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. +/// +/// For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well +/// and the w3 form documentation. +/// +/// - https://www.ietf.org/rfc/rfc2388.txt +/// - https://www.ietf.org/rfc/rfc2045.txt +/// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 +open class MultipartFormData { // MARK: - Helper Types struct EncodingCharacters { - static let CRLF = "\r\n" + static let crlf = "\r\n" } struct BoundaryGenerator { enum BoundaryType { - case Initial, Encapsulated, Final + case initial, encapsulated, final } static func randomBoundary() -> String { return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) } - static func boundaryData(boundaryType boundaryType: BoundaryType, boundary: String) -> NSData { + static func boundaryData(forBoundaryType boundaryType: BoundaryType, boundary: String) -> Data { let boundaryText: String switch boundaryType { - case .Initial: - boundaryText = "--\(boundary)\(EncodingCharacters.CRLF)" - case .Encapsulated: - boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)\(EncodingCharacters.CRLF)" - case .Final: - boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)--\(EncodingCharacters.CRLF)" + case .initial: + boundaryText = "--\(boundary)\(EncodingCharacters.crlf)" + case .encapsulated: + boundaryText = "\(EncodingCharacters.crlf)--\(boundary)\(EncodingCharacters.crlf)" + case .final: + boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)" } - return boundaryText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! + return boundaryText.data(using: String.Encoding.utf8, allowLossyConversion: false)! } } class BodyPart { - let headers: [String: String] - let bodyStream: NSInputStream + let headers: HTTPHeaders + let bodyStream: InputStream let bodyContentLength: UInt64 var hasInitialBoundary = false var hasFinalBoundary = false - init(headers: [String: String], bodyStream: NSInputStream, bodyContentLength: UInt64) { + init(headers: HTTPHeaders, bodyStream: InputStream, bodyContentLength: UInt64) { self.headers = headers self.bodyStream = bodyStream self.bodyContentLength = bodyContentLength @@ -92,7 +92,7 @@ public class MultipartFormData { // MARK: - Properties /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - public var contentType: String { return "multipart/form-data; boundary=\(boundary)" } + open var contentType: String { return "multipart/form-data; boundary=\(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 } } @@ -101,152 +101,137 @@ public class MultipartFormData { public let boundary: String private var bodyParts: [BodyPart] - private var bodyPartError: NSError? + private var bodyPartError: AFError? private let streamBufferSize: Int // MARK: - Lifecycle - /** - Creates a multipart form data object. - - - returns: The multipart form data object. - */ + /// Creates a multipart form data object. + /// + /// - returns: The multipart form data object. public init() { self.boundary = BoundaryGenerator.randomBoundary() self.bodyParts = [] - /** - * The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - * information, please refer to the following article: - * - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - */ + /// + /// The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more + /// information, please refer to the following article: + /// - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html + /// self.streamBufferSize = 1024 } // MARK: - Body Parts - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - - Encoded data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String) { - let headers = contentHeaders(name: name) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) + /// Creates a body part from the data and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) + /// - Encoded data + /// - Multipart form boundary + /// + /// - parameter data: The data to encode into the multipart form data. + /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + public func append(_ data: Data, withName name: String) { + let headers = contentHeaders(withName: name) + let stream = InputStream(data: data) + let length = UInt64(data.count) + + append(stream, withLength: length, headers: headers) } - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - - `Content-Type: #{generated mimeType}` (HTTP Header) - - Encoded data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String, mimeType: String) { - let headers = contentHeaders(name: name, mimeType: mimeType) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) + /// Creates a body part from the data and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) + /// - `Content-Type: #{generated mimeType}` (HTTP Header) + /// - Encoded data + /// - Multipart form boundary + /// + /// - parameter data: The data to encode into the multipart form data. + /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. + public func append(_ data: Data, withName name: String, mimeType: String) { + let headers = contentHeaders(withName: name, mimeType: mimeType) + let stream = InputStream(data: data) + let length = UInt64(data.count) + + append(stream, withLength: length, headers: headers) } - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - - `Content-Type: #{mimeType}` (HTTP Header) - - Encoded file data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) + /// Creates a body part from the data and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) + /// - `Content-Type: #{mimeType}` (HTTP Header) + /// - Encoded file data + /// - Multipart form boundary + /// + /// - parameter data: The data to encode into the multipart form data. + /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + /// - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. + public func append(_ data: Data, withName name: String, fileName: String, mimeType: String) { + let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) + let stream = InputStream(data: data) + let length = UInt64(data.count) + + append(stream, withLength: length, headers: headers) } - /** - Creates a body part from the file and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) - - `Content-Type: #{generated mimeType}` (HTTP Header) - - Encoded file data - - Multipart form boundary - - The filename in the `Content-Disposition` HTTP header is generated from the last path component of the - `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the - system associated MIME type. - - - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - */ - public func appendBodyPart(fileURL fileURL: NSURL, name: String) { - if let - fileName = fileURL.lastPathComponent, - pathExtension = fileURL.pathExtension - { - let mimeType = mimeTypeForPathExtension(pathExtension) - appendBodyPart(fileURL: fileURL, name: name, fileName: fileName, mimeType: mimeType) + /// Creates a body part from the file and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) + /// - `Content-Type: #{generated mimeType}` (HTTP Header) + /// - Encoded file data + /// - Multipart form boundary + /// + /// The filename in the `Content-Disposition` HTTP header is generated from the last path component of the + /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the + /// system associated MIME type. + /// + /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. + /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. + public func append(_ fileURL: URL, withName name: String) { + let fileName = fileURL.lastPathComponent + let pathExtension = fileURL.pathExtension + + if !fileName.isEmpty && !pathExtension.isEmpty { + let mime = mimeType(forPathExtension: pathExtension) + append(fileURL, withName: name, fileName: fileName, mimeType: mime) } else { - let failureReason = "Failed to extract the fileName of the provided URL: \(fileURL)" - setBodyPartError(Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason)) + setBodyPartError(withReason: .bodyPartFilenameInvalid(in: fileURL)) } } - /** - Creates a body part from the file and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) - - Content-Type: #{mimeType} (HTTP Header) - - Encoded file data - - Multipart form boundary - - - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. - */ - public func appendBodyPart(fileURL fileURL: NSURL, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) + /// Creates a body part from the file and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) + /// - Content-Type: #{mimeType} (HTTP Header) + /// - Encoded file data + /// - Multipart form boundary + /// + /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. + /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. + /// - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. + public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) { + let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) //============================================================ // Check 1 - is file URL? //============================================================ - guard fileURL.fileURL else { - let failureReason = "The file URL does not point to a file URL: \(fileURL)" - let error = Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) - setBodyPartError(error) + guard fileURL.isFileURL else { + setBodyPartError(withReason: .bodyPartURLInvalid(url: fileURL)) return } @@ -254,15 +239,14 @@ public class MultipartFormData { // Check 2 - is file URL reachable? //============================================================ - var isReachable = true - - if #available(OSX 10.10, *) { - isReachable = fileURL.checkPromisedItemIsReachableAndReturnError(nil) - } - - guard isReachable else { - let error = Error.errorWithCode(NSURLErrorBadURL, failureReason: "The file URL is not reachable: \(fileURL)") - setBodyPartError(error) + do { + let isReachable = try fileURL.checkPromisedItemIsReachable() + guard isReachable else { + setBodyPartError(withReason: .bodyPartFileNotReachable(at: fileURL)) + return + } + } catch { + setBodyPartError(withReason: .bodyPartFileNotReachableWithError(atURL: fileURL, error: error)) return } @@ -271,14 +255,11 @@ public class MultipartFormData { //============================================================ var isDirectory: ObjCBool = false + let path = fileURL.path - guard let - path = fileURL.path - where NSFileManager.defaultManager().fileExistsAtPath(path, isDirectory: &isDirectory) && !isDirectory else + guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { - let failureReason = "The file URL is a directory, not a file: \(fileURL)" - let error = Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) - setBodyPartError(error) + setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) return } @@ -286,23 +267,18 @@ public class MultipartFormData { // Check 4 - can the file size be extracted? //============================================================ - var bodyContentLength: UInt64? + let bodyContentLength: UInt64 do { - if let - path = fileURL.path, - fileSize = try NSFileManager.defaultManager().attributesOfItemAtPath(path)[NSFileSize] as? NSNumber - { - bodyContentLength = fileSize.unsignedLongLongValue + guard let fileSize = try FileManager.default.attributesOfItem(atPath: path)[.size] as? NSNumber else { + setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL)) + return } - } catch { - // No-op - } - guard let length = bodyContentLength else { - let failureReason = "Could not fetch attributes from the file URL: \(fileURL)" - let error = Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) - setBodyPartError(error) + bodyContentLength = fileSize.uint64Value + } + catch { + setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) return } @@ -310,242 +286,206 @@ public class MultipartFormData { // Check 5 - can a stream be created from file URL? //============================================================ - guard let stream = NSInputStream(URL: fileURL) else { - let failureReason = "Failed to create an input stream from the file URL: \(fileURL)" - let error = Error.errorWithCode(NSURLErrorCannotOpenFile, failureReason: failureReason) - setBodyPartError(error) + guard let stream = InputStream(url: fileURL) else { + setBodyPartError(withReason: .bodyPartInputStreamCreationFailed(for: fileURL)) return } - appendBodyPart(stream: stream, length: length, headers: headers) + append(stream, withLength: bodyContentLength, headers: headers) } - /** - Creates a body part from the stream and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - - `Content-Type: #{mimeType}` (HTTP Header) - - Encoded stream data - - Multipart form boundary - - - parameter stream: The input stream to encode in the multipart form data. - - parameter length: The content length of the stream. - - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. - */ - public func appendBodyPart( - stream stream: NSInputStream, - length: UInt64, + /// Creates a body part from the stream and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) + /// - `Content-Type: #{mimeType}` (HTTP Header) + /// - Encoded stream data + /// - Multipart form boundary + /// + /// - parameter stream: The input stream to encode in the multipart form data. + /// - parameter length: The content length of the stream. + /// - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. + /// - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. + /// - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. + public func append( + _ stream: InputStream, + withLength length: UInt64, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - appendBodyPart(stream: stream, length: length, headers: headers) + let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) + append(stream, withLength: length, headers: headers) } - /** - Creates a body part with the headers, stream and length and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - HTTP headers - - Encoded stream data - - Multipart form boundary - - - parameter stream: The input stream to encode in the multipart form data. - - parameter length: The content length of the stream. - - parameter headers: The HTTP headers for the body part. - */ - public func appendBodyPart(stream stream: NSInputStream, length: UInt64, headers: [String: String]) { + /// Creates a body part with the headers, stream and length and appends it to the multipart form data object. + /// + /// The body part data will be encoded using the following format: + /// + /// - HTTP headers + /// - Encoded stream data + /// - Multipart form boundary + /// + /// - parameter stream: The input stream to encode in the multipart form data. + /// - parameter length: The content length of the stream. + /// - parameter headers: The HTTP headers for the body part. + public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) { let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) bodyParts.append(bodyPart) } // MARK: - Data Encoding - /** - Encodes all the appended body parts into a single `NSData` object. - - It is important to note that this method will load all the appended body parts into memory all at the same - time. This method should only be used when the encoded data will have a small memory footprint. For large data - cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. - - - throws: An `NSError` if encoding encounters an error. - - - returns: The encoded `NSData` if encoding is successful. - */ - public func encode() throws -> NSData { + /// Encodes all the appended body parts into a single `Data` value. + /// + /// It is important to note that this method will load all the appended body parts into memory all at the same + /// time. This method should only be used when the encoded data will have a small memory footprint. For large data + /// cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. + /// + /// - throws: An `AFError` if encoding encounters an error. + /// + /// - returns: The encoded `Data` if encoding is successful. + public func encode() throws -> Data { if let bodyPartError = bodyPartError { throw bodyPartError } - let encoded = NSMutableData() + var encoded = Data() bodyParts.first?.hasInitialBoundary = true bodyParts.last?.hasFinalBoundary = true for bodyPart in bodyParts { - let encodedData = try encodeBodyPart(bodyPart) - encoded.appendData(encodedData) + let encodedData = try encode(bodyPart) + encoded.append(encodedData) } return encoded } - /** - Writes the appended body parts into the given file URL. - - This process is facilitated by reading and writing with input and output streams, respectively. Thus, - this approach is very memory efficient and should be used for large body part data. - - - parameter fileURL: The file URL to write the multipart form data into. - - - throws: An `NSError` if encoding encounters an error. - */ - public func writeEncodedDataToDisk(fileURL: NSURL) throws { + /// Writes the appended body parts into the given file URL. + /// + /// This process is facilitated by reading and writing with input and output streams, respectively. Thus, + /// this approach is very memory efficient and should be used for large body part data. + /// + /// - parameter fileURL: The file URL to write the multipart form data into. + /// + /// - throws: An `AFError` if encoding encounters an error. + public func writeEncodedData(to fileURL: URL) throws { if let bodyPartError = bodyPartError { throw bodyPartError } - if let path = fileURL.path where NSFileManager.defaultManager().fileExistsAtPath(path) { - let failureReason = "A file already exists at the given file URL: \(fileURL)" - throw Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) - } else if !fileURL.fileURL { - let failureReason = "The URL does not point to a valid file: \(fileURL)" - throw Error.errorWithCode(NSURLErrorBadURL, failureReason: failureReason) + if FileManager.default.fileExists(atPath: fileURL.path) { + throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL)) + } else if !fileURL.isFileURL { + throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL)) } - let outputStream: NSOutputStream - - if let possibleOutputStream = NSOutputStream(URL: fileURL, append: false) { - outputStream = possibleOutputStream - } else { - let failureReason = "Failed to create an output stream with the given URL: \(fileURL)" - throw Error.errorWithCode(NSURLErrorCannotOpenFile, failureReason: failureReason) + guard let outputStream = OutputStream(url: fileURL, append: false) else { + throw AFError.multipartEncodingFailed(reason: .outputStreamCreationFailed(for: fileURL)) } - outputStream.scheduleInRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) outputStream.open() + defer { outputStream.close() } self.bodyParts.first?.hasInitialBoundary = true self.bodyParts.last?.hasFinalBoundary = true for bodyPart in self.bodyParts { - try writeBodyPart(bodyPart, toOutputStream: outputStream) + try write(bodyPart, to: outputStream) } - - outputStream.close() - outputStream.removeFromRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) } // MARK: - Private - Body Part Encoding - private func encodeBodyPart(bodyPart: BodyPart) throws -> NSData { - let encoded = NSMutableData() + private func encode(_ bodyPart: BodyPart) throws -> Data { + var encoded = Data() let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - encoded.appendData(initialData) + encoded.append(initialData) - let headerData = encodeHeaderDataForBodyPart(bodyPart) - encoded.appendData(headerData) + let headerData = encodeHeaders(for: bodyPart) + encoded.append(headerData) - let bodyStreamData = try encodeBodyStreamDataForBodyPart(bodyPart) - encoded.appendData(bodyStreamData) + let bodyStreamData = try encodeBodyStream(for: bodyPart) + encoded.append(bodyStreamData) if bodyPart.hasFinalBoundary { - encoded.appendData(finalBoundaryData()) + encoded.append(finalBoundaryData()) } return encoded } - private func encodeHeaderDataForBodyPart(bodyPart: BodyPart) -> NSData { + private func encodeHeaders(for bodyPart: BodyPart) -> Data { var headerText = "" for (key, value) in bodyPart.headers { - headerText += "\(key): \(value)\(EncodingCharacters.CRLF)" + headerText += "\(key): \(value)\(EncodingCharacters.crlf)" } - headerText += EncodingCharacters.CRLF + headerText += EncodingCharacters.crlf - return headerText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! + return headerText.data(using: String.Encoding.utf8, allowLossyConversion: false)! } - private func encodeBodyStreamDataForBodyPart(bodyPart: BodyPart) throws -> NSData { + private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data { let inputStream = bodyPart.bodyStream - inputStream.scheduleInRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) inputStream.open() + defer { inputStream.close() } - var error: NSError? - let encoded = NSMutableData() + var encoded = Data() while inputStream.hasBytesAvailable { - var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) + var buffer = [UInt8](repeating: 0, count: streamBufferSize) let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - if inputStream.streamError != nil { - error = inputStream.streamError - break + if let error = inputStream.streamError { + throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error)) } if bytesRead > 0 { - encoded.appendBytes(buffer, length: bytesRead) - } else if bytesRead < 0 { - let failureReason = "Failed to read from input stream: \(inputStream)" - error = Error.errorWithCode(.InputStreamReadFailed, failureReason: failureReason) - break + encoded.append(buffer, count: bytesRead) } else { break } } - inputStream.close() - inputStream.removeFromRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) - - if let error = error { - throw error - } - return encoded } // MARK: - Private - Writing Body Part to Output Stream - private func writeBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - try writeInitialBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) - try writeHeaderDataForBodyPart(bodyPart, toOutputStream: outputStream) - try writeBodyStreamForBodyPart(bodyPart, toOutputStream: outputStream) - try writeFinalBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) + private func write(_ bodyPart: BodyPart, to outputStream: OutputStream) throws { + try writeInitialBoundaryData(for: bodyPart, to: outputStream) + try writeHeaderData(for: bodyPart, to: outputStream) + try writeBodyStream(for: bodyPart, to: outputStream) + try writeFinalBoundaryData(for: bodyPart, to: outputStream) } - private func writeInitialBoundaryDataForBodyPart( - bodyPart: BodyPart, - toOutputStream outputStream: NSOutputStream) - throws - { + private func writeInitialBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - return try writeData(initialData, toOutputStream: outputStream) + return try write(initialData, to: outputStream) } - private func writeHeaderDataForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - let headerData = encodeHeaderDataForBodyPart(bodyPart) - return try writeData(headerData, toOutputStream: outputStream) + private func writeHeaderData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { + let headerData = encodeHeaders(for: bodyPart) + return try write(headerData, to: outputStream) } - private func writeBodyStreamForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { + private func writeBodyStream(for bodyPart: BodyPart, to outputStream: OutputStream) throws { let inputStream = bodyPart.bodyStream - inputStream.scheduleInRunLoop(NSRunLoop.currentRunLoop(), forMode: NSDefaultRunLoopMode) + inputStream.open() + defer { inputStream.close() } while inputStream.hasBytesAvailable { - var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) + var buffer = [UInt8](repeating: 0, count: streamBufferSize) let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) if let streamError = inputStream.streamError { - throw streamError + throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: streamError)) } if bytesRead > 0 { @@ -553,71 +493,52 @@ public class MultipartFormData { buffer = Array(buffer[0.. 0 { - if outputStream.hasSpaceAvailable { - let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) + while bytesToWrite > 0, outputStream.hasSpaceAvailable { + let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) - if let streamError = outputStream.streamError { - throw streamError - } - - if bytesWritten < 0 { - let failureReason = "Failed to write to output stream: \(outputStream)" - throw Error.errorWithCode(.OutputStreamWriteFailed, failureReason: failureReason) - } + if let error = outputStream.streamError { + throw AFError.multipartEncodingFailed(reason: .outputStreamWriteFailed(error: error)) + } - bytesToWrite -= bytesWritten + bytesToWrite -= bytesWritten - if bytesToWrite > 0 { - buffer = Array(buffer[bytesWritten.. 0 { + buffer = Array(buffer[bytesWritten.. String { - if let - id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension, nil)?.takeRetainedValue(), - contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() + private func mimeType(forPathExtension pathExtension: String) -> String { + if + let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(), + let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() { return contentType as String } @@ -627,43 +548,34 @@ public class MultipartFormData { // MARK: - Private - Content Headers - private func contentHeaders(name name: String) -> [String: String] { - return ["Content-Disposition": "form-data; name=\"\(name)\""] - } + private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> [String: String] { + var disposition = "form-data; name=\"\(name)\"" + if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" } - private func contentHeaders(name name: String, mimeType: String) -> [String: String] { - return [ - "Content-Disposition": "form-data; name=\"\(name)\"", - "Content-Type": "\(mimeType)" - ] - } + var headers = ["Content-Disposition": disposition] + if let mimeType = mimeType { headers["Content-Type"] = mimeType } - private func contentHeaders(name name: String, fileName: String, mimeType: String) -> [String: String] { - return [ - "Content-Disposition": "form-data; name=\"\(name)\"; filename=\"\(fileName)\"", - "Content-Type": "\(mimeType)" - ] + return headers } // MARK: - Private - Boundary Encoding - private func initialBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Initial, boundary: boundary) + private func initialBoundaryData() -> Data { + return BoundaryGenerator.boundaryData(forBoundaryType: .initial, boundary: boundary) } - private func encapsulatedBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Encapsulated, boundary: boundary) + private func encapsulatedBoundaryData() -> Data { + return BoundaryGenerator.boundaryData(forBoundaryType: .encapsulated, boundary: boundary) } - private func finalBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Final, boundary: boundary) + private func finalBoundaryData() -> Data { + return BoundaryGenerator.boundaryData(forBoundaryType: .final, boundary: boundary) } // MARK: - Private - Errors - private func setBodyPartError(error: NSError) { - if bodyPartError == nil { - bodyPartError = error - } + private func setBodyPartError(withReason reason: AFError.MultipartEncodingFailureReason) { + guard bodyPartError == nil else { return } + bodyPartError = AFError.multipartEncodingFailed(reason: reason) } } diff --git a/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift new file mode 100644 index 0000000..c06a60e --- /dev/null +++ b/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -0,0 +1,240 @@ +// +// NetworkReachabilityManager.swift +// +// Copyright (c) 2014-2016 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 +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +#if !os(watchOS) + +import Foundation +import SystemConfiguration + +/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and +/// WiFi network interfaces. +/// +/// Reachability can be used to determine background information about why a network operation failed, or to retry +/// network requests when a connection is established. It should not be used to prevent a user from initiating a network +/// request, as it's possible that an initial request may be required to establish reachability. +open class NetworkReachabilityManager { + /** + Defines the various states of network reachability. + + - Unknown: It is unknown whether the network is reachable. + - NotReachable: The network is not reachable. + - ReachableOnWWAN: The network is reachable over the WWAN connection. + - ReachableOnWiFi: The network is reachable over the WiFi connection. + */ + + + /// Defines the various states of network reachability. + /// + /// - unknown: It is unknown whether the network is reachable. + /// - notReachable: The network is not reachable. + /// - reachable: The network is reachable. + public enum NetworkReachabilityStatus { + case unknown + case notReachable + case reachable(ConnectionType) + } + + /// Defines the various connection types detected by reachability flags. + /// + /// - ethernetOrWiFi: The connection type is either over Ethernet or WiFi. + /// - wwan: The connection type is a WWAN connection. + public enum ConnectionType { + case ethernetOrWiFi + case wwan + } + + /// A closure executed when the network reachability status changes. The closure takes a single argument: the + /// network reachability status. + public typealias Listener = (NetworkReachabilityStatus) -> Void + + // MARK: - Properties + + /// Whether the network is currently reachable. + open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } + + /// Whether the network is currently reachable over the WWAN interface. + open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } + + /// Whether the network is currently reachable over Ethernet or WiFi interface. + open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } + + /// The current network reachability status. + open var networkReachabilityStatus: NetworkReachabilityStatus { + guard let flags = self.flags else { return .unknown } + return networkReachabilityStatusForFlags(flags) + } + + /// The dispatch queue to execute the `listener` closure on. + open var listenerQueue: DispatchQueue = DispatchQueue.main + + /// A closure executed when the network reachability status changes. + open var listener: Listener? + + private var flags: SCNetworkReachabilityFlags? { + var flags = SCNetworkReachabilityFlags() + + if SCNetworkReachabilityGetFlags(reachability, &flags) { + return flags + } + + return nil + } + + private let reachability: SCNetworkReachability + private var previousFlags: SCNetworkReachabilityFlags + + // MARK: - Initialization + + /// Creates a `NetworkReachabilityManager` instance with the specified host. + /// + /// - parameter host: The host used to evaluate network reachability. + /// + /// - returns: The new `NetworkReachabilityManager` instance. + public convenience init?(host: String) { + guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } + self.init(reachability: reachability) + } + + /// Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. + /// + /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing + /// status of the device, both IPv4 and IPv6. + /// + /// - returns: The new `NetworkReachabilityManager` instance. + public convenience init?() { + var address = sockaddr_in() + address.sin_len = UInt8(MemoryLayout.size) + address.sin_family = sa_family_t(AF_INET) + + guard let reachability = withUnsafePointer(to: &address, { pointer in + return pointer.withMemoryRebound(to: sockaddr.self, capacity: MemoryLayout.size) { + return SCNetworkReachabilityCreateWithAddress(nil, $0) + } + }) else { return nil } + + self.init(reachability: reachability) + } + + private init(reachability: SCNetworkReachability) { + self.reachability = reachability + self.previousFlags = SCNetworkReachabilityFlags() + } + + deinit { + stopListening() + } + + // MARK: - Listening + + /// Starts listening for changes in network reachability status. + /// + /// - returns: `true` if listening was started successfully, `false` otherwise. + @discardableResult + open func startListening() -> Bool { + var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) + context.info = Unmanaged.passUnretained(self).toOpaque() + + let callbackEnabled = SCNetworkReachabilitySetCallback( + reachability, + { (_, flags, info) in + let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() + reachability.notifyListener(flags) + }, + &context + ) + + let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue) + + listenerQueue.async { + self.previousFlags = SCNetworkReachabilityFlags() + self.notifyListener(self.flags ?? SCNetworkReachabilityFlags()) + } + + return callbackEnabled && queueEnabled + } + + /// Stops listening for changes in network reachability status. + open func stopListening() { + SCNetworkReachabilitySetCallback(reachability, nil, nil) + SCNetworkReachabilitySetDispatchQueue(reachability, nil) + } + + // MARK: - Internal - Listener Notification + + func notifyListener(_ flags: SCNetworkReachabilityFlags) { + guard previousFlags != flags else { return } + previousFlags = flags + + listener?(networkReachabilityStatusForFlags(flags)) + } + + // MARK: - Internal - Network Reachability Status + + func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { + guard flags.contains(.reachable) else { return .notReachable } + + var networkStatus: NetworkReachabilityStatus = .notReachable + + if !flags.contains(.connectionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } + + if flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) { + if !flags.contains(.interventionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } + } + + #if os(iOS) + if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } + #endif + + return networkStatus + } +} + +// MARK: - + +extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} + +/// Returns whether the two network reachability status values are equal. +/// +/// - parameter lhs: The left-hand side value to compare. +/// - parameter rhs: The right-hand side value to compare. +/// +/// - returns: `true` if the two values are equal, `false` otherwise. +public func ==( + lhs: NetworkReachabilityManager.NetworkReachabilityStatus, + rhs: NetworkReachabilityManager.NetworkReachabilityStatus) + -> Bool +{ + switch (lhs, rhs) { + case (.unknown, .unknown): + return true + case (.notReachable, .notReachable): + return true + case let (.reachable(lhsConnectionType), .reachable(rhsConnectionType)): + return lhsConnectionType == rhsConnectionType + default: + return false + } +} + +#endif diff --git a/Example/Pods/Alamofire/Source/Notifications.swift b/Example/Pods/Alamofire/Source/Notifications.swift new file mode 100644 index 0000000..81f6e37 --- /dev/null +++ b/Example/Pods/Alamofire/Source/Notifications.swift @@ -0,0 +1,52 @@ +// +// Notifications.swift +// +// Copyright (c) 2014-2016 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 +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Notification.Name { + /// Used as a namespace for all `URLSessionTask` related notifications. + public struct Task { + /// Posted when a `URLSessionTask` is resumed. The notification `object` contains the resumed `URLSessionTask`. + public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume") + + /// Posted when a `URLSessionTask` is suspended. The notification `object` contains the suspended `URLSessionTask`. + public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend") + + /// Posted when a `URLSessionTask` is cancelled. The notification `object` contains the cancelled `URLSessionTask`. + public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel") + + /// Posted when a `URLSessionTask` is completed. The notification `object` contains the completed `URLSessionTask`. + public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete") + } +} + +// MARK: - + +extension Notification { + /// Used as a namespace for all `Notification` user info dictionary keys. + public struct Key { + /// User info dictionary key representing the `URLSessionTask` associated with the notification. + public static let Task = "org.alamofire.notification.key.task" + } +} diff --git a/Example/Pods/Alamofire/Source/ParameterEncoding.swift b/Example/Pods/Alamofire/Source/ParameterEncoding.swift index 94f7d42..42b5b2d 100644 --- a/Example/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/Example/Pods/Alamofire/Source/ParameterEncoding.swift @@ -1,187 +1,176 @@ -// ParameterEncoding.swift // -// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// ParameterEncoding.swift // -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. import Foundation -/** - HTTP method definitions. +/// HTTP method definitions. +/// +/// See https://tools.ietf.org/html/rfc7231#section-4.3 +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} - See https://tools.ietf.org/html/rfc7231#section-4.3 -*/ -public enum Method: String { - case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT +// MARK: - + +/// A dictionary of parameters to apply to a `URLRequest`. +public typealias Parameters = [String: Any] + +/// A type used to define how a set of parameters are applied to a `URLRequest`. +public protocol ParameterEncoding { + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. + /// + /// - throws: An `AFError.parameterEncodingFailed` error if encoding fails. + /// + /// - returns: The encoded request. + func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest } -// MARK: ParameterEncoding - -/** - Used to specify the way in which a set of parameters are applied to a URL request. - - - `URL`: Creates a query string to be set as or appended to any existing URL query for `GET`, `HEAD`, - and `DELETE` requests, or set as the body for requests with any other HTTP method. The - `Content-Type` HTTP header field of an encoded request with HTTP body is set to - `application/x-www-form-urlencoded; charset=utf-8`. Since there is no published specification - for how to encode collection types, the convention of appending `[]` to the key for array - values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested - dictionary values (`foo[bar]=baz`). - - - `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same - implementation as the `.URL` case, but always applies the encoded result to the URL. - - - `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is - set as the body of the request. The `Content-Type` HTTP header field of an encoded request is - set to `application/json`. - - - `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, - according to the associated format and write options values, which is set as the body of the - request. The `Content-Type` HTTP header field of an encoded request is set to - `application/x-plist`. - - - `Custom`: Uses the associated closure value to construct a new request given an existing request and - parameters. -*/ -public enum ParameterEncoding { - case URL - case URLEncodedInURL - case JSON - case PropertyList(NSPropertyListFormat, NSPropertyListWriteOptions) - case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) - - /** - Creates a URL request by encoding parameters and applying them onto an existing request. - - - parameter URLRequest: The request to have parameters applied - - parameter parameters: The parameters to apply - - - returns: A tuple containing the constructed request and the error that occurred during parameter encoding, - if any. - */ - public func encode( - URLRequest: URLRequestConvertible, - parameters: [String: AnyObject]?) - -> (NSMutableURLRequest, NSError?) - { - var mutableURLRequest = URLRequest.URLRequest +// MARK: - + +/// Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP +/// body of the URL request. Whether the query string is set or appended to any existing URL query string or set as +/// the HTTP body depends on the destination of the encoding. +/// +/// The `Content-Type` HTTP header field of an encoded request with HTTP body is set to +/// `application/x-www-form-urlencoded; charset=utf-8`. Since there is no published specification for how to encode +/// collection types, the convention of appending `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending +/// the key surrounded by square brackets for nested dictionary values (`foo[bar]=baz`). +public struct URLEncoding: ParameterEncoding { + + // MARK: Helper Types + + /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the + /// resulting URL request. + /// + /// - methodDependent: Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` + /// requests and sets as the HTTP body for requests with any other HTTP method. + /// - queryString: Sets or appends encoded query string result to existing query string. + /// - httpBody: Sets encoded query string result as the HTTP body of the URL request. + public enum Destination { + case methodDependent, queryString, httpBody + } - guard let parameters = parameters else { - return (mutableURLRequest, nil) - } + // MARK: Properties - var encodingError: NSError? = nil + /// Returns a default `URLEncoding` instance. + public static var `default`: URLEncoding { return URLEncoding() } - switch self { - case .URL, .URLEncodedInURL: - func query(parameters: [String: AnyObject]) -> String { - var components: [(String, String)] = [] - for key in Array(parameters.keys).sort(<) { - let value = parameters[key]! - components += queryComponents(key, value) - } + /// Returns a `URLEncoding` instance with a `.methodDependent` destination. + public static var methodDependent: URLEncoding { return URLEncoding() } - return (components.map { "\($0)=\($1)" } as [String]).joinWithSeparator("&") - } + /// Returns a `URLEncoding` instance with a `.queryString` destination. + public static var queryString: URLEncoding { return URLEncoding(destination: .queryString) } - func encodesParametersInURL(method: Method) -> Bool { - switch self { - case .URLEncodedInURL: - return true - default: - break - } - - switch method { - case .GET, .HEAD, .DELETE: - return true - default: - return false - } - } + /// Returns a `URLEncoding` instance with an `.httpBody` destination. + public static var httpBody: URLEncoding { return URLEncoding(destination: .httpBody) } - if let method = Method(rawValue: mutableURLRequest.HTTPMethod) where encodesParametersInURL(method) { - if let URLComponents = NSURLComponents(URL: mutableURLRequest.URL!, resolvingAgainstBaseURL: false) { - let percentEncodedQuery = (URLComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) - URLComponents.percentEncodedQuery = percentEncodedQuery - mutableURLRequest.URL = URLComponents.URL - } - } else { - if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { - mutableURLRequest.setValue( - "application/x-www-form-urlencoded; charset=utf-8", - forHTTPHeaderField: "Content-Type" - ) - } - - mutableURLRequest.HTTPBody = query(parameters).dataUsingEncoding( - NSUTF8StringEncoding, - allowLossyConversion: false - ) + /// The destination defining where the encoded query string is to be applied to the URL request. + public let destination: Destination + + // MARK: Initialization + + /// Creates a `URLEncoding` instance using the specified destination. + /// + /// - parameter destination: The destination defining where the encoded query string is to be applied. + /// + /// - returns: The new `URLEncoding` instance. + public init(destination: Destination = .methodDependent) { + self.destination = destination + } + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let parameters = parameters else { return urlRequest } + + if let method = HTTPMethod(rawValue: urlRequest.httpMethod ?? "GET"), encodesParametersInURL(with: method) { + guard let url = urlRequest.url else { + throw AFError.parameterEncodingFailed(reason: .missingURL) } - case .JSON: - do { - let options = NSJSONWritingOptions() - let data = try NSJSONSerialization.dataWithJSONObject(parameters, options: options) - - mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - mutableURLRequest.HTTPBody = data - } catch { - encodingError = error as NSError + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + let percentEncodedQuery = (urlComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) + urlComponents.percentEncodedQuery = percentEncodedQuery + urlRequest.url = urlComponents.url } - case .PropertyList(let format, let options): - do { - let data = try NSPropertyListSerialization.dataWithPropertyList( - parameters, - format: format, - options: options - ) - mutableURLRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") - mutableURLRequest.HTTPBody = data - } catch { - encodingError = error as NSError + } else { + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type") } - case .Custom(let closure): - (mutableURLRequest, encodingError) = closure(mutableURLRequest, parameters) + + urlRequest.httpBody = query(parameters).data(using: .utf8, allowLossyConversion: false) } - return (mutableURLRequest, encodingError) + return urlRequest } - /** - Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. - - - parameter key: The key of the query component. - - parameter value: The value of the query component. - - - returns: The percent-escaped, URL encoded query string components. - */ - public func queryComponents(key: String, _ value: AnyObject) -> [(String, String)] { + /// Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. + /// + /// - parameter key: The key of the query component. + /// - parameter value: The value of the query component. + /// + /// - returns: The percent-escaped, URL encoded query string components. + public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] { var components: [(String, String)] = [] - if let dictionary = value as? [String: AnyObject] { + + if let dictionary = value as? [String: Any] { for (nestedKey, value) in dictionary { - components += queryComponents("\(key)[\(nestedKey)]", value) + components += queryComponents(fromKey: "\(key)[\(nestedKey)]", value: value) } - } else if let array = value as? [AnyObject] { + } else if let array = value as? [Any] { for value in array { - components += queryComponents("\(key)[]", value) + components += queryComponents(fromKey: "\(key)[]", value: value) } + } else if let value = value as? NSNumber { + if value.isBool { + components.append((escape(key), escape((value.boolValue ? "1" : "0")))) + } else { + components.append((escape(key), escape("\(value)"))) + } + } else if let bool = value as? Bool { + components.append((escape(key), escape((bool ? "1" : "0")))) } else { components.append((escape(key), escape("\(value)"))) } @@ -189,57 +178,196 @@ public enum ParameterEncoding { return components } - /** - Returns a percent-escaped string following RFC 3986 for a query string key or value. + /// Returns a percent-escaped string following RFC 3986 for a query string key or value. + /// + /// RFC 3986 states that the following characters are "reserved" characters. + /// + /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" + /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + /// + /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow + /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" + /// should be percent-escaped in the query string. + /// + /// - parameter string: The string to be percent-escaped. + /// + /// - returns: The percent-escaped string. + public func escape(_ string: String) -> String { + let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 + let subDelimitersToEncode = "!$&'()*+,;=" - RFC 3986 states that the following characters are "reserved" characters. + var allowedCharacterSet = CharacterSet.urlQueryAllowed + allowedCharacterSet.remove(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") - - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + return string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? string + } - In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow - query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" - should be percent-escaped in the query string. + private func query(_ parameters: [String: Any]) -> String { + var components: [(String, String)] = [] - - parameter string: The string to be percent-escaped. + for key in parameters.keys.sorted(by: <) { + let value = parameters[key]! + components += queryComponents(fromKey: key, value: value) + } - - returns: The percent-escaped string. - */ - public func escape(string: String) -> String { - let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" + return components.map { "\($0)=\($1)" }.joined(separator: "&") + } + + private func encodesParametersInURL(with method: HTTPMethod) -> Bool { + switch destination { + case .queryString: + return true + case .httpBody: + return false + default: + break + } - let allowedCharacterSet = NSCharacterSet.URLQueryAllowedCharacterSet().mutableCopy() as! NSMutableCharacterSet - allowedCharacterSet.removeCharactersInString(generalDelimitersToEncode + subDelimitersToEncode) + switch method { + case .get, .head, .delete: + return true + default: + return false + } + } +} + +// MARK: - + +/// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the +/// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. +public struct JSONEncoding: ParameterEncoding { + + // MARK: Properties + + /// Returns a `JSONEncoding` instance with default writing options. + public static var `default`: JSONEncoding { return JSONEncoding() } + + /// Returns a `JSONEncoding` instance with `.prettyPrinted` writing options. + public static var prettyPrinted: JSONEncoding { return JSONEncoding(options: .prettyPrinted) } + + /// The options for writing the parameters as JSON data. + public let options: JSONSerialization.WritingOptions + + // MARK: Initialization + + /// Creates a `JSONEncoding` instance using the specified options. + /// + /// - parameter options: The options for writing the parameters as JSON data. + /// + /// - returns: The new `JSONEncoding` instance. + public init(options: JSONSerialization.WritingOptions = []) { + self.options = options + } + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let parameters = parameters else { return urlRequest } + + do { + let data = try JSONSerialization.data(withJSONObject: parameters, options: options) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = data + } catch { + throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) + } + + return urlRequest + } +} + +// MARK: - + +/// Uses `PropertyListSerialization` to create a plist representation of the parameters object, according to the +/// associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header +/// field of an encoded request is set to `application/x-plist`. +public struct PropertyListEncoding: ParameterEncoding { + + // MARK: Properties - //========================================================================================================== - // - // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few - // hundred Chinense characters causes various malloc error crashes. To avoid this issue until iOS 8 is no - // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more - // info, please refer to: - // - // - https://github.com/Alamofire/Alamofire/issues/206 - // - //========================================================================================================== + /// Returns a default `PropertyListEncoding` instance. + public static var `default`: PropertyListEncoding { return PropertyListEncoding() } - let batchSize = 50 - var index = string.startIndex + /// Returns a `PropertyListEncoding` instance with xml formatting and default writing options. + public static var xml: PropertyListEncoding { return PropertyListEncoding(format: .xml) } - var escaped = "" + /// Returns a `PropertyListEncoding` instance with binary formatting and default writing options. + public static var binary: PropertyListEncoding { return PropertyListEncoding(format: .binary) } - while index != string.endIndex { - let startIndex = index - let endIndex = index.advancedBy(batchSize, limit: string.endIndex) - let range = Range(start: startIndex, end: endIndex) + /// The property list serialization format. + public let format: PropertyListSerialization.PropertyListFormat - let substring = string.substringWithRange(range) + /// The options for writing the parameters as plist data. + public let options: PropertyListSerialization.WriteOptions - escaped += substring.stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacterSet) ?? substring + // MARK: Initialization - index = endIndex + /// Creates a `PropertyListEncoding` instance using the specified format and options. + /// + /// - parameter format: The property list serialization format. + /// - parameter options: The options for writing the parameters as plist data. + /// + /// - returns: The new `PropertyListEncoding` instance. + public init( + format: PropertyListSerialization.PropertyListFormat = .xml, + options: PropertyListSerialization.WriteOptions = 0) + { + self.format = format + self.options = options + } + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let parameters = parameters else { return urlRequest } + + do { + let data = try PropertyListSerialization.data( + fromPropertyList: parameters, + format: format, + options: options + ) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = data + } catch { + throw AFError.parameterEncodingFailed(reason: .propertyListEncodingFailed(error: error)) } - return escaped + return urlRequest } } + +// MARK: - + +extension NSNumber { + fileprivate var isBool: Bool { return CFBooleanGetTypeID() == CFGetTypeID(self) } +} diff --git a/Example/Pods/Alamofire/Source/Request.swift b/Example/Pods/Alamofire/Source/Request.swift index 8df4856..85eb869 100644 --- a/Example/Pods/Alamofire/Source/Request.swift +++ b/Example/Pods/Alamofire/Source/Request.swift @@ -1,536 +1,600 @@ -// Request.swift // -// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// Request.swift // -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. import Foundation -/** - Responsible for sending a request and receiving the response and associated data from the server, as well as - managing its underlying `NSURLSessionTask`. -*/ -public class Request { +/// A type that can inspect and optionally adapt a `URLRequest` in some manner if necessary. +public protocol RequestAdapter { + /// Inspects and adapts the specified `URLRequest` in some manner if necessary and returns the result. + /// + /// - parameter urlRequest: The URL request to adapt. + /// + /// - throws: An `Error` if the adaptation encounters an error. + /// + /// - returns: The adapted `URLRequest`. + func adapt(_ urlRequest: URLRequest) throws -> URLRequest +} + +// MARK: - + +/// A closure executed when the `RequestRetrier` determines whether a `Request` should be retried or not. +public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: TimeInterval) -> Void + +/// A type that determines whether a request should be retried after being executed by the specified session manager +/// and encountering an error. +public protocol RequestRetrier { + /// Determines whether the `Request` should be retried by calling the `completion` closure. + /// + /// This operation is fully asychronous. Any amount of time can be taken to determine whether the request needs + /// to be retried. The one requirement is that the completion closure is called to ensure the request is properly + /// cleaned up after. + /// + /// - parameter manager: The session manager the request was executed on. + /// - parameter request: The request that failed due to the encountered error. + /// - parameter error: The error encountered when executing the request. + /// - parameter completion: The completion closure to be executed when retry decision has been determined. + func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) +} + +// MARK: - + +protocol TaskConvertible { + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask +} + +/// A dictionary of headers to apply to a `URLRequest`. +public typealias HTTPHeaders = [String: String] + +// MARK: - + +/// Responsible for sending a request and receiving the response and associated data from the server, as well as +/// managing its underlying `URLSessionTask`. +open class Request { - // MARK: - Properties + // MARK: Helper Types + + /// A closure executed when monitoring upload or download progress of a request. + public typealias ProgressHandler = (Progress) -> Void + + enum RequestTask { + case data(TaskConvertible?, URLSessionTask?) + case download(TaskConvertible?, URLSessionTask?) + case upload(TaskConvertible?, URLSessionTask?) + case stream(TaskConvertible?, URLSessionTask?) + } + + // MARK: Properties /// The delegate for the underlying task. - public let delegate: TaskDelegate + open internal(set) var delegate: TaskDelegate { + get { + taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } + return taskDelegate + } + set { + taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } + taskDelegate = newValue + } + } /// The underlying task. - public var task: NSURLSessionTask { return delegate.task } + open var task: URLSessionTask? { return delegate.task } /// The session belonging to the underlying task. - public let session: NSURLSession + open let session: URLSession /// The request sent or to be sent to the server. - public var request: NSURLRequest? { return task.originalRequest } + open var request: URLRequest? { return task?.originalRequest } /// The response received from the server, if any. - public var response: NSHTTPURLResponse? { return task.response as? NSHTTPURLResponse } + open var response: HTTPURLResponse? { return task?.response as? HTTPURLResponse } - /// The progress of the request lifecycle. - public var progress: NSProgress { return delegate.progress } + let originalTask: TaskConvertible? - // MARK: - Lifecycle + var startTime: CFAbsoluteTime? + var endTime: CFAbsoluteTime? - init(session: NSURLSession, task: NSURLSessionTask) { - self.session = session + var validations: [() -> Void] = [] - switch task { - case is NSURLSessionUploadTask: - self.delegate = UploadTaskDelegate(task: task) - case is NSURLSessionDataTask: - self.delegate = DataTaskDelegate(task: task) - case is NSURLSessionDownloadTask: - self.delegate = DownloadTaskDelegate(task: task) - default: - self.delegate = TaskDelegate(task: task) - } - } + private var taskDelegate: TaskDelegate + private var taskDelegateLock = NSLock() - // MARK: - Authentication + // MARK: Lifecycle - /** - Associates an HTTP Basic credential with the request. + init(session: URLSession, requestTask: RequestTask, error: Error? = nil) { + self.session = session + + switch requestTask { + case .data(let originalTask, let task): + taskDelegate = DataTaskDelegate(task: task) + self.originalTask = originalTask + case .download(let originalTask, let task): + taskDelegate = DownloadTaskDelegate(task: task) + self.originalTask = originalTask + case .upload(let originalTask, let task): + taskDelegate = UploadTaskDelegate(task: task) + self.originalTask = originalTask + case .stream(let originalTask, let task): + taskDelegate = TaskDelegate(task: task) + self.originalTask = originalTask + } - - parameter user: The user. - - parameter password: The password. - - parameter persistence: The URL credential persistence. `.ForSession` by default. + delegate.error = error + delegate.queue.addOperation { self.endTime = CFAbsoluteTimeGetCurrent() } + } - - returns: The request. - */ - public func authenticate( - user user: String, + // MARK: Authentication + + /// Associates an HTTP Basic credential with the request. + /// + /// - parameter user: The user. + /// - parameter password: The password. + /// - parameter persistence: The URL credential persistence. `.ForSession` by default. + /// + /// - returns: The request. + @discardableResult + open func authenticate( + user: String, password: String, - persistence: NSURLCredentialPersistence = .ForSession) + persistence: URLCredential.Persistence = .forSession) -> Self { - let credential = NSURLCredential(user: user, password: password, persistence: persistence) - + let credential = URLCredential(user: user, password: password, persistence: persistence) return authenticate(usingCredential: credential) } - /** - Associates a specified credential with the request. - - - parameter credential: The credential. - - - returns: The request. - */ - public func authenticate(usingCredential credential: NSURLCredential) -> Self { + /// Associates a specified credential with the request. + /// + /// - parameter credential: The credential. + /// + /// - returns: The request. + @discardableResult + open func authenticate(usingCredential credential: URLCredential) -> Self { delegate.credential = credential - return self } - // MARK: - Progress - - /** - Sets a closure to be called periodically during the lifecycle of the request as data is written to or read - from the server. + /// Returns a base64 encoded basic authentication credential as an authorization header tuple. + /// + /// - parameter user: The user. + /// - parameter password: The password. + /// + /// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise. + open static func authorizationHeader(user: String, password: String) -> (key: String, value: String)? { + guard let data = "\(user):\(password)".data(using: .utf8) else { return nil } - - For uploads, the progress closure returns the bytes written, total bytes written, and total bytes expected - to write. - - For downloads and data tasks, the progress closure returns the bytes read, total bytes read, and total bytes - expected to read. + let credential = data.base64EncodedString(options: []) - - parameter closure: The code to be executed periodically during the lifecycle of the request. - - - returns: The request. - */ - public func progress(closure: ((Int64, Int64, Int64) -> Void)? = nil) -> Self { - if let uploadDelegate = delegate as? UploadTaskDelegate { - uploadDelegate.uploadProgress = closure - } else if let dataDelegate = delegate as? DataTaskDelegate { - dataDelegate.dataProgress = closure - } else if let downloadDelegate = delegate as? DownloadTaskDelegate { - downloadDelegate.downloadProgress = closure - } - - return self + return (key: "Authorization", value: "Basic \(credential)") } - /** - Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. + // MARK: State - This closure returns the bytes most recently received from the server, not including data from previous calls. - If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is - also important to note that the `response` closure will be called with nil `responseData`. + /// Resumes the request. + open func resume() { + guard let task = task else { delegate.queue.isSuspended = false ; return } - - parameter closure: The code to be executed periodically during the lifecycle of the request. + if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } - - returns: The request. - */ - public func stream(closure: (NSData -> Void)? = nil) -> Self { - if let dataDelegate = delegate as? DataTaskDelegate { - dataDelegate.dataStream = closure - } + task.resume() - return self + NotificationCenter.default.post( + name: Notification.Name.Task.DidResume, + object: self, + userInfo: [Notification.Key.Task: task] + ) } - // MARK: - State + /// Suspends the request. + open func suspend() { + guard let task = task else { return } - /** - Suspends the request. - */ - public func suspend() { task.suspend() - } - /** - Resumes the request. - */ - public func resume() { - task.resume() - } - - /** - Cancels the request. - */ - public func cancel() { - if let - downloadDelegate = delegate as? DownloadTaskDelegate, - downloadTask = downloadDelegate.downloadTask - { - downloadTask.cancelByProducingResumeData { data in - downloadDelegate.resumeData = data - } - } else { - task.cancel() - } + NotificationCenter.default.post( + name: Notification.Name.Task.DidSuspend, + object: self, + userInfo: [Notification.Key.Task: task] + ) } - // MARK: - TaskDelegate - - /** - The task delegate is responsible for handling all delegate callbacks for the underlying task as well as - executing all operations attached to the serial operation queue upon task completion. - */ - public class TaskDelegate: NSObject { - - /// The serial operation queue used to execute all operations after the task completes. - public let queue: NSOperationQueue + /// Cancels the request. + open func cancel() { + guard let task = task else { return } - let task: NSURLSessionTask - let progress: NSProgress + task.cancel() - var data: NSData? { return nil } - var error: ErrorType? - - var credential: NSURLCredential? + NotificationCenter.default.post( + name: Notification.Name.Task.DidCancel, + object: self, + userInfo: [Notification.Key.Task: task] + ) + } +} - init(task: NSURLSessionTask) { - self.task = task - self.progress = NSProgress(totalUnitCount: 0) - self.queue = { - let operationQueue = NSOperationQueue() - operationQueue.maxConcurrentOperationCount = 1 - operationQueue.suspended = true +// MARK: - CustomStringConvertible - if #available(OSX 10.10, *) { - operationQueue.qualityOfService = NSQualityOfService.Utility - } +extension Request: CustomStringConvertible { + /// The textual representation used when written to an output stream, which includes the HTTP method and URL, as + /// well as the response status code if a response has been received. + open var description: String { + var components: [String] = [] - return operationQueue - }() + if let HTTPMethod = request?.httpMethod { + components.append(HTTPMethod) } - deinit { - queue.cancelAllOperations() - queue.suspended = false + if let urlString = request?.url?.absoluteString { + components.append(urlString) } - // MARK: - NSURLSessionTaskDelegate + if let response = response { + components.append("(\(response.statusCode))") + } - // MARK: Override Closures + return components.joined(separator: " ") + } +} - var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? - var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream?)? - var taskDidCompleteWithError: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? +// MARK: - CustomDebugStringConvertible - // MARK: Delegate Methods +extension Request: CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, in the form of a cURL command. + open var debugDescription: String { + return cURLRepresentation() + } - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: ((NSURLRequest?) -> Void)) - { - var redirectRequest: NSURLRequest? = request + func cURLRepresentation() -> String { + var components = ["$ curl -i"] - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } + guard let request = self.request, + let url = request.url, + let host = url.host + else { + return "$ curl command could not be created" + } - completionHandler(redirectRequest) + if let httpMethod = request.httpMethod, httpMethod != "GET" { + components.append("-X \(httpMethod)") } - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling - var credential: NSURLCredential? - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if let - serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { - disposition = .UseCredential - credential = NSURLCredential(forTrust: serverTrust) - } else { - disposition = .CancelAuthenticationChallenge - } + if let credentialStorage = self.session.configuration.urlCredentialStorage { + let protectionSpace = URLProtectionSpace( + host: host, + port: url.port ?? 0, + protocol: url.scheme, + realm: host, + authenticationMethod: NSURLAuthenticationMethodHTTPBasic + ) + + if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { + for credential in credentials { + components.append("-u \(credential.user!):\(credential.password!)") } } else { - if challenge.previousFailureCount > 0 { - disposition = .CancelAuthenticationChallenge - } else { - credential = self.credential ?? session.configuration.URLCredentialStorage?.defaultCredentialForProtectionSpace(challenge.protectionSpace) - - if credential != nil { - disposition = .UseCredential - } + if let credential = delegate.credential { + components.append("-u \(credential.user!):\(credential.password!)") } } + } - completionHandler(disposition, credential) + if session.configuration.httpShouldSetCookies { + if + let cookieStorage = session.configuration.httpCookieStorage, + let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty + { + let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value);" } + components.append("-b \"\(string.substring(to: string.characters.index(before: string.endIndex)))\"") + } } - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - needNewBodyStream completionHandler: ((NSInputStream?) -> Void)) - { - var bodyStream: NSInputStream? + var headers: [AnyHashable: Any] = [:] - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - bodyStream = taskNeedNewBodyStream(session, task) + if let additionalHeaders = session.configuration.httpAdditionalHeaders { + for (field, value) in additionalHeaders where field != AnyHashable("Cookie") { + headers[field] = value } + } - completionHandler(bodyStream) + if let headerFields = request.allHTTPHeaderFields { + for (field, value) in headerFields where field != "Cookie" { + headers[field] = value + } } - func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { - if let taskDidCompleteWithError = taskDidCompleteWithError { - taskDidCompleteWithError(session, task, error) - } else { - if let error = error { - self.error = error - - if let - downloadDelegate = self as? DownloadTaskDelegate, - userInfo = error.userInfo as? [String: AnyObject], - resumeData = userInfo[NSURLSessionDownloadTaskResumeData] as? NSData - { - downloadDelegate.resumeData = resumeData - } - } + for (field, value) in headers { + components.append("-H \"\(field): \(value)\"") + } - queue.suspended = false - } + if let httpBodyData = request.httpBody, let httpBody = String(data: httpBodyData, encoding: .utf8) { + var escapedBody = httpBody.replacingOccurrences(of: "\\\"", with: "\\\\\"") + escapedBody = escapedBody.replacingOccurrences(of: "\"", with: "\\\"") + + components.append("-d \"\(escapedBody)\"") } + + components.append("\"\(url.absoluteString)\"") + + return components.joined(separator: " \\\n\t") } +} - // MARK: - DataTaskDelegate +// MARK: - - class DataTaskDelegate: TaskDelegate, NSURLSessionDataDelegate { - var dataTask: NSURLSessionDataTask? { return task as? NSURLSessionDataTask } +/// Specific type of `Request` that manages an underlying `URLSessionDataTask`. +open class DataRequest: Request { - private var totalBytesReceived: Int64 = 0 - private var mutableData: NSMutableData - override var data: NSData? { - if dataStream != nil { - return nil - } else { - return mutableData - } - } + // MARK: Helper Types - private var expectedContentLength: Int64? - private var dataProgress: ((bytesReceived: Int64, totalBytesReceived: Int64, totalBytesExpectedToReceive: Int64) -> Void)? - private var dataStream: ((data: NSData) -> Void)? + struct Requestable: TaskConvertible { + let urlRequest: URLRequest - override init(task: NSURLSessionTask) { - mutableData = NSMutableData() - super.init(task: task) + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + let urlRequest = try self.urlRequest.adapt(using: adapter) + return queue.syncResult { session.dataTask(with: urlRequest) } } + } - // MARK: - NSURLSessionDataDelegate + // MARK: Properties - // MARK: Override Closures + /// The progress of fetching the response data from the server for the request. + open var progress: Progress { return dataDelegate.progress } - var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? - var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? - var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? - var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? + var dataDelegate: DataTaskDelegate { return delegate as! DataTaskDelegate } - // MARK: Delegate Methods + // MARK: Stream - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didReceiveResponse response: NSURLResponse, - completionHandler: (NSURLSessionResponseDisposition -> Void)) - { - var disposition: NSURLSessionResponseDisposition = .Allow + /// Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. + /// + /// This closure returns the bytes most recently received from the server, not including data from previous calls. + /// If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is + /// also important to note that the server data in any `Response` object will be `nil`. + /// + /// - parameter closure: The code to be executed periodically during the lifecycle of the request. + /// + /// - returns: The request. + @discardableResult + open func stream(closure: ((Data) -> Void)? = nil) -> Self { + dataDelegate.dataStream = closure + return self + } - expectedContentLength = response.expectedContentLength + // MARK: Progress + + /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. + /// + /// - parameter queue: The dispatch queue to execute the closure on. + /// - parameter closure: The code to be executed periodically as data is read from the server. + /// + /// - returns: The request. + @discardableResult + open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { + dataDelegate.progressHandler = (closure, queue) + return self + } +} - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } +// MARK: - - completionHandler(disposition) - } +/// Specific type of `Request` that manages an underlying `URLSessionDownloadTask`. +open class DownloadRequest: Request { - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { - dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) - } + // MARK: Helper Types - func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else { - if let dataStream = dataStream { - dataStream(data: data) - } else { - mutableData.appendData(data) - } + /// A collection of options to be executed prior to moving a downloaded file from the temporary URL to the + /// destination URL. + public struct DownloadOptions: OptionSet { + /// Returns the raw bitmask value of the option and satisfies the `RawRepresentable` protocol. + public let rawValue: UInt - totalBytesReceived += data.length - let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown + /// A `DownloadOptions` flag that creates intermediate directories for the destination URL if specified. + public static let createIntermediateDirectories = DownloadOptions(rawValue: 1 << 0) - progress.totalUnitCount = totalBytesExpected - progress.completedUnitCount = totalBytesReceived + /// A `DownloadOptions` flag that removes a previous file from the destination URL if specified. + public static let removePreviousFile = DownloadOptions(rawValue: 1 << 1) - dataProgress?( - bytesReceived: Int64(data.length), - totalBytesReceived: totalBytesReceived, - totalBytesExpectedToReceive: totalBytesExpected - ) - } + /// Creates a `DownloadFileDestinationOptions` instance with the specified raw value. + /// + /// - parameter rawValue: The raw bitmask value for the option. + /// + /// - returns: A new log level instance. + public init(rawValue: UInt) { + self.rawValue = rawValue } + } - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: ((NSCachedURLResponse?) -> Void)) - { - var cachedResponse: NSCachedURLResponse? = proposedResponse - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) + /// A closure executed once a download request has successfully completed in order to determine where to move the + /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL + /// and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and + /// the options defining how the file should be moved. + public typealias DownloadFileDestination = ( + _ temporaryURL: URL, + _ response: HTTPURLResponse) + -> (destinationURL: URL, options: DownloadOptions) + + enum Downloadable: TaskConvertible { + case request(URLRequest) + case resumeData(Data) + + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + let task: URLSessionTask + + switch self { + case let .request(urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.syncResult { session.downloadTask(with: urlRequest) } + case let .resumeData(resumeData): + task = queue.syncResult { session.downloadTask(withResumeData: resumeData) } } - completionHandler(cachedResponse) + return task } } -} -// MARK: - CustomStringConvertible + // MARK: Properties -extension Request: CustomStringConvertible { + /// The resume data of the underlying download task if available after a failure. + open var resumeData: Data? { return downloadDelegate.resumeData } - /** - The textual representation used when written to an output stream, which includes the HTTP method and URL, as - well as the response status code if a response has been received. - */ - public var description: String { - var components: [String] = [] + /// The progress of downloading the response data from the server for the request. + open var progress: Progress { return downloadDelegate.progress } - if let HTTPMethod = request?.HTTPMethod { - components.append(HTTPMethod) - } + var downloadDelegate: DownloadTaskDelegate { return delegate as! DownloadTaskDelegate } - if let URLString = request?.URL?.absoluteString { - components.append(URLString) - } + // MARK: State - if let response = response { - components.append("(\(response.statusCode))") - } + /// Cancels the request. + open override func cancel() { + downloadDelegate.downloadTask.cancel { self.downloadDelegate.resumeData = $0 } - return components.joinWithSeparator(" ") + NotificationCenter.default.post( + name: Notification.Name.Task.DidCancel, + object: self, + userInfo: [Notification.Key.Task: task] + ) } -} -// MARK: - CustomDebugStringConvertible + // MARK: Progress + + /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. + /// + /// - parameter queue: The dispatch queue to execute the closure on. + /// - parameter closure: The code to be executed periodically as data is read from the server. + /// + /// - returns: The request. + @discardableResult + open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { + downloadDelegate.progressHandler = (closure, queue) + return self + } -extension Request: CustomDebugStringConvertible { - func cURLRepresentation() -> String { - var components = ["$ curl -i"] + // MARK: Destination + + /// Creates a download file destination closure which uses the default file manager to move the temporary file to a + /// file URL in the first available directory with the specified search path directory and search path domain mask. + /// + /// - parameter directory: The search path directory. `.DocumentDirectory` by default. + /// - parameter domain: The search path domain mask. `.UserDomainMask` by default. + /// + /// - returns: A download file destination closure. + open class func suggestedDownloadDestination( + for directory: FileManager.SearchPathDirectory = .documentDirectory, + in domain: FileManager.SearchPathDomainMask = .userDomainMask) + -> DownloadFileDestination + { + return { temporaryURL, response in + let directoryURLs = FileManager.default.urls(for: directory, in: domain) - guard let request = self.request else { - return "$ curl command could not be created" + if !directoryURLs.isEmpty { + return (directoryURLs[0].appendingPathComponent(response.suggestedFilename!), []) + } + + return (temporaryURL, []) } + } +} - let URL = request.URL +// MARK: - - if let HTTPMethod = request.HTTPMethod where HTTPMethod != "GET" { - components.append("-X \(HTTPMethod)") - } +/// Specific type of `Request` that manages an underlying `URLSessionUploadTask`. +open class UploadRequest: DataRequest { - if let credentialStorage = self.session.configuration.URLCredentialStorage { - let protectionSpace = NSURLProtectionSpace( - host: URL!.host!, - port: URL!.port?.integerValue ?? 0, - `protocol`: URL!.scheme, - realm: URL!.host!, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic - ) + // MARK: Helper Types - if let credentials = credentialStorage.credentialsForProtectionSpace(protectionSpace)?.values { - for credential in credentials { - components.append("-u \(credential.user!):\(credential.password!)") - } - } else { - if let credential = delegate.credential { - components.append("-u \(credential.user!):\(credential.password!)") - } - } - } + enum Uploadable: TaskConvertible { + case data(Data, URLRequest) + case file(URL, URLRequest) + case stream(InputStream, URLRequest) - if session.configuration.HTTPShouldSetCookies { - if let - cookieStorage = session.configuration.HTTPCookieStorage, - cookies = cookieStorage.cookiesForURL(URL!) where !cookies.isEmpty - { - let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value ?? String());" } - components.append("-b \"\(string.substringToIndex(string.endIndex.predecessor()))\"") - } - } + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + let task: URLSessionTask - if let headerFields = request.allHTTPHeaderFields { - for (field, value) in headerFields { - switch field { - case "Cookie": - continue - default: - components.append("-H \"\(field): \(value)\"") - } + switch self { + case let .data(data, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.syncResult { session.uploadTask(with: urlRequest, from: data) } + case let .file(url, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.syncResult { session.uploadTask(with: urlRequest, fromFile: url) } + case let .stream(_, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.syncResult { session.uploadTask(withStreamedRequest: urlRequest) } } - } - if let additionalHeaders = session.configuration.HTTPAdditionalHeaders { - for (field, value) in additionalHeaders { - switch field { - case "Cookie": - continue - default: - components.append("-H \"\(field): \(value)\"") - } - } + return task } + } - if let - HTTPBodyData = request.HTTPBody, - HTTPBody = NSString(data: HTTPBodyData, encoding: NSUTF8StringEncoding) - { - let escapedBody = HTTPBody.stringByReplacingOccurrencesOfString("\"", withString: "\\\"") - components.append("-d \"\(escapedBody)\"") - } + // MARK: Properties + + /// The progress of uploading the payload to the server for the upload request. + open var uploadProgress: Progress { return uploadDelegate.uploadProgress } + + var uploadDelegate: UploadTaskDelegate { return delegate as! UploadTaskDelegate } - components.append("\"\(URL!.absoluteString)\"") + // MARK: Upload Progress - return components.joinWithSeparator(" \\\n\t") + /// Sets a closure to be called periodically during the lifecycle of the `UploadRequest` as data is sent to + /// the server. + /// + /// After the data is sent to the server, the `progress(queue:closure:)` APIs can be used to monitor the progress + /// of data being read from the server. + /// + /// - parameter queue: The dispatch queue to execute the closure on. + /// - parameter closure: The code to be executed periodically as data is sent to the server. + /// + /// - returns: The request. + @discardableResult + open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { + uploadDelegate.uploadProgressHandler = (closure, queue) + return self } +} - /// The textual representation used when written to an output stream, in the form of a cURL command. - public var debugDescription: String { - return cURLRepresentation() +// MARK: - + +#if !os(watchOS) + +/// Specific type of `Request` that manages an underlying `URLSessionStreamTask`. +open class StreamRequest: Request { + enum Streamable: TaskConvertible { + case stream(hostName: String, port: Int) + case netService(NetService) + + func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { + let task: URLSessionTask + + switch self { + case let .stream(hostName, port): + task = queue.syncResult { session.streamTask(withHostName: hostName, port: port) } + case let .netService(netService): + task = queue.syncResult { session.streamTask(with: netService) } + } + + return task + } } } + +#endif diff --git a/Example/Pods/Alamofire/Source/Response.swift b/Example/Pods/Alamofire/Source/Response.swift new file mode 100644 index 0000000..f80779c --- /dev/null +++ b/Example/Pods/Alamofire/Source/Response.swift @@ -0,0 +1,296 @@ +// +// Response.swift +// +// Copyright (c) 2014-2016 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 +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Used to store all data associated with an non-serialized response of a data or upload request. +public struct DefaultDataResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The data returned by the server. + public let data: Data? + + /// The error encountered while executing or validating the request. + public let error: Error? + + var _metrics: AnyObject? + + init(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) { + self.request = request + self.response = response + self.data = data + self.error = error + } +} + +// MARK: - + +/// Used to store all data associated with a serialized response of a data or upload request. +public struct DataResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The data returned by the server. + public let data: Data? + + /// The result of response serialization. + public let result: Result + + /// The timeline of the complete lifecycle of the `Request`. + public let timeline: Timeline + + var _metrics: AnyObject? + + /// Creates a `DataResponse` instance with the specified parameters derived from response serialization. + /// + /// - parameter request: The URL request sent to the server. + /// - parameter response: The server's response to the URL request. + /// - parameter data: The data returned by the server. + /// - parameter result: The result of response serialization. + /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. + /// + /// - returns: The new `DataResponse` instance. + public init( + request: URLRequest?, + response: HTTPURLResponse?, + data: Data?, + result: Result, + timeline: Timeline = Timeline()) + { + self.request = request + self.response = response + self.data = data + self.result = result + self.timeline = timeline + } +} + +// MARK: - + +extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, which includes whether the result was a + /// success or failure. + public var description: String { + return result.debugDescription + } + + /// The debug textual representation used when written to an output stream, which includes the URL request, the URL + /// response, the server data, the response serialization result and the timeline. + public var debugDescription: String { + var output: [String] = [] + + output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") + output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") + output.append("[Data]: \(data?.count ?? 0) bytes") + output.append("[Result]: \(result.debugDescription)") + output.append("[Timeline]: \(timeline.debugDescription)") + + return output.joined(separator: "\n") + } +} + +// MARK: - + +/// Used to store all data associated with an non-serialized response of a download request. +public struct DefaultDownloadResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The temporary destination URL of the data returned from the server. + public let temporaryURL: URL? + + /// The final destination URL of the data returned from the server if it was moved. + public let destinationURL: URL? + + /// The resume data generated if the request was cancelled. + public let resumeData: Data? + + /// The error encountered while executing or validating the request. + public let error: Error? + + var _metrics: AnyObject? + + init( + request: URLRequest?, + response: HTTPURLResponse?, + temporaryURL: URL?, + destinationURL: URL?, + resumeData: Data?, + error: Error?) + { + self.request = request + self.response = response + self.temporaryURL = temporaryURL + self.destinationURL = destinationURL + self.resumeData = resumeData + self.error = error + } +} + +// MARK: - + +/// Used to store all data associated with a serialized response of a download request. +public struct DownloadResponse { + /// The URL request sent to the server. + public let request: URLRequest? + + /// The server's response to the URL request. + public let response: HTTPURLResponse? + + /// The temporary destination URL of the data returned from the server. + public let temporaryURL: URL? + + /// The final destination URL of the data returned from the server if it was moved. + public let destinationURL: URL? + + /// The resume data generated if the request was cancelled. + public let resumeData: Data? + + /// The result of response serialization. + public let result: Result + + /// The timeline of the complete lifecycle of the request. + public let timeline: Timeline + + var _metrics: AnyObject? + + /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. + /// + /// - parameter request: The URL request sent to the server. + /// - parameter response: The server's response to the URL request. + /// - parameter temporaryURL: The temporary destination URL of the data returned from the server. + /// - parameter destinationURL: The final destination URL of the data returned from the server if it was moved. + /// - parameter resumeData: The resume data generated if the request was cancelled. + /// - parameter result: The result of response serialization. + /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. + /// + /// - returns: The new `DownloadResponse` instance. + public init( + request: URLRequest?, + response: HTTPURLResponse?, + temporaryURL: URL?, + destinationURL: URL?, + resumeData: Data?, + result: Result, + timeline: Timeline = Timeline()) + { + self.request = request + self.response = response + self.temporaryURL = temporaryURL + self.destinationURL = destinationURL + self.resumeData = resumeData + self.result = result + self.timeline = timeline + } +} + +// MARK: - + +extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, which includes whether the result was a + /// success or failure. + public var description: String { + return result.debugDescription + } + + /// The debug textual representation used when written to an output stream, which includes the URL request, the URL + /// response, the temporary and destination URLs, the resume data, the response serialization result and the + /// timeline. + public var debugDescription: String { + var output: [String] = [] + + output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") + output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") + output.append("[TemporaryURL]: \(temporaryURL?.path ?? "nil")") + output.append("[DestinationURL]: \(destinationURL?.path ?? "nil")") + output.append("[ResumeData]: \(resumeData?.count ?? 0) bytes") + output.append("[Result]: \(result.debugDescription)") + output.append("[Timeline]: \(timeline.debugDescription)") + + return output.joined(separator: "\n") + } +} + +// MARK: - + +protocol Response { + /// The task metrics containing the request / response statistics. + var _metrics: AnyObject? { get set } + mutating func add(_ metrics: AnyObject?) +} + +extension Response { + mutating func add(_ metrics: AnyObject?) { + #if !os(watchOS) + guard #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) else { return } + guard let metrics = metrics as? URLSessionTaskMetrics else { return } + + _metrics = metrics + #endif + } +} + +// MARK: - + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DefaultDataResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DataResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DefaultDownloadResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} + +@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) +extension DownloadResponse: Response { +#if !os(watchOS) + /// The task metrics containing the request / response statistics. + public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } +#endif +} diff --git a/Example/Pods/Alamofire/Source/ResponseSerialization.swift b/Example/Pods/Alamofire/Source/ResponseSerialization.swift index 23d8ab2..0bbb373 100644 --- a/Example/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/Example/Pods/Alamofire/Source/ResponseSerialization.swift @@ -1,122 +1,247 @@ -// ResponseSerialization.swift // -// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// ResponseSerialization.swift // -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. import Foundation -// MARK: ResponseSerializer +/// The type in which all data response serializers must conform to in order to serialize a response. +public protocol DataResponseSerializerProtocol { + /// The type of serialized object to be created by this `DataResponseSerializerType`. + associatedtype SerializedObject -/** - The type in which all response serializers must conform to in order to serialize a response. -*/ -public protocol ResponseSerializer { - /// The type of serialized object to be created by this `ResponseSerializer`. - typealias SerializedObject + /// A closure used by response handlers that takes a request, response, data and error and returns a result. + var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result { get } +} + +// MARK: - - /** - A closure used by response handlers that takes a request, response, and data and returns a result. - */ - var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?) -> Result { get } +/// A generic `DataResponseSerializerType` used to serialize a request, response, and data into a serialized object. +public struct DataResponseSerializer: DataResponseSerializerProtocol { + /// The type of serialized object to be created by this `DataResponseSerializer`. + public typealias SerializedObject = Value + + /// A closure used by response handlers that takes a request, response, data and error and returns a result. + public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result + + /// Initializes the `ResponseSerializer` instance with the given serialize response closure. + /// + /// - parameter serializeResponse: The closure used to serialize the response. + /// + /// - returns: The new generic response serializer instance. + public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result) { + self.serializeResponse = serializeResponse + } } // MARK: - -/** - A generic `ResponseSerializer` used to serialize a request, response, and data into a serialized object. -*/ -public struct GenericResponseSerializer: ResponseSerializer { - /// The type of serialized object to be created by this `ResponseSerializer`. - public typealias SerializedObject = T +/// The type in which all download response serializers must conform to in order to serialize a response. +public protocol DownloadResponseSerializerProtocol { + /// The type of serialized object to be created by this `DownloadResponseSerializerType`. + associatedtype SerializedObject - /** - A closure used by response handlers that takes a request, response, and data and returns a result. - */ - public var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?) -> Result + /// A closure used by response handlers that takes a request, response, url and error and returns a result. + var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result { get } +} + +// MARK: - - /** - Initializes the `GenericResponseSerializer` instance with the given serialize response closure. +/// A generic `DownloadResponseSerializerType` used to serialize a request, response, and data into a serialized object. +public struct DownloadResponseSerializer: DownloadResponseSerializerProtocol { + /// The type of serialized object to be created by this `DownloadResponseSerializer`. + public typealias SerializedObject = Value - - parameter serializeResponse: The closure used to serialize the response. + /// A closure used by response handlers that takes a request, response, url and error and returns a result. + public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result - - returns: The new generic response serializer instance. - */ - public init(serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?) -> Result) { + /// Initializes the `ResponseSerializer` instance with the given serialize response closure. + /// + /// - parameter serializeResponse: The closure used to serialize the response. + /// + /// - returns: The new generic response serializer instance. + public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result) { self.serializeResponse = serializeResponse } } // MARK: - Default -extension Request { +extension DataRequest { + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self { + delegate.queue.addOperation { + (queue ?? DispatchQueue.main).async { + var dataResponse = DefaultDataResponse( + request: self.request, + response: self.response, + data: self.delegate.data, + error: self.delegate.error + ) - /** - Adds a handler to be called once the request has finished. + dataResponse.add(self.delegate.metrics) - - parameter queue: The queue on which the completion handler is dispatched. - - parameter completionHandler: The code to be executed once the request has finished. + completionHandler(dataResponse) + } + } - - returns: The request. - */ - public func response( - queue queue: dispatch_queue_t? = nil, - completionHandler: (NSURLRequest?, NSHTTPURLResponse?, NSData?, ErrorType?) -> Void) + return self + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, + /// and data. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response( + queue: DispatchQueue? = nil, + responseSerializer: T, + completionHandler: @escaping (DataResponse) -> Void) -> Self { - delegate.queue.addOperationWithBlock { - dispatch_async(queue ?? dispatch_get_main_queue()) { - completionHandler(self.request, self.response, self.delegate.data, self.delegate.error) - } + delegate.queue.addOperation { + let result = responseSerializer.serializeResponse( + self.request, + self.response, + self.delegate.data, + self.delegate.error + ) + + let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() + let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime + + let timeline = Timeline( + requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), + initialResponseTime: initialResponseTime, + requestCompletedTime: requestCompletedTime, + serializationCompletedTime: CFAbsoluteTimeGetCurrent() + ) + + var dataResponse = DataResponse( + request: self.request, + response: self.response, + data: self.delegate.data, + result: result, + timeline: timeline + ) + + dataResponse.add(self.delegate.metrics) + + (queue ?? DispatchQueue.main).async { completionHandler(dataResponse) } } return self } +} + +extension DownloadRequest { + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DefaultDownloadResponse) -> Void) + -> Self + { + delegate.queue.addOperation { + (queue ?? DispatchQueue.main).async { + var downloadResponse = DefaultDownloadResponse( + request: self.request, + response: self.response, + temporaryURL: self.downloadDelegate.temporaryURL, + destinationURL: self.downloadDelegate.destinationURL, + resumeData: self.downloadDelegate.resumeData, + error: self.downloadDelegate.error + ) + + downloadResponse.add(self.delegate.metrics) - /** - Adds a handler to be called once the request has finished. + completionHandler(downloadResponse) + } + } - - parameter queue: The queue on which the completion handler is dispatched. - - parameter responseSerializer: The response serializer responsible for serializing the request, response, - and data. - - parameter completionHandler: The code to be executed once the request has finished. + return self + } - - returns: The request. - */ - public func response( - queue queue: dispatch_queue_t? = nil, + /// Adds a handler to be called once the request has finished. + /// + /// - parameter queue: The queue on which the completion handler is dispatched. + /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, + /// and data contained in the destination url. + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func response( + queue: DispatchQueue? = nil, responseSerializer: T, - completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result) -> Void) + completionHandler: @escaping (DownloadResponse) -> Void) -> Self { - delegate.queue.addOperationWithBlock { - let result: Result = { - if let error = self.delegate.error { - return .Failure(self.delegate.data, error) - } else { - return responseSerializer.serializeResponse(self.request, self.response, self.delegate.data) - } - }() - - dispatch_async(queue ?? dispatch_get_main_queue()) { - completionHandler(self.request, self.response, result) - } + delegate.queue.addOperation { + let result = responseSerializer.serializeResponse( + self.request, + self.response, + self.downloadDelegate.fileURL, + self.downloadDelegate.error + ) + + let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() + let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime + + let timeline = Timeline( + requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), + initialResponseTime: initialResponseTime, + requestCompletedTime: requestCompletedTime, + serializationCompletedTime: CFAbsoluteTimeGetCurrent() + ) + + var downloadResponse = DownloadResponse( + request: self.request, + response: self.response, + temporaryURL: self.downloadDelegate.temporaryURL, + destinationURL: self.downloadDelegate.destinationURL, + resumeData: self.downloadDelegate.resumeData, + result: result, + timeline: timeline + ) + + downloadResponse.add(self.delegate.metrics) + + (queue ?? DispatchQueue.main).async { completionHandler(downloadResponse) } } return self @@ -126,97 +251,220 @@ extension Request { // MARK: - Data extension Request { + /// Returns a result data type that contains the response data as-is. + /// + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponseData(response: HTTPURLResponse?, data: Data?, error: Error?) -> Result { + guard error == nil else { return .failure(error!) } + + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(Data()) } + + guard let validData = data else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) + } - /** - Creates a response serializer that returns the associated data as-is. - - - returns: A data response serializer. - */ - public static func dataResponseSerializer() -> GenericResponseSerializer { - return GenericResponseSerializer { _, _, data in - guard let validData = data else { - let failureReason = "Data could not be serialized. Input data was nil." - let error = Error.errorWithCode(.DataSerializationFailed, failureReason: failureReason) - return .Failure(data, error) - } + return .success(validData) + } +} - return .Success(validData) +extension DataRequest { + /// Creates a response serializer that returns the associated data as-is. + /// + /// - returns: A data response serializer. + public static func dataResponseSerializer() -> DataResponseSerializer { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponseData(response: response, data: data, error: error) } } - /** - Adds a handler to be called once the request has finished. + /// Adds a handler to be called once the request has finished. + /// + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseData( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: DataRequest.dataResponseSerializer(), + completionHandler: completionHandler + ) + } +} + +extension DownloadRequest { + /// Creates a response serializer that returns the associated data as-is. + /// + /// - returns: A data response serializer. + public static func dataResponseSerializer() -> DownloadResponseSerializer { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } - - parameter completionHandler: The code to be executed once the request has finished. + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) + } - - returns: The request. - */ - public func responseData(completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result) -> Void) -> Self { - return response(responseSerializer: Request.dataResponseSerializer(), completionHandler: completionHandler) + do { + let data = try Data(contentsOf: fileURL) + return Request.serializeResponseData(response: response, data: data, error: error) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) + } + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter completionHandler: The code to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseData( + queue: DispatchQueue? = nil, + completionHandler: @escaping (DownloadResponse) -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: DownloadRequest.dataResponseSerializer(), + completionHandler: completionHandler + ) } } // MARK: - String extension Request { + /// Returns a result string type initialized from the response data with the specified string encoding. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + /// response, falling back to the default HTTP default character set, ISO-8859-1. + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponseString( + encoding: String.Encoding?, + response: HTTPURLResponse?, + data: Data?, + error: Error?) + -> Result + { + guard error == nil else { return .failure(error!) } - /** - Creates a response serializer that returns a string initialized from the response data with the specified - string encoding. + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } - - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - response, falling back to the default HTTP default character set, ISO-8859-1. + guard let validData = data else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) + } - - returns: A string response serializer. - */ - public static func stringResponseSerializer( - var encoding encoding: NSStringEncoding? = nil) - -> GenericResponseSerializer - { - return GenericResponseSerializer { _, response, data in - guard let validData = data else { - let failureReason = "String could not be serialized because input data was nil." - let error = Error.errorWithCode(.StringSerializationFailed, failureReason: failureReason) - return .Failure(data, error) - } + var convertedEncoding = encoding - if let encodingName = response?.textEncodingName where encoding == nil { - encoding = CFStringConvertEncodingToNSStringEncoding( - CFStringConvertIANACharSetNameToEncoding(encodingName) - ) - } + if let encodingName = response?.textEncodingName as CFString!, convertedEncoding == nil { + convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding( + CFStringConvertIANACharSetNameToEncoding(encodingName)) + ) + } - let actualEncoding = encoding ?? NSISOLatin1StringEncoding + let actualEncoding = convertedEncoding ?? String.Encoding.isoLatin1 - if let string = NSString(data: validData, encoding: actualEncoding) as? String { - return .Success(string) - } else { - let failureReason = "String could not be serialized with encoding: \(actualEncoding)" - let error = Error.errorWithCode(.StringSerializationFailed, failureReason: failureReason) - return .Failure(data, error) - } + if let string = String(data: validData, encoding: actualEncoding) { + return .success(string) + } else { + return .failure(AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding))) } } +} - /** - Adds a handler to be called once the request has finished. +extension DataRequest { + /// Creates a response serializer that returns a result string type initialized from the response data with + /// the specified string encoding. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + /// response, falling back to the default HTTP default character set, ISO-8859-1. + /// + /// - returns: A string response serializer. + public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DataResponseSerializer { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) + } + } - - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - server response, falling back to the default HTTP default character set, - ISO-8859-1. - - parameter completionHandler: A closure to be executed once the request has finished. The closure takes 3 - arguments: the URL request, the URL response and the result produced while - creating the string. + /// Adds a handler to be called once the request has finished. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the + /// server response, falling back to the default HTTP default character set, + /// ISO-8859-1. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseString( + queue: DispatchQueue? = nil, + encoding: String.Encoding? = nil, + completionHandler: @escaping (DataResponse) -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), + completionHandler: completionHandler + ) + } +} + +extension DownloadRequest { + /// Creates a response serializer that returns a result string type initialized from the response data with + /// the specified string encoding. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + /// response, falling back to the default HTTP default character set, ISO-8859-1. + /// + /// - returns: A string response serializer. + public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DownloadResponseSerializer { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } + + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) + } - - returns: The request. - */ + do { + let data = try Data(contentsOf: fileURL) + return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) + } + } + } + + /// Adds a handler to be called once the request has finished. + /// + /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the + /// server response, falling back to the default HTTP default character set, + /// ISO-8859-1. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult public func responseString( - encoding encoding: NSStringEncoding? = nil, - completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result) -> Void) + queue: DispatchQueue? = nil, + encoding: String.Encoding? = nil, + completionHandler: @escaping (DownloadResponse) -> Void) -> Self { return response( - responseSerializer: Request.stringResponseSerializer(encoding: encoding), + queue: queue, + responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), completionHandler: completionHandler ) } @@ -225,52 +473,119 @@ extension Request { // MARK: - JSON extension Request { + /// Returns a JSON object contained in a result type constructed from the response data using `JSONSerialization` + /// with the specified reading options. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponseJSON( + options: JSONSerialization.ReadingOptions, + response: HTTPURLResponse?, + data: Data?, + error: Error?) + -> Result + { + guard error == nil else { return .failure(error!) } + + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } - /** - Creates a response serializer that returns a JSON object constructed from the response data using - `NSJSONSerialization` with the specified reading options. + guard let validData = data, validData.count > 0 else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) + } + + do { + let json = try JSONSerialization.jsonObject(with: validData, options: options) + return .success(json) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error))) + } + } +} - - parameter options: The JSON serialization reading options. `.AllowFragments` by default. +extension DataRequest { + /// Creates a response serializer that returns a JSON object result type constructed from the response data using + /// `JSONSerialization` with the specified reading options. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// + /// - returns: A JSON object response serializer. + public static func jsonResponseSerializer( + options: JSONSerialization.ReadingOptions = .allowFragments) + -> DataResponseSerializer + { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) + } + } - - returns: A JSON object response serializer. - */ - public static func JSONResponseSerializer( - options options: NSJSONReadingOptions = .AllowFragments) - -> GenericResponseSerializer + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responseJSON( + queue: DispatchQueue? = nil, + options: JSONSerialization.ReadingOptions = .allowFragments, + completionHandler: @escaping (DataResponse) -> Void) + -> Self { - return GenericResponseSerializer { _, _, data in - guard let validData = data else { - let failureReason = "JSON could not be serialized because input data was nil." - let error = Error.errorWithCode(.JSONSerializationFailed, failureReason: failureReason) - return .Failure(data, error) + return response( + queue: queue, + responseSerializer: DataRequest.jsonResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} + +extension DownloadRequest { + /// Creates a response serializer that returns a JSON object result type constructed from the response data using + /// `JSONSerialization` with the specified reading options. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// + /// - returns: A JSON object response serializer. + public static func jsonResponseSerializer( + options: JSONSerialization.ReadingOptions = .allowFragments) + -> DownloadResponseSerializer + { + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } + + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) } do { - let JSON = try NSJSONSerialization.JSONObjectWithData(validData, options: options) - return .Success(JSON) + let data = try Data(contentsOf: fileURL) + return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) } catch { - return .Failure(data, error as NSError) + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) } } } - /** - Adds a handler to be called once the request has finished. - - - parameter options: The JSON serialization reading options. `.AllowFragments` by default. - - parameter completionHandler: A closure to be executed once the request has finished. The closure takes 3 - arguments: the URL request, the URL response and the result produced while - creating the JSON object. - - - returns: The request. - */ + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult public func responseJSON( - options options: NSJSONReadingOptions = .AllowFragments, - completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result) -> Void) + queue: DispatchQueue? = nil, + options: JSONSerialization.ReadingOptions = .allowFragments, + completionHandler: @escaping (DownloadResponse) -> Void) -> Self { return response( - responseSerializer: Request.JSONResponseSerializer(options: options), + queue: queue, + responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), completionHandler: completionHandler ) } @@ -279,53 +594,123 @@ extension Request { // MARK: - Property List extension Request { + /// Returns a plist object contained in a result type constructed from the response data using + /// `PropertyListSerialization` with the specified reading options. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// - parameter response: The response from the server. + /// - parameter data: The data returned from the server. + /// - parameter error: The error already encountered if it exists. + /// + /// - returns: The result data type. + public static func serializeResponsePropertyList( + options: PropertyListSerialization.ReadOptions, + response: HTTPURLResponse?, + data: Data?, + error: Error?) + -> Result + { + guard error == nil else { return .failure(error!) } + + if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } + + guard let validData = data, validData.count > 0 else { + return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) + } + + do { + let plist = try PropertyListSerialization.propertyList(from: validData, options: options, format: nil) + return .success(plist) + } catch { + return .failure(AFError.responseSerializationFailed(reason: .propertyListSerializationFailed(error: error))) + } + } +} - /** - Creates a response serializer that returns an object constructed from the response data using - `NSPropertyListSerialization` with the specified reading options. +extension DataRequest { + /// Creates a response serializer that returns an object constructed from the response data using + /// `PropertyListSerialization` with the specified reading options. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// + /// - returns: A property list object response serializer. + public static func propertyListResponseSerializer( + options: PropertyListSerialization.ReadOptions = []) + -> DataResponseSerializer + { + return DataResponseSerializer { _, response, data, error in + return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) + } + } - - parameter options: The property list reading options. `NSPropertyListReadOptions()` by default. + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult + public func responsePropertyList( + queue: DispatchQueue? = nil, + options: PropertyListSerialization.ReadOptions = [], + completionHandler: @escaping (DataResponse) -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: DataRequest.propertyListResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} - - returns: A property list object response serializer. - */ +extension DownloadRequest { + /// Creates a response serializer that returns an object constructed from the response data using + /// `PropertyListSerialization` with the specified reading options. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// + /// - returns: A property list object response serializer. public static func propertyListResponseSerializer( - options options: NSPropertyListReadOptions = NSPropertyListReadOptions()) - -> GenericResponseSerializer + options: PropertyListSerialization.ReadOptions = []) + -> DownloadResponseSerializer { - return GenericResponseSerializer { _, _, data in - guard let validData = data else { - let failureReason = "Property list could not be serialized because input data was nil." - let error = Error.errorWithCode(.PropertyListSerializationFailed, failureReason: failureReason) - return .Failure(data, error) + return DownloadResponseSerializer { _, response, fileURL, error in + guard error == nil else { return .failure(error!) } + + guard let fileURL = fileURL else { + return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) } do { - let plist = try NSPropertyListSerialization.propertyListWithData(validData, options: options, format: nil) - return .Success(plist) + let data = try Data(contentsOf: fileURL) + return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) } catch { - return .Failure(data, error as NSError) + return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) } } } - /** - Adds a handler to be called once the request has finished. - - - parameter options: The property list reading options. `0` by default. - - parameter completionHandler: A closure to be executed once the request has finished. The closure takes 3 - arguments: the URL request, the URL response and the result produced while - creating the property list. - - - returns: The request. - */ + /// Adds a handler to be called once the request has finished. + /// + /// - parameter options: The property list reading options. Defaults to `[]`. + /// - parameter completionHandler: A closure to be executed once the request has finished. + /// + /// - returns: The request. + @discardableResult public func responsePropertyList( - options options: NSPropertyListReadOptions = NSPropertyListReadOptions(), - completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result) -> Void) + queue: DispatchQueue? = nil, + options: PropertyListSerialization.ReadOptions = [], + completionHandler: @escaping (DownloadResponse) -> Void) -> Self { return response( - responseSerializer: Request.propertyListResponseSerializer(options: options), + queue: queue, + responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), completionHandler: completionHandler ) } } + +/// A set of HTTP response status code that do not contain response data. +private let emptyDataStatusCodes: Set = [204, 205] diff --git a/Example/Pods/Alamofire/Source/Result.swift b/Example/Pods/Alamofire/Source/Result.swift index 958e3ad..2293308 100644 --- a/Example/Pods/Alamofire/Source/Result.swift +++ b/Example/Pods/Alamofire/Source/Result.swift @@ -1,45 +1,46 @@ -// Result.swift // -// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// Result.swift // -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. import Foundation -/** - Used to represent whether a request was successful or encountered an error. - - - Success: The request and all post processing operations were successful resulting in the serialization of the - provided associated value. - - Failure: The request encountered an error resulting in a failure. The associated values are the original data - provided by the server as well as the error that caused the failure. -*/ +/// Used to represent whether a request was successful or encountered an error. +/// +/// - success: The request and all post processing operations were successful resulting in the serialization of the +/// provided associated value. +/// +/// - failure: The request encountered an error resulting in a failure. The associated values are the original data +/// provided by the server as well as the error that caused the failure. public enum Result { - case Success(Value) - case Failure(NSData?, ErrorType) + case success(Value) + case failure(Error) /// Returns `true` if the result is a success, `false` otherwise. public var isSuccess: Bool { switch self { - case .Success: + case .success: return true - case .Failure: + case .failure: return false } } @@ -52,29 +53,19 @@ public enum Result { /// Returns the associated value if the result is a success, `nil` otherwise. public var value: Value? { switch self { - case .Success(let value): + case .success(let value): return value - case .Failure: - return nil - } - } - - /// Returns the associated data value if the result is a failure, `nil` otherwise. - public var data: NSData? { - switch self { - case .Success: + case .failure: return nil - case .Failure(let data, _): - return data } } /// Returns the associated error value if the result is a failure, `nil` otherwise. - public var error: ErrorType? { + public var error: Error? { switch self { - case .Success: + case .success: return nil - case .Failure(_, let error): + case .failure(let error): return error } } @@ -83,11 +74,13 @@ public enum Result { // MARK: - CustomStringConvertible extension Result: CustomStringConvertible { + /// The textual representation used when written to an output stream, which includes whether the result was a + /// success or failure. public var description: String { switch self { - case .Success: + case .success: return "SUCCESS" - case .Failure: + case .failure: return "FAILURE" } } @@ -96,19 +89,14 @@ extension Result: CustomStringConvertible { // MARK: - CustomDebugStringConvertible extension Result: CustomDebugStringConvertible { + /// The debug textual representation used when written to an output stream, which includes whether the result was a + /// success or failure in addition to the value or error. public var debugDescription: String { switch self { - case .Success(let value): + case .success(let value): return "SUCCESS: \(value)" - case .Failure(let data, let error): - if let - data = data, - utf8Data = NSString(data: data, encoding: NSUTF8StringEncoding) - { - return "FAILURE: \(error) \(utf8Data)" - } else { - return "FAILURE with Error: \(error)" - } + case .failure(let error): + return "FAILURE: \(error)" } } } diff --git a/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift b/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift index b6efbce..4d5030f 100644 --- a/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ b/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -1,137 +1,135 @@ -// ServerTrustPolicy.swift // -// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// ServerTrustPolicy.swift // -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. import Foundation /// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. -public class ServerTrustPolicyManager { +open class ServerTrustPolicyManager { /// The dictionary of policies mapped to a particular host. - public let policies: [String: ServerTrustPolicy] - - /** - Initializes the `ServerTrustPolicyManager` instance with the given policies. - - Since different servers and web services can have different leaf certificates, intermediate and even root - certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This - allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key - pinning for host3 and disabling evaluation for host4. - - - parameter policies: A dictionary of all policies mapped to a particular host. - - - returns: The new `ServerTrustPolicyManager` instance. - */ + open let policies: [String: ServerTrustPolicy] + + /// Initializes the `ServerTrustPolicyManager` instance with the given policies. + /// + /// Since different servers and web services can have different leaf certificates, intermediate and even root + /// certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This + /// allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key + /// pinning for host3 and disabling evaluation for host4. + /// + /// - parameter policies: A dictionary of all policies mapped to a particular host. + /// + /// - returns: The new `ServerTrustPolicyManager` instance. public init(policies: [String: ServerTrustPolicy]) { self.policies = policies } - /** - Returns the `ServerTrustPolicy` for the given host if applicable. - - By default, this method will return the policy that perfectly matches the given host. Subclasses could override - this method and implement more complex mapping implementations such as wildcards. - - - parameter host: The host to use when searching for a matching policy. - - - returns: The server trust policy for the given host if found. - */ - public func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { + /// Returns the `ServerTrustPolicy` for the given host if applicable. + /// + /// By default, this method will return the policy that perfectly matches the given host. Subclasses could override + /// this method and implement more complex mapping implementations such as wildcards. + /// + /// - parameter host: The host to use when searching for a matching policy. + /// + /// - returns: The server trust policy for the given host if found. + open func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? { return policies[host] } } // MARK: - -extension NSURLSession { +extension URLSession { private struct AssociatedKeys { - static var ManagerKey = "NSURLSession.ServerTrustPolicyManager" + static var managerKey = "URLSession.ServerTrustPolicyManager" } var serverTrustPolicyManager: ServerTrustPolicyManager? { get { - return objc_getAssociatedObject(self, &AssociatedKeys.ManagerKey) as? ServerTrustPolicyManager + return objc_getAssociatedObject(self, &AssociatedKeys.managerKey) as? ServerTrustPolicyManager } set (manager) { - objc_setAssociatedObject(self, &AssociatedKeys.ManagerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + objc_setAssociatedObject(self, &AssociatedKeys.managerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) } } } // MARK: - ServerTrustPolicy -/** - The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when - connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust - with a given set of criteria to determine whether the server trust is valid and the connection should be made. - - Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other - vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged - to route all communication over an HTTPS connection with pinning enabled. - - - PerformDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to - validate the host provided by the challenge. Applications are encouraged to always - validate the host in production environments to guarantee the validity of the server's - certificate chain. - - - PinCertificates: Uses the pinned certificates to validate the server trust. The server trust is - considered valid if one of the pinned certificates match one of the server certificates. - By validating both the certificate chain and host, certificate pinning provides a very - secure form of server trust validation mitigating most, if not all, MITM attacks. - Applications are encouraged to always validate the host and require a valid certificate - chain in production environments. - - - PinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered - valid if one of the pinned public keys match one of the server certificate public keys. - By validating both the certificate chain and host, public key pinning provides a very - secure form of server trust validation mitigating most, if not all, MITM attacks. - Applications are encouraged to always validate the host and require a valid certificate - chain in production environments. - - - DisableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. - - - CustomEvaluation: Uses the associated closure to evaluate the validity of the server trust. -*/ +/// The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when +/// connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust +/// with a given set of criteria to determine whether the server trust is valid and the connection should be made. +/// +/// Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other +/// vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged +/// to route all communication over an HTTPS connection with pinning enabled. +/// +/// - performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to +/// validate the host provided by the challenge. Applications are encouraged to always +/// validate the host in production environments to guarantee the validity of the server's +/// certificate chain. +/// +/// - pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is +/// considered valid if one of the pinned certificates match one of the server certificates. +/// By validating both the certificate chain and host, certificate pinning provides a very +/// secure form of server trust validation mitigating most, if not all, MITM attacks. +/// Applications are encouraged to always validate the host and require a valid certificate +/// chain in production environments. +/// +/// - pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered +/// valid if one of the pinned public keys match one of the server certificate public keys. +/// By validating both the certificate chain and host, public key pinning provides a very +/// secure form of server trust validation mitigating most, if not all, MITM attacks. +/// Applications are encouraged to always validate the host and require a valid certificate +/// chain in production environments. +/// +/// - disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. +/// +/// - customEvaluation: Uses the associated closure to evaluate the validity of the server trust. public enum ServerTrustPolicy { - case PerformDefaultEvaluation(validateHost: Bool) - case PinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) - case PinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) - case DisableEvaluation - case CustomEvaluation((serverTrust: SecTrust, host: String) -> Bool) + case performDefaultEvaluation(validateHost: Bool) + case pinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) + case pinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) + case disableEvaluation + case customEvaluation((_ serverTrust: SecTrust, _ host: String) -> Bool) // MARK: - Bundle Location - /** - Returns all certificates within the given bundle with a `.cer` file extension. - - - parameter bundle: The bundle to search for all `.cer` files. - - - returns: All certificates within the given bundle. - */ - public static func certificatesInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecCertificate] { + /// Returns all certificates within the given bundle with a `.cer` file extension. + /// + /// - parameter bundle: The bundle to search for all `.cer` files. + /// + /// - returns: All certificates within the given bundle. + public static func certificates(in bundle: Bundle = Bundle.main) -> [SecCertificate] { var certificates: [SecCertificate] = [] - for path in bundle.pathsForResourcesOfType(".cer", inDirectory: nil) { - if let - certificateData = NSData(contentsOfFile: path), - certificate = SecCertificateCreateWithData(nil, certificateData) + let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in + bundle.paths(forResourcesOfType: fileExtension, inDirectory: nil) + }.joined()) + + for path in paths { + if + let certificateData = try? Data(contentsOf: URL(fileURLWithPath: path)) as CFData, + let certificate = SecCertificateCreateWithData(nil, certificateData) { certificates.append(certificate) } @@ -140,18 +138,16 @@ public enum ServerTrustPolicy { return certificates } - /** - Returns all public keys within the given bundle with a `.cer` file extension. - - - parameter bundle: The bundle to search for all `*.cer` files. - - - returns: All public keys within the given bundle. - */ - public static func publicKeysInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecKey] { + /// Returns all public keys within the given bundle with a `.cer` file extension. + /// + /// - parameter bundle: The bundle to search for all `*.cer` files. + /// + /// - returns: All public keys within the given bundle. + public static func publicKeys(in bundle: Bundle = Bundle.main) -> [SecKey] { var publicKeys: [SecKey] = [] - for certificate in certificatesInBundle(bundle) { - if let publicKey = publicKeyForCertificate(certificate) { + for certificate in certificates(in: bundle) { + if let publicKey = publicKey(for: certificate) { publicKeys.append(publicKey) } } @@ -161,64 +157,55 @@ public enum ServerTrustPolicy { // MARK: - Evaluation - /** - Evaluates whether the server trust is valid for the given host. - - - parameter serverTrust: The server trust to evaluate. - - parameter host: The host of the challenge protection space. - - - returns: Whether the server trust is valid. - */ - public func evaluateServerTrust(serverTrust: SecTrust, isValidForHost host: String) -> Bool { + /// Evaluates whether the server trust is valid for the given host. + /// + /// - parameter serverTrust: The server trust to evaluate. + /// - parameter host: The host of the challenge protection space. + /// + /// - returns: Whether the server trust is valid. + public func evaluate(_ serverTrust: SecTrust, forHost host: String) -> Bool { var serverTrustIsValid = false switch self { - case let .PerformDefaultEvaluation(validateHost): + case let .performDefaultEvaluation(validateHost): let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, [policy]) + SecTrustSetPolicies(serverTrust, policy) serverTrustIsValid = trustIsValid(serverTrust) - case let .PinCertificates(pinnedCertificates, validateCertificateChain, validateHost): + case let .pinCertificates(pinnedCertificates, validateCertificateChain, validateHost): if validateCertificateChain { let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, [policy]) + SecTrustSetPolicies(serverTrust, policy) - SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates) + SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates as CFArray) SecTrustSetAnchorCertificatesOnly(serverTrust, true) serverTrustIsValid = trustIsValid(serverTrust) } else { - let serverCertificatesDataArray = certificateDataForTrust(serverTrust) - - //====================================================================================================== - // The following `[] +` is a temporary workaround for a Swift 2.0 compiler error. This workaround should - // be removed once the following radar has been resolved: - // - http://openradar.appspot.com/radar?id=6082025006039040 - //====================================================================================================== - - let pinnedCertificatesDataArray = certificateDataForCertificates([] + pinnedCertificates) + let serverCertificatesDataArray = certificateData(for: serverTrust) + let pinnedCertificatesDataArray = certificateData(for: pinnedCertificates) outerLoop: for serverCertificateData in serverCertificatesDataArray { for pinnedCertificateData in pinnedCertificatesDataArray { - if serverCertificateData.isEqualToData(pinnedCertificateData) { + if serverCertificateData == pinnedCertificateData { serverTrustIsValid = true break outerLoop } } } } - case let .PinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): + case let .pinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): var certificateChainEvaluationPassed = true if validateCertificateChain { let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, [policy]) + SecTrustSetPolicies(serverTrust, policy) certificateChainEvaluationPassed = trustIsValid(serverTrust) } if certificateChainEvaluationPassed { - outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeysForTrust(serverTrust) as [AnyObject] { + outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeys(for: serverTrust) as [AnyObject] { for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { if serverPublicKey.isEqual(pinnedPublicKey) { serverTrustIsValid = true @@ -227,10 +214,10 @@ public enum ServerTrustPolicy { } } } - case .DisableEvaluation: + case .disableEvaluation: serverTrustIsValid = true - case let .CustomEvaluation(closure): - serverTrustIsValid = closure(serverTrust: serverTrust, host: host) + case let .customEvaluation(closure): + serverTrustIsValid = closure(serverTrust, host) } return serverTrustIsValid @@ -238,15 +225,16 @@ public enum ServerTrustPolicy { // MARK: - Private - Trust Validation - private func trustIsValid(trust: SecTrust) -> Bool { + private func trustIsValid(_ trust: SecTrust) -> Bool { var isValid = false - var result = SecTrustResultType(kSecTrustResultInvalid) + var result = SecTrustResultType.invalid let status = SecTrustEvaluate(trust, &result) if status == errSecSuccess { - let unspecified = SecTrustResultType(kSecTrustResultUnspecified) - let proceed = SecTrustResultType(kSecTrustResultProceed) + let unspecified = SecTrustResultType.unspecified + let proceed = SecTrustResultType.proceed + isValid = result == unspecified || result == proceed } @@ -256,7 +244,7 @@ public enum ServerTrustPolicy { // MARK: - Private - Certificate Data - private func certificateDataForTrust(trust: SecTrust) -> [NSData] { + private func certificateData(for trust: SecTrust) -> [Data] { var certificates: [SecCertificate] = [] for index in 0.. [NSData] { - return certificates.map { SecCertificateCopyData($0) as NSData } + private func certificateData(for certificates: [SecCertificate]) -> [Data] { + return certificates.map { SecCertificateCopyData($0) as Data } } // MARK: - Private - Public Key Extraction - private static func publicKeysForTrust(trust: SecTrust) -> [SecKey] { + private static func publicKeys(for trust: SecTrust) -> [SecKey] { var publicKeys: [SecKey] = [] for index in 0.. SecKey? { + private static func publicKey(for certificate: SecCertificate) -> SecKey? { var publicKey: SecKey? let policy = SecPolicyCreateBasicX509() var trust: SecTrust? let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) - if let trust = trust where trustCreationStatus == errSecSuccess { + if let trust = trust, trustCreationStatus == errSecSuccess { publicKey = SecTrustCopyPublicKey(trust) } diff --git a/Example/Pods/Alamofire/Source/SessionDelegate.swift b/Example/Pods/Alamofire/Source/SessionDelegate.swift new file mode 100644 index 0000000..4549731 --- /dev/null +++ b/Example/Pods/Alamofire/Source/SessionDelegate.swift @@ -0,0 +1,681 @@ +// +// SessionDelegate.swift +// +// Copyright (c) 2014-2016 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 +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for handling all delegate callbacks for the underlying session. +open class SessionDelegate: NSObject { + + // MARK: URLSessionDelegate Overrides + + /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didBecomeInvalidWithError:)`. + open var sessionDidBecomeInvalidWithError: ((URLSession, Error?) -> Void)? + + /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`. + 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)? + + /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. + open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? + + // MARK: URLSessionTaskDelegate Overrides + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`. + open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? + + /// 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)? + + /// 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)? + + /// 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)? + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)`. + open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? + + /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didCompleteWithError:)`. + open var taskDidComplete: ((URLSession, URLSessionTask, Error?) -> Void)? + + // MARK: URLSessionDataDelegate Overrides + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)`. + open var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? + + /// 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)? + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didBecome:)`. + open var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:)`. + open var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? + + /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`. + open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? + + /// 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)? + + // MARK: URLSessionDownloadDelegate Overrides + + /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didFinishDownloadingTo:)`. + open var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> Void)? + + /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)`. + open var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? + + /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)`. + open var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? + + // MARK: URLSessionStreamDelegate Overrides + +#if !os(watchOS) + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:readClosedFor:)`. + open var streamTaskReadClosed: ((URLSession, URLSessionStreamTask) -> Void)? + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:writeClosedFor:)`. + open var streamTaskWriteClosed: ((URLSession, URLSessionStreamTask) -> Void)? + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:betterRouteDiscoveredFor:)`. + open var streamTaskBetterRouteDiscovered: ((URLSession, URLSessionStreamTask) -> Void)? + + /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:streamTask:didBecome:outputStream:)`. + open var streamTaskDidBecomeInputAndOutputStreams: ((URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void)? + +#endif + + // MARK: Properties + + var retrier: RequestRetrier? + weak var sessionManager: SessionManager? + + private var requests: [Int: Request] = [:] + private let lock = NSLock() + + /// Access the task delegate for the specified task in a thread-safe manner. + open subscript(task: URLSessionTask) -> Request? { + get { + lock.lock() ; defer { lock.unlock() } + return requests[task.taskIdentifier] + } + set { + lock.lock() ; defer { lock.unlock() } + requests[task.taskIdentifier] = newValue + } + } + + // MARK: Lifecycle + + /// Initializes the `SessionDelegate` instance. + /// + /// - returns: The new `SessionDelegate` instance. + public override init() { + super.init() + } + + // MARK: NSObject Overrides + + /// Returns a `Bool` indicating whether the `SessionDelegate` implements or inherits a method that can respond + /// to a specified message. + /// + /// - parameter selector: A selector that identifies a message. + /// + /// - returns: `true` if the receiver implements or inherits a method that can respond to selector, otherwise `false`. + open override func responds(to selector: Selector) -> Bool { + #if !os(macOS) + if selector == #selector(URLSessionDelegate.urlSessionDidFinishEvents(forBackgroundURLSession:)) { + return sessionDidFinishEventsForBackgroundURLSession != nil + } + #endif + + #if !os(watchOS) + switch selector { + case #selector(URLSessionStreamDelegate.urlSession(_:readClosedFor:)): + return streamTaskReadClosed != nil + case #selector(URLSessionStreamDelegate.urlSession(_:writeClosedFor:)): + return streamTaskWriteClosed != nil + case #selector(URLSessionStreamDelegate.urlSession(_:betterRouteDiscoveredFor:)): + return streamTaskBetterRouteDiscovered != nil + case #selector(URLSessionStreamDelegate.urlSession(_:streamTask:didBecome:outputStream:)): + return streamTaskDidBecomeInputAndOutputStreams != nil + default: + break + } + #endif + + switch selector { + case #selector(URLSessionDelegate.urlSession(_:didBecomeInvalidWithError:)): + return sessionDidBecomeInvalidWithError != nil + case #selector(URLSessionDelegate.urlSession(_:didReceive:completionHandler:)): + return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) + case #selector(URLSessionTaskDelegate.urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): + return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) + case #selector(URLSessionDataDelegate.urlSession(_:dataTask:didReceive:completionHandler:)): + return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) + default: + return type(of: self).instancesRespond(to: selector) + } + } +} + +// MARK: - URLSessionDelegate + +extension SessionDelegate: URLSessionDelegate { + /// Tells the delegate that the session has been invalidated. + /// + /// - parameter session: The session object that was invalidated. + /// - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. + open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { + sessionDidBecomeInvalidWithError?(session, error) + } + + /// Requests credentials from the delegate in response to a session-level authentication request from the + /// remote server. + /// + /// - parameter session: The session containing the task that requested authentication. + /// - parameter challenge: An object that contains the request for authentication. + /// - parameter completionHandler: A handler that your delegate method must call providing the disposition + /// and credential. + open func urlSession( + _ session: URLSession, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) + { + guard sessionDidReceiveChallengeWithCompletion == nil else { + sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) + return + } + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + var credential: URLCredential? + + if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { + (disposition, credential) = sessionDidReceiveChallenge(session, challenge) + } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { + let host = challenge.protectionSpace.host + + if + let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), + let serverTrust = challenge.protectionSpace.serverTrust + { + if serverTrustPolicy.evaluate(serverTrust, forHost: host) { + disposition = .useCredential + credential = URLCredential(trust: serverTrust) + } else { + disposition = .cancelAuthenticationChallenge + } + } + } + + completionHandler(disposition, credential) + } + +#if !os(macOS) + + /// Tells the delegate that all messages enqueued for a session have been delivered. + /// + /// - parameter session: The session that no longer has any outstanding requests. + open func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { + sessionDidFinishEventsForBackgroundURLSession?(session) + } + +#endif +} + +// MARK: - URLSessionTaskDelegate + +extension SessionDelegate: URLSessionTaskDelegate { + /// Tells the delegate that the remote server requested an HTTP redirect. + /// + /// - parameter session: The session containing the task whose request resulted in a redirect. + /// - parameter task: The task whose request resulted in a redirect. + /// - parameter response: An object containing the server’s response to the original request. + /// - parameter request: A URL request object filled out with the new location. + /// - parameter completionHandler: A closure that your handler should call with either the value of the request + /// parameter, a modified URL request object, or NULL to refuse the redirect and + /// return the body of the redirect response. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + willPerformHTTPRedirection response: HTTPURLResponse, + newRequest request: URLRequest, + completionHandler: @escaping (URLRequest?) -> Void) + { + guard taskWillPerformHTTPRedirectionWithCompletion == nil else { + taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) + return + } + + var redirectRequest: URLRequest? = request + + if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { + redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + } + + completionHandler(redirectRequest) + } + + /// Requests credentials from the delegate in response to an authentication request from the remote server. + /// + /// - parameter session: The session containing the task whose request requires authentication. + /// - parameter task: The task whose request requires authentication. + /// - parameter challenge: An object that contains the request for authentication. + /// - parameter completionHandler: A handler that your delegate method must call providing the disposition + /// and credential. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) + { + guard taskDidReceiveChallengeWithCompletion == nil else { + taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) + return + } + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + let result = taskDidReceiveChallenge(session, task, challenge) + completionHandler(result.0, result.1) + } else if let delegate = self[task]?.delegate { + delegate.urlSession( + session, + task: task, + didReceive: challenge, + completionHandler: completionHandler + ) + } else { + urlSession(session, didReceive: challenge, completionHandler: completionHandler) + } + } + + /// Tells the delegate when a task requires a new request body stream to send to the remote server. + /// + /// - parameter session: The session containing the task that needs a new body stream. + /// - parameter task: The task that needs a new body stream. + /// - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) + { + guard taskNeedNewBodyStreamWithCompletion == nil else { + taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) + return + } + + if let taskNeedNewBodyStream = taskNeedNewBodyStream { + completionHandler(taskNeedNewBodyStream(session, task)) + } else if let delegate = self[task]?.delegate { + delegate.urlSession(session, task: task, needNewBodyStream: completionHandler) + } + } + + /// Periodically informs the delegate of the progress of sending body content to the server. + /// + /// - parameter session: The session containing the data task. + /// - parameter task: The data task. + /// - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. + /// - parameter totalBytesSent: The total number of bytes sent so far. + /// - parameter totalBytesExpectedToSend: The expected length of the body data. + open func urlSession( + _ session: URLSession, + task: URLSessionTask, + didSendBodyData bytesSent: Int64, + totalBytesSent: Int64, + totalBytesExpectedToSend: Int64) + { + if let taskDidSendBodyData = taskDidSendBodyData { + taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) + } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { + delegate.URLSession( + session, + task: task, + didSendBodyData: bytesSent, + totalBytesSent: totalBytesSent, + totalBytesExpectedToSend: totalBytesExpectedToSend + ) + } + } + +#if !os(watchOS) + + /// Tells the delegate that the session finished collecting metrics for the task. + /// + /// - parameter session: The session collecting the metrics. + /// - parameter task: The task whose metrics have been collected. + /// - parameter metrics: The collected metrics. + @available(iOS 10.0, macOS 10.12, tvOS 10.0, *) + @objc(URLSession:task:didFinishCollectingMetrics:) + open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { + self[task]?.delegate.metrics = metrics + } + +#endif + + /// Tells the delegate that the task finished transferring data. + /// + /// - parameter session: The session containing the task whose request finished transferring data. + /// - parameter task: The task whose request finished transferring data. + /// - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. + open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { + /// Executed after it is determined that the request is not going to be retried + let completeTask: (URLSession, URLSessionTask, Error?) -> Void = { [weak self] session, task, error in + guard let strongSelf = self else { return } + + if let taskDidComplete = strongSelf.taskDidComplete { + taskDidComplete(session, task, error) + } else if let delegate = strongSelf[task]?.delegate { + delegate.urlSession(session, task: task, didCompleteWithError: error) + } + + NotificationCenter.default.post( + name: Notification.Name.Task.DidComplete, + object: strongSelf, + userInfo: [Notification.Key.Task: task] + ) + + strongSelf[task] = nil + } + + guard let request = self[task], let sessionManager = sessionManager else { + completeTask(session, task, error) + return + } + + // Run all validations on the request before checking if an error occurred + request.validations.forEach { $0() } + + // Determine whether an error has occurred + var error: Error? = error + + if let taskDelegate = self[task]?.delegate, taskDelegate.error != nil { + error = taskDelegate.error + } + + /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request + /// should be retried. Otherwise, complete the task by notifying the task delegate. + if let retrier = retrier, let error = error { + retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, delay in + guard shouldRetry else { completeTask(session, task, error) ; return } + + DispatchQueue.utility.after(delay) { [weak self] in + guard let strongSelf = self else { return } + + let retrySucceeded = strongSelf.sessionManager?.retry(request) ?? false + + if retrySucceeded, let task = request.task { + strongSelf[task] = request + return + } else { + completeTask(session, task, error) + } + } + } + } else { + completeTask(session, task, error) + } + } +} + +// MARK: - URLSessionDataDelegate + +extension SessionDelegate: URLSessionDataDelegate { + /// Tells the delegate that the data task received the initial reply (headers) from the server. + /// + /// - parameter session: The session containing the data task that received an initial reply. + /// - parameter dataTask: The data task that received an initial reply. + /// - parameter response: A URL response object populated with headers. + /// - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a + /// constant to indicate whether the transfer should continue as a data task or + /// should become a download task. + open func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didReceive response: URLResponse, + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) + { + guard dataTaskDidReceiveResponseWithCompletion == nil else { + dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) + return + } + + var disposition: URLSession.ResponseDisposition = .allow + + if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { + disposition = dataTaskDidReceiveResponse(session, dataTask, response) + } + + completionHandler(disposition) + } + + /// Tells the delegate that the data task was changed to a download task. + /// + /// - parameter session: The session containing the task that was replaced by a download task. + /// - parameter dataTask: The data task that was replaced by a download task. + /// - parameter downloadTask: The new download task that replaced the data task. + open func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didBecome downloadTask: URLSessionDownloadTask) + { + if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { + dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) + } else { + self[downloadTask]?.delegate = DownloadTaskDelegate(task: downloadTask) + } + } + + /// Tells the delegate that the data task has received some of the expected data. + /// + /// - parameter session: The session containing the data task that provided data. + /// - parameter dataTask: The data task that provided data. + /// - parameter data: A data object containing the transferred data. + open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { + if let dataTaskDidReceiveData = dataTaskDidReceiveData { + dataTaskDidReceiveData(session, dataTask, data) + } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { + delegate.urlSession(session, dataTask: dataTask, didReceive: data) + } + } + + /// Asks the delegate whether the data (or upload) task should store the response in the cache. + /// + /// - parameter session: The session containing the data (or upload) task. + /// - parameter dataTask: The data (or upload) task. + /// - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current + /// caching policy and the values of certain received headers, such as the Pragma + /// and Cache-Control headers. + /// - parameter completionHandler: A block that your handler must call, providing either the original proposed + /// response, a modified version of that response, or NULL to prevent caching the + /// response. If your delegate implements this method, it must call this completion + /// handler; otherwise, your app leaks memory. + open func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + willCacheResponse proposedResponse: CachedURLResponse, + completionHandler: @escaping (CachedURLResponse?) -> Void) + { + guard dataTaskWillCacheResponseWithCompletion == nil else { + dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) + return + } + + if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { + completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) + } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { + delegate.urlSession( + session, + dataTask: dataTask, + willCacheResponse: proposedResponse, + completionHandler: completionHandler + ) + } else { + completionHandler(proposedResponse) + } + } +} + +// MARK: - URLSessionDownloadDelegate + +extension SessionDelegate: URLSessionDownloadDelegate { + /// Tells the delegate that a download task has finished downloading. + /// + /// - parameter session: The session containing the download task that finished. + /// - parameter downloadTask: The download task that finished. + /// - parameter location: A file URL for the temporary file. Because the file is temporary, you must either + /// open the file for reading or move it to a permanent location in your app’s sandbox + /// container directory before returning from this delegate method. + open func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didFinishDownloadingTo location: URL) + { + if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { + downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) + } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { + delegate.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) + } + } + + /// Periodically informs the delegate about the download’s progress. + /// + /// - parameter session: The session containing the download task. + /// - parameter downloadTask: The download task. + /// - parameter bytesWritten: The number of bytes transferred since the last time this delegate + /// method was called. + /// - parameter totalBytesWritten: The total number of bytes transferred so far. + /// - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length + /// header. If this header was not provided, the value is + /// `NSURLSessionTransferSizeUnknown`. + open func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didWriteData bytesWritten: Int64, + totalBytesWritten: Int64, + totalBytesExpectedToWrite: Int64) + { + if let downloadTaskDidWriteData = downloadTaskDidWriteData { + downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) + } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { + delegate.urlSession( + session, + downloadTask: downloadTask, + didWriteData: bytesWritten, + totalBytesWritten: totalBytesWritten, + totalBytesExpectedToWrite: totalBytesExpectedToWrite + ) + } + } + + /// Tells the delegate that the download task has resumed downloading. + /// + /// - parameter session: The session containing the download task that finished. + /// - parameter downloadTask: The download task that resumed. See explanation in the discussion. + /// - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the + /// existing content, then this value is zero. Otherwise, this value is an + /// integer representing the number of bytes on disk that do not need to be + /// retrieved again. + /// - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. + /// If this header was not provided, the value is NSURLSessionTransferSizeUnknown. + open func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didResumeAtOffset fileOffset: Int64, + expectedTotalBytes: Int64) + { + if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { + downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) + } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { + delegate.urlSession( + session, + downloadTask: downloadTask, + didResumeAtOffset: fileOffset, + expectedTotalBytes: expectedTotalBytes + ) + } + } +} + +// MARK: - URLSessionStreamDelegate + +#if !os(watchOS) + +extension SessionDelegate: URLSessionStreamDelegate { + /// Tells the delegate that the read side of the connection has been closed. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + open func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask) { + streamTaskReadClosed?(session, streamTask) + } + + /// Tells the delegate that the write side of the connection has been closed. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + open func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask) { + streamTaskWriteClosed?(session, streamTask) + } + + /// Tells the delegate that the system has determined that a better route to the host is available. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + open func urlSession(_ session: URLSession, betterRouteDiscoveredFor streamTask: URLSessionStreamTask) { + streamTaskBetterRouteDiscovered?(session, streamTask) + } + + /// Tells the delegate that the stream task has been completed and provides the unopened stream objects. + /// + /// - parameter session: The session. + /// - parameter streamTask: The stream task. + /// - parameter inputStream: The new input stream. + /// - parameter outputStream: The new output stream. + open func urlSession( + _ session: URLSession, + streamTask: URLSessionStreamTask, + didBecome inputStream: InputStream, + outputStream: OutputStream) + { + streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) + } +} + +#endif diff --git a/Example/Pods/Alamofire/Source/SessionManager.swift b/Example/Pods/Alamofire/Source/SessionManager.swift new file mode 100644 index 0000000..1363125 --- /dev/null +++ b/Example/Pods/Alamofire/Source/SessionManager.swift @@ -0,0 +1,776 @@ +// +// SessionManager.swift +// +// Copyright (c) 2014-2016 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 +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. +open class SessionManager { + + // MARK: - Helper Types + + /// Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as + /// associated values. + /// + /// - Success: Represents a successful `MultipartFormData` encoding and contains the new `UploadRequest` along with + /// streaming information. + /// - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding + /// error. + public enum MultipartFormDataEncodingResult { + case success(request: UploadRequest, streamingFromDisk: Bool, streamFileURL: URL?) + case failure(Error) + } + + // MARK: - Properties + + /// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use + /// directly for any ad hoc requests. + open static let `default`: SessionManager = { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders + + return SessionManager(configuration: configuration) + }() + + /// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. + open static let defaultHTTPHeaders: HTTPHeaders = { + // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 + let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" + + // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 + let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { index, languageCode in + let quality = 1.0 - (Double(index) * 0.1) + return "\(languageCode);q=\(quality)" + }.joined(separator: ", ") + + // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 + // Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0` + let userAgent: String = { + if let info = Bundle.main.infoDictionary { + let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" + let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" + let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" + let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" + + let osNameVersion: String = { + let version = ProcessInfo.processInfo.operatingSystemVersion + let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" + + let osName: String = { + #if os(iOS) + return "iOS" + #elseif os(watchOS) + return "watchOS" + #elseif os(tvOS) + return "tvOS" + #elseif os(macOS) + return "OS X" + #elseif os(Linux) + return "Linux" + #else + return "Unknown" + #endif + }() + + return "\(osName) \(versionString)" + }() + + let alamofireVersion: String = { + guard + let afInfo = Bundle(for: SessionManager.self).infoDictionary, + let build = afInfo["CFBundleShortVersionString"] + else { return "Unknown" } + + return "Alamofire/\(build)" + }() + + return "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)" + } + + return "Alamofire" + }() + + return [ + "Accept-Encoding": acceptEncoding, + "Accept-Language": acceptLanguage, + "User-Agent": userAgent + ] + }() + + /// Default memory threshold used when encoding `MultipartFormData` in bytes. + open static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000 + + /// The underlying session. + open let session: URLSession + + /// The session delegate handling all the task and session delegate callbacks. + open let delegate: SessionDelegate + + /// Whether to start requests immediately after being constructed. `true` by default. + open var startRequestsImmediately: Bool = true + + /// The request adapter called each time a new request is created. + open var adapter: RequestAdapter? + + /// The request retrier called each time a request encounters an error to determine whether to retry the request. + open var retrier: RequestRetrier? { + get { return delegate.retrier } + set { delegate.retrier = newValue } + } + + /// The background completion handler closure provided by the UIApplicationDelegate + /// `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background + /// completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation + /// will automatically call the handler. + /// + /// If you need to handle your own events before the handler is called, then you need to override the + /// SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. + /// + /// `nil` by default. + open var backgroundCompletionHandler: (() -> Void)? + + let queue = DispatchQueue(label: "org.alamofire.session-manager." + UUID().uuidString) + + // MARK: - Lifecycle + + /// Creates an instance with the specified `configuration`, `delegate` and `serverTrustPolicyManager`. + /// + /// - parameter configuration: The configuration used to construct the managed session. + /// `URLSessionConfiguration.default` by default. + /// - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by + /// default. + /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust + /// challenges. `nil` by default. + /// + /// - returns: The new `SessionManager` instance. + public init( + configuration: URLSessionConfiguration = URLSessionConfiguration.default, + delegate: SessionDelegate = SessionDelegate(), + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) + { + self.delegate = delegate + self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) + + commonInit(serverTrustPolicyManager: serverTrustPolicyManager) + } + + /// Creates an instance with the specified `session`, `delegate` and `serverTrustPolicyManager`. + /// + /// - parameter session: The URL session. + /// - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. + /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust + /// challenges. `nil` by default. + /// + /// - returns: The new `SessionManager` instance if the URL session's delegate matches; `nil` otherwise. + public init?( + session: URLSession, + delegate: SessionDelegate, + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) + { + guard delegate === session.delegate else { return nil } + + self.delegate = delegate + self.session = session + + commonInit(serverTrustPolicyManager: serverTrustPolicyManager) + } + + private func commonInit(serverTrustPolicyManager: ServerTrustPolicyManager?) { + session.serverTrustPolicyManager = serverTrustPolicyManager + + delegate.sessionManager = self + + delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in + guard let strongSelf = self else { return } + DispatchQueue.main.async { strongSelf.backgroundCompletionHandler?() } + } + } + + deinit { + session.invalidateAndCancel() + } + + // MARK: - Data Request + + /// Creates a `DataRequest` to retrieve the contents of the specified `url`, `method`, `parameters`, `encoding` + /// and `headers`. + /// + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.get` by default. + /// - parameter parameters: The parameters. `nil` by default. + /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `DataRequest`. + @discardableResult + open func request( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil) + -> DataRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) + return request(encodedURLRequest) + } catch { + return request(failedWith: error) + } + } + + /// Creates a `DataRequest` to retrieve the contents of a URL based on the specified `urlRequest`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `DataRequest`. + open func request(_ urlRequest: URLRequestConvertible) -> DataRequest { + do { + let originalRequest = try urlRequest.asURLRequest() + let originalTask = DataRequest.Requestable(urlRequest: originalRequest) + + let task = try originalTask.task(session: session, adapter: adapter, queue: queue) + let request = DataRequest(session: session, requestTask: .data(originalTask, task)) + + delegate[task] = request + + if startRequestsImmediately { request.resume() } + + return request + } catch { + return request(failedWith: error) + } + } + + // MARK: Private - Request Implementation + + private func request(failedWith error: Error) -> DataRequest { + let request = DataRequest(session: session, requestTask: .data(nil, nil), error: error) + if startRequestsImmediately { request.resume() } + return request + } + + // MARK: - Download Request + + // MARK: URL Request + + /// Creates a `DownloadRequest` to retrieve the contents the specified `url`, `method`, `parameters`, `encoding`, + /// `headers` and save them to the `destination`. + /// + /// If `destination` is not specified, the contents will remain in the temporary location determined by the + /// underlying URL session. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.get` by default. + /// - parameter parameters: The parameters. `nil` by default. + /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. + /// + /// - returns: The created `DownloadRequest`. + @discardableResult + open func download( + _ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) + return download(encodedURLRequest, to: destination) + } catch { + return download(failedWith: error) + } + } + + /// Creates a `DownloadRequest` to retrieve the contents of a URL based on the specified `urlRequest` and save + /// them to the `destination`. + /// + /// If `destination` is not specified, the contents will remain in the temporary location determined by the + /// underlying URL session. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter urlRequest: The URL request + /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. + /// + /// - returns: The created `DownloadRequest`. + @discardableResult + open func download( + _ urlRequest: URLRequestConvertible, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest + { + do { + let urlRequest = try urlRequest.asURLRequest() + return download(.request(urlRequest), to: destination) + } catch { + return download(failedWith: error) + } + } + + // MARK: Resume Data + + /// Creates a `DownloadRequest` from the `resumeData` produced from a previous request cancellation to retrieve + /// the contents of the original request and save them to the `destination`. + /// + /// If `destination` is not specified, the contents will remain in the temporary location determined by the + /// underlying URL session. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` + /// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for + /// additional information. + /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. + /// + /// - returns: The created `DownloadRequest`. + @discardableResult + open func download( + resumingWith resumeData: Data, + to destination: DownloadRequest.DownloadFileDestination? = nil) + -> DownloadRequest + { + return download(.resumeData(resumeData), to: destination) + } + + // MARK: Private - Download Implementation + + private func download( + _ downloadable: DownloadRequest.Downloadable, + to destination: DownloadRequest.DownloadFileDestination?) + -> DownloadRequest + { + do { + let task = try downloadable.task(session: session, adapter: adapter, queue: queue) + let request = DownloadRequest(session: session, requestTask: .download(downloadable, task)) + + request.downloadDelegate.destination = destination + + delegate[task] = request + + if startRequestsImmediately { request.resume() } + + return request + } catch { + return download(failedWith: error) + } + } + + private func download(failedWith error: Error) -> DownloadRequest { + let download = DownloadRequest(session: session, requestTask: .download(nil, nil), error: error) + if startRequestsImmediately { download.resume() } + return download + } + + // MARK: - Upload Request + + // MARK: File + + /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `file`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter file: The file to upload. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload( + _ fileURL: URL, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + return upload(fileURL, with: urlRequest) + } catch { + return upload(failedWith: error) + } + } + + /// Creates a `UploadRequest` from the specified `urlRequest` for uploading the `file`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter file: The file to upload. + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return upload(.file(fileURL, urlRequest)) + } catch { + return upload(failedWith: error) + } + } + + // MARK: Data + + /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `data`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter data: The data to upload. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload( + _ data: Data, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + return upload(data, with: urlRequest) + } catch { + return upload(failedWith: error) + } + } + + /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `data`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter data: The data to upload. + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return upload(.data(data, urlRequest)) + } catch { + return upload(failedWith: error) + } + } + + // MARK: InputStream + + /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `stream`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter stream: The stream to upload. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload( + _ stream: InputStream, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil) + -> UploadRequest + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + return upload(stream, with: urlRequest) + } catch { + return upload(failedWith: error) + } + } + + /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `stream`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter stream: The stream to upload. + /// - parameter urlRequest: The URL request. + /// + /// - returns: The created `UploadRequest`. + @discardableResult + open func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { + do { + let urlRequest = try urlRequest.asURLRequest() + return upload(.stream(stream, urlRequest)) + } catch { + return upload(failedWith: error) + } + } + + // MARK: MultipartFormData + + /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new + /// `UploadRequest` using the `url`, `method` and `headers`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + /// `multipartFormDataEncodingMemoryThreshold` by default. + /// - parameter url: The URL. + /// - parameter method: The HTTP method. `.post` by default. + /// - parameter headers: The HTTP headers. `nil` by default. + /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. + open func upload( + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + to url: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) + { + do { + let urlRequest = try URLRequest(url: url, method: method, headers: headers) + + return upload( + multipartFormData: multipartFormData, + usingThreshold: encodingMemoryThreshold, + with: urlRequest, + encodingCompletion: encodingCompletion + ) + } catch { + DispatchQueue.main.async { encodingCompletion?(.failure(error)) } + } + } + + /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new + /// `UploadRequest` using the `urlRequest`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + /// `multipartFormDataEncodingMemoryThreshold` by default. + /// - parameter urlRequest: The URL request. + /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. + open func upload( + multipartFormData: @escaping (MultipartFormData) -> Void, + usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, + with urlRequest: URLRequestConvertible, + encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) + { + DispatchQueue.global(qos: .utility).async { + let formData = MultipartFormData() + multipartFormData(formData) + + do { + var urlRequestWithContentType = try urlRequest.asURLRequest() + urlRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") + + let isBackgroundSession = self.session.configuration.identifier != nil + + if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { + let data = try formData.encode() + + let encodingResult = MultipartFormDataEncodingResult.success( + request: self.upload(data, with: urlRequestWithContentType), + streamingFromDisk: false, + streamFileURL: nil + ) + + DispatchQueue.main.async { encodingCompletion?(encodingResult) } + } else { + let fileManager = FileManager.default + let tempDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory()) + let directoryURL = tempDirectoryURL.appendingPathComponent("org.alamofire.manager/multipart.form.data") + let fileName = UUID().uuidString + let fileURL = directoryURL.appendingPathComponent(fileName) + + var directoryError: Error? + + // Create directory inside serial queue to ensure two threads don't do this in parallel + self.queue.sync { + do { + try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) + } catch { + directoryError = error + } + } + + if let directoryError = directoryError { throw directoryError } + + try formData.writeEncodedData(to: fileURL) + + DispatchQueue.main.async { + let encodingResult = MultipartFormDataEncodingResult.success( + request: self.upload(fileURL, with: urlRequestWithContentType), + streamingFromDisk: true, + streamFileURL: fileURL + ) + encodingCompletion?(encodingResult) + } + } + } catch { + DispatchQueue.main.async { encodingCompletion?(.failure(error)) } + } + } + } + + // MARK: Private - Upload Implementation + + private func upload(_ uploadable: UploadRequest.Uploadable) -> UploadRequest { + do { + let task = try uploadable.task(session: session, adapter: adapter, queue: queue) + let upload = UploadRequest(session: session, requestTask: .upload(uploadable, task)) + + if case let .stream(inputStream, _) = uploadable { + upload.delegate.taskNeedNewBodyStream = { _, _ in inputStream } + } + + delegate[task] = upload + + if startRequestsImmediately { upload.resume() } + + return upload + } catch { + return upload(failedWith: error) + } + } + + private func upload(failedWith error: Error) -> UploadRequest { + let upload = UploadRequest(session: session, requestTask: .upload(nil, nil), error: error) + if startRequestsImmediately { upload.resume() } + return upload + } + +#if !os(watchOS) + + // MARK: - Stream Request + + // MARK: Hostname and Port + + /// Creates a `StreamRequest` for bidirectional streaming using the `hostname` and `port`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter hostName: The hostname of the server to connect to. + /// - parameter port: The port of the server to connect to. + /// + /// - returns: The created `StreamRequest`. + @discardableResult + open func stream(withHostName hostName: String, port: Int) -> StreamRequest { + return stream(.stream(hostName: hostName, port: port)) + } + + // MARK: NetService + + /// Creates a `StreamRequest` for bidirectional streaming using the `netService`. + /// + /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + /// + /// - parameter netService: The net service used to identify the endpoint. + /// + /// - returns: The created `StreamRequest`. + @discardableResult + open func stream(with netService: NetService) -> StreamRequest { + return stream(.netService(netService)) + } + + // MARK: Private - Stream Implementation + + private func stream(_ streamable: StreamRequest.Streamable) -> StreamRequest { + do { + let task = try streamable.task(session: session, adapter: adapter, queue: queue) + let request = StreamRequest(session: session, requestTask: .stream(streamable, task)) + + delegate[task] = request + + if startRequestsImmediately { request.resume() } + + return request + } catch { + return stream(failedWith: error) + } + } + + private func stream(failedWith error: Error) -> StreamRequest { + let stream = StreamRequest(session: session, requestTask: .stream(nil, nil), error: error) + if startRequestsImmediately { stream.resume() } + return stream + } + +#endif + + // MARK: - Internal - Retry Request + + func retry(_ request: Request) -> Bool { + guard let originalTask = request.originalTask else { return false } + + do { + let task = try originalTask.task(session: session, adapter: adapter, queue: queue) + + request.delegate.task = task // resets all task delegate data + + request.startTime = CFAbsoluteTimeGetCurrent() + request.endTime = nil + + task.resume() + + return true + } catch { + request.delegate.error = error + return false + } + } +} diff --git a/Example/Pods/Alamofire/Source/Stream.swift b/Example/Pods/Alamofire/Source/Stream.swift deleted file mode 100644 index af89d5d..0000000 --- a/Example/Pods/Alamofire/Source/Stream.swift +++ /dev/null @@ -1,180 +0,0 @@ -// Stream.swift -// -// Copyright (c) 2014–2015 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 -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -#if !os(watchOS) - -@available(iOS 9.0, OSX 10.11, *) -extension Manager { - private enum Streamable { - case Stream(String, Int) - case NetService(NSNetService) - } - - private func stream(streamable: Streamable) -> Request { - var streamTask: NSURLSessionStreamTask! - - switch streamable { - case .Stream(let hostName, let port): - dispatch_sync(queue) { - streamTask = self.session.streamTaskWithHostName(hostName, port: port) - } - case .NetService(let netService): - dispatch_sync(queue) { - streamTask = self.session.streamTaskWithNetService(netService) - } - } - - let request = Request(session: session, task: streamTask) - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - /** - Creates a request for bidirectional streaming with the given hostname and port. - - - parameter hostName: The hostname of the server to connect to. - - parameter port: The port of the server to connect to. - - :returns: The created stream request. - */ - public func stream(hostName hostName: String, port: Int) -> Request { - return stream(.Stream(hostName, port)) - } - - /** - Creates a request for bidirectional streaming with the given `NSNetService`. - - - parameter netService: The net service used to identify the endpoint. - - - returns: The created stream request. - */ - public func stream(netService netService: NSNetService) -> Request { - return stream(.NetService(netService)) - } -} - -// MARK: - - -@available(iOS 9.0, OSX 10.11, *) -extension Manager.SessionDelegate: NSURLSessionStreamDelegate { - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:readClosedForStreamTask:`. - public var streamTaskReadClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskReadClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskReadClosed = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:writeClosedForStreamTask:`. - public var streamTaskWriteClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskWriteClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskWriteClosed = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:betterRouteDiscoveredForStreamTask:`. - public var streamTaskBetterRouteDiscovered: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskBetterRouteDiscovered as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskBetterRouteDiscovered = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:streamTask:didBecomeInputStream:outputStream:`. - public var streamTaskDidBecomeInputStream: ((NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void)? { - get { - return _streamTaskDidBecomeInputStream as? (NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void - } - set { - _streamTaskDidBecomeInputStream = newValue - } - } - - // MARK: Delegate Methods - - /** - Tells the delegate that the read side of the connection has been closed. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, readClosedForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskReadClosed?(session, streamTask) - } - - /** - Tells the delegate that the write side of the connection has been closed. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, writeClosedForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskWriteClosed?(session, streamTask) - } - - /** - Tells the delegate that the system has determined that a better route to the host is available. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, betterRouteDiscoveredForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskBetterRouteDiscovered?(session, streamTask) - } - - /** - Tells the delegate that the stream task has been completed and provides the unopened stream objects. - - - parameter session: The session. - - parameter streamTask: The stream task. - - parameter inputStream: The new input stream. - - parameter outputStream: The new output stream. - */ - public func URLSession( - session: NSURLSession, - streamTask: NSURLSessionStreamTask, - didBecomeInputStream inputStream: NSInputStream, - outputStream: NSOutputStream) - { - streamTaskDidBecomeInputStream?(session, streamTask, inputStream, outputStream) - } -} - -#endif diff --git a/Example/Pods/Alamofire/Source/TaskDelegate.swift b/Example/Pods/Alamofire/Source/TaskDelegate.swift new file mode 100644 index 0000000..4a10b65 --- /dev/null +++ b/Example/Pods/Alamofire/Source/TaskDelegate.swift @@ -0,0 +1,449 @@ +// +// TaskDelegate.swift +// +// Copyright (c) 2014-2016 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 +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// The task delegate is responsible for handling all delegate callbacks for the underlying task as well as +/// executing all operations attached to the serial operation queue upon task completion. +open class TaskDelegate: NSObject { + + // MARK: Properties + + /// The serial operation queue used to execute all operations after the task completes. + open let queue: OperationQueue + + var task: URLSessionTask? { + didSet { reset() } + } + + var data: Data? { return nil } + var error: Error? + + var initialResponseTime: CFAbsoluteTime? + var credential: URLCredential? + var metrics: AnyObject? // URLSessionTaskMetrics + + // MARK: Lifecycle + + init(task: URLSessionTask?) { + self.task = task + + self.queue = { + let operationQueue = OperationQueue() + + operationQueue.maxConcurrentOperationCount = 1 + operationQueue.isSuspended = true + operationQueue.qualityOfService = .utility + + return operationQueue + }() + } + + func reset() { + error = nil + initialResponseTime = nil + } + + // MARK: URLSessionTaskDelegate + + var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? + var taskDidCompleteWithError: ((URLSession, URLSessionTask, Error?) -> Void)? + + @objc(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:) + func urlSession( + _ session: URLSession, + task: URLSessionTask, + willPerformHTTPRedirection response: HTTPURLResponse, + newRequest request: URLRequest, + completionHandler: @escaping (URLRequest?) -> Void) + { + var redirectRequest: URLRequest? = request + + if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { + redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + } + + completionHandler(redirectRequest) + } + + @objc(URLSession:task:didReceiveChallenge:completionHandler:) + func urlSession( + _ session: URLSession, + task: URLSessionTask, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) + { + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { + let host = challenge.protectionSpace.host + + if + let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), + let serverTrust = challenge.protectionSpace.serverTrust + { + if serverTrustPolicy.evaluate(serverTrust, forHost: host) { + disposition = .useCredential + credential = URLCredential(trust: serverTrust) + } else { + disposition = .cancelAuthenticationChallenge + } + } + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } + + @objc(URLSession:task:needNewBodyStream:) + func urlSession( + _ session: URLSession, + task: URLSessionTask, + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) + { + var bodyStream: InputStream? + + if let taskNeedNewBodyStream = taskNeedNewBodyStream { + bodyStream = taskNeedNewBodyStream(session, task) + } + + completionHandler(bodyStream) + } + + @objc(URLSession:task:didCompleteWithError:) + func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { + if let taskDidCompleteWithError = taskDidCompleteWithError { + taskDidCompleteWithError(session, task, error) + } else { + if let error = error { + if self.error == nil { self.error = error } + + if + let downloadDelegate = self as? DownloadTaskDelegate, + let resumeData = (error as NSError).userInfo[NSURLSessionDownloadTaskResumeData] as? Data + { + downloadDelegate.resumeData = resumeData + } + } + + queue.isSuspended = false + } + } +} + +// MARK: - + +class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { + + // MARK: Properties + + var dataTask: URLSessionDataTask { return task as! URLSessionDataTask } + + override var data: Data? { + if dataStream != nil { + return nil + } else { + return mutableData + } + } + + var progress: Progress + var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? + + var dataStream: ((_ data: Data) -> Void)? + + private var totalBytesReceived: Int64 = 0 + private var mutableData: Data + + private var expectedContentLength: Int64? + + // MARK: Lifecycle + + override init(task: URLSessionTask?) { + mutableData = Data() + progress = Progress(totalUnitCount: 0) + + super.init(task: task) + } + + override func reset() { + super.reset() + + progress = Progress(totalUnitCount: 0) + totalBytesReceived = 0 + mutableData = Data() + expectedContentLength = nil + } + + // MARK: URLSessionDataDelegate + + var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? + var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? + var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? + var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? + + func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didReceive response: URLResponse, + completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) + { + var disposition: URLSession.ResponseDisposition = .allow + + expectedContentLength = response.expectedContentLength + + if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { + disposition = dataTaskDidReceiveResponse(session, dataTask, response) + } + + completionHandler(disposition) + } + + func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + didBecome downloadTask: URLSessionDownloadTask) + { + dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) + } + + func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let dataTaskDidReceiveData = dataTaskDidReceiveData { + dataTaskDidReceiveData(session, dataTask, data) + } else { + if let dataStream = dataStream { + dataStream(data) + } else { + mutableData.append(data) + } + + let bytesReceived = Int64(data.count) + totalBytesReceived += bytesReceived + let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown + + progress.totalUnitCount = totalBytesExpected + progress.completedUnitCount = totalBytesReceived + + if let progressHandler = progressHandler { + progressHandler.queue.async { progressHandler.closure(self.progress) } + } + } + } + + func urlSession( + _ session: URLSession, + dataTask: URLSessionDataTask, + willCacheResponse proposedResponse: CachedURLResponse, + completionHandler: @escaping (CachedURLResponse?) -> Void) + { + var cachedResponse: CachedURLResponse? = proposedResponse + + if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { + cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) + } + + completionHandler(cachedResponse) + } +} + +// MARK: - + +class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { + + // MARK: Properties + + var downloadTask: URLSessionDownloadTask { return task as! URLSessionDownloadTask } + + var progress: Progress + var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? + + var resumeData: Data? + override var data: Data? { return resumeData } + + var destination: DownloadRequest.DownloadFileDestination? + + var temporaryURL: URL? + var destinationURL: URL? + + var fileURL: URL? { return destination != nil ? destinationURL : temporaryURL } + + // MARK: Lifecycle + + override init(task: URLSessionTask?) { + progress = Progress(totalUnitCount: 0) + super.init(task: task) + } + + override func reset() { + super.reset() + + progress = Progress(totalUnitCount: 0) + resumeData = nil + } + + // MARK: URLSessionDownloadDelegate + + var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> URL)? + var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? + var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? + + func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didFinishDownloadingTo location: URL) + { + temporaryURL = location + + if let destination = destination { + let result = destination(location, downloadTask.response as! HTTPURLResponse) + let destination = result.destinationURL + let options = result.options + + do { + destinationURL = destination + + if options.contains(.removePreviousFile) { + if FileManager.default.fileExists(atPath: destination.path) { + try FileManager.default.removeItem(at: destination) + } + } + + if options.contains(.createIntermediateDirectories) { + let directory = destination.deletingLastPathComponent() + try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true, attributes: nil) + } + + try FileManager.default.moveItem(at: location, to: destination) + } catch { + self.error = error + } + } + } + + func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didWriteData bytesWritten: Int64, + totalBytesWritten: Int64, + totalBytesExpectedToWrite: Int64) + { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let downloadTaskDidWriteData = downloadTaskDidWriteData { + downloadTaskDidWriteData( + session, + downloadTask, + bytesWritten, + totalBytesWritten, + totalBytesExpectedToWrite + ) + } else { + progress.totalUnitCount = totalBytesExpectedToWrite + progress.completedUnitCount = totalBytesWritten + + if let progressHandler = progressHandler { + progressHandler.queue.async { progressHandler.closure(self.progress) } + } + } + } + + func urlSession( + _ session: URLSession, + downloadTask: URLSessionDownloadTask, + didResumeAtOffset fileOffset: Int64, + expectedTotalBytes: Int64) + { + if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { + downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) + } else { + progress.totalUnitCount = expectedTotalBytes + progress.completedUnitCount = fileOffset + } + } +} + +// MARK: - + +class UploadTaskDelegate: DataTaskDelegate { + + // MARK: Properties + + var uploadTask: URLSessionUploadTask { return task as! URLSessionUploadTask } + + var uploadProgress: Progress + var uploadProgressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? + + // MARK: Lifecycle + + override init(task: URLSessionTask?) { + uploadProgress = Progress(totalUnitCount: 0) + super.init(task: task) + } + + override func reset() { + super.reset() + uploadProgress = Progress(totalUnitCount: 0) + } + + // MARK: URLSessionTaskDelegate + + var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? + + func URLSession( + _ session: URLSession, + task: URLSessionTask, + didSendBodyData bytesSent: Int64, + totalBytesSent: Int64, + totalBytesExpectedToSend: Int64) + { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let taskDidSendBodyData = taskDidSendBodyData { + taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) + } else { + uploadProgress.totalUnitCount = totalBytesExpectedToSend + uploadProgress.completedUnitCount = totalBytesSent + + if let uploadProgressHandler = uploadProgressHandler { + uploadProgressHandler.queue.async { uploadProgressHandler.closure(self.uploadProgress) } + } + } + } +} diff --git a/Example/Pods/Alamofire/Source/Timeline.swift b/Example/Pods/Alamofire/Source/Timeline.swift new file mode 100644 index 0000000..1440989 --- /dev/null +++ b/Example/Pods/Alamofire/Source/Timeline.swift @@ -0,0 +1,136 @@ +// +// Timeline.swift +// +// Copyright (c) 2014-2016 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 +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for computing the timing metrics for the complete lifecycle of a `Request`. +public struct Timeline { + /// The time the request was initialized. + public let requestStartTime: CFAbsoluteTime + + /// The time the first bytes were received from or sent to the server. + public let initialResponseTime: CFAbsoluteTime + + /// The time when the request was completed. + public let requestCompletedTime: CFAbsoluteTime + + /// The time when the response serialization was completed. + public let serializationCompletedTime: CFAbsoluteTime + + /// The time interval in seconds from the time the request started to the initial response from the server. + public let latency: TimeInterval + + /// The time interval in seconds from the time the request started to the time the request completed. + public let requestDuration: TimeInterval + + /// The time interval in seconds from the time the request completed to the time response serialization completed. + public let serializationDuration: TimeInterval + + /// The time interval in seconds from the time the request started to the time response serialization completed. + public let totalDuration: TimeInterval + + /// Creates a new `Timeline` instance with the specified request times. + /// + /// - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. + /// - parameter initialResponseTime: The time the first bytes were received from or sent to the server. + /// Defaults to `0.0`. + /// - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. + /// - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults + /// to `0.0`. + /// + /// - returns: The new `Timeline` instance. + public init( + requestStartTime: CFAbsoluteTime = 0.0, + initialResponseTime: CFAbsoluteTime = 0.0, + requestCompletedTime: CFAbsoluteTime = 0.0, + serializationCompletedTime: CFAbsoluteTime = 0.0) + { + self.requestStartTime = requestStartTime + self.initialResponseTime = initialResponseTime + self.requestCompletedTime = requestCompletedTime + self.serializationCompletedTime = serializationCompletedTime + + self.latency = initialResponseTime - requestStartTime + self.requestDuration = requestCompletedTime - requestStartTime + self.serializationDuration = serializationCompletedTime - requestCompletedTime + self.totalDuration = serializationCompletedTime - requestStartTime + } +} + +// MARK: - CustomStringConvertible + +extension Timeline: CustomStringConvertible { + /// The textual representation used when written to an output stream, which includes the latency, the request + /// duration and the total duration. + public var description: String { + let latency = String(format: "%.3f", self.latency) + let requestDuration = String(format: "%.3f", self.requestDuration) + let serializationDuration = String(format: "%.3f", self.serializationDuration) + let totalDuration = String(format: "%.3f", self.totalDuration) + + // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is + // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. + let timings = [ + "\"Latency\": " + latency + " secs", + "\"Request Duration\": " + requestDuration + " secs", + "\"Serialization Duration\": " + serializationDuration + " secs", + "\"Total Duration\": " + totalDuration + " secs" + ] + + return "Timeline: { " + timings.joined(separator: ", ") + " }" + } +} + +// MARK: - CustomDebugStringConvertible + +extension Timeline: CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, which includes the request start time, the + /// initial response time, the request completed time, the serialization completed time, the latency, the request + /// duration and the total duration. + public var debugDescription: String { + let requestStartTime = String(format: "%.3f", self.requestStartTime) + let initialResponseTime = String(format: "%.3f", self.initialResponseTime) + let requestCompletedTime = String(format: "%.3f", self.requestCompletedTime) + let serializationCompletedTime = String(format: "%.3f", self.serializationCompletedTime) + let latency = String(format: "%.3f", self.latency) + let requestDuration = String(format: "%.3f", self.requestDuration) + let serializationDuration = String(format: "%.3f", self.serializationDuration) + let totalDuration = String(format: "%.3f", self.totalDuration) + + // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is + // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. + let timings = [ + "\"Request Start Time\": " + requestStartTime, + "\"Initial Response Time\": " + initialResponseTime, + "\"Request Completed Time\": " + requestCompletedTime, + "\"Serialization Completed Time\": " + serializationCompletedTime, + "\"Latency\": " + latency + " secs", + "\"Request Duration\": " + requestDuration + " secs", + "\"Serialization Duration\": " + serializationDuration + " secs", + "\"Total Duration\": " + totalDuration + " secs" + ] + + return "Timeline: { " + timings.joined(separator: ", ") + " }" + } +} diff --git a/Example/Pods/Alamofire/Source/Upload.swift b/Example/Pods/Alamofire/Source/Upload.swift deleted file mode 100644 index f7cc8bc..0000000 --- a/Example/Pods/Alamofire/Source/Upload.swift +++ /dev/null @@ -1,372 +0,0 @@ -// Upload.swift -// -// Copyright (c) 2014–2015 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 -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -extension Manager { - private enum Uploadable { - case Data(NSURLRequest, NSData) - case File(NSURLRequest, NSURL) - case Stream(NSURLRequest, NSInputStream) - } - - private func upload(uploadable: Uploadable) -> Request { - var uploadTask: NSURLSessionUploadTask! - var HTTPBodyStream: NSInputStream? - - switch uploadable { - case .Data(let request, let data): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithRequest(request, fromData: data) - } - case .File(let request, let fileURL): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithRequest(request, fromFile: fileURL) - } - case .Stream(let request, let stream): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithStreamedRequest(request) - } - - HTTPBodyStream = stream - } - - let request = Request(session: session, task: uploadTask) - - if HTTPBodyStream != nil { - request.delegate.taskNeedNewBodyStream = { _, _ in - return HTTPBodyStream - } - } - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: File - - /** - Creates a request for uploading a file to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - parameter file: The file to upload - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { - return upload(.File(URLRequest.URLRequest, file)) - } - - /** - Creates a request for uploading a file to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter file: The file to upload - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - file: NSURL) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - return upload(mutableURLRequest, file: file) - } - - // MARK: Data - - /** - Creates a request for uploading data to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter data: The data to upload. - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { - return upload(.Data(URLRequest.URLRequest, data)) - } - - /** - Creates a request for uploading data to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter data: The data to upload - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - data: NSData) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload(mutableURLRequest, data: data) - } - - // MARK: Stream - - /** - Creates a request for uploading a stream to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter stream: The stream to upload. - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { - return upload(.Stream(URLRequest.URLRequest, stream)) - } - - /** - Creates a request for uploading a stream to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter stream: The stream to upload. - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - stream: NSInputStream) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload(mutableURLRequest, stream: stream) - } - - // MARK: MultipartFormData - - /// Default memory threshold used when encoding `MultipartFormData`. - public static let MultipartFormDataEncodingMemoryThreshold: UInt64 = 10 * 1024 * 1024 - - /** - Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as - associated values. - - - Success: Represents a successful `MultipartFormData` encoding and contains the new `Request` along with - streaming information. - - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding - error. - */ - public enum MultipartFormDataEncodingResult { - case Success(request: Request, streamingFromDisk: Bool, streamFileURL: NSURL?) - case Failure(ErrorType) - } - - /** - Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. - - It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - used for larger payloads such as video content. - - The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - technique was used. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload( - mutableURLRequest, - multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, - encodingCompletion: encodingCompletion - ) - } - - /** - Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. - - It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - used for larger payloads such as video content. - - The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - technique was used. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - */ - public func upload( - URLRequest: URLRequestConvertible, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { - let formData = MultipartFormData() - multipartFormData(formData) - - let URLRequestWithContentType = URLRequest.URLRequest - URLRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") - - let isBackgroundSession = self.session.configuration.identifier != nil - - if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { - do { - let data = try formData.encode() - let encodingResult = MultipartFormDataEncodingResult.Success( - request: self.upload(URLRequestWithContentType, data: data), - streamingFromDisk: false, - streamFileURL: nil - ) - - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(encodingResult) - } - } catch { - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(.Failure(error as NSError)) - } - } - } else { - let fileManager = NSFileManager.defaultManager() - let tempDirectoryURL = NSURL(fileURLWithPath: NSTemporaryDirectory()) - let directoryURL = tempDirectoryURL.URLByAppendingPathComponent("com.alamofire.manager/multipart.form.data") - let fileName = NSUUID().UUIDString - let fileURL = directoryURL.URLByAppendingPathComponent(fileName) - - do { - try fileManager.createDirectoryAtURL(directoryURL, withIntermediateDirectories: true, attributes: nil) - try formData.writeEncodedDataToDisk(fileURL) - - dispatch_async(dispatch_get_main_queue()) { - let encodingResult = MultipartFormDataEncodingResult.Success( - request: self.upload(URLRequestWithContentType, file: fileURL), - streamingFromDisk: true, - streamFileURL: fileURL - ) - encodingCompletion?(encodingResult) - } - } catch { - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(.Failure(error as NSError)) - } - } - } - } - } -} - -// MARK: - - -extension Request { - - // MARK: - UploadTaskDelegate - - class UploadTaskDelegate: DataTaskDelegate { - var uploadTask: NSURLSessionUploadTask? { return task as? NSURLSessionUploadTask } - var uploadProgress: ((Int64, Int64, Int64) -> Void)! - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else { - progress.totalUnitCount = totalBytesExpectedToSend - progress.completedUnitCount = totalBytesSent - - uploadProgress?(bytesSent, totalBytesSent, totalBytesExpectedToSend) - } - } - } -} diff --git a/Example/Pods/Alamofire/Source/Validation.swift b/Example/Pods/Alamofire/Source/Validation.swift index 24f29d7..c405d02 100644 --- a/Example/Pods/Alamofire/Source/Validation.swift +++ b/Example/Pods/Alamofire/Source/Validation.swift @@ -1,107 +1,58 @@ -// Validation.swift // -// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// Validation.swift // -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. import Foundation extension Request { - /** - Used to represent whether validation was successful or encountered an error resulting in a failure. - - - Success: The validation was successful. - - Failure: The validation failed encountering the provided error. - */ - public enum ValidationResult { - case Success - case Failure(ErrorType) - } - - /** - A closure used to validate a request that takes a URL request and URL response, and returns whether the - request was valid. - */ - public typealias Validation = (NSURLRequest?, NSHTTPURLResponse) -> ValidationResult - - /** - Validates the request, using the specified closure. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - parameter validation: A closure to validate the request. - - - returns: The request. - */ - public func validate(validation: Validation) -> Self { - delegate.queue.addOperationWithBlock { - if let - response = self.response where self.delegate.error == nil, - case let .Failure(error) = validation(self.request, response) - { - self.delegate.error = error - } - } - - return self - } - - // MARK: - Status Code - - /** - Validates that the response has a status code in the specified range. - - If validation fails, subsequent calls to response handlers will have an associated error. + // MARK: Helper Types - - parameter range: The range of acceptable status codes. + fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason - - returns: The request. - */ - public func validate(statusCode acceptableStatusCode: S) -> Self { - return validate { _, response in - if acceptableStatusCode.contains(response.statusCode) { - return .Success - } else { - let failureReason = "Response status code was unacceptable: \(response.statusCode)" - return .Failure(Error.errorWithCode(.StatusCodeValidationFailed, failureReason: failureReason)) - } - } + /// Used to represent whether validation was successful or encountered an error resulting in a failure. + /// + /// - success: The validation was successful. + /// - failure: The validation failed encountering the provided error. + public enum ValidationResult { + case success + case failure(Error) } - // MARK: - Content-Type - - private struct MIMEType { + fileprivate struct MIMEType { let type: String let subtype: String + var isWildcard: Bool { return type == "*" && subtype == "*" } + init?(_ string: String) { let components: [String] = { - let stripped = string.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) - let split = stripped.substringToIndex(stripped.rangeOfString(";")?.endIndex ?? stripped.endIndex) - return split.componentsSeparatedByString("/") + let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) + let split = stripped.substring(to: stripped.range(of: ";")?.lowerBound ?? stripped.endIndex) + return split.components(separatedBy: "/") }() - if let - type = components.first, - subtype = components.last - { + if let type = components.first, let subtype = components.last { self.type = type self.subtype = subtype } else { @@ -109,9 +60,9 @@ extension Request { } } - func matches(MIME: MIMEType) -> Bool { + func matches(_ mime: MIMEType) -> Bool { switch (type, subtype) { - case (MIME.type, MIME.subtype), (MIME.type, "*"), ("*", MIME.subtype), ("*", "*"): + case (mime.type, mime.subtype), (mime.type, "*"), ("*", mime.subtype), ("*", "*"): return true default: return false @@ -119,69 +70,240 @@ extension Request { } } - /** - Validates that the response has a content type in the specified array. + // MARK: Properties - If validation fails, subsequent calls to response handlers will have an associated error. + fileprivate var acceptableStatusCodes: [Int] { return Array(200..<300) } - - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. + fileprivate var acceptableContentTypes: [String] { + if let accept = request?.value(forHTTPHeaderField: "Accept") { + return accept.components(separatedBy: ",") + } - - returns: The request. - */ - public func validate(contentType acceptableContentTypes: S) -> Self { - return validate { _, response in - if let - responseContentType = response.MIMEType, - responseMIMEType = MIMEType(responseContentType) - { - for contentType in acceptableContentTypes { - if let acceptableMIMEType = MIMEType(contentType) where acceptableMIMEType.matches(responseMIMEType) { - return .Success - } - } - } else { - for contentType in acceptableContentTypes { - if let MIMEType = MIMEType(contentType) where MIMEType.type == "*" && MIMEType.subtype == "*" { - return .Success - } + return ["*/*"] + } + + // MARK: Status Code + + fileprivate func validate( + statusCode acceptableStatusCodes: S, + response: HTTPURLResponse) + -> ValidationResult + where S.Iterator.Element == Int + { + if acceptableStatusCodes.contains(response.statusCode) { + return .success + } else { + let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode) + return .failure(AFError.responseValidationFailed(reason: reason)) + } + } + + // MARK: Content Type + + fileprivate func validate( + contentType acceptableContentTypes: S, + response: HTTPURLResponse, + data: Data?) + -> ValidationResult + where S.Iterator.Element == String + { + guard let data = data, data.count > 0 else { return .success } + + guard + let responseContentType = response.mimeType, + let responseMIMEType = MIMEType(responseContentType) + else { + for contentType in acceptableContentTypes { + if let mimeType = MIMEType(contentType), mimeType.isWildcard { + return .success } } - let failureReason: String + let error: AFError = { + let reason: ErrorReason = .missingContentType(acceptableContentTypes: Array(acceptableContentTypes)) + return AFError.responseValidationFailed(reason: reason) + }() - if let responseContentType = response.MIMEType { - failureReason = ( - "Response content type \"\(responseContentType)\" does not match any acceptable " + - "content types: \(acceptableContentTypes)" - ) - } else { - failureReason = "Response content type was missing and acceptable content type does not match \"*/*\"" - } + return .failure(error) + } - return .Failure(Error.errorWithCode(.ContentTypeValidationFailed, failureReason: failureReason)) + for contentType in acceptableContentTypes { + if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) { + return .success + } } + + let error: AFError = { + let reason: ErrorReason = .unacceptableContentType( + acceptableContentTypes: Array(acceptableContentTypes), + responseContentType: responseContentType + ) + + return AFError.responseValidationFailed(reason: reason) + }() + + return .failure(error) } +} + +// MARK: - + +extension DataRequest { + /// A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the + /// request was valid. + public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult + + /// Validates the request, using the specified closure. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter validation: A closure to validate the request. + /// + /// - returns: The request. + @discardableResult + public func validate(_ validation: @escaping Validation) -> Self { + let validationExecution: () -> Void = { [unowned self] in + if + let response = self.response, + self.delegate.error == nil, + case let .failure(error) = validation(self.request, response, self.delegate.data) + { + self.delegate.error = error + } + } + + validations.append(validationExecution) - // MARK: - Automatic + return self + } - /** - Validates that the response has a status code in the default acceptable range of 200...299, and that the content - type matches any specified in the Accept HTTP header field. + /// Validates that the response has a status code in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter range: The range of acceptable status codes. + /// + /// - returns: The request. + @discardableResult + public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { + return validate { [unowned self] _, response, _ in + return self.validate(statusCode: acceptableStatusCodes, response: response) + } + } - If validation fails, subsequent calls to response handlers will have an associated error. + /// Validates that the response has a content type in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. + /// + /// - returns: The request. + @discardableResult + public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { + return validate { [unowned self] _, response, data in + return self.validate(contentType: acceptableContentTypes, response: response, data: data) + } + } - - returns: The request. - */ + /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content + /// type matches any specified in the Accept HTTP header field. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - returns: The request. + @discardableResult public func validate() -> Self { - let acceptableStatusCodes: Range = 200..<300 - let acceptableContentTypes: [String] = { - if let accept = request?.valueForHTTPHeaderField("Accept") { - return accept.componentsSeparatedByString(",") + return validate(statusCode: self.acceptableStatusCodes).validate(contentType: self.acceptableContentTypes) + } +} + +// MARK: - + +extension DownloadRequest { + /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a + /// destination URL, and returns whether the request was valid. + public typealias Validation = ( + _ request: URLRequest?, + _ response: HTTPURLResponse, + _ temporaryURL: URL?, + _ destinationURL: URL?) + -> ValidationResult + + /// Validates the request, using the specified closure. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter validation: A closure to validate the request. + /// + /// - returns: The request. + @discardableResult + public func validate(_ validation: @escaping Validation) -> Self { + let validationExecution: () -> Void = { [unowned self] in + let request = self.request + let temporaryURL = self.downloadDelegate.temporaryURL + let destinationURL = self.downloadDelegate.destinationURL + + if + let response = self.response, + self.delegate.error == nil, + case let .failure(error) = validation(request, response, temporaryURL, destinationURL) + { + self.delegate.error = error } + } - return ["*/*"] - }() + validations.append(validationExecution) - return validate(statusCode: acceptableStatusCodes).validate(contentType: acceptableContentTypes) + return self + } + + /// Validates that the response has a status code in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter range: The range of acceptable status codes. + /// + /// - returns: The request. + @discardableResult + public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { + return validate { [unowned self] _, response, _, _ in + return self.validate(statusCode: acceptableStatusCodes, response: response) + } + } + + /// Validates that the response has a content type in the specified sequence. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. + /// + /// - returns: The request. + @discardableResult + public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { + return validate { [unowned self] _, response, _, _ in + let fileURL = self.downloadDelegate.fileURL + + guard let validFileURL = fileURL else { + return .failure(AFError.responseValidationFailed(reason: .dataFileNil)) + } + + do { + let data = try Data(contentsOf: validFileURL) + return self.validate(contentType: acceptableContentTypes, response: response, data: data) + } catch { + return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL))) + } + } + } + + /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content + /// type matches any specified in the Accept HTTP header field. + /// + /// If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - returns: The request. + @discardableResult + public func validate() -> Self { + return validate(statusCode: self.acceptableStatusCodes).validate(contentType: self.acceptableContentTypes) } } diff --git a/Example/Pods/Headers/Private/OHHTTPStubs/Compatibility.h b/Example/Pods/Headers/Private/OHHTTPStubs/Compatibility.h deleted file mode 120000 index 638d8e9..0000000 --- a/Example/Pods/Headers/Private/OHHTTPStubs/Compatibility.h +++ /dev/null @@ -1 +0,0 @@ -../../../OHHTTPStubs/OHHTTPStubs/Sources/Compatibility.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubs.h b/Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubs.h deleted file mode 120000 index 984cead..0000000 --- a/Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubs.h +++ /dev/null @@ -1 +0,0 @@ -../../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubsResponse+JSON.h b/Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubsResponse+JSON.h deleted file mode 120000 index feb21b0..0000000 --- a/Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubsResponse+JSON.h +++ /dev/null @@ -1 +0,0 @@ -../../../OHHTTPStubs/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubsResponse.h b/Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubsResponse.h deleted file mode 120000 index 9a5e7fc..0000000 --- a/Example/Pods/Headers/Private/OHHTTPStubs/OHHTTPStubsResponse.h +++ /dev/null @@ -1 +0,0 @@ -../../../OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h \ No newline at end of file diff --git a/Example/Pods/Headers/Private/OHHTTPStubs/OHPathHelpers.h b/Example/Pods/Headers/Private/OHHTTPStubs/OHPathHelpers.h deleted file mode 120000 index cd0f7b0..0000000 --- a/Example/Pods/Headers/Private/OHHTTPStubs/OHPathHelpers.h +++ /dev/null @@ -1 +0,0 @@ -../../../OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h \ No newline at end of file diff --git a/Example/Pods/Local Podspecs/LotameDMP.podspec.json b/Example/Pods/Local Podspecs/LotameDMP.podspec.json index da24a98..06af83a 100644 --- a/Example/Pods/Local Podspecs/LotameDMP.podspec.json +++ b/Example/Pods/Local Podspecs/LotameDMP.podspec.json @@ -1,6 +1,6 @@ { "name": "LotameDMP", - "version": "3.0.0", + "version": "3.1.0", "summary": "This open source library can be leveraged by Lotame clients to collect data from within their iOS applications.", "description": "Data should influence everything you do – from the products and content you create, to the way you shape and execute your go-to-market strategy. Lotame’s data management platform makes this vision a reality. Our SaaS platform is used by marketers, agencies and publishers around the world to make audience data meaningful and actionable. This framework makes it easy to plug your iOS app into the data management platform.", "homepage": "https://github.com/Lotame/LotameDMP-IOS", @@ -10,10 +10,10 @@ }, "source": { "git": "https://github.com/Lotame/LotameDMP-IOS.git", - "tag": "3.0.0" + "tag": "3.1.0" }, "platforms": { - "ios": "8.0" + "ios": "10.0" }, "requires_arc": true, "source_files": "Pod/Classes/**/*", @@ -25,7 +25,7 @@ "frameworks": "AdSupport", "dependencies": { "Alamofire": [ - "~> 2.0" + "~> 4.0" ] } } diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index ad1f721..47ddcf1 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,7 +1,7 @@ PODS: - - Alamofire (2.0.2) - - LotameDMP (3.0.0): - - Alamofire (~> 2.0) + - Alamofire (4.0.1) + - LotameDMP (3.1.0): + - Alamofire (~> 4.0) - OHHTTPStubs (4.3.0): - OHHTTPStubs/Default (= 4.3.0) - OHHTTPStubs/Core (4.3.0) @@ -25,8 +25,10 @@ EXTERNAL SOURCES: :path: ../ SPEC CHECKSUMS: - Alamofire: 8edbab00802a752bb5240cc2abe70e7e881488ad - LotameDMP: 58ef9e6bd216a2af13d78c6aebdbb2bb21ffce99 + Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 + LotameDMP: 0ad1e60d8736730f1cb5b06332189754d021da02 OHHTTPStubs: 0aec5755528693a165bd616cb79f69387de306a8 -COCOAPODS: 0.38.2 +PODFILE CHECKSUM: 5e055f3d87d9e826bbffdaa946dd6844c802fc9c + +COCOAPODS: 1.1.1 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 455d860..03cc354 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,238 +7,244 @@ objects = { /* Begin PBXBuildFile section */ - 009AE782A5AFD14DDA91E1D71E4E6507 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AB4AF6CAF7A7B4956687FF0E065B8FF /* ParameterEncoding.swift */; }; - 01AE87957D921CB565035F6369E72140 /* Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C6DC457C118F421B5D13E6789C324C9 /* Manager.swift */; }; - 07A09D811E0EF83AA87A370F43F712F7 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C56C023A6870973D0C5A823A09F13396 /* AdSupport.framework */; }; - 0EF9CBA34A39B980D3C61EC0F57FF0DA /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = FA8525CDCE4FCC3A5415D5F6696B402B /* OHHTTPStubs+NSURLSessionConfiguration.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 118B634122B86666C1A7A7972C726B87 /* LotameDMP-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6CEA2D1603E2AE7A869682E3D294785E /* LotameDMP-dummy.m */; }; - 11D18F40A48B34B55DA8C6578F2E6835 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1051355AE65A955DDF529E0FE786E66F /* Foundation.framework */; }; - 1A01B6DE4403F2719B138E9C358DA1CF /* LotameDMP.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EE88ACBD6DD88C09E3031583958AE878 /* LotameDMP.bundle */; }; - 1AD1F642BBE1B42477F7C91F2EAB1C44 /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 57CF798D90140C7D0577246E1DA4FD9E /* OHHTTPStubsResponse.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 1DC303E71BC5625F29686B4CE0E586D8 /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = ABB9D052B79221ED9F7844F74361A917 /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 20AC293327EE160EA1A5E2F645185233 /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = E717534382D01E8BDDA730BB0BD0BABF /* OHHTTPStubs.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 2273AC0640307635D1E43749FAA786BB /* OHHTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 925EBA45D352E08B60FF208D27CD2B38 /* OHHTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 274C95E3F234E0D799C7AA210989DAD1 /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B9B65BB69E45C6BF1EF8BC49193D9EE /* LotameError.swift */; }; - 2B6C55646F12154C6E5B4DB83E8E6DE0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1051355AE65A955DDF529E0FE786E66F /* Foundation.framework */; }; - 33BE12E7856B5004E145E2EAEB4D4AE2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1051355AE65A955DDF529E0FE786E66F /* Foundation.framework */; }; - 34C646A44C22A525CFABA0602FACD164 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72D00DE8C4194C995302738C18D0E194 /* DMP.swift */; }; - 36636BF17902E463FB49D07D8B03FEDD /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF83350DB22929E4E22A892025D3209B /* LotameProfile.swift */; }; - 4048F18FF8FF62F379759DA5492BD475 /* Pods-LotameDMP_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F291B5AD50ACA2B4543D748CA12007D1 /* Pods-LotameDMP_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 41C654413782D1EDF8D0BDF646BF0F0B /* LotameDMP-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A018311EC3C2FE16E316C7C82F566CD3 /* LotameDMP-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 421BE4B4D011E53F006777A101878B2E /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 797BAF7C00C6A1FD93300ACF63C31FEA /* ServerTrustPolicy.swift */; }; - 49B3AF3BAB7B44014CE3C0882FBDEF42 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67D85A80EC82B54489CE1BACE7D2D711 /* Alamofire.swift */; }; - 4F713589A07575754ABA4E7659E42BE6 /* Pods-LotameDMP_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E7F7B59A315561C178D8B6CAED251376 /* Pods-LotameDMP_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 538960E57786168554F0D3F4E566D247 /* Pods-LotameDMP_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A845AD229351B4F262FC0027A6C5F0A /* Pods-LotameDMP_Tests-dummy.m */; }; - 545DB1A81D673AF395E2B393E9EECCE7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1051355AE65A955DDF529E0FE786E66F /* Foundation.framework */; }; - 5E2F9720521F73103F86319CB6243F70 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1051355AE65A955DDF529E0FE786E66F /* Foundation.framework */; }; - 5EB01E0DF700DC928E96CFB8E52B995D /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C3A886730E68DE450F8EDF51BA924E6 /* CFNetwork.framework */; }; - 626D3860435477A72AB20F22287CE15B /* OHPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 640214502C0B642FB7C572F8B6A9C19B /* OHPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 633239715D5366A333DA0751AA5B9A4D /* Download.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FFCEFA76A0D63A65D003B21968AAF57 /* Download.swift */; }; - 63B17830768B0D423C41B4D54C50030E /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F3D803A4D18E4A02D1CFD79F9C417619 /* Alamofire-dummy.m */; }; - 7CC2A6FF5CD5CD62E7BCC1F2A789E6B8 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB264D62A8D0010E44A7801276BDA858 /* Validation.swift */; }; - 7FA9B57CC78B619A5440FF033174AB08 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13ED5791B23905831306C04A7B08268 /* Request.swift */; }; - 82DE225ABBB854FC0F98BFF13FE11283 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58E257AE0D72EA7A0D651EF67D1C277 /* ResponseSerialization.swift */; }; - 929FF5856EB7FE139D28CA54B5CD8292 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 775B56DBB12E5F8C32FDAEC95DFB904C /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9A761F8B341BB761247FAD61352CF485 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8102FCA526DD5BDF7A0D4D9CC078DB93 /* SwiftyJSON.swift */; }; - A386A388A364DE8C83E7B59671881E2B /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7CF0583DEE9ABFC93E8FB691622FB5A /* Error.swift */; }; - A503EE18BAAF8DBD2626687342A85C7E /* Upload.swift in Sources */ = {isa = PBXBuildFile; fileRef = F442802BBC8B0BA4249881795FA175E4 /* Upload.swift */; }; - B3F5C2D426A39FB098F611377F4FC2ED /* OHHTTPStubs-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9EE79BDBE2C2313B15E2FD7FE76E25A0 /* OHHTTPStubs-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BF0188491E7FF94EEAC5D7D41C1C0577 /* OHHTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = DB6299049A1DBBEDB1127D1441BC82BE /* OHHTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C841A77AAEBDEF736B29D28A1D49D668 /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E8C55E46B66118CF9A198E7A179F00 /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CACE2BC429E8380D6D25DEAB26BFAFFC /* OHHTTPStubs-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E04BEFE6AB60B5DEA587319ED8DF318B /* OHHTTPStubs-dummy.m */; }; - CD1A0E4C494C498C704CA808EFA3AD3C /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4B7E535D71A2BE4B4CF758EFF6C9881 /* Alamofire.framework */; }; - D2B14BF181214C71C668A1443680C1EA /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0BB1BCF11EEF80CDB593CF1CEA6364 /* MultipartFormData.swift */; }; - E6551C25D8FC6976F18C57DB0104D518 /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 57E38600117174A538AFB7B46478C51A /* OHHTTPStubsResponse+JSON.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - E8888B70FA951A4C1F84CD50C2B60C24 /* Pods-LotameDMP_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3D8C0B66DE5E52D356CBFBBF89A45D /* Pods-LotameDMP_Example-dummy.m */; }; - E95397ECA8702DBC9FCB2D1522003F5B /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4D356C7DC5C05F5FDDEF40055631BE9 /* Result.swift */; }; - ED11DD27B6423AF02AA14AB00D5E6408 /* OHPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 05D10AB2666BD38F2982AA8180F910F8 /* OHPathHelpers.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F4F068C55524B7C05E27F9E7B24D896E /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04D8816A1E2CC85E1683B6A31B3B6BB /* Stream.swift */; }; - FBA40FD501B0342BDFB1FAA733E07BBD /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68FE50EFDBC2F3C2C47F8ADD5ECBD676 /* LotameAudience.swift */; }; + 05A232BDABB70CDFA8866A15209902C8 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */; }; + 05F57DB1DF9DC9F1DC5BA02CF0C83103 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */; }; + 0C1B4E9FFB8B81E8833A3BAD537B1990 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */; }; + 12118C354EFA36292F82A8D0CFCE45B2 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */; }; + 12D2F7AA45E613F050F3BF2F39BBA47B /* OHHTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = AA00E0101286C4EA4CAFD71FED6AB975 /* OHHTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 32A59DBF168A9B955C020B5719EBCB0D /* OHHTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 99BB0E773A4270CB40969C6AE003138B /* OHHTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 33CF8828DAEF041D4B239FE98C91AD3E /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAF895630194862E697B0F8A24A1997 /* OHHTTPStubs+NSURLSessionConfiguration.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 387B673926C97011BC576EC8064530A6 /* OHHTTPStubs-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D742756C06BA3CA85A3DB8D87DF84B8 /* OHHTTPStubs-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3982B850C43B41BA6D25F440F0412E9B /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */; }; + 4BC04237995CF690E2E2AF9727F9A72B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + 572AE99BB35CB6DFEFF19E74B0BDD3F8 /* Pods-LotameDMP_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */; }; + 5F71AC3EEF87C19AF3D8463DC0390970 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */; }; + 62143065F94E53F437DCE5D7A998D66D /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */; }; + 623FD70CADFD4593E65178BBAD28298E /* OHHTTPStubs-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 96D26DD0113CE8C203AB4708A9511491 /* OHHTTPStubs-dummy.m */; }; + 6B1C00F3DED5CA430DAD920B385B2E33 /* OHPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 930F39323D32CA5090E63B5F79DD6534 /* OHPathHelpers.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 6B21B7E82C6A41BBD99DE1D08225406E /* LotameDMP.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */; }; + 7CA5A9BA5246FDA8227233E310029392 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */; }; + 86ED08F33B7D357932A9AB743E9D9EA7 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E4018A949737B851B6F6630C9E83D48 /* Response.swift */; }; + 876EDA2433FA95337E2D771F302C5203 /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C1B8B21FED3FC1E18D701D856B6DD7C /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8CD152E0420FE4DDEDCDB5991C2022B2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + 8D463A0A4C65C02FDD5211F0F3C6F8B8 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */; }; + 907AB123FBC8BC9340D5B7350CE828DF /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */; }; + 9469DF81ECB494E84675969B5E13374C /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 991B2C9AE8F450C35CF57FA15E0AAABC /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */; }; + A194DEE96E5D5C9D61FD6CFCB61E91BD /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 3005CA8FA79E87B0E6388D53F6573ABD /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A20BA8DB7AA816391AE32C1F91F988B9 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */; }; + A6CCC994A5541AB7ADE2DA96E90CC702 /* OHPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = C3A3EF06093D9C45436E81EBF4334E9E /* OHPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A79AC30123B0C2177D67F6ED6A1B3215 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */; }; + AF158CAAF4DD319009AFC855DC995D90 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */; }; + B45A3E4244B4E8ABA6BBA26F6AC727F8 /* Pods-LotameDMP_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */; }; + B53F9B91A0CBD8B2FA06E31D9B058D6F /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */; }; + B8154C96802336E5DDA5CEE97C3180A0 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */; }; + C0AEA97E7684DDAD56998C0AE198A433 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */; }; + C2BDA028DB762F64A26DAB0B98EB29CA /* LotameDMP-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */; }; + C331F4CD251C22970EB86DCE1DF7F794 /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 0679B210B6951C4CEE08C6AC5BEB70FA /* OHHTTPStubsResponse.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + C7A3408350643ADE1018826C766EE356 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */; }; + C80B89584525646FD62EAC6016567D67 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + C9F90C2C178321C30D5145422B636837 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + CB51CFA9BFBF0DB45C73F766F764F54C /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */; }; + D21340D5263977F89ACC086AA6C8064A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + D2364D047E3D8E0316F69BE1FC34A676 /* Pods-LotameDMP_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DF1BBF94997A2F4248B42B25EA919EC2 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */; }; + E1F583CB4A68A928CD197250AA752926 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */; }; + E2A1C34237B4E928E5F85C097F4C2551 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */; }; + E365AC4BF252B784D4812AF8DD283CAF /* LotameDMP-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E59BF19C0AFA68B741552319FC478C7B /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */; }; + E8E7CCF090EC2EB4E3C29D2954D21F17 /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 384AC83FE0ED15FD5BB52DF20A536D59 /* OHHTTPStubs.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + F0D97D2DA24F280B10C717A0D8318E8E /* Pods-LotameDMP_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F1B199D167AF74FCE8EF5DA74002EDD5 /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */; }; + F21D0F96BA6EDE58E4F70E83568E07D5 /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DC89220C461D008FA4C5EA0E4C9DB4A /* OHHTTPStubsResponse+JSON.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + FFFDD494EE6D1B83DDAF5F2721F685A6 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 16AA02D0324386AF8B1282A45A22C811 /* PBXContainerItemProxy */ = { + 464490E8BA5DE172FE0DC8BE21F8E3B0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 04E9D1B502C6550A8F3FEE2C40F5A204; - remoteInfo = Alamofire; + remoteGlobalIDString = B9F753D23B3A010D0E2EB0AE0405D595; + remoteInfo = OHHTTPStubs; }; - 43A0BD2D64FDA886691092146E70392A /* PBXContainerItemProxy */ = { + 505EFE26C4FEAFB5A8CDB63809DD1578 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 04E9D1B502C6550A8F3FEE2C40F5A204; - remoteInfo = Alamofire; + remoteGlobalIDString = 9D0644CBCDD3B6B08C644A8D3E94551D; + remoteInfo = LotameDMP; }; - 6301E954E5D587B52D7D597C43B5BDA6 /* PBXContainerItemProxy */ = { + 55A91AC4BA2B1629E51C6C624CF664FE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = BE8A690DA1FA056551783C6889BD3C14; - remoteInfo = OHHTTPStubs; + remoteGlobalIDString = 79C040AFDDCE1BCBF6D8B5EB0B85887F; + remoteInfo = Alamofire; }; - 896B9C9822A9A71F3BE072B3CC23E8E3 /* PBXContainerItemProxy */ = { + 96DF70416F4AFDBE7A852A2CC34949FF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 04E9D1B502C6550A8F3FEE2C40F5A204; + remoteGlobalIDString = 79C040AFDDCE1BCBF6D8B5EB0B85887F; remoteInfo = Alamofire; }; - A96E534DBE77D4A293FD0D47E872D91F /* PBXContainerItemProxy */ = { + A43CDCCF2FB8E000EAECF2EB61B76F34 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = E82BCDB6949716D945B6853049948CEE; - remoteInfo = LotameDMP; + remoteGlobalIDString = A033892886A83D4ED36187E20BE0D656; + remoteInfo = "LotameDMP-LotameDMP"; }; - AAF298ED00F7A61539A12C33C4B9FE03 /* PBXContainerItemProxy */ = { + C4EFDDA051719C1D2E4A6F42164629EA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = E82BCDB6949716D945B6853049948CEE; - remoteInfo = LotameDMP; + remoteGlobalIDString = 79C040AFDDCE1BCBF6D8B5EB0B85887F; + remoteInfo = Alamofire; }; - E93E88E67C28968DE02B2F55BCAC6E57 /* PBXContainerItemProxy */ = { + FA413DC43ED0B265D263528AA0F113CA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = B0D9C97A1F67BA0EF010903904802D28; - remoteInfo = "LotameDMP-LotameDMP"; + remoteGlobalIDString = 9D0644CBCDD3B6B08C644A8D3E94551D; + remoteInfo = LotameDMP; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 05D10AB2666BD38F2982AA8180F910F8 /* OHPathHelpers.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHPathHelpers.m; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m; sourceTree = ""; }; - 0B9B65BB69E45C6BF1EF8BC49193D9EE /* LotameError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameError.swift; sourceTree = ""; }; - 0F2A80E93DE26EA52409D631D88351C9 /* Pods-LotameDMP_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.release.xcconfig"; sourceTree = ""; }; - 1051355AE65A955DDF529E0FE786E66F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 12BD395E6CFFA82D906165F80BD01170 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 04075B8A4826297DFB273C8A46BDFE07 /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; + 0679B210B6951C4CEE08C6AC5BEB70FA /* OHHTTPStubsResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsResponse.m; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.m; sourceTree = ""; }; + 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/AdSupport.framework; sourceTree = DEVELOPER_DIR; }; + 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 145B43A6485C114F242C01AD2353716A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.debug.xcconfig"; sourceTree = ""; }; 181F8F5C57F8A1DBFBCD6CDB7E049E10 /* Pods-LotameDMP_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 1A734FD1CDCDA08632096C82E19E4AED /* Alamofire-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Alamofire-Private.xcconfig"; sourceTree = ""; }; - 1A845AD229351B4F262FC0027A6C5F0A /* Pods-LotameDMP_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Tests-dummy.m"; sourceTree = ""; }; + 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; + 1A112D98F7E15E89C5EC7C4BBDF995DB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1C4D80FF794C4A13B9739893FFD59DFD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 22F4F5D009316509644A71120C41054A /* OHHTTPStubs-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "OHHTTPStubs-Private.xcconfig"; sourceTree = ""; }; + 1E4018A949737B851B6F6630C9E83D48 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; + 22773853957E083ED85EA9DE08D78838 /* OHHTTPStubs-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-prefix.pch"; sourceTree = ""; }; + 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; + 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; + 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2866D261378FCD4FE14943A99A722B77 /* Pods-LotameDMP_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-LotameDMP_Example.modulemap"; sourceTree = ""; }; - 28A680D5E256E2C6F9051703009214C2 /* Pods-LotameDMP_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.debug.xcconfig"; sourceTree = ""; }; - 2AB4AF6CAF7A7B4956687FF0E065B8FF /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 3B3D8C0B66DE5E52D356CBFBBF89A45D /* Pods-LotameDMP_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Example-dummy.m"; sourceTree = ""; }; - 3C6DC457C118F421B5D13E6789C324C9 /* Manager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Manager.swift; path = Source/Manager.swift; sourceTree = ""; }; + 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; + 3005CA8FA79E87B0E6388D53F6573ABD /* Compatibility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Compatibility.h; path = OHHTTPStubs/Sources/Compatibility.h; sourceTree = ""; }; + 384AC83FE0ED15FD5BB52DF20A536D59 /* OHHTTPStubs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubs.m; path = OHHTTPStubs/Sources/OHHTTPStubs.m; sourceTree = ""; }; + 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DMP.swift; sourceTree = ""; }; 3F6843AA96F513831A4CBD26850657A8 /* Pods-LotameDMP_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LotameDMP_Example-acknowledgements.plist"; sourceTree = ""; }; - 47E43C8AEBDDFF302EE6F1155E85DA7A /* OHHTTPStubs.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OHHTTPStubs.xcconfig; sourceTree = ""; }; + 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; 4927332025C324CA11BC68E9ADD97C5E /* Pods-LotameDMP_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-LotameDMP_Tests.modulemap"; sourceTree = ""; }; 51F9A814E2B204818DF97B58DB17FDCF /* Pods-LotameDMP_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Example-frameworks.sh"; sourceTree = ""; }; - 5700CD955A4D9ACB4B7E68D138742A94 /* Pods-LotameDMP_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.release.xcconfig"; sourceTree = ""; }; - 57CF798D90140C7D0577246E1DA4FD9E /* OHHTTPStubsResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsResponse.m; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.m; sourceTree = ""; }; - 57E38600117174A538AFB7B46478C51A /* OHHTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubsResponse+JSON.m"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m"; sourceTree = ""; }; + 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; 581AC0E6A878A80EFCC3C5A83CA83488 /* Pods-LotameDMP_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Tests-resources.sh"; sourceTree = ""; }; - 5961A3E010E8E528091F35E65E0B217F /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 640214502C0B642FB7C572F8B6A9C19B /* OHPathHelpers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHPathHelpers.h; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h; sourceTree = ""; }; - 67C12BFE01A796BD46530BD446AF9EA8 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 67D85A80EC82B54489CE1BACE7D2D711 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 68FE50EFDBC2F3C2C47F8ADD5ECBD676 /* LotameAudience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameAudience.swift; sourceTree = ""; }; - 6CEA2D1603E2AE7A869682E3D294785E /* LotameDMP-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LotameDMP-dummy.m"; sourceTree = ""; }; - 72D00DE8C4194C995302738C18D0E194 /* DMP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DMP.swift; sourceTree = ""; }; - 7524D1EA29B04636A1DC22C665EBFBDE /* Pods-LotameDMP_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.debug.xcconfig"; sourceTree = ""; }; - 775B56DBB12E5F8C32FDAEC95DFB904C /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - 78C5A8AC5D607F9BD30121EEEF888A45 /* OHHTTPStubs-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-prefix.pch"; sourceTree = ""; }; - 797BAF7C00C6A1FD93300ACF63C31FEA /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - 7A0BB1BCF11EEF80CDB593CF1CEA6364 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 7C3A886730E68DE450F8EDF51BA924E6 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - 7FFCEFA76A0D63A65D003B21968AAF57 /* Download.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Download.swift; path = Source/Download.swift; sourceTree = ""; }; - 8102FCA526DD5BDF7A0D4D9CC078DB93 /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = ""; }; - 897EFA2D4718791C11C69630F427B0F2 /* OHHTTPStubs.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = OHHTTPStubs.modulemap; sourceTree = ""; }; - 8B2DF0993039EC44EAD0ADF645E34F57 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - 91D80540F0673C377547A5719D737AD2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 925EBA45D352E08B60FF208D27CD2B38 /* OHHTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "OHHTTPStubsResponse+JSON.h"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h"; sourceTree = ""; }; - 948C410A08774FE04B740641DB3A78B6 /* LotameDMP.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = LotameDMP.modulemap; sourceTree = ""; }; - 94FD0602A932B7547078B478267BA688 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - 9E54CE4DC47F928B056AB041F33D7B3A /* LotameDMP-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "LotameDMP-Private.xcconfig"; sourceTree = ""; }; - 9EE79BDBE2C2313B15E2FD7FE76E25A0 /* OHHTTPStubs-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-umbrella.h"; sourceTree = ""; }; - A018311EC3C2FE16E316C7C82F566CD3 /* LotameDMP-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-umbrella.h"; sourceTree = ""; }; - ABB9D052B79221ED9F7844F74361A917 /* Compatibility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Compatibility.h; path = OHHTTPStubs/Sources/Compatibility.h; sourceTree = ""; }; + 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LotameDMP-dummy.m"; sourceTree = ""; }; + 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Example-umbrella.h"; sourceTree = ""; }; + 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LotameDMP.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; + 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; + 6D742756C06BA3CA85A3DB8D87DF84B8 /* OHHTTPStubs-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-umbrella.h"; sourceTree = ""; }; + 6DC89220C461D008FA4C5EA0E4C9DB4A /* OHHTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubsResponse+JSON.m"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m"; sourceTree = ""; }; + 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameAudience.swift; sourceTree = ""; }; + 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; + 7D1A4BE8E4619E5421597874BAA43CA7 /* OHHTTPStubs.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OHHTTPStubs.xcconfig; sourceTree = ""; }; + 7DAF895630194862E697B0F8A24A1997 /* OHHTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubs+NSURLSessionConfiguration.m"; path = "OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; + 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; + 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-umbrella.h"; sourceTree = ""; }; + 867FB9BC000430BD8D288DE00752090F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; + 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; + 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = ""; }; + 930F39323D32CA5090E63B5F79DD6534 /* OHPathHelpers.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHPathHelpers.m; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.release.xcconfig"; sourceTree = ""; }; + 93C307C45E5B6F04CD4099CA7FDA8FA9 /* LotameDMP-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-prefix.pch"; sourceTree = ""; }; + 96D26DD0113CE8C203AB4708A9511491 /* OHHTTPStubs-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs-dummy.m"; sourceTree = ""; }; + 978C8A2D546E1949D139D06B78F1D107 /* LotameDMP.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = LotameDMP.modulemap; sourceTree = ""; }; + 99BB0E773A4270CB40969C6AE003138B /* OHHTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "OHHTTPStubsResponse+JSON.h"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h"; sourceTree = ""; }; + 9C1B8B21FED3FC1E18D701D856B6DD7C /* OHHTTPStubs.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubs.h; path = OHHTTPStubs/Sources/OHHTTPStubs.h; sourceTree = ""; }; + A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; + AA00E0101286C4EA4CAFD71FED6AB975 /* OHHTTPStubsResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsResponse.h; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.h; sourceTree = ""; }; + AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; + AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = LotameDMP.xcconfig; sourceTree = ""; }; AF6E33079A0AC62440C75012BB20ED40 /* Pods-LotameDMP_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Example-acknowledgements.markdown"; sourceTree = ""; }; + AFA05A4CE29EBF8BA8720FDA80C8B3F2 /* OHHTTPStubs.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = OHHTTPStubs.modulemap; sourceTree = ""; }; + B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; + B7F8DB5C4DBB1A49010816C7E0785934 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = ""; }; B974CEE3695BA2D211E692533A5C70EA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - B97E9E6B32DB4862AE6BD39BF4EA5901 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = ""; }; - BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - BF83350DB22929E4E22A892025D3209B /* LotameProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameProfile.swift; sourceTree = ""; }; - C04D8816A1E2CC85E1683B6A31B3B6BB /* Stream.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stream.swift; path = Source/Stream.swift; sourceTree = ""; }; - C1EF01BAE0072454B7DA6D1B52255E05 /* LotameDMP.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = LotameDMP.xcconfig; sourceTree = ""; }; - C44705CD22790DCCFF590EEB9B8DCDB2 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C4B7E535D71A2BE4B4CF758EFF6C9881 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C56C023A6870973D0C5A823A09F13396 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/AdSupport.framework; sourceTree = DEVELOPER_DIR; }; - C7CF0583DEE9ABFC93E8FB691622FB5A /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Source/Error.swift; sourceTree = ""; }; + BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.release.xcconfig"; sourceTree = ""; }; + C3A3EF06093D9C45436E81EBF4334E9E /* OHPathHelpers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHPathHelpers.h; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h; sourceTree = ""; }; + C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Tests-umbrella.h"; sourceTree = ""; }; + D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameError.swift; sourceTree = ""; }; D20FC0352198484DDB75C6398CAC2FAF /* Pods-LotameDMP_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Example-resources.sh"; sourceTree = ""; }; - D3E8C55E46B66118CF9A198E7A179F00 /* OHHTTPStubs.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubs.h; path = OHHTTPStubs/Sources/OHHTTPStubs.h; sourceTree = ""; }; - D4D356C7DC5C05F5FDDEF40055631BE9 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - D58E257AE0D72EA7A0D651EF67D1C277 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - DB264D62A8D0010E44A7801276BDA858 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - DB6299049A1DBBEDB1127D1441BC82BE /* OHHTTPStubsResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsResponse.h; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.h; sourceTree = ""; }; - E04BEFE6AB60B5DEA587319ED8DF318B /* OHHTTPStubs-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs-dummy.m"; sourceTree = ""; }; - E13ED5791B23905831306C04A7B08268 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - E38F623B487D4C521AFFF951A0844850 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E717534382D01E8BDDA730BB0BD0BABF /* OHHTTPStubs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubs.m; path = OHHTTPStubs/Sources/OHHTTPStubs.m; sourceTree = ""; }; - E7F7B59A315561C178D8B6CAED251376 /* Pods-LotameDMP_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Example-umbrella.h"; sourceTree = ""; }; - ECCEE8E3EC1FF2A93401C388B29330DE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - EE88ACBD6DD88C09E3031583958AE878 /* LotameDMP.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LotameDMP.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - F291B5AD50ACA2B4543D748CA12007D1 /* Pods-LotameDMP_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Tests-umbrella.h"; sourceTree = ""; }; - F3D803A4D18E4A02D1CFD79F9C417619 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - F442802BBC8B0BA4249881795FA175E4 /* Upload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Upload.swift; path = Source/Upload.swift; sourceTree = ""; }; + D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.debug.xcconfig"; sourceTree = ""; }; + D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Example-dummy.m"; sourceTree = ""; }; + E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Tests-dummy.m"; sourceTree = ""; }; + E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameProfile.swift; sourceTree = ""; }; + E6ACD92E8579844D7BA1F53B4F23746C /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; + F097D40D5F132B5A9DBDF6C0B2CECB77 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F77E62830A158EAFB548B5FDA425C9B5 /* Pods-LotameDMP_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LotameDMP_Tests-acknowledgements.plist"; sourceTree = ""; }; - FA8525CDCE4FCC3A5415D5F6696B402B /* OHHTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubs+NSURLSessionConfiguration.m"; path = "OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; - FB92D4B375F2CCBD2CB5E052C453FD47 /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - FE61D8B915A0AD4EFEED2854DD936ED7 /* LotameDMP-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-prefix.pch"; sourceTree = ""; }; + F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; + F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; + FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; FF8C542B18C786E2D40F672B27921463 /* Pods-LotameDMP_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Tests-frameworks.sh"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 3750F044E02BC05758C58E3DA176995E /* Frameworks */ = { + 0EFACB34C47AAAB00276A03ACEABD439 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 11D18F40A48B34B55DA8C6578F2E6835 /* Foundation.framework in Frameworks */, + D21340D5263977F89ACC086AA6C8064A /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 3AF5142A61253DD7CAC7B377FF41EA35 /* Frameworks */ = { + 1CDFCA9D9AAF4C00AEE7CD1BAEDD488C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5EB01E0DF700DC928E96CFB8E52B995D /* CFNetwork.framework in Frameworks */, - 5E2F9720521F73103F86319CB6243F70 /* Foundation.framework in Frameworks */, + 991B2C9AE8F450C35CF57FA15E0AAABC /* AdSupport.framework in Frameworks */, + 05A232BDABB70CDFA8866A15209902C8 /* Alamofire.framework in Frameworks */, + 4BC04237995CF690E2E2AF9727F9A72B /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 924DE71DFF8B206FF05B6F60F703D8DE /* Frameworks */ = { + 81535C02D233306AD224EB9D728C6777 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2B6C55646F12154C6E5B4DB83E8E6DE0 /* Foundation.framework in Frameworks */, + C80B89584525646FD62EAC6016567D67 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - ABA94CEFCA81685D9C5DAFC7137A4287 /* Frameworks */ = { + 85D1756C9E4631D75952CB16A05ED91D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 07A09D811E0EF83AA87A370F43F712F7 /* AdSupport.framework in Frameworks */, - CD1A0E4C494C498C704CA808EFA3AD3C /* Alamofire.framework in Frameworks */, - 545DB1A81D673AF395E2B393E9EECCE7 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - BEE209A00628140D743453C843AEC3B9 /* Frameworks */ = { + B1729F851F648EC60EE93CDB3C8BAEAD /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 33BE12E7856B5004E145E2EAEB4D4AE2 /* Foundation.framework in Frameworks */, + C9F90C2C178321C30D5145422B636837 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - F502566C39FBA224624F3FD50EFE68B2 /* Frameworks */ = { + E6EF2F6AB2EC7AF7DA9DB4C3F2C450AF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 5F71AC3EEF87C19AF3D8463DC0390970 /* CFNetwork.framework in Frameworks */, + 8CD152E0420FE4DDEDCDB5991C2022B2 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -252,209 +258,196 @@ 4927332025C324CA11BC68E9ADD97C5E /* Pods-LotameDMP_Tests.modulemap */, 181F8F5C57F8A1DBFBCD6CDB7E049E10 /* Pods-LotameDMP_Tests-acknowledgements.markdown */, F77E62830A158EAFB548B5FDA425C9B5 /* Pods-LotameDMP_Tests-acknowledgements.plist */, - 1A845AD229351B4F262FC0027A6C5F0A /* Pods-LotameDMP_Tests-dummy.m */, + E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */, FF8C542B18C786E2D40F672B27921463 /* Pods-LotameDMP_Tests-frameworks.sh */, 581AC0E6A878A80EFCC3C5A83CA83488 /* Pods-LotameDMP_Tests-resources.sh */, - F291B5AD50ACA2B4543D748CA12007D1 /* Pods-LotameDMP_Tests-umbrella.h */, - 7524D1EA29B04636A1DC22C665EBFBDE /* Pods-LotameDMP_Tests.debug.xcconfig */, - 0F2A80E93DE26EA52409D631D88351C9 /* Pods-LotameDMP_Tests.release.xcconfig */, + C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */, + D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */, + BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */, ); name = "Pods-LotameDMP_Tests"; path = "Target Support Files/Pods-LotameDMP_Tests"; sourceTree = ""; }; - 2C6370D769129A1FE83D30D5CA251B5C /* Support Files */ = { + 0E3CCE662D8600F8DF9E9F8A85DCBBF9 /* JSON */ = { isa = PBXGroup; children = ( - B97E9E6B32DB4862AE6BD39BF4EA5901 /* Alamofire.modulemap */, - 8B2DF0993039EC44EAD0ADF645E34F57 /* Alamofire.xcconfig */, - 1A734FD1CDCDA08632096C82E19E4AED /* Alamofire-Private.xcconfig */, - F3D803A4D18E4A02D1CFD79F9C417619 /* Alamofire-dummy.m */, - 94FD0602A932B7547078B478267BA688 /* Alamofire-prefix.pch */, - 775B56DBB12E5F8C32FDAEC95DFB904C /* Alamofire-umbrella.h */, - ECCEE8E3EC1FF2A93401C388B29330DE /* Info.plist */, + 99BB0E773A4270CB40969C6AE003138B /* OHHTTPStubsResponse+JSON.h */, + 6DC89220C461D008FA4C5EA0E4C9DB4A /* OHHTTPStubsResponse+JSON.m */, ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; + name = JSON; sourceTree = ""; }; - 43501E1BA23CFB90D2DA91D9B14FB2D0 /* JSON */ = { + 14CC88387F82D38E9D298CA64170402C /* Support Files */ = { isa = PBXGroup; children = ( - 925EBA45D352E08B60FF208D27CD2B38 /* OHHTTPStubsResponse+JSON.h */, - 57E38600117174A538AFB7B46478C51A /* OHHTTPStubsResponse+JSON.m */, + B7F8DB5C4DBB1A49010816C7E0785934 /* Alamofire.modulemap */, + B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */, + A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */, + E6ACD92E8579844D7BA1F53B4F23746C /* Alamofire-prefix.pch */, + 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */, + F097D40D5F132B5A9DBDF6C0B2CECB77 /* Info.plist */, ); - name = JSON; + name = "Support Files"; + path = "../Target Support Files/Alamofire"; sourceTree = ""; }; - 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */ = { + 35C9CEA304EB44BD96BCB905E012EF0F /* NSURLSession */ = { isa = PBXGroup; children = ( - 761DA5F47361031CA935D355D51B46E4 /* Pod */, - BD9E4C31C881DC8C2200D96BB0C94D6C /* Support Files */, + 7DAF895630194862E697B0F8A24A1997 /* OHHTTPStubs+NSURLSessionConfiguration.m */, ); - name = LotameDMP; - path = ../..; + name = NSURLSession; sourceTree = ""; }; - 6BA637192358B749E5C03278CC2721A8 /* Support Files */ = { + 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */ = { isa = PBXGroup; children = ( - 67C12BFE01A796BD46530BD446AF9EA8 /* Info.plist */, - 897EFA2D4718791C11C69630F427B0F2 /* OHHTTPStubs.modulemap */, - 47E43C8AEBDDFF302EE6F1155E85DA7A /* OHHTTPStubs.xcconfig */, - 22F4F5D009316509644A71120C41054A /* OHHTTPStubs-Private.xcconfig */, - E04BEFE6AB60B5DEA587319ED8DF318B /* OHHTTPStubs-dummy.m */, - 78C5A8AC5D607F9BD30121EEEF888A45 /* OHHTTPStubs-prefix.pch */, - 9EE79BDBE2C2313B15E2FD7FE76E25A0 /* OHHTTPStubs-umbrella.h */, + 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */, + 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */, + 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */, + FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */, + 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */, + 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */, ); - name = "Support Files"; - path = "../Target Support Files/OHHTTPStubs"; + name = Products; sourceTree = ""; }; - 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */ = { + 4C94E45A856C7A3DDDA073DC9B24ECE0 /* Support Files */ = { isa = PBXGroup; children = ( - E9FC310342247B47409357C80424D3D9 /* Pods-LotameDMP_Example */, - 086EC7A6D5B8ACCABD0CBC6F2757A2AA /* Pods-LotameDMP_Tests */, + 867FB9BC000430BD8D288DE00752090F /* Info.plist */, + 978C8A2D546E1949D139D06B78F1D107 /* LotameDMP.modulemap */, + AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */, + 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */, + 93C307C45E5B6F04CD4099CA7FDA8FA9 /* LotameDMP-prefix.pch */, + 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */, + 04075B8A4826297DFB273C8A46BDFE07 /* ResourceBundle-LotameDMP-Info.plist */, ); - name = "Targets Support Files"; + name = "Support Files"; + path = "Example/Pods/Target Support Files/LotameDMP"; sourceTree = ""; }; - 718377EBDE213E8558B7CCF578ED0C1B /* NSURLSession */ = { + 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */ = { isa = PBXGroup; children = ( - FA8525CDCE4FCC3A5415D5F6696B402B /* OHHTTPStubs+NSURLSessionConfiguration.m */, + 761DA5F47361031CA935D355D51B46E4 /* Pod */, + 4C94E45A856C7A3DDDA073DC9B24ECE0 /* Support Files */, ); - name = NSURLSession; + name = LotameDMP; + path = ../..; sourceTree = ""; }; - 761DA5F47361031CA935D355D51B46E4 /* Pod */ = { + 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */ = { isa = PBXGroup; children = ( - F322A5A1B6C13971D8D024A6759ED2ED /* Classes */, + E9FC310342247B47409357C80424D3D9 /* Pods-LotameDMP_Example */, + 086EC7A6D5B8ACCABD0CBC6F2757A2AA /* Pods-LotameDMP_Tests */, ); - path = Pod; + name = "Targets Support Files"; sourceTree = ""; }; - 7DB346D0F39D3F0E887471402A8071AB = { + 6E2288D819F110E26CB6A65208851613 /* Core */ = { isa = PBXGroup; children = ( - BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, - A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */, - CAD3C16957C45B9334B34B3F761CF915 /* Frameworks */, - 956657A2EFF37918D71C29341D3EDA7A /* Pods */, - CCA510CFBEA2D207524CDA0D73C3B561 /* Products */, - 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */, + 3005CA8FA79E87B0E6388D53F6573ABD /* Compatibility.h */, + 9C1B8B21FED3FC1E18D701D856B6DD7C /* OHHTTPStubs.h */, + 384AC83FE0ED15FD5BB52DF20A536D59 /* OHHTTPStubs.m */, + AA00E0101286C4EA4CAFD71FED6AB975 /* OHHTTPStubsResponse.h */, + 0679B210B6951C4CEE08C6AC5BEB70FA /* OHHTTPStubsResponse.m */, ); + name = Core; sourceTree = ""; }; - 7FE904556445325B657F2D702D98C6C2 /* OHHTTPStubs */ = { + 73611F5E6043573B243A41EAE5D3002A /* OHPathHelpers */ = { isa = PBXGroup; children = ( - B438A872DB12FA80B916BC0D561BDAD5 /* Core */, - 43501E1BA23CFB90D2DA91D9B14FB2D0 /* JSON */, - 718377EBDE213E8558B7CCF578ED0C1B /* NSURLSession */, - E2F9F714E921B7888D20A1D042667232 /* OHPathHelpers */, - 6BA637192358B749E5C03278CC2721A8 /* Support Files */, + C3A3EF06093D9C45436E81EBF4334E9E /* OHPathHelpers.h */, + 930F39323D32CA5090E63B5F79DD6534 /* OHPathHelpers.m */, ); - path = OHHTTPStubs; + name = OHPathHelpers; sourceTree = ""; }; - 956657A2EFF37918D71C29341D3EDA7A /* Pods */ = { + 761DA5F47361031CA935D355D51B46E4 /* Pod */ = { isa = PBXGroup; children = ( - B4742B4A1E2B5137400C5091ED41D4B4 /* Alamofire */, - 7FE904556445325B657F2D702D98C6C2 /* OHHTTPStubs */, + F322A5A1B6C13971D8D024A6759ED2ED /* Classes */, ); - name = Pods; + path = Pod; sourceTree = ""; }; - A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */ = { + 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( - 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */, + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */, + CAD3C16957C45B9334B34B3F761CF915 /* Frameworks */, + B747B143EACB612C450D4F57A6B1CD86 /* Pods */, + 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */, + 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */, ); - name = "Development Pods"; sourceTree = ""; }; - B438A872DB12FA80B916BC0D561BDAD5 /* Core */ = { + 7E0B237793B8E009A89DC98E38F5DF0A /* iOS */ = { isa = PBXGroup; children = ( - ABB9D052B79221ED9F7844F74361A917 /* Compatibility.h */, - D3E8C55E46B66118CF9A198E7A179F00 /* OHHTTPStubs.h */, - E717534382D01E8BDDA730BB0BD0BABF /* OHHTTPStubs.m */, - DB6299049A1DBBEDB1127D1441BC82BE /* OHHTTPStubsResponse.h */, - 57CF798D90140C7D0577246E1DA4FD9E /* OHHTTPStubsResponse.m */, + 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */, + 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */, + 145B43A6485C114F242C01AD2353716A /* Foundation.framework */, ); - name = Core; + name = iOS; sourceTree = ""; }; - B4742B4A1E2B5137400C5091ED41D4B4 /* Alamofire */ = { + 886873D511485B625BACE64C6876BC25 /* OHHTTPStubs */ = { isa = PBXGroup; children = ( - 67D85A80EC82B54489CE1BACE7D2D711 /* Alamofire.swift */, - 7FFCEFA76A0D63A65D003B21968AAF57 /* Download.swift */, - C7CF0583DEE9ABFC93E8FB691622FB5A /* Error.swift */, - 3C6DC457C118F421B5D13E6789C324C9 /* Manager.swift */, - 7A0BB1BCF11EEF80CDB593CF1CEA6364 /* MultipartFormData.swift */, - 2AB4AF6CAF7A7B4956687FF0E065B8FF /* ParameterEncoding.swift */, - E13ED5791B23905831306C04A7B08268 /* Request.swift */, - D58E257AE0D72EA7A0D651EF67D1C277 /* ResponseSerialization.swift */, - D4D356C7DC5C05F5FDDEF40055631BE9 /* Result.swift */, - 797BAF7C00C6A1FD93300ACF63C31FEA /* ServerTrustPolicy.swift */, - C04D8816A1E2CC85E1683B6A31B3B6BB /* Stream.swift */, - F442802BBC8B0BA4249881795FA175E4 /* Upload.swift */, - DB264D62A8D0010E44A7801276BDA858 /* Validation.swift */, - 2C6370D769129A1FE83D30D5CA251B5C /* Support Files */, + 6E2288D819F110E26CB6A65208851613 /* Core */, + 0E3CCE662D8600F8DF9E9F8A85DCBBF9 /* JSON */, + 35C9CEA304EB44BD96BCB905E012EF0F /* NSURLSession */, + 73611F5E6043573B243A41EAE5D3002A /* OHPathHelpers */, + A08F6B4E9F238FEACB5B493B40E9F21F /* Support Files */, ); - path = Alamofire; + path = OHHTTPStubs; sourceTree = ""; }; - BD9E4C31C881DC8C2200D96BB0C94D6C /* Support Files */ = { + A08F6B4E9F238FEACB5B493B40E9F21F /* Support Files */ = { isa = PBXGroup; children = ( - 91D80540F0673C377547A5719D737AD2 /* Info.plist */, - 948C410A08774FE04B740641DB3A78B6 /* LotameDMP.modulemap */, - C1EF01BAE0072454B7DA6D1B52255E05 /* LotameDMP.xcconfig */, - 9E54CE4DC47F928B056AB041F33D7B3A /* LotameDMP-Private.xcconfig */, - 6CEA2D1603E2AE7A869682E3D294785E /* LotameDMP-dummy.m */, - FE61D8B915A0AD4EFEED2854DD936ED7 /* LotameDMP-prefix.pch */, - A018311EC3C2FE16E316C7C82F566CD3 /* LotameDMP-umbrella.h */, + 1A112D98F7E15E89C5EC7C4BBDF995DB /* Info.plist */, + AFA05A4CE29EBF8BA8720FDA80C8B3F2 /* OHHTTPStubs.modulemap */, + 7D1A4BE8E4619E5421597874BAA43CA7 /* OHHTTPStubs.xcconfig */, + 96D26DD0113CE8C203AB4708A9511491 /* OHHTTPStubs-dummy.m */, + 22773853957E083ED85EA9DE08D78838 /* OHHTTPStubs-prefix.pch */, + 6D742756C06BA3CA85A3DB8D87DF84B8 /* OHHTTPStubs-umbrella.h */, ); name = "Support Files"; - path = "Example/Pods/Target Support Files/LotameDMP"; + path = "../Target Support Files/OHHTTPStubs"; sourceTree = ""; }; - CAD3C16957C45B9334B34B3F761CF915 /* Frameworks */ = { + A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */ = { isa = PBXGroup; children = ( - C4B7E535D71A2BE4B4CF758EFF6C9881 /* Alamofire.framework */, - F6A15260AD7356A5E04A1D390E83CE4A /* iOS */, + 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */, ); - name = Frameworks; + name = "Development Pods"; sourceTree = ""; }; - CCA510CFBEA2D207524CDA0D73C3B561 /* Products */ = { + B747B143EACB612C450D4F57A6B1CD86 /* Pods */ = { isa = PBXGroup; children = ( - C44705CD22790DCCFF590EEB9B8DCDB2 /* Alamofire.framework */, - EE88ACBD6DD88C09E3031583958AE878 /* LotameDMP.bundle */, - E38F623B487D4C521AFFF951A0844850 /* LotameDMP.framework */, - FB92D4B375F2CCBD2CB5E052C453FD47 /* OHHTTPStubs.framework */, - 12BD395E6CFFA82D906165F80BD01170 /* Pods_LotameDMP_Example.framework */, - 5961A3E010E8E528091F35E65E0B217F /* Pods_LotameDMP_Tests.framework */, + EAF51503E6CA27F8FE9EF1FBDDD5A952 /* Alamofire */, + 886873D511485B625BACE64C6876BC25 /* OHHTTPStubs */, ); - name = Products; + name = Pods; sourceTree = ""; }; - E2F9F714E921B7888D20A1D042667232 /* OHPathHelpers */ = { + CAD3C16957C45B9334B34B3F761CF915 /* Frameworks */ = { isa = PBXGroup; children = ( - 640214502C0B642FB7C572F8B6A9C19B /* OHPathHelpers.h */, - 05D10AB2666BD38F2982AA8180F910F8 /* OHPathHelpers.m */, + 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */, + 7E0B237793B8E009A89DC98E38F5DF0A /* iOS */, ); - name = OHPathHelpers; + name = Frameworks; sourceTree = ""; }; E9FC310342247B47409357C80424D3D9 /* Pods-LotameDMP_Example */ = { @@ -464,198 +457,213 @@ 2866D261378FCD4FE14943A99A722B77 /* Pods-LotameDMP_Example.modulemap */, AF6E33079A0AC62440C75012BB20ED40 /* Pods-LotameDMP_Example-acknowledgements.markdown */, 3F6843AA96F513831A4CBD26850657A8 /* Pods-LotameDMP_Example-acknowledgements.plist */, - 3B3D8C0B66DE5E52D356CBFBBF89A45D /* Pods-LotameDMP_Example-dummy.m */, + D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */, 51F9A814E2B204818DF97B58DB17FDCF /* Pods-LotameDMP_Example-frameworks.sh */, D20FC0352198484DDB75C6398CAC2FAF /* Pods-LotameDMP_Example-resources.sh */, - E7F7B59A315561C178D8B6CAED251376 /* Pods-LotameDMP_Example-umbrella.h */, - 28A680D5E256E2C6F9051703009214C2 /* Pods-LotameDMP_Example.debug.xcconfig */, - 5700CD955A4D9ACB4B7E68D138742A94 /* Pods-LotameDMP_Example.release.xcconfig */, + 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */, + 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */, + 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */, ); name = "Pods-LotameDMP_Example"; path = "Target Support Files/Pods-LotameDMP_Example"; sourceTree = ""; }; - F322A5A1B6C13971D8D024A6759ED2ED /* Classes */ = { + EAF51503E6CA27F8FE9EF1FBDDD5A952 /* Alamofire */ = { isa = PBXGroup; children = ( - 72D00DE8C4194C995302738C18D0E194 /* DMP.swift */, - 68FE50EFDBC2F3C2C47F8ADD5ECBD676 /* LotameAudience.swift */, - 0B9B65BB69E45C6BF1EF8BC49193D9EE /* LotameError.swift */, - BF83350DB22929E4E22A892025D3209B /* LotameProfile.swift */, - 8102FCA526DD5BDF7A0D4D9CC078DB93 /* SwiftyJSON.swift */, + 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */, + 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */, + 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */, + 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */, + 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */, + F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */, + FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */, + BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */, + 1E4018A949737B851B6F6630C9E83D48 /* Response.swift */, + 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */, + AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */, + 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */, + F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */, + 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */, + 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */, + 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */, + 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */, + 14CC88387F82D38E9D298CA64170402C /* Support Files */, ); - path = Classes; + path = Alamofire; sourceTree = ""; }; - F6A15260AD7356A5E04A1D390E83CE4A /* iOS */ = { + F322A5A1B6C13971D8D024A6759ED2ED /* Classes */ = { isa = PBXGroup; children = ( - C56C023A6870973D0C5A823A09F13396 /* AdSupport.framework */, - 7C3A886730E68DE450F8EDF51BA924E6 /* CFNetwork.framework */, - 1051355AE65A955DDF529E0FE786E66F /* Foundation.framework */, + 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */, + 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */, + D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */, + E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */, + 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */, ); - name = iOS; + path = Classes; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 06FB578B92DDE2CB64D394A69C2780C8 /* Headers */ = { + 13F6BD059012BFF5FA1EED5C6EDA0E3C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 1DC303E71BC5625F29686B4CE0E586D8 /* Compatibility.h in Headers */, - B3F5C2D426A39FB098F611377F4FC2ED /* OHHTTPStubs-umbrella.h in Headers */, - C841A77AAEBDEF736B29D28A1D49D668 /* OHHTTPStubs.h in Headers */, - 2273AC0640307635D1E43749FAA786BB /* OHHTTPStubsResponse+JSON.h in Headers */, - BF0188491E7FF94EEAC5D7D41C1C0577 /* OHHTTPStubsResponse.h in Headers */, - 626D3860435477A72AB20F22287CE15B /* OHPathHelpers.h in Headers */, + D2364D047E3D8E0316F69BE1FC34A676 /* Pods-LotameDMP_Example-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2C22F352350797DB203AE5C6F763EA27 /* Headers */ = { + 3D5923F303C0E8F54FB7B84BEEC57C4F /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 4048F18FF8FF62F379759DA5492BD475 /* Pods-LotameDMP_Tests-umbrella.h in Headers */, + E365AC4BF252B784D4812AF8DD283CAF /* LotameDMP-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 52A7DF4AEDC652D53A0EB3141E992F57 /* Headers */ = { + 94BBA98CE0A87FBCBE9EF46B97EEC7C2 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 41C654413782D1EDF8D0BDF646BF0F0B /* LotameDMP-umbrella.h in Headers */, + F0D97D2DA24F280B10C717A0D8318E8E /* Pods-LotameDMP_Tests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6CDC354E69AC000646ADB812323692D0 /* Headers */ = { + ABAB0D5A85C7037A9C0114BF313562DF /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 4F713589A07575754ABA4E7659E42BE6 /* Pods-LotameDMP_Example-umbrella.h in Headers */, + A194DEE96E5D5C9D61FD6CFCB61E91BD /* Compatibility.h in Headers */, + 387B673926C97011BC576EC8064530A6 /* OHHTTPStubs-umbrella.h in Headers */, + 876EDA2433FA95337E2D771F302C5203 /* OHHTTPStubs.h in Headers */, + 32A59DBF168A9B955C020B5719EBCB0D /* OHHTTPStubsResponse+JSON.h in Headers */, + 12D2F7AA45E613F050F3BF2F39BBA47B /* OHHTTPStubsResponse.h in Headers */, + A6CCC994A5541AB7ADE2DA96E90CC702 /* OHPathHelpers.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - B4C208A134C1B1189C2EC2E7B1B4F94B /* Headers */ = { + EFDF3B631BBB965A372347705CA14854 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 929FF5856EB7FE139D28CA54B5CD8292 /* Alamofire-umbrella.h in Headers */, + 9469DF81ECB494E84675969B5E13374C /* Alamofire-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 04E9D1B502C6550A8F3FEE2C40F5A204 /* Alamofire */ = { + 221F0FCB1E815826868DC67263A9BA8D /* Pods-LotameDMP_Example */ = { isa = PBXNativeTarget; - buildConfigurationList = 49B032E2AE0D634DD0640E450164C718 /* Build configuration list for PBXNativeTarget "Alamofire" */; + buildConfigurationList = 259E0A224C6F7E0372E9AAA73604D0D0 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */; buildPhases = ( - 1A68CEEAAE9A789CEE046F810FB00E3F /* Sources */, - 3750F044E02BC05758C58E3DA176995E /* Frameworks */, - B4C208A134C1B1189C2EC2E7B1B4F94B /* Headers */, + 74053F7FBDF657E16ED1ACDE0BE883D6 /* Sources */, + 0EFACB34C47AAAB00276A03ACEABD439 /* Frameworks */, + 13F6BD059012BFF5FA1EED5C6EDA0E3C /* Headers */, ); buildRules = ( ); dependencies = ( + 6972A785A61699DE603B02BDC27313BF /* PBXTargetDependency */, + 62A7477A13928A38CA53FA15B5E65B3F /* PBXTargetDependency */, ); - name = Alamofire; - productName = Alamofire; - productReference = C44705CD22790DCCFF590EEB9B8DCDB2 /* Alamofire.framework */; + name = "Pods-LotameDMP_Example"; + productName = "Pods-LotameDMP_Example"; + productReference = 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */; productType = "com.apple.product-type.framework"; }; - B0D9C97A1F67BA0EF010903904802D28 /* LotameDMP-LotameDMP */ = { + 46AC03AA568DA5E5931210E78C07F84D /* Pods-LotameDMP_Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = DAFF9571E97C570BA0CBB22241806A2F /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */; + buildConfigurationList = B1E141604D52DA8EF88445A8A3A3CDAA /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */; buildPhases = ( - 7DF6F480D24DA167A13DB2038F09DA34 /* Sources */, - F502566C39FBA224624F3FD50EFE68B2 /* Frameworks */, - 7CD8FDDB6621209D5DAB2C805C734A4C /* Resources */, + 9F423C1B075CF193F931D58B5867449A /* Sources */, + 81535C02D233306AD224EB9D728C6777 /* Frameworks */, + 94BBA98CE0A87FBCBE9EF46B97EEC7C2 /* Headers */, ); buildRules = ( ); dependencies = ( + 909AA91F0CFCE93E5056243D472A3CF2 /* PBXTargetDependency */, + 09FB582A06AB5CC90C1EB39F8F6C8717 /* PBXTargetDependency */, + 09DF1AB06FB48CCA81571F9399224DD4 /* PBXTargetDependency */, ); - name = "LotameDMP-LotameDMP"; - productName = "LotameDMP-LotameDMP"; - productReference = EE88ACBD6DD88C09E3031583958AE878 /* LotameDMP.bundle */; - productType = "com.apple.product-type.bundle"; + name = "Pods-LotameDMP_Tests"; + productName = "Pods-LotameDMP_Tests"; + productReference = 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */; + productType = "com.apple.product-type.framework"; }; - B53757187FF7FD4A0F079D3429A79440 /* Pods-LotameDMP_Example */ = { + 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */ = { isa = PBXNativeTarget; - buildConfigurationList = 3F497CF5AABC1FC1EC6E3E3F4AE29AC2 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */; + buildConfigurationList = 3CFB42910790CF0BDBCCEBAACD6B9367 /* Build configuration list for PBXNativeTarget "Alamofire" */; buildPhases = ( - 750E6E790E46314ECA9C8B772C68C9F7 /* Sources */, - 924DE71DFF8B206FF05B6F60F703D8DE /* Frameworks */, - 6CDC354E69AC000646ADB812323692D0 /* Headers */, + 120C4E824DDCCA024C170A491FF221A5 /* Sources */, + B1729F851F648EC60EE93CDB3C8BAEAD /* Frameworks */, + EFDF3B631BBB965A372347705CA14854 /* Headers */, ); buildRules = ( ); dependencies = ( - 725B4BAEDE5DFEA70B08567458328CC6 /* PBXTargetDependency */, - B46707EC5EA2BE08DD67BFA634BA45D7 /* PBXTargetDependency */, ); - name = "Pods-LotameDMP_Example"; - productName = "Pods-LotameDMP_Example"; - productReference = 12BD395E6CFFA82D906165F80BD01170 /* Pods_LotameDMP_Example.framework */; + name = Alamofire; + productName = Alamofire; + productReference = 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */; productType = "com.apple.product-type.framework"; }; - BE8A690DA1FA056551783C6889BD3C14 /* OHHTTPStubs */ = { + 9D0644CBCDD3B6B08C644A8D3E94551D /* LotameDMP */ = { isa = PBXNativeTarget; - buildConfigurationList = 5C5D19179755AFC39742FA0A9E59682D /* Build configuration list for PBXNativeTarget "OHHTTPStubs" */; + buildConfigurationList = 46727317C847432965194D6025C42671 /* Build configuration list for PBXNativeTarget "LotameDMP" */; buildPhases = ( - 6B113018216676D7E23DB88A4B78408A /* Sources */, - 3AF5142A61253DD7CAC7B377FF41EA35 /* Frameworks */, - 06FB578B92DDE2CB64D394A69C2780C8 /* Headers */, + 1E8A654D3769DB61CD8D6711CEEA0EC3 /* Sources */, + 1CDFCA9D9AAF4C00AEE7CD1BAEDD488C /* Frameworks */, + 434F642C9AD7DCEC1BD11612BC0E450F /* Resources */, + 3D5923F303C0E8F54FB7B84BEEC57C4F /* Headers */, ); buildRules = ( ); dependencies = ( + F826CE248D53BBFE5E18D7CB1BEFDE6A /* PBXTargetDependency */, + F914EA5904EB2EB4FF204F163EC3EA92 /* PBXTargetDependency */, ); - name = OHHTTPStubs; - productName = OHHTTPStubs; - productReference = FB92D4B375F2CCBD2CB5E052C453FD47 /* OHHTTPStubs.framework */; + name = LotameDMP; + productName = LotameDMP; + productReference = 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */; productType = "com.apple.product-type.framework"; }; - CCE8DC7D74EFC54C78E9CAD4DB17D83A /* Pods-LotameDMP_Tests */ = { + A033892886A83D4ED36187E20BE0D656 /* LotameDMP-LotameDMP */ = { isa = PBXNativeTarget; - buildConfigurationList = 966B7AF2162D09922DD0ACE5A13F5079 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */; + buildConfigurationList = CFE4385C18FBD6EE932D2154D8B24FA9 /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */; buildPhases = ( - 450B8898A23E21033337378C796F3182 /* Sources */, - BEE209A00628140D743453C843AEC3B9 /* Frameworks */, - 2C22F352350797DB203AE5C6F763EA27 /* Headers */, + C079490D4451FFEC169920F07F6202AB /* Sources */, + 85D1756C9E4631D75952CB16A05ED91D /* Frameworks */, + B157742E8737FF5BDFDC6F1D5AFFE64F /* Resources */, ); buildRules = ( ); dependencies = ( - 155A1059C7630DE3439F5A95ED19E5FD /* PBXTargetDependency */, - 6049393A5F88F2B3A5726AFE0C6F1ADD /* PBXTargetDependency */, - 21A0025DA39A03CA4421144E636668EE /* PBXTargetDependency */, ); - name = "Pods-LotameDMP_Tests"; - productName = "Pods-LotameDMP_Tests"; - productReference = 5961A3E010E8E528091F35E65E0B217F /* Pods_LotameDMP_Tests.framework */; - productType = "com.apple.product-type.framework"; + name = "LotameDMP-LotameDMP"; + productName = "LotameDMP-LotameDMP"; + productReference = 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */; + productType = "com.apple.product-type.bundle"; }; - E82BCDB6949716D945B6853049948CEE /* LotameDMP */ = { + B9F753D23B3A010D0E2EB0AE0405D595 /* OHHTTPStubs */ = { isa = PBXNativeTarget; - buildConfigurationList = BEDAAE0975F2070FD7CC5CA1601B45AD /* Build configuration list for PBXNativeTarget "LotameDMP" */; + buildConfigurationList = FDD79B3459C7CC393C8CD0CE59B61FE3 /* Build configuration list for PBXNativeTarget "OHHTTPStubs" */; buildPhases = ( - 142FA73205FA31B5A469D1FC6E58C942 /* Sources */, - ABA94CEFCA81685D9C5DAFC7137A4287 /* Frameworks */, - F9EBB3F1B47311089F5C53708A7435BE /* Resources */, - 52A7DF4AEDC652D53A0EB3141E992F57 /* Headers */, + 79A6F07414E4CA3A22DFA1E74787A8C7 /* Sources */, + E6EF2F6AB2EC7AF7DA9DB4C3F2C450AF /* Frameworks */, + ABAB0D5A85C7037A9C0114BF313562DF /* Headers */, ); buildRules = ( ); dependencies = ( - 09B51B3DB21762D19AFF90EA0A4DFE21 /* PBXTargetDependency */, - 84BC7CFC5248E1A014F1FA4D49F07B14 /* PBXTargetDependency */, ); - name = LotameDMP; - productName = LotameDMP; - productReference = E38F623B487D4C521AFFF951A0844850 /* LotameDMP.framework */; + name = OHHTTPStubs; + productName = OHHTTPStubs; + productReference = FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -664,8 +672,22 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0700; + LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0700; + TargetAttributes = { + 221F0FCB1E815826868DC67263A9BA8D = { + LastSwiftMigration = 0800; + }; + 46AC03AA568DA5E5931210E78C07F84D = { + LastSwiftMigration = 0800; + }; + 79C040AFDDCE1BCBF6D8B5EB0B85887F = { + LastSwiftMigration = 0800; + }; + 9D0644CBCDD3B6B08C644A8D3E94551D = { + LastSwiftMigration = 0800; + }; + }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -675,103 +697,107 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = CCA510CFBEA2D207524CDA0D73C3B561 /* Products */; + productRefGroup = 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 04E9D1B502C6550A8F3FEE2C40F5A204 /* Alamofire */, - E82BCDB6949716D945B6853049948CEE /* LotameDMP */, - B0D9C97A1F67BA0EF010903904802D28 /* LotameDMP-LotameDMP */, - BE8A690DA1FA056551783C6889BD3C14 /* OHHTTPStubs */, - B53757187FF7FD4A0F079D3429A79440 /* Pods-LotameDMP_Example */, - CCE8DC7D74EFC54C78E9CAD4DB17D83A /* Pods-LotameDMP_Tests */, + 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */, + 9D0644CBCDD3B6B08C644A8D3E94551D /* LotameDMP */, + A033892886A83D4ED36187E20BE0D656 /* LotameDMP-LotameDMP */, + B9F753D23B3A010D0E2EB0AE0405D595 /* OHHTTPStubs */, + 221F0FCB1E815826868DC67263A9BA8D /* Pods-LotameDMP_Example */, + 46AC03AA568DA5E5931210E78C07F84D /* Pods-LotameDMP_Tests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 7CD8FDDB6621209D5DAB2C805C734A4C /* Resources */ = { + 434F642C9AD7DCEC1BD11612BC0E450F /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 6B21B7E82C6A41BBD99DE1D08225406E /* LotameDMP.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F9EBB3F1B47311089F5C53708A7435BE /* Resources */ = { + B157742E8737FF5BDFDC6F1D5AFFE64F /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1A01B6DE4403F2719B138E9C358DA1CF /* LotameDMP.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 142FA73205FA31B5A469D1FC6E58C942 /* Sources */ = { + 120C4E824DDCCA024C170A491FF221A5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 34C646A44C22A525CFABA0602FACD164 /* DMP.swift in Sources */, - FBA40FD501B0342BDFB1FAA733E07BBD /* LotameAudience.swift in Sources */, - 118B634122B86666C1A7A7972C726B87 /* LotameDMP-dummy.m in Sources */, - 274C95E3F234E0D799C7AA210989DAD1 /* LotameError.swift in Sources */, - 36636BF17902E463FB49D07D8B03FEDD /* LotameProfile.swift in Sources */, - 9A761F8B341BB761247FAD61352CF485 /* SwiftyJSON.swift in Sources */, + 62143065F94E53F437DCE5D7A998D66D /* AFError.swift in Sources */, + 8D463A0A4C65C02FDD5211F0F3C6F8B8 /* Alamofire-dummy.m in Sources */, + 7CA5A9BA5246FDA8227233E310029392 /* Alamofire.swift in Sources */, + E2A1C34237B4E928E5F85C097F4C2551 /* DispatchQueue+Alamofire.swift in Sources */, + C7A3408350643ADE1018826C766EE356 /* MultipartFormData.swift in Sources */, + E59BF19C0AFA68B741552319FC478C7B /* NetworkReachabilityManager.swift in Sources */, + 0C1B4E9FFB8B81E8833A3BAD537B1990 /* Notifications.swift in Sources */, + AF158CAAF4DD319009AFC855DC995D90 /* ParameterEncoding.swift in Sources */, + 12118C354EFA36292F82A8D0CFCE45B2 /* Request.swift in Sources */, + 86ED08F33B7D357932A9AB743E9D9EA7 /* Response.swift in Sources */, + B8154C96802336E5DDA5CEE97C3180A0 /* ResponseSerialization.swift in Sources */, + DF1BBF94997A2F4248B42B25EA919EC2 /* Result.swift in Sources */, + C0AEA97E7684DDAD56998C0AE198A433 /* ServerTrustPolicy.swift in Sources */, + 907AB123FBC8BC9340D5B7350CE828DF /* SessionDelegate.swift in Sources */, + A79AC30123B0C2177D67F6ED6A1B3215 /* SessionManager.swift in Sources */, + E1F583CB4A68A928CD197250AA752926 /* TaskDelegate.swift in Sources */, + 3982B850C43B41BA6D25F440F0412E9B /* Timeline.swift in Sources */, + FFFDD494EE6D1B83DDAF5F2721F685A6 /* Validation.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 1A68CEEAAE9A789CEE046F810FB00E3F /* Sources */ = { + 1E8A654D3769DB61CD8D6711CEEA0EC3 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 63B17830768B0D423C41B4D54C50030E /* Alamofire-dummy.m in Sources */, - 49B3AF3BAB7B44014CE3C0882FBDEF42 /* Alamofire.swift in Sources */, - 633239715D5366A333DA0751AA5B9A4D /* Download.swift in Sources */, - A386A388A364DE8C83E7B59671881E2B /* Error.swift in Sources */, - 01AE87957D921CB565035F6369E72140 /* Manager.swift in Sources */, - D2B14BF181214C71C668A1443680C1EA /* MultipartFormData.swift in Sources */, - 009AE782A5AFD14DDA91E1D71E4E6507 /* ParameterEncoding.swift in Sources */, - 7FA9B57CC78B619A5440FF033174AB08 /* Request.swift in Sources */, - 82DE225ABBB854FC0F98BFF13FE11283 /* ResponseSerialization.swift in Sources */, - E95397ECA8702DBC9FCB2D1522003F5B /* Result.swift in Sources */, - 421BE4B4D011E53F006777A101878B2E /* ServerTrustPolicy.swift in Sources */, - F4F068C55524B7C05E27F9E7B24D896E /* Stream.swift in Sources */, - A503EE18BAAF8DBD2626687342A85C7E /* Upload.swift in Sources */, - 7CC2A6FF5CD5CD62E7BCC1F2A789E6B8 /* Validation.swift in Sources */, + A20BA8DB7AA816391AE32C1F91F988B9 /* DMP.swift in Sources */, + F1B199D167AF74FCE8EF5DA74002EDD5 /* LotameAudience.swift in Sources */, + C2BDA028DB762F64A26DAB0B98EB29CA /* LotameDMP-dummy.m in Sources */, + CB51CFA9BFBF0DB45C73F766F764F54C /* LotameError.swift in Sources */, + B53F9B91A0CBD8B2FA06E31D9B058D6F /* LotameProfile.swift in Sources */, + 05F57DB1DF9DC9F1DC5BA02CF0C83103 /* SwiftyJSON.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 450B8898A23E21033337378C796F3182 /* Sources */ = { + 74053F7FBDF657E16ED1ACDE0BE883D6 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 538960E57786168554F0D3F4E566D247 /* Pods-LotameDMP_Tests-dummy.m in Sources */, + B45A3E4244B4E8ABA6BBA26F6AC727F8 /* Pods-LotameDMP_Example-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6B113018216676D7E23DB88A4B78408A /* Sources */ = { + 79A6F07414E4CA3A22DFA1E74787A8C7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 0EF9CBA34A39B980D3C61EC0F57FF0DA /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */, - CACE2BC429E8380D6D25DEAB26BFAFFC /* OHHTTPStubs-dummy.m in Sources */, - 20AC293327EE160EA1A5E2F645185233 /* OHHTTPStubs.m in Sources */, - E6551C25D8FC6976F18C57DB0104D518 /* OHHTTPStubsResponse+JSON.m in Sources */, - 1AD1F642BBE1B42477F7C91F2EAB1C44 /* OHHTTPStubsResponse.m in Sources */, - ED11DD27B6423AF02AA14AB00D5E6408 /* OHPathHelpers.m in Sources */, + 33CF8828DAEF041D4B239FE98C91AD3E /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */, + 623FD70CADFD4593E65178BBAD28298E /* OHHTTPStubs-dummy.m in Sources */, + E8E7CCF090EC2EB4E3C29D2954D21F17 /* OHHTTPStubs.m in Sources */, + F21D0F96BA6EDE58E4F70E83568E07D5 /* OHHTTPStubsResponse+JSON.m in Sources */, + C331F4CD251C22970EB86DCE1DF7F794 /* OHHTTPStubsResponse.m in Sources */, + 6B1C00F3DED5CA430DAD920B385B2E33 /* OHPathHelpers.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 750E6E790E46314ECA9C8B772C68C9F7 /* Sources */ = { + 9F423C1B075CF193F931D58B5867449A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E8888B70FA951A4C1F84CD50C2B60C24 /* Pods-LotameDMP_Example-dummy.m in Sources */, + 572AE99BB35CB6DFEFF19E74B0BDD3F8 /* Pods-LotameDMP_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7DF6F480D24DA167A13DB2038F09DA34 /* Sources */ = { + C079490D4451FFEC169920F07F6202AB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -781,112 +807,126 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 09B51B3DB21762D19AFF90EA0A4DFE21 /* PBXTargetDependency */ = { + 09DF1AB06FB48CCA81571F9399224DD4 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Alamofire; - target = 04E9D1B502C6550A8F3FEE2C40F5A204 /* Alamofire */; - targetProxy = 16AA02D0324386AF8B1282A45A22C811 /* PBXContainerItemProxy */; + name = OHHTTPStubs; + target = B9F753D23B3A010D0E2EB0AE0405D595 /* OHHTTPStubs */; + targetProxy = 464490E8BA5DE172FE0DC8BE21F8E3B0 /* PBXContainerItemProxy */; }; - 155A1059C7630DE3439F5A95ED19E5FD /* PBXTargetDependency */ = { + 09FB582A06AB5CC90C1EB39F8F6C8717 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Alamofire; - target = 04E9D1B502C6550A8F3FEE2C40F5A204 /* Alamofire */; - targetProxy = 43A0BD2D64FDA886691092146E70392A /* PBXContainerItemProxy */; + name = LotameDMP; + target = 9D0644CBCDD3B6B08C644A8D3E94551D /* LotameDMP */; + targetProxy = 505EFE26C4FEAFB5A8CDB63809DD1578 /* PBXContainerItemProxy */; }; - 21A0025DA39A03CA4421144E636668EE /* PBXTargetDependency */ = { + 62A7477A13928A38CA53FA15B5E65B3F /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = OHHTTPStubs; - target = BE8A690DA1FA056551783C6889BD3C14 /* OHHTTPStubs */; - targetProxy = 6301E954E5D587B52D7D597C43B5BDA6 /* PBXContainerItemProxy */; + name = LotameDMP; + target = 9D0644CBCDD3B6B08C644A8D3E94551D /* LotameDMP */; + targetProxy = FA413DC43ED0B265D263528AA0F113CA /* PBXContainerItemProxy */; }; - 6049393A5F88F2B3A5726AFE0C6F1ADD /* PBXTargetDependency */ = { + 6972A785A61699DE603B02BDC27313BF /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = LotameDMP; - target = E82BCDB6949716D945B6853049948CEE /* LotameDMP */; - targetProxy = AAF298ED00F7A61539A12C33C4B9FE03 /* PBXContainerItemProxy */; + name = Alamofire; + target = 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */; + targetProxy = 55A91AC4BA2B1629E51C6C624CF664FE /* PBXContainerItemProxy */; }; - 725B4BAEDE5DFEA70B08567458328CC6 /* PBXTargetDependency */ = { + 909AA91F0CFCE93E5056243D472A3CF2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Alamofire; - target = 04E9D1B502C6550A8F3FEE2C40F5A204 /* Alamofire */; - targetProxy = 896B9C9822A9A71F3BE072B3CC23E8E3 /* PBXContainerItemProxy */; + target = 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */; + targetProxy = C4EFDDA051719C1D2E4A6F42164629EA /* PBXContainerItemProxy */; }; - 84BC7CFC5248E1A014F1FA4D49F07B14 /* PBXTargetDependency */ = { + F826CE248D53BBFE5E18D7CB1BEFDE6A /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "LotameDMP-LotameDMP"; - target = B0D9C97A1F67BA0EF010903904802D28 /* LotameDMP-LotameDMP */; - targetProxy = E93E88E67C28968DE02B2F55BCAC6E57 /* PBXContainerItemProxy */; + name = Alamofire; + target = 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */; + targetProxy = 96DF70416F4AFDBE7A852A2CC34949FF /* PBXContainerItemProxy */; }; - B46707EC5EA2BE08DD67BFA634BA45D7 /* PBXTargetDependency */ = { + F914EA5904EB2EB4FF204F163EC3EA92 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = LotameDMP; - target = E82BCDB6949716D945B6853049948CEE /* LotameDMP */; - targetProxy = A96E534DBE77D4A293FD0D47E872D91F /* PBXContainerItemProxy */; + name = "LotameDMP-LotameDMP"; + target = A033892886A83D4ED36187E20BE0D656 /* LotameDMP-LotameDMP */; + targetProxy = A43CDCCF2FB8E000EAECF2EB61B76F34 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 2E547845F1611883ADB4149E63612B11 /* Debug */ = { + 050AA7AAE3C02582C548332F4B85829F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7524D1EA29B04636A1DC22C665EBFBDE /* Pods-LotameDMP_Tests.debug.xcconfig */; + baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; - INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Tests/Info.plist"; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/LotameDMP/LotameDMP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.modulemap"; + MODULEMAP_FILE = "Target Support Files/LotameDMP/LotameDMP.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_NAME = Pods_LotameDMP_Tests; + PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 4A005D6B06320E48814F9411FFF2F4CA /* Release */ = { + 09966C0523B36A0E8432288F380459C5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9E54CE4DC47F928B056AB041F33D7B3A /* LotameDMP-Private.xcconfig */; + baseConfigurationReference = 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 3.0.0; + "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 = 3; - DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/LotameDMP/LotameDMP-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP/Info.plist"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/LotameDMP/LotameDMP.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = LotameDMP; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_LotameDMP_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 511103F7F15A7E8F83B268EA03462CAB /* Release */ = { + 12914D756594D15C6F2CA12FE5F89F1B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -900,291 +940,326 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; + GCC_DYNAMIC_NO_PIC = NO; + 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_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - 541B6F3EF261DDE021A03D107FED2C25 /* Debug */ = { + 1853B5CB10AE7F8DEB7E19C139685E17 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1A734FD1CDCDA08632096C82E19E4AED /* Alamofire-Private.xcconfig */; + baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 2.0.2; + "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 = 2; - DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/LotameDMP/LotameDMP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.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; + MODULEMAP_FILE = "Target Support Files/LotameDMP/LotameDMP.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 58720B52CB3ED70773CEA396FA33722A /* Debug */ = { + 27828DDA0929D020859B1062A4E999C3 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 28A680D5E256E2C6F9051703009214C2 /* Pods-LotameDMP_Example.debug.xcconfig */; + baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + PRODUCT_NAME = LotameDMP; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + 418B8801A660B342D81C28A48F5FD687 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */; + buildSettings = { + "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; - INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/Info.plist"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; - PRODUCT_NAME = Pods_LotameDMP_Example; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_LotameDMP_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 93BE6F353D149F4A3A945BD35E93A8DB /* Release */ = { + 7D91FFDFA3A4870A23D487275AFCD106 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 22F4F5D009316509644A71120C41054A /* OHHTTPStubs-Private.xcconfig */; + baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 4.3.0; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 4; - DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; - DYLIB_INSTALL_NAME_BASE = "@rpath"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/OHHTTPStubs/OHHTTPStubs.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = OHHTTPStubs; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + WRAPPER_EXTENSION = bundle; }; - name = Release; + name = Debug; }; - 9436D0238C4088077D2250B0C95E315C /* Debug */ = { + 847AC160606ECC3E84B2F657A2D4BECB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 22F4F5D009316509644A71120C41054A /* OHHTTPStubs-Private.xcconfig */; + baseConfigurationReference = B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 4.3.0; + "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 = 4; - DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/Info.plist"; + 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.4; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/OHHTTPStubs/OHHTTPStubs.modulemap"; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = OHHTTPStubs; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - AA05AF9C3A14EE0E32F42C6E6D42D34F /* Debug */ = { + 9863CDCEFF55853E56C65748AD3F9E4B /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - 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; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; - ONLY_ACTIVE_ARCH = YES; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - B42D656961B55685CF1F80EB4F13360D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9E54CE4DC47F928B056AB041F33D7B3A /* LotameDMP-Private.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 3.0.0; + "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 = 3; - DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/LotameDMP/LotameDMP-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP/Info.plist"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/LotameDMP/LotameDMP.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = LotameDMP; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_LotameDMP_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - D21601DDD69D696F4255613A3334DEE5 /* Release */ = { + 988E37F3E1305805ABC4972267B43DBF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1A734FD1CDCDA08632096C82E19E4AED /* Alamofire-Private.xcconfig */; + baseConfigurationReference = B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 2.0.2; + "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 = 2; - DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; + 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.4; + IPHONEOS_DEPLOYMENT_TARGET = 9.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_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - D8FDD3BFA1F90BE0EF464E5150A8C4AC /* Debug */ = { + 9DF14B549D887B71F7515F0E11A4D71A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9E54CE4DC47F928B056AB041F33D7B3A /* LotameDMP-Private.xcconfig */; + baseConfigurationReference = 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */; buildSettings = { + "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; - PRODUCT_NAME = LotameDMP; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_LotameDMP_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; - WRAPPER_EXTENSION = bundle; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - DFC17F70EBD11EB6BDDFD151412F11A4 /* Release */ = { + C7F4753AAB909601554A97C8F8D8F0BC /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0F2A80E93DE26EA52409D631D88351C9 /* Pods-LotameDMP_Tests.release.xcconfig */; + baseConfigurationReference = 7D1A4BE8E4619E5421597874BAA43CA7 /* OHHTTPStubs.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; - INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Tests/Info.plist"; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_NAME = Pods_LotameDMP_Tests; + MODULEMAP_FILE = "Target Support Files/OHHTTPStubs/OHHTTPStubs.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = OHHTTPStubs; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - E0131F9D0F34913003C013C978965352 /* Release */ = { + D10829878F8909465BCF7B868C8466FC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5700CD955A4D9ACB4B7E68D138742A94 /* Pods-LotameDMP_Example.release.xcconfig */; + baseConfigurationReference = 7D1A4BE8E4619E5421597874BAA43CA7 /* OHHTTPStubs.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "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; - INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/Info.plist"; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; + MODULEMAP_FILE = "Target Support Files/OHHTTPStubs/OHHTTPStubs.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_NAME = Pods_LotameDMP_Example; + PRODUCT_NAME = OHHTTPStubs; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1193,80 +1268,108 @@ }; name = Release; }; - F9A5E5D86A414BE6AD57ED253955C46F /* Release */ = { + E72E7977875C2D251FC62736BBDDC389 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9E54CE4DC47F928B056AB041F33D7B3A /* LotameDMP-Private.xcconfig */; buildSettings = { - ENABLE_STRICT_OBJC_MSGSEND = YES; - PRODUCT_NAME = LotameDMP; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - WRAPPER_EXTENSION = bundle; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = 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_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = 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; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 259E0A224C6F7E0372E9AAA73604D0D0 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - AA05AF9C3A14EE0E32F42C6E6D42D34F /* Debug */, - 511103F7F15A7E8F83B268EA03462CAB /* Release */, + 09966C0523B36A0E8432288F380459C5 /* Debug */, + 9DF14B549D887B71F7515F0E11A4D71A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 3F497CF5AABC1FC1EC6E3E3F4AE29AC2 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 58720B52CB3ED70773CEA396FA33722A /* Debug */, - E0131F9D0F34913003C013C978965352 /* Release */, + 12914D756594D15C6F2CA12FE5F89F1B /* Debug */, + E72E7977875C2D251FC62736BBDDC389 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 49B032E2AE0D634DD0640E450164C718 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { + 3CFB42910790CF0BDBCCEBAACD6B9367 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( - 541B6F3EF261DDE021A03D107FED2C25 /* Debug */, - D21601DDD69D696F4255613A3334DEE5 /* Release */, + 847AC160606ECC3E84B2F657A2D4BECB /* Debug */, + 988E37F3E1305805ABC4972267B43DBF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5C5D19179755AFC39742FA0A9E59682D /* Build configuration list for PBXNativeTarget "OHHTTPStubs" */ = { + 46727317C847432965194D6025C42671 /* Build configuration list for PBXNativeTarget "LotameDMP" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9436D0238C4088077D2250B0C95E315C /* Debug */, - 93BE6F353D149F4A3A945BD35E93A8DB /* Release */, + 050AA7AAE3C02582C548332F4B85829F /* Debug */, + 1853B5CB10AE7F8DEB7E19C139685E17 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 966B7AF2162D09922DD0ACE5A13F5079 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */ = { + B1E141604D52DA8EF88445A8A3A3CDAA /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2E547845F1611883ADB4149E63612B11 /* Debug */, - DFC17F70EBD11EB6BDDFD151412F11A4 /* Release */, + 418B8801A660B342D81C28A48F5FD687 /* Debug */, + 9863CDCEFF55853E56C65748AD3F9E4B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - BEDAAE0975F2070FD7CC5CA1601B45AD /* Build configuration list for PBXNativeTarget "LotameDMP" */ = { + CFE4385C18FBD6EE932D2154D8B24FA9 /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */ = { isa = XCConfigurationList; buildConfigurations = ( - B42D656961B55685CF1F80EB4F13360D /* Debug */, - 4A005D6B06320E48814F9411FFF2F4CA /* Release */, + 7D91FFDFA3A4870A23D487275AFCD106 /* Debug */, + 27828DDA0929D020859B1062A4E999C3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DAFF9571E97C570BA0CBB22241806A2F /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */ = { + FDD79B3459C7CC393C8CD0CE59B61FE3 /* Build configuration list for PBXNativeTarget "OHHTTPStubs" */ = { isa = XCConfigurationList; buildConfigurations = ( - D8FDD3BFA1F90BE0EF464E5150A8C4AC /* Debug */, - F9A5E5D86A414BE6AD57ED253955C46F /* Release */, + C7F4753AAB909601554A97C8F8D8F0BC /* Debug */, + D10829878F8909465BCF7B868C8466FC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/LotameDMP.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/LotameDMP.xcscheme deleted file mode 100644 index 68932d5..0000000 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/LotameDMP.xcscheme +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-Private.xcconfig b/Example/Pods/Target Support Files/Alamofire/Alamofire-Private.xcconfig deleted file mode 100644 index ac7ab02..0000000 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire-Private.xcconfig +++ /dev/null @@ -1,6 +0,0 @@ -#include "Alamofire.xcconfig" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Alamofire" "${PODS_ROOT}/Headers/Public" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_ROOT = ${SRCROOT} -SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h index 6b71676..02327b8 100644 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ b/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h @@ -1,4 +1,6 @@ +#ifdef __OBJC__ #import +#endif FOUNDATION_EXPORT double AlamofireVersionNumber; diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig index e69de29..772ef0b 100644 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +++ b/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig @@ -0,0 +1,9 @@ +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_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Alamofire/Info.plist b/Example/Pods/Target Support Files/Alamofire/Info.plist index 55d4a94..b672cd7 100644 --- a/Example/Pods/Target Support Files/Alamofire/Info.plist +++ b/Example/Pods/Target Support Files/Alamofire/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0.2 + 4.0.1 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/LotameDMP/Info.plist b/Example/Pods/Target Support Files/LotameDMP/Info.plist index dc92af9..90db36a 100644 --- a/Example/Pods/Target Support Files/LotameDMP/Info.plist +++ b/Example/Pods/Target Support Files/LotameDMP/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.0.0 + 3.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-Private.xcconfig b/Example/Pods/Target Support Files/LotameDMP/LotameDMP-Private.xcconfig deleted file mode 100644 index 4e1dbec..0000000 --- a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-Private.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -#include "LotameDMP.xcconfig" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/LotameDMP" "${PODS_ROOT}/Headers/Public" -OTHER_LDFLAGS = ${LOTAMEDMP_OTHER_LDFLAGS} -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_ROOT = ${SRCROOT} -SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-umbrella.h b/Example/Pods/Target Support Files/LotameDMP/LotameDMP-umbrella.h index f778b9b..3bc6d09 100644 --- a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-umbrella.h +++ b/Example/Pods/Target Support Files/LotameDMP/LotameDMP-umbrella.h @@ -1,4 +1,6 @@ +#ifdef __OBJC__ #import +#endif FOUNDATION_EXPORT double LotameDMPVersionNumber; diff --git a/Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig b/Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig index 3924f3a..98cee33 100644 --- a/Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig +++ b/Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig @@ -1 +1,11 @@ -LOTAMEDMP_OTHER_LDFLAGS = -framework "AdSupport" \ No newline at end of file +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/LotameDMP +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "AdSupport" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist b/Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist new file mode 100644 index 0000000..8b70130 --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 3.1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/OHHTTPStubs/Info.plist b/Example/Pods/Target Support Files/OHHTTPStubs/Info.plist index cea4414..a83149a 100644 --- a/Example/Pods/Target Support Files/OHHTTPStubs/Info.plist +++ b/Example/Pods/Target Support Files/OHHTTPStubs/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-Private.xcconfig b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-Private.xcconfig deleted file mode 100644 index 8f76a82..0000000 --- a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-Private.xcconfig +++ /dev/null @@ -1,6 +0,0 @@ -#include "OHHTTPStubs.xcconfig" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/OHHTTPStubs" "${PODS_ROOT}/Headers/Public" -OTHER_LDFLAGS = ${OHHTTPSTUBS_OTHER_LDFLAGS} -PODS_ROOT = ${SRCROOT} -SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h index d95666a..58bf361 100644 --- a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h +++ b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h @@ -1,4 +1,6 @@ +#ifdef __OBJC__ #import +#endif #import "Compatibility.h" #import "OHHTTPStubs.h" diff --git a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig index a14c030..6e634e4 100644 --- a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig +++ b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig @@ -1 +1,9 @@ -OHHTTPSTUBS_OTHER_LDFLAGS = -framework "CFNetwork" -framework "Foundation" \ No newline at end of file +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "CFNetwork" -framework "Foundation" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Info.plist b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Info.plist index 6974542..2243fe6 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Info.plist +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-acknowledgements.markdown index 769977d..14e68ec 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-acknowledgements.markdown +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-acknowledgements.markdown @@ -3,7 +3,7 @@ This application makes use of the following third party libraries: ## Alamofire -Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +Copyright (c) 2014-2016 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,4 +48,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Generated by CocoaPods - http://cocoapods.org +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-acknowledgements.plist index c8a8742..e496a06 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-acknowledgements.plist @@ -14,7 +14,7 @@ FooterText - Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) + Copyright (c) 2014-2016 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 @@ -34,6 +34,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title Alamofire Type @@ -63,6 +65,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title LotameDMP Type @@ -70,7 +74,7 @@ SOFTWARE. FooterText - Generated by CocoaPods - http://cocoapods.org + Generated by CocoaPods - https://cocoapods.org Title Type diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh index eb0e2f6..ea92578 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh @@ -10,11 +10,13 @@ install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRODUCTS_DIR}/$1" - else + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" fi - local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then echo "Symlinked..." @@ -25,19 +27,31 @@ install_framework() 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}" + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + # Resign the code if required by the build settings to avoid unstable apps code_sign_if_enabled "${destination}/$(basename "$1")" - # Embed linked Swift runtime libraries - local basename - basename="$(basename "$1" | sed -E s/\\..+// && exit ${PIPESTATUS[0]})" - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/${basename}.framework/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi } # Signs a framework with the provided identity @@ -45,17 +59,35 @@ code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" fi } if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework 'Pods-LotameDMP_Example/Alamofire.framework' - install_framework 'Pods-LotameDMP_Example/LotameDMP.framework' + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework 'Pods-LotameDMP_Example/Alamofire.framework' - install_framework 'Pods-LotameDMP_Example/LotameDMP.framework' + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" fi diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh index ea685a2..25e9d37 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh @@ -1,66 +1,82 @@ #!/bin/sh set -e -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt > "$RESOURCES_TO_COPY" XCASSET_FILES=() -realpath() { - DIRECTORY="$(cd "${1%/*}" && pwd)" - FILENAME="${1##*/}" - echo "$DIRECTORY/$FILENAME" -} +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac install_resource() { - case $1 in + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + 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}" + 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 --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + 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}" + 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 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + 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}" ;; *.xcdatamodel) - echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) - echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" - xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) - ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; - /*) - echo "$1" - echo "$1" >> "$RESOURCES_TO_COPY" - ;; *) - echo "${PODS_ROOT}/$1" - echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac } -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]]; then +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi @@ -68,28 +84,13 @@ rm -f "$RESOURCES_TO_COPY" if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] then - case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; - esac - # Find all other xcassets (this unfortunately includes those of path pods and other targets). OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) while read line; do - if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + if [[ $line != "${PODS_ROOT}*" ]]; then XCASSET_FILES+=("$line") fi done <<<"$OTHER_XCASSETS" - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-umbrella.h index 39020f1..0086268 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-umbrella.h +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-umbrella.h @@ -1,4 +1,6 @@ +#ifdef __OBJC__ #import +#endif FOUNDATION_EXPORT double Pods_LotameDMP_ExampleVersionNumber; diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig index 60b4309..85dd925 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig @@ -1,7 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Alamofire.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/LotameDMP.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-LotameDMP_Example -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig index 60b4309..85dd925 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig @@ -1,7 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Alamofire.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/LotameDMP.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-LotameDMP_Example -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Info.plist index 6974542..2243fe6 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Info.plist +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-acknowledgements.markdown index 54471fa..174baa0 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-acknowledgements.markdown +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-acknowledgements.markdown @@ -3,7 +3,7 @@ This application makes use of the following third party libraries: ## Alamofire -Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +Copyright (c) 2014-2016 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 @@ -60,4 +60,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Generated by CocoaPods - http://cocoapods.org +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-acknowledgements.plist index 733d950..d958c70 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-acknowledgements.plist @@ -14,7 +14,7 @@ FooterText - Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) + Copyright (c) 2014-2016 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 @@ -34,6 +34,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title Alamofire Type @@ -63,6 +65,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title LotameDMP Type @@ -79,6 +83,8 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title OHHTTPStubs Type @@ -86,7 +92,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI FooterText - Generated by CocoaPods - http://cocoapods.org + Generated by CocoaPods - https://cocoapods.org Title Type diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh index 2d434ca..197c51d 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh @@ -10,11 +10,13 @@ install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRODUCTS_DIR}/$1" - else + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" fi - local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then echo "Symlinked..." @@ -25,19 +27,31 @@ install_framework() 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}" + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + # Resign the code if required by the build settings to avoid unstable apps code_sign_if_enabled "${destination}/$(basename "$1")" - # Embed linked Swift runtime libraries - local basename - basename="$(basename "$1" | sed -E s/\\..+// && exit ${PIPESTATUS[0]})" - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/${basename}.framework/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi } # Signs a framework with the provided identity @@ -45,19 +59,37 @@ code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" fi } if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework 'Pods-LotameDMP_Tests/Alamofire.framework' - install_framework 'Pods-LotameDMP_Tests/LotameDMP.framework' - install_framework 'Pods-LotameDMP_Tests/OHHTTPStubs.framework' + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/OHHTTPStubs/OHHTTPStubs.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework 'Pods-LotameDMP_Tests/Alamofire.framework' - install_framework 'Pods-LotameDMP_Tests/LotameDMP.framework' - install_framework 'Pods-LotameDMP_Tests/OHHTTPStubs.framework' + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/OHHTTPStubs/OHHTTPStubs.framework" fi diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh index ea685a2..25e9d37 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh @@ -1,66 +1,82 @@ #!/bin/sh set -e -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt > "$RESOURCES_TO_COPY" XCASSET_FILES=() -realpath() { - DIRECTORY="$(cd "${1%/*}" && pwd)" - FILENAME="${1##*/}" - echo "$DIRECTORY/$FILENAME" -} +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac install_resource() { - case $1 in + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + 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}" + 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 --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + 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}" + 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 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + 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}" ;; *.xcdatamodel) - echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) - echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" - xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) - ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; - /*) - echo "$1" - echo "$1" >> "$RESOURCES_TO_COPY" - ;; *) - echo "${PODS_ROOT}/$1" - echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac } -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]]; then +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi @@ -68,28 +84,13 @@ rm -f "$RESOURCES_TO_COPY" if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] then - case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; - esac - # Find all other xcassets (this unfortunately includes those of path pods and other targets). OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) while read line; do - if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + if [[ $line != "${PODS_ROOT}*" ]]; then XCASSET_FILES+=("$line") fi done <<<"$OTHER_XCASSETS" - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-umbrella.h index 1852b4e..9994fc0 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-umbrella.h +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-umbrella.h @@ -1,4 +1,6 @@ +#ifdef __OBJC__ #import +#endif FOUNDATION_EXPORT double Pods_LotameDMP_TestsVersionNumber; diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig index fca1c3d..1610023 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig @@ -1,7 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Alamofire.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/LotameDMP.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/OHHTTPStubs.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" -framework "OHHTTPStubs" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-LotameDMP_Tests -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig index fca1c3d..1610023 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig @@ -1,7 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/Alamofire.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/LotameDMP.framework/Headers" -iquote "$CONFIGURATION_BUILD_DIR/OHHTTPStubs.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" -framework "OHHTTPStubs" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-LotameDMP_Tests -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift index 8565dee..b7a880c 100644 --- a/Example/Tests/Tests.swift +++ b/Example/Tests/Tests.swift @@ -18,16 +18,16 @@ class Tests: XCTestCase { let mockProfile = ["Profile": ["pid":"ccd93ea4d2b2182cdb480a28c93b83f5","Audiences": ["Audience":[["id":"60519","abbr":"OCR_Matchflow_Segment_37_2"],["id":"13023","abbr":"usonBusitp"],["id":"99961","abbr":""]]]]] func testGetAudienceMock() { - let expectation = self.expectationWithDescription("asynchronous request") + let expectation = self.expectation(description: "asynchronous request") DMP.initialize("99") DMP.sharedManager.domain = "testhost.com" - OHHTTPStubs.stubRequestsPassingTest({ - (request: NSURLRequest) -> Bool in - return request.URL?.host?.hasSuffix("testhost.com") ?? false + OHHTTPStubs.stubRequests(passingTest: { + (request: URLRequest) -> Bool in + return request.url?.host?.hasSuffix("testhost.com") ?? false }, withStubResponse: { - (request: NSURLRequest) -> OHHTTPStubsResponse in - return OHHTTPStubsResponse(JSONObject: self.mockProfile, statusCode:200, headers:nil) + (request: URLRequest) -> OHHTTPStubsResponse in + return OHHTTPStubsResponse(jsonObject: self.mockProfile, statusCode:200, headers:nil) }) @@ -35,28 +35,28 @@ class Tests: XCTestCase { result in XCTAssertNotNil(result.value, "Profile must exist") - XCTAssertEqual(self.mockProfile["Profile"]!["pid"]!.description, result.value?.pid, "Profile object id must match the mock") + XCTAssertEqual(self.mockProfile["Profile"]!["pid"] as! String, result.value?.pid, "Profile object id must match the mock") XCTAssertEqual("60519", result.value?.audiences[0].id, "First audience object must match the mock") XCTAssertEqual("OCR_Matchflow_Segment_37_2", result.value?.audiences[0].abbreviation, "First audience object must match the mock") XCTAssertEqual(result.value?.jsonString!, JSON(self.mockProfile).rawString()!, "Json generation should work correctly") expectation.fulfill() } - self.waitForExpectationsWithTimeout(10.0, handler: nil) + self.waitForExpectations(timeout: 10.0, handler: nil) } func testGetAudienceFromServer(){ - let expectation = self.expectationWithDescription("asynchronous request") + let expectation = self.expectation(description: "asynchronous request") DMP.initialize("205") DMP.getAudienceData{ result in XCTAssertNotNil(result.value, "Profile must exist") expectation.fulfill() } - self.waitForExpectationsWithTimeout(10.0, handler: nil) + self.waitForExpectations(timeout: 10.0, handler: nil) } func testSendDataToServer(){ - let expectation = self.expectationWithDescription("asynchronous request") + let expectation = self.expectation(description: "asynchronous request") DMP.initialize("25") DMP.addBehaviorData("test", forType: "t") DMP.sendBehaviorData{ @@ -64,11 +64,11 @@ class Tests: XCTestCase { XCTAssertTrue(result.isSuccess, "Sending must not throw errors") expectation.fulfill() } - self.waitForExpectationsWithTimeout(10.0, handler: nil) + self.waitForExpectations(timeout: 10.0, handler: nil) } func testSendBlankType(){ - let expectation = self.expectationWithDescription("asynchronous request") + let expectation = self.expectation(description: "asynchronous request") DMP.initialize("25") DMP.addBehaviorData(nil, forType: "") DMP.sendBehaviorData{ @@ -76,51 +76,51 @@ class Tests: XCTestCase { XCTAssertTrue(result.isSuccess, "Sending must not throw errors") expectation.fulfill() } - self.waitForExpectationsWithTimeout(10.0, handler: nil) + self.waitForExpectations(timeout: 10.0, handler: nil) } func testFailGetAudienceWhenUninitialized(){ - let expectation = self.expectationWithDescription("asynchronous request") + let expectation = self.expectation(description: "asynchronous request") DMP.initialize("") DMP.getAudienceData{ result in XCTAssertTrue(result.isFailure, "Initialization error should throw") - XCTAssertEqual(LotameError.InitializeNotCalled._code, result.error!._code, "Should send initialization error") + XCTAssertEqual(LotameError.initializeNotCalled._code, result.error!._code, "Should send initialization error") expectation.fulfill() } - self.waitForExpectationsWithTimeout(10.0, handler: nil) + self.waitForExpectations(timeout: 10.0, handler: nil) } func testFailBehaviorWhenUninitialized(){ - let expectation = self.expectationWithDescription("asynchronous request") + let expectation = self.expectation(description: "asynchronous request") DMP.initialize("") DMP.sendBehaviorData(){ result in XCTAssertTrue(result.isFailure, "Initialization error should throw") - XCTAssertEqual(LotameError.InitializeNotCalled._code, result.error!._code, "Should send initialization error") + XCTAssertEqual(LotameError.initializeNotCalled._code, result.error!._code, "Should send initialization error") expectation.fulfill() } - self.waitForExpectationsWithTimeout(10.0, handler: nil) + self.waitForExpectations(timeout: 10.0, handler: nil) } func testIgnoreError(){ DMP.sendBehaviorData() } - private static let dispatchQueue = dispatch_queue_create("com.lotame.testsync", nil) + fileprivate static let dispatchQueue = DispatchQueue(label: "com.lotame.testsync", attributes: []) func testAsynchronous(){ DMP.initialize("25") for _ in 1...10{ - let expectationSend = self.expectationWithDescription("send behavior request") - let expectationGet = self.expectationWithDescription("get audience request") - dispatch_async(Tests.dispatchQueue) { + let expectationSend = self.expectation(description: "send behavior request") + let expectationGet = self.expectation(description: "get audience request") + Tests.dispatchQueue.async { DMP.addBehaviorData("test", forType: "t") DMP.sendBehaviorData{ @@ -130,7 +130,7 @@ class Tests: XCTestCase { } } - dispatch_async(Tests.dispatchQueue){ + (Tests.dispatchQueue).async{ DMP.getAudienceData { result in @@ -141,7 +141,7 @@ class Tests: XCTestCase { } } - self.waitForExpectationsWithTimeout(10.0, handler: nil) + self.waitForExpectations(timeout: 10.0, handler: nil) } } diff --git a/LotameDMP.podspec b/LotameDMP.podspec index 43df8ad..0db75b5 100644 --- a/LotameDMP.podspec +++ b/LotameDMP.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "LotameDMP" - s.version = "3.0.1" + s.version = "3.1.0" s.summary = "This open source library can be leveraged by Lotame clients to collect data from within their iOS applications." # This description is used to generate tags and improve search results. @@ -27,7 +27,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/Lotame/LotameDMP-IOS.git", :tag => s.version.to_s } # s.social_media_url = 'https://twitter.com/' - s.platform = :ios, '8.0' + s.platform = :ios, '10.0' s.requires_arc = true s.source_files = 'Pod/Classes/**/*' @@ -37,5 +37,5 @@ Pod::Spec.new do |s| # s.public_header_files = 'Pod/Classes/**/*.h' s.frameworks = 'AdSupport' - s.dependency 'Alamofire', '~> 2.0' + s.dependency 'Alamofire', '~> 4.0' end diff --git a/Pod/Classes/DMP.swift b/Pod/Classes/DMP.swift index 0a43d48..3d1d26a 100644 --- a/Pod/Classes/DMP.swift +++ b/Pod/Classes/DMP.swift @@ -33,25 +33,25 @@ import Alamofire The Lotame Data Management Platform */ @objc -public class DMP:NSObject{ +open class DMP:NSObject{ /** LotameDMP is a singleton. Calls should be made to the class functions, which will use this sharedManager as an object. */ - public static let sharedManager = DMP() + open static let sharedManager = DMP() /** Thread safety (especially for behavior data0 is handled via async and sync thread calls. All network calls are made asynchronously. */ - private static let dispatchQueue = dispatch_queue_create("com.lotame.sync", nil) + fileprivate static let dispatchQueue = DispatchQueue(label: "com.lotame.sync", attributes: []) /** Gets the IDFA or nil if it is not enabled. */ - public static var advertisingId: String?{ + open static var advertisingId: String?{ if trackingEnabled{ - return ASIdentifierManager.sharedManager().advertisingIdentifier.UUIDString + return ASIdentifierManager.shared().advertisingIdentifier.uuidString }else{ return nil } @@ -60,7 +60,7 @@ public class DMP:NSObject{ /** Structure for the behavior tracking data */ - private struct Behavior{ + fileprivate struct Behavior{ var key: String var value: String? init(value: String?, forKey: String){ @@ -72,35 +72,35 @@ public class DMP:NSObject{ /** The accumulated behavior tracking data. This is reset after each sendBehaviorData call. */ - private var behaviors:[Behavior] = [] + fileprivate var behaviors:[Behavior] = [] /** Tracking is enabled only if advertising id is enabled on the user's device */ - public static var trackingEnabled: Bool{ - return ASIdentifierManager.sharedManager().advertisingTrackingEnabled + open static var trackingEnabled: Bool{ + return ASIdentifierManager.shared().isAdvertisingTrackingEnabled } /** The id registered with Lotame */ - private var clientId: String?{ + fileprivate var clientId: String?{ didSet{ DMP.startNewSession() } } - private var isInitialized:Bool{ + fileprivate var isInitialized:Bool{ return clientId != nil && !clientId!.isEmpty } - private static let defaultDomain = "crwdcntrl.net" - private static let defaultProtocol = "https" + fileprivate static let defaultDomain = "crwdcntrl.net" + fileprivate static let defaultProtocol = "https" /** The domain of the base urls for the network calls. Defaults to crwdcntrl.net */ - public var domain: String = DMP.defaultDomain{ + open var domain: String = DMP.defaultDomain{ didSet{ DMP.startNewSession() } @@ -111,29 +111,29 @@ public class DMP:NSObject{ Changing to http will require special settings in Info.plist to disable ATS. */ - public var httpProtocol: String = DMP.defaultProtocol{ + open var httpProtocol: String = DMP.defaultProtocol{ didSet{ DMP.startNewSession() } } - private var baseBCPUrl: String{ + fileprivate var baseBCPUrl: String{ return "\(httpProtocol)://bcp.\(domain.urlHostEncoded()!)/5/c=\(clientId!.urlPathEncoded()!)/mid=\(DMP.advertisingId!.urlPathEncoded()!)/e=app/dt=IDFA/sdk=3.0/" } - private var baseADUrl: String{ - return "\(httpProtocol)://ad.\(domain.urlHostEncoded()!)/5/pe=y/c=\(clientId!.urlPathEncoded()!)/mid=\(DMP.advertisingId!.urlPathEncoded()!)/" + fileprivate var baseADUrl: String{ + return "\(httpProtocol)://ad.\(domain.urlHostEncoded()!)/5/pe=y/c=\(clientId!.urlPathEncoded()!)/mid=\(DMP.advertisingId!.urlPathEncoded()!)/dt=IDFA/sdk=3.0/" } /** Will mark the data as a new page view */ - private var isNewSession = true + fileprivate var isNewSession = true /** The DMP is a singleton, use the initialize method to set the values in the singleton */ - private override init(){ + fileprivate override init(){ } @@ -141,7 +141,7 @@ public class DMP:NSObject{ Call this first to initialize the singleton. Only needs to be called once. Starts a new session, sets the domain to default "crwdcntrl.net" and httpProtocol to default "http" **/ - public class func initialize(clientId: String){ + open class func initialize(_ clientId: String){ DMP.sharedManager.clientId = clientId DMP.sharedManager.domain = defaultDomain DMP.sharedManager.httpProtocol = defaultProtocol @@ -151,8 +151,8 @@ public class DMP:NSObject{ /** Starts a new page view session */ - public class func startNewSession(){ - dispatch_sync(dispatchQueue){ + open class func startNewSession(){ + dispatchQueue.sync{ sharedManager.isNewSession = true } } @@ -162,48 +162,47 @@ public class DMP:NSObject{ to the completion handler. **Note:** Does not collect data if the user has limited ad tracking turned on, but still clears behaviors. */ - public class func sendBehaviorData(completion:(result: Result) -> Void){ + open class func sendBehaviorData(_ completion:@escaping (_ result: Result) -> Void){ - dispatch_async(dispatchQueue){ + dispatchQueue.async{ guard sharedManager.isInitialized else{ - dispatch_async(dispatch_get_main_queue()){ - completion(result: Result.Failure(nil, LotameError.InitializeNotCalled)) + DispatchQueue.main.async{ + completion(Result.failure(LotameError.initializeNotCalled)) } return } guard DMP.trackingEnabled else{ sharedManager.behaviors.removeAll() //Don't send tracking data if it user has opted out - dispatch_async(dispatch_get_main_queue()){ - completion(result: Result.Failure(nil, LotameError.TrackingDisabled)) + DispatchQueue.main.async{ + completion(Result.failure(LotameError.trackingDisabled)) } return } //Add random number for cache busting - sharedManager.behaviors.insert(Behavior(value: arc4random_uniform(999999999).description, forKey: "rand"), atIndex: 0) + sharedManager.behaviors.insert(Behavior(value: arc4random_uniform(999999999).description, forKey: "rand"), at: 0) if sharedManager.isNewSession{ //Add page view for new sessions - sharedManager.behaviors.insert(Behavior(value: "y", forKey: "pv"), atIndex: 1) + sharedManager.behaviors.insert(Behavior(value: "y", forKey: "pv"), at: 1) sharedManager.isNewSession = false } - for (index, behavior) in sharedManager.behaviors.enumerate(){ + for (index, behavior) in sharedManager.behaviors.enumerated(){ if behavior.key == opportunityParamKey{ //Insert 1 'count placements' behavior if there is at least 1 opportunity - sharedManager.behaviors.insert(Behavior(value:"y", forKey: "dp"), atIndex: index + 1) + sharedManager.behaviors.insert(Behavior(value:"y", forKey: "dp"), at: index + 1) break } } let behaviorCopy = sharedManager.behaviors - Alamofire.request(Router.SendBehaviorData(baseUrlString: sharedManager.baseBCPUrl, params: behaviorCopy)) + Alamofire.request(Router.sendBehaviorData(baseUrlString: sharedManager.baseBCPUrl, params: behaviorCopy)) .validate().response{ - _, _, _, err in - dispatch_async(dispatch_get_main_queue()){ - if let err = err{ - completion(result:Result.Failure(nil,err)) + response in DispatchQueue.main.async{ + if let statusCode = response.response?.statusCode , statusCode == 200 { + completion(Result.success(Data())) }else{ - completion(result:Result.Success(NSData())) + completion(Result.failure(LotameError.unexpectedResponse)) } } } @@ -214,7 +213,7 @@ public class DMP:NSObject{ /** Sends the collected behavior data to the Lotame server without a completion handler */ - public class func sendBehaviorData(){ + open class func sendBehaviorData(){ sendBehaviorData(){ err in //Could log the message here @@ -224,9 +223,9 @@ public class DMP:NSObject{ /** Collects behavior data with any type and value */ - public class func addBehaviorData(value: String?, forType key: String){ + open class func addBehaviorData(_ value: String?, forType key: String){ if !key.isEmpty{ - dispatch_async(dispatchQueue){ + dispatchQueue.async{ if DMP.trackingEnabled{ sharedManager.behaviors.append(Behavior(value: value, forKey: key)) } @@ -237,28 +236,28 @@ public class DMP:NSObject{ /** Collects a specific behavior id */ - public class func addBehaviorData(behaviorId behaviorId: Int64){ + open class func addBehaviorData(behaviorId: Int64){ addBehaviorData(behaviorId.description, forType:"b") } - private static let opportunityParamKey = "p" + fileprivate static let opportunityParamKey = "p" /** Collects a specific opportunity id */ - public class func addBehaviorData(opportunityId opportunityId: Int64){ + open class func addBehaviorData(opportunityId: Int64){ addBehaviorData(opportunityId.description, forType:opportunityParamKey) } /** Used by objective-c code that does not support generics. Do not use in swift. Use getAudienceData instead */ - @objc public class func getAudienceDataWithHandler(handler:(profile: LotameProfile?, success: Bool)->Void) { + @objc open class func getAudienceDataWithHandler(_ handler:@escaping (_ profile: LotameProfile?, _ success: Bool)->Void) { getAudienceData{ result in if result.isSuccess{ - handler(profile: result.value!, success:true) + handler(result.value!, true) }else{ - handler(profile: nil, success: false) + handler(nil, false) } } } @@ -271,33 +270,30 @@ public class DMP:NSObject{ **Note:** Does not get results if the user has limited ad tracking turned on */ - public class func getAudienceData(completion:(result: Result)->Void) { + open class func getAudienceData(_ completion:@escaping (_ result: Result)->Void) { guard sharedManager.isInitialized else{ - dispatch_async(dispatch_get_main_queue()){ - completion(result: Result.Failure(nil, LotameError.InitializeNotCalled)) + DispatchQueue.main.async{ + completion(Result.failure(LotameError.initializeNotCalled)) } return } guard DMP.trackingEnabled else{ //Don't get audience data if it user has opted out - dispatch_async(dispatch_get_main_queue()){ - completion(result: Result.Failure(nil, LotameError.TrackingDisabled)) + DispatchQueue.main.async{ + completion(Result.failure(LotameError.trackingDisabled)) } return } - dispatch_async(dispatchQueue){ + (dispatchQueue).async{ - Alamofire.request(Router.AudienceData(baseUrlString: sharedManager.baseADUrl, params: nil)) + Alamofire.request(Router.audienceData(baseUrlString: sharedManager.baseADUrl, params: nil)) .validate() - .responseJSON(options: .AllowFragments){ - req, res, result in - dispatch_async(dispatch_get_main_queue()){ - if let value = result.value where res?.statusCode == 200 && result.isSuccess{ - completion(result: Result.Success(LotameProfile(json: JSON(value)))) - } else if result.isFailure{ - completion(result: Result.Failure(nil, result.error!)) + .responseJSON(options: .allowFragments){ + response in DispatchQueue.main.async{ + if let value = response.result.value , response.response?.statusCode == 200 && response.result.isSuccess{ + completion(Result.success(LotameProfile(json: JSON(value)))) } else { - completion(result: Result.Failure(nil, LotameError.UnexpectedResponse)) + completion(Result.failure(LotameError.unexpectedResponse)) } } } @@ -307,63 +303,35 @@ public class DMP:NSObject{ /** Handles building the URLs for each of the requests */ - private enum Router: URLRequestConvertible{ + fileprivate enum Router: URLRequestConvertible { - case SendBehaviorData(baseUrlString: String, params: [Behavior]?) - case AudienceData(baseUrlString: String, params: [Behavior]?) + case sendBehaviorData(baseUrlString: String, params: [Behavior]?) + case audienceData(baseUrlString: String, params: [Behavior]?) - var URLRequest: NSMutableURLRequest{ + func asURLRequest() throws -> URLRequest{ var behaviors:[Behavior]? - var URL: NSURL? + var URL: Foundation.URL? switch self{ - case .AudienceData(let baseURL, let params): - URL = NSURL(string: baseURL) + case .audienceData(let baseURL, let params): + URL = Foundation.URL(string: baseURL) behaviors = params - case .SendBehaviorData(let baseURL, let params): - URL = NSURL(string: baseURL) + case .sendBehaviorData(let baseURL, let params): + URL = Foundation.URL(string: baseURL) behaviors = params } //convert behaviors to params - var params: [String: AnyObject] = [:] + var params: [String: Any] = [:] if let behaviors = behaviors{ for behavior in behaviors{ - params[behavior.key] = behavior.value ?? "" + params[behavior.key] = behavior.value as Any?? ?? "" as Any? + URL = URL?.appendingPathComponent("\(behavior.key)=\(behavior.value!)/"); } } - let mutableURLRequest = NSMutableURLRequest(URL: URL!, cachePolicy: NSURLRequestCachePolicy.ReloadIgnoringCacheData, timeoutInterval: 60) - return Alamofire.ParameterEncoding.Custom(Router.paramCustomURLPathEncode).encode(mutableURLRequest, parameters: params).0 - } - - /** - Appends the parameters as paths to the url - */ - private static let paramCustomURLPathEncode: (convertible: URLRequestConvertible, params: [String:AnyObject]?) -> (NSMutableURLRequest, NSError?) = { - (convertible, params) -> (NSMutableURLRequest, NSError?) in - //Append the params to the URL as paths - var mutableRequest = convertible.URLRequest.copy() as! NSMutableURLRequest - var urlString = mutableRequest.URLString - - if let params = params{ - for (key, val) in params{ - if let key = key.urlPathEncoded(){ - if let valString = val as? String where !valString.isEmpty { - if let valString = valString.urlPathEncoded(){ - urlString += "\(key)=\(valString)/" - } - }else{ - - urlString += "\(key.urlPathEncoded())/" - } - } - } - } - - mutableRequest.URL = NSURL(string: urlString) - - return (mutableRequest, nil) + let urlRequest = URLRequest(url: URL!, cachePolicy: URLRequest.CachePolicy.reloadIgnoringCacheData, timeoutInterval: 60) + return try Alamofire.URLEncoding.default.encode(urlRequest, with: params); } } @@ -373,11 +341,11 @@ public class DMP:NSObject{ //MARK - Extension to add encoding for String extension String { func urlPathEncoded() -> String?{ - let characterSet = NSMutableCharacterSet(charactersInString: "!*'\"();:@&=+$,/?#[]% ").invertedSet - return stringByAddingPercentEncodingWithAllowedCharacters(characterSet) + let characterSet = NSMutableCharacterSet(charactersIn: "!*'\"();:@&=+$,/?#[]% ").inverted + return addingPercentEncoding(withAllowedCharacters: characterSet) } func urlHostEncoded() -> String?{ - return stringByAddingPercentEncodingWithAllowedCharacters(.URLHostAllowedCharacterSet()) + return addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlHostAllowed) } } diff --git a/Pod/Classes/LotameAudience.swift b/Pod/Classes/LotameAudience.swift index 2495c15..86dcca6 100644 --- a/Pod/Classes/LotameAudience.swift +++ b/Pod/Classes/LotameAudience.swift @@ -27,21 +27,21 @@ import Foundation @objc -public class LotameAudience : NSObject{ - public var jsonString:String? { +open class LotameAudience : NSObject{ + open var jsonString:String? { return json.rawString() } - public var json: JSON{ - let json: JSON = ["id": id, "abbr" : abbreviation] + open var json: JSON{ + let json: JSON = ["id": id as AnyObject, "abbr" : abbreviation as AnyObject] return json } - public let id:String - public let abbreviation:String + open let id:String + open let abbreviation:String init(json: JSON){ id = json["id"].stringValue abbreviation = json["abbr"].stringValue } -} \ No newline at end of file +} diff --git a/Pod/Classes/LotameError.swift b/Pod/Classes/LotameError.swift index c90e5a8..bc35bd0 100644 --- a/Pod/Classes/LotameError.swift +++ b/Pod/Classes/LotameError.swift @@ -28,21 +28,21 @@ import Foundation public let LotameErrorDomain = "com.splender.error" @objc -public enum LotameError: Int, ErrorType{ +public enum LotameError: Int, Error{ public static let _NSErrorDomain: String = LotameErrorDomain - case TrackingDisabled - case InitializeNotCalled - case UnexpectedResponse + case trackingDisabled + case initializeNotCalled + case unexpectedResponse func getMessage() -> String{ switch self{ - case .TrackingDisabled: + case .trackingDisabled: return "User has chosen to limit ad tracking" - case .InitializeNotCalled: + case .initializeNotCalled: return "Call the initialize method to set your client id before attempting network calls. This only needs to be done once per app run (can put in appdelegate)" - case .UnexpectedResponse: + case .unexpectedResponse: return "Server is returning bad responses" } } -} \ No newline at end of file +} diff --git a/Pod/Classes/LotameProfile.swift b/Pod/Classes/LotameProfile.swift index 7629074..e55f6fb 100644 --- a/Pod/Classes/LotameProfile.swift +++ b/Pod/Classes/LotameProfile.swift @@ -27,15 +27,15 @@ import Foundation @objc -public class LotameProfile: NSObject{ - public let pid:String - public var audiences: [LotameAudience] = [] +open class LotameProfile: NSObject{ + open let pid:String + open var audiences: [LotameAudience] = [] - public var jsonString:String? { + open var jsonString:String? { return json.rawString() } - public var json: JSON{ + open var json: JSON{ var json: JSON = ["Profile": ["pid": pid]] json["Profile"]["Audiences"] = JSON(["Audience" : audiences.map{["id":$0.id, "abbr": $0.abbreviation]}]) return json @@ -52,4 +52,4 @@ public class LotameProfile: NSObject{ audiences.append(LotameAudience(json: audience)) } } -} \ No newline at end of file +} diff --git a/Pod/Classes/SwiftyJSON.swift b/Pod/Classes/SwiftyJSON.swift index 61423a3..3879246 100644 --- a/Pod/Classes/SwiftyJSON.swift +++ b/Pod/Classes/SwiftyJSON.swift @@ -1,6 +1,6 @@ // SwiftyJSON.swift // -// Copyright (c) 2014 Ruoyu Fu, Pinglin Tang +// Copyright (c) 2014 - 2016 Ruoyu Fu, Pinglin Tang // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -19,94 +19,102 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - import Foundation // MARK: - Error - ///Error domain -public let ErrorDomain: String! = "SwiftyJSONErrorDomain" +public let ErrorDomain: String = "SwiftyJSONErrorDomain" ///Error code -public let ErrorUnsupportedType: Int! = 999 -public let ErrorIndexOutOfBounds: Int! = 900 -public let ErrorWrongType: Int! = 901 -public let ErrorNotExist: Int! = 500 +public let ErrorUnsupportedType: Int = 999 +public let ErrorIndexOutOfBounds: Int = 900 +public let ErrorWrongType: Int = 901 +public let ErrorNotExist: Int = 500 +public let ErrorInvalidJSON: Int = 490 // MARK: - JSON Type - /** -JSON's type definitions. - -See http://tools.ietf.org/html/rfc7231#section-4.3 -*/ + JSON's type definitions. + + See http://www.json.org + */ public enum Type :Int{ - case Number - case String - case Bool - case Array - case Dictionary - case Null - case Unknown + case number + case string + case bool + case array + case dictionary + case null + case unknown } // MARK: - JSON Base - public struct JSON { /** - Creates a JSON using the data. - - - parameter data: The NSData used to convert to json.Top level object in data is an NSArray or NSDictionary - - parameter opt: The JSON serialization reading options. `.AllowFragments` by default. - - parameter error: error The NSErrorPointer used to return the error. `nil` by default. - - - returns: The created JSON - */ - public init(data:NSData, options opt: NSJSONReadingOptions = .AllowFragments, error: NSErrorPointer = nil) { + Creates a JSON using the data. + + - parameter data: The NSData used to convert to json.Top level object in data is an NSArray or NSDictionary + - parameter opt: The JSON serialization reading options. `.AllowFragments` by default. + - parameter error: The NSErrorPointer used to return the error. `nil` by default. + + - returns: The created JSON + */ + public init(data:Data, options opt: JSONSerialization.ReadingOptions = .allowFragments, error: NSErrorPointer = nil) { do { - let object: AnyObject = try NSJSONSerialization.JSONObjectWithData(data, options: opt) + let object: Any = try JSONSerialization.jsonObject(with: data, options: opt) self.init(object) } catch let aError as NSError { if error != nil { - error.memory = aError + error?.pointee = aError } self.init(NSNull()) } } /** - Creates a JSON using the object. - - - parameter object: The object must have the following properties: All objects are NSString/String, NSNumber/Int/Float/Double/Bool, NSArray/Array, NSDictionary/Dictionary, or NSNull; All dictionary keys are NSStrings/String; NSNumbers are not NaN or infinity. + Creates a JSON from JSON string + - parameter string: Normal json string like '{"a":"b"}' + + - returns: The created JSON + */ + public static func parse(_ string:String) -> JSON { + return string.data(using: String.Encoding.utf8) + .flatMap{ JSON(data: $0) } ?? JSON(NSNull()) + } - - returns: The created JSON - */ - public init(_ object: AnyObject) { + /** + Creates a JSON using the object. + + - parameter object: The object must have the following properties: All objects are NSString/String, NSNumber/Int/Float/Double/Bool, NSArray/Array, NSDictionary/Dictionary, or NSNull; All dictionary keys are NSStrings/String; NSNumbers are not NaN or infinity. + + - returns: The created JSON + */ + public init(_ object: Any) { self.object = object } /** - Creates a JSON from a [JSON] - - - parameter jsonArray: A Swift array of JSON objects - - - returns: The created JSON - */ + Creates a JSON from a [JSON] + + - parameter jsonArray: A Swift array of JSON objects + + - returns: The created JSON + */ public init(_ jsonArray:[JSON]) { self.init(jsonArray.map { $0.object }) } /** - Creates a JSON from a [String: JSON] - - :param: jsonDictionary A Swift dictionary of JSON objects - - :returns: The created JSON - */ + Creates a JSON from a [String: JSON] + + - parameter jsonDictionary: A Swift dictionary of JSON objects + + - returns: The created JSON + */ public init(_ jsonDictionary:[String: JSON]) { - var dictionary = [String: AnyObject]() + var dictionary = [String: Any](minimumCapacity: jsonDictionary.count) for (key, json) in jsonDictionary { dictionary[key] = json.object } @@ -114,30 +122,31 @@ public struct JSON { } /// Private object - private var rawArray: [AnyObject] = [] - private var rawDictionary: [String : AnyObject] = [:] - private var rawString: String = "" - private var rawNumber: NSNumber = 0 - private var rawNull: NSNull = NSNull() + fileprivate var rawArray: [Any] = [] + fileprivate var rawDictionary: [String : Any] = [:] + fileprivate var rawString: String = "" + fileprivate var rawNumber: NSNumber = 0 + fileprivate var rawNull: NSNull = NSNull() + fileprivate var rawBool: Bool = false /// Private type - private var _type: Type = .Null + fileprivate var _type: Type = .null /// prviate error - private var _error: NSError? = nil + fileprivate var _error: NSError? = nil /// Object in JSON - public var object: AnyObject { + public var object: Any { get { switch self.type { - case .Array: + case .array: return self.rawArray - case .Dictionary: + case .dictionary: return self.rawDictionary - case .String: + case .string: return self.rawString - case .Number: - return self.rawNumber - case .Bool: + case .number: return self.rawNumber + case .bool: + return self.rawBool default: return self.rawNull } @@ -147,276 +156,173 @@ public struct JSON { switch newValue { case let number as NSNumber: if number.isBool { - _type = .Bool + _type = .bool + self.rawBool = number.boolValue } else { - _type = .Number + _type = .number + self.rawNumber = number } - self.rawNumber = number case let string as String: - _type = .String + _type = .string self.rawString = string case _ as NSNull: - _type = .Null - case let array as [AnyObject]: - _type = .Array + _type = .null + case let array as [JSON]: + _type = .array + self.rawArray = array.map { $0.object } + case let array as [Any]: + _type = .array self.rawArray = array - case let dictionary as [String : AnyObject]: - _type = .Dictionary + case let dictionary as [String : Any]: + _type = .dictionary self.rawDictionary = dictionary default: - _type = .Unknown + _type = .unknown _error = NSError(domain: ErrorDomain, code: ErrorUnsupportedType, userInfo: [NSLocalizedDescriptionKey: "It is a unsupported type"]) } } } - /// json type + /// JSON type public var type: Type { get { return _type } } /// Error in JSON public var error: NSError? { get { return self._error } } - /// The static null json - @available(*, unavailable, renamed="null") + /// The static null JSON + @available(*, unavailable, renamed:"null") public static var nullJSON: JSON { get { return null } } public static var null: JSON { get { return JSON(NSNull()) } } } -// MARK: - CollectionType, SequenceType, Indexable -extension JSON : Swift.CollectionType, Swift.SequenceType, Swift.Indexable { - - public typealias Generator = JSONGenerator +public enum JSONIndex:Comparable +{ + case array(Int) + case dictionary(DictionaryIndex) + case null +} + +public func ==(lhs: JSONIndex, rhs: JSONIndex) -> Bool +{ + switch (lhs, rhs) + { + case (.array(let left), .array(let right)): + return left == right + case (.dictionary(let left), .dictionary(let right)): + return left == right + case (.null, .null): return true + default: + return false + } +} + +public func <(lhs: JSONIndex, rhs: JSONIndex) -> Bool +{ + switch (lhs, rhs) + { + case (.array(let left), .array(let right)): + return left < right + case (.dictionary(let left), .dictionary(let right)): + return left < right + default: + return false + } +} + + +extension JSON: Collection +{ public typealias Index = JSONIndex - public var startIndex: JSON.Index { - switch self.type { - case .Array: - return JSONIndex(arrayIndex: self.rawArray.startIndex) - case .Dictionary: - return JSONIndex(dictionaryIndex: self.rawDictionary.startIndex) + public var startIndex: Index + { + switch type + { + case .array: + return .array(rawArray.startIndex) + case .dictionary: + return .dictionary(dictionaryValue.startIndex) default: - return JSONIndex() + return .null } } - public var endIndex: JSON.Index { - switch self.type { - case .Array: - return JSONIndex(arrayIndex: self.rawArray.endIndex) - case .Dictionary: - return JSONIndex(dictionaryIndex: self.rawDictionary.endIndex) + public var endIndex: Index + { + switch type + { + case .array: + return .array(rawArray.endIndex) + case .dictionary: + return .dictionary(dictionaryValue.endIndex) default: - return JSONIndex() - } - } - - public subscript (position: JSON.Index) -> JSON.Generator.Element { - switch self.type { - case .Array: - return (String(position.arrayIndex), JSON(self.rawArray[position.arrayIndex!])) - case .Dictionary: - let (key, value) = self.rawDictionary[position.dictionaryIndex!] - return (key, JSON(value)) - default: - return ("", JSON.null) - } - } - - /// If `type` is `.Array` or `.Dictionary`, return `array.empty` or `dictonary.empty` otherwise return `false`. - public var isEmpty: Bool { - get { - switch self.type { - case .Array: - return self.rawArray.isEmpty - case .Dictionary: - return self.rawDictionary.isEmpty - default: - return true - } + return .null } } - /// If `type` is `.Array` or `.Dictionary`, return `array.count` or `dictonary.count` otherwise return `0`. - public var count: Int { - switch self.type { - case .Array: - return self.rawArray.count - case .Dictionary: - return self.rawDictionary.count + public func index(after i: Index) -> Index + { + switch i + { + case .array(let idx): + return .array(rawArray.index(after: idx)) + case .dictionary(let idx): + return .dictionary(dictionaryValue.index(after: idx)) default: - return 0 + return .null } + } - public func underestimateCount() -> Int { - switch self.type { - case .Array: - return self.rawArray.underestimateCount() - case .Dictionary: - return self.rawDictionary.underestimateCount() + public subscript (position: Index) -> (String, JSON) + { + switch position + { + case .array(let idx): + return (String(idx), JSON(self.rawArray[idx])) + case .dictionary(let idx): + return dictionaryValue[idx] default: - return 0 + return ("", JSON.null) } } - /** - If `type` is `.Array` or `.Dictionary`, return a generator over the elements like `Array` or `Dictionary`, otherwise return a generator over empty. - - returns: Return a *generator* over the elements of JSON. - */ - public func generate() -> JSON.Generator { - return JSON.Generator(self) - } } -public struct JSONIndex: ForwardIndexType, _Incrementable, Equatable, Comparable { - - let arrayIndex: Int? - let dictionaryIndex: DictionaryIndex? - - let type: Type - - init(){ - self.arrayIndex = nil - self.dictionaryIndex = nil - self.type = .Unknown - } - - init(arrayIndex: Int) { - self.arrayIndex = arrayIndex - self.dictionaryIndex = nil - self.type = .Array - } - - init(dictionaryIndex: DictionaryIndex) { - self.arrayIndex = nil - self.dictionaryIndex = dictionaryIndex - self.type = .Dictionary - } - - public func successor() -> JSONIndex { - switch self.type { - case .Array: - return JSONIndex(arrayIndex: self.arrayIndex!.successor()) - case .Dictionary: - return JSONIndex(dictionaryIndex: self.dictionaryIndex!.successor()) - default: - return JSONIndex() - } - } -} - -public func ==(lhs: JSONIndex, rhs: JSONIndex) -> Bool { - switch (lhs.type, rhs.type) { - case (.Array, .Array): - return lhs.arrayIndex == rhs.arrayIndex - case (.Dictionary, .Dictionary): - return lhs.dictionaryIndex == rhs.dictionaryIndex - default: - return false - } -} - -public func <(lhs: JSONIndex, rhs: JSONIndex) -> Bool { - switch (lhs.type, rhs.type) { - case (.Array, .Array): - return lhs.arrayIndex < rhs.arrayIndex - case (.Dictionary, .Dictionary): - return lhs.dictionaryIndex < rhs.dictionaryIndex - default: - return false - } -} - -public func <=(lhs: JSONIndex, rhs: JSONIndex) -> Bool { - switch (lhs.type, rhs.type) { - case (.Array, .Array): - return lhs.arrayIndex <= rhs.arrayIndex - case (.Dictionary, .Dictionary): - return lhs.dictionaryIndex <= rhs.dictionaryIndex - default: - return false - } +// MARK: - Subscript +/** + * To mark both String and Int can be used in subscript. + */ +public enum JSONKey +{ + case index(Int) + case key(String) } -public func >=(lhs: JSONIndex, rhs: JSONIndex) -> Bool { - switch (lhs.type, rhs.type) { - case (.Array, .Array): - return lhs.arrayIndex >= rhs.arrayIndex - case (.Dictionary, .Dictionary): - return lhs.dictionaryIndex >= rhs.dictionaryIndex - default: - return false - } +public protocol JSONSubscriptType { + var jsonKey:JSONKey { get } } -public func >(lhs: JSONIndex, rhs: JSONIndex) -> Bool { - switch (lhs.type, rhs.type) { - case (.Array, .Array): - return lhs.arrayIndex > rhs.arrayIndex - case (.Dictionary, .Dictionary): - return lhs.dictionaryIndex > rhs.dictionaryIndex - default: - return false +extension Int: JSONSubscriptType { + public var jsonKey:JSONKey { + return JSONKey.index(self) } } -public struct JSONGenerator : GeneratorType { - - public typealias Element = (String, JSON) - - private let type: Type - private var dictionayGenerate: DictionaryGenerator? - private var arrayGenerate: IndexingGenerator<[AnyObject]>? - private var arrayIndex: Int = 0 - - init(_ json: JSON) { - self.type = json.type - if type == .Array { - self.arrayGenerate = json.rawArray.generate() - }else { - self.dictionayGenerate = json.rawDictionary.generate() - } - } - - public mutating func next() -> JSONGenerator.Element? { - switch self.type { - case .Array: - if let o = self.arrayGenerate!.next() { - return (String(self.arrayIndex++), JSON(o)) - } else { - return nil - } - case .Dictionary: - if let (k, v): (String, AnyObject) = self.dictionayGenerate!.next() { - return (k, JSON(v)) - } else { - return nil - } - default: - return nil - } +extension String: JSONSubscriptType { + public var jsonKey:JSONKey { + return JSONKey.key(self) } } -// MARK: - Subscript - -/** -* To mark both String and Int can be used in subscript. -*/ -public protocol JSONSubscriptType {} - -extension Int: JSONSubscriptType {} - -extension String: JSONSubscriptType {} - extension JSON { - /// If `type` is `.Array`, return json which's object is `array[index]`, otherwise return null json with error. - private subscript(index index: Int) -> JSON { + /// If `type` is `.Array`, return json whose object is `array[index]`, otherwise return null json with error. + fileprivate subscript(index index: Int) -> JSON { get { - if self.type != .Array { + if self.type != .array { var r = JSON.null r._error = self._error ?? NSError(domain: ErrorDomain, code: ErrorWrongType, userInfo: [NSLocalizedDescriptionKey: "Array[\(index)] failure, It is not an array"]) return r @@ -429,7 +335,7 @@ extension JSON { } } set { - if self.type == .Array { + if self.type == .array { if self.rawArray.count > index && newValue.error == nil { self.rawArray[index] = newValue.object } @@ -437,11 +343,11 @@ extension JSON { } } - /// If `type` is `.Dictionary`, return json which's object is `dictionary[key]` , otherwise return null json with error. - private subscript(key key: String) -> JSON { + /// If `type` is `.Dictionary`, return json whose object is `dictionary[key]` , otherwise return null json with error. + fileprivate subscript(key key: String) -> JSON { get { var r = JSON.null - if self.type == .Dictionary { + if self.type == .dictionary { if let o = self.rawDictionary[key] { r = JSON(o) } else { @@ -453,43 +359,41 @@ extension JSON { return r } set { - if self.type == .Dictionary && newValue.error == nil { + if self.type == .dictionary && newValue.error == nil { self.rawDictionary[key] = newValue.object } } } /// If `sub` is `Int`, return `subscript(index:)`; If `sub` is `String`, return `subscript(key:)`. - private subscript(sub sub: JSONSubscriptType) -> JSON { + fileprivate subscript(sub sub: JSONSubscriptType) -> JSON { get { - if sub is String { - return self[key:sub as! String] - } else { - return self[index:sub as! Int] + switch sub.jsonKey { + case .index(let index): return self[index: index] + case .key(let key): return self[key: key] } } set { - if sub is String { - self[key:sub as! String] = newValue - } else { - self[index:sub as! Int] = newValue + switch sub.jsonKey { + case .index(let index): self[index: index] = newValue + case .key(let key): self[key: key] = newValue } } } /** - Find a json in the complex data structuresby using the Int/String's array. - - - parameter path: The target json's path. Example: - - let json = JSON[data] - let path = [9,"list","person","name"] - let name = json[path] - - The same as: let name = json[9]["list"]["person"]["name"] - - - returns: Return a json found by the path or a null json with error - */ + Find a json in the complex data structures by using array of Int and/or String as path. + + - parameter path: The target json's path. Example: + + let json = JSON[data] + let path = [9,"list","person","name"] + let name = json[path] + + The same as: let name = json[9]["list"]["person"]["name"] + + - returns: Return a json found by the path or a null json with error + */ public subscript(path: [JSONSubscriptType]) -> JSON { get { return path.reduce(self) { $0[sub: $1] } @@ -501,7 +405,7 @@ extension JSON { case 1: self[sub:path[0]].object = newValue.object default: - var aPath = path; aPath.removeAtIndex(0) + var aPath = path; aPath.remove(at: 0) var nextJSON = self[sub: path[0]] nextJSON[aPath] = newValue self[sub: path[0]] = nextJSON @@ -510,16 +414,16 @@ extension JSON { } /** - Find a json in the complex data structuresby using the Int/String's array. - - - parameter path: The target json's path. Example: - - let name = json[9,"list","person","name"] - - The same as: let name = json[9]["list"]["person"]["name"] - - - returns: Return a json found by the path or a null json with error - */ + Find a json in the complex data structures by using array of Int and/or String as path. + + - parameter path: The target json's path. Example: + + let name = json[9,"list","person","name"] + + The same as: let name = json[9]["list"]["person"]["name"] + + - returns: Return a json found by the path or a null json with error + */ public subscript(path: JSONSubscriptType...) -> JSON { get { return self[path] @@ -531,104 +435,136 @@ extension JSON { } // MARK: - LiteralConvertible - -extension JSON: Swift.StringLiteralConvertible { +extension JSON: Swift.ExpressibleByStringLiteral { public init(stringLiteral value: StringLiteralType) { - self.init(value) + self.init(value as Any) } public init(extendedGraphemeClusterLiteral value: StringLiteralType) { - self.init(value) + self.init(value as Any) } public init(unicodeScalarLiteral value: StringLiteralType) { - self.init(value) + self.init(value as Any) } } -extension JSON: Swift.IntegerLiteralConvertible { +extension JSON: Swift.ExpressibleByIntegerLiteral { public init(integerLiteral value: IntegerLiteralType) { - self.init(value) + self.init(value as Any) } } -extension JSON: Swift.BooleanLiteralConvertible { +extension JSON: Swift.ExpressibleByBooleanLiteral { public init(booleanLiteral value: BooleanLiteralType) { - self.init(value) + self.init(value as Any) } } -extension JSON: Swift.FloatLiteralConvertible { +extension JSON: Swift.ExpressibleByFloatLiteral { public init(floatLiteral value: FloatLiteralType) { - self.init(value) + self.init(value as Any) } } -extension JSON: Swift.DictionaryLiteralConvertible { +extension JSON: Swift.ExpressibleByDictionaryLiteral { + public init(dictionaryLiteral elements: (String, Any)...) { + let array = elements + self.init(dictionaryLiteral: array) + } - public init(dictionaryLiteral elements: (String, AnyObject)...) { - self.init(elements.reduce([String : AnyObject]()){(dictionary: [String : AnyObject], element:(String, AnyObject)) -> [String : AnyObject] in - var d = dictionary - d[element.0] = element.1 - return d - }) + public init(dictionaryLiteral elements: [(String, Any)]) { + let jsonFromDictionaryLiteral: ([String : Any]) -> JSON = { dictionary in + let initializeElement = Array(dictionary.keys).flatMap { key -> (String, Any)? in + if let value = dictionary[key] { + return (key, value) + } + return nil + } + return JSON(dictionaryLiteral: initializeElement) + } + + var dict = [String : Any](minimumCapacity: elements.count) + + for element in elements { + let elementToSet: Any + if let json = element.1 as? JSON { + elementToSet = json.object + } else if let jsonArray = element.1 as? [JSON] { + elementToSet = JSON(jsonArray).object + } else if let dictionary = element.1 as? [String : Any] { + elementToSet = jsonFromDictionaryLiteral(dictionary).object + } else if let dictArray = element.1 as? [[String : Any]] { + let jsonArray = dictArray.map { jsonFromDictionaryLiteral($0) } + elementToSet = JSON(jsonArray).object + } else { + elementToSet = element.1 + } + dict[element.0] = elementToSet + } + + self.init(dict) } } -extension JSON: Swift.ArrayLiteralConvertible { +extension JSON: Swift.ExpressibleByArrayLiteral { - public init(arrayLiteral elements: AnyObject...) { - self.init(elements) + public init(arrayLiteral elements: Any...) { + self.init(elements as Any) } } -extension JSON: Swift.NilLiteralConvertible { +extension JSON: Swift.ExpressibleByNilLiteral { + @available(*, deprecated, message: "use JSON.null instead. Will be removed in future versions") public init(nilLiteral: ()) { - self.init(NSNull()) + self.init(NSNull() as Any) } } // MARK: - Raw - extension JSON: Swift.RawRepresentable { - public init?(rawValue: AnyObject) { - if JSON(rawValue).type == .Unknown { + public init?(rawValue: Any) { + if JSON(rawValue).type == .unknown { return nil } else { self.init(rawValue) } } - public var rawValue: AnyObject { + public var rawValue: Any { return self.object } - public func rawData(options opt: NSJSONWritingOptions = NSJSONWritingOptions(rawValue: 0)) throws -> NSData { - return try NSJSONSerialization.dataWithJSONObject(self.object, options: opt) + public func rawData(options opt: JSONSerialization.WritingOptions = JSONSerialization.WritingOptions(rawValue: 0)) throws -> Data { + guard JSONSerialization.isValidJSONObject(self.object) else { + throw NSError(domain: ErrorDomain, code: ErrorInvalidJSON, userInfo: [NSLocalizedDescriptionKey: "JSON is invalid"]) + } + + return try JSONSerialization.data(withJSONObject: self.object, options: opt) } - public func rawString(encoding: UInt = NSUTF8StringEncoding, options opt: NSJSONWritingOptions = .PrettyPrinted) -> String? { + public func rawString(_ encoding: String.Encoding = String.Encoding.utf8, options opt: JSONSerialization.WritingOptions = .prettyPrinted) -> String? { switch self.type { - case .Array, .Dictionary: + case .array, .dictionary: do { let data = try self.rawData(options: opt) - return NSString(data: data, encoding: encoding) as? String + return String(data: data, encoding: encoding) } catch _ { return nil } - case .String: + case .string: return self.rawString - case .Number: + case .number: return self.rawNumber.stringValue - case .Bool: - return self.rawNumber.boolValue.description - case .Null: + case .bool: + return self.rawBool.description + case .null: return "null" default: return nil @@ -637,11 +573,10 @@ extension JSON: Swift.RawRepresentable { } // MARK: - Printable, DebugPrintable - -extension JSON: Swift.Printable, Swift.DebugPrintable { +extension JSON: Swift.CustomStringConvertible, Swift.CustomDebugStringConvertible { public var description: String { - if let string = self.rawString(options:.PrettyPrinted) { + if let string = self.rawString(options:.prettyPrinted) { return string } else { return "unknown" @@ -654,13 +589,12 @@ extension JSON: Swift.Printable, Swift.DebugPrintable { } // MARK: - Array - extension JSON { //Optional [JSON] public var array: [JSON]? { get { - if self.type == .Array { + if self.type == .array { return self.rawArray.map{ JSON($0) } } else { return nil @@ -676,10 +610,10 @@ extension JSON { } //Optional [AnyObject] - public var arrayObject: [AnyObject]? { + public var arrayObject: [Any]? { get { switch self.type { - case .Array: + case .array: return self.rawArray default: return nil @@ -687,7 +621,7 @@ extension JSON { } set { if let array = newValue { - self.object = array + self.object = array as Any } else { self.object = NSNull() } @@ -696,17 +630,16 @@ extension JSON { } // MARK: - Dictionary - extension JSON { //Optional [String : JSON] public var dictionary: [String : JSON]? { - if self.type == .Dictionary { - return self.rawDictionary.reduce([String : JSON]()) { (dictionary: [String : JSON], element: (String, AnyObject)) -> [String : JSON] in - var d = dictionary - d[element.0] = JSON(element.1) - return d + if self.type == .dictionary { + var d = [String : JSON](minimumCapacity: rawDictionary.count) + for (key, value) in rawDictionary { + d[key] = JSON(value) } + return d } else { return nil } @@ -718,10 +651,10 @@ extension JSON { } //Optional [String : AnyObject] - public var dictionaryObject: [String : AnyObject]? { + public var dictionaryObject: [String : Any]? { get { switch self.type { - case .Dictionary: + case .dictionary: return self.rawDictionary default: return nil @@ -729,7 +662,7 @@ extension JSON { } set { if let v = newValue { - self.object = v + self.object = v as Any } else { self.object = NSNull() } @@ -738,22 +671,21 @@ extension JSON { } // MARK: - Bool - -extension JSON: Swift.BooleanType { +extension JSON { // : Swift.Bool //Optional bool public var bool: Bool? { get { switch self.type { - case .Bool: - return self.rawNumber.boolValue + case .bool: + return self.rawBool default: return nil } } set { - if newValue != nil { - self.object = NSNumber(bool: newValue!) + if let newValue = newValue { + self.object = newValue as Bool } else { self.object = NSNull() } @@ -764,35 +696,40 @@ extension JSON: Swift.BooleanType { public var boolValue: Bool { get { switch self.type { - case .Bool, .Number, .String: - return self.object.boolValue + case .bool: + return self.rawBool + case .number: + return self.rawNumber.boolValue + case .string: + return ["true", "y", "t"].contains() { (truthyString) in + return self.rawString.caseInsensitiveCompare(truthyString) == .orderedSame + } default: return false } } set { - self.object = NSNumber(bool: newValue) + self.object = newValue } } } // MARK: - String - extension JSON { //Optional string public var string: String? { get { switch self.type { - case .String: + case .string: return self.object as? String default: return nil } } set { - if newValue != nil { - self.object = NSString(string:newValue!) + if let newValue = newValue { + self.object = NSString(string:newValue) } else { self.object = NSNull() } @@ -803,12 +740,12 @@ extension JSON { public var stringValue: String { get { switch self.type { - case .String: - return self.object as! String - case .Number: - return self.object.stringValue - case .Bool: - return (self.object as! Bool).description + case .string: + return self.object as? String ?? "" + case .number: + return self.rawNumber.stringValue + case .bool: + return (self.object as? Bool).map { String($0) } ?? "" default: return "" } @@ -826,8 +763,10 @@ extension JSON { public var number: NSNumber? { get { switch self.type { - case .Number, .Bool: + case .number: return self.rawNumber + case .bool: + return NSNumber(value: self.rawBool ? 1 : 0) default: return nil } @@ -841,18 +780,18 @@ extension JSON { public var numberValue: NSNumber { get { switch self.type { - case .String: - let scanner = NSScanner(string: self.object as! String) - if scanner.scanDouble(nil){ - if (scanner.atEnd) { - return NSNumber(double:(self.object as! NSString).doubleValue) - } + case .string: + let decimal = NSDecimalNumber(string: self.object as? String) + if decimal == NSDecimalNumber.notANumber { // indicates parse error + return NSDecimalNumber.zero } - return NSNumber(double: 0.0) - case .Number, .Bool: - return self.object as! NSNumber + return decimal + case .number: + return self.object as? NSNumber ?? NSNumber(value: 0) + case .bool: + return NSNumber(value: self.rawBool ? 1 : 0) default: - return NSNumber(double: 0.0) + return NSNumber(value: 0.0) } } set { @@ -867,7 +806,7 @@ extension JSON { public var null: NSNull? { get { switch self.type { - case .Null: + case .null: return self.rawNull default: return nil @@ -877,18 +816,27 @@ extension JSON { self.object = NSNull() } } + public func exists() -> Bool{ + if let errorValue = error, errorValue.code == ErrorNotExist || + errorValue.code == ErrorIndexOutOfBounds || + errorValue.code == ErrorWrongType { + return false + } + return true + } } //MARK: - URL extension JSON { //Optional URL - public var URL: NSURL? { + public var URL: URL? { get { switch self.type { - case .String: - if let encodedString_ = self.rawString.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet()) { - return NSURL(string: encodedString_) + case .string: + if let encodedString_ = self.rawString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed) { + // We have to use `Foundation.URL` otherwise it conflicts with the variable name. + return Foundation.URL(string: encodedString_) } else { return nil } @@ -897,13 +845,12 @@ extension JSON { } } set { - self.object = newValue?.absoluteString ?? NSNull() + self.object = newValue?.absoluteString } } } // MARK: - Int, Double, Float, Int8, Int16, Int32, Int64 - extension JSON { public var double: Double? { @@ -911,8 +858,8 @@ extension JSON { return self.number?.doubleValue } set { - if newValue != nil { - self.object = NSNumber(double: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -924,7 +871,7 @@ extension JSON { return self.numberValue.doubleValue } set { - self.object = NSNumber(double: newValue) + self.object = NSNumber(value: newValue) } } @@ -933,8 +880,8 @@ extension JSON { return self.number?.floatValue } set { - if newValue != nil { - self.object = NSNumber(float: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -946,18 +893,23 @@ extension JSON { return self.numberValue.floatValue } set { - self.object = NSNumber(float: newValue) + self.object = NSNumber(value: newValue) } } - public var int: Int? { - get { - return self.number?.longValue + public var int: Int? + { + get + { + return self.number?.intValue } - set { - if newValue != nil { - self.object = NSNumber(integer: newValue!) - } else { + set + { + if let newValue = newValue + { + self.object = NSNumber(value: newValue) + } else + { self.object = NSNull() } } @@ -965,20 +917,20 @@ extension JSON { public var intValue: Int { get { - return self.numberValue.integerValue + return self.numberValue.intValue } set { - self.object = NSNumber(integer: newValue) + self.object = NSNumber(value: newValue) } } public var uInt: UInt? { get { - return self.number?.unsignedLongValue + return self.number?.uintValue } set { - if newValue != nil { - self.object = NSNumber(unsignedLong: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -987,20 +939,20 @@ extension JSON { public var uIntValue: UInt { get { - return self.numberValue.unsignedLongValue + return self.numberValue.uintValue } set { - self.object = NSNumber(unsignedLong: newValue) + self.object = NSNumber(value: newValue) } } public var int8: Int8? { get { - return self.number?.charValue + return self.number?.int8Value } set { - if newValue != nil { - self.object = NSNumber(char: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -1009,20 +961,20 @@ extension JSON { public var int8Value: Int8 { get { - return self.numberValue.charValue + return self.numberValue.int8Value } set { - self.object = NSNumber(char: newValue) + self.object = NSNumber(value: newValue) } } public var uInt8: UInt8? { get { - return self.number?.unsignedCharValue + return self.number?.uint8Value } set { - if newValue != nil { - self.object = NSNumber(unsignedChar: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -1031,20 +983,20 @@ extension JSON { public var uInt8Value: UInt8 { get { - return self.numberValue.unsignedCharValue + return self.numberValue.uint8Value } set { - self.object = NSNumber(unsignedChar: newValue) + self.object = NSNumber(value: newValue) } } public var int16: Int16? { get { - return self.number?.shortValue + return self.number?.int16Value } set { - if newValue != nil { - self.object = NSNumber(short: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -1053,20 +1005,20 @@ extension JSON { public var int16Value: Int16 { get { - return self.numberValue.shortValue + return self.numberValue.int16Value } set { - self.object = NSNumber(short: newValue) + self.object = NSNumber(value: newValue) } } public var uInt16: UInt16? { get { - return self.number?.unsignedShortValue + return self.number?.uint16Value } set { - if newValue != nil { - self.object = NSNumber(unsignedShort: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -1075,20 +1027,20 @@ extension JSON { public var uInt16Value: UInt16 { get { - return self.numberValue.unsignedShortValue + return self.numberValue.uint16Value } set { - self.object = NSNumber(unsignedShort: newValue) + self.object = NSNumber(value: newValue) } } public var int32: Int32? { get { - return self.number?.intValue + return self.number?.int32Value } set { - if newValue != nil { - self.object = NSNumber(int: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -1097,20 +1049,20 @@ extension JSON { public var int32Value: Int32 { get { - return self.numberValue.intValue + return self.numberValue.int32Value } set { - self.object = NSNumber(int: newValue) + self.object = NSNumber(value: newValue) } } public var uInt32: UInt32? { get { - return self.number?.unsignedIntValue + return self.number?.uint32Value } set { - if newValue != nil { - self.object = NSNumber(unsignedInt: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -1119,20 +1071,20 @@ extension JSON { public var uInt32Value: UInt32 { get { - return self.numberValue.unsignedIntValue + return self.numberValue.uint32Value } set { - self.object = NSNumber(unsignedInt: newValue) + self.object = NSNumber(value: newValue) } } public var int64: Int64? { get { - return self.number?.longLongValue + return self.number?.int64Value } set { - if newValue != nil { - self.object = NSNumber(longLong: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -1141,20 +1093,20 @@ extension JSON { public var int64Value: Int64 { get { - return self.numberValue.longLongValue + return self.numberValue.int64Value } set { - self.object = NSNumber(longLong: newValue) + self.object = NSNumber(value: newValue) } } public var uInt64: UInt64? { get { - return self.number?.unsignedLongLongValue + return self.number?.uint64Value } set { - if newValue != nil { - self.object = NSNumber(unsignedLongLong: newValue!) + if let newValue = newValue { + self.object = NSNumber(value: newValue) } else { self.object = NSNull() } @@ -1163,10 +1115,10 @@ extension JSON { public var uInt64Value: UInt64 { get { - return self.numberValue.unsignedLongLongValue + return self.numberValue.uint64Value } set { - self.object = NSNumber(unsignedLongLong: newValue) + self.object = NSNumber(value: newValue) } } } @@ -1177,17 +1129,17 @@ extension JSON : Swift.Comparable {} public func ==(lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { - case (.Number, .Number): + case (.number, .number): return lhs.rawNumber == rhs.rawNumber - case (.String, .String): + case (.string, .string): return lhs.rawString == rhs.rawString - case (.Bool, .Bool): - return lhs.rawNumber.boolValue == rhs.rawNumber.boolValue - case (.Array, .Array): + case (.bool, .bool): + return lhs.rawBool == rhs.rawBool + case (.array, .array): return lhs.rawArray as NSArray == rhs.rawArray as NSArray - case (.Dictionary, .Dictionary): + case (.dictionary, .dictionary): return lhs.rawDictionary as NSDictionary == rhs.rawDictionary as NSDictionary - case (.Null, .Null): + case (.null, .null): return true default: return false @@ -1197,17 +1149,17 @@ public func ==(lhs: JSON, rhs: JSON) -> Bool { public func <=(lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { - case (.Number, .Number): + case (.number, .number): return lhs.rawNumber <= rhs.rawNumber - case (.String, .String): + case (.string, .string): return lhs.rawString <= rhs.rawString - case (.Bool, .Bool): - return lhs.rawNumber.boolValue == rhs.rawNumber.boolValue - case (.Array, .Array): + case (.bool, .bool): + return lhs.rawBool == rhs.rawBool + case (.array, .array): return lhs.rawArray as NSArray == rhs.rawArray as NSArray - case (.Dictionary, .Dictionary): + case (.dictionary, .dictionary): return lhs.rawDictionary as NSDictionary == rhs.rawDictionary as NSDictionary - case (.Null, .Null): + case (.null, .null): return true default: return false @@ -1217,17 +1169,17 @@ public func <=(lhs: JSON, rhs: JSON) -> Bool { public func >=(lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { - case (.Number, .Number): + case (.number, .number): return lhs.rawNumber >= rhs.rawNumber - case (.String, .String): + case (.string, .string): return lhs.rawString >= rhs.rawString - case (.Bool, .Bool): - return lhs.rawNumber.boolValue == rhs.rawNumber.boolValue - case (.Array, .Array): + case (.bool, .bool): + return lhs.rawBool == rhs.rawBool + case (.array, .array): return lhs.rawArray as NSArray == rhs.rawArray as NSArray - case (.Dictionary, .Dictionary): + case (.dictionary, .dictionary): return lhs.rawDictionary as NSDictionary == rhs.rawDictionary as NSDictionary - case (.Null, .Null): + case (.null, .null): return true default: return false @@ -1237,9 +1189,9 @@ public func >=(lhs: JSON, rhs: JSON) -> Bool { public func >(lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { - case (.Number, .Number): + case (.number, .number): return lhs.rawNumber > rhs.rawNumber - case (.String, .String): + case (.string, .string): return lhs.rawString > rhs.rawString default: return false @@ -1249,29 +1201,27 @@ public func >(lhs: JSON, rhs: JSON) -> Bool { public func <(lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { - case (.Number, .Number): + case (.number, .number): return lhs.rawNumber < rhs.rawNumber - case (.String, .String): + case (.string, .string): return lhs.rawString < rhs.rawString default: return false } } -private let trueNumber = NSNumber(bool: true) -private let falseNumber = NSNumber(bool: false) -private let trueObjCType = String.fromCString(trueNumber.objCType) -private let falseObjCType = String.fromCString(falseNumber.objCType) +private let trueNumber = NSNumber(value: true) +private let falseNumber = NSNumber(value: false) +private let trueObjCType = String(cString: trueNumber.objCType) +private let falseObjCType = String(cString: falseNumber.objCType) // MARK: - NSNumber: Comparable - -extension NSNumber: Swift.Comparable { +extension NSNumber { var isBool:Bool { get { - let objCType = String.fromCString(self.objCType) - if (self.compare(trueNumber) == NSComparisonResult.OrderedSame && objCType == trueObjCType) - || (self.compare(falseNumber) == NSComparisonResult.OrderedSame && objCType == falseObjCType){ - return true + let objCType = String(cString: self.objCType) + if (self.compare(trueNumber) == .orderedSame && objCType == trueObjCType) || (self.compare(falseNumber) == .orderedSame && objCType == falseObjCType){ + return true } else { return false } @@ -1279,22 +1229,22 @@ extension NSNumber: Swift.Comparable { } } -public func ==(lhs: NSNumber, rhs: NSNumber) -> Bool { +func ==(lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): return false case (true, false): return false default: - return lhs.compare(rhs) == NSComparisonResult.OrderedSame + return lhs.compare(rhs) == .orderedSame } } -public func !=(lhs: NSNumber, rhs: NSNumber) -> Bool { +func !=(lhs: NSNumber, rhs: NSNumber) -> Bool { return !(lhs == rhs) } -public func <(lhs: NSNumber, rhs: NSNumber) -> Bool { +func <(lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): @@ -1302,11 +1252,11 @@ public func <(lhs: NSNumber, rhs: NSNumber) -> Bool { case (true, false): return false default: - return lhs.compare(rhs) == NSComparisonResult.OrderedAscending + return lhs.compare(rhs) == .orderedAscending } } -public func >(lhs: NSNumber, rhs: NSNumber) -> Bool { +func >(lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): @@ -1314,11 +1264,11 @@ public func >(lhs: NSNumber, rhs: NSNumber) -> Bool { case (true, false): return false default: - return lhs.compare(rhs) == NSComparisonResult.OrderedDescending + return lhs.compare(rhs) == ComparisonResult.orderedDescending } } -public func <=(lhs: NSNumber, rhs: NSNumber) -> Bool { +func <=(lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): @@ -1326,11 +1276,11 @@ public func <=(lhs: NSNumber, rhs: NSNumber) -> Bool { case (true, false): return false default: - return lhs.compare(rhs) != NSComparisonResult.OrderedDescending + return lhs.compare(rhs) != .orderedDescending } } -public func >=(lhs: NSNumber, rhs: NSNumber) -> Bool { +func >=(lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): @@ -1338,6 +1288,6 @@ public func >=(lhs: NSNumber, rhs: NSNumber) -> Bool { case (true, false): return false default: - return lhs.compare(rhs) != NSComparisonResult.OrderedAscending + return lhs.compare(rhs) != .orderedAscending } } diff --git a/README.md b/README.md index 5c94eb3..4676995 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This open source library can be leveraged by Lotame clients to collect data from ## Requirements -LotameDMP requires Xcode 7 and at least iOS 8.0. It will work with swift or Objective-C. +LotameDMP requires Xcode 8 and at least iOS 10.0. It will work with swift or Objective-C. ## Example @@ -15,7 +15,7 @@ To run the example project, clone the repo, and run `pod install` from the Examp ## Installation -> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).** +> **Embedded frameworks require a minimum deployment target of iOS 10 or OS X Sierra (10.12).** ### CocoaPods @@ -33,7 +33,7 @@ To integrate LotameDMP into your Xcode project using CocoaPods, specify it in yo source 'https://github.com/CocoaPods/Specs.git' use_frameworks! -pod 'LotameDMP', '~> 3.0' +pod 'LotameDMP', '~> 3.1' ``` Then, run the following command: From 6cb2068511211a579bd676e9c724ae21038b15c2 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 28 Feb 2017 17:08:35 -0500 Subject: [PATCH 02/20] Downgrading minimum iOS target to 9.0 Updating Alamofire version. --- Example/LotameDMP.xcodeproj/project.pbxproj | 4 +- Example/Podfile.lock | 6 +- Example/Pods/Alamofire/README.md | 172 +- Example/Pods/Alamofire/Source/AFError.swift | 10 + Example/Pods/Alamofire/Source/Alamofire.swift | 9 + .../Source/DispatchQueue+Alamofire.swift | 6 - .../Alamofire/Source/MultipartFormData.swift | 3 +- .../Source/NetworkReachabilityManager.swift | 28 +- .../Alamofire/Source/ParameterEncoding.swift | 62 +- Example/Pods/Alamofire/Source/Request.swift | 101 +- Example/Pods/Alamofire/Source/Response.swift | 181 +- .../Source/ResponseSerialization.swift | 46 +- Example/Pods/Alamofire/Source/Result.swift | 101 + .../Alamofire/Source/ServerTrustPolicy.swift | 14 + .../Alamofire/Source/SessionDelegate.swift | 82 +- .../Alamofire/Source/SessionManager.swift | 179 +- .../Pods/Alamofire/Source/TaskDelegate.swift | 46 +- .../Local Podspecs/LotameDMP.podspec.json | 2 +- Example/Pods/Manifest.lock | 6 +- .../Sources/JSON/OHHTTPStubsResponse+JSON.h | 4 +- .../Sources/JSON/OHHTTPStubsResponse+JSON.m | 2 +- .../NSURLRequest+HTTPBodyTesting.h | 48 + .../NSURLRequest+HTTPBodyTesting.m | 86 + .../OHHTTPStubs+NSURLSessionConfiguration.m | 38 +- .../NSURLSession/OHHTTPStubsMethodSwizzling.h | 51 + .../NSURLSession/OHHTTPStubsMethodSwizzling.m | 47 + .../OHHTTPStubs/Sources/OHHTTPStubs.h | 62 +- .../OHHTTPStubs/Sources/OHHTTPStubs.m | 226 ++- .../OHHTTPStubs/Sources/OHHTTPStubsResponse.h | 38 +- .../OHHTTPStubs/Sources/OHHTTPStubsResponse.m | 54 +- .../Sources/OHPathHelpers/OHPathHelpers.h | 5 +- .../Sources/OHPathHelpers/OHPathHelpers.m | 2 +- Example/Pods/OHHTTPStubs/README.md | 133 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 1685 +++++++++++------ .../Alamofire-iOS10.0-dummy.m | 5 + .../Alamofire-iOS10.0-prefix.pch | 12 + .../Alamofire-iOS10.0-umbrella.h} | 8 + .../Alamofire-iOS10.0.modulemap | 6 + .../Alamofire-iOS10.0.xcconfig | 10 + .../Info.plist | 0 .../Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m | 5 + .../Alamofire-iOS9.0-prefix.pch | 12 + .../Alamofire-iOS9.0-umbrella.h | 16 + .../Alamofire-iOS9.0.modulemap} | 2 +- .../Alamofire-iOS9.0.xcconfig} | 3 +- .../Alamofire-iOS9.0/Info.plist | 26 + .../Alamofire/Alamofire-dummy.m | 5 - .../Alamofire/Alamofire-prefix.pch | 4 - .../Info.plist | 0 .../LotameDMP-iOS10.0-dummy.m | 5 + .../LotameDMP-iOS10.0-prefix.pch | 12 + .../LotameDMP-iOS10.0-umbrella.h} | 8 + .../LotameDMP-iOS10.0.modulemap | 6 + .../LotameDMP-iOS10.0.xcconfig | 12 + .../ResourceBundle-LotameDMP-Info.plist | 0 .../LotameDMP-iOS9.0/Info.plist | 26 + .../LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m | 5 + .../LotameDMP-iOS9.0-prefix.pch | 12 + .../LotameDMP-iOS9.0-umbrella.h | 16 + .../LotameDMP-iOS9.0.modulemap} | 2 +- .../LotameDMP-iOS9.0.xcconfig} | 5 +- .../ResourceBundle-LotameDMP-Info.plist | 24 + .../LotameDMP/LotameDMP-dummy.m | 5 - .../LotameDMP/LotameDMP-prefix.pch | 4 - .../OHHTTPStubs/OHHTTPStubs-prefix.pch | 8 + .../OHHTTPStubs/OHHTTPStubs-umbrella.h | 10 + .../OHHTTPStubs/OHHTTPStubs.xcconfig | 1 + .../Pods-LotameDMP_Example-frameworks.sh | 20 +- .../Pods-LotameDMP_Example-resources.sh | 3 + .../Pods-LotameDMP_Example-umbrella.h | 8 + .../Pods-LotameDMP_Example.debug.xcconfig | 5 +- .../Pods-LotameDMP_Example.release.xcconfig | 5 +- .../Pods-LotameDMP_Tests-frameworks.sh | 20 +- .../Pods-LotameDMP_Tests-resources.sh | 3 + .../Pods-LotameDMP_Tests-umbrella.h | 8 + .../Pods-LotameDMP_Tests.debug.xcconfig | 5 +- .../Pods-LotameDMP_Tests.release.xcconfig | 5 +- LotameDMP.podspec | 2 +- README.md | 4 +- 79 files changed, 2858 insertions(+), 1044 deletions(-) create mode 100644 Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h create mode 100644 Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m create mode 100644 Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h create mode 100644 Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m create mode 100644 Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-dummy.m create mode 100644 Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch rename Example/Pods/Target Support Files/{Alamofire/Alamofire-umbrella.h => Alamofire-iOS10.0/Alamofire-iOS10.0-umbrella.h} (52%) create mode 100644 Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap create mode 100644 Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.xcconfig rename Example/Pods/Target Support Files/{Alamofire => Alamofire-iOS10.0}/Info.plist (100%) create mode 100644 Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m create mode 100644 Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch create mode 100644 Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h rename Example/Pods/Target Support Files/{Alamofire/Alamofire.modulemap => Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap} (58%) rename Example/Pods/Target Support Files/{Alamofire/Alamofire.xcconfig => Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig} (90%) create mode 100644 Example/Pods/Target Support Files/Alamofire-iOS9.0/Info.plist delete mode 100644 Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m delete mode 100644 Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch rename Example/Pods/Target Support Files/{LotameDMP => LotameDMP-iOS10.0}/Info.plist (100%) create mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-dummy.m create mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch rename Example/Pods/Target Support Files/{LotameDMP/LotameDMP-umbrella.h => LotameDMP-iOS10.0/LotameDMP-iOS10.0-umbrella.h} (52%) create mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap create mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.xcconfig rename Example/Pods/Target Support Files/{LotameDMP => LotameDMP-iOS10.0}/ResourceBundle-LotameDMP-Info.plist (100%) create mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS9.0/Info.plist create mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m create mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch create mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h rename Example/Pods/Target Support Files/{LotameDMP/LotameDMP.modulemap => LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap} (58%) rename Example/Pods/Target Support Files/{LotameDMP/LotameDMP.xcconfig => LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig} (89%) create mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist delete mode 100644 Example/Pods/Target Support Files/LotameDMP/LotameDMP-dummy.m delete mode 100644 Example/Pods/Target Support Files/LotameDMP/LotameDMP-prefix.pch diff --git a/Example/LotameDMP.xcodeproj/project.pbxproj b/Example/LotameDMP.xcodeproj/project.pbxproj index 33e1063..c9849c8 100644 --- a/Example/LotameDMP.xcodeproj/project.pbxproj +++ b/Example/LotameDMP.xcodeproj/project.pbxproj @@ -499,7 +499,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = LotameDMP/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -515,7 +515,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = LotameDMP/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 47ddcf1..eeab474 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -22,13 +22,13 @@ DEPENDENCIES: EXTERNAL SOURCES: LotameDMP: - :path: ../ + :path: "../" SPEC CHECKSUMS: Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 - LotameDMP: 0ad1e60d8736730f1cb5b06332189754d021da02 + LotameDMP: c4a0065c9035760173635cd1ce2afe5dcfbf4fd3 OHHTTPStubs: 0aec5755528693a165bd616cb79f69387de306a8 PODFILE CHECKSUM: 5e055f3d87d9e826bbffdaa946dd6844c802fc9c -COCOAPODS: 1.1.1 +COCOAPODS: 1.2.0 diff --git a/Example/Pods/Alamofire/README.md b/Example/Pods/Alamofire/README.md index bfaed03..12ea4c7 100644 --- a/Example/Pods/Alamofire/README.md +++ b/Example/Pods/Alamofire/README.md @@ -5,6 +5,7 @@ [![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) [![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) Alamofire is an HTTP networking library written in Swift. @@ -55,8 +56,8 @@ In order to keep Alamofire focused specifically on core networking implementatio ## Requirements -- iOS 9.0+ / macOS 10.11+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 8.0+ +- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ +- Xcode 8.1+ - Swift 3.0+ ## Migration Guides @@ -93,7 +94,7 @@ platform :ios, '10.0' use_frameworks! target '' do - pod 'Alamofire', '~> 4.0' + pod 'Alamofire', '~> 4.4' end ``` @@ -117,11 +118,23 @@ $ brew install carthage To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "Alamofire/Alamofire" ~> 4.0 +github "Alamofire/Alamofire" ~> 4.4 ``` Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. +### Swift Package Manager + +The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms. + +Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. + +```swift +dependencies: [ + .Package(url: "https://github.com/Alamofire/Alamofire.git", majorVersion: 4) +] +``` + ### Manually If you prefer not to use either of the aforementioned dependency managers, you can integrate Alamofire into your project manually. @@ -130,13 +143,13 @@ If you prefer not to use either of the aforementioned dependency managers, you c - 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 + ```bash $ git init ``` - Add Alamofire as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command: -```bash + ```bash $ git submodule add https://github.com/Alamofire/Alamofire.git ``` @@ -158,7 +171,7 @@ $ git submodule add https://github.com/Alamofire/Alamofire.git - And that's it! -> The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. + > The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. --- @@ -199,7 +212,7 @@ Alamofire contains five different response handlers by default including: // Response Handler - Unserialized Response func response( queue: DispatchQueue?, - completionHandler: @escaping (DefaultDownloadResponse) -> Void) + completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self // Response Data Handler - Serialized into Data @@ -240,7 +253,7 @@ The `response` handler does NOT evaluate any of the response data. It merely for Alamofire.request("https://httpbin.org/get").response { response in print("Request: \(response.request)") print("Response: \(response.response)") - print("Error: \(response.data)") + print("Error: \(response.error)") if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) { print("Data: \(utf8Text)") @@ -331,7 +344,7 @@ By default, Alamofire treats any completed request to be successful, regardless Alamofire.request("https://httpbin.org/get") .validate(statusCode: 200..<300) .validate(contentType: ["application/json"]) - .response { response in + .responseData { response in switch response.result { case .success: print("Validation Successful") @@ -360,7 +373,7 @@ Alamofire.request("https://httpbin.org/get").validate().responseJSON { response Response Caching is handled on the system framework level by [`URLCache`](https://developer.apple.com/reference/foundation/urlcache). It provides a composite in-memory and on-disk cache and lets you manipulate the sizes of both the in-memory and on-disk portions. -> By default, Alamofire leverages the shared `URLCache`. In order to customize it, see the [Session Manager Configurations](#session-manager-configurations) section. +> By default, Alamofire leverages the shared `URLCache`. In order to customize it, see the [Session Manager Configurations](#session-manager) section. ### HTTP Methods @@ -433,9 +446,9 @@ let parameters: Parameters = [ ] // All three of these calls are equivalent -Alamofire.request("https://httpbin.org/post", parameters: parameters) -Alamofire.request("https://httpbin.org/post", parameters: parameters, encoding: URLEncoding.default) -Alamofire.request("https://httpbin.org/post", parameters: parameters, encoding: URLEncoding.httpBody) +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters) +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: URLEncoding.default) +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: URLEncoding.httpBody) // HTTP body: foo=bar&baz[]=a&baz[]=1&qux[x]=1&qux[y]=2&qux[z]=3 ``` @@ -520,7 +533,7 @@ Alamofire.request("https://httpbin.org/headers", headers: headers).responseJSON } ``` -> For HTTP headers that do not change, it is recommended to set them on the `URLSessionConfiguration` so they are automatically applied to any `URLSessionTask` created by the underlying `URLSession`. For more information, see the [Session Manager Configurations](#session-manager-configurations) section. +> For HTTP headers that do not change, it is recommended to set them on the `URLSessionConfiguration` so they are automatically applied to any `URLSessionTask` created by the underlying `URLSession`. For more information, see the [Session Manager Configurations](#session-manager) section. The default Alamofire `SessionManager` provides a default set of headers for every `Request`. These include: @@ -528,7 +541,7 @@ The default Alamofire `SessionManager` provides a default set of headers for eve - `Accept-Language`, which defaults to up to the top 6 preferred languages on the system, formatted like `en;q=1.0`, per [RFC 7231 §5.3.5](https://tools.ietf.org/html/rfc7231#section-5.3.5). - `User-Agent`, which contains versioning information about the current app. For example: `iOS Example/1.0 (com.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0`, per [RFC 7231 §5.5.3](https://tools.ietf.org/html/rfc7231#section-5.5.3). -If you need to customize these headers, a custom `URLSessionManagerConfiguration` should be created, the `defaultHTTPHeaders` property updated and the configuration applied to a new `SessionManager` instance. +If you need to customize these headers, a custom `URLSessionConfiguration` should be created, the `defaultHTTPHeaders` property updated and the configuration applied to a new `SessionManager` instance. ### Authentication @@ -595,6 +608,8 @@ Alamofire.request("https://httpbin.org/basic-auth/\(user)/\(password)") Requests made in Alamofire that fetch data from a server can download the data in-memory or on-disk. The `Alamofire.request` APIs used in all the examples so far always downloads the server data in-memory. This is great for smaller payloads because it's more efficient, but really bad for larger payloads because the download could run your entire application out-of-memory. Because of this, you can also use the `Alamofire.download` APIs to download the server data to a temporary file on-disk. +> This will only work on `macOS` as is. Other platforms don't allow access to the filesystem outside of your app's sandbox. To download files on other platforms, see the [Download File Destination](#download-file-destination) section. + ```swift Alamofire.download("https://httpbin.org/image/png").responseData { response in if let data = response.result.value { @@ -603,7 +618,7 @@ Alamofire.download("https://httpbin.org/image/png").responseData { response in } ``` -> The `Alamofire.download` APIs should also be used if you need to download data while your app is in the background. For more information, please see the [Session Manager Configurations](#session-manager-configurations) section. +> The `Alamofire.download` APIs should also be used if you need to download data while your app is in the background. For more information, please see the [Session Manager Configurations](#session-manager) section. #### Download File Destination @@ -623,7 +638,7 @@ let destination: DownloadRequest.DownloadFileDestination = { _, _ in Alamofire.download(urlString, to: destination).response { response in print(response) - if response.result.isSuccess, let imagePath = response.destinationURL?.path { + if response.error == nil, let imagePath = response.destinationURL?.path { let image = UIImage(contentsOfFile: imagePath) } } @@ -672,6 +687,8 @@ Alamofire.download("https://httpbin.org/image/png") If a `DownloadRequest` is cancelled or interrupted, the underlying URL session may generate resume data for the active `DownloadRequest`. If this happens, the resume data can be re-used to restart the `DownloadRequest` where it left off. The resume data can be accessed through the download response, then reused when trying to restart the request. +> **IMPORTANT:** On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the data is written incorrectly and will always fail to resume the download. For more information about the bug and possible workarounds, please see this Stack Overflow [post](http://stackoverflow.com/a/39347461/1342462). + ```swift class ImageRequestor { private var resumeData: Data? @@ -711,7 +728,7 @@ class ImageRequestor { When sending relatively small amounts of data to a server using JSON or URL encoded parameters, the `Alamofire.request` APIs are usually sufficient. If you need to send much larger amounts of data from a file URL or an `InputStream`, then the `Alamofire.upload` APIs are what you want to use. -> The `Alamofire.upload` APIs should also be used if you need to upload data while your app is in the background. For more information, please see the [Session Manager Configurations](#session-manager-configurations) section. +> The `Alamofire.upload` APIs should also be used if you need to upload data while your app is in the background. For more information, please see the [Session Manager Configurations](#session-manager) section. #### Uploading Data @@ -897,7 +914,7 @@ let sessionManager = Alamofire.SessionManager(configuration: configuration) #### Modifying the Session Configuration ```swift -var defaultHeaders = Alamofire.SessionManager.default.defaultHTTPHeaders +var defaultHeaders = Alamofire.SessionManager.defaultHTTPHeaders defaultHeaders["DNT"] = "1 (Do Not Track Enabled)" let configuration = URLSessionConfiguration.default @@ -1008,8 +1025,8 @@ Alamofire.request(urlString, method: .post) let url = URL(string: urlString)! Alamofire.request(url, method: .post) -let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: true) -Alamofire.request(.post, URLComponents) +let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: true)! +Alamofire.request(urlComponents, method: .post) ``` Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLConvertible` as a convenient way to map domain-specific models to server resources. @@ -1086,7 +1103,7 @@ enum Router: URLRequestConvertible { ``` ```swift -Alamofire.request(Router.search(query: "foo bar", page: 1)) // ?q=foo%20bar&offset=50 +Alamofire.request(Router.search(query: "foo bar", page: 1)) // https://example.com/search?q=foo%20bar&offset=50 ``` ##### CRUD & Authorization @@ -1151,7 +1168,7 @@ enum Router: URLRequestConvertible { ``` ```swift -Alamofire.request(Router.readUser("mattt")) // GET /users/mattt +Alamofire.request(Router.readUser("mattt")) // GET https://example.com/users/mattt ``` ### Adapting and Retrying Requests @@ -1175,7 +1192,7 @@ class AccessTokenAdapter: RequestAdapter { func adapt(_ urlRequest: URLRequest) throws -> URLRequest { var urlRequest = urlRequest - if urlRequest.urlString.hasPrefix("https://httpbin.org") { + if let urlString = urlRequest.url?.absoluteString, urlString.hasPrefix("https://httpbin.org") { urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") } @@ -1232,7 +1249,7 @@ class OAuth2Handler: RequestAdapter, RequestRetrier { // MARK: - RequestAdapter func adapt(_ urlRequest: URLRequest) throws -> URLRequest { - if let url = urlRequest.url, url.urlString.hasPrefix(baseURLString) { + if let urlString = urlRequest.url?.absoluteString, urlString.hasPrefix(baseURLString) { var urlRequest = urlRequest urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") return urlRequest @@ -1246,7 +1263,7 @@ class OAuth2Handler: RequestAdapter, RequestRetrier { func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) { lock.lock() ; defer { lock.unlock() } - if let response = request.task.response as? HTTPURLResponse, response.statusCode == 401 { + if let response = request.task?.response as? HTTPURLResponse, response.statusCode == 401 { requestsToRetry.append(completion) if !isRefreshing { @@ -1289,8 +1306,12 @@ class OAuth2Handler: RequestAdapter, RequestRetrier { .responseJSON { [weak self] response in guard let strongSelf = self else { return } - if let json = response.result.value as? [String: String] { - completion(true, json["access_token"], json["refresh_token"]) + if + let json = response.result.value as? [String: Any], + let accessToken = json["access_token"] as? String, + let refreshToken = json["refresh_token"] as? String + { + completion(true, accessToken, refreshToken) } else { completion(false, nil, nil) } @@ -1332,6 +1353,94 @@ Another important note is that this authentication system could be shared betwee ### Custom Response Serialization +Alamofire provides built-in response serialization for data, strings, JSON, and property lists: + +```swift +Alamofire.request(...).responseData { (resp: DataResponse) in ... } +Alamofire.request(...).responseString { (resp: DataResponse) in ... } +Alamofire.request(...).responseJSON { (resp: DataResponse) in ... } +Alamofire.request(...).responsePropertyList { resp: DataResponse) in ... } +``` + +Those responses wrap deserialized *values* (Data, String, Any) or *errors* (network, validation errors), as well as *meta-data* (URL request, HTTP headers, status code, [metrics](#statistical-metrics), ...). + +You have several ways to customize all of those response elements: + +- [Response Mapping](#response-mapping) +- [Handling Errors](#handling-errors) +- [Creating a Custom Response Serializer](#creating-a-custom-response-serializer) +- [Generic Response Object Serialization](#generic-response-object-serialization) + +#### Response Mapping + +Response mapping is the simplest way to produce customized responses. It transforms the value of a response, while preserving eventual errors and meta-data. For example, you can turn a json response `DataResponse` into a response that holds an application model, such as `DataResponse`. You perform response mapping with the `DataResponse.map` method: + +```swift +Alamofire.request("https://example.com/users/mattt").responseJSON { (response: DataResponse) in + let userResponse = response.map { json in + // We assume an existing User(json: Any) initializer + return User(json: json) + } + + // Process userResponse, of type DataResponse: + if let user = userResponse.value { + print("User: { username: \(user.username), name: \(user.name) }") + } +} +``` + +When the transformation may throw an error, use `flatMap` instead: + +```swift +Alamofire.request("https://example.com/users/mattt").responseJSON { response in + let userResponse = response.flatMap { json in + try User(json: json) + } +} +``` + +Response mapping is a good fit for your custom completion handlers: + +```swift +@discardableResult +func loadUser(completionHandler: @escaping (DataResponse) -> Void) -> Alamofire.DataRequest { + return Alamofire.request("https://example.com/users/mattt").responseJSON { response in + let userResponse = response.flatMap { json in + try User(json: json) + } + + completionHandler(userResponse) + } +} + +loadUser { response in + if let user = userResponse.value { + print("User: { username: \(user.username), name: \(user.name) }") + } +} +``` + +When the map/flatMap closure may process a big amount of data, make sure you execute it outside of the main thread: + +```swift +@discardableResult +func loadUser(completionHandler: @escaping (DataResponse) -> Void) -> Alamofire.DataRequest { + let utilityQueue = DispatchQueue.global(qos: .utility) + + return Alamofire.request("https://example.com/users/mattt").responseJSON(queue: utilityQueue) { response in + let userResponse = response.flatMap { json in + try User(json: json) + } + + DispatchQueue.main.async { + completionHandler(userResponse) + } + } +} +``` + +`map` and `flatMap` are also available for [download responses](#downloading-data-to-a-file). + #### Handling Errors Before implementing custom response serializers or object serialization methods, it's important to consider how to handle any errors that may occur. There are two basic options: passing existing errors along unmodified, to be dealt with at response time; or, wrapping all errors in an `Error` type specific to your app. @@ -1558,7 +1667,7 @@ The `ServerTrustPolicy` enumeration evaluates the server trust generally provide ```swift let serverTrustPolicy = ServerTrustPolicy.pinCertificates( - certificates: ServerTrustPolicy.certificatesInBundle(), + certificates: ServerTrustPolicy.certificates(), validateCertificateChain: true, validateHost: true ) @@ -1579,7 +1688,7 @@ The `ServerTrustPolicyManager` is responsible for storing an internal mapping of ```swift let serverTrustPolicies: [String: ServerTrustPolicy] = [ "test.example.com": .pinCertificates( - certificates: ServerTrustPolicy.certificatesInBundle(), + certificates: ServerTrustPolicy.certificates(), validateCertificateChain: true, validateHost: true ), @@ -1680,6 +1789,7 @@ manager?.startListening() ``` > Make sure to remember to retain the `manager` in the above example, or no status changes will be reported. +> Also, do not include the scheme in the `host` string or reachability won't function correctly. There are some important things to remember when using network reachability to determine what to do next. diff --git a/Example/Pods/Alamofire/Source/AFError.swift b/Example/Pods/Alamofire/Source/AFError.swift index 82e8a25..f047695 100644 --- a/Example/Pods/Alamofire/Source/AFError.swift +++ b/Example/Pods/Alamofire/Source/AFError.swift @@ -132,6 +132,16 @@ public enum AFError: Error { case responseSerializationFailed(reason: ResponseSerializationFailureReason) } +// MARK: - Adapt Error + +struct AdaptError: Error { + let error: Error +} + +extension Error { + var underlyingAdaptError: Error? { return (self as? AdaptError)?.error } +} + // MARK: - Error Booleans extension AFError { diff --git a/Example/Pods/Alamofire/Source/Alamofire.swift b/Example/Pods/Alamofire/Source/Alamofire.swift index 7566587..86d54d8 100644 --- a/Example/Pods/Alamofire/Source/Alamofire.swift +++ b/Example/Pods/Alamofire/Source/Alamofire.swift @@ -222,6 +222,13 @@ public func download( /// If `destination` is not specified, the contents will remain in the temporary location determined by the /// underlying URL session. /// +/// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken +/// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the +/// data is written incorrectly and will always fail to resume the download. For more information about the bug and +/// possible workarounds, please refer to the following Stack Overflow post: +/// +/// - http://stackoverflow.com/a/39347461/1342462 +/// /// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` /// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for additional /// information. @@ -435,6 +442,7 @@ public func upload( /// /// - returns: The created `StreamRequest`. @discardableResult +@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) public func stream(withHostName hostName: String, port: Int) -> StreamRequest { return SessionManager.default.stream(withHostName: hostName, port: port) } @@ -449,6 +457,7 @@ public func stream(withHostName hostName: String, port: Int) -> StreamRequest { /// /// - returns: The created `StreamRequest`. @discardableResult +@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) public func stream(with netService: NetService) -> StreamRequest { return SessionManager.default.stream(with: netService) } diff --git a/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift index 5019d0d..78e214e 100644 --- a/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +++ b/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift @@ -34,10 +34,4 @@ extension DispatchQueue { func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { asyncAfter(deadline: .now() + delay, execute: closure) } - - func syncResult(_ closure: () -> T) -> T { - var result: T! - sync { result = closure() } - return result - } } diff --git a/Example/Pods/Alamofire/Source/MultipartFormData.swift b/Example/Pods/Alamofire/Source/MultipartFormData.swift index 1ce4d19..6d0d556 100644 --- a/Example/Pods/Alamofire/Source/MultipartFormData.swift +++ b/Example/Pods/Alamofire/Source/MultipartFormData.swift @@ -257,8 +257,7 @@ open class MultipartFormData { var isDirectory: ObjCBool = false let path = fileURL.path - guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else - { + guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) return } diff --git a/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift index c06a60e..888818d 100644 --- a/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -33,17 +33,7 @@ import SystemConfiguration /// Reachability can be used to determine background information about why a network operation failed, or to retry /// network requests when a connection is established. It should not be used to prevent a user from initiating a network /// request, as it's possible that an initial request may be required to establish reachability. -open class NetworkReachabilityManager { - /** - Defines the various states of network reachability. - - - Unknown: It is unknown whether the network is reachable. - - NotReachable: The network is not reachable. - - ReachableOnWWAN: The network is reachable over the WWAN connection. - - ReachableOnWiFi: The network is reachable over the WiFi connection. - */ - - +public class NetworkReachabilityManager { /// Defines the various states of network reachability. /// /// - unknown: It is unknown whether the network is reachable. @@ -71,25 +61,25 @@ open class NetworkReachabilityManager { // MARK: - Properties /// Whether the network is currently reachable. - open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } + public var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } /// Whether the network is currently reachable over the WWAN interface. - open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } + public var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } /// Whether the network is currently reachable over Ethernet or WiFi interface. - open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } + public var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } /// The current network reachability status. - open var networkReachabilityStatus: NetworkReachabilityStatus { + public var networkReachabilityStatus: NetworkReachabilityStatus { guard let flags = self.flags else { return .unknown } return networkReachabilityStatusForFlags(flags) } /// The dispatch queue to execute the `listener` closure on. - open var listenerQueue: DispatchQueue = DispatchQueue.main + public var listenerQueue: DispatchQueue = DispatchQueue.main /// A closure executed when the network reachability status changes. - open var listener: Listener? + public var listener: Listener? private var flags: SCNetworkReachabilityFlags? { var flags = SCNetworkReachabilityFlags() @@ -151,7 +141,7 @@ open class NetworkReachabilityManager { /// /// - returns: `true` if listening was started successfully, `false` otherwise. @discardableResult - open func startListening() -> Bool { + public func startListening() -> Bool { var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) context.info = Unmanaged.passUnretained(self).toOpaque() @@ -175,7 +165,7 @@ open class NetworkReachabilityManager { } /// Stops listening for changes in network reachability status. - open func stopListening() { + public func stopListening() { SCNetworkReachabilitySetCallback(reachability, nil, nil) SCNetworkReachabilitySetDispatchQueue(reachability, nil) } diff --git a/Example/Pods/Alamofire/Source/ParameterEncoding.swift b/Example/Pods/Alamofire/Source/ParameterEncoding.swift index 42b5b2d..242f6a8 100644 --- a/Example/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/Example/Pods/Alamofire/Source/ParameterEncoding.swift @@ -199,7 +199,39 @@ public struct URLEncoding: ParameterEncoding { var allowedCharacterSet = CharacterSet.urlQueryAllowed allowedCharacterSet.remove(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") - return string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? string + var escaped = "" + + //========================================================================================================== + // + // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few + // hundred Chinese characters causes various malloc error crashes. To avoid this issue until iOS 8 is no + // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more + // info, please refer to: + // + // - https://github.com/Alamofire/Alamofire/issues/206 + // + //========================================================================================================== + + if #available(iOS 8.3, *) { + escaped = string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? string + } else { + let batchSize = 50 + var index = string.startIndex + + while index != string.endIndex { + let startIndex = index + let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex + let range = startIndex.. String { @@ -289,6 +321,34 @@ public struct JSONEncoding: ParameterEncoding { return urlRequest } + + /// Creates a URL request by encoding the JSON object and setting the resulting data on the HTTP body. + /// + /// - parameter urlRequest: The request to apply the JSON object to. + /// - parameter jsonObject: The JSON object to apply to the request. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let jsonObject = jsonObject else { return urlRequest } + + do { + let data = try JSONSerialization.data(withJSONObject: jsonObject, options: options) + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = data + } catch { + throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) + } + + return urlRequest + } } // MARK: - diff --git a/Example/Pods/Alamofire/Source/Request.swift b/Example/Pods/Alamofire/Source/Request.swift index 85eb869..7886495 100644 --- a/Example/Pods/Alamofire/Source/Request.swift +++ b/Example/Pods/Alamofire/Source/Request.swift @@ -110,6 +110,9 @@ open class Request { /// The response received from the server, if any. open var response: HTTPURLResponse? { return task?.response as? HTTPURLResponse } + /// The number of times the request has been retried. + open internal(set) var retryCount: UInt = 0 + let originalTask: TaskConvertible? var startTime: CFAbsoluteTime? @@ -351,13 +354,25 @@ open class DataRequest: Request { let urlRequest: URLRequest func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - let urlRequest = try self.urlRequest.adapt(using: adapter) - return queue.syncResult { session.dataTask(with: urlRequest) } + do { + let urlRequest = try self.urlRequest.adapt(using: adapter) + return queue.sync { session.dataTask(with: urlRequest) } + } catch { + throw AdaptError(error: error) + } } } // MARK: Properties + /// The request sent or to be sent to the server. + open override var request: URLRequest? { + if let request = super.request { return request } + if let requestable = originalTask as? Requestable { return requestable.urlRequest } + + return nil + } + /// The progress of fetching the response data from the server for the request. open var progress: Progress { return dataDelegate.progress } @@ -438,22 +453,37 @@ open class DownloadRequest: Request { case resumeData(Data) func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - let task: URLSessionTask + do { + let task: URLSessionTask + + switch self { + case let .request(urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.sync { session.downloadTask(with: urlRequest) } + case let .resumeData(resumeData): + task = queue.sync { session.downloadTask(withResumeData: resumeData) } + } - switch self { - case let .request(urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.syncResult { session.downloadTask(with: urlRequest) } - case let .resumeData(resumeData): - task = queue.syncResult { session.downloadTask(withResumeData: resumeData) } + return task + } catch { + throw AdaptError(error: error) } - - return task } } // MARK: Properties + /// The request sent or to be sent to the server. + open override var request: URLRequest? { + if let request = super.request { return request } + + if let downloadable = originalTask as? Downloadable, case let .request(urlRequest) = downloadable { + return urlRequest + } + + return nil + } + /// The resume data of the underlying download task if available after a failure. open var resumeData: Data? { return downloadDelegate.resumeData } @@ -471,7 +501,7 @@ open class DownloadRequest: Request { NotificationCenter.default.post( name: Notification.Name.Task.DidCancel, object: self, - userInfo: [Notification.Key.Task: task] + userInfo: [Notification.Key.Task: task as Any] ) } @@ -528,26 +558,42 @@ open class UploadRequest: DataRequest { case stream(InputStream, URLRequest) func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - let task: URLSessionTask + do { + let task: URLSessionTask + + switch self { + case let .data(data, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.sync { session.uploadTask(with: urlRequest, from: data) } + case let .file(url, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.sync { session.uploadTask(with: urlRequest, fromFile: url) } + case let .stream(_, urlRequest): + let urlRequest = try urlRequest.adapt(using: adapter) + task = queue.sync { session.uploadTask(withStreamedRequest: urlRequest) } + } - switch self { - case let .data(data, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.syncResult { session.uploadTask(with: urlRequest, from: data) } - case let .file(url, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.syncResult { session.uploadTask(with: urlRequest, fromFile: url) } - case let .stream(_, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.syncResult { session.uploadTask(withStreamedRequest: urlRequest) } + return task + } catch { + throw AdaptError(error: error) } - - return task } } // MARK: Properties + /// The request sent or to be sent to the server. + open override var request: URLRequest? { + if let request = super.request { return request } + + guard let uploadable = originalTask as? Uploadable else { return nil } + + switch uploadable { + case .data(_, let urlRequest), .file(_, let urlRequest), .stream(_, let urlRequest): + return urlRequest + } + } + /// The progress of uploading the payload to the server for the upload request. open var uploadProgress: Progress { return uploadDelegate.uploadProgress } @@ -577,6 +623,7 @@ open class UploadRequest: DataRequest { #if !os(watchOS) /// Specific type of `Request` that manages an underlying `URLSessionStreamTask`. +@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) open class StreamRequest: Request { enum Streamable: TaskConvertible { case stream(hostName: String, port: Int) @@ -587,9 +634,9 @@ open class StreamRequest: Request { switch self { case let .stream(hostName, port): - task = queue.syncResult { session.streamTask(withHostName: hostName, port: port) } + task = queue.sync { session.streamTask(withHostName: hostName, port: port) } case let .netService(netService): - task = queue.syncResult { session.streamTask(with: netService) } + task = queue.sync { session.streamTask(with: netService) } } return task diff --git a/Example/Pods/Alamofire/Source/Response.swift b/Example/Pods/Alamofire/Source/Response.swift index f80779c..5d3b6d2 100644 --- a/Example/Pods/Alamofire/Source/Response.swift +++ b/Example/Pods/Alamofire/Source/Response.swift @@ -38,13 +38,33 @@ public struct DefaultDataResponse { /// The error encountered while executing or validating the request. public let error: Error? + /// The timeline of the complete lifecycle of the request. + public let timeline: Timeline + var _metrics: AnyObject? - init(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) { + /// Creates a `DefaultDataResponse` instance from the specified parameters. + /// + /// - Parameters: + /// - request: The URL request sent to the server. + /// - response: The server's response to the URL request. + /// - data: The data returned by the server. + /// - error: The error encountered while executing or validating the request. + /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. + /// - metrics: The task metrics containing the request / response statistics. `nil` by default. + public init( + request: URLRequest?, + response: HTTPURLResponse?, + data: Data?, + error: Error?, + timeline: Timeline = Timeline(), + metrics: AnyObject? = nil) + { self.request = request self.response = response self.data = data self.error = error + self.timeline = timeline } } @@ -64,9 +84,15 @@ public struct DataResponse { /// The result of response serialization. public let result: Result - /// The timeline of the complete lifecycle of the `Request`. + /// The timeline of the complete lifecycle of the request. public let timeline: Timeline + /// Returns the associated value of the result if it is a success, `nil` otherwise. + public var value: Value? { return result.value } + + /// Returns the associated error value if the result if it is a failure, `nil` otherwise. + public var error: Error? { return result.error } + var _metrics: AnyObject? /// Creates a `DataResponse` instance with the specified parameters derived from response serialization. @@ -107,7 +133,7 @@ extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { public var debugDescription: String { var output: [String] = [] - output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") + output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") output.append("[Data]: \(data?.count ?? 0) bytes") output.append("[Result]: \(result.debugDescription)") @@ -119,6 +145,64 @@ extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { // MARK: - +extension DataResponse { + /// Evaluates the specified closure when the result of this `DataResponse` is a success, passing the unwrapped + /// result value as a parameter. + /// + /// Use the `map` method with a closure that does not throw. For example: + /// + /// let possibleData: DataResponse = ... + /// let possibleInt = possibleData.map { $0.count } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's + /// result is a failure, returns a response wrapping the same failure. + public func map(_ transform: (Value) -> T) -> DataResponse { + var response = DataResponse( + request: request, + response: self.response, + data: data, + result: result.map(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result + /// value as a parameter. + /// + /// Use the `flatMap` method with a closure that may throw an error. For example: + /// + /// let possibleData: DataResponse = ... + /// let possibleObject = possibleData.flatMap { + /// try JSONSerialization.jsonObject(with: $0) + /// } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's + /// result is a failure, returns the same failure. + public func flatMap(_ transform: (Value) throws -> T) -> DataResponse { + var response = DataResponse( + request: request, + response: self.response, + data: data, + result: result.flatMap(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } +} + +// MARK: - + /// Used to store all data associated with an non-serialized response of a download request. public struct DefaultDownloadResponse { /// The URL request sent to the server. @@ -139,15 +223,31 @@ public struct DefaultDownloadResponse { /// The error encountered while executing or validating the request. public let error: Error? + /// The timeline of the complete lifecycle of the request. + public let timeline: Timeline + var _metrics: AnyObject? - init( + /// Creates a `DefaultDownloadResponse` instance from the specified parameters. + /// + /// - Parameters: + /// - request: The URL request sent to the server. + /// - response: The server's response to the URL request. + /// - temporaryURL: The temporary destination URL of the data returned from the server. + /// - destinationURL: The final destination URL of the data returned from the server if it was moved. + /// - resumeData: The resume data generated if the request was cancelled. + /// - error: The error encountered while executing or validating the request. + /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. + /// - metrics: The task metrics containing the request / response statistics. `nil` by default. + public init( request: URLRequest?, response: HTTPURLResponse?, temporaryURL: URL?, destinationURL: URL?, resumeData: Data?, - error: Error?) + error: Error?, + timeline: Timeline = Timeline(), + metrics: AnyObject? = nil) { self.request = request self.response = response @@ -155,6 +255,7 @@ public struct DefaultDownloadResponse { self.destinationURL = destinationURL self.resumeData = resumeData self.error = error + self.timeline = timeline } } @@ -183,6 +284,12 @@ public struct DownloadResponse { /// The timeline of the complete lifecycle of the request. public let timeline: Timeline + /// Returns the associated value of the result if it is a success, `nil` otherwise. + public var value: Value? { return result.value } + + /// Returns the associated error value if the result if it is a failure, `nil` otherwise. + public var error: Error? { return result.error } + var _metrics: AnyObject? /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. @@ -230,7 +337,7 @@ extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertibl public var debugDescription: String { var output: [String] = [] - output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") + output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") output.append("[TemporaryURL]: \(temporaryURL?.path ?? "nil")") output.append("[DestinationURL]: \(destinationURL?.path ?? "nil")") @@ -244,6 +351,68 @@ extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertibl // MARK: - +extension DownloadResponse { + /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped + /// result value as a parameter. + /// + /// Use the `map` method with a closure that does not throw. For example: + /// + /// let possibleData: DownloadResponse = ... + /// let possibleInt = possibleData.map { $0.count } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's + /// result is a failure, returns a response wrapping the same failure. + public func map(_ transform: (Value) -> T) -> DownloadResponse { + var response = DownloadResponse( + request: request, + response: self.response, + temporaryURL: temporaryURL, + destinationURL: destinationURL, + resumeData: resumeData, + result: result.map(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped + /// result value as a parameter. + /// + /// Use the `flatMap` method with a closure that may throw an error. For example: + /// + /// let possibleData: DownloadResponse = ... + /// let possibleObject = possibleData.flatMap { + /// try JSONSerialization.jsonObject(with: $0) + /// } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this + /// instance's result is a failure, returns the same failure. + public func flatMap(_ transform: (Value) throws -> T) -> DownloadResponse { + var response = DownloadResponse( + request: request, + response: self.response, + temporaryURL: temporaryURL, + destinationURL: destinationURL, + resumeData: resumeData, + result: result.flatMap(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } +} + +// MARK: - + protocol Response { /// The task metrics containing the request / response statistics. var _metrics: AnyObject? { get set } diff --git a/Example/Pods/Alamofire/Source/ResponseSerialization.swift b/Example/Pods/Alamofire/Source/ResponseSerialization.swift index 0bbb373..47780fd 100644 --- a/Example/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/Example/Pods/Alamofire/Source/ResponseSerialization.swift @@ -84,6 +84,22 @@ public struct DownloadResponseSerializer: DownloadResponseSerializerProto } } +// MARK: - Timeline + +extension Request { + var timeline: Timeline { + let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() + let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime + + return Timeline( + requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), + initialResponseTime: initialResponseTime, + requestCompletedTime: requestCompletedTime, + serializationCompletedTime: CFAbsoluteTimeGetCurrent() + ) + } +} + // MARK: - Default extension DataRequest { @@ -101,7 +117,8 @@ extension DataRequest { request: self.request, response: self.response, data: self.delegate.data, - error: self.delegate.error + error: self.delegate.error, + timeline: self.timeline ) dataResponse.add(self.delegate.metrics) @@ -136,22 +153,12 @@ extension DataRequest { self.delegate.error ) - let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() - let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime - - let timeline = Timeline( - requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), - initialResponseTime: initialResponseTime, - requestCompletedTime: requestCompletedTime, - serializationCompletedTime: CFAbsoluteTimeGetCurrent() - ) - var dataResponse = DataResponse( request: self.request, response: self.response, data: self.delegate.data, result: result, - timeline: timeline + timeline: self.timeline ) dataResponse.add(self.delegate.metrics) @@ -184,7 +191,8 @@ extension DownloadRequest { temporaryURL: self.downloadDelegate.temporaryURL, destinationURL: self.downloadDelegate.destinationURL, resumeData: self.downloadDelegate.resumeData, - error: self.downloadDelegate.error + error: self.downloadDelegate.error, + timeline: self.timeline ) downloadResponse.add(self.delegate.metrics) @@ -219,16 +227,6 @@ extension DownloadRequest { self.downloadDelegate.error ) - let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() - let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime - - let timeline = Timeline( - requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), - initialResponseTime: initialResponseTime, - requestCompletedTime: requestCompletedTime, - serializationCompletedTime: CFAbsoluteTimeGetCurrent() - ) - var downloadResponse = DownloadResponse( request: self.request, response: self.response, @@ -236,7 +234,7 @@ extension DownloadRequest { destinationURL: self.downloadDelegate.destinationURL, resumeData: self.downloadDelegate.resumeData, result: result, - timeline: timeline + timeline: self.timeline ) downloadResponse.add(self.delegate.metrics) diff --git a/Example/Pods/Alamofire/Source/Result.swift b/Example/Pods/Alamofire/Source/Result.swift index 2293308..c13b1fc 100644 --- a/Example/Pods/Alamofire/Source/Result.swift +++ b/Example/Pods/Alamofire/Source/Result.swift @@ -100,3 +100,104 @@ extension Result: CustomDebugStringConvertible { } } } + +// MARK: - Functional APIs + +extension Result { + /// Creates a `Result` instance from the result of a closure. + /// + /// A failure result is created when the closure throws, and a success result is created when the closure + /// succeeds without throwing an error. + /// + /// func someString() throws -> String { ... } + /// + /// let result = Result(value: { + /// return try someString() + /// }) + /// + /// // The type of result is Result + /// + /// The trailing closure syntax is also supported: + /// + /// let result = Result { try someString() } + /// + /// - parameter value: The closure to execute and create the result for. + public init(value: () throws -> Value) { + do { + self = try .success(value()) + } catch { + self = .failure(error) + } + } + + /// Returns the success value, or throws the failure error. + /// + /// let possibleString: Result = .success("success") + /// try print(possibleString.unwrap()) + /// // Prints "success" + /// + /// let noString: Result = .failure(error) + /// try print(noString.unwrap()) + /// // Throws error + public func unwrap() throws -> Value { + switch self { + case .success(let value): + return value + case .failure(let error): + throw error + } + } + + /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. + /// + /// Use the `map` method with a closure that does not throw. For example: + /// + /// let possibleData: Result = .success(Data()) + /// let possibleInt = possibleData.map { $0.count } + /// try print(possibleInt.unwrap()) + /// // Prints "0" + /// + /// let noData: Result = .failure(error) + /// let noInt = noData.map { $0.count } + /// try print(noInt.unwrap()) + /// // Throws error + /// + /// - 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. + public func map(_ transform: (Value) -> T) -> Result { + switch self { + case .success(let value): + return .success(transform(value)) + case .failure(let error): + return .failure(error) + } + } + + /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. + /// + /// Use the `flatMap` method with a closure that may throw an error. For example: + /// + /// let possibleData: Result = .success(Data(...)) + /// let possibleObject = possibleData.flatMap { + /// try JSONSerialization.jsonObject(with: $0) + /// } + /// + /// - parameter transform: A closure that takes the success value of the instance. + /// + /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the + /// same failure. + public func flatMap(_ transform: (Value) throws -> T) -> Result { + switch self { + case .success(let value): + do { + return try .success(transform(value)) + } catch { + return .failure(error) + } + case .failure(let error): + return .failure(error) + } + } +} diff --git a/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift b/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift index 4d5030f..9c0e7c8 100644 --- a/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ b/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -88,6 +88,13 @@ extension URLSession { /// validate the host in production environments to guarantee the validity of the server's /// certificate chain. /// +/// - performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to +/// validate the host provided by the challenge as well as specify the revocation flags for +/// testing for revoked certificates. Apple platforms did not start testing for revoked +/// certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is +/// demonstrated in our TLS tests. Applications are encouraged to always validate the host +/// in production environments to guarantee the validity of the server's certificate chain. +/// /// - pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is /// considered valid if one of the pinned certificates match one of the server certificates. /// By validating both the certificate chain and host, certificate pinning provides a very @@ -107,6 +114,7 @@ extension URLSession { /// - customEvaluation: Uses the associated closure to evaluate the validity of the server trust. public enum ServerTrustPolicy { case performDefaultEvaluation(validateHost: Bool) + case performRevokedEvaluation(validateHost: Bool, revocationFlags: CFOptionFlags) case pinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) case pinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) case disableEvaluation @@ -171,6 +179,12 @@ public enum ServerTrustPolicy { let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) SecTrustSetPolicies(serverTrust, policy) + serverTrustIsValid = trustIsValid(serverTrust) + case let .performRevokedEvaluation(validateHost, revocationFlags): + let defaultPolicy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) + let revokedPolicy = SecPolicyCreateRevocation(revocationFlags) + SecTrustSetPolicies(serverTrust, [defaultPolicy, revokedPolicy] as CFTypeRef) + serverTrustIsValid = trustIsValid(serverTrust) case let .pinCertificates(pinnedCertificates, validateCertificateChain, validateHost): if validateCertificateChain { diff --git a/Example/Pods/Alamofire/Source/SessionDelegate.swift b/Example/Pods/Alamofire/Source/SessionDelegate.swift index 4549731..27ad881 100644 --- a/Example/Pods/Alamofire/Source/SessionDelegate.swift +++ b/Example/Pods/Alamofire/Source/SessionDelegate.swift @@ -108,16 +108,53 @@ open class SessionDelegate: NSObject { #if !os(watchOS) /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:readClosedFor:)`. - open var streamTaskReadClosed: ((URLSession, URLSessionStreamTask) -> Void)? + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open var streamTaskReadClosed: ((URLSession, URLSessionStreamTask) -> Void)? { + get { + return _streamTaskReadClosed as? (URLSession, URLSessionStreamTask) -> Void + } + set { + _streamTaskReadClosed = newValue + } + } /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:writeClosedFor:)`. - open var streamTaskWriteClosed: ((URLSession, URLSessionStreamTask) -> Void)? + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open var streamTaskWriteClosed: ((URLSession, URLSessionStreamTask) -> Void)? { + get { + return _streamTaskWriteClosed as? (URLSession, URLSessionStreamTask) -> Void + } + set { + _streamTaskWriteClosed = newValue + } + } /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:betterRouteDiscoveredFor:)`. - open var streamTaskBetterRouteDiscovered: ((URLSession, URLSessionStreamTask) -> Void)? + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open var streamTaskBetterRouteDiscovered: ((URLSession, URLSessionStreamTask) -> Void)? { + get { + return _streamTaskBetterRouteDiscovered as? (URLSession, URLSessionStreamTask) -> Void + } + set { + _streamTaskBetterRouteDiscovered = newValue + } + } /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:streamTask:didBecome:outputStream:)`. - open var streamTaskDidBecomeInputAndOutputStreams: ((URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void)? + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) + open var streamTaskDidBecomeInputAndOutputStreams: ((URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void)? { + get { + return _streamTaskDidBecomeInputStream as? (URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void + } + set { + _streamTaskDidBecomeInputStream = newValue + } + } + + var _streamTaskReadClosed: Any? + var _streamTaskWriteClosed: Any? + var _streamTaskBetterRouteDiscovered: Any? + var _streamTaskDidBecomeInputStream: Any? #endif @@ -166,17 +203,19 @@ open class SessionDelegate: NSObject { #endif #if !os(watchOS) - switch selector { - case #selector(URLSessionStreamDelegate.urlSession(_:readClosedFor:)): - return streamTaskReadClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:writeClosedFor:)): - return streamTaskWriteClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:betterRouteDiscoveredFor:)): - return streamTaskBetterRouteDiscovered != nil - case #selector(URLSessionStreamDelegate.urlSession(_:streamTask:didBecome:outputStream:)): - return streamTaskDidBecomeInputAndOutputStreams != nil - default: - break + if #available(iOS 9.0, macOS 10.11, tvOS 9.0, *) { + switch selector { + case #selector(URLSessionStreamDelegate.urlSession(_:readClosedFor:)): + return streamTaskReadClosed != nil + case #selector(URLSessionStreamDelegate.urlSession(_:writeClosedFor:)): + return streamTaskWriteClosed != nil + case #selector(URLSessionStreamDelegate.urlSession(_:betterRouteDiscoveredFor:)): + return streamTaskBetterRouteDiscovered != nil + case #selector(URLSessionStreamDelegate.urlSession(_:streamTask:didBecome:outputStream:)): + return streamTaskDidBecomeInputAndOutputStreams != nil + default: + break + } } #endif @@ -399,11 +438,9 @@ extension SessionDelegate: URLSessionTaskDelegate { let completeTask: (URLSession, URLSessionTask, Error?) -> Void = { [weak self] session, task, error in guard let strongSelf = self else { return } - if let taskDidComplete = strongSelf.taskDidComplete { - taskDidComplete(session, task, error) - } else if let delegate = strongSelf[task]?.delegate { - delegate.urlSession(session, task: task, didCompleteWithError: error) - } + strongSelf.taskDidComplete?(session, task, error) + + strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error) NotificationCenter.default.post( name: Notification.Name.Task.DidComplete, @@ -432,10 +469,10 @@ extension SessionDelegate: URLSessionTaskDelegate { /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request /// should be retried. Otherwise, complete the task by notifying the task delegate. if let retrier = retrier, let error = error { - retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, delay in + retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, timeDelay in guard shouldRetry else { completeTask(session, task, error) ; return } - DispatchQueue.utility.after(delay) { [weak self] in + DispatchQueue.utility.after(timeDelay) { [weak self] in guard let strongSelf = self else { return } let retrySucceeded = strongSelf.sessionManager?.retry(request) ?? false @@ -637,6 +674,7 @@ extension SessionDelegate: URLSessionDownloadDelegate { #if !os(watchOS) +@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) extension SessionDelegate: URLSessionStreamDelegate { /// Tells the delegate that the read side of the connection has been closed. /// diff --git a/Example/Pods/Alamofire/Source/SessionManager.swift b/Example/Pods/Alamofire/Source/SessionManager.swift index 1363125..450f750 100644 --- a/Example/Pods/Alamofire/Source/SessionManager.swift +++ b/Example/Pods/Alamofire/Source/SessionManager.swift @@ -231,12 +231,14 @@ open class SessionManager { headers: HTTPHeaders? = nil) -> DataRequest { + var originalRequest: URLRequest? + do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) + originalRequest = try URLRequest(url: url, method: method, headers: headers) + let encodedURLRequest = try encoding.encode(originalRequest!, with: parameters) return request(encodedURLRequest) } catch { - return request(failedWith: error) + return request(originalRequest, failedWith: error) } } @@ -248,9 +250,11 @@ open class SessionManager { /// /// - returns: The created `DataRequest`. open func request(_ urlRequest: URLRequestConvertible) -> DataRequest { + var originalRequest: URLRequest? + do { - let originalRequest = try urlRequest.asURLRequest() - let originalTask = DataRequest.Requestable(urlRequest: originalRequest) + originalRequest = try urlRequest.asURLRequest() + let originalTask = DataRequest.Requestable(urlRequest: originalRequest!) let task = try originalTask.task(session: session, adapter: adapter, queue: queue) let request = DataRequest(session: session, requestTask: .data(originalTask, task)) @@ -261,15 +265,29 @@ open class SessionManager { return request } catch { - return request(failedWith: error) + return request(originalRequest, failedWith: error) } } // MARK: Private - Request Implementation - private func request(failedWith error: Error) -> DataRequest { - let request = DataRequest(session: session, requestTask: .data(nil, nil), error: error) - if startRequestsImmediately { request.resume() } + private func request(_ urlRequest: URLRequest?, failedWith error: Error) -> DataRequest { + var requestTask: Request.RequestTask = .data(nil, nil) + + if let urlRequest = urlRequest { + let originalTask = DataRequest.Requestable(urlRequest: urlRequest) + requestTask = .data(originalTask, nil) + } + + let underlyingError = error.underlyingAdaptError ?? error + let request = DataRequest(session: session, requestTask: requestTask, error: underlyingError) + + if let retrier = retrier, error is AdaptError { + allowRetrier(retrier, toRetry: request, with: underlyingError) + } else { + if startRequestsImmediately { request.resume() } + } + return request } @@ -308,7 +326,7 @@ open class SessionManager { let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) return download(encodedURLRequest, to: destination) } catch { - return download(failedWith: error) + return download(nil, to: destination, failedWith: error) } } @@ -334,7 +352,7 @@ open class SessionManager { let urlRequest = try urlRequest.asURLRequest() return download(.request(urlRequest), to: destination) } catch { - return download(failedWith: error) + return download(nil, to: destination, failedWith: error) } } @@ -348,6 +366,13 @@ open class SessionManager { /// /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. /// + /// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken + /// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the + /// data is written incorrectly and will always fail to resume the download. For more information about the bug and + /// possible workarounds, please refer to the following Stack Overflow post: + /// + /// - http://stackoverflow.com/a/39347461/1342462 + /// /// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` /// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for /// additional information. @@ -372,23 +397,43 @@ open class SessionManager { { do { let task = try downloadable.task(session: session, adapter: adapter, queue: queue) - let request = DownloadRequest(session: session, requestTask: .download(downloadable, task)) + let download = DownloadRequest(session: session, requestTask: .download(downloadable, task)) - request.downloadDelegate.destination = destination + download.downloadDelegate.destination = destination - delegate[task] = request + delegate[task] = download - if startRequestsImmediately { request.resume() } + if startRequestsImmediately { download.resume() } - return request + return download } catch { - return download(failedWith: error) + return download(downloadable, to: destination, failedWith: error) } } - private func download(failedWith error: Error) -> DownloadRequest { - let download = DownloadRequest(session: session, requestTask: .download(nil, nil), error: error) - if startRequestsImmediately { download.resume() } + private func download( + _ downloadable: DownloadRequest.Downloadable?, + to destination: DownloadRequest.DownloadFileDestination?, + failedWith error: Error) + -> DownloadRequest + { + var downloadTask: Request.RequestTask = .download(nil, nil) + + if let downloadable = downloadable { + downloadTask = .download(downloadable, nil) + } + + let underlyingError = error.underlyingAdaptError ?? error + + let download = DownloadRequest(session: session, requestTask: downloadTask, error: underlyingError) + download.downloadDelegate.destination = destination + + if let retrier = retrier, error is AdaptError { + allowRetrier(retrier, toRetry: download, with: underlyingError) + } else { + if startRequestsImmediately { download.resume() } + } + return download } @@ -418,7 +463,7 @@ open class SessionManager { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(fileURL, with: urlRequest) } catch { - return upload(failedWith: error) + return upload(nil, failedWith: error) } } @@ -436,7 +481,7 @@ open class SessionManager { let urlRequest = try urlRequest.asURLRequest() return upload(.file(fileURL, urlRequest)) } catch { - return upload(failedWith: error) + return upload(nil, failedWith: error) } } @@ -464,7 +509,7 @@ open class SessionManager { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(data, with: urlRequest) } catch { - return upload(failedWith: error) + return upload(nil, failedWith: error) } } @@ -482,7 +527,7 @@ open class SessionManager { let urlRequest = try urlRequest.asURLRequest() return upload(.data(data, urlRequest)) } catch { - return upload(failedWith: error) + return upload(nil, failedWith: error) } } @@ -510,7 +555,7 @@ open class SessionManager { let urlRequest = try URLRequest(url: url, method: method, headers: headers) return upload(stream, with: urlRequest) } catch { - return upload(failedWith: error) + return upload(nil, failedWith: error) } } @@ -528,7 +573,7 @@ open class SessionManager { let urlRequest = try urlRequest.asURLRequest() return upload(.stream(stream, urlRequest)) } catch { - return upload(failedWith: error) + return upload(nil, failedWith: error) } } @@ -614,6 +659,8 @@ open class SessionManager { let formData = MultipartFormData() multipartFormData(formData) + var tempFileURL: URL? + do { var urlRequestWithContentType = try urlRequest.asURLRequest() urlRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") @@ -637,6 +684,8 @@ open class SessionManager { let fileName = UUID().uuidString let fileURL = directoryURL.appendingPathComponent(fileName) + tempFileURL = fileURL + var directoryError: Error? // Create directory inside serial queue to ensure two threads don't do this in parallel @@ -652,16 +701,37 @@ open class SessionManager { try formData.writeEncodedData(to: fileURL) + let upload = self.upload(fileURL, with: urlRequestWithContentType) + + // Cleanup the temp file once the upload is complete + upload.delegate.queue.addOperation { + do { + try FileManager.default.removeItem(at: fileURL) + } catch { + // No-op + } + } + DispatchQueue.main.async { let encodingResult = MultipartFormDataEncodingResult.success( - request: self.upload(fileURL, with: urlRequestWithContentType), + request: upload, streamingFromDisk: true, streamFileURL: fileURL ) + encodingCompletion?(encodingResult) } } } catch { + // Cleanup the temp file in the event that the multipart form data encoding failed + if let tempFileURL = tempFileURL { + do { + try FileManager.default.removeItem(at: tempFileURL) + } catch { + // No-op + } + } + DispatchQueue.main.async { encodingCompletion?(.failure(error)) } } } @@ -684,13 +754,26 @@ open class SessionManager { return upload } catch { - return upload(failedWith: error) + return upload(uploadable, failedWith: error) } } - private func upload(failedWith error: Error) -> UploadRequest { - let upload = UploadRequest(session: session, requestTask: .upload(nil, nil), error: error) - if startRequestsImmediately { upload.resume() } + private func upload(_ uploadable: UploadRequest.Uploadable?, failedWith error: Error) -> UploadRequest { + var uploadTask: Request.RequestTask = .upload(nil, nil) + + if let uploadable = uploadable { + uploadTask = .upload(uploadable, nil) + } + + let underlyingError = error.underlyingAdaptError ?? error + let upload = UploadRequest(session: session, requestTask: uploadTask, error: underlyingError) + + if let retrier = retrier, error is AdaptError { + allowRetrier(retrier, toRetry: upload, with: underlyingError) + } else { + if startRequestsImmediately { upload.resume() } + } + return upload } @@ -709,6 +792,7 @@ open class SessionManager { /// /// - returns: The created `StreamRequest`. @discardableResult + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) open func stream(withHostName hostName: String, port: Int) -> StreamRequest { return stream(.stream(hostName: hostName, port: port)) } @@ -723,12 +807,14 @@ open class SessionManager { /// /// - returns: The created `StreamRequest`. @discardableResult + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) open func stream(with netService: NetService) -> StreamRequest { return stream(.netService(netService)) } // MARK: Private - Stream Implementation + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) private func stream(_ streamable: StreamRequest.Streamable) -> StreamRequest { do { let task = try streamable.task(session: session, adapter: adapter, queue: queue) @@ -744,6 +830,7 @@ open class SessionManager { } } + @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) private func stream(failedWith error: Error) -> StreamRequest { let stream = StreamRequest(session: session, requestTask: .stream(nil, nil), error: error) if startRequestsImmediately { stream.resume() } @@ -762,6 +849,7 @@ open class SessionManager { request.delegate.task = task // resets all task delegate data + request.retryCount += 1 request.startTime = CFAbsoluteTimeGetCurrent() request.endTime = nil @@ -769,8 +857,35 @@ open class SessionManager { return true } catch { - request.delegate.error = error + request.delegate.error = error.underlyingAdaptError ?? error return false } } + + private func allowRetrier(_ retrier: RequestRetrier, toRetry request: Request, with error: Error) { + DispatchQueue.utility.async { [weak self] in + guard let strongSelf = self else { return } + + retrier.should(strongSelf, retry: request, with: error) { shouldRetry, timeDelay in + guard let strongSelf = self else { return } + + guard shouldRetry else { + if strongSelf.startRequestsImmediately { request.resume() } + return + } + + DispatchQueue.utility.after(timeDelay) { + guard let strongSelf = self else { return } + + let retrySucceeded = strongSelf.retry(request) + + if retrySucceeded, let task = request.task { + strongSelf.delegate[task] = request + } else { + if strongSelf.startRequestsImmediately { request.resume() } + } + } + } + } + } } diff --git a/Example/Pods/Alamofire/Source/TaskDelegate.swift b/Example/Pods/Alamofire/Source/TaskDelegate.swift index 4a10b65..d4fd216 100644 --- a/Example/Pods/Alamofire/Source/TaskDelegate.swift +++ b/Example/Pods/Alamofire/Source/TaskDelegate.swift @@ -33,13 +33,16 @@ open class TaskDelegate: NSObject { /// The serial operation queue used to execute all operations after the task completes. open let queue: OperationQueue + /// The data returned by the server. + public var data: Data? { return nil } + + /// The error generated throughout the lifecyle of the task. + public var error: Error? + var task: URLSessionTask? { didSet { reset() } } - var data: Data? { return nil } - var error: Error? - var initialResponseTime: CFAbsoluteTime? var credential: URLCredential? var metrics: AnyObject? // URLSessionTaskMetrics @@ -331,29 +334,30 @@ class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { { temporaryURL = location - if let destination = destination { - let result = destination(location, downloadTask.response as! HTTPURLResponse) - let destination = result.destinationURL - let options = result.options + guard + let destination = destination, + let response = downloadTask.response as? HTTPURLResponse + else { return } - do { - destinationURL = destination + let result = destination(location, response) + let destinationURL = result.destinationURL + let options = result.options - if options.contains(.removePreviousFile) { - if FileManager.default.fileExists(atPath: destination.path) { - try FileManager.default.removeItem(at: destination) - } - } + self.destinationURL = destinationURL - if options.contains(.createIntermediateDirectories) { - let directory = destination.deletingLastPathComponent() - try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true, attributes: nil) - } + do { + if options.contains(.removePreviousFile), FileManager.default.fileExists(atPath: destinationURL.path) { + try FileManager.default.removeItem(at: destinationURL) + } - try FileManager.default.moveItem(at: location, to: destination) - } catch { - self.error = error + if options.contains(.createIntermediateDirectories) { + let directory = destinationURL.deletingLastPathComponent() + try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true) } + + try FileManager.default.moveItem(at: location, to: destinationURL) + } catch { + self.error = error } } diff --git a/Example/Pods/Local Podspecs/LotameDMP.podspec.json b/Example/Pods/Local Podspecs/LotameDMP.podspec.json index 06af83a..4ef5c55 100644 --- a/Example/Pods/Local Podspecs/LotameDMP.podspec.json +++ b/Example/Pods/Local Podspecs/LotameDMP.podspec.json @@ -13,7 +13,7 @@ "tag": "3.1.0" }, "platforms": { - "ios": "10.0" + "ios": "9.0" }, "requires_arc": true, "source_files": "Pod/Classes/**/*", diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 47ddcf1..eeab474 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -22,13 +22,13 @@ DEPENDENCIES: EXTERNAL SOURCES: LotameDMP: - :path: ../ + :path: "../" SPEC CHECKSUMS: Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 - LotameDMP: 0ad1e60d8736730f1cb5b06332189754d021da02 + LotameDMP: c4a0065c9035760173635cd1ce2afe5dcfbf4fd3 OHHTTPStubs: 0aec5755528693a165bd616cb79f69387de306a8 PODFILE CHECKSUM: 5e055f3d87d9e826bbffdaa946dd6844c802fc9c -COCOAPODS: 1.1.1 +COCOAPODS: 1.2.0 diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h index 3069ff3..cdcacb5 100644 --- a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h @@ -23,8 +23,8 @@ ***********************************************************************************/ -#import -#import +#import "OHHTTPStubsResponse.h" +#import "Compatibility.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m index d88fee9..9e0e78f 100644 --- a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m @@ -23,7 +23,7 @@ ***********************************************************************************/ -#import +#import "OHHTTPStubsResponse+JSON.h" @implementation OHHTTPStubsResponse (JSON) diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h new file mode 100644 index 0000000..44979c4 --- /dev/null +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h @@ -0,0 +1,48 @@ +/*********************************************************************************** +* +* Copyright (c) 2016 Sebastian Hagedorn, Felix Lamouroux +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +* +***********************************************************************************/ + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Imports + +#import + +// This category is only useful when NSURLSession is present +#if defined(__IPHONE_7_0) || defined(__MAC_10_9) + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - NSURLRequest+HTTPBodyTesting + +@interface NSURLRequest (HTTPBodyTesting) +/** + * Unfortunately, when sending POST requests (with a body) using NSURLSession, + * by the time the request arrives at OHHTTPStubs, the HTTPBody of the + * NSURLRequest has been reset to nil. + * + * You can use this method to retrieve the HTTPBody for testing and use it to + * conditionally stub your requests. + */ +- (NSData *)OHHTTPStubs_HTTPBody; +@end + +#endif /* __IPHONE_7_0 || __MAC_10_9 */ diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m new file mode 100644 index 0000000..a2ff7e8 --- /dev/null +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m @@ -0,0 +1,86 @@ +/*********************************************************************************** +* +* Copyright (c) 2016 Sebastian Hagedorn, Felix Lamouroux +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +* +***********************************************************************************/ + +#import "NSURLRequest+HTTPBodyTesting.h" + +#if defined(__IPHONE_7_0) || defined(__MAC_10_9) + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Imports + +#import "OHHTTPStubsMethodSwizzling.h" + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - NSURLRequest+CustomHTTPBody + +NSString * const OHHTTPStubs_HTTPBodyKey = @"HTTPBody"; + +@implementation NSURLRequest (HTTPBodyTesting) + +- (NSData*)OHHTTPStubs_HTTPBody +{ + return [NSURLProtocol propertyForKey:OHHTTPStubs_HTTPBodyKey inRequest:self]; +} + +@end + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - NSMutableURLRequest+HTTPBodyTesting + +typedef void(*OHHHTTPStubsSetterIMP)(id, SEL, id); +static OHHHTTPStubsSetterIMP orig_setHTTPBody; + +static void OHHTTPStubs_setHTTPBody(id self, SEL _cmd, NSData* HTTPBody) +{ + // store the http body via NSURLProtocol + if (HTTPBody) { + [NSURLProtocol setProperty:HTTPBody forKey:OHHTTPStubs_HTTPBodyKey inRequest:self]; + } else { + // unfortunately resetting does not work properly as the NSURLSession also uses this to reset the property + } + + orig_setHTTPBody(self, _cmd, HTTPBody); +} + +/** + * Swizzles setHTTPBody: in order to maintain a copy of the http body for later + * reference and calls the original implementation. + * + * @warning Should not be used in production, testing only. + */ +@interface NSMutableURLRequest (HTTPBodyTesting) @end + +@implementation NSMutableURLRequest (HTTPBodyTesting) + ++ (void)load +{ + orig_setHTTPBody = (OHHHTTPStubsSetterIMP)OHHTTPStubsReplaceMethod(@selector(setHTTPBody:), + (IMP)OHHTTPStubs_setHTTPBody, + [NSMutableURLRequest class], + NO); +} + +@end + +#endif /* __IPHONE_7_0 || __MAC_10_9 */ diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m index b0e14a0..6e88515 100644 --- a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m @@ -22,14 +22,11 @@ * ***********************************************************************************/ - #import #if defined(__IPHONE_7_0) || defined(__MAC_10_9) - -#import -#import - +#import "OHHTTPStubs.h" +#import "OHHTTPStubsMethodSwizzling.h" ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -44,20 +41,6 @@ static SessionConfigConstructor orig_defaultSessionConfiguration; static SessionConfigConstructor orig_ephemeralSessionConfiguration; -static SessionConfigConstructor OHHTTPStubsSwizzle(SEL selector, SessionConfigConstructor newImpl) -{ - Class cls = NSURLSessionConfiguration.class; - Class metaClass = object_getClass(cls); - - Method origMethod = class_getClassMethod(cls, selector); - SessionConfigConstructor origImpl = (SessionConfigConstructor)method_getImplementation(origMethod); - if (!class_addMethod(metaClass, selector, (IMP)newImpl, method_getTypeEncoding(origMethod))) - { - method_setImplementation(origMethod, (IMP)newImpl); - } - return origImpl; -} - static NSURLSessionConfiguration* OHHTTPStubs_defaultSessionConfiguration(id self, SEL _cmd) { NSURLSessionConfiguration* config = orig_defaultSessionConfiguration(self,_cmd); // call original method @@ -73,16 +56,23 @@ static SessionConfigConstructor OHHTTPStubsSwizzle(SEL selector, SessionConfigCo } @interface NSURLSessionConfiguration(OHHTTPStubsSupport) @end + @implementation NSURLSessionConfiguration(OHHTTPStubsSupport) + +(void)load { - orig_defaultSessionConfiguration = OHHTTPStubsSwizzle(@selector(defaultSessionConfiguration), - OHHTTPStubs_defaultSessionConfiguration); - orig_ephemeralSessionConfiguration = OHHTTPStubsSwizzle(@selector(ephemeralSessionConfiguration), - OHHTTPStubs_ephemeralSessionConfiguration); + orig_defaultSessionConfiguration = (SessionConfigConstructor)OHHTTPStubsReplaceMethod(@selector(defaultSessionConfiguration), + (IMP)OHHTTPStubs_defaultSessionConfiguration, + [NSURLSessionConfiguration class], + YES); + orig_ephemeralSessionConfiguration = (SessionConfigConstructor)OHHTTPStubsReplaceMethod(@selector(ephemeralSessionConfiguration), + (IMP)OHHTTPStubs_ephemeralSessionConfiguration, + [NSURLSessionConfiguration class], + YES); } + @end -#endif +#endif /* __IPHONE_7_0 || __MAC_10_9 */ diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h new file mode 100644 index 0000000..443a680 --- /dev/null +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h @@ -0,0 +1,51 @@ +/*********************************************************************************** + * + * Copyright (c) 2012 Olivier Halligon, 2016 Sebastian Hagedorn + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + ***********************************************************************************/ + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Imports + +#import + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Method Swizzling Helpers + +/** + * Replaces the selector's associated method implementation with the + * given implementation (or adds it, if there was no existing one). + * + * @param selector The selector entry in the dispatch table. + * @param newImpl The implementation that will be associated with + * the given selector. + * @param affectedClass The class whose dispatch table will be altered. + * @param isClassMethod Set to YES if the selector denotes a class + * method, or NO if it is an instance method. + * @return The previous implementation associated with + * the swizzled selector. You should store the + * implementation and call it when overwriting + * the selector. + */ +__attribute__((warn_unused_result)) IMP OHHTTPStubsReplaceMethod(SEL selector, + IMP newImpl, + Class affectedClass, + BOOL isClassMethod); diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m new file mode 100644 index 0000000..2aefcc7 --- /dev/null +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m @@ -0,0 +1,47 @@ +/*********************************************************************************** + * + * Copyright (c) 2012 Olivier Halligon, 2016 Sebastian Hagedorn + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + ***********************************************************************************/ + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - Imports + +#import "OHHTTPStubsMethodSwizzling.h" + +////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma mark - Method Swizzling Helpers + +IMP OHHTTPStubsReplaceMethod(SEL selector, + IMP newImpl, + Class affectedClass, + BOOL isClassMethod) +{ + Method origMethod = isClassMethod ? class_getClassMethod(affectedClass, selector) : class_getInstanceMethod(affectedClass, selector); + IMP origImpl = method_getImplementation(origMethod); + + if (!class_addMethod(isClassMethod ? object_getClass(affectedClass) : affectedClass, selector, newImpl, method_getTypeEncoding(origMethod))) + { + method_setImplementation(origMethod, newImpl); + } + + return origImpl; +} diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h index 6c684ca..3ac80af 100644 --- a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.h @@ -28,9 +28,8 @@ #import -#import -#import - +#import "Compatibility.h" +#import "OHHTTPStubsResponse.h" NS_ASSUME_NONNULL_BEGIN @@ -129,6 +128,13 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest */ +(void)setEnabled:(BOOL)enabled; +/** + * Whether or not stubs are enabled for the shared session or for `NSURLConnection` + * + * @return If `YES` the stubs are enabled. If `NO` then the stubs are disabled + */ ++(BOOL)isEnabled; + #if defined(__IPHONE_7_0) || defined(__MAC_10_9) /** * Enable or disable the stubs on a given `NSURLSessionConfiguration`. @@ -150,6 +156,15 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * created sessions. */ + (void)setEnabled:(BOOL)enabled forSessionConfiguration:(NSURLSessionConfiguration *)sessionConfig; + +/** + * Whether stubs are enabled or disabled on a given `NSURLSessionConfiguration` + * + * @param sessionConfig The NSURLSessionConfiguration on which to enable/disable the stubs + * + * @return If `YES` the stubs are enabled for sessionConfig. If `NO` then the stubs are disabled + */ ++ (BOOL)isEnabledForSessionConfiguration:(NSURLSessionConfiguration *)sessionConfig; #endif #pragma mark - Debug Methods @@ -170,30 +185,27 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * @param block The block to call each time a request is being stubbed by OHHTTPStubs. * Set it to `nil` to do nothing. Defaults is `nil`. */ -+(void)onStubActivation:( void(^)(NSURLRequest* request, id stub) )block; ++(void)onStubActivation:( nullable void(^)(NSURLRequest* request, id stub, OHHTTPStubsResponse* responseStub) )block; + +/** + * Setup a block to be called whenever OHHTTPStubs encounters a redirect request. + * + * @param block The block to call each time a redirect request is being stubbed by OHHTTPStubs. + * Set it to `nil` to do nothing. Defaults is `nil`. + */ ++(void)onStubRedirectResponse:( nullable void(^)(NSURLRequest* request, NSURLRequest* redirectRequest, id stub, OHHTTPStubsResponse* responseStub) )block; + +/** + * Setup a block to be called each time a stub finishes. Useful if stubs take an insignificant amount + * of time to execute (due to low bandwidth or delayed response time). This block may also be called + * if there are errors generated by OHHTTPStubs in the course of executing a network request. + * + * @param block The block to call each time a request is finished being stubbed by OHHTTPStubs. + * Set it to `nil` to do nothing. Defaults is `nil`. + */ ++(void)afterStubFinish:( nullable void(^)(NSURLRequest* request, id stub, OHHTTPStubsResponse* responseStub, NSError *error) )block; @end NS_ASSUME_NONNULL_END - -//////////////////////////////////////////////////////////////////////////////// -#pragma mark - Umbrella Header Imports - - -#if ! __has_include() - // Because this is supposed to be an umbrella header, we should also import every public headers here - // (Except if we use already have a better umbrella header generated by CocoaPods) - #if __has_include() - #import - #endif - #if __has_include() - #import - #endif - #if __has_include() - #import - #endif - #if __has_include("OHHTTPStubs/OHPathHelpers.h") - #import "OHHTTPStubs/OHPathHelpers.h" - #endif -#endif diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.m b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.m index b381547..ecba10e 100644 --- a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.m +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.m @@ -29,7 +29,7 @@ //////////////////////////////////////////////////////////////////////////////// #pragma mark - Imports -#import +#import "OHHTTPStubs.h" //////////////////////////////////////////////////////////////////////////////// #pragma mark - Types & Constants @@ -44,7 +44,10 @@ @interface OHHTTPStubsProtocol : NSURLProtocol @end @interface OHHTTPStubs() + (instancetype)sharedInstance; @property(atomic, copy) NSMutableArray* stubDescriptors; -@property(atomic, copy) void (^onStubActivationBlock)(NSURLRequest*, id); +@property(atomic, assign) BOOL enabledState; +@property(atomic, copy, nullable) void (^onStubActivationBlock)(NSURLRequest*, id, OHHTTPStubsResponse*); +@property(atomic, copy, nullable) void (^onStubRedirectBlock)(NSURLRequest*, NSURLRequest*, id, OHHTTPStubsResponse*); +@property(atomic, copy, nullable) void (^afterStubFinishBlock)(NSURLRequest*, id, OHHTTPStubsResponse*, NSError*); @end @interface OHHTTPStubsDescriptor : NSObject @@ -105,7 +108,7 @@ + (void)initialize { if (self == [OHHTTPStubs class]) { - [self setEnabled:YES]; + [self _setEnable:YES]; } } - (instancetype)init @@ -114,13 +117,14 @@ - (instancetype)init if (self) { _stubDescriptors = [NSMutableArray array]; + _enabledState = YES; // assume initialize has already been run } return self; } - (void)dealloc { - [self.class setEnabled:NO]; + [self.class _setEnable:NO]; } //////////////////////////////////////////////////////////////////////////////// @@ -149,18 +153,26 @@ +(void)removeAllStubs #pragma mark > Disabling & Re-Enabling stubs -+(void)setEnabled:(BOOL)enable ++(void)_setEnable:(BOOL)enable { - static BOOL currentEnabledState = NO; - if (enable && !currentEnabledState) + if (enable) { [NSURLProtocol registerClass:OHHTTPStubsProtocol.class]; } - else if (!enable && currentEnabledState) + else { [NSURLProtocol unregisterClass:OHHTTPStubsProtocol.class]; } - currentEnabledState = enable; +} + ++(void)setEnabled:(BOOL)enabled +{ + [OHHTTPStubs.sharedInstance setEnabled:enabled]; +} + ++(BOOL)isEnabled +{ + return OHHTTPStubs.sharedInstance.isEnabled; } #if defined(__IPHONE_7_0) || defined(__MAC_10_9) @@ -189,6 +201,25 @@ + (void)setEnabled:(BOOL)enable forSessionConfiguration:(NSURLSessionConfigurati @"this method if the user is running iOS7+/OSX9+.", NSStringFromSelector(_cmd)); } } + ++ (BOOL)isEnabledForSessionConfiguration:(NSURLSessionConfiguration *)sessionConfig +{ + // Runtime check to make sure the API is available on this version + if ( [sessionConfig respondsToSelector:@selector(protocolClasses)] + && [sessionConfig respondsToSelector:@selector(setProtocolClasses:)]) + { + NSMutableArray * urlProtocolClasses = [NSMutableArray arrayWithArray:sessionConfig.protocolClasses]; + Class protoCls = OHHTTPStubsProtocol.class; + return [urlProtocolClasses containsObject:protoCls]; + } + else + { + NSLog(@"[OHHTTPStubs] %@ is only available when running on iOS7+/OSX9+. " + @"Use conditions like 'if ([NSURLSessionConfiguration class])' to only call " + @"this method if the user is running iOS7+/OSX9+.", NSStringFromSelector(_cmd)); + return NO; + } +} #endif #pragma mark > Debug Methods @@ -198,16 +229,45 @@ +(NSArray*)allStubs return [OHHTTPStubs.sharedInstance stubDescriptors]; } -+(void)onStubActivation:( void(^)(NSURLRequest* request, id stub) )block ++(void)onStubActivation:( nullable void(^)(NSURLRequest* request, id stub, OHHTTPStubsResponse* responseStub) )block { [OHHTTPStubs.sharedInstance setOnStubActivationBlock:block]; } ++(void)onStubRedirectResponse:( nullable void(^)(NSURLRequest* request, NSURLRequest* redirectRequest, id stub, OHHTTPStubsResponse* responseStub) )block +{ + [OHHTTPStubs.sharedInstance setOnStubRedirectBlock:block]; +} + ++(void)afterStubFinish:( nullable void(^)(NSURLRequest* request, id stub, OHHTTPStubsResponse* responseStub, NSError* error) )block +{ + [OHHTTPStubs.sharedInstance setAfterStubFinishBlock:block]; +} + //////////////////////////////////////////////////////////////////////////////// #pragma mark - Private instance methods +-(BOOL)isEnabled +{ + BOOL enabled = NO; + @synchronized(self) + { + enabled = _enabledState; + } + return enabled; +} + +-(void)setEnabled:(BOOL)enable +{ + @synchronized(self) + { + _enabledState = enable; + [self.class _setEnable:_enabledState]; + } +} + -(void)addStub:(OHHTTPStubsDescriptor*)stubDesc { @synchronized(_stubDescriptors) @@ -316,6 +376,10 @@ - (void)startLoading nil]; NSError* error = [NSError errorWithDomain:@"OHHTTPStubs" code:500 userInfo:userInfo]; [client URLProtocol:self didFailWithError:error]; + if (OHHTTPStubs.sharedInstance.afterStubFinishBlock) + { + OHHTTPStubs.sharedInstance.afterStubFinishBlock(request, self.stub, nil, error); + } return; } @@ -323,7 +387,7 @@ - (void)startLoading if (OHHTTPStubs.sharedInstance.onStubActivationBlock) { - OHHTTPStubs.sharedInstance.onStubActivationBlock(request, self.stub); + OHHTTPStubs.sharedInstance.onStubActivationBlock(request, self.stub, responseStub); } if (responseStub.error == nil) @@ -354,49 +418,58 @@ - (void)startLoading { redirectLocationURL = nil; } - if (((responseStub.statusCode > 300) && (responseStub.statusCode < 400)) && redirectLocationURL) - { - NSURLRequest* redirectRequest = [NSURLRequest requestWithURL:redirectLocationURL]; - [self executeOnClientRunLoopAfterDelay:responseStub.requestTime block:^{ - if (!self.stopped) + [self executeOnClientRunLoopAfterDelay:responseStub.requestTime block:^{ + if (!self.stopped) + { + // Notify if a redirection occurred + if (((responseStub.statusCode > 300) && (responseStub.statusCode < 400)) && redirectLocationURL) { + NSURLRequest* redirectRequest = [NSURLRequest requestWithURL:redirectLocationURL]; [client URLProtocol:self wasRedirectedToRequest:redirectRequest redirectResponse:urlResponse]; - } - }]; - } - else - { - [self executeOnClientRunLoopAfterDelay:responseStub.requestTime block:^{ - if (!self.stopped) - { - [client URLProtocol:self didReceiveResponse:urlResponse cacheStoragePolicy:NSURLCacheStorageNotAllowed]; - if(responseStub.inputStream.streamStatus == NSStreamStatusNotOpen) + if (OHHTTPStubs.sharedInstance.onStubRedirectBlock) { - [responseStub.inputStream open]; + OHHTTPStubs.sharedInstance.onStubRedirectBlock(request, redirectRequest, self.stub, responseStub); } - [self streamDataForClient:client - withStubResponse:responseStub - completion:^(NSError * error) - { - [responseStub.inputStream close]; - if (error==nil) - { - [client URLProtocolDidFinishLoading:self]; - } - else - { - [client URLProtocol:self didFailWithError:responseStub.error]; - } - }]; } - }]; - } + + // Send the response (even for redirections) + [client URLProtocol:self didReceiveResponse:urlResponse cacheStoragePolicy:NSURLCacheStorageNotAllowed]; + if(responseStub.inputStream.streamStatus == NSStreamStatusNotOpen) + { + [responseStub.inputStream open]; + } + [self streamDataForClient:client + withStubResponse:responseStub + completion:^(NSError * error) + { + [responseStub.inputStream close]; + NSError *blockError = nil; + if (error==nil) + { + [client URLProtocolDidFinishLoading:self]; + } + else + { + [client URLProtocol:self didFailWithError:responseStub.error]; + blockError = responseStub.error; + } + if (OHHTTPStubs.sharedInstance.afterStubFinishBlock) + { + OHHTTPStubs.sharedInstance.afterStubFinishBlock(request, self.stub, responseStub, blockError); + } + }]; + } + }]; } else { // Send the canned error [self executeOnClientRunLoopAfterDelay:responseStub.responseTime block:^{ if (!self.stopped) { [client URLProtocol:self didFailWithError:responseStub.error]; + if (OHHTTPStubs.sharedInstance.afterStubFinishBlock) + { + OHHTTPStubs.sharedInstance.afterStubFinishBlock(request, self.stub, responseStub, responseStub.error); + } } }]; } @@ -417,42 +490,47 @@ - (void)streamDataForClient:(id)client withStubResponse:(OHHTTPStubsResponse*)stubResponse completion:(void(^)(NSError * error))completion { - if ((stubResponse.dataSize>0) && stubResponse.inputStream.hasBytesAvailable && (!self.stopped)) + if (!self.stopped) { - // Compute timing data once and for all for this stub - - OHHTTPStubsStreamTimingInfo timingInfo = { - .slotTime = kSlotTime, // Must be >0. We will send a chunk of data from the stream each 'slotTime' seconds - .cumulativeChunkSize = 0 - }; - - if(stubResponse.responseTime < 0) - { - // Bytes send each 'slotTime' seconds = Speed in KB/s * 1000 * slotTime in seconds - timingInfo.chunkSizePerSlot = (fabs(stubResponse.responseTime) * 1000) * timingInfo.slotTime; - } - else if (stubResponse.responseTime < kSlotTime) // includes case when responseTime == 0 + if ((stubResponse.dataSize>0) && stubResponse.inputStream.hasBytesAvailable) { - // We want to send the whole data quicker than the slotTime, so send it all in one chunk. - timingInfo.chunkSizePerSlot = stubResponse.dataSize; - timingInfo.slotTime = stubResponse.responseTime; + // Compute timing data once and for all for this stub + + OHHTTPStubsStreamTimingInfo timingInfo = { + .slotTime = kSlotTime, // Must be >0. We will send a chunk of data from the stream each 'slotTime' seconds + .cumulativeChunkSize = 0 + }; + + if(stubResponse.responseTime < 0) + { + // Bytes send each 'slotTime' seconds = Speed in KB/s * 1000 * slotTime in seconds + timingInfo.chunkSizePerSlot = (fabs(stubResponse.responseTime) * 1000) * timingInfo.slotTime; + } + else if (stubResponse.responseTime < kSlotTime) // includes case when responseTime == 0 + { + // We want to send the whole data quicker than the slotTime, so send it all in one chunk. + timingInfo.chunkSizePerSlot = stubResponse.dataSize; + timingInfo.slotTime = stubResponse.responseTime; + } + else + { + // Bytes send each 'slotTime' seconds = (Whole size in bytes / response time) * slotTime = speed in bps * slotTime in seconds + timingInfo.chunkSizePerSlot = ((stubResponse.dataSize/stubResponse.responseTime) * timingInfo.slotTime); + } + + [self streamDataForClient:client + fromStream:stubResponse.inputStream + timingInfo:timingInfo + completion:completion]; } else { - // Bytes send each 'slotTime' seconds = (Whole size in bytes / response time) * slotTime = speed in bps * slotTime in seconds - timingInfo.chunkSizePerSlot = ((stubResponse.dataSize/stubResponse.responseTime) * timingInfo.slotTime); - } - - [self streamDataForClient:client - fromStream:stubResponse.inputStream - timingInfo:timingInfo - completion:completion]; - } - else - { - if (completion) - { - completion(nil); + [self executeOnClientRunLoopAfterDelay:stubResponse.responseTime block:^{ + if (completion && !self.stopped) + { + completion(nil); + } + }]; } } } diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h index acab3a3..f9995fc 100644 --- a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.h @@ -27,7 +27,8 @@ #pragma mark - Imports #import -#import + +#import "Compatibility.h" //////////////////////////////////////////////////////////////////////////////// #pragma mark - Defines & Constants @@ -138,6 +139,22 @@ NS_ASSUME_NONNULL_BEGIN statusCode:(int)statusCode headers:(nullable NSDictionary*)httpHeaders; + +/** + * Builds a response given a URL, the status code, and headers. + * + * @param fileURL The URL for the data to return in the response + * @param statusCode The HTTP Status Code to use in the response + * @param httpHeaders The HTTP Headers to return in the response + * + * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * + * @note This method applies only to URLs that represent file system resources + */ ++(instancetype)responseWithFileURL:(NSURL *)fileURL + statusCode:(int)statusCode + headers:(nullable NSDictionary *)httpHeaders; + /* -------------------------------------------------------------------------- */ #pragma mark > Building an error response @@ -160,7 +177,7 @@ NS_ASSUME_NONNULL_BEGIN * Set the `responseTime` of the `OHHTTPStubsResponse` and return `self`. Useful for chaining method calls. * * _Usage example:_ - *
return [[OHHTTPStubsReponse responseWithData:data statusCode:200 headers:nil] responseTime:5.0];
+ *
return [[OHHTTPStubsResponse responseWithData:data statusCode:200 headers:nil] responseTime:5.0];
* * @param responseTime If positive, the amount of time used to send the entire response. * If negative, the rate in KB/s at which to send the response data. @@ -177,7 +194,7 @@ NS_ASSUME_NONNULL_BEGIN * Useful for chaining method calls. * * _Usage example:_ - *
return [[OHHTTPStubsReponse responseWithData:data statusCode:200 headers:nil]
+ *  
return [[OHHTTPStubsResponse responseWithData:data statusCode:200 headers:nil]
  *            requestTime:1.0 responseTime:5.0];
* * @param requestTime The time to wait before the response begins to send. This value must be greater than or equal to zero. @@ -239,6 +256,21 @@ NS_ASSUME_NONNULL_BEGIN headers:(nullable NSDictionary*)httpHeaders; +/** + * Initialize a response with a given URL, statusCode and headers. + * + * @param fileURL The URL for the data to return in the response + * @param statusCode The HTTP Status Code to use in the response + * @param httpHeaders The HTTP Headers to return in the response + * + * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * + * @note This method applies only to URLs that represent file system resources + */ +-(instancetype)initWithFileURL:(NSURL *)fileURL + statusCode:(int)statusCode + headers:(nullable NSDictionary *)httpHeaders; + /** * Initialize a response with the given data, statusCode and headers. * diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.m b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.m index d8d88e1..256878d 100644 --- a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.m +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.m @@ -29,7 +29,7 @@ //////////////////////////////////////////////////////////////////////////////// #pragma mark - Imports -#import +#import "OHHTTPStubsResponse.h" //////////////////////////////////////////////////////////////////////////////// #pragma mark - Defines & Constants @@ -75,6 +75,15 @@ +(instancetype)responseWithFileAtPath:(NSString *)filePath return response; } ++(instancetype)responseWithFileURL:(NSURL *)fileURL + statusCode:(int)statusCode + headers:(nullable NSDictionary *)httpHeaders +{ + OHHTTPStubsResponse* response = [[self alloc] initWithFileURL:fileURL + statusCode:statusCode + headers:httpHeaders]; + return response; +} #pragma mark > Building an error response @@ -135,24 +144,41 @@ -(instancetype)initWithFileAtPath:(NSString*)filePath statusCode:(int)statusCode headers:(nullable NSDictionary*)httpHeaders { - NSInputStream* inputStream; - if (filePath) - { - inputStream = [NSInputStream inputStreamWithFileAtPath:filePath]; - } - else - { + NSURL *fileURL = filePath ? [NSURL fileURLWithPath:filePath] : nil; + self = [self initWithFileURL:fileURL + statusCode:statusCode + headers:httpHeaders]; + return self; +} + +-(instancetype)initWithFileURL:(NSURL *)fileURL + statusCode:(int)statusCode + headers:(nullable NSDictionary *)httpHeaders { + if (!fileURL) { NSLog(@"%s: nil file path. Returning empty data", __PRETTY_FUNCTION__); - inputStream = [NSInputStream inputStreamWithData:[NSData data]]; + return [self initWithInputStream:[NSInputStream inputStreamWithData:[NSData data]] + dataSize:0 + statusCode:statusCode + headers:httpHeaders]; } - NSDictionary* attributes = [NSFileManager.defaultManager attributesOfItemAtPath:filePath error:nil]; - unsigned long long fileSize = [[attributes valueForKey:NSFileSize] unsignedLongLongValue]; - self = [self initWithInputStream:inputStream - dataSize:fileSize + // [NSURL -isFileURL] is only available on iOS 8+ + NSAssert([fileURL.scheme isEqualToString:NSURLFileScheme], @"%s: Only file URLs may be passed to this method.",__PRETTY_FUNCTION__); + + NSNumber *fileSize; + NSError *error; + const BOOL success __unused = [fileURL getResourceValue:&fileSize forKey:NSURLFileSizeKey error:&error]; + + NSAssert(success && fileSize, @"%s Couldn't get the file size for URL. \ +The URL was: %@. \ +The operation to retrieve the file size was %@. \ +The error associated with that operation was: %@", + __PRETTY_FUNCTION__, fileURL, success ? @"successful" : @"unsuccessful", error); + + return [self initWithInputStream:[NSInputStream inputStreamWithURL:fileURL] + dataSize:[fileSize unsignedLongLongValue] statusCode:statusCode headers:httpHeaders]; - return self; } -(instancetype)initWithData:(NSData*)data diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h index b3c301a..d924df4 100644 --- a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h @@ -24,7 +24,8 @@ #import -#import + +#import "Compatibility.h" NS_ASSUME_NONNULL_BEGIN @@ -35,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN * @param inBundleForClass The class of the caller, used to determine the current bundle * in which the file is supposed to be located. * You should typically pass `self.class` (ObjC) or - * `self.dynamicType` (Swift) when calling this function. + * `self.dynamicType` (Swift < 3.0) or `type(of: self)` (Swift >= 3.0) when calling this function. * * @return The path of the given file in the same bundle as the inBundleForClass class */ diff --git a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m index 18b769e..89d1e05 100644 --- a/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m +++ b/Example/Pods/OHHTTPStubs/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m @@ -23,7 +23,7 @@ ***********************************************************************************/ -#import +#import "OHPathHelpers.h" NSString* __nullable OHPathForFile(NSString* fileName, Class inBundleForClass) { diff --git a/Example/Pods/OHHTTPStubs/README.md b/Example/Pods/OHHTTPStubs/README.md index 2c9c831..ca890a7 100644 --- a/Example/Pods/OHHTTPStubs/README.md +++ b/Example/Pods/OHHTTPStubs/README.md @@ -4,31 +4,28 @@ OHHTTPStubs [![Platform](http://cocoapod-badges.herokuapp.com/p/OHHTTPStubs/badge.png)](http://cocoadocs.org/docsets/OHHTTPStubs) [![Version](http://cocoapod-badges.herokuapp.com/v/OHHTTPStubs/badge.png)](http://cocoadocs.org/docsets/OHHTTPStubs) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Build Status](https://travis-ci.org/AliSoftware/OHHTTPStubs.png?branch=master)](https://travis-ci.org/AliSoftware/OHHTTPStubs) +[![Build Status](https://travis-ci.org/AliSoftware/OHHTTPStubs.svg?branch=master)](https://travis-ci.org/AliSoftware/OHHTTPStubs) `OHHTTPStubs` is a library designed to stub your network requests very easily. It can help you: * test your apps with **fake network data** (stubbed from file) and **simulate slow networks**, to check your application behavior in bad network conditions -* write **Unit Tests** that use fake network data from your fixtures. +* write **unit tests** that use fake network data from your fixtures. -It works with `NSURLConnection`, new iOS7/OSX.9's `NSURLSession`, `AFNetworking` (both 1.x and 2.x), or any networking framework that use Cocoa's URL Loading System. +It works with `NSURLConnection`, `NSURLSession`, `AFNetworking`, `Alamofire` or any networking framework that use Cocoa's URL Loading System. -[![Donate](http://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TRTU3UEWEHV92 "Donate") +[Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TRTU3UEWEHV92 "Donate") ---- # Documentation & Usage Examples -`OHHTTPStubs` headers are fully documented using Appledoc-like / Headerdoc-like comments in the header files. You can also [read the **online documentation** here](http://cocoadocs.org/docsets/OHHTTPStubs) -[![Version](http://cocoapod-badges.herokuapp.com/v/OHHTTPStubs/badge.png)](http://cocoadocs.org/docsets/OHHTTPStubs) - -## Swift support +`OHHTTPStubs` headers are fully documented using Appledoc-like / Headerdoc-like comments in the header files. You can also [read the **online documentation** here](http://cocoadocs.org/docsets/OHHTTPStubs). -`OHHTTPStubs` is compatible with Swift out of the box: you can use it with the same API as you would use in Objective-C. But you might also want to include the `OHHTTPStubs/Swift` subspec in your `Podfile`, which adds some global function helpers (see `OHHTTPStubsSwift.swift`) to make the use of `OHHTTPStubs` more compact and Swift-like. ## Basic example -### In Objective-C +
+In Objective-C ```objc [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { @@ -41,45 +38,129 @@ It works with `NSURLConnection`, new iOS7/OSX.9's `NSURLSession`, `AFNetworking` }]; ``` -### In Swift +
-This example is using the Swift helpers found in `OHHTTPStubsSwift.swift` provided by the `OHHTTPStubs/Swift` subspec +
+In Swift + +This example is using the Swift helpers found in `OHHTTPStubsSwift.swift` provided by the `OHHTTPStubs/Swift` subspec. ```swift stub(isHost("mywebservice.com")) { _ in // Stub it with our "wsresponse.json" stub file (which is in same bundle as self) - let stubPath = OHPathForFile("wsresponse.json", self.dynamicType) - return fixture(stubPath!, headers: ["Content-Type":"application/json"]) + let stubPath = OHPathForFile("wsresponse.json", type(of: self)) + return fixture(filePath: stubPath!, headers: ["Content-Type":"application/json"]) } ``` -Note: Using `OHHTTPStubsSwift.swift` you could also compose the matcher functions like this: `stub(isScheme("http") && isHost("myhost")) { … }` +**Note**: if you're using `OHHTTPStubs`'s Swiftier API (`OHHTTPStubsSwift.swift` and the `Swift` subspec), you can also compose the matcher functions like this: `stub(isScheme("http") && isHost("myhost")) { … }` +
## More examples & Help Topics * For a lot more examples, see the dedicated "[Usage Examples](https://github.com/AliSoftware/OHHTTPStubs/wiki/Usage-Examples)" wiki page. * The wiki also contain [some articles that can help you get started](https://github.com/AliSoftware/OHHTTPStubs/wiki) with (and troubleshoot if needed) `OHHTTPStubs`. +## Recording requests to replay them later + +Instead of writing the content of the stubs you want to use manually, you can use tools like [SWHttpTrafficRecorder](https://github.com/capitalone/SWHttpTrafficRecorder) to record network requests into files. This way you can later use those files as stub responses. +This tool can record all three formats that are supported by `OHHTTPStubs` (the `HTTPMessage` format, the simple response boby/content file, and the `Mocktail` format). + +_(There are also other ways to perform a similar task, including using `curl -is >foo.response` to generate files compatible with the `HTTPMessage` format, or using other network recording libraries similar to `SWHttpTrafficRecorder`)._ + # Compatibility -`OHHTTPStubs` is compatible with **iOS 5.0+** and **OSX 10.7+**. +* `OHHTTPStubs` is compatible with **iOS5+**, **OS X 10.7+**, **tvOS**. +* `OHHTTPStubs` also works with `NSURLSession` as well as any network library wrapping them. +* `OHHTTPStubs` is **fully compatible with Swift 2.2, 2.3 and 3.0**. -`OHHTTPStubs` also works with iOS7's and OSX 10.9's `NSURLSession` mechanism. +_[Nullability annotations](https://developer.apple.com/swift/blog/?id=25) have also been added to the ObjC API to allow a cleaner API when used from Swift even if you don't use the dedicated Swift API wrapper provided by `OHHTTPStubsSwift.swift`._ -`OHHTTPStubs` is fully **Swift-compatible**. [Nullability annotations](https://developer.apple.com/swift/blog/?id=25) have been added to allow a cleaner API when used from Swift. +> Note: When building with Swift 2.2, you will have some `extraneous '_' in parameter` warnings. Those are normal: it's because the code is already ready for the transition to Swift 3 — which requires those `_` in parameters while Swift 2.2 didn't. +> You can safely ignore those warnings in Swift 2.2. See [SE-0046](https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.md) for more info. # Installing in your projects +## CocoaPods + Using [CocoaPods](https://guides.cocoapods.org) is the recommended way. -Simply add `pod 'OHHTTPStubs'` to your `Podfile`. -_`OHHTTPStubs` should also be compatible with Carthage — but I won't guarantee help/support for it as I don't use it personally._ +Simply add `pod 'OHHTTPStubs'` to your `Podfile`. If you **intend to use it from Swift**, you should **add** `OHHTTPStubs/Swift` to your `Podfile` as well. + +```ruby +pod 'OHHTTPStubs' # Default subspecs, including support for NSURLSession & JSON etc +pod 'OHHTTPStubs/Swift' # Adds the Swiftier API wrapper too +``` + +### All available subspecs + +`OHHTTPStubs` is split into subspecs so that when using Cocoapods, you can get only what you need, no more, no less. + +* The default subspec includes `NSURLSession`, `JSON`, and `OHPathHelpers` +* The `Swift` subspec adds the Swiftier API (but doesn't include `NSURLSession` & `JSON` by itself) +* `HTTPMessage` and `Mocktail` are opt-in subspecs: list them explicitly if you need them +* `OHPathHelpers` doesn't depend on `Core` and can be used independently of `OHHTTPStubs` altogether + +
+List of all the subspecs & their dependencies + +Here's a list of which subspecs are included for each of the different lines you could use in your `Podfile`: + +| Subspec | Core | NSURLSession | JSON | Swift | OHPathHelpers | HTTPMessage | Mocktail | +| ------- | :---: | :----------: | :---: | :---: | :-----------: | :---------: | :------: | +| `pod 'OHHTTPStubs'` | ✅ | ✅ | ✅ | | ✅ | | | +| `pod 'OHHTTPStubs/Default'` | ✅ | ✅ | ✅ | | ✅ | | | +| `pod 'OHHTTPStubs/Swift'` | ✅ | | | ✅ | | | | +| `pod 'OHHTTPStubs/Core'` | ✅ | | | | | | | +| `pod 'OHHTTPStubs/NSURLSession'` | ✅ | ✅ | | | | | | +| `pod 'OHHTTPStubs/JSON'` | ✅ | | ✅ | | | | | +| `pod 'OHHTTPStubs/OHPathHelpers'` | | | | | ✅ | | | +| `pod 'OHHTTPStubs/HTTPMessage'` | ✅ | | | | | ✅ | | +| `pod 'OHHTTPStubs/Mocktail'` | ✅ | | | | | | ✅ | + +
+ +## Carthage + +`OHHTTPStubs` is also be compatible with Carthage. Just add it to your `Cartfile`. + +_Note: The `OHHTTPStubs.framework` built with Carthage will include **all** features of `OHHTTPStubs` turned on (in other words, all subspecs of the pod), including `NSURLSession` and `JSON` support, `OHPathHelpers`, `HTTPMessage` and `Mocktail` support, and the Swiftier API._ + +> Be warned that I don't personally use Carthage, so I won't be able to guarantee much help/support for it. + +## Using the right Swift Version of `OHHTTPStubs` for your project + +`OHHTTPStubs` supports Swift 2.2 (Xcode 7), and both Swift 2.3 and Swift 3.0 (Xcode 8) 🎉 + +Here are some details about the correct setup you need depending on how you integrated `OHHTTPStubs` into your project. + +
+CocoaPods + +If you use CocoaPods version [`1.1.0.beta.1`](https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.beta.1) or later, then CocoaPods will compile `OHHTTPStubs` with the right Swift Version matching the one you use for your project automatically. + +For more info, see [CocoaPods/CocoaPods#5540](https://github.com/CocoaPods/CocoaPods/pull/5540) and [CocoaPods/CocoaPods#5760](https://github.com/CocoaPods/CocoaPods/pull/5760). +
+ +
+Carthage + +The project is currently set up with `SWIFT_VERSION=2.3` on `master`. + +This means that the framework on `master` will build using Swift 2.2 on Xcode 7 and Swift 2.3 on Xcode 8. + +If you want Carthage to build the framework with Swift 3.0, you can use the `swift-3.0` branch, whose only difference with `master` is that the project's Build Settings set `SWIFT_VERSION=3.0` instead of `2.3`. + +_Note:_ Later, probably a few weeks after the Xcode 8 official release, we plan to merge the `swift-3.0` branch into `master` and create a _compatibility branch_ `swift-2.3` for Carthage users who have not migrated their Swift code yet. We'll try to keep the branch up-to-date with master as best we can. + +Hopefully, Carthage will address this in a future release. See the related issue [Carthage/Carthage#1445](https://github.com/Carthage/Carthage/issues/1445). +
# Special Considerations -## Using OHHTTPStubs in your Unit Tests +## Using OHHTTPStubs in your unit tests -`OHHTTPStubs` is ideal to write Unit Tests that normally would perform network requests. But if you use it in your Unit Tests, don't forget to: +`OHHTTPStubs` is ideal to write unit tests that normally would perform network requests. But if you use it in your unit tests, don't forget to: * remove any stubs you installed after each test — to avoid those stubs to still be installed when executing the next Test Case — by calling `[OHHTTPStubs removeAllStubs]` in your `tearDown` method. [see this wiki page for more info](https://github.com/AliSoftware/OHHTTPStubs/wiki/Remove-stubs-after-each-test) * be sure to wait until the request has received its response before doing your assertions and letting the test case finish (like for any asynchronous test). [see this wiki page for more info](https://github.com/AliSoftware/OHHTTPStubs/wiki/OHHTTPStubs-and-asynchronous-tests) @@ -101,11 +182,11 @@ If you need to disable (and re-enable) `OHHTTPStubs` — globally or per `NSURLS _As far as I know, there's nothing we can do about those two limitations. Please let me know if you know a solution that would make that possible anyway._ -## Submitting to the AppStore +## Submitting to the App Store -`OHHTTPStubs` **can be used** on apps submitted **on the AppStore**. It does not use any private API and nothing prevents you from shipping it. +`OHHTTPStubs` **can be used** on apps submitted **on the App Store**. It does not use any private API and nothing prevents you from shipping it. -But you generally only use stubs during the development phase and want to remove your stubs when submitting to the AppStore. So be careful to only include `OHHTTPStubs` when needed (only in your test targets, or only inside `#if DEBUG` portions, or by using [per-Build-Configuration pods](https://guides.cocoapods.org/syntax/podfile.html#pod)) to avoid forgetting to remove it when the time comes that you release for the AppStore and you want your requests to hit the net! +But you generally only use stubs during the development phase and want to remove your stubs when submitting to the App Store. So be careful to only include `OHHTTPStubs` when needed (only in your test targets, or only inside `#if DEBUG` sections, or by using [per-Build-Configuration pods](https://guides.cocoapods.org/syntax/podfile.html#pod)) to avoid forgetting to remove it when the time comes that you release for the App Store and you want your requests to hit the real network! @@ -117,4 +198,4 @@ It has been inspired by [this article from InfiniteLoop.dk](http://www.infinite- I would also like to thank Kevin Harwood ([@kcharwood](https://github.com/kcharwood)) for migrating the code to `NSInputStream`, Jinlian Wang ([@JinlianWang](https://github.com/JinlianWang)) for adding Mocktail support, and everyone else who contributed to this project on GitHub somehow. -If you want to support the development of this library, feel free to [![Donate](http://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TRTU3UEWEHV92 "Donate"). Thanks to all contributors so far! +If you want to support the development of this library, feel free to [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TRTU3UEWEHV92 "Donate"). Thanks to all contributors so far! diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 03cc354..7b884c8 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,244 +7,337 @@ objects = { /* Begin PBXBuildFile section */ - 05A232BDABB70CDFA8866A15209902C8 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */; }; - 05F57DB1DF9DC9F1DC5BA02CF0C83103 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */; }; - 0C1B4E9FFB8B81E8833A3BAD537B1990 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */; }; - 12118C354EFA36292F82A8D0CFCE45B2 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */; }; - 12D2F7AA45E613F050F3BF2F39BBA47B /* OHHTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = AA00E0101286C4EA4CAFD71FED6AB975 /* OHHTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 32A59DBF168A9B955C020B5719EBCB0D /* OHHTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 99BB0E773A4270CB40969C6AE003138B /* OHHTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 33CF8828DAEF041D4B239FE98C91AD3E /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAF895630194862E697B0F8A24A1997 /* OHHTTPStubs+NSURLSessionConfiguration.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 387B673926C97011BC576EC8064530A6 /* OHHTTPStubs-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D742756C06BA3CA85A3DB8D87DF84B8 /* OHHTTPStubs-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3982B850C43B41BA6D25F440F0412E9B /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */; }; - 4BC04237995CF690E2E2AF9727F9A72B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - 572AE99BB35CB6DFEFF19E74B0BDD3F8 /* Pods-LotameDMP_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */; }; - 5F71AC3EEF87C19AF3D8463DC0390970 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */; }; - 62143065F94E53F437DCE5D7A998D66D /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */; }; - 623FD70CADFD4593E65178BBAD28298E /* OHHTTPStubs-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 96D26DD0113CE8C203AB4708A9511491 /* OHHTTPStubs-dummy.m */; }; - 6B1C00F3DED5CA430DAD920B385B2E33 /* OHPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 930F39323D32CA5090E63B5F79DD6534 /* OHPathHelpers.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 6B21B7E82C6A41BBD99DE1D08225406E /* LotameDMP.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */; }; - 7CA5A9BA5246FDA8227233E310029392 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */; }; - 86ED08F33B7D357932A9AB743E9D9EA7 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E4018A949737B851B6F6630C9E83D48 /* Response.swift */; }; - 876EDA2433FA95337E2D771F302C5203 /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C1B8B21FED3FC1E18D701D856B6DD7C /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8CD152E0420FE4DDEDCDB5991C2022B2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - 8D463A0A4C65C02FDD5211F0F3C6F8B8 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */; }; - 907AB123FBC8BC9340D5B7350CE828DF /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */; }; - 9469DF81ECB494E84675969B5E13374C /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 991B2C9AE8F450C35CF57FA15E0AAABC /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */; }; - A194DEE96E5D5C9D61FD6CFCB61E91BD /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 3005CA8FA79E87B0E6388D53F6573ABD /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A20BA8DB7AA816391AE32C1F91F988B9 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */; }; - A6CCC994A5541AB7ADE2DA96E90CC702 /* OHPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = C3A3EF06093D9C45436E81EBF4334E9E /* OHPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A79AC30123B0C2177D67F6ED6A1B3215 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */; }; - AF158CAAF4DD319009AFC855DC995D90 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */; }; - B45A3E4244B4E8ABA6BBA26F6AC727F8 /* Pods-LotameDMP_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */; }; - B53F9B91A0CBD8B2FA06E31D9B058D6F /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */; }; - B8154C96802336E5DDA5CEE97C3180A0 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */; }; - C0AEA97E7684DDAD56998C0AE198A433 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */; }; - C2BDA028DB762F64A26DAB0B98EB29CA /* LotameDMP-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */; }; - C331F4CD251C22970EB86DCE1DF7F794 /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 0679B210B6951C4CEE08C6AC5BEB70FA /* OHHTTPStubsResponse.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C7A3408350643ADE1018826C766EE356 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */; }; - C80B89584525646FD62EAC6016567D67 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - C9F90C2C178321C30D5145422B636837 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - CB51CFA9BFBF0DB45C73F766F764F54C /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */; }; - D21340D5263977F89ACC086AA6C8064A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - D2364D047E3D8E0316F69BE1FC34A676 /* Pods-LotameDMP_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DF1BBF94997A2F4248B42B25EA919EC2 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */; }; - E1F583CB4A68A928CD197250AA752926 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */; }; - E2A1C34237B4E928E5F85C097F4C2551 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */; }; - E365AC4BF252B784D4812AF8DD283CAF /* LotameDMP-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E59BF19C0AFA68B741552319FC478C7B /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */; }; - E8E7CCF090EC2EB4E3C29D2954D21F17 /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 384AC83FE0ED15FD5BB52DF20A536D59 /* OHHTTPStubs.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F0D97D2DA24F280B10C717A0D8318E8E /* Pods-LotameDMP_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F1B199D167AF74FCE8EF5DA74002EDD5 /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */; }; - F21D0F96BA6EDE58E4F70E83568E07D5 /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DC89220C461D008FA4C5EA0E4C9DB4A /* OHHTTPStubsResponse+JSON.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - FFFDD494EE6D1B83DDAF5F2721F685A6 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */; }; + 01CC1AFE147B3B5F2C179D0C1B91E40F /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E8617406214F3EDC81C0D28E9C681D2 /* MultipartFormData.swift */; }; + 037D757A3D7DD0547E5CC0065EE230AC /* Pods-LotameDMP_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */; }; + 091ADA0AB1CFE0835F0E066C7C062807 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECAB7E6BC7C1FE9A0D961E9CF4C1C30B /* Notifications.swift */; }; + 0B7F02E4ACF91D125EE659C8FEEF331E /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */; }; + 0B850F421E2E59A080ADFB21C713CA26 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */; }; + 0B9F8A0E971945BC76BD9E718E40BACE /* Pods-LotameDMP_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0CAFEBB06A47D4726995530487166FB1 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = A43C7C330BFE464861C3082D3C2B037D /* Response.swift */; }; + 0FE9A366EC1A26CCEE87264CFBA0B8A8 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0767F757FDFD7FD1A6273AA6DD1887ED /* Request.swift */; }; + 12478EC74416B56096699C3A4492B9E0 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = A43C7C330BFE464861C3082D3C2B037D /* Response.swift */; }; + 1BBE09565B92139CF73200DB2A4B4743 /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A337E6CFCD7ACBED4B81F7733F9B638 /* LotameAudience.swift */; }; + 1C64932FA286C76276A32A4BC4F3C6DE /* OHHTTPStubs-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DCA7717A3800DDA1015E452884C7705 /* OHHTTPStubs-dummy.m */; }; + 2061BCF4EBBC100AFC2DD592D03A3236 /* Alamofire-iOS9.0-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B95C5EE76D316A1FC6F58962D5885C6 /* Alamofire-iOS9.0-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 239CD78D8F37C3B373805277440C8831 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E0834065FE407ABB67206A1ACA136B /* DMP.swift */; }; + 2828C5A8C3FF12A877F8243078BFE26F /* OHHTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8C1F3E527E68DA3B97AFC4CAD9B11C /* OHHTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D0FF0DEDA036CC7F14FBE44C461DBDD /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A337E6CFCD7ACBED4B81F7733F9B638 /* LotameAudience.swift */; }; + 2DBE8ACDEF1BA8DE4BC5118F1FA9BEC8 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882CF88E5C611241A2FDB54E9F407661 /* ParameterEncoding.swift */; }; + 3084191BDC83456B1401C24DB3AACF8F /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 450C401487E8F40DA326418DE2D54A62 /* OHHTTPStubsResponse.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 3416A8609A0CFEAA9EAF6027E7FE0B4B /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98AE9A0DC079D71AACBC526BD9921FCB /* SessionDelegate.swift */; }; + 3A452200BC2390097F26B5459FF7A48C /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F60292E408915B79A971861C015FD93 /* TaskDelegate.swift */; }; + 3D4FD21A17BD898421D9A30A3534204D /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98AE9A0DC079D71AACBC526BD9921FCB /* SessionDelegate.swift */; }; + 3DE5565BAE66ED6E4AD42EF99938AC45 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9FB630F740E749C1F2C18932D6DCB7 /* Timeline.swift */; }; + 45BC8F1673BB168CCAAF4262F272E7EA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + 4BE9929A79FC78F53F1635FD61281888 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882CF88E5C611241A2FDB54E9F407661 /* ParameterEncoding.swift */; }; + 531BD362CD7BE467B3C15DEF961C6732 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9FB630F740E749C1F2C18932D6DCB7 /* Timeline.swift */; }; + 55AD0FF7EF0CADA0311932BA55754EEC /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */; }; + 57BEF5452B8ABD57683D286244C7FC94 /* OHHTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = AD13AFBDCEBD92B6BEE3E5A71440DDC2 /* OHHTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5BAB1595D9AFEA8B21D1A9E8F59C38F4 /* LotameDMP.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */; }; + 5C6BF9C2AB15CF5AA6D9EBFADE879BAC /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A31847BEE120C869C0BBAEEF2A4A9C7 /* ResponseSerialization.swift */; }; + 5CCC6EEAE17971AEB330EADD42CE822F /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FC61C5614265D7EC6B79B2F91E71E45 /* LotameError.swift */; }; + 5E6C1A6961FB342C12B84B0A0DFC8DDB /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FC61C5614265D7EC6B79B2F91E71E45 /* LotameError.swift */; }; + 63DE5BFFB9F8D7F725667A93F5A43275 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + 64C91FFBDEDD820655E28F38024FEE22 /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 33C710F419C86BCD50AEDD19604021C7 /* OHHTTPStubsResponse+JSON.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 6505FA6B758D3CD261E5464F70DC0C69 /* LotameDMP-iOS10.0-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BB0490DFD47B046C7205F0A56FA3675 /* LotameDMP-iOS10.0-dummy.m */; }; + 680E6F8B04824ED80E7C674367B1A3C5 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECAB7E6BC7C1FE9A0D961E9CF4C1C30B /* Notifications.swift */; }; + 6AFA1B424EA98346063BD2E439A2EA4C /* OHHTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 36754F82CE5BC199C2601EDE46F1B290 /* OHHTTPStubsMethodSwizzling.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6B9FFB56F125AC6323AD1EFFCDF35AD4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + 6C847EBBA88F56CD9B9660C1E03D2E21 /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6F2BDEA2A39F356EB8BBC02F8BC49E /* AFError.swift */; }; + 6E699DCCB9065C22C8825AF81BEE2216 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 623AECE894294068CCF1B7B41BE25C5A /* ServerTrustPolicy.swift */; }; + 729532F2F92C16C4142CE64B79D6478B /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */; }; + 76C8C34D494F9C6C6DCFD2FA7513B448 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0767F757FDFD7FD1A6273AA6DD1887ED /* Request.swift */; }; + 774BF01C970236E42A554FDE8061881E /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F60292E408915B79A971861C015FD93 /* TaskDelegate.swift */; }; + 7761B68FA15475DE26FF2EBF75B936B1 /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6F2BDEA2A39F356EB8BBC02F8BC49E /* AFError.swift */; }; + 789F26DE511CFB4EA5E1A22D964A8D84 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E8617406214F3EDC81C0D28E9C681D2 /* MultipartFormData.swift */; }; + 7A2F295B5717E1435290012F20C4D834 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B810ECD27B3196894997BC2BE51CCE0 /* Alamofire.swift */; }; + 7AF863D60D5AF3B59EF70B0E8EDBF1A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + 83A37634F48394BD93F108582501A4C4 /* OHPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 76627F3692CA4DA887DED51DC68CF81E /* OHPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8A3179F7624AA2DC57A99DBB4E784220 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + 8E97FFAD8F1B579C37EE073BC702858E /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 623AECE894294068CCF1B7B41BE25C5A /* ServerTrustPolicy.swift */; }; + 93B19A9281A886F680D22A5437D6B5CA /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8056037CD6EAF8A215F77DB8E24C6AED /* SessionManager.swift */; }; + 9890E6D0FDF36E4CA8ACA675C86FC6D2 /* OHHTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = F945C090757C5DBD90F1D57EB0575534 /* OHHTTPStubsMethodSwizzling.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 992ECC889873A67632A92D727A870E6E /* LotameDMP-iOS9.0-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EE03DEA311B16035FA23F33F9A1F3CA2 /* LotameDMP-iOS9.0-dummy.m */; }; + 9937070ABBA54FBBA7BA0F3D3D2D3331 /* Pods-LotameDMP_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */; }; + 9A7BCF8905D2D62265995BD9DF67409C /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0252326AD6D69CC243DD317511C08CF8 /* DispatchQueue+Alamofire.swift */; }; + A05A788C2F8B159207F5144ECA1A5848 /* Alamofire-iOS10.0-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C3417E8B71CAC774E5A06B8DDF0761F /* Alamofire-iOS10.0-dummy.m */; }; + A0A2186A1786188B449AEB083BBB7891 /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = FEF0E8CE9EEB29DC85302F94CC30BAFE /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A2C1B3946F6B6A2667189BFF5D183362 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + AB6CC72B1FDEBAD923EBEE4AA08D4C38 /* LotameDMP-iOS9.0-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 77AEE63024C196407E80C730BB5337BA /* LotameDMP-iOS9.0-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B12A2150AEA52FDEAF3B7C904F569327 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7DABA157120A51F189CDE48E4E2A67 /* SwiftyJSON.swift */; }; + B71274CE2E5707A2AD5688829FE616D0 /* OHHTTPStubs-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 69E64B61FD883181243E9D59370F9969 /* OHHTTPStubs-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B7D36D88DB776AA1DEA9FF8D6698EE93 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2410B52E9B93C70E86383ACD8FACE80 /* NetworkReachabilityManager.swift */; }; + BBB74AB011C88149BC65C2C10B6E6A19 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E0834065FE407ABB67206A1ACA136B /* DMP.swift */; }; + BBD53CB8D94BD8B0CF6D449A29E50EA2 /* Alamofire-iOS9.0-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A04CC6A54C5AC969F0C82E660F95E8E /* Alamofire-iOS9.0-dummy.m */; }; + C08DA65FCB929D311DA968E3FA0E682E /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A31847BEE120C869C0BBAEEF2A4A9C7 /* ResponseSerialization.swift */; }; + C5ED19E01DFC9993E0C9AB6C85ACAB1D /* NSURLRequest+HTTPBodyTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F8FCA014B1789B8B5609863F8392BEC /* NSURLRequest+HTTPBodyTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C6D5BEAE5AB74B6830DC1AA37DADB677 /* LotameDMP-iOS10.0-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0034ADA49852DFD9E80588ABA332045E /* LotameDMP-iOS10.0-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C7C6308566067884C551167827699C3D /* Pods-LotameDMP_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C86DFF71F80F40AD1FEAF1B4824A4E1F /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = A99BCD8F756C9FBCF06150555C1E1BCF /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CA306BDBD477DE20CD0836C7F5F0BF4B /* OHPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = C6649F10029169FD60CF7AA94B4634A6 /* OHPathHelpers.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + CA583D09B1ABAB5C4063B0E2C16ADD5F /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B810ECD27B3196894997BC2BE51CCE0 /* Alamofire.swift */; }; + CC5DAF1BC6465892B620F2B63ADAF625 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2410B52E9B93C70E86383ACD8FACE80 /* NetworkReachabilityManager.swift */; }; + CC9121C6E4B0F6F19125B5941B4F419E /* LotameDMP.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */; }; + CD0C9C1AF391650853077B2C5E9B62E0 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9EABB9632D8C4132D837BCE73140767 /* Result.swift */; }; + CE5D2F0C60D98575DBF92C59FB55F251 /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */; }; + D04F942837A16D37FA498832A73A80AA /* Alamofire-iOS10.0-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CA3193EB2A2E97C49E066AAB340F273 /* Alamofire-iOS10.0-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D06655905EB690BD8ADE27D2BFC5827F /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */; }; + D270D1BB315595AA39B9E6494A62E3FD /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8056037CD6EAF8A215F77DB8E24C6AED /* SessionManager.swift */; }; + D54BA76997BAE001826939EEFBD7FBFB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + DC2318049E9595208DE21CA6E2CAA8A9 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */; }; + DC3BE4B3C6C098A5B9B063DB25FCDF8B /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A66376F5E3BAE650D43BBCEA0ACDB7B /* NSURLRequest+HTTPBodyTesting.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + DF3AE4A4097670F36803AEE59537E02C /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0252326AD6D69CC243DD317511C08CF8 /* DispatchQueue+Alamofire.swift */; }; + E051B949D969BCE0CD553D323D63977E /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EC482F90295CA01765BA58BB2653694 /* OHHTTPStubs.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + E5B71C56378B6BE4231A12B10446918B /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */; }; + E7B6985839F2AB81EC6355558E67E850 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7DABA157120A51F189CDE48E4E2A67 /* SwiftyJSON.swift */; }; + E9EBE49CF8E41611C732D969BBB118D0 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */; }; + FCD41DBC7B4375ACEEFA1BA388F074C8 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9EABB9632D8C4132D837BCE73140767 /* Result.swift */; }; + FFE0D1C890897CF1AE34EC147C84BA2C /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = F8924EE5D6D964DB953650FD76B83B9E /* OHHTTPStubs+NSURLSessionConfiguration.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 464490E8BA5DE172FE0DC8BE21F8E3B0 /* PBXContainerItemProxy */ = { + 19AD2CDB1DA843B9FB7BF815AFAC68AA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = B9F753D23B3A010D0E2EB0AE0405D595; - remoteInfo = OHHTTPStubs; + remoteGlobalIDString = D87A7631F55449935013E12A25C8B1E0; + remoteInfo = "LotameDMP-iOS10.0"; + }; + 282AFDD21B3E818E75B351C280A7EB8B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = C4380F3332F12FC09D2A3954BD9C2DC4; + remoteInfo = "LotameDMP-iOS10.0-LotameDMP"; + }; + 2C1F0FA0F597C7F66EADFC3BD1DB89A9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = CF0578DE89449D99766E5B48E4303D42; + remoteInfo = "Alamofire-iOS9.0"; }; - 505EFE26C4FEAFB5A8CDB63809DD1578 /* PBXContainerItemProxy */ = { + 56CB0FE53721D73002608E530B3C49CA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 9D0644CBCDD3B6B08C644A8D3E94551D; - remoteInfo = LotameDMP; + remoteGlobalIDString = 3F6EBEE64D06BFC30FB5DF93053F4F23; + remoteInfo = "Alamofire-iOS10.0"; }; - 55A91AC4BA2B1629E51C6C624CF664FE /* PBXContainerItemProxy */ = { + 6F137E5C76DA95AC8D8DD0DC7C868FCA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 79C040AFDDCE1BCBF6D8B5EB0B85887F; - remoteInfo = Alamofire; + remoteGlobalIDString = CF0578DE89449D99766E5B48E4303D42; + remoteInfo = "Alamofire-iOS9.0"; }; - 96DF70416F4AFDBE7A852A2CC34949FF /* PBXContainerItemProxy */ = { + 95B819C76090FD612A20FD21463A199C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 79C040AFDDCE1BCBF6D8B5EB0B85887F; - remoteInfo = Alamofire; + remoteGlobalIDString = CF0578DE89449D99766E5B48E4303D42; + remoteInfo = "Alamofire-iOS9.0"; }; - A43CDCCF2FB8E000EAECF2EB61B76F34 /* PBXContainerItemProxy */ = { + B93FAEEBDA1334DB34EE2163155DC00C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = A033892886A83D4ED36187E20BE0D656; - remoteInfo = "LotameDMP-LotameDMP"; + remoteGlobalIDString = 06A23325201207EEE8C22E3551E28E4A; + remoteInfo = OHHTTPStubs; }; - C4EFDDA051719C1D2E4A6F42164629EA /* PBXContainerItemProxy */ = { + BD90D9E1A31EC2E04C74BC273819A83C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 79C040AFDDCE1BCBF6D8B5EB0B85887F; - remoteInfo = Alamofire; + remoteGlobalIDString = A7E6A570A5796A971F7741E4F1312193; + remoteInfo = "LotameDMP-iOS9.0"; }; - FA413DC43ED0B265D263528AA0F113CA /* PBXContainerItemProxy */ = { + E318233F5CFC5CA675BED8653F5CFE14 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 9D0644CBCDD3B6B08C644A8D3E94551D; - remoteInfo = LotameDMP; + remoteGlobalIDString = D7973520D24620B7007E55AE03895B6A; + remoteInfo = "LotameDMP-iOS9.0-LotameDMP"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 04075B8A4826297DFB273C8A46BDFE07 /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; - 0679B210B6951C4CEE08C6AC5BEB70FA /* OHHTTPStubsResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsResponse.m; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.m; sourceTree = ""; }; + 0034ADA49852DFD9E80588ABA332045E /* LotameDMP-iOS10.0-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-iOS10.0-umbrella.h"; sourceTree = ""; }; + 0252326AD6D69CC243DD317511C08CF8 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; + 06CDC14360D5B86C048533BFF2423E09 /* Alamofire-iOS10.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-iOS10.0-prefix.pch"; sourceTree = ""; }; + 0767F757FDFD7FD1A6273AA6DD1887ED /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + 091715455495A385122589395850ED36 /* OHHTTPStubs.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = OHHTTPStubs.modulemap; sourceTree = ""; }; + 0F8FCA014B1789B8B5609863F8392BEC /* NSURLRequest+HTTPBodyTesting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+HTTPBodyTesting.h"; path = "OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h"; sourceTree = ""; }; 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/AdSupport.framework; sourceTree = DEVELOPER_DIR; }; - 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 145B43A6485C114F242C01AD2353716A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.debug.xcconfig"; sourceTree = ""; }; 181F8F5C57F8A1DBFBCD6CDB7E049E10 /* Pods-LotameDMP_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - 1A112D98F7E15E89C5EC7C4BBDF995DB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1C4D80FF794C4A13B9739893FFD59DFD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1E4018A949737B851B6F6630C9E83D48 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - 22773853957E083ED85EA9DE08D78838 /* OHHTTPStubs-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-prefix.pch"; sourceTree = ""; }; - 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; + 262230FF6CF750AC96C152F6923C8175 /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Tests.framework; path = "Pods-LotameDMP_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2866D261378FCD4FE14943A99A722B77 /* Pods-LotameDMP_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-LotameDMP_Example.modulemap"; sourceTree = ""; }; - 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; - 3005CA8FA79E87B0E6388D53F6573ABD /* Compatibility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Compatibility.h; path = OHHTTPStubs/Sources/Compatibility.h; sourceTree = ""; }; - 384AC83FE0ED15FD5BB52DF20A536D59 /* OHHTTPStubs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubs.m; path = OHHTTPStubs/Sources/OHHTTPStubs.m; sourceTree = ""; }; - 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DMP.swift; sourceTree = ""; }; + 282D6F4E2A4BDA0D03D8CECC95C4D50F /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = "Alamofire-iOS10.0.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2866D261378FCD4FE14943A99A722B77 /* Pods-LotameDMP_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-LotameDMP_Example.modulemap"; sourceTree = ""; }; + 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameProfile.swift; sourceTree = ""; }; + 33C710F419C86BCD50AEDD19604021C7 /* OHHTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubsResponse+JSON.m"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m"; sourceTree = ""; }; + 3471B4AC871F2345EF2D38EC0476BB55 /* OHHTTPStubs-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-prefix.pch"; sourceTree = ""; }; + 36754F82CE5BC199C2601EDE46F1B290 /* OHHTTPStubsMethodSwizzling.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsMethodSwizzling.h; path = OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h; sourceTree = ""; }; + 3DCA7717A3800DDA1015E452884C7705 /* OHHTTPStubs-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs-dummy.m"; sourceTree = ""; }; 3F6843AA96F513831A4CBD26850657A8 /* Pods-LotameDMP_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LotameDMP_Example-acknowledgements.plist"; sourceTree = ""; }; - 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - 4927332025C324CA11BC68E9ADD97C5E /* Pods-LotameDMP_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-LotameDMP_Tests.modulemap"; sourceTree = ""; }; + 3FC61C5614265D7EC6B79B2F91E71E45 /* LotameError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameError.swift; sourceTree = ""; }; + 4033AEA3CE94BE03ACC3D0C2EA5D590C /* LotameDMP-iOS10.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "LotameDMP-iOS10.0.modulemap"; sourceTree = ""; }; + 450C401487E8F40DA326418DE2D54A62 /* OHHTTPStubsResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsResponse.m; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.m; sourceTree = ""; }; + 47D65711A6B65068A70A007D9ACE5114 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = LotameDMP.framework; path = "LotameDMP-iOS9.0.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 48A05BF1BB23DC831BCA06D26A10DDF8 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = "Alamofire-iOS9.0.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4927332025C324CA11BC68E9ADD97C5E /* Pods-LotameDMP_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-LotameDMP_Tests.modulemap"; sourceTree = ""; }; + 4C7266D0A29AB74C931B180587468B9E /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "ResourceBundle-LotameDMP-Info.plist"; path = "../LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; + 4ED4C285145DF1B4676E902E764344F1 /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; + 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OHHTTPStubs.xcconfig; sourceTree = ""; }; 51F9A814E2B204818DF97B58DB17FDCF /* Pods-LotameDMP_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Example-frameworks.sh"; sourceTree = ""; }; - 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; 581AC0E6A878A80EFCC3C5A83CA83488 /* Pods-LotameDMP_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Tests-resources.sh"; sourceTree = ""; }; - 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LotameDMP-dummy.m"; sourceTree = ""; }; - 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5A337E6CFCD7ACBED4B81F7733F9B638 /* LotameAudience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameAudience.swift; sourceTree = ""; }; + 5BF284DEBB6EACC306B2DF3FEC7CBEA3 /* LotameDMP-iOS9.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "LotameDMP-iOS9.0-prefix.pch"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch"; sourceTree = ""; }; + 5C3417E8B71CAC774E5A06B8DDF0761F /* Alamofire-iOS10.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-iOS10.0-dummy.m"; sourceTree = ""; }; + 5EC482F90295CA01765BA58BB2653694 /* OHHTTPStubs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubs.m; path = OHHTTPStubs/Sources/OHHTTPStubs.m; sourceTree = ""; }; + 5F60292E408915B79A971861C015FD93 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; + 623AECE894294068CCF1B7B41BE25C5A /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Example-umbrella.h"; sourceTree = ""; }; - 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LotameDMP.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; + 6914C8FC159AFDE5B159D8DBAAD40D20 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Example.framework; path = "Pods-LotameDMP_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 69E64B61FD883181243E9D59370F9969 /* OHHTTPStubs-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-umbrella.h"; sourceTree = ""; }; 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - 6D742756C06BA3CA85A3DB8D87DF84B8 /* OHHTTPStubs-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-umbrella.h"; sourceTree = ""; }; - 6DC89220C461D008FA4C5EA0E4C9DB4A /* OHHTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubsResponse+JSON.m"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m"; sourceTree = ""; }; - 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameAudience.swift; sourceTree = ""; }; - 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - 7D1A4BE8E4619E5421597874BAA43CA7 /* OHHTTPStubs.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OHHTTPStubs.xcconfig; sourceTree = ""; }; - 7DAF895630194862E697B0F8A24A1997 /* OHHTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubs+NSURLSessionConfiguration.m"; path = "OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; - 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-umbrella.h"; sourceTree = ""; }; - 867FB9BC000430BD8D288DE00752090F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = ""; }; - 930F39323D32CA5090E63B5F79DD6534 /* OHPathHelpers.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHPathHelpers.m; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 6B8C1F3E527E68DA3B97AFC4CAD9B11C /* OHHTTPStubsResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsResponse.h; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.h; sourceTree = ""; }; + 72752AEE09866F4907EFE25A23E1EFBA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 76627F3692CA4DA887DED51DC68CF81E /* OHPathHelpers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHPathHelpers.h; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h; sourceTree = ""; }; + 77AEE63024C196407E80C730BB5337BA /* LotameDMP-iOS9.0-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "LotameDMP-iOS9.0-umbrella.h"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h"; sourceTree = ""; }; + 7A04CC6A54C5AC969F0C82E660F95E8E /* Alamofire-iOS9.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "Alamofire-iOS9.0-dummy.m"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m"; sourceTree = ""; }; + 7A66376F5E3BAE650D43BBCEA0ACDB7B /* NSURLRequest+HTTPBodyTesting.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLRequest+HTTPBodyTesting.m"; path = "OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m"; sourceTree = ""; }; + 7B95C5EE76D316A1FC6F58962D5885C6 /* Alamofire-iOS9.0-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Alamofire-iOS9.0-umbrella.h"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h"; sourceTree = ""; }; + 7E8617406214F3EDC81C0D28E9C681D2 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; + 7F1013EC32FE788FB4160A402115608A /* Alamofire-iOS9.0.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Alamofire-iOS9.0.xcconfig"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig"; sourceTree = ""; }; + 8056037CD6EAF8A215F77DB8E24C6AED /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; + 81E0834065FE407ABB67206A1ACA136B /* DMP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DMP.swift; sourceTree = ""; }; + 84169E163894A1760462BE867D38856F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 85ED04B28CE676ED2BC92936A790DECF /* LotameDMP-iOS10.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-iOS10.0-prefix.pch"; sourceTree = ""; }; + 878B0F039C6D02852C2F2A51A49948DE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = Info.plist; path = "../LotameDMP-iOS9.0/Info.plist"; sourceTree = ""; }; + 882CF88E5C611241A2FDB54E9F407661 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; + 8B810ECD27B3196894997BC2BE51CCE0 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; + 8BB0490DFD47B046C7205F0A56FA3675 /* LotameDMP-iOS10.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LotameDMP-iOS10.0-dummy.m"; sourceTree = ""; }; + 8BCF80AA58C7D3B8224E63B6D74A92F1 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = LotameDMP.framework; path = "LotameDMP-iOS10.0.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8E6F2BDEA2A39F356EB8BBC02F8BC49E /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.release.xcconfig"; sourceTree = ""; }; - 93C307C45E5B6F04CD4099CA7FDA8FA9 /* LotameDMP-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-prefix.pch"; sourceTree = ""; }; - 96D26DD0113CE8C203AB4708A9511491 /* OHHTTPStubs-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs-dummy.m"; sourceTree = ""; }; - 978C8A2D546E1949D139D06B78F1D107 /* LotameDMP.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = LotameDMP.modulemap; sourceTree = ""; }; - 99BB0E773A4270CB40969C6AE003138B /* OHHTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "OHHTTPStubsResponse+JSON.h"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h"; sourceTree = ""; }; - 9C1B8B21FED3FC1E18D701D856B6DD7C /* OHHTTPStubs.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubs.h; path = OHHTTPStubs/Sources/OHHTTPStubs.h; sourceTree = ""; }; - A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - AA00E0101286C4EA4CAFD71FED6AB975 /* OHHTTPStubsResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsResponse.h; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.h; sourceTree = ""; }; - AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = LotameDMP.xcconfig; sourceTree = ""; }; + 98AE9A0DC079D71AACBC526BD9921FCB /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; + 9A31847BEE120C869C0BBAEEF2A4A9C7 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; + 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "LotameDMP-iOS10.0.xcconfig"; sourceTree = ""; }; + 9B9FB630F740E749C1F2C18932D6DCB7 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; + 9C48C143F3E21CA2DFB22DA2BB3EE491 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = Info.plist; path = "../Alamofire-iOS9.0/Info.plist"; sourceTree = ""; }; + 9CA3193EB2A2E97C49E066AAB340F273 /* Alamofire-iOS10.0-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-iOS10.0-umbrella.h"; sourceTree = ""; }; + A2410B52E9B93C70E86383ACD8FACE80 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; + A43C7C330BFE464861C3082D3C2B037D /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; + A70A499FD9B8CFF2532FF3BB5C998578 /* Alamofire-iOS10.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Alamofire-iOS10.0.modulemap"; sourceTree = ""; }; + A99BCD8F756C9FBCF06150555C1E1BCF /* Compatibility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Compatibility.h; path = OHHTTPStubs/Sources/Compatibility.h; sourceTree = ""; }; + AD13AFBDCEBD92B6BEE3E5A71440DDC2 /* OHHTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "OHHTTPStubsResponse+JSON.h"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h"; sourceTree = ""; }; + ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; AF6E33079A0AC62440C75012BB20ED40 /* Pods-LotameDMP_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Example-acknowledgements.markdown"; sourceTree = ""; }; - AFA05A4CE29EBF8BA8720FDA80C8B3F2 /* OHHTTPStubs.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = OHHTTPStubs.modulemap; sourceTree = ""; }; - B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - B7F8DB5C4DBB1A49010816C7E0785934 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = ""; }; B974CEE3695BA2D211E692533A5C70EA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + BA15D4B76DDC32F659D7B89822179877 /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OHHTTPStubs.framework; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.release.xcconfig"; sourceTree = ""; }; - C3A3EF06093D9C45436E81EBF4334E9E /* OHPathHelpers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHPathHelpers.h; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h; sourceTree = ""; }; + C441E0187343E410A52A48157DBC726E /* Alamofire-iOS9.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Alamofire-iOS9.0-prefix.pch"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch"; sourceTree = ""; }; + C6649F10029169FD60CF7AA94B4634A6 /* OHPathHelpers.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHPathHelpers.m; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m; sourceTree = ""; }; + C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "LotameDMP-iOS9.0.xcconfig"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig"; sourceTree = ""; }; C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Tests-umbrella.h"; sourceTree = ""; }; - D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameError.swift; sourceTree = ""; }; D20FC0352198484DDB75C6398CAC2FAF /* Pods-LotameDMP_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Example-resources.sh"; sourceTree = ""; }; + D295FCF2431669A9064242122F027826 /* Alamofire-iOS10.0.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Alamofire-iOS10.0.xcconfig"; sourceTree = ""; }; + D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = LotameDMP.bundle; path = LotameDMP.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.debug.xcconfig"; sourceTree = ""; }; + D852568030BFB0D3C58F588C396316EB /* Alamofire-iOS9.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; name = "Alamofire-iOS9.0.modulemap"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap"; sourceTree = ""; }; D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Example-dummy.m"; sourceTree = ""; }; + D9EABB9632D8C4132D837BCE73140767 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Tests-dummy.m"; sourceTree = ""; }; - E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameProfile.swift; sourceTree = ""; }; - E6ACD92E8579844D7BA1F53B4F23746C /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - F097D40D5F132B5A9DBDF6C0B2CECB77 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E769DBCFFDBFA2A3533C64F8E5EECF0A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + ECAB7E6BC7C1FE9A0D961E9CF4C1C30B /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; + EE03DEA311B16035FA23F33F9A1F3CA2 /* LotameDMP-iOS9.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "LotameDMP-iOS9.0-dummy.m"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m"; sourceTree = ""; }; + F423AB5EF349327AEF58D8D94E8CB63B /* LotameDMP-iOS9.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; name = "LotameDMP-iOS9.0.modulemap"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; sourceTree = ""; }; F77E62830A158EAFB548B5FDA425C9B5 /* Pods-LotameDMP_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LotameDMP_Tests-acknowledgements.plist"; sourceTree = ""; }; - F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; + F8924EE5D6D964DB953650FD76B83B9E /* OHHTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubs+NSURLSessionConfiguration.m"; path = "OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; + F945C090757C5DBD90F1D57EB0575534 /* OHHTTPStubsMethodSwizzling.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsMethodSwizzling.m; path = OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m; sourceTree = ""; }; + FD7DABA157120A51F189CDE48E4E2A67 /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = ""; }; + FEF0E8CE9EEB29DC85302F94CC30BAFE /* OHHTTPStubs.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubs.h; path = OHHTTPStubs/Sources/OHHTTPStubs.h; sourceTree = ""; }; FF8C542B18C786E2D40F672B27921463 /* Pods-LotameDMP_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Tests-frameworks.sh"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 0EFACB34C47AAAB00276A03ACEABD439 /* Frameworks */ = { + 0895E6CEC19DE79E537E3A1370C3F449 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 11D0C66E0F774792832EAFA21448F3D1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D21340D5263977F89ACC086AA6C8064A /* Foundation.framework in Frameworks */, + 8A3179F7624AA2DC57A99DBB4E784220 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 1CDFCA9D9AAF4C00AEE7CD1BAEDD488C /* Frameworks */ = { + 12B5B1F12EA4B1343A1D95E84A3175AD /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 991B2C9AE8F450C35CF57FA15E0AAABC /* AdSupport.framework in Frameworks */, - 05A232BDABB70CDFA8866A15209902C8 /* Alamofire.framework in Frameworks */, - 4BC04237995CF690E2E2AF9727F9A72B /* Foundation.framework in Frameworks */, + D54BA76997BAE001826939EEFBD7FBFB /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 81535C02D233306AD224EB9D728C6777 /* Frameworks */ = { + 5C1F68CFB4A5A07528F3BF6774BCEB9C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C80B89584525646FD62EAC6016567D67 /* Foundation.framework in Frameworks */, + A2C1B3946F6B6A2667189BFF5D183362 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 85D1756C9E4631D75952CB16A05ED91D /* Frameworks */ = { + C7AE56C614EA98A5132171AE9A318E9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D06655905EB690BD8ADE27D2BFC5827F /* CFNetwork.framework in Frameworks */, + 7AF863D60D5AF3B59EF70B0E8EDBF1A8 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - B1729F851F648EC60EE93CDB3C8BAEAD /* Frameworks */ = { + E7388182A1F9F8C7EA73469D78B17CEF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C9F90C2C178321C30D5145422B636837 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - E6EF2F6AB2EC7AF7DA9DB4C3F2C450AF /* Frameworks */ = { + ED3AE368A95F7AF3938B11210E6569A3 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5F71AC3EEF87C19AF3D8463DC0390970 /* CFNetwork.framework in Frameworks */, - 8CD152E0420FE4DDEDCDB5991C2022B2 /* Foundation.framework in Frameworks */, + 45BC8F1673BB168CCAAF4262F272E7EA /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F3D84B60362EFC339E3D759923AF0F88 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0B850F421E2E59A080ADFB21C713CA26 /* AdSupport.framework in Frameworks */, + E9EBE49CF8E41611C732D969BBB118D0 /* Alamofire.framework in Frameworks */, + 6B9FFB56F125AC6323AD1EFFCDF35AD4 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F770A6FBEF84130AED379158F301CF81 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0B7F02E4ACF91D125EE659C8FEEF331E /* AdSupport.framework in Frameworks */, + E5B71C56378B6BE4231A12B10446918B /* Alamofire.framework in Frameworks */, + 63DE5BFFB9F8D7F725667A93F5A43275 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -269,111 +362,109 @@ path = "Target Support Files/Pods-LotameDMP_Tests"; sourceTree = ""; }; - 0E3CCE662D8600F8DF9E9F8A85DCBBF9 /* JSON */ = { + 1851ED4A1A7E9943AFD6F03016AB531C /* Classes */ = { isa = PBXGroup; children = ( - 99BB0E773A4270CB40969C6AE003138B /* OHHTTPStubsResponse+JSON.h */, - 6DC89220C461D008FA4C5EA0E4C9DB4A /* OHHTTPStubsResponse+JSON.m */, + 81E0834065FE407ABB67206A1ACA136B /* DMP.swift */, + 5A337E6CFCD7ACBED4B81F7733F9B638 /* LotameAudience.swift */, + 3FC61C5614265D7EC6B79B2F91E71E45 /* LotameError.swift */, + 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */, + FD7DABA157120A51F189CDE48E4E2A67 /* SwiftyJSON.swift */, ); - name = JSON; + name = Classes; + path = Classes; sourceTree = ""; }; - 14CC88387F82D38E9D298CA64170402C /* Support Files */ = { + 26554B40DD5D521D76B0A640DDEF7631 /* OHPathHelpers */ = { isa = PBXGroup; children = ( - B7F8DB5C4DBB1A49010816C7E0785934 /* Alamofire.modulemap */, - B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */, - A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */, - E6ACD92E8579844D7BA1F53B4F23746C /* Alamofire-prefix.pch */, - 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */, - F097D40D5F132B5A9DBDF6C0B2CECB77 /* Info.plist */, + 76627F3692CA4DA887DED51DC68CF81E /* OHPathHelpers.h */, + C6649F10029169FD60CF7AA94B4634A6 /* OHPathHelpers.m */, ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; + name = OHPathHelpers; sourceTree = ""; }; - 35C9CEA304EB44BD96BCB905E012EF0F /* NSURLSession */ = { + 291981D1C5D1DB7248DF6F23D7D6D47B /* LotameDMP */ = { isa = PBXGroup; children = ( - 7DAF895630194862E697B0F8A24A1997 /* OHHTTPStubs+NSURLSessionConfiguration.m */, + 88199B9C013A4C01DD435FF3A787CD6C /* Pod */, + 821BEBE1C53047B89AD5BCFF291ED3B9 /* Support Files */, ); - name = NSURLSession; + name = LotameDMP; + path = ../..; sourceTree = ""; }; - 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */ = { + 4221E0A3969D14A4F363204FCAC92C92 /* Core */ = { isa = PBXGroup; children = ( - 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */, - 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */, - 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */, - FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */, - 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */, - 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */, + A99BCD8F756C9FBCF06150555C1E1BCF /* Compatibility.h */, + FEF0E8CE9EEB29DC85302F94CC30BAFE /* OHHTTPStubs.h */, + 5EC482F90295CA01765BA58BB2653694 /* OHHTTPStubs.m */, + 6B8C1F3E527E68DA3B97AFC4CAD9B11C /* OHHTTPStubsResponse.h */, + 450C401487E8F40DA326418DE2D54A62 /* OHHTTPStubsResponse.m */, ); - name = Products; + name = Core; sourceTree = ""; }; - 4C94E45A856C7A3DDDA073DC9B24ECE0 /* Support Files */ = { + 4362454B75989F1CFE4168E0CD6DC258 /* Support Files */ = { isa = PBXGroup; children = ( - 867FB9BC000430BD8D288DE00752090F /* Info.plist */, - 978C8A2D546E1949D139D06B78F1D107 /* LotameDMP.modulemap */, - AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */, - 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */, - 93C307C45E5B6F04CD4099CA7FDA8FA9 /* LotameDMP-prefix.pch */, - 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */, - 04075B8A4826297DFB273C8A46BDFE07 /* ResourceBundle-LotameDMP-Info.plist */, + 84169E163894A1760462BE867D38856F /* Info.plist */, + 091715455495A385122589395850ED36 /* OHHTTPStubs.modulemap */, + 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.xcconfig */, + 3DCA7717A3800DDA1015E452884C7705 /* OHHTTPStubs-dummy.m */, + 3471B4AC871F2345EF2D38EC0476BB55 /* OHHTTPStubs-prefix.pch */, + 69E64B61FD883181243E9D59370F9969 /* OHHTTPStubs-umbrella.h */, ); name = "Support Files"; - path = "Example/Pods/Target Support Files/LotameDMP"; - sourceTree = ""; - }; - 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */ = { - isa = PBXGroup; - children = ( - 761DA5F47361031CA935D355D51B46E4 /* Pod */, - 4C94E45A856C7A3DDDA073DC9B24ECE0 /* Support Files */, - ); - name = LotameDMP; - path = ../..; - sourceTree = ""; - }; - 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - E9FC310342247B47409357C80424D3D9 /* Pods-LotameDMP_Example */, - 086EC7A6D5B8ACCABD0CBC6F2757A2AA /* Pods-LotameDMP_Tests */, - ); - name = "Targets Support Files"; + path = "../Target Support Files/OHHTTPStubs"; sourceTree = ""; }; - 6E2288D819F110E26CB6A65208851613 /* Core */ = { + 4E8C1B2B3A6C44CEBF6AC753A2198DBB /* NSURLSession */ = { isa = PBXGroup; children = ( - 3005CA8FA79E87B0E6388D53F6573ABD /* Compatibility.h */, - 9C1B8B21FED3FC1E18D701D856B6DD7C /* OHHTTPStubs.h */, - 384AC83FE0ED15FD5BB52DF20A536D59 /* OHHTTPStubs.m */, - AA00E0101286C4EA4CAFD71FED6AB975 /* OHHTTPStubsResponse.h */, - 0679B210B6951C4CEE08C6AC5BEB70FA /* OHHTTPStubsResponse.m */, + 0F8FCA014B1789B8B5609863F8392BEC /* NSURLRequest+HTTPBodyTesting.h */, + 7A66376F5E3BAE650D43BBCEA0ACDB7B /* NSURLRequest+HTTPBodyTesting.m */, + F8924EE5D6D964DB953650FD76B83B9E /* OHHTTPStubs+NSURLSessionConfiguration.m */, + 36754F82CE5BC199C2601EDE46F1B290 /* OHHTTPStubsMethodSwizzling.h */, + F945C090757C5DBD90F1D57EB0575534 /* OHHTTPStubsMethodSwizzling.m */, ); - name = Core; + name = NSURLSession; sourceTree = ""; }; - 73611F5E6043573B243A41EAE5D3002A /* OHPathHelpers */ = { + 5E575B50D99CC3676AC1E34B78386844 /* Alamofire */ = { isa = PBXGroup; children = ( - C3A3EF06093D9C45436E81EBF4334E9E /* OHPathHelpers.h */, - 930F39323D32CA5090E63B5F79DD6534 /* OHPathHelpers.m */, + 8E6F2BDEA2A39F356EB8BBC02F8BC49E /* AFError.swift */, + 8B810ECD27B3196894997BC2BE51CCE0 /* Alamofire.swift */, + 0252326AD6D69CC243DD317511C08CF8 /* DispatchQueue+Alamofire.swift */, + 7E8617406214F3EDC81C0D28E9C681D2 /* MultipartFormData.swift */, + A2410B52E9B93C70E86383ACD8FACE80 /* NetworkReachabilityManager.swift */, + ECAB7E6BC7C1FE9A0D961E9CF4C1C30B /* Notifications.swift */, + 882CF88E5C611241A2FDB54E9F407661 /* ParameterEncoding.swift */, + 0767F757FDFD7FD1A6273AA6DD1887ED /* Request.swift */, + A43C7C330BFE464861C3082D3C2B037D /* Response.swift */, + 9A31847BEE120C869C0BBAEEF2A4A9C7 /* ResponseSerialization.swift */, + D9EABB9632D8C4132D837BCE73140767 /* Result.swift */, + 623AECE894294068CCF1B7B41BE25C5A /* ServerTrustPolicy.swift */, + 98AE9A0DC079D71AACBC526BD9921FCB /* SessionDelegate.swift */, + 8056037CD6EAF8A215F77DB8E24C6AED /* SessionManager.swift */, + 5F60292E408915B79A971861C015FD93 /* TaskDelegate.swift */, + 9B9FB630F740E749C1F2C18932D6DCB7 /* Timeline.swift */, + ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */, + D095257A6E5D4CD034A6004381E99B81 /* Support Files */, ); - name = OHPathHelpers; + name = Alamofire; + path = Alamofire; sourceTree = ""; }; - 761DA5F47361031CA935D355D51B46E4 /* Pod */ = { + 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */ = { isa = PBXGroup; children = ( - F322A5A1B6C13971D8D024A6759ED2ED /* Classes */, + E9FC310342247B47409357C80424D3D9 /* Pods-LotameDMP_Example */, + 086EC7A6D5B8ACCABD0CBC6F2757A2AA /* Pods-LotameDMP_Tests */, ); - path = Pod; + name = "Targets Support Files"; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { @@ -383,7 +474,7 @@ A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */, CAD3C16957C45B9334B34B3F761CF915 /* Frameworks */, B747B143EACB612C450D4F57A6B1CD86 /* Pods */, - 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */, + B4F4DD2770344C25D626F71778FCDCB9 /* Products */, 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */, ); sourceTree = ""; @@ -398,49 +489,92 @@ name = iOS; sourceTree = ""; }; - 886873D511485B625BACE64C6876BC25 /* OHHTTPStubs */ = { + 821BEBE1C53047B89AD5BCFF291ED3B9 /* Support Files */ = { isa = PBXGroup; children = ( - 6E2288D819F110E26CB6A65208851613 /* Core */, - 0E3CCE662D8600F8DF9E9F8A85DCBBF9 /* JSON */, - 35C9CEA304EB44BD96BCB905E012EF0F /* NSURLSession */, - 73611F5E6043573B243A41EAE5D3002A /* OHPathHelpers */, - A08F6B4E9F238FEACB5B493B40E9F21F /* Support Files */, + 878B0F039C6D02852C2F2A51A49948DE /* Info.plist */, + 72752AEE09866F4907EFE25A23E1EFBA /* Info.plist */, + 4033AEA3CE94BE03ACC3D0C2EA5D590C /* LotameDMP-iOS10.0.modulemap */, + 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */, + 8BB0490DFD47B046C7205F0A56FA3675 /* LotameDMP-iOS10.0-dummy.m */, + 85ED04B28CE676ED2BC92936A790DECF /* LotameDMP-iOS10.0-prefix.pch */, + 0034ADA49852DFD9E80588ABA332045E /* LotameDMP-iOS10.0-umbrella.h */, + F423AB5EF349327AEF58D8D94E8CB63B /* LotameDMP-iOS9.0.modulemap */, + C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */, + EE03DEA311B16035FA23F33F9A1F3CA2 /* LotameDMP-iOS9.0-dummy.m */, + 5BF284DEBB6EACC306B2DF3FEC7CBEA3 /* LotameDMP-iOS9.0-prefix.pch */, + 77AEE63024C196407E80C730BB5337BA /* LotameDMP-iOS9.0-umbrella.h */, + 4C7266D0A29AB74C931B180587468B9E /* ResourceBundle-LotameDMP-Info.plist */, + 4ED4C285145DF1B4676E902E764344F1 /* ResourceBundle-LotameDMP-Info.plist */, ); - path = OHHTTPStubs; + name = "Support Files"; + path = "Example/Pods/Target Support Files/LotameDMP-iOS10.0"; sourceTree = ""; }; - A08F6B4E9F238FEACB5B493B40E9F21F /* Support Files */ = { + 88199B9C013A4C01DD435FF3A787CD6C /* Pod */ = { isa = PBXGroup; children = ( - 1A112D98F7E15E89C5EC7C4BBDF995DB /* Info.plist */, - AFA05A4CE29EBF8BA8720FDA80C8B3F2 /* OHHTTPStubs.modulemap */, - 7D1A4BE8E4619E5421597874BAA43CA7 /* OHHTTPStubs.xcconfig */, - 96D26DD0113CE8C203AB4708A9511491 /* OHHTTPStubs-dummy.m */, - 22773853957E083ED85EA9DE08D78838 /* OHHTTPStubs-prefix.pch */, - 6D742756C06BA3CA85A3DB8D87DF84B8 /* OHHTTPStubs-umbrella.h */, + 1851ED4A1A7E9943AFD6F03016AB531C /* Classes */, ); - name = "Support Files"; - path = "../Target Support Files/OHHTTPStubs"; + name = Pod; + path = Pod; sourceTree = ""; }; A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */ = { isa = PBXGroup; children = ( - 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */, + 291981D1C5D1DB7248DF6F23D7D6D47B /* LotameDMP */, ); name = "Development Pods"; sourceTree = ""; }; + B3C73CD853C9EE701F27D144FAF247B8 /* OHHTTPStubs */ = { + isa = PBXGroup; + children = ( + 4221E0A3969D14A4F363204FCAC92C92 /* Core */, + BE4EDC7660D0CC35E4826A4446D53989 /* JSON */, + 4E8C1B2B3A6C44CEBF6AC753A2198DBB /* NSURLSession */, + 26554B40DD5D521D76B0A640DDEF7631 /* OHPathHelpers */, + 4362454B75989F1CFE4168E0CD6DC258 /* Support Files */, + ); + name = OHHTTPStubs; + path = OHHTTPStubs; + sourceTree = ""; + }; + B4F4DD2770344C25D626F71778FCDCB9 /* Products */ = { + isa = PBXGroup; + children = ( + 282D6F4E2A4BDA0D03D8CECC95C4D50F /* Alamofire.framework */, + 48A05BF1BB23DC831BCA06D26A10DDF8 /* Alamofire.framework */, + D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */, + D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */, + 47D65711A6B65068A70A007D9ACE5114 /* LotameDMP.framework */, + 8BCF80AA58C7D3B8224E63B6D74A92F1 /* LotameDMP.framework */, + BA15D4B76DDC32F659D7B89822179877 /* OHHTTPStubs.framework */, + 6914C8FC159AFDE5B159D8DBAAD40D20 /* Pods_LotameDMP_Example.framework */, + 262230FF6CF750AC96C152F6923C8175 /* Pods_LotameDMP_Tests.framework */, + ); + name = Products; + sourceTree = ""; + }; B747B143EACB612C450D4F57A6B1CD86 /* Pods */ = { isa = PBXGroup; children = ( - EAF51503E6CA27F8FE9EF1FBDDD5A952 /* Alamofire */, - 886873D511485B625BACE64C6876BC25 /* OHHTTPStubs */, + 5E575B50D99CC3676AC1E34B78386844 /* Alamofire */, + B3C73CD853C9EE701F27D144FAF247B8 /* OHHTTPStubs */, ); name = Pods; sourceTree = ""; }; + BE4EDC7660D0CC35E4826A4446D53989 /* JSON */ = { + isa = PBXGroup; + children = ( + AD13AFBDCEBD92B6BEE3E5A71440DDC2 /* OHHTTPStubsResponse+JSON.h */, + 33C710F419C86BCD50AEDD19604021C7 /* OHHTTPStubsResponse+JSON.m */, + ); + name = JSON; + sourceTree = ""; + }; CAD3C16957C45B9334B34B3F761CF915 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -450,6 +584,26 @@ name = Frameworks; sourceTree = ""; }; + D095257A6E5D4CD034A6004381E99B81 /* Support Files */ = { + isa = PBXGroup; + children = ( + A70A499FD9B8CFF2532FF3BB5C998578 /* Alamofire-iOS10.0.modulemap */, + D295FCF2431669A9064242122F027826 /* Alamofire-iOS10.0.xcconfig */, + 5C3417E8B71CAC774E5A06B8DDF0761F /* Alamofire-iOS10.0-dummy.m */, + 06CDC14360D5B86C048533BFF2423E09 /* Alamofire-iOS10.0-prefix.pch */, + 9CA3193EB2A2E97C49E066AAB340F273 /* Alamofire-iOS10.0-umbrella.h */, + D852568030BFB0D3C58F588C396316EB /* Alamofire-iOS9.0.modulemap */, + 7F1013EC32FE788FB4160A402115608A /* Alamofire-iOS9.0.xcconfig */, + 7A04CC6A54C5AC969F0C82E660F95E8E /* Alamofire-iOS9.0-dummy.m */, + C441E0187343E410A52A48157DBC726E /* Alamofire-iOS9.0-prefix.pch */, + 7B95C5EE76D316A1FC6F58962D5885C6 /* Alamofire-iOS9.0-umbrella.h */, + E769DBCFFDBFA2A3533C64F8E5EECF0A /* Info.plist */, + 9C48C143F3E21CA2DFB22DA2BB3EE491 /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/Alamofire-iOS10.0"; + sourceTree = ""; + }; E9FC310342247B47409357C80424D3D9 /* Pods-LotameDMP_Example */ = { isa = PBXGroup; children = ( @@ -468,202 +622,237 @@ path = "Target Support Files/Pods-LotameDMP_Example"; sourceTree = ""; }; - EAF51503E6CA27F8FE9EF1FBDDD5A952 /* Alamofire */ = { - isa = PBXGroup; - children = ( - 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */, - 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */, - 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */, - 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */, - 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */, - F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */, - FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */, - BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */, - 1E4018A949737B851B6F6630C9E83D48 /* Response.swift */, - 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */, - AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */, - 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */, - F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */, - 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */, - 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */, - 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */, - 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */, - 14CC88387F82D38E9D298CA64170402C /* Support Files */, +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 008066EBD7F42E8D7B0B9FA0114585DC /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + C7C6308566067884C551167827699C3D /* Pods-LotameDMP_Example-umbrella.h in Headers */, ); - path = Alamofire; - sourceTree = ""; + runOnlyForDeploymentPostprocessing = 0; }; - F322A5A1B6C13971D8D024A6759ED2ED /* Classes */ = { - isa = PBXGroup; - children = ( - 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */, - 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */, - D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */, - E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */, - 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */, + 18D470B3AAE11BA335FB9616C1FFA660 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0B9F8A0E971945BC76BD9E718E40BACE /* Pods-LotameDMP_Tests-umbrella.h in Headers */, ); - path = Classes; - sourceTree = ""; + runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 13F6BD059012BFF5FA1EED5C6EDA0E3C /* Headers */ = { + 2BD7DAD655969C1CBE791C6616EA79D0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D2364D047E3D8E0316F69BE1FC34A676 /* Pods-LotameDMP_Example-umbrella.h in Headers */, + C86DFF71F80F40AD1FEAF1B4824A4E1F /* Compatibility.h in Headers */, + C5ED19E01DFC9993E0C9AB6C85ACAB1D /* NSURLRequest+HTTPBodyTesting.h in Headers */, + B71274CE2E5707A2AD5688829FE616D0 /* OHHTTPStubs-umbrella.h in Headers */, + A0A2186A1786188B449AEB083BBB7891 /* OHHTTPStubs.h in Headers */, + 6AFA1B424EA98346063BD2E439A2EA4C /* OHHTTPStubsMethodSwizzling.h in Headers */, + 57BEF5452B8ABD57683D286244C7FC94 /* OHHTTPStubsResponse+JSON.h in Headers */, + 2828C5A8C3FF12A877F8243078BFE26F /* OHHTTPStubsResponse.h in Headers */, + 83A37634F48394BD93F108582501A4C4 /* OHPathHelpers.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 3D5923F303C0E8F54FB7B84BEEC57C4F /* Headers */ = { + 33EBEB68278F184CC1041610BC3DB47C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - E365AC4BF252B784D4812AF8DD283CAF /* LotameDMP-umbrella.h in Headers */, + C6D5BEAE5AB74B6830DC1AA37DADB677 /* LotameDMP-iOS10.0-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 94BBA98CE0A87FBCBE9EF46B97EEC7C2 /* Headers */ = { + 6454053E08848D474D1F7ADAB455F339 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F0D97D2DA24F280B10C717A0D8318E8E /* Pods-LotameDMP_Tests-umbrella.h in Headers */, + 2061BCF4EBBC100AFC2DD592D03A3236 /* Alamofire-iOS9.0-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - ABAB0D5A85C7037A9C0114BF313562DF /* Headers */ = { + C0D7E670964EE814EF1CB7C817552188 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A194DEE96E5D5C9D61FD6CFCB61E91BD /* Compatibility.h in Headers */, - 387B673926C97011BC576EC8064530A6 /* OHHTTPStubs-umbrella.h in Headers */, - 876EDA2433FA95337E2D771F302C5203 /* OHHTTPStubs.h in Headers */, - 32A59DBF168A9B955C020B5719EBCB0D /* OHHTTPStubsResponse+JSON.h in Headers */, - 12D2F7AA45E613F050F3BF2F39BBA47B /* OHHTTPStubsResponse.h in Headers */, - A6CCC994A5541AB7ADE2DA96E90CC702 /* OHPathHelpers.h in Headers */, + D04F942837A16D37FA498832A73A80AA /* Alamofire-iOS10.0-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - EFDF3B631BBB965A372347705CA14854 /* Headers */ = { + D4AAED16DFBB17224FA2F378791DC880 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 9469DF81ECB494E84675969B5E13374C /* Alamofire-umbrella.h in Headers */, + AB6CC72B1FDEBAD923EBEE4AA08D4C38 /* LotameDMP-iOS9.0-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 221F0FCB1E815826868DC67263A9BA8D /* Pods-LotameDMP_Example */ = { + 06A23325201207EEE8C22E3551E28E4A /* OHHTTPStubs */ = { isa = PBXNativeTarget; - buildConfigurationList = 259E0A224C6F7E0372E9AAA73604D0D0 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */; + buildConfigurationList = 19142A73CC341F046FCCB0FA32840347 /* Build configuration list for PBXNativeTarget "OHHTTPStubs" */; buildPhases = ( - 74053F7FBDF657E16ED1ACDE0BE883D6 /* Sources */, - 0EFACB34C47AAAB00276A03ACEABD439 /* Frameworks */, - 13F6BD059012BFF5FA1EED5C6EDA0E3C /* Headers */, + 0CDDA1BE2252047B38A492F669E33D0B /* Sources */, + C7AE56C614EA98A5132171AE9A318E9A /* Frameworks */, + 2BD7DAD655969C1CBE791C6616EA79D0 /* Headers */, ); buildRules = ( ); dependencies = ( - 6972A785A61699DE603B02BDC27313BF /* PBXTargetDependency */, - 62A7477A13928A38CA53FA15B5E65B3F /* PBXTargetDependency */, ); - name = "Pods-LotameDMP_Example"; - productName = "Pods-LotameDMP_Example"; - productReference = 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */; + name = OHHTTPStubs; + productName = OHHTTPStubs; + productReference = BA15D4B76DDC32F659D7B89822179877 /* OHHTTPStubs.framework */; productType = "com.apple.product-type.framework"; }; - 46AC03AA568DA5E5931210E78C07F84D /* Pods-LotameDMP_Tests */ = { + 3F6EBEE64D06BFC30FB5DF93053F4F23 /* Alamofire-iOS10.0 */ = { isa = PBXNativeTarget; - buildConfigurationList = B1E141604D52DA8EF88445A8A3A3CDAA /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */; + buildConfigurationList = AFB062D55893A76BC3C23E25E38D74FA /* Build configuration list for PBXNativeTarget "Alamofire-iOS10.0" */; buildPhases = ( - 9F423C1B075CF193F931D58B5867449A /* Sources */, - 81535C02D233306AD224EB9D728C6777 /* Frameworks */, - 94BBA98CE0A87FBCBE9EF46B97EEC7C2 /* Headers */, + C58ACCBB5A800A5CEB4F6A0759BE7EC5 /* Sources */, + 5C1F68CFB4A5A07528F3BF6774BCEB9C /* Frameworks */, + C0D7E670964EE814EF1CB7C817552188 /* Headers */, ); buildRules = ( ); dependencies = ( - 909AA91F0CFCE93E5056243D472A3CF2 /* PBXTargetDependency */, - 09FB582A06AB5CC90C1EB39F8F6C8717 /* PBXTargetDependency */, - 09DF1AB06FB48CCA81571F9399224DD4 /* PBXTargetDependency */, ); - name = "Pods-LotameDMP_Tests"; - productName = "Pods-LotameDMP_Tests"; - productReference = 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */; + name = "Alamofire-iOS10.0"; + productName = "Alamofire-iOS10.0"; + productReference = 282D6F4E2A4BDA0D03D8CECC95C4D50F /* Alamofire.framework */; productType = "com.apple.product-type.framework"; }; - 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */ = { + A7E6A570A5796A971F7741E4F1312193 /* LotameDMP-iOS9.0 */ = { isa = PBXNativeTarget; - buildConfigurationList = 3CFB42910790CF0BDBCCEBAACD6B9367 /* Build configuration list for PBXNativeTarget "Alamofire" */; + buildConfigurationList = CA3186A44FDAD62329121CB5C8F398D2 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS9.0" */; buildPhases = ( - 120C4E824DDCCA024C170A491FF221A5 /* Sources */, - B1729F851F648EC60EE93CDB3C8BAEAD /* Frameworks */, - EFDF3B631BBB965A372347705CA14854 /* Headers */, + 3E50F6D522F06107A11B788ADD4A07F0 /* Sources */, + F770A6FBEF84130AED379158F301CF81 /* Frameworks */, + F57245B1E738C6449FEA652E1D7B6B71 /* Resources */, + D4AAED16DFBB17224FA2F378791DC880 /* Headers */, ); buildRules = ( ); dependencies = ( + CDF86760A689CFD262B3CCBAE5059B15 /* PBXTargetDependency */, + 71DF637169D6B19CB855D07894B1098A /* PBXTargetDependency */, ); - name = Alamofire; - productName = Alamofire; - productReference = 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */; + name = "LotameDMP-iOS9.0"; + productName = "LotameDMP-iOS9.0"; + productReference = 47D65711A6B65068A70A007D9ACE5114 /* LotameDMP.framework */; productType = "com.apple.product-type.framework"; }; - 9D0644CBCDD3B6B08C644A8D3E94551D /* LotameDMP */ = { + C4380F3332F12FC09D2A3954BD9C2DC4 /* LotameDMP-iOS10.0-LotameDMP */ = { isa = PBXNativeTarget; - buildConfigurationList = 46727317C847432965194D6025C42671 /* Build configuration list for PBXNativeTarget "LotameDMP" */; + buildConfigurationList = B660ACC3989A816FB87BC7798AC3E6C9 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS10.0-LotameDMP" */; buildPhases = ( - 1E8A654D3769DB61CD8D6711CEEA0EC3 /* Sources */, - 1CDFCA9D9AAF4C00AEE7CD1BAEDD488C /* Frameworks */, - 434F642C9AD7DCEC1BD11612BC0E450F /* Resources */, - 3D5923F303C0E8F54FB7B84BEEC57C4F /* Headers */, + 3885D49F38C04615F69FE7AA90948514 /* Sources */, + E7388182A1F9F8C7EA73469D78B17CEF /* Frameworks */, + B71C7D25E3F42EB0EE9B65BBFA8858E8 /* Resources */, ); buildRules = ( ); dependencies = ( - F826CE248D53BBFE5E18D7CB1BEFDE6A /* PBXTargetDependency */, - F914EA5904EB2EB4FF204F163EC3EA92 /* PBXTargetDependency */, ); - name = LotameDMP; - productName = LotameDMP; - productReference = 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */; + name = "LotameDMP-iOS10.0-LotameDMP"; + productName = "LotameDMP-iOS10.0-LotameDMP"; + productReference = D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */; + productType = "com.apple.product-type.bundle"; + }; + CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 630C046C7664034A59DDED174625D310 /* Build configuration list for PBXNativeTarget "Alamofire-iOS9.0" */; + buildPhases = ( + EB96B89F614F641B858799C29B358556 /* Sources */, + ED3AE368A95F7AF3938B11210E6569A3 /* Frameworks */, + 6454053E08848D474D1F7ADAB455F339 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Alamofire-iOS9.0"; + productName = "Alamofire-iOS9.0"; + productReference = 48A05BF1BB23DC831BCA06D26A10DDF8 /* Alamofire.framework */; productType = "com.apple.product-type.framework"; }; - A033892886A83D4ED36187E20BE0D656 /* LotameDMP-LotameDMP */ = { + D7973520D24620B7007E55AE03895B6A /* LotameDMP-iOS9.0-LotameDMP */ = { isa = PBXNativeTarget; - buildConfigurationList = CFE4385C18FBD6EE932D2154D8B24FA9 /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */; + buildConfigurationList = 75C18CD04B5992923C0421206AED8261 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS9.0-LotameDMP" */; buildPhases = ( - C079490D4451FFEC169920F07F6202AB /* Sources */, - 85D1756C9E4631D75952CB16A05ED91D /* Frameworks */, - B157742E8737FF5BDFDC6F1D5AFFE64F /* Resources */, + 0F228204DCC37A93A6A5A9028B7025A0 /* Sources */, + 0895E6CEC19DE79E537E3A1370C3F449 /* Frameworks */, + 4A95C0F1806FE8A10C860371DEBEAAF8 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = "LotameDMP-LotameDMP"; - productName = "LotameDMP-LotameDMP"; - productReference = 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */; + name = "LotameDMP-iOS9.0-LotameDMP"; + productName = "LotameDMP-iOS9.0-LotameDMP"; + productReference = D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */; productType = "com.apple.product-type.bundle"; }; - B9F753D23B3A010D0E2EB0AE0405D595 /* OHHTTPStubs */ = { + D87A7631F55449935013E12A25C8B1E0 /* LotameDMP-iOS10.0 */ = { isa = PBXNativeTarget; - buildConfigurationList = FDD79B3459C7CC393C8CD0CE59B61FE3 /* Build configuration list for PBXNativeTarget "OHHTTPStubs" */; + buildConfigurationList = 61ADFCE24093B6D0CF34DB63DEF3548A /* Build configuration list for PBXNativeTarget "LotameDMP-iOS10.0" */; buildPhases = ( - 79A6F07414E4CA3A22DFA1E74787A8C7 /* Sources */, - E6EF2F6AB2EC7AF7DA9DB4C3F2C450AF /* Frameworks */, - ABAB0D5A85C7037A9C0114BF313562DF /* Headers */, + 8330E7C40E7BB56E442BAF41D7332AF2 /* Sources */, + F3D84B60362EFC339E3D759923AF0F88 /* Frameworks */, + E669D7822695ABFB73E2EED8DEAC1D1E /* Resources */, + 33EBEB68278F184CC1041610BC3DB47C /* Headers */, ); buildRules = ( ); dependencies = ( + FB0289F6C9BA1BFFA6F9CFB7AB1ED87B /* PBXTargetDependency */, + 420190C360879BE555485BAB4BF0118C /* PBXTargetDependency */, ); - name = OHHTTPStubs; - productName = OHHTTPStubs; - productReference = FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */; + name = "LotameDMP-iOS10.0"; + productName = "LotameDMP-iOS10.0"; + productReference = 8BCF80AA58C7D3B8224E63B6D74A92F1 /* LotameDMP.framework */; + productType = "com.apple.product-type.framework"; + }; + F00553D73BC81DA54F18432CCC911BB8 /* Pods-LotameDMP_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2036FF1B2D17E3E69FBFFE45FBC45061 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */; + buildPhases = ( + 9B16A7D8D6448EE90EF73DBBEA197AB9 /* Sources */, + 12B5B1F12EA4B1343A1D95E84A3175AD /* Frameworks */, + 18D470B3AAE11BA335FB9616C1FFA660 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + E3D7D93AD9FF75530F8126253F660600 /* PBXTargetDependency */, + 38D6A419F66606DF011D547CAA534941 /* PBXTargetDependency */, + FB91735D9C96B00F46D28302F46AB755 /* PBXTargetDependency */, + ); + name = "Pods-LotameDMP_Tests"; + productName = "Pods-LotameDMP_Tests"; + productReference = 262230FF6CF750AC96C152F6923C8175 /* Pods_LotameDMP_Tests.framework */; + productType = "com.apple.product-type.framework"; + }; + FC90604F1EB37D87AE39BDEBE1641143 /* Pods-LotameDMP_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 519B77330F8CB53BE9C6B67445E71AED /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */; + buildPhases = ( + 780DD3E859B54AB9AE4836CAB0E3B174 /* Sources */, + 11D0C66E0F774792832EAFA21448F3D1 /* Frameworks */, + 008066EBD7F42E8D7B0B9FA0114585DC /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + A32D5152DAE460951F1B2B3181D4514D /* PBXTargetDependency */, + C6176DC52BE9DC4D87B348023224700D /* PBXTargetDependency */, + ); + name = "Pods-LotameDMP_Example"; + productName = "Pods-LotameDMP_Example"; + productReference = 6914C8FC159AFDE5B159D8DBAAD40D20 /* Pods_LotameDMP_Example.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -674,20 +863,6 @@ attributes = { LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0700; - TargetAttributes = { - 221F0FCB1E815826868DC67263A9BA8D = { - LastSwiftMigration = 0800; - }; - 46AC03AA568DA5E5931210E78C07F84D = { - LastSwiftMigration = 0800; - }; - 79C040AFDDCE1BCBF6D8B5EB0B85887F = { - LastSwiftMigration = 0800; - }; - 9D0644CBCDD3B6B08C644A8D3E94551D = { - LastSwiftMigration = 0800; - }; - }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -697,298 +872,377 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */; + productRefGroup = B4F4DD2770344C25D626F71778FCDCB9 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */, - 9D0644CBCDD3B6B08C644A8D3E94551D /* LotameDMP */, - A033892886A83D4ED36187E20BE0D656 /* LotameDMP-LotameDMP */, - B9F753D23B3A010D0E2EB0AE0405D595 /* OHHTTPStubs */, - 221F0FCB1E815826868DC67263A9BA8D /* Pods-LotameDMP_Example */, - 46AC03AA568DA5E5931210E78C07F84D /* Pods-LotameDMP_Tests */, + 3F6EBEE64D06BFC30FB5DF93053F4F23 /* Alamofire-iOS10.0 */, + CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */, + D87A7631F55449935013E12A25C8B1E0 /* LotameDMP-iOS10.0 */, + C4380F3332F12FC09D2A3954BD9C2DC4 /* LotameDMP-iOS10.0-LotameDMP */, + A7E6A570A5796A971F7741E4F1312193 /* LotameDMP-iOS9.0 */, + D7973520D24620B7007E55AE03895B6A /* LotameDMP-iOS9.0-LotameDMP */, + 06A23325201207EEE8C22E3551E28E4A /* OHHTTPStubs */, + FC90604F1EB37D87AE39BDEBE1641143 /* Pods-LotameDMP_Example */, + F00553D73BC81DA54F18432CCC911BB8 /* Pods-LotameDMP_Tests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 434F642C9AD7DCEC1BD11612BC0E450F /* Resources */ = { + 4A95C0F1806FE8A10C860371DEBEAAF8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B71C7D25E3F42EB0EE9B65BBFA8858E8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E669D7822695ABFB73E2EED8DEAC1D1E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6B21B7E82C6A41BBD99DE1D08225406E /* LotameDMP.bundle in Resources */, + CC9121C6E4B0F6F19125B5941B4F419E /* LotameDMP.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - B157742E8737FF5BDFDC6F1D5AFFE64F /* Resources */ = { + F57245B1E738C6449FEA652E1D7B6B71 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 5BAB1595D9AFEA8B21D1A9E8F59C38F4 /* LotameDMP.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 120C4E824DDCCA024C170A491FF221A5 /* Sources */ = { + 0CDDA1BE2252047B38A492F669E33D0B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC3BE4B3C6C098A5B9B063DB25FCDF8B /* NSURLRequest+HTTPBodyTesting.m in Sources */, + FFE0D1C890897CF1AE34EC147C84BA2C /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */, + 1C64932FA286C76276A32A4BC4F3C6DE /* OHHTTPStubs-dummy.m in Sources */, + E051B949D969BCE0CD553D323D63977E /* OHHTTPStubs.m in Sources */, + 9890E6D0FDF36E4CA8ACA675C86FC6D2 /* OHHTTPStubsMethodSwizzling.m in Sources */, + 64C91FFBDEDD820655E28F38024FEE22 /* OHHTTPStubsResponse+JSON.m in Sources */, + 3084191BDC83456B1401C24DB3AACF8F /* OHHTTPStubsResponse.m in Sources */, + CA306BDBD477DE20CD0836C7F5F0BF4B /* OHPathHelpers.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0F228204DCC37A93A6A5A9028B7025A0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3885D49F38C04615F69FE7AA90948514 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3E50F6D522F06107A11B788ADD4A07F0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 62143065F94E53F437DCE5D7A998D66D /* AFError.swift in Sources */, - 8D463A0A4C65C02FDD5211F0F3C6F8B8 /* Alamofire-dummy.m in Sources */, - 7CA5A9BA5246FDA8227233E310029392 /* Alamofire.swift in Sources */, - E2A1C34237B4E928E5F85C097F4C2551 /* DispatchQueue+Alamofire.swift in Sources */, - C7A3408350643ADE1018826C766EE356 /* MultipartFormData.swift in Sources */, - E59BF19C0AFA68B741552319FC478C7B /* NetworkReachabilityManager.swift in Sources */, - 0C1B4E9FFB8B81E8833A3BAD537B1990 /* Notifications.swift in Sources */, - AF158CAAF4DD319009AFC855DC995D90 /* ParameterEncoding.swift in Sources */, - 12118C354EFA36292F82A8D0CFCE45B2 /* Request.swift in Sources */, - 86ED08F33B7D357932A9AB743E9D9EA7 /* Response.swift in Sources */, - B8154C96802336E5DDA5CEE97C3180A0 /* ResponseSerialization.swift in Sources */, - DF1BBF94997A2F4248B42B25EA919EC2 /* Result.swift in Sources */, - C0AEA97E7684DDAD56998C0AE198A433 /* ServerTrustPolicy.swift in Sources */, - 907AB123FBC8BC9340D5B7350CE828DF /* SessionDelegate.swift in Sources */, - A79AC30123B0C2177D67F6ED6A1B3215 /* SessionManager.swift in Sources */, - E1F583CB4A68A928CD197250AA752926 /* TaskDelegate.swift in Sources */, - 3982B850C43B41BA6D25F440F0412E9B /* Timeline.swift in Sources */, - FFFDD494EE6D1B83DDAF5F2721F685A6 /* Validation.swift in Sources */, + 239CD78D8F37C3B373805277440C8831 /* DMP.swift in Sources */, + 2D0FF0DEDA036CC7F14FBE44C461DBDD /* LotameAudience.swift in Sources */, + 992ECC889873A67632A92D727A870E6E /* LotameDMP-iOS9.0-dummy.m in Sources */, + 5CCC6EEAE17971AEB330EADD42CE822F /* LotameError.swift in Sources */, + CE5D2F0C60D98575DBF92C59FB55F251 /* LotameProfile.swift in Sources */, + B12A2150AEA52FDEAF3B7C904F569327 /* SwiftyJSON.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 1E8A654D3769DB61CD8D6711CEEA0EC3 /* Sources */ = { + 780DD3E859B54AB9AE4836CAB0E3B174 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A20BA8DB7AA816391AE32C1F91F988B9 /* DMP.swift in Sources */, - F1B199D167AF74FCE8EF5DA74002EDD5 /* LotameAudience.swift in Sources */, - C2BDA028DB762F64A26DAB0B98EB29CA /* LotameDMP-dummy.m in Sources */, - CB51CFA9BFBF0DB45C73F766F764F54C /* LotameError.swift in Sources */, - B53F9B91A0CBD8B2FA06E31D9B058D6F /* LotameProfile.swift in Sources */, - 05F57DB1DF9DC9F1DC5BA02CF0C83103 /* SwiftyJSON.swift in Sources */, + 037D757A3D7DD0547E5CC0065EE230AC /* Pods-LotameDMP_Example-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 74053F7FBDF657E16ED1ACDE0BE883D6 /* Sources */ = { + 8330E7C40E7BB56E442BAF41D7332AF2 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B45A3E4244B4E8ABA6BBA26F6AC727F8 /* Pods-LotameDMP_Example-dummy.m in Sources */, + BBB74AB011C88149BC65C2C10B6E6A19 /* DMP.swift in Sources */, + 1BBE09565B92139CF73200DB2A4B4743 /* LotameAudience.swift in Sources */, + 6505FA6B758D3CD261E5464F70DC0C69 /* LotameDMP-iOS10.0-dummy.m in Sources */, + 5E6C1A6961FB342C12B84B0A0DFC8DDB /* LotameError.swift in Sources */, + 729532F2F92C16C4142CE64B79D6478B /* LotameProfile.swift in Sources */, + E7B6985839F2AB81EC6355558E67E850 /* SwiftyJSON.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 79A6F07414E4CA3A22DFA1E74787A8C7 /* Sources */ = { + 9B16A7D8D6448EE90EF73DBBEA197AB9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 33CF8828DAEF041D4B239FE98C91AD3E /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */, - 623FD70CADFD4593E65178BBAD28298E /* OHHTTPStubs-dummy.m in Sources */, - E8E7CCF090EC2EB4E3C29D2954D21F17 /* OHHTTPStubs.m in Sources */, - F21D0F96BA6EDE58E4F70E83568E07D5 /* OHHTTPStubsResponse+JSON.m in Sources */, - C331F4CD251C22970EB86DCE1DF7F794 /* OHHTTPStubsResponse.m in Sources */, - 6B1C00F3DED5CA430DAD920B385B2E33 /* OHPathHelpers.m in Sources */, + 9937070ABBA54FBBA7BA0F3D3D2D3331 /* Pods-LotameDMP_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9F423C1B075CF193F931D58B5867449A /* Sources */ = { + C58ACCBB5A800A5CEB4F6A0759BE7EC5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 572AE99BB35CB6DFEFF19E74B0BDD3F8 /* Pods-LotameDMP_Tests-dummy.m in Sources */, + 6C847EBBA88F56CD9B9660C1E03D2E21 /* AFError.swift in Sources */, + A05A788C2F8B159207F5144ECA1A5848 /* Alamofire-iOS10.0-dummy.m in Sources */, + CA583D09B1ABAB5C4063B0E2C16ADD5F /* Alamofire.swift in Sources */, + 9A7BCF8905D2D62265995BD9DF67409C /* DispatchQueue+Alamofire.swift in Sources */, + 01CC1AFE147B3B5F2C179D0C1B91E40F /* MultipartFormData.swift in Sources */, + CC5DAF1BC6465892B620F2B63ADAF625 /* NetworkReachabilityManager.swift in Sources */, + 091ADA0AB1CFE0835F0E066C7C062807 /* Notifications.swift in Sources */, + 4BE9929A79FC78F53F1635FD61281888 /* ParameterEncoding.swift in Sources */, + 76C8C34D494F9C6C6DCFD2FA7513B448 /* Request.swift in Sources */, + 12478EC74416B56096699C3A4492B9E0 /* Response.swift in Sources */, + 5C6BF9C2AB15CF5AA6D9EBFADE879BAC /* ResponseSerialization.swift in Sources */, + CD0C9C1AF391650853077B2C5E9B62E0 /* Result.swift in Sources */, + 6E699DCCB9065C22C8825AF81BEE2216 /* ServerTrustPolicy.swift in Sources */, + 3416A8609A0CFEAA9EAF6027E7FE0B4B /* SessionDelegate.swift in Sources */, + D270D1BB315595AA39B9E6494A62E3FD /* SessionManager.swift in Sources */, + 3A452200BC2390097F26B5459FF7A48C /* TaskDelegate.swift in Sources */, + 3DE5565BAE66ED6E4AD42EF99938AC45 /* Timeline.swift in Sources */, + 55AD0FF7EF0CADA0311932BA55754EEC /* Validation.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - C079490D4451FFEC169920F07F6202AB /* Sources */ = { + EB96B89F614F641B858799C29B358556 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 7761B68FA15475DE26FF2EBF75B936B1 /* AFError.swift in Sources */, + BBD53CB8D94BD8B0CF6D449A29E50EA2 /* Alamofire-iOS9.0-dummy.m in Sources */, + 7A2F295B5717E1435290012F20C4D834 /* Alamofire.swift in Sources */, + DF3AE4A4097670F36803AEE59537E02C /* DispatchQueue+Alamofire.swift in Sources */, + 789F26DE511CFB4EA5E1A22D964A8D84 /* MultipartFormData.swift in Sources */, + B7D36D88DB776AA1DEA9FF8D6698EE93 /* NetworkReachabilityManager.swift in Sources */, + 680E6F8B04824ED80E7C674367B1A3C5 /* Notifications.swift in Sources */, + 2DBE8ACDEF1BA8DE4BC5118F1FA9BEC8 /* ParameterEncoding.swift in Sources */, + 0FE9A366EC1A26CCEE87264CFBA0B8A8 /* Request.swift in Sources */, + 0CAFEBB06A47D4726995530487166FB1 /* Response.swift in Sources */, + C08DA65FCB929D311DA968E3FA0E682E /* ResponseSerialization.swift in Sources */, + FCD41DBC7B4375ACEEFA1BA388F074C8 /* Result.swift in Sources */, + 8E97FFAD8F1B579C37EE073BC702858E /* ServerTrustPolicy.swift in Sources */, + 3D4FD21A17BD898421D9A30A3534204D /* SessionDelegate.swift in Sources */, + 93B19A9281A886F680D22A5437D6B5CA /* SessionManager.swift in Sources */, + 774BF01C970236E42A554FDE8061881E /* TaskDelegate.swift in Sources */, + 531BD362CD7BE467B3C15DEF961C6732 /* Timeline.swift in Sources */, + DC2318049E9595208DE21CA6E2CAA8A9 /* Validation.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 09DF1AB06FB48CCA81571F9399224DD4 /* PBXTargetDependency */ = { + 38D6A419F66606DF011D547CAA534941 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = OHHTTPStubs; - target = B9F753D23B3A010D0E2EB0AE0405D595 /* OHHTTPStubs */; - targetProxy = 464490E8BA5DE172FE0DC8BE21F8E3B0 /* PBXContainerItemProxy */; + name = "LotameDMP-iOS10.0"; + target = D87A7631F55449935013E12A25C8B1E0 /* LotameDMP-iOS10.0 */; + targetProxy = 19AD2CDB1DA843B9FB7BF815AFAC68AA /* PBXContainerItemProxy */; }; - 09FB582A06AB5CC90C1EB39F8F6C8717 /* PBXTargetDependency */ = { + 420190C360879BE555485BAB4BF0118C /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = LotameDMP; - target = 9D0644CBCDD3B6B08C644A8D3E94551D /* LotameDMP */; - targetProxy = 505EFE26C4FEAFB5A8CDB63809DD1578 /* PBXContainerItemProxy */; + name = "LotameDMP-iOS10.0-LotameDMP"; + target = C4380F3332F12FC09D2A3954BD9C2DC4 /* LotameDMP-iOS10.0-LotameDMP */; + targetProxy = 282AFDD21B3E818E75B351C280A7EB8B /* PBXContainerItemProxy */; }; - 62A7477A13928A38CA53FA15B5E65B3F /* PBXTargetDependency */ = { + 71DF637169D6B19CB855D07894B1098A /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = LotameDMP; - target = 9D0644CBCDD3B6B08C644A8D3E94551D /* LotameDMP */; - targetProxy = FA413DC43ED0B265D263528AA0F113CA /* PBXContainerItemProxy */; + name = "LotameDMP-iOS9.0-LotameDMP"; + target = D7973520D24620B7007E55AE03895B6A /* LotameDMP-iOS9.0-LotameDMP */; + targetProxy = E318233F5CFC5CA675BED8653F5CFE14 /* PBXContainerItemProxy */; }; - 6972A785A61699DE603B02BDC27313BF /* PBXTargetDependency */ = { + A32D5152DAE460951F1B2B3181D4514D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Alamofire; - target = 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */; - targetProxy = 55A91AC4BA2B1629E51C6C624CF664FE /* PBXContainerItemProxy */; + name = "Alamofire-iOS9.0"; + target = CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */; + targetProxy = 95B819C76090FD612A20FD21463A199C /* PBXContainerItemProxy */; }; - 909AA91F0CFCE93E5056243D472A3CF2 /* PBXTargetDependency */ = { + C6176DC52BE9DC4D87B348023224700D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Alamofire; - target = 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */; - targetProxy = C4EFDDA051719C1D2E4A6F42164629EA /* PBXContainerItemProxy */; + name = "LotameDMP-iOS9.0"; + target = A7E6A570A5796A971F7741E4F1312193 /* LotameDMP-iOS9.0 */; + targetProxy = BD90D9E1A31EC2E04C74BC273819A83C /* PBXContainerItemProxy */; }; - F826CE248D53BBFE5E18D7CB1BEFDE6A /* PBXTargetDependency */ = { + CDF86760A689CFD262B3CCBAE5059B15 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Alamofire; - target = 79C040AFDDCE1BCBF6D8B5EB0B85887F /* Alamofire */; - targetProxy = 96DF70416F4AFDBE7A852A2CC34949FF /* PBXContainerItemProxy */; + name = "Alamofire-iOS9.0"; + target = CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */; + targetProxy = 2C1F0FA0F597C7F66EADFC3BD1DB89A9 /* PBXContainerItemProxy */; + }; + E3D7D93AD9FF75530F8126253F660600 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Alamofire-iOS10.0"; + target = 3F6EBEE64D06BFC30FB5DF93053F4F23 /* Alamofire-iOS10.0 */; + targetProxy = 56CB0FE53721D73002608E530B3C49CA /* PBXContainerItemProxy */; + }; + FB0289F6C9BA1BFFA6F9CFB7AB1ED87B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Alamofire-iOS9.0"; + target = CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */; + targetProxy = 6F137E5C76DA95AC8D8DD0DC7C868FCA /* PBXContainerItemProxy */; }; - F914EA5904EB2EB4FF204F163EC3EA92 /* PBXTargetDependency */ = { + FB91735D9C96B00F46D28302F46AB755 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "LotameDMP-LotameDMP"; - target = A033892886A83D4ED36187E20BE0D656 /* LotameDMP-LotameDMP */; - targetProxy = A43CDCCF2FB8E000EAECF2EB61B76F34 /* PBXContainerItemProxy */; + name = OHHTTPStubs; + target = 06A23325201207EEE8C22E3551E28E4A /* OHHTTPStubs */; + targetProxy = B93FAEEBDA1334DB34EE2163155DC00C /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 050AA7AAE3C02582C548332F4B85829F /* Debug */ = { + 0A6B3CB2243BCE23C6663A05A4B3BECA /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; + baseConfigurationReference = D295FCF2431669A9064242122F027826 /* Alamofire-iOS10.0.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + 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/LotameDMP/LotameDMP-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire-iOS10.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/LotameDMP/LotameDMP.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = LotameDMP; + MODULEMAP_FILE = "Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 09966C0523B36A0E8432288F380459C5 /* Debug */ = { + 150694B5C0B278E7B2F427B6F3A5B6A4 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */; + baseConfigurationReference = BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + 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-LotameDMP_Example/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_LotameDMP_Example; + PRODUCT_NAME = Pods_LotameDMP_Tests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 2BE5E1592123F76A43F8F50914822BD6 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7F1013EC32FE788FB4160A402115608A /* Alamofire-iOS9.0.xcconfig */; + buildSettings = { + "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-iOS9.0/Alamofire-iOS9.0-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire-iOS9.0/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 12914D756594D15C6F2CA12FE5F89F1B /* Debug */ = { + 366170259D8E1545232C63556C490C5D /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = 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_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - 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_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP-iOS10.0"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + PRODUCT_NAME = LotameDMP; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; }; - name = Debug; + name = Release; }; - 1853B5CB10AE7F8DEB7E19C139685E17 /* Release */ = { + 3789046931C17038EA5C3296549C14EB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; + baseConfigurationReference = 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.xcconfig */; buildSettings = { "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"; + 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/LotameDMP/LotameDMP-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/LotameDMP/LotameDMP.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = LotameDMP; + MODULEMAP_FILE = "Target Support Files/OHHTTPStubs/OHHTTPStubs.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = OHHTTPStubs; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_VERSION = 3.0; @@ -996,26 +1250,44 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 27828DDA0929D020859B1062A4E999C3 /* Release */ = { + 4455A55EB41695D4BE11268E6B68AD28 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; + baseConfigurationReference = 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP"; + "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/LotameDMP/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - PRODUCT_NAME = LotameDMP; + INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_LotameDMP_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; - 418B8801A660B342D81C28A48F5FD687 /* Debug */ = { + 55467477BC1431CEDDCC28DF78530464 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */; buildSettings = { @@ -1045,66 +1317,124 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 7D91FFDFA3A4870A23D487275AFCD106 /* Debug */ = { + 56444B4723B1B044EE84518F3E32ED7D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; + baseConfigurationReference = D295FCF2431669A9064242122F027826 /* Alamofire-iOS10.0.xcconfig */; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP"; + "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/LotameDMP/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - PRODUCT_NAME = LotameDMP; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire-iOS10.0/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 847AC160606ECC3E84B2F657A2D4BECB /* Debug */ = { + 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = 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_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + 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_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 5F24469E2D2D5F425B4B40A4AFF83537 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + 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"; + GCC_PREFIX_HEADER = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.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; + MODULEMAP_FILE = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 9863CDCEFF55853E56C65748AD3F9E4B /* Release */ = { + 6CE64221BA54D24047CE0A7390B7FA09 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */; + baseConfigurationReference = C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1117,18 +1447,14 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Tests/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.modulemap"; + MODULEMAP_FILE = "Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_LotameDMP_Tests; + PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_VERSION = 3.0; @@ -1138,77 +1464,149 @@ }; name = Release; }; - 988E37F3E1305805ABC4972267B43DBF /* Release */ = { + 74ABF53C648AD68E13BD73B022E8E10B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */; + baseConfigurationReference = 7F1013EC32FE788FB4160A402115608A /* Alamofire-iOS9.0.xcconfig */; buildSettings = { "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"; + 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"; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire-iOS9.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.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; + MODULEMAP_FILE = "Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; + name = Debug; + }; + AE98989806126F89272BC4C1FFE8E627 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */; + buildSettings = { + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP-iOS9.0"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + PRODUCT_NAME = LotameDMP; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; name = Release; }; - 9DF14B549D887B71F7515F0E11A4D71A /* Release */ = { + B7324857C38B065FEB1EEE3105C2367A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = 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_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = 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; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + B7B7F2E818B6B71D69D1F649E468ADF4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */; buildSettings = { "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"; + 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-LotameDMP_Example/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_LotameDMP_Example; + MODULEMAP_FILE = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - C7F4753AAB909601554A97C8F8D8F0BC /* Debug */ = { + C9D8D17373B79D5CB31A1D7D2632BF24 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7D1A4BE8E4619E5421597874BAA43CA7 /* OHHTTPStubs.xcconfig */; + baseConfigurationReference = C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */; + buildSettings = { + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP-iOS9.0"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + PRODUCT_NAME = LotameDMP; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + DC8D46F9ED8B975E2050F2E30999605C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1221,25 +1619,30 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/OHHTTPStubs/OHHTTPStubs.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = OHHTTPStubs; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_LotameDMP_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - D10829878F8909465BCF7B868C8466FC /* Release */ = { + EEAC1ACB19E2F88550CC1FB30C6A5FD8 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7D1A4BE8E4619E5421597874BAA43CA7 /* OHHTTPStubs.xcconfig */; + baseConfigurationReference = 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1262,60 +1665,80 @@ PRODUCT_NAME = OHHTTPStubs; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - E72E7977875C2D251FC62736BBDDC389 /* Release */ = { + EF97065EF6924C21B492C97118A8202D /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = 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_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = 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; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP-iOS10.0"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + PRODUCT_NAME = LotameDMP; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; }; - name = Release; + name = Debug; + }; + F9ECA4F27CF8785597370A7CD5226C66 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */; + buildSettings = { + "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/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = LotameDMP; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 259E0A224C6F7E0372E9AAA73604D0D0 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */ = { + 19142A73CC341F046FCCB0FA32840347 /* Build configuration list for PBXNativeTarget "OHHTTPStubs" */ = { isa = XCConfigurationList; buildConfigurations = ( - 09966C0523B36A0E8432288F380459C5 /* Debug */, - 9DF14B549D887B71F7515F0E11A4D71A /* Release */, + 3789046931C17038EA5C3296549C14EB /* Debug */, + EEAC1ACB19E2F88550CC1FB30C6A5FD8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2036FF1B2D17E3E69FBFFE45FBC45061 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 55467477BC1431CEDDCC28DF78530464 /* Debug */, + 150694B5C0B278E7B2F427B6F3A5B6A4 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1323,53 +1746,71 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 12914D756594D15C6F2CA12FE5F89F1B /* Debug */, - E72E7977875C2D251FC62736BBDDC389 /* Release */, + 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */, + B7324857C38B065FEB1EEE3105C2367A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 519B77330F8CB53BE9C6B67445E71AED /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DC8D46F9ED8B975E2050F2E30999605C /* Debug */, + 4455A55EB41695D4BE11268E6B68AD28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 61ADFCE24093B6D0CF34DB63DEF3548A /* Build configuration list for PBXNativeTarget "LotameDMP-iOS10.0" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B7B7F2E818B6B71D69D1F649E468ADF4 /* Debug */, + 5F24469E2D2D5F425B4B40A4AFF83537 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 3CFB42910790CF0BDBCCEBAACD6B9367 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { + 630C046C7664034A59DDED174625D310 /* Build configuration list for PBXNativeTarget "Alamofire-iOS9.0" */ = { isa = XCConfigurationList; buildConfigurations = ( - 847AC160606ECC3E84B2F657A2D4BECB /* Debug */, - 988E37F3E1305805ABC4972267B43DBF /* Release */, + 74ABF53C648AD68E13BD73B022E8E10B /* Debug */, + 2BE5E1592123F76A43F8F50914822BD6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 46727317C847432965194D6025C42671 /* Build configuration list for PBXNativeTarget "LotameDMP" */ = { + 75C18CD04B5992923C0421206AED8261 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS9.0-LotameDMP" */ = { isa = XCConfigurationList; buildConfigurations = ( - 050AA7AAE3C02582C548332F4B85829F /* Debug */, - 1853B5CB10AE7F8DEB7E19C139685E17 /* Release */, + C9D8D17373B79D5CB31A1D7D2632BF24 /* Debug */, + AE98989806126F89272BC4C1FFE8E627 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B1E141604D52DA8EF88445A8A3A3CDAA /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */ = { + AFB062D55893A76BC3C23E25E38D74FA /* Build configuration list for PBXNativeTarget "Alamofire-iOS10.0" */ = { isa = XCConfigurationList; buildConfigurations = ( - 418B8801A660B342D81C28A48F5FD687 /* Debug */, - 9863CDCEFF55853E56C65748AD3F9E4B /* Release */, + 56444B4723B1B044EE84518F3E32ED7D /* Debug */, + 0A6B3CB2243BCE23C6663A05A4B3BECA /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - CFE4385C18FBD6EE932D2154D8B24FA9 /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */ = { + B660ACC3989A816FB87BC7798AC3E6C9 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS10.0-LotameDMP" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7D91FFDFA3A4870A23D487275AFCD106 /* Debug */, - 27828DDA0929D020859B1062A4E999C3 /* Release */, + EF97065EF6924C21B492C97118A8202D /* Debug */, + 366170259D8E1545232C63556C490C5D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - FDD79B3459C7CC393C8CD0CE59B61FE3 /* Build configuration list for PBXNativeTarget "OHHTTPStubs" */ = { + CA3186A44FDAD62329121CB5C8F398D2 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS9.0" */ = { isa = XCConfigurationList; buildConfigurations = ( - C7F4753AAB909601554A97C8F8D8F0BC /* Debug */, - D10829878F8909465BCF7B868C8466FC /* Release */, + F9ECA4F27CF8785597370A7CD5226C66 /* Debug */, + 6CE64221BA54D24047CE0A7390B7FA09 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-dummy.m b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-dummy.m new file mode 100644 index 0000000..5601ad6 --- /dev/null +++ b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Alamofire_iOS10_0 : NSObject +@end +@implementation PodsDummy_Alamofire_iOS10_0 +@end diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-umbrella.h similarity index 52% rename from Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h rename to Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-umbrella.h index 02327b8..00014e3 100644 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap new file mode 100644 index 0000000..95fdda1 --- /dev/null +++ b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap @@ -0,0 +1,6 @@ +framework module Alamofire { + umbrella header "Alamofire-iOS10.0-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.xcconfig b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.xcconfig new file mode 100644 index 0000000..6a44b01 --- /dev/null +++ b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS10.0 +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_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Alamofire/Info.plist b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Info.plist similarity index 100% rename from Example/Pods/Target Support Files/Alamofire/Info.plist rename to Example/Pods/Target Support Files/Alamofire-iOS10.0/Info.plist diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m new file mode 100644 index 0000000..be811bb --- /dev/null +++ b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Alamofire_iOS9_0 : NSObject +@end +@implementation PodsDummy_Alamofire_iOS9_0 +@end diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h new file mode 100644 index 0000000..00014e3 --- /dev/null +++ b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double AlamofireVersionNumber; +FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; + diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap similarity index 58% rename from Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap rename to Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap index d1f125f..6fc1cab 100644 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap +++ b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap @@ -1,5 +1,5 @@ framework module Alamofire { - umbrella header "Alamofire-umbrella.h" + umbrella header "Alamofire-iOS9.0-umbrella.h" export * module * { export * } diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig similarity index 90% rename from Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig rename to Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig index 772ef0b..581f53e 100644 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +++ b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig @@ -1,9 +1,10 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0 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_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Info.plist b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Info.plist new file mode 100644 index 0000000..b672cd7 --- /dev/null +++ b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.0.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m deleted file mode 100644 index a6c4594..0000000 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire : NSObject -@end -@implementation PodsDummy_Alamofire -@end diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch deleted file mode 100644 index aa992a4..0000000 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Example/Pods/Target Support Files/LotameDMP/Info.plist b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/Info.plist similarity index 100% rename from Example/Pods/Target Support Files/LotameDMP/Info.plist rename to Example/Pods/Target Support Files/LotameDMP-iOS10.0/Info.plist diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-dummy.m b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-dummy.m new file mode 100644 index 0000000..9194ab4 --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_LotameDMP_iOS10_0 : NSObject +@end +@implementation PodsDummy_LotameDMP_iOS10_0 +@end diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-umbrella.h b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-umbrella.h similarity index 52% rename from Example/Pods/Target Support Files/LotameDMP/LotameDMP-umbrella.h rename to Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-umbrella.h index 3bc6d09..fd3706b 100644 --- a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-umbrella.h +++ b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap new file mode 100644 index 0000000..187886d --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap @@ -0,0 +1,6 @@ +framework module LotameDMP { + umbrella header "LotameDMP-iOS10.0-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.xcconfig b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.xcconfig new file mode 100644 index 0000000..638878e --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0 +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "AdSupport" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist similarity index 100% rename from Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist rename to Example/Pods/Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/Info.plist b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/Info.plist new file mode 100644 index 0000000..90db36a --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m new file mode 100644 index 0000000..22b97ec --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_LotameDMP_iOS9_0 : NSObject +@end +@implementation PodsDummy_LotameDMP_iOS9_0 +@end diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h new file mode 100644 index 0000000..fd3706b --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double LotameDMPVersionNumber; +FOUNDATION_EXPORT const unsigned char LotameDMPVersionString[]; + diff --git a/Example/Pods/Target Support Files/LotameDMP/LotameDMP.modulemap b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap similarity index 58% rename from Example/Pods/Target Support Files/LotameDMP/LotameDMP.modulemap rename to Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap index 28051db..47e3a1b 100644 --- a/Example/Pods/Target Support Files/LotameDMP/LotameDMP.modulemap +++ b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap @@ -1,5 +1,5 @@ framework module LotameDMP { - umbrella header "LotameDMP-umbrella.h" + umbrella header "LotameDMP-iOS9.0-umbrella.h" export * module * { export * } diff --git a/Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig similarity index 89% rename from Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig rename to Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig index 98cee33..07aceef 100644 --- a/Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig +++ b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig @@ -1,5 +1,5 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/LotameDMP -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0 +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" OTHER_LDFLAGS = -framework "AdSupport" @@ -7,5 +7,6 @@ OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist new file mode 100644 index 0000000..8b70130 --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 3.1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-dummy.m b/Example/Pods/Target Support Files/LotameDMP/LotameDMP-dummy.m deleted file mode 100644 index ebfc914..0000000 --- a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_LotameDMP : NSObject -@end -@implementation PodsDummy_LotameDMP -@end diff --git a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-prefix.pch b/Example/Pods/Target Support Files/LotameDMP/LotameDMP-prefix.pch deleted file mode 100644 index aa992a4..0000000 --- a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - diff --git a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch index aa992a4..beb2a24 100644 --- a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch +++ b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h index 58bf361..bd8e923 100644 --- a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h +++ b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h @@ -1,11 +1,21 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif #import "Compatibility.h" #import "OHHTTPStubs.h" #import "OHHTTPStubsResponse.h" #import "OHHTTPStubsResponse+JSON.h" +#import "NSURLRequest+HTTPBodyTesting.h" +#import "OHHTTPStubsMethodSwizzling.h" #import "OHPathHelpers.h" #import "Compatibility.h" diff --git a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig index 6e634e4..c116272 100644 --- a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig +++ b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs.xcconfig @@ -5,5 +5,6 @@ OTHER_LDFLAGS = -framework "CFNetwork" -framework "Foundation" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/OHHTTPStubs PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh index ea92578..55eee17 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh @@ -59,8 +59,13 @@ code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" fi } @@ -84,10 +89,13 @@ strip_invalid_archs() { if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire-iOS9.0/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP-iOS9.0/LotameDMP.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire-iOS9.0/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP-iOS9.0/LotameDMP.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait fi diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh index 25e9d37..4602c68 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh @@ -18,6 +18,9 @@ case "${TARGETED_DEVICE_FAMILY}" in 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-umbrella.h index 0086268..a0073ca 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-umbrella.h +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig index 85dd925..5670225 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig @@ -1,9 +1,8 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0" 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" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0/LotameDMP.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" PODS_BUILD_DIR = $BUILD_DIR diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig index 85dd925..5670225 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig @@ -1,9 +1,8 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0" 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" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0/LotameDMP.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" PODS_BUILD_DIR = $BUILD_DIR diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh index 197c51d..aeb2fdd 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh @@ -59,8 +59,13 @@ code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" fi } @@ -84,12 +89,15 @@ strip_invalid_archs() { if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire-iOS10.0/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP-iOS10.0/LotameDMP.framework" install_framework "$BUILT_PRODUCTS_DIR/OHHTTPStubs/OHHTTPStubs.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire-iOS10.0/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP-iOS10.0/LotameDMP.framework" install_framework "$BUILT_PRODUCTS_DIR/OHHTTPStubs/OHHTTPStubs.framework" fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh index 25e9d37..4602c68 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh @@ -18,6 +18,9 @@ case "${TARGETED_DEVICE_FAMILY}" in 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-umbrella.h index 9994fc0..ed6a390 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-umbrella.h +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig index 1610023..0e75c37 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig @@ -1,9 +1,8 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS10.0" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" 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" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS10.0/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" -framework "OHHTTPStubs" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" PODS_BUILD_DIR = $BUILD_DIR diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig index 1610023..0e75c37 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig @@ -1,9 +1,8 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS10.0" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" 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" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS10.0/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" -framework "OHHTTPStubs" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" PODS_BUILD_DIR = $BUILD_DIR diff --git a/LotameDMP.podspec b/LotameDMP.podspec index 0db75b5..029416d 100644 --- a/LotameDMP.podspec +++ b/LotameDMP.podspec @@ -27,7 +27,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/Lotame/LotameDMP-IOS.git", :tag => s.version.to_s } # s.social_media_url = 'https://twitter.com/' - s.platform = :ios, '10.0' + s.platform = :ios, '9.0' s.requires_arc = true s.source_files = 'Pod/Classes/**/*' diff --git a/README.md b/README.md index 4676995..8864add 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This open source library can be leveraged by Lotame clients to collect data from ## Requirements -LotameDMP requires Xcode 8 and at least iOS 10.0. It will work with swift or Objective-C. +LotameDMP requires Xcode 8 and at least iOS 9.0. It will work with swift or Objective-C. ## Example @@ -15,7 +15,7 @@ To run the example project, clone the repo, and run `pod install` from the Examp ## Installation -> **Embedded frameworks require a minimum deployment target of iOS 10 or OS X Sierra (10.12).** +> **Embedded frameworks require a minimum deployment target of iOS 9 or OS X Sierra (10.12).** ### CocoaPods From dd2d25a771241b5cefb90356742028cedf016b4c Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Mon, 24 Apr 2017 12:46:20 -0400 Subject: [PATCH 03/20] Changes the podspec s.platform version from 9.0 to 8.0. Changes projects' and targets' minimum iOS Deployment Target to 8.0 (was originally either 10.0 or 9.0) --- Example/LotameDMP.xcodeproj/project.pbxproj | 8 +-- Example/Pods/Pods.xcodeproj/project.pbxproj | 73 ++++++++++----------- LotameDMP.podspec | 2 +- 3 files changed, 39 insertions(+), 44 deletions(-) diff --git a/Example/LotameDMP.xcodeproj/project.pbxproj b/Example/LotameDMP.xcodeproj/project.pbxproj index c9849c8..f081826 100644 --- a/Example/LotameDMP.xcodeproj/project.pbxproj +++ b/Example/LotameDMP.xcodeproj/project.pbxproj @@ -447,7 +447,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -485,7 +485,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; @@ -499,7 +499,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = LotameDMP/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -515,7 +515,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = LotameDMP/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 7b884c8..f307d30 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -166,17 +166,17 @@ 0252326AD6D69CC243DD317511C08CF8 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; 06CDC14360D5B86C048533BFF2423E09 /* Alamofire-iOS10.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-iOS10.0-prefix.pch"; sourceTree = ""; }; 0767F757FDFD7FD1A6273AA6DD1887ED /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - 091715455495A385122589395850ED36 /* OHHTTPStubs.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = OHHTTPStubs.modulemap; sourceTree = ""; }; + 091715455495A385122589395850ED36 /* OHHTTPStubs.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = OHHTTPStubs.modulemap; sourceTree = ""; }; 0F8FCA014B1789B8B5609863F8392BEC /* NSURLRequest+HTTPBodyTesting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+HTTPBodyTesting.h"; path = "OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h"; sourceTree = ""; }; 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/AdSupport.framework; sourceTree = DEVELOPER_DIR; }; 145B43A6485C114F242C01AD2353716A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.debug.xcconfig"; sourceTree = ""; }; 181F8F5C57F8A1DBFBCD6CDB7E049E10 /* Pods-LotameDMP_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Tests-acknowledgements.markdown"; sourceTree = ""; }; 1C4D80FF794C4A13B9739893FFD59DFD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 262230FF6CF750AC96C152F6923C8175 /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Tests.framework; path = "Pods-LotameDMP_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 262230FF6CF750AC96C152F6923C8175 /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 282D6F4E2A4BDA0D03D8CECC95C4D50F /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = "Alamofire-iOS10.0.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 2866D261378FCD4FE14943A99A722B77 /* Pods-LotameDMP_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-LotameDMP_Example.modulemap"; sourceTree = ""; }; + 282D6F4E2A4BDA0D03D8CECC95C4D50F /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2866D261378FCD4FE14943A99A722B77 /* Pods-LotameDMP_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-LotameDMP_Example.modulemap"; sourceTree = ""; }; 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameProfile.swift; sourceTree = ""; }; 33C710F419C86BCD50AEDD19604021C7 /* OHHTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubsResponse+JSON.m"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m"; sourceTree = ""; }; 3471B4AC871F2345EF2D38EC0476BB55 /* OHHTTPStubs-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-prefix.pch"; sourceTree = ""; }; @@ -184,11 +184,11 @@ 3DCA7717A3800DDA1015E452884C7705 /* OHHTTPStubs-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs-dummy.m"; sourceTree = ""; }; 3F6843AA96F513831A4CBD26850657A8 /* Pods-LotameDMP_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LotameDMP_Example-acknowledgements.plist"; sourceTree = ""; }; 3FC61C5614265D7EC6B79B2F91E71E45 /* LotameError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameError.swift; sourceTree = ""; }; - 4033AEA3CE94BE03ACC3D0C2EA5D590C /* LotameDMP-iOS10.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "LotameDMP-iOS10.0.modulemap"; sourceTree = ""; }; + 4033AEA3CE94BE03ACC3D0C2EA5D590C /* LotameDMP-iOS10.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "LotameDMP-iOS10.0.modulemap"; sourceTree = ""; }; 450C401487E8F40DA326418DE2D54A62 /* OHHTTPStubsResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsResponse.m; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.m; sourceTree = ""; }; - 47D65711A6B65068A70A007D9ACE5114 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = LotameDMP.framework; path = "LotameDMP-iOS9.0.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 48A05BF1BB23DC831BCA06D26A10DDF8 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = "Alamofire-iOS9.0.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 4927332025C324CA11BC68E9ADD97C5E /* Pods-LotameDMP_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-LotameDMP_Tests.modulemap"; sourceTree = ""; }; + 47D65711A6B65068A70A007D9ACE5114 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 48A05BF1BB23DC831BCA06D26A10DDF8 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4927332025C324CA11BC68E9ADD97C5E /* Pods-LotameDMP_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-LotameDMP_Tests.modulemap"; sourceTree = ""; }; 4C7266D0A29AB74C931B180587468B9E /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "ResourceBundle-LotameDMP-Info.plist"; path = "../LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; 4ED4C285145DF1B4676E902E764344F1 /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OHHTTPStubs.xcconfig; sourceTree = ""; }; @@ -201,7 +201,7 @@ 5F60292E408915B79A971861C015FD93 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; 623AECE894294068CCF1B7B41BE25C5A /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Example-umbrella.h"; sourceTree = ""; }; - 6914C8FC159AFDE5B159D8DBAAD40D20 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Example.framework; path = "Pods-LotameDMP_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6914C8FC159AFDE5B159D8DBAAD40D20 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 69E64B61FD883181243E9D59370F9969 /* OHHTTPStubs-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-umbrella.h"; sourceTree = ""; }; 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; 6B8C1F3E527E68DA3B97AFC4CAD9B11C /* OHHTTPStubsResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsResponse.h; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.h; sourceTree = ""; }; @@ -221,9 +221,9 @@ 882CF88E5C611241A2FDB54E9F407661 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; 8B810ECD27B3196894997BC2BE51CCE0 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; 8BB0490DFD47B046C7205F0A56FA3675 /* LotameDMP-iOS10.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LotameDMP-iOS10.0-dummy.m"; sourceTree = ""; }; - 8BCF80AA58C7D3B8224E63B6D74A92F1 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = LotameDMP.framework; path = "LotameDMP-iOS10.0.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8BCF80AA58C7D3B8224E63B6D74A92F1 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8E6F2BDEA2A39F356EB8BBC02F8BC49E /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.release.xcconfig"; sourceTree = ""; }; 98AE9A0DC079D71AACBC526BD9921FCB /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; 9A31847BEE120C869C0BBAEEF2A4A9C7 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; @@ -233,13 +233,13 @@ 9CA3193EB2A2E97C49E066AAB340F273 /* Alamofire-iOS10.0-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-iOS10.0-umbrella.h"; sourceTree = ""; }; A2410B52E9B93C70E86383ACD8FACE80 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; A43C7C330BFE464861C3082D3C2B037D /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - A70A499FD9B8CFF2532FF3BB5C998578 /* Alamofire-iOS10.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Alamofire-iOS10.0.modulemap"; sourceTree = ""; }; + A70A499FD9B8CFF2532FF3BB5C998578 /* Alamofire-iOS10.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Alamofire-iOS10.0.modulemap"; sourceTree = ""; }; A99BCD8F756C9FBCF06150555C1E1BCF /* Compatibility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Compatibility.h; path = OHHTTPStubs/Sources/Compatibility.h; sourceTree = ""; }; AD13AFBDCEBD92B6BEE3E5A71440DDC2 /* OHHTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "OHHTTPStubsResponse+JSON.h"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h"; sourceTree = ""; }; ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; AF6E33079A0AC62440C75012BB20ED40 /* Pods-LotameDMP_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Example-acknowledgements.markdown"; sourceTree = ""; }; B974CEE3695BA2D211E692533A5C70EA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BA15D4B76DDC32F659D7B89822179877 /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OHHTTPStubs.framework; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BA15D4B76DDC32F659D7B89822179877 /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.release.xcconfig"; sourceTree = ""; }; C441E0187343E410A52A48157DBC726E /* Alamofire-iOS9.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Alamofire-iOS9.0-prefix.pch"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch"; sourceTree = ""; }; C6649F10029169FD60CF7AA94B4634A6 /* OHPathHelpers.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHPathHelpers.m; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m; sourceTree = ""; }; @@ -247,16 +247,16 @@ C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Tests-umbrella.h"; sourceTree = ""; }; D20FC0352198484DDB75C6398CAC2FAF /* Pods-LotameDMP_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Example-resources.sh"; sourceTree = ""; }; D295FCF2431669A9064242122F027826 /* Alamofire-iOS10.0.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Alamofire-iOS10.0.xcconfig"; sourceTree = ""; }; - D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = LotameDMP.bundle; path = LotameDMP.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LotameDMP.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.debug.xcconfig"; sourceTree = ""; }; - D852568030BFB0D3C58F588C396316EB /* Alamofire-iOS9.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; name = "Alamofire-iOS9.0.modulemap"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap"; sourceTree = ""; }; + D852568030BFB0D3C58F588C396316EB /* Alamofire-iOS9.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; name = "Alamofire-iOS9.0.modulemap"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap"; sourceTree = ""; }; D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Example-dummy.m"; sourceTree = ""; }; D9EABB9632D8C4132D837BCE73140767 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Tests-dummy.m"; sourceTree = ""; }; E769DBCFFDBFA2A3533C64F8E5EECF0A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; ECAB7E6BC7C1FE9A0D961E9CF4C1C30B /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; EE03DEA311B16035FA23F33F9A1F3CA2 /* LotameDMP-iOS9.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "LotameDMP-iOS9.0-dummy.m"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m"; sourceTree = ""; }; - F423AB5EF349327AEF58D8D94E8CB63B /* LotameDMP-iOS9.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; name = "LotameDMP-iOS9.0.modulemap"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; sourceTree = ""; }; + F423AB5EF349327AEF58D8D94E8CB63B /* LotameDMP-iOS9.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; name = "LotameDMP-iOS9.0.modulemap"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; sourceTree = ""; }; F77E62830A158EAFB548B5FDA425C9B5 /* Pods-LotameDMP_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LotameDMP_Tests-acknowledgements.plist"; sourceTree = ""; }; F8924EE5D6D964DB953650FD76B83B9E /* OHHTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubs+NSURLSessionConfiguration.m"; path = "OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; F945C090757C5DBD90F1D57EB0575534 /* OHHTTPStubsMethodSwizzling.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsMethodSwizzling.m; path = OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m; sourceTree = ""; }; @@ -371,7 +371,6 @@ 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */, FD7DABA157120A51F189CDE48E4E2A67 /* SwiftyJSON.swift */, ); - name = Classes; path = Classes; sourceTree = ""; }; @@ -454,7 +453,6 @@ ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */, D095257A6E5D4CD034A6004381E99B81 /* Support Files */, ); - name = Alamofire; path = Alamofire; sourceTree = ""; }; @@ -516,7 +514,6 @@ children = ( 1851ED4A1A7E9943AFD6F03016AB531C /* Classes */, ); - name = Pod; path = Pod; sourceTree = ""; }; @@ -537,7 +534,6 @@ 26554B40DD5D521D76B0A640DDEF7631 /* OHPathHelpers */, 4362454B75989F1CFE4168E0CD6DC258 /* Support Files */, ); - name = OHHTTPStubs; path = OHHTTPStubs; sourceTree = ""; }; @@ -547,7 +543,6 @@ 282D6F4E2A4BDA0D03D8CECC95C4D50F /* Alamofire.framework */, 48A05BF1BB23DC831BCA06D26A10DDF8 /* Alamofire.framework */, D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */, - D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */, 47D65711A6B65068A70A007D9ACE5114 /* LotameDMP.framework */, 8BCF80AA58C7D3B8224E63B6D74A92F1 /* LotameDMP.framework */, BA15D4B76DDC32F659D7B89822179877 /* OHHTTPStubs.framework */, @@ -1122,7 +1117,7 @@ GCC_PREFIX_HEADER = "Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Alamofire-iOS10.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; @@ -1153,7 +1148,7 @@ GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + 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-LotameDMP_Tests/Pods-LotameDMP_Tests.modulemap"; @@ -1189,7 +1184,7 @@ GCC_PREFIX_HEADER = "Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Alamofire-iOS9.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; @@ -1211,7 +1206,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -1269,7 +1264,7 @@ GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + 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-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; @@ -1304,7 +1299,7 @@ GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + 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-LotameDMP_Tests/Pods-LotameDMP_Tests.modulemap"; @@ -1341,7 +1336,7 @@ GCC_PREFIX_HEADER = "Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Alamofire-iOS10.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; @@ -1392,7 +1387,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; @@ -1418,7 +1413,7 @@ GCC_PREFIX_HEADER = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch"; INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; @@ -1450,7 +1445,7 @@ GCC_PREFIX_HEADER = "Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch"; INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; @@ -1482,7 +1477,7 @@ GCC_PREFIX_HEADER = "Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Alamofire-iOS9.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; @@ -1505,7 +1500,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -1546,7 +1541,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; @@ -1572,7 +1567,7 @@ GCC_PREFIX_HEADER = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch"; INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; @@ -1595,7 +1590,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -1621,7 +1616,7 @@ GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + 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-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; @@ -1680,7 +1675,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -1707,7 +1702,7 @@ GCC_PREFIX_HEADER = "Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch"; INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; diff --git a/LotameDMP.podspec b/LotameDMP.podspec index 029416d..e2baa07 100644 --- a/LotameDMP.podspec +++ b/LotameDMP.podspec @@ -27,7 +27,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/Lotame/LotameDMP-IOS.git", :tag => s.version.to_s } # s.social_media_url = 'https://twitter.com/' - s.platform = :ios, '9.0' + s.platform = :ios, '8.0' s.requires_arc = true s.source_files = 'Pod/Classes/**/*' From 10375ca0767885ca5ccfcc66bef01f5c17d56dd8 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Tue, 25 Apr 2017 12:00:14 -0400 Subject: [PATCH 04/20] Resolves warnings. --- Example/ObjcExample.m | 2 +- Example/Tests/Tests.swift | 2 +- Pod/Classes/SwiftyJSON.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Example/ObjcExample.m b/Example/ObjcExample.m index ae49dc7..7c42c81 100644 --- a/Example/ObjcExample.m +++ b/Example/ObjcExample.m @@ -30,7 +30,7 @@ - (void) getAudience{ [DMP getAudienceDataWithHandler:^(LotameProfile * _Nullable profile, BOOL success) { if (success) { //Check for success for (LotameAudience * audience in profile.audiences) { //Loop through each audience - NSLog(audience.jsonString); + NSLog(@"%@", audience.jsonString); } } }]; diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift index b7a880c..ff2835e 100644 --- a/Example/Tests/Tests.swift +++ b/Example/Tests/Tests.swift @@ -35,7 +35,7 @@ class Tests: XCTestCase { result in XCTAssertNotNil(result.value, "Profile must exist") - XCTAssertEqual(self.mockProfile["Profile"]!["pid"] as! String, result.value?.pid, "Profile object id must match the mock") + XCTAssertEqual(self.mockProfile["Profile"]!["pid"] as? String, result.value?.pid, "Profile object id must match the mock") XCTAssertEqual("60519", result.value?.audiences[0].id, "First audience object must match the mock") XCTAssertEqual("OCR_Matchflow_Segment_37_2", result.value?.audiences[0].abbreviation, "First audience object must match the mock") XCTAssertEqual(result.value?.jsonString!, JSON(self.mockProfile).rawString()!, "Json generation should work correctly") diff --git a/Pod/Classes/SwiftyJSON.swift b/Pod/Classes/SwiftyJSON.swift index 3879246..4bebc67 100644 --- a/Pod/Classes/SwiftyJSON.swift +++ b/Pod/Classes/SwiftyJSON.swift @@ -845,7 +845,7 @@ extension JSON { } } set { - self.object = newValue?.absoluteString + self.object = newValue?.absoluteString ?? NSNull() } } } From af723b8b82b58a8fe3b612211efecfd68b4e5485 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Tue, 25 Apr 2017 12:01:04 -0400 Subject: [PATCH 05/20] Resolves warnings. --- Example/LotameDMP.xcodeproj/project.pbxproj | 7 ++++++- .../xcshareddata/xcschemes/LotameDMP-Example.xcscheme | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Example/LotameDMP.xcodeproj/project.pbxproj b/Example/LotameDMP.xcodeproj/project.pbxproj index f081826..4ffb1f9 100644 --- a/Example/LotameDMP.xcodeproj/project.pbxproj +++ b/Example/LotameDMP.xcodeproj/project.pbxproj @@ -215,7 +215,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0830; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { @@ -423,8 +423,10 @@ 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -468,8 +470,10 @@ 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -488,6 +492,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/Example/LotameDMP.xcodeproj/xcshareddata/xcschemes/LotameDMP-Example.xcscheme b/Example/LotameDMP.xcodeproj/xcshareddata/xcschemes/LotameDMP-Example.xcscheme index 777c798..04c8219 100644 --- a/Example/LotameDMP.xcodeproj/xcshareddata/xcschemes/LotameDMP-Example.xcscheme +++ b/Example/LotameDMP.xcodeproj/xcshareddata/xcschemes/LotameDMP-Example.xcscheme @@ -1,6 +1,6 @@ Date: Tue, 25 Apr 2017 14:07:16 -0400 Subject: [PATCH 06/20] Minor syntax changes. --- Pod/Classes/DMP.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Pod/Classes/DMP.swift b/Pod/Classes/DMP.swift index 3d1d26a..40c62f5 100644 --- a/Pod/Classes/DMP.swift +++ b/Pod/Classes/DMP.swift @@ -139,7 +139,7 @@ open class DMP:NSObject{ /** Call this first to initialize the singleton. Only needs to be called once. - Starts a new session, sets the domain to default "crwdcntrl.net" and httpProtocol to default "http" + Starts a new session, sets the domain to default "crwdcntrl.net" and httpProtocol to default "https" **/ open class func initialize(_ clientId: String){ DMP.sharedManager.clientId = clientId @@ -284,13 +284,13 @@ open class DMP:NSObject{ } return } - (dispatchQueue).async{ + dispatchQueue.async{ Alamofire.request(Router.audienceData(baseUrlString: sharedManager.baseADUrl, params: nil)) .validate() .responseJSON(options: .allowFragments){ response in DispatchQueue.main.async{ - if let value = response.result.value , response.response?.statusCode == 200 && response.result.isSuccess{ + if let value = response.result.value, response.response?.statusCode == 200 && response.result.isSuccess{ completion(Result.success(LotameProfile(json: JSON(value)))) } else { completion(Result.failure(LotameError.unexpectedResponse)) From 195aa1ff432ecc2f1fd4da4b72c067ded35d5165 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Tue, 25 Apr 2017 14:14:39 -0400 Subject: [PATCH 07/20] AlamoFire encode expects params of type [String: Any]. Casting an optional String to Any is a little messy, especially with the nil coalescing. Unwrapping the optional clears this up, and removes an exclamation mark too. --- Pod/Classes/DMP.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Pod/Classes/DMP.swift b/Pod/Classes/DMP.swift index 40c62f5..bd8fe45 100644 --- a/Pod/Classes/DMP.swift +++ b/Pod/Classes/DMP.swift @@ -325,8 +325,10 @@ open class DMP:NSObject{ var params: [String: Any] = [:] if let behaviors = behaviors{ for behavior in behaviors{ - params[behavior.key] = behavior.value as Any?? ?? "" as Any? - URL = URL?.appendingPathComponent("\(behavior.key)=\(behavior.value!)/"); + if let behaviorValue = behavior.value { + params[behavior.key] = behaviorValue + URL = URL?.appendingPathComponent("\(behavior.key)=\(behaviorValue)/"); + } } } From 6d7d4a81471cf7697af87e2a21dc1b2e1e5d1937 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Tue, 25 Apr 2017 14:36:03 -0400 Subject: [PATCH 08/20] Minor syntax change. --- Pod/Classes/LotameAudience.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Pod/Classes/LotameAudience.swift b/Pod/Classes/LotameAudience.swift index 86dcca6..af42028 100644 --- a/Pod/Classes/LotameAudience.swift +++ b/Pod/Classes/LotameAudience.swift @@ -33,7 +33,10 @@ open class LotameAudience : NSObject{ } open var json: JSON{ - let json: JSON = ["id": id as AnyObject, "abbr" : abbreviation as AnyObject] + let json: JSON = [ + "id": id, + "abbr" : abbreviation + ] return json } From 454d110ac35483b20fa4f083804dcffd7e2de047 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Tue, 25 Apr 2017 14:38:34 -0400 Subject: [PATCH 09/20] Updating the dependency, just in case it was run through the Swift converter. --- Pod/Classes/SwiftyJSON.swift | 497 +++++++++++++++++++++-------------- 1 file changed, 293 insertions(+), 204 deletions(-) diff --git a/Pod/Classes/SwiftyJSON.swift b/Pod/Classes/SwiftyJSON.swift index 4bebc67..0f62363 100644 --- a/Pod/Classes/SwiftyJSON.swift +++ b/Pod/Classes/SwiftyJSON.swift @@ -1,6 +1,6 @@ // SwiftyJSON.swift // -// Copyright (c) 2014 - 2016 Ruoyu Fu, Pinglin Tang +// Copyright (c) 2014 - 2017 Ruoyu Fu, Pinglin Tang // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -35,10 +35,9 @@ public let ErrorInvalidJSON: Int = 490 // MARK: - JSON Type /** JSON's type definitions. - See http://www.json.org */ -public enum Type :Int{ +public enum Type: Int { case number case string @@ -54,21 +53,44 @@ public struct JSON { /** Creates a JSON using the data. - - parameter data: The NSData used to convert to json.Top level object in data is an NSArray or NSDictionary - - parameter opt: The JSON serialization reading options. `.AllowFragments` by default. + - parameter opt: The JSON serialization reading options. `[]` by default. - parameter error: The NSErrorPointer used to return the error. `nil` by default. - - returns: The created JSON */ - public init(data:Data, options opt: JSONSerialization.ReadingOptions = .allowFragments, error: NSErrorPointer = nil) { - do { - let object: Any = try JSONSerialization.jsonObject(with: data, options: opt) - self.init(object) - } catch let aError as NSError { - if error != nil { - error?.pointee = aError + public init(data: Data, options opt: JSONSerialization.ReadingOptions = []) throws { + let object: Any = try JSONSerialization.jsonObject(with: data, options: opt) + self.init(jsonObject: object) + } + + /** + Creates a JSON object + - parameter object: the object + - note: this does not parse a `String` into JSON, instead use `init(parseJSON: String)` + - returns: the created JSON object + */ + public init(_ object: Any) { + switch object { + case let object as Data: + do { + try self.init(data: object) + } catch { + self.init(jsonObject: NSNull()) } + default: + self.init(jsonObject: object) + } + } + + /** + Parses the JSON string into a JSON object + - parameter json: the JSON string + - returns: the created JSON object + */ + public init(parseJSON jsonString: String) { + if let data = jsonString.data(using: .utf8) { + self.init(data) + } else { self.init(NSNull()) } } @@ -76,49 +98,69 @@ public struct JSON { /** Creates a JSON from JSON string - parameter string: Normal json string like '{"a":"b"}' - - returns: The created JSON */ - public static func parse(_ string:String) -> JSON { - return string.data(using: String.Encoding.utf8) - .flatMap{ JSON(data: $0) } ?? JSON(NSNull()) + @available(*, deprecated: 3.2, message: "Use instead `init(parseJSON: )`") + public static func parse(_ json: String) -> JSON { + return json.data(using: String.Encoding.utf8) + .flatMap { try? JSON(data: $0) } ?? JSON(NSNull()) } /** Creates a JSON using the object. - - parameter object: The object must have the following properties: All objects are NSString/String, NSNumber/Int/Float/Double/Bool, NSArray/Array, NSDictionary/Dictionary, or NSNull; All dictionary keys are NSStrings/String; NSNumbers are not NaN or infinity. - - returns: The created JSON */ - public init(_ object: Any) { - self.object = object + fileprivate init(jsonObject: Any) { + self.object = jsonObject } /** - Creates a JSON from a [JSON] + Merges another JSON into this JSON, whereas primitive values which are not present in this JSON are getting added, + present values getting overwritten, array values getting appended and nested JSONs getting merged the same way. - - parameter jsonArray: A Swift array of JSON objects - - - returns: The created JSON + - parameter other: The JSON which gets merged into this JSON + - throws `ErrorWrongType` if the other JSONs differs in type on the top level. */ - public init(_ jsonArray:[JSON]) { - self.init(jsonArray.map { $0.object }) + public mutating func merge(with other: JSON) throws { + try self.merge(with: other, typecheck: true) } /** - Creates a JSON from a [String: JSON] + Merges another JSON into this JSON and returns a new JSON, whereas primitive values which are not present in this JSON are getting added, + present values getting overwritten, array values getting appended and nested JSONS getting merged the same way. - - parameter jsonDictionary: A Swift dictionary of JSON objects - - - returns: The created JSON + - parameter other: The JSON which gets merged into this JSON + - returns: New merged JSON + - throws `ErrorWrongType` if the other JSONs differs in type on the top level. */ - public init(_ jsonDictionary:[String: JSON]) { - var dictionary = [String: Any](minimumCapacity: jsonDictionary.count) - for (key, json) in jsonDictionary { - dictionary[key] = json.object + public func merged(with other: JSON) throws -> JSON { + var merged = self + try merged.merge(with: other, typecheck: true) + return merged + } + + // Private woker function which does the actual merging + // Typecheck is set to true for the first recursion level to prevent total override of the source JSON + fileprivate mutating func merge(with other: JSON, typecheck: Bool) throws { + if self.type == other.type { + switch self.type { + case .dictionary: + for (key, _) in other { + try self[key].merge(with: other[key], typecheck: false) + } + case .array: + self = JSON(self.arrayValue + other.arrayValue) + default: + self = other + } + } else { + if typecheck { + throw NSError(domain: ErrorDomain, code: ErrorWrongType, userInfo: [NSLocalizedDescriptionKey: "Couldn't merge, because the JSONs differ in type on top level."]) + } else { + self = other + } } - self.init(dictionary) } /// Private object @@ -130,8 +172,8 @@ public struct JSON { fileprivate var rawBool: Bool = false /// Private type fileprivate var _type: Type = .null - /// prviate error - fileprivate var _error: NSError? = nil + /// Private error + fileprivate var _error: NSError? /// Object in JSON public var object: Any { @@ -153,7 +195,7 @@ public struct JSON { } set { _error = nil - switch newValue { + switch unwrap(newValue) { case let number as NSNumber: if number.isBool { _type = .bool @@ -162,14 +204,13 @@ public struct JSON { _type = .number self.rawNumber = number } - case let string as String: + case let string as String: _type = .string self.rawString = string - case _ as NSNull: + case _ as NSNull: + _type = .null + case nil: _type = .null - case let array as [JSON]: - _type = .array - self.rawArray = array.map { $0.object } case let array as [Any]: _type = .array self.rawArray = array @@ -184,135 +225,138 @@ public struct JSON { } /// JSON type - public var type: Type { get { return _type } } + public var type: Type { return _type } /// Error in JSON - public var error: NSError? { get { return self._error } } + public var error: NSError? { return self._error } /// The static null JSON @available(*, unavailable, renamed:"null") - public static var nullJSON: JSON { get { return null } } - public static var null: JSON { get { return JSON(NSNull()) } } -} - -public enum JSONIndex:Comparable -{ - case array(Int) - case dictionary(DictionaryIndex) - case null + public static var nullJSON: JSON { return null } + public static var null: JSON { return JSON(NSNull()) } } -public func ==(lhs: JSONIndex, rhs: JSONIndex) -> Bool -{ - switch (lhs, rhs) - { - case (.array(let left), .array(let right)): - return left == right - case (.dictionary(let left), .dictionary(let right)): - return left == right - case (.null, .null): return true +// unwrap nested JSON +private func unwrap(_ object: Any) -> Any { + switch object { + case let json as JSON: + return unwrap(json.object) + case let array as [Any]: + return array.map(unwrap) + case let dictionary as [String : Any]: + var unwrappedDic = dictionary + for (k, v) in dictionary { + unwrappedDic[k] = unwrap(v) + } + return unwrappedDic default: - return false + return object } } -public func <(lhs: JSONIndex, rhs: JSONIndex) -> Bool -{ - switch (lhs, rhs) - { - case (.array(let left), .array(let right)): - return left < right - case (.dictionary(let left), .dictionary(let right)): - return left < right - default: - return false +public enum Index: Comparable { + case array(Int) + case dictionary(DictionaryIndex) + case null + + static public func == (lhs: Index, rhs: Index) -> Bool { + switch (lhs, rhs) { + case (.array(let left), .array(let right)): + return left == right + case (.dictionary(let left), .dictionary(let right)): + return left == right + case (.null, .null): return true + default: + return false + } + } + + static public func < (lhs: Index, rhs: Index) -> Bool { + switch (lhs, rhs) { + case (.array(let left), .array(let right)): + return left < right + case (.dictionary(let left), .dictionary(let right)): + return left < right + default: + return false + } } } +public typealias JSONIndex = Index +public typealias JSONRawIndex = Index -extension JSON: Collection -{ +extension JSON: Swift.Collection { - public typealias Index = JSONIndex + public typealias Index = JSONRawIndex - public var startIndex: Index - { - switch type - { + public var startIndex: Index { + switch type { case .array: return .array(rawArray.startIndex) case .dictionary: - return .dictionary(dictionaryValue.startIndex) + return .dictionary(rawDictionary.startIndex) default: return .null } } - public var endIndex: Index - { - switch type - { + public var endIndex: Index { + switch type { case .array: return .array(rawArray.endIndex) case .dictionary: - return .dictionary(dictionaryValue.endIndex) + return .dictionary(rawDictionary.endIndex) default: return .null } } - public func index(after i: Index) -> Index - { - switch i - { + public func index(after i: Index) -> Index { + switch i { case .array(let idx): return .array(rawArray.index(after: idx)) case .dictionary(let idx): - return .dictionary(dictionaryValue.index(after: idx)) + return .dictionary(rawDictionary.index(after: idx)) default: return .null } - } - public subscript (position: Index) -> (String, JSON) - { - switch position - { + public subscript (position: Index) -> (String, JSON) { + switch position { case .array(let idx): return (String(idx), JSON(self.rawArray[idx])) case .dictionary(let idx): - return dictionaryValue[idx] + let (key, value) = self.rawDictionary[idx] + return (key, JSON(value)) default: return ("", JSON.null) } } - - } // MARK: - Subscript /** * To mark both String and Int can be used in subscript. */ -public enum JSONKey -{ +public enum JSONKey { case index(Int) case key(String) } public protocol JSONSubscriptType { - var jsonKey:JSONKey { get } + var jsonKey: JSONKey { get } } extension Int: JSONSubscriptType { - public var jsonKey:JSONKey { + public var jsonKey: JSONKey { return JSONKey.index(self) } } extension String: JSONSubscriptType { - public var jsonKey:JSONKey { + public var jsonKey: JSONKey { return JSONKey.key(self) } } @@ -330,7 +374,7 @@ extension JSON { return JSON(self.rawArray[index]) } else { var r = JSON.null - r._error = NSError(domain: ErrorDomain, code:ErrorIndexOutOfBounds , userInfo: [NSLocalizedDescriptionKey: "Array[\(index)] is out of bounds"]) + r._error = NSError(domain: ErrorDomain, code:ErrorIndexOutOfBounds, userInfo: [NSLocalizedDescriptionKey: "Array[\(index)] is out of bounds"]) return r } } @@ -383,15 +427,11 @@ extension JSON { /** Find a json in the complex data structures by using array of Int and/or String as path. - - parameter path: The target json's path. Example: - let json = JSON[data] let path = [9,"list","person","name"] let name = json[path] - The same as: let name = json[9]["list"]["person"]["name"] - - returns: Return a json found by the path or a null json with error */ public subscript(path: [JSONSubscriptType]) -> JSON { @@ -415,13 +455,9 @@ extension JSON { /** Find a json in the complex data structures by using array of Int and/or String as path. - - parameter path: The target json's path. Example: - let name = json[9,"list","person","name"] - The same as: let name = json[9]["list"]["person"]["name"] - - returns: Return a json found by the path or a null json with error */ public subscript(path: JSONSubscriptType...) -> JSON { @@ -473,41 +509,11 @@ extension JSON: Swift.ExpressibleByFloatLiteral { extension JSON: Swift.ExpressibleByDictionaryLiteral { public init(dictionaryLiteral elements: (String, Any)...) { - let array = elements - self.init(dictionaryLiteral: array) - } - - public init(dictionaryLiteral elements: [(String, Any)]) { - let jsonFromDictionaryLiteral: ([String : Any]) -> JSON = { dictionary in - let initializeElement = Array(dictionary.keys).flatMap { key -> (String, Any)? in - if let value = dictionary[key] { - return (key, value) - } - return nil - } - return JSON(dictionaryLiteral: initializeElement) + var dictionary = [String: Any](minimumCapacity: elements.count) + for (k, v) in elements { + dictionary[k] = v } - - var dict = [String : Any](minimumCapacity: elements.count) - - for element in elements { - let elementToSet: Any - if let json = element.1 as? JSON { - elementToSet = json.object - } else if let jsonArray = element.1 as? [JSON] { - elementToSet = JSON(jsonArray).object - } else if let dictionary = element.1 as? [String : Any] { - elementToSet = jsonFromDictionaryLiteral(dictionary).object - } else if let dictArray = element.1 as? [[String : Any]] { - let jsonArray = dictArray.map { jsonFromDictionaryLiteral($0) } - elementToSet = JSON(jsonArray).object - } else { - elementToSet = element.1 - } - dict[element.0] = elementToSet - } - - self.init(dict) + self.init(dictionary as Any) } } @@ -549,12 +555,97 @@ extension JSON: Swift.RawRepresentable { return try JSONSerialization.data(withJSONObject: self.object, options: opt) } - public func rawString(_ encoding: String.Encoding = String.Encoding.utf8, options opt: JSONSerialization.WritingOptions = .prettyPrinted) -> String? { + public func rawString(_ encoding: String.Encoding = .utf8, options opt: JSONSerialization.WritingOptions = .prettyPrinted) -> String? { + do { + return try _rawString(encoding, options: [.jsonSerialization: opt]) + } catch { + print("Could not serialize object to JSON because:", error.localizedDescription) + return nil + } + } + + public func rawString(_ options: [writingOptionsKeys: Any]) -> String? { + let encoding = options[.encoding] as? String.Encoding ?? String.Encoding.utf8 + let maxObjectDepth = options[.maxObjextDepth] as? Int ?? 10 + do { + return try _rawString(encoding, options: options, maxObjectDepth: maxObjectDepth) + } catch { + print("Could not serialize object to JSON because:", error.localizedDescription) + return nil + } + } + + fileprivate func _rawString( + _ encoding: String.Encoding = .utf8, + options: [writingOptionsKeys: Any], + maxObjectDepth: Int = 10 + ) throws -> String? { + if maxObjectDepth < 0 { + throw NSError(domain: ErrorDomain, code: ErrorInvalidJSON, userInfo: [NSLocalizedDescriptionKey: "Element too deep. Increase maxObjectDepth and make sure there is no reference loop"]) + } switch self.type { - case .array, .dictionary: + case .dictionary: do { - let data = try self.rawData(options: opt) - return String(data: data, encoding: encoding) + if !(options[.castNilToNSNull] as? Bool ?? false) { + let jsonOption = options[.jsonSerialization] as? JSONSerialization.WritingOptions ?? JSONSerialization.WritingOptions.prettyPrinted + let data = try self.rawData(options: jsonOption) + return String(data: data, encoding: encoding) + } + + guard let dict = self.object as? [String: Any?] else { + return nil + } + let body = try dict.keys.map { key throws -> String in + guard let value = dict[key] else { + return "\"\(key)\": null" + } + guard let unwrappedValue = value else { + return "\"\(key)\": null" + } + + let nestedValue = JSON(unwrappedValue) + guard let nestedString = try nestedValue._rawString(encoding, options: options, maxObjectDepth: maxObjectDepth - 1) else { + throw NSError(domain: ErrorDomain, code: ErrorInvalidJSON, userInfo: [NSLocalizedDescriptionKey: "Could not serialize nested JSON"]) + } + if nestedValue.type == .string { + return "\"\(key)\": \"\(nestedString.replacingOccurrences(of: "\\", with: "\\\\").replacingOccurrences(of: "\"", with: "\\\""))\"" + } else { + return "\"\(key)\": \(nestedString)" + } + } + + return "{\(body.joined(separator: ","))}" + } catch _ { + return nil + } + case .array: + do { + if !(options[.castNilToNSNull] as? Bool ?? false) { + let jsonOption = options[.jsonSerialization] as? JSONSerialization.WritingOptions ?? JSONSerialization.WritingOptions.prettyPrinted + let data = try self.rawData(options: jsonOption) + return String(data: data, encoding: encoding) + } + + guard let array = self.object as? [Any?] else { + return nil + } + let body = try array.map { value throws -> String in + guard let unwrappedValue = value else { + return "null" + } + + let nestedValue = JSON(unwrappedValue) + guard let nestedString = try nestedValue._rawString(encoding, options: options, maxObjectDepth: maxObjectDepth - 1) else { + throw NSError(domain: ErrorDomain, code: ErrorInvalidJSON, userInfo: [NSLocalizedDescriptionKey: "Could not serialize nested JSON"]) + } + if nestedValue.type == .string { + return "\"\(nestedString.replacingOccurrences(of: "\\", with: "\\\\").replacingOccurrences(of: "\"", with: "\\\""))\"" + } else { + return nestedString + } + } + + return "[\(body.joined(separator: ","))]" } catch _ { return nil } @@ -593,23 +684,19 @@ extension JSON { //Optional [JSON] public var array: [JSON]? { - get { - if self.type == .array { - return self.rawArray.map{ JSON($0) } - } else { - return nil - } + if self.type == .array { + return self.rawArray.map { JSON($0) } + } else { + return nil } } //Non-optional [JSON] public var arrayValue: [JSON] { - get { - return self.array ?? [] - } + return self.array ?? [] } - //Optional [AnyObject] + //Optional [Any] public var arrayObject: [Any]? { get { switch self.type { @@ -635,7 +722,7 @@ extension JSON { //Optional [String : JSON] public var dictionary: [String : JSON]? { if self.type == .dictionary { - var d = [String : JSON](minimumCapacity: rawDictionary.count) + var d = [String: JSON](minimumCapacity: rawDictionary.count) for (key, value) in rawDictionary { d[key] = JSON(value) } @@ -650,7 +737,7 @@ extension JSON { return self.dictionary ?? [:] } - //Optional [String : AnyObject] + //Optional [String : Any] public var dictionaryObject: [String : Any]? { get { switch self.type { @@ -672,7 +759,6 @@ extension JSON { // MARK: - Bool extension JSON { // : Swift.Bool - //Optional bool public var bool: Bool? { get { @@ -701,7 +787,7 @@ extension JSON { // : Swift.Bool case .number: return self.rawNumber.boolValue case .string: - return ["true", "y", "t"].contains() { (truthyString) in + return ["true", "y", "t"].contains { (truthyString) in return self.rawString.caseInsensitiveCompare(truthyString) == .orderedSame } default: @@ -800,7 +886,7 @@ extension JSON { } } -//MARK: - Null +// MARK: - Null extension JSON { public var null: NSNull? { @@ -816,7 +902,7 @@ extension JSON { self.object = NSNull() } } - public func exists() -> Bool{ + public func exists() -> Bool { if let errorValue = error, errorValue.code == ErrorNotExist || errorValue.code == ErrorIndexOutOfBounds || errorValue.code == ErrorWrongType { @@ -826,15 +912,18 @@ extension JSON { } } -//MARK: - URL +// MARK: - URL extension JSON { //Optional URL - public var URL: URL? { + public var url: URL? { get { switch self.type { case .string: - if let encodedString_ = self.rawString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed) { + // Check for existing percent escapes first to prevent double-escaping of % character + if self.rawString.range(of: "%[0-9A-Fa-f]{2}", options: .regularExpression, range: nil, locale: nil) != nil { + return Foundation.URL(string: self.rawString) + } else if let encodedString_ = self.rawString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed) { // We have to use `Foundation.URL` otherwise it conflicts with the variable name. return Foundation.URL(string: encodedString_) } else { @@ -897,19 +986,14 @@ extension JSON { } } - public var int: Int? - { - get - { + public var int: Int? { + get { return self.number?.intValue } - set - { - if let newValue = newValue - { + set { + if let newValue = newValue { self.object = NSNumber(value: newValue) - } else - { + } else { self.object = NSNull() } } @@ -952,7 +1036,7 @@ extension JSON { } set { if let newValue = newValue { - self.object = NSNumber(value: newValue) + self.object = NSNumber(value: Int(newValue)) } else { self.object = NSNull() } @@ -964,7 +1048,7 @@ extension JSON { return self.numberValue.int8Value } set { - self.object = NSNumber(value: newValue) + self.object = NSNumber(value: Int(newValue)) } } @@ -1123,10 +1207,10 @@ extension JSON { } } -//MARK: - Comparable +// MARK: - Comparable extension JSON : Swift.Comparable {} -public func ==(lhs: JSON, rhs: JSON) -> Bool { +public func == (lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { case (.number, .number): @@ -1146,7 +1230,7 @@ public func ==(lhs: JSON, rhs: JSON) -> Bool { } } -public func <=(lhs: JSON, rhs: JSON) -> Bool { +public func <= (lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { case (.number, .number): @@ -1166,7 +1250,7 @@ public func <=(lhs: JSON, rhs: JSON) -> Bool { } } -public func >=(lhs: JSON, rhs: JSON) -> Bool { +public func >= (lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { case (.number, .number): @@ -1186,7 +1270,7 @@ public func >=(lhs: JSON, rhs: JSON) -> Bool { } } -public func >(lhs: JSON, rhs: JSON) -> Bool { +public func > (lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { case (.number, .number): @@ -1198,7 +1282,7 @@ public func >(lhs: JSON, rhs: JSON) -> Bool { } } -public func <(lhs: JSON, rhs: JSON) -> Bool { +public func < (lhs: JSON, rhs: JSON) -> Bool { switch (lhs.type, rhs.type) { case (.number, .number): @@ -1217,19 +1301,17 @@ private let falseObjCType = String(cString: falseNumber.objCType) // MARK: - NSNumber: Comparable extension NSNumber { - var isBool:Bool { - get { - let objCType = String(cString: self.objCType) - if (self.compare(trueNumber) == .orderedSame && objCType == trueObjCType) || (self.compare(falseNumber) == .orderedSame && objCType == falseObjCType){ - return true - } else { - return false - } + var isBool: Bool { + let objCType = String(cString: self.objCType) + if (self.compare(trueNumber) == .orderedSame && objCType == trueObjCType) || (self.compare(falseNumber) == .orderedSame && objCType == falseObjCType) { + return true + } else { + return false } } } -func ==(lhs: NSNumber, rhs: NSNumber) -> Bool { +func == (lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): return false @@ -1240,11 +1322,11 @@ func ==(lhs: NSNumber, rhs: NSNumber) -> Bool { } } -func !=(lhs: NSNumber, rhs: NSNumber) -> Bool { +func != (lhs: NSNumber, rhs: NSNumber) -> Bool { return !(lhs == rhs) } -func <(lhs: NSNumber, rhs: NSNumber) -> Bool { +func < (lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): @@ -1256,7 +1338,7 @@ func <(lhs: NSNumber, rhs: NSNumber) -> Bool { } } -func >(lhs: NSNumber, rhs: NSNumber) -> Bool { +func > (lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): @@ -1268,7 +1350,7 @@ func >(lhs: NSNumber, rhs: NSNumber) -> Bool { } } -func <=(lhs: NSNumber, rhs: NSNumber) -> Bool { +func <= (lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): @@ -1280,7 +1362,7 @@ func <=(lhs: NSNumber, rhs: NSNumber) -> Bool { } } -func >=(lhs: NSNumber, rhs: NSNumber) -> Bool { +func >= (lhs: NSNumber, rhs: NSNumber) -> Bool { switch (lhs.isBool, rhs.isBool) { case (false, true): @@ -1291,3 +1373,10 @@ func >=(lhs: NSNumber, rhs: NSNumber) -> Bool { return lhs.compare(rhs) != .orderedAscending } } + +public enum writingOptionsKeys { + case jsonSerialization + case castNilToNSNull + case maxObjextDepth + case encoding +} From a92094ff38d04f5b47a549e4b4c6da9e0f8e7f44 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Tue, 25 Apr 2017 15:11:55 -0400 Subject: [PATCH 10/20] Updates the SDK version that's passed into the URL. --- Pod/Classes/DMP.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Pod/Classes/DMP.swift b/Pod/Classes/DMP.swift index bd8fe45..332b5cb 100644 --- a/Pod/Classes/DMP.swift +++ b/Pod/Classes/DMP.swift @@ -40,6 +40,8 @@ open class DMP:NSObject{ */ open static let sharedManager = DMP() + fileprivate static let sdkVersion = "4.0" + /** Thread safety (especially for behavior data0 is handled via async and sync thread calls. All network calls are made asynchronously. @@ -118,11 +120,11 @@ open class DMP:NSObject{ } fileprivate var baseBCPUrl: String{ - return "\(httpProtocol)://bcp.\(domain.urlHostEncoded()!)/5/c=\(clientId!.urlPathEncoded()!)/mid=\(DMP.advertisingId!.urlPathEncoded()!)/e=app/dt=IDFA/sdk=3.0/" + return "\(httpProtocol)://bcp.\(domain.urlHostEncoded()!)/5/c=\(clientId!.urlPathEncoded()!)/mid=\(DMP.advertisingId!.urlPathEncoded()!)/e=app/dt=IDFA/sdk=\(DMP.sdkVersion)/" } fileprivate var baseADUrl: String{ - return "\(httpProtocol)://ad.\(domain.urlHostEncoded()!)/5/pe=y/c=\(clientId!.urlPathEncoded()!)/mid=\(DMP.advertisingId!.urlPathEncoded()!)/dt=IDFA/sdk=3.0/" + return "\(httpProtocol)://ad.\(domain.urlHostEncoded()!)/5/pe=y/c=\(clientId!.urlPathEncoded()!)/mid=\(DMP.advertisingId!.urlPathEncoded()!)/dt=IDFA/sdk=\(DMP.sdkVersion)/" } /** @@ -331,7 +333,7 @@ open class DMP:NSObject{ } } } - + print("URL:: \(URL)") let urlRequest = URLRequest(url: URL!, cachePolicy: URLRequest.CachePolicy.reloadIgnoringCacheData, timeoutInterval: 60) return try Alamofire.URLEncoding.default.encode(urlRequest, with: params); } From 3832afdb8ae9f540e8fbc73b93c7b63cd0916f88 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Tue, 25 Apr 2017 15:21:43 -0400 Subject: [PATCH 11/20] Updates the version on the podspec. Adds minor version within code. --- LotameDMP.podspec | 2 +- Pod/Classes/DMP.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LotameDMP.podspec b/LotameDMP.podspec index e2baa07..b341061 100644 --- a/LotameDMP.podspec +++ b/LotameDMP.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "LotameDMP" - s.version = "3.1.0" + s.version = "4.0.0" s.summary = "This open source library can be leveraged by Lotame clients to collect data from within their iOS applications." # This description is used to generate tags and improve search results. diff --git a/Pod/Classes/DMP.swift b/Pod/Classes/DMP.swift index 332b5cb..e473dd8 100644 --- a/Pod/Classes/DMP.swift +++ b/Pod/Classes/DMP.swift @@ -40,7 +40,7 @@ open class DMP:NSObject{ */ open static let sharedManager = DMP() - fileprivate static let sdkVersion = "4.0" + fileprivate static let sdkVersion = "4.0.0" /** Thread safety (especially for behavior data0 is handled via async and sync thread calls. From 20f6d9750c1a33e4117e5b36fb3442c2c15d1960 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Tue, 25 Apr 2017 16:39:00 -0400 Subject: [PATCH 12/20] In the example project, explicitly sets the iOS 8. Removed yarn lock file, and regenerated it with a pod install. Removed boilerplate comments from podspec. --- Example/LotameDMP.xcodeproj/project.pbxproj | 4 +- Example/Podfile | 1 + Example/Podfile.lock | 30 +- .../Local Podspecs/LotameDMP.podspec.json | 6 +- Example/Pods/Manifest.lock | 30 +- Example/Pods/OHHTTPStubs/README.md | 92 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 1448 ++++++----------- .../Alamofire-iOS10.0-dummy.m | 5 - .../Alamofire-iOS10.0.modulemap | 6 - .../Alamofire-iOS10.0.xcconfig | 10 - .../Alamofire-iOS10.0/Info.plist | 26 - .../Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m | 5 - .../Alamofire-iOS9.0-umbrella.h | 16 - .../Alamofire/Alamofire-dummy.m | 5 + .../Alamofire-prefix.pch} | 0 .../Alamofire-umbrella.h} | 0 .../Alamofire.modulemap} | 2 +- .../Alamofire.xcconfig} | 2 +- .../Info.plist | 2 +- .../LotameDMP-iOS10.0-dummy.m | 5 - .../LotameDMP-iOS10.0-prefix.pch | 12 - .../LotameDMP-iOS10.0.modulemap | 6 - .../LotameDMP-iOS10.0.xcconfig | 12 - .../ResourceBundle-LotameDMP-Info.plist | 24 - .../LotameDMP-iOS9.0/Info.plist | 26 - .../LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m | 5 - .../LotameDMP-iOS9.0-prefix.pch | 12 - .../LotameDMP-iOS9.0-umbrella.h | 16 - .../Info.plist | 2 +- .../LotameDMP/LotameDMP-dummy.m | 5 + .../LotameDMP-prefix.pch} | 0 .../LotameDMP-umbrella.h} | 0 .../LotameDMP.modulemap} | 2 +- .../LotameDMP.xcconfig} | 4 +- .../ResourceBundle-LotameDMP-Info.plist | 2 +- .../OHHTTPStubs/Info.plist | 2 +- .../OHHTTPStubs/OHHTTPStubs-umbrella.h | 1 - .../Pods-LotameDMP_Example-frameworks.sh | 8 +- .../Pods-LotameDMP_Example-resources.sh | 3 + .../Pods-LotameDMP_Example.debug.xcconfig | 5 +- .../Pods-LotameDMP_Example.release.xcconfig | 5 +- .../Pods-LotameDMP_Tests-frameworks.sh | 8 +- .../Pods-LotameDMP_Tests-resources.sh | 3 + .../Pods-LotameDMP_Tests.debug.xcconfig | 5 +- .../Pods-LotameDMP_Tests.release.xcconfig | 5 +- LotameDMP.podspec | 16 - Pod/Classes/DMP.swift | 1 - 47 files changed, 662 insertions(+), 1223 deletions(-) delete mode 100644 Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-dummy.m delete mode 100644 Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap delete mode 100644 Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.xcconfig delete mode 100644 Example/Pods/Target Support Files/Alamofire-iOS10.0/Info.plist delete mode 100644 Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m delete mode 100644 Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h create mode 100644 Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m rename Example/Pods/Target Support Files/{Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch => Alamofire/Alamofire-prefix.pch} (100%) rename Example/Pods/Target Support Files/{Alamofire-iOS10.0/Alamofire-iOS10.0-umbrella.h => Alamofire/Alamofire-umbrella.h} (100%) rename Example/Pods/Target Support Files/{Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap => Alamofire/Alamofire.modulemap} (58%) rename Example/Pods/Target Support Files/{Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig => Alamofire/Alamofire.xcconfig} (98%) rename Example/Pods/Target Support Files/{Alamofire-iOS9.0 => Alamofire}/Info.plist (96%) delete mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-dummy.m delete mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch delete mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap delete mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.xcconfig delete mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist delete mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS9.0/Info.plist delete mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m delete mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch delete mode 100644 Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h rename Example/Pods/Target Support Files/{LotameDMP-iOS10.0 => LotameDMP}/Info.plist (96%) create mode 100644 Example/Pods/Target Support Files/LotameDMP/LotameDMP-dummy.m rename Example/Pods/Target Support Files/{Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch => LotameDMP/LotameDMP-prefix.pch} (100%) rename Example/Pods/Target Support Files/{LotameDMP-iOS10.0/LotameDMP-iOS10.0-umbrella.h => LotameDMP/LotameDMP-umbrella.h} (100%) rename Example/Pods/Target Support Files/{LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap => LotameDMP/LotameDMP.modulemap} (58%) rename Example/Pods/Target Support Files/{LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig => LotameDMP/LotameDMP.xcconfig} (95%) rename Example/Pods/Target Support Files/{LotameDMP-iOS9.0 => LotameDMP}/ResourceBundle-LotameDMP-Info.plist (96%) diff --git a/Example/LotameDMP.xcodeproj/project.pbxproj b/Example/LotameDMP.xcodeproj/project.pbxproj index 4ffb1f9..cafaf59 100644 --- a/Example/LotameDMP.xcodeproj/project.pbxproj +++ b/Example/LotameDMP.xcodeproj/project.pbxproj @@ -296,7 +296,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + 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"; showEnvVarsInLog = 0; }; A00628155799EF845FC58D1C /* [CP] Embed Pods Frameworks */ = { @@ -356,7 +356,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + 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"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/Example/Podfile b/Example/Podfile index 8e90d74..00f1eda 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,4 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '8.0' use_frameworks! target 'LotameDMP_Example' do diff --git a/Example/Podfile.lock b/Example/Podfile.lock index eeab474..d804153 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,20 +1,20 @@ PODS: - - Alamofire (4.0.1) - - LotameDMP (3.1.0): + - Alamofire (4.4.0) + - LotameDMP (4.0.0): - Alamofire (~> 4.0) - - OHHTTPStubs (4.3.0): - - OHHTTPStubs/Default (= 4.3.0) - - OHHTTPStubs/Core (4.3.0) - - OHHTTPStubs/Default (4.3.0): + - OHHTTPStubs (6.0.0): + - OHHTTPStubs/Default (= 6.0.0) + - OHHTTPStubs/Core (6.0.0) + - OHHTTPStubs/Default (6.0.0): - OHHTTPStubs/Core - OHHTTPStubs/JSON - OHHTTPStubs/NSURLSession - OHHTTPStubs/OHPathHelpers - - OHHTTPStubs/JSON (4.3.0): + - OHHTTPStubs/JSON (6.0.0): - OHHTTPStubs/Core - - OHHTTPStubs/NSURLSession (4.3.0): + - OHHTTPStubs/NSURLSession (6.0.0): - OHHTTPStubs/Core - - OHHTTPStubs/OHPathHelpers (4.3.0) + - OHHTTPStubs/OHPathHelpers (6.0.0) DEPENDENCIES: - LotameDMP (from `../`) @@ -22,13 +22,13 @@ DEPENDENCIES: EXTERNAL SOURCES: LotameDMP: - :path: "../" + :path: ../ SPEC CHECKSUMS: - Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 - LotameDMP: c4a0065c9035760173635cd1ce2afe5dcfbf4fd3 - OHHTTPStubs: 0aec5755528693a165bd616cb79f69387de306a8 + Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d + LotameDMP: 100c1addabbb1b5eb0302faddf0f852c388494b6 + OHHTTPStubs: 752f9b11fd810a15162d50f11c06ff94f8e012eb -PODFILE CHECKSUM: 5e055f3d87d9e826bbffdaa946dd6844c802fc9c +PODFILE CHECKSUM: 50039ae88500faea322d8bcc41901e68028c282f -COCOAPODS: 1.2.0 +COCOAPODS: 1.2.1 diff --git a/Example/Pods/Local Podspecs/LotameDMP.podspec.json b/Example/Pods/Local Podspecs/LotameDMP.podspec.json index 4ef5c55..40ea81c 100644 --- a/Example/Pods/Local Podspecs/LotameDMP.podspec.json +++ b/Example/Pods/Local Podspecs/LotameDMP.podspec.json @@ -1,6 +1,6 @@ { "name": "LotameDMP", - "version": "3.1.0", + "version": "4.0.0", "summary": "This open source library can be leveraged by Lotame clients to collect data from within their iOS applications.", "description": "Data should influence everything you do – from the products and content you create, to the way you shape and execute your go-to-market strategy. Lotame’s data management platform makes this vision a reality. Our SaaS platform is used by marketers, agencies and publishers around the world to make audience data meaningful and actionable. This framework makes it easy to plug your iOS app into the data management platform.", "homepage": "https://github.com/Lotame/LotameDMP-IOS", @@ -10,10 +10,10 @@ }, "source": { "git": "https://github.com/Lotame/LotameDMP-IOS.git", - "tag": "3.1.0" + "tag": "4.0.0" }, "platforms": { - "ios": "9.0" + "ios": "8.0" }, "requires_arc": true, "source_files": "Pod/Classes/**/*", diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index eeab474..d804153 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,20 +1,20 @@ PODS: - - Alamofire (4.0.1) - - LotameDMP (3.1.0): + - Alamofire (4.4.0) + - LotameDMP (4.0.0): - Alamofire (~> 4.0) - - OHHTTPStubs (4.3.0): - - OHHTTPStubs/Default (= 4.3.0) - - OHHTTPStubs/Core (4.3.0) - - OHHTTPStubs/Default (4.3.0): + - OHHTTPStubs (6.0.0): + - OHHTTPStubs/Default (= 6.0.0) + - OHHTTPStubs/Core (6.0.0) + - OHHTTPStubs/Default (6.0.0): - OHHTTPStubs/Core - OHHTTPStubs/JSON - OHHTTPStubs/NSURLSession - OHHTTPStubs/OHPathHelpers - - OHHTTPStubs/JSON (4.3.0): + - OHHTTPStubs/JSON (6.0.0): - OHHTTPStubs/Core - - OHHTTPStubs/NSURLSession (4.3.0): + - OHHTTPStubs/NSURLSession (6.0.0): - OHHTTPStubs/Core - - OHHTTPStubs/OHPathHelpers (4.3.0) + - OHHTTPStubs/OHPathHelpers (6.0.0) DEPENDENCIES: - LotameDMP (from `../`) @@ -22,13 +22,13 @@ DEPENDENCIES: EXTERNAL SOURCES: LotameDMP: - :path: "../" + :path: ../ SPEC CHECKSUMS: - Alamofire: 7682d43245de14874acd142ec137b144aa1dd335 - LotameDMP: c4a0065c9035760173635cd1ce2afe5dcfbf4fd3 - OHHTTPStubs: 0aec5755528693a165bd616cb79f69387de306a8 + Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d + LotameDMP: 100c1addabbb1b5eb0302faddf0f852c388494b6 + OHHTTPStubs: 752f9b11fd810a15162d50f11c06ff94f8e012eb -PODFILE CHECKSUM: 5e055f3d87d9e826bbffdaa946dd6844c802fc9c +PODFILE CHECKSUM: 50039ae88500faea322d8bcc41901e68028c282f -COCOAPODS: 1.2.0 +COCOAPODS: 1.2.1 diff --git a/Example/Pods/OHHTTPStubs/README.md b/Example/Pods/OHHTTPStubs/README.md index ca890a7..af35502 100644 --- a/Example/Pods/OHHTTPStubs/README.md +++ b/Example/Pods/OHHTTPStubs/README.md @@ -3,8 +3,9 @@ OHHTTPStubs [![Platform](http://cocoapod-badges.herokuapp.com/p/OHHTTPStubs/badge.png)](http://cocoadocs.org/docsets/OHHTTPStubs) [![Version](http://cocoapod-badges.herokuapp.com/v/OHHTTPStubs/badge.png)](http://cocoadocs.org/docsets/OHHTTPStubs) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Carthage Swift 3.0/3.1](https://img.shields.io/badge/Carthage-Swift%203.x-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/AliSoftware/OHHTTPStubs.svg?branch=master)](https://travis-ci.org/AliSoftware/OHHTTPStubs) +[![Language: Swift-2.3/3.0/3.1](https://img.shields.io/badge/Swift-2.3%2F3.0%2F3.1-orange.svg)](https://swift.org) `OHHTTPStubs` is a library designed to stub your network requests very easily. It can help you: @@ -72,12 +73,24 @@ _(There are also other ways to perform a similar task, including using `curl -is * `OHHTTPStubs` is compatible with **iOS5+**, **OS X 10.7+**, **tvOS**. * `OHHTTPStubs` also works with `NSURLSession` as well as any network library wrapping them. -* `OHHTTPStubs` is **fully compatible with Swift 2.2, 2.3 and 3.0**. +* `OHHTTPStubs` is **fully compatible with Swift 2.2, 2.3, 3.0 and 3.1**. _[Nullability annotations](https://developer.apple.com/swift/blog/?id=25) have also been added to the ObjC API to allow a cleaner API when used from Swift even if you don't use the dedicated Swift API wrapper provided by `OHHTTPStubsSwift.swift`._ -> Note: When building with Swift 2.2, you will have some `extraneous '_' in parameter` warnings. Those are normal: it's because the code is already ready for the transition to Swift 3 — which requires those `_` in parameters while Swift 2.2 didn't. -> You can safely ignore those warnings in Swift 2.2. See [SE-0046](https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.md) for more info. +
+Swift 2.2 users + +If you're still building for Swift 2.2, you will have some `extraneous '_' in parameter` warnings. Those are normal: it's because the code has already done the transition to Swift 3 — which requires those `_` in parameters while Swift 2.2 didn't. + +You can safely ignore those warnings in Swift 2.2. See [SE-0046](https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.md) for more info. +
+ +
+Carthage users using Swift 2.x + +If you're using Carthage, we don't do Swift-2.3-specific branches anymore (too much maintenance work and most people have migrated already anyway) but if you still need Swift 2.3 compatibility, you can follow the tips in [the installation instructions below](#using-the-right-swift-version-for-your-project) to force Carthage to build this library with Swift 2.3. + +
# Installing in your projects @@ -85,11 +98,11 @@ _[Nullability annotations](https://developer.apple.com/swift/blog/?id=25) have a Using [CocoaPods](https://guides.cocoapods.org) is the recommended way. -Simply add `pod 'OHHTTPStubs'` to your `Podfile`. If you **intend to use it from Swift**, you should **add** `OHHTTPStubs/Swift` to your `Podfile` as well. +* If you **intend to use `OHHTTPStubs` from Objective-C only**, add `pod 'OHHTTPStubs'` to your `Podfile`. +* If you **intend to use `OHHTTPStubs` from Swift**, add `pod 'OHHTTPStubs/Swift'` to your `Podfile` instead. ```ruby -pod 'OHHTTPStubs' # Default subspecs, including support for NSURLSession & JSON etc -pod 'OHHTTPStubs/Swift' # Adds the Swiftier API wrapper too +pod 'OHHTTPStubs/Swift' # includes the Default subspec, with support for NSURLSession & JSON, and the Swiftier API wrappers ``` ### All available subspecs @@ -97,7 +110,7 @@ pod 'OHHTTPStubs/Swift' # Adds the Swiftier API wrapper too `OHHTTPStubs` is split into subspecs so that when using Cocoapods, you can get only what you need, no more, no less. * The default subspec includes `NSURLSession`, `JSON`, and `OHPathHelpers` -* The `Swift` subspec adds the Swiftier API (but doesn't include `NSURLSession` & `JSON` by itself) +* The `Swift` subspec adds the Swiftier API to that default subspec * `HTTPMessage` and `Mocktail` are opt-in subspecs: list them explicitly if you need them * `OHPathHelpers` doesn't depend on `Core` and can be used independently of `OHHTTPStubs` altogether @@ -106,17 +119,17 @@ pod 'OHHTTPStubs/Swift' # Adds the Swiftier API wrapper too Here's a list of which subspecs are included for each of the different lines you could use in your `Podfile`: -| Subspec | Core | NSURLSession | JSON | Swift | OHPathHelpers | HTTPMessage | Mocktail | -| ------- | :---: | :----------: | :---: | :---: | :-----------: | :---------: | :------: | -| `pod 'OHHTTPStubs'` | ✅ | ✅ | ✅ | | ✅ | | | -| `pod 'OHHTTPStubs/Default'` | ✅ | ✅ | ✅ | | ✅ | | | -| `pod 'OHHTTPStubs/Swift'` | ✅ | | | ✅ | | | | -| `pod 'OHHTTPStubs/Core'` | ✅ | | | | | | | -| `pod 'OHHTTPStubs/NSURLSession'` | ✅ | ✅ | | | | | | -| `pod 'OHHTTPStubs/JSON'` | ✅ | | ✅ | | | | | -| `pod 'OHHTTPStubs/OHPathHelpers'` | | | | | ✅ | | | -| `pod 'OHHTTPStubs/HTTPMessage'` | ✅ | | | | | ✅ | | -| `pod 'OHHTTPStubs/Mocktail'` | ✅ | | | | | | ✅ | +| Subspec | Core | NSURLSession | JSON | Swift | OHPathHelpers | HTTPMessage | Mocktail | +| --------------------------------- | :--: | :----------: | :--: | :---: | :-----------: | :---------: | :------: | +| `pod 'OHHTTPStubs'` | ✅ | ✅ | ✅ | | ✅ | | | +| `pod 'OHHTTPStubs/Default'` | ✅ | ✅ | ✅ | | ✅ | | | +| `pod 'OHHTTPStubs/Swift'` | ✅ | ✅ | ✅ | ✅ | ✅ | | | +| `pod 'OHHTTPStubs/Core'` | ✅ | | | | | | | +| `pod 'OHHTTPStubs/NSURLSession'` | ✅ | ✅ | | | | | | +| `pod 'OHHTTPStubs/JSON'` | ✅ | | ✅ | | | | | +| `pod 'OHHTTPStubs/OHPathHelpers'` | | | | | ✅ | | | +| `pod 'OHHTTPStubs/HTTPMessage'` | ✅ | | | | | ✅ | | +| `pod 'OHHTTPStubs/Mocktail'` | ✅ | | | | | | ✅ | @@ -128,32 +141,38 @@ _Note: The `OHHTTPStubs.framework` built with Carthage will include **all** feat > Be warned that I don't personally use Carthage, so I won't be able to guarantee much help/support for it. -## Using the right Swift Version of `OHHTTPStubs` for your project +## Using the right Swift version for your project -`OHHTTPStubs` supports Swift 2.2 (Xcode 7), and both Swift 2.3 and Swift 3.0 (Xcode 8) 🎉 +`OHHTTPStubs` supports Swift 2.2 (Xcode 7), Swift 2.3 (Xcode 8), Swift 3.0 (Xcode 8+) and Swift 3.1 (Xcode 8.3+) 🎉 Here are some details about the correct setup you need depending on how you integrated `OHHTTPStubs` into your project.
-CocoaPods +CocoaPods: nothing to do -If you use CocoaPods version [`1.1.0.beta.1`](https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.beta.1) or later, then CocoaPods will compile `OHHTTPStubs` with the right Swift Version matching the one you use for your project automatically. +If you use CocoaPods version [`1.1.0.beta.1`](https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.beta.1) or later, then CocoaPods will compile `OHHTTPStubs` with the right Swift Version matching the one you use for your project automatically. You have nothing to do! 🎉 For more info, see [CocoaPods/CocoaPods#5540](https://github.com/CocoaPods/CocoaPods/pull/5540) and [CocoaPods/CocoaPods#5760](https://github.com/CocoaPods/CocoaPods/pull/5760).
-Carthage +Carthage: choose the right version -The project is currently set up with `SWIFT_VERSION=2.3` on `master`. +The project is set up with `SWIFT_VERSION=3.0` on `master`. -This means that the framework on `master` will build using Swift 2.2 on Xcode 7 and Swift 2.3 on Xcode 8. +This means that the framework on `master` will build using: -If you want Carthage to build the framework with Swift 3.0, you can use the `swift-3.0` branch, whose only difference with `master` is that the project's Build Settings set `SWIFT_VERSION=3.0` instead of `2.3`. +* Swift 3.1 on Xcode 8.3 +* Swift 3.0 on Xcode 8.2 +* Swift 2.2/2.3 on Xcode 7.x. -_Note:_ Later, probably a few weeks after the Xcode 8 official release, we plan to merge the `swift-3.0` branch into `master` and create a _compatibility branch_ `swift-2.3` for Carthage users who have not migrated their Swift code yet. We'll try to keep the branch up-to-date with master as best we can. +We stopped doing Swift-2.3-specific branches (too much maintenance work), so if you want Carthage to build the framework with Swift 2.3 you can: + + * either use an older Xcode version + * or use the previous version of `OHHTTPStubs` (5.2.3) — whose `master` branch uses `2.3` + * or fork the repo just to change the `SWIFT_VERSION` build setting to `2.3` + * or ask Carthage maintainers to [fix this issue](https://github.com/Carthage/Carthage/issues/1445) once and for all. -Hopefully, Carthage will address this in a future release. See the related issue [Carthage/Carthage#1445](https://github.com/Carthage/Carthage/issues/1445).
# Special Considerations @@ -167,10 +186,10 @@ Hopefully, Carthage will address this in a future release. See the related issue ## Automatic loading -Thanks to method swizzling, `OHHTTPStubs` is automatically loaded and installed both for: +`OHHTTPStubs` is automatically loaded and installed (at the time the library is loaded in memory), both for: -* requests made using `NSURLConnection` or `[NSURLSession sharedSession]`; -* requests made using a `NSURLSession` created using a `[NSURLSessionConfiguration defaultSessionConfiguration]` or `[NSURLSessionConfiguration ephemeralSessionConfiguration]` configuration (using `[NSURLSession sessionWithConfiguration:…]`-like methods). +* requests made using `NSURLConnection` or `[NSURLSession sharedSession]` — [thanks to this code](https://github.com/AliSoftware/OHHTTPStubs/blob/master/OHHTTPStubs/Sources/OHHTTPStubs.m#L107-L113) +* requests made using a `NSURLSession` that was created via `[NSURLSession sessionWithConfiguration:…]` and using either `[NSURLSessionConfiguration defaultSessionConfiguration]` or `[NSURLSessionConfiguration ephemeralSessionConfiguration]` configuration — thanks to [method swizzling](http://nshipster.com/method-swizzling/) done [here in the code](https://github.com/AliSoftware/OHHTTPStubs/blob/master/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m). If you need to disable (and re-enable) `OHHTTPStubs` — globally or per `NSURLSession` — you can use `[OHHTTPStubs setEnabled:]` / `[OHHTTPStubs setEnabled:forSessionConfiguration:]`. @@ -192,10 +211,15 @@ But you generally only use stubs during the development phase and want to remove # License and Credits -This project and library has been created by Olivier Halligon (@aligatr on Twitter) and is under the MIT License. +This project and library has been created by Olivier Halligon ([@aligatr](https://twitter.com/aligatr) on Twitter) and is under the MIT License. It has been inspired by [this article from InfiniteLoop.dk](http://www.infinite-loop.dk/blog/2011/09/using-nsurlprotocol-for-injecting-test-data/). -I would also like to thank Kevin Harwood ([@kcharwood](https://github.com/kcharwood)) for migrating the code to `NSInputStream`, Jinlian Wang ([@JinlianWang](https://github.com/JinlianWang)) for adding Mocktail support, and everyone else who contributed to this project on GitHub somehow. +I would also like to thank: + +* Sébastien Duperron ([@Liquidsoul](https://github.com/Liquidsoul)) for helping me maintaining this library, triaging and responding to issues and PRs +* Kevin Harwood ([@kcharwood](https://github.com/kcharwood)) for migrating the code to `NSInputStream` +* Jinlian Wang ([@JinlianWang](https://github.com/JinlianWang)) for adding Mocktail support +* and everyone else who contributed to this project on GitHub somehow. If you want to support the development of this library, feel free to [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TRTU3UEWEHV92 "Donate"). Thanks to all contributors so far! diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index f307d30..cdb3d5f 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,337 +7,252 @@ objects = { /* Begin PBXBuildFile section */ - 01CC1AFE147B3B5F2C179D0C1B91E40F /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E8617406214F3EDC81C0D28E9C681D2 /* MultipartFormData.swift */; }; - 037D757A3D7DD0547E5CC0065EE230AC /* Pods-LotameDMP_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */; }; - 091ADA0AB1CFE0835F0E066C7C062807 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECAB7E6BC7C1FE9A0D961E9CF4C1C30B /* Notifications.swift */; }; - 0B7F02E4ACF91D125EE659C8FEEF331E /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */; }; - 0B850F421E2E59A080ADFB21C713CA26 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */; }; - 0B9F8A0E971945BC76BD9E718E40BACE /* Pods-LotameDMP_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0CAFEBB06A47D4726995530487166FB1 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = A43C7C330BFE464861C3082D3C2B037D /* Response.swift */; }; - 0FE9A366EC1A26CCEE87264CFBA0B8A8 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0767F757FDFD7FD1A6273AA6DD1887ED /* Request.swift */; }; - 12478EC74416B56096699C3A4492B9E0 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = A43C7C330BFE464861C3082D3C2B037D /* Response.swift */; }; - 1BBE09565B92139CF73200DB2A4B4743 /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A337E6CFCD7ACBED4B81F7733F9B638 /* LotameAudience.swift */; }; + 10EB23E9ECC4B33E16933BB1EA560B6A /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */; }; + 11B0BFCD9DA9AD621A25AF3429C53BF5 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */; }; + 11EA7E3B26F3EBB98121B17E9E45A496 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC570ECC373F68FED243230577391A98 /* AdSupport.framework */; }; + 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1C64932FA286C76276A32A4BC4F3C6DE /* OHHTTPStubs-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DCA7717A3800DDA1015E452884C7705 /* OHHTTPStubs-dummy.m */; }; - 2061BCF4EBBC100AFC2DD592D03A3236 /* Alamofire-iOS9.0-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B95C5EE76D316A1FC6F58962D5885C6 /* Alamofire-iOS9.0-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 239CD78D8F37C3B373805277440C8831 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E0834065FE407ABB67206A1ACA136B /* DMP.swift */; }; 2828C5A8C3FF12A877F8243078BFE26F /* OHHTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8C1F3E527E68DA3B97AFC4CAD9B11C /* OHHTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D0FF0DEDA036CC7F14FBE44C461DBDD /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A337E6CFCD7ACBED4B81F7733F9B638 /* LotameAudience.swift */; }; - 2DBE8ACDEF1BA8DE4BC5118F1FA9BEC8 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882CF88E5C611241A2FDB54E9F407661 /* ParameterEncoding.swift */; }; 3084191BDC83456B1401C24DB3AACF8F /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 450C401487E8F40DA326418DE2D54A62 /* OHHTTPStubsResponse.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 3416A8609A0CFEAA9EAF6027E7FE0B4B /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98AE9A0DC079D71AACBC526BD9921FCB /* SessionDelegate.swift */; }; - 3A452200BC2390097F26B5459FF7A48C /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F60292E408915B79A971861C015FD93 /* TaskDelegate.swift */; }; - 3D4FD21A17BD898421D9A30A3534204D /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98AE9A0DC079D71AACBC526BD9921FCB /* SessionDelegate.swift */; }; - 3DE5565BAE66ED6E4AD42EF99938AC45 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9FB630F740E749C1F2C18932D6DCB7 /* Timeline.swift */; }; - 45BC8F1673BB168CCAAF4262F272E7EA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - 4BE9929A79FC78F53F1635FD61281888 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 882CF88E5C611241A2FDB54E9F407661 /* ParameterEncoding.swift */; }; - 531BD362CD7BE467B3C15DEF961C6732 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9FB630F740E749C1F2C18932D6DCB7 /* Timeline.swift */; }; - 55AD0FF7EF0CADA0311932BA55754EEC /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */; }; + 3626B94094672CB1C9DEA32B9F9502E1 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */; }; + 36AF845C1FA25396EEC8B338B588C9D6 /* LotameDMP.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */; }; + 382A35323429A462ECB1E9E59157649C /* LotameDMP-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */; }; + 3DA115D0A72C5C47A81F90910195409B /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */; }; + 40ECD97A61F651DFBD9A23A4EC18E55F /* Pods-LotameDMP_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 43A9703A4BEDF7EBCE1236A8F3F8358A /* OHHTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 36754F82CE5BC199C2601EDE46F1B290 /* OHHTTPStubsMethodSwizzling.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 4544043B3F83E12258851F1586DD524E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; + 5387216E723A3C68E851CA15573CDD71 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */; }; 57BEF5452B8ABD57683D286244C7FC94 /* OHHTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = AD13AFBDCEBD92B6BEE3E5A71440DDC2 /* OHHTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5BAB1595D9AFEA8B21D1A9E8F59C38F4 /* LotameDMP.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */; }; - 5C6BF9C2AB15CF5AA6D9EBFADE879BAC /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A31847BEE120C869C0BBAEEF2A4A9C7 /* ResponseSerialization.swift */; }; - 5CCC6EEAE17971AEB330EADD42CE822F /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FC61C5614265D7EC6B79B2F91E71E45 /* LotameError.swift */; }; - 5E6C1A6961FB342C12B84B0A0DFC8DDB /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FC61C5614265D7EC6B79B2F91E71E45 /* LotameError.swift */; }; - 63DE5BFFB9F8D7F725667A93F5A43275 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + 61200D01A1855D7920CEF835C8BE00B0 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */; }; + 62F65AD8DC4F0F9610F4B8B4738EC094 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */; }; 64C91FFBDEDD820655E28F38024FEE22 /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 33C710F419C86BCD50AEDD19604021C7 /* OHHTTPStubsResponse+JSON.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 6505FA6B758D3CD261E5464F70DC0C69 /* LotameDMP-iOS10.0-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BB0490DFD47B046C7205F0A56FA3675 /* LotameDMP-iOS10.0-dummy.m */; }; - 680E6F8B04824ED80E7C674367B1A3C5 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECAB7E6BC7C1FE9A0D961E9CF4C1C30B /* Notifications.swift */; }; - 6AFA1B424EA98346063BD2E439A2EA4C /* OHHTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 36754F82CE5BC199C2601EDE46F1B290 /* OHHTTPStubsMethodSwizzling.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6B9FFB56F125AC6323AD1EFFCDF35AD4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - 6C847EBBA88F56CD9B9660C1E03D2E21 /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6F2BDEA2A39F356EB8BBC02F8BC49E /* AFError.swift */; }; - 6E699DCCB9065C22C8825AF81BEE2216 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 623AECE894294068CCF1B7B41BE25C5A /* ServerTrustPolicy.swift */; }; - 729532F2F92C16C4142CE64B79D6478B /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */; }; - 76C8C34D494F9C6C6DCFD2FA7513B448 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0767F757FDFD7FD1A6273AA6DD1887ED /* Request.swift */; }; - 774BF01C970236E42A554FDE8061881E /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F60292E408915B79A971861C015FD93 /* TaskDelegate.swift */; }; - 7761B68FA15475DE26FF2EBF75B936B1 /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6F2BDEA2A39F356EB8BBC02F8BC49E /* AFError.swift */; }; - 789F26DE511CFB4EA5E1A22D964A8D84 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E8617406214F3EDC81C0D28E9C681D2 /* MultipartFormData.swift */; }; - 7A2F295B5717E1435290012F20C4D834 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B810ECD27B3196894997BC2BE51CCE0 /* Alamofire.swift */; }; - 7AF863D60D5AF3B59EF70B0E8EDBF1A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; + 691F4BEE463CA14CCC676A7BF64289A6 /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */; }; + 73B9C996AED49ED7CF8EC2A6F1738059 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; + 7B5FE28C7EA4122B0598738E54DBEBD8 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */; }; + 7BB8B3FB7DB2120856EBEFAB2C0DE094 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; + 7D70AD9517711B55173D6130E078838A /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 258B7E0EECBA64C4BCA558B81FCF2750 /* CFNetwork.framework */; }; + 7D8CC01E8C9EFFF9F4D65406CDE0AB66 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */; }; + 7F3AA1BA918C977BA88ECAD3BEBE2D1B /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */; }; 83A37634F48394BD93F108582501A4C4 /* OHPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 76627F3692CA4DA887DED51DC68CF81E /* OHPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8A3179F7624AA2DC57A99DBB4E784220 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - 8E97FFAD8F1B579C37EE073BC702858E /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 623AECE894294068CCF1B7B41BE25C5A /* ServerTrustPolicy.swift */; }; - 93B19A9281A886F680D22A5437D6B5CA /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8056037CD6EAF8A215F77DB8E24C6AED /* SessionManager.swift */; }; 9890E6D0FDF36E4CA8ACA675C86FC6D2 /* OHHTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = F945C090757C5DBD90F1D57EB0575534 /* OHHTTPStubsMethodSwizzling.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 992ECC889873A67632A92D727A870E6E /* LotameDMP-iOS9.0-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EE03DEA311B16035FA23F33F9A1F3CA2 /* LotameDMP-iOS9.0-dummy.m */; }; - 9937070ABBA54FBBA7BA0F3D3D2D3331 /* Pods-LotameDMP_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */; }; - 9A7BCF8905D2D62265995BD9DF67409C /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0252326AD6D69CC243DD317511C08CF8 /* DispatchQueue+Alamofire.swift */; }; - A05A788C2F8B159207F5144ECA1A5848 /* Alamofire-iOS10.0-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C3417E8B71CAC774E5A06B8DDF0761F /* Alamofire-iOS10.0-dummy.m */; }; + 9E3EA11F3FB3812F8E4D6F08F0717606 /* Pods-LotameDMP_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */; }; + 9ED2BB2981896E0A39EFA365503F58CE /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */; }; A0A2186A1786188B449AEB083BBB7891 /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = FEF0E8CE9EEB29DC85302F94CC30BAFE /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A2C1B3946F6B6A2667189BFF5D183362 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - AB6CC72B1FDEBAD923EBEE4AA08D4C38 /* LotameDMP-iOS9.0-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 77AEE63024C196407E80C730BB5337BA /* LotameDMP-iOS9.0-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B12A2150AEA52FDEAF3B7C904F569327 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7DABA157120A51F189CDE48E4E2A67 /* SwiftyJSON.swift */; }; + A2A6F71B727312BD45CC7A4AAD7B0AB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */; }; + A35ECCA29E8F45D0B8D78B8075C296BD /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */; }; + A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */; }; + AE1EF48399533730D0066E04B22CA2D6 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */; }; + B5FCC9FFF6AB0081229AC56A56CBF68A /* LotameDMP-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B65FCF589DA398C3EFE0128064E510EC /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */; }; + B6D55D6720994609A098DB75BA739719 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */; }; B71274CE2E5707A2AD5688829FE616D0 /* OHHTTPStubs-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 69E64B61FD883181243E9D59370F9969 /* OHHTTPStubs-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B7D36D88DB776AA1DEA9FF8D6698EE93 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2410B52E9B93C70E86383ACD8FACE80 /* NetworkReachabilityManager.swift */; }; - BBB74AB011C88149BC65C2C10B6E6A19 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E0834065FE407ABB67206A1ACA136B /* DMP.swift */; }; - BBD53CB8D94BD8B0CF6D449A29E50EA2 /* Alamofire-iOS9.0-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A04CC6A54C5AC969F0C82E660F95E8E /* Alamofire-iOS9.0-dummy.m */; }; - C08DA65FCB929D311DA968E3FA0E682E /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A31847BEE120C869C0BBAEEF2A4A9C7 /* ResponseSerialization.swift */; }; + BBEFE2F9CEB73DC7BD97FFA66A0D9D4F /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */; }; + BE5C67A07E289FE1F9BE27335B159997 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */; }; C5ED19E01DFC9993E0C9AB6C85ACAB1D /* NSURLRequest+HTTPBodyTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F8FCA014B1789B8B5609863F8392BEC /* NSURLRequest+HTTPBodyTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C6D5BEAE5AB74B6830DC1AA37DADB677 /* LotameDMP-iOS10.0-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0034ADA49852DFD9E80588ABA332045E /* LotameDMP-iOS10.0-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C7C6308566067884C551167827699C3D /* Pods-LotameDMP_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; C86DFF71F80F40AD1FEAF1B4824A4E1F /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = A99BCD8F756C9FBCF06150555C1E1BCF /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; CA306BDBD477DE20CD0836C7F5F0BF4B /* OHPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = C6649F10029169FD60CF7AA94B4634A6 /* OHPathHelpers.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - CA583D09B1ABAB5C4063B0E2C16ADD5F /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B810ECD27B3196894997BC2BE51CCE0 /* Alamofire.swift */; }; - CC5DAF1BC6465892B620F2B63ADAF625 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2410B52E9B93C70E86383ACD8FACE80 /* NetworkReachabilityManager.swift */; }; - CC9121C6E4B0F6F19125B5941B4F419E /* LotameDMP.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */; }; - CD0C9C1AF391650853077B2C5E9B62E0 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9EABB9632D8C4132D837BCE73140767 /* Result.swift */; }; - CE5D2F0C60D98575DBF92C59FB55F251 /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */; }; - D04F942837A16D37FA498832A73A80AA /* Alamofire-iOS10.0-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CA3193EB2A2E97C49E066AAB340F273 /* Alamofire-iOS10.0-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D06655905EB690BD8ADE27D2BFC5827F /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */; }; - D270D1BB315595AA39B9E6494A62E3FD /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8056037CD6EAF8A215F77DB8E24C6AED /* SessionManager.swift */; }; - D54BA76997BAE001826939EEFBD7FBFB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 145B43A6485C114F242C01AD2353716A /* Foundation.framework */; }; - DC2318049E9595208DE21CA6E2CAA8A9 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */; }; + CB6D60925223897FFA2662667DF83E8A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E4018A949737B851B6F6630C9E83D48 /* Response.swift */; }; + D16815DF9CF0F459C692ABEE14B8A90A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; + D211627240F56AC9E9A1E4F4E27C58A6 /* Pods-LotameDMP_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */; }; + D5E4C5FAE2F28389DA4E4DA28EEFE365 /* Pods-LotameDMP_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; DC3BE4B3C6C098A5B9B063DB25FCDF8B /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A66376F5E3BAE650D43BBCEA0ACDB7B /* NSURLRequest+HTTPBodyTesting.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - DF3AE4A4097670F36803AEE59537E02C /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0252326AD6D69CC243DD317511C08CF8 /* DispatchQueue+Alamofire.swift */; }; E051B949D969BCE0CD553D323D63977E /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EC482F90295CA01765BA58BB2653694 /* OHHTTPStubs.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - E5B71C56378B6BE4231A12B10446918B /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */; }; - E7B6985839F2AB81EC6355558E67E850 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7DABA157120A51F189CDE48E4E2A67 /* SwiftyJSON.swift */; }; - E9EBE49CF8E41611C732D969BBB118D0 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */; }; - FCD41DBC7B4375ACEEFA1BA388F074C8 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9EABB9632D8C4132D837BCE73140767 /* Result.swift */; }; + EFD264FC408EBF3BA2528E70B08DDD94 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */; }; + F26105CD3493CF1CF6506F36561CF17F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; + F6BECD98B97CBFEBE2C96F0E9E72A6C0 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */; }; + F8B3D3092ED0417E8CDF32033F6122F5 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */; }; FFE0D1C890897CF1AE34EC147C84BA2C /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = F8924EE5D6D964DB953650FD76B83B9E /* OHHTTPStubs+NSURLSessionConfiguration.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 19AD2CDB1DA843B9FB7BF815AFAC68AA /* PBXContainerItemProxy */ = { + 008FA4FEF6392616FE22BC33F99FDF87 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = D87A7631F55449935013E12A25C8B1E0; - remoteInfo = "LotameDMP-iOS10.0"; + remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; + remoteInfo = Alamofire; }; - 282AFDD21B3E818E75B351C280A7EB8B /* PBXContainerItemProxy */ = { + 14F34FADE20A0DB7EE21878F12452E6F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = C4380F3332F12FC09D2A3954BD9C2DC4; - remoteInfo = "LotameDMP-iOS10.0-LotameDMP"; + remoteGlobalIDString = 98C70B29DA51105A7C00877F51F9AE6D; + remoteInfo = LotameDMP; }; - 2C1F0FA0F597C7F66EADFC3BD1DB89A9 /* PBXContainerItemProxy */ = { + 5B6EBA2C287BD5CA395C916566B63E27 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = CF0578DE89449D99766E5B48E4303D42; - remoteInfo = "Alamofire-iOS9.0"; + remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; + remoteInfo = Alamofire; }; - 56CB0FE53721D73002608E530B3C49CA /* PBXContainerItemProxy */ = { + 622296FFDBFB019096028D0E09123D1C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 3F6EBEE64D06BFC30FB5DF93053F4F23; - remoteInfo = "Alamofire-iOS10.0"; + remoteGlobalIDString = 98C70B29DA51105A7C00877F51F9AE6D; + remoteInfo = LotameDMP; }; - 6F137E5C76DA95AC8D8DD0DC7C868FCA /* PBXContainerItemProxy */ = { + D0D22DBFC62D517B155C8BDD7A345CA6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = CF0578DE89449D99766E5B48E4303D42; - remoteInfo = "Alamofire-iOS9.0"; + remoteGlobalIDString = D4CF7DA50152F9B5C82AB977424D6D31; + remoteInfo = "LotameDMP-LotameDMP"; }; - 95B819C76090FD612A20FD21463A199C /* PBXContainerItemProxy */ = { + F84A6EADC2F1D5C788EC9FD8CCBF9819 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = CF0578DE89449D99766E5B48E4303D42; - remoteInfo = "Alamofire-iOS9.0"; + remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; + remoteInfo = Alamofire; }; - B93FAEEBDA1334DB34EE2163155DC00C /* PBXContainerItemProxy */ = { + FD0E88080FAC4AB286C2D131AF84899B /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 06A23325201207EEE8C22E3551E28E4A; remoteInfo = OHHTTPStubs; }; - BD90D9E1A31EC2E04C74BC273819A83C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = A7E6A570A5796A971F7741E4F1312193; - remoteInfo = "LotameDMP-iOS9.0"; - }; - E318233F5CFC5CA675BED8653F5CFE14 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = D7973520D24620B7007E55AE03895B6A; - remoteInfo = "LotameDMP-iOS9.0-LotameDMP"; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0034ADA49852DFD9E80588ABA332045E /* LotameDMP-iOS10.0-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-iOS10.0-umbrella.h"; sourceTree = ""; }; - 0252326AD6D69CC243DD317511C08CF8 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 06CDC14360D5B86C048533BFF2423E09 /* Alamofire-iOS10.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-iOS10.0-prefix.pch"; sourceTree = ""; }; - 0767F757FDFD7FD1A6273AA6DD1887ED /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - 091715455495A385122589395850ED36 /* OHHTTPStubs.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = OHHTTPStubs.modulemap; sourceTree = ""; }; + 04075B8A4826297DFB273C8A46BDFE07 /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; + 091715455495A385122589395850ED36 /* OHHTTPStubs.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = OHHTTPStubs.modulemap; sourceTree = ""; }; 0F8FCA014B1789B8B5609863F8392BEC /* NSURLRequest+HTTPBodyTesting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+HTTPBodyTesting.h"; path = "OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h"; sourceTree = ""; }; - 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/AdSupport.framework; sourceTree = DEVELOPER_DIR; }; - 145B43A6485C114F242C01AD2353716A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = LotameDMP.framework; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.debug.xcconfig"; sourceTree = ""; }; 181F8F5C57F8A1DBFBCD6CDB7E049E10 /* Pods-LotameDMP_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Tests-acknowledgements.markdown"; sourceTree = ""; }; + 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; 1C4D80FF794C4A13B9739893FFD59DFD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 262230FF6CF750AC96C152F6923C8175 /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1E4018A949737B851B6F6630C9E83D48 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; + 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; + 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; + 258B7E0EECBA64C4BCA558B81FCF2750 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 282D6F4E2A4BDA0D03D8CECC95C4D50F /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2866D261378FCD4FE14943A99A722B77 /* Pods-LotameDMP_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-LotameDMP_Example.modulemap"; sourceTree = ""; }; - 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameProfile.swift; sourceTree = ""; }; + 2866D261378FCD4FE14943A99A722B77 /* Pods-LotameDMP_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-LotameDMP_Example.modulemap"; sourceTree = ""; }; + 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; 33C710F419C86BCD50AEDD19604021C7 /* OHHTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubsResponse+JSON.m"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m"; sourceTree = ""; }; 3471B4AC871F2345EF2D38EC0476BB55 /* OHHTTPStubs-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-prefix.pch"; sourceTree = ""; }; 36754F82CE5BC199C2601EDE46F1B290 /* OHHTTPStubsMethodSwizzling.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsMethodSwizzling.h; path = OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h; sourceTree = ""; }; 3DCA7717A3800DDA1015E452884C7705 /* OHHTTPStubs-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs-dummy.m"; sourceTree = ""; }; + 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DMP.swift; sourceTree = ""; }; 3F6843AA96F513831A4CBD26850657A8 /* Pods-LotameDMP_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LotameDMP_Example-acknowledgements.plist"; sourceTree = ""; }; - 3FC61C5614265D7EC6B79B2F91E71E45 /* LotameError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameError.swift; sourceTree = ""; }; - 4033AEA3CE94BE03ACC3D0C2EA5D590C /* LotameDMP-iOS10.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "LotameDMP-iOS10.0.modulemap"; sourceTree = ""; }; + 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; 450C401487E8F40DA326418DE2D54A62 /* OHHTTPStubsResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsResponse.m; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.m; sourceTree = ""; }; - 47D65711A6B65068A70A007D9ACE5114 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 48A05BF1BB23DC831BCA06D26A10DDF8 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4927332025C324CA11BC68E9ADD97C5E /* Pods-LotameDMP_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-LotameDMP_Tests.modulemap"; sourceTree = ""; }; - 4C7266D0A29AB74C931B180587468B9E /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "ResourceBundle-LotameDMP-Info.plist"; path = "../LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; - 4ED4C285145DF1B4676E902E764344F1 /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; + 4927332025C324CA11BC68E9ADD97C5E /* Pods-LotameDMP_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-LotameDMP_Tests.modulemap"; sourceTree = ""; }; 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OHHTTPStubs.xcconfig; sourceTree = ""; }; 51F9A814E2B204818DF97B58DB17FDCF /* Pods-LotameDMP_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Example-frameworks.sh"; sourceTree = ""; }; + 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; 581AC0E6A878A80EFCC3C5A83CA83488 /* Pods-LotameDMP_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Tests-resources.sh"; sourceTree = ""; }; - 5A337E6CFCD7ACBED4B81F7733F9B638 /* LotameAudience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameAudience.swift; sourceTree = ""; }; - 5BF284DEBB6EACC306B2DF3FEC7CBEA3 /* LotameDMP-iOS9.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "LotameDMP-iOS9.0-prefix.pch"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch"; sourceTree = ""; }; - 5C3417E8B71CAC774E5A06B8DDF0761F /* Alamofire-iOS10.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-iOS10.0-dummy.m"; sourceTree = ""; }; + 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LotameDMP-dummy.m"; sourceTree = ""; }; 5EC482F90295CA01765BA58BB2653694 /* OHHTTPStubs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubs.m; path = OHHTTPStubs/Sources/OHHTTPStubs.m; sourceTree = ""; }; - 5F60292E408915B79A971861C015FD93 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; - 623AECE894294068CCF1B7B41BE25C5A /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; + 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Tests.framework; path = "Pods-LotameDMP_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Example-umbrella.h"; sourceTree = ""; }; - 6914C8FC159AFDE5B159D8DBAAD40D20 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LotameDMP_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = LotameDMP.bundle; path = LotameDMP.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; 69E64B61FD883181243E9D59370F9969 /* OHHTTPStubs-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-umbrella.h"; sourceTree = ""; }; - 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; 6B8C1F3E527E68DA3B97AFC4CAD9B11C /* OHHTTPStubsResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsResponse.h; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.h; sourceTree = ""; }; - 72752AEE09866F4907EFE25A23E1EFBA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 70F5C61FC1F0C33825FF65966AF5621D /* 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; }; + 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameAudience.swift; sourceTree = ""; }; + 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Example.framework; path = "Pods-LotameDMP_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 76627F3692CA4DA887DED51DC68CF81E /* OHPathHelpers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHPathHelpers.h; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h; sourceTree = ""; }; - 77AEE63024C196407E80C730BB5337BA /* LotameDMP-iOS9.0-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "LotameDMP-iOS9.0-umbrella.h"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h"; sourceTree = ""; }; - 7A04CC6A54C5AC969F0C82E660F95E8E /* Alamofire-iOS9.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "Alamofire-iOS9.0-dummy.m"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m"; sourceTree = ""; }; + 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; 7A66376F5E3BAE650D43BBCEA0ACDB7B /* NSURLRequest+HTTPBodyTesting.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLRequest+HTTPBodyTesting.m"; path = "OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m"; sourceTree = ""; }; - 7B95C5EE76D316A1FC6F58962D5885C6 /* Alamofire-iOS9.0-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Alamofire-iOS9.0-umbrella.h"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h"; sourceTree = ""; }; - 7E8617406214F3EDC81C0D28E9C681D2 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 7F1013EC32FE788FB4160A402115608A /* Alamofire-iOS9.0.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Alamofire-iOS9.0.xcconfig"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig"; sourceTree = ""; }; - 8056037CD6EAF8A215F77DB8E24C6AED /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; - 81E0834065FE407ABB67206A1ACA136B /* DMP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DMP.swift; sourceTree = ""; }; + 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; 84169E163894A1760462BE867D38856F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 85ED04B28CE676ED2BC92936A790DECF /* LotameDMP-iOS10.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-iOS10.0-prefix.pch"; sourceTree = ""; }; - 878B0F039C6D02852C2F2A51A49948DE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = Info.plist; path = "../LotameDMP-iOS9.0/Info.plist"; sourceTree = ""; }; - 882CF88E5C611241A2FDB54E9F407661 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 8B810ECD27B3196894997BC2BE51CCE0 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 8BB0490DFD47B046C7205F0A56FA3675 /* LotameDMP-iOS10.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LotameDMP-iOS10.0-dummy.m"; sourceTree = ""; }; - 8BCF80AA58C7D3B8224E63B6D74A92F1 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8E6F2BDEA2A39F356EB8BBC02F8BC49E /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-umbrella.h"; sourceTree = ""; }; + 867FB9BC000430BD8D288DE00752090F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; + 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; + 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.release.xcconfig"; sourceTree = ""; }; - 98AE9A0DC079D71AACBC526BD9921FCB /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - 9A31847BEE120C869C0BBAEEF2A4A9C7 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "LotameDMP-iOS10.0.xcconfig"; sourceTree = ""; }; - 9B9FB630F740E749C1F2C18932D6DCB7 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - 9C48C143F3E21CA2DFB22DA2BB3EE491 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = Info.plist; path = "../Alamofire-iOS9.0/Info.plist"; sourceTree = ""; }; - 9CA3193EB2A2E97C49E066AAB340F273 /* Alamofire-iOS10.0-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-iOS10.0-umbrella.h"; sourceTree = ""; }; - A2410B52E9B93C70E86383ACD8FACE80 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - A43C7C330BFE464861C3082D3C2B037D /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - A70A499FD9B8CFF2532FF3BB5C998578 /* Alamofire-iOS10.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Alamofire-iOS10.0.modulemap"; sourceTree = ""; }; + 93C307C45E5B6F04CD4099CA7FDA8FA9 /* LotameDMP-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-prefix.pch"; sourceTree = ""; }; + 978C8A2D546E1949D139D06B78F1D107 /* LotameDMP.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = LotameDMP.modulemap; sourceTree = ""; }; + A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; A99BCD8F756C9FBCF06150555C1E1BCF /* Compatibility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Compatibility.h; path = OHHTTPStubs/Sources/Compatibility.h; sourceTree = ""; }; + AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; AD13AFBDCEBD92B6BEE3E5A71440DDC2 /* OHHTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "OHHTTPStubsResponse+JSON.h"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h"; sourceTree = ""; }; - ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = LotameDMP.xcconfig; sourceTree = ""; }; AF6E33079A0AC62440C75012BB20ED40 /* Pods-LotameDMP_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Example-acknowledgements.markdown"; sourceTree = ""; }; + B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; + B7F8DB5C4DBB1A49010816C7E0785934 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; B974CEE3695BA2D211E692533A5C70EA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BA15D4B76DDC32F659D7B89822179877 /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.release.xcconfig"; sourceTree = ""; }; - C441E0187343E410A52A48157DBC726E /* Alamofire-iOS9.0-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Alamofire-iOS9.0-prefix.pch"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch"; sourceTree = ""; }; C6649F10029169FD60CF7AA94B4634A6 /* OHPathHelpers.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHPathHelpers.m; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m; sourceTree = ""; }; - C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "LotameDMP-iOS9.0.xcconfig"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig"; sourceTree = ""; }; C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Tests-umbrella.h"; sourceTree = ""; }; + D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameError.swift; sourceTree = ""; }; D20FC0352198484DDB75C6398CAC2FAF /* Pods-LotameDMP_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Example-resources.sh"; sourceTree = ""; }; - D295FCF2431669A9064242122F027826 /* Alamofire-iOS10.0.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Alamofire-iOS10.0.xcconfig"; sourceTree = ""; }; - D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LotameDMP.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.debug.xcconfig"; sourceTree = ""; }; - D852568030BFB0D3C58F588C396316EB /* Alamofire-iOS9.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; name = "Alamofire-iOS9.0.modulemap"; path = "../Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap"; sourceTree = ""; }; D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Example-dummy.m"; sourceTree = ""; }; - D9EABB9632D8C4132D837BCE73140767 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Tests-dummy.m"; sourceTree = ""; }; - E769DBCFFDBFA2A3533C64F8E5EECF0A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - ECAB7E6BC7C1FE9A0D961E9CF4C1C30B /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - EE03DEA311B16035FA23F33F9A1F3CA2 /* LotameDMP-iOS9.0-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "LotameDMP-iOS9.0-dummy.m"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m"; sourceTree = ""; }; - F423AB5EF349327AEF58D8D94E8CB63B /* LotameDMP-iOS9.0.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; name = "LotameDMP-iOS9.0.modulemap"; path = "../LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; sourceTree = ""; }; + E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameProfile.swift; sourceTree = ""; }; + E6ACD92E8579844D7BA1F53B4F23746C /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; + EC570ECC373F68FED243230577391A98 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/AdSupport.framework; sourceTree = DEVELOPER_DIR; }; + F097D40D5F132B5A9DBDF6C0B2CECB77 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F77E62830A158EAFB548B5FDA425C9B5 /* Pods-LotameDMP_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LotameDMP_Tests-acknowledgements.plist"; sourceTree = ""; }; + F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; F8924EE5D6D964DB953650FD76B83B9E /* OHHTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubs+NSURLSessionConfiguration.m"; path = "OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; F945C090757C5DBD90F1D57EB0575534 /* OHHTTPStubsMethodSwizzling.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsMethodSwizzling.m; path = OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m; sourceTree = ""; }; - FD7DABA157120A51F189CDE48E4E2A67 /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = ""; }; + F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; + FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OHHTTPStubs.framework; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; FEF0E8CE9EEB29DC85302F94CC30BAFE /* OHHTTPStubs.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubs.h; path = OHHTTPStubs/Sources/OHHTTPStubs.h; sourceTree = ""; }; FF8C542B18C786E2D40F672B27921463 /* Pods-LotameDMP_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Tests-frameworks.sh"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 0895E6CEC19DE79E537E3A1370C3F449 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 11D0C66E0F774792832EAFA21448F3D1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8A3179F7624AA2DC57A99DBB4E784220 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 12B5B1F12EA4B1343A1D95E84A3175AD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D54BA76997BAE001826939EEFBD7FBFB /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5C1F68CFB4A5A07528F3BF6774BCEB9C /* Frameworks */ = { + 05808F2ADD21C69527042AE6B05A3C5E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A2C1B3946F6B6A2667189BFF5D183362 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - C7AE56C614EA98A5132171AE9A318E9A /* Frameworks */ = { + 4B8948DEA29B54758DEBDDEDAD7FA58C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D06655905EB690BD8ADE27D2BFC5827F /* CFNetwork.framework in Frameworks */, - 7AF863D60D5AF3B59EF70B0E8EDBF1A8 /* Foundation.framework in Frameworks */, + D16815DF9CF0F459C692ABEE14B8A90A /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - E7388182A1F9F8C7EA73469D78B17CEF /* Frameworks */ = { + 71AF22C6EED461E076C0DA0C929B9DFA /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + F26105CD3493CF1CF6506F36561CF17F /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - ED3AE368A95F7AF3938B11210E6569A3 /* Frameworks */ = { + 99195E4207764744AEC07ECCBCD550EB /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 45BC8F1673BB168CCAAF4262F272E7EA /* Foundation.framework in Frameworks */, + 73B9C996AED49ED7CF8EC2A6F1738059 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - F3D84B60362EFC339E3D759923AF0F88 /* Frameworks */ = { + C4B99028893CFF8F18456DE4E5177B87 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0B850F421E2E59A080ADFB21C713CA26 /* AdSupport.framework in Frameworks */, - E9EBE49CF8E41611C732D969BBB118D0 /* Alamofire.framework in Frameworks */, - 6B9FFB56F125AC6323AD1EFFCDF35AD4 /* Foundation.framework in Frameworks */, + 11EA7E3B26F3EBB98121B17E9E45A496 /* AdSupport.framework in Frameworks */, + 3DA115D0A72C5C47A81F90910195409B /* Alamofire.framework in Frameworks */, + 7BB8B3FB7DB2120856EBEFAB2C0DE094 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - F770A6FBEF84130AED379158F301CF81 /* Frameworks */ = { + C7AE56C614EA98A5132171AE9A318E9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0B7F02E4ACF91D125EE659C8FEEF331E /* AdSupport.framework in Frameworks */, - E5B71C56378B6BE4231A12B10446918B /* Alamofire.framework in Frameworks */, - 63DE5BFFB9F8D7F725667A93F5A43275 /* Foundation.framework in Frameworks */, + 7D70AD9517711B55173D6130E078838A /* CFNetwork.framework in Frameworks */, + 4544043B3F83E12258851F1586DD524E /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -362,16 +277,18 @@ path = "Target Support Files/Pods-LotameDMP_Tests"; sourceTree = ""; }; - 1851ED4A1A7E9943AFD6F03016AB531C /* Classes */ = { + 14CC88387F82D38E9D298CA64170402C /* Support Files */ = { isa = PBXGroup; children = ( - 81E0834065FE407ABB67206A1ACA136B /* DMP.swift */, - 5A337E6CFCD7ACBED4B81F7733F9B638 /* LotameAudience.swift */, - 3FC61C5614265D7EC6B79B2F91E71E45 /* LotameError.swift */, - 337F2B52D3042D3DB665A08244BF46AB /* LotameProfile.swift */, - FD7DABA157120A51F189CDE48E4E2A67 /* SwiftyJSON.swift */, + B7F8DB5C4DBB1A49010816C7E0785934 /* Alamofire.modulemap */, + B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */, + A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */, + E6ACD92E8579844D7BA1F53B4F23746C /* Alamofire-prefix.pch */, + 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */, + F097D40D5F132B5A9DBDF6C0B2CECB77 /* Info.plist */, ); - path = Classes; + name = "Support Files"; + path = "../Target Support Files/Alamofire"; sourceTree = ""; }; 26554B40DD5D521D76B0A640DDEF7631 /* OHPathHelpers */ = { @@ -383,14 +300,27 @@ name = OHPathHelpers; sourceTree = ""; }; - 291981D1C5D1DB7248DF6F23D7D6D47B /* LotameDMP */ = { + 38112569E58C989BAE95B9CCEF4CFBDE /* iOS */ = { isa = PBXGroup; children = ( - 88199B9C013A4C01DD435FF3A787CD6C /* Pod */, - 821BEBE1C53047B89AD5BCFF291ED3B9 /* Support Files */, + EC570ECC373F68FED243230577391A98 /* AdSupport.framework */, + 258B7E0EECBA64C4BCA558B81FCF2750 /* CFNetwork.framework */, + 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */, ); - name = LotameDMP; - path = ../..; + name = iOS; + sourceTree = ""; + }; + 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */ = { + isa = PBXGroup; + children = ( + 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */, + 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */, + 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */, + FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */, + 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */, + 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */, + ); + name = Products; sourceTree = ""; }; 4221E0A3969D14A4F363204FCAC92C92 /* Core */ = { @@ -419,6 +349,21 @@ path = "../Target Support Files/OHHTTPStubs"; sourceTree = ""; }; + 4C94E45A856C7A3DDDA073DC9B24ECE0 /* Support Files */ = { + isa = PBXGroup; + children = ( + 867FB9BC000430BD8D288DE00752090F /* Info.plist */, + 978C8A2D546E1949D139D06B78F1D107 /* LotameDMP.modulemap */, + AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */, + 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */, + 93C307C45E5B6F04CD4099CA7FDA8FA9 /* LotameDMP-prefix.pch */, + 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */, + 04075B8A4826297DFB273C8A46BDFE07 /* ResourceBundle-LotameDMP-Info.plist */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/LotameDMP"; + sourceTree = ""; + }; 4E8C1B2B3A6C44CEBF6AC753A2198DBB /* NSURLSession */ = { isa = PBXGroup; children = ( @@ -431,29 +376,14 @@ name = NSURLSession; sourceTree = ""; }; - 5E575B50D99CC3676AC1E34B78386844 /* Alamofire */ = { + 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */ = { isa = PBXGroup; children = ( - 8E6F2BDEA2A39F356EB8BBC02F8BC49E /* AFError.swift */, - 8B810ECD27B3196894997BC2BE51CCE0 /* Alamofire.swift */, - 0252326AD6D69CC243DD317511C08CF8 /* DispatchQueue+Alamofire.swift */, - 7E8617406214F3EDC81C0D28E9C681D2 /* MultipartFormData.swift */, - A2410B52E9B93C70E86383ACD8FACE80 /* NetworkReachabilityManager.swift */, - ECAB7E6BC7C1FE9A0D961E9CF4C1C30B /* Notifications.swift */, - 882CF88E5C611241A2FDB54E9F407661 /* ParameterEncoding.swift */, - 0767F757FDFD7FD1A6273AA6DD1887ED /* Request.swift */, - A43C7C330BFE464861C3082D3C2B037D /* Response.swift */, - 9A31847BEE120C869C0BBAEEF2A4A9C7 /* ResponseSerialization.swift */, - D9EABB9632D8C4132D837BCE73140767 /* Result.swift */, - 623AECE894294068CCF1B7B41BE25C5A /* ServerTrustPolicy.swift */, - 98AE9A0DC079D71AACBC526BD9921FCB /* SessionDelegate.swift */, - 8056037CD6EAF8A215F77DB8E24C6AED /* SessionManager.swift */, - 5F60292E408915B79A971861C015FD93 /* TaskDelegate.swift */, - 9B9FB630F740E749C1F2C18932D6DCB7 /* Timeline.swift */, - ADD86E18032E7BF88D7CC9062DF90632 /* Validation.swift */, - D095257A6E5D4CD034A6004381E99B81 /* Support Files */, + 761DA5F47361031CA935D355D51B46E4 /* Pod */, + 4C94E45A856C7A3DDDA073DC9B24ECE0 /* Support Files */, ); - path = Alamofire; + name = LotameDMP; + path = ../..; sourceTree = ""; }; 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */ = { @@ -465,6 +395,15 @@ name = "Targets Support Files"; sourceTree = ""; }; + 761DA5F47361031CA935D355D51B46E4 /* Pod */ = { + isa = PBXGroup; + children = ( + F322A5A1B6C13971D8D024A6759ED2ED /* Classes */, + ); + name = Pod; + path = Pod; + sourceTree = ""; + }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( @@ -472,55 +411,15 @@ A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */, CAD3C16957C45B9334B34B3F761CF915 /* Frameworks */, B747B143EACB612C450D4F57A6B1CD86 /* Pods */, - B4F4DD2770344C25D626F71778FCDCB9 /* Products */, + 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */, 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */, ); sourceTree = ""; }; - 7E0B237793B8E009A89DC98E38F5DF0A /* iOS */ = { - isa = PBXGroup; - children = ( - 132EB99AA52E6D2F25BBBD4BDC215397 /* AdSupport.framework */, - 6B36BD8736B9C8DAED865391B07CCCA0 /* CFNetwork.framework */, - 145B43A6485C114F242C01AD2353716A /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 821BEBE1C53047B89AD5BCFF291ED3B9 /* Support Files */ = { - isa = PBXGroup; - children = ( - 878B0F039C6D02852C2F2A51A49948DE /* Info.plist */, - 72752AEE09866F4907EFE25A23E1EFBA /* Info.plist */, - 4033AEA3CE94BE03ACC3D0C2EA5D590C /* LotameDMP-iOS10.0.modulemap */, - 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */, - 8BB0490DFD47B046C7205F0A56FA3675 /* LotameDMP-iOS10.0-dummy.m */, - 85ED04B28CE676ED2BC92936A790DECF /* LotameDMP-iOS10.0-prefix.pch */, - 0034ADA49852DFD9E80588ABA332045E /* LotameDMP-iOS10.0-umbrella.h */, - F423AB5EF349327AEF58D8D94E8CB63B /* LotameDMP-iOS9.0.modulemap */, - C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */, - EE03DEA311B16035FA23F33F9A1F3CA2 /* LotameDMP-iOS9.0-dummy.m */, - 5BF284DEBB6EACC306B2DF3FEC7CBEA3 /* LotameDMP-iOS9.0-prefix.pch */, - 77AEE63024C196407E80C730BB5337BA /* LotameDMP-iOS9.0-umbrella.h */, - 4C7266D0A29AB74C931B180587468B9E /* ResourceBundle-LotameDMP-Info.plist */, - 4ED4C285145DF1B4676E902E764344F1 /* ResourceBundle-LotameDMP-Info.plist */, - ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/LotameDMP-iOS10.0"; - sourceTree = ""; - }; - 88199B9C013A4C01DD435FF3A787CD6C /* Pod */ = { - isa = PBXGroup; - children = ( - 1851ED4A1A7E9943AFD6F03016AB531C /* Classes */, - ); - path = Pod; - sourceTree = ""; - }; A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */ = { isa = PBXGroup; children = ( - 291981D1C5D1DB7248DF6F23D7D6D47B /* LotameDMP */, + 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */, ); name = "Development Pods"; sourceTree = ""; @@ -534,28 +433,14 @@ 26554B40DD5D521D76B0A640DDEF7631 /* OHPathHelpers */, 4362454B75989F1CFE4168E0CD6DC258 /* Support Files */, ); + name = OHHTTPStubs; path = OHHTTPStubs; sourceTree = ""; }; - B4F4DD2770344C25D626F71778FCDCB9 /* Products */ = { - isa = PBXGroup; - children = ( - 282D6F4E2A4BDA0D03D8CECC95C4D50F /* Alamofire.framework */, - 48A05BF1BB23DC831BCA06D26A10DDF8 /* Alamofire.framework */, - D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */, - 47D65711A6B65068A70A007D9ACE5114 /* LotameDMP.framework */, - 8BCF80AA58C7D3B8224E63B6D74A92F1 /* LotameDMP.framework */, - BA15D4B76DDC32F659D7B89822179877 /* OHHTTPStubs.framework */, - 6914C8FC159AFDE5B159D8DBAAD40D20 /* Pods_LotameDMP_Example.framework */, - 262230FF6CF750AC96C152F6923C8175 /* Pods_LotameDMP_Tests.framework */, - ); - name = Products; - sourceTree = ""; - }; B747B143EACB612C450D4F57A6B1CD86 /* Pods */ = { isa = PBXGroup; children = ( - 5E575B50D99CC3676AC1E34B78386844 /* Alamofire */, + EAF51503E6CA27F8FE9EF1FBDDD5A952 /* Alamofire */, B3C73CD853C9EE701F27D144FAF247B8 /* OHHTTPStubs */, ); name = Pods; @@ -574,31 +459,11 @@ isa = PBXGroup; children = ( 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */, - 7E0B237793B8E009A89DC98E38F5DF0A /* iOS */, + 38112569E58C989BAE95B9CCEF4CFBDE /* iOS */, ); name = Frameworks; sourceTree = ""; }; - D095257A6E5D4CD034A6004381E99B81 /* Support Files */ = { - isa = PBXGroup; - children = ( - A70A499FD9B8CFF2532FF3BB5C998578 /* Alamofire-iOS10.0.modulemap */, - D295FCF2431669A9064242122F027826 /* Alamofire-iOS10.0.xcconfig */, - 5C3417E8B71CAC774E5A06B8DDF0761F /* Alamofire-iOS10.0-dummy.m */, - 06CDC14360D5B86C048533BFF2423E09 /* Alamofire-iOS10.0-prefix.pch */, - 9CA3193EB2A2E97C49E066AAB340F273 /* Alamofire-iOS10.0-umbrella.h */, - D852568030BFB0D3C58F588C396316EB /* Alamofire-iOS9.0.modulemap */, - 7F1013EC32FE788FB4160A402115608A /* Alamofire-iOS9.0.xcconfig */, - 7A04CC6A54C5AC969F0C82E660F95E8E /* Alamofire-iOS9.0-dummy.m */, - C441E0187343E410A52A48157DBC726E /* Alamofire-iOS9.0-prefix.pch */, - 7B95C5EE76D316A1FC6F58962D5885C6 /* Alamofire-iOS9.0-umbrella.h */, - E769DBCFFDBFA2A3533C64F8E5EECF0A /* Info.plist */, - 9C48C143F3E21CA2DFB22DA2BB3EE491 /* Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire-iOS10.0"; - sourceTree = ""; - }; E9FC310342247B47409357C80424D3D9 /* Pods-LotameDMP_Example */ = { isa = PBXGroup; children = ( @@ -617,25 +482,48 @@ path = "Target Support Files/Pods-LotameDMP_Example"; sourceTree = ""; }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 008066EBD7F42E8D7B0B9FA0114585DC /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - C7C6308566067884C551167827699C3D /* Pods-LotameDMP_Example-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; + EAF51503E6CA27F8FE9EF1FBDDD5A952 /* Alamofire */ = { + isa = PBXGroup; + children = ( + 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */, + 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */, + 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */, + 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */, + 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */, + F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */, + FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */, + BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */, + 1E4018A949737B851B6F6630C9E83D48 /* Response.swift */, + 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */, + AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */, + 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */, + F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */, + 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */, + 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */, + 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */, + 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */, + 14CC88387F82D38E9D298CA64170402C /* Support Files */, + ); + name = Alamofire; + path = Alamofire; + sourceTree = ""; }; - 18D470B3AAE11BA335FB9616C1FFA660 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 0B9F8A0E971945BC76BD9E718E40BACE /* Pods-LotameDMP_Tests-umbrella.h in Headers */, + F322A5A1B6C13971D8D024A6759ED2ED /* Classes */ = { + isa = PBXGroup; + children = ( + 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */, + 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */, + D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */, + E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */, + 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */, ); - runOnlyForDeploymentPostprocessing = 0; + name = Classes; + path = Classes; + sourceTree = ""; }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ 2BD7DAD655969C1CBE791C6616EA79D0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -644,42 +532,42 @@ C5ED19E01DFC9993E0C9AB6C85ACAB1D /* NSURLRequest+HTTPBodyTesting.h in Headers */, B71274CE2E5707A2AD5688829FE616D0 /* OHHTTPStubs-umbrella.h in Headers */, A0A2186A1786188B449AEB083BBB7891 /* OHHTTPStubs.h in Headers */, - 6AFA1B424EA98346063BD2E439A2EA4C /* OHHTTPStubsMethodSwizzling.h in Headers */, + 43A9703A4BEDF7EBCE1236A8F3F8358A /* OHHTTPStubsMethodSwizzling.h in Headers */, 57BEF5452B8ABD57683D286244C7FC94 /* OHHTTPStubsResponse+JSON.h in Headers */, 2828C5A8C3FF12A877F8243078BFE26F /* OHHTTPStubsResponse.h in Headers */, 83A37634F48394BD93F108582501A4C4 /* OHPathHelpers.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 33EBEB68278F184CC1041610BC3DB47C /* Headers */ = { + 2E7D86CD6DFE64982C948BC2B1C9581D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C6D5BEAE5AB74B6830DC1AA37DADB677 /* LotameDMP-iOS10.0-umbrella.h in Headers */, + 40ECD97A61F651DFBD9A23A4EC18E55F /* Pods-LotameDMP_Example-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6454053E08848D474D1F7ADAB455F339 /* Headers */ = { + 41B6BC360CF1B26A3EAD7C70AFA75371 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2061BCF4EBBC100AFC2DD592D03A3236 /* Alamofire-iOS9.0-umbrella.h in Headers */, + D5E4C5FAE2F28389DA4E4DA28EEFE365 /* Pods-LotameDMP_Tests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - C0D7E670964EE814EF1CB7C817552188 /* Headers */ = { + 89DD8331096690E5526171A36F6628EA /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D04F942837A16D37FA498832A73A80AA /* Alamofire-iOS10.0-umbrella.h in Headers */, + B5FCC9FFF6AB0081229AC56A56CBF68A /* LotameDMP-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - D4AAED16DFBB17224FA2F378791DC880 /* Headers */ = { + B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - AB6CC72B1FDEBAD923EBEE4AA08D4C38 /* LotameDMP-iOS9.0-umbrella.h in Headers */, + 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -700,154 +588,100 @@ ); name = OHHTTPStubs; productName = OHHTTPStubs; - productReference = BA15D4B76DDC32F659D7B89822179877 /* OHHTTPStubs.framework */; + productReference = FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */; productType = "com.apple.product-type.framework"; }; - 3F6EBEE64D06BFC30FB5DF93053F4F23 /* Alamofire-iOS10.0 */ = { + 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */ = { isa = PBXNativeTarget; - buildConfigurationList = AFB062D55893A76BC3C23E25E38D74FA /* Build configuration list for PBXNativeTarget "Alamofire-iOS10.0" */; + buildConfigurationList = 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */; buildPhases = ( - C58ACCBB5A800A5CEB4F6A0759BE7EC5 /* Sources */, - 5C1F68CFB4A5A07528F3BF6774BCEB9C /* Frameworks */, - C0D7E670964EE814EF1CB7C817552188 /* Headers */, + 32B9974868188C4803318E36329C87FE /* Sources */, + 99195E4207764744AEC07ECCBCD550EB /* Frameworks */, + B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */, ); buildRules = ( ); dependencies = ( ); - name = "Alamofire-iOS10.0"; - productName = "Alamofire-iOS10.0"; - productReference = 282D6F4E2A4BDA0D03D8CECC95C4D50F /* Alamofire.framework */; + name = Alamofire; + productName = Alamofire; + productReference = 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */; productType = "com.apple.product-type.framework"; }; - A7E6A570A5796A971F7741E4F1312193 /* LotameDMP-iOS9.0 */ = { + 98C70B29DA51105A7C00877F51F9AE6D /* LotameDMP */ = { isa = PBXNativeTarget; - buildConfigurationList = CA3186A44FDAD62329121CB5C8F398D2 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS9.0" */; + buildConfigurationList = 4902222E81604B7726093C6E5AC1238E /* Build configuration list for PBXNativeTarget "LotameDMP" */; buildPhases = ( - 3E50F6D522F06107A11B788ADD4A07F0 /* Sources */, - F770A6FBEF84130AED379158F301CF81 /* Frameworks */, - F57245B1E738C6449FEA652E1D7B6B71 /* Resources */, - D4AAED16DFBB17224FA2F378791DC880 /* Headers */, + 82E4B09765F10E921DDCFE1B0DDAC845 /* Sources */, + C4B99028893CFF8F18456DE4E5177B87 /* Frameworks */, + 24097C580875963EEAECBD4E6A6BF348 /* Resources */, + 89DD8331096690E5526171A36F6628EA /* Headers */, ); buildRules = ( ); dependencies = ( - CDF86760A689CFD262B3CCBAE5059B15 /* PBXTargetDependency */, - 71DF637169D6B19CB855D07894B1098A /* PBXTargetDependency */, + 1E65B8307A57E1F2183F4595F20E06FE /* PBXTargetDependency */, + DEF3AC23B619EEE8462F8F8AFC6CAD7D /* PBXTargetDependency */, ); - name = "LotameDMP-iOS9.0"; - productName = "LotameDMP-iOS9.0"; - productReference = 47D65711A6B65068A70A007D9ACE5114 /* LotameDMP.framework */; + name = LotameDMP; + productName = LotameDMP; + productReference = 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */; productType = "com.apple.product-type.framework"; }; - C4380F3332F12FC09D2A3954BD9C2DC4 /* LotameDMP-iOS10.0-LotameDMP */ = { - isa = PBXNativeTarget; - buildConfigurationList = B660ACC3989A816FB87BC7798AC3E6C9 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS10.0-LotameDMP" */; - buildPhases = ( - 3885D49F38C04615F69FE7AA90948514 /* Sources */, - E7388182A1F9F8C7EA73469D78B17CEF /* Frameworks */, - B71C7D25E3F42EB0EE9B65BBFA8858E8 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "LotameDMP-iOS10.0-LotameDMP"; - productName = "LotameDMP-iOS10.0-LotameDMP"; - productReference = D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */; - productType = "com.apple.product-type.bundle"; - }; - CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */ = { + C07F46A64285E7E28C43F7575A8B2B79 /* Pods-LotameDMP_Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = 630C046C7664034A59DDED174625D310 /* Build configuration list for PBXNativeTarget "Alamofire-iOS9.0" */; + buildConfigurationList = 94B7C65DF01CAEB40022F0E3212008AA /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */; buildPhases = ( - EB96B89F614F641B858799C29B358556 /* Sources */, - ED3AE368A95F7AF3938B11210E6569A3 /* Frameworks */, - 6454053E08848D474D1F7ADAB455F339 /* Headers */, + 5E371740F1086F8B0F7246353130FAFE /* Sources */, + 71AF22C6EED461E076C0DA0C929B9DFA /* Frameworks */, + 41B6BC360CF1B26A3EAD7C70AFA75371 /* Headers */, ); buildRules = ( ); dependencies = ( + 7E46DFD5A3FD8CA87741149A07B51885 /* PBXTargetDependency */, + CC4CA8B759AE40D8A50FC631C2EDB98E /* PBXTargetDependency */, + 82A31A190368A09F34BDAD3653184175 /* PBXTargetDependency */, ); - name = "Alamofire-iOS9.0"; - productName = "Alamofire-iOS9.0"; - productReference = 48A05BF1BB23DC831BCA06D26A10DDF8 /* Alamofire.framework */; + name = "Pods-LotameDMP_Tests"; + productName = "Pods-LotameDMP_Tests"; + productReference = 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */; productType = "com.apple.product-type.framework"; }; - D7973520D24620B7007E55AE03895B6A /* LotameDMP-iOS9.0-LotameDMP */ = { + D4CF7DA50152F9B5C82AB977424D6D31 /* LotameDMP-LotameDMP */ = { isa = PBXNativeTarget; - buildConfigurationList = 75C18CD04B5992923C0421206AED8261 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS9.0-LotameDMP" */; + buildConfigurationList = 1A08E46E46EE27B795256AB05113BFF6 /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */; buildPhases = ( - 0F228204DCC37A93A6A5A9028B7025A0 /* Sources */, - 0895E6CEC19DE79E537E3A1370C3F449 /* Frameworks */, - 4A95C0F1806FE8A10C860371DEBEAAF8 /* Resources */, + 804C01C308237B61E38903023D50A29A /* Sources */, + 05808F2ADD21C69527042AE6B05A3C5E /* Frameworks */, + F7AC29556EAF6DC86C2FADB5FEF9AB83 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = "LotameDMP-iOS9.0-LotameDMP"; - productName = "LotameDMP-iOS9.0-LotameDMP"; - productReference = D3BBDF9CE6DF54DCBA0441A9678367AE /* LotameDMP.bundle */; + name = "LotameDMP-LotameDMP"; + productName = "LotameDMP-LotameDMP"; + productReference = 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */; productType = "com.apple.product-type.bundle"; }; - D87A7631F55449935013E12A25C8B1E0 /* LotameDMP-iOS10.0 */ = { - isa = PBXNativeTarget; - buildConfigurationList = 61ADFCE24093B6D0CF34DB63DEF3548A /* Build configuration list for PBXNativeTarget "LotameDMP-iOS10.0" */; - buildPhases = ( - 8330E7C40E7BB56E442BAF41D7332AF2 /* Sources */, - F3D84B60362EFC339E3D759923AF0F88 /* Frameworks */, - E669D7822695ABFB73E2EED8DEAC1D1E /* Resources */, - 33EBEB68278F184CC1041610BC3DB47C /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - FB0289F6C9BA1BFFA6F9CFB7AB1ED87B /* PBXTargetDependency */, - 420190C360879BE555485BAB4BF0118C /* PBXTargetDependency */, - ); - name = "LotameDMP-iOS10.0"; - productName = "LotameDMP-iOS10.0"; - productReference = 8BCF80AA58C7D3B8224E63B6D74A92F1 /* LotameDMP.framework */; - productType = "com.apple.product-type.framework"; - }; - F00553D73BC81DA54F18432CCC911BB8 /* Pods-LotameDMP_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2036FF1B2D17E3E69FBFFE45FBC45061 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */; - buildPhases = ( - 9B16A7D8D6448EE90EF73DBBEA197AB9 /* Sources */, - 12B5B1F12EA4B1343A1D95E84A3175AD /* Frameworks */, - 18D470B3AAE11BA335FB9616C1FFA660 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - E3D7D93AD9FF75530F8126253F660600 /* PBXTargetDependency */, - 38D6A419F66606DF011D547CAA534941 /* PBXTargetDependency */, - FB91735D9C96B00F46D28302F46AB755 /* PBXTargetDependency */, - ); - name = "Pods-LotameDMP_Tests"; - productName = "Pods-LotameDMP_Tests"; - productReference = 262230FF6CF750AC96C152F6923C8175 /* Pods_LotameDMP_Tests.framework */; - productType = "com.apple.product-type.framework"; - }; - FC90604F1EB37D87AE39BDEBE1641143 /* Pods-LotameDMP_Example */ = { + E7C9A41DB65D0ED728B0C3846F3FFEAD /* Pods-LotameDMP_Example */ = { isa = PBXNativeTarget; - buildConfigurationList = 519B77330F8CB53BE9C6B67445E71AED /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */; + buildConfigurationList = 194D7AF2E1839332FA026816A45CDAE7 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */; buildPhases = ( - 780DD3E859B54AB9AE4836CAB0E3B174 /* Sources */, - 11D0C66E0F774792832EAFA21448F3D1 /* Frameworks */, - 008066EBD7F42E8D7B0B9FA0114585DC /* Headers */, + 3F80A5A88326AF83510F777D4A3F1B28 /* Sources */, + 4B8948DEA29B54758DEBDDEDAD7FA58C /* Frameworks */, + 2E7D86CD6DFE64982C948BC2B1C9581D /* Headers */, ); buildRules = ( ); dependencies = ( - A32D5152DAE460951F1B2B3181D4514D /* PBXTargetDependency */, - C6176DC52BE9DC4D87B348023224700D /* PBXTargetDependency */, + 15492364B0FE062F8205137A34EFB43F /* PBXTargetDependency */, + 3FC2977ED99BE4008D994EB8B8AABEC3 /* PBXTargetDependency */, ); name = "Pods-LotameDMP_Example"; productName = "Pods-LotameDMP_Example"; - productReference = 6914C8FC159AFDE5B159D8DBAAD40D20 /* Pods_LotameDMP_Example.framework */; + productReference = 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -856,7 +690,7 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0730; + LastSwiftUpdateCheck = 0830; LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; @@ -867,51 +701,33 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = B4F4DD2770344C25D626F71778FCDCB9 /* Products */; + productRefGroup = 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 3F6EBEE64D06BFC30FB5DF93053F4F23 /* Alamofire-iOS10.0 */, - CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */, - D87A7631F55449935013E12A25C8B1E0 /* LotameDMP-iOS10.0 */, - C4380F3332F12FC09D2A3954BD9C2DC4 /* LotameDMP-iOS10.0-LotameDMP */, - A7E6A570A5796A971F7741E4F1312193 /* LotameDMP-iOS9.0 */, - D7973520D24620B7007E55AE03895B6A /* LotameDMP-iOS9.0-LotameDMP */, + 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */, + 98C70B29DA51105A7C00877F51F9AE6D /* LotameDMP */, + D4CF7DA50152F9B5C82AB977424D6D31 /* LotameDMP-LotameDMP */, 06A23325201207EEE8C22E3551E28E4A /* OHHTTPStubs */, - FC90604F1EB37D87AE39BDEBE1641143 /* Pods-LotameDMP_Example */, - F00553D73BC81DA54F18432CCC911BB8 /* Pods-LotameDMP_Tests */, + E7C9A41DB65D0ED728B0C3846F3FFEAD /* Pods-LotameDMP_Example */, + C07F46A64285E7E28C43F7575A8B2B79 /* Pods-LotameDMP_Tests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 4A95C0F1806FE8A10C860371DEBEAAF8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B71C7D25E3F42EB0EE9B65BBFA8858E8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E669D7822695ABFB73E2EED8DEAC1D1E /* Resources */ = { + 24097C580875963EEAECBD4E6A6BF348 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - CC9121C6E4B0F6F19125B5941B4F419E /* LotameDMP.bundle in Resources */, + 36AF845C1FA25396EEC8B338B588C9D6 /* LotameDMP.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F57245B1E738C6449FEA652E1D7B6B71 /* Resources */ = { + F7AC29556EAF6DC86C2FADB5FEF9AB83 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5BAB1595D9AFEA8B21D1A9E8F59C38F4 /* LotameDMP.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -933,208 +749,120 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 0F228204DCC37A93A6A5A9028B7025A0 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3885D49F38C04615F69FE7AA90948514 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E50F6D522F06107A11B788ADD4A07F0 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 239CD78D8F37C3B373805277440C8831 /* DMP.swift in Sources */, - 2D0FF0DEDA036CC7F14FBE44C461DBDD /* LotameAudience.swift in Sources */, - 992ECC889873A67632A92D727A870E6E /* LotameDMP-iOS9.0-dummy.m in Sources */, - 5CCC6EEAE17971AEB330EADD42CE822F /* LotameError.swift in Sources */, - CE5D2F0C60D98575DBF92C59FB55F251 /* LotameProfile.swift in Sources */, - B12A2150AEA52FDEAF3B7C904F569327 /* SwiftyJSON.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 780DD3E859B54AB9AE4836CAB0E3B174 /* Sources */ = { + 32B9974868188C4803318E36329C87FE /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 037D757A3D7DD0547E5CC0065EE230AC /* Pods-LotameDMP_Example-dummy.m in Sources */, + 9ED2BB2981896E0A39EFA365503F58CE /* AFError.swift in Sources */, + A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */, + F8B3D3092ED0417E8CDF32033F6122F5 /* Alamofire.swift in Sources */, + 61200D01A1855D7920CEF835C8BE00B0 /* DispatchQueue+Alamofire.swift in Sources */, + B65FCF589DA398C3EFE0128064E510EC /* MultipartFormData.swift in Sources */, + A2A6F71B727312BD45CC7A4AAD7B0AB7 /* NetworkReachabilityManager.swift in Sources */, + EFD264FC408EBF3BA2528E70B08DDD94 /* Notifications.swift in Sources */, + BE5C67A07E289FE1F9BE27335B159997 /* ParameterEncoding.swift in Sources */, + 5387216E723A3C68E851CA15573CDD71 /* Request.swift in Sources */, + CB6D60925223897FFA2662667DF83E8A /* Response.swift in Sources */, + F6BECD98B97CBFEBE2C96F0E9E72A6C0 /* ResponseSerialization.swift in Sources */, + 7D8CC01E8C9EFFF9F4D65406CDE0AB66 /* Result.swift in Sources */, + 62F65AD8DC4F0F9610F4B8B4738EC094 /* ServerTrustPolicy.swift in Sources */, + 7B5FE28C7EA4122B0598738E54DBEBD8 /* SessionDelegate.swift in Sources */, + AE1EF48399533730D0066E04B22CA2D6 /* SessionManager.swift in Sources */, + 3626B94094672CB1C9DEA32B9F9502E1 /* TaskDelegate.swift in Sources */, + 10EB23E9ECC4B33E16933BB1EA560B6A /* Timeline.swift in Sources */, + BBEFE2F9CEB73DC7BD97FFA66A0D9D4F /* Validation.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 8330E7C40E7BB56E442BAF41D7332AF2 /* Sources */ = { + 3F80A5A88326AF83510F777D4A3F1B28 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - BBB74AB011C88149BC65C2C10B6E6A19 /* DMP.swift in Sources */, - 1BBE09565B92139CF73200DB2A4B4743 /* LotameAudience.swift in Sources */, - 6505FA6B758D3CD261E5464F70DC0C69 /* LotameDMP-iOS10.0-dummy.m in Sources */, - 5E6C1A6961FB342C12B84B0A0DFC8DDB /* LotameError.swift in Sources */, - 729532F2F92C16C4142CE64B79D6478B /* LotameProfile.swift in Sources */, - E7B6985839F2AB81EC6355558E67E850 /* SwiftyJSON.swift in Sources */, + 9E3EA11F3FB3812F8E4D6F08F0717606 /* Pods-LotameDMP_Example-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9B16A7D8D6448EE90EF73DBBEA197AB9 /* Sources */ = { + 5E371740F1086F8B0F7246353130FAFE /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9937070ABBA54FBBA7BA0F3D3D2D3331 /* Pods-LotameDMP_Tests-dummy.m in Sources */, + D211627240F56AC9E9A1E4F4E27C58A6 /* Pods-LotameDMP_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - C58ACCBB5A800A5CEB4F6A0759BE7EC5 /* Sources */ = { + 804C01C308237B61E38903023D50A29A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6C847EBBA88F56CD9B9660C1E03D2E21 /* AFError.swift in Sources */, - A05A788C2F8B159207F5144ECA1A5848 /* Alamofire-iOS10.0-dummy.m in Sources */, - CA583D09B1ABAB5C4063B0E2C16ADD5F /* Alamofire.swift in Sources */, - 9A7BCF8905D2D62265995BD9DF67409C /* DispatchQueue+Alamofire.swift in Sources */, - 01CC1AFE147B3B5F2C179D0C1B91E40F /* MultipartFormData.swift in Sources */, - CC5DAF1BC6465892B620F2B63ADAF625 /* NetworkReachabilityManager.swift in Sources */, - 091ADA0AB1CFE0835F0E066C7C062807 /* Notifications.swift in Sources */, - 4BE9929A79FC78F53F1635FD61281888 /* ParameterEncoding.swift in Sources */, - 76C8C34D494F9C6C6DCFD2FA7513B448 /* Request.swift in Sources */, - 12478EC74416B56096699C3A4492B9E0 /* Response.swift in Sources */, - 5C6BF9C2AB15CF5AA6D9EBFADE879BAC /* ResponseSerialization.swift in Sources */, - CD0C9C1AF391650853077B2C5E9B62E0 /* Result.swift in Sources */, - 6E699DCCB9065C22C8825AF81BEE2216 /* ServerTrustPolicy.swift in Sources */, - 3416A8609A0CFEAA9EAF6027E7FE0B4B /* SessionDelegate.swift in Sources */, - D270D1BB315595AA39B9E6494A62E3FD /* SessionManager.swift in Sources */, - 3A452200BC2390097F26B5459FF7A48C /* TaskDelegate.swift in Sources */, - 3DE5565BAE66ED6E4AD42EF99938AC45 /* Timeline.swift in Sources */, - 55AD0FF7EF0CADA0311932BA55754EEC /* Validation.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - EB96B89F614F641B858799C29B358556 /* Sources */ = { + 82E4B09765F10E921DDCFE1B0DDAC845 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 7761B68FA15475DE26FF2EBF75B936B1 /* AFError.swift in Sources */, - BBD53CB8D94BD8B0CF6D449A29E50EA2 /* Alamofire-iOS9.0-dummy.m in Sources */, - 7A2F295B5717E1435290012F20C4D834 /* Alamofire.swift in Sources */, - DF3AE4A4097670F36803AEE59537E02C /* DispatchQueue+Alamofire.swift in Sources */, - 789F26DE511CFB4EA5E1A22D964A8D84 /* MultipartFormData.swift in Sources */, - B7D36D88DB776AA1DEA9FF8D6698EE93 /* NetworkReachabilityManager.swift in Sources */, - 680E6F8B04824ED80E7C674367B1A3C5 /* Notifications.swift in Sources */, - 2DBE8ACDEF1BA8DE4BC5118F1FA9BEC8 /* ParameterEncoding.swift in Sources */, - 0FE9A366EC1A26CCEE87264CFBA0B8A8 /* Request.swift in Sources */, - 0CAFEBB06A47D4726995530487166FB1 /* Response.swift in Sources */, - C08DA65FCB929D311DA968E3FA0E682E /* ResponseSerialization.swift in Sources */, - FCD41DBC7B4375ACEEFA1BA388F074C8 /* Result.swift in Sources */, - 8E97FFAD8F1B579C37EE073BC702858E /* ServerTrustPolicy.swift in Sources */, - 3D4FD21A17BD898421D9A30A3534204D /* SessionDelegate.swift in Sources */, - 93B19A9281A886F680D22A5437D6B5CA /* SessionManager.swift in Sources */, - 774BF01C970236E42A554FDE8061881E /* TaskDelegate.swift in Sources */, - 531BD362CD7BE467B3C15DEF961C6732 /* Timeline.swift in Sources */, - DC2318049E9595208DE21CA6E2CAA8A9 /* Validation.swift in Sources */, + 11B0BFCD9DA9AD621A25AF3429C53BF5 /* DMP.swift in Sources */, + 691F4BEE463CA14CCC676A7BF64289A6 /* LotameAudience.swift in Sources */, + 382A35323429A462ECB1E9E59157649C /* LotameDMP-dummy.m in Sources */, + A35ECCA29E8F45D0B8D78B8075C296BD /* LotameError.swift in Sources */, + 7F3AA1BA918C977BA88ECAD3BEBE2D1B /* LotameProfile.swift in Sources */, + B6D55D6720994609A098DB75BA739719 /* SwiftyJSON.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 38D6A419F66606DF011D547CAA534941 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "LotameDMP-iOS10.0"; - target = D87A7631F55449935013E12A25C8B1E0 /* LotameDMP-iOS10.0 */; - targetProxy = 19AD2CDB1DA843B9FB7BF815AFAC68AA /* PBXContainerItemProxy */; - }; - 420190C360879BE555485BAB4BF0118C /* PBXTargetDependency */ = { + 15492364B0FE062F8205137A34EFB43F /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "LotameDMP-iOS10.0-LotameDMP"; - target = C4380F3332F12FC09D2A3954BD9C2DC4 /* LotameDMP-iOS10.0-LotameDMP */; - targetProxy = 282AFDD21B3E818E75B351C280A7EB8B /* PBXContainerItemProxy */; + name = Alamofire; + target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; + targetProxy = F84A6EADC2F1D5C788EC9FD8CCBF9819 /* PBXContainerItemProxy */; }; - 71DF637169D6B19CB855D07894B1098A /* PBXTargetDependency */ = { + 1E65B8307A57E1F2183F4595F20E06FE /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "LotameDMP-iOS9.0-LotameDMP"; - target = D7973520D24620B7007E55AE03895B6A /* LotameDMP-iOS9.0-LotameDMP */; - targetProxy = E318233F5CFC5CA675BED8653F5CFE14 /* PBXContainerItemProxy */; + name = Alamofire; + target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; + targetProxy = 008FA4FEF6392616FE22BC33F99FDF87 /* PBXContainerItemProxy */; }; - A32D5152DAE460951F1B2B3181D4514D /* PBXTargetDependency */ = { + 3FC2977ED99BE4008D994EB8B8AABEC3 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Alamofire-iOS9.0"; - target = CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */; - targetProxy = 95B819C76090FD612A20FD21463A199C /* PBXContainerItemProxy */; - }; - C6176DC52BE9DC4D87B348023224700D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "LotameDMP-iOS9.0"; - target = A7E6A570A5796A971F7741E4F1312193 /* LotameDMP-iOS9.0 */; - targetProxy = BD90D9E1A31EC2E04C74BC273819A83C /* PBXContainerItemProxy */; + name = LotameDMP; + target = 98C70B29DA51105A7C00877F51F9AE6D /* LotameDMP */; + targetProxy = 14F34FADE20A0DB7EE21878F12452E6F /* PBXContainerItemProxy */; }; - CDF86760A689CFD262B3CCBAE5059B15 /* PBXTargetDependency */ = { + 7E46DFD5A3FD8CA87741149A07B51885 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Alamofire-iOS9.0"; - target = CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */; - targetProxy = 2C1F0FA0F597C7F66EADFC3BD1DB89A9 /* PBXContainerItemProxy */; + name = Alamofire; + target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; + targetProxy = 5B6EBA2C287BD5CA395C916566B63E27 /* PBXContainerItemProxy */; }; - E3D7D93AD9FF75530F8126253F660600 /* PBXTargetDependency */ = { + 82A31A190368A09F34BDAD3653184175 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Alamofire-iOS10.0"; - target = 3F6EBEE64D06BFC30FB5DF93053F4F23 /* Alamofire-iOS10.0 */; - targetProxy = 56CB0FE53721D73002608E530B3C49CA /* PBXContainerItemProxy */; + name = OHHTTPStubs; + target = 06A23325201207EEE8C22E3551E28E4A /* OHHTTPStubs */; + targetProxy = FD0E88080FAC4AB286C2D131AF84899B /* PBXContainerItemProxy */; }; - FB0289F6C9BA1BFFA6F9CFB7AB1ED87B /* PBXTargetDependency */ = { + CC4CA8B759AE40D8A50FC631C2EDB98E /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Alamofire-iOS9.0"; - target = CF0578DE89449D99766E5B48E4303D42 /* Alamofire-iOS9.0 */; - targetProxy = 6F137E5C76DA95AC8D8DD0DC7C868FCA /* PBXContainerItemProxy */; + name = LotameDMP; + target = 98C70B29DA51105A7C00877F51F9AE6D /* LotameDMP */; + targetProxy = 622296FFDBFB019096028D0E09123D1C /* PBXContainerItemProxy */; }; - FB91735D9C96B00F46D28302F46AB755 /* PBXTargetDependency */ = { + DEF3AC23B619EEE8462F8F8AFC6CAD7D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = OHHTTPStubs; - target = 06A23325201207EEE8C22E3551E28E4A /* OHHTTPStubs */; - targetProxy = B93FAEEBDA1334DB34EE2163155DC00C /* PBXContainerItemProxy */; + name = "LotameDMP-LotameDMP"; + target = D4CF7DA50152F9B5C82AB977424D6D31 /* LotameDMP-LotameDMP */; + targetProxy = D0D22DBFC62D517B155C8BDD7A345CA6 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0A6B3CB2243BCE23C6663A05A4B3BECA /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D295FCF2431669A9064242122F027826 /* Alamofire-iOS10.0.xcconfig */; - buildSettings = { - "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-iOS10.0/Alamofire-iOS10.0-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire-iOS10.0/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-iOS10.0/Alamofire-iOS10.0.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 150694B5C0B278E7B2F427B6F3A5B6A4 /* Release */ = { + 09B0B1B255A05C64030F74F0AF810E2F /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1160,37 +888,7 @@ PRODUCT_NAME = Pods_LotameDMP_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 2BE5E1592123F76A43F8F50914822BD6 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7F1013EC32FE788FB4160A402115608A /* Alamofire-iOS9.0.xcconfig */; - buildSettings = { - "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-iOS9.0/Alamofire-iOS9.0-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire-iOS9.0/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-iOS9.0/Alamofire-iOS9.0.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -1198,14 +896,14 @@ }; name = Release; }; - 366170259D8E1545232C63556C490C5D /* Release */ = { + 2DFE8ACBF08912C998A5901601BD7ECA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */; + baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP-iOS10.0"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist"; + INFOPLIST_FILE = "Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; @@ -1213,79 +911,74 @@ TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = bundle; }; - name = Release; + name = Debug; }; - 3789046931C17038EA5C3296549C14EB /* Debug */ = { + 34FE9531DA9AF2820790339988D5FF41 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.xcconfig */; buildSettings = { - "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/OHHTTPStubs/OHHTTPStubs-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/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/OHHTTPStubs/OHHTTPStubs.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = OHHTTPStubs; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; }; - name = Debug; + name = Release; }; - 4455A55EB41695D4BE11268E6B68AD28 /* Release */ = { + 50C79C8B8A6C637EB3434A86F07BBBEA /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */; + baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; buildSettings = { - "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"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + INFOPLIST_FILE = "Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist"; 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-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_LotameDMP_Example; + PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + WRAPPER_EXTENSION = bundle; }; name = Release; }; - 55467477BC1431CEDDCC28DF78530464 /* Debug */ = { + 579D3D356793AF099DB9822AEBB4A837 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1311,145 +1004,112 @@ PRODUCT_NAME = Pods_LotameDMP_Tests; 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 = ""; }; name = Debug; }; - 56444B4723B1B044EE84518F3E32ED7D /* Debug */ = { + 7D072D0D174F12EAACC1862DA756E67A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D295FCF2431669A9064242122F027826 /* Alamofire-iOS10.0.xcconfig */; + baseConfigurationReference = B647466486EFB804B68D5FC8AE8B744B /* 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; + 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-iOS10.0/Alamofire-iOS10.0-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire-iOS10.0/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"; - MODULEMAP_FILE = "Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; - }; - 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = 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_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - 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_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; + name = Release; }; - 5F24469E2D2D5F425B4B40A4AFF83537 /* Release */ = { + 8BF8065E5702BC773AF9564EBF547AA8 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */; + baseConfigurationReference = 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.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-with-dsym"; + 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/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/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/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = LotameDMP; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_LotameDMP_Example; 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 = ""; }; - name = Release; + name = Debug; }; - 6CE64221BA54D24047CE0A7390B7FA09 /* Release */ = { + 97B6C622B27157AB502BF159FDE1EE8B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */; + baseConfigurationReference = 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.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"; + 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/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/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/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = LotameDMP; + MODULEMAP_FILE = "Target Support Files/OHHTTPStubs/OHHTTPStubs.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = OHHTTPStubs; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_VERSION = 3.0; @@ -1457,12 +1117,13 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 74ABF53C648AD68E13BD73B022E8E10B /* Debug */ = { + A463BAD4087BEB5BABEB845F25F4362B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7F1013EC32FE788FB4160A402115608A /* Alamofire-iOS9.0.xcconfig */; + baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1474,16 +1135,17 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire-iOS9.0/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/LotameDMP/LotameDMP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP/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-iOS9.0/Alamofire-iOS9.0.modulemap"; + MODULEMAP_FILE = "Target Support Files/LotameDMP/LotameDMP.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Alamofire; + PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1492,28 +1154,12 @@ }; name = Debug; }; - AE98989806126F89272BC4C1FFE8E627 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP-iOS9.0"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PRODUCT_NAME = LotameDMP; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Release; - }; - B7324857C38B065FEB1EEE3105C2367A /* Release */ = { + C104F7F091290C3D1E248192F07FE689 /* 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_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -1521,20 +1167,27 @@ 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; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", + "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_UNDECLARED_SELECTOR = YES; @@ -1542,17 +1195,18 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; + ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - B7B7F2E818B6B71D69D1F649E468ADF4 /* Debug */ = { + C9660A42FEDD040185578ADA021EC8E0 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */; + baseConfigurationReference = B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1564,16 +1218,17 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/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"; - MODULEMAP_FILE = "Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap"; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = LotameDMP; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1582,63 +1237,44 @@ }; name = Debug; }; - C9D8D17373B79D5CB31A1D7D2632BF24 /* Debug */ = { + D67D5BE35DAB347167D4F7FB2C780866 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP-iOS9.0"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PRODUCT_NAME = LotameDMP; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Debug; - }; - DC8D46F9ED8B975E2050F2E30999605C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */; + baseConfigurationReference = 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.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; + 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-LotameDMP_Example/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/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-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_LotameDMP_Example; + MODULEMAP_FILE = "Target Support Files/OHHTTPStubs/OHHTTPStubs.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = OHHTTPStubs; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - EEAC1ACB19E2F88550CC1FB30C6A5FD8 /* Release */ = { + DED6DCE0CE5670505ED24DE82CFAFCD7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.xcconfig */; + baseConfigurationReference = 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1650,16 +1286,21 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/OHHTTPStubs/OHHTTPStubs-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/OHHTTPStubs/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-LotameDMP_Example/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/OHHTTPStubs/OHHTTPStubs.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = OHHTTPStubs; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_LotameDMP_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -1667,55 +1308,39 @@ }; name = Release; }; - EF97065EF6924C21B492C97118A8202D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9A9B7CA8CB343112E0E502625F7B616E /* LotameDMP-iOS10.0.xcconfig */; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP-iOS10.0"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PRODUCT_NAME = LotameDMP; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Debug; - }; - F9ECA4F27CF8785597370A7CD5226C66 /* Debug */ = { + F0D97ABD42011119B48E97752D1E1F02 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C7A1044EDE31B1056FF1402635AE4735 /* LotameDMP-iOS9.0.xcconfig */; + baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.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; + 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/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP-iOS9.0/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/LotameDMP/LotameDMP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP/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/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MODULEMAP_FILE = "Target Support Files/LotameDMP/LotameDMP.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; /* End XCBuildConfiguration section */ @@ -1723,89 +1348,62 @@ 19142A73CC341F046FCCB0FA32840347 /* Build configuration list for PBXNativeTarget "OHHTTPStubs" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3789046931C17038EA5C3296549C14EB /* Debug */, - EEAC1ACB19E2F88550CC1FB30C6A5FD8 /* Release */, + 97B6C622B27157AB502BF159FDE1EE8B /* Debug */, + D67D5BE35DAB347167D4F7FB2C780866 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2036FF1B2D17E3E69FBFFE45FBC45061 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */ = { + 194D7AF2E1839332FA026816A45CDAE7 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 55467477BC1431CEDDCC28DF78530464 /* Debug */, - 150694B5C0B278E7B2F427B6F3A5B6A4 /* Release */, + 8BF8065E5702BC773AF9564EBF547AA8 /* Debug */, + DED6DCE0CE5670505ED24DE82CFAFCD7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 1A08E46E46EE27B795256AB05113BFF6 /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */ = { isa = XCConfigurationList; buildConfigurations = ( - 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */, - B7324857C38B065FEB1EEE3105C2367A /* Release */, + 2DFE8ACBF08912C998A5901601BD7ECA /* Debug */, + 50C79C8B8A6C637EB3434A86F07BBBEA /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 519B77330F8CB53BE9C6B67445E71AED /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DC8D46F9ED8B975E2050F2E30999605C /* Debug */, - 4455A55EB41695D4BE11268E6B68AD28 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 61ADFCE24093B6D0CF34DB63DEF3548A /* Build configuration list for PBXNativeTarget "LotameDMP-iOS10.0" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B7B7F2E818B6B71D69D1F649E468ADF4 /* Debug */, - 5F24469E2D2D5F425B4B40A4AFF83537 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 630C046C7664034A59DDED174625D310 /* Build configuration list for PBXNativeTarget "Alamofire-iOS9.0" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 74ABF53C648AD68E13BD73B022E8E10B /* Debug */, - 2BE5E1592123F76A43F8F50914822BD6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 75C18CD04B5992923C0421206AED8261 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS9.0-LotameDMP" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - C9D8D17373B79D5CB31A1D7D2632BF24 /* Debug */, - AE98989806126F89272BC4C1FFE8E627 /* Release */, + C104F7F091290C3D1E248192F07FE689 /* Debug */, + 34FE9531DA9AF2820790339988D5FF41 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - AFB062D55893A76BC3C23E25E38D74FA /* Build configuration list for PBXNativeTarget "Alamofire-iOS10.0" */ = { + 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( - 56444B4723B1B044EE84518F3E32ED7D /* Debug */, - 0A6B3CB2243BCE23C6663A05A4B3BECA /* Release */, + C9660A42FEDD040185578ADA021EC8E0 /* Debug */, + 7D072D0D174F12EAACC1862DA756E67A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B660ACC3989A816FB87BC7798AC3E6C9 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS10.0-LotameDMP" */ = { + 4902222E81604B7726093C6E5AC1238E /* Build configuration list for PBXNativeTarget "LotameDMP" */ = { isa = XCConfigurationList; buildConfigurations = ( - EF97065EF6924C21B492C97118A8202D /* Debug */, - 366170259D8E1545232C63556C490C5D /* Release */, + A463BAD4087BEB5BABEB845F25F4362B /* Debug */, + F0D97ABD42011119B48E97752D1E1F02 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - CA3186A44FDAD62329121CB5C8F398D2 /* Build configuration list for PBXNativeTarget "LotameDMP-iOS9.0" */ = { + 94B7C65DF01CAEB40022F0E3212008AA /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - F9ECA4F27CF8785597370A7CD5226C66 /* Debug */, - 6CE64221BA54D24047CE0A7390B7FA09 /* Release */, + 579D3D356793AF099DB9822AEBB4A837 /* Debug */, + 09B0B1B255A05C64030F74F0AF810E2F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-dummy.m b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-dummy.m deleted file mode 100644 index 5601ad6..0000000 --- a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire_iOS10_0 : NSObject -@end -@implementation PodsDummy_Alamofire_iOS10_0 -@end diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap deleted file mode 100644 index 95fdda1..0000000 --- a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Alamofire { - umbrella header "Alamofire-iOS10.0-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.xcconfig b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.xcconfig deleted file mode 100644 index 6a44b01..0000000 --- a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS10.0 -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_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Info.plist b/Example/Pods/Target Support Files/Alamofire-iOS10.0/Info.plist deleted file mode 100644 index b672cd7..0000000 --- a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.0.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m deleted file mode 100644 index be811bb..0000000 --- a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire_iOS9_0 : NSObject -@end -@implementation PodsDummy_Alamofire_iOS9_0 -@end diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h b/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h deleted file mode 100644 index 00014e3..0000000 --- a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m new file mode 100644 index 0000000..a6c4594 --- /dev/null +++ b/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Alamofire : NSObject +@end +@implementation PodsDummy_Alamofire +@end diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch b/Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch similarity index 100% rename from Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-prefix.pch rename to Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch diff --git a/Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-umbrella.h b/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h similarity index 100% rename from Example/Pods/Target Support Files/Alamofire-iOS10.0/Alamofire-iOS10.0-umbrella.h rename to Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap b/Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap similarity index 58% rename from Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap rename to Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap index 6fc1cab..d1f125f 100644 --- a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.modulemap +++ b/Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap @@ -1,5 +1,5 @@ framework module Alamofire { - umbrella header "Alamofire-iOS9.0-umbrella.h" + umbrella header "Alamofire-umbrella.h" export * module * { export * } diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig b/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig similarity index 98% rename from Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig rename to Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig index 581f53e..619e5f4 100644 --- a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0.xcconfig +++ b/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig @@ -1,4 +1,4 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0 +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" diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Info.plist b/Example/Pods/Target Support Files/Alamofire/Info.plist similarity index 96% rename from Example/Pods/Target Support Files/Alamofire-iOS9.0/Info.plist rename to Example/Pods/Target Support Files/Alamofire/Info.plist index b672cd7..df27649 100644 --- a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Info.plist +++ b/Example/Pods/Target Support Files/Alamofire/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.0.1 + 4.4.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-dummy.m b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-dummy.m deleted file mode 100644 index 9194ab4..0000000 --- a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_LotameDMP_iOS10_0 : NSObject -@end -@implementation PodsDummy_LotameDMP_iOS10_0 -@end diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch deleted file mode 100644 index beb2a24..0000000 --- a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap deleted file mode 100644 index 187886d..0000000 --- a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module LotameDMP { - umbrella header "LotameDMP-iOS10.0-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.xcconfig b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.xcconfig deleted file mode 100644 index 638878e..0000000 --- a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0 -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_LDFLAGS = -framework "AdSupport" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist b/Example/Pods/Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist deleted file mode 100644 index 8b70130..0000000 --- a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/ResourceBundle-LotameDMP-Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - BNDL - CFBundleShortVersionString - 3.1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/Info.plist b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/Info.plist deleted file mode 100644 index 90db36a..0000000 --- a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 3.1.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m deleted file mode 100644 index 22b97ec..0000000 --- a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_LotameDMP_iOS9_0 : NSObject -@end -@implementation PodsDummy_LotameDMP_iOS9_0 -@end diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch deleted file mode 100644 index beb2a24..0000000 --- a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h b/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h deleted file mode 100644 index fd3706b..0000000 --- a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double LotameDMPVersionNumber; -FOUNDATION_EXPORT const unsigned char LotameDMPVersionString[]; - diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/Info.plist b/Example/Pods/Target Support Files/LotameDMP/Info.plist similarity index 96% rename from Example/Pods/Target Support Files/LotameDMP-iOS10.0/Info.plist rename to Example/Pods/Target Support Files/LotameDMP/Info.plist index 90db36a..3424ca6 100644 --- a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/Info.plist +++ b/Example/Pods/Target Support Files/LotameDMP/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.1.0 + 4.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/LotameDMP/LotameDMP-dummy.m b/Example/Pods/Target Support Files/LotameDMP/LotameDMP-dummy.m new file mode 100644 index 0000000..ebfc914 --- /dev/null +++ b/Example/Pods/Target Support Files/LotameDMP/LotameDMP-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_LotameDMP : NSObject +@end +@implementation PodsDummy_LotameDMP +@end diff --git a/Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch b/Example/Pods/Target Support Files/LotameDMP/LotameDMP-prefix.pch similarity index 100% rename from Example/Pods/Target Support Files/Alamofire-iOS9.0/Alamofire-iOS9.0-prefix.pch rename to Example/Pods/Target Support Files/LotameDMP/LotameDMP-prefix.pch diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-umbrella.h b/Example/Pods/Target Support Files/LotameDMP/LotameDMP-umbrella.h similarity index 100% rename from Example/Pods/Target Support Files/LotameDMP-iOS10.0/LotameDMP-iOS10.0-umbrella.h rename to Example/Pods/Target Support Files/LotameDMP/LotameDMP-umbrella.h diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap b/Example/Pods/Target Support Files/LotameDMP/LotameDMP.modulemap similarity index 58% rename from Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap rename to Example/Pods/Target Support Files/LotameDMP/LotameDMP.modulemap index 47e3a1b..28051db 100644 --- a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.modulemap +++ b/Example/Pods/Target Support Files/LotameDMP/LotameDMP.modulemap @@ -1,5 +1,5 @@ framework module LotameDMP { - umbrella header "LotameDMP-iOS9.0-umbrella.h" + umbrella header "LotameDMP-umbrella.h" export * module * { export * } diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig b/Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig similarity index 95% rename from Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig rename to Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig index 07aceef..1cfb715 100644 --- a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/LotameDMP-iOS9.0.xcconfig +++ b/Example/Pods/Target Support Files/LotameDMP/LotameDMP.xcconfig @@ -1,5 +1,5 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0 -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0" +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/LotameDMP +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" OTHER_LDFLAGS = -framework "AdSupport" diff --git a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist b/Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist similarity index 96% rename from Example/Pods/Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist rename to Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist index 8b70130..a9b6888 100644 --- a/Example/Pods/Target Support Files/LotameDMP-iOS9.0/ResourceBundle-LotameDMP-Info.plist +++ b/Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 3.1.0 + 4.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/OHHTTPStubs/Info.plist b/Example/Pods/Target Support Files/OHHTTPStubs/Info.plist index a83149a..e92eb78 100644 --- a/Example/Pods/Target Support Files/OHHTTPStubs/Info.plist +++ b/Example/Pods/Target Support Files/OHHTTPStubs/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.3.0 + 6.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h index bd8e923..48c9d15 100644 --- a/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h +++ b/Example/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h @@ -15,7 +15,6 @@ #import "OHHTTPStubsResponse.h" #import "OHHTTPStubsResponse+JSON.h" #import "NSURLRequest+HTTPBodyTesting.h" -#import "OHHTTPStubsMethodSwizzling.h" #import "OHPathHelpers.h" #import "Compatibility.h" diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh index 55eee17..116caac 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-frameworks.sh @@ -89,12 +89,12 @@ strip_invalid_archs() { if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire-iOS9.0/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/LotameDMP-iOS9.0/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire-iOS9.0/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/LotameDMP-iOS9.0/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh index 4602c68..aed060f 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example-resources.sh @@ -21,6 +21,9 @@ case "${TARGETED_DEVICE_FAMILY}" in 3) TARGET_DEVICE_ARGS="--target-device tv" ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig index 5670225..cc64a5b 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.debug.xcconfig @@ -1,10 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" 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-iOS9.0/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0/LotameDMP.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 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/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig index 5670225..cc64a5b 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Example/Pods-LotameDMP_Example.release.xcconfig @@ -1,10 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS9.0" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" 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-iOS9.0/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS9.0/LotameDMP.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 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/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh index aeb2fdd..6850b18 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-frameworks.sh @@ -89,13 +89,13 @@ strip_invalid_archs() { if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire-iOS10.0/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/LotameDMP-iOS10.0/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" install_framework "$BUILT_PRODUCTS_DIR/OHHTTPStubs/OHHTTPStubs.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Alamofire-iOS10.0/Alamofire.framework" - install_framework "$BUILT_PRODUCTS_DIR/LotameDMP-iOS10.0/LotameDMP.framework" + install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" + install_framework "$BUILT_PRODUCTS_DIR/LotameDMP/LotameDMP.framework" install_framework "$BUILT_PRODUCTS_DIR/OHHTTPStubs/OHHTTPStubs.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh index 4602c68..aed060f 100755 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests-resources.sh @@ -21,6 +21,9 @@ case "${TARGETED_DEVICE_FAMILY}" in 3) TARGET_DEVICE_ARGS="--target-device tv" ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; diff --git a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig index 0e75c37..54cc774 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.debug.xcconfig @@ -1,10 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS10.0" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" 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-iOS10.0/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" -framework "OHHTTPStubs" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 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/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig index 0e75c37..54cc774 100644 --- a/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-LotameDMP_Tests/Pods-LotameDMP_Tests.release.xcconfig @@ -1,10 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire-iOS10.0" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP" "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs" 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-iOS10.0/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP-iOS10.0/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/LotameDMP/LotameDMP.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OHHTTPStubs/OHHTTPStubs.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "LotameDMP" -framework "OHHTTPStubs" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 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/LotameDMP.podspec b/LotameDMP.podspec index b341061..d53fe04 100644 --- a/LotameDMP.podspec +++ b/LotameDMP.podspec @@ -1,31 +1,16 @@ -# -# Be sure to run `pod lib lint LotameDMP.podspec' to ensure this is a -# valid spec before submitting. -# -# Any lines starting with a # are optional, but their use is encouraged -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html -# - Pod::Spec.new do |s| s.name = "LotameDMP" s.version = "4.0.0" s.summary = "This open source library can be leveraged by Lotame clients to collect data from within their iOS applications." -# This description is used to generate tags and improve search results. -# * Think: What does it do? Why did you write it? What is the focus? -# * Try to keep it short, snappy and to the point. -# * Write the description between the DESC delimiters below. -# * Finally, don't worry about the indent, CocoaPods strips it! s.description = <<-DESC Data should influence everything you do – from the products and content you create, to the way you shape and execute your go-to-market strategy. Lotame’s data management platform makes this vision a reality. Our SaaS platform is used by marketers, agencies and publishers around the world to make audience data meaningful and actionable. This framework makes it easy to plug your iOS app into the data management platform. DESC s.homepage = "https://github.com/Lotame/LotameDMP-IOS" - # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2" s.license = 'MIT' s.author = { "Dan Rusk" => "djrusk@gmail.com" } s.source = { :git => "https://github.com/Lotame/LotameDMP-IOS.git", :tag => s.version.to_s } - # s.social_media_url = 'https://twitter.com/' s.platform = :ios, '8.0' s.requires_arc = true @@ -35,7 +20,6 @@ Pod::Spec.new do |s| 'LotameDMP' => ['Pod/Assets/*.png'] } - # s.public_header_files = 'Pod/Classes/**/*.h' s.frameworks = 'AdSupport' s.dependency 'Alamofire', '~> 4.0' end diff --git a/Pod/Classes/DMP.swift b/Pod/Classes/DMP.swift index e473dd8..3e71737 100644 --- a/Pod/Classes/DMP.swift +++ b/Pod/Classes/DMP.swift @@ -333,7 +333,6 @@ open class DMP:NSObject{ } } } - print("URL:: \(URL)") let urlRequest = URLRequest(url: URL!, cachePolicy: URLRequest.CachePolicy.reloadIgnoringCacheData, timeoutInterval: 60) return try Alamofire.URLEncoding.default.encode(urlRequest, with: params); } From d4f9bdb93297a0629e3bfb4253b96f711007117a Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Tue, 25 Apr 2017 16:49:29 -0400 Subject: [PATCH 13/20] Testing. --- LotameDMP.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LotameDMP.podspec b/LotameDMP.podspec index d53fe04..d305c5a 100644 --- a/LotameDMP.podspec +++ b/LotameDMP.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| Data should influence everything you do – from the products and content you create, to the way you shape and execute your go-to-market strategy. Lotame’s data management platform makes this vision a reality. Our SaaS platform is used by marketers, agencies and publishers around the world to make audience data meaningful and actionable. This framework makes it easy to plug your iOS app into the data management platform. DESC - s.homepage = "https://github.com/Lotame/LotameDMP-IOS" + s.homepage = "https://github.com/chenr2/LotameDMP-IOS" s.license = 'MIT' s.author = { "Dan Rusk" => "djrusk@gmail.com" } - s.source = { :git => "https://github.com/Lotame/LotameDMP-IOS.git", :tag => s.version.to_s } + s.source = { :git => "https://github.com/chenr2/LotameDMP-IOS.git", :tag => s.version.to_s } s.platform = :ios, '8.0' s.requires_arc = true From a272eb2e80bf0069d5338f5a11004c4e480fd794 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Wed, 26 Apr 2017 10:52:13 -0400 Subject: [PATCH 14/20] Removes resource_bundles from the podspec, which is giving warnings on pod lint. --- Example/Podfile.lock | 2 +- .../Local Podspecs/LotameDMP.podspec.json | 9 +- Example/Pods/Manifest.lock | 2 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 477 +++++++----------- .../ResourceBundle-LotameDMP-Info.plist | 24 - LotameDMP.podspec | 3 - 6 files changed, 186 insertions(+), 331 deletions(-) delete mode 100644 Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist diff --git a/Example/Podfile.lock b/Example/Podfile.lock index d804153..87607df 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -26,7 +26,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d - LotameDMP: 100c1addabbb1b5eb0302faddf0f852c388494b6 + LotameDMP: 9a7a0977cdc83fe72ce1ea72533ba2d3694feaa6 OHHTTPStubs: 752f9b11fd810a15162d50f11c06ff94f8e012eb PODFILE CHECKSUM: 50039ae88500faea322d8bcc41901e68028c282f diff --git a/Example/Pods/Local Podspecs/LotameDMP.podspec.json b/Example/Pods/Local Podspecs/LotameDMP.podspec.json index 40ea81c..942410c 100644 --- a/Example/Pods/Local Podspecs/LotameDMP.podspec.json +++ b/Example/Pods/Local Podspecs/LotameDMP.podspec.json @@ -3,13 +3,13 @@ "version": "4.0.0", "summary": "This open source library can be leveraged by Lotame clients to collect data from within their iOS applications.", "description": "Data should influence everything you do – from the products and content you create, to the way you shape and execute your go-to-market strategy. Lotame’s data management platform makes this vision a reality. Our SaaS platform is used by marketers, agencies and publishers around the world to make audience data meaningful and actionable. This framework makes it easy to plug your iOS app into the data management platform.", - "homepage": "https://github.com/Lotame/LotameDMP-IOS", + "homepage": "https://github.com/chenr2/LotameDMP-IOS", "license": "MIT", "authors": { "Dan Rusk": "djrusk@gmail.com" }, "source": { - "git": "https://github.com/Lotame/LotameDMP-IOS.git", + "git": "https://github.com/chenr2/LotameDMP-IOS.git", "tag": "4.0.0" }, "platforms": { @@ -17,11 +17,6 @@ }, "requires_arc": true, "source_files": "Pod/Classes/**/*", - "resource_bundles": { - "LotameDMP": [ - "Pod/Assets/*.png" - ] - }, "frameworks": "AdSupport", "dependencies": { "Alamofire": [ diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index d804153..87607df 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -26,7 +26,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d - LotameDMP: 100c1addabbb1b5eb0302faddf0f852c388494b6 + LotameDMP: 9a7a0977cdc83fe72ce1ea72533ba2d3694feaa6 OHHTTPStubs: 752f9b11fd810a15162d50f11c06ff94f8e012eb PODFILE CHECKSUM: 50039ae88500faea322d8bcc41901e68028c282f diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index cdb3d5f..7cbaa95 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -8,44 +8,42 @@ /* Begin PBXBuildFile section */ 10EB23E9ECC4B33E16933BB1EA560B6A /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */; }; - 11B0BFCD9DA9AD621A25AF3429C53BF5 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */; }; - 11EA7E3B26F3EBB98121B17E9E45A496 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC570ECC373F68FED243230577391A98 /* AdSupport.framework */; }; + 194A9036810959A45E30A81BDAFEE06D /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC570ECC373F68FED243230577391A98 /* AdSupport.framework */; }; 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1C64932FA286C76276A32A4BC4F3C6DE /* OHHTTPStubs-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DCA7717A3800DDA1015E452884C7705 /* OHHTTPStubs-dummy.m */; }; + 20CE3C9533FFEFA27FD2AFB6A0BFEF6A /* LotameDMP-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C8C41885F1CE88EC3EFAB79E88E699 /* LotameDMP-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 250621B51C99029802984E0FAA553BFB /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4485579EA4493F94FC9806C540FA3BA0 /* LotameProfile.swift */; }; 2828C5A8C3FF12A877F8243078BFE26F /* OHHTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8C1F3E527E68DA3B97AFC4CAD9B11C /* OHHTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3084191BDC83456B1401C24DB3AACF8F /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 450C401487E8F40DA326418DE2D54A62 /* OHHTTPStubsResponse.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 3626B94094672CB1C9DEA32B9F9502E1 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */; }; - 36AF845C1FA25396EEC8B338B588C9D6 /* LotameDMP.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */; }; - 382A35323429A462ECB1E9E59157649C /* LotameDMP-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */; }; - 3DA115D0A72C5C47A81F90910195409B /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */; }; 40ECD97A61F651DFBD9A23A4EC18E55F /* Pods-LotameDMP_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 43A9703A4BEDF7EBCE1236A8F3F8358A /* OHHTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 36754F82CE5BC199C2601EDE46F1B290 /* OHHTTPStubsMethodSwizzling.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4544043B3F83E12258851F1586DD524E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; + 4D446E6CFF1E01EB14CFFEC34EE72A89 /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F5E9968A56CAF2EAB646AD783FDD337 /* LotameError.swift */; }; 5387216E723A3C68E851CA15573CDD71 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */; }; + 53E701272D653BDDD52F9DC75FED2AD1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; 57BEF5452B8ABD57683D286244C7FC94 /* OHHTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = AD13AFBDCEBD92B6BEE3E5A71440DDC2 /* OHHTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; 61200D01A1855D7920CEF835C8BE00B0 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */; }; 62F65AD8DC4F0F9610F4B8B4738EC094 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */; }; 64C91FFBDEDD820655E28F38024FEE22 /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 33C710F419C86BCD50AEDD19604021C7 /* OHHTTPStubsResponse+JSON.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 691F4BEE463CA14CCC676A7BF64289A6 /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */; }; + 71393AB0F573BAA8CC1E9B9B3E06D5EB /* LotameAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4522B154AEBE408AA716D0EE51684BD4 /* LotameAudience.swift */; }; 73B9C996AED49ED7CF8EC2A6F1738059 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; 7B5FE28C7EA4122B0598738E54DBEBD8 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */; }; - 7BB8B3FB7DB2120856EBEFAB2C0DE094 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; 7D70AD9517711B55173D6130E078838A /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 258B7E0EECBA64C4BCA558B81FCF2750 /* CFNetwork.framework */; }; 7D8CC01E8C9EFFF9F4D65406CDE0AB66 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */; }; - 7F3AA1BA918C977BA88ECAD3BEBE2D1B /* LotameProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */; }; 83A37634F48394BD93F108582501A4C4 /* OHPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 76627F3692CA4DA887DED51DC68CF81E /* OHPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9890E6D0FDF36E4CA8ACA675C86FC6D2 /* OHHTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = F945C090757C5DBD90F1D57EB0575534 /* OHHTTPStubsMethodSwizzling.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 9E3EA11F3FB3812F8E4D6F08F0717606 /* Pods-LotameDMP_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */; }; 9ED2BB2981896E0A39EFA365503F58CE /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */; }; A0A2186A1786188B449AEB083BBB7891 /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = FEF0E8CE9EEB29DC85302F94CC30BAFE /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; A2A6F71B727312BD45CC7A4AAD7B0AB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2551D39689BF245ABE2FBA5F90892265 /* NetworkReachabilityManager.swift */; }; - A35ECCA29E8F45D0B8D78B8075C296BD /* LotameError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */; }; + A82BE52873713A709356988FEB2B973F /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */; }; A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */; }; + AD8E0792535ECDD4768C537054E43DD0 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = C403EE09A6CE9F0730A567D7D12EB504 /* SwiftyJSON.swift */; }; AE1EF48399533730D0066E04B22CA2D6 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2556B830917A909CE4918EED8D613EBB /* SessionManager.swift */; }; - B5FCC9FFF6AB0081229AC56A56CBF68A /* LotameDMP-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; B65FCF589DA398C3EFE0128064E510EC /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */; }; - B6D55D6720994609A098DB75BA739719 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */; }; B71274CE2E5707A2AD5688829FE616D0 /* OHHTTPStubs-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 69E64B61FD883181243E9D59370F9969 /* OHHTTPStubs-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BB4F21C34153313591D565EE6AEEF685 /* LotameDMP-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BDF98019B992EB994D2A61002304EEEA /* LotameDMP-dummy.m */; }; BBEFE2F9CEB73DC7BD97FFA66A0D9D4F /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */; }; BE5C67A07E289FE1F9BE27335B159997 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */; }; C5ED19E01DFC9993E0C9AB6C85ACAB1D /* NSURLRequest+HTTPBodyTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F8FCA014B1789B8B5609863F8392BEC /* NSURLRequest+HTTPBodyTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -57,6 +55,7 @@ D5E4C5FAE2F28389DA4E4DA28EEFE365 /* Pods-LotameDMP_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; DC3BE4B3C6C098A5B9B063DB25FCDF8B /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A66376F5E3BAE650D43BBCEA0ACDB7B /* NSURLRequest+HTTPBodyTesting.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; E051B949D969BCE0CD553D323D63977E /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EC482F90295CA01765BA58BB2653694 /* OHHTTPStubs.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + EDEED1665DAB04CBB534F72D10C1DCA1 /* DMP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94C422830D0003D16D10560429DA699A /* DMP.swift */; }; EFD264FC408EBF3BA2528E70B08DDD94 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B9C815FC5C028D15E37BA7E9A362DE /* Notifications.swift */; }; F26105CD3493CF1CF6506F36561CF17F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */; }; F6BECD98B97CBFEBE2C96F0E9E72A6C0 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */; }; @@ -65,18 +64,11 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 008FA4FEF6392616FE22BC33F99FDF87 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; - remoteInfo = Alamofire; - }; 14F34FADE20A0DB7EE21878F12452E6F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 98C70B29DA51105A7C00877F51F9AE6D; + remoteGlobalIDString = 9D872413D4076D84FA19A0B1313280E0; remoteInfo = LotameDMP; }; 5B6EBA2C287BD5CA395C916566B63E27 /* PBXContainerItemProxy */ = { @@ -90,15 +82,15 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 98C70B29DA51105A7C00877F51F9AE6D; + remoteGlobalIDString = 9D872413D4076D84FA19A0B1313280E0; remoteInfo = LotameDMP; }; - D0D22DBFC62D517B155C8BDD7A345CA6 /* PBXContainerItemProxy */ = { + CD010EB905DAFB95080FB451F3034CBA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = D4CF7DA50152F9B5C82AB977424D6D31; - remoteInfo = "LotameDMP-LotameDMP"; + remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; + remoteInfo = Alamofire; }; F84A6EADC2F1D5C788EC9FD8CCBF9819 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -117,10 +109,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 04075B8A4826297DFB273C8A46BDFE07 /* ResourceBundle-LotameDMP-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-LotameDMP-Info.plist"; sourceTree = ""; }; 091715455495A385122589395850ED36 /* OHHTTPStubs.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = OHHTTPStubs.modulemap; sourceTree = ""; }; 0F8FCA014B1789B8B5609863F8392BEC /* NSURLRequest+HTTPBodyTesting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLRequest+HTTPBodyTesting.h"; path = "OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h"; sourceTree = ""; }; - 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = LotameDMP.framework; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 156A1B5B335F50C08B8C51ED6651C711 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 160BB36F5B340CA353EDA04590D08A31 /* Pods-LotameDMP_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.debug.xcconfig"; sourceTree = ""; }; 181F8F5C57F8A1DBFBCD6CDB7E049E10 /* Pods-LotameDMP_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Tests-acknowledgements.markdown"; sourceTree = ""; }; 18EB04B926F07C6DC574CE16F81E9689 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; @@ -132,65 +123,65 @@ 26F06CA2E46281C39ABF8AC532C03A69 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2866D261378FCD4FE14943A99A722B77 /* Pods-LotameDMP_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-LotameDMP_Example.modulemap"; sourceTree = ""; }; 29651BD15CB9D9D6946310C2E6ED6021 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + 2F5E9968A56CAF2EAB646AD783FDD337 /* LotameError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameError.swift; sourceTree = ""; }; 2F646CB189899F51A9BA78D9BC7C640A /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; 33C710F419C86BCD50AEDD19604021C7 /* OHHTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubsResponse+JSON.m"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m"; sourceTree = ""; }; 3471B4AC871F2345EF2D38EC0476BB55 /* OHHTTPStubs-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-prefix.pch"; sourceTree = ""; }; 36754F82CE5BC199C2601EDE46F1B290 /* OHHTTPStubsMethodSwizzling.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsMethodSwizzling.h; path = OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h; sourceTree = ""; }; 3DCA7717A3800DDA1015E452884C7705 /* OHHTTPStubs-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs-dummy.m"; sourceTree = ""; }; - 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DMP.swift; sourceTree = ""; }; 3F6843AA96F513831A4CBD26850657A8 /* Pods-LotameDMP_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LotameDMP_Example-acknowledgements.plist"; sourceTree = ""; }; 40386A32231E89317B1C2B6ADC45808C /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; + 4485579EA4493F94FC9806C540FA3BA0 /* LotameProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameProfile.swift; sourceTree = ""; }; 450C401487E8F40DA326418DE2D54A62 /* OHHTTPStubsResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsResponse.m; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.m; sourceTree = ""; }; + 4522B154AEBE408AA716D0EE51684BD4 /* LotameAudience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameAudience.swift; sourceTree = ""; }; 4927332025C324CA11BC68E9ADD97C5E /* Pods-LotameDMP_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-LotameDMP_Tests.modulemap"; sourceTree = ""; }; + 4936C431CDA97A2B1F7141C1CE7CA98D /* LotameDMP.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = LotameDMP.xcconfig; sourceTree = ""; }; 50828A0DCEDF96358ECAA7645741ED22 /* OHHTTPStubs.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OHHTTPStubs.xcconfig; sourceTree = ""; }; 51F9A814E2B204818DF97B58DB17FDCF /* Pods-LotameDMP_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Example-frameworks.sh"; sourceTree = ""; }; 53D6DCE2ED563FC7DD462ED1B38B1461 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; 581AC0E6A878A80EFCC3C5A83CA83488 /* Pods-LotameDMP_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Tests-resources.sh"; sourceTree = ""; }; - 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LotameDMP-dummy.m"; sourceTree = ""; }; 5EC482F90295CA01765BA58BB2653694 /* OHHTTPStubs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubs.m; path = OHHTTPStubs/Sources/OHHTTPStubs.m; sourceTree = ""; }; - 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Tests.framework; path = "Pods-LotameDMP_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 6446F7CD4D49C7CD4745D9D8A08F0EC8 /* Pods-LotameDMP_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Example-umbrella.h"; sourceTree = ""; }; - 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = LotameDMP.bundle; path = LotameDMP.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 679F8FF400DF834BF58F7725E78B64F3 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; 69E64B61FD883181243E9D59370F9969 /* OHHTTPStubs-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs-umbrella.h"; sourceTree = ""; }; 6B8C1F3E527E68DA3B97AFC4CAD9B11C /* OHHTTPStubsResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubsResponse.h; path = OHHTTPStubs/Sources/OHHTTPStubsResponse.h; sourceTree = ""; }; - 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 70F5C61FC1F0C33825FF65966AF5621D /* 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; }; - 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameAudience.swift; sourceTree = ""; }; - 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Example.framework; path = "Pods-LotameDMP_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 76627F3692CA4DA887DED51DC68CF81E /* OHPathHelpers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHPathHelpers.h; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h; sourceTree = ""; }; + 771E06E9D132B120EA95EE7A0E21C8CD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 79FF6A8D53FBEF6AFE111C775B2F6BD0 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; 7A66376F5E3BAE650D43BBCEA0ACDB7B /* NSURLRequest+HTTPBodyTesting.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLRequest+HTTPBodyTesting.m"; path = "OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m"; sourceTree = ""; }; + 810606F635C38FCAC78849767F27B757 /* Pods_LotameDMP_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Tests.framework; path = "Pods-LotameDMP_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 81C5210BAD7B98385B871527EB384CAC /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; 84169E163894A1760462BE867D38856F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-umbrella.h"; sourceTree = ""; }; - 867FB9BC000430BD8D288DE00752090F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 86193E804DD593369BBCC523241D3944 /* Pods_LotameDMP_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LotameDMP_Example.framework; path = "Pods-LotameDMP_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8923ADADC9E9EB44413B36D01356CB75 /* LotameDMP-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-prefix.pch"; sourceTree = ""; }; 8A4DEFF43912FD4EFB17D00FEBA02AF6 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; 8A64A76B1769FA18E1A4723B6E53871F /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 93A773146EED80261B957E33F48AA646 /* Pods-LotameDMP_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Example.release.xcconfig"; sourceTree = ""; }; - 93C307C45E5B6F04CD4099CA7FDA8FA9 /* LotameDMP-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-prefix.pch"; sourceTree = ""; }; - 978C8A2D546E1949D139D06B78F1D107 /* LotameDMP.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = LotameDMP.modulemap; sourceTree = ""; }; + 93C8C41885F1CE88EC3EFAB79E88E699 /* LotameDMP-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LotameDMP-umbrella.h"; sourceTree = ""; }; + 94C422830D0003D16D10560429DA699A /* DMP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DMP.swift; sourceTree = ""; }; A1711E38B4A3F9C55C971A68C10D3198 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; A99BCD8F756C9FBCF06150555C1E1BCF /* Compatibility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Compatibility.h; path = OHHTTPStubs/Sources/Compatibility.h; sourceTree = ""; }; AC2B96D109ED9FB0E9C2E8DF6970B7C5 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; AD13AFBDCEBD92B6BEE3E5A71440DDC2 /* OHHTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "OHHTTPStubsResponse+JSON.h"; path = "OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h"; sourceTree = ""; }; - AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = LotameDMP.xcconfig; sourceTree = ""; }; AF6E33079A0AC62440C75012BB20ED40 /* Pods-LotameDMP_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LotameDMP_Example-acknowledgements.markdown"; sourceTree = ""; }; B647466486EFB804B68D5FC8AE8B744B /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; B7F8DB5C4DBB1A49010816C7E0785934 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; B974CEE3695BA2D211E692533A5C70EA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; BACC2776A3FA0FC3516D7C9378D97710 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.release.xcconfig"; sourceTree = ""; }; + BDF98019B992EB994D2A61002304EEEA /* LotameDMP-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LotameDMP-dummy.m"; sourceTree = ""; }; + BE1821866CF6FA5578C0FF9C3A5141C1 /* LotameDMP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = LotameDMP.framework; path = LotameDMP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C403EE09A6CE9F0730A567D7D12EB504 /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = ""; }; C6649F10029169FD60CF7AA94B4634A6 /* OHPathHelpers.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHPathHelpers.m; path = OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m; sourceTree = ""; }; C8BDDD1481BDC693812B617DD80F265C /* Pods-LotameDMP_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LotameDMP_Tests-umbrella.h"; sourceTree = ""; }; - D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameError.swift; sourceTree = ""; }; D20FC0352198484DDB75C6398CAC2FAF /* Pods-LotameDMP_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Example-resources.sh"; sourceTree = ""; }; + D3A6B0658F4F90B4A4E7E844FC8C77DA /* LotameDMP.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = LotameDMP.modulemap; sourceTree = ""; }; D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LotameDMP_Tests.debug.xcconfig"; sourceTree = ""; }; D95467F6E9E38EB2CAC45890B7AEC2E3 /* Pods-LotameDMP_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Example-dummy.m"; sourceTree = ""; }; + E046C650AD0C9D8C8E163E0F7C9BD386 /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OHHTTPStubs.framework; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E3903A9C3157F48E5D7D66FA301F4F39 /* Pods-LotameDMP_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LotameDMP_Tests-dummy.m"; sourceTree = ""; }; - E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LotameProfile.swift; sourceTree = ""; }; E6ACD92E8579844D7BA1F53B4F23746C /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; EC570ECC373F68FED243230577391A98 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/AdSupport.framework; sourceTree = DEVELOPER_DIR; }; F097D40D5F132B5A9DBDF6C0B2CECB77 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -199,17 +190,19 @@ F8924EE5D6D964DB953650FD76B83B9E /* OHHTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "OHHTTPStubs+NSURLSessionConfiguration.m"; path = "OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; F945C090757C5DBD90F1D57EB0575534 /* OHHTTPStubsMethodSwizzling.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OHHTTPStubsMethodSwizzling.m; path = OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m; sourceTree = ""; }; F9A8E7E3596FFBEA1AC95B01D7C69DB7 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OHHTTPStubs.framework; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FC9305F83118CE566D145BE4380022DE /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; FEF0E8CE9EEB29DC85302F94CC30BAFE /* OHHTTPStubs.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OHHTTPStubs.h; path = OHHTTPStubs/Sources/OHHTTPStubs.h; sourceTree = ""; }; FF8C542B18C786E2D40F672B27921463 /* Pods-LotameDMP_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LotameDMP_Tests-frameworks.sh"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 05808F2ADD21C69527042AE6B05A3C5E /* Frameworks */ = { + 2CC08F52AFF8D728C835DA62603B3F44 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 194A9036810959A45E30A81BDAFEE06D /* AdSupport.framework in Frameworks */, + A82BE52873713A709356988FEB2B973F /* Alamofire.framework in Frameworks */, + 53E701272D653BDDD52F9DC75FED2AD1 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -237,16 +230,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - C4B99028893CFF8F18456DE4E5177B87 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 11EA7E3B26F3EBB98121B17E9E45A496 /* AdSupport.framework in Frameworks */, - 3DA115D0A72C5C47A81F90910195409B /* Alamofire.framework in Frameworks */, - 7BB8B3FB7DB2120856EBEFAB2C0DE094 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; C7AE56C614EA98A5132171AE9A318E9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -300,27 +283,24 @@ name = OHPathHelpers; sourceTree = ""; }; - 38112569E58C989BAE95B9CCEF4CFBDE /* iOS */ = { + 2BB5829C5115BD1F605E89BF545E8572 /* LotameDMP */ = { isa = PBXGroup; children = ( - EC570ECC373F68FED243230577391A98 /* AdSupport.framework */, - 258B7E0EECBA64C4BCA558B81FCF2750 /* CFNetwork.framework */, - 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */, + E093B518E37A889A5D6EB73E9D61986A /* Pod */, + AFE856FF768CAE46F20116D95A4DC565 /* Support Files */, ); - name = iOS; + name = LotameDMP; + path = ../..; sourceTree = ""; }; - 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */ = { + 38112569E58C989BAE95B9CCEF4CFBDE /* iOS */ = { isa = PBXGroup; children = ( - 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */, - 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */, - 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */, - FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */, - 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */, - 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */, + EC570ECC373F68FED243230577391A98 /* AdSupport.framework */, + 258B7E0EECBA64C4BCA558B81FCF2750 /* CFNetwork.framework */, + 70F5C61FC1F0C33825FF65966AF5621D /* Foundation.framework */, ); - name = Products; + name = iOS; sourceTree = ""; }; 4221E0A3969D14A4F363204FCAC92C92 /* Core */ = { @@ -349,21 +329,6 @@ path = "../Target Support Files/OHHTTPStubs"; sourceTree = ""; }; - 4C94E45A856C7A3DDDA073DC9B24ECE0 /* Support Files */ = { - isa = PBXGroup; - children = ( - 867FB9BC000430BD8D288DE00752090F /* Info.plist */, - 978C8A2D546E1949D139D06B78F1D107 /* LotameDMP.modulemap */, - AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */, - 5CC905832914B84676F886257DF568CB /* LotameDMP-dummy.m */, - 93C307C45E5B6F04CD4099CA7FDA8FA9 /* LotameDMP-prefix.pch */, - 86745AB52AA84BBDFB0E9F225B7AD733 /* LotameDMP-umbrella.h */, - 04075B8A4826297DFB273C8A46BDFE07 /* ResourceBundle-LotameDMP-Info.plist */, - ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/LotameDMP"; - sourceTree = ""; - }; 4E8C1B2B3A6C44CEBF6AC753A2198DBB /* NSURLSession */ = { isa = PBXGroup; children = ( @@ -376,16 +341,6 @@ name = NSURLSession; sourceTree = ""; }; - 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */ = { - isa = PBXGroup; - children = ( - 761DA5F47361031CA935D355D51B46E4 /* Pod */, - 4C94E45A856C7A3DDDA073DC9B24ECE0 /* Support Files */, - ); - name = LotameDMP; - path = ../..; - sourceTree = ""; - }; 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */ = { isa = PBXGroup; children = ( @@ -395,15 +350,6 @@ name = "Targets Support Files"; sourceTree = ""; }; - 761DA5F47361031CA935D355D51B46E4 /* Pod */ = { - isa = PBXGroup; - children = ( - F322A5A1B6C13971D8D024A6759ED2ED /* Classes */, - ); - name = Pod; - path = Pod; - sourceTree = ""; - }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( @@ -411,19 +357,46 @@ A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */, CAD3C16957C45B9334B34B3F761CF915 /* Frameworks */, B747B143EACB612C450D4F57A6B1CD86 /* Pods */, - 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */, + FC0D9CA5766FEC56913AE51824AC6C7C /* Products */, 6BE73F65D48B7442B9AD0579F822E3AA /* Targets Support Files */, ); sourceTree = ""; }; + 9A29C6FFD43240BA36BD6A72470FE8E3 /* Classes */ = { + isa = PBXGroup; + children = ( + 94C422830D0003D16D10560429DA699A /* DMP.swift */, + 4522B154AEBE408AA716D0EE51684BD4 /* LotameAudience.swift */, + 2F5E9968A56CAF2EAB646AD783FDD337 /* LotameError.swift */, + 4485579EA4493F94FC9806C540FA3BA0 /* LotameProfile.swift */, + C403EE09A6CE9F0730A567D7D12EB504 /* SwiftyJSON.swift */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; A177B9ABDE26C2F83EEB69BFA670195C /* Development Pods */ = { isa = PBXGroup; children = ( - 566AE8F633E055ADCA5BFB9702BBD684 /* LotameDMP */, + 2BB5829C5115BD1F605E89BF545E8572 /* LotameDMP */, ); name = "Development Pods"; sourceTree = ""; }; + AFE856FF768CAE46F20116D95A4DC565 /* Support Files */ = { + isa = PBXGroup; + children = ( + 771E06E9D132B120EA95EE7A0E21C8CD /* Info.plist */, + D3A6B0658F4F90B4A4E7E844FC8C77DA /* LotameDMP.modulemap */, + 4936C431CDA97A2B1F7141C1CE7CA98D /* LotameDMP.xcconfig */, + BDF98019B992EB994D2A61002304EEEA /* LotameDMP-dummy.m */, + 8923ADADC9E9EB44413B36D01356CB75 /* LotameDMP-prefix.pch */, + 93C8C41885F1CE88EC3EFAB79E88E699 /* LotameDMP-umbrella.h */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/LotameDMP"; + sourceTree = ""; + }; B3C73CD853C9EE701F27D144FAF247B8 /* OHHTTPStubs */ = { isa = PBXGroup; children = ( @@ -464,6 +437,15 @@ name = Frameworks; sourceTree = ""; }; + E093B518E37A889A5D6EB73E9D61986A /* Pod */ = { + isa = PBXGroup; + children = ( + 9A29C6FFD43240BA36BD6A72470FE8E3 /* Classes */, + ); + name = Pod; + path = Pod; + sourceTree = ""; + }; E9FC310342247B47409357C80424D3D9 /* Pods-LotameDMP_Example */ = { isa = PBXGroup; children = ( @@ -508,17 +490,16 @@ path = Alamofire; sourceTree = ""; }; - F322A5A1B6C13971D8D024A6759ED2ED /* Classes */ = { + FC0D9CA5766FEC56913AE51824AC6C7C /* Products */ = { isa = PBXGroup; children = ( - 3E78782E441C23D221F46A047EFDB8A4 /* DMP.swift */, - 7478CBFC54655CB57678174947E4E471 /* LotameAudience.swift */, - D11DA46589A2003AF5BCD2227807B2BE /* LotameError.swift */, - E3F53998B05798D21276B0B58CB6904E /* LotameProfile.swift */, - 929D130E62BCC796B6B10309C22174FB /* SwiftyJSON.swift */, + 156A1B5B335F50C08B8C51ED6651C711 /* Alamofire.framework */, + BE1821866CF6FA5578C0FF9C3A5141C1 /* LotameDMP.framework */, + E046C650AD0C9D8C8E163E0F7C9BD386 /* OHHTTPStubs.framework */, + 86193E804DD593369BBCC523241D3944 /* Pods_LotameDMP_Example.framework */, + 810606F635C38FCAC78849767F27B757 /* Pods_LotameDMP_Tests.framework */, ); - name = Classes; - path = Classes; + name = Products; sourceTree = ""; }; /* End PBXGroup section */ @@ -555,11 +536,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 89DD8331096690E5526171A36F6628EA /* Headers */ = { + 4564EE885B957FFBC2398329091F0D70 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B5FCC9FFF6AB0081229AC56A56CBF68A /* LotameDMP-umbrella.h in Headers */, + 20CE3C9533FFEFA27FD2AFB6A0BFEF6A /* LotameDMP-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -588,7 +569,7 @@ ); name = OHHTTPStubs; productName = OHHTTPStubs; - productReference = FA88A2D0F17DA1AA40268BCCBB56FBCC /* OHHTTPStubs.framework */; + productReference = E046C650AD0C9D8C8E163E0F7C9BD386 /* OHHTTPStubs.framework */; productType = "com.apple.product-type.framework"; }; 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */ = { @@ -605,27 +586,25 @@ ); name = Alamofire; productName = Alamofire; - productReference = 70C4DD6CF0A78159BEF189056637F3B3 /* Alamofire.framework */; + productReference = 156A1B5B335F50C08B8C51ED6651C711 /* Alamofire.framework */; productType = "com.apple.product-type.framework"; }; - 98C70B29DA51105A7C00877F51F9AE6D /* LotameDMP */ = { + 9D872413D4076D84FA19A0B1313280E0 /* LotameDMP */ = { isa = PBXNativeTarget; - buildConfigurationList = 4902222E81604B7726093C6E5AC1238E /* Build configuration list for PBXNativeTarget "LotameDMP" */; + buildConfigurationList = FE1DA26799DF075BF5984CA131CA6AF0 /* Build configuration list for PBXNativeTarget "LotameDMP" */; buildPhases = ( - 82E4B09765F10E921DDCFE1B0DDAC845 /* Sources */, - C4B99028893CFF8F18456DE4E5177B87 /* Frameworks */, - 24097C580875963EEAECBD4E6A6BF348 /* Resources */, - 89DD8331096690E5526171A36F6628EA /* Headers */, + 88570690A760ED9F6FEAED924A6A6926 /* Sources */, + 2CC08F52AFF8D728C835DA62603B3F44 /* Frameworks */, + 4564EE885B957FFBC2398329091F0D70 /* Headers */, ); buildRules = ( ); dependencies = ( - 1E65B8307A57E1F2183F4595F20E06FE /* PBXTargetDependency */, - DEF3AC23B619EEE8462F8F8AFC6CAD7D /* PBXTargetDependency */, + 0115CF7F1E5C7C896453D0FCB453B094 /* PBXTargetDependency */, ); name = LotameDMP; productName = LotameDMP; - productReference = 1334B3BF4076AFD4D3103D9AC31E800B /* LotameDMP.framework */; + productReference = BE1821866CF6FA5578C0FF9C3A5141C1 /* LotameDMP.framework */; productType = "com.apple.product-type.framework"; }; C07F46A64285E7E28C43F7575A8B2B79 /* Pods-LotameDMP_Tests */ = { @@ -645,26 +624,9 @@ ); name = "Pods-LotameDMP_Tests"; productName = "Pods-LotameDMP_Tests"; - productReference = 61FF661C735CE1CE9C60CEDC580D0CAD /* Pods_LotameDMP_Tests.framework */; + productReference = 810606F635C38FCAC78849767F27B757 /* Pods_LotameDMP_Tests.framework */; productType = "com.apple.product-type.framework"; }; - D4CF7DA50152F9B5C82AB977424D6D31 /* LotameDMP-LotameDMP */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1A08E46E46EE27B795256AB05113BFF6 /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */; - buildPhases = ( - 804C01C308237B61E38903023D50A29A /* Sources */, - 05808F2ADD21C69527042AE6B05A3C5E /* Frameworks */, - F7AC29556EAF6DC86C2FADB5FEF9AB83 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "LotameDMP-LotameDMP"; - productName = "LotameDMP-LotameDMP"; - productReference = 665E8ECC958098BC9DB5D0AF82B38AB8 /* LotameDMP.bundle */; - productType = "com.apple.product-type.bundle"; - }; E7C9A41DB65D0ED728B0C3846F3FFEAD /* Pods-LotameDMP_Example */ = { isa = PBXNativeTarget; buildConfigurationList = 194D7AF2E1839332FA026816A45CDAE7 /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Example" */; @@ -681,7 +643,7 @@ ); name = "Pods-LotameDMP_Example"; productName = "Pods-LotameDMP_Example"; - productReference = 757BFF936E2F61A9870F5A60CD193830 /* Pods_LotameDMP_Example.framework */; + productReference = 86193E804DD593369BBCC523241D3944 /* Pods_LotameDMP_Example.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -701,13 +663,12 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 3FEBD876EB237A88CE0FEBAACBCFCFB1 /* Products */; + productRefGroup = FC0D9CA5766FEC56913AE51824AC6C7C /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */, - 98C70B29DA51105A7C00877F51F9AE6D /* LotameDMP */, - D4CF7DA50152F9B5C82AB977424D6D31 /* LotameDMP-LotameDMP */, + 9D872413D4076D84FA19A0B1313280E0 /* LotameDMP */, 06A23325201207EEE8C22E3551E28E4A /* OHHTTPStubs */, E7C9A41DB65D0ED728B0C3846F3FFEAD /* Pods-LotameDMP_Example */, C07F46A64285E7E28C43F7575A8B2B79 /* Pods-LotameDMP_Tests */, @@ -715,24 +676,6 @@ }; /* End PBXProject section */ -/* Begin PBXResourcesBuildPhase section */ - 24097C580875963EEAECBD4E6A6BF348 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 36AF845C1FA25396EEC8B338B588C9D6 /* LotameDMP.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F7AC29556EAF6DC86C2FADB5FEF9AB83 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 0CDDA1BE2252047B38A492F669E33D0B /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -790,45 +733,38 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 804C01C308237B61E38903023D50A29A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 82E4B09765F10E921DDCFE1B0DDAC845 /* Sources */ = { + 88570690A760ED9F6FEAED924A6A6926 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 11B0BFCD9DA9AD621A25AF3429C53BF5 /* DMP.swift in Sources */, - 691F4BEE463CA14CCC676A7BF64289A6 /* LotameAudience.swift in Sources */, - 382A35323429A462ECB1E9E59157649C /* LotameDMP-dummy.m in Sources */, - A35ECCA29E8F45D0B8D78B8075C296BD /* LotameError.swift in Sources */, - 7F3AA1BA918C977BA88ECAD3BEBE2D1B /* LotameProfile.swift in Sources */, - B6D55D6720994609A098DB75BA739719 /* SwiftyJSON.swift in Sources */, + EDEED1665DAB04CBB534F72D10C1DCA1 /* DMP.swift in Sources */, + 71393AB0F573BAA8CC1E9B9B3E06D5EB /* LotameAudience.swift in Sources */, + BB4F21C34153313591D565EE6AEEF685 /* LotameDMP-dummy.m in Sources */, + 4D446E6CFF1E01EB14CFFEC34EE72A89 /* LotameError.swift in Sources */, + 250621B51C99029802984E0FAA553BFB /* LotameProfile.swift in Sources */, + AD8E0792535ECDD4768C537054E43DD0 /* SwiftyJSON.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 15492364B0FE062F8205137A34EFB43F /* PBXTargetDependency */ = { + 0115CF7F1E5C7C896453D0FCB453B094 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Alamofire; target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; - targetProxy = F84A6EADC2F1D5C788EC9FD8CCBF9819 /* PBXContainerItemProxy */; + targetProxy = CD010EB905DAFB95080FB451F3034CBA /* PBXContainerItemProxy */; }; - 1E65B8307A57E1F2183F4595F20E06FE /* PBXTargetDependency */ = { + 15492364B0FE062F8205137A34EFB43F /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Alamofire; target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; - targetProxy = 008FA4FEF6392616FE22BC33F99FDF87 /* PBXContainerItemProxy */; + targetProxy = F84A6EADC2F1D5C788EC9FD8CCBF9819 /* PBXContainerItemProxy */; }; 3FC2977ED99BE4008D994EB8B8AABEC3 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = LotameDMP; - target = 98C70B29DA51105A7C00877F51F9AE6D /* LotameDMP */; + target = 9D872413D4076D84FA19A0B1313280E0 /* LotameDMP */; targetProxy = 14F34FADE20A0DB7EE21878F12452E6F /* PBXContainerItemProxy */; }; 7E46DFD5A3FD8CA87741149A07B51885 /* PBXTargetDependency */ = { @@ -846,18 +782,47 @@ CC4CA8B759AE40D8A50FC631C2EDB98E /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = LotameDMP; - target = 98C70B29DA51105A7C00877F51F9AE6D /* LotameDMP */; + target = 9D872413D4076D84FA19A0B1313280E0 /* LotameDMP */; targetProxy = 622296FFDBFB019096028D0E09123D1C /* PBXContainerItemProxy */; }; - DEF3AC23B619EEE8462F8F8AFC6CAD7D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "LotameDMP-LotameDMP"; - target = D4CF7DA50152F9B5C82AB977424D6D31 /* LotameDMP-LotameDMP */; - targetProxy = D0D22DBFC62D517B155C8BDD7A345CA6 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + 08CF27148398189907415E7FE49D4203 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4936C431CDA97A2B1F7141C1CE7CA98D /* LotameDMP.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/LotameDMP/LotameDMP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP/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/LotameDMP/LotameDMP.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = LotameDMP; + 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 = ""; + }; + name = Debug; + }; 09B0B1B255A05C64030F74F0AF810E2F /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = BC7773E62DBB946025A99030A47CAA94 /* Pods-LotameDMP_Tests.release.xcconfig */; @@ -896,22 +861,39 @@ }; name = Release; }; - 2DFE8ACBF08912C998A5901601BD7ECA /* Debug */ = { + 15AA496179DC41523E4CB66B7C55F12C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; + baseConfigurationReference = 4936C431CDA97A2B1F7141C1CE7CA98D /* LotameDMP.xcconfig */; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP"; + 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/LotameDMP/ResourceBundle-LotameDMP-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/LotameDMP/LotameDMP-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LotameDMP/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/LotameDMP/LotameDMP.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = LotameDMP; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; 34FE9531DA9AF2820790339988D5FF41 /* Release */ = { isa = XCBuildConfiguration; @@ -957,23 +939,6 @@ }; name = Release; }; - 50C79C8B8A6C637EB3434A86F07BBBEA /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.xcconfig */; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/LotameDMP"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PRODUCT_NAME = LotameDMP; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Release; - }; 579D3D356793AF099DB9822AEBB4A837 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D84BFAD610AC40E81008320042711414 /* Pods-LotameDMP_Tests.debug.xcconfig */; @@ -1119,41 +1084,6 @@ }; name = Debug; }; - A463BAD4087BEB5BABEB845F25F4362B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.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/LotameDMP/LotameDMP-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP/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/LotameDMP/LotameDMP.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = LotameDMP; - 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 = ""; - }; - name = Debug; - }; C104F7F091290C3D1E248192F07FE689 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1308,40 +1238,6 @@ }; name = Release; }; - F0D97ABD42011119B48E97752D1E1F02 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = AD185815C634004B7339248C048DD92B /* LotameDMP.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/LotameDMP/LotameDMP-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/LotameDMP/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/LotameDMP/LotameDMP.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = LotameDMP; - 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 = ""; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1363,15 +1259,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 1A08E46E46EE27B795256AB05113BFF6 /* Build configuration list for PBXNativeTarget "LotameDMP-LotameDMP" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2DFE8ACBF08912C998A5901601BD7ECA /* Debug */, - 50C79C8B8A6C637EB3434A86F07BBBEA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -1390,20 +1277,20 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4902222E81604B7726093C6E5AC1238E /* Build configuration list for PBXNativeTarget "LotameDMP" */ = { + 94B7C65DF01CAEB40022F0E3212008AA /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - A463BAD4087BEB5BABEB845F25F4362B /* Debug */, - F0D97ABD42011119B48E97752D1E1F02 /* Release */, + 579D3D356793AF099DB9822AEBB4A837 /* Debug */, + 09B0B1B255A05C64030F74F0AF810E2F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 94B7C65DF01CAEB40022F0E3212008AA /* Build configuration list for PBXNativeTarget "Pods-LotameDMP_Tests" */ = { + FE1DA26799DF075BF5984CA131CA6AF0 /* Build configuration list for PBXNativeTarget "LotameDMP" */ = { isa = XCConfigurationList; buildConfigurations = ( - 579D3D356793AF099DB9822AEBB4A837 /* Debug */, - 09B0B1B255A05C64030F74F0AF810E2F /* Release */, + 08CF27148398189907415E7FE49D4203 /* Debug */, + 15AA496179DC41523E4CB66B7C55F12C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist b/Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist deleted file mode 100644 index a9b6888..0000000 --- a/Example/Pods/Target Support Files/LotameDMP/ResourceBundle-LotameDMP-Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - BNDL - CFBundleShortVersionString - 4.0.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSPrincipalClass - - - diff --git a/LotameDMP.podspec b/LotameDMP.podspec index d305c5a..c3c2399 100644 --- a/LotameDMP.podspec +++ b/LotameDMP.podspec @@ -16,9 +16,6 @@ Pod::Spec.new do |s| s.requires_arc = true s.source_files = 'Pod/Classes/**/*' - s.resource_bundles = { - 'LotameDMP' => ['Pod/Assets/*.png'] - } s.frameworks = 'AdSupport' s.dependency 'Alamofire', '~> 4.0' From d13968dd11c23002712635f8ca89bf54478ed241 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Wed, 26 Apr 2017 11:13:34 -0400 Subject: [PATCH 15/20] Setting Alamofire dependency to the current version 4.4. --- Example/Podfile.lock | 4 ++-- Example/Pods/Local Podspecs/LotameDMP.podspec.json | 2 +- Example/Pods/Manifest.lock | 4 ++-- LotameDMP.podspec | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 87607df..c1ab7b4 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,7 +1,7 @@ PODS: - Alamofire (4.4.0) - LotameDMP (4.0.0): - - Alamofire (~> 4.0) + - Alamofire (~> 4.4) - OHHTTPStubs (6.0.0): - OHHTTPStubs/Default (= 6.0.0) - OHHTTPStubs/Core (6.0.0) @@ -26,7 +26,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d - LotameDMP: 9a7a0977cdc83fe72ce1ea72533ba2d3694feaa6 + LotameDMP: 0defabe7a21938ae7e05038e4c9ac4ebf6a58abe OHHTTPStubs: 752f9b11fd810a15162d50f11c06ff94f8e012eb PODFILE CHECKSUM: 50039ae88500faea322d8bcc41901e68028c282f diff --git a/Example/Pods/Local Podspecs/LotameDMP.podspec.json b/Example/Pods/Local Podspecs/LotameDMP.podspec.json index 942410c..edede80 100644 --- a/Example/Pods/Local Podspecs/LotameDMP.podspec.json +++ b/Example/Pods/Local Podspecs/LotameDMP.podspec.json @@ -20,7 +20,7 @@ "frameworks": "AdSupport", "dependencies": { "Alamofire": [ - "~> 4.0" + "~> 4.4" ] } } diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 87607df..c1ab7b4 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,7 +1,7 @@ PODS: - Alamofire (4.4.0) - LotameDMP (4.0.0): - - Alamofire (~> 4.0) + - Alamofire (~> 4.4) - OHHTTPStubs (6.0.0): - OHHTTPStubs/Default (= 6.0.0) - OHHTTPStubs/Core (6.0.0) @@ -26,7 +26,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d - LotameDMP: 9a7a0977cdc83fe72ce1ea72533ba2d3694feaa6 + LotameDMP: 0defabe7a21938ae7e05038e4c9ac4ebf6a58abe OHHTTPStubs: 752f9b11fd810a15162d50f11c06ff94f8e012eb PODFILE CHECKSUM: 50039ae88500faea322d8bcc41901e68028c282f diff --git a/LotameDMP.podspec b/LotameDMP.podspec index c3c2399..47a3c1f 100644 --- a/LotameDMP.podspec +++ b/LotameDMP.podspec @@ -18,5 +18,5 @@ Pod::Spec.new do |s| s.source_files = 'Pod/Classes/**/*' s.frameworks = 'AdSupport' - s.dependency 'Alamofire', '~> 4.0' + s.dependency 'Alamofire', '~> 4.4' end From 250e9872dc2ca02bd9af3067af0dc86603fc2e3b Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Wed, 26 Apr 2017 11:42:02 -0400 Subject: [PATCH 16/20] Updates README with versioning information, and notes about the version 4.0.0 update. --- README.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8864add..6249941 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This open source library can be leveraged by Lotame clients to collect data from ## Requirements -LotameDMP requires Xcode 8 and at least iOS 9.0. It will work with swift or Objective-C. +LotameDMP requires Xcode 8 and at least iOS 8.0. It will work with Swift or Objective-C. ## Example @@ -15,13 +15,13 @@ To run the example project, clone the repo, and run `pod install` from the Examp ## Installation -> **Embedded frameworks require a minimum deployment target of iOS 9 or OS X Sierra (10.12).** +> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Sierra (10.12).** ### CocoaPods [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. -CocoaPods 0.38.2 is required to build LotameDMP. You can install it with the following command: +CocoaPods 1.2.1 is required to build LotameDMP. You can install it with the following command: ```bash $ gem install cocoapods @@ -33,7 +33,7 @@ To integrate LotameDMP into your Xcode project using CocoaPods, specify it in yo source 'https://github.com/CocoaPods/Specs.git' use_frameworks! -pod 'LotameDMP', '~> 3.1' +pod 'LotameDMP', '~> 4.0' ``` Then, run the following command: @@ -174,6 +174,18 @@ or for objective-c [DMP startNewSession]; ``` +## About this version + +Version 4.0.0 updates the code to Swift 3, since Xcode 8.3.2 dropped support for Swift 2.3. + +The previous version of Lotame `3.0.1` had a dependency on Alamofire `2.0`. This dependency has been updated to Alamofire `4.4`. If your project leveraged Alamofire, please see their migration guide for updating your network calls. + +Note to code maintainers: when changing the version, make sure to update these 3 locations: + +1. `LotameDMP.podspec` +1. Git tag +1. `sdkVersion` in `DMP.swift` + ## License LotameDMP is available under the MIT license. See the LICENSE file for more info. From c064e4c10e5829b545df413939efcae6b294bab7 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Wed, 26 Apr 2017 12:07:49 -0400 Subject: [PATCH 17/20] Resolves warnings in example project. --- Example/LotameDMP/Base.lproj/Main.storyboard | 43 +++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/Example/LotameDMP/Base.lproj/Main.storyboard b/Example/LotameDMP/Base.lproj/Main.storyboard index 51b5aaa..7f96d10 100644 --- a/Example/LotameDMP/Base.lproj/Main.storyboard +++ b/Example/LotameDMP/Base.lproj/Main.storyboard @@ -1,8 +1,11 @@ - + + + + - + @@ -19,48 +22,48 @@ - - - - -