• 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: How to make an app launch on login?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make an app launch on login?


  • Subject: Re: How to make an app launch on login?
  • From: sqwarqDev <email@hidden>
  • Date: Wed, 20 Apr 2016 10:05:57 +0000 (GMT)

| On Apr 20, 2016, at 05:00 PM, sqwarqDev <email@hidden> wrote:
| If your app is sandboxed you'll need to call it via NSUserAppleScriptTask

Correction: NSUserScriptTask

https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSUserScriptTask_Class/index.html#//apple_ref/occ/cl/NSUserScriptTask


Best

Phil
@sqwarq
http://sqwarq.com

On Apr 20, 2016, at 04:48 PM, email@hidden wrote:

I believe the correct answer is LaunchAgent plist, XPC helper LaunchAgent or instruct users to manually add it in system preferences or provide a script they can manually run once.

Sent from my iPhone

On Apr 20, 2016, at 6:01 PM, sqwarqDev <email@hidden> wrote:

If you’re willing (or able: beware sandboxing issues) to call either osascript or NSAppleScript, you can do this via a bit of AppleScript magic:


tell application "Finder" to set aPath to POSIX path of (application file id ”com.yourBundleID.yourApp" as string)

tell application "System Events”
make new login item at end of login items with properties {path:aPath, hidden:false, kind:\"Application\", name:”Your App Name”}
end tell



Best

Phil
@sqwarq
_______________________________________________

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
_______________________________________________

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
_______________________________________________

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


  • Prev by Date: Re: How to make an app launch on login?
  • Next by Date: Re: Proper way to set up constants when building an iOS framework
  • Previous by thread: Re: How to make an app launch on login?
  • Next by thread: No Alert, Discard Change, & Beep
  • Index(es):
    • Date
    • Thread