Skip to content

Commit

Permalink
Merge branch 'release/2.11.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
SoneeJohn committed Feb 19, 2020
2 parents 1bd1061 + 577d21c commit 1553a2b
Show file tree
Hide file tree
Showing 22 changed files with 2,413 additions and 382 deletions.
4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ source_directory: XCDYouTubeKit
framework_root: .
umbrella_header: XCDYouTubeKit/XCDYouTubeKit.h
module: XCDYouTubeKit
module_version: 2.10.0
module_version: 2.11.0

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

readme: README.md
github_url: https://github.com/0xced/XCDYouTubeKit
github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.10.0/XCDYouTubeKit
github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.11.0/XCDYouTubeKit
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#### Version 2.11.0

* `-[XCDYouTubeClient queryVideo:video:cookies:completionHandler:]` completion handler is now correctly called on the main thread.
* Improved video querying to handle videos that have incomplete streams. (#456)
* Errors returned in `streamErrors` may contain the `NSLocalizedRecoverySuggestionErrorKey` key in `-[NSError userInfo]` when `NSURLErrorNetworkConnectionLost` is reported, this may indicate the file is incomplete on YouTube's server.
* Add logging to `XCDYouTubeVideoQueryOperation` class.
* Improved `-[XCDYouTubeVideoQueryOperation description]`.

#### Version 2.10.0

* Fixed issue that caused certain videos to return error (#468)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ XCDYouTubeKit is available through [CocoaPods](https://cocoapods.org/), [Carthag
CocoaPods:

```ruby
pod "XCDYouTubeKit", "~> 2.10"
pod "XCDYouTubeKit", "~> 2.11"
```

Carthage:

```objc
github "0xced/XCDYouTubeKit" ~> 2.10
github "0xced/XCDYouTubeKit" ~> 2.11
```

Swift Package Manager:
Expand All @@ -48,7 +48,7 @@ Add `XCDYouTubeKit` to the dependencies value of your `Package.swift`

```swift
dependencies: [
.package(url: "https://github.com/0xced/XCDYouTubeKit.git", from: "2.10.0")
.package(url: "https://github.com/0xced/XCDYouTubeKit.git", from: "2.11.0")
]
```

Expand Down
24 changes: 18 additions & 6 deletions XCDYouTubeKit Demo/OS X Demo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,30 @@ - (IBAction) playVideo:(id)sender
[self.progressIndicator startAnimation:sender];
[[XCDYouTubeClient defaultClient] getVideoWithIdentifier:[sender stringValue] completionHandler:^(XCDYouTubeVideo *video, NSError *error)
{
[self.progressIndicator stopAnimation:sender];

if (video)
{
NSDictionary *streamURLs = video.streamURLs;
NSURL *url = streamURLs[XCDYouTubeVideoQualityHTTPLiveStreaming] ?: streamURLs[@(XCDYouTubeVideoQualityHD720)] ?: streamURLs[@(XCDYouTubeVideoQualityMedium360)] ?: streamURLs[@(XCDYouTubeVideoQualitySmall240)];
AVPlayer *player = [AVPlayer playerWithURL:url];
self.playerView.player = player;
[player play];

[[XCDYouTubeClient defaultClient] queryVideo:video cookies:nil completionHandler:^(NSDictionary * _Nonnull streamURLs, NSError * _Nullable streamError, NSDictionary<id,NSError *> * _Nonnull streamErrors)
{
[self.progressIndicator stopAnimation:sender];

if (streamURLs)
{
NSURL *url = streamURLs[XCDYouTubeVideoQualityHTTPLiveStreaming] ?: streamURLs[@(XCDYouTubeVideoQualityHD720)] ?: streamURLs[@(XCDYouTubeVideoQualityMedium360)] ?: streamURLs[@(XCDYouTubeVideoQualitySmall240)];
AVPlayer *player = [AVPlayer playerWithURL:url];
self.playerView.player = player;
[player play];
}
else
{
[[NSAlert alertWithError:streamError] runModal];
}
}];
}
else
{
[self.progressIndicator stopAnimation:sender];
[[NSAlert alertWithError:error] runModal];
}
}];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2.10.0;
CURRENT_PROJECT_VERSION = 2.11.0;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand Down Expand Up @@ -804,7 +804,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 2.10.0;
CURRENT_PROJECT_VERSION = 2.11.0;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

84 changes: 81 additions & 3 deletions XCDYouTubeKit Tests/XCDYouTubeClientTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ - (void) testVideo1ReturnsSomePlayableStreams

XCTAssertNil(queryError);
XCTAssertNotNil(streamURLs);
XCTAssertTrue([NSThread isMainThread]);

for (NSNumber *itag in playableStreamKeys)
{
Expand All @@ -253,6 +254,7 @@ - (void) testVideo1ReturnsSomePlayableStreams
}

// Disable internet connection before running to allow some queries to fail
// Also, this test requires using Charles Proxy tools (or similar app) to block some of the streamURLs
- (void) testVideo1ReturnsSomePlayableStreamsEvenIfSomeFailDueToConnectionError_offline
{
__weak XCTestExpectation *expectation = [self expectationWithDescription:@""];
Expand All @@ -265,6 +267,7 @@ - (void) testVideo1ReturnsSomePlayableStreamsEvenIfSomeFailDueToConnectionError_

XCTAssertNil(queryError);
XCTAssertNotNil(streamURLs);
XCTAssertTrue([NSThread isMainThread]);

for (id key in streamURLs.allKeys)
{
Expand All @@ -274,7 +277,7 @@ - (void) testVideo1ReturnsSomePlayableStreamsEvenIfSomeFailDueToConnectionError_
XCTAssertTrue(streamErrors.count != 0);
for (NSError *streamError in streamErrors.allValues)
{
XCTAssertEqualObjects(streamError.localizedDescription, @"The Internet connection appears to be offline.");
XCTAssertNotNil(streamError.localizedDescription);
}

XCTAssertNotEqual(video.streamURLs.count, streamURLs.count, @"`streamURLs` count should not be equal since this video contains some streams are unplayable");
Expand All @@ -300,10 +303,11 @@ - (void) testVideo1ReturnsNoPlayableStreamsBecauseConnectionError_offline
XCTAssertNotNil(queryError);
XCTAssertNil(streamURLs);
XCTAssertTrue(streamErrors.count != 0);
XCTAssertTrue([NSThread isMainThread]);

for (NSError *streamError in streamErrors.allValues)
{
XCTAssertEqualObjects(streamError.localizedDescription, @"The Internet connection appears to be offline.");
XCTAssertNotNil(streamError.localizedDescription);
}

XCTAssertNotEqual(video.streamURLs.count, streamURLs.count, @"`streamURLs` count should not be equal since this video contains some streams are unplayable");
Expand All @@ -328,6 +332,7 @@ - (void) testVideo2ReturnsAllPlayableStreams
XCTAssertNil(queryError);
XCTAssertNil(streamErrors);
XCTAssertNotNil(streamURLs);
XCTAssertTrue([NSThread isMainThread]);

for (id key in streamURLs.allKeys)
{
Expand All @@ -340,7 +345,80 @@ - (void) testVideo2ReturnsAllPlayableStreams
}];
}];

[self waitForExpectationsWithTimeout:90 handler:nil];
[self waitForExpectationsWithTimeout:5 handler:nil];
}

