• 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: exec(uting) Safari - How (newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exec(uting) Safari - How (newbie)


  • Subject: Re: exec(uting) Safari - How (newbie)
  • From: Andrew Merenbach <email@hidden>
  • Date: Tue, 1 Jul 2008 09:45:38 -0700

On Jul 1, 2008, at 8:15 AM, Barrie Green wrote:

Hi all,

I want to write a quick little cocoa app that fires off Safari.

I started with something like

int main(int argc, char* argv[]) {
 ...
 ...
 if(execv("/Applications/Safari.app", someArgs) == -1) {
   NSLog(@"execv failed with %s", strerror(errno));
 }
}

It always fails with 'Permission denied', OK I kinda expect that. But
how do I fix it?

Would authorization would help? I've looked a the docs a little and it
would appear that I should do a
AuthorizationCreate/AuthorizationCopyRights shuffle but if so what
rights should I use?

Ideally I would like to run the app without it asking me for my
password, how could I achieve that?

TIA

bg


Hi! Is it possible that using this would work?

	NSURL *myURL = [NSURL urlWithString:@"http://www.example.com/";];
	[[NSWorkspace sharedWorkspace] openURL:myURL];

That way, if a user prefers Opera/Firefox/Omniweb/another browser, your site would open in that -- thus confusing them less.

Cheers,
	Andrew

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >exec(uting) Safari - How (newbie) (From: "Barrie Green" <email@hidden>)

  • Prev by Date: Re: Trying to display a static image on my window. Any tips would be great
  • Next by Date: Re: Correct Order for CFRelease-ing CFNetwork Refs?
  • Previous by thread: Re: exec(uting) Safari - How (newbie)
  • Next by thread: Re: exec(uting) Safari - How (newbie)
  • Index(es):
    • Date
    • Thread