mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-18 05:22:11 +00:00
Fixed rest of app for non-standard build
This commit is contained in:
parent
f4564655ff
commit
9c4b4ac39e
@ -9,6 +9,7 @@ protocol AgentStatusCheckerProtocol: ObservableObject {
|
|||||||
class AgentStatusChecker: ObservableObject, AgentStatusCheckerProtocol {
|
class AgentStatusChecker: ObservableObject, AgentStatusCheckerProtocol {
|
||||||
|
|
||||||
@Published var running: Bool = false
|
@Published var running: Bool = false
|
||||||
|
let bundleID = Bundle.main.bundleIdentifier?.replacingOccurrences(of: "Host", with: "SecretAgent")
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
check()
|
check()
|
||||||
@ -20,7 +21,7 @@ class AgentStatusChecker: ObservableObject, AgentStatusCheckerProtocol {
|
|||||||
|
|
||||||
// All processes, including ones from older versions, etc
|
// All processes, including ones from older versions, etc
|
||||||
var secretAgentProcesses: [NSRunningApplication] {
|
var secretAgentProcesses: [NSRunningApplication] {
|
||||||
NSRunningApplication.runningApplications(withBundleIdentifier: Constants.secretAgentAppID)
|
NSRunningApplication.runningApplications(withBundleIdentifier: bundleID ?? "com.maxgoedjen.Secretive.SecretAgent")
|
||||||
}
|
}
|
||||||
|
|
||||||
// The process corresponding to this instance of Secretive
|
// The process corresponding to this instance of Secretive
|
||||||
@ -37,10 +38,4 @@ class AgentStatusChecker: ObservableObject, AgentStatusCheckerProtocol {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AgentStatusChecker {
|
|
||||||
|
|
||||||
enum Constants {
|
|
||||||
static let secretAgentAppID = "com.maxgoedjen.Secretive.SecretAgent"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user