Skip to content

Commit

Permalink
Merge pull request #67 from funkadelic/master
Browse files Browse the repository at this point in the history
Revert to old itms-apps URL for iOS 6
  • Loading branch information
arashpayan committed Sep 21, 2012
2 parents 09c8ea8 + ffa71d5 commit f314885
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Appirater.m
Expand Up @@ -47,7 +47,6 @@
NSString *const kAppiraterReminderRequestDate = @"kAppiraterReminderRequestDate"; NSString *const kAppiraterReminderRequestDate = @"kAppiraterReminderRequestDate";


NSString *templateReviewURL = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=APP_ID"; NSString *templateReviewURL = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=APP_ID";
NSString *templateReviewURLiOS6 = @"itms-apps://itunes.apple.com/LANGUAGE/app/idAPP_ID";


static NSString *_appId; static NSString *_appId;
static double _daysUntilPrompt = 30; static double _daysUntilPrompt = 30;
Expand Down Expand Up @@ -359,16 +358,8 @@ + (void)rateApp {
#else #else
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];


// added work arround for wrong URL Scheme used in new App store on iOS 6 // this URL Scheme should work in the iOS 6 App Store in addition to older stores
NSString *reviewURL; NSString *reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%@", _appId]];
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0) {
reviewURL = [templateReviewURLiOS6 stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%@", _appId]];

reviewURL = [reviewURL stringByReplacingOccurrencesOfString:@"LANGUAGE" withString:[NSString stringWithFormat:@"%@", [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode]]];

} else {
reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%@", _appId]];
}


[userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion]; [userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion];
[userDefaults synchronize]; [userDefaults synchronize];
Expand Down

0 comments on commit f314885

Please sign in to comment.