Programmatically open Mac App Store

I am trying to programmatically open the Mac App Store in a custom Mac App. I started with the link below.

http://itunes.apple.com/us/app/angry-birds/id403961173?mt=12

I tried the following code, however it opens the browser rather than the Mac App Store.

[[NSWorkspace sharedWorkspace] openURL:
 [NSURL URLWithString:@"http://itunes.apple.com/us/app/angry-birds/id403961173?mt=12"]];

Any suggestions on how I can do this?

28
задан David 13 April 2011 в 23:05
поделиться