• 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 test whether Mac app is running in Xcode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How test whether Mac app is running in Xcode?


  • Subject: Re: How test whether Mac app is running in Xcode?
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 15 Oct 2013 09:50:52 -0700

On Oct 15, 2013, at 9:10 AM, Bill Cheeseman <email@hidden> wrote:

> I can't talk about the "why?" part of my question in public because it's an issue unique to Mavericks. Let me just say that a certain common category of applications is going to want to know how to do this in Mavericks, for good and sufficient reason.

OK … sounds like you should take the question to Apple’s developer forums, then, where you can talk about 10.9.

> What I find interesting is that NSWorkspace's -frontmostApplication and -menuBarOwningApplication and NSRunningApplication's currentApplication return different results in different circumstances.  … My guess is that the fact that one of them returns Xcode at launch is a bug that nobody has noticed, and I therefore shouldn't rely on it anyway

I agree, it’s almost certainly a bug.

> So I need a reliable way to find out. I know there is a way

There’s definitely a way. As an existence proof, the first thing I thought of when you asked is the infamous behavior of iTunes — if you attach a debugger to iTunes and then try to play any DRM-protected content, iTunes will intentionally crash. It’s a way to deter people from either extracting the decoded media data, or reverse-engineering the DRM. (Probably not a very foolproof way...)

—Jens

_______________________________________________

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: How test whether Mac app is running in Xcode?
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >How test whether Mac app is running in Xcode? (From: Bill Cheeseman <email@hidden>)
 >Re: How test whether Mac app is running in Xcode? (From: Jens Alfke <email@hidden>)
 >Re: How test whether Mac app is running in Xcode? (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: How test whether Mac app is running in Xcode?
  • Next by Date: Re: NSTreeController: how do I select a model object?
  • Previous by thread: Re: How test whether Mac app is running in Xcode?
  • Next by thread: Re: How test whether Mac app is running in Xcode?
  • Index(es):
    • Date
    • Thread