diff --git a/ASBPlayerSubtitling/ASBPlayerSubtitling.h b/ASBPlayerSubtitling/ASBPlayerSubtitling.h index dc3c2fb..2937635 100644 --- a/ASBPlayerSubtitling/ASBPlayerSubtitling.h +++ b/ASBPlayerSubtitling/ASBPlayerSubtitling.h @@ -24,6 +24,8 @@ @property (nonatomic, assign) BOOL visible; - (void)loadSubtitlesAtURL:(NSURL *)url error:(NSError **)error; +- (void)loadWebVTTSubtitlesAtURL:(NSURL *)url error:(NSError **)error; + - (void)loadSRTContent:(NSString *)string error:(NSError **)error; - (void)removeSubtitles; diff --git a/ASBPlayerSubtitling/ASBPlayerSubtitling.m b/ASBPlayerSubtitling/ASBPlayerSubtitling.m index 8b174ba..071272c 100644 --- a/ASBPlayerSubtitling/ASBPlayerSubtitling.m +++ b/ASBPlayerSubtitling/ASBPlayerSubtitling.m @@ -8,8 +8,9 @@ #import "ASBPlayerSubtitling.h" #import +#import "NSString+ASBRegularExpression.h" -static CGFloat *const DefaultNbFramesPerSecond = 30; +static CGFloat const DefaultNbFramesPerSecond = 30; @implementation ASBSubtitle @end @@ -39,6 +40,7 @@ - (instancetype)init - (void)awakeFromNib { + [super awakeFromNib]; [self setup]; } @@ -82,6 +84,23 @@ - (void)loadSubtitlesAtURL:(NSURL *)url error:(NSError **)error } } +- (void)loadWebVTTSubtitlesAtURL:(NSURL *)url error:(NSError **)error +{ + NSError *localError; + NSString *text; + + text = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:&localError]; + if (localError == nil) + { + [self loadWebVTTContent:text error:&localError]; + } + + if(error != NULL) + { + *error = localError; + } +} + - (void)computeStyle { NSString *textAlign; @@ -225,6 +244,11 @@ - (void)loadSRTContent:(NSString *)string error:(NSError **)error [self setupTimeObserver]; } +- (void)loadWebVTTContent:(NSString *)string error:(NSError **)error { + NSString *srtString = [[self class] srtSubtitleFromWebVTT:string]; + [self loadSRTContent:srtString error:error]; +} + - (NSTimeInterval)timeFromString:(NSString *)timeString { NSScanner *scanner; @@ -329,6 +353,75 @@ - (void)playerTimeChanged }); } ++ (NSString *)srtSubtitleFromWebVTT:(NSString *)content { + + NSArray *lines = [self split:content]; + NSString *output = @""; + NSInteger i = 0; + NSError *error; + NSString *newLine; + + for (NSString *line in lines) { + newLine = line; + NSCharacterSet* notDigits = [[NSCharacterSet decimalDigitCharacterSet] invertedSet]; + + if([[line stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"\n\r "]] rangeOfCharacterFromSet:notDigits].location == NSNotFound) { + continue; + } + + NSString *pattern1 = @"(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d{3})"; // '01:52:52.554' + NSString *pattern2 = @"(\\d{2}):(\\d{2})\\.(\\d{3})"; // '00:08.301' + + NSRegularExpression* regex = [NSRegularExpression regularExpressionWithPattern: pattern1 options:0 error:&error]; + NSArray* matches = [regex matchesInString:line options:0 range: NSMakeRange(0, line.length)]; + + NSString *pattern ; + NSString *template; + + if (matches.count) { + pattern = pattern1; + template = @"$1:$2:$3,$4"; + } else { + regex = [NSRegularExpression regularExpressionWithPattern: pattern2 options:0 error:&error]; + matches = [regex matchesInString:line options:0 range: NSMakeRange(0, line.length)]; + if (matches.count) { + pattern = pattern2; + template = @"00:$1:$2,$3"; + } + } + + if (matches.count && !error) { + i++; + output = [output stringByAppendingString:@"\r\n\r\n"]; + output = [output stringByAppendingString:[@(i) stringValue]]; + output = [output stringByAppendingString:@"\r\n"]; + + newLine = [line stringByReplacingWithPattern:pattern withTemplate:template error:&error]; + } + + if([newLine containsString:@"WEBVTT"]) { + continue; + } + output = [output stringByAppendingString:newLine]; + output = [output stringByAppendingString:@"\r\n"]; + } + + return output; +} + + ++ (NSArray *)split:(NSString *)content { + + NSArray *lines = [content componentsSeparatedByString: @"\n"]; + if (lines.count == 1) { + lines = [content componentsSeparatedByString: @"\r\n"]; + if (lines.count == 1) { + lines = [content componentsSeparatedByString: @"\n"]; + } + } + return lines; +} + #pragma Time Observer - (void)removeTimeObserver { diff --git a/ASBPlayerSubtitling/NSString+ASBRegularExpression.h b/ASBPlayerSubtitling/NSString+ASBRegularExpression.h new file mode 100644 index 0000000..55aa29d --- /dev/null +++ b/ASBPlayerSubtitling/NSString+ASBRegularExpression.h @@ -0,0 +1,15 @@ +// +// NSString+ASBRegularExpression.h +// ASBPlayerSubtitlingExample +// +// Created by Allen and Kim on 2018/5/28. +// Copyright © 2018 AutreSphere. All rights reserved. +// + +#import + +@interface NSString (ASBRegularExpression) + +- (NSString *)stringByReplacingWithPattern:(NSString *)pattern withTemplate:(NSString *)withTemplate error:(NSError **)error; + +@end diff --git a/ASBPlayerSubtitling/NSString+ASBRegularExpression.m b/ASBPlayerSubtitling/NSString+ASBRegularExpression.m new file mode 100644 index 0000000..b9e157a --- /dev/null +++ b/ASBPlayerSubtitling/NSString+ASBRegularExpression.m @@ -0,0 +1,23 @@ +// +// NSString+ASBRegularExpression.m +// ASBPlayerSubtitlingExample +// +// Created by Allen and Kim on 2018/5/28. +// Copyright © 2018 AutreSphere. All rights reserved. +// + +#import "NSString+ASBRegularExpression.h" + +@implementation NSString (ASBRegularExpression) + +- (NSString *)stringByReplacingWithPattern:(NSString *)pattern withTemplate:(NSString *)withTemplate error:(NSError **)error { + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern + options:NSRegularExpressionCaseInsensitive + error:error]; + return [regex stringByReplacingMatchesInString:self + options:0 + range:NSMakeRange(0, self.length) + withTemplate:withTemplate]; +} + +@end diff --git a/Example/ASBPlayerSubtitlingExample.xcodeproj/project.pbxproj b/Example/ASBPlayerSubtitlingExample.xcodeproj/project.pbxproj index 85d6bec..d3c0c96 100644 --- a/Example/ASBPlayerSubtitlingExample.xcodeproj/project.pbxproj +++ b/Example/ASBPlayerSubtitlingExample.xcodeproj/project.pbxproj @@ -19,14 +19,14 @@ 4A0BC9321AC31714000904A2 /* play@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4A0BC92C1AC31714000904A2 /* play@2x.png */; }; 4A0BC9331AC31714000904A2 /* sliderThumb.png in Resources */ = {isa = PBXBuildFile; fileRef = 4A0BC92D1AC31714000904A2 /* sliderThumb.png */; }; 4A0BC9341AC31714000904A2 /* sliderThumb@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4A0BC92E1AC31714000904A2 /* sliderThumb@2x.png */; }; - 4A0BC93E1AC31AA4000904A2 /* ASBPlayerSubtitling.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A0BC93D1AC31AA4000904A2 /* ASBPlayerSubtitling.m */; }; 4A0BC9401AC31C7B000904A2 /* welcome.srt in Resources */ = {isa = PBXBuildFile; fileRef = 4A0BC93F1AC31C7B000904A2 /* welcome.srt */; }; - F654DA73C37C2F1646AEC07F /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DC330590DF6F8B0B77845089 /* libPods.a */; }; + AC38C51B8CBB21836A917F0F /* libPods-ASBPlayerSubtitlingExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 76EBDB8E40A605075481464B /* libPods-ASBPlayerSubtitlingExample.a */; }; + FF57A34420BBFF820083DAF4 /* ASBPlayerSubtitling.m in Sources */ = {isa = PBXBuildFile; fileRef = FF57A34220BBFF810083DAF4 /* ASBPlayerSubtitling.m */; }; + FF706DFC20BBF360002125A0 /* NSString+ASBRegularExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = FF706DFB20BBF360002125A0 /* NSString+ASBRegularExpression.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 1CBAABE9F880F0FD13E247C1 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; - 28816A0F5DC302DE300E6131 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 059287F5601B90D3529D1112 /* Pods-ASBPlayerSubtitlingExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ASBPlayerSubtitlingExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample.debug.xcconfig"; sourceTree = ""; }; 4A0BC8FF1AC313F8000904A2 /* ASBPlayerSubtitlingExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ASBPlayerSubtitlingExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 4A0BC9031AC313F8000904A2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4A0BC9041AC313F8000904A2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -43,10 +43,13 @@ 4A0BC92C1AC31714000904A2 /* play@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "play@2x.png"; sourceTree = ""; }; 4A0BC92D1AC31714000904A2 /* sliderThumb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sliderThumb.png; sourceTree = ""; }; 4A0BC92E1AC31714000904A2 /* sliderThumb@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sliderThumb@2x.png"; sourceTree = ""; }; - 4A0BC93C1AC31AA4000904A2 /* ASBPlayerSubtitling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASBPlayerSubtitling.h; sourceTree = ""; }; - 4A0BC93D1AC31AA4000904A2 /* ASBPlayerSubtitling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASBPlayerSubtitling.m; sourceTree = ""; }; 4A0BC93F1AC31C7B000904A2 /* welcome.srt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = welcome.srt; sourceTree = ""; }; - DC330590DF6F8B0B77845089 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 76EBDB8E40A605075481464B /* libPods-ASBPlayerSubtitlingExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ASBPlayerSubtitlingExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E772E8E09A39AFEBDA5DEA34 /* Pods-ASBPlayerSubtitlingExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ASBPlayerSubtitlingExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample.release.xcconfig"; sourceTree = ""; }; + FF57A34220BBFF810083DAF4 /* ASBPlayerSubtitling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASBPlayerSubtitling.m; sourceTree = ""; }; + FF57A34320BBFF810083DAF4 /* ASBPlayerSubtitling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASBPlayerSubtitling.h; sourceTree = ""; }; + FF706DFA20BBF360002125A0 /* NSString+ASBRegularExpression.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+ASBRegularExpression.h"; sourceTree = ""; }; + FF706DFB20BBF360002125A0 /* NSString+ASBRegularExpression.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+ASBRegularExpression.m"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -54,30 +57,21 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F654DA73C37C2F1646AEC07F /* libPods.a in Frameworks */, + AC38C51B8CBB21836A917F0F /* libPods-ASBPlayerSubtitlingExample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 057EEC1B454D549FA332F302 /* Pods */ = { - isa = PBXGroup; - children = ( - 28816A0F5DC302DE300E6131 /* Pods.debug.xcconfig */, - 1CBAABE9F880F0FD13E247C1 /* Pods.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; 4A0BC8F61AC313F8000904A2 = { isa = PBXGroup; children = ( 4A0BC9011AC313F8000904A2 /* Example */, 4A0BC9001AC313F8000904A2 /* Products */, - 057EEC1B454D549FA332F302 /* Pods */, 4A0BC9281AC31714000904A2 /* Resources */, - C7FC1F457D9FBE6CDD3CA0A1 /* Frameworks */, + 4C72E807FCAF458AF437B33F /* Pods */, + B9606A0EBBEB48EF405760FC /* Frameworks */, ); sourceTree = ""; }; @@ -131,17 +125,28 @@ 4A0BC93B1AC31AA4000904A2 /* ASBPlayerSubtitling */ = { isa = PBXGroup; children = ( - 4A0BC93C1AC31AA4000904A2 /* ASBPlayerSubtitling.h */, - 4A0BC93D1AC31AA4000904A2 /* ASBPlayerSubtitling.m */, + FF57A34320BBFF810083DAF4 /* ASBPlayerSubtitling.h */, + FF57A34220BBFF810083DAF4 /* ASBPlayerSubtitling.m */, + FF706DFA20BBF360002125A0 /* NSString+ASBRegularExpression.h */, + FF706DFB20BBF360002125A0 /* NSString+ASBRegularExpression.m */, ); name = ASBPlayerSubtitling; path = ../../ASBPlayerSubtitling; sourceTree = ""; }; - C7FC1F457D9FBE6CDD3CA0A1 /* Frameworks */ = { + 4C72E807FCAF458AF437B33F /* Pods */ = { + isa = PBXGroup; + children = ( + 059287F5601B90D3529D1112 /* Pods-ASBPlayerSubtitlingExample.debug.xcconfig */, + E772E8E09A39AFEBDA5DEA34 /* Pods-ASBPlayerSubtitlingExample.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + B9606A0EBBEB48EF405760FC /* Frameworks */ = { isa = PBXGroup; children = ( - DC330590DF6F8B0B77845089 /* libPods.a */, + 76EBDB8E40A605075481464B /* libPods-ASBPlayerSubtitlingExample.a */, ); name = Frameworks; sourceTree = ""; @@ -153,11 +158,10 @@ isa = PBXNativeTarget; buildConfigurationList = 4A0BC9221AC313F9000904A2 /* Build configuration list for PBXNativeTarget "ASBPlayerSubtitlingExample" */; buildPhases = ( - 3943A9B80BCD8994501A37D7 /* Check Pods Manifest.lock */, + 426F39AB4BE0A54BF59EF10F /* [CP] Check Pods Manifest.lock */, 4A0BC8FB1AC313F8000904A2 /* Sources */, 4A0BC8FC1AC313F8000904A2 /* Frameworks */, 4A0BC8FD1AC313F8000904A2 /* Resources */, - DAEDF1E2AF7F294F1DE6BBC6 /* Copy Pods Resources */, ); buildRules = ( ); @@ -221,34 +225,22 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3943A9B80BCD8994501A37D7 /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - DAEDF1E2AF7F294F1DE6BBC6 /* Copy Pods Resources */ = { + 426F39AB4BE0A54BF59EF10F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "Copy Pods Resources"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ASBPlayerSubtitlingExample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -258,7 +250,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4A0BC93E1AC31AA4000904A2 /* ASBPlayerSubtitling.m in Sources */, + FF57A34420BBFF820083DAF4 /* ASBPlayerSubtitling.m in Sources */, + FF706DFC20BBF360002125A0 /* NSString+ASBRegularExpression.m in Sources */, 4A0BC90B1AC313F8000904A2 /* ViewController.m in Sources */, 4A0BC9081AC313F8000904A2 /* AppDelegate.m in Sources */, 4A0BC9051AC313F8000904A2 /* main.m in Sources */, @@ -367,7 +360,7 @@ }; 4A0BC9231AC313F9000904A2 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 28816A0F5DC302DE300E6131 /* Pods.debug.xcconfig */; + baseConfigurationReference = 059287F5601B90D3529D1112 /* Pods-ASBPlayerSubtitlingExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; @@ -378,7 +371,7 @@ }; 4A0BC9241AC313F9000904A2 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1CBAABE9F880F0FD13E247C1 /* Pods.release.xcconfig */; + baseConfigurationReference = E772E8E09A39AFEBDA5DEA34 /* Pods-ASBPlayerSubtitlingExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; diff --git a/Example/ASBPlayerSubtitlingExample.xcworkspace/contents.xcworkspacedata b/Example/ASBPlayerSubtitlingExample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..c57c89b --- /dev/null +++ b/Example/ASBPlayerSubtitlingExample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/ASBPlayerSubtitlingExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/ASBPlayerSubtitlingExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/ASBPlayerSubtitlingExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/Example/Base.lproj/LaunchScreen.xib b/Example/Example/Base.lproj/LaunchScreen.xib index 2556289..e7c7d86 100644 --- a/Example/Example/Base.lproj/LaunchScreen.xib +++ b/Example/Example/Base.lproj/LaunchScreen.xib @@ -1,8 +1,13 @@ - - + + + + + - + + + @@ -24,7 +29,7 @@ - + diff --git a/Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..d8db8d6 100644 --- a/Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -59,6 +79,16 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/Example/Example/Info.plist b/Example/Example/Info.plist index e943454..d5e1f77 100644 --- a/Example/Example/Info.plist +++ b/Example/Example/Info.plist @@ -22,6 +22,11 @@ 1 LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile diff --git a/Example/Podfile b/Example/Podfile index ccdcde8..e9add7a 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,3 +1,6 @@ -platform :ios, '7.0' +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' -pod 'ASBPlayerScrubbing' +target 'ASBPlayerSubtitlingExample' do + pod 'ASBPlayerScrubbing', '~> 0.1' +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..9645115 --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - ASBPlayerScrubbing (0.1) + +DEPENDENCIES: + - ASBPlayerScrubbing (~> 0.1) + +SPEC REPOS: + https://github.com/CocoaPods/Specs.git: + - ASBPlayerScrubbing + +SPEC CHECKSUMS: + ASBPlayerScrubbing: 0fc5e76aad6fdbcf14380734fb7f2c127cd28b66 + +PODFILE CHECKSUM: 50263cd5bafc91ad0dff93998c4e93aeef8d9f05 + +COCOAPODS: 1.5.0 diff --git a/Example/Pods/ASBPlayerScrubbing/ASBPlayerScrubbing/ASBPlayerScrubbing.h b/Example/Pods/ASBPlayerScrubbing/ASBPlayerScrubbing/ASBPlayerScrubbing.h new file mode 100644 index 0000000..e994538 --- /dev/null +++ b/Example/Pods/ASBPlayerScrubbing/ASBPlayerScrubbing/ASBPlayerScrubbing.h @@ -0,0 +1,41 @@ +// +// ASBPlayerScrubbing.h +// ASBPlayerScrubbing +// +// Created by Philippe Converset on 09/04/13. +// Copyright (c) 2013 AutreSphere. All rights reserved. +// + +#import +#import + +@class ASBPlayerScrubbing; + +@protocol ASBPlayerScrubbingDelegate + +- (void)playerScrubbingDidUpdateTime:(ASBPlayerScrubbing *)scrubbing; + +@end + + +@interface ASBPlayerScrubbing : NSObject + +@property (nonatomic, weak) IBOutlet UISlider *slider; +@property (nonatomic, weak) IBOutlet UILabel *durationLabel; +@property (nonatomic, weak) IBOutlet UILabel *currentTimeLabel; +@property (nonatomic, weak) IBOutlet UILabel *remainingTimeLabel; + +@property (nonatomic, strong) AVPlayer *player; +@property (nonatomic, weak) id delegate; + +// Indicates whether time hours are always shown in time labels even if time is less than an hour. Defaults to NO. +@property (nonatomic, assign) BOOL showTimeHours; +// Indicates whether frames are shown in time labels. Defaults to NO. +@property (nonatomic, assign) BOOL showTimeFrames; +// Indicates whether a minus sgn is shown on remaining time label. Defaults to YES. +@property (nonatomic, assign) BOOL showMinusSignOnRemainingTime; + +// Returns the formatted representation of the specified time. If showTimeFrames is YES, the representation respects the player frame rate. +- (NSString *)timecodeForTimeInterval:(NSTimeInterval)time; + +@end diff --git a/Example/Pods/ASBPlayerScrubbing/ASBPlayerScrubbing/ASBPlayerScrubbing.m b/Example/Pods/ASBPlayerScrubbing/ASBPlayerScrubbing/ASBPlayerScrubbing.m new file mode 100644 index 0000000..f3cc573 --- /dev/null +++ b/Example/Pods/ASBPlayerScrubbing/ASBPlayerScrubbing/ASBPlayerScrubbing.m @@ -0,0 +1,349 @@ +// +// ASBPlayerScrubbing.m +// ASBPlayerScrubbing +// +// Created by Philippe Converset on 09/04/13. +// Copyright (c) 2013 AutreSphere. All rights reserved. +// + +#import "ASBPlayerScrubbing.h" + +@interface ASBPlayerScrubbing () + +@property (nonatomic, assign) BOOL playAfterDrag; +@property (nonatomic, assign) id timeObserver; +@property (nonatomic, assign) CGFloat frameDuration; +@property (nonatomic, assign) CGFloat nbFramesPerSecond; + +@end + + +@implementation ASBPlayerScrubbing + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self setup]; + } + return self; +} + +- (void)awakeFromNib +{ + [self setup]; +} + +- (void)setup +{ + self.showMinusSignOnRemainingTime = YES; +} + +- (void)setSlider:(UISlider *)slider +{ + _slider = slider; + [self setupSliderTap]; +} + +- (void)setPlayer:(AVPlayer *)player +{ + CMTime duration; + + [self.player pause]; + [self removeTimeObserver]; + _player = player; + + self.nbFramesPerSecond = [ASBPlayerScrubbing nominalFrameRateForPlayer:self.player]; + self.frameDuration = 1/self.nbFramesPerSecond; + + [self setupTimeObserver]; + [self updateCurrentTimeLabelWithTime:0]; + + duration = self.player.currentItem.duration; + if(!CMTIME_IS_VALID(duration) || CMTIME_IS_INDEFINITE(duration)) + { + [player.currentItem addObserver:self forKeyPath:@"duration" options:NSKeyValueObservingOptionNew context:nil]; + } +} + +- (void)setShowMinusSignOnRemainingTime:(BOOL)showMinusSignOnRemainingTime +{ + if(_showMinusSignOnRemainingTime == showMinusSignOnRemainingTime) + return; + + _showMinusSignOnRemainingTime = showMinusSignOnRemainingTime; + [self playerTimeChanged]; +} + +- (void)setShowTimeFrames:(BOOL)showTimeFrames +{ + if(_showTimeFrames == showTimeFrames) + return; + + _showTimeFrames = showTimeFrames; + [self playerTimeChanged]; +} + +- (void)setShowTimeHours:(BOOL)showTimeHours +{ + if(_showTimeHours == showTimeHours) + return; + + _showTimeHours = showTimeHours; + [self playerTimeChanged]; +} + +- (NSString *)timecodeForTimeInterval:(NSTimeInterval)time +{ + NSInteger seconds; + NSInteger hours; + NSInteger minutes; + CGFloat milliseconds; + NSInteger nbFrames = 0; + NSString *timecode; + NSString *sign; + + sign = ((time < 0) && self.showMinusSignOnRemainingTime?@"\u2212":@""); + time = ABS(time); + hours = time/60/24; + minutes = (time - hours*24)/60; + seconds = (time - hours*24) - minutes*60; + + if(self.showTimeFrames) + { + milliseconds = time - (NSInteger)time; + nbFrames = milliseconds*self.nbFramesPerSecond; + } + + if((hours > 0) || self.showTimeHours) + { + if(self.showTimeFrames) + { + timecode = [NSString stringWithFormat:@"%@%d:%02d:%02d:%02d", sign, (int)hours, (int)minutes, (int)seconds, (int)nbFrames]; + } + else + { + timecode = [NSString stringWithFormat:@"%@%d:%02d:%02d", sign, (int)hours, (int)minutes, (int)seconds]; + } + } + else + { + if(self.showTimeFrames) + { + timecode = [NSString stringWithFormat:@"%@%02d:%02d:%02d", sign, (int)minutes, (int)seconds, (int)nbFrames]; + } + else + { + timecode = [NSString stringWithFormat:@"%@%02d:%02d", sign, (int)minutes, (int)seconds]; + } + } + + return timecode; +} + +#pragma mark - Private ++ (CGFloat)nominalFrameRateForPlayer:(AVPlayer *)player +{ + AVAssetTrack *track = nil; + NSArray *tracks; + + tracks = [player.currentItem.asset tracksWithMediaType:AVMediaTypeVideo]; + if(tracks.count > 0) + { + track = tracks[0]; + } + + return track.nominalFrameRate; +} + +- (void)setupSliderTap +{ + UITapGestureRecognizer *gesture; + + if(self.slider == nil) + return; + + gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSliderTap:)]; + [self.slider addGestureRecognizer:gesture]; +} + +- (void)removeTimeObserver +{ + if(self.timeObserver != nil) + { + [self.player removeTimeObserver:self.timeObserver]; + } + self.timeObserver = nil; +} + +- (void)setupTimeObserver +{ + __weak ASBPlayerScrubbing *weakSelf; + + if(self.timeObserver != nil) + return; + + weakSelf = self; + if(self.nbFramesPerSecond > 0) + { + self.timeObserver = [self.player addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(1/self.nbFramesPerSecond, NSEC_PER_SEC) + queue:NULL + usingBlock:^(CMTime time) { + [weakSelf playerTimeChanged]; + }]; + } +} + +- (void)playerTimeChanged +{ + CGFloat nbSecondsElapsed; + CGFloat nbSecondsDuration = 0; + CGFloat ratio = 0; + + if(self.player.currentItem == nil) + return; + + nbSecondsElapsed = CMTimeGetSeconds(self.player.currentItem.currentTime); + if(CMTIME_IS_VALID(self.player.currentItem.duration) && !CMTIME_IS_INDEFINITE(self.player.currentItem.duration)) + { + nbSecondsDuration = CMTimeGetSeconds(self.player.currentItem.duration); + } + + if(nbSecondsDuration != 0) + { + ratio = nbSecondsElapsed/nbSecondsDuration; + [self updateDurationLabelWithTime:nbSecondsDuration]; + } + + self.slider.value = ratio; + + [self updateCurrentTimeLabelWithTime:nbSecondsElapsed]; + [self updateRemainingTimeLabelWithTime:nbSecondsDuration - nbSecondsElapsed]; + [self.delegate playerScrubbingDidUpdateTime:self]; +} + +- (void)updateDurationLabelWithTime:(NSTimeInterval)time +{ + if(self.durationLabel == nil) + return; + + self.durationLabel.text = [self timecodeForTimeInterval:time]; +} + +- (void)updateCurrentTimeLabelWithTime:(NSTimeInterval)time +{ + if(self.currentTimeLabel == nil) + return; + + self.currentTimeLabel.text = [self timecodeForTimeInterval:time]; +} + +- (void)updateRemainingTimeLabelWithTime:(NSTimeInterval)time +{ + if(self.remainingTimeLabel == nil) + return; + + self.remainingTimeLabel.text = [self timecodeForTimeInterval:-time]; +} + +- (void)updatePlayer:(BOOL)playIfNeeded +{ + CGFloat nbSecondsDuration; + CMTime time; + + nbSecondsDuration = CMTimeGetSeconds(self.player.currentItem.duration); + time = CMTimeMakeWithSeconds(nbSecondsDuration*self.slider.value, NSEC_PER_SEC); + [self.player seekToTime:time toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero completionHandler:^(BOOL finished) { + if(playIfNeeded && (self.slider.value < self.slider.maximumValue)) + { + if(self.playAfterDrag) + { + [self.player play]; + } + } + }]; +} + +#pragma mark - Actions +- (IBAction)sliderValueChanged:(id)sender forEvent:(UIEvent *)event +{ + UITouch *touch; + + touch = [[event allTouches] anyObject]; + if(touch.phase == UITouchPhaseBegan) + { + self.playAfterDrag = (self.player.rate > 0); + [self.player pause]; + } + + [self updatePlayer:(touch.phase == UITouchPhaseEnded)]; +} + +- (IBAction)playPause:(id)sender +{ + if(self.player.rate == 0) + { + if(CMTIME_COMPARE_INLINE(self.player.currentTime, == , self.player.currentItem.duration)) + { + [self.player seekToTime:kCMTimeZero completionHandler:^(BOOL finished) { + [self.player play]; + }]; + } + else + { + [self.player play]; + } + } + else + { + [self.player pause]; + } +} + +- (void)handleSliderTap:(UIGestureRecognizer *)gesture +{ + CGPoint point; + CGFloat ratio; + CGFloat delta; + CGFloat value; + CGFloat thumbWidth; + BOOL isPlaying; + + // tap on thumb, let slider deal with it + if (self.slider.highlighted) + return; + + isPlaying = (self.player.rate > 0); + CGRect trackRect = [self.slider trackRectForBounds:self.slider.bounds]; + CGRect thumbRect = [self.slider thumbRectForBounds:self.slider.bounds trackRect:trackRect value:0]; + CGSize thumbSize = thumbRect.size; + thumbWidth = thumbSize.width; + point = [gesture locationInView: self.slider]; + if(point.x < thumbWidth/2) + { + ratio = 0; + } + else if(point.x > self.slider.bounds.size.width - thumbWidth/2) + { + ratio = 1; + } + else + { + ratio = (point.x - thumbWidth/2) / (self.slider.bounds.size.width - thumbWidth); + } + delta = ratio * (self.slider.maximumValue - self.slider.minimumValue); + value = self.slider.minimumValue + delta; + [self.slider setValue:value animated:YES]; + [self updatePlayer:isPlaying]; +} + +#pragma mark - KVO +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + if(CMTIME_IS_VALID(self.player.currentItem.duration) && !CMTIME_IS_INDEFINITE(self.player.currentItem.duration)) + { + [self.player.currentItem removeObserver:self forKeyPath:@"duration"]; + [self playerTimeChanged]; + } +} +@end diff --git a/Example/Pods/ASBPlayerScrubbing/Readme.md b/Example/Pods/ASBPlayerScrubbing/Readme.md new file mode 100644 index 0000000..e4a9cf5 --- /dev/null +++ b/Example/Pods/ASBPlayerScrubbing/Readme.md @@ -0,0 +1,112 @@ +[![Build Status](https://travis-ci.org/autresphere/ASBPlayerScrubbing.svg)](https://travis-ci.org/autresphere/ASBPlayerScrubbing) + + +Purpose +------- +ASBPlayerScrubbing is an Objective-C library for easily adding scrubbing behavior to your AVPlayer on iOS. + +Using ASBPlayerScrubbing requires only to link your player and slider to it. ASBPlayerScrubbing does all the wiring and computation to synchronize both slider and player. You can also optionally plug your time labels to the scrubbing such that they are also synchronized and show the corresponding times. + +Example +------- +See the contained example to get a sample of ASBPlayerScrubbing created with Interface Builder. + +![](https://github.com/autresphere/ASBPlayerScrubbing/raw/master/Screenshots/example1.jpg) + +Behavior class +-------------- +ASBPlayerScrubbing is a **pure behavior** class, it does not come with any graphical component. + +This means you are supposed to already have your own ```AVPlayer``` as well as your own player control components such as a ```UISlider```, and some ```UILabel``` for time labels. By using ASBPlayerScrubbing, you are able to bind all these components together in order to get a consistent scrubbing behavior. + +As ASBPlayerScrubbing is a pure behavior, it is highly reusable whatever your UI is made of. + +Features +-------- +* Update slider position depending on player time +* Update player time depending on slider position +* Change player time by taping anywhere on slider +* Play from the beginning if end is reached and play is called +* Update time labels (current time, remaining time and duration) with timecodes (hours:minutes:seconds or hours:minutes:seconds:frames) +* Update duration label as soon as this metadata is available from the player item + +Using +----- +Copy ASBPlayerScrubbing.h and ASBPlayerScrubbing.m in your project. + +You can either create a ASBPlayerScrubbing by code or inside Interface Builder. + +Creating with Interface Builder +------------------------------- +Inside InterfaceBuilder, add an object to your nib or storyboard, and set its class to ```ASBPlayerScrubbing```. Create an outlet inside your ViewController which links to the ```ASBPlayerScrubbing``` object. Then link your slider to the corresponding ```ASBPlayerScrubbing``` slider outlet. Optionally, you can also link your time labels. + +In your ViewController ```viewDidLoad``` method, you still need to set your player to the ```ASBPlayerScrubbing``` player property. +```objc +self.scrubbing.player = player; +``` + +NOTE: Creating an outlet inside your ViewController to keep track of the ```ASBPlayerScrubbing``` object is mandatory. This ensures the object won't be released. + +Creating by code +---------------- +Simply create a ASBPlayerScrubbing and set your player and your slider. Nothing more! +```objc +self.scrubbing = [ASBPlayerScrubbing new]; +self.scrubbing.player = player; +self.scrubbing.slider = slider; +``` +Time Labels +----------- +ASBPlayerScrubbing can automatically update these typical time labels: +* current time +* duration +* remaining time. + +These labels shows the time by default in a standard format using hours, minutes and seconds as for example "05:23" (5 minutes 23 seconds) or "1:23:09" (1 hour 23 minutes 9 seconds). Optionally it can also show frame numbers as for example "1:23:09:24" (1 hour 23 minutes 9 seconds 24 frames). The maximum frame number depends on the player item frame rate. + +The remaining time is typically shown with a minus sign. + +Properties +---------- +```objc +@property (nonatomic, assign) BOOL showTimeHours; +``` +Indicates whether time hours are always shown in time labels even if time is less than an hour. Defaults to NO. +```objc +@property (nonatomic, assign) BOOL showTimeFrames; +``` +Indicates whether frames are shown in time labels. Defaults to NO. +```objc +@property (nonatomic, assign) BOOL showMinusSignOnRemainingTime; +``` +Indicates whether a minus sgn is shown on remaining time label. Defaults to YES. + +Limitations +----------- +ASBPlayerScrubbing does not support a change of currentItem on ```AVPlayer```. +ASBPlayerScrubbing does not support ```AVQueuePlayer``` with multiple ```AVPlayerItem```. + +ARC Compatibility +----------------- +ASBPlayerScrubbing requires ARC. If you wish to use ASBPlayerScrubbing in a non-ARC project, just add the -fobjc-arc compiler flag to the ASBPlayerScrubbing.m class. To do this, go to the Build Phases tab in your target settings, open the Compile Sources group, double-click ASBPlayerScrubbing.m in the list and type -fobjc-arc into the popover. + +Todo +---- +* Improve drag support on slider +* Change scrubing speed depending on the finger vertical distance to the slider + +Recommended reading +------------------- +If you want to known more about behaviors: +* Chris Eidhof on Intentions http://chris.eidhof.nl/posts/intentions.html +* Krzysztof Zabłocki on Behaviors http://www.objc.io/issue-13/behaviors.html + +Licence +------- +ASBPlayerScrubbing is available under the MIT license. + +Author +------ +Philippe Converset, AutreSphere - pconverset@autresphere.com + +[@Follow me on Twitter](http://twitter.com/autresphere) diff --git a/Example/Pods/ASBPlayerScrubbing/license b/Example/Pods/ASBPlayerScrubbing/license new file mode 100644 index 0000000..2cf9a1e --- /dev/null +++ b/Example/Pods/ASBPlayerScrubbing/license @@ -0,0 +1,20 @@ +Copyright (c) 2015 AutreSphere + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Example/Pods/Headers/Private/ASBPlayerScrubbing/ASBPlayerScrubbing.h b/Example/Pods/Headers/Private/ASBPlayerScrubbing/ASBPlayerScrubbing.h new file mode 120000 index 0000000..784ee8c --- /dev/null +++ b/Example/Pods/Headers/Private/ASBPlayerScrubbing/ASBPlayerScrubbing.h @@ -0,0 +1 @@ +../../../ASBPlayerScrubbing/ASBPlayerScrubbing/ASBPlayerScrubbing.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/ASBPlayerScrubbing/ASBPlayerScrubbing.h b/Example/Pods/Headers/Public/ASBPlayerScrubbing/ASBPlayerScrubbing.h new file mode 120000 index 0000000..784ee8c --- /dev/null +++ b/Example/Pods/Headers/Public/ASBPlayerScrubbing/ASBPlayerScrubbing.h @@ -0,0 +1 @@ +../../../ASBPlayerScrubbing/ASBPlayerScrubbing/ASBPlayerScrubbing.h \ No newline at end of file diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..9645115 --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,16 @@ +PODS: + - ASBPlayerScrubbing (0.1) + +DEPENDENCIES: + - ASBPlayerScrubbing (~> 0.1) + +SPEC REPOS: + https://github.com/CocoaPods/Specs.git: + - ASBPlayerScrubbing + +SPEC CHECKSUMS: + ASBPlayerScrubbing: 0fc5e76aad6fdbcf14380734fb7f2c127cd28b66 + +PODFILE CHECKSUM: 50263cd5bafc91ad0dff93998c4e93aeef8d9f05 + +COCOAPODS: 1.5.0 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ec88c9c --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,517 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 213936A25B4BE2D06277352CD4CCF92C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 816F9C84604D0A0E278068F9CE41BE0C /* Foundation.framework */; }; + 31EF8379D974A37E669AAE95B62401EA /* Pods-ASBPlayerSubtitlingExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C242FD970DE2E476A8B21C666293995D /* Pods-ASBPlayerSubtitlingExample-dummy.m */; }; + 3291D292A1742EF26EEB8FDE6FCEBD7A /* ASBPlayerScrubbing.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E2244CDC40E9931FA4B2263805C916F /* ASBPlayerScrubbing.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3828939D35245AB067BFF553D43896DB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 821CFDBF0A2524FD8A434A817A73D221 /* CoreGraphics.framework */; }; + 61F5A326F762176F5C2F5C3C5F2C94FE /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B100855FA2779C562205291CC0CB5A65 /* AVFoundation.framework */; }; + 951D994E11B1BE9887716DDB68F3F0D0 /* ASBPlayerScrubbing-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9591B101BF998FC5708996EEABE76E58 /* ASBPlayerScrubbing-dummy.m */; }; + A40507A4CD8FD8B6DC9EA2FBE319DBB1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 816F9C84604D0A0E278068F9CE41BE0C /* Foundation.framework */; }; + DC9BB35A238E9EC0BEBE19AB444E6661 /* ASBPlayerScrubbing.m in Sources */ = {isa = PBXBuildFile; fileRef = 792363724F519CB4D8EFE61D306F7999 /* ASBPlayerScrubbing.m */; }; + F37AB4E069ED841DDBD528A53EBC4C4B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C7F9931047204FFE1F46003E577F17C /* UIKit.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4415FF4EDA356D3B20D44BF333ACB868 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0F4B1461138C7F64E97A7ADD0B08C3BB; + remoteInfo = ASBPlayerScrubbing; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 32F127BC9EEFE9AA8CE8F6D403889E69 /* Pods-ASBPlayerSubtitlingExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ASBPlayerSubtitlingExample-frameworks.sh"; sourceTree = ""; }; + 4E2244CDC40E9931FA4B2263805C916F /* ASBPlayerScrubbing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASBPlayerScrubbing.h; path = ASBPlayerScrubbing/ASBPlayerScrubbing.h; sourceTree = ""; }; + 5E3CAA6D5A98D7A520018245FE363990 /* Pods-ASBPlayerSubtitlingExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ASBPlayerSubtitlingExample-resources.sh"; sourceTree = ""; }; + 69CFFF828F70DCA9423E3FEE73DE3DCD /* Pods-ASBPlayerSubtitlingExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ASBPlayerSubtitlingExample-acknowledgements.markdown"; sourceTree = ""; }; + 6AC56D198F874FD4FB846A4B808784C9 /* Pods-ASBPlayerSubtitlingExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ASBPlayerSubtitlingExample.debug.xcconfig"; sourceTree = ""; }; + 792363724F519CB4D8EFE61D306F7999 /* ASBPlayerScrubbing.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASBPlayerScrubbing.m; path = ASBPlayerScrubbing/ASBPlayerScrubbing.m; sourceTree = ""; }; + 816F9C84604D0A0E278068F9CE41BE0C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 821CFDBF0A2524FD8A434A817A73D221 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; + 8C7F9931047204FFE1F46003E577F17C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9591B101BF998FC5708996EEABE76E58 /* ASBPlayerScrubbing-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ASBPlayerScrubbing-dummy.m"; sourceTree = ""; }; + 9D052566E202F6BB9C55DDA9003749BB /* ASBPlayerScrubbing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ASBPlayerScrubbing.xcconfig; sourceTree = ""; }; + A2F45C408C7BE8761101983F4A3CD723 /* libPods-ASBPlayerSubtitlingExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-ASBPlayerSubtitlingExample.a"; path = "libPods-ASBPlayerSubtitlingExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + B100855FA2779C562205291CC0CB5A65 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; }; + B5EACF53149D02F40E95B993F1F32455 /* libASBPlayerScrubbing.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libASBPlayerScrubbing.a; path = libASBPlayerScrubbing.a; sourceTree = BUILT_PRODUCTS_DIR; }; + C242FD970DE2E476A8B21C666293995D /* Pods-ASBPlayerSubtitlingExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ASBPlayerSubtitlingExample-dummy.m"; sourceTree = ""; }; + DADB7709B9F91A889B6F4C35A8782B39 /* Pods-ASBPlayerSubtitlingExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ASBPlayerSubtitlingExample.release.xcconfig"; sourceTree = ""; }; + EBCDAC3AF7A55D0A5D337A56E5F16BD1 /* ASBPlayerScrubbing-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ASBPlayerScrubbing-prefix.pch"; sourceTree = ""; }; + F6CC654F424AA2F5249776DA45187777 /* Pods-ASBPlayerSubtitlingExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ASBPlayerSubtitlingExample-acknowledgements.plist"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7A0B99745E87833B2C789A39D3023CAA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A40507A4CD8FD8B6DC9EA2FBE319DBB1 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F6388D59E5364438FFC777B257D35B52 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 61F5A326F762176F5C2F5C3C5F2C94FE /* AVFoundation.framework in Frameworks */, + 3828939D35245AB067BFF553D43896DB /* CoreGraphics.framework in Frameworks */, + 213936A25B4BE2D06277352CD4CCF92C /* Foundation.framework in Frameworks */, + F37AB4E069ED841DDBD528A53EBC4C4B /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 14B8B9B15ECBE87983FF987239AB2D7B /* Frameworks */ = { + isa = PBXGroup; + children = ( + B3BFA6EB377F63A0A7506642B71E6831 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2510BCD04122742A22C6290A7CBDFD00 /* Products */ = { + isa = PBXGroup; + children = ( + B5EACF53149D02F40E95B993F1F32455 /* libASBPlayerScrubbing.a */, + A2F45C408C7BE8761101983F4A3CD723 /* libPods-ASBPlayerSubtitlingExample.a */, + ); + name = Products; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + 14B8B9B15ECBE87983FF987239AB2D7B /* Frameworks */, + EB7598B4F7215DAE305FD8AF474B3174 /* Pods */, + 2510BCD04122742A22C6290A7CBDFD00 /* Products */, + 9A26D8B8A64B28786DC7713DFF66B194 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 844CB90014AB8D3B6EF3A8B766A8626D /* Pods-ASBPlayerSubtitlingExample */ = { + isa = PBXGroup; + children = ( + 69CFFF828F70DCA9423E3FEE73DE3DCD /* Pods-ASBPlayerSubtitlingExample-acknowledgements.markdown */, + F6CC654F424AA2F5249776DA45187777 /* Pods-ASBPlayerSubtitlingExample-acknowledgements.plist */, + C242FD970DE2E476A8B21C666293995D /* Pods-ASBPlayerSubtitlingExample-dummy.m */, + 32F127BC9EEFE9AA8CE8F6D403889E69 /* Pods-ASBPlayerSubtitlingExample-frameworks.sh */, + 5E3CAA6D5A98D7A520018245FE363990 /* Pods-ASBPlayerSubtitlingExample-resources.sh */, + 6AC56D198F874FD4FB846A4B808784C9 /* Pods-ASBPlayerSubtitlingExample.debug.xcconfig */, + DADB7709B9F91A889B6F4C35A8782B39 /* Pods-ASBPlayerSubtitlingExample.release.xcconfig */, + ); + name = "Pods-ASBPlayerSubtitlingExample"; + path = "Target Support Files/Pods-ASBPlayerSubtitlingExample"; + sourceTree = ""; + }; + 897679FED443ADEE881371BF2F0E7A91 /* Support Files */ = { + isa = PBXGroup; + children = ( + 9D052566E202F6BB9C55DDA9003749BB /* ASBPlayerScrubbing.xcconfig */, + 9591B101BF998FC5708996EEABE76E58 /* ASBPlayerScrubbing-dummy.m */, + EBCDAC3AF7A55D0A5D337A56E5F16BD1 /* ASBPlayerScrubbing-prefix.pch */, + ); + name = "Support Files"; + path = "../Target Support Files/ASBPlayerScrubbing"; + sourceTree = ""; + }; + 9A26D8B8A64B28786DC7713DFF66B194 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 844CB90014AB8D3B6EF3A8B766A8626D /* Pods-ASBPlayerSubtitlingExample */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + A2985EEC0D245C78560DF6885802E008 /* ASBPlayerScrubbing */ = { + isa = PBXGroup; + children = ( + 4E2244CDC40E9931FA4B2263805C916F /* ASBPlayerScrubbing.h */, + 792363724F519CB4D8EFE61D306F7999 /* ASBPlayerScrubbing.m */, + 897679FED443ADEE881371BF2F0E7A91 /* Support Files */, + ); + name = ASBPlayerScrubbing; + path = ASBPlayerScrubbing; + sourceTree = ""; + }; + B3BFA6EB377F63A0A7506642B71E6831 /* iOS */ = { + isa = PBXGroup; + children = ( + B100855FA2779C562205291CC0CB5A65 /* AVFoundation.framework */, + 821CFDBF0A2524FD8A434A817A73D221 /* CoreGraphics.framework */, + 816F9C84604D0A0E278068F9CE41BE0C /* Foundation.framework */, + 8C7F9931047204FFE1F46003E577F17C /* UIKit.framework */, + ); + name = iOS; + sourceTree = ""; + }; + EB7598B4F7215DAE305FD8AF474B3174 /* Pods */ = { + isa = PBXGroup; + children = ( + A2985EEC0D245C78560DF6885802E008 /* ASBPlayerScrubbing */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 800AF05C8DB673D05F8EE747004DC268 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 3291D292A1742EF26EEB8FDE6FCEBD7A /* ASBPlayerScrubbing.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 0F4B1461138C7F64E97A7ADD0B08C3BB /* ASBPlayerScrubbing */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5C1B682B7929B06577E2F359A3194B77 /* Build configuration list for PBXNativeTarget "ASBPlayerScrubbing" */; + buildPhases = ( + 5F6CEC3B81713CE932C70EFC15379B25 /* Sources */, + F6388D59E5364438FFC777B257D35B52 /* Frameworks */, + 800AF05C8DB673D05F8EE747004DC268 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ASBPlayerScrubbing; + productName = ASBPlayerScrubbing; + productReference = B5EACF53149D02F40E95B993F1F32455 /* libASBPlayerScrubbing.a */; + productType = "com.apple.product-type.library.static"; + }; + 2B6A21A67BD36C7B84DBA41CBA122E02 /* Pods-ASBPlayerSubtitlingExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = E0F2A6832D3F17D0500F42A72AEA651C /* Build configuration list for PBXNativeTarget "Pods-ASBPlayerSubtitlingExample" */; + buildPhases = ( + 726501D4031C366F4139B11ACBB747A9 /* Sources */, + 7A0B99745E87833B2C789A39D3023CAA /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 262546B7DD66675CFD9DDB0B3FC5A9BF /* PBXTargetDependency */, + ); + name = "Pods-ASBPlayerSubtitlingExample"; + productName = "Pods-ASBPlayerSubtitlingExample"; + productReference = A2F45C408C7BE8761101983F4A3CD723 /* libPods-ASBPlayerSubtitlingExample.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 2510BCD04122742A22C6290A7CBDFD00 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0F4B1461138C7F64E97A7ADD0B08C3BB /* ASBPlayerScrubbing */, + 2B6A21A67BD36C7B84DBA41CBA122E02 /* Pods-ASBPlayerSubtitlingExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 5F6CEC3B81713CE932C70EFC15379B25 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 951D994E11B1BE9887716DDB68F3F0D0 /* ASBPlayerScrubbing-dummy.m in Sources */, + DC9BB35A238E9EC0BEBE19AB444E6661 /* ASBPlayerScrubbing.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 726501D4031C366F4139B11ACBB747A9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 31EF8379D974A37E669AAE95B62401EA /* Pods-ASBPlayerSubtitlingExample-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 262546B7DD66675CFD9DDB0B3FC5A9BF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = ASBPlayerScrubbing; + target = 0F4B1461138C7F64E97A7ADD0B08C3BB /* ASBPlayerScrubbing */; + targetProxy = 4415FF4EDA356D3B20D44BF333ACB868 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 19B17F5EC44CAEE8DB7F4E35A0F6DD15 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9D052566E202F6BB9C55DDA9003749BB /* ASBPlayerScrubbing.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = ASBPlayerScrubbing; + PRODUCT_NAME = ASBPlayerScrubbing; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 1C409D3AC58E241A4CD1EECE618F0ED6 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9D052566E202F6BB9C55DDA9003749BB /* ASBPlayerScrubbing.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = ASBPlayerScrubbing; + PRODUCT_NAME = ASBPlayerScrubbing; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 60FB92955BB09EB5CC81923070DFB307 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + 69BDB9B931AAF83CD811691B5F480487 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DADB7709B9F91A889B6F4C35A8782B39 /* Pods-ASBPlayerSubtitlingExample.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + MACH_O_TYPE = staticlib; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7E303F336AF1EDCE08CCD98DE0D3DD37 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + F337EA53588EB80340E9603EE2BC5B5C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6AC56D198F874FD4FB846A4B808784C9 /* Pods-ASBPlayerSubtitlingExample.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + MACH_O_TYPE = staticlib; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E303F336AF1EDCE08CCD98DE0D3DD37 /* Debug */, + 60FB92955BB09EB5CC81923070DFB307 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5C1B682B7929B06577E2F359A3194B77 /* Build configuration list for PBXNativeTarget "ASBPlayerScrubbing" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 19B17F5EC44CAEE8DB7F4E35A0F6DD15 /* Debug */, + 1C409D3AC58E241A4CD1EECE618F0ED6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E0F2A6832D3F17D0500F42A72AEA651C /* Build configuration list for PBXNativeTarget "Pods-ASBPlayerSubtitlingExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F337EA53588EB80340E9603EE2BC5B5C /* Debug */, + 69BDB9B931AAF83CD811691B5F480487 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Example/Pods/Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing-dummy.m b/Example/Pods/Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing-dummy.m new file mode 100644 index 0000000..f064d66 --- /dev/null +++ b/Example/Pods/Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_ASBPlayerScrubbing : NSObject +@end +@implementation PodsDummy_ASBPlayerScrubbing +@end diff --git a/Example/Pods/Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing-prefix.pch b/Example/Pods/Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing.xcconfig b/Example/Pods/Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing.xcconfig new file mode 100644 index 0000000..caef24f --- /dev/null +++ b/Example/Pods/Target Support Files/ASBPlayerScrubbing/ASBPlayerScrubbing.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ASBPlayerScrubbing +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ASBPlayerScrubbing" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ASBPlayerScrubbing" +OTHER_LDFLAGS = -framework "AVFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "UIKit" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/ASBPlayerScrubbing +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-acknowledgements.markdown new file mode 100644 index 0000000..6a62f3d --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## ASBPlayerScrubbing + +Copyright (c) 2015 AutreSphere + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-acknowledgements.plist new file mode 100644 index 0000000..fcd19ad --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-acknowledgements.plist @@ -0,0 +1,58 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2015 AutreSphere <pconverset@autresphere.com> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT + Title + ASBPlayerScrubbing + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-dummy.m b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-dummy.m new file mode 100644 index 0000000..1bbc88f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_ASBPlayerSubtitlingExample : NSObject +@end +@implementation PodsDummy_Pods_ASBPlayerSubtitlingExample +@end diff --git a/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-frameworks.sh b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-frameworks.sh new file mode 100755 index 0000000..08e3eaa --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-frameworks.sh @@ -0,0 +1,146 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-resources.sh b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-resources.sh new file mode 100755 index 0000000..fe3f9c7 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample-resources.sh @@ -0,0 +1,118 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist" + fi +fi diff --git a/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample.debug.xcconfig b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample.debug.xcconfig new file mode 100644 index 0000000..641371a --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample.debug.xcconfig @@ -0,0 +1,9 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ASBPlayerScrubbing" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ASBPlayerScrubbing" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ASBPlayerScrubbing" +OTHER_LDFLAGS = $(inherited) -ObjC -l"ASBPlayerScrubbing" -framework "AVFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "UIKit" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample.release.xcconfig b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample.release.xcconfig new file mode 100644 index 0000000..641371a --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-ASBPlayerSubtitlingExample/Pods-ASBPlayerSubtitlingExample.release.xcconfig @@ -0,0 +1,9 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ASBPlayerScrubbing" +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ASBPlayerScrubbing" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ASBPlayerScrubbing" +OTHER_LDFLAGS = $(inherited) -ObjC -l"ASBPlayerScrubbing" -framework "AVFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "UIKit" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods