• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Probs with "BetterAuthorizationSample"-code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Probs with "BetterAuthorizationSample"-code


  • Subject: Re: Probs with "BetterAuthorizationSample"-code
  • From: Todd Heberlein <email@hidden>
  • Date: Sat, 03 Oct 2009 20:37:35 -0700

1. How can I debug my HelperTool? Obviously any breakpoints set in XCode won't work because the HelperTool is launched outside by the launchd.
2. My idea is to use asl to debug "barefoot". But for that I have to install aeach time when I have compiled a modified version of the HelperTool to the system. But how to do this? InstallerTool does not do this itself.

I have used asl_log() messages as a substitute for printf(). The messages goes to your Console (the one under /Applications/Utilities) and not to the "Console" in Xcode, so make sure you are looking in the right place for output.


I think printf() will just cause the HelperTool to exit with error.

Every time I modify any code used by my helper tool I run

	$ ./SampleUninstall.sh

I just had to change all the references in the shell script to my application's Identifier. For example, my modified shell script has the lines:

sudo launchctl unload -w /Library/LaunchDaemons/ com.netsq.ACManager.plist
sudo rm /Library/LaunchDaemons/com.netsq.ACManager.plist
sudo rm /Library/PrivilegedHelperTools/com.netsq.ACManager
sudo rm /var/run/com.netsq.ACManager.socket


And the Cocoa app's "Identifier" in the target's property window is:

	com.netsq.${PRODUCT_NAME:rfc1034identifier}

(the Project is called ACManager) so "com.netsq.ACManager" is inserted in all the appropriate places in the script.

If things are really screwed up, you can look in the directories identified in the shell script, remove the appropriate files by hand, and then logout and log back in (if that doesn't solve your launchctl errors you may need to reboot as a crude but effective step).

But once you have your SampleUninstall.sh script set up correctly, running it each time you make code modifications should work.

Todd

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Probs with "BetterAuthorizationSample"-code
      • From: "Frank W. Tag" <email@hidden>
References: 
 >Probs with "BetterAuthorizationSample"-code (From: "Frank W. Tag" <email@hidden>)

  • Prev by Date: list editor (iPhone)
  • Next by Date: Re: Working with an Unsupported Character Encoding (ANSEL)
  • Previous by thread: Probs with "BetterAuthorizationSample"-code
  • Next by thread: Re: Probs with "BetterAuthorizationSample"-code
  • Index(es):
    • Date
    • Thread