jerson / react-native-fast-openpgp

OpenPGP for react native made with golang for fast performance
https://www.npmjs.com/package/react-native-fast-openpgp
MIT License
45 stars 18 forks source link

Static library only works for i86 archs #100

Closed ospfranco closed 6 months ago

ospfranco commented 10 months ago

I noticed once the library is added one can only run the app when running it with rosetta (on apple silicon machines). While this might work, it's dirty. You should compile the library (or download per target .a files). You can then package all of them in an xcframework (because x86 and x86_64 clash and you cannot directly include them) and use the vendored_frameworks capability of cocoapods to require this framework and xcode will compile per architecture.

You can see an example of how to do this (in Rust, but the concept is the same) in this post

jerson commented 10 months ago

Hi @ospfranco yeah xcframework is something I'm gonna need to implement, going to check the docs to see how I can update the native code builder https://github.com/jerson/openpgp-mobile

gituser8796 commented 7 months ago

Hi @jerson , is it something you'll be able to do in the near future?

jerson commented 6 months ago

hey @gituser8796 @ospfranco could you try the newest version, I migrated to xcframework to support iphonesimulator https://www.npmjs.com/package/react-native-fast-openpgp/v/2.7.3

ospfranco commented 6 months ago

Sorry, I don't have access to the project anymore. But if you followed the instructions it should be fine. Thanks!