添加到登录项- sandbox友好解决方案。

时间:2022-08-29 07:32:53

OK, here's my situation :

好的,我的情况是:

  • I'm having several apps (Status bar apps, actually), having to start at login (if user wishes so)
  • 我有几个应用(实际上是状态栏应用),必须从登录开始(如果用户愿意)
  • I've been using Uli Kuster's LoginItem code, which worked flawlessly
  • 我一直在使用Uli Kuster的LoginItem代码,它可以完美地工作
  • As per latest Apple guidelines, all newly-submitted apps HAVE TO be sandboxed.
  • 根据最新的苹果指南,所有新提交的应用程序都必须是沙箱。

The issue :

问题:

  • UKLoginItem and SandBox don't work together. So, I'm looking for an alternative (and acceptable) way to do the very same thing.
  • UKLoginItem和SandBox不能一起工作。因此,我正在寻找一种替代(并且可以接受)的方法来做同样的事情。

Any ideas? Any reference to point me to?

什么好主意吗?有什么可以给我指的吗?

2 个解决方案

#1


6  

You can use an helper tool to start the apps at login.

您可以使用帮助工具在登录时启动应用程序。

An example is here.

这里的一个例子。

#2


1  

Use the Service Management framework. Specifically, SMLoginItemSetEnabled. See Adding Login Items Using the Service Management Framework.

使用服务管理框架。具体来说,SMLoginItemSetEnabled。请参见使用服务管理框架添加登录项。

Note that you must use the Service Management framework. The LaunchServices methods are not available in a sandboxed environment.

请注意,您必须使用服务管理框架。在沙箱环境中不能使用发射服务方法。

#1


6  

You can use an helper tool to start the apps at login.

您可以使用帮助工具在登录时启动应用程序。

An example is here.

这里的一个例子。

#2


1  

Use the Service Management framework. Specifically, SMLoginItemSetEnabled. See Adding Login Items Using the Service Management Framework.

使用服务管理框架。具体来说,SMLoginItemSetEnabled。请参见使用服务管理框架添加登录项。

Note that you must use the Service Management framework. The LaunchServices methods are not available in a sandboxed environment.

请注意,您必须使用服务管理框架。在沙箱环境中不能使用发射服务方法。