react-native-fast-openpgp icon indicating copy to clipboard operation
react-native-fast-openpgp copied to clipboard

Static library only works for i86 archs

Open ospfranco opened this issue 1 year ago • 2 comments

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

ospfranco avatar Jan 26 '24 14:01 ospfranco

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

jerson avatar Jan 26 '24 14:01 jerson

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

gituser8796 avatar Apr 04 '24 15:04 gituser8796

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

jerson avatar May 23 '24 20:05 jerson

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

ospfranco avatar May 28 '24 05:05 ospfranco