美文网首页
新项目如何添加CocoaPods并生成Podfile文件

新项目如何添加CocoaPods并生成Podfile文件

作者: breaktian | 来源:发表于2024-04-24 21:46 被阅读0次

1. 打开命令行,进入到项目根目录

cd /Users/apple/develop/ios/ios-fruit_vegetable_charge_account

2. 执行 pod init命令

pod init

3. 上一步执行完成之后,在项目的根目录下会生成一个Podfile文件,打开这个文件添加一个依赖

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

target 'ios-fruit_vegetable_charge_account' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for ios-fruit_vegetable_charge_account
  
  
  
  # 在这个位置添加新的依赖
  #提供类似Android中的更高级的布局框架
  #https://github.com/youngsoft/TangramKit
  pod 'TangramKit'

  
  

  target 'ios-fruit_vegetable_charge_accountTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'ios-fruit_vegetable_charge_accountUITests' do
    # Pods for testing
  end
  
  

end

4. 上一步执行完成之后,在项目的根目录下会生成一个ios-fruit_vegetable_charge_account.xcworkspace文件和Pods目录,关掉项目,双击ios-fruit_vegetable_charge_account.xcworkspace这个文件,打开项目就算完成了

相关文章

网友评论

      本文标题:新项目如何添加CocoaPods并生成Podfile文件

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