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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容