Skip to content

Commit 23f7659

Browse files
committed
Merge branch 'release/2.15.2'
2 parents 18537a0 + 9e629ff commit 23f7659

File tree

16 files changed

+343
-170
lines changed

16 files changed

+343
-170
lines changed

.jazzy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ source_directory: XCDYouTubeKit
44
framework_root: .
55
umbrella_header: XCDYouTubeKit/XCDYouTubeKit.h
66
module: XCDYouTubeKit
7-
module_version: 2.15.1
7+
module_version: 2.15.2
88

99
author: Cédric Luthi
1010
author_url: https://twitter.com/0xced
1111

1212
readme: README.md
1313
github_url: https://github.com/0xced/XCDYouTubeKit
14-
github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.15.1/XCDYouTubeKit
14+
github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.15.2/XCDYouTubeKit

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#### Version 2.15.2
2+
3+
* Adaptation to YouTube API change (#510)
4+
15
#### Version 2.15.1
26

37
* Adaptation to YouTube API change (#507, #504)

XCDYouTubeKit Demo/OS X Demo/AppDelegate.m

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44

55
#import "AppDelegate.h"
6-
6+
#import "VCR.h"
77
@import AVFoundation;
88

99
#import <CocoaLumberjack/CocoaLumberjack.h>
@@ -18,14 +18,40 @@ - (void) applicationDidFinishLaunching:(NSNotification *)aNotification
1818
[DDLog addLogger:[DDASLLogger sharedInstance]];
1919
}
2020

21+
- (BOOL) shouldSaveRequests
22+
{
23+
return [[NSProcessInfo processInfo].environment[@"XCDYouTubeKitSaveRequest"] boolValue];
24+
}
25+
26+
- (NSString *)requestsDirectoryPath
27+
{
28+
NSString *requestsDirectoryPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)firstObject] stringByAppendingPathComponent:@"XCDYouTubeKit Demo"];
29+
[[NSFileManager defaultManager]createDirectoryAtPath:requestsDirectoryPath withIntermediateDirectories:YES attributes:nil error:nil];
30+
return requestsDirectoryPath;
31+
}
32+
2133
- (IBAction) playVideo:(id)sender
2234
{
35+
if ([self shouldSaveRequests])
36+
{
37+
[VCR setRecording:YES];
38+
}
39+
2340
self.playerView.player = nil;
2441

2542
[self.progressIndicator startAnimation:sender];
2643
[[XCDYouTubeClient defaultClient] getVideoWithIdentifier:[sender stringValue] completionHandler:^(XCDYouTubeVideo *video, NSError *error)
2744
{
2845

46+
if ([self shouldSaveRequests])
47+
{
48+
[VCR setRecording:NO];
49+
NSString *filePath = [[[self requestsDirectoryPath] stringByAppendingPathComponent:[sender stringValue]] stringByAppendingPathExtension:@"json"];
50+
[[NSFileManager defaultManager]removeItemAtPath:filePath error:nil];
51+
[VCR save:filePath];
52+
53+
}
54+
2955
if (video)
3056
{
3157

XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
/* Begin PBXBuildFile section */
1010
019AFA1E2361E9CD00B03F57 /* DemoFullScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 019AFA1D2361E9CC00B03F57 /* DemoFullScreenViewController.swift */; };
1111
019AFA202361F10D00B03F57 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 019AFA1F2361F10D00B03F57 /* Utilities.swift */; };
12+
01D6A808257E89CE0017AD5A /* VCR.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A7F3257E89CE0017AD5A /* VCR.m */; };
13+
01D6A809257E89CF0017AD5A /* VCRRecordingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A7F5257E89CE0017AD5A /* VCRRecordingURLProtocol.m */; };
14+
01D6A80A257E89CF0017AD5A /* VCRReplayingURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A7F6257E89CE0017AD5A /* VCRReplayingURLProtocol.m */; };
15+
01D6A80B257E89CF0017AD5A /* VCRRecording.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A7F8257E89CE0017AD5A /* VCRRecording.m */; };
16+
01D6A80C257E89CF0017AD5A /* VCRErrorSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A7FA257E89CE0017AD5A /* VCRErrorSerialization.m */; };
17+
01D6A80D257E89CF0017AD5A /* VCRCassette.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A7FD257E89CE0017AD5A /* VCRCassette.m */; };
18+
01D6A80E257E89CF0017AD5A /* VCR+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A802257E89CE0017AD5A /* VCR+NSURLSessionConfiguration.m */; };
19+
01D6A80F257E89CF0017AD5A /* VCROrderedMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A804257E89CE0017AD5A /* VCROrderedMutableDictionary.m */; };
20+
01D6A810257E89CF0017AD5A /* VCRCassetteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A805257E89CE0017AD5A /* VCRCassetteManager.m */; };
21+
01D6A811257E89CF0017AD5A /* VCRRequestKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D6A807257E89CE0017AD5A /* VCRRequestKey.m */; };
1222
01E88BD523690B75002523D1 /* AVPlayerViewControllerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E88BD423690B75002523D1 /* AVPlayerViewControllerManager.swift */; };
1323
0ADD88CC5EC5E9D286D8A8E0 /* libPods-XCDYouTubeKit iOS Demo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B3DDE49D0638521AD03AA01 /* libPods-XCDYouTubeKit iOS Demo.a */; };
1424
6941B80FC7AE87BA698FDD61 /* libPods-XCDYouTubeKit OS X Demo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CF61ADAFAE5A8C5F8C082438 /* libPods-XCDYouTubeKit OS X Demo.a */; };
@@ -93,6 +103,27 @@
93103
019AFA1C2361E9CC00B03F57 /* XCDYouTubeKit iOS Demo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "XCDYouTubeKit iOS Demo-Bridging-Header.h"; sourceTree = "<group>"; };
94104
019AFA1D2361E9CC00B03F57 /* DemoFullScreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoFullScreenViewController.swift; sourceTree = "<group>"; };
95105
019AFA1F2361F10D00B03F57 /* Utilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = "<group>"; };
106+
01D6A7F3257E89CE0017AD5A /* VCR.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCR.m; sourceTree = "<group>"; };
107+
01D6A7F4257E89CE0017AD5A /* VCRCassette.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassette.h; sourceTree = "<group>"; };
108+
01D6A7F5257E89CE0017AD5A /* VCRRecordingURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRecordingURLProtocol.m; sourceTree = "<group>"; };
109+
01D6A7F6257E89CE0017AD5A /* VCRReplayingURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRReplayingURLProtocol.m; sourceTree = "<group>"; };
110+
01D6A7F7257E89CE0017AD5A /* VCROrderedMutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCROrderedMutableDictionary.h; sourceTree = "<group>"; };
111+
01D6A7F8257E89CE0017AD5A /* VCRRecording.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRecording.m; sourceTree = "<group>"; };
112+
01D6A7F9257E89CE0017AD5A /* VCR+NSURLSessionConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "VCR+NSURLSessionConfiguration.h"; sourceTree = "<group>"; };
113+
01D6A7FA257E89CE0017AD5A /* VCRErrorSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRErrorSerialization.m; sourceTree = "<group>"; };
114+
01D6A7FB257E89CE0017AD5A /* VCRRequestKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRequestKey.h; sourceTree = "<group>"; };
115+
01D6A7FC257E89CE0017AD5A /* VCRCassetteManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassetteManager.h; sourceTree = "<group>"; };
116+
01D6A7FD257E89CE0017AD5A /* VCRCassette.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRCassette.m; sourceTree = "<group>"; };
117+
01D6A7FE257E89CE0017AD5A /* VCR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCR.h; sourceTree = "<group>"; };
118+
01D6A7FF257E89CE0017AD5A /* VCRReplayingURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRReplayingURLProtocol.h; sourceTree = "<group>"; };
119+
01D6A800257E89CE0017AD5A /* VCRRecordingURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRecordingURLProtocol.h; sourceTree = "<group>"; };
120+
01D6A801257E89CE0017AD5A /* VCRErrorSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRErrorSerialization.h; sourceTree = "<group>"; };
121+
01D6A802257E89CE0017AD5A /* VCR+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "VCR+NSURLSessionConfiguration.m"; sourceTree = "<group>"; };
122+
01D6A803257E89CE0017AD5A /* VCRRecording.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRRecording.h; sourceTree = "<group>"; };
123+
01D6A804257E89CE0017AD5A /* VCROrderedMutableDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCROrderedMutableDictionary.m; sourceTree = "<group>"; };
124+
01D6A805257E89CE0017AD5A /* VCRCassetteManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRCassetteManager.m; sourceTree = "<group>"; };
125+
01D6A806257E89CE0017AD5A /* VCRCassette_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VCRCassette_Private.h; sourceTree = "<group>"; };
126+
01D6A807257E89CE0017AD5A /* VCRRequestKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VCRRequestKey.m; sourceTree = "<group>"; };
96127
01E88BD423690B75002523D1 /* AVPlayerViewControllerManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVPlayerViewControllerManager.swift; sourceTree = "<group>"; };
97128
044E71F373F947A64C774319 /* Pods-XCDYouTubeKit iOS Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XCDYouTubeKit iOS Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-XCDYouTubeKit iOS Demo/Pods-XCDYouTubeKit iOS Demo.debug.xcconfig"; sourceTree = "<group>"; };
98129
4805F31947DAD8E88035A44A /* Pods-XCDYouTubeKit OS X Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XCDYouTubeKit OS X Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-XCDYouTubeKit OS X Demo/Pods-XCDYouTubeKit OS X Demo.release.xcconfig"; sourceTree = "<group>"; };
@@ -196,9 +227,39 @@
196227
/* End PBXFrameworksBuildPhase section */
197228

