Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added option to force Appirater always to open App Store (instead of …

…SKStoreProductViewController in iOS 6)

Sometime you don't want use SKStoreProductViewController, e.g., due autorotation issues.
  • Loading branch information...
commit 8669605308095d55db1e05e3feccb57e214d0116 1 parent c8de953
Aleksejs Mjaliks amjaliks authored
Showing with 10 additions and 1 deletion.
  1. +5 −0 Appirater.h
  2. +5 −1 Appirater.m
5 Appirater.h
View
@@ -224,6 +224,11 @@ extern NSString *const kAppiraterReminderRequestDate;
*/
+ (void)setUsesAnimation:(BOOL)animation;
+/*
+ If set to YES, Appirater will open App Store link (instead of SKStoreProductViewController on iOS 6). Default NO.
+ */
++ (void)setOpenInAppStore:(BOOL)openInAppStore;
+
@end
6 Appirater.m
View
@@ -60,6 +60,7 @@
static BOOL _debug = NO;
static id<AppiraterDelegate> _delegate;
static BOOL _usesAnimation = TRUE;
+static BOOL _openInAppStore = NO;
static UIStatusBarStyle _statusBarStyle;
static BOOL _modalOpen = false;
@@ -105,6 +106,9 @@ + (void)setDelegate:(id<AppiraterDelegate>)delegate{
+ (void)setUsesAnimation:(BOOL)animation {
_usesAnimation = animation;
}
++ (void)setOpenInAppStore:(BOOL)openInAppStore {
+ _openInAppStore = openInAppStore;
+}
+ (void)setStatusBarStyle:(UIStatusBarStyle)style {
_statusBarStyle = style;
}
@@ -420,7 +424,7 @@ + (void)rateApp {
[userDefaults synchronize];
//Use the in-app StoreKit view if available (iOS 6) and imported. This works in the simulator.
- if (NSStringFromClass([SKStoreProductViewController class]) != nil) {
+ if (!_openInAppStore && NSStringFromClass([SKStoreProductViewController class]) != nil) {
SKStoreProductViewController *storeViewController = [[SKStoreProductViewController alloc] init];
NSNumber *appId = [NSNumber numberWithInteger:_appId.integerValue];
Please sign in to comment.
Something went wrong with that request. Please try again.