• 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
How to ensure one instance running per session?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to ensure one instance running per session?


  • Subject: How to ensure one instance running per session?
  • From: "jerrychang2000" <email@hidden>
  • Date: Thu, 15 Feb 2007 18:38:23 -0800

Hi,

I searched the mailing list and found out that I can set
LSMultipleInstancesProhibited to true in info.plist in order to prohibit my
application running multiple times. Based on the
document(http://developer.apple.com/documentation/MacOSX/Conceptual/BPMultip
leUsers/Concepts/FastUserSwitching.html), it says

"If this key is present and set to true, Launch Services denies attempts to
launch a second instance of your application, in any login session. This key
works both for launching your application across multiple sessions and for
launching a second instance of your application in the same session.".

My application currently only allows one instance running by using the above
approach. However, when I use the fast user switching, the other user will
not be able to launch the application even though they are on different
session because of LSMultipleInstancesProhibited. So now, if I want to
support fast user switching, and have my application running only one
instance for each session, what is the proper way to do it in cocoa? Can
someone please help me out?

Thanks,
Jerry

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: How to ensure one instance running per session?
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Re: NSWindowController versus other NIB Owners
  • Next by Date: Re: NSWindowController versus other NIB Owners
  • Previous by thread: Re: NSWindowController versus other NIB Owners
  • Next by thread: Re: How to ensure one instance running per session?
  • Index(es):
    • Date
    • Thread