198229
/* Begin PBXGroup section */
230+
01D6A7F2257E89CE0017AD5A /* VCRURLConnection */ = {
231+
isa = PBXGroup;
232+
children = (
233+
01D6A7F3257E89CE0017AD5A /* VCR.m */,
234+
01D6A7F4257E89CE0017AD5A /* VCRCassette.h */,
235+
01D6A7F5257E89CE0017AD5A /* VCRRecordingURLProtocol.m */,
236+
01D6A7F6257E89CE0017AD5A /* VCRReplayingURLProtocol.m */,
237+
01D6A7F7257E89CE0017AD5A /* VCROrderedMutableDictionary.h */,
238+
01D6A7F8257E89CE0017AD5A /* VCRRecording.m */,
239+
01D6A7F9257E89CE0017AD5A /* VCR+NSURLSessionConfiguration.h */,
240+
01D6A7FA257E89CE0017AD5A /* VCRErrorSerialization.m */,
241+
01D6A7FB257E89CE0017AD5A /* VCRRequestKey.h */,
242+
01D6A7FC257E89CE0017AD5A /* VCRCassetteManager.h */,
243+
01D6A7FD257E89CE0017AD5A /* VCRCassette.m */,
244+
01D6A7FE257E89CE0017AD5A /* VCR.h */,
245+
01D6A7FF257E89CE0017AD5A /* VCRReplayingURLProtocol.h */,
246+
01D6A800257E89CE0017AD5A /* VCRRecordingURLProtocol.h */,
247+
01D6A801257E89CE0017AD5A /* VCRErrorSerialization.h */,
248+
01D6A802257E89CE0017AD5A /* VCR+NSURLSessionConfiguration.m */,
249+
01D6A803257E89CE0017AD5A /* VCRRecording.h */,
250+
01D6A804257E89CE0017AD5A /* VCROrderedMutableDictionary.m */,
251+
01D6A805257E89CE0017AD5A /* VCRCassetteManager.m */,
252+
01D6A806257E89CE0017AD5A /* VCRCassette_Private.h */,
253+
01D6A807257E89CE0017AD5A /* VCRRequestKey.m */,
254+
);
255+
name = VCRURLConnection;
256+
path = "../../XCDYouTubeKit Tests/VCRURLConnection/VCRURLConnection";
257+
sourceTree = "<group>";
258+
};
199259
C2428AD7191C3C1400065504 /* OS X Demo */ = {
200260
isa = PBXGroup;
201261
children = (
262+
01D6A7F2257E89CE0017AD5A /* VCRURLConnection */,
202263
C2428AE3191C3C1400065504 /* AppDelegate.h */,
203264
C2428AE4191C3C1400065504 /* AppDelegate.m */,
204265
C2428AE6191C3C1400065504 /* MainMenu.xib */,
@@ -623,8 +684,18 @@
623684
isa = PBXSourcesBuildPhase;
624685
buildActionMask = 2147483647;
625686
files = (
687+
01D6A808257E89CE0017AD5A /* VCR.m in Sources */,
688+
01D6A809257E89CF0017AD5A /* VCRRecordingURLProtocol.m in Sources */,
626689
C2428B07191C3DE400065504 /* main.m in Sources */,
690+
01D6A80B257E89CF0017AD5A /* VCRRecording.m in Sources */,
691+
01D6A80A257E89CF0017AD5A /* VCRReplayingURLProtocol.m in Sources */,
692+
01D6A80C257E89CF0017AD5A /* VCRErrorSerialization.m in Sources */,
693+
01D6A80F257E89CF0017AD5A /* VCROrderedMutableDictionary.m in Sources */,
694+
01D6A80E257E89CF0017AD5A /* VCR+NSURLSessionConfiguration.m in Sources */,
627695
C2428AE5191C3C1400065504 /* AppDelegate.m in Sources */,
696+
01D6A80D257E89CF0017AD5A /* VCRCassette.m in Sources */,
697+
01D6A810257E89CF0017AD5A /* VCRCassetteManager.m in Sources */,
698+
01D6A811257E89CF0017AD5A /* VCRRequestKey.m in Sources */,
628699
);
629700
runOnlyForDeploymentPostprocessing = 0;
630701
};
@@ -760,7 +831,7 @@
760831
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
761832
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
762833
COPY_PHASE_STRIP = NO;
763-
CURRENT_PROJECT_VERSION = 2.15.1;
834+
CURRENT_PROJECT_VERSION = 2.15.2;
764835
ENABLE_STRICT_OBJC_MSGSEND = YES;
765836
ENABLE_TESTABILITY = YES;
766837
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -804,7 +875,7 @@
804875
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
805876
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
806877
COPY_PHASE_STRIP = YES;
807-
CURRENT_PROJECT_VERSION = 2.15.1;
878+
CURRENT_PROJECT_VERSION = 2.15.2;
808879
ENABLE_STRICT_OBJC_MSGSEND = YES;
809880
GCC_C_LANGUAGE_STANDARD = gnu99;
810881
GCC_NO_COMMON_BLOCKS = YES;

XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/xcshareddata/xcschemes/XCDYouTubeKit OS X Demo.xcscheme

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,13 @@
6969
ReferencedContainer = "container:XCDYouTubeKit Demo.xcodeproj">
7070
</BuildableReference>
7171
</BuildableProductRunnable>
72-
<AdditionalOptions>
73-
</AdditionalOptions>
72+
<EnvironmentVariables>
73+
<EnvironmentVariable
74+
key = "XCDYouTubeKitSaveRequest"
75+
value = "YES"
76+
isEnabled = "NO">
77+
</EnvironmentVariable>
78+
</EnvironmentVariables>
7479
</LaunchAction>
7580
<ProfileAction
7681
buildConfiguration = "Release"

XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testVideo2.json

Lines changed: 71 additions & 0 deletions
Large diffs are not rendered by default.

XCDYouTubeKit Tests/Cassettes/XCDYouTubeProtectedVideosTestCase/testAgeRestrictedVEVOVideoWithEmbedWebPageConnectionError.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

XCDYouTubeKit Tests/Cassettes/XCDYouTubeProtectedVideosTestCase/testAgeRestrictedVideo1WithNoJavaScriptPlayerURL.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

XCDYouTubeKit Tests/Cassettes/XCDYouTubeProtectedVideosTestCase/testProtectedVideoWithoutJavaScriptPlayerURL.json

Lines changed: 33 additions & 50 deletions
Large diffs are not rendered by default.

XCDYouTubeKit Tests/Cassettes/XCDYouTubeProtectedVideosTestCase/testProtectedVideoWithoutSignatureFunction.json

Lines changed: 41 additions & 40 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)