- (void) testVideo3ReturnsSomePlayableStreams
{
/**
* This video `550S-6XVRsw` contains some streams (e.g. itag=22) that don't play (the file appeas to be incomplete on YouTube's servers).
* This test ensures that we catch those kinds of errors and they aren't included in the `streamURLs`
* See https://github.com/0xced/XCDYouTubeKit/issues/456 for more information.
*/
__weak XCTestExpectation *expectation = [self expectationWithDescription:@""];
NSNumber *nonPlayableStreamKey = @(XCDYouTubeVideoQualityHD720);

[[XCDYouTubeClient defaultClient] getVideoWithIdentifier:@"550S-6XVRsw" completionHandler:^(XCDYouTubeVideo *video, NSError *error)
{
XCTAssertNotNil(video);
XCTAssertNil(error);

[[XCDYouTubeClient defaultClient]queryVideo:video cookies:nil completionHandler:^(NSDictionary * _Nonnull streamURLs, NSError * _Nullable queryError, NSDictionary<id, NSError *> *streamErrors) {

XCTAssertNil(queryError);
XCTAssertNotNil(streamErrors);
XCTAssertNotNil(streamURLs);
XCTAssertTrue([NSThread isMainThread]);

for (id key in streamURLs.allKeys)
{
XCTAssertNotNil(streamURLs[key]);
}

XCTAssertNotEqual(video.streamURLs.count, streamURLs.count, @"`streamURLs` count should not be equal since this video contains some streams are unplayable");
XCTAssertNil(streamURLs[nonPlayableStreamKey], @"itag 22 should not be available in this stream.");
//I noticed when the file stored on the server is not complete we get this error
XCTAssertTrue([streamErrors.allValues.firstObject.domain isEqual:NSURLErrorDomain]);
XCTAssertEqual(streamErrors.allValues.firstObject.code, NSURLErrorNetworkConnectionLost);
XCTAssertNotNil(streamErrors.allValues.firstObject.userInfo[NSLocalizedRecoverySuggestionErrorKey]);
XCTAssertTrue([streamErrors.allValues.firstObject.userInfo[NSLocalizedRecoverySuggestionErrorKey] isEqual:@"The file stored on the server may be incomplete."]);
[expectation fulfill];
}];
}];

[self waitForExpectationsWithTimeout:5 handler:nil];
}

