美文网首页
iOS中集成react-native模块报错的处理

iOS中集成react-native模块报错的处理

作者: nextChallenger | 来源:发表于2017-08-07 14:55 被阅读510次

    集成过程中,或许会遇到以下错误

    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,重新打开项目运行即可

    相关文章

      网友评论

          本文标题:iOS中集成react-native模块报错的处理

          本文链接:https://www.haomeiwen.com/subject/ijcalxtx.html