Skip to content

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

@jordanmkoncz

Description

@jordanmkoncz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions