WordList - new versions available on AppStore now iPhone SDK: NSMutableArray turns into an NSArray
Nov 28

To launch AppStore directly from your application (e.g. when you give the user an option to buy full version in your free app, and/or similar use cases), following code snippet may be used:

NSURL *appStoreURL= [NSURL URLWithString:@“http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293671688&mt=8″];
[[UIApplication sharedApplication] openURL:appStoreURL];

while this code snippet should work fine with an iPhone OS 2.0 device, there is a bug (AFAIK) in iPhone OS 2.1 which prevents it from properly
opening links starting with http://itunes, e.g. if you use the following code

NSURL *appStoreURL = [NSURL URLWithString:@“http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293671688&mt=8″];
[[UIApplication sharedApplication] openURL:appStoreURL];

it would fail and safari would complain that it cannot open the page as too many redirects have occurred. Just replace http://itunes with http://phobos in the url and it should work like a charm.

written by ishaq \\ tags: ,


Leave a Reply