标签:一个 tail reac sub dev frame work href websocket
https://blog.csdn.net/u011690583/article/details/51700662
1、创建一个xcode工程,single View就行,项目语言选择swift,oc的直接生成就行不用这么麻烦。 
2、把跟目录上创建 node的package.json,执行命令
    npm init
    npm install react-native --save-dev 
    npm install react --save-dev
 
3、创建podfile文件,然后执行pod install ,必须第二步完成。代码如下:
 
# Uncomment the next line to define a global platform for your project
# platform :ios, ‘9.0‘
target ‘demo1‘ do
  # Comment the next line if you‘re not using Swift and don‘t want to use dynamic frameworks
  use_frameworks!
   pod ‘React‘, :path => ‘./node_modules/react-native‘, :subspecs => [
    ‘Core‘,
    ‘RCTText‘,
    ‘RCTNetwork‘,
    ‘RCTWebSocket‘
  ]
  # 如果你的RN版本 >= 0.42.0,请加入下面这行
  pod "yoga", :path => "./node_modules/react-native/ReactCommon/yoga"
end
react-native-Cocoapods-Swift-Project
标签:一个 tail reac sub dev frame work href websocket
原文地址:https://www.cnblogs.com/youhui/p/10251684.html