美文网首页
React Native CocoaPods

React Native CocoaPods

作者: wbitos | 来源:发表于2016-04-26 13:48 被阅读0次

    1 安装CocoaPods

    gem install cocoapods

    2 安装nvm (see: its setup instructions here.)

    3 安装nodejs

    nvm install node && nvm alias default node

    4 安装React Native

    npm install react-native

    5 使用CocoaPods集成React Native

    修改Podfile,添加以下内容:

    # Depending on how your project is organized,your node_modules directory may be

    # somewhereelse;tell CocoaPods where you've installed react-native from npm

    pod'React',:path=>'./node_modules/react-native',:subspecs=>[

    'Core',

    'RCTImage',

    'RCTNetwork',

    'RCTText',

    'RCTWebSocket',

    # Add any other subspecs you want to useinyour project

    ]

    执行pod install命令进行集成

    $ pod install

    相关文章

      网友评论

          本文标题:React Native CocoaPods

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