Date
Sep. 8th, 2024
 
2024年 8月 6日

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.
反曲点科技创始人和首席执行官。
程序猿、设计师、奇怪的博主。
苹果死忠、热爱色彩斑斓的世界。
如有意向请随时 与我联系