From 9b88d65e71ad7f18a9d05ac00a9893b184d17a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Tue, 6 Oct 2015 17:29:11 +0200 Subject: [PATCH 01/96] Point badges to the develop branch --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f1917d9f1..6b9ea8d99 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## About -[![Build Status](https://img.shields.io/travis/0xced/XCDYouTubeKit/master.svg?style=flat)](https://travis-ci.org/0xced/XCDYouTubeKit) -[![Coverage Status](https://img.shields.io/coveralls/0xced/XCDYouTubeKit/master.svg?style=flat)](https://coveralls.io/r/0xced/XCDYouTubeKit?branch=master) +[![Build Status](https://img.shields.io/travis/0xced/XCDYouTubeKit/develop.svg?style=flat)](https://travis-ci.org/0xced/XCDYouTubeKit) +[![Coverage Status](https://img.shields.io/coveralls/0xced/XCDYouTubeKit/develop.svg?style=flat)](https://coveralls.io/r/0xced/XCDYouTubeKit?branch=develop) [![Platform](https://img.shields.io/cocoapods/p/XCDYouTubeKit.svg?style=flat)](http://cocoadocs.org/docsets/XCDYouTubeKit/) [![Pod Version](https://img.shields.io/cocoapods/v/XCDYouTubeKit.svg?style=flat)](https://cocoapods.org/pods/XCDYouTubeKit) [![Carthage Compatibility](https://img.shields.io/badge/carthage-✓-f2a77e.svg?style=flat)](https://github.com/Carthage/Carthage/) From d8483b0c7849d33582b77c3e6bb1bfbfa5118777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Tue, 6 Oct 2015 23:27:19 +0200 Subject: [PATCH 02/96] Xcode wants to reorder JavaScriptCore.framework --- XCDYouTubeKit.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XCDYouTubeKit.xcodeproj/project.pbxproj b/XCDYouTubeKit.xcodeproj/project.pbxproj index c0416363b..7f2c35819 100644 --- a/XCDYouTubeKit.xcodeproj/project.pbxproj +++ b/XCDYouTubeKit.xcodeproj/project.pbxproj @@ -23,10 +23,10 @@ C24C162E18E9A139005E92E9 /* XCDYouTubeVideoOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = C24C162D18E9A139005E92E9 /* XCDYouTubeVideoOperation.m */; }; C25308C518D7392500132734 /* XCDYouTubeClient.m in Sources */ = {isa = PBXBuildFile; fileRef = C25308C418D7392500132734 /* XCDYouTubeClient.m */; }; C25308C818D739EB00132734 /* XCDYouTubeVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = C25308C718D739EB00132734 /* XCDYouTubeVideo.m */; }; + C2597EA31B0CB9920030E9F2 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C224EB641919241B0038186E /* JavaScriptCore.framework */; }; C2597EA61B0CE6D80030E9F2 /* XCDYouTubeLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = C2597EA51B0CE6D70030E9F2 /* XCDYouTubeLogger.m */; }; C2597EA71B0CE6D80030E9F2 /* XCDYouTubeLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = C2597EA51B0CE6D70030E9F2 /* XCDYouTubeLogger.m */; }; C2597EA81B0CE6D80030E9F2 /* XCDYouTubeLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = C2597EA51B0CE6D70030E9F2 /* XCDYouTubeLogger.m */; }; - C2597EA31B0CB9920030E9F2 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C224EB641919241B0038186E /* JavaScriptCore.framework */; }; C26231A7191D750200D23900 /* XCDYouTubeClient.m in Sources */ = {isa = PBXBuildFile; fileRef = C25308C418D7392500132734 /* XCDYouTubeClient.m */; }; C26231A8191D750600D23900 /* XCDYouTubePlayerScript.m in Sources */ = {isa = PBXBuildFile; fileRef = C2FB52DD1918F88C00B2CBE6 /* XCDYouTubePlayerScript.m */; }; C26231A9191D750900D23900 /* XCDYouTubeVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = C25308C718D739EB00132734 /* XCDYouTubeVideo.m */; }; From adddb3f94e276b28d7ab75e612e221e594068f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Wed, 7 Oct 2015 17:02:03 +0200 Subject: [PATCH 03/96] Keep the full xcodebuild log in case of failure Also display it when running on Travis in case of failure --- .travis.yml | 2 ++ Scripts/run-tests.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 037c83050..84477bdb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,3 +28,5 @@ after_success: - if [ "$CONFIGURATION" == "Code Coverage" ]; then coveralls --include XCDYouTubeKit; fi +after_failure: + - cat xcodebuild.log diff --git a/Scripts/run-tests.sh b/Scripts/run-tests.sh index b0d71ade3..4ace9c725 100755 --- a/Scripts/run-tests.sh +++ b/Scripts/run-tests.sh @@ -8,7 +8,7 @@ set -o pipefail COMMAND="" gstdbuf --version > /dev/null && COMMAND+="gstdbuf -o 0 " -COMMAND+="xcodebuild clean test -project XCDYouTubeKit.xcodeproj -scheme '${SCHEME}' -configuration '${CONFIGURATION}' -destination '${DESTINATION}'" +COMMAND+="xcodebuild clean test -project XCDYouTubeKit.xcodeproj -scheme '${SCHEME}' -configuration '${CONFIGURATION}' -destination '${DESTINATION}' | tee xcodebuild.log" for BUILD_SETTING in OBJROOT RUN_CLANG_STATIC_ANALYZER; do VALUE=`eval echo \\$"${BUILD_SETTING}"` @@ -22,4 +22,4 @@ xcpretty --version > /dev/null && COMMAND+=" | xcpretty -c" xcpretty-travis-formatter > /dev/null && COMMAND+=" -f `xcpretty-travis-formatter`" set -x -eval "${COMMAND}" +eval "${COMMAND}" && rm xcodebuild.log From a1d7b0496def5b0db7997ae745ff11159e6861c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Wed, 7 Oct 2015 17:09:20 +0200 Subject: [PATCH 04/96] Simplify Travis `after_success` command --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 84477bdb9..55ce8aa23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,6 @@ install: script: - ./Scripts/run-tests.sh after_success: - - if [ "$CONFIGURATION" == "Code Coverage" ]; then - coveralls --include XCDYouTubeKit; - fi + - [ "$CONFIGURATION" == "Code Coverage" ] && coveralls --include XCDYouTubeKit after_failure: - cat xcodebuild.log From e828cdbda4cab9ed3802a8bd18aa099c7d51030d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Wed, 7 Oct 2015 22:03:53 +0200 Subject: [PATCH 05/96] Fix .travis.yml syntax --- .travis.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 55ce8aa23..0449c4b6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,16 +4,16 @@ env: global: LC_CTYPE="en_US.UTF-8" matrix: - - CONFIGURATION="Code Coverage" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s" OBJROOT="build" - - CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.1" - - CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.2" - - CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.3" - - CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.4" - - CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 4s" RUN_CLANG_STATIC_ANALYZER="YES" - - CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s" RUN_CLANG_STATIC_ANALYZER="YES" - - CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Framework" DESTINATION="platform=iOS Simulator,name=iPhone 4s" RUN_CLANG_STATIC_ANALYZER="YES" - - CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Framework" DESTINATION="platform=iOS Simulator,name=iPhone 5s" RUN_CLANG_STATIC_ANALYZER="YES" - - CONFIGURATION="Release" SCHEME="XCDYouTubeKit OS X" DESTINATION="platform=OS X" RUN_CLANG_STATIC_ANALYZER="YES" + - 'CONFIGURATION="Code Coverage" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s" OBJROOT="build"' + - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.1"' + - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.2"' + - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.3"' + - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.4"' + - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 4s" RUN_CLANG_STATIC_ANALYZER="YES"' + - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s" RUN_CLANG_STATIC_ANALYZER="YES"' + - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Framework" DESTINATION="platform=iOS Simulator,name=iPhone 4s" RUN_CLANG_STATIC_ANALYZER="YES"' + - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Framework" DESTINATION="platform=iOS Simulator,name=iPhone 5s" RUN_CLANG_STATIC_ANALYZER="YES"' + - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit OS X" DESTINATION="platform=OS X" RUN_CLANG_STATIC_ANALYZER="YES"' before_install: - xcrun simctl list install: @@ -25,6 +25,6 @@ install: script: - ./Scripts/run-tests.sh after_success: - - [ "$CONFIGURATION" == "Code Coverage" ] && coveralls --include XCDYouTubeKit + - '[ "$CONFIGURATION" == "Code Coverage" ] && coveralls --include XCDYouTubeKit' after_failure: - cat xcodebuild.log From 2bd669841b1569b7f2a2cc6a23cfcc58d151c3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Wed, 7 Oct 2015 22:44:37 +0200 Subject: [PATCH 06/96] Fix run-tests.sh Pipe `tee xcodebuild.log` at the end of the xcodebuild command --- Scripts/run-tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Scripts/run-tests.sh b/Scripts/run-tests.sh index 4ace9c725..d0c487d73 100755 --- a/Scripts/run-tests.sh +++ b/Scripts/run-tests.sh @@ -8,7 +8,7 @@ set -o pipefail COMMAND="" gstdbuf --version > /dev/null && COMMAND+="gstdbuf -o 0 " -COMMAND+="xcodebuild clean test -project XCDYouTubeKit.xcodeproj -scheme '${SCHEME}' -configuration '${CONFIGURATION}' -destination '${DESTINATION}' | tee xcodebuild.log" +COMMAND+="xcodebuild clean test -project XCDYouTubeKit.xcodeproj -scheme '${SCHEME}' -configuration '${CONFIGURATION}' -destination '${DESTINATION}'" for BUILD_SETTING in OBJROOT RUN_CLANG_STATIC_ANALYZER; do VALUE=`eval echo \\$"${BUILD_SETTING}"` @@ -18,6 +18,8 @@ for BUILD_SETTING in OBJROOT RUN_CLANG_STATIC_ANALYZER; do fi done +COMMAND+=" | tee xcodebuild.log" + xcpretty --version > /dev/null && COMMAND+=" | xcpretty -c" xcpretty-travis-formatter > /dev/null && COMMAND+=" -f `xcpretty-travis-formatter`" From 7903821d3faeed459f6b884629da3398a5003659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Wed, 7 Oct 2015 22:55:41 +0200 Subject: [PATCH 07/96] Improve xcpretty/xcpretty-travis-formatter command construction --- Scripts/run-tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Scripts/run-tests.sh b/Scripts/run-tests.sh index d0c487d73..0f0d2c246 100755 --- a/Scripts/run-tests.sh +++ b/Scripts/run-tests.sh @@ -20,8 +20,7 @@ done COMMAND+=" | tee xcodebuild.log" -xcpretty --version > /dev/null && COMMAND+=" | xcpretty -c" -xcpretty-travis-formatter > /dev/null && COMMAND+=" -f `xcpretty-travis-formatter`" +xcpretty --version > /dev/null 2>&1 && COMMAND+=" | xcpretty -c" && xcpretty-travis-formatter > /dev/null 2>&1 && COMMAND+=" -f `xcpretty-travis-formatter`" set -x eval "${COMMAND}" && rm xcodebuild.log From 61fc2ebe8d1b99e24056150d7ebd09baa45cda70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Wed, 7 Oct 2015 22:57:28 +0200 Subject: [PATCH 08/96] Don't output an error if gstdbuf isn't available --- Scripts/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/run-tests.sh b/Scripts/run-tests.sh index 0f0d2c246..4d1688010 100755 --- a/Scripts/run-tests.sh +++ b/Scripts/run-tests.sh @@ -7,7 +7,7 @@ set -o pipefail : ${DESTINATION:="platform=iOS Simulator,name=iPhone 5s"} COMMAND="" -gstdbuf --version > /dev/null && COMMAND+="gstdbuf -o 0 " +gstdbuf --version > /dev/null 2>&1 && COMMAND+="gstdbuf -o 0 " COMMAND+="xcodebuild clean test -project XCDYouTubeKit.xcodeproj -scheme '${SCHEME}' -configuration '${CONFIGURATION}' -destination '${DESTINATION}'" for BUILD_SETTING in OBJROOT RUN_CLANG_STATIC_ANALYZER; do From 18b392dcb37e09ca843b0bcab72a00be60f7deeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 9 Oct 2015 15:12:33 +0200 Subject: [PATCH 09/96] Run brew update in the before_install phase --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0449c4b6d..9b96776fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,8 @@ env: - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit OS X" DESTINATION="platform=OS X" RUN_CLANG_STATIC_ANALYZER="YES"' before_install: - xcrun simctl list -install: - brew update; brew update +install: - brew install coreutils - gem install xcpretty --no-rdoc --no-ri --no-document --quiet - gem install xcpretty-travis-formatter --no-rdoc --no-ri --no-document --quiet From a52568571ac0b29a2056711c3014d93ab3a1e373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 9 Oct 2015 15:17:09 +0200 Subject: [PATCH 10/96] Move the DESTINATION environment variable in first position The Travis build summary should be more readable --- .travis.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b96776fe..d02c07434 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,16 +4,16 @@ env: global: LC_CTYPE="en_US.UTF-8" matrix: - - 'CONFIGURATION="Code Coverage" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s" OBJROOT="build"' - - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.1"' - - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.2"' - - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.3"' - - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.4"' - - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 4s" RUN_CLANG_STATIC_ANALYZER="YES"' - - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" DESTINATION="platform=iOS Simulator,name=iPhone 5s" RUN_CLANG_STATIC_ANALYZER="YES"' - - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Framework" DESTINATION="platform=iOS Simulator,name=iPhone 4s" RUN_CLANG_STATIC_ANALYZER="YES"' - - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Framework" DESTINATION="platform=iOS Simulator,name=iPhone 5s" RUN_CLANG_STATIC_ANALYZER="YES"' - - 'CONFIGURATION="Release" SCHEME="XCDYouTubeKit OS X" DESTINATION="platform=OS X" RUN_CLANG_STATIC_ANALYZER="YES"' + - 'DESTINATION="platform=iOS Simulator,name=iPhone 5s" CONFIGURATION="Code Coverage" SCHEME="XCDYouTubeKit iOS Static Library" OBJROOT="build"' + - 'DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.1" CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library"' + - 'DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.2" CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library"' + - 'DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.3" CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library"' + - 'DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.4" CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library"' + - 'DESTINATION="platform=iOS Simulator,name=iPhone 4s" CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" RUN_CLANG_STATIC_ANALYZER="YES"' + - 'DESTINATION="platform=iOS Simulator,name=iPhone 5s" CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library" RUN_CLANG_STATIC_ANALYZER="YES"' + - 'DESTINATION="platform=iOS Simulator,name=iPhone 4s" CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Framework" RUN_CLANG_STATIC_ANALYZER="YES"' + - 'DESTINATION="platform=iOS Simulator,name=iPhone 5s" CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Framework" RUN_CLANG_STATIC_ANALYZER="YES"' + - 'DESTINATION="platform=OS X" CONFIGURATION="Release" SCHEME="XCDYouTubeKit OS X" RUN_CLANG_STATIC_ANALYZER="YES"' before_install: - xcrun simctl list - brew update; brew update From c2398681cdd2fd1c3d7399dd25edbc2ebc02b0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 9 Oct 2015 15:17:46 +0200 Subject: [PATCH 11/96] Remove the global LC_CTYPE environment variable --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d02c07434..4c9b109da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ osx_image: xcode6.4 language: objective-c env: - global: - LC_CTYPE="en_US.UTF-8" matrix: - 'DESTINATION="platform=iOS Simulator,name=iPhone 5s" CONFIGURATION="Code Coverage" SCHEME="XCDYouTubeKit iOS Static Library" OBJROOT="build"' - 'DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=8.1" CONFIGURATION="Release" SCHEME="XCDYouTubeKit iOS Static Library"' From 36d33b032de16644cc0ef15f3feb4e9a72947595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 9 Oct 2015 15:20:32 +0200 Subject: [PATCH 12/96] Do not explicitly install xcpretty The `xcpretty-travis-formatter` gem depends on `xcpretty` so there is no need to run the gem install command twice. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4c9b109da..41e6b2960 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ before_install: - brew update; brew update install: - brew install coreutils - - gem install xcpretty --no-rdoc --no-ri --no-document --quiet - gem install xcpretty-travis-formatter --no-rdoc --no-ri --no-document --quiet - sudo easy_install cpp-coveralls script: From 636ba888bb050f535b9b1c37b3254158698f033b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 9 Oct 2015 15:26:37 +0200 Subject: [PATCH 13/96] Add line breaks for better formatting in MacDown --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6b9ea8d99..87f412c09 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,13 @@ XCDYouTubeKit is against the YouTube [Terms of Service](https://www.youtube.com/ XCDYouTubeKit is available through CocoaPods and Carthage. CocoaPods: + ```ruby pod "XCDYouTubeKit", "~> 2.3.2" ``` Carthage: + ```objc github "0xced/XCDYouTubeKit" ~> 2.3.2 ``` From a9470c33b82d595eecfd6a37a735a8f117bfc7cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 9 Oct 2015 15:30:46 +0200 Subject: [PATCH 14/96] Move iOS only sample code before iOS and OS X --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 87f412c09..f47356ebb 100644 --- a/README.md +++ b/README.md @@ -53,22 +53,6 @@ These steps will ensure that `#import ` will work XCDYouTubeKit is [fully documented](http://cocoadocs.org/docsets/XCDYouTubeKit/). -### iOS and OS X - -```objc -NSString *videoIdentifier = @"EdeVaT-zZt4"; // A 11 characters YouTube video identifier -[[XCDYouTubeClient defaultClient] getVideoWithIdentifier:videoIdentifier completionHandler:^(XCDYouTubeVideo *video, NSError *error) { - if (video) - { - // Do something with the `video` object - } - else - { - // Handle error - } -}]; -``` - ### iOS only On iOS, you can use the class `XCDYouTubeVideoPlayerViewController` the same way you use a `MPMoviePlayerViewController`, except you initialize it with a YouTube video identifier instead of a content URL. @@ -88,6 +72,22 @@ XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVid [videoPlayerViewController.moviePlayer play]; ``` +### iOS and OS X + +```objc +NSString *videoIdentifier = @"EdeVaT-zZt4"; // A 11 characters YouTube video identifier +[[XCDYouTubeClient defaultClient] getVideoWithIdentifier:videoIdentifier completionHandler:^(XCDYouTubeVideo *video, NSError *error) { + if (video) + { + // Do something with the `video` object + } + else + { + // Handle error + } +}]; +``` + See the demo project for more sample code. ## Logging From 6e799b7b8028ba0df464d570354efab3ff85fefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 9 Oct 2015 15:37:51 +0200 Subject: [PATCH 15/96] Demonstrate how to properly handle errors in iOS sample code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the second time I see someone initializing a XCDYouTubeVideoPlayerViewController inside XCDYouTubeClient’s completion handler. See https://github.com/0xced/XCDYouTubeKit/issues/94#issuecomment-146731969 --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f47356ebb..66de51246 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,23 @@ On iOS, you can use the class `XCDYouTubeVideoPlayerViewController` the same way #### Present the video in full-screen ```objc -XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:@"9bZkp7q19f0"]; -[self presentMoviePlayerViewControllerAnimated:videoPlayerViewController]; +- (void) playVideo +{ + XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:@"9bZkp7q19f0"]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerPlaybackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:videoPlayerViewController.moviePlayer]; + [self presentMoviePlayerViewControllerAnimated:videoPlayerViewController]; +} + +- (void) moviePlayerPlaybackDidFinish:(NSNotification *)notification +{ + [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:notification.object]; + MPMovieFinishReason finishReason = [notification.userInfo[MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] integerValue]; + if (finishReason == MPMovieFinishReasonPlaybackError) + { + // Handle error + } +} + ``` #### Present the video in a non full-screen view From 0836525816b73a38140e5d22d559b8aa46b513e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 9 Oct 2015 15:46:45 +0200 Subject: [PATCH 16/96] Demonstrate how to get the error from the player playback notification --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 66de51246..e87bf547e 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ On iOS, you can use the class `XCDYouTubeVideoPlayerViewController` the same way MPMovieFinishReason finishReason = [notification.userInfo[MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] integerValue]; if (finishReason == MPMovieFinishReasonPlaybackError) { + NSError *error = notification.userInfo[XCDMoviePlayerPlaybackDidFinishErrorUserInfoKey]; // Handle error } } From d19a388de86c04179eaba985d479027f23321994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 9 Oct 2015 23:03:46 +0200 Subject: [PATCH 17/96] Make sure we get the whole xcodebuild log in case of failure --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 41e6b2960..fcad206eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,4 +24,4 @@ script: after_success: - '[ "$CONFIGURATION" == "Code Coverage" ] && coveralls --include XCDYouTubeKit' after_failure: - - cat xcodebuild.log + - cat xcodebuild.log && sleep 5 From 5e0984c55d277a2ef624e144acfb7670b6c0ecbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Mon, 5 Oct 2015 14:47:33 +0200 Subject: [PATCH 18/96] Update VCRURLConnection to latest master Commit 63249f34f5a7d0aa7c95203b6cb45098fc86388b --- .../Example-iOS.xcodeproj/project.pbxproj | 337 ++++++++ .../Example-iOS/Example-iOS-Info.plist | 0 .../Example-iOS/Example-iOS-Prefix.pch | 0 .../Example-iOS}/Example-iOS/VCRAppDelegate.h | 0 .../Example-iOS}/Example-iOS/VCRAppDelegate.m | 2 +- .../Example-iOS/VCRCassetteViewController.h | 2 +- .../Example-iOS/VCRCassetteViewController.m | 3 +- .../Example-iOS/VCRCassetteViewController.xib | 0 .../Example-iOS/VCRRecordingViewController.h | 2 +- .../Example-iOS/VCRRecordingViewController.m | 0 .../VCRRecordingViewController.xib | 0 .../Example-iOS}/Example-iOS/VCRURLLoader.h | 0 .../Example-iOS}/Example-iOS/VCRURLLoader.m | 0 .../Example-iOS/VCRViewController.h | 0 .../Example-iOS/VCRViewController.m | 0 .../Example-iOS/VCRViewController.xib | 0 .../Example-iOS}/Example-iOS/main.m | 0 .../Resources}/Default-568h@2x.png | Bin .../Example-iOS/Resources}/Default.png | Bin .../Example-iOS/Resources}/Default@2x.png | Bin .../Example-iOS/Resources}/cassette.json | 0 .../Example-iOS/en.lproj/InfoPlist.strings | 0 XCDYouTubeKit Tests/VCRURLConnection/Makefile | 26 +- .../Tests-iOS/Tests-iOS-Info.plist | 22 - .../Tests/VCR_NSURLConnectionTests.m | 155 ---- .../project.pbxproj | 808 ++++++------------ .../xcshareddata/xcschemes/Tests-OSX.xcscheme | 53 -- .../xcshareddata/xcschemes/Tests-iOS.xcscheme | 53 -- ...iOS.xcscheme => VCRURLConnection.xcscheme} | 58 +- .../VCR+NSURLSessionConfiguration.m | 4 +- .../VCRURLConnection/VCRCassette.h | 5 +- .../VCRURLConnection/VCRCassette.m | 4 + .../VCROrderedMutableDictionary.m | 15 +- .../VCRURLConnection/VCRRecording.m | 27 +- .../Resources/Info.plist} | 6 +- .../Resources}/cassette-1.json | 0 .../Resources}/test.png | Bin .../VCRCassetteManagerTests.h | 0 .../VCRCassetteManagerTests.m | 0 .../VCRCassetteTests.h | 0 .../VCRCassetteTests.m | 0 .../VCRRecordingTests.h | 0 .../VCRRecordingTests.m | 0 .../VCRRecordingURLProtocolTests.m | 0 .../VCRReplayingURLProtocolTests.m | 0 .../VCRRequestKeyTests.h | 0 .../VCRRequestKeyTests.m | 0 .../VCRTests.m | 0 .../VCR_NSURLConnectionTests.h | 0 .../VCR_NSURLConnectionTests.m | 158 ++++ .../VCR_NSURLSessionTests.m | 69 +- .../XCTestCase+SRTAdditions.h | 0 .../XCTestCase+SRTAdditions.m | 0 .../XCTestCase+VCR.h | 0 .../XCTestCase+VCR.m | 0 55 files changed, 859 insertions(+), 950 deletions(-) create mode 100644 XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS.xcodeproj/project.pbxproj rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/Example-iOS-Info.plist (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/Example-iOS-Prefix.pch (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRAppDelegate.h (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRAppDelegate.m (98%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRCassetteViewController.h (96%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRCassetteViewController.m (98%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRCassetteViewController.xib (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRRecordingViewController.h (96%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRRecordingViewController.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRRecordingViewController.xib (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRURLLoader.h (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRURLLoader.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRViewController.h (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRViewController.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/VCRViewController.xib (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples/Example-iOS}/Example-iOS/main.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Example-iOS => Examples/Example-iOS/Resources}/Default-568h@2x.png (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Example-iOS => Examples/Example-iOS/Resources}/Default.png (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Example-iOS => Examples/Example-iOS/Resources}/Default@2x.png (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Example-iOS => Examples/Example-iOS/Resources}/cassette.json (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{ => Examples}/Example-iOS/en.lproj/InfoPlist.strings (100%) delete mode 100644 XCDYouTubeKit Tests/VCRURLConnection/Tests-iOS/Tests-iOS-Info.plist delete mode 100644 XCDYouTubeKit Tests/VCRURLConnection/Tests/VCR_NSURLConnectionTests.m delete mode 100644 XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Tests-OSX.xcscheme delete mode 100644 XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Tests-iOS.xcscheme rename XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/{Example-iOS.xcscheme => VCRURLConnection.xcscheme} (56%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests-OSX/Tests-OSX-Info.plist => VCRURLConnectionTests/Resources/Info.plist} (78%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests/Resources}/cassette-1.json (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests/Resources}/test.png (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRCassetteManagerTests.h (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRCassetteManagerTests.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRCassetteTests.h (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRCassetteTests.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRRecordingTests.h (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRRecordingTests.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRRecordingURLProtocolTests.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRReplayingURLProtocolTests.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRRequestKeyTests.h (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRRequestKeyTests.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCRTests.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCR_NSURLConnectionTests.h (100%) create mode 100644 XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCR_NSURLConnectionTests.m rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/VCR_NSURLSessionTests.m (57%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/XCTestCase+SRTAdditions.h (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/XCTestCase+SRTAdditions.m (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/XCTestCase+VCR.h (100%) rename XCDYouTubeKit Tests/VCRURLConnection/{Tests => VCRURLConnectionTests}/XCTestCase+VCR.m (100%) diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS.xcodeproj/project.pbxproj b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS.xcodeproj/project.pbxproj new file mode 100644 index 000000000..4348e31b3 --- /dev/null +++ b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS.xcodeproj/project.pbxproj @@ -0,0 +1,337 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + B30067DA1ADB9242002CE307 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B30067D91ADB9242002CE307 /* main.m */; }; + B300680C1ADB92B8002CE307 /* VCRAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B30068001ADB92B8002CE307 /* VCRAppDelegate.m */; }; + B300680D1ADB92B8002CE307 /* VCRCassetteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B30068021ADB92B8002CE307 /* VCRCassetteViewController.m */; }; + B300680E1ADB92B8002CE307 /* VCRCassetteViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B30068031ADB92B8002CE307 /* VCRCassetteViewController.xib */; }; + B300680F1ADB92B8002CE307 /* VCRRecordingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B30068051ADB92B8002CE307 /* VCRRecordingViewController.m */; }; + B30068101ADB92B8002CE307 /* VCRRecordingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B30068061ADB92B8002CE307 /* VCRRecordingViewController.xib */; }; + B30068111ADB92B8002CE307 /* VCRURLLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = B30068081ADB92B8002CE307 /* VCRURLLoader.m */; }; + B30068121ADB92B8002CE307 /* VCRViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B300680A1ADB92B8002CE307 /* VCRViewController.m */; }; + B30068131ADB92B8002CE307 /* VCRViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B300680B1ADB92B8002CE307 /* VCRViewController.xib */; }; + B3BE0F491ADB9368005D0089 /* libVCRURLConnection.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B3BE0F481ADB9368005D0089 /* libVCRURLConnection.a */; }; + B3BE0F521ADBA862005D0089 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3BE0F511ADBA862005D0089 /* MobileCoreServices.framework */; }; + B3BE0F561ADBA8FE005D0089 /* cassette.json in Resources */ = {isa = PBXBuildFile; fileRef = B3BE0F551ADBA8FE005D0089 /* cassette.json */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + B30067D41ADB9242002CE307 /* Example-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + B30067D91ADB9242002CE307 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + B30067FF1ADB92B8002CE307 /* VCRAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRAppDelegate.h; sourceTree = ""; }; + B30068001ADB92B8002CE307 /* VCRAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRAppDelegate.m; sourceTree = ""; }; + B30068011ADB92B8002CE307 /* VCRCassetteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassetteViewController.h; sourceTree = ""; }; + B30068021ADB92B8002CE307 /* VCRCassetteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRCassetteViewController.m; sourceTree = ""; }; + B30068031ADB92B8002CE307 /* VCRCassetteViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VCRCassetteViewController.xib; sourceTree = ""; }; + B30068041ADB92B8002CE307 /* VCRRecordingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRecordingViewController.h; sourceTree = ""; }; + B30068051ADB92B8002CE307 /* VCRRecordingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRecordingViewController.m; sourceTree = ""; }; + B30068061ADB92B8002CE307 /* VCRRecordingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VCRRecordingViewController.xib; sourceTree = ""; }; + B30068071ADB92B8002CE307 /* VCRURLLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRURLLoader.h; sourceTree = ""; }; + B30068081ADB92B8002CE307 /* VCRURLLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRURLLoader.m; sourceTree = ""; }; + B30068091ADB92B8002CE307 /* VCRViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRViewController.h; sourceTree = ""; }; + B300680A1ADB92B8002CE307 /* VCRViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRViewController.m; sourceTree = ""; }; + B300680B1ADB92B8002CE307 /* VCRViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VCRViewController.xib; sourceTree = ""; }; + B3BE0F481ADB9368005D0089 /* libVCRURLConnection.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libVCRURLConnection.a; path = "../../build/Debug-iphoneos/libVCRURLConnection.a"; sourceTree = ""; }; + B3BE0F511ADBA862005D0089 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + B3BE0F551ADBA8FE005D0089 /* cassette.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = cassette.json; path = Resources/cassette.json; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B30067D11ADB9242002CE307 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B3BE0F521ADBA862005D0089 /* MobileCoreServices.framework in Frameworks */, + B3BE0F491ADB9368005D0089 /* libVCRURLConnection.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B30067CB1ADB9242002CE307 = { + isa = PBXGroup; + children = ( + B30067D61ADB9242002CE307 /* Example-iOS */, + B3BE0F541ADBA8ED005D0089 /* Resources */, + B3BE0F531ADBA8B4005D0089 /* Frameworks */, + B30067D51ADB9242002CE307 /* Products */, + ); + sourceTree = ""; + }; + B30067D51ADB9242002CE307 /* Products */ = { + isa = PBXGroup; + children = ( + B30067D41ADB9242002CE307 /* Example-iOS.app */, + ); + name = Products; + sourceTree = ""; + }; + B30067D61ADB9242002CE307 /* Example-iOS */ = { + isa = PBXGroup; + children = ( + B30067FF1ADB92B8002CE307 /* VCRAppDelegate.h */, + B30068001ADB92B8002CE307 /* VCRAppDelegate.m */, + B30068011ADB92B8002CE307 /* VCRCassetteViewController.h */, + B30068021ADB92B8002CE307 /* VCRCassetteViewController.m */, + B30068031ADB92B8002CE307 /* VCRCassetteViewController.xib */, + B30068041ADB92B8002CE307 /* VCRRecordingViewController.h */, + B30068051ADB92B8002CE307 /* VCRRecordingViewController.m */, + B30068061ADB92B8002CE307 /* VCRRecordingViewController.xib */, + B30068071ADB92B8002CE307 /* VCRURLLoader.h */, + B30068081ADB92B8002CE307 /* VCRURLLoader.m */, + B30068091ADB92B8002CE307 /* VCRViewController.h */, + B300680A1ADB92B8002CE307 /* VCRViewController.m */, + B300680B1ADB92B8002CE307 /* VCRViewController.xib */, + B30067D71ADB9242002CE307 /* Supporting Files */, + ); + path = "Example-iOS"; + sourceTree = ""; + }; + B30067D71ADB9242002CE307 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + B30067D91ADB9242002CE307 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + B3BE0F531ADBA8B4005D0089 /* Frameworks */ = { + isa = PBXGroup; + children = ( + B3BE0F481ADB9368005D0089 /* libVCRURLConnection.a */, + B3BE0F511ADBA862005D0089 /* MobileCoreServices.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + B3BE0F541ADBA8ED005D0089 /* Resources */ = { + isa = PBXGroup; + children = ( + B3BE0F551ADBA8FE005D0089 /* cassette.json */, + ); + name = Resources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B30067D31ADB9242002CE307 /* Example-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = B30067F71ADB9242002CE307 /* Build configuration list for PBXNativeTarget "Example-iOS" */; + buildPhases = ( + B30067D01ADB9242002CE307 /* Sources */, + B30067D11ADB9242002CE307 /* Frameworks */, + B30067D21ADB9242002CE307 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Example-iOS"; + productName = "Example-iOS"; + productReference = B30067D41ADB9242002CE307 /* Example-iOS.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B30067CC1ADB9242002CE307 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0610; + ORGANIZATIONNAME = dstnbrkr; + TargetAttributes = { + B30067D31ADB9242002CE307 = { + CreatedOnToolsVersion = 6.1.1; + }; + }; + }; + buildConfigurationList = B30067CF1ADB9242002CE307 /* Build configuration list for PBXProject "Example-iOS" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B30067CB1ADB9242002CE307; + productRefGroup = B30067D51ADB9242002CE307 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B30067D31ADB9242002CE307 /* Example-iOS */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B30067D21ADB9242002CE307 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B30068131ADB92B8002CE307 /* VCRViewController.xib in Resources */, + B3BE0F561ADBA8FE005D0089 /* cassette.json in Resources */, + B300680E1ADB92B8002CE307 /* VCRCassetteViewController.xib in Resources */, + B30068101ADB92B8002CE307 /* VCRRecordingViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B30067D01ADB9242002CE307 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B300680C1ADB92B8002CE307 /* VCRAppDelegate.m in Sources */, + B30067DA1ADB9242002CE307 /* main.m in Sources */, + B30068111ADB92B8002CE307 /* VCRURLLoader.m in Sources */, + B300680F1ADB92B8002CE307 /* VCRRecordingViewController.m in Sources */, + B30068121ADB92B8002CE307 /* VCRViewController.m in Sources */, + B300680D1ADB92B8002CE307 /* VCRCassetteViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + B30067F51ADB9242002CE307 /* Debug */ = { + isa = XCBuildConfiguration; + 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + 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_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + B30067F61ADB9242002CE307 /* Release */ = { + isa = XCBuildConfiguration; + 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_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + B30067F81ADB9242002CE307 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = "Example-iOS/Example-iOS-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "/Users/dstnbrkr/src/VCRURLConnection/build/Debug-iphoneos", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)"; + }; + name = Debug; + }; + B30067F91ADB9242002CE307 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = "Example-iOS/Example-iOS-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "/Users/dstnbrkr/src/VCRURLConnection/build/Debug-iphoneos", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B30067CF1ADB9242002CE307 /* Build configuration list for PBXProject "Example-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B30067F51ADB9242002CE307 /* Debug */, + B30067F61ADB9242002CE307 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B30067F71ADB9242002CE307 /* Build configuration list for PBXNativeTarget "Example-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B30067F81ADB9242002CE307 /* Debug */, + B30067F91ADB9242002CE307 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B30067CC1ADB9242002CE307 /* Project object */; +} diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Example-iOS-Info.plist b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/Example-iOS-Info.plist similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Example-iOS-Info.plist rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/Example-iOS-Info.plist diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Example-iOS-Prefix.pch b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/Example-iOS-Prefix.pch similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Example-iOS-Prefix.pch rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/Example-iOS-Prefix.pch diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRAppDelegate.h b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRAppDelegate.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRAppDelegate.h rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRAppDelegate.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRAppDelegate.m b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRAppDelegate.m similarity index 98% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRAppDelegate.m rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRAppDelegate.m index 1ced53df9..ec4b03241 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRAppDelegate.m +++ b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRAppDelegate.m @@ -24,7 +24,7 @@ #import "VCRAppDelegate.h" #import "VCRViewController.h" -#import "VCR.h" +#import @implementation VCRAppDelegate diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRCassetteViewController.h b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRCassetteViewController.h similarity index 96% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRCassetteViewController.h rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRCassetteViewController.h index 301866d7a..bf36e2c16 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRCassetteViewController.h +++ b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRCassetteViewController.h @@ -21,7 +21,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "VCRCassette.h" +#import #import @interface VCRCassetteViewController : UIViewController diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRCassetteViewController.m b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRCassetteViewController.m similarity index 98% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRCassetteViewController.m rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRCassetteViewController.m index db42cf183..932488af1 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRCassetteViewController.m +++ b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRCassetteViewController.m @@ -23,7 +23,8 @@ #import "VCRCassetteViewController.h" #import "VCRRecordingViewController.h" -#import "VCR.h" +#import +#import @interface VCRCassetteViewController () @property (nonatomic, strong) IBOutlet UITableView *tableView; diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRCassetteViewController.xib b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRCassetteViewController.xib similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRCassetteViewController.xib rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRCassetteViewController.xib diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRRecordingViewController.h b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRRecordingViewController.h similarity index 96% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRRecordingViewController.h rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRRecordingViewController.h index dcaa3626c..91a1e44d7 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRRecordingViewController.h +++ b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRRecordingViewController.h @@ -21,7 +21,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "VCRRecording.h" +#import #import @interface VCRRecordingViewController : UIViewController diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRRecordingViewController.m b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRRecordingViewController.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRRecordingViewController.m rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRRecordingViewController.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRRecordingViewController.xib b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRRecordingViewController.xib similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRRecordingViewController.xib rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRRecordingViewController.xib diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRURLLoader.h b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRURLLoader.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRURLLoader.h rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRURLLoader.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRURLLoader.m b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRURLLoader.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRURLLoader.m rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRURLLoader.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRViewController.h b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRViewController.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRViewController.h rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRViewController.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRViewController.m b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRViewController.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRViewController.m rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRViewController.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRViewController.xib b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRViewController.xib similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/VCRViewController.xib rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/VCRViewController.xib diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/main.m b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/main.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/main.m rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Example-iOS/main.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Default-568h@2x.png b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Resources/Default-568h@2x.png similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Default-568h@2x.png rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Resources/Default-568h@2x.png diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Default.png b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Resources/Default.png similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Default.png rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Resources/Default.png diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Default@2x.png b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Resources/Default@2x.png similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/Default@2x.png rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Resources/Default@2x.png diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/cassette.json b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Resources/cassette.json similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/cassette.json rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/Resources/cassette.json diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/en.lproj/InfoPlist.strings b/XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/en.lproj/InfoPlist.strings similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Example-iOS/en.lproj/InfoPlist.strings rename to XCDYouTubeKit Tests/VCRURLConnection/Examples/Example-iOS/en.lproj/InfoPlist.strings diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Makefile b/XCDYouTubeKit Tests/VCRURLConnection/Makefile index 61e344a06..545c86f5a 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/Makefile +++ b/XCDYouTubeKit Tests/VCRURLConnection/Makefile @@ -1,25 +1,9 @@ -CONFIGURATION ?= "Debug" BUILD_DIR = $(shell pwd)/build -clean: - $(XCMD) clean - rm -rf $(BUILD_DIR) - -_test: - xctool -sdk $(SDK) \ - -project VCRURLConnection.xcodeproj \ - -scheme $(SCHEME) \ - -configuration $(CONFIGURATION) \ - CONFIGURATION_BUILD_DIR=$(BUILD_DIR) \ - test - -test_ios: - $(MAKE) SDK=iphonesimulator SCHEME=Tests-iOS _test - -test_osx: - $(MAKE) SDK=macosx SCHEME=Tests-OSX _test - test: - $(MAKE) test_ios test_osx - + xcodebuild -sdk iphonesimulator \ + -project VCRURLConnection.xcodeproj \ + -scheme VCRURLConnection \ + CONFIGURATION_BUILD_DIR=$(BUILD_DIR) \ + build test diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests-iOS/Tests-iOS-Info.plist b/XCDYouTubeKit Tests/VCRURLConnection/Tests-iOS/Tests-iOS-Info.plist deleted file mode 100644 index 2aab29d07..000000000 --- a/XCDYouTubeKit Tests/VCRURLConnection/Tests-iOS/Tests-iOS-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - net.dstnbrkr.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCR_NSURLConnectionTests.m b/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCR_NSURLConnectionTests.m deleted file mode 100644 index b1409f059..000000000 --- a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCR_NSURLConnectionTests.m +++ /dev/null @@ -1,155 +0,0 @@ -// -// VCRURLConnectionTests.m -// -// Copyright (c) 2012 Dustin Barker -// -// 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 "VCR_NSURLConnectionTests.h" -#import "XCTestCase+VCR.h" -#import "XCTestCase+SRTAdditions.h" -#import "VCRCassetteManager.h" -#import "VCRCassette.h" -#import "VCR.h" - -@interface VCRURLConnectionTestDelegate : NSObject -@property (nonatomic, strong) NSHTTPURLResponse *response; -@property (nonatomic, strong) NSData *data; -@property (assign, getter = isDone) BOOL done; -@property (nonatomic, strong) NSError *error; -@end - - -@implementation VCR_NSURLConnectionTests - -- (void)setUp { - [super setUp]; - [VCR start]; - [[VCRCassetteManager defaultManager] setCurrentCassette:nil]; -} - -- (void)tearDown { - [VCR stop]; - [super tearDown]; -} - -- (void)testResponseIsRecorded { - NSURL *url = [NSURL URLWithString:@"http://www.iana.org/domains/reserved"]; - NSURLRequest *request = [NSURLRequest requestWithURL:url]; - VCRURLConnectionTestDelegate *delegate = [[VCRURLConnectionTestDelegate alloc] init]; - [self recordRequest:request requestBlock:^{ - [NSURLConnection connectionWithRequest:request delegate:delegate]; - } predicateBlock:^BOOL{ - return [delegate isDone]; - } completion:^(VCRRecording *recording) { - [self testRecording:recording forRequest:request]; - }]; -} - -- (void)testResponseIsDelegated { - NSURL *url = [NSURL URLWithString:@"http://www.iana.org/domains/reserved"]; - NSURLRequest *request = [NSURLRequest requestWithURL:url]; - VCRURLConnectionTestDelegate *delegate = [[VCRURLConnectionTestDelegate alloc] init]; - [self recordRequest:request requestBlock:^{ - [NSURLConnection connectionWithRequest:request delegate:delegate]; - } predicateBlock:^BOOL{ - return [delegate isDone]; - } completion:^(VCRRecording *recording) { - [self testDelegate:(id)delegate forRecording:recording]; - }]; -} - -- (void)testResponseIsReplayed { - id json = @{ @"method": @"GET", @"uri": @"http://foo", @"body": @"Foo Bar Baz" }; - VCRURLConnectionTestDelegate *delegate = [[VCRURLConnectionTestDelegate alloc] init]; - [self replayJSON:json requestBlock:^(NSURLRequest *request) { - [NSURLConnection connectionWithRequest:request delegate:delegate]; - } predicateBlock:^BOOL{ - return [delegate isDone]; - } completion:^(VCRRecording *recording) { - [self testDelegate:(id)delegate forRecording:recording]; - }]; -} - -- (void)testErrorIsRecorded { - NSURL *url = [NSURL URLWithString:@"http://z/foo"]; // non-existant host - NSURLRequest *request = [NSURLRequest requestWithURL:url]; - VCRURLConnectionTestDelegate *delegate = [[VCRURLConnectionTestDelegate alloc] init]; - [self recordRequest:request requestBlock:^{ - [NSURLConnection connectionWithRequest:request delegate:delegate]; - } predicateBlock:^BOOL{ - return [delegate isDone]; - } completion:^(VCRRecording *recording) { - XCTAssertNotNil(recording); - XCTAssertNotNil(recording.error, @""); - }]; -} - -- (void)testErrorIsDelegated { - NSURL *url = [NSURL URLWithString:@"http://z/foo"]; // non-existant host - NSURLRequest *request = [NSURLRequest requestWithURL:url]; - VCRURLConnectionTestDelegate *delegate = [[VCRURLConnectionTestDelegate alloc] init]; - [self recordRequest:request requestBlock:^{ - [NSURLConnection connectionWithRequest:request delegate:delegate]; - } predicateBlock:^BOOL{ - return [delegate isDone]; - } completion:^(VCRRecording *recording) { - [self testDelegate:(id)delegate forRecording:recording]; - XCTAssertNotNil(delegate.error, @""); - }]; -} - -- (void)testErrorIsReplayed { - id json = @{ @"method": @"get", @"uri": @"http://foo", @"status": @404 }; - VCRURLConnectionTestDelegate *delegate = [[VCRURLConnectionTestDelegate alloc] init]; - [self replayJSON:json requestBlock:^(NSURLRequest *request) { - [NSURLConnection connectionWithRequest:request delegate:delegate]; - } predicateBlock:^BOOL{ - return [delegate isDone]; - } completion:^(VCRRecording *recording) { - [self testDelegate:(id)delegate forRecording:recording]; - }]; -} - -@end - - -@implementation VCRURLConnectionTestDelegate - -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSHTTPURLResponse *)response { - self.response = response; -} - -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { - NSMutableData *currentData = [NSMutableData dataWithData:self.data]; - [currentData appendData:data]; - self.data = currentData; -} - -- (void)connectionDidFinishLoading:(NSURLConnection *)connection { - _done = YES; -} - -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { - _done = YES; - _error = error; -} - - -@end diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/project.pbxproj b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/project.pbxproj index ef52aa0d0..39a74ccfa 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/project.pbxproj +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/project.pbxproj @@ -7,352 +7,219 @@ objects = { /* Begin PBXBuildFile section */ - B317B687186E13B400A7C0AE /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B317B686186E13B400A7C0AE /* XCTest.framework */; }; - B317B689186E13B400A7C0AE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B317B688186E13B400A7C0AE /* Foundation.framework */; }; - B317B68A186E13B400A7C0AE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3475B8B167EA37B0044511D /* UIKit.framework */; }; - B317B699186E13CF00A7C0AE /* VCRCassetteManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82881167E9B2B00CCEC3C /* VCRCassetteManagerTests.m */; }; - B317B69A186E13D200A7C0AE /* VCRCassetteTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82883167E9B2B00CCEC3C /* VCRCassetteTests.m */; }; - B317B69B186E13D500A7C0AE /* VCRRecordingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475BB8167F12620044511D /* VCRRecordingTests.m */; }; - B317B69C186E13D800A7C0AE /* VCRRequestKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82885167E9B2B00CCEC3C /* VCRRequestKeyTests.m */; }; - B317B69E186E13DD00A7C0AE /* VCR_NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8288B167E9B2B00CCEC3C /* VCR_NSURLConnectionTests.m */; }; - B317B69F186E13E200A7C0AE /* cassette-1.json in Resources */ = {isa = PBXBuildFile; fileRef = B3B8287D167E9B2B00CCEC3C /* cassette-1.json */; }; - B317B6A0186E13E500A7C0AE /* test.png in Resources */ = {isa = PBXBuildFile; fileRef = B3475B8D167EBF8F0044511D /* test.png */; }; - B317B6A1186E13F200A7C0AE /* XCTestCase+SRTAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = B3BB2512167F23EC00C5E3C6 /* XCTestCase+SRTAdditions.m */; }; - B317B6A2186E180900A7C0AE /* VCR.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82897167E9B6800CCEC3C /* VCR.m */; }; - B317B6A3186E180900A7C0AE /* VCRCassette.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8289A167E9B6800CCEC3C /* VCRCassette.m */; }; - B317B6A4186E180900A7C0AE /* VCRCassetteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8289C167E9B6800CCEC3C /* VCRCassetteManager.m */; }; - B317B6A6186E180900A7C0AE /* VCROrderedMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = C393569A17B5DA460025DC53 /* VCROrderedMutableDictionary.m */; }; - B317B6A7186E180900A7C0AE /* VCRRecording.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475BAE167EFFA80044511D /* VCRRecording.m */; }; - B317B6A8186E180900A7C0AE /* VCRRequestKey.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B828A0167E9B6800CCEC3C /* VCRRequestKey.m */; }; - B317B6A9186E180900A7C0AE /* VCRError.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FCE5061863F2D3009C0E12 /* VCRError.m */; }; - B317B6B0186E1A0100A7C0AE /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B317B686186E13B400A7C0AE /* XCTest.framework */; }; - B317B6BD186E1A5100A7C0AE /* VCR.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82897167E9B6800CCEC3C /* VCR.m */; }; - B317B6BE186E1A5100A7C0AE /* VCRCassette.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8289A167E9B6800CCEC3C /* VCRCassette.m */; }; - B317B6BF186E1A5100A7C0AE /* VCRCassetteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8289C167E9B6800CCEC3C /* VCRCassetteManager.m */; }; - B317B6C1186E1A5100A7C0AE /* VCROrderedMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = C393569A17B5DA460025DC53 /* VCROrderedMutableDictionary.m */; }; - B317B6C2186E1A5100A7C0AE /* VCRRecording.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475BAE167EFFA80044511D /* VCRRecording.m */; }; - B317B6C3186E1A5100A7C0AE /* VCRRequestKey.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B828A0167E9B6800CCEC3C /* VCRRequestKey.m */; }; - B317B6C4186E1A5100A7C0AE /* VCRError.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FCE5061863F2D3009C0E12 /* VCRError.m */; }; - B317B6C6186E1A5E00A7C0AE /* VCRCassetteManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82881167E9B2B00CCEC3C /* VCRCassetteManagerTests.m */; }; - B317B6C7186E1A5E00A7C0AE /* VCRCassetteTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82883167E9B2B00CCEC3C /* VCRCassetteTests.m */; }; - B317B6C8186E1A5E00A7C0AE /* VCRRecordingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475BB8167F12620044511D /* VCRRecordingTests.m */; }; - B317B6C9186E1A5E00A7C0AE /* VCRRequestKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82885167E9B2B00CCEC3C /* VCRRequestKeyTests.m */; }; - B317B6CB186E1A5E00A7C0AE /* VCR_NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8288B167E9B2B00CCEC3C /* VCR_NSURLConnectionTests.m */; }; - B317B6CC186E1A5E00A7C0AE /* cassette-1.json in Resources */ = {isa = PBXBuildFile; fileRef = B3B8287D167E9B2B00CCEC3C /* cassette-1.json */; }; - B317B6CD186E1A5E00A7C0AE /* test.png in Resources */ = {isa = PBXBuildFile; fileRef = B3475B8D167EBF8F0044511D /* test.png */; }; - B317B6CE186E1A5E00A7C0AE /* XCTestCase+SRTAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = B3BB2512167F23EC00C5E3C6 /* XCTestCase+SRTAdditions.m */; }; - B3475B5E167EA0680044511D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B3475B5C167EA0680044511D /* InfoPlist.strings */; }; - B3475B60167EA0680044511D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475B5F167EA0680044511D /* main.m */; }; - B3475B72167EA0C30044511D /* VCRAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475B69167EA0C30044511D /* VCRAppDelegate.m */; }; - B3475B73167EA0C30044511D /* VCRCassetteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475B6B167EA0C30044511D /* VCRCassetteViewController.m */; }; - B3475B74167EA0C30044511D /* VCRCassetteViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B3475B6C167EA0C30044511D /* VCRCassetteViewController.xib */; }; - B3475B75167EA0C30044511D /* VCRRecordingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475B6E167EA0C30044511D /* VCRRecordingViewController.m */; }; - B3475B76167EA0C30044511D /* VCRRecordingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B3475B6F167EA0C30044511D /* VCRRecordingViewController.xib */; }; - B3475B77167EA0C30044511D /* VCRViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475B71167EA0C30044511D /* VCRViewController.m */; }; - B3475B79167EA1080044511D /* VCR.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82897167E9B6800CCEC3C /* VCR.m */; }; - B3475B7A167EA1080044511D /* VCRCassette.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8289A167E9B6800CCEC3C /* VCRCassette.m */; }; - B3475B7B167EA1080044511D /* VCRCassetteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8289C167E9B6800CCEC3C /* VCRCassetteManager.m */; }; - B3475B7D167EA1080044511D /* VCRRequestKey.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B828A0167E9B6800CCEC3C /* VCRRequestKey.m */; }; - B3475B80167EA1400044511D /* cassette.json in Resources */ = {isa = PBXBuildFile; fileRef = B3475B7F167EA1400044511D /* cassette.json */; }; - B3475B82167EA1CF0044511D /* VCRViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B3475B81167EA1CF0044511D /* VCRViewController.xib */; }; - B3475B88167EA2960044511D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B3475B85167EA2960044511D /* Default-568h@2x.png */; }; - B3475B89167EA2960044511D /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = B3475B86167EA2960044511D /* Default.png */; }; - B3475B8A167EA2960044511D /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B3475B87167EA2960044511D /* Default@2x.png */; }; - B3475B8C167EA37B0044511D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3475B8B167EA37B0044511D /* UIKit.framework */; }; - B3475BB1167EFFA80044511D /* VCRRecording.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475BAE167EFFA80044511D /* VCRRecording.m */; }; - B359FCE118734EE200FA20E2 /* VCRRecordingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = B359FCE018734EE200FA20E2 /* VCRRecordingURLProtocol.m */; }; - B359FCE218734EE200FA20E2 /* VCRRecordingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = B359FCE018734EE200FA20E2 /* VCRRecordingURLProtocol.m */; }; - B359FCE318734EE200FA20E2 /* VCRRecordingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = B359FCE018734EE200FA20E2 /* VCRRecordingURLProtocol.m */; }; - B359FCE61876411D00FA20E2 /* VCRReplayingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = B359FCE51876411D00FA20E2 /* VCRReplayingURLProtocol.m */; }; - B359FCE71876411D00FA20E2 /* VCRReplayingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = B359FCE51876411D00FA20E2 /* VCRReplayingURLProtocol.m */; }; - B359FCE81876411D00FA20E2 /* VCRReplayingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = B359FCE51876411D00FA20E2 /* VCRReplayingURLProtocol.m */; }; - B36021B31876615E0029500A /* XCTestCase+VCR.m in Sources */ = {isa = PBXBuildFile; fileRef = B36021B21876615E0029500A /* XCTestCase+VCR.m */; }; - B36021B41876615E0029500A /* XCTestCase+VCR.m in Sources */ = {isa = PBXBuildFile; fileRef = B36021B21876615E0029500A /* XCTestCase+VCR.m */; }; - B3DEFB6D1876973900D3FE16 /* VCR_NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB6C1876973900D3FE16 /* VCR_NSURLSessionTests.m */; }; - B3DEFB6E1876973900D3FE16 /* VCR_NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB6C1876973900D3FE16 /* VCR_NSURLSessionTests.m */; }; - B3DEFB761877157300D3FE16 /* VCR+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB751877157300D3FE16 /* VCR+NSURLSessionConfiguration.m */; }; - B3DEFB771877157300D3FE16 /* VCR+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB751877157300D3FE16 /* VCR+NSURLSessionConfiguration.m */; }; - B3DEFB781877157300D3FE16 /* VCR+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB751877157300D3FE16 /* VCR+NSURLSessionConfiguration.m */; }; - B3DEFB7A1877313900D3FE16 /* VCRRecordingURLProtocolTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB791877313900D3FE16 /* VCRRecordingURLProtocolTests.m */; }; - B3DEFB7B1877313900D3FE16 /* VCRRecordingURLProtocolTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB791877313900D3FE16 /* VCRRecordingURLProtocolTests.m */; }; - B3DEFB7D187731B900D3FE16 /* VCRReplayingURLProtocolTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB7C187731B900D3FE16 /* VCRReplayingURLProtocolTests.m */; }; - B3DEFB7E187731B900D3FE16 /* VCRReplayingURLProtocolTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB7C187731B900D3FE16 /* VCRReplayingURLProtocolTests.m */; }; - B3DEFB801877329600D3FE16 /* VCRTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB7F1877329600D3FE16 /* VCRTests.m */; }; - B3DEFB811877329600D3FE16 /* VCRTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB7F1877329600D3FE16 /* VCRTests.m */; }; - B3DEFB841877338A00D3FE16 /* VCRURLLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB831877338A00D3FE16 /* VCRURLLoader.m */; }; - B3FCE5091863F2D3009C0E12 /* VCRError.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FCE5061863F2D3009C0E12 /* VCRError.m */; }; - C295E2D018907A5C00E8C144 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C295E2CF18907A5C00E8C144 /* MobileCoreServices.framework */; }; - C295E2D118907A5C00E8C144 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C295E2CF18907A5C00E8C144 /* MobileCoreServices.framework */; }; - C295E2D318907AA200E8C144 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C295E2D218907AA200E8C144 /* CoreServices.framework */; }; - C393569B17B5DA460025DC53 /* VCROrderedMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = C393569A17B5DA460025DC53 /* VCROrderedMutableDictionary.m */; }; + B386A6F91ADA1AB100ABF873 /* cassette-1.json in Resources */ = {isa = PBXBuildFile; fileRef = B386A6E41ADA1AB100ABF873 /* cassette-1.json */; }; + B386A6FB1ADA1AB100ABF873 /* test.png in Resources */ = {isa = PBXBuildFile; fileRef = B386A6E61ADA1AB100ABF873 /* test.png */; }; + B386A6FC1ADA1AB100ABF873 /* VCR_NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6E81ADA1AB100ABF873 /* VCR_NSURLConnectionTests.m */; }; + B386A6FD1ADA1AB100ABF873 /* VCR_NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6E91ADA1AB100ABF873 /* VCR_NSURLSessionTests.m */; }; + B386A6FE1ADA1AB100ABF873 /* VCRCassetteManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6EB1ADA1AB100ABF873 /* VCRCassetteManagerTests.m */; }; + B386A6FF1ADA1AB100ABF873 /* VCRCassetteTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6ED1ADA1AB100ABF873 /* VCRCassetteTests.m */; }; + B386A7001ADA1AB100ABF873 /* VCRRecordingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6EF1ADA1AB100ABF873 /* VCRRecordingTests.m */; }; + B386A7011ADA1AB100ABF873 /* VCRRecordingURLProtocolTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6F01ADA1AB100ABF873 /* VCRRecordingURLProtocolTests.m */; }; + B386A7021ADA1AB100ABF873 /* VCRReplayingURLProtocolTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6F11ADA1AB100ABF873 /* VCRReplayingURLProtocolTests.m */; }; + B386A7031ADA1AB100ABF873 /* VCRRequestKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6F31ADA1AB100ABF873 /* VCRRequestKeyTests.m */; }; + B386A7041ADA1AB100ABF873 /* VCRTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6F41ADA1AB100ABF873 /* VCRTests.m */; }; + B386A7051ADA1AB100ABF873 /* XCTestCase+SRTAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = B386A6F61ADA1AB100ABF873 /* XCTestCase+SRTAdditions.m */; }; + B386A70B1ADA1E1800ABF873 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B386A7091ADA1E0000ABF873 /* MobileCoreServices.framework */; }; + B3B4FC051ADA178100C997D0 /* libVCRURLConnection.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B3B4FBFA1ADA178000C997D0 /* libVCRURLConnection.a */; }; + B3B4FC111ADA183400C997D0 /* VCR.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B82897167E9B6800CCEC3C /* VCR.m */; }; + B3B4FC211ADA184800C997D0 /* VCR+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = B3DEFB751877157300D3FE16 /* VCR+NSURLSessionConfiguration.m */; }; + B3B4FC221ADA184800C997D0 /* VCRCassette.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8289A167E9B6800CCEC3C /* VCRCassette.m */; }; + B3B4FC231ADA184800C997D0 /* VCRCassetteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B8289C167E9B6800CCEC3C /* VCRCassetteManager.m */; }; + B3B4FC241ADA184800C997D0 /* VCRError.m in Sources */ = {isa = PBXBuildFile; fileRef = B3FCE5061863F2D3009C0E12 /* VCRError.m */; }; + B3B4FC251ADA184800C997D0 /* VCROrderedMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = C393569A17B5DA460025DC53 /* VCROrderedMutableDictionary.m */; }; + B3B4FC261ADA184800C997D0 /* VCRRecording.m in Sources */ = {isa = PBXBuildFile; fileRef = B3475BAE167EFFA80044511D /* VCRRecording.m */; }; + B3B4FC271ADA184800C997D0 /* VCRRecordingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = B359FCE018734EE200FA20E2 /* VCRRecordingURLProtocol.m */; }; + B3B4FC281ADA184800C997D0 /* VCRReplayingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = B359FCE51876411D00FA20E2 /* VCRReplayingURLProtocol.m */; }; + B3B4FC291ADA184800C997D0 /* VCRRequestKey.m in Sources */ = {isa = PBXBuildFile; fileRef = B3B828A0167E9B6800CCEC3C /* VCRRequestKey.m */; }; + B3BE0F4D1ADB94C9005D0089 /* VCRRecording.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3475BAD167EFFA70044511D /* VCRRecording.h */; }; + B3BE0F4E1ADBA6B4005D0089 /* VCRCassette.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3B82899167E9B6800CCEC3C /* VCRCassette.h */; }; + B3BE0F4F1ADBA785005D0089 /* VCR.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3B82896167E9B6800CCEC3C /* VCR.h */; }; + B3BE0F501ADBA839005D0089 /* VCRRequestKey.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3B8289F167E9B6800CCEC3C /* VCRRequestKey.h */; }; /* End PBXBuildFile section */ -/* Begin PBXFileReference section */ - B317B685186E13B400A7C0AE /* Tests-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tests-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - B317B686186E13B400A7C0AE /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - B317B688186E13B400A7C0AE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - B317B68D186E13B400A7C0AE /* Tests-iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-iOS-Info.plist"; sourceTree = ""; }; - B317B6AF186E1A0100A7C0AE /* Tests-OSX.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tests-OSX.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - B317B6B3186E1A0100A7C0AE /* Tests-OSX-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-OSX-Info.plist"; sourceTree = ""; }; - B3475B53167EA0680044511D /* Example-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - B3475B5B167EA0680044511D /* Example-iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Example-iOS-Info.plist"; sourceTree = ""; }; - B3475B5D167EA0680044511D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - B3475B5F167EA0680044511D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - B3475B61167EA0680044511D /* Example-iOS-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Example-iOS-Prefix.pch"; sourceTree = ""; }; - B3475B68167EA0C30044511D /* VCRAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRAppDelegate.h; sourceTree = ""; }; - B3475B69167EA0C30044511D /* VCRAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRAppDelegate.m; sourceTree = ""; }; - B3475B6A167EA0C30044511D /* VCRCassetteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassetteViewController.h; sourceTree = ""; }; - B3475B6B167EA0C30044511D /* VCRCassetteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRCassetteViewController.m; sourceTree = ""; }; - B3475B6C167EA0C30044511D /* VCRCassetteViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VCRCassetteViewController.xib; sourceTree = ""; }; - B3475B6D167EA0C30044511D /* VCRRecordingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRecordingViewController.h; sourceTree = ""; }; - B3475B6E167EA0C30044511D /* VCRRecordingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRecordingViewController.m; sourceTree = ""; }; - B3475B6F167EA0C30044511D /* VCRRecordingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VCRRecordingViewController.xib; sourceTree = ""; }; - B3475B70167EA0C30044511D /* VCRViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRViewController.h; sourceTree = ""; }; - B3475B71167EA0C30044511D /* VCRViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRViewController.m; sourceTree = ""; }; - B3475B7F167EA1400044511D /* cassette.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = cassette.json; sourceTree = ""; }; - B3475B81167EA1CF0044511D /* VCRViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VCRViewController.xib; sourceTree = ""; }; - B3475B85167EA2960044511D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - B3475B86167EA2960044511D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - B3475B87167EA2960044511D /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; - B3475B8B167EA37B0044511D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - B3475B8D167EBF8F0044511D /* test.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = test.png; path = Tests/test.png; sourceTree = ""; }; - B3475BAD167EFFA70044511D /* VCRRecording.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRRecording.h; path = VCRURLConnection/VCRRecording.h; sourceTree = ""; }; - B3475BAE167EFFA80044511D /* VCRRecording.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRRecording.m; path = VCRURLConnection/VCRRecording.m; sourceTree = ""; }; - B3475BB7167F12620044511D /* VCRRecordingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRRecordingTests.h; path = Tests/VCRRecordingTests.h; sourceTree = ""; }; - B3475BB8167F12620044511D /* VCRRecordingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRRecordingTests.m; path = Tests/VCRRecordingTests.m; sourceTree = ""; }; - B359FCDF18734EE200FA20E2 /* VCRRecordingURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRRecordingURLProtocol.h; path = VCRURLConnection/VCRRecordingURLProtocol.h; sourceTree = ""; }; - B359FCE018734EE200FA20E2 /* VCRRecordingURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRRecordingURLProtocol.m; path = VCRURLConnection/VCRRecordingURLProtocol.m; sourceTree = ""; }; - B359FCE41876411D00FA20E2 /* VCRReplayingURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRReplayingURLProtocol.h; path = VCRURLConnection/VCRReplayingURLProtocol.h; sourceTree = ""; }; - B359FCE51876411D00FA20E2 /* VCRReplayingURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRReplayingURLProtocol.m; path = VCRURLConnection/VCRReplayingURLProtocol.m; sourceTree = ""; }; - B36021B11876615E0029500A /* XCTestCase+VCR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "XCTestCase+VCR.h"; path = "Tests/XCTestCase+VCR.h"; sourceTree = ""; }; - B36021B21876615E0029500A /* XCTestCase+VCR.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "XCTestCase+VCR.m"; path = "Tests/XCTestCase+VCR.m"; sourceTree = ""; }; - B3B82867167E9A6500CCEC3C /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; - B3B8286C167E9A6500CCEC3C /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - B3B8286D167E9A6500CCEC3C /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - B3B8286E167E9A6500CCEC3C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - B3B8287D167E9B2B00CCEC3C /* cassette-1.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "cassette-1.json"; path = "Tests/cassette-1.json"; sourceTree = ""; }; - B3B82880167E9B2B00CCEC3C /* VCRCassetteManagerTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRCassetteManagerTests.h; path = Tests/VCRCassetteManagerTests.h; sourceTree = ""; }; - B3B82881167E9B2B00CCEC3C /* VCRCassetteManagerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRCassetteManagerTests.m; path = Tests/VCRCassetteManagerTests.m; sourceTree = ""; }; - B3B82882167E9B2B00CCEC3C /* VCRCassetteTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRCassetteTests.h; path = Tests/VCRCassetteTests.h; sourceTree = ""; }; - B3B82883167E9B2B00CCEC3C /* VCRCassetteTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRCassetteTests.m; path = Tests/VCRCassetteTests.m; sourceTree = ""; }; - B3B82884167E9B2B00CCEC3C /* VCRRequestKeyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRRequestKeyTests.h; path = Tests/VCRRequestKeyTests.h; sourceTree = ""; }; - B3B82885167E9B2B00CCEC3C /* VCRRequestKeyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRRequestKeyTests.m; path = Tests/VCRRequestKeyTests.m; sourceTree = ""; }; - B3B8288A167E9B2B00CCEC3C /* VCR_NSURLConnectionTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCR_NSURLConnectionTests.h; path = Tests/VCR_NSURLConnectionTests.h; sourceTree = ""; }; - B3B8288B167E9B2B00CCEC3C /* VCR_NSURLConnectionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCR_NSURLConnectionTests.m; path = Tests/VCR_NSURLConnectionTests.m; sourceTree = ""; }; - B3B82896167E9B6800CCEC3C /* VCR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCR.h; path = VCRURLConnection/VCR.h; sourceTree = ""; }; - B3B82897167E9B6800CCEC3C /* VCR.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCR.m; path = VCRURLConnection/VCR.m; sourceTree = ""; }; - B3B82898167E9B6800CCEC3C /* VCRCassette_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRCassette_Private.h; path = VCRURLConnection/VCRCassette_Private.h; sourceTree = ""; }; - B3B82899167E9B6800CCEC3C /* VCRCassette.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRCassette.h; path = VCRURLConnection/VCRCassette.h; sourceTree = ""; }; - B3B8289A167E9B6800CCEC3C /* VCRCassette.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRCassette.m; path = VCRURLConnection/VCRCassette.m; sourceTree = ""; }; - B3B8289B167E9B6800CCEC3C /* VCRCassetteManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRCassetteManager.h; path = VCRURLConnection/VCRCassetteManager.h; sourceTree = ""; }; - B3B8289C167E9B6800CCEC3C /* VCRCassetteManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRCassetteManager.m; path = VCRURLConnection/VCRCassetteManager.m; sourceTree = ""; }; - B3B8289F167E9B6800CCEC3C /* VCRRequestKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRRequestKey.h; path = VCRURLConnection/VCRRequestKey.h; sourceTree = ""; }; - B3B828A0167E9B6800CCEC3C /* VCRRequestKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRRequestKey.m; path = VCRURLConnection/VCRRequestKey.m; sourceTree = ""; }; - B3BB2511167F23EC00C5E3C6 /* XCTestCase+SRTAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "XCTestCase+SRTAdditions.h"; path = "Tests/XCTestCase+SRTAdditions.h"; sourceTree = ""; }; - B3BB2512167F23EC00C5E3C6 /* XCTestCase+SRTAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "XCTestCase+SRTAdditions.m"; path = "Tests/XCTestCase+SRTAdditions.m"; sourceTree = ""; }; - B3DEFB6C1876973900D3FE16 /* VCR_NSURLSessionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCR_NSURLSessionTests.m; path = Tests/VCR_NSURLSessionTests.m; sourceTree = ""; }; - B3DEFB741877157300D3FE16 /* VCR+NSURLSessionConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "VCR+NSURLSessionConfiguration.h"; path = "VCRURLConnection/VCR+NSURLSessionConfiguration.h"; sourceTree = ""; }; - B3DEFB751877157300D3FE16 /* VCR+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "VCR+NSURLSessionConfiguration.m"; path = "VCRURLConnection/VCR+NSURLSessionConfiguration.m"; sourceTree = ""; }; - B3DEFB791877313900D3FE16 /* VCRRecordingURLProtocolTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRRecordingURLProtocolTests.m; path = Tests/VCRRecordingURLProtocolTests.m; sourceTree = ""; }; - B3DEFB7C187731B900D3FE16 /* VCRReplayingURLProtocolTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRReplayingURLProtocolTests.m; path = Tests/VCRReplayingURLProtocolTests.m; sourceTree = ""; }; - B3DEFB7F1877329600D3FE16 /* VCRTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRTests.m; path = Tests/VCRTests.m; sourceTree = ""; }; - B3DEFB821877338A00D3FE16 /* VCRURLLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRURLLoader.h; sourceTree = ""; }; - B3DEFB831877338A00D3FE16 /* VCRURLLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRURLLoader.m; sourceTree = ""; }; - B3FCE5051863F2D3009C0E12 /* VCRError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCRError.h; path = VCRURLConnection/VCRError.h; sourceTree = ""; }; - B3FCE5061863F2D3009C0E12 /* VCRError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCRError.m; path = VCRURLConnection/VCRError.m; sourceTree = ""; }; - C295E2CF18907A5C00E8C144 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; }; - C295E2D218907AA200E8C144 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; }; - C393569917B5DA460025DC53 /* VCROrderedMutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VCROrderedMutableDictionary.h; path = VCRURLConnection/VCROrderedMutableDictionary.h; sourceTree = ""; }; - C393569A17B5DA460025DC53 /* VCROrderedMutableDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VCROrderedMutableDictionary.m; path = VCRURLConnection/VCROrderedMutableDictionary.m; sourceTree = ""; }; -/* End PBXFileReference section */ +/* Begin PBXContainerItemProxy section */ + B3B4FC061ADA178100C997D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B3B8284E167E990F00CCEC3C /* Project object */; + proxyType = 1; + remoteGlobalIDString = B3B4FBF91ADA178000C997D0; + remoteInfo = VCRURLConnection; + }; +/* End PBXContainerItemProxy section */ -/* Begin PBXFrameworksBuildPhase section */ - B317B682186E13B400A7C0AE /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; +/* Begin PBXCopyFilesBuildPhase section */ + B3B4FBF81ADA178000C997D0 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; files = ( - B317B687186E13B400A7C0AE /* XCTest.framework in Frameworks */, - C295E2D118907A5C00E8C144 /* MobileCoreServices.framework in Frameworks */, - B317B68A186E13B400A7C0AE /* UIKit.framework in Frameworks */, - B317B689186E13B400A7C0AE /* Foundation.framework in Frameworks */, + B3BE0F501ADBA839005D0089 /* VCRRequestKey.h in CopyFiles */, + B3BE0F4F1ADBA785005D0089 /* VCR.h in CopyFiles */, + B3BE0F4E1ADBA6B4005D0089 /* VCRCassette.h in CopyFiles */, + B3BE0F4D1ADB94C9005D0089 /* VCRRecording.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; - B317B6AC186E1A0100A7C0AE /* Frameworks */ = { +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + B3475BAD167EFFA70044511D /* VCRRecording.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRecording.h; sourceTree = ""; }; + B3475BAE167EFFA80044511D /* VCRRecording.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRecording.m; sourceTree = ""; }; + B359FCDF18734EE200FA20E2 /* VCRRecordingURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRecordingURLProtocol.h; sourceTree = ""; }; + B359FCE018734EE200FA20E2 /* VCRRecordingURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRecordingURLProtocol.m; sourceTree = ""; }; + B359FCE41876411D00FA20E2 /* VCRReplayingURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRReplayingURLProtocol.h; sourceTree = ""; }; + B359FCE51876411D00FA20E2 /* VCRReplayingURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRReplayingURLProtocol.m; sourceTree = ""; }; + B386A6E41ADA1AB100ABF873 /* cassette-1.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "cassette-1.json"; sourceTree = ""; }; + B386A6E61ADA1AB100ABF873 /* test.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = test.png; sourceTree = ""; }; + B386A6E71ADA1AB100ABF873 /* VCR_NSURLConnectionTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCR_NSURLConnectionTests.h; sourceTree = ""; }; + B386A6E81ADA1AB100ABF873 /* VCR_NSURLConnectionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCR_NSURLConnectionTests.m; sourceTree = ""; }; + B386A6E91ADA1AB100ABF873 /* VCR_NSURLSessionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCR_NSURLSessionTests.m; sourceTree = ""; }; + B386A6EA1ADA1AB100ABF873 /* VCRCassetteManagerTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassetteManagerTests.h; sourceTree = ""; }; + B386A6EB1ADA1AB100ABF873 /* VCRCassetteManagerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRCassetteManagerTests.m; sourceTree = ""; }; + B386A6EC1ADA1AB100ABF873 /* VCRCassetteTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassetteTests.h; sourceTree = ""; }; + B386A6ED1ADA1AB100ABF873 /* VCRCassetteTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRCassetteTests.m; sourceTree = ""; }; + B386A6EE1ADA1AB100ABF873 /* VCRRecordingTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRecordingTests.h; sourceTree = ""; }; + B386A6EF1ADA1AB100ABF873 /* VCRRecordingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRecordingTests.m; sourceTree = ""; }; + B386A6F01ADA1AB100ABF873 /* VCRRecordingURLProtocolTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRecordingURLProtocolTests.m; sourceTree = ""; }; + B386A6F11ADA1AB100ABF873 /* VCRReplayingURLProtocolTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRReplayingURLProtocolTests.m; sourceTree = ""; }; + B386A6F21ADA1AB100ABF873 /* VCRRequestKeyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRequestKeyTests.h; sourceTree = ""; }; + B386A6F31ADA1AB100ABF873 /* VCRRequestKeyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRequestKeyTests.m; sourceTree = ""; }; + B386A6F41ADA1AB100ABF873 /* VCRTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRTests.m; sourceTree = ""; }; + B386A6F51ADA1AB100ABF873 /* XCTestCase+SRTAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "XCTestCase+SRTAdditions.h"; sourceTree = ""; }; + B386A6F61ADA1AB100ABF873 /* XCTestCase+SRTAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "XCTestCase+SRTAdditions.m"; sourceTree = ""; }; + B386A7091ADA1E0000ABF873 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; }; + B3B4FBFA1ADA178000C997D0 /* libVCRURLConnection.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVCRURLConnection.a; sourceTree = BUILT_PRODUCTS_DIR; }; + B3B4FC041ADA178100C997D0 /* VCRURLConnectionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VCRURLConnectionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B3B82896167E9B6800CCEC3C /* VCR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCR.h; sourceTree = ""; }; + B3B82897167E9B6800CCEC3C /* VCR.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCR.m; sourceTree = ""; }; + B3B82898167E9B6800CCEC3C /* VCRCassette_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassette_Private.h; sourceTree = ""; }; + B3B82899167E9B6800CCEC3C /* VCRCassette.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassette.h; sourceTree = ""; }; + B3B8289A167E9B6800CCEC3C /* VCRCassette.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRCassette.m; sourceTree = ""; }; + B3B8289B167E9B6800CCEC3C /* VCRCassetteManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassetteManager.h; sourceTree = ""; }; + B3B8289C167E9B6800CCEC3C /* VCRCassetteManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRCassetteManager.m; sourceTree = ""; }; + B3B8289F167E9B6800CCEC3C /* VCRRequestKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRequestKey.h; sourceTree = ""; }; + B3B828A0167E9B6800CCEC3C /* VCRRequestKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRequestKey.m; sourceTree = ""; }; + B3BB2511167F23EC00C5E3C6 /* XCTestCase+SRTAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "XCTestCase+SRTAdditions.h"; path = "VCRURLConnectionTests/XCTestCase+SRTAdditions.h"; sourceTree = ""; }; + B3BB2512167F23EC00C5E3C6 /* XCTestCase+SRTAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "XCTestCase+SRTAdditions.m"; path = "VCRURLConnectionTests/XCTestCase+SRTAdditions.m"; sourceTree = ""; }; + B3DEFB741877157300D3FE16 /* VCR+NSURLSessionConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "VCR+NSURLSessionConfiguration.h"; sourceTree = ""; }; + B3DEFB751877157300D3FE16 /* VCR+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "VCR+NSURLSessionConfiguration.m"; sourceTree = ""; }; + B3FCE5051863F2D3009C0E12 /* VCRError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRError.h; sourceTree = ""; }; + B3FCE5061863F2D3009C0E12 /* VCRError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRError.m; sourceTree = ""; }; + C393569917B5DA460025DC53 /* VCROrderedMutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCROrderedMutableDictionary.h; sourceTree = ""; }; + C393569A17B5DA460025DC53 /* VCROrderedMutableDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCROrderedMutableDictionary.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B3B4FBF71ADA178000C997D0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B317B6B0186E1A0100A7C0AE /* XCTest.framework in Frameworks */, - C295E2D318907AA200E8C144 /* CoreServices.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - B3475B50167EA0680044511D /* Frameworks */ = { + B3B4FC011ADA178100C997D0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B3475B8C167EA37B0044511D /* UIKit.framework in Frameworks */, - C295E2D018907A5C00E8C144 /* MobileCoreServices.framework in Frameworks */, + B386A70B1ADA1E1800ABF873 /* MobileCoreServices.framework in Frameworks */, + B3B4FC051ADA178100C997D0 /* libVCRURLConnection.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - B317B68B186E13B400A7C0AE /* Tests-iOS */ = { + B386A6E31ADA1AB100ABF873 /* Resources */ = { isa = PBXGroup; children = ( - B317B68D186E13B400A7C0AE /* Tests-iOS-Info.plist */, + B386A6E41ADA1AB100ABF873 /* cassette-1.json */, + B386A6E61ADA1AB100ABF873 /* test.png */, ); - path = "Tests-iOS"; + path = Resources; sourceTree = ""; }; - B317B6B1186E1A0100A7C0AE /* Tests-OSX */ = { - isa = PBXGroup; - children = ( - B317B6B3186E1A0100A7C0AE /* Tests-OSX-Info.plist */, - ); - path = "Tests-OSX"; - sourceTree = ""; - }; - B3475B59167EA0680044511D /* Example-iOS */ = { - isa = PBXGroup; - children = ( - B3475B68167EA0C30044511D /* VCRAppDelegate.h */, - B3475B69167EA0C30044511D /* VCRAppDelegate.m */, - B3475B6A167EA0C30044511D /* VCRCassetteViewController.h */, - B3475B6B167EA0C30044511D /* VCRCassetteViewController.m */, - B3475B6C167EA0C30044511D /* VCRCassetteViewController.xib */, - B3475B6D167EA0C30044511D /* VCRRecordingViewController.h */, - B3475B6E167EA0C30044511D /* VCRRecordingViewController.m */, - B3475B6F167EA0C30044511D /* VCRRecordingViewController.xib */, - B3475B70167EA0C30044511D /* VCRViewController.h */, - B3475B71167EA0C30044511D /* VCRViewController.m */, - B3DEFB821877338A00D3FE16 /* VCRURLLoader.h */, - B3DEFB831877338A00D3FE16 /* VCRURLLoader.m */, - B3475B81167EA1CF0044511D /* VCRViewController.xib */, - B3475B7F167EA1400044511D /* cassette.json */, - B3475B85167EA2960044511D /* Default-568h@2x.png */, - B3475B86167EA2960044511D /* Default.png */, - B3475B87167EA2960044511D /* Default@2x.png */, - B3475B5A167EA0680044511D /* Supporting Files */, - ); - path = "Example-iOS"; - sourceTree = ""; - }; - B3475B5A167EA0680044511D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - B3475B5B167EA0680044511D /* Example-iOS-Info.plist */, - B3475B5C167EA0680044511D /* InfoPlist.strings */, - B3475B5F167EA0680044511D /* main.m */, - B3475B61167EA0680044511D /* Example-iOS-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - B3B8284C167E990F00CCEC3C = { - isa = PBXGroup; - children = ( - B3B82858167E996A00CCEC3C /* VCRURLConnection */, - B3B8287C167E9AA400CCEC3C /* Tests */, - B3475B59167EA0680044511D /* Example-iOS */, - B317B68B186E13B400A7C0AE /* Tests-iOS */, - B317B6B1186E1A0100A7C0AE /* Tests-OSX */, - B3B82866167E9A6500CCEC3C /* Frameworks */, - B3B82865167E9A6500CCEC3C /* Products */, - ); - indentWidth = 4; - sourceTree = ""; - tabWidth = 4; - usesTabs = 0; - }; - B3B82858167E996A00CCEC3C /* VCRURLConnection */ = { + B3B4FBFB1ADA178000C997D0 /* VCRURLConnection */ = { isa = PBXGroup; children = ( B3B82896167E9B6800CCEC3C /* VCR.h */, B3B82897167E9B6800CCEC3C /* VCR.m */, B3DEFB741877157300D3FE16 /* VCR+NSURLSessionConfiguration.h */, B3DEFB751877157300D3FE16 /* VCR+NSURLSessionConfiguration.m */, - B359FCDF18734EE200FA20E2 /* VCRRecordingURLProtocol.h */, - B359FCE018734EE200FA20E2 /* VCRRecordingURLProtocol.m */, - B359FCE41876411D00FA20E2 /* VCRReplayingURLProtocol.h */, - B359FCE51876411D00FA20E2 /* VCRReplayingURLProtocol.m */, + B3B82898167E9B6800CCEC3C /* VCRCassette_Private.h */, B3B82899167E9B6800CCEC3C /* VCRCassette.h */, B3B8289A167E9B6800CCEC3C /* VCRCassette.m */, - B3B82898167E9B6800CCEC3C /* VCRCassette_Private.h */, B3B8289B167E9B6800CCEC3C /* VCRCassetteManager.h */, B3B8289C167E9B6800CCEC3C /* VCRCassetteManager.m */, + B3FCE5051863F2D3009C0E12 /* VCRError.h */, + B3FCE5061863F2D3009C0E12 /* VCRError.m */, C393569917B5DA460025DC53 /* VCROrderedMutableDictionary.h */, C393569A17B5DA460025DC53 /* VCROrderedMutableDictionary.m */, B3475BAD167EFFA70044511D /* VCRRecording.h */, B3475BAE167EFFA80044511D /* VCRRecording.m */, + B359FCDF18734EE200FA20E2 /* VCRRecordingURLProtocol.h */, + B359FCE018734EE200FA20E2 /* VCRRecordingURLProtocol.m */, + B359FCE41876411D00FA20E2 /* VCRReplayingURLProtocol.h */, + B359FCE51876411D00FA20E2 /* VCRReplayingURLProtocol.m */, B3B8289F167E9B6800CCEC3C /* VCRRequestKey.h */, B3B828A0167E9B6800CCEC3C /* VCRRequestKey.m */, - B3FCE5051863F2D3009C0E12 /* VCRError.h */, - B3FCE5061863F2D3009C0E12 /* VCRError.m */, ); - name = VCRURLConnection; + path = VCRURLConnection; sourceTree = ""; }; - B3B82865167E9A6500CCEC3C /* Products */ = { + B3B4FC081ADA178100C997D0 /* VCRURLConnectionTests */ = { isa = PBXGroup; children = ( - B3475B53167EA0680044511D /* Example-iOS.app */, - B317B685186E13B400A7C0AE /* Tests-iOS.xctest */, - B317B6AF186E1A0100A7C0AE /* Tests-OSX.xctest */, + B386A6E71ADA1AB100ABF873 /* VCR_NSURLConnectionTests.h */, + B386A6E81ADA1AB100ABF873 /* VCR_NSURLConnectionTests.m */, + B386A6E91ADA1AB100ABF873 /* VCR_NSURLSessionTests.m */, + B386A6EA1ADA1AB100ABF873 /* VCRCassetteManagerTests.h */, + B386A6EB1ADA1AB100ABF873 /* VCRCassetteManagerTests.m */, + B386A6EC1ADA1AB100ABF873 /* VCRCassetteTests.h */, + B386A6ED1ADA1AB100ABF873 /* VCRCassetteTests.m */, + B386A6EE1ADA1AB100ABF873 /* VCRRecordingTests.h */, + B386A6EF1ADA1AB100ABF873 /* VCRRecordingTests.m */, + B386A6F01ADA1AB100ABF873 /* VCRRecordingURLProtocolTests.m */, + B386A6F11ADA1AB100ABF873 /* VCRReplayingURLProtocolTests.m */, + B386A6F21ADA1AB100ABF873 /* VCRRequestKeyTests.h */, + B386A6F31ADA1AB100ABF873 /* VCRRequestKeyTests.m */, + B386A6F41ADA1AB100ABF873 /* VCRTests.m */, + B386A6F51ADA1AB100ABF873 /* XCTestCase+SRTAdditions.h */, + B386A6F61ADA1AB100ABF873 /* XCTestCase+SRTAdditions.m */, + B386A6E31ADA1AB100ABF873 /* Resources */, + B3BB251B167F243E00C5E3C6 /* Vendor */, ); - name = Products; + path = VCRURLConnectionTests; sourceTree = ""; }; - B3B82866167E9A6500CCEC3C /* Frameworks */ = { + B3B8284C167E990F00CCEC3C = { isa = PBXGroup; children = ( - C295E2D218907AA200E8C144 /* CoreServices.framework */, - C295E2CF18907A5C00E8C144 /* MobileCoreServices.framework */, - B3475B8B167EA37B0044511D /* UIKit.framework */, - B3B82867167E9A6500CCEC3C /* SenTestingKit.framework */, - B317B686186E13B400A7C0AE /* XCTest.framework */, - B317B688186E13B400A7C0AE /* Foundation.framework */, - B3B8286B167E9A6500CCEC3C /* Other Frameworks */, + B3B4FBFB1ADA178000C997D0 /* VCRURLConnection */, + B3B4FC081ADA178100C997D0 /* VCRURLConnectionTests */, + B3B82866167E9A6500CCEC3C /* Frameworks */, + B3B82865167E9A6500CCEC3C /* Products */, ); - name = Frameworks; + indentWidth = 4; sourceTree = ""; + tabWidth = 4; + usesTabs = 0; }; - B3B8286B167E9A6500CCEC3C /* Other Frameworks */ = { + B3B82865167E9A6500CCEC3C /* Products */ = { isa = PBXGroup; children = ( - B3B8286C167E9A6500CCEC3C /* AppKit.framework */, - B3B8286D167E9A6500CCEC3C /* CoreData.framework */, - B3B8286E167E9A6500CCEC3C /* Foundation.framework */, + B3B4FBFA1ADA178000C997D0 /* libVCRURLConnection.a */, + B3B4FC041ADA178100C997D0 /* VCRURLConnectionTests.xctest */, ); - name = "Other Frameworks"; + name = Products; sourceTree = ""; }; - B3B8287C167E9AA400CCEC3C /* Tests */ = { + B3B82866167E9A6500CCEC3C /* Frameworks */ = { isa = PBXGroup; children = ( - B3DEFB7F1877329600D3FE16 /* VCRTests.m */, - B3DEFB791877313900D3FE16 /* VCRRecordingURLProtocolTests.m */, - B3DEFB7C187731B900D3FE16 /* VCRReplayingURLProtocolTests.m */, - B3B82880167E9B2B00CCEC3C /* VCRCassetteManagerTests.h */, - B3B82881167E9B2B00CCEC3C /* VCRCassetteManagerTests.m */, - B3B82882167E9B2B00CCEC3C /* VCRCassetteTests.h */, - B3B82883167E9B2B00CCEC3C /* VCRCassetteTests.m */, - B3475BB7167F12620044511D /* VCRRecordingTests.h */, - B3475BB8167F12620044511D /* VCRRecordingTests.m */, - B3B82884167E9B2B00CCEC3C /* VCRRequestKeyTests.h */, - B3B82885167E9B2B00CCEC3C /* VCRRequestKeyTests.m */, - B3B8288A167E9B2B00CCEC3C /* VCR_NSURLConnectionTests.h */, - B3B8288B167E9B2B00CCEC3C /* VCR_NSURLConnectionTests.m */, - B3DEFB6C1876973900D3FE16 /* VCR_NSURLSessionTests.m */, - B36021B11876615E0029500A /* XCTestCase+VCR.h */, - B36021B21876615E0029500A /* XCTestCase+VCR.m */, - B3B8287D167E9B2B00CCEC3C /* cassette-1.json */, - B3475B8D167EBF8F0044511D /* test.png */, - B3BB251B167F243E00C5E3C6 /* Vendor */, + B386A7091ADA1E0000ABF873 /* MobileCoreServices.framework */, ); - name = Tests; + name = Frameworks; sourceTree = ""; }; B3BB251B167F243E00C5E3C6 /* Vendor */ = { @@ -362,62 +229,47 @@ B3BB2512167F23EC00C5E3C6 /* XCTestCase+SRTAdditions.m */, ); name = Vendor; + path = ..; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - B317B684186E13B400A7C0AE /* Tests-iOS */ = { + B3B4FBF91ADA178000C997D0 /* VCRURLConnection */ = { isa = PBXNativeTarget; - buildConfigurationList = B317B696186E13B400A7C0AE /* Build configuration list for PBXNativeTarget "Tests-iOS" */; + buildConfigurationList = B3B4FC0F1ADA178100C997D0 /* Build configuration list for PBXNativeTarget "VCRURLConnection" */; buildPhases = ( - B317B681186E13B400A7C0AE /* Sources */, - B317B682186E13B400A7C0AE /* Frameworks */, - B317B683186E13B400A7C0AE /* Resources */, + B3B4FBF61ADA178000C997D0 /* Sources */, + B3B4FBF71ADA178000C997D0 /* Frameworks */, + B3B4FBF81ADA178000C997D0 /* CopyFiles */, ); buildRules = ( ); dependencies = ( ); - name = "Tests-iOS"; - productName = "Tests-iOS"; - productReference = B317B685186E13B400A7C0AE /* Tests-iOS.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + name = VCRURLConnection; + productName = VCRURLConnection; + productReference = B3B4FBFA1ADA178000C997D0 /* libVCRURLConnection.a */; + productType = "com.apple.product-type.library.static"; }; - B317B6AE186E1A0100A7C0AE /* Tests-OSX */ = { + B3B4FC031ADA178100C997D0 /* VCRURLConnectionTests */ = { isa = PBXNativeTarget; - buildConfigurationList = B317B6BA186E1A0200A7C0AE /* Build configuration list for PBXNativeTarget "Tests-OSX" */; + buildConfigurationList = B3B4FC101ADA178100C997D0 /* Build configuration list for PBXNativeTarget "VCRURLConnectionTests" */; buildPhases = ( - B317B6AB186E1A0100A7C0AE /* Sources */, - B317B6AC186E1A0100A7C0AE /* Frameworks */, - B317B6AD186E1A0100A7C0AE /* Resources */, + B3B4FC001ADA178100C997D0 /* Sources */, + B3B4FC011ADA178100C997D0 /* Frameworks */, + B3B4FC021ADA178100C997D0 /* Resources */, ); buildRules = ( ); dependencies = ( + B3B4FC071ADA178100C997D0 /* PBXTargetDependency */, ); - name = "Tests-OSX"; - productName = "Tests-OSX"; - productReference = B317B6AF186E1A0100A7C0AE /* Tests-OSX.xctest */; + name = VCRURLConnectionTests; + productName = VCRURLConnectionTests; + productReference = B3B4FC041ADA178100C997D0 /* VCRURLConnectionTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - B3475B52167EA0680044511D /* Example-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = B3475B65167EA0680044511D /* Build configuration list for PBXNativeTarget "Example-iOS" */; - buildPhases = ( - B3475B4F167EA0680044511D /* Sources */, - B3475B50167EA0680044511D /* Frameworks */, - B3475B51167EA0680044511D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Example-iOS"; - productName = "Example-iOS"; - productReference = B3475B53167EA0680044511D /* Example-iOS.app */; - productType = "com.apple.product-type.application"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -426,11 +278,11 @@ attributes = { LastUpgradeCheck = 0500; TargetAttributes = { - B317B684186E13B400A7C0AE = { - TestTargetID = B3475B52167EA0680044511D; + B3B4FBF91ADA178000C997D0 = { + CreatedOnToolsVersion = 6.1.1; }; - B317B6AE186E1A0100A7C0AE = { - TestTargetID = B3475B52167EA0680044511D; + B3B4FC031ADA178100C997D0 = { + CreatedOnToolsVersion = 6.1.1; }; }; }; @@ -446,149 +298,74 @@ projectDirPath = ""; projectRoot = ""; targets = ( - B3475B52167EA0680044511D /* Example-iOS */, - B317B684186E13B400A7C0AE /* Tests-iOS */, - B317B6AE186E1A0100A7C0AE /* Tests-OSX */, + B3B4FBF91ADA178000C997D0 /* VCRURLConnection */, + B3B4FC031ADA178100C997D0 /* VCRURLConnectionTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - B317B683186E13B400A7C0AE /* Resources */ = { + B3B4FC021ADA178100C997D0 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - B317B69F186E13E200A7C0AE /* cassette-1.json in Resources */, - B317B6A0186E13E500A7C0AE /* test.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B317B6AD186E1A0100A7C0AE /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B317B6CC186E1A5E00A7C0AE /* cassette-1.json in Resources */, - B317B6CD186E1A5E00A7C0AE /* test.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B3475B51167EA0680044511D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B3475B5E167EA0680044511D /* InfoPlist.strings in Resources */, - B3475B74167EA0C30044511D /* VCRCassetteViewController.xib in Resources */, - B3475B76167EA0C30044511D /* VCRRecordingViewController.xib in Resources */, - B3475B80167EA1400044511D /* cassette.json in Resources */, - B3475B82167EA1CF0044511D /* VCRViewController.xib in Resources */, - B3475B88167EA2960044511D /* Default-568h@2x.png in Resources */, - B3475B89167EA2960044511D /* Default.png in Resources */, - B3475B8A167EA2960044511D /* Default@2x.png in Resources */, + B386A6F91ADA1AB100ABF873 /* cassette-1.json in Resources */, + B386A6FB1ADA1AB100ABF873 /* test.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - B317B681186E13B400A7C0AE /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B317B69A186E13D200A7C0AE /* VCRCassetteTests.m in Sources */, - B317B69B186E13D500A7C0AE /* VCRRecordingTests.m in Sources */, - B317B6A1186E13F200A7C0AE /* XCTestCase+SRTAdditions.m in Sources */, - B317B6A3186E180900A7C0AE /* VCRCassette.m in Sources */, - B359FCE218734EE200FA20E2 /* VCRRecordingURLProtocol.m in Sources */, - B317B6A2186E180900A7C0AE /* VCR.m in Sources */, - B3DEFB7D187731B900D3FE16 /* VCRReplayingURLProtocolTests.m in Sources */, - B3DEFB6D1876973900D3FE16 /* VCR_NSURLSessionTests.m in Sources */, - B3DEFB801877329600D3FE16 /* VCRTests.m in Sources */, - B359FCE71876411D00FA20E2 /* VCRReplayingURLProtocol.m in Sources */, - B36021B31876615E0029500A /* XCTestCase+VCR.m in Sources */, - B317B6A6186E180900A7C0AE /* VCROrderedMutableDictionary.m in Sources */, - B3DEFB771877157300D3FE16 /* VCR+NSURLSessionConfiguration.m in Sources */, - B317B6A7186E180900A7C0AE /* VCRRecording.m in Sources */, - B3DEFB7A1877313900D3FE16 /* VCRRecordingURLProtocolTests.m in Sources */, - B317B69E186E13DD00A7C0AE /* VCR_NSURLConnectionTests.m in Sources */, - B317B6A9186E180900A7C0AE /* VCRError.m in Sources */, - B317B6A8186E180900A7C0AE /* VCRRequestKey.m in Sources */, - B317B69C186E13D800A7C0AE /* VCRRequestKeyTests.m in Sources */, - B317B699186E13CF00A7C0AE /* VCRCassetteManagerTests.m in Sources */, - B317B6A4186E180900A7C0AE /* VCRCassetteManager.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B317B6AB186E1A0100A7C0AE /* Sources */ = { + B3B4FBF61ADA178000C997D0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B317B6C2186E1A5100A7C0AE /* VCRRecording.m in Sources */, - B317B6C8186E1A5E00A7C0AE /* VCRRecordingTests.m in Sources */, - B317B6CB186E1A5E00A7C0AE /* VCR_NSURLConnectionTests.m in Sources */, - B317B6BE186E1A5100A7C0AE /* VCRCassette.m in Sources */, - B359FCE318734EE200FA20E2 /* VCRRecordingURLProtocol.m in Sources */, - B317B6BF186E1A5100A7C0AE /* VCRCassetteManager.m in Sources */, - B317B6C7186E1A5E00A7C0AE /* VCRCassetteTests.m in Sources */, - B3DEFB7E187731B900D3FE16 /* VCRReplayingURLProtocolTests.m in Sources */, - B3DEFB6E1876973900D3FE16 /* VCR_NSURLSessionTests.m in Sources */, - B3DEFB811877329600D3FE16 /* VCRTests.m in Sources */, - B317B6C1186E1A5100A7C0AE /* VCROrderedMutableDictionary.m in Sources */, - B36021B41876615E0029500A /* XCTestCase+VCR.m in Sources */, - B359FCE81876411D00FA20E2 /* VCRReplayingURLProtocol.m in Sources */, - B3DEFB781877157300D3FE16 /* VCR+NSURLSessionConfiguration.m in Sources */, - B317B6C6186E1A5E00A7C0AE /* VCRCassetteManagerTests.m in Sources */, - B3DEFB7B1877313900D3FE16 /* VCRRecordingURLProtocolTests.m in Sources */, - B317B6C4186E1A5100A7C0AE /* VCRError.m in Sources */, - B317B6C9186E1A5E00A7C0AE /* VCRRequestKeyTests.m in Sources */, - B317B6BD186E1A5100A7C0AE /* VCR.m in Sources */, - B317B6CE186E1A5E00A7C0AE /* XCTestCase+SRTAdditions.m in Sources */, - B317B6C3186E1A5100A7C0AE /* VCRRequestKey.m in Sources */, + B3B4FC281ADA184800C997D0 /* VCRReplayingURLProtocol.m in Sources */, + B3B4FC291ADA184800C997D0 /* VCRRequestKey.m in Sources */, + B3B4FC261ADA184800C997D0 /* VCRRecording.m in Sources */, + B3B4FC271ADA184800C997D0 /* VCRRecordingURLProtocol.m in Sources */, + B3B4FC241ADA184800C997D0 /* VCRError.m in Sources */, + B3B4FC221ADA184800C997D0 /* VCRCassette.m in Sources */, + B3B4FC251ADA184800C997D0 /* VCROrderedMutableDictionary.m in Sources */, + B3B4FC231ADA184800C997D0 /* VCRCassetteManager.m in Sources */, + B3B4FC211ADA184800C997D0 /* VCR+NSURLSessionConfiguration.m in Sources */, + B3B4FC111ADA183400C997D0 /* VCR.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - B3475B4F167EA0680044511D /* Sources */ = { + B3B4FC001ADA178100C997D0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B3DEFB761877157300D3FE16 /* VCR+NSURLSessionConfiguration.m in Sources */, - B3475B60167EA0680044511D /* main.m in Sources */, - B359FCE118734EE200FA20E2 /* VCRRecordingURLProtocol.m in Sources */, - B3475B72167EA0C30044511D /* VCRAppDelegate.m in Sources */, - B3475B73167EA0C30044511D /* VCRCassetteViewController.m in Sources */, - B3475B75167EA0C30044511D /* VCRRecordingViewController.m in Sources */, - B3475B77167EA0C30044511D /* VCRViewController.m in Sources */, - B3475B79167EA1080044511D /* VCR.m in Sources */, - B3475B7A167EA1080044511D /* VCRCassette.m in Sources */, - B3475B7B167EA1080044511D /* VCRCassetteManager.m in Sources */, - B3475B7D167EA1080044511D /* VCRRequestKey.m in Sources */, - B3FCE5091863F2D3009C0E12 /* VCRError.m in Sources */, - B3475BB1167EFFA80044511D /* VCRRecording.m in Sources */, - B359FCE61876411D00FA20E2 /* VCRReplayingURLProtocol.m in Sources */, - C393569B17B5DA460025DC53 /* VCROrderedMutableDictionary.m in Sources */, - B3DEFB841877338A00D3FE16 /* VCRURLLoader.m in Sources */, + B386A7021ADA1AB100ABF873 /* VCRReplayingURLProtocolTests.m in Sources */, + B386A7001ADA1AB100ABF873 /* VCRRecordingTests.m in Sources */, + B386A7011ADA1AB100ABF873 /* VCRRecordingURLProtocolTests.m in Sources */, + B386A6FC1ADA1AB100ABF873 /* VCR_NSURLConnectionTests.m in Sources */, + B386A6FE1ADA1AB100ABF873 /* VCRCassetteManagerTests.m in Sources */, + B386A6FD1ADA1AB100ABF873 /* VCR_NSURLSessionTests.m in Sources */, + B386A7051ADA1AB100ABF873 /* XCTestCase+SRTAdditions.m in Sources */, + B386A7041ADA1AB100ABF873 /* VCRTests.m in Sources */, + B386A6FF1ADA1AB100ABF873 /* VCRCassetteTests.m in Sources */, + B386A7031ADA1AB100ABF873 /* VCRRequestKeyTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXVariantGroup section */ - B3475B5C167EA0680044511D /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - B3475B5D167EA0680044511D /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; +/* Begin PBXTargetDependency section */ + B3B4FC071ADA178100C997D0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B3B4FBF91ADA178000C997D0 /* VCRURLConnection */; + targetProxy = B3B4FC061ADA178100C997D0 /* PBXContainerItemProxy */; }; -/* End PBXVariantGroup section */ +/* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - B317B697186E13B400A7C0AE /* Debug */ = { + B3B4FC0B1ADA178100C997D0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; - BUNDLE_LOADER = ""; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -600,18 +377,13 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -619,23 +391,21 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "Tests-iOS/Tests-iOS-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - TEST_HOST = "$(BUNDLE_LOADER)"; - WRAPPER_EXTENSION = xctest; + SKIP_INSTALL = YES; }; name = Debug; }; - B317B698186E13B400A7C0AE /* Release */ = { + B3B4FC0C1ADA178100C997D0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; - BUNDLE_LOADER = ""; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -647,38 +417,33 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "Tests-iOS/Tests-iOS-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - TEST_HOST = "$(BUNDLE_LOADER)"; + SKIP_INSTALL = YES; VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = xctest; }; name = Release; }; - B317B6BB186E1A0200A7C0AE /* Debug */ = { + B3B4FC0D1ADA178100C997D0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = ""; 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; @@ -687,18 +452,17 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", + "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -706,24 +470,24 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "Tests-OSX/Tests-OSX-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.9; + INFOPLIST_FILE = VCRURLConnectionTests/Resources/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - TEST_HOST = "$(BUNDLE_LOADER)"; - WRAPPER_EXTENSION = xctest; + SDKROOT = iphoneos; }; name = Debug; }; - B317B6BC186E1A0200A7C0AE /* Release */ = { + B3B4FC0E1ADA178100C997D0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = ""; 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; @@ -732,96 +496,27 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", + "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "Tests-OSX/Tests-OSX-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - TEST_HOST = "$(BUNDLE_LOADER)"; - WRAPPER_EXTENSION = xctest; - }; - name = Release; - }; - B3475B66167EA0680044511D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Example-iOS/Example-iOS-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "Example-iOS/Example-iOS-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - B3475B67167EA0680044511D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks\"", - ); - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Example-iOS/Example-iOS-Prefix.pch"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "Example-iOS/Example-iOS-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + INFOPLIST_FILE = VCRURLConnectionTests/Resources/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = app; }; name = Release; }; @@ -845,29 +540,20 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B317B696186E13B400A7C0AE /* Build configuration list for PBXNativeTarget "Tests-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B317B697186E13B400A7C0AE /* Debug */, - B317B698186E13B400A7C0AE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B317B6BA186E1A0200A7C0AE /* Build configuration list for PBXNativeTarget "Tests-OSX" */ = { + B3B4FC0F1ADA178100C997D0 /* Build configuration list for PBXNativeTarget "VCRURLConnection" */ = { isa = XCConfigurationList; buildConfigurations = ( - B317B6BB186E1A0200A7C0AE /* Debug */, - B317B6BC186E1A0200A7C0AE /* Release */, + B3B4FC0B1ADA178100C997D0 /* Debug */, + B3B4FC0C1ADA178100C997D0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B3475B65167EA0680044511D /* Build configuration list for PBXNativeTarget "Example-iOS" */ = { + B3B4FC101ADA178100C997D0 /* Build configuration list for PBXNativeTarget "VCRURLConnectionTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - B3475B66167EA0680044511D /* Debug */, - B3475B67167EA0680044511D /* Release */, + B3B4FC0D1ADA178100C997D0 /* Debug */, + B3B4FC0E1ADA178100C997D0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Tests-OSX.xcscheme b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Tests-OSX.xcscheme deleted file mode 100644 index 463eca8ef..000000000 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Tests-OSX.xcscheme +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Tests-iOS.xcscheme b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Tests-iOS.xcscheme deleted file mode 100644 index 5bf488411..000000000 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Tests-iOS.xcscheme +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Example-iOS.xcscheme b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/VCRURLConnection.xcscheme similarity index 56% rename from XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Example-iOS.xcscheme rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/VCRURLConnection.xcscheme index a764c7a0a..b3d650a66 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/Example-iOS.xcscheme +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection.xcodeproj/xcshareddata/xcschemes/VCRURLConnection.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -28,13 +42,23 @@ shouldUseLaunchSchemeArgsEnv = "YES" buildConfiguration = "Debug"> + + + + @@ -48,15 +72,15 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" allowLocationSimulation = "YES"> - + - + @@ -66,15 +90,15 @@ useCustomWorkingDirectory = "NO" buildConfiguration = "Release" debugDocumentVersioning = "YES"> - + - + diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCR+NSURLSessionConfiguration.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCR+NSURLSessionConfiguration.m index 26403ec01..635c1e869 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCR+NSURLSessionConfiguration.m +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCR+NSURLSessionConfiguration.m @@ -22,8 +22,8 @@ void VCR_addProtocolsToConfiguration(NSURLSessionConfiguration *configuration) { NSMutableArray *protocols = [NSMutableArray arrayWithArray:[configuration protocolClasses]]; - [protocols addObject:[VCRRecordingURLProtocol class]]; - [protocols addObject:[VCRReplayingURLProtocol class]]; + [protocols insertObject:[VCRRecordingURLProtocol class] atIndex:0]; + [protocols insertObject:[VCRReplayingURLProtocol class] atIndex:1]; [configuration setProtocolClasses:protocols]; } diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRCassette.h b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRCassette.h index ad4cb1fdd..05ad14d54 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRCassette.h +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRCassette.h @@ -21,10 +21,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "VCRRequestKey.h" -#import "VCRRecording.h" #import +@class VCRRecording; +@class VCRRequestKey; + @interface VCRCassette : NSObject + (VCRCassette *)cassette; diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRCassette.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRCassette.m index b156248c9..d2abe9911 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRCassette.m +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRCassette.m @@ -100,6 +100,10 @@ - (BOOL)isEqual:(VCRCassette *)cassette { return [self.responseDictionary isEqual:cassette.responseDictionary]; } +- (NSUInteger)hash { + return [self.responseDictionary hash]; +} + - (NSArray *)allKeys { return [self.responseDictionary allKeys]; } diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCROrderedMutableDictionary.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCROrderedMutableDictionary.m index 81f312478..fcc6b3d1c 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCROrderedMutableDictionary.m +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCROrderedMutableDictionary.m @@ -56,15 +56,16 @@ @interface VCROrderedMutableDictionary () @implementation VCROrderedMutableDictionary - (instancetype)init { - return [self initWithCapacity:0]; + if ((self = [super init])) { + _dictionary = [NSMutableDictionary new]; + _array = [NSMutableArray new]; + } + return self; } -- (instancetype)initWithCapacity:(NSUInteger)capacity { - if ((self = [super init])) { - _dictionary = [NSMutableDictionary dictionaryWithCapacity:capacity]; - _array = [NSMutableArray arrayWithCapacity:capacity]; - } - return self; +- (instancetype)initWithCapacity:(NSUInteger)numItems +{ + return [self init]; } - (instancetype)copy { diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRRecording.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRRecording.m index 064edef64..a1635dc9c 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRRecording.m +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRRecording.m @@ -24,11 +24,7 @@ #import "VCRRecording.h" #import "VCROrderedMutableDictionary.h" #import "VCRError.h" -#if TARGET_OS_IPHONE #import -#else -#import -#endif // For -[NSData initWithBase64Encoding:] and -[NSData base64Encoding] // Remove when targetting iOS 7+, use -[NSData initWithBase64EncodedString:options:] and -[NSData base64EncodedStringWithOptions:] instead @@ -68,22 +64,13 @@ - (BOOL)isEqual:(VCRRecording *)recording { [self.body isEqualToString:recording.body]; } -static NSDictionary *SerializableUserInfo(NSDictionary *userInfo) { - NSMutableDictionary *serializableUserInfo = [NSMutableDictionary new]; - for (id key in userInfo) { - id value = userInfo[key]; - if ([value isKindOfClass:[NSError class]]) { - NSError *error = (NSError *)value; - serializableUserInfo[key] = [NSError errorWithDomain:error.domain code:error.code userInfo:SerializableUserInfo(error.userInfo)]; - } else if ([value conformsToProtocol:@protocol(NSCoding)]) { - serializableUserInfo[key] = value; - } - } - return [serializableUserInfo copy]; -} - -- (void)setError:(NSError *)error { - _error = [NSError errorWithDomain:error.domain code:error.code userInfo:SerializableUserInfo(error.userInfo)]; +- (NSUInteger)hash { + const NSUInteger prime = 17; + NSUInteger hash = 1; + hash = prime * hash + [self.method hash]; + hash = prime * hash + [self.URI hash]; + hash = prime * hash + [self.body hash]; + return hash; } - (BOOL)isText { diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests-OSX/Tests-OSX-Info.plist b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/Resources/Info.plist similarity index 78% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests-OSX/Tests-OSX-Info.plist rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/Resources/Info.plist index 2aab29d07..b6a9944f1 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/Tests-OSX/Tests-OSX-Info.plist +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/Resources/Info.plist @@ -5,11 +5,13 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIdentifier - net.dstnbrkr.${PRODUCT_NAME:rfc1034identifier} + com.dstnbrkr.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/cassette-1.json b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/Resources/cassette-1.json similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/cassette-1.json rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/Resources/cassette-1.json diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/test.png b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/Resources/test.png similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/test.png rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/Resources/test.png diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRCassetteManagerTests.h b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRCassetteManagerTests.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRCassetteManagerTests.h rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRCassetteManagerTests.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRCassetteManagerTests.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRCassetteManagerTests.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRCassetteManagerTests.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRCassetteManagerTests.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRCassetteTests.h b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRCassetteTests.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRCassetteTests.h rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRCassetteTests.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRCassetteTests.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRCassetteTests.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRCassetteTests.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRCassetteTests.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRecordingTests.h b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRecordingTests.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRecordingTests.h rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRecordingTests.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRecordingTests.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRecordingTests.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRecordingTests.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRecordingTests.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRecordingURLProtocolTests.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRecordingURLProtocolTests.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRecordingURLProtocolTests.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRecordingURLProtocolTests.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRReplayingURLProtocolTests.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRReplayingURLProtocolTests.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRReplayingURLProtocolTests.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRReplayingURLProtocolTests.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRequestKeyTests.h b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRequestKeyTests.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRequestKeyTests.h rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRequestKeyTests.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRequestKeyTests.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRequestKeyTests.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRRequestKeyTests.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRRequestKeyTests.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRTests.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRTests.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCRTests.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCRTests.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCR_NSURLConnectionTests.h b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCR_NSURLConnectionTests.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCR_NSURLConnectionTests.h rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCR_NSURLConnectionTests.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCR_NSURLConnectionTests.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCR_NSURLConnectionTests.m new file mode 100644 index 000000000..0afa95117 --- /dev/null +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCR_NSURLConnectionTests.m @@ -0,0 +1,158 @@ +// +// VCRURLConnectionTests.m +// +// Copyright (c) 2012 Dustin Barker +// +// 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 "VCR_NSURLConnectionTests.h" +#import "XCTestCase+SRTAdditions.h" +#import "VCRCassetteManager.h" +#import "VCRCassette.h" +#import "VCRRequestKey.h" +#import "VCRRecording.h" +#import "VCR.h" + +@interface VCRTestConnectionController : NSObject +- (void)sendRequest:(NSURLRequest *)request completion:(void (^)())completion; +@property (nonatomic, strong) NSHTTPURLResponse *response; +@property (nonatomic, strong) NSData *data; +@property (nonatomic, strong) NSError *error; +@end + +@implementation VCR_NSURLConnectionTests + +- (void)setUp { + [super setUp]; + [VCR start]; + [[VCRCassetteManager defaultManager] setCurrentCassette:nil]; +} + +- (void)tearDown { + [VCR stop]; + [super tearDown]; +} + +- (void)testResponseIsRecorded { + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.iana.org/domains/reserved"]]; + [self sendRequest:request]; + VCRRecording *recording = [[[VCRCassetteManager defaultManager] currentCassette] recordingForRequest:request]; + XCTAssertEqualObjects(recording.method, request.HTTPMethod, @""); + XCTAssertEqualObjects(recording.URI, [[request URL] absoluteString], @""); + XCTAssert(recording.statusCode != 0, @""); + XCTAssertNotNil(recording.headerFields); +} + +- (void)testResponseIsDelegated { + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.iana.org/domains/reserved"]]; + VCRTestConnectionController *controller = [self sendRequest:request]; + VCRRecording *recording = [[[VCRCassetteManager defaultManager] currentCassette] recordingForRequest:request]; + XCTAssertEqualObjects(controller.data, recording.data, @"Received data should equal recorded data"); + XCTAssertEqual(controller.response.statusCode, recording.statusCode, @""); +} + +- (void)testResponseIsReplayed { + NSString *uri = @"http://foo"; + id json = @{ @"method": @"GET", @"uri": uri, @"body": @"Foo Bar Baz" }; + VCRCassette *cassette = [[VCRCassette alloc] initWithJSON:@[ json ]]; + [[VCRCassetteManager defaultManager] setCurrentCassette:cassette]; + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:uri]]; + VCRRecording *recording = [[[VCRCassetteManager defaultManager] currentCassette] recordingForRequest:request]; + VCRTestConnectionController *controller = [self sendRequest:request]; + XCTAssertEqualObjects(controller.data, recording.data, @"Received data should equal recorded data"); + XCTAssertEqual(controller.response.statusCode, recording.statusCode, @""); +} + +- (void)testErrorIsRecorded { + NSURL *url = [NSURL URLWithString:@"http://z/foo"]; // non-existent host + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + [self sendRequest:request]; + VCRRecording *recording = [[[VCRCassetteManager defaultManager] currentCassette] recordingForRequest:request]; + XCTAssertNotNil(recording); + XCTAssertNotNil(recording.error, @""); +} + +- (void)testErrorIsDelegated { + NSURL *url = [NSURL URLWithString:@"http://z/foo"]; // non-existent host + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + VCRTestConnectionController *controller = [self sendRequest:request]; + VCRRecording *recording = [[[VCRCassetteManager defaultManager] currentCassette] recordingForRequest:request]; + XCTAssertEqualObjects(controller.data, recording.data, @"Received data should equal recorded data"); + XCTAssertEqual(controller.response.statusCode, recording.statusCode, @""); + XCTAssertNotNil(controller.error, @""); +} + +- (void)testErrorIsReplayed { + NSString *uri = @"http://foo"; + id json = @{ @"method": @"get", @"uri": uri, @"status": @404 }; + VCRCassette *cassette = [[VCRCassette alloc] initWithJSON:@[ json ]]; + [[VCRCassetteManager defaultManager] setCurrentCassette:cassette]; + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:uri]]; + VCRRecording *recording = [[[VCRCassetteManager defaultManager] currentCassette] recordingForRequest:request]; + VCRTestConnectionController *controller = [self sendRequest:request]; + XCTAssertEqualObjects(controller.data, recording.data, @"Received data should equal recorded data"); + XCTAssertEqual(controller.response.statusCode, recording.statusCode, @""); +} + +#pragma Helpers + +- (VCRTestConnectionController *)sendRequest:(NSURLRequest *)request { + XCTestExpectation *expectation = [self expectationWithDescription:nil]; + VCRTestConnectionController *controller = [[VCRTestConnectionController alloc] init]; + [controller sendRequest:request completion:^{ + [expectation fulfill]; + }]; + [self waitForExpectationsWithTimeout:60 handler:nil]; + return controller; +} + +@end + + +@implementation VCRTestConnectionController +{ + dispatch_block_t _completion; +} + +- (void)sendRequest:(NSURLRequest *)request completion:(void (^)())completion { + _completion = completion; + NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self]; + [connection start]; +} + +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSHTTPURLResponse *)response { + self.response = response; +} + +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { + NSMutableData *currentData = [NSMutableData dataWithData:self.data]; + [currentData appendData:data]; + self.data = currentData; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + _completion(); +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + _error = error; + _completion(); +} + +@end diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCR_NSURLSessionTests.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCR_NSURLSessionTests.m similarity index 57% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/VCR_NSURLSessionTests.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCR_NSURLSessionTests.m index 14836ce4b..44a19ad6a 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/Tests/VCR_NSURLSessionTests.m +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/VCR_NSURLSessionTests.m @@ -53,22 +53,24 @@ - (void)testResponseIsRecordedWithSession:(NSURLSession *)session { __block BOOL completed = NO; __block NSData *receivedData; __block NSHTTPURLResponse *httpResponse; - [self recordRequest:request requestBlock:^{ - NSURLSessionDataTask *task = [session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - completed = YES; - receivedData = data; - httpResponse = (NSHTTPURLResponse *)response; - }]; - [task resume]; - } predicateBlock:^BOOL{ - return completed; - } completion:^(VCRRecording *recording) { - XCTAssertEqual(recording.statusCode, httpResponse.statusCode, @""); - XCTAssertEqualObjects(recording.data, receivedData, @""); - - [self testRecording:recording forRequest:request]; - }]; + XCTestExpectation *expectation = [self expectationWithDescription:nil]; + NSURLSessionDataTask *task = [session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + completed = YES; + receivedData = data; + httpResponse = (NSHTTPURLResponse *)response; + [expectation fulfill]; + }]; + [task resume]; + [self waitForExpectationsWithTimeout:60 handler:nil]; + + VCRRecording *recording = [[[VCRCassetteManager defaultManager] currentCassette] recordingForRequest:request]; + XCTAssertEqual(recording.statusCode, httpResponse.statusCode, @""); + XCTAssertEqualObjects(recording.data, receivedData, @""); + XCTAssertEqualObjects(recording.method, request.HTTPMethod, @""); + XCTAssertEqualObjects(recording.URI, [[request URL] absoluteString], @""); + XCTAssert(recording.statusCode != 0, @""); + XCTAssertNotNil(recording.headerFields); } - (void)testResponseIsRecordedForSharedSession { @@ -87,24 +89,29 @@ - (void)testResponseIsRecordedForEphemeralSession { // FIXME: need bundle id to test background session - (void)testResponseIsReplayedWithSession:(NSURLSession *)session { - id json = @{ @"method": @"GET", @"uri": @"http://foo", @"body": @"Foo Bar Baz" }; + NSString *uri = @"http://foo"; + id json = @{ @"method": @"GET", @"uri": uri, @"body": @"Foo Bar Baz" }; + VCRCassette *cassette = [[VCRCassette alloc] initWithJSON:@[ json ]]; + [[VCRCassetteManager defaultManager] setCurrentCassette:cassette]; + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:uri]]; + VCRRecording *recording = [[[VCRCassetteManager defaultManager] currentCassette] recordingForRequest:request]; + __block BOOL completed = NO; __block NSData *receivedData; __block NSHTTPURLResponse *httpResponse; - [self replayJSON:json requestBlock:^(NSURLRequest *request) { - NSURLSessionDataTask *task = [session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - completed = YES; - receivedData = data; - httpResponse = (NSHTTPURLResponse *)response; - }]; - [task resume]; - } predicateBlock:^BOOL{ - return completed; - } completion:^(VCRRecording *recording) { - XCTAssertEqual(httpResponse.statusCode, recording.statusCode, @""); - XCTAssertEqualObjects(receivedData, recording.data, @""); - }]; + XCTestExpectation *expectation = [self expectationWithDescription:nil]; + NSURLSessionDataTask *task = [session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + completed = YES; + receivedData = data; + httpResponse = (NSHTTPURLResponse *)response; + [expectation fulfill]; + }]; + [task resume]; + + [self waitForExpectationsWithTimeout:60 handler:nil]; + XCTAssertEqual(httpResponse.statusCode, recording.statusCode, @""); + XCTAssertEqualObjects(receivedData, recording.data, @""); } - (void)testResponseIsReplayedForSharedSession { diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/XCTestCase+SRTAdditions.h b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/XCTestCase+SRTAdditions.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/XCTestCase+SRTAdditions.h rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/XCTestCase+SRTAdditions.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/XCTestCase+SRTAdditions.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/XCTestCase+SRTAdditions.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/XCTestCase+SRTAdditions.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/XCTestCase+SRTAdditions.m diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/XCTestCase+VCR.h b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/XCTestCase+VCR.h similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/XCTestCase+VCR.h rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/XCTestCase+VCR.h diff --git a/XCDYouTubeKit Tests/VCRURLConnection/Tests/XCTestCase+VCR.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/XCTestCase+VCR.m similarity index 100% rename from XCDYouTubeKit Tests/VCRURLConnection/Tests/XCTestCase+VCR.m rename to XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnectionTests/XCTestCase+VCR.m From c96eafa591196808cfe92cabcd206cc3eaebab99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Mon, 12 Oct 2015 21:53:41 +0200 Subject: [PATCH 19/96] Fix VCRURLConnection compilation on OS X --- .../VCRURLConnection/VCRURLConnection/VCRRecording.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRRecording.m b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRRecording.m index a1635dc9c..b9fc1d90b 100644 --- a/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRRecording.m +++ b/XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection/VCRRecording.m @@ -24,7 +24,11 @@ #import "VCRRecording.h" #import "VCROrderedMutableDictionary.h" #import "VCRError.h" +#if TARGET_OS_IPHONE #import +#else +#import +#endif // For -[NSData initWithBase64Encoding:] and -[NSData base64Encoding] // Remove when targetting iOS 7+, use -[NSData initWithBase64EncodedString:options:] and -[NSData base64EncodedStringWithOptions:] instead From 9936b6d9b009c884d5215d206470be8f6d07c5d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Sun, 4 Oct 2015 22:41:00 +0200 Subject: [PATCH 20/96] Pass `connectionData` and `response` as parameters --- XCDYouTubeKit/XCDYouTubeVideoOperation.m | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/XCDYouTubeKit/XCDYouTubeVideoOperation.m b/XCDYouTubeKit/XCDYouTubeVideoOperation.m index 8396b8500..121415d96 100644 --- a/XCDYouTubeKit/XCDYouTubeVideoOperation.m +++ b/XCDYouTubeKit/XCDYouTubeVideoOperation.m @@ -116,13 +116,13 @@ - (void) startRequestWithURL:(NSURL *)url type:(XCDYouTubeRequestType)requestTyp self.connection = connection; } -- (void) handleVideoInfoResponseWithInfo:(NSDictionary *)info +- (void) handleVideoInfoResponseWithInfo:(NSDictionary *)info response:(NSURLResponse *)response { XCDYouTubeLogDebug(@"Handling video info response"); XCDYouTubeLogVerbose(@"Video info: %@", info); NSError *error = nil; - XCDYouTubeVideo *video = [[XCDYouTubeVideo alloc] initWithIdentifier:self.videoIdentifier info:info playerScript:self.playerScript response:self.response error:&error]; + XCDYouTubeVideo *video = [[XCDYouTubeVideo alloc] initWithIdentifier:self.videoIdentifier info:info playerScript:self.playerScript response:response error:&error]; if (video) { [video mergeVideo:self.noStreamVideo]; @@ -147,11 +147,11 @@ - (void) handleVideoInfoResponseWithInfo:(NSDictionary *)info } } -- (void) handleWebPageResponse +- (void) handleWebPageWithData:(NSData *)data response:(NSURLResponse *)response { XCDYouTubeLogDebug(@"Handling web page response"); - self.webpage = [[XCDYouTubeVideoWebpage alloc] initWithData:self.connectionData response:self.response]; + self.webpage = [[XCDYouTubeVideoWebpage alloc] initWithData:data response:response]; if (self.webpage.javaScriptPlayerURL) { @@ -171,11 +171,11 @@ - (void) handleWebPageResponse } } -- (void) handleEmbedWebPageResponse +- (void) handleEmbedWebPageWithData:(NSData *)data response:(NSURLResponse *)response { XCDYouTubeLogDebug(@"Handling embed web page response"); - self.embedWebpage = [[XCDYouTubeVideoWebpage alloc] initWithData:self.connectionData response:self.response]; + self.embedWebpage = [[XCDYouTubeVideoWebpage alloc] initWithData:data response:response]; if (self.embedWebpage.javaScriptPlayerURL) { @@ -187,11 +187,11 @@ - (void) handleEmbedWebPageResponse } } -- (void) handleJavaScriptPlayerResponse +- (void) handleJavaScriptPlayerWithData:(NSData *)data response:(NSURLResponse *)response { XCDYouTubeLogDebug(@"Handling JavaScript player response"); - NSString *script = [[NSString alloc] initWithData:self.connectionData encoding:NSISOLatin1StringEncoding]; + NSString *script = [[NSString alloc] initWithData:data encoding:NSISOLatin1StringEncoding]; self.playerScript = [[XCDYouTubePlayerScript alloc] initWithString:script]; if (self.webpage.isAgeRestricted) @@ -205,7 +205,7 @@ - (void) handleJavaScriptPlayerResponse } else { - [self handleVideoInfoResponseWithInfo:self.webpage.videoInfo]; + [self handleVideoInfoResponseWithInfo:self.webpage.videoInfo response:response]; } } @@ -282,17 +282,17 @@ - (void) connectionDidFinishLoading:(NSURLConnection *)connection { NSString *videoQuery = [[NSString alloc] initWithData:self.connectionData encoding:NSASCIIStringEncoding]; NSDictionary *info = XCDDictionaryWithQueryString(videoQuery, NSUTF8StringEncoding); - [self handleVideoInfoResponseWithInfo:info]; + [self handleVideoInfoResponseWithInfo:info response:self.response]; } break; case XCDYouTubeRequestTypeWatchPage: - [self handleWebPageResponse]; + [self handleWebPageWithData:self.connectionData response:self.response]; break; case XCDYouTubeRequestTypeEmbedPage: - [self handleEmbedWebPageResponse]; + [self handleEmbedWebPageWithData:self.connectionData response:self.response]; break; case XCDYouTubeRequestTypeJavaScriptPlayer: - [self handleJavaScriptPlayerResponse]; + [self handleJavaScriptPlayerWithData:self.connectionData response:self.response]; break; } } From fe27df90f1daff815823da3e2ad2d232120d199d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Sun, 4 Oct 2015 22:45:20 +0200 Subject: [PATCH 21/96] Extract handle connection success/error methods --- XCDYouTubeKit/XCDYouTubeVideoOperation.m | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/XCDYouTubeKit/XCDYouTubeVideoOperation.m b/XCDYouTubeKit/XCDYouTubeVideoOperation.m index 121415d96..24cdfdb27 100644 --- a/XCDYouTubeKit/XCDYouTubeVideoOperation.m +++ b/XCDYouTubeKit/XCDYouTubeVideoOperation.m @@ -276,28 +276,38 @@ - (void) connection:(NSURLConnection *)connection didReceiveData:(NSData *)data - (void) connectionDidFinishLoading:(NSURLConnection *)connection { XCDYouTubeRequestType requestType = [objc_getAssociatedObject(connection, XCDYouTubeRequestTypeKey) unsignedIntegerValue]; + [self handleConnectionSuccessWithData:self.connectionData response:self.response requestType:requestType]; +} + +- (void) handleConnectionSuccessWithData:(NSData *)data response:(NSURLResponse *)response requestType:(XCDYouTubeRequestType)requestType +{ switch (requestType) { case XCDYouTubeRequestTypeGetVideoInfo: { - NSString *videoQuery = [[NSString alloc] initWithData:self.connectionData encoding:NSASCIIStringEncoding]; + NSString *videoQuery = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; NSDictionary *info = XCDDictionaryWithQueryString(videoQuery, NSUTF8StringEncoding); - [self handleVideoInfoResponseWithInfo:info response:self.response]; + [self handleVideoInfoResponseWithInfo:info response:response]; } break; case XCDYouTubeRequestTypeWatchPage: - [self handleWebPageWithData:self.connectionData response:self.response]; + [self handleWebPageWithData:data response:response]; break; case XCDYouTubeRequestTypeEmbedPage: - [self handleEmbedWebPageWithData:self.connectionData response:self.response]; + [self handleEmbedWebPageWithData:data response:response]; break; case XCDYouTubeRequestTypeJavaScriptPlayer: - [self handleJavaScriptPlayerWithData:self.connectionData response:self.response]; + [self handleJavaScriptPlayerWithData:data response:response]; break; } } - (void) connection:(NSURLConnection *)connection didFailWithError:(NSError *)connectionError +{ + [self handleConnectionError:connectionError]; +} + +- (void) handleConnectionError:(NSError *)connectionError { NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: connectionError.localizedDescription, NSUnderlyingErrorKey: connectionError }; From c0df2c86ed0bbd9cd187b633f8f4246c78958e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Tue, 6 Oct 2015 16:02:42 +0200 Subject: [PATCH 22/96] Use NSURLSessionDataTask instead of NSURLConnection --- XCDYouTubeKit/XCDYouTubeVideoOperation.m | 54 ++++++------------------ 1 file changed, 14 insertions(+), 40 deletions(-) diff --git a/XCDYouTubeKit/XCDYouTubeVideoOperation.m b/XCDYouTubeKit/XCDYouTubeVideoOperation.m index 24cdfdb27..21084e23d 100644 --- a/XCDYouTubeKit/XCDYouTubeVideoOperation.m +++ b/XCDYouTubeKit/XCDYouTubeVideoOperation.m @@ -12,8 +12,6 @@ #import "XCDYouTubePlayerScript.h" #import "XCDYouTubeLogger.h" -static const void * const XCDYouTubeRequestTypeKey = &XCDYouTubeRequestTypeKey; - typedef NS_ENUM(NSUInteger, XCDYouTubeRequestType) { XCDYouTubeRequestTypeGetVideoInfo = 1, XCDYouTubeRequestTypeWatchPage, @@ -21,14 +19,12 @@ typedef NS_ENUM(NSUInteger, XCDYouTubeRequestType) { XCDYouTubeRequestTypeJavaScriptPlayer, }; -@interface XCDYouTubeVideoOperation () +@interface XCDYouTubeVideoOperation () @property (atomic, copy, readonly) NSString *videoIdentifier; @property (atomic, copy, readonly) NSString *languageIdentifier; @property (atomic, assign) NSInteger requestCount; -@property (atomic, strong) NSURLConnection *connection; -@property (atomic, strong) NSURLResponse *response; -@property (atomic, strong) NSMutableData *connectionData; +@property (atomic, assign) XCDYouTubeRequestType requestType; @property (atomic, strong) NSMutableArray *eventLabels; @property (atomic, assign) BOOL keepRunning; @@ -68,8 +64,7 @@ - (void) startNextRequest { if (self.eventLabels.count == 0) { - XCDYouTubeRequestType requestType = [objc_getAssociatedObject(self.connection, XCDYouTubeRequestTypeKey) unsignedIntegerValue]; - if (requestType == XCDYouTubeRequestTypeWatchPage || self.webpage) + if (self.requestType == XCDYouTubeRequestTypeWatchPage || self.webpage) [self finishWithError]; else [self startWatchPageRequest]; @@ -109,11 +104,17 @@ - (void) startRequestWithURL:(NSURL *)url type:(XCDYouTubeRequestType)requestTyp NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10]; [request setValue:self.languageIdentifier forHTTPHeaderField:@"Accept-Language"]; - NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO]; - objc_setAssociatedObject(connection, XCDYouTubeRequestTypeKey, @(requestType), OBJC_ASSOCIATION_RETAIN); - [connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; - [connection start]; - self.connection = connection; + NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration ephemeralSessionConfiguration]]; + NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) + { + if (error) + [self handleConnectionError:error]; + else + [self handleConnectionSuccessWithData:data response:response requestType:requestType]; + }]; + [dataTask resume]; + + self.requestType = requestType; } - (void) handleVideoInfoResponseWithInfo:(NSDictionary *)info response:(NSURLResponse *)response @@ -249,8 +250,6 @@ - (void) cancel [super cancel]; - [self.connection cancel]; - [self finish]; } @@ -259,26 +258,6 @@ - (void) finish self.keepRunning = NO; } -#pragma mark - NSURLConnectionDataDelegate / NSURLConnectionDelegate - -- (void) connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response -{ - NSUInteger capacity = response.expectedContentLength == NSURLResponseUnknownLength ? 0 : (NSUInteger)response.expectedContentLength; - self.connectionData = [[NSMutableData alloc] initWithCapacity:capacity]; - self.response = response; -} - -- (void) connection:(NSURLConnection *)connection didReceiveData:(NSData *)data -{ - [self.connectionData appendData:data]; -} - -- (void) connectionDidFinishLoading:(NSURLConnection *)connection -{ - XCDYouTubeRequestType requestType = [objc_getAssociatedObject(connection, XCDYouTubeRequestTypeKey) unsignedIntegerValue]; - [self handleConnectionSuccessWithData:self.connectionData response:self.response requestType:requestType]; -} - - (void) handleConnectionSuccessWithData:(NSData *)data response:(NSURLResponse *)response requestType:(XCDYouTubeRequestType)requestType { switch (requestType) @@ -302,11 +281,6 @@ - (void) handleConnectionSuccessWithData:(NSData *)data response:(NSURLResponse } } -- (void) connection:(NSURLConnection *)connection didFailWithError:(NSError *)connectionError -{ - [self handleConnectionError:connectionError]; -} - - (void) handleConnectionError:(NSError *)connectionError { NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: connectionError.localizedDescription, From 9a8767f68a85a3ca5a560fa451e68ecd524db371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Tue, 6 Oct 2015 22:05:49 +0200 Subject: [PATCH 23/96] Reorganize XCDYouTubeVideoOperation methods --- XCDYouTubeKit/XCDYouTubeVideoOperation.m | 82 +++++++++++++----------- 1 file changed, 45 insertions(+), 37 deletions(-) diff --git a/XCDYouTubeKit/XCDYouTubeVideoOperation.m b/XCDYouTubeKit/XCDYouTubeVideoOperation.m index 21084e23d..b2c4ab5ae 100644 --- a/XCDYouTubeKit/XCDYouTubeVideoOperation.m +++ b/XCDYouTubeKit/XCDYouTubeVideoOperation.m @@ -60,6 +60,8 @@ - (instancetype) initWithVideoIdentifier:(NSString *)videoIdentifier languageIde return self; } +#pragma mark - Requests + - (void) startNextRequest { if (self.eventLabels.count == 0) @@ -117,6 +119,42 @@ - (void) startRequestWithURL:(NSURL *)url type:(XCDYouTubeRequestType)requestTyp self.requestType = requestType; } +#pragma mark - Response Dispatch + +- (void) handleConnectionSuccessWithData:(NSData *)data response:(NSURLResponse *)response requestType:(XCDYouTubeRequestType)requestType +{ + switch (requestType) + { + case XCDYouTubeRequestTypeGetVideoInfo: + { + NSString *videoQuery = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; + NSDictionary *info = XCDDictionaryWithQueryString(videoQuery, NSUTF8StringEncoding); + [self handleVideoInfoResponseWithInfo:info response:response]; + } + break; + case XCDYouTubeRequestTypeWatchPage: + [self handleWebPageWithData:data response:response]; + break; + case XCDYouTubeRequestTypeEmbedPage: + [self handleEmbedWebPageWithData:data response:response]; + break; + case XCDYouTubeRequestTypeJavaScriptPlayer: + [self handleJavaScriptPlayerWithData:data response:response]; + break; + } +} + +- (void) handleConnectionError:(NSError *)connectionError +{ + NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: connectionError.localizedDescription, + NSUnderlyingErrorKey: connectionError }; + self.lastError = [NSError errorWithDomain:XCDYouTubeVideoErrorDomain code:XCDYouTubeErrorNetwork userInfo:userInfo]; + + [self startNextRequest]; +} + +#pragma mark - Response Parsing + - (void) handleVideoInfoResponseWithInfo:(NSDictionary *)info response:(NSURLResponse *)response { XCDYouTubeLogDebug(@"Handling video info response"); @@ -210,6 +248,8 @@ - (void) handleJavaScriptPlayerWithData:(NSData *)data response:(NSURLResponse * } } +#pragma mark - Finish Operation + - (void) finishWithVideo:(XCDYouTubeVideo *)video { self.video = video; @@ -225,6 +265,11 @@ - (void) finishWithError [self finish]; } +- (void) finish +{ + self.keepRunning = NO; +} + #pragma mark - NSOperation - (void) main @@ -253,43 +298,6 @@ - (void) cancel [self finish]; } -- (void) finish -{ - self.keepRunning = NO; -} - -- (void) handleConnectionSuccessWithData:(NSData *)data response:(NSURLResponse *)response requestType:(XCDYouTubeRequestType)requestType -{ - switch (requestType) - { - case XCDYouTubeRequestTypeGetVideoInfo: - { - NSString *videoQuery = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; - NSDictionary *info = XCDDictionaryWithQueryString(videoQuery, NSUTF8StringEncoding); - [self handleVideoInfoResponseWithInfo:info response:response]; - } - break; - case XCDYouTubeRequestTypeWatchPage: - [self handleWebPageWithData:data response:response]; - break; - case XCDYouTubeRequestTypeEmbedPage: - [self handleEmbedWebPageWithData:data response:response]; - break; - case XCDYouTubeRequestTypeJavaScriptPlayer: - [self handleJavaScriptPlayerWithData:data response:response]; - break; - } -} - -- (void) handleConnectionError:(NSError *)connectionError -{ - NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: connectionError.localizedDescription, - NSUnderlyingErrorKey: connectionError }; - self.lastError = [NSError errorWithDomain:XCDYouTubeVideoErrorDomain code:XCDYouTubeErrorNetwork userInfo:userInfo]; - - [self startNextRequest]; -} - #pragma mark - NSObject - (NSString *) description From 3979d546b8cc5f73ceefe7e82b063bfdeb68e3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Sat, 10 Oct 2015 01:16:16 +0200 Subject: [PATCH 24/96] Keep the NSURLSessionDataTask around in a strong property --- XCDYouTubeKit/XCDYouTubeVideoOperation.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/XCDYouTubeKit/XCDYouTubeVideoOperation.m b/XCDYouTubeKit/XCDYouTubeVideoOperation.m index b2c4ab5ae..2408af53d 100644 --- a/XCDYouTubeKit/XCDYouTubeVideoOperation.m +++ b/XCDYouTubeKit/XCDYouTubeVideoOperation.m @@ -26,6 +26,7 @@ @interface XCDYouTubeVideoOperation () @property (atomic, assign) NSInteger requestCount; @property (atomic, assign) XCDYouTubeRequestType requestType; @property (atomic, strong) NSMutableArray *eventLabels; +@property (atomic, strong) NSURLSessionDataTask *dataTask; @property (atomic, assign) BOOL keepRunning; @@ -107,14 +108,14 @@ - (void) startRequestWithURL:(NSURL *)url type:(XCDYouTubeRequestType)requestTyp [request setValue:self.languageIdentifier forHTTPHeaderField:@"Accept-Language"]; NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration ephemeralSessionConfiguration]]; - NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) + self.dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) [self handleConnectionError:error]; else [self handleConnectionSuccessWithData:data response:response requestType:requestType]; }]; - [dataTask resume]; + [self.dataTask resume]; self.requestType = requestType; } From 0806845b4789550126da4ba90e2964043ebf60ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Mon, 12 Oct 2015 14:17:10 +0200 Subject: [PATCH 25/96] Make XCDYouTubeVideoOperation asynchronous --- .../testStartingOnMainThread.json | 85 ++++++++++++++++++- .../XCDYouTubeVideoOperationTestCase.m | 15 +++- XCDYouTubeKit/XCDYouTubeVideoOperation.h | 2 - XCDYouTubeKit/XCDYouTubeVideoOperation.m | 30 ++++--- 4 files changed, 116 insertions(+), 16 deletions(-) diff --git a/XCDYouTubeKit Tests/Cassettes/XCDYouTubeVideoOperationTestCase/testStartingOnMainThread.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeVideoOperationTestCase/testStartingOnMainThread.json index 0637a088a..f75052590 100644 --- a/XCDYouTubeKit Tests/Cassettes/XCDYouTubeVideoOperationTestCase/testStartingOnMainThread.json +++ b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeVideoOperationTestCase/testStartingOnMainThread.json @@ -1 +1,84 @@ -[] \ No newline at end of file +[ + { + "body" : "