Skip to content

Instantly share code, notes, and snippets.

@priore
Last active December 26, 2015 14:09
Show Gist options
  • Save priore/7163691 to your computer and use it in GitHub Desktop.
Save priore/7163691 to your computer and use it in GitHub Desktop.
ReviewEngine simplifies the calling to app internet page for requesting a user review of the app on the app store. To use it simply drop the two files into your code and then add one method call to get it working.
//
// ReviewEngine.h
//
// Created by Danilo Priore on 23/11/11.
// Copyright (c) 2011 Prioregroup.com. All rights reserved.
//
// ReviewEngine simplifies the calling to app internet page for requesting a
// user review of the app on the app store. To use it simply drop the two
// files into your code and then add one method call to get it working.
#define ITMS_APPS @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@"
#import <UIKit/UIKit.h>
#import "ReviewEngine.h"
@interface ReviewEngine : NSObject
+ (void)gotoReviewWithAppID:(NSString*)appID;
@end
@implementation ReviewEngine
+ (void)gotoReviewWithAppID:(NSString*)appID {
// id apple dell'app
NSString *str = [NSString stringWithFormat:ITMS_APPS, appID];
// richiama il browser
NSURL *url = [NSURL URLWithString:str];
[[UIApplication sharedApplication] openURL:url];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment