osx - How can a Cocoa application add itself as a global login item? -
I tried LSSharedFileListRef globalLoginItems = LSSharedFileListCreate (zero, kLSSharedFileListGlobalLoginItems, null); If (Global Log Entities) {LSSharedFileListItemRef ourLoginItem = LSSharedFileListInsertItemURL (GlobalLogin Item, KLS Sheriff List List List, NULL, NULL, (CFRRF) [[NSBundle Main Bundle] Bundle URL], Faucet, Null); If (our Latin Intam) {CFREIEEEEEEEEE (our login image); } Else {NSLog (@ "can not be included as a global login item itself"); } CFEEEEEEEECE (Global Legitim); } Else {NSLog (@ "Could not find global login items"); } LSSharedFileListInsertItemURL () Just returned when I ran and ran the application. Do I need to do something else? Some types of authorization Note:? Use-case here for the global login items, that is using kLSSharedFileListGlobalLoginItems and kLSSharedFileListSessionLoginItems I got this job all I had to do was add these lines before I insert the app into the login item: AuthorizationRef authentication =...