ios运行build fail求解



  • git clone 工程到本地,npm install过后,打开xcode运行报错如下,新手没接触过iOS开发,求指导呀,谢谢!

    环境:
    os 10.10
    xcode 6.4(官方要求是7以上,不知道是不是这个影响,10.10貌似又不支持xcode7,我看网上有用6.x的)
    react-native 0.1.10

    In file included from /Users/wilcosheh/ZhiHuDaily-React-Native/node_modules/react-native/Libraries/Text/RCTRawTextManager.m:10:
    In file included from /Users/wilcosheh/ZhiHuDaily-React-Native/node_modules/react-native/Libraries/Text/RCTRawTextManager.h:10:
    In file included from ../../React/Views/RCTViewManager.h:12:
    ../../React/Base/RCTBridgeModule.h:222:14: error: expected '>'

    • (NSArray<id<RCTBridgeMethod>> *)methodsToExport;
      ^
      ../../React/Base/RCTBridgeModule.h:222:14: error: expected ')'
      ../../React/Base/RCTBridgeModule.h:222:3: note: to match this '('
    • (NSArray<id<RCTBridgeMethod>> *)methodsToExport;
      ^
      ../../React/Base/RCTBridgeModule.h:222:1: error: interface type 'NSArray' cannot be returned by value; did you forget * in 'NSArray'?
    • (NSArray<id<RCTBridgeMethod>> *)methodsToExport;
      ^
      ../../React/Base/RCTBridgeModule.h:231:26: error: expected '>'
    • (NSDictionary<NSString *, id> *)constantsToExport;
      ^
      ../../React/Base/RCTBridgeModule.h:231:27: error: expected ')'
    • (NSDictionary<NSString *, id> *)constantsToExport;
      ^
      ../../React/Base/RCTBridgeModule.h:231:3: note: to match this '('
    • (NSDictionary<NSString *, id> *)constantsToExport;
      ^
      In file included from /Users/wilcosheh/ZhiHuDaily-React-Native/node_modules/react-native/Libraries/Text/RCTRawTextManager.m:10:
      In file included from /Users/wilcosheh/ZhiHuDaily-React-Native/node_modules/react-native/Libraries/Text/RCTRawTextManager.h:10:
      In file included from ../../React/Views/RCTViewManager.h:13:
      In file included from ../../React/Base/RCTConvert.h:18:
      In file included from ../../React/Base/RCTLog.h:12:
      ../../React/Base/RCTAssert.h:124:76: error: expected '>'
      RCT_EXTERN NSString *RCTFormatError(NSString *message, NSArray<NSDictionary<NSString *, id> *> *stacktrace, NSUInteger maxMessageLength);
      ^
      ../../React/Base/RCTAssert.h:124:76: error: interface type 'NSArray' cannot be passed by value; did you forget * in 'NSArray'?
      RCT_EXTERN NSString *RCTFormatError(NSString *message, NSArray<NSDictionary<NSString *, id> *> *stacktrace, NSUInteger maxMessageLength);

  • administrators

    没错,必须是xcode7以上



  • 好吧,THX,对于用虚拟机来说是个伟大的工程呀。。


登录后回复