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

File was built for x86_64 which is not the architecture being linked (arm64) #3

Open
jordanmkoncz opened this issue Oct 5, 2018 · 1 comment

Comments

@jordanmkoncz
Copy link

jordanmkoncz commented Oct 5, 2018

After successfully linking everything correctly as per the instructions in #2 and the new readme, I'm able to create Debug builds of the app which work fine in the Simulator. However, when I try to create an Archive ("Product" -> "Archive" in Xcode), I'm getting the following build error:

ld: warning: ignoring file ../node_modules/react-native-fast-storage/ios/MMKV.framework/MMKV, file was built for x86_64 which is not the architecture being linked (arm64): ../node_modules/react-native-fast-storage/ios/MMKV.framework/MMKV
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_MMKV", referenced from:
      objc-class-ref in libRNFastStorage.a(RNFastStorage.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

After a little bit of research it seems like maybe the version of MMKV.framework that is included in react-native-fast-storage has not been built correctly and as a result it can be used in the Simulator but not when creating an Archive. Hopefully that's fairly easy to resolve and a new version of the package can be released with an updated MMKV.framework file included which is able to be used when creating an Archive.

As a temporary workaround I've undone all of the additional steps to complete the linking of MMKV.framework with the app, and instead installed it via CocoaPods by following the instructions at https://github.com/Tencent/MMKV#installation-via-cocoapods.

@Michaelvilleneuve
Copy link
Contributor

Michaelvilleneuve commented Oct 12, 2018

Thank you for reporting this.
We are also having the same issue in our pipeline when building for devices.
We will offer a fix soon

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

2 participants