react-native: XCode 11 Beta App Launch Crash
React Native version: “react”: “16.8.3”, “react-native”: “0.59.8”
No other dependency added.
Steps To Reproduce
- Create a fresh project with react-native init ProjectName
- Open iOS project in XCode 11 beta & run your project.
- npm start
- App crash with -
Unknown argument type ‘attribute’ in method -[RCTAppState getCurrentAppState:error:]. Extend RCTConvert to support this type.
Error Log from XCode -
Exception ‘*** -[__NSArrayM objectAtIndexedSubscript:]: index 1 beyond bounds [0 … 0]’ was thrown while invoking getCurrentAppState on target AppState with params ( 2, 3 )
Describe what you expected to happen: App should not get crash.
Snack, code example, or link to a repository:
Adding a screenshot for more clarification below.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 69
- Comments: 25 (1 by maintainers)
Commits related to this issue
- Fix xcode 11 hard crash see: https://github.com/facebook/react-native/issues/25154#issuecomment-534024991 Signed-off-by: Evan J Brunner <ej3@appitto.me> — committed to appittome/react-native by ej3 5 years ago
- [iOS] fix crash upon launched after upgrade to Xcode 11 https://github.com/facebook/react-native/issues/25154 — committed to JiboStore/nodemodules_rnoo_osx by HakimHauston 5 years ago
- [example] update react-native to 0.59.9 - https://github.com/facebook/react-native/issues/25154#issuecomment-534024827 — committed to iamport/iamport-react-native by SoleeChoi 4 years ago
- [iOS] Use RN 0.59.9 in example to resolve Xcode 11 errors. https://github.com/facebook/react-native/issues/25154#issuecomment-534024827 — committed to doublesymmetry/react-native-track-player by curiousdustin 4 years ago
in your project directory, open file in myproject/node_modules/react-native/React/Base/RCTModuleMethod.mm. Then correct as below: https://github.com/facebook/react-native/pull/25146/files#diff-263fc157dfce55895cdc16495b55d190
I solved the issue by upgrading react-native to 0.59.9 version.
react-native upgrade 0.59.9, yarn , yarn pods seemed to do the trick for me
open file in yourproject /node_modules/react-native/React/Base/RCTModuleMethod.mm. Then correct as quote below:
link here
Hello … I am running RN version 0.57.0 … recently updated xcode to version 11.0 … and I am facing this issue … how can I resolve this ? Don’t want to upgrade to RN 0.60.x …
resolved using this method https://github.com/facebook/react-native/pull/25146#issuecomment-533995604
0.59.9 has solved this.
If for some reason you can’t upgrade right now, do this as suggested by @saudahmed
0.59.9 has solved this.
THaNkS
please try this solution … https://github.com/facebook/react-native/pull/25146#issuecomment-533995604
thanks, is working 😃
i have same problem