Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors after following instructions #45

Open
rwest88 opened this issue Sep 16, 2019 · 2 comments
Open

Build errors after following instructions #45

rwest88 opened this issue Sep 16, 2019 · 2 comments

Comments

@rwest88
Copy link

rwest88 commented Sep 16, 2019

...assuming I'm following them correctly. (using react-native 0.60.0)

A) As soon as I:

  1. open ./ios/app.xcodeproj with Xcode,
  2. copy ART.xcodeproj from node_modules/react-native/Libraries/ART/ into Xcode's app/Libraries
  3. select app under TARGETS, tab over to Build Phases > expand Link Binary With Libraries add (+) libART.a

I get a build error when I run react-native run-ios. (See below)

other steps taken:

B) When I then:

  1. run npm install react-native-barcode-builder --save

C) When I then use any order/combination of

  1. react-native link
  2. cd ios && pod install

I get the same build errors every step of the way:

`In file included from ./node_modules/react-native/Libraries/ART/ViewManagers/ARTSurfaceViewManager.m:8:

./node_modules/react-native/Libraries/ART/ViewManagers/ARTSurfaceViewManager.h:8:9: fatal error: 'React/RCTViewManager.h' file not found
#import <React/RCTViewManager.h>`

I'm not sure where to begin with this. Any help would be greatly appreciated!!

@rwest88
Copy link
Author

rwest88 commented Sep 16, 2019

Solved it. Will be nice and post the solution. I had a feeling using Cocoapods would call for a different installation process, and this fix was the second thing I tried, but unfortunately I didn't realize I was doing it on top of an already busted configuration. So after a lot of messing around with Xcode, I finally went back to this very simple solution.

  1. Put this in your podfile.
    pod 'React-ART', :path => '../node_modules/react-native/Libraries/ART'

If using React Native <0.59, add to subspecs of 'React' pod:
pod 'React', path: '../node_modules/react-native', subspecs: ['ART']

  1. In ios/, pod install.

Then, run npm install react-native-barcode-builder --save

@maxhungry
Copy link

Hi friends ART is moving away from react native core follow install instructions here: https://github.com/react-native-community/art. You should be able to just yarn add @react-native-community/art and pod install afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants