Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

added work arround for wrong URL Scheme used in new App store on iOS 6 #56

Merged
merged 1 commit into from

2 participants

Gerhard Bos Arash Payan
Gerhard Bos

Due to changes of the app store app on iOS 6, i've added (temporary ?) work around for App Store reviews.

Appirator links to the app instead of the reviews tab on iOS6. Nothing changed for versions below iOS6.

Arash Payan arashpayan merged commit 96bd885 into from
Arash Payan
Owner

Thanks @Gerharbo.

Gerhard Bos

You're welcome. Thank you for Appirater @arashpayan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 1 deletion.
  1. +15 −1 Appirater.m
16 Appirater.m
View
@@ -47,6 +47,7 @@
NSString *const kAppiraterReminderRequestDate = @"kAppiraterReminderRequestDate";
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";
@interface Appirater ()
- (BOOL)connectedToNetwork;
@@ -325,7 +326,20 @@ + (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]];
+
+ // added work arround for wrong URL Scheme & iOS 6
+ NSString *reviewURL;
+ if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0) {
+ reviewURL = [templateReviewURLiOS6 stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", APPIRATER_APP_ID]];
+
+ reviewURL = [reviewURL stringByReplacingOccurrencesOfString:@"LANGUAGE" withString:[NSString stringWithFormat:@"%@", [[NSLocale preferredLanguages] objectAtIndex:0]]];
+
+ } else {
+ reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", APPIRATER_APP_ID]];
+ }
+
+ [[NSLocale preferredLanguages] objectAtIndex:0]
+
[userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion];
[userDefaults synchronize];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]];
Something went wrong with that request. Please try again.