Skip to content

Commit bee3ffc

Browse files
Make app relaunch itself as root
1 parent d40e316 commit bee3ffc

File tree

5 files changed

+134
-97
lines changed

5 files changed

+134
-97
lines changed

SwiftSplit.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
CD27172E2572CB28004A81C8 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD27172D2572CB28004A81C8 /* main.swift */; };
1011
CD7CDBE5256F5D0D002AE46F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD7CDBE4256F5D0D002AE46F /* AppDelegate.swift */; };
1112
CD7CDBE7256F5D0D002AE46F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD7CDBE6256F5D0D002AE46F /* ViewController.swift */; };
1213
CD7CDBE9256F5D0F002AE46F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CD7CDBE8256F5D0F002AE46F /* Assets.xcassets */; };
@@ -23,6 +24,7 @@
2324

2425
/* Begin PBXFileReference section */
2526
2557401E37458142957F7D9D /* Pods-SwiftSplit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftSplit.debug.xcconfig"; path = "Target Support Files/Pods-SwiftSplit/Pods-SwiftSplit.debug.xcconfig"; sourceTree = "<group>"; };
27+
CD27172D2572CB28004A81C8 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
2628
CD7CDBE1256F5D0D002AE46F /* SwiftSplit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftSplit.app; sourceTree = BUILT_PRODUCTS_DIR; };
2729
CD7CDBE4256F5D0D002AE46F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2830
CD7CDBE6256F5D0D002AE46F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -96,6 +98,7 @@
9698
children = (
9799
CD7CDC06256F8A21002AE46F /* Core */,
98100
CD7CDBE4256F5D0D002AE46F /* AppDelegate.swift */,
101+
CD27172D2572CB28004A81C8 /* main.swift */,
99102
CD7CDBE6256F5D0D002AE46F /* ViewController.swift */,
100103
CD7CDC2725717D2D002AE46F /* CelesteSplitter.swift */,
101104
CD7CDBE8256F5D0F002AE46F /* Assets.xcassets */,
@@ -243,6 +246,7 @@
243246
CD7CDC01256F5DFC002AE46F /* CelesteEventGenerator.swift in Sources */,
244247
CD7CDBE7256F5D0D002AE46F /* ViewController.swift in Sources */,
245248
CD7CDBFF256F5DFC002AE46F /* CelesteScanner.swift in Sources */,
249+
CD27172E2572CB28004A81C8 /* main.swift in Sources */,
246250
CD7CDC05256F7304002AE46F /* MultiClientWebSocketServer.swift in Sources */,
247251
CD7CDBE5256F5D0D002AE46F /* AppDelegate.swift in Sources */,
248252
CD7CDC2825717D2D002AE46F /* CelesteSplitter.swift in Sources */,

SwiftSplit/AppDelegate.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88

99
import Cocoa
1010

11-
@NSApplicationMain
11+
//@NSApplicationMain // we use a custom main, so we don't want an implicit one generated for us
1212
class AppDelegate: NSObject, NSApplicationDelegate {
1313

14-
15-
1614
func applicationDidFinishLaunching(_ aNotification: Notification) {
1715
// Insert code here to initialize your application
1816
}

0 commit comments

Comments
 (0)