简体   繁体   中英

Is it possible to relaunch an app when sandbox deployed?

all,

I am having a need to relaunch my app. Googled and got two suggestions:
1. https://gist.github.com/2204627
got the lsboxd message directly.

2. http://13bold.com/tutorials/relaunching-your-application/
got LSOpenFromURLSpec() returned -10827 ... message

both of them are related to Sandbox.

I want to know, is there any way to relaunch my app with sandbox deployed? Thanks!

A sandboxed application can launch a new copy of itself using NSWorkspace 's launchAppWithBundleIdentifier: ; pass in options NSWorkspaceLaunchAsync , NSWorkspaceLaunchNewInstance to asynchronously create a new process running your app and after the call returns terminate the current process (or make the call as part of responding to a NSApplicationWillTerminateNotification ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM