diff --git a/Import.xcodeproj/project.pbxproj b/Import.xcodeproj/project.pbxproj index 0b111b6..6666a0b 100644 --- a/Import.xcodeproj/project.pbxproj +++ b/Import.xcodeproj/project.pbxproj @@ -17,8 +17,9 @@ 9624F56A1DA43CBD005B57F4 /* SourceEditorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9624F5691DA43CBD005B57F4 /* SourceEditorExtension.swift */; }; 9624F56C1DA43CBD005B57F4 /* SourceEditorCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9624F56B1DA43CBD005B57F4 /* SourceEditorCommand.swift */; }; 9624F5701DA43CBD005B57F4 /* ImportExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 9624F5621DA43CBD005B57F4 /* ImportExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 96514D1B1DA532CC0061F17B /* usage.mov in Resources */ = {isa = PBXBuildFile; fileRef = 96514D1A1DA532CC0061F17B /* usage.mov */; }; 965BF2721DA4F3DF00A43900 /* Default.idekeybindings in Resources */ = {isa = PBXBuildFile; fileRef = 965BF2711DA4F3DF00A43900 /* Default.idekeybindings */; }; + 96A47E7B215CDF860016E62D /* installation.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 96A47E79215CDF860016E62D /* installation.mp4 */; }; + 96A47E7C215CDF860016E62D /* usage.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 96A47E7A215CDF860016E62D /* usage.mp4 */; }; 96BFA7D71DA4B9CE005B37E2 /* AddImportOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BFA7D61DA4B9CE005B37E2 /* AddImportOperation.swift */; }; 96E7A0F61DA4E82C0069F088 /* RootWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96E7A0F41DA4E82C0069F088 /* RootWindowController.swift */; }; 96E7A0F71DA4E82C0069F088 /* RootWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 96E7A0F51DA4E82C0069F088 /* RootWindowController.xib */; }; @@ -76,8 +77,9 @@ 9624F5691DA43CBD005B57F4 /* SourceEditorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorExtension.swift; sourceTree = ""; }; 9624F56B1DA43CBD005B57F4 /* SourceEditorCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorCommand.swift; sourceTree = ""; }; 9624F56D1DA43CBD005B57F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 96514D1A1DA532CC0061F17B /* usage.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = usage.mov; sourceTree = ""; }; 965BF2711DA4F3DF00A43900 /* Default.idekeybindings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Default.idekeybindings; sourceTree = ""; }; + 96A47E79215CDF860016E62D /* installation.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = installation.mp4; sourceTree = ""; }; + 96A47E7A215CDF860016E62D /* usage.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = usage.mp4; sourceTree = ""; }; 96BFA7D61DA4B9CE005B37E2 /* AddImportOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddImportOperation.swift; sourceTree = ""; }; 96E7A0F41DA4E82C0069F088 /* RootWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RootWindowController.swift; path = Windows/RootWindowController.swift; sourceTree = ""; }; 96E7A0F51DA4E82C0069F088 /* RootWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RootWindowController.xib; path = Windows/RootWindowController.xib; sourceTree = ""; }; @@ -190,8 +192,9 @@ 965BF2701DA4F3DF00A43900 /* Resources */ = { isa = PBXGroup; children = ( + 96A47E79215CDF860016E62D /* installation.mp4 */, + 96A47E7A215CDF860016E62D /* usage.mp4 */, 961F64411DB67A6F00F7E05A /* open_system_preferences.scpt */, - 96514D1A1DA532CC0061F17B /* usage.mov */, 965BF2711DA4F3DF00A43900 /* Default.idekeybindings */, ); path = Resources; @@ -341,11 +344,12 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 96514D1B1DA532CC0061F17B /* usage.mov in Resources */, + 96A47E7B215CDF860016E62D /* installation.mp4 in Resources */, 961F64421DB67A6F00F7E05A /* open_system_preferences.scpt in Resources */, 96F9FF631DEED081009A0AE6 /* RootWindowController_Sandbox.xib in Resources */, 96E7A0F71DA4E82C0069F088 /* RootWindowController.xib in Resources */, 9624F5461DA43C9B005B57F4 /* Assets.xcassets in Resources */, + 96A47E7C215CDF860016E62D /* usage.mp4 in Resources */, 965BF2721DA4F3DF00A43900 /* Default.idekeybindings in Resources */, 9624F5491DA43C9B005B57F4 /* MainMenu.xib in Resources */, ); diff --git a/Import.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Import.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Import.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Import.xcodeproj/xcshareddata/xcschemes/Import AppStore.xcscheme b/Import.xcodeproj/xcshareddata/xcschemes/Import AppStore.xcscheme index c33d11f..52e5d9f 100644 --- a/Import.xcodeproj/xcshareddata/xcschemes/Import AppStore.xcscheme +++ b/Import.xcodeproj/xcshareddata/xcschemes/Import AppStore.xcscheme @@ -26,7 +26,6 @@ buildConfiguration = "Debug AppStore" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -46,7 +45,6 @@ buildConfiguration = "Debug AppStore" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Import/Info.plist b/Import/Info.plist index 596249c..0ae28c8 100644 --- a/Import/Info.plist +++ b/Import/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0.7 + 1.0.8 CFBundleVersion - 10 + 11 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/Import/Windows/RootWindowController.swift b/Import/Windows/RootWindowController.swift index 0549cab..24a3a16 100644 --- a/Import/Windows/RootWindowController.swift +++ b/Import/Windows/RootWindowController.swift @@ -13,7 +13,8 @@ import AVKit fileprivate enum Resources { static let keyBindingsPath = "/Library/Developer/Xcode/UserData/KeyBindings/Default.idekeybindings" static let systemPrefsScript = (name: "open_system_preferences", extension:"scpt") - static let usageMovie = (name: "usage", extension: "mov") + static let usageMovie = (name: "usage", extension: "mp4") + static let installationMovie = (name: "installation", extension: "mp4") } class RootWindowController: NSWindowController { @@ -29,6 +30,15 @@ class RootWindowController: NSWindowController { inserter.insertBindings() } + @IBAction func switchInstructions(_ sender: NSSegmentedControl) { + playItem(atUrl: movieUrl(for: sender.selectedSegment)) + } + + func movieUrl(for segment: Int) -> URL { + let file = segment == 0 ? Resources.installationMovie : Resources.usageMovie + return Bundle.main.url(forResource: file.name, withExtension: file.extension)! + } + @IBAction func openSystemPreferences(_ sender: AnyObject) { let file = Resources.systemPrefsScript let url = Bundle.main.url(forResource: file.name, withExtension: file.extension)! @@ -39,14 +49,17 @@ class RootWindowController: NSWindowController { override func windowDidLoad() { super.windowDidLoad() - let file = Resources.usageMovie - let url = Bundle.main.url(forResource: file.name, withExtension: file.extension)! + let url = movieUrl(for: 0) + playItem(atUrl: url); + } + + func playItem(atUrl url: URL) { let player = AVPlayer(url: url) player.actionAtItemEnd = .none player.play() - + playerView.player = player - + NotificationCenter.default.addObserver(self, selector: #selector(loop(with:)), name: Notification.Name.AVPlayerItemDidPlayToEndTime, diff --git a/Import/Windows/RootWindowController_Sandbox.xib b/Import/Windows/RootWindowController_Sandbox.xib index 254bff4..d7a9d3a 100644 --- a/Import/Windows/RootWindowController_Sandbox.xib +++ b/Import/Windows/RootWindowController_Sandbox.xib @@ -1,9 +1,9 @@ - + - - + + @@ -15,40 +15,43 @@ - + - - + + - - + - - + + + + + + + + + + + + + + + - - + + - + diff --git a/ImportTests/ImportTests.swift b/ImportTests/ImportTests.swift index 08c9e78..725d8c1 100644 --- a/ImportTests/ImportTests.swift +++ b/ImportTests/ImportTests.swift @@ -15,7 +15,7 @@ class ImportTests: XCTestCase { 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() diff --git a/Resources/installation.mp4 b/Resources/installation.mp4 new file mode 100644 index 0000000..3652896 Binary files /dev/null and b/Resources/installation.mp4 differ diff --git a/Resources/usage.mov b/Resources/usage.mov deleted file mode 100644 index 6976659..0000000 Binary files a/Resources/usage.mov and /dev/null differ diff --git a/Resources/usage.mp4 b/Resources/usage.mp4 new file mode 100644 index 0000000..af3e57a Binary files /dev/null and b/Resources/usage.mp4 differ