Skip to content
Browse files

Merge pull request #108 from amjaliks/features/appstore

Added option to force Appirater always to open App Store (instead of SKS...
  • Loading branch information...
2 parents c8de953 + 8669605 commit b938e6eeba9854a57807e8e453b51382a9c41320 @arashpayan committed Mar 16, 2013
Showing with 10 additions and 1 deletion.
  1. +5 −0 Appirater.h
  2. +5 −1 Appirater.m
View
5 Appirater.h
@@ -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
View
6 Appirater.m
@@ -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];

0 comments on commit b938e6e

Please sign in to comment.
Something went wrong with that request. Please try again.