Skip to content

IOS build fails both in react native cli and expo #82

@shehanGuruge

Description

@shehanGuruge

What happened?

I was trying to install @react-native-ml-kit/text-recognition

and i kept getting this error over and over again.

\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wunreachable-code -Werror\=deprecated-objc-isa-usage -Werror\=objc-root-class -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-implicit-fallthrough -fstrict-aliasing -Wdeprecated-declarations -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -index-store-path /Users/shehanguruge/Library/Developer/Xcode/DerivedData/LeadSnap-gpfaogutdzsvywgolqoohjkuagng/Index.noindex/DataStore @/Users/shehanguruge/Library/Developer/Xcode/DerivedData/LeadSnap-gpfaogutdzsvywgolqoohjkuagng/Build/Intermediates.noindex/LeadSnap.build/Debug-iphonesimulator/LeadSnap.build/Objects-normal/x86_64/7187679823f38a2a940e0043cdf9d637-common-args.resp -MMD -MT dependencies -MF /Users/shehanguruge/Library/Developer/Xcode/DerivedData/LeadSnap-gpfaogutdzsvywgolqoohjkuagng/Build/Intermediates.noindex/LeadSnap.build/Debug-iphonesimulator/LeadSnap.build/Objects-normal/x86_64/LeadSnap_vers.d --serialize-diagnostics /Users/shehanguruge/Library/Developer/Xcode/DerivedData/LeadSnap-gpfaogutdzsvywgolqoohjkuagng/Build/Intermediates.noindex/LeadSnap.build/Debug-iphonesimulator/LeadSnap.build/Objects-normal/x86_64/LeadSnap_vers.dia -c /Users/shehanguruge/Library/Developer/Xcode/DerivedData/LeadSnap-gpfaogutdzsvywgolqoohjkuagng/Build/Intermediates.noindex/LeadSnap.build/Debug-iphonesimulator/LeadSnap.build/DerivedSources/LeadSnap_vers.c -o /Users/shehanguruge/Library/Developer/Xcode/DerivedData/LeadSnap-gpfaogutdzsvywgolqoohjkuagng/Build/Intermediates.noindex/LeadSnap.build/Debug-iphonesimulator/LeadSnap.build/Objects-normal/x86_64/LeadSnap_vers.o -index-unit-output-path /LeadSnap.build/Debug-iphonesimulator/LeadSnap.build/Objects-normal/x86_64/LeadSnap_vers.o
error .o)': found architecture 'arm64', required architecture 'x86_64'
error ", referenced from:
error callback:]_block_invoke in MLKitCommon[x86_64][54](PHTHeterodyneSyncer.o)
error linker command failed with exit code 1 (use -v to see invocation)
error Failed to build ios project. "xcodebuild" exited with error code '65'. To debug build logs further, consider building your app with Xcode.app, by opening 'LeadSnap.xcworkspace'.
error Command failed with exit code 1.

Version

"@react-native-ml-kit/text-recognition": "^2.0.0",

Which ML Kit packages do you use?

  • @react-native-ml-kit/barcode-scanning
  • @react-native-ml-kit/face-detection
  • @react-native-ml-kit/identify-languages
  • @react-native-ml-kit/image-labeling
  • @react-native-ml-kit/text-recognition
  • @react-native-ml-kit/translate-text

What platforms are you seeing this issue on?

  • Android
  • iOS

System Information

System:
  OS: macOS 15.5
  CPU: (10) arm64 Apple M4
  Memory: 155.52 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.7.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 11.5.1
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2025.09.01.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.26094.121.2512.13991807
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.2.0
    wanted: 19.2.0
  react-native:
    installed: 0.83.1
    wanted: 0.83.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps to Reproduce

Create a new project and add the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions