From e65b4e678bd4b258df508e9e2bba983063f495e2 Mon Sep 17 00:00:00 2001 From: Eric Lewis Date: Tue, 4 Jun 2019 12:54:59 -0700 Subject: [PATCH] cherrypick: Fix Xcode 11 build (#25146) Summary: Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style. ## Changelog [iOS] [Fixed] - Xcode 11 beta build Pull Request resolved: https://github.com/facebook/react-native/pull/25146 Differential Revision: D15628404 Pulled By: cpojer fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7 Commit: 46c7ada535f8d87f325ccbd96c24993dd522165d [46c7ada535f] Author: Eric Lewis Date: 4 June 2019 at 20:54:59 BST Commit Date: 4 June 2019 at 20:59:34 BST --- React/Base/RCTModuleMethod.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/React/Base/RCTModuleMethod.mm b/React/Base/RCTModuleMethod.mm index a8361482c4edcd..b213055a245689 100644 --- a/React/Base/RCTModuleMethod.mm +++ b/React/Base/RCTModuleMethod.mm @@ -90,8 +90,9 @@ static BOOL RCTParseSelectorPart(const char **input, NSMutableString *selector) static BOOL RCTParseUnused(const char **input) { - return RCTReadString(input, "__unused") || - RCTReadString(input, "__attribute__((unused))"); + return RCTReadString(input, "__attribute__((unused))") || + RCTReadString(input, "__attribute__((__unused__))") || + RCTReadString(input, "__unused"); } static RCTNullability RCTParseNullability(const char **input)