question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS build fail: Undefined symbols for architecture x86_64

See original GitHub issue

Full error:

Undefined symbols for architecture x86_64:
  "__swift_FORCE_LOAD_$_swiftWebKit", referenced from:
      __swift_FORCE_LOAD_$_swiftWebKit_$_react_native_text_input_mask in libreact-native-text-input-mask.a(RNMask.o)
      __swift_FORCE_LOAD_$_swiftWebKit_$_react_native_text_input_mask in libreact-native-text-input-mask.a(TextInputMask.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftWebKit_$_react_native_text_input_mask)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Full pod file:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'


target 'UD' do
  rn_maps_path = '../node_modules/react-native-maps'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text', :modular_headers => true
  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'
  config = use_native_modules!
  permissions_path = '../node_modules/react-native-permissions/ios'

  pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  target 'UDTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
  end
end

Running on:

{
   "react-native": "0.64.0",
   "react-native-text-input-mask": "^3.1.4",
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:7

github_iconTop GitHub Comments

36reactions
joshihemalcommented, Jul 15, 2022

if you have mac with m1 chip then solution is arch -x86_64 yarn ios

1reaction
ravi-pooniacommented, Apr 15, 2021

refer to this solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode build failure "Undefined symbols for architecture ...
I am trying to write a very simple console program, that searches for paired BT devices and prints them to an NSLog. It...
Read more >
Undefined symbols for architecture x86_64
I'm trying to create an application that sends keystrokes to another process and I keep getting this error: Undefined symbols for architecture x86_64:....
Read more >
Fixing React Native build error: Undefined symbols for ...
While running yarn ios for React Native v0.64.2 on my mac machine (macOS 11.6, XCode 13) i've encountered following error: Undefined symbols ......
Read more >
[Xcode Build issue] -Undefined symbols for architecture ...
I got this error when building xcode by simulator: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_BinaryFileStorageInterface", referenced from:.
Read more >
iOS : Xcode unittest build failed with error "Undefined symbols ...
iOS : Xcode unittest build failed with error " Undefined symbols for architecture x86_64 " [ Gift : Animated Search Engine ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found