- (void) testThatQueryingLiveVideoReturnsPlayableStreams
{
/**
* This video `hHW1oY26kxQ` is a live stream
* See https://github.com/0xced/XCDYouTubeKit/issues/456 for more information.
*/
__weak XCTestExpectation *expectation = [self expectationWithDescription:@""];

[[XCDYouTubeClient defaultClient] getVideoWithIdentifier:@"hHW1oY26kxQ" completionHandler:^(XCDYouTubeVideo *video, NSError *error)
{
XCTAssertNotNil(video);
XCTAssertNil(error);

[[XCDYouTubeClient defaultClient]queryVideo:video cookies:nil completionHandler:^(NSDictionary * _Nonnull streamURLs, NSError * _Nullable queryError, NSDictionary<id, NSError *> *streamErrors) {

XCTAssertNil(queryError);
XCTAssertNotNil(streamURLs[XCDYouTubeVideoQualityHTTPLiveStreaming], @"Should contain live stream");
XCTAssertNotNil(streamURLs);
XCTAssertTrue([NSThread isMainThread]);

for (id key in streamURLs.allKeys)
{
XCTAssertNotNil(streamURLs[key]);
}

[expectation fulfill];
}];
}];

[self waitForExpectationsWithTimeout:900 handler:nil];
}

