Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 反馈问题:Use of undeclared identifier 'SMAppService' #79

Open
3 tasks done
selfboot opened this issue Apr 29, 2023 · 6 comments
Open
3 tasks done

🐞 反馈问题:Use of undeclared identifier 'SMAppService' #79

selfboot opened this issue Apr 29, 2023 · 6 comments
Labels
bug Something isn't working help wanted

Comments

@selfboot
Copy link

请先确认以下事项:

  • 已仔细阅读了 README
  • issues 页面搜索过问题(包括已关闭的 issue),但未能找到解决方法
  • Easydict 已升级到最新版本

问题描述

一些老机型只能升级到 MacOS 11 了,在这些机器编译的时候,会遇到 Use of undeclared identifier 'SMAppService' 错误。

image

看了下在 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)

@selfboot selfboot added the bug Something isn't working label Apr 29, 2023
@github-actions
Copy link

Hello selfboot, Thank you for your first issue contribution 🎉

@selfboot
Copy link
Author

selfboot commented Apr 29, 2023

应该是 xcode 版本(Version 13.2.1 (13C100))太低,我更新下 xcode 试试。
另外,这里可以过滤下 xcode 版本吗?

@tisfeng
Copy link
Owner

tisfeng commented Apr 30, 2023

感谢反馈,这种版本环境问题我还真没遇到过 😂

不过真有办法可以实现按 Xcode 版本过滤吗?我谷歌没有找到,问了下 ChatGPT,虽然没找到机器测试,但总感觉它在胡说八道

image

@tisfeng
Copy link
Owner

tisfeng commented Apr 30, 2023

查了一下苹果文档,似乎可以用这种系统宏来控制编译条件,不过不太确定这种方式能不能解决这个问题,我把代码推到 dev 分支,你可以跑一下吗

https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-1114741-CJADDEIB

#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1300

@selfboot
Copy link
Author

selfboot commented May 1, 2023

感谢反馈,这种版本环境问题我还真没遇到过 😂

不过真有办法可以实现按 Xcode 版本过滤吗?我谷歌没有找到,问了下 ChatGPT,虽然没找到机器测试,但总感觉它在胡说八道

image

我也是问了后告诉我这个,试了不行。不过我直接把这段代码删了就好了

@tisfeng
Copy link
Owner

tisfeng commented May 1, 2023

也行,这段代码有点问题,反正现在没用到,我先注释了吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted
Projects
None yet
Development

No branches or pull requests

2 participants