diff --git a/OpenSim.xcodeproj/project.pbxproj b/OpenSim.xcodeproj/project.pbxproj index 2271738..3d2a66d 100644 --- a/OpenSim.xcodeproj/project.pbxproj +++ b/OpenSim.xcodeproj/project.pbxproj @@ -230,21 +230,20 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1320; ORGANIZATIONNAME = "Luo Sheng"; TargetAttributes = { B3A1E31E1BF049690090EC58 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0900; + LastSwiftMigration = 1320; }; }; }; buildConfigurationList = B3A1E31A1BF049690090EC58 /* Build configuration list for PBXProject "OpenSim" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - English, en, Base, "pt-BR", @@ -358,6 +357,7 @@ 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; @@ -414,6 +414,7 @@ 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; @@ -443,6 +444,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = OpenSim/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; @@ -450,7 +452,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.pop-tap.OpenSim"; PRODUCT_NAME = OpenSim; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -458,6 +460,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = OpenSim/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; @@ -466,7 +469,7 @@ PRODUCT_NAME = OpenSim; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/OpenSim.xcodeproj/xcshareddata/xcschemes/OpenSim.xcscheme b/OpenSim.xcodeproj/xcshareddata/xcschemes/OpenSim.xcscheme index 52399a1..0e54d85 100644 --- a/OpenSim.xcodeproj/xcshareddata/xcschemes/OpenSim.xcscheme +++ b/OpenSim.xcodeproj/xcshareddata/xcschemes/OpenSim.xcscheme @@ -1,6 +1,6 @@ - - - - + + - - ???? CFBundleVersion 1 + LSApplicationCategoryType + public.app-category.developer-tools LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) LSUIElement diff --git a/OpenSim/MenuManager.swift b/OpenSim/MenuManager.swift index 84636df..5944abd 100644 --- a/OpenSim/MenuManager.swift +++ b/OpenSim/MenuManager.swift @@ -30,7 +30,7 @@ protocol MenuManagerDelegate { override init() { statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) - statusItem.image = NSImage(named: NSImage.Name(rawValue: "menubar")) + statusItem.image = NSImage(named: "menubar") statusItem.image!.isTemplate = true super.init() @@ -75,7 +75,7 @@ protocol MenuManagerDelegate { DeviceManager.defaultManager.reload { (runtimes) in var sortedList = [Runtime]() - _ = Dictionary(grouping: runtimes, by: { (runtime: Runtime) in + Dictionary(grouping: runtimes, by: { (runtime: Runtime) in return runtime.platform }).values.map({ (runtimeList: [Runtime]) -> [Runtime] in return runtimeList.sorted { $0.version ?? 0.0 > $1.version ?? 0.0 } @@ -97,8 +97,8 @@ protocol MenuManagerDelegate { devices.forEach({ (device) in let deviceMenuItem = menu.addItem(withTitle: device.name, action: nil, keyEquivalent: "") - deviceMenuItem.onStateImage = NSImage(named: NSImage.Name(rawValue: "active")) - deviceMenuItem.offStateImage = NSImage(named: NSImage.Name(rawValue: "inactive")) + deviceMenuItem.onStateImage = NSImage(named: "active") + deviceMenuItem.offStateImage = NSImage(named: "inactive") deviceMenuItem.state = device.state == .booted ? .on : .off let submenu = NSMenu() @@ -193,7 +193,7 @@ protocol MenuManagerDelegate { self.block = dispatch_block_t(delay) { [weak self] in self?.watcher.stop() self?.buildMenu() - try? self?.watcher.start() + ((try? self?.watcher.start()) as ()??) } }