• 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: Opening an http:// URL in the user's default web browser?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening an http:// URL in the user's default web browser?


  • Subject: Re: Opening an http:// URL in the user's default web browser?
  • From: Finlay Dobbie <email@hidden>
  • Date: Mon, 27 Aug 2001 19:50:04 +0100

Have you tried LaunchServices directly? There's nothing wrong with including a whole framework, in fact I think that AppKit might link against Carbon.framework itself.

LSOpenCFURLRef((CFURLRef)[NSURL URLWithString:@"http://www.apple.com";], NULL);

I just tested that and it works. :-)

-- Finlay

On Monday, August 27, 2001, at 07:37 pm, Chris Boot wrote:

I'm trying to open an http:// URL in the user's default web browser. How
would I go about this in Cocoa? I've tried NSWorkspace's openURL: method,
but that doesn't work and complains that LaunchServices gave it an error
(application not found). LaunchServices apparently only opens file:///
URLs, judging by the header. So that leaves me with InternetConfig, which
is part of HIToolbox.framework, in Carbon.framework. I don't want to have
to include that whole framework, so I'm stumped. Is there any way of
opening such a URL in Cocoa?


References: 
 >Opening an http:// URL in the user's default web browser? (From: Chris Boot <email@hidden>)

  • Prev by Date: Re: NSTableView
  • Next by Date: Re: NSTableView
  • Previous by thread: Opening an http:// URL in the user's default web browser?
  • Next by thread: Re: Opening an http:// URL in the user's default web browser?
  • Index(es):
    • Date
    • Thread