openwallet-foundation / credo-ts

Typescript framework for building decentralized identity and verifiable credential solutions
https://credo.js.org
Apache License 2.0
258 stars 196 forks source link

Issue when adding AFJ to expo app #1189

Open TimoGlastra opened 1 year ago

TimoGlastra commented 1 year ago

When adding AFJ to an Expo React Native application it will fail during the build on iOS because of duplicate symbols. After digging in a bit, it is because both the new expo modules and deprecated/legacy unimodules packages are installed.

The cause of this issue are the @digitalcredentials packages, which depend on isomorphic-webcrypto, which in turn depends on the legacy expo unimodules.

See https://github.com/kevlened/isomorphic-webcrypto/issues/65

This means that, at the moment, it is not possible to use AFJ 0.3.x within an Expo application

TimoGlastra commented 1 year ago

Found a workaround, will add to the docs

TimoGlastra commented 1 year ago

Spehereon made a fork of the library that causes this issue, which we can add as a patch / resolution. It will mean users have to add the resolution themselves, but it's better than the current solution: https://github.com/Sphereon-Opensource/isomorphic-webcrypto