react-native-barcode-builder
react-native-barcode-builder copied to clipboard
Build errors after following instructions
...assuming I'm following them correctly. (using react-native 0.60.0)
A) As soon as I:
- open
./ios/app.xcodeproj
with Xcode, - copy
ART.xcodeproj
fromnode_modules/react-native/Libraries/ART/
into Xcode'sapp/Libraries
- select
app
underTARGETS
, 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:
- run
npm install react-native-barcode-builder --save
C) When I then use any order/combination of
-
react-native link
-
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!!
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.
- 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']
- In
ios/
,pod install
.
Then, run npm install react-native-barcode-builder --save
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.