Permalink
Browse files

Updated for 1.12.1 release

  • Loading branch information...
1 parent d805235 commit 3b1f913b043b9d3d5d51d0e2138c7da5397bfdf3 @nicklockwood committed Jun 6, 2017
Showing with 14 additions and 22 deletions.
  1. +4 −0 README.md
  2. +2 −2 iRate.podspec.json
  3. +1 −1 iRate/iRate.h
  4. +7 −19 iRate/iRate.m
View
@@ -339,6 +339,10 @@ The example is for Mac OS, but the same principle can be applied on iOS.
Release Notes
-----------------
+Version 1.12.1
+
+- Fixed problems compiling on older Xcode versions due to SKStoreReviewController
+
Version 1.12
- Added support for SKStoreReviewController on iOS 10.3+ (thanks @EpicDraws!)
View
@@ -1,13 +1,13 @@
{
"name": "iRate",
- "version": "1.12",
+ "version": "1.12.1",
"license": "zlib",
"summary": "A handy class that prompts users of your iPhone or Mac App Store app to rate your application after using it for a while.",
"homepage": "https://github.com/nicklockwood/iRate",
"authors": "Nick Lockwood",
"source": {
"git": "https://github.com/nicklockwood/iRate.git",
- "tag": "1.12"
+ "tag": "1.12.1"
},
"source_files": "iRate/iRate.{h,m}",
"resources": "iRate/iRate.bundle",
View
@@ -1,7 +1,7 @@
//
// iRate.h
//
-// Version 1.12
+// Version 1.12.1
//
// Created by Nick Lockwood on 26/01/2011.
// Copyright 2011 Charcoal Design
View
@@ -1,7 +1,7 @@
//
// iRate.m
//
-// Version 1.12
+// Version 1.12.1
//
// Created by Nick Lockwood on 26/01/2011.
// Copyright 2011 Charcoal Design
@@ -39,8 +39,6 @@
#error This class requires automatic reference counting
#endif
-#define STOREKIT_REVIEW_AVAILABLE ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_10_2)
-
#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak"
#pragma clang diagnostic ignored "-Wobjc-missing-property-synthesis"
#pragma clang diagnostic ignored "-Wdirect-ivar-access"
@@ -212,11 +210,8 @@ - (iRate *)init
self.remindPeriod = 1.0;
self.verboseLogging = NO;
self.previewMode = NO;
-
-#if STOREKIT_REVIEW_AVAILABLE
self.useSKStoreReviewControllerIfAvailable = YES;
-#endif
-
+
#if DEBUG
//enable verbose logging in debug mode
@@ -796,7 +791,7 @@ - (void)checkForConnectivity
dispatch_async(dispatch_get_main_queue(), ^{
//handle errors (ignoring sandbox issues)
- if (error && !(error.code == EPERM && [error.domain isEqualToString:NSPOSIXErrorDomain] && _appStoreID))
+ if (error && !(error.code == EPERM && [error.domain isEqualToString:NSPOSIXErrorDomain] && self.appStoreID))
{
[self connectionError:error];
}
@@ -849,22 +844,15 @@ - (void)promptForRating:(BOOL)manual
#if TARGET_OS_IPHONE
- BOOL storeReviewAvailable = NO;
-
-#if STOREKIT_REVIEW_AVAILABLE
- storeReviewAvailable = self.useSKStoreReviewControllerIfAvailable;
-#endif
-
- if (!manual && storeReviewAvailable)
+#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_10_2
+
+ if (!manual && [SKStoreReviewController class])
{
[self remindLater];
-
-#if STOREKIT_REVIEW_AVAILABLE
[SKStoreReviewController requestReview];
-#endif
-
}
else
+#endif
{
UIViewController *topController = [UIApplication sharedApplication].delegate.window.rootViewController;
while (topController.presentedViewController)

0 comments on commit 3b1f913

Please sign in to comment.