Commit 4198197b authored by Alexandre Lision's avatar Alexandre Lision

preference: enable auto startup by default

Ring is registered in startup items when the wizard creates the RING account

Refs #73111

Change-Id: I1fa3ec065e8fcdfd9e1edbe9bdf6457a7f592c14
parent 66643433
......@@ -102,6 +102,19 @@
[self setCallback];
[self performSelector:@selector(saveAccount) withObject:nil afterDelay:1];
[self registerAutoStartup];
* Enable launch at startup by default
- (void) registerAutoStartup
LSSharedFileListRef loginItemsRef = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
if (loginItemsRef == nil) return;
CFURLRef appUrl = (CFURLRef)[NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];
LSSharedFileListItemRef itemRef = LSSharedFileListInsertItemURL(loginItemsRef, kLSSharedFileListItemLast, NULL, NULL, appUrl, NULL, NULL);
if (itemRef) CFRelease(itemRef);
- (void) saveAccount
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment