美文网首页
cocoapods的使用

cocoapods的使用

作者: 水晶屋_Crystal | 来源:发表于2018-03-26 12:06 被阅读5次

1. cocoapods 安装

1、sudo gem uninstall cocoapods
2、gem install cocoapods
3、pod install

2. cocoapods 使用

1、使用终端进入到你的工程目录

cd 目标文件夹路径(直接拖入终端也可)

2、执行pod init指令

pod init

执行成功后会出现一个Podfile的文件,这里可以用终端的vim进行编辑保存

# Uncomment the next line to define a global platform for your project
platform:ios, '8.0'

target 'MJExtensionDemo' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frame 
  # Use_frameworks!
  pod 'MJExtension'

  #Pods for MJExtensionDemo

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

end

3、终端执行命令pod install

pod install

4、使用cocoapods管理第三方库,需要打开工程目录的.xcworkspace文件,不要再打开.xcodeproj文件

相关文章

网友评论

      本文标题:cocoapods的使用

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