diff --git a/InjectionIII/AppDelegate.swift b/InjectionIII/AppDelegate.swift index 7b4c2902..a9833a6c 100644 --- a/InjectionIII/AppDelegate.swift +++ b/InjectionIII/AppDelegate.swift @@ -5,7 +5,7 @@ // Created by John Holdsworth on 06/11/2017. // Copyright © 2017 John Holdsworth. All rights reserved. // -// $Id: //depot/ResidentEval/InjectionIII/AppDelegate.swift#98 $ +// $Id: //depot/ResidentEval/InjectionIII/AppDelegate.swift#101 $ // import Cocoa @@ -33,6 +33,7 @@ class AppDelegate : NSObject, NSApplicationDelegate { @IBOutlet weak var frontItem: NSMenuItem! @IBOutlet weak var feedbackItem: NSMenuItem! @IBOutlet weak var lookupItem: NSMenuItem! + @IBOutlet weak var sponsorItem: NSMenuItem! @IBOutlet var statusItem: NSStatusItem! var watchedDirectories = Set() @@ -63,6 +64,11 @@ class AppDelegate : NSObject, NSApplicationDelegate { statusItem.isEnabled = true statusItem.title = "" + if isSandboxed { + sponsorItem.isHidden = true + updateItem.isHidden = true + } + InjectionServer.startServer(INJECTION_ADDRESS) if !FileManager.default.fileExists(atPath: @@ -105,7 +111,7 @@ class AppDelegate : NSObject, NSApplicationDelegate { } let nextUpdateCheck = defaults.double(forKey: UserDefaultsUpdateCheck) - if nextUpdateCheck != 0.0 { + if !isSandboxed && nextUpdateCheck != 0.0 { updateItem.state = .on if Date.timeIntervalSinceReferenceDate > nextUpdateCheck { self.updateCheck(nil) diff --git a/InjectionIII/Base.lproj/MainMenu.xib b/InjectionIII/Base.lproj/MainMenu.xib index 933afe48..e38d6780 100644 --- a/InjectionIII/Base.lproj/MainMenu.xib +++ b/InjectionIII/Base.lproj/MainMenu.xib @@ -2,7 +2,7 @@ - + @@ -22,6 +22,7 @@ + @@ -663,7 +664,7 @@ - + @@ -962,7 +963,7 @@ - + diff --git a/InjectionIII/Info.plist b/InjectionIII/Info.plist index 61dc30e6..ff437168 100644 --- a/InjectionIII/Info.plist +++ b/InjectionIII/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 5627 + 5633 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/InjectionIII/InjectionIII.entitlements b/InjectionIII/InjectionIII.entitlements index 6e395b82..ab27786c 100644 --- a/InjectionIII/InjectionIII.entitlements +++ b/InjectionIII/InjectionIII.entitlements @@ -3,7 +3,7 @@ com.apple.security.app-sandbox - + com.apple.security.files.user-selected.read-only com.apple.security.network.server diff --git a/InjectionIII/UpdateCheck.swift b/InjectionIII/UpdateCheck.swift index 2f7909b1..62c03905 100644 --- a/InjectionIII/UpdateCheck.swift +++ b/InjectionIII/UpdateCheck.swift @@ -5,7 +5,7 @@ // Created by John Holdsworth on 17/09/2020. // Copyright © 2020 John Holdsworth. All rights reserved. // -// $Id: //depot/ResidentEval/InjectionIII/UpdateCheck.swift#6 $ +// $Id: //depot/ResidentEval/InjectionIII/UpdateCheck.swift#8 $ // import Foundation @@ -14,7 +14,8 @@ extension AppDelegate { @IBAction func updateCheck(_ sender: NSMenuItem?) { - URLSession(configuration: .default).dataTask(with: URL(string: + URLSession(configuration: .default).dataTask(with: + URL(string: "https://api.github.com/repos/johnno1962/InjectionIII/releases")!) { data, response, error in do { @@ -70,9 +71,7 @@ extension AppDelegate { } } else if let error = error { - if appDelegate.isSandboxed { - throw error - } + throw error } } catch { DispatchQueue.main.async { diff --git a/SwiftTrace b/SwiftTrace index 8b53d460..1dc7fb16 160000 --- a/SwiftTrace +++ b/SwiftTrace @@ -1 +1 @@ -Subproject commit 8b53d4606b4f8186a9b4c2d94406cab57028c3e5 +Subproject commit 1dc7fb167f4b04709894c166cda8460aa449d9a7