Watch Queue
Queue
\n \n\n
\n \ndiff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..ceced123 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,32 @@ +version: 2 +jobs: + build: + macos: + xcode: '10.2.1' + environment: + LANG: en_US.UTF-8 + LC_ALL: en_US.UTF-8 + FASTLANE_DISABLE_ANIMATION: 1 + FASTLANE_SKIP_UPDATE_CHECK: 1 + SKIP_SLOW_FASTLANE_WARNING: 1 + steps: + - checkout + - run: xcodebuild -version -sdk + - run: xcrun simctl list + - run: make test_macOS + - run: make test_tvOS + - run: make test_iOS + - run: make test_macOS_report + - run: make test_tvOS_report + - run: make test_iOS_report + - run: + name: Upload to CodeCov + command: bash <(curl -s https://codecov.io/bash) -J XCDYouTubeKit -X coveragepy -X gcov -X xcodeplist -X xcodepartials + - store_test_results: + path: test_reports + - store_artifacts: + path: /Users/distiller/Library/Developer/Xcode/DerivedData/XCDYouTubeKit-byvnmvumvdztmngymdsxlhlsgpgd/Logs/Test + destination: xcresults + - store_artifacts: + path: artifacts + destination: buildlogs diff --git a/.jazzy.yaml b/.jazzy.yaml index 2bed6d49..b6d4c00a 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -4,11 +4,11 @@ source_directory: XCDYouTubeKit framework_root: . umbrella_header: XCDYouTubeKit/XCDYouTubeKit.h module: XCDYouTubeKit -module_version: 2.7.3 +module_version: 2.7.4 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.7.3/XCDYouTubeKit +github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.7.4/XCDYouTubeKit diff --git a/CHANGELOG.md b/CHANGELOG.md index 207a1c49..b71ae674 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +#### Version 2.7.4 + +* Add the ability to fetch certain age-gate videos. (#431) + #### Version 2.7.3 * Adaptation to YouTube API change. (#419, #422. #421) diff --git a/Makefile b/Makefile index 2e6783e3..cbfd6efa 100644 --- a/Makefile +++ b/Makefile @@ -22,22 +22,22 @@ test_iOS_report: check_scan fastlane scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --output_files $@.xml --device "iPhone 5s" --code_coverage --xcargs "OBJROOT=build GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES" test_tvOS_report: check_scan - fastlane scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --output_files $@.xml --device "Apple TV 1080p" + fastlane scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --output_files $@.xml --device "Apple TV" test_macOS: check_scan - fastlane scan --configuration Release --xcargs "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep MACOSX_DEPLOYMENT_TARGET=`xcrun --sdk "macosx" --show-sdk-version`" + fastlane scan --configuration Release --xcargs "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep MACOSX_DEPLOYMENT_TARGET=`xcrun --sdk "macosx" --show-sdk-version`" test_iOS: check_scan - fastlane scan --configuration Release --device "iPhone 5s" --xcargs "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep IPHONEOS_DEPLOYMENT_TARGET=`xcrun --sdk "iphonesimulator" --show-sdk-version`" + fastlane scan --configuration Release --device "iPhone 5s" --xcargs "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep IPHONEOS_DEPLOYMENT_TARGET=`xcrun --sdk "iphonesimulator" --show-sdk-version`" test_tvOS: check_scan - fastlane scan --configuration Release --device "Apple TV 1080p" --xcargs "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep TVOS_DEPLOYMENT_TARGET=`xcrun --sdk "appletvsimulator" --show-sdk-version`" + fastlane scan --configuration Release --device "Apple TV" --xcargs "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep TVOS_DEPLOYMENT_TARGET=`xcrun --sdk "appletvsimulator" --show-sdk-version`" -test_iOS_9: check_scan - fastlane scan --device "iPhone 5s (9.0)" +test_iOS_10: check_scan + fastlane scan --device "iPhone 5s (10.3.1)" check_scan: - @fastlane scan --version > /dev/null 2>&1 || (printf "❌ Please install \e[1;30mscan\e[0m (https://github.com/fastlane/fastlane/tree/master/scan) to run unit tests: $$ [sudo] \e[1;30mgem install scan\e[0m\n" && false) + @fastlane scan --version > /dev/null 2>&1 || (printf "❌ Please install \e[1;30mfastlane scan\e[0m (https://docs.fastlane.tools/actions/scan/) to run unit tests: $$ [sudo] \e[1;30mgem install fastlane\e[0m\n" && false) check_slather: @slather version > /dev/null 2>&1 || printf "⚠️ Please install \e[1;30mslather\e[0m (https://github.com/SlatherOrg/slather) to get a code coverage report: $$ [sudo] \e[1;30mgem install slather\e[0m\n" diff --git a/Scripts/analyzer.py b/Scripts/analyzer.py index ef2bceea..e7f9ad1e 100755 --- a/Scripts/analyzer.py +++ b/Scripts/analyzer.py @@ -6,12 +6,16 @@ if not run_clang_static_analyzer[:1] in 'YyTt123456789': sys.exit(0) -analyzer_results_dir = os.path.join(os.environ['TARGET_TEMP_DIR'], 'StaticAnalyzer', os.environ['PROJECT_NAME'], os.environ['TARGET_NAME'], os.environ['CURRENT_VARIANT'], os.environ['CURRENT_ARCH']) -if not os.path.exists(analyzer_results_dir): - sys.exit("error: Static Anaylzer results not found, expected in %s" % analyzer_results_dir) +base_dir = os.path.join(os.environ['TARGET_TEMP_DIR'], 'StaticAnalyzer', os.environ['PROJECT_NAME'], os.environ['TARGET_NAME'], os.environ['CURRENT_VARIANT']) +analyzer_results_dirs = map(lambda arch : os.path.join(base_dir, arch), os.environ['ARCHS'].split(' ')) +results = [] +for analyzer_results_dir in analyzer_results_dirs: + results.extend(glob.iglob(os.path.join(analyzer_results_dir, "*.plist"))) +if len(results) == 0: + sys.exit("error: Static Anaylzer plist results not found, searched inside <%s>" % '> and <'.join(analyzer_results_dirs)) exit_code = 0 -for result in glob.iglob(os.path.join(analyzer_results_dir, "*.plist")): +for result in results: with open(result) as f: plist = plistlib.readPlist(f) for diagnostic in plist['diagnostics']: diff --git a/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj b/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj index fc883559..b46e26c5 100644 --- a/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj +++ b/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj @@ -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.7.3; + CURRENT_PROJECT_VERSION = 2.7.4; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -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.7.3; + CURRENT_PROJECT_VERSION = 2.7.4; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; diff --git a/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testConnectionErrorWithDashManifest.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testConnectionErrorWithDashManifest.json index a441e7b2..b42c4a86 100644 --- a/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testConnectionErrorWithDashManifest.json +++ b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testConnectionErrorWithDashManifest.json @@ -29,7 +29,7 @@ "domain" : "NSURLErrorDomain" }, "method" : "GET", - "status" : 0, + "status" : 404, "uri" : "https:\/\/manifest.googlevideo.com\/api\/manifest\/dash\/pl\/18\/id\/60b83e2c29185db2\/fvip\/4\/ms\/au%2Conr\/mm\/31%2C26\/mv\/m\/initcwndbps\/81250\/source\/youtube\/sparams\/as%2Cei%2Chfr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cplayback_host%2Crequiressl%2Csource%2Cexpire\/mn\/sn-o097znl6%2Csn-a5meknsy\/mt\/1541595266\/ip\/107.170.239.51\/key\/yt6\/hfr\/all\/expire\/1541616988\/ipbits\/0\/as\/fmp4_audio_clear%2Cfmp4_sd_hd_clear\/itag\/0\/requiressl\/yes\/signature\/55DBE87B69362A07203FDA0794E12D8646FF861C.399D1A0D174914F0CDF87E13DE2ECFFA2BE76B95\/ei\/_ODiW6W9EMzSkgb3uLH4Cw\/playback_host\/r2---sn-o097znl6.googlevideo.com" } -] \ No newline at end of file +] diff --git a/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testGeoblockedVideo.json b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testGeoblockedVideo.json index 6c560a8b..4a20d720 100644 --- a/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testGeoblockedVideo.json +++ b/XCDYouTubeKit Tests/Cassettes/XCDYouTubeClientTestCase/testGeoblockedVideo.json @@ -1,16 +1,36 @@ [ { - "body" : " \n
\n \n \n\n \n\n
\n \n\n \n\n
\n\n \n\n \n\n
\n\n \n\n \n\n
\n\n \nLloyd performing Dedication To My Ex (Miss That) (Lyric Video) feat. André 3000 & Lil Wayne. Buy Now! http://glnk.it/5r © 2011 Interscope Records
\n \n\n
\n\n \n\n \n\n
\n\n \n\n \n\n
\n\n \n