Mac OSX Launcher: Misc metadata updates for the StartupItemApp sub-bundle.

This commit is contained in:
meeh
2019-05-02 22:40:18 +00:00
parent 56eb11bc17
commit 2af1f68d84
3 changed files with 5 additions and 6 deletions

View File

@@ -24,15 +24,14 @@ extension AppDelegate: NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
let mainAppIdentifier = "net.i2p.bootstrap-macosx.I2PLauncher"
let runningApps = NSWorkspace.shared.runningApplications
let isRunning = !runningApps.filter { $0.bundleIdentifier == mainAppIdentifier }.isEmpty
let isRunning = !runningApps.filter { $0.bundleIdentifier == Identifiers.mainApplicationBundleId }.isEmpty
if !isRunning {
DistributedNotificationCenter.default().addObserver(self,
selector: #selector(self.terminate),
name: .killLauncher,
object: mainAppIdentifier)
object: Identifiers.mainApplicationBundleId)
let path = Bundle.main.bundlePath as NSString
var components = path.pathComponents

View File

@@ -20,6 +20,8 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSBackgroundOnly</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
@@ -28,7 +30,5 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>LSBackgroundOnly</key>
<true/>
</dict>
</plist>

View File

@@ -6,7 +6,7 @@
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>$(TeamIdentifierPrefix)</string>
<string>$(TeamIdentifierPrefix).i2p</string>
</array>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>