Re: Finding other apps' paths - deterministically!
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=VwqOH3Fi7OBkqgNjIwd4ecirPgGzfOyjuqYjuJCktKg=; b=fBf0nwEwgK5tAso+x+966p3Txrh5V+fd5yqgEpBlkAcQ6ET561JQYfnFb45EtAQ+vR xfZVpAcsjgo14p/PQZ8MhtaKmWjtKqUkCL2qqw4mQa4ZdGv4Y03zxqSfY0sZWPFtL+RB HrFl50jd5aykqi8Scclyrpb2MUS6aBMin1PQM= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=UuK9kYR9gprIbngu73hMfbgW1pXX1b7XOpU2akHqWXtof0+1yqKrE3Yt6sBFXdRe6n 6qJG2jvqM3HQmAinezy/zg4dBXFXP7lmlYtujbDYB7EsJFsoHuFQM48IpGfXkZBR1Y84 kg72XVk8Yh9oJbe3pZA5HICPQW1sVC53n+oWA= On Tue, Sep 30, 2008 at 1:00 PM, Jerry Krinock <jerry@ieee.org> wrote:
Michael Ash wrote:
For the original problem, I'd recommend using something like LSCopyApplicationURLsForURL() if it's at all possible.
Good idea but I'm looking for a helper app which is not registered to open any URLs. Also, I don't see any indication that LSCopyApplicationURLsForURL() would return multiple installations of the same app.
Note that if you give it a file URL, it will look up the application based on extension, UTI, HFS file type, etc. and not just the URL scheme. So your helper doesn't need to be registered to open URLs, just documents. Of course if it isn't registered to open documents then this doesn't work so great. As for multiple installations, I don't see any evidence that it *wouldn't* return multiple installations, and it's a fair assumption that it would based on the probability that the Finder uses this API for things like the Open With... menu. It's a moot point if the helper can't open documents, but if it does then it would bear testing.
If you must search the disk, use Spotlight if you can. ... The downside is that it won't work if indexing is disabled or if the desired application is in an excluded directory.
Also, it seems to not find helper applications which are inside other applications' packages.
Craptacular! Anyway, I'm glad you found an acceptable solution in the end. Mike _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com
participants (1)
-
Michael Ash