Skip to content

Commit 0d822e1

Browse files
committed
chore(ios): suppress unreachable code compile warning
we check for iOS < 10 in order to specifically emit a warning that it is not supported, naturally in the test app (which is iOS 11) this generates a warning for unreachable code
1 parent 0510690 commit 0d822e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ - (NSDictionary *)constantsToExport {
257257
resolve(@([RCTConvert BOOL:@(YES)]));
258258
return;
259259
#endif
260+
#pragma clang diagnostic push
261+
#pragma clang diagnostic ignored "-Wunreachable-code"
260262
if (@available(iOS 10.0, *)) {
263+
#pragma pop
261264
if ([UIApplication sharedApplication].isRegisteredForRemoteNotifications == YES) {
262265
resolve(@([RCTConvert BOOL:@(YES)]));
263266
return;

0 commit comments

Comments
 (0)