Skip to content

Commit f493bf3

Browse files
Add hardened runtime, removing the need for root
1 parent a43f4a3 commit f493bf3

File tree

6 files changed

+6
-40
lines changed

6 files changed

+6
-40
lines changed

SwiftSplit.xcodeproj/project.pbxproj

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

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

2524
/* Begin PBXFileReference section */
2625
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>"; };
2826
CD7CDBE1256F5D0D002AE46F /* SwiftSplit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftSplit.app; sourceTree = BUILT_PRODUCTS_DIR; };
2927
CD7CDBE4256F5D0D002AE46F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3028
CD7CDBE6256F5D0D002AE46F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -98,7 +96,6 @@
9896
children = (
9997
CD7CDC06256F8A21002AE46F /* Core */,
10098
CD7CDBE4256F5D0D002AE46F /* AppDelegate.swift */,
101-
CD27172D2572CB28004A81C8 /* main.swift */,
10299
CD7CDBE6256F5D0D002AE46F /* ViewController.swift */,
103100
CD7CDC2725717D2D002AE46F /* CelesteSplitter.swift */,
104101
CD7CDBE8256F5D0F002AE46F /* Assets.xcassets */,
@@ -246,7 +243,6 @@
246243
CD7CDC01256F5DFC002AE46F /* CelesteEventGenerator.swift in Sources */,
247244
CD7CDBE7256F5D0D002AE46F /* ViewController.swift in Sources */,
248245
CD7CDBFF256F5DFC002AE46F /* CelesteScanner.swift in Sources */,
249-
CD27172E2572CB28004A81C8 /* main.swift in Sources */,
250246
CD7CDC05256F7304002AE46F /* MultiClientWebSocketServer.swift in Sources */,
251247
CD7CDBE5256F5D0D002AE46F /* AppDelegate.swift in Sources */,
252248
CD7CDC2825717D2D002AE46F /* CelesteSplitter.swift in Sources */,
@@ -391,6 +387,7 @@
391387
CODE_SIGN_STYLE = Automatic;
392388
COMBINE_HIDPI_IMAGES = YES;
393389
DEVELOPMENT_TEAM = V2EPDFA9PV;
390+
ENABLE_HARDENED_RUNTIME = YES;
394391
INFOPLIST_FILE = SwiftSplit/Info.plist;
395392
LD_RUNPATH_SEARCH_PATHS = (
396393
"$(inherited)",
@@ -415,6 +412,7 @@
415412
CODE_SIGN_STYLE = Automatic;
416413
COMBINE_HIDPI_IMAGES = YES;
417414
DEVELOPMENT_TEAM = V2EPDFA9PV;
415+
ENABLE_HARDENED_RUNTIME = YES;
418416
INFOPLIST_FILE = SwiftSplit/Info.plist;
419417
LD_RUNPATH_SEARCH_PATHS = (
420418
"$(inherited)",

SwiftSplit.xcodeproj/xcshareddata/xcschemes/SwiftSplit.xcscheme

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
buildConfiguration = "Debug"
3535
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3636
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37-
debugAsWhichUser = "root"
3837
launchStyle = "0"
3938
useCustomWorkingDirectory = "NO"
4039
ignoresPersistentStateOnLaunch = "NO"

SwiftSplit/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Cocoa
1010

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

1414
func applicationDidFinishLaunching(_ aNotification: Notification) {

SwiftSplit/SwiftSplit.entitlements

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<dict>
55
<key>com.apple.security.app-sandbox</key>
66
<false/>
7+
<key>com.apple.security.cs.debugger</key>
8+
<true/>
79
<key>com.apple.security.files.user-selected.read-only</key>
810
<false/>
911
</dict>

SwiftSplit/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ class ViewController: NSViewController {
132132
}
133133

134134
do {
135-
self.ignorePid = pid
136135
self.splitter = try CelesteSplitter(pid: pid, server: server)
137136
self.splitter?.routeConfig = routeConfig
138137
connectionStatusLabel.stringValue = "Connected"
138+
self.ignorePid = pid
139139
} catch {
140140
print("Error creating splitter: \(error)")
141141
}

SwiftSplit/main.swift

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)