Reputation: 1245
I have this code in a button click for ratting this app
-(IBAction)_clickbtnratethisApp:(id)sender
{
NSString *str = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa";
str = [NSString stringWithFormat:@"%@/wa/viewContentsUserReviews?", str];
str = [NSString stringWithFormat:@"%@type=Purple+Software&id=", str];
// Here is the app id from itunesconnect
str = [NSString stringWithFormat:@"%@289382458", str];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
but nothing happens when I click the button,my need is I want to set a alert view to show like the ordinary alert like ratethisapp,nothanks,later.If I tap the ratethisapp I will redirected to the ring page of appstore.How to active this?Thanks in advance.
Upvotes: 0
Views: 603
Reputation: 41005
The itms-apps: URL syntax doesn't work on the simulator but works fine on the device, so that's probably the only thing wrong with your code and if you try it on a device it will work fine.
Unrelated tip: You can concatenate strings using the stringByAppendingString: and stringByAppendingFormat: methods, that will save some code versus the way you are building your string currently.
Upvotes: 5