BuySellAds.com

Our DNA is written in Objective-C
Jump

Asking Users for a Review

Reviews

Yves Gonzales asked:

“Would you know what the URL scheme is for writing a review in the AppStore, launched from within an app in iPhone, which opens AppStore? (I want to ask users to leave a review.)”

At first I answered that I did not think this was possible. But Yves, with the help of trusty Mr. Google discovered a better answer than mine. There is in fact a possibility to get the mobile App Store app to open on the review page for a specific app.

The solution was documented by Edward Patel on his blog. I replaced the app id with mine and the result is that the app closes and the mobile App Store opens showing the corresponding review page.

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:@"%@308590265", str];
 
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];

At the top of the review page there is button that allows the customer to leave the coveted review.

Yves put this code into his own to automatically present an alert view to the user after several starts of the app to nag kindly ask for a review. Upon launching of the app you would call the reviewCounter method. This gets the number of launches so far and on the third launch it presents such an alert view.

Review Dialog

Here’s the code for that, courtesy of Yves. I cleaned it up a bit and removed NSLogs.

- (void) reviewCounter
{
	CGFloat reviewInt = [[NSUserDefaults standardUserDefaults] integerForKey: @"intValueKey"];
 
 
	if (reviewInt)
	{
		reviewInt++;
		[[NSUserDefaults standardUserDefaults] setInteger:reviewInt forKey:@"intValueKey"];
	}
	else
	{
		CGFloat start = 1;
		NSUserDefaults *reviewPrefs = [NSUserDefaults standardUserDefaults];
		[reviewPrefs setInteger:start forKey: @"intValueKey"];
		[reviewPrefs synchronize]; // writes modifications to disk
	}
 
 
	if (reviewInt == 3)
	{
		UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Mabuhay!" message:@"Looks like you Enjoy using this app. Could you spare a moment of your time to review it in the AppStore?"
													   delegate:self cancelButtonTitle:nil otherButtonTitles: @"OK, I'll Review It Now", @"Remind Me Later", @"Don't Remind Me", nil];
		[alert show];
		[alert release];
 
		reviewInt++;
 
		[[NSUserDefaults standardUserDefaults] setInteger:reviewInt forKey:@"intValueKey"];
	}
}
 
 
#pragma mark alert view delegate
 
- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
	// the user clicked one of the OK/Cancel buttons
	if (buttonIndex == 0)
	{
 
		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:@"%@308590265", str];
 
		[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
 
	}
	else if (buttonIndex == 1)
	{
		int startAgain = 0;
		[[NSUserDefaults standardUserDefaults] setInteger:startAgain forKey:@"intValueKey"];
 
	}
	else if (buttonIndex == 2)
	{
		int neverRemind = 4;
		[[NSUserDefaults standardUserDefaults] setInteger:neverRemind forKey:@"intValueKey"];
	}
}

The theory behind this approach is that users would generally forget to leave a review because it is not part of the regular flow of things from finding the app, purchasing and trying it out.

Do you think this will get more people to comment favorably on your app if you ask them for it? Will more reviews mean more sales? Comment below.


Categories: Q&A

%d bloggers like this: