V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
fidetro
V2EX  ›  macOS

[求助] Mac 开发问题,关于 com.apple.systemevents 权限

  •  
  •   fidetro · 2019-05-13 15:00:07 +08:00 · 3019 次点击
    这是一个创建于 1782 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我写了个 Mac 的 App 做一些 Xcode 自动化的事情,原本很顺利的上架了,后来第二次更新的时候,就因为 com.apple.systemevents 的权限被拒了

    We've determined that one or more temporary entitlement exceptions requested for this app are not appropriate and will not be granted:

    com.apple.systemevents

    We understand this may prevent the app from being approved for the Mac App Store. We encourage you to investigate other ways of implementing the desired functionality.

    我也在网上搜过一些资料,自己不是很确定,Mac App 开发的资料太少了...

    1. 试过通过 AppleScriptObjC 的方式调用,单独获取 Xcode 的权限,以报错“ Application isn ‘ t running ” 无果;
    2. 看到 stackoverflow 上有人说,调用 com.apple.systemevents 是不能上架的(这是真的吗?

    求懂的大佬指教,谢谢

    3 条回复    2019-05-16 17:42:17 +08:00
    fidetro
        1
    fidetro  
    OP
       2019-05-14 15:58:04 +08:00
    我是发错地方了吗...33 个人查看,0 回复
    fidetro
        3
    fidetro  
    OP
       2019-05-16 17:42:17 +08:00
    @nyanyh 我看了一下 AppleScript 的资料,然后才意识到 System Events 似乎算是个 app ?这是意味着只要 AppleScript 调用了这行:

    tell application "System Events"

    都不能上架了吧?

    看了 Script Editor 里的 Library 只操作 Xcode 内的事情能做的事情太少了...基本上能做的就是一些 build configuration 相关的事情
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3400 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 10:39 · PVG 18:39 · LAX 03:39 · JFK 06:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.