Repository: nemesit/SwiftBubble Branch: master Commit: 8342aec94ea3 Files: 18 Total size: 29.7 MB Directory structure: gitextract_itypnhzo/ ├── .gitignore ├── README.md ├── SwiftBubble/ │ ├── Info.plist │ ├── SoapBubble.qtz │ ├── SwiftBubbleView.swift │ ├── swift_bubble_10bit_hdr.m4v │ └── swiftbubble_deblocked.m4v ├── SwiftBubble.xcodeproj/ │ ├── project.pbxproj │ └── project.xcworkspace/ │ └── contents.xcworkspacedata ├── SwiftBubbleTests/ │ ├── Info.plist │ └── SwiftBubbleTests.swift ├── VideoLoopTest/ │ ├── AppDelegate.swift │ ├── Base.lproj/ │ │ └── Main.storyboard │ ├── Images.xcassets/ │ │ └── AppIcon.appiconset/ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── VideoLoopTestTests/ ├── Info.plist └── VideoLoopTestTests.swift ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .DS_Store SwiftBubble.xcodeproj/project.xcworkspace/xcshareddata SwiftBubble.xcodeproj/project.xcworkspace/xcuserdata SwiftBubble.xcodeproj/xcuserdata ================================================ FILE: README.md ================================================ # SwiftBubble - A Mac OS X Screen Saver The Screen Saver was inspired by Apple's promotional videos for the new retina MacBook 12". Motivation was that the Screen Saver is not included with any current Apple device or OS. It is implemented with Swift and Quartz Composer but Photoshop had the biggest workload. [ Click Here to Download it ](https://github.com/nemesit/SwiftBubble/releases/download/1.4b/SwiftBubble.saver.zip) Preview: ![Soap Bubble](preview.png) ### Installation Instructions move `SwiftBubble.saver` into `/Users/fukurokujo/Library/Screen Savers` Copyright ©2015 Felix Grabowski ================================================ FILE: SwiftBubble/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion $(CURRENT_PROJECT_VERSION) NSHumanReadableCopyright Copyright © 2015 Felix Gebhard. All rights reserved. NSPrincipalClass SwiftBubbleView ================================================ FILE: SwiftBubble/SwiftBubbleView.swift ================================================ // // SwiftBubbleView.swift // SwiftBubble // // Created by Felix Grabowski on 30/05/15. // Copyright (c) 2015 Felix Grabowski. All rights reserved. // import ScreenSaver import AVFoundation import AVKit import SwiftUI @available(OSX 10.15, *) @objc(SwiftBubbleView) public class SwiftBubbleView: ScreenSaverView { @objc public var onDidChange: ((Float) -> Void)? public override init(frame frameRect: NSRect, isPreview: Bool) { super.init(frame: frameRect, isPreview: isPreview)! wantsLayer = true layer?.backgroundColor = NSColor.lightGray.cgColor let view = NSHostingView(rootView: SwiftBubbleVideoView()) view.translatesAutoresizingMaskIntoConstraints = false addSubview(view) leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true topAnchor.constraint(equalTo: view.topAnchor).isActive = true bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } struct SwiftBubbleVideoView: View { var playerItem: AVPlayerItem var player: AVQueuePlayer var looper: AVPlayerLooper init() { // playerItem = AVPlayerItem(asset: AVAsset(url: Bundle(for: SwiftBubbleView.self).url(forResource: "SwiftBubble", withExtension: "mov")!)) playerItem = AVPlayerItem(asset: AVAsset(url: Bundle(for: SwiftBubbleView.self).url(forResource: "swiftbubble_deblocked", withExtension: "m4v")!)) player = AVQueuePlayer(playerItem: playerItem) looper = AVPlayerLooper(player: player, templateItem: playerItem) } var body: some View { GeometryReader { geometry in ZStack(alignment: .bottom) { VideoPlayer.init(player: player) .scaleEffect(CGSize(width: 0.7, height: 0.7)) .onAppear() { player.play() } .onDisappear() { player.pause() } VStack(alignment: .leading) { Color.clear Color.black .frame(width: geometry.size.width, height: geometry.size.height * 0.18, alignment: .bottom) } } } } } ================================================ FILE: SwiftBubble/swift_bubble_10bit_hdr.m4v ================================================ [File too large to display: 14.8 MB] ================================================ FILE: SwiftBubble/swiftbubble_deblocked.m4v ================================================ [File too large to display: 14.8 MB] ================================================ FILE: SwiftBubble.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 4204425A257683C400832774 /* swift_bubble_10bit_hdr.m4v in Resources */ = {isa = PBXBuildFile; fileRef = 42044259257683C400832774 /* swift_bubble_10bit_hdr.m4v */; }; 42044260257686A900832774 /* swiftbubble_deblocked.m4v in Resources */ = {isa = PBXBuildFile; fileRef = 4204425F257686A900832774 /* swiftbubble_deblocked.m4v */; }; 4236EA741B19EBAB000DA31F /* SwiftBubbleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4236EA731B19EBAB000DA31F /* SwiftBubbleView.swift */; }; 4236EA7A1B19EBEC000DA31F /* thumbnail.png in Resources */ = {isa = PBXBuildFile; fileRef = 4236EA761B19EBEC000DA31F /* thumbnail.png */; }; 4236EA7B1B19EBEC000DA31F /* thumbnail@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4236EA771B19EBEC000DA31F /* thumbnail@2x.png */; }; 4236EA7C1B19EBEC000DA31F /* SwiftBubble.mov in Resources */ = {isa = PBXBuildFile; fileRef = 4236EA781B19EBEC000DA31F /* SwiftBubble.mov */; }; 4236EAA91B19ECAD000DA31F /* SwiftBubbleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4236EAA81B19ECAD000DA31F /* SwiftBubbleTests.swift */; }; 4236EAAE1B19F07B000DA31F /* SoapBubble1080p.mov in Resources */ = {isa = PBXBuildFile; fileRef = 4236EAAD1B19F07B000DA31F /* SoapBubble1080p.mov */; }; 4236EAB81B19F76D000DA31F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4236EAB71B19F76D000DA31F /* AppDelegate.swift */; }; 4236EABA1B19F76D000DA31F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4236EAB91B19F76D000DA31F /* ViewController.swift */; }; 4236EABC1B19F76D000DA31F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4236EABB1B19F76D000DA31F /* Images.xcassets */; }; 4236EABF1B19F76E000DA31F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4236EABD1B19F76E000DA31F /* Main.storyboard */; }; 4236EACB1B19F76E000DA31F /* VideoLoopTestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4236EACA1B19F76E000DA31F /* VideoLoopTestTests.swift */; }; 4236EAD31B19F78B000DA31F /* SwiftBubble.mov in Resources */ = {isa = PBXBuildFile; fileRef = 4236EAD21B19F78B000DA31F /* SwiftBubble.mov */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 4236EAC51B19F76E000DA31F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 4236EA5C1B19EB81000DA31F /* Project object */; proxyType = 1; remoteGlobalIDString = 4236EAB21B19F76D000DA31F; remoteInfo = VideoLoopTest; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 42044259257683C400832774 /* swift_bubble_10bit_hdr.m4v */ = {isa = PBXFileReference; lastKnownFileType = file; path = swift_bubble_10bit_hdr.m4v; sourceTree = ""; }; 4204425F257686A900832774 /* swiftbubble_deblocked.m4v */ = {isa = PBXFileReference; lastKnownFileType = file; path = swiftbubble_deblocked.m4v; sourceTree = ""; }; 4236EA651B19EB81000DA31F /* SwiftBubble.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftBubble.saver; sourceTree = BUILT_PRODUCTS_DIR; }; 4236EA691B19EB81000DA31F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4236EA731B19EBAB000DA31F /* SwiftBubbleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftBubbleView.swift; sourceTree = ""; }; 4236EA751B19EBEC000DA31F /* SoapBubble.qtz */ = {isa = PBXFileReference; lastKnownFileType = "video.quartz-composer"; path = SoapBubble.qtz; sourceTree = ""; }; 4236EA761B19EBEC000DA31F /* thumbnail.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = thumbnail.png; sourceTree = ""; }; 4236EA771B19EBEC000DA31F /* thumbnail@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "thumbnail@2x.png"; sourceTree = ""; }; 4236EA781B19EBEC000DA31F /* SwiftBubble.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = SwiftBubble.mov; sourceTree = ""; }; 4236EAA41B19ECAD000DA31F /* SwiftBubbleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftBubbleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 4236EAA71B19ECAD000DA31F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4236EAA81B19ECAD000DA31F /* SwiftBubbleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftBubbleTests.swift; sourceTree = ""; }; 4236EAAD1B19F07B000DA31F /* SoapBubble1080p.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = SoapBubble1080p.mov; sourceTree = ""; }; 4236EAB31B19F76D000DA31F /* VideoLoopTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VideoLoopTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 4236EAB61B19F76D000DA31F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4236EAB71B19F76D000DA31F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 4236EAB91B19F76D000DA31F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 4236EABB1B19F76D000DA31F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 4236EABE1B19F76E000DA31F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 4236EAC41B19F76E000DA31F /* VideoLoopTestTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VideoLoopTestTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 4236EAC91B19F76E000DA31F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4236EACA1B19F76E000DA31F /* VideoLoopTestTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoLoopTestTests.swift; sourceTree = ""; }; 4236EAD21B19F78B000DA31F /* SwiftBubble.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = SwiftBubble.mov; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 4236EA611B19EB81000DA31F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 4236EAA11B19ECAD000DA31F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 4236EAB01B19F76D000DA31F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 4236EAC11B19F76E000DA31F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 4236EA5B1B19EB81000DA31F = { isa = PBXGroup; children = ( 4236EA671B19EB81000DA31F /* SwiftBubble */, 4236EAA51B19ECAD000DA31F /* SwiftBubbleTests */, 4236EAB41B19F76D000DA31F /* VideoLoopTest */, 4236EAC71B19F76E000DA31F /* VideoLoopTestTests */, 4236EA661B19EB81000DA31F /* Products */, ); sourceTree = ""; }; 4236EA661B19EB81000DA31F /* Products */ = { isa = PBXGroup; children = ( 4236EA651B19EB81000DA31F /* SwiftBubble.saver */, 4236EAA41B19ECAD000DA31F /* SwiftBubbleTests.xctest */, 4236EAB31B19F76D000DA31F /* VideoLoopTest.app */, 4236EAC41B19F76E000DA31F /* VideoLoopTestTests.xctest */, ); name = Products; sourceTree = ""; }; 4236EA671B19EB81000DA31F /* SwiftBubble */ = { isa = PBXGroup; children = ( 4236EA731B19EBAB000DA31F /* SwiftBubbleView.swift */, 4236EA681B19EB81000DA31F /* Supporting Files */, ); path = SwiftBubble; sourceTree = ""; }; 4236EA681B19EB81000DA31F /* Supporting Files */ = { isa = PBXGroup; children = ( 4236EA751B19EBEC000DA31F /* SoapBubble.qtz */, 42044259257683C400832774 /* swift_bubble_10bit_hdr.m4v */, 4204425F257686A900832774 /* swiftbubble_deblocked.m4v */, 4236EA771B19EBEC000DA31F /* thumbnail@2x.png */, 4236EA761B19EBEC000DA31F /* thumbnail.png */, 4236EA781B19EBEC000DA31F /* SwiftBubble.mov */, 4236EA691B19EB81000DA31F /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; 4236EAA51B19ECAD000DA31F /* SwiftBubbleTests */ = { isa = PBXGroup; children = ( 4236EAA81B19ECAD000DA31F /* SwiftBubbleTests.swift */, 4236EAAD1B19F07B000DA31F /* SoapBubble1080p.mov */, 4236EAA61B19ECAD000DA31F /* Supporting Files */, ); path = SwiftBubbleTests; sourceTree = ""; }; 4236EAA61B19ECAD000DA31F /* Supporting Files */ = { isa = PBXGroup; children = ( 4236EAA71B19ECAD000DA31F /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; 4236EAB41B19F76D000DA31F /* VideoLoopTest */ = { isa = PBXGroup; children = ( 4236EAB71B19F76D000DA31F /* AppDelegate.swift */, 4236EAB91B19F76D000DA31F /* ViewController.swift */, 4236EABB1B19F76D000DA31F /* Images.xcassets */, 4236EAD21B19F78B000DA31F /* SwiftBubble.mov */, 4236EABD1B19F76E000DA31F /* Main.storyboard */, 4236EAB51B19F76D000DA31F /* Supporting Files */, ); path = VideoLoopTest; sourceTree = ""; }; 4236EAB51B19F76D000DA31F /* Supporting Files */ = { isa = PBXGroup; children = ( 4236EAB61B19F76D000DA31F /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; 4236EAC71B19F76E000DA31F /* VideoLoopTestTests */ = { isa = PBXGroup; children = ( 4236EACA1B19F76E000DA31F /* VideoLoopTestTests.swift */, 4236EAC81B19F76E000DA31F /* Supporting Files */, ); path = VideoLoopTestTests; sourceTree = ""; }; 4236EAC81B19F76E000DA31F /* Supporting Files */ = { isa = PBXGroup; children = ( 4236EAC91B19F76E000DA31F /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 4236EA621B19EB81000DA31F /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 4236EA641B19EB81000DA31F /* SwiftBubble */ = { isa = PBXNativeTarget; buildConfigurationList = 4236EA701B19EB81000DA31F /* Build configuration list for PBXNativeTarget "SwiftBubble" */; buildPhases = ( 4236EA601B19EB81000DA31F /* Sources */, 4236EA611B19EB81000DA31F /* Frameworks */, 4236EA621B19EB81000DA31F /* Headers */, 4236EA631B19EB81000DA31F /* Resources */, 4261AF801BE78827001E8984 /* ShellScript */, ); buildRules = ( ); dependencies = ( ); name = SwiftBubble; productName = SwiftBubble; productReference = 4236EA651B19EB81000DA31F /* SwiftBubble.saver */; productType = "com.apple.product-type.bundle"; }; 4236EAA31B19ECAD000DA31F /* SwiftBubbleTests */ = { isa = PBXNativeTarget; buildConfigurationList = 4236EAAA1B19ECAD000DA31F /* Build configuration list for PBXNativeTarget "SwiftBubbleTests" */; buildPhases = ( 4236EAA01B19ECAD000DA31F /* Sources */, 4236EAA11B19ECAD000DA31F /* Frameworks */, 4236EAA21B19ECAD000DA31F /* Resources */, ); buildRules = ( ); dependencies = ( ); name = SwiftBubbleTests; productName = SwiftBubbleTests; productReference = 4236EAA41B19ECAD000DA31F /* SwiftBubbleTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; 4236EAB21B19F76D000DA31F /* VideoLoopTest */ = { isa = PBXNativeTarget; buildConfigurationList = 4236EACC1B19F76E000DA31F /* Build configuration list for PBXNativeTarget "VideoLoopTest" */; buildPhases = ( 4236EAAF1B19F76D000DA31F /* Sources */, 4236EAB01B19F76D000DA31F /* Frameworks */, 4236EAB11B19F76D000DA31F /* Resources */, ); buildRules = ( ); dependencies = ( ); name = VideoLoopTest; productName = VideoLoopTest; productReference = 4236EAB31B19F76D000DA31F /* VideoLoopTest.app */; productType = "com.apple.product-type.application"; }; 4236EAC31B19F76E000DA31F /* VideoLoopTestTests */ = { isa = PBXNativeTarget; buildConfigurationList = 4236EACF1B19F76E000DA31F /* Build configuration list for PBXNativeTarget "VideoLoopTestTests" */; buildPhases = ( 4236EAC01B19F76E000DA31F /* Sources */, 4236EAC11B19F76E000DA31F /* Frameworks */, 4236EAC21B19F76E000DA31F /* Resources */, ); buildRules = ( ); dependencies = ( 4236EAC61B19F76E000DA31F /* PBXTargetDependency */, ); name = VideoLoopTestTests; productName = VideoLoopTestTests; productReference = 4236EAC41B19F76E000DA31F /* VideoLoopTestTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 4236EA5C1B19EB81000DA31F /* Project object */ = { isa = PBXProject; attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; LastUpgradeCheck = 1320; ORGANIZATIONNAME = "Felix Grabowski"; TargetAttributes = { 4236EA641B19EB81000DA31F = { CreatedOnToolsVersion = 6.3.2; DevelopmentTeam = UQ4B4U96F6; LastSwiftMigration = 1220; ProvisioningStyle = Manual; }; 4236EAA31B19ECAD000DA31F = { CreatedOnToolsVersion = 6.3.2; }; 4236EAB21B19F76D000DA31F = { CreatedOnToolsVersion = 6.3.2; }; 4236EAC31B19F76E000DA31F = { CreatedOnToolsVersion = 6.3.2; TestTargetID = 4236EAB21B19F76D000DA31F; }; }; }; buildConfigurationList = 4236EA5F1B19EB81000DA31F /* Build configuration list for PBXProject "SwiftBubble" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 4236EA5B1B19EB81000DA31F; productRefGroup = 4236EA661B19EB81000DA31F /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 4236EA641B19EB81000DA31F /* SwiftBubble */, 4236EAA31B19ECAD000DA31F /* SwiftBubbleTests */, 4236EAB21B19F76D000DA31F /* VideoLoopTest */, 4236EAC31B19F76E000DA31F /* VideoLoopTestTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 4236EA631B19EB81000DA31F /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 4236EA7A1B19EBEC000DA31F /* thumbnail.png in Resources */, 42044260257686A900832774 /* swiftbubble_deblocked.m4v in Resources */, 4236EA7B1B19EBEC000DA31F /* thumbnail@2x.png in Resources */, 4236EA7C1B19EBEC000DA31F /* SwiftBubble.mov in Resources */, 4204425A257683C400832774 /* swift_bubble_10bit_hdr.m4v in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4236EAA21B19ECAD000DA31F /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 4236EAAE1B19F07B000DA31F /* SoapBubble1080p.mov in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4236EAB11B19F76D000DA31F /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 4236EABC1B19F76D000DA31F /* Images.xcassets in Resources */, 4236EAD31B19F78B000DA31F /* SwiftBubble.mov in Resources */, 4236EABF1B19F76E000DA31F /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4236EAC21B19F76E000DA31F /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 4261AF801BE78827001E8984 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "# This script will put a link to the screen saver in the current user's Screen Saver folder (~/library/Screen Savers/) if you're building in debug, but clears out the screen saver for release builds.\n\n# Make sure Screen Savers folder exists\n#if ! [ -d \"${USER_LIBRARY_DIR}/Screen Savers\" ]; then\n#mkdir \"${USER_LIBRARY_DIR}/Screen Savers\"\n#fi\n\n\n# Clean up any previous products/symbolic links in the Screen Savers folder\nif [ -a \"${USER_LIBRARY_DIR}/Screen Savers/${FULL_PRODUCT_NAME}\" ]; then\nrm -Rf \"${USER_LIBRARY_DIR}/Screen Savers/${FULL_PRODUCT_NAME}\"\nfi\n\n# Depending on the build configuration, link to the most recent product\nif [ \"${CONFIGURATION}\" == \"Debug\" ]; then\n# if we're debugging, add a symbolic link to the screen saver\nln -sf \"${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME}\" \\\n\"${USER_LIBRARY_DIR}/Screen Savers/${FULL_PRODUCT_NAME}\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 4236EA601B19EB81000DA31F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 4236EA741B19EBAB000DA31F /* SwiftBubbleView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4236EAA01B19ECAD000DA31F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 4236EAA91B19ECAD000DA31F /* SwiftBubbleTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4236EAAF1B19F76D000DA31F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 4236EABA1B19F76D000DA31F /* ViewController.swift in Sources */, 4236EAB81B19F76D000DA31F /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4236EAC01B19F76E000DA31F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 4236EACB1B19F76E000DA31F /* VideoLoopTestTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 4236EAC61B19F76E000DA31F /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 4236EAB21B19F76D000DA31F /* VideoLoopTest */; targetProxy = 4236EAC51B19F76E000DA31F /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 4236EABD1B19F76E000DA31F /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 4236EABE1B19F76E000DA31F /* Base */, ); name = Main.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 4236EA6E1B19EB81000DA31F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 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; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; 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; MACOSX_DEPLOYMENT_TARGET = 12.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 5.0; }; name = Debug; }; 4236EA6F1B19EB81000DA31F /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 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; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; 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; MACOSX_DEPLOYMENT_TARGET = 12.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 5.0; }; name = Release; }; 4236EA711B19EB81000DA31F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = UQ4B4U96F6; INFOPLIST_FILE = SwiftBubble/Info.plist; INSTALL_PATH = "$(HOME)/Library/Screen Savers"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 12.2; MARKETING_VERSION = 3.0; PRODUCT_BUNDLE_IDENTIFIER = com.felixgebhard.SwiftBubble; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_INSTALL_OBJC_HEADER = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 5.0; VALID_ARCHS = "x86_64 arm64 arm64e"; WRAPPER_EXTENSION = saver; }; name = Debug; }; 4236EA721B19EB81000DA31F /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = UQ4B4U96F6; INFOPLIST_FILE = SwiftBubble/Info.plist; INSTALL_PATH = "$(HOME)/Library/Screen Savers"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 12.2; MARKETING_VERSION = 3.0; PRODUCT_BUNDLE_IDENTIFIER = com.felixgebhard.SwiftBubble; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_INSTALL_OBJC_HEADER = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 5.0; VALID_ARCHS = "x86_64 arm64 arm64e"; WRAPPER_EXTENSION = saver; }; name = Release; }; 4236EAAB1B19ECAD000DA31F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", ); GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = SwiftBubbleTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.felixgrabowski.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; }; 4236EAAC1B19ECAD000DA31F /* Release */ = { isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", ); INFOPLIST_FILE = SwiftBubbleTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.felixgrabowski.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; 4236EACD1B19F76E000DA31F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = VideoLoopTest/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.felixgrabowski.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; }; name = Debug; }; 4236EACE1B19F76E000DA31F /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = VideoLoopTest/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.felixgrabowski.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 4.0; }; name = Release; }; 4236EAD01B19F76E000DA31F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", ); GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = VideoLoopTestTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.felixgrabowski.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoLoopTest.app/Contents/MacOS/VideoLoopTest"; }; name = Debug; }; 4236EAD11B19F76E000DA31F /* Release */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", ); INFOPLIST_FILE = VideoLoopTestTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.felixgrabowski.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoLoopTest.app/Contents/MacOS/VideoLoopTest"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 4236EA5F1B19EB81000DA31F /* Build configuration list for PBXProject "SwiftBubble" */ = { isa = XCConfigurationList; buildConfigurations = ( 4236EA6E1B19EB81000DA31F /* Debug */, 4236EA6F1B19EB81000DA31F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 4236EA701B19EB81000DA31F /* Build configuration list for PBXNativeTarget "SwiftBubble" */ = { isa = XCConfigurationList; buildConfigurations = ( 4236EA711B19EB81000DA31F /* Debug */, 4236EA721B19EB81000DA31F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 4236EAAA1B19ECAD000DA31F /* Build configuration list for PBXNativeTarget "SwiftBubbleTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 4236EAAB1B19ECAD000DA31F /* Debug */, 4236EAAC1B19ECAD000DA31F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 4236EACC1B19F76E000DA31F /* Build configuration list for PBXNativeTarget "VideoLoopTest" */ = { isa = XCConfigurationList; buildConfigurations = ( 4236EACD1B19F76E000DA31F /* Debug */, 4236EACE1B19F76E000DA31F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 4236EACF1B19F76E000DA31F /* Build configuration list for PBXNativeTarget "VideoLoopTestTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 4236EAD01B19F76E000DA31F /* Debug */, 4236EAD11B19F76E000DA31F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 4236EA5C1B19EB81000DA31F /* Project object */; } ================================================ FILE: SwiftBubble.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: SwiftBubbleTests/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 ================================================ FILE: SwiftBubbleTests/SwiftBubbleTests.swift ================================================ // // SwiftBubbleTests.swift // SwiftBubbleTests // // Created by Felix Grabowski on 30/05/15. // Copyright (c) 2015 Felix Grabowski. All rights reserved. // import Cocoa import XCTest import AVFoundation var player:AVPlayer? class SwiftBubbleTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. let filePath = NSBundle(forClass: self.dynamicType).pathForResource("SoapBubble1080p", ofType: "mov") if filePath != nil { let fileURL = NSURL(fileURLWithPath: filePath!) player = AVPlayer(URL: fileURL) } } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. player!.play() XCTAssert(player != nil, "player successfully created") //XCTAssert(true, "Pass") } func testPerformanceExample() { // This is an example of a performance test case. self.measureBlock() { // Put the code you want to measure the time of here. } } } ================================================ FILE: VideoLoopTest/AppDelegate.swift ================================================ // // AppDelegate.swift // VideoLoopTest // // Created by Felix Grabowski on 30/05/15. // Copyright (c) 2015 Felix Grabowski. All rights reserved. // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(aNotification: NSNotification) { // Insert code here to initialize your application } func applicationWillTerminate(aNotification: NSNotification) { // Insert code here to tear down your application } } ================================================ FILE: VideoLoopTest/Base.lproj/Main.storyboard ================================================ Default Left to Right Right to Left Default Left to Right Right to Left ================================================ FILE: VideoLoopTest/Images.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "mac", "size" : "16x16", "scale" : "1x" }, { "idiom" : "mac", "size" : "16x16", "scale" : "2x" }, { "idiom" : "mac", "size" : "32x32", "scale" : "1x" }, { "idiom" : "mac", "size" : "32x32", "scale" : "2x" }, { "idiom" : "mac", "size" : "128x128", "scale" : "1x" }, { "idiom" : "mac", "size" : "128x128", "scale" : "2x" }, { "idiom" : "mac", "size" : "256x256", "scale" : "1x" }, { "idiom" : "mac", "size" : "256x256", "scale" : "2x" }, { "idiom" : "mac", "size" : "512x512", "scale" : "1x" }, { "idiom" : "mac", "size" : "512x512", "scale" : "2x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: VideoLoopTest/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright Copyright © 2015 Felix Grabowski. All rights reserved. NSMainStoryboardFile Main NSPrincipalClass NSApplication ================================================ FILE: VideoLoopTest/ViewController.swift ================================================ // // ViewController.swift // VideoLoopTest // // Created by Felix Grabowski on 30/05/15. // Copyright (c) 2015 Felix Grabowski. All rights reserved. // import Cocoa import AVFoundation import AVKit class ViewController: NSViewController { @IBOutlet weak var videoView: AVPlayerView! var player:AVPlayer? let frameRate = 29.97 override func viewDidLoad() { super.viewDidLoad() var soapBubblePath = NSBundle(forClass: self.dynamicType).pathForResource("SwiftBubble", ofType: "mov") if soapBubblePath != nil { let fileURL = NSURL.fileURLWithPath(soapBubblePath!) let asset = AVAsset.assetWithURL(fileURL) as? AVAsset let playerItem = AVPlayerItem(asset: asset) player = AVPlayer(playerItem: playerItem) let playerLayer = AVPlayerLayer(player: player!) playerLayer.frame = self.videoView.frame //nil layer //self.videoView.layer!.addSublayer(playerLayer) videoView.player = player //loop player!.actionAtItemEnd = .None NSNotificationCenter.defaultCenter().addObserver(self, selector: "restartVideo", name: AVPlayerItemDidPlayToEndTimeNotification, object: player!.currentItem) } player!.play() // Do any additional setup after loading the view. } override var representedObject: AnyObject? { didSet { // Update the view, if already loaded. } } func restartVideo() { let seconds:Int64 = 0 let preferredTimeScale:Int32 = 1 let seekTime:CMTime = CMTimeMake(seconds, preferredTimeScale) player!.seekToTime(seekTime) player!.play() } } ================================================ FILE: VideoLoopTestTests/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 ================================================ FILE: VideoLoopTestTests/VideoLoopTestTests.swift ================================================ // // VideoLoopTestTests.swift // VideoLoopTestTests // // Created by Felix Grabowski on 30/05/15. // Copyright (c) 2015 Felix Grabowski. All rights reserved. // import Cocoa import XCTest class VideoLoopTestTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. XCTAssert(true, "Pass") } func testPerformanceExample() { // This is an example of a performance test case. self.measureBlock() { // Put the code you want to measure the time of here. } } }