priore

ReviewEngine

Mar 28th, 2012
833
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. //  ReviewEngine.h
  3. //
  4. //  Created by Danilo Priore on 23/11/11.
  5. //  Copyright (c) 2011 Prioregroup.com. All rights reserved.
  6. //
  7. // ReviewEngine simplifies the calling to app internet page for requesting a
  8. // user review of the app on the app store. To use it simply drop the two
  9. // files into your code and then add one method call to get it working.
  10.  
  11. #define ITMS_APPS   @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@"
  12.  
  13. #import <UIKit/UIKit.h>
  14. #import "ReviewEngine.h"
  15.  
  16. @interface ReviewEngine : NSObject
  17.  
  18. + (void)gotoReviewWithAppID:(NSString*)appID;
  19.  
  20. @end
  21.  
  22. @implementation ReviewEngine
  23.  
  24. + (void)gotoReviewWithAppID:(NSString*)appID {
  25.  
  26.     // id apple dell'app
  27.     NSString *str = [NSString stringWithFormat:ITMS_APPS, appID];  
  28.     // richiama il browser
  29.     NSURL *url = [NSURL URLWithString:str];
  30.     [[UIApplication sharedApplication] openURL:url];
  31. }
  32.  
  33. @end
Advertisement
Add Comment
Please, Sign In to add comment