React Native / Xcode Upgrade and now RCTConvert.h not found

前端 未结 10 2508
面向向阳花
面向向阳花 2020-11-28 05:03

App ran fine on React Native 0.35.0. After updating to 0.40.0 via react-native-git-upgrade I get a number of lexical/preprocessor issues when trying to build/ru

相关标签:
10条回答
  • 2020-11-28 05:28

    Changing the path from:

    #import <React/RCTBridgeModule.h>
    

    to:

    #import <React/Base/RCTBridgeModule.h>
    

    worked for me.

    0 讨论(0)
  • 2020-11-28 05:38

    There is a breaking change on 0.40, you can see details here.

    Quoting directly from the release notes:

    This means that all iOS native libraries need a major version bump for RN 0.40. We attempt to minimize changes of this magnitude, and we apologize for any inconvenience caused.

    So, all native iOS libraries will need an update before getting compatible with react-native version 0.40.

    0 讨论(0)
  • 2020-11-28 05:39

    This steps helped solve my issue. I tried "Uncheck parallelize build" steps. It did not work for me.

    1. Open up your project in XCode.
    2. Open up the Libraries folder. You should see React.xcodeproj and several RCT*.xcodeproj.
    3. Drag the React.xcodeproj into each of the other projects.
    4. Click on each project and navigate to the Build Phases tab.
    5. Click on Target Dependencies and add React as a target dependency
    0 讨论(0)
  • 2020-11-28 05:40

    In react-native 0.40


    you have to replace #import "RCTBridgeModule.h" with #import <React/RCTBridgeModule.h>

    then clean and build it again.

    0 讨论(0)
提交回复
热议问题