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

🐞 反馈问题:macOS 15 beta 1 出现重复请求权限的问题 #587

Open
5 of 6 tasks
iskerwin opened this issue Jun 13, 2024 · 14 comments
Open
5 of 6 tasks
Assignees
Labels
bug Something isn't working priority

Comments

@iskerwin
Copy link

请先确认以下事项:

  • 请务必查看 常见问题
  • 已仔细阅读了 README
  • issues 页面搜索过问题(包括已关闭的 issue),但未能找到解决方法
  • Easydict 已升级到 最新版本
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述

在 macOS 15 beta 1 中,出现重复请求权限的问题

该问题是否可以稳定重现?

可重现

重现步骤

重启电脑,使用截图翻译就会出现

截图

2024-06-13 16 31 18

期望结果

是不是因为 macOS 15 更新了隐私设置的原因

解决方案(可选)

No response

设备型号 && 系统版本

Apple M1,macOS 15 beta 1

是否愿意提交 PR 解决该问题?

  • 我愿意提交 PR
@iskerwin iskerwin added the bug Something isn't working label Jun 13, 2024
Copy link

Hello iskerwin, Thank you for your first issue contribution 🎉

@tisfeng tisfeng changed the title 🐞 反馈问题:请填写标题,不要留空 🐞 反馈问题:macOS 15 beta 1 出现重复请求权限的问题 Jun 13, 2024
@tisfeng
Copy link
Owner

tisfeng commented Jun 13, 2024

我还没升级 macOS 15,不知道啥情况,可能是苹果又加强了对隐私权限 API 的管理,得适配新的 API,稍后我查一下。

我要过段时间才能升级系统,如果你们有谁升级了,可以先看看这个问题。

@Jerry23011
Copy link
Collaborator

Jerry23011 commented Jun 14, 2024

正好用虚拟机跑了下 beta 1,Zoom 也会出现同样的问题,我觉得可能是 macOS 的 bug,最新的 Privacy session 里也貌似没提到 Screen Recording 权限

https://developer.apple.com/videos/play/wwdc2024/10123/

SCR-20240615-dvig SCR-20240615-dxei

@tisfeng
Copy link
Owner

tisfeng commented Jun 15, 2024

看了一下介绍,新版本是没有提到录屏权限变化。。

不确定是不是之前使用的请求截图权限 API 有问题,我参考这里 how-to-trigger-screen-recording-permission-system-modal-dialog-on-macos-catalina ,使用 CGRequestScreenCaptureAccess 替换了废弃的方法 CGDisplayStreamCreate

我这边测试没有问题, @Jerry23011 你在 macOS 15 beta 1 跑一下看看 #591

@Jerry23011
Copy link
Collaborator

我这边测试没有问题, @Jerry23011 你在 macOS 15 beta 1 跑一下看看。

15 上还是每次重启 macOS 并启动截图功能就会弹

我觉得可以通过反馈助理向Apple反馈一下 @iskerwin
https://developer.apple.com/cn/bug-reporting/

@tisfeng
Copy link
Owner

tisfeng commented Jun 16, 2024

@Jerry23011 请帮忙测试一下其他用到【录屏与系统录音】权限的应用在 macOS 15 beta 1 上的运行情况,尤其是开源软件 alt-tab-macosIce

如果它们运行良好,稍后我们可以参考它们的代码。

image

@Jerry23011
Copy link
Collaborator

AltTab 也有这个问题,但是 Ice 和 QuickRecorder 都没有

@tisfeng
Copy link
Owner

tisfeng commented Jun 16, 2024

奇怪,我看 Ice 似乎也是用的 CGRequestScreenCaptureAccess() 请求权限,和我们这次修改后的一样 #591 🤔

@tisfeng
Copy link
Owner

tisfeng commented Jun 16, 2024

我看了一下,QuickRecorder 使用的是 ScreenCaptureKit 请求权限,似乎也行,不知道它们到底有什么区别 😑

@Jerry23011 你试一下这个代码 #592

@Jerry23011
Copy link
Collaborator

就算用 ScreenCaptureKit 还是有 popup,可能不是 API 的问题,我稍后看下 QuickRecorder 的其他内容

@Jerry23011
Copy link
Collaborator

很奇怪,我看了 Ice 和 QuickRecorder 的 entitlements,也并没有 specify 什么相关的内容,而且也都没有加 .xcprivacy

@tisfeng
Copy link
Owner

tisfeng commented Jun 17, 2024

是挺奇怪的, @Jerry23011 后续你来跟进一下这个问题吧。

@itdida
Copy link

itdida commented Jun 25, 2024

我也遇到这个问题

  1. 升级 sequoia之后就出现
  2. 使用截图之类的功能就会出现
  3. 重启系统,第一次使用截图之类的功能必现
  4. 后面一段时间就不会出这个提示,但是过一段时间又会出来这个提示
  5. xnip(一个截图软件)也一样的情况

@Jerry23011
Copy link
Collaborator

@itdida 还遇到过什么需要录屏权限但是没有出现这个问题的 app 吗?

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

No branches or pull requests

4 participants