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

Unable to build for iOS on M1 #51

Closed ShaunLWM closed 2 years ago

ShaunLWM commented 2 years ago

Android working well, but not on iOS build on MacOS M1 chip.

ld: warning: ignoring file /<DIR>/ios/VosWrapperEx.framework/VosWrapperEx, missing required architecture x86_64 in file /<DIR>/ios/VosWrapperEx.framework/VosWrapperEx (2 slices)
ld: warning: ignoring file /<DIR>/ios/nofsdk.framework/nofsdk, missing required architecture x86_64 in file /<DIR>/ios/nofsdk.framework/nofsdk (2 slices)
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_NofService", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_PublicKeySet", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_PublicKeyComponent", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Never really touch iOS native library before, so don't really know what does it mean. Any help is appreciated. Thank you!

jerson commented 2 years ago

Hi @ShaunLWM thanks for report this issue, but seems not related with fast openpgp or at least I never saw this before, seems like there are some frameworks with missing arch support

ShaunLWM commented 2 years ago

Weird, didn't have problems compiling before that so I assumed _PublicKeySet & _PublicKeyComponent were linked to the library. But it's okay, I will try and debug more.

Another issue my colleague faced was this. Not sure if it's due to missing build for the architecture. Thank you! WhatsApp Image 2022-04-01 at 6 19 29 PM .

jerson commented 2 years ago

mmm yeah you are right, let me update the library I think I did something wrong in last build

jerson commented 2 years ago

@ShaunLWM please try this new version, I was testing some renaming symbols tools but seems very unstable for this library https://www.npmjs.com/package/react-native-fast-openpgp/v/2.2.3