Skip to content

Commit 92d0823

Browse files
committed
Updates
1 parent 30b5e4b commit 92d0823

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

RuntimeViewerUsingAppKit/RuntimeViewerServer/RuntimeViewerServerLoader.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,24 @@
66
//
77

88
import AppKit
9+
import OSLog
910

1011
internal import RuntimeViewerCore
1112

13+
let logger = Logger(subsystem: "com.JH.RumtimeViewerServer", category: "RumtimeViewerServer")
14+
1215
@objc
1316
public final class RuntimeViewerServerLoader: NSObject {
1417
private static var runtimeEngine: RuntimeEngine?
1518

1619
@objc public static func main() {
17-
NSLog("Attach successfully")
20+
logger.info("Attach successfully")
1821
let name = Bundle.main.infoDictionary?["CFBundleDisplayName"] as? String
1922
Task {
2023
do {
2124
runtimeEngine = try await RuntimeEngine(source: .remote(name: name ?? Bundle.main.name, identifier: .init(rawValue: Bundle.main.bundleIdentifier!), role: .server))
2225
} catch {
23-
NSLog("Failed to create runtime engine: \(error)")
26+
logger.error("Failed to create runtime engine: \(error)")
2427
}
2528
}
2629
}

RuntimeViewerUsingAppKit/RuntimeViewerUsingAppKit/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<key>SMPrivilegedExecutables</key>
2727
<dict>
2828
<key>com.JH.RuntimeViewerService</key>
29-
<string>anchor apple generic and identifier "com.JH.RuntimeViewerService" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = D5Q73692VW)</string>
29+
<string>identifier "com.JH.RuntimeViewerService" and anchor apple generic and certificate leaf[subject.CN] = "Apple Development: JieHui Lai (4ZZALU97YZ)" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */</string>
3030
</dict>
3131
<key>UTImportedTypeDeclarations</key>
3232
<array>

RuntimeViewerUsingAppKit/RuntimeViewerUsingAppKit/Main/MainViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class MainViewModel: ViewModel<MainRoute> {
9191
do {
9292
try await RuntimeHelperClient.shared.install()
9393
} catch {
94+
print(error)
9495
self.errorRelay.accept(error)
9596
}
9697
}

RuntimeViewerUsingAppKit/RuntimeViewerUsingAppKit/Utils/HelperInstaller.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public final class RuntimeHelperClient {
4646
}
4747

4848
public func install() async throws {
49-
guard await !isInstalled() else { throw Error.message("Helper already installed") }
49+
// guard await !isInstalled() else { throw Error.message("Helper already installed") }
5050
func executeAuthorizationFunction(_ authorizationFunction: () -> (OSStatus)) throws {
5151
let osStatus = authorizationFunction()
5252
guard osStatus == errAuthorizationSuccess else {

RuntimeViewerUsingAppKit/com.JH.RuntimeViewerService/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<string>1</string>
1515
<key>SMAuthorizedClients</key>
1616
<array>
17-
<string>anchor apple generic and identifier "com.JH.RuntimeViewer" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = D5Q73692VW)</string>
17+
<string>identifier "com.JH.RuntimeViewer" and anchor apple generic and certificate leaf[subject.CN] = "Apple Development: JieHui Lai (4ZZALU97YZ)" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */</string>
1818
</array>
1919
</dict>
2020
</plist>

0 commit comments

Comments
 (0)