From c4e2f9615c137a8214d0ee0aa57abe891c644699 Mon Sep 17 00:00:00 2001 From: relikd Date: Mon, 11 Feb 2019 23:40:03 +0100 Subject: [PATCH] Bugfix: bundle identifier --- baRSS-Helper/main.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/baRSS-Helper/main.m b/baRSS-Helper/main.m index 5de221e..7e77d9f 100644 --- a/baRSS-Helper/main.m +++ b/baRSS-Helper/main.m @@ -25,7 +25,10 @@ int main(int argc, const char * argv[]) { @autoreleasepool { // see: http://martiancraft.com/blog/2015/01/login-items/ - NSArray *arr = [NSRunningApplication runningApplicationsWithBundleIdentifier:@"de.relikd.baRSS"]; + NSURL *mainURL = [NSURL fileURLWithPath:@"../../../../" isDirectory:YES relativeToURL:NSBundle.mainBundle.bundleURL]; + NSString *mainIdent = [[NSBundle bundleWithURL:mainURL] bundleIdentifier]; // de.relikd.baRSS + + NSArray *arr = [NSRunningApplication runningApplicationsWithBundleIdentifier:mainIdent]; if (arr.count == 0) { // if not already running NSArray *pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents]; pathComponents = [pathComponents subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)];