From eef80d137afc5b58c402d0181fe176c34bfd8dd2 Mon Sep 17 00:00:00 2001 From: Frank Schmitt Date: Fri, 1 Jul 2011 12:10:51 -0700 Subject: [PATCH] Changed #define APPIRATER_APP_ID to static NSString This means that you can replace the definition with a snippet of code (say, pulling it from a configuration file for different targets). The previous code only worked with a bare integer. --- Appirater.h | 2 +- Appirater.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Appirater.h b/Appirater.h index 67f0a6bc..6a50af37 100644 --- a/Appirater.h +++ b/Appirater.h @@ -46,7 +46,7 @@ extern NSString *const kAppiraterDeclinedToRate; /* Place your Apple generated software id here. */ -#define APPIRATER_APP_ID 301377083 +#define APPIRATER_APP_ID @"301377083" /* Your app's name. diff --git a/Appirater.m b/Appirater.m index 0d2bb62d..a7f3a39d 100644 --- a/Appirater.m +++ b/Appirater.m @@ -339,7 +339,7 @@ + (void)rateApp { NSLog(@"APPIRATER NOTE: iTunes App Store is not supported on the iOS simulator. Unable to open App Store page."); #else NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; - NSString *reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", APPIRATER_APP_ID]]; + NSString *reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:APPIRATER_APP_ID]; [userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion]; [userDefaults synchronize]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]];