Date
Dec. 22nd, 2024
 
2024年 11月 22日

Post: OS X: Launch At Login

OS X: Launch At Login

Published 12:11 Nov 10, 2015.

Created by @ezra. Categorized in #Programming, and tagged as #macOS.

Source format: Markdown

Table of Content

To have the app launch start at login you just need to call SMLoginItemSetEnabled with your bundle ID and bool value.

SMLoginItemSetEnabled ((__bridge CFStringRef)@"com.domain.example", YES) // NO to cancel launch at login

You need ServiceManagement framework to access this API.

This is not a private API so you can use this and submit your apps to App Store.

Pinned Message
HOTODOGO
The Founder and CEO of Infeca Technology.
Developer, Designer, Blogger.
Big fan of Apple, Love of colour.
Feel free to contact me.
反曲点科技创始人和首席执行官。
开发、设计与写作皆为所长。
热爱苹果、钟情色彩。
随时恭候 垂询