Skip to content

Commit de78b75

Browse files
committed
Suppress warnings about SKStoreReviewController availability
1 parent ffc6c64 commit de78b75

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Appirater.m

+7-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,10 @@ - (void)showRatingAlert:(BOOL)displayRateLaterButton {
278278
return;
279279
}
280280

281+
#pragma clang diagnostic push
282+
#pragma clang diagnostic ignored "-Wunguarded-availability"
281283
if (NSStringFromClass([SKStoreReviewController class]) != nil) {
284+
#pragma clang diagnostic pop
282285
[Appirater rateApp];
283286
} else {
284287
// Otherwise show a custom Alert
@@ -669,9 +672,12 @@ + (void)rateApp {
669672
[userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion];
670673
[userDefaults synchronize];
671674

672-
//Use the built SKStoreReviewController if available (available from iOS 10.3 upwards)
675+
// Use the built SKStoreReviewController if available (available from iOS 10.3 upwards)
676+
#pragma clang diagnostic push
677+
#pragma clang diagnostic ignored "-Wunguarded-availability"
673678
if (NSStringFromClass([SKStoreReviewController class]) != nil) {
674679
[SKStoreReviewController requestReview];
680+
#pragma clang diagnostic pop
675681
return;
676682
}
677683

0 commit comments

Comments
 (0)