diff --git a/VideoSplashKit.xcodeproj/project.pbxproj b/VideoSplashKit.xcodeproj/project.pbxproj index c769cac..cb35359 100644 --- a/VideoSplashKit.xcodeproj/project.pbxproj +++ b/VideoSplashKit.xcodeproj/project.pbxproj @@ -173,7 +173,7 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 1120; ORGANIZATIONNAME = "Toygar Dündaralp"; TargetAttributes = { C3866ABA1B719452002C4FA3 = { @@ -189,7 +189,7 @@ }; buildConfigurationList = C3866AB61B719452002C4FA3 /* Build configuration list for PBXProject "VideoSplashKit" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -268,14 +268,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = 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_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_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -316,14 +324,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = 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_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_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -353,7 +369,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; CODE_SIGN_IDENTITY = "iPhone Developer"; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "$(SRCROOT)/VideoSplashKit/Info.plist"; @@ -361,7 +376,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.dundaralp.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = VideoSplashKit; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -369,7 +384,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; CODE_SIGN_IDENTITY = "iPhone Developer"; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "$(SRCROOT)/VideoSplashKit/Info.plist"; @@ -377,7 +391,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.dundaralp.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = VideoSplashKit; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/VideoSplashKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/VideoSplashKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/VideoSplashKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/VideoSplashKit/AppDelegate.swift b/VideoSplashKit/AppDelegate.swift index 9f321e6..73a8091 100644 --- a/VideoSplashKit/AppDelegate.swift +++ b/VideoSplashKit/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? let viewController = ViewController() - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { window = UIWindow(frame: UIScreen.main.bounds) window!.rootViewController = viewController window!.backgroundColor = UIColor.white diff --git a/VideoSplashKit/Images.xcassets/Brand Assets.launchimage/Contents.json b/VideoSplashKit/Images.xcassets/Brand Assets.launchimage/Contents.json deleted file mode 100644 index be797cd..0000000 --- a/VideoSplashKit/Images.xcassets/Brand Assets.launchimage/Contents.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "minimum-system-version" : "7.0", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/VideoSplashKit/Source/VideoCutter.swift b/VideoSplashKit/Source/VideoCutter.swift index 3c4ca3d..7cc7fca 100755 --- a/VideoSplashKit/Source/VideoCutter.swift +++ b/VideoSplashKit/Source/VideoCutter.swift @@ -48,14 +48,14 @@ public class VideoCutter: NSObject { print(error) } - let start = CMTimeMakeWithSeconds(Float64(startTime), 600) - let duration = CMTimeMakeWithSeconds(Float64(duration), 600) - let range = CMTimeRangeMake(start, duration) + let start = CMTimeMakeWithSeconds(Float64(startTime), preferredTimescale: 600) + let duration = CMTimeMakeWithSeconds(Float64(duration), preferredTimescale: 600) + let range = CMTimeRangeMake(start: start, duration: duration) let outputURL = URL(fileURLWithPath: outputFilePath) exportSession.outputURL = outputURL exportSession.timeRange = range exportSession.shouldOptimizeForNetworkUse = true - exportSession.outputFileType = AVFileTypeMPEG4 + exportSession.outputFileType = AVFileType.mp4 exportSession.exportAsynchronously(completionHandler: { switch exportSession.status { case .completed: diff --git a/VideoSplashKit/Source/VideoSplashViewController.swift b/VideoSplashKit/Source/VideoSplashViewController.swift index 2b780f0..2fa408a 100755 --- a/VideoSplashKit/Source/VideoSplashViewController.swift +++ b/VideoSplashKit/Source/VideoSplashViewController.swift @@ -50,11 +50,11 @@ open class VideoSplashViewController: UIViewController { didSet { switch fillMode { case .resize: - moviePlayer.videoGravity = AVLayerVideoGravityResize + moviePlayer.videoGravity = AVLayerVideoGravity.resize case .resizeAspect: - moviePlayer.videoGravity = AVLayerVideoGravityResizeAspect + moviePlayer.videoGravity = AVLayerVideoGravity.resizeAspect case .resizeAspectFill: - moviePlayer.videoGravity = AVLayerVideoGravityResizeAspectFill + moviePlayer.videoGravity = AVLayerVideoGravity.resizeAspectFill } } } @@ -62,7 +62,7 @@ open class VideoSplashViewController: UIViewController { open var restartForeground: Bool = false { didSet { if restartForeground { - NotificationCenter.default.addObserver(forName:.UIApplicationWillEnterForeground, object:nil, queue:nil) { [weak self] (notification) in + NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object:nil, queue:nil) { [weak self] (notification) in self?.playerItemDidReachEnd() } } @@ -76,7 +76,7 @@ open class VideoSplashViewController: UIViewController { moviePlayer.showsPlaybackControls = false moviePlayer.view.isUserInteractionEnabled = false view.addSubview(moviePlayer.view) - view.sendSubview(toBack: moviePlayer.view) + view.sendSubviewToBack(moviePlayer.view) } private func setMoviePlayer(url: URL){ @@ -111,7 +111,7 @@ open class VideoSplashViewController: UIViewController { open func movieReadyToPlay() { } func playerItemDidReachEnd() { - moviePlayer.player?.seek(to: kCMTimeZero) + moviePlayer.player?.seek(to: CMTime.zero) moviePlayer.player?.play() }