Skip to content

Commit

Permalink
Suppress warnings about SKStoreReviewController availability
Browse files Browse the repository at this point in the history
  • Loading branch information
arashpayan committed Nov 17, 2017
1 parent ffc6c64 commit de78b75
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Appirater.m
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ - (void)showRatingAlert:(BOOL)displayRateLaterButton {
return;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
if (NSStringFromClass([SKStoreReviewController class]) != nil) {
#pragma clang diagnostic pop
[Appirater rateApp];
} else {
// Otherwise show a custom Alert
Expand Down Expand Up @@ -669,9 +672,12 @@ + (void)rateApp {
[userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion];
[userDefaults synchronize];

//Use the built SKStoreReviewController if available (available from iOS 10.3 upwards)
// Use the built SKStoreReviewController if available (available from iOS 10.3 upwards)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
if (NSStringFromClass([SKStoreReviewController class]) != nil) {
[SKStoreReviewController requestReview];
#pragma clang diagnostic pop
return;
}

Expand Down

0 comments on commit de78b75

Please sign in to comment.