title: How to create a helper application for Mac App to start it on user login?
body: <p>In fact, I read the following document:</p>
  
  <p><a href="http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html#//apple_ref/doc/uid/10000172i-SW5-SW1" rel="noreferrer"><em>Applications can contain a helper application as a full application bundle, stored inside the main application bundle in the Contents/Library/LoginItems directory. Set either the LSUIElement or LSBackgroundOnly key in the Info.plist file of the helper application’s bundle.</em></a></p>
  
  <p>I don't quite understand it, anyone knows how to do?</p>
  
  <p>and also, what does this mean:</p>
  
  <p><a href="http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html#//apple_ref/doc/uid/10000172i-SW5-SW1" rel="noreferrer"><em>Note: Before calling the SMLoginItemSetEnabled function, first register with Launch Services by calling the LSRegisterURL function with the URL for the helper application bundle.</em></a></p>
  
  <p>is there any example about how to use <strong>LSRegisterURL</strong> and <strong>SMLoginItemSetEnabled</strong>?</p>