Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Rate this app

I have this code in a button click for ratting this app. But nothing happens in the simulator. I want it to be action not a pop up window.

<p>-(IBAction)rateApp:(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]];

}</p>

1 Answer