react-native-barcode-builder icon indicating copy to clipboard operation
react-native-barcode-builder copied to clipboard

Build errors after following instructions

Open rwest88 opened this issue 5 years ago • 2 comments

...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 avatar Sep 16 '19 21:09 rwest88

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

rwest88 avatar Sep 16 '19 22:09 rwest88

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.

maxhungry avatar Oct 01 '19 21:10 maxhungry