diff --git a/.jazzy.yaml b/.jazzy.yaml index 18cb907c..f14c1967 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.5.5 +module_version: 2.5.6 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.5.5/XCDYouTubeKit +github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.5.6/XCDYouTubeKit diff --git a/CHANGELOG.md b/CHANGELOG.md index 273a623a..a193f06f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +#### Version 2.5.6 + +* Xcode 9 compatibility (#345, #347, #349) + #### Version 2.5.5 * Adaptation to YouTube API change. (#314) diff --git a/Makefile b/Makefile index 24176a80..2e6783e3 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,9 @@ export SCAN_SCHEME = XCDYouTubeKit Framework export SCAN_BUILDLOG_PATH = ${CIRCLE_ARTIFACTS}/$@ export SCAN_OUTPUT_TYPES = +# Trying to workaround "Exit status: 74" error on CircleCI, see https://github.com/fastlane/fastlane/issues/8909#issuecomment-295788554 +export SCAN_INCLUDE_SIMULATOR_LOGS = false + .PHONY: default test_macOS_report test_iOS_report test_tvOS_report test_macOS test_iOS test_tvOS test_iOS_9 check_scan check_slather default: check_slather check_scan @@ -13,13 +16,13 @@ default: check_slather check_scan slather coverage --verbose --output-directory "${TMPDIR}/${SCAN_SCHEME} Coverage Report" --html --show --ignore "../**/Contents/Developer/**" --scheme "${SCAN_SCHEME}" "${SCAN_PROJECT}" || true test_macOS_report: check_scan - fastlane scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --custom_report_file_name $@.xml + fastlane scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --output_files $@.xml test_iOS_report: check_scan - fastlane scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --custom_report_file_name $@.xml --device "iPhone 5s" --code_coverage --xcargs "OBJROOT=build GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES" + 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 --custom_report_file_name $@.xml --device "Apple TV 1080p" + fastlane scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --output_files $@.xml --device "Apple TV 1080p" 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`" diff --git a/README.md b/README.md index 0a314e4e..64b0b566 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## About [![Build Status](https://img.shields.io/circleci/project/0xced/XCDYouTubeKit/master.svg?style=flat)](https://circleci.com/gh/0xced/XCDYouTubeKit) -[![Coverage Status](https://img.shields.io/codecov/c/github/0xced/XCDYouTubeKit/master.svg?style=flat)](https://codecov.io/gh/0xced/XCDYouTubeKit/branch.master) +[![Coverage Status](https://img.shields.io/codecov/c/github/0xced/XCDYouTubeKit/master.svg?style=flat)](https://codecov.io/gh/0xced/XCDYouTubeKit/branch/master) [![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-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage/) diff --git a/Scripts/release.sh b/Scripts/release.sh index e96f2e69..d4a8558e 100755 --- a/Scripts/release.sh +++ b/Scripts/release.sh @@ -4,8 +4,8 @@ function update_badges() { echo "Updating badges" set -v - sed -i "" "s/$1\.svg/$2.svg/g" "README.md" - sed -i "" "s/branch.$1/branch.$2/g" "README.md" + sed -i "" "s#$1\.svg#$2.svg#g" "README.md" + sed -i "" "s#branch/$1#branch/$2#g" "README.md" set +v git add "README.md" git commit -m "Point badges to the $2 branch" diff --git a/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj b/XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj index 40ec0ce0..d7034c43 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.5.5; + CURRENT_PROJECT_VERSION = 2.5.6; 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.5.5; + CURRENT_PROJECT_VERSION = 2.5.6; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; diff --git a/XCDYouTubeKit.podspec b/XCDYouTubeKit.podspec index eab10656..c62744fd 100644 --- a/XCDYouTubeKit.podspec +++ b/XCDYouTubeKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "XCDYouTubeKit" - s.version = "2.5.5" + s.version = "2.5.6" 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" diff --git a/XCDYouTubeKit.xcodeproj/project.pbxproj b/XCDYouTubeKit.xcodeproj/project.pbxproj index 6e547b5f..7cb14edb 100644 --- a/XCDYouTubeKit.xcodeproj/project.pbxproj +++ b/XCDYouTubeKit.xcodeproj/project.pbxproj @@ -596,10 +596,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 27; + CURRENT_PROJECT_VERSION = 28; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 2.0.0; - DYLIB_CURRENT_VERSION = 2.5.5; + DYLIB_CURRENT_VERSION = 2.5.6; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -674,10 +674,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 27; + CURRENT_PROJECT_VERSION = 28; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 2.0.0; - DYLIB_CURRENT_VERSION = 2.5.5; + DYLIB_CURRENT_VERSION = 2.5.6; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; diff --git a/XCDYouTubeKit/XCDYouTubeLogger.m b/XCDYouTubeKit/XCDYouTubeLogger.m index cc838607..511e58c3 100644 --- a/XCDYouTubeKit/XCDYouTubeLogger.m +++ b/XCDYouTubeKit/XCDYouTubeLogger.m @@ -39,7 +39,7 @@ + (void) initialize if (DDLogClass) { const SEL logSeletor = @selector(log:message:level:flag:context:file:function:line:tag:); - const char *typeEncoding = method_getTypeEncoding(class_getClassMethod(DDLogClass, logSeletor)); + const char *typeEncoding = method_getTypeEncoding((Method)class_getClassMethod(DDLogClass, logSeletor)); const char *expectedTypeEncoding = protocol_getMethodDescription(@protocol(XCDYouTubeLogger_DDLog), logSeletor, /* isRequiredMethod: */ YES, /* isInstanceMethod: */ NO).types; if (typeEncoding && expectedTypeEncoding && strcmp(typeEncoding, expectedTypeEncoding) == 0) LogHandler = CocoaLumberjackLogHandler; diff --git a/XCDYouTubeKit/XCDYouTubeVideo.m b/XCDYouTubeKit/XCDYouTubeVideo.m index b7311706..2b27537b 100644 --- a/XCDYouTubeKit/XCDYouTubeVideo.m +++ b/XCDYouTubeKit/XCDYouTubeVideo.m @@ -106,7 +106,7 @@ - (instancetype) initWithIdentifier:(NSString *)identifier info:(NSDictionary *) NSString *httpLiveStream = info[@"hlsvp"]; NSString *adaptiveFormats = info[@"adaptive_fmts"]; - NSMutableDictionary *userInfo = response.URL ? [@{ NSURLErrorKey: response.URL } mutableCopy] : [NSMutableDictionary new]; + NSMutableDictionary *userInfo = response.URL ? [@{ NSURLErrorKey: (id)response.URL } mutableCopy] : [NSMutableDictionary new]; if (streamMap.length > 0 || httpLiveStream.length > 0) { diff --git a/circle.yml b/circle.yml index edd0647d..cff22528 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: xcode: - version: 8.2 + version: 9.0 dependencies: pre: @@ -10,27 +10,24 @@ dependencies: - sudo gem install scan --no-rdoc --no-ri --no-document --quiet test: - pre: - - open -b com.apple.iphonesimulator - override: - # Run unit tests, generate junit reports and produce coverage data for iOS - - make test_macOS_report - - make test_iOS_report - - make test_tvOS_report - # Run unit tests compiled for the release configuration with latest deployment target (catches deprecation warnings) - make test_macOS - - make test_iOS - make test_tvOS + - make test_iOS # Run unit tests on iOS 9 - make test_iOS_9 + + # Run unit tests, generate junit reports and produce coverage data for iOS + - make test_macOS_report + - make test_tvOS_report + - make test_iOS_report deployment: coverage: - branch: [develop, master] + branch: /.*/ commands: - - bash <(curl -s https://codecov.io/bash) -J XCDYouTubeKit -X coveragepy -X gcov - - rsync -a *.coverage.txt "${CIRCLE_ARTIFACTS}/coverage/" + - bash <(curl -s https://codecov.io/bash) -J XCDYouTubeKit -X coveragepy -X gcov -X xcodeplist -X xcodepartials + - rsync -a *coverage* "${CIRCLE_ARTIFACTS}/coverage/" - sudo pip install cpp-coveralls && coveralls --include XCDYouTubeKit