cocoaapp-storeappstore-approvalautostartfilesystem-access

Rejected app-update on Mac App Store (accessing loginwindow.plist)


I'm having trouble with a Mac App Store submission. I'm using the method below to add my App to the login items if the user toggles the checkbox in the preferences.

-(void) addAppAsLoginItem{
    NSString * appPath = [[NSBundle mainBundle] bundlePath];

    CFURLRef url = (CFURLRef)[NSURL fileURLWithPath:appPath]; 

    LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
    if (loginItems) {
        //Insert an item to the list.
        LSSharedFileListItemRef item = LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemLast, NULL, NULL, url, NULL, NULL);
        if (item){
            CFRelease(item);
        }
    }   

    CFRelease(loginItems);

}

I‘ve already submitted many updates successfully without any problems, but now my App got rejected, rejected because I'm accessing the file system:

2.30

The application accesses the following location:

'~/Library/Preferences/loginwindow.plist'

This file is used to set an application to launch at login. It should not be modified until the user has enabled such an option within the application. This option should not be enabled by default; the user must take the action of enabling it.

So now I'm confused, because this method was there since the first release and was never a problem. The file is only read or modified when the user toggles the corresponding checkbox in the preferences.

So how should I add my App to the startup login items without getting rejected again?


Solution

  • I submitted the app again and it got approved within 5 hours. I didn't receive any response from the App Store team to my support request though…