集成过程中,或许会遇到以下错误
Undefined symbols for architecture x86_64:
"_RCTParseTypeFromHeader", referenced from:
loadTaggedScript(NSData*, NSURL*, RCTPerformanceLogger*, RandomAccessBundleData&, NSError* __autoreleasing*) in libReact.a(RCTJSCExecutor.o)
"facebook::react::customJSCWrapper()", referenced from:
_RCTNSErrorFromJSErrorRef in libReact.a(RCTJSCErrorHandling.o)
"facebook::react::systemJSCWrapper()", referenced from:
_RCTNSErrorFromJSErrorRef in libReact.a(RCTJSCErrorHandling.o)
"facebook::react::parseTypeFromHeader(facebook::react::BundleHeader const&)", referenced from:
+[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in libReact.a(RCTJavaScriptLoader.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 build/Build/Products/Debug-iphonesimulator/MyProject.app/MyProject normal x86_64
(1 failure)
解决办法:
在podfile文件中subspecs中 增加 BatchedBridge
如下图所示
然后在项目目录下,重新运行pod install,重新打开项目运行即可
网友评论