LoginServiceKit

CI Release version License: Apache-2.0 Carthage compatible SPM supported

轻松管理 macOS 登录项。不支持沙盒应用。

用法

CocoaPods

pod 'LoginServiceKit', :git => 'https://github.com/Clipy/LoginServiceKit'

Carthage

github "Clipy/LoginServiceKit"

示例

检查登录项是否存在

let isExistLoginItem = LoginServiceKit.isExistLoginItems() // default Bundle.main.bundlePath

let isExistLoginItem = LoginServiceKit.isExistLoginItems(at: Bundle.main.bundlePath)

添加登录项

LoginServiceKit.addLoginItems() // default Bundle.main.bundlePath

LoginServiceKit.addLoginItems(at: Bundle.main.bundlePath)

移除登录项

LoginServiceKit.removeLoginItems() // default Bundle.main.bundlePath

LoginServiceKit.removeLoginItems(at: Bundle.main.bundlePath)

关于已弃用的 API

LoginServiceKit 使用了一个自 macOS 10.11 El Capitan 版本起已被弃用的 API。 然而,目前没有符合当前规范的 API 迁移替代方案。 因此,当所使用的 API 停止维护时,此库也将停止维护。

查看此 issue 了解更多详情。