0

I am trying to build an app to communicate with embedded devices using Protocol Buffers with protobuf.js

I want to load the content of .proto files at runtime. The files are pulled from a shared repo and I want to have them bundled with the app at build time.

I know I can read files with RNFS from DocumentDirectoryPath, but how do I tell React Native to put them there when building the app? Or is there a better way to do this?

Shamwow
  • 3
  • 1

1 Answers1

0

probably a duplicate of In React Native how do you bundle a text file and read it's value at runtime?.

if you put anything inside android/app/src/main/assets folder it will be in your final .apk file, and you can read it with

RNFS.readFileAssets

Also there are more customized libraries like This one

DNA.h
  • 823
  • 8
  • 17