Building a static library using react native

(Russ Fellman) #1

I am working componentizing(?) application features to be used in other applications across our organization. I think react native and codepush could be a great fit. Does anyone have any experience creating viewcontrollers in react native - and making a static library out of them for use in native iOS and Android applications? Is this even possible to run on a non-react native app, linked to a react-native static library?


(Neil Harlow) #2

@rjfellman Have you had any luck determining if this is possible?

(Derek) #3

This is totally possible. But the downside is that the target App will still need to use React Native libraries available, even though it’s a non react native app. Since RN is interpreted it needs that set of interpretation libraries.

If this is something your still interested let me know, and I can tell you how we’ve accomplished this at PayPal.

(Yashwanthreddy) #4

I am trying to achieve the same can you please tell how you have accomplished.

(Suchithc) #5

@DmikeyAnderson we would like to know whether you were able to create static library for RN.

We want to have pod which includes “.a” file for RN framework, then our apps ViewController will use React from there.

We wanted to avoid including RN using Podspec, as it brings lot of files from boost-for-react-native which is required to compile RN and it increases compile time. We wanted to include compiled version (static library) of RN in our main App.