diff --git a/.gitignore b/.gitignore index bf3dc53..2ca94d3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ xcuserdata /Carthage -/fastlane/report.xml -/fastlane/TestSummaries.xml +/fastlane/*.xcresult +/fastlane/*.xml /vendor /.bundle \ No newline at end of file diff --git a/Cartfile b/Cartfile index 6a70b4b..2d6c294 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ -github "SRGSSR/srgdiagnostics-ios" "1.0.1" -github "SRGSSR/srgnetwork-ios" "1.0.3" \ No newline at end of file +github "SRGSSR/srgdiagnostics-apple" "2.0.0" +github "SRGSSR/srgnetwork-apple" "2.0.0" \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index d835e8b..f5fafdc 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ -github "SRGSSR/MAKVONotificationCenter" "1.0_srg3" -github "SRGSSR/libextobjc" "0.6_srg1" -github "SRGSSR/srgdiagnostics-ios" "1.0.1" -github "SRGSSR/srglogger-ios" "1.1" -github "SRGSSR/srgnetwork-ios" "1.0.3" +github "SRGSSR/MAKVONotificationCenter" "1.0_srg4" +github "SRGSSR/libextobjc" "0.6_srg2" +github "SRGSSR/srgdiagnostics-apple" "2.0.0" +github "SRGSSR/srglogger-apple" "2.0.0" +github "SRGSSR/srgnetwork-apple" "2.0.0" diff --git a/Common.xcconfig b/Common.xcconfig new file mode 100644 index 0000000..54d715d --- /dev/null +++ b/Common.xcconfig @@ -0,0 +1,25 @@ +// Version information +MARKETING_VERSION = 2.0.0 + +// Deployment targets +IPHONEOS_DEPLOYMENT_TARGET = 9.0 +TVOS_DEPLOYMENT_TARGET = 12.0 + +// Configuration to have a single target built for all platforms +// See https://davedelong.com/blog/2018/11/15/building-a-crossplatform-framework/ +SUPPORTED_PLATFORMS = iphoneos iphonesimulator appletvos appletvsimulator +TARGETED_DEVICE_FAMILY = 1,2,3 + +CARTHAGE_PLATFORM[sdk=iphone*] = iOS +CARTHAGE_PLATFORM[sdk=appletv*] = tvOS + +// Setup to enable plaform suffixes to enable sources or resources for a specific platform only +// See https://davedelong.com/blog/2018/07/25/conditional-compilation-in-swift-part-2/ +IOS_FILES = *~ios.* +TVOS_FILES = *~tvos.* + +EXCLUDED_SOURCE_FILE_NAMES = $(IOS_FILES) $(TVOS_FILES) + +INCLUDED_SOURCE_FILE_NAMES = +INCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = $(IOS_FILES) +INCLUDED_SOURCE_FILE_NAMES[sdk=appletv*] = $(TVOS_FILES) diff --git a/Demo/Demo.xcconfig b/Demo/Demo.xcconfig new file mode 100644 index 0000000..7fd3161 --- /dev/null +++ b/Demo/Demo.xcconfig @@ -0,0 +1,10 @@ +#include "../Common.xcconfig" + +LAUNCH_SCREEN[sdk=iphone*] = LaunchScreen~ios +LAUNCH_SCREEN[sdk=appletv*] = + +APP_ICONS_SOURCE[sdk=iphone*] = AppIcon +APP_ICONS_SOURCE[sdk=appletv*] = App Icon & Top Shelf Image + +REQUIRED_DEVICE_CAPABILITY[sdk=iphone*] = armv7 +REQUIRED_DEVICE_CAPABILITY[sdk=appletv*] = arm64 diff --git a/Demo/Info.plist b/Demo/Info.plist index 27d7b80..83a8465 100644 --- a/Demo/Info.plist +++ b/Demo/Info.plist @@ -4,6 +4,8 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Content 🔒 CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -20,11 +22,18 @@ $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + UILaunchStoryboardName - LaunchScreen + $(LAUNCH_SCREEN) + UIUserInterfaceStyle + Automatic UIRequiredDeviceCapabilities - armv7 + $(REQUIRED_DEVICE_CAPABILITY) UISupportedInterfaceOrientations @@ -39,10 +48,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..48ecb4f --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000..d29f024 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..48ecb4f --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..48ecb4f --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..e5ca7e3 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "back@1x.png", + "scale" : "1x" + }, + { + "idiom" : "tv", + "filename" : "back@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/back@1x.png b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/back@1x.png new file mode 100644 index 0000000..7e72d15 Binary files /dev/null and b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/back@1x.png differ diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/back@2x.png b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/back@2x.png new file mode 100644 index 0000000..10c3484 Binary files /dev/null and b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/back@2x.png differ diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000..d29f024 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..1dfd792 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "front@1x.png", + "scale" : "1x" + }, + { + "idiom" : "tv", + "filename" : "front@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/front@1x.png b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/front@1x.png new file mode 100644 index 0000000..37a4cd3 Binary files /dev/null and b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/front@1x.png differ diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/front@2x.png b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/front@2x.png new file mode 100644 index 0000000..faa6708 Binary files /dev/null and b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/front@2x.png differ diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..5aeb37b --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "tv", + "filename" : "middle@1x.png", + "scale" : "1x" + }, + { + "idiom" : "tv", + "filename" : "middle@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/middle@1x.png b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/middle@1x.png new file mode 100644 index 0000000..c371cf5 Binary files /dev/null and b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/middle@1x.png differ diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/middle@2x.png b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/middle@2x.png new file mode 100644 index 0000000..320d0d9 Binary files /dev/null and b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/middle@2x.png differ diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json new file mode 100644 index 0000000..db288f3 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -0,0 +1,32 @@ +{ + "assets" : [ + { + "size" : "1280x768", + "idiom" : "tv", + "filename" : "App Icon - App Store.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "App Icon.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "2320x720", + "idiom" : "tv", + "filename" : "Top Shelf Image Wide.imageset", + "role" : "top-shelf-image-wide" + }, + { + "size" : "1920x720", + "idiom" : "tv", + "filename" : "Top Shelf Image.imageset", + "role" : "top-shelf-image" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000..7dc9502 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + }, + { + "idiom" : "tv-marketing", + "scale" : "1x" + }, + { + "idiom" : "tv-marketing", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000..7dc9502 --- /dev/null +++ b/Demo/Resources/Images.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + }, + { + "idiom" : "tv-marketing", + "scale" : "1x" + }, + { + "idiom" : "tv-marketing", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/logo.imageset/Contents.json b/Demo/Resources/Images.xcassets/logo.imageset/Contents.json deleted file mode 100644 index ffbc6e0..0000000 --- a/Demo/Resources/Images.xcassets/logo.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "logo.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "logo@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "logo@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/logo.imageset/logo.png b/Demo/Resources/Images.xcassets/logo.imageset/logo.png deleted file mode 100644 index 352ad50..0000000 Binary files a/Demo/Resources/Images.xcassets/logo.imageset/logo.png and /dev/null differ diff --git a/Demo/Resources/Images.xcassets/logo.imageset/logo@2x.png b/Demo/Resources/Images.xcassets/logo.imageset/logo@2x.png deleted file mode 100644 index 11303ba..0000000 Binary files a/Demo/Resources/Images.xcassets/logo.imageset/logo@2x.png and /dev/null differ diff --git a/Demo/Resources/Images.xcassets/logo.imageset/logo@3x.png b/Demo/Resources/Images.xcassets/logo.imageset/logo@3x.png deleted file mode 100644 index a595f29..0000000 Binary files a/Demo/Resources/Images.xcassets/logo.imageset/logo@3x.png and /dev/null differ diff --git a/Demo/Resources/Images.xcassets/logo_content_protection.imageset/Contents.json b/Demo/Resources/Images.xcassets/logo_content_protection.imageset/Contents.json new file mode 100644 index 0000000..13824f7 --- /dev/null +++ b/Demo/Resources/Images.xcassets/logo_content_protection.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "logo.pdf" + }, + { + "idiom" : "universal", + "filename" : "logo_dark.pdf", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ] + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/logo_content_protection.imageset/logo.pdf b/Demo/Resources/Images.xcassets/logo_content_protection.imageset/logo.pdf new file mode 100644 index 0000000..2ae1bed Binary files /dev/null and b/Demo/Resources/Images.xcassets/logo_content_protection.imageset/logo.pdf differ diff --git a/Demo/Resources/Images.xcassets/logo_content_protection.imageset/logo_dark.pdf b/Demo/Resources/Images.xcassets/logo_content_protection.imageset/logo_dark.pdf new file mode 100644 index 0000000..da4ac6d Binary files /dev/null and b/Demo/Resources/Images.xcassets/logo_content_protection.imageset/logo_dark.pdf differ diff --git a/Demo/Resources/Images.xcassets/logo_srgssr.imageset/Contents.json b/Demo/Resources/Images.xcassets/logo_srgssr.imageset/Contents.json new file mode 100644 index 0000000..a9f1847 --- /dev/null +++ b/Demo/Resources/Images.xcassets/logo_srgssr.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "SRGSSR.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/Resources/Images.xcassets/logo_srgssr.imageset/SRGSSR.pdf b/Demo/Resources/Images.xcassets/logo_srgssr.imageset/SRGSSR.pdf new file mode 100644 index 0000000..03ad817 Binary files /dev/null and b/Demo/Resources/Images.xcassets/logo_srgssr.imageset/SRGSSR.pdf differ diff --git a/Demo/Resources/LaunchScreen.storyboard b/Demo/Resources/LaunchScreen.storyboard deleted file mode 100644 index 56901b7..0000000 --- a/Demo/Resources/LaunchScreen.storyboard +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demo/Resources/LaunchScreen~ios.storyboard b/Demo/Resources/LaunchScreen~ios.storyboard new file mode 100644 index 0000000..118ef6d --- /dev/null +++ b/Demo/Resources/LaunchScreen~ios.storyboard @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demo/Resources/MediaDemoConfiguration.plist b/Demo/Resources/MediaDemoConfiguration.plist new file mode 100644 index 0000000..5705e63 --- /dev/null +++ b/Demo/Resources/MediaDemoConfiguration.plist @@ -0,0 +1,63 @@ + + + + + medias + + + name + Unprotected Akamai HLS stream + url + https://rtsvodww-vh.akamaihd.net/i/genhi/2018/genhi_20180126_full_f_1067247-,301k,101k,701k,1201k,2001k,fra-ad,.mp4.csmil/master.m3u8 + + + name + Akamai token-protected HLS stream + url + https://srgssruni11ch-lh.akamaihd.net/i/enc11uni_ch@191455/master.m3u8 + + + name + FairPlay-protected HLS live stream + url + https://rtsun-euwe.akamaized.net/5f6cc644-70fa-4adf-9f94-b673f9fe486f/rts1.ism/manifest(format=m3u8-aapl,encryption=cbcs-aapl,filter=nodvr) + certificateUrl + https://srg.live.ott.irdeto.com/licenseServer/streaming/v1/SRG/getcertificate?applicationId=live + + + name + FairPlay-protected HLS VoD HD stream + url + https://premiumendpoint-srgssrvoddeveuwe-euwe.streaming.media.azure.net/e34e5c1e-ffa4-4d0f-b56b-b96e2c2a0e83/RSIVOD-9b60c46b-5e58.ism/manifest(format=m3u8-aapl,encryption=cbcs-aapl) + certificateUrl + https://rng.stage.ott.irdeto.com/licenseServer/streaming/v1/SRG/getcertificate?applicationId=stage + + + name + FairPlay-protected HLS VoD SD stream + url + https://premiumendpoint-srgssrvoddeveuwe-euwe.streaming.media.azure.net/dac31bb8-67c2-4d3a-bb55-1045d968fd92/RSIVOD-9b60c46b-5e58.ism/manifest(format=m3u8-aapl,encryption=cbcs-aapl) + certificateUrl + https://rng.stage.ott.irdeto.com/licenseServer/streaming/v1/SRG/getcertificate?applicationId=stage + + + name + Non-Akamai HLS stream + url + https://lsaplus.swisstxt.ch/audio/la-1ere_96.stream/playlist.m3u8 + + + name + Non-Akamai MP3 stream + url + http://stream.srg-ssr.ch/m/la-1ere/mp3_128 + + + name + Akamai MP3 stream + url + https://srfaudio-a.akamaihd.net/delivery/world/75f44907-4638-422d-bc80-bbb14c9d9c93.mp3 + + + + diff --git a/Demo/Sources/Demos/DemosViewController.m b/Demo/Sources/Demos/DemosViewController.m index 278c947..045f7a6 100644 --- a/Demo/Sources/Demos/DemosViewController.m +++ b/Demo/Sources/Demos/DemosViewController.m @@ -6,11 +6,15 @@ #import "DemosViewController.h" +#import "Media.h" + #import #import @interface DemosViewController () +@property (nonatomic) NSArray *medias; + @end @implementation DemosViewController @@ -19,33 +23,81 @@ @implementation DemosViewController - (instancetype)init { - UIStoryboard *storyboard = [UIStoryboard storyboardWithName:NSStringFromClass(self.class) bundle:nil]; - return [storyboard instantiateInitialViewController]; + return [super initWithStyle:UITableViewStyleGrouped]; } #pragma mark Getters and setters - (NSString *)title { - return NSLocalizedString(@"Demos", nil); + return NSLocalizedString(@"Protections", nil); } -#pragma mark UITableViewDelegate protocol +#pragma mark Content -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +- (NSString *)titleForSection:(NSInteger)section { static dispatch_once_t s_onceToken; - static NSDictionary *s_URLs; + static NSArray *s_sections; dispatch_once(&s_onceToken, ^{ - s_URLs = @{ @0 : [NSURL URLWithString:@"https://rtsvodww-vh.akamaihd.net/i/genhi/2018/genhi_20180126_full_f_1067247-,301k,101k,701k,1201k,2001k,fra-ad,.mp4.csmil/master.m3u8"], - @1 : [NSURL URLWithString:@"https://srgssruni9ch-lh.akamaihd.net/i/enc9uni_ch@191320/master.m3u8"], - @2 : [NSURL URLWithString:@"https://rtsun-euwe.akamaized.net/9b2ba1d2-fefd-422f-8a8f-21b5da49a06d/rts1.ism/manifest(format=m3u8-aapl,encryption=cbcs-aapl,filter=nodvr)"], - @3 : [NSURL URLWithString:@"https://lsaplus.swisstxt.ch/audio/la-1ere_96.stream/playlist.m3u8"], - @4 : [NSURL URLWithString:@"http://stream.srg-ssr.ch/m/la-1ere/mp3_128"], - @5 : [NSURL URLWithString:@"https://srfaudio-a.akamaihd.net/delivery/world/75f44907-4638-422d-bc80-bbb14c9d9c93.mp3"] }; + s_sections = @[ NSLocalizedString(@"Vanilla player", nil), + NSLocalizedString(@"Akamai content protection player", nil), + NSLocalizedString(@"FairPlay content protection player", nil) ]; }); - NSURL *URL = s_URLs[@(indexPath.row)]; + return s_sections[section]; +} + +#pragma mark Media extraction + +- (NSArray *)medias +{ + if (! _medias) { + NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"MediaDemoConfiguration" ofType:@"plist"]; + _medias = [Media mediasFromFileAtPath:filePath]; + } + return _medias; +} + +#pragma mark UITableViewDataSource protocol + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 3; +} + +- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section +{ + return [self titleForSection:section]; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.medias.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString * const kCellIdentifier = @"MediaCell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier]; + if (! cell) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kCellIdentifier]; + } + + return cell; +} + +#pragma mark UITableViewDelegate protocol + +- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath +{ + cell.textLabel.text = self.medias[indexPath.row].name; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + NSURL *URL = self.medias[indexPath.row].URL; AVURLAsset *asset = nil; switch (indexPath.section) { @@ -60,7 +112,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath } case 2: { - NSURL *certificateURL = [NSURL URLWithString:@"https://srg.live.ott.irdeto.com/licenseServer/streaming/v1/SRG/getcertificate?applicationId=live"]; + NSURL *certificateURL = self.medias[indexPath.row].certificateURL; asset = [AVURLAsset srg_fairPlayProtectedAssetWithURL:URL certificateURL:certificateURL options:nil]; break; } @@ -71,6 +123,26 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath } AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:asset]; + +#if TARGET_OS_TV + AVMutableMetadataItem *titleItem = [[AVMutableMetadataItem alloc] init]; + titleItem.identifier = AVMetadataCommonIdentifierTitle; + titleItem.value = self.medias[indexPath.row].name; + titleItem.extendedLanguageTag = @"und"; + + AVMutableMetadataItem *descriptionItem = [[AVMutableMetadataItem alloc] init]; + descriptionItem.identifier = AVMetadataCommonIdentifierDescription; + descriptionItem.value = [NSString stringWithFormat:NSLocalizedString(@"Playing with %@", nil), [self titleForSection:indexPath.section]]; + descriptionItem.extendedLanguageTag = @"und"; + + AVMutableMetadataItem *artworkItem = [[AVMutableMetadataItem alloc] init]; + artworkItem.identifier = AVMetadataCommonIdentifierArtwork; + artworkItem.value = UIImagePNGRepresentation([UIImage imageNamed:@"artwork"]); + artworkItem.extendedLanguageTag = @"und"; + + playerItem.externalMetadata = @[ titleItem, descriptionItem, artworkItem ]; +#endif + AVPlayer *player = [AVPlayer playerWithPlayerItem:playerItem]; AVPlayerViewController *playerViewController = [[AVPlayerViewController alloc] init]; diff --git a/Demo/Sources/Demos/DemosViewController.storyboard b/Demo/Sources/Demos/DemosViewController.storyboard deleted file mode 100644 index 78c2089..0000000 --- a/Demo/Sources/Demos/DemosViewController.storyboard +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demo/Sources/Models/Media.h b/Demo/Sources/Models/Media.h new file mode 100644 index 0000000..0a2264f --- /dev/null +++ b/Demo/Sources/Models/Media.h @@ -0,0 +1,21 @@ +// +// Copyright (c) SRG SSR. All rights reserved. +// +// License information is available from the LICENSE file. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface Media : NSObject + ++ (NSArray *)mediasFromFileAtPath:(NSString *)filePath; + +@property (nonatomic, readonly, copy) NSString *name; +@property (nonatomic, readonly) NSURL *URL; +@property (nonatomic, readonly, nullable) NSURL *certificateURL; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Demo/Sources/Models/Media.m b/Demo/Sources/Models/Media.m new file mode 100644 index 0000000..a59efd3 --- /dev/null +++ b/Demo/Sources/Models/Media.m @@ -0,0 +1,53 @@ +// +// Copyright (c) SRG SSR. All rights reserved. +// +// License information is available from the LICENSE file. +// + +#import "Media.h" + +@interface Media () + +@property (nonatomic, copy) NSString *name; +@property (nonatomic) NSURL *URL; +@property (nonatomic) NSURL *certificateURL; + +@end + +@implementation Media + ++ (NSArray *)mediasFromFileAtPath:(NSString *)filePath +{ + NSArray *mediaDictionaries = [NSDictionary dictionaryWithContentsOfFile:filePath][@"medias"]; + + NSMutableArray *medias = [NSMutableArray array]; + for (NSDictionary *mediaDictionary in mediaDictionaries) { + Media *media = [[self alloc] initWithDictionary:mediaDictionary]; + if (media) { + [medias addObject:media]; + } + } + return medias.copy; +} + +- (instancetype)initWithDictionary:(NSDictionary *)dictionary +{ + if (self = [super init]) { + self.name = dictionary[@"name"]; + if (! self.name) { + return nil; + } + + NSString *URLString = dictionary[@"url"]; + self.URL = URLString ? [NSURL URLWithString:URLString] : nil; + if (! self.URL) { + return nil; + } + + NSString *certificateURLString = dictionary[@"certificateUrl"]; + self.certificateURL = certificateURLString ? [NSURL URLWithString:certificateURLString] : nil; + } + return self; +} + +@end diff --git a/Framework/Framework.xcconfig b/Framework/Framework.xcconfig new file mode 100644 index 0000000..128e811 --- /dev/null +++ b/Framework/Framework.xcconfig @@ -0,0 +1,2 @@ +#include "../Common.xcconfig" + diff --git a/Framework/Sources/ResourceLoaders/SRGAkamaiAssetResourceLoaderDelegate.m b/Framework/Sources/ResourceLoaders/SRGAkamaiAssetResourceLoaderDelegate.m index 5a27d82..7e3d86d 100644 --- a/Framework/Sources/ResourceLoaders/SRGAkamaiAssetResourceLoaderDelegate.m +++ b/Framework/Sources/ResourceLoaders/SRGAkamaiAssetResourceLoaderDelegate.m @@ -99,16 +99,16 @@ - (BOOL)shouldProcessResourceLoadingRequest:(AVAssetResourceLoadingRequest *)loa [diagnosticInformation setString:error.localizedDescription forKey:@"errorMessage"]; [diagnosticInformation stopTimeMeasurementForKey:@"duration"]; - NSMutableURLRequest *playlistRequest = [loadingRequest.request mutableCopy]; + NSMutableURLRequest *playlistRequest = loadingRequest.request.mutableCopy; playlistRequest.URL = URL; SRGRequest *request = [[SRGRequest dataRequestWithURLRequest:playlistRequest session:self.session completionBlock:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { loadingRequest.response = response; if (error) { - NSMutableDictionary *userInfo = [@{ NSLocalizedDescriptionKey : SRGContentProtectionLocalizedString(@"This content is protected and cannot be played without proper rights.", @"User-facing message displayed proper authorization to play a stream has not been obtained") } mutableCopy]; + NSMutableDictionary *userInfo = @{ NSLocalizedDescriptionKey : SRGContentProtectionLocalizedString(@"This content is protected and cannot be played without proper rights.", @"User-facing message displayed proper authorization to play a stream has not been obtained") }.mutableCopy; if (error) { userInfo[NSUnderlyingErrorKey] = error; } - NSError *friendlyError = [NSError errorWithDomain:SRGContentProtectionErrorDomain code:SRGContentProtectionErrorUnauthorized userInfo:[userInfo copy]]; + NSError *friendlyError = [NSError errorWithDomain:SRGContentProtectionErrorDomain code:SRGContentProtectionErrorUnauthorized userInfo:userInfo.copy]; [loadingRequest finishLoadingWithError:friendlyError]; } else { diff --git a/Framework/Sources/ResourceLoaders/SRGFairPlayAssetResourceLoaderDelegate.m b/Framework/Sources/ResourceLoaders/SRGFairPlayAssetResourceLoaderDelegate.m index a4b0fac..5f651f1 100644 --- a/Framework/Sources/ResourceLoaders/SRGFairPlayAssetResourceLoaderDelegate.m +++ b/Framework/Sources/ResourceLoaders/SRGFairPlayAssetResourceLoaderDelegate.m @@ -28,7 +28,7 @@ static BOOL SRGIsFairPlayURL(NSURL *URL) [request setValue:@"application/octet-stream" forHTTPHeaderField:@"Content-Type"]; request.HTTPMethod = @"POST"; request.HTTPBody = requestData; - return [request copy]; + return request.copy; } @interface SRGFairPlayAssetResourceLoaderDelegate () @@ -142,11 +142,11 @@ - (void)finishLoadingRequest:(AVAssetResourceLoadingRequest *)loadingRequest wit [loadingRequest finishLoading]; } else { - NSMutableDictionary *userInfo = [@{ NSLocalizedDescriptionKey : SRGContentProtectionLocalizedString(@"This content is protected and cannot be played without proper rights. Contact customer support for further help.", @"User-facing message displayed when an error related to digital rights management (DRM) has been encountered, and inviting the user to contact customer support") } mutableCopy]; + NSMutableDictionary *userInfo = @{ NSLocalizedDescriptionKey : SRGContentProtectionLocalizedString(@"This content is protected and cannot be played without proper rights. Contact customer support for further help.", @"User-facing message displayed when an error related to digital rights management (DRM) has been encountered, and inviting the user to contact customer support") }.mutableCopy; if (error) { userInfo[NSUnderlyingErrorKey] = error; } - NSError *friendlyError = [NSError errorWithDomain:SRGContentProtectionErrorDomain code:SRGContentProtectionErrorUnauthorized userInfo:[userInfo copy]]; + NSError *friendlyError = [NSError errorWithDomain:SRGContentProtectionErrorDomain code:SRGContentProtectionErrorUnauthorized userInfo:userInfo.copy]; [loadingRequest finishLoadingWithError:friendlyError]; } diff --git a/Framework/Sources/SRGAkamaiToken.m b/Framework/Sources/SRGAkamaiToken.m index 84087c7..354cd11 100644 --- a/Framework/Sources/SRGAkamaiToken.m +++ b/Framework/Sources/SRGAkamaiToken.m @@ -63,11 +63,11 @@ + (SRGRequest *)tokenizeURL:(NSURL *)URL withSession:(NSURLSession *)session com // Build the tokenized URL, merging token components with existing ones NSURLComponents *URLComponents = [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:NO]; - NSMutableArray *queryItems = [URLComponents.queryItems mutableCopy] ?: [NSMutableArray array]; + NSMutableArray *queryItems = URLComponents.queryItems.mutableCopy ?: [NSMutableArray array]; if (tokenURLComponents.queryItems) { [queryItems addObjectsFromArray:tokenURLComponents.queryItems]; } - URLComponents.queryItems = [queryItems copy]; + URLComponents.queryItems = queryItems.copy; return URLComponents.URL; } completionBlock:^(id _Nullable object, NSURLResponse * _Nullable response, NSError * _Nullable error) { diff --git a/Gemfile b/Gemfile index b734015..ea0afbf 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,10 @@ +# frozen_string_literal: true + # Autogenerated by fastlane # # Ensure this file is checked in to source control! -source "https://rubygems.org" +source 'https://rubygems.org' gem 'fastlane' diff --git a/Gemfile.lock b/Gemfile.lock index f097ef7..f29951a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,23 @@ +GIT + remote: https://github.com/SRGSSR/trainer + revision: b39b3a996a18d87b8f19ce3e31a607198ce34581 + tag: 0.9.1.1 + specs: + fastlane-plugin-trainer (0.4.1) + trainer (>= 0.7.0) + trainer (0.9.1.1) + fastlane (>= 2.25.0) + plist (>= 3.1.0, < 4.0.0) + GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.0) - addressable (2.6.0) - public_suffix (>= 2.0.2, < 4.0) + CFPropertyList (3.0.2) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) atomos (0.1.3) - babosa (1.0.2) - claide (1.0.2) + babosa (1.0.3) + claide (1.0.3) colored (1.2) colored2 (3.1.2) commander-fastlane (4.4.6) @@ -14,20 +25,20 @@ GEM declarative (0.0.10) declarative-option (0.1.0) digest-crc (0.4.1) - domain_name (0.5.20180417) + domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - dotenv (2.6.0) + dotenv (2.7.5) emoji_regex (1.0.1) - excon (0.62.0) - faraday (0.15.4) + excon (0.71.0) + faraday (0.17.1) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) http-cookie (~> 1.0.0) faraday_middleware (0.13.1) faraday (>= 0.7.4, < 1.0) - fastimage (2.1.5) - fastlane (2.116.0) + fastimage (2.1.7) + fastlane (2.137.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) @@ -37,35 +48,34 @@ GEM dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 2.0) excon (>= 0.45.0, < 1.0.0) - faraday (~> 0.9) + faraday (~> 0.17) faraday-cookie_jar (~> 0.0.6) - faraday_middleware (~> 0.9) + faraday_middleware (~> 0.13.1) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) google-api-client (>= 0.21.2, < 0.24.0) google-cloud-storage (>= 1.15.0, < 2.0.0) highline (>= 1.7.2, < 2.0.0) json (< 3.0.0) - mini_magick (~> 4.5.1) - multi_json + jwt (~> 2.1.0) + mini_magick (>= 4.9.4, < 5.0.0) multi_xml (~> 0.5) multipart-post (~> 2.0.0) plist (>= 3.1.0, < 4.0.0) public_suffix (~> 2.0.0) - rubyzip (>= 1.2.2, < 2.0.0) + rubyzip (>= 1.3.0, < 2.0.0) security (= 0.1.3) simctl (~> 1.6.3) slack-notifier (>= 2.0.0, < 3.0.0) - terminal-notifier (>= 1.6.2, < 2.0.0) + terminal-notifier (>= 2.0.0, < 3.0.0) terminal-table (>= 1.4.5, < 2.0.0) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) - xcodeproj (>= 1.6.0, < 2.0.0) + xcodeproj (>= 1.8.1, < 2.0.0) xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) - fastlane-plugin-trainer (0.4.1) - trainer (>= 0.7.0) + fastlane-plugin-xcconfig (2.0.0) gh_inspector (1.1.3) google-api-client (0.23.9) addressable (~> 2.5, >= 2.5.1) @@ -75,9 +85,9 @@ GEM representable (~> 3.0) retriable (>= 2.0, < 4.0) signet (~> 0.9) - google-cloud-core (1.3.0) + google-cloud-core (1.3.2) google-cloud-env (~> 1.0) - google-cloud-env (1.0.5) + google-cloud-env (1.2.1) faraday (~> 0.11) google-cloud-storage (1.16.0) digest-crc (~> 0.4) @@ -95,19 +105,19 @@ GEM http-cookie (1.0.3) domain_name (~> 0.5) httpclient (2.8.3) - json (2.1.0) + json (2.3.0) jwt (2.1.0) - memoist (0.16.0) - mime-types (3.2.2) + memoist (0.16.2) + mime-types (3.3) mime-types-data (~> 3.2015) - mime-types-data (3.2018.0812) - mini_magick (4.5.1) - multi_json (1.13.1) + mime-types-data (3.2019.1009) + mini_magick (4.9.5) + multi_json (1.14.1) multi_xml (0.6.0) multipart-post (2.0.0) nanaimo (0.2.6) naturally (2.2.0) - os (1.0.0) + os (1.0.1) plist (3.5.0) public_suffix (2.0.5) representable (3.0.4) @@ -116,34 +126,31 @@ GEM uber (< 0.2.0) retriable (3.1.2) rouge (2.0.7) - rubyzip (1.2.2) + rubyzip (1.3.0) security (0.1.3) signet (0.11.0) addressable (~> 2.3) faraday (~> 0.9) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - simctl (1.6.5) + simctl (1.6.6) CFPropertyList naturally slack-notifier (2.3.2) - terminal-notifier (1.8.0) + terminal-notifier (2.0.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) - trainer (0.8.1) - fastlane (>= 2.25.0) - plist (>= 3.1.0, < 4.0.0) - tty-cursor (0.6.0) - tty-screen (0.6.5) - tty-spinner (0.9.0) - tty-cursor (~> 0.6.0) + tty-cursor (0.7.0) + tty-screen (0.7.0) + tty-spinner (0.9.2) + tty-cursor (~> 0.7) uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.7.5) - unicode-display_width (1.4.1) + unf_ext (0.0.7.6) + unicode-display_width (1.6.0) word_wrap (1.0.0) - xcodeproj (1.8.0) + xcodeproj (1.14.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -159,7 +166,8 @@ PLATFORMS DEPENDENCIES fastlane - fastlane-plugin-trainer + fastlane-plugin-trainer! + fastlane-plugin-xcconfig BUNDLED WITH 1.16.5 diff --git a/Makefile b/Makefile index 60b61ce..9fd77ea 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ #!/usr/bin/xcrun make -f CARTHAGE_FOLDER=Carthage -CARTHAGE_FLAGS=--platform iOS --cache-builds --new-resolver +CARTHAGE_FLAGS=--platform iOS,tvOS --cache-builds --new-resolver .PHONY: all all: bootstrap diff --git a/SRGContentProtection.xcodeproj/project.pbxproj b/SRGContentProtection.xcodeproj/project.pbxproj index 2c19fac..32ce9c7 100644 --- a/SRGContentProtection.xcodeproj/project.pbxproj +++ b/SRGContentProtection.xcodeproj/project.pbxproj @@ -8,54 +8,41 @@ /* Begin PBXBuildFile section */ 0858B69822010C9E000F00CF /* SRGLogger.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69522010C9E000F00CF /* SRGLogger.framework */; }; - 0858B69A22010C9E000F00CF /* SRGLogger.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69522010C9E000F00CF /* SRGLogger.framework */; }; 0858B69B22010C9E000F00CF /* libextobjc.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69622010C9E000F00CF /* libextobjc.framework */; }; 0858B69C22010C9E000F00CF /* libextobjc.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69622010C9E000F00CF /* libextobjc.framework */; }; - 0858B69D22010C9E000F00CF /* libextobjc.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69622010C9E000F00CF /* libextobjc.framework */; }; 0858B69E22010C9E000F00CF /* MAKVONotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69722010C9E000F00CF /* MAKVONotificationCenter.framework */; }; - 0858B6A022010C9E000F00CF /* MAKVONotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69722010C9E000F00CF /* MAKVONotificationCenter.framework */; }; - 0858B6A222010CD6000F00CF /* libextobjc.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69622010C9E000F00CF /* libextobjc.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 0858B6A322010CD6000F00CF /* MAKVONotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69722010C9E000F00CF /* MAKVONotificationCenter.framework */; }; - 0858B6A422010CD6000F00CF /* MAKVONotificationCenter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69722010C9E000F00CF /* MAKVONotificationCenter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 0858B6A522010CD6000F00CF /* SRGLogger.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69522010C9E000F00CF /* SRGLogger.framework */; }; - 0858B6A622010CD6000F00CF /* SRGLogger.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0858B69522010C9E000F00CF /* SRGLogger.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 08E2AF6423108D8F00DCCE74 /* MediaDemoConfiguration.plist in Resources */ = {isa = PBXBuildFile; fileRef = 08E2AF6323108D8F00DCCE74 /* MediaDemoConfiguration.plist */; }; + 08E2AF6923108EBA00DCCE74 /* Media.m in Sources */ = {isa = PBXBuildFile; fileRef = 08E2AF6823108EBA00DCCE74 /* Media.m */; }; 6F0432BD21006E7A002B090A /* SRGNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0432BC21006E7A002B090A /* SRGNetwork.framework */; }; 6F0432BE21007340002B090A /* SRGNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0432BC21006E7A002B090A /* SRGNetwork.framework */; }; - 6F0432BF21007340002B090A /* SRGNetwork.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0432BC21006E7A002B090A /* SRGNetwork.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6F0C98EE2121E1D600073AB6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6FCBFEF7210B578B006BC355 /* Localizable.strings */; }; 6F0C98F12121E26A00073AB6 /* SRGContentProtection.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6F0C98E62121E1C200073AB6 /* SRGContentProtection.bundle */; }; 6F0EB54020FC7FA9009C02CF /* SRGContentProtection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F0EB53E20FC7FA9009C02CF /* SRGContentProtection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6F0EB54320FC7FF4009C02CF /* SRGContentProtection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0EB54220FC7FF4009C02CF /* SRGContentProtection.m */; }; 6F0EB54720FC8049009C02CF /* NSBundle+SRGContentProtection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0EB54520FC8049009C02CF /* NSBundle+SRGContentProtection.m */; }; 6F0EB54820FC8049009C02CF /* NSBundle+SRGContentProtection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F0EB54620FC8049009C02CF /* NSBundle+SRGContentProtection.h */; }; - 6F3246172201B1CA0017D00E /* libextobjc.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = 0858B69622010C9E000F00CF /* libextobjc.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 6F3246182201B1CD0017D00E /* MAKVONotificationCenter.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = 0858B69722010C9E000F00CF /* MAKVONotificationCenter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 6F3246192201B1D20017D00E /* SRGLogger.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = 0858B69522010C9E000F00CF /* SRGLogger.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6F7B786A2108A05C001E3BBE /* SRGAkamaiToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F7B78682108A05C001E3BBE /* SRGAkamaiToken.h */; }; 6F7B786B2108A05C001E3BBE /* SRGAkamaiToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7B78692108A05C001E3BBE /* SRGAkamaiToken.m */; }; 6F8A93D220FDB3D200AA6434 /* SRGFairPlayAssetResourceLoaderDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F8A93D020FDB3D200AA6434 /* SRGFairPlayAssetResourceLoaderDelegate.h */; }; 6F8A93D320FDB3D200AA6434 /* SRGFairPlayAssetResourceLoaderDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F8A93D120FDB3D200AA6434 /* SRGFairPlayAssetResourceLoaderDelegate.m */; }; - 6F8A93FB20FDCAA800AA6434 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6F8A93F020FDCAA800AA6434 /* LaunchScreen.storyboard */; }; + 6F8A93FB20FDCAA800AA6434 /* LaunchScreen~ios.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6F8A93F020FDCAA800AA6434 /* LaunchScreen~ios.storyboard */; }; 6F8A93FC20FDCAA800AA6434 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6F8A93F120FDCAA800AA6434 /* Images.xcassets */; }; 6F8A93FD20FDCAA800AA6434 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F8A93F520FDCAA800AA6434 /* main.m */; }; 6F8A93FE20FDCAA800AA6434 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F8A93F620FDCAA800AA6434 /* AppDelegate.m */; }; 6F8A93FF20FDCAA800AA6434 /* DemosViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F8A93F920FDCAA800AA6434 /* DemosViewController.m */; }; - 6F8A940220FDCBA600AA6434 /* DemosViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6F8A940120FDCBA600AA6434 /* DemosViewController.storyboard */; }; - 6F8A940320FDD01B00AA6434 /* SRGContentProtection.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0EB53120FC7F58009C02CF /* SRGContentProtection.framework */; }; - 6F8A940420FDD01B00AA6434 /* SRGContentProtection.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0EB53120FC7F58009C02CF /* SRGContentProtection.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6FB74D6C2101D4D200E2D365 /* SRGContentProtection.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0EB53120FC7F58009C02CF /* SRGContentProtection.framework */; }; 6FB74D772101D5D600E2D365 /* AkamaiResourceLoaderTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FB74D742101D5D600E2D365 /* AkamaiResourceLoaderTestCase.m */; }; 6FB74D782101D5D600E2D365 /* FairPlayResourceLoaderTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FB74D752101D5D600E2D365 /* FairPlayResourceLoaderTestCase.m */; }; - 6FB74D7B2101D69F00E2D365 /* SRGNetwork.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = 6F0432BC21006E7A002B090A /* SRGNetwork.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6FBCA7412109A9F4004CD02D /* AkamaiTokenTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBCA7402109A9F4004CD02D /* AkamaiTokenTestCase.m */; }; 6FBF24312147F3ED00E576A2 /* SRGDiagnostics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FBF24302147F3ED00E576A2 /* SRGDiagnostics.framework */; }; - 6FBF24322147F4BC00E576A2 /* SRGDiagnostics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FBF24302147F3ED00E576A2 /* SRGDiagnostics.framework */; }; - 6FBF24332147F4C200E576A2 /* SRGDiagnostics.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = 6FBF24302147F3ED00E576A2 /* SRGDiagnostics.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6FBF24342147F4C900E576A2 /* SRGDiagnostics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FBF24302147F3ED00E576A2 /* SRGDiagnostics.framework */; }; - 6FBF24352147F4C900E576A2 /* SRGDiagnostics.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6FBF24302147F3ED00E576A2 /* SRGDiagnostics.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6FBF24372147FE2E00E576A2 /* SRGAssetResourceLoaderDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBF24362147FE2E00E576A2 /* SRGAssetResourceLoaderDelegate.m */; }; 6FBF243A21480DB300E576A2 /* SRGContentProtectionConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FBF243821480DB300E576A2 /* SRGContentProtectionConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6FBF243B21480DB300E576A2 /* SRGContentProtectionConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBF243921480DB300E576A2 /* SRGContentProtectionConstants.m */; }; + 6FCAB6CE231673B00043432E /* SRGContentProtection.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0EB53120FC7F58009C02CF /* SRGContentProtection.framework */; }; + 6FCAB6CF231673B00043432E /* SRGContentProtection.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0EB53120FC7F58009C02CF /* SRGContentProtection.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6FD810F420FCB58500F250B9 /* AVURLAsset+SRGContentProtection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD810F220FCB58500F250B9 /* AVURLAsset+SRGContentProtection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6FD810F520FCB58500F250B9 /* AVURLAsset+SRGContentProtection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FD810F320FCB58500F250B9 /* AVURLAsset+SRGContentProtection.m */; }; 6FD8110120FCC22500F250B9 /* SRGAkamaiAssetResourceLoaderDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD810FF20FCC22500F250B9 /* SRGAkamaiAssetResourceLoaderDelegate.h */; }; @@ -63,7 +50,6 @@ 6FDE576520FC9DC700719525 /* SRGContentProtectionError.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FDE576320FC9DC700719525 /* SRGContentProtectionError.m */; }; 6FDE576620FC9DC700719525 /* SRGContentProtectionError.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FDE576420FC9DC700719525 /* SRGContentProtectionError.h */; }; 6FE021DD2119B58800DF6617 /* SRGAssetResourceLoaderDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FE021DC2119B58800DF6617 /* SRGAssetResourceLoaderDelegate.h */; }; - 6FE91E7B2108A36A001B5E8F /* SRGNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0432BC21006E7A002B090A /* SRGNetwork.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -91,43 +77,27 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - 6F8A940720FDD01B00AA6434 /* Embed Frameworks */ = { + 6FCAB6D0231673B00043432E /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - 6F0432BF21007340002B090A /* SRGNetwork.framework in Embed Frameworks */, - 0858B6A422010CD6000F00CF /* MAKVONotificationCenter.framework in Embed Frameworks */, - 6FBF24352147F4C900E576A2 /* SRGDiagnostics.framework in Embed Frameworks */, - 0858B6A222010CD6000F00CF /* libextobjc.framework in Embed Frameworks */, - 6F8A940420FDD01B00AA6434 /* SRGContentProtection.framework in Embed Frameworks */, - 0858B6A622010CD6000F00CF /* SRGLogger.framework in Embed Frameworks */, + 6FCAB6CF231673B00043432E /* SRGContentProtection.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; - 6FB74D7A2101D68F00E2D365 /* Copy Files */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 6F3246192201B1D20017D00E /* SRGLogger.framework in Copy Files */, - 6F3246182201B1CD0017D00E /* MAKVONotificationCenter.framework in Copy Files */, - 6F3246172201B1CA0017D00E /* libextobjc.framework in Copy Files */, - 6FBF24332147F4C200E576A2 /* SRGDiagnostics.framework in Copy Files */, - 6FB74D7B2101D69F00E2D365 /* SRGNetwork.framework in Copy Files */, - ); - name = "Copy Files"; - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 0858B69522010C9E000F00CF /* SRGLogger.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SRGLogger.framework; path = Carthage/Build/iOS/SRGLogger.framework; sourceTree = ""; }; 0858B69622010C9E000F00CF /* libextobjc.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libextobjc.framework; path = Carthage/Build/iOS/libextobjc.framework; sourceTree = ""; }; 0858B69722010C9E000F00CF /* MAKVONotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MAKVONotificationCenter.framework; path = Carthage/Build/iOS/MAKVONotificationCenter.framework; sourceTree = ""; }; + 08CED68E231EF5BF00C2C6DA /* Common.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Common.xcconfig; sourceTree = ""; }; + 08E2AF6323108D8F00DCCE74 /* MediaDemoConfiguration.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = MediaDemoConfiguration.plist; sourceTree = ""; }; + 08E2AF6723108EBA00DCCE74 /* Media.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Media.h; sourceTree = ""; }; + 08E2AF6823108EBA00DCCE74 /* Media.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Media.m; sourceTree = ""; }; 6F0432BC21006E7A002B090A /* SRGNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SRGNetwork.framework; path = Carthage/Build/iOS/SRGNetwork.framework; sourceTree = ""; }; 6F0C98E62121E1C200073AB6 /* SRGContentProtection.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SRGContentProtection.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 6F0EB53120FC7F58009C02CF /* SRGContentProtection.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SRGContentProtection.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -141,7 +111,7 @@ 6F8A93D020FDB3D200AA6434 /* SRGFairPlayAssetResourceLoaderDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SRGFairPlayAssetResourceLoaderDelegate.h; sourceTree = ""; }; 6F8A93D120FDB3D200AA6434 /* SRGFairPlayAssetResourceLoaderDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SRGFairPlayAssetResourceLoaderDelegate.m; sourceTree = ""; }; 6F8A93D820FDCA0800AA6434 /* SRGContentProtection-demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SRGContentProtection-demo.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 6F8A93F020FDCAA800AA6434 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + 6F8A93F020FDCAA800AA6434 /* LaunchScreen~ios.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "LaunchScreen~ios.storyboard"; sourceTree = ""; }; 6F8A93F120FDCAA800AA6434 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 6F8A93F420FDCAA800AA6434 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 6F8A93F520FDCAA800AA6434 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -149,7 +119,6 @@ 6F8A93F820FDCAA800AA6434 /* DemosViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemosViewController.h; sourceTree = ""; }; 6F8A93F920FDCAA800AA6434 /* DemosViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemosViewController.m; sourceTree = ""; }; 6F8A93FA20FDCAA800AA6434 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6F8A940120FDCBA600AA6434 /* DemosViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = DemosViewController.storyboard; sourceTree = ""; }; 6FB74D672101D4D200E2D365 /* SRGContentProtection-tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SRGContentProtection-tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 6FB74D742101D5D600E2D365 /* AkamaiResourceLoaderTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AkamaiResourceLoaderTestCase.m; sourceTree = ""; }; 6FB74D752101D5D600E2D365 /* FairPlayResourceLoaderTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FairPlayResourceLoaderTestCase.m; sourceTree = ""; }; @@ -159,6 +128,7 @@ 6FBF24362147FE2E00E576A2 /* SRGAssetResourceLoaderDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SRGAssetResourceLoaderDelegate.m; sourceTree = ""; }; 6FBF243821480DB300E576A2 /* SRGContentProtectionConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SRGContentProtectionConstants.h; sourceTree = ""; }; 6FBF243921480DB300E576A2 /* SRGContentProtectionConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SRGContentProtectionConstants.m; sourceTree = ""; }; + 6FCAB6C023165B0D0043432E /* Demo.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Demo.xcconfig; sourceTree = ""; }; 6FCBFEF8210B578B006BC355 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 6FCBFEFA210B57BD006BC355 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = ""; }; 6FCBFEFB210B57BD006BC355 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; @@ -172,6 +142,8 @@ 6FDE576420FC9DC700719525 /* SRGContentProtectionError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRGContentProtectionError.h; sourceTree = ""; }; 6FE021DC2119B58800DF6617 /* SRGAssetResourceLoaderDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRGAssetResourceLoaderDelegate.h; sourceTree = ""; }; 6FE6E5E32148DC1D00228573 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Framework.xcconfig; sourceTree = ""; }; + 6FEDF729231576F400BEE8E1 /* Tests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Tests.xcconfig; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -201,9 +173,9 @@ 6F0432BE21007340002B090A /* SRGNetwork.framework in Frameworks */, 0858B6A322010CD6000F00CF /* MAKVONotificationCenter.framework in Frameworks */, 0858B6A522010CD6000F00CF /* SRGLogger.framework in Frameworks */, + 6FCAB6CE231673B00043432E /* SRGContentProtection.framework in Frameworks */, 0858B69C22010C9E000F00CF /* libextobjc.framework in Frameworks */, 6FBF24342147F4C900E576A2 /* SRGDiagnostics.framework in Frameworks */, - 6F8A940320FDD01B00AA6434 /* SRGContentProtection.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -211,21 +183,26 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 6FBF24322147F4BC00E576A2 /* SRGDiagnostics.framework in Frameworks */, - 0858B6A022010C9E000F00CF /* MAKVONotificationCenter.framework in Frameworks */, - 0858B69D22010C9E000F00CF /* libextobjc.framework in Frameworks */, - 6FE91E7B2108A36A001B5E8F /* SRGNetwork.framework in Frameworks */, 6FB74D6C2101D4D200E2D365 /* SRGContentProtection.framework in Frameworks */, - 0858B69A22010C9E000F00CF /* SRGLogger.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 08E2AF6623108EBA00DCCE74 /* Models */ = { + isa = PBXGroup; + children = ( + 08E2AF6723108EBA00DCCE74 /* Media.h */, + 08E2AF6823108EBA00DCCE74 /* Media.m */, + ); + path = Models; + sourceTree = ""; + }; 6F0EB52720FC7F58009C02CF = { isa = PBXGroup; children = ( + 08CED68E231EF5BF00C2C6DA /* Common.xcconfig */, 6F0EB53C20FC7FA9009C02CF /* Framework */, 6FB74D722101D5D600E2D365 /* Tests */, 6F8A93EE20FDCAA800AA6434 /* Demo */, @@ -251,6 +228,7 @@ 6F0EB53D20FC7FA9009C02CF /* Sources */, 6FCBFEF6210B571C006BC355 /* Resources */, 6F0EB53F20FC7FA9009C02CF /* Info.plist */, + 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */, ); path = Framework; sourceTree = ""; @@ -289,6 +267,7 @@ 6F8A93F220FDCAA800AA6434 /* Sources */, 6F8A93EF20FDCAA800AA6434 /* Resources */, 6F8A93FA20FDCAA800AA6434 /* Info.plist */, + 6FCAB6C023165B0D0043432E /* Demo.xcconfig */, ); path = Demo; sourceTree = ""; @@ -296,7 +275,8 @@ 6F8A93EF20FDCAA800AA6434 /* Resources */ = { isa = PBXGroup; children = ( - 6F8A93F020FDCAA800AA6434 /* LaunchScreen.storyboard */, + 08E2AF6323108D8F00DCCE74 /* MediaDemoConfiguration.plist */, + 6F8A93F020FDCAA800AA6434 /* LaunchScreen~ios.storyboard */, 6F8A93F120FDCAA800AA6434 /* Images.xcassets */, ); path = Resources; @@ -307,6 +287,7 @@ children = ( 6F8A93F320FDCAA800AA6434 /* Application */, 6F8A93F720FDCAA800AA6434 /* Demos */, + 08E2AF6623108EBA00DCCE74 /* Models */, ); path = Sources; sourceTree = ""; @@ -326,7 +307,6 @@ children = ( 6F8A93F820FDCAA800AA6434 /* DemosViewController.h */, 6F8A93F920FDCAA800AA6434 /* DemosViewController.m */, - 6F8A940120FDCBA600AA6434 /* DemosViewController.storyboard */, ); path = Demos; sourceTree = ""; @@ -348,6 +328,7 @@ children = ( 6FB74D732101D5D600E2D365 /* Sources */, 6FB74D762101D5D600E2D365 /* Info.plist */, + 6FEDF729231576F400BEE8E1 /* Tests.xcconfig */, ); path = Tests; sourceTree = SOURCE_ROOT; @@ -449,7 +430,8 @@ 6F8A93D420FDCA0800AA6434 /* Sources */, 6F8A93D520FDCA0800AA6434 /* Frameworks */, 6F8A93D620FDCA0800AA6434 /* Resources */, - 6F8A940720FDD01B00AA6434 /* Embed Frameworks */, + 6FCAB6CC2316732B0043432E /* Embed Frameworks (Carthage) */, + 6FCAB6D0231673B00043432E /* Embed Frameworks */, ); buildRules = ( ); @@ -468,7 +450,6 @@ 6FB74D632101D4D200E2D365 /* Sources */, 6FB74D642101D4D200E2D365 /* Frameworks */, 6FB74D652101D4D200E2D365 /* Resources */, - 6FB74D7A2101D68F00E2D365 /* Copy Files */, ); buildRules = ( ); @@ -486,7 +467,7 @@ 6F0EB52820FC7F58009C02CF /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1100; ORGANIZATIONNAME = "SRG SSR"; TargetAttributes = { 6F0C98E52121E1C200073AB6 = { @@ -522,8 +503,8 @@ targets = ( 6F0EB53020FC7F58009C02CF /* SRGContentProtection */, 6F0C98E52121E1C200073AB6 /* SRGContentProtection-resources */, - 6F8A93D720FDCA0800AA6434 /* SRGContentProtection-demo */, 6FB74D662101D4D200E2D365 /* SRGContentProtection-tests */, + 6F8A93D720FDCA0800AA6434 /* SRGContentProtection-demo */, ); }; /* End PBXProject section */ @@ -549,8 +530,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6F8A93FB20FDCAA800AA6434 /* LaunchScreen.storyboard in Resources */, - 6F8A940220FDCBA600AA6434 /* DemosViewController.storyboard in Resources */, + 6F8A93FB20FDCAA800AA6434 /* LaunchScreen~ios.storyboard in Resources */, + 08E2AF6423108D8F00DCCE74 /* MediaDemoConfiguration.plist in Resources */, 6F8A93FC20FDCAA800AA6434 /* Images.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -564,6 +545,32 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 6FCAB6CC2316732B0043432E /* Embed Frameworks (Carthage) */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "$(SRCROOT)/Carthage/Build/$(CARTHAGE_PLATFORM)/libextobjc.framework", + "$(SRCROOT)/Carthage/Build/$(CARTHAGE_PLATFORM)/MAKVONotificationCenter.framework", + "$(SRCROOT)/Carthage/Build/$(CARTHAGE_PLATFORM)/SRGDiagnostics.framework", + "$(SRCROOT)/Carthage/Build/$(CARTHAGE_PLATFORM)/SRGLogger.framework", + "$(SRCROOT)/Carthage/Build/$(CARTHAGE_PLATFORM)/SRGNetwork.framework", + ); + name = "Embed Frameworks (Carthage)"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/usr/local/bin/carthage copy-frameworks\n"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 6F0C98E22121E1C200073AB6 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -594,6 +601,7 @@ files = ( 6F8A93FE20FDCAA800AA6434 /* AppDelegate.m in Sources */, 6F8A93FD20FDCAA800AA6434 /* main.m in Sources */, + 08E2AF6923108EBA00DCCE74 /* Media.m in Sources */, 6F8A93FF20FDCAA800AA6434 /* DemosViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -677,7 +685,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; @@ -699,29 +707,26 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 1.2.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; + PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.$(TARGET_NAME)"; + PRODUCT_NAME = "$(TARGET_NAME)"; }; name = "Debug-static"; }; 6F0C98DB2121E14000073AB6 /* Debug-static */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_CODE_COVERAGE = NO; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)/Static", ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -731,8 +736,6 @@ "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; - PRODUCT_BUNDLE_IDENTIFIER = ch.srgssr.SRGContentProtection; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; }; @@ -740,40 +743,40 @@ }; 6F0C98DC2121E14000073AB6 /* Debug-static */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FCAB6C023165B0D0043432E /* Demo.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(APP_ICONS_SOURCE)"; DEVELOPMENT_TEAM = VMGRRW6SG7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Demo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-demo"; - PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; }; name = "Debug-static"; }; 6F0C98DD2121E14000073AB6 /* Debug-static */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF729231576F400BEE8E1 /* Tests.xcconfig */; buildSettings = { - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_IDENTITY = "-"; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", ); - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-tests"; - PRODUCT_NAME = "$(TARGET_NAME)"; }; name = "Debug-static"; }; @@ -810,7 +813,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -826,29 +829,26 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 1.2.3; MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; + PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.$(TARGET_NAME)"; + PRODUCT_NAME = "$(TARGET_NAME)"; VALIDATE_PRODUCT = YES; }; name = "Release-static"; }; 6F0C98DF2121E14600073AB6 /* Release-static */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_CODE_COVERAGE = NO; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)/Static", ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -858,8 +858,6 @@ "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; - PRODUCT_BUNDLE_IDENTIFIER = ch.srgssr.SRGContentProtection; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; }; @@ -867,51 +865,51 @@ }; 6F0C98E02121E14600073AB6 /* Release-static */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FCAB6C023165B0D0043432E /* Demo.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(APP_ICONS_SOURCE)"; DEVELOPMENT_TEAM = VMGRRW6SG7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Demo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-demo"; - PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; }; name = "Release-static"; }; 6F0C98E12121E14600073AB6 /* Release-static */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF729231576F400BEE8E1 /* Tests.xcconfig */; buildSettings = { - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_IDENTITY = "-"; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", ); - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-tests"; - PRODUCT_NAME = "$(TARGET_NAME)"; }; name = "Release-static"; }; 6F0C98EA2121E1C200073AB6 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Framework/Resources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-resources"; PRODUCT_NAME = SRGContentProtection; SKIP_INSTALL = YES; WRAPPER_EXTENSION = bundle; @@ -920,12 +918,12 @@ }; 6F0C98EB2121E1C200073AB6 /* Debug-static */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Framework/Resources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-resources"; PRODUCT_NAME = SRGContentProtection; SKIP_INSTALL = YES; WRAPPER_EXTENSION = bundle; @@ -934,12 +932,12 @@ }; 6F0C98EC2121E1C200073AB6 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Framework/Resources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-resources"; PRODUCT_NAME = SRGContentProtection; SKIP_INSTALL = YES; WRAPPER_EXTENSION = bundle; @@ -948,12 +946,12 @@ }; 6F0C98ED2121E1C200073AB6 /* Release-static */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Framework/Resources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-resources"; PRODUCT_NAME = SRGContentProtection; SKIP_INSTALL = YES; WRAPPER_EXTENSION = bundle; @@ -993,7 +991,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; @@ -1015,12 +1013,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 1.2.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; + PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.$(TARGET_NAME)"; + PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; @@ -1057,7 +1053,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "Apple Development"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -1073,27 +1069,24 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 1.2.3; MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; + PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.$(TARGET_NAME)"; + PRODUCT_NAME = "$(TARGET_NAME)"; VALIDATE_PRODUCT = YES; }; name = Release; }; 6F0EB53A20FC7F58009C02CF /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -1102,8 +1095,6 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = ch.srgssr.SRGContentProtection; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; }; @@ -1111,16 +1102,15 @@ }; 6F0EB53B20FC7F58009C02CF /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF728231576E000BEE8E1 /* Framework.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -1129,8 +1119,6 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = ch.srgssr.SRGContentProtection; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; VERSIONING_SYSTEM = "apple-generic"; }; @@ -1138,79 +1126,79 @@ }; 6F8A93EC20FDCA0900AA6434 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FCAB6C023165B0D0043432E /* Demo.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(APP_ICONS_SOURCE)"; DEVELOPMENT_TEAM = VMGRRW6SG7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Demo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-demo"; - PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; }; name = Debug; }; 6F8A93ED20FDCA0900AA6434 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FCAB6C023165B0D0043432E /* Demo.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(APP_ICONS_SOURCE)"; DEVELOPMENT_TEAM = VMGRRW6SG7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Demo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-demo"; - PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; }; name = Release; }; 6FB74D6F2101D4D200E2D365 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF729231576F400BEE8E1 /* Tests.xcconfig */; buildSettings = { - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_IDENTITY = "-"; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", ); - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-tests"; - PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; 6FB74D702101D4D200E2D365 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6FEDF729231576F400BEE8E1 /* Tests.xcconfig */; buildSettings = { - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_IDENTITY = "-"; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/$(CARTHAGE_PLATFORM)", ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", ); - PRODUCT_BUNDLE_IDENTIFIER = "ch.srgssr.SRGContentProtection-tests"; - PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; diff --git a/SRGContentProtection.xcodeproj/xcshareddata/xcschemes/SRGContentProtection.xcscheme b/SRGContentProtection.xcodeproj/xcshareddata/xcschemes/SRGContentProtection.xcscheme index d2846a2..8c40a32 100644 --- a/SRGContentProtection.xcodeproj/xcshareddata/xcschemes/SRGContentProtection.xcscheme +++ b/SRGContentProtection.xcodeproj/xcshareddata/xcschemes/SRGContentProtection.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> + + + + - - - - - - - -

