[iOS] Undefined symbols for architecture x86_64
See original GitHub issueIs this a bug report?
Yes
Have you read the Bugs section of the Contributing to React Native Guide?
Yes
Environment
react-native -v
: react-native-cli: 2.0.1 - react-native: 0.46.1node -v
: v7.5.0npm -v
: 4.1.2
Then, specify:
- Target Platform (e.g. iOS, Android): iOS
- Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra 10.12.5
Steps to Reproduce
- Have a new project based on 0.46.1 react native.
- Use “babel-preset-react-native”: “^2.0.0”
- I don’t know if there is a library or what that does this but its really weird
Expected Behavior
I expect the react-native run-ios to build the app properly! Because react-native run-android works fine and lets me build and run the android app!
Actual Behavior
/Users/snorreedwin/Code/entur/entur-clients/native/ios/build/Build/Products/Debug-iphonesimulator/React/React.framework/React
Undefined symbols for architecture x86_64:
"_JSNoBytecodeFileFormatVersion", referenced from:
+[RCTJavaScriptLoader loadBundleAtURL:onProgress:onComplete:] in RCTJavaScriptLoader.o
+[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in RCTJavaScriptLoader.o
"facebook::react::parseTypeFromHeader(facebook::react::BundleHeader const&)", referenced from:
+[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in RCTJavaScriptLoader.o
"facebook::react::customJSCWrapper()", referenced from:
-[RCTDevSettings isJSCSamplingProfilerAvailable] in RCTDevSettings.o
-[RCTDevSettings toggleJSCSamplingProfiler] in RCTDevSettings.o
_RCTNSErrorFromJSErrorRef in RCTJSCErrorHandling.o
-[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in RCTSamplingProfilerPackagerMethod.o
"facebook::react::systemJSCWrapper()", referenced from:
-[RCTDevSettings isJSCSamplingProfilerAvailable] in RCTDevSettings.o
-[RCTDevSettings toggleJSCSamplingProfiler] in RCTDevSettings.o
_RCTNSErrorFromJSErrorRef in RCTJSCErrorHandling.o
-[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in RCTSamplingProfilerPackagerMethod.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/snorreedwin/Code/entur/entur-clients/native/ios/build/Build/Products/Debug-iphonesimulator/React/React.framework/React normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/reactnativetidr.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/reactnativetidr.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Reproducible Demo
I’m not sure how to easily reproduce this, other than telling about our setup. We are running CocoaPods and Swift, which makes it a bit different from an init project. This is our dependencies:
"dependencies": {
"@mapbox/polyline": "^0.2.0",
"axios": "^0.15.3",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"better-npm-run": "0.0.14",
"file-butler": "git@bitbucket.org:enturas/file-butler.git",
"moment": "^2.18.1",
"native-base": "^2.2.1",
"react": "16.0.0-alpha.12",
"react-native": "0.46.1",
"react-native-config-swift": "git@bitbucket.org:enturas/react-native-config-swift.git",
"react-native-easy-grid": "^0.1.11",
"react-native-fabric": "^0.4.1",
"react-native-maps": "^0.15.3",
"react-native-vector-icons": "~4.1.1",
"react-navigation": "^1.0.0-beta.11",
"react-redux": "^5.0.3",
"react-router-redux": "^4.0.8",
"redux": "^3.6.0",
"redux-devtools-extension": "^2.13.0",
"redux-logger": "^2.8.2",
"redux-saga": "^0.14.3",
"stacktrace-js": "^2.0.0",
"url-parse": "^1.1.9"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
"babel-jest": "18.0.0",
"babel-plugin-module-resolver": "^2.7.0",
"babel-preset-react-native": "^2.0.0",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-react": "^7.0.1",
"eslint-watch": "^3.1.0",
"jest": "18.1.0",
"jsx-control-statements": "^3.2.5",
"react-test-renderer": "15.4.2",
"reactotron-react-native": "^1.10.0",
"reactotron-redux": "^1.10.0",
"reactotron-redux-saga": "^1.10.0",
"source-map": "^0.5.6",
"wml": "0.0.82"
},
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:26 (6 by maintainers)
Top Results From Across the Web
Undefined symbols for architecture x86_64 on Xcode 6.1
I solved the same issue by going to Xcode Build Settings and in Architectures, I changed the Xcode 6.1.1 standard architecture to:- $(ARCHS_STANDARD_32_BIT)....
Read more >Undefined symbols for architecture x86_64 - Apple Developer
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 >Undefined symbols for architecture x86_64 Xcode 12 #213
Describe the bug For some reason x86_64 architecture was missed in FlurryWatch_11.1.0.a Compilation under Xcode 12 Please choose the closest ...
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 : Undefined symbols for architecture x86_64 ... - YouTube
iOS : Undefined symbols for architecture x86_64 : "_OBJC_CLASS_$_WKWebView", referenced from: [ Beautify Your Computer ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding
BatchedBridge
as a subspec in yourPodfile
resolves the issue as @javache indicates. The tutorial at https://facebook.github.io/react-native/docs/integration-with-existing-apps.html should be updated to reflect this, as of right there is an error.You need to add a dependency on the RCTBatchedBridge subspec (if using 0.46) or RCTCxxBridge (if newer).