問題描述
沙盒應用程序中的錯誤,加載 Helper (LoginItems) 時,代碼簽名問題 (Error in Sandboxed App, When loading Helper (LoginItems), code signing issue)
I'm trying to get out of this problem (I hope it's the last!)
Briefly, I have one status bar app, which needs to start at login. I followed this tutorial http://blog.timschroeder.net/2012/07/03/the‑launch‑at‑login‑sandbox‑project/
Everything it's working, but when it's time for testing the app in a real contest, outside xcode, I end up with this message in the console system.log:
appleeventsd[52]: <rdar://problem/11489077> A sandboxed application with pid 1258, "xxxxx" checked in with appleeventsd, but its code signature could not be validated ( either because it was corrupt, or could not be read by appleeventsd ) and so it cannot receive AppleEvents targeted by name, bundle id, or signature. Error=ERROR: #‑67061 { "NSDescription"="SecCodeCheckValidity() returned ‑67061, <SecCode 0x7fb0ea714300 [0x7fff71381e10]>." } (handleMessage()/appleEventsD.cp #2072) client‑reqs‑q
What i did was checking the code signature with this command: spctl ‑‑assess ‑‑type execute AppName
The result was code signature ok for both the Main app, and the Helper app.
As you can see in the tutorial the helper app project is kept inside the main app project. Maybe this is the cause?
I've tried different Signing profiles, now i'm using "Mac Distribuition"
I'm using OsX Mavericks DP6 And Xcode 5 beta ..
Any ideas?
參考解法
方法 1:
For anyone else finding this post, I believe the answer is here: Can't code sign helper app properly
Try running from /Applications and see if you still get the message in the console.
方法 2:
Check the permissions of the application bundle ( and the path to the bundle ) to insure that the appleeventsd and/or securityd daemons can read the executable.
方法 3:
Try to run the helper itself (from Xcode or Finder) to see that everything is fine with that. In my case it did not run, because the appdelegate object was missing from xib.
After I fixed that it run fine and launched my app from the Application folder
(by Benz、Danny Parker、stattenf、Tibidabo)