+[![SRG Content Protection logo](README-images/logo.png)](https://github.com/SRGSSR/srgcontentprotection-apple) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![GitHub releases](https://img.shields.io/github/v/release/SRGSSR/srgcontentprotection-fake-apple)](https://github.com/SRGSSR/srgcontentprotection-apple/releases) [![platform](https://img.shields.io/badge/platfom-ios%20%7C%20tvos-blue)](https://github.com/SRGSSR/srgcontentprotection-apple) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![GitHub license](https://img.shields.io/badge/license-(c)%20SRG%20SSR-lightgrey)](https://github.com/SRGSSR/srgcontentprotection-apple/blob/master/LICENSE) ## About @@ -11,7 +11,7 @@ The SRG Content Protection framework contains the sensitive logic required for p ## Compatibility -The library is suitable for applications running on iOS 9 and above. The project is meant to be opened with the latest Xcode version (currently Xcode 10). +The library is suitable for applications running on iOS 9, tvOS 12 and above. The project is meant to be opened with the latest Xcode version. ## Contributing @@ -22,7 +22,7 @@ If you want to contribute to the project, have a look at our [contributing guide The library can be added to a project using [Carthage](https://github.com/Carthage/Carthage) by adding the following dependency to your `Cartfile`: ``` -github "SRGSSR/srgcontentprotection-ios" +github "SRGSSR/srgcontentprotection-apple" ``` For more information about Carthage and its use, refer to the [official documentation](https://github.com/Carthage/Carthage). diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 1163b15..9f3877d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Customise this file, documentation can be found here: # https://github.com/fastlane/fastlane/tree/master/fastlane/docs # All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md @@ -7,39 +9,97 @@ # All lines starting with a # are ignored when running `fastlane` # This is the minimum version number required. -fastlane_version "1.95.0" +fastlane_version '2.96.0' default_platform :ios platform :ios do - before_all do |lane| + before_all do ensure_git_status_clean - - Dir.chdir("..") do - sh "make bootstrap" - end + Dir.chdir('..') { sh 'make bootstrap' } end - desc "Run library tests" + desc 'Run library tests' lane :tests do - scan( - output_types: "", - fail_build: false, - clean: true + clean_result_files + + override_test_product_names + + run_tests_with_devices(['iPhone 11', 'Apple TV']) + + trainer( + path: './fastlane', + output_directory: './fastlane' ) - trainer(output_directory: "./fastlane") end - after_all do |lane| + after_all do reset_git_repo(skip_clean: true) end - error do |lane, exception| + error do clean_build_artifacts reset_git_repo(skip_clean: true, force: true) end end +def clean_result_files + Dir['*.xml'].each { |file| File.delete(file) } + Dir['*.xcresult'].each { |folder| FileUtils.remove_entry(folder, true) } +end + +# Override test product names to split iOS and tvOS test results +def override_test_product_names + set_xcconfig_value( + path: 'Tests/Tests.xcconfig', + name: 'PRODUCT_NAME[sdk=iphone*]', + value: '$(PROJECT_NAME)-iOS' + ) + set_xcconfig_value( + path: 'Tests/Tests.xcconfig', + name: 'PRODUCT_NAME[sdk=appletv*]', + value: '$(PROJECT_NAME)-tvOS' + ) +end + +def run_tests_with_devices(devices) + devices.each do |device| + srg_scan(device) + copy_last_xcresult + end + check_xcresult_count(devices) +end + +def srg_scan(device) + scan( + device: device, + output_types: '', + output_style: FastlaneCore::Env.truthy?('TRAVIS') ? 'raw' : 'standard', + fail_build: false, + clean: true + ) +end + +def xcresults_path + derived_data_path = lane_context[SharedValues::SCAN_DERIVED_DATA_PATH] + derived_data_path + '/Logs/Test/' +end + +def copy_last_xcresult + file = nil + Dir.chdir(xcresults_path) do + # max == sort.last + file = Dir['*.xcresult'].max + end + file_name = File.basename(file) + FileUtils.copy_entry(xcresults_path + file_name, file_name) +end + +def check_xcresult_count(devices) + return unless Dir['*.xcresult'].count != devices.count + + UI.user_error!('Whoops, unexpected xcresult file count.') +end # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md # All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile index d829c94..ac2f64b 100644 --- a/fastlane/Pluginfile +++ b/fastlane/Pluginfile @@ -1,5 +1,8 @@ +# frozen_string_literal: true + # Autogenerated by fastlane # # Ensure this file is checked in to source control! -gem 'fastlane-plugin-trainer' +gem 'fastlane-plugin-trainer', git: 'https://github.com/SRGSSR/trainer', tag: '0.9.1.1' +gem 'fastlane-plugin-xcconfig'