This article is based on this blog. I adjust and implement using Swift. The project could be downloaded here.
Development environment:
- OS X: 10.11.4
- XCode: 7.3
- Swift: 2.2
Enable ‘launch at login’ in Mac App Store
Beside works in sandbox mode, to enable ‘launch at login’ in Mac App Store, should mee this requirement:
2.26 Apps that are set to auto-launch or to have other code automatically run at startup or login without user consent will be rejected.
How to deal with it?
Easy, just add a checkbox in Preferences to let user choose auto launch or not. And, make sure, do NOT enable it by default. Otherwise Apple will reject it (I was ever rejected for this reason).



