Search code examples
macoscocoasandboxgrowl

Growl 1.3 usage in a sandboxed Cocoa application


How do you communicate with Growl 1.3 in a sandboxed Cocoa application? Is there any example code for this? Growl works fine when the app isn't sandboxed.


Solution

  • if the documentation at growl.info doesn't cover what you need to do let us know. the gist is: you run the script that takes the template growl xpc, renames it to match your application's bundle id domain, copies it into your app bundle and signs it with your code signing identity. you then implement -(BOOL) hasNetworkClientEntitlement in the class in your application that you've specified as your GrowlApplicationBridge delegate to let the growl framework know whether or not your main application claims a network entitlement for itself.

    an example of how to integrate this into your Xcode build process is BeepHammer, you'll want to pay specific attention to the shell script build phase that runs the included ruby script for doing the reidentifying/signing/copying.