- (void) testExpiredLiveVideo
Expand Down
2 changes: 1 addition & 1 deletion XCDYouTubeKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "XCDYouTubeKit"
s.version = "2.10.0"
s.version = "2.11.0"
s.summary = "YouTube video player for iOS and OS X."
s.homepage = "https://github.com/0xced/XCDYouTubeKit"
s.screenshot = "https://raw.github.com/0xced/XCDYouTubeKit/#{s.version}/Screenshots/XCDYouTubeVideoPlayerViewController.png"
Expand Down
38 changes: 24 additions & 14 deletions XCDYouTubeKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
objects = {

/* Begin PBXBuildFile section */
017234C223FC223D00196707 /* XCDURLGETOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 017234C023FC223D00196707 /* XCDURLGETOperation.h */; };
017234C323FC223D00196707 /* XCDURLGETOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 017234C123FC223D00196707 /* XCDURLGETOperation.m */; };
017234C423FC223D00196707 /* XCDURLGETOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 017234C123FC223D00196707 /* XCDURLGETOperation.m */; };
0178E76D23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E76C23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m */; };
0178E76E23F4A023001C382E /* XCDYouTubeVideoQueryOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0178E76B23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
0178E76F23F4A02A001C382E /* XCDYouTubeVideoQueryOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E76C23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m */; };
0178E77023F4A049001C382E /* XCDYouTubeVideoQueryOperation.h in Copy Files */ = {isa = PBXBuildFile; fileRef = 0178E76B23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.h */; };
0178E77323F4A0D8001C382E /* XCDURLHeadOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0178E77123F4A0D8001C382E /* XCDURLHeadOperation.h */; };
0178E77423F4A0D8001C382E /* XCDURLHeadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E77223F4A0D8001C382E /* XCDURLHeadOperation.m */; };
0178E77523F4A0D8001C382E /* XCDURLHeadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E77223F4A0D8001C382E /* XCDURLHeadOperation.m */; };
0178E77323F4A0D8001C382E /* XCDURLHEADOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0178E77123F4A0D8001C382E /* XCDURLHEADOperation.h */; };
0178E77423F4A0D8001C382E /* XCDURLHEADOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E77223F4A0D8001C382E /* XCDURLHEADOperation.m */; };
0178E77523F4A0D8001C382E /* XCDURLHEADOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0178E77223F4A0D8001C382E /* XCDURLHEADOperation.m */; };
01D2370A1FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D237091FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m */; };
01D2370B1FA03ADE00A13E5F /* XCDYouTubeDashManifestXML.h in Headers */ = {isa = PBXBuildFile; fileRef = 01D237081FA03AC100A13E5F /* XCDYouTubeDashManifestXML.h */; };
01D2370C1FA03AF100A13E5F /* XCDYouTubeDashManifestXML.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D237091FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m */; };
Expand Down Expand Up @@ -107,10 +110,12 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
017234C023FC223D00196707 /* XCDURLGETOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDURLGETOperation.h; sourceTree = "<group>"; };
017234C123FC223D00196707 /* XCDURLGETOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDURLGETOperation.m; sourceTree = "<group>"; };
0178E76B23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDYouTubeVideoQueryOperation.h; sourceTree = "<group>"; };
0178E76C23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDYouTubeVideoQueryOperation.m; sourceTree = "<group>"; };
0178E77123F4A0D8001C382E /* XCDURLHeadOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDURLHeadOperation.h; sourceTree = "<group>"; };
0178E77223F4A0D8001C382E /* XCDURLHeadOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDURLHeadOperation.m; sourceTree = "<group>"; };
0178E77123F4A0D8001C382E /* XCDURLHEADOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDURLHEADOperation.h; sourceTree = "<group>"; };
0178E77223F4A0D8001C382E /* XCDURLHEADOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDURLHEADOperation.m; sourceTree = "<group>"; };
01D237081FA03AC100A13E5F /* XCDYouTubeDashManifestXML.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XCDYouTubeDashManifestXML.h; sourceTree = "<group>"; };
01D237091FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDYouTubeDashManifestXML.m; sourceTree = "<group>"; };
01EAD0DE23FACB0800F1E936 /* XCDYouTubeVideoQueryOperationTestCase.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCDYouTubeVideoQueryOperationTestCase.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -244,8 +249,10 @@
C24C162D18E9A139005E92E9 /* XCDYouTubeVideoOperation.m */,
0178E76B23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.h */,
0178E76C23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m */,
0178E77123F4A0D8001C382E /* XCDURLHeadOperation.h */,
0178E77223F4A0D8001C382E /* XCDURLHeadOperation.m */,
0178E77123F4A0D8001C382E /* XCDURLHEADOperation.h */,
0178E77223F4A0D8001C382E /* XCDURLHEADOperation.m */,
017234C023FC223D00196707 /* XCDURLGETOperation.h */,
017234C123FC223D00196707 /* XCDURLGETOperation.m */,
C2A3F2D517F4827800AC1C3B /* XCDYouTubeVideoPlayerViewController.h */,
C2A3F2D717F4827800AC1C3B /* XCDYouTubeVideoPlayerViewController.m */,
C2386B1C1974036300646123 /* XCDYouTubeVideoWebpage.h */,
Expand Down Expand Up @@ -300,11 +307,12 @@
C257F7941C206D26006146D3 /* XCDYouTubeLogger.h in Headers */,
C257F7911C206B8F006146D3 /* XCDYouTubeLogger+Private.h in Headers */,
C2F0E5901944F83E00D8EBA8 /* XCDYouTubeOperation.h in Headers */,
0178E77323F4A0D8001C382E /* XCDURLHeadOperation.h in Headers */,
0178E77323F4A0D8001C382E /* XCDURLHEADOperation.h in Headers */,
C2F0E5931944F84700D8EBA8 /* XCDYouTubeVideo.h in Headers */,
C2F0E5941944F84A00D8EBA8 /* XCDYouTubeVideoOperation.h in Headers */,
C215BEB91BE2E5B500F9783B /* XCDYouTubeVideoWebpage.h in Headers */,
C2F0E5951944F85500D8EBA8 /* XCDYouTubeVideoPlayerViewController.h in Headers */,
017234C223FC223D00196707 /* XCDURLGETOperation.h in Headers */,
C2F0E5921944F84400D8EBA8 /* XCDYouTubeVideo+Private.h in Headers */,
C2F0E5911944F84200D8EBA8 /* XCDYouTubePlayerScript.h in Headers */,
);
Expand Down Expand Up @@ -517,7 +525,8 @@
C25308C518D7392500132734 /* XCDYouTubeClient.m in Sources */,
0178E76D23F49BBC001C382E /* XCDYouTubeVideoQueryOperation.m in Sources */,
C24C162E18E9A139005E92E9 /* XCDYouTubeVideoOperation.m in Sources */,
0178E77423F4A0D8001C382E /* XCDURLHeadOperation.m in Sources */,
017234C323FC223D00196707 /* XCDURLGETOperation.m in Sources */,
0178E77423F4A0D8001C382E /* XCDURLHEADOperation.m in Sources */,
01D2370A1FA03AC100A13E5F /* XCDYouTubeDashManifestXML.m in Sources */,
C25308C818D739EB00132734 /* XCDYouTubeVideo.m in Sources */,
C2597EA61B0CE6D80030E9F2 /* XCDYouTubeLogger.m in Sources */,
Expand All @@ -534,7 +543,8 @@
C2F0E59C1944F8CF00D8EBA8 /* XCDYouTubeVideoOperation.m in Sources */,
0178E76F23F4A02A001C382E /* XCDYouTubeVideoQueryOperation.m in Sources */,
C2F0E5991944F8C200D8EBA8 /* XCDYouTubeClient.m in Sources */,
0178E77523F4A0D8001C382E /* XCDURLHeadOperation.m in Sources */,
017234C423FC223D00196707 /* XCDURLGETOperation.m in Sources */,
0178E77523F4A0D8001C382E /* XCDURLHEADOperation.m in Sources */,
01D2370C1FA03AF100A13E5F /* XCDYouTubeDashManifestXML.m in Sources */,
C2F0E59A1944F8C700D8EBA8 /* XCDYouTubePlayerScript.m in Sources */,
C2597EA71B0CE6D80030E9F2 /* XCDYouTubeLogger.m in Sources */,
Expand Down Expand Up @@ -639,10 +649,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 44;
CURRENT_PROJECT_VERSION = 45;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 2.0.0;
DYLIB_CURRENT_VERSION = 2.10.0;
DYLIB_CURRENT_VERSION = 2.11.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -717,10 +727,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 44;
CURRENT_PROJECT_VERSION = 45;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 2.0.0;
DYLIB_CURRENT_VERSION = 2.10.0;
DYLIB_CURRENT_VERSION = 2.11.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down
28 changes: 28 additions & 0 deletions XCDYouTubeKit/XCDURLGETOperation.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// XCDURLGetOperation.h
// XCDYouTubeKit
//
// Created by Soneé John on 2/18/20.
// Copyright © 2020 Cédric Luthi. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

__attribute__((visibility("hidden")))
@interface XCDURLGETOperation : NSOperation

- (instancetype) initWithURL:(NSURL *)url info:(nullable NSDictionary *)info cookes:(nullable NSArray <NSHTTPCookie *> *)cookies;

@property (atomic, strong, readonly) NSURL *url;
@property (atomic, copy, readonly, nullable) NSDictionary *info;
@property (atomic, copy, readonly, nullable) NSArray <NSHTTPCookie *> *cookies;

@property (atomic, readonly, nullable) NSURLResponse *response;

@property (atomic, readonly, nullable) NSError *error;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 1553a2b

Please sign in to comment.