Re: Finding all paths to copies of app ?

2020-07-16 Thread Gabriel Zachmann via Cocoa-dev

Cool! thanks a lot!
Best regards, Gabriel


> On 16. Jul 2020, at 18:01, Rob Petrovec  wrote:
> 
> You want LSCopyApplicationURLsForBundleIdentifier
> 



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Finding all paths to copies of app ?

2020-07-16 Thread Rob Petrovec via Cocoa-dev
You want LSCopyApplicationURLsForBundleIdentifier

—Rob


> On Jul 16, 2020, at 6:24 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> Is there a way to find the paths/URLs to all app bundles that have the same 
> bundle ID?
> 
> I have a user who likes to make duplicates of my app (it does make sense, to 
> some extent).
> So, in my launcher app, I'd like to to launch all of these copies.
> 
> I have checked the docs on NSWorkspace and the doc for urlForApplication(),
> but AFAICT they will just pick one of the copies.
> 
> On the web I found this solution:
> mdfind "kMDItemCFBundleIdentifier == 'com.domain.coolapp'"
> 
> I was wondering if there is a simpler solution that would not require 
> launching a Process and parsing its output.
> 
> Thanks a lot in advance.
> 
> 
> Best regards, Gabriel
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
> 
> This email sent to petr...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Finding all paths to copies of app ?

2020-07-16 Thread Gabriel Zachmann via Cocoa-dev
Is there a way to find the paths/URLs to all app bundles that have the same 
bundle ID?

I have a user who likes to make duplicates of my app (it does make sense, to 
some extent).
So, in my launcher app, I'd like to to launch all of these copies.

I have checked the docs on NSWorkspace and the doc for urlForApplication(),
but AFAICT they will just pick one of the copies.

On the web I found this solution:
mdfind "kMDItemCFBundleIdentifier == 'com.domain.coolapp'"

I was wondering if there is a simpler solution that would not require launching 
a Process and parsing its output.

Thanks a lot in advance.


Best regards, Gabriel



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com