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

Usage with React Native #109

Open
TimoGlastra opened this issue Oct 24, 2021 · 13 comments
Open

Usage with React Native #109

TimoGlastra opened this issue Oct 24, 2021 · 13 comments

Comments

@TimoGlastra
Copy link

We (Animo Solutions) intend to use this library for an Aries framework we're building (https://github.com/hyperledger/aries-framework-javascript). The framework supports React Native as an environment and therefore I'm interested to hear the maintainers point of view of supporting react native in the digital bazaar vc libraries.

I see there are a lot of rn branches across the repos that add initial support for react-native, but it seems they have been stale for a while. I also read a comment in digitalbazaar/jsonld-signatures#142 about being stuck in discussion on support for RN.

There is already a fork available of this library that adds React Native support (https://github.com/Sphereon-Opensource/rn-vc-js), but I'm not sure if using a separate package (while 95% could be shared) is an ideal solution.

What is your stance on supporting React Native for the vc-js libraries, and will PRs to finalize React Native support be welcomed? We'd rather integrate with vc-js directly and not use a fork, but I want to be certain that this is line with the vision of this library.

@dmitrizagidulin
Copy link
Contributor

Hi Timo!
Good question -- yes, we're still sorting out Digital Bazaar's policy on React Native.

Meanwhile, feel free to use the MIT Digital Credentials Consortium's fork of vc-js library. It's based on similarly RN-enabled forks of its pre-requisite libraries, and is being actively maintained and synced with Digital Bazaar's versions.

As the maintainer (and the person performing the syncing :) ), I do hope we can eventually sort out the RN issues here on the Digital Bazaar side, and I'll continue to advocate for it.

@TimoGlastra
Copy link
Author

Thanks @dmitrizagidulin!

I wasn't aware of the Digital Credentials Consortium fork -- I think that is perfect for our use case (at least for now).

The fact that a maintainer of this library is advocating for RN support, and is also maintaining a fork of this library gives me good hope

@nklomp
Copy link

nklomp commented Oct 27, 2021

To chime in on the above. We actually have a fork, but it was created under a lot of pressure, so it is not tested against all suites and to be honest we rather have something like the Digital Credentials fork or in this upstream project to begin with. Happy to help, as I believe there are different parties that actually want to use vc-js in RN. I know of at least 3 different parties myself outside of Animo

@dmitrizagidulin
Copy link
Contributor

Thanks @nklomp; let me know if there's further questions.

(I'll keep this issue open, and update it if there's further developments on this library, that enables RN support.)

@uocnb
Copy link

uocnb commented Feb 10, 2022

Hi @dmitrizagidulin

Any update for RN support?

I've tried rn branch for React Native and browser usage:

  • Linux: install and run fine.
  • Windows install failed with error caused by digitalbazaar/http-client#v1.1.1-rc2: Mixing named and default exports.

Both env run with same node v16.14.0 and npm v8.4.1.

@dmitrizagidulin
Copy link
Contributor

Hi @uocnb. I'm sorry, no updates on this repo.
Try the DCC fork https://github.com/digitalcredentials/vc-js, I'm using that one in RN currently.

@dlongley
Copy link
Member

My understanding is that this should be fixed now with the move to ESM. I'm closing -- feel free to reopen if there are still issues.

@dmitrizagidulin
Copy link
Contributor

My understanding is that this should be fixed now with the move to ESM. I'm closing -- feel free to reopen if there are still issues.

Not fixed, sadly. Still various RN-related issues that require us to maintain forks.

@TimoGlastra
Copy link
Author

Hey @dlongley. As @dmitrizagidulin mentioned, react native support is not fully working yet. Are you willing to accept pull requests for things that do not work well in React Native?

We're running into issues again now because of things fixed in the main digital bazaar libraries, but not in the forks and it's quite a hassle.

@dlongley dlongley reopened this May 11, 2023
@dlongley
Copy link
Member

dlongley commented May 11, 2023

@TimoGlastra,

We don't want react-native-specific code to maintain (as we wouldn't do a good job testing nor maintaining it) -- but we're willing to look into PRs that could better enable you to use a shim library or polyfill to do what you need to do so that you receive updates from this library. Does that make sense?

Of course, bug fixes or adjustments that are generally helpful to all users of the library are also welcome -- so if anything can be reframed in that way, we could also consider it.

@nklomp
Copy link

nklomp commented May 11, 2023

Really interested in this as well, as we also in the same boat as Timo/Animo

In a lot of cases RN support isn't about creating native code for the different platforms, but more in making certain choices in what depencies to use and for instance preferring u8a arrays over direct buffer usage etc, not accessing the FS directly etc.

But probably @dmitrizagidulin can chime in on what the most important changes in the DC fork are

@dmitrizagidulin
Copy link
Contributor

But probably @dmitrizagidulin can chime in on what the most important changes in the DC fork are

The main challenge here is that the DCC fork of the VC library is the top of a pyramid of dependencies, all of which need to be be modified to work with TypeScript, Jest, ReactNative, etc. There isn't really a simple fix.

We're running into issues again now because of things fixed in the main digital bazaar libraries, but not in the forks and it's quite a hassle.

Yeah, we've been behind porting the fixes to the DCC libs, will be focusing on that shortly.

@swatigoel
Copy link

We are facing this issue in react native app, digitalcredentials#17
As mentioned in issue, we are able to verify all the VCs by using this library independently.

Does anyone has any solution to suggest?

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

6 participants