Bugfix: bundle identifier
This commit is contained in:
@@ -25,7 +25,10 @@
|
|||||||
int main(int argc, const char * argv[]) {
|
int main(int argc, const char * argv[]) {
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
// see: http://martiancraft.com/blog/2015/01/login-items/
|
// see: http://martiancraft.com/blog/2015/01/login-items/
|
||||||
NSArray<NSRunningApplication*> *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<NSRunningApplication*> *arr = [NSRunningApplication runningApplicationsWithBundleIdentifier:mainIdent];
|
||||||
if (arr.count == 0) { // if not already running
|
if (arr.count == 0) { // if not already running
|
||||||
NSArray *pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents];
|
NSArray *pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents];
|
||||||
pathComponents = [pathComponents subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)];
|
pathComponents = [pathComponents subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)];
|
||||||
|
|||||||
Reference in New Issue
Block a user