Daoxin
Daoxin

Reputation: 41

How do I write entitlements to use NSWorkSpace's showSearchResultsForQueryString in sandboxed app?

I have made one sandboxed app which calls NSWorkspace's showSearchResultsForQueryString but this method doesn't work. I guess this error can be associated with entitlement key, but i could't find answer. How can I implement entitlement key for this?

Upvotes: 0

Views: 378

Answers (2)

Daoxin
Daoxin

Reputation: 41

This method can not be used in sandboxed application. Because this method should be fixed to run within sandboxed application in future.

Upvotes: 0

MattR
MattR

Reputation: 7048

That method won't work for a sandboxed app. It sends an Apple event to the Finder.

Have a look at this link in the sandbox design guide:

Determine Whether Your App Is Suitable for Sandboxing

and you'll see the following text:

With App Sandbox, you can receive Apple events and respond to Apple events, but you cannot send Apple events to arbitrary apps.

Upvotes: 1

Related Questions