🐞 反馈问题:Use of undeclared identifier 'SMAppService'
selfboot opened this issue · 6 comments
selfboot commented
请先确认以下事项:
问题描述
一些老机型只能升级到 MacOS 11 了,在这些机器编译的时候,会遇到 Use of undeclared identifier 'SMAppService'
错误。
看了下在 mac os 13才支持
In macOS 13 and later, use SMAppService to register and control LoginItems, LaunchAgents, and LaunchDaemons as helper executables for your app. When converting code from earlier versions of macOS, use an SMAppService object and select one of the following methods depending on the type of service your helper executable provides
重现步骤
mac os 11 编译
期望结果
能够支持更多的mac版本
解决方案(可选)
No response
设备信息 && 操作系统版本(可选)
11.7.6 (20G1231)
github-actions commented
Hello selfboot, Thank you for your first issue contribution 🎉
selfboot commented
应该是 xcode 版本(Version 13.2.1 (13C100))太低,我更新下 xcode 试试。
另外,这里可以过滤下 xcode 版本吗?
tisfeng commented
selfboot commented
tisfeng commented
也行,这段代码有点问题,反正现在没用到,我先注释了吧。