CocoaPods导入ReactiveCocoa4.2.1 - Go语言中文社区

CocoaPods导入ReactiveCocoa4.2.1


1.Xcode新建空白项目

1-ReactiveCocoaEmptyBlank.jpg

2.Terminal进入项目根目录

cd /Users/zhaoyingxin/Documents/solozyx/CocoaPods/ReactiveCocoaEmptyProject 

执行 pod init 命令

pod init

就在目录 ReactiveCocoaEmptyProject下生产了 Podfile 文件

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'ReactiveCocoaEmptyProject' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for ReactiveCocoaEmptyProject

  target 'ReactiveCocoaEmptyProjectTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'ReactiveCocoaEmptyProjectUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end
2-使用 pod init 生成的Podfile文件.jpg

修改 Podfile 文件内容为

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'ReactiveCocoaEmptyProject' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!

  # Pods for ReactiveCocoaEmptyProject

#  target 'ReactiveCocoaEmptyProjectTests' do
#    inherit! :search_paths
    # Pods for testing
#  end

#  target 'ReactiveCocoaEmptyProjectUITests' do
#    inherit! :search_paths
    # Pods for testing
#  end

   pod 'ReactiveCocoa', '~>4.2.1'

end

3.导入RAC框架

pod install
3-成功导入RAC4.2.1框架.jpg
4-导入RAC后的项目结构.jpg
5-导入RAC头文件项目编译成功.jpg
版权声明:本文来源简书,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://www.jianshu.com/p/dcecbf8fc12a
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-01-08 21:44:36
  • 阅读 ( 1350 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

推荐文章

猜你喜欢