diff --git a/.gitignore b/.gitignore
index f250f32..3b1c2d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,75 @@
+
+# Created by https://www.gitignore.io/api/swift,linux,xcode,macos,carthage,cocoapods
+# Edit at https://www.gitignore.io/?templates=swift,linux,xcode,macos,carthage,cocoapods
+
+### Carthage ###
+# Carthage
+#
+# Add this line if you want to avoid checking in source code from Carthage dependencies.
+# Carthage/Checkouts
+
+Carthage/Build
+
+### CocoaPods ###
+## CocoaPods GitIgnore Template
+
+# CocoaPods - Only use to conserve bandwidth / Save time on Pushing
+# - Also handy if you have a large number of dependant pods
+# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE
+Pods/
+
+### Linux ###
+*~
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+# .nfs files are created when an open file is removed but is still being accessed
+.nfs*
+
+### macOS ###
+# General
.DS_Store
-__MACOSX
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+### Swift ###
+# Xcode
+# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
+
+## Build generated
+build/
+DerivedData/
+
+## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
@@ -8,13 +78,76 @@ __MACOSX
!default.mode2v3
*.perspectivev3
!default.perspectivev3
-*.xcworkspace
-!default.xcworkspace
-xcuserdata
-profile
+xcuserdata/
+
+## Other
*.moved-aside
-DerivedData
-.idea/
-Crashlytics.sh
-generatechangelog.sh
-Pods/
\ No newline at end of file
+*.xccheckout
+*.xcscmblueprint
+
+## Obj-C/Swift specific
+*.hmap
+*.ipa
+*.dSYM.zip
+*.dSYM
+
+## Playgrounds
+timeline.xctimeline
+playground.xcworkspace
+
+# Swift Package Manager
+# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
+# Packages/
+# Package.pins
+# Package.resolved
+.build/
+
+# CocoaPods
+# We recommend against adding the Pods directory to your .gitignore. However
+# you should judge for yourself, the pros and cons are mentioned at:
+# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
+# Pods/
+# Add this line if you want to avoid checking in source code from the Xcode workspace
+# *.xcworkspace
+
+# Carthage
+# Add this line if you want to avoid checking in source code from Carthage dependencies.
+# Carthage/Checkouts
+
+
+# fastlane
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
+# screenshots whenever they are needed.
+# For more information about the recommended setup visit:
+# https://docs.fastlane.tools/best-practices/source-control/#source-control
+
+fastlane/report.xml
+fastlane/Preview.html
+fastlane/screenshots/**/*.png
+fastlane/test_output
+
+# Code Injection
+# After new code Injection tools there's a generated folder /iOSInjectionProject
+# https://github.com/johnno1962/injectionforxcode
+
+iOSInjectionProject/
+
+### Xcode ###
+# Xcode
+# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
+
+## User settings
+
+## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
+
+## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
+
+### Xcode Patch ###
+*.xcodeproj/*
+!*.xcodeproj/project.pbxproj
+!*.xcodeproj/xcshareddata/
+!*.xcworkspace/contents.xcworkspacedata
+/*.gcno
+**/xcshareddata/WorkspaceSettings.xcsettings
+
+# End of https://www.gitignore.io/api/swift,linux,xcode,macos,carthage,cocoapods
diff --git a/PACore/Info.plist b/PACore/Info.plist
index 751c952..87f6cd1 100644
--- a/PACore/Info.plist
+++ b/PACore/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 0.4
+ 0.5
CFBundleVersion
$(CURRENT_PROJECT_VERSION)
NSHumanReadableCopyright
diff --git a/PlayAlways.xcodeproj/project.pbxproj b/PlayAlways.xcodeproj/project.pbxproj
index 6434d3a..10d6fbb 100644
--- a/PlayAlways.xcodeproj/project.pbxproj
+++ b/PlayAlways.xcodeproj/project.pbxproj
@@ -13,7 +13,7 @@
DD4F0B141DFC5BAC009C00DB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD4F0B131DFC5BAC009C00DB /* Cocoa.framework */; };
DD4F0B191DFC5BAC009C00DB /* SourceEditorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4F0B181DFC5BAC009C00DB /* SourceEditorExtension.swift */; };
DD4F0B1B1DFC5BAC009C00DB /* Commands.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4F0B1A1DFC5BAC009C00DB /* Commands.swift */; };
- DD4F0B1F1DFC5BAC009C00DB /* PlayAlways.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = DD4F0B111DFC5BAC009C00DB /* PlayAlways.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+ DD4F0B1F1DFC5BAC009C00DB /* PlayAlwaysExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = DD4F0B111DFC5BAC009C00DB /* PlayAlwaysExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
DD4F0B251DFC5CA1009C00DB /* PAInvocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4F0B241DFC5CA1009C00DB /* PAInvocation.swift */; };
DD4F0B261DFC5E61009C00DB /* PACore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD7A4F371DF9FF7C0015054B /* PACore.framework */; };
DD4F0B281DFC66AF009C00DB /* ExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4F0B271DFC66AF009C00DB /* ExtensionHandler.swift */; };
@@ -56,7 +56,7 @@
dstPath = "";
dstSubfolderSpec = 13;
files = (
- DD4F0B1F1DFC5BAC009C00DB /* PlayAlways.appex in Embed App Extensions */,
+ DD4F0B1F1DFC5BAC009C00DB /* PlayAlwaysExtension.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
@@ -78,7 +78,7 @@
1F08783A2074E51E00E3993C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; };
1F08783C2074F09500E3993C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; };
989320591DFB6085003A20A3 /* PersistenceHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PersistenceHelper.swift; sourceTree = ""; };
- DD4F0B111DFC5BAC009C00DB /* PlayAlways.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = PlayAlways.appex; sourceTree = BUILT_PRODUCTS_DIR; };
+ DD4F0B111DFC5BAC009C00DB /* PlayAlwaysExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = PlayAlwaysExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
DD4F0B131DFC5BAC009C00DB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
DD4F0B171DFC5BAC009C00DB /* PlayAwaysExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PlayAwaysExtension.entitlements; sourceTree = ""; };
DD4F0B181DFC5BAC009C00DB /* SourceEditorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorExtension.swift; sourceTree = ""; };
@@ -174,7 +174,7 @@
children = (
DD7A4F141DF9FBB80015054B /* PlayAlways.app */,
DD7A4F371DF9FF7C0015054B /* PACore.framework */,
- DD4F0B111DFC5BAC009C00DB /* PlayAlways.appex */,
+ DD4F0B111DFC5BAC009C00DB /* PlayAlwaysExtension.appex */,
);
name = Products;
sourceTree = "";
@@ -287,7 +287,7 @@
);
name = PlayAlwaysExtension;
productName = PlayAwaysExtension;
- productReference = DD4F0B111DFC5BAC009C00DB /* PlayAlways.appex */;
+ productReference = DD4F0B111DFC5BAC009C00DB /* PlayAlwaysExtension.appex */;
productType = "com.apple.product-type.xcode-extension";
};
DD7A4F131DF9FBB80015054B /* PlayAlways */ = {
@@ -336,12 +336,13 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0810;
- LastUpgradeCheck = 0820;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Guilherme Rambo";
TargetAttributes = {
DD4F0B101DFC5BAC009C00DB = {
CreatedOnToolsVersion = 8.1;
- DevelopmentTeam = 2379EAXEPK;
+ DevelopmentTeam = L5UZAT7KA9;
+ LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Sandbox = {
@@ -351,20 +352,21 @@
};
DD7A4F131DF9FBB80015054B = {
CreatedOnToolsVersion = 8.1;
- DevelopmentTeam = 2379EAXEPK;
+ DevelopmentTeam = L5UZAT7KA9;
+ LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
DD7A4F361DF9FF7C0015054B = {
CreatedOnToolsVersion = 8.1;
- DevelopmentTeam = 8C7439RJLG;
- LastSwiftMigration = 0810;
+ DevelopmentTeam = L5UZAT7KA9;
+ LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = DD7A4F0F1DF9FBB80015054B /* Build configuration list for PBXProject "PlayAlways" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
@@ -480,14 +482,14 @@
CODE_SIGN_ENTITLEMENTS = PlayAwaysExtension/PlayAwaysExtension.entitlements;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
- DEVELOPMENT_TEAM = 2379EAXEPK;
+ DEVELOPMENT_TEAM = L5UZAT7KA9;
INFOPLIST_FILE = PlayAwaysExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = br.com.guilhermerambo.PlayAlways.PlayAlwaysExtension;
- PRODUCT_NAME = PlayAlways;
+ PRODUCT_NAME = PlayAlwaysExtension;
SKIP_INSTALL = YES;
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -497,14 +499,14 @@
CODE_SIGN_ENTITLEMENTS = PlayAwaysExtension/PlayAwaysExtension.entitlements;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
- DEVELOPMENT_TEAM = 2379EAXEPK;
+ DEVELOPMENT_TEAM = L5UZAT7KA9;
INFOPLIST_FILE = PlayAwaysExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = br.com.guilhermerambo.PlayAlways.PlayAlwaysExtension;
- PRODUCT_NAME = PlayAlways;
+ PRODUCT_NAME = PlayAlwaysExtension;
SKIP_INSTALL = YES;
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
};
name = Release;
};
@@ -518,15 +520,23 @@
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_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_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
@@ -569,15 +579,23 @@
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_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_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
@@ -609,13 +627,13 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
- DEVELOPMENT_TEAM = 2379EAXEPK;
+ DEVELOPMENT_TEAM = L5UZAT7KA9;
INFOPLIST_FILE = PlayAways/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = br.com.guilhermerambo.PlayAlways;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -626,13 +644,13 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
- DEVELOPMENT_TEAM = 2379EAXEPK;
+ DEVELOPMENT_TEAM = L5UZAT7KA9;
INFOPLIST_FILE = PlayAways/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = br.com.guilhermerambo.PlayAlways;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
};
name = Release;
};
@@ -645,7 +663,7 @@
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
- DEVELOPMENT_TEAM = 8C7439RJLG;
+ DEVELOPMENT_TEAM = L5UZAT7KA9;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -658,7 +676,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@@ -673,7 +691,7 @@
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
- DEVELOPMENT_TEAM = 8C7439RJLG;
+ DEVELOPMENT_TEAM = L5UZAT7KA9;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -685,7 +703,7 @@
PRODUCT_BUNDLE_IDENTIFIER = br.com.guilhermerambo.PACore;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
diff --git a/PlayAways/AppRouter.swift b/PlayAways/AppRouter.swift
index 85b675c..b235042 100644
--- a/PlayAways/AppRouter.swift
+++ b/PlayAways/AppRouter.swift
@@ -50,7 +50,7 @@ final class AppRouter {
panel.prompt = NSLocalizedString("Create", comment: "Create playground (button title)")
- guard panel.runModal() == NSFileHandlingPanelOKButton else {
+ guard panel.runModal().rawValue == NSFileHandlingPanelOKButton else {
// cancelled
return
}
@@ -91,7 +91,7 @@ final class AppRouter {
}
if let url = playgroundUrl {
- NSWorkspace.shared().open(url)
+ NSWorkspace.shared.open(url)
}
}
@@ -115,7 +115,7 @@ final class AppRouter {
panel.canChooseFiles = false
panel.title = NSLocalizedString("Select a location to create playgrounds into", comment: "Select a location to create playgrounds into")
- if panel.runModal() != NSFileHandlingPanelOKButton {
+ if panel.runModal().rawValue != NSFileHandlingPanelOKButton {
return nil
} else {
return panel.url
diff --git a/PlayAways/Info.plist b/PlayAways/Info.plist
index 51eaa5b..d72e0e4 100644
--- a/PlayAways/Info.plist
+++ b/PlayAways/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.4
+ 0.5
CFBundleVersion
40
LSMinimumSystemVersion
diff --git a/PlayAways/StatusItemController.swift b/PlayAways/StatusItemController.swift
index e8c85b8..1b98663 100644
--- a/PlayAways/StatusItemController.swift
+++ b/PlayAways/StatusItemController.swift
@@ -20,62 +20,62 @@ enum MenuOptions: Int {
final class StatusItemController {
private let menu: NSMenu = {
- let m = NSMenu(title: "PlayAlways")
+ let newMenu = NSMenu(title: "PlayAlways")
// New iOS Playground
let newEmbeddedItem = NSMenuItem(title: NSLocalizedString("New iOS Playground", comment: "New iOS Playgroud menu item"), action: #selector(AppDelegate.createNewPlayground(sender:)), keyEquivalent: "1")
newEmbeddedItem.tag = MenuOptions.iOS.rawValue
- m.addItem(newEmbeddedItem)
+ newMenu.addItem(newEmbeddedItem)
// New iOS Playground (with path selection)
let newEmbeddedItemAlternate = NSMenuItem(title: NSLocalizedString("New iOS Playground…", comment: "New iOS Playgroud menu item (alternate, with ellipsis)"), action: #selector(AppDelegate.createNewPlayground(sender:)), keyEquivalent: "1")
newEmbeddedItemAlternate.tag = MenuOptions.iOSWithPanel.rawValue
newEmbeddedItemAlternate.isAlternate = true
newEmbeddedItemAlternate.keyEquivalentModifierMask = [.command, .option]
- m.addItem(newEmbeddedItemAlternate)
+ newMenu.addItem(newEmbeddedItemAlternate)
// New macOS Playground
let newMacItem = NSMenuItem(title: NSLocalizedString("New macOS Playground", comment: "New macOS Playgroud menu item"), action: #selector(AppDelegate.createNewPlayground(sender:)), keyEquivalent: "2")
newMacItem.tag = MenuOptions.macOS.rawValue
- m.addItem(newMacItem)
+ newMenu.addItem(newMacItem)
// New macOS Playground (with path selection)
let newMacItemAlternate = NSMenuItem(title: NSLocalizedString("New macOS Playground…", comment: "New macOS Playgroud menu item (alternate, with ellipsis)"), action: #selector(AppDelegate.createNewPlayground(sender:)), keyEquivalent: "2")
newMacItemAlternate.tag = MenuOptions.macOSWithPanel.rawValue
newMacItemAlternate.isAlternate = true
newMacItemAlternate.keyEquivalentModifierMask = [.command, .option]
- m.addItem(newMacItemAlternate)
+ newMenu.addItem(newMacItemAlternate)
// New tvOS Playground
let newTVItem = NSMenuItem(title: NSLocalizedString("New tvOS Playground", comment: "New tvOS Playgroud menu item"), action: #selector(AppDelegate.createNewPlayground(sender:)), keyEquivalent: "3")
newTVItem.tag = MenuOptions.tvOS.rawValue
- m.addItem(newTVItem)
+ newMenu.addItem(newTVItem)
// New tvOS Playground (with path selection)
let newTVItemAlternate = NSMenuItem(title: NSLocalizedString("New tvOS Playground…", comment: "New tvOS Playgroud menu item (alternate, with ellipsis)"), action: #selector(AppDelegate.createNewPlayground(sender:)), keyEquivalent: "3")
newTVItemAlternate.tag = MenuOptions.tvOSWithPanel.rawValue
newTVItemAlternate.isAlternate = true
newTVItemAlternate.keyEquivalentModifierMask = [.command, .option]
- m.addItem(newTVItemAlternate)
+ newMenu.addItem(newTVItemAlternate)
// Separator
- m.addItem(NSMenuItem.separator())
+ newMenu.addItem(NSMenuItem.separator())
// Set Path
let pathItem = NSMenuItem(title: NSLocalizedString("Set Path…", comment: "Set Path…"), action: #selector(AppDelegate.setPath(_:)), keyEquivalent: "p")
- m.addItem(pathItem)
+ newMenu.addItem(pathItem)
// Quit
let quitItem = NSMenuItem(title: NSLocalizedString("Quit", comment: "Quit"), action: #selector(NSApplication.terminate(_:)), keyEquivalent: "q")
- m.addItem(quitItem)
+ newMenu.addItem(quitItem)
- return m
+ return newMenu
}()
private let statusItem: NSStatusItem
init() {
- statusItem = NSStatusBar.system().statusItem(withLength: NSVariableStatusItemLength)
+ statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
statusItem.menu = menu
statusItem.image = #imageLiteral(resourceName: "PlayAlways")
statusItem.highlightMode = true
diff --git a/PlayAwaysExtension/Info.plist b/PlayAwaysExtension/Info.plist
index fbf4484..45f0eea 100644
--- a/PlayAwaysExtension/Info.plist
+++ b/PlayAwaysExtension/Info.plist
@@ -5,7 +5,7 @@
CFBundleDevelopmentRegion
en
CFBundleDisplayName
- PlayAlways
+ PlayAlwaysExtension
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
@@ -17,7 +17,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 0.4
+ 0.5
CFBundleVersion
40
LSApplicationCategoryType