React Native — Unknown argument type ‘attribute’ in method -[RCTAppState getCurrentAppState:error:]. Extend RCTConvert to support this type.

Ignasius
Ignasius
Sep 24, 2019 · 1 min read

Today, i updated my Xcode to version 11.0 to support iOS 13, suddenly my iOS App crashed.

My RN version is
“react”: “16.8.3”,
“react-native”: “0.59.5”

The solution is updating react-native into version 0.59.9 , or by modify this file [project_folder]/node_modules/react-native/React/Base/RCTModuleMethod.mm

search for about line 91, or looking for this
static BOOL RCTParseUnused(const char **input)

after this line
return RCTReadString(input, “__attribute__((unused))”) ||

add

RCTReadString(input, “__attribute__((__unused__))”) ||

then your project will working properly again.

References:
https://github.com/facebook/react-native/pull/25146/files

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade