Xcode集成pod指令(一)

  • 1.升级Ruby环境
sudo gem update --system

接下来会提示密文输入密码(直接输入密码就可以)
  • 2.更换镜像
gem sources --remove https://rubygems.org/

移除现有镜像文件

更新镜像文件

gem source -a https://gems.ruby-china.org/

淘宝的已经不更新了,用国外的需要翻墙,这就很尴尬

查看镜像文件

gem sources -l
如果结果是
*** CURRENT SOURCES ***
https://gems.ruby-china.org/
说明添加成功,否则继续执行$ gem source -a https://gems.ruby-china.org/来添加
  • 3、安装CocoaPods

键入以下指令

sudo gem install cocoa pods

如果不行,执行下面这段

 sudo gem install -n /usr/local/bin cocoapods

运行pod

pod setup
当出现 Setup completed 时说明已经完成

iOS "The sandbox is not in sync with the Podfile.lock"解决方案

rm -rf MyProject.xcworkspace  
pod install  

pod命令

Usage:

    $ pod COMMAND

      CocoaPods, the Cocoa library package manager.

Commands:

    + cache         Manipulate the CocoaPods cache
    + deintegrate   Deintegrate CocoaPods from your project
    + env           Display pod environment
    + init          Generate a Podfile for the current directory
    + install       Install project dependencies according to versions from a
                    Podfile.lock
    + ipc           Inter-process communication
    + lib           Develop pods
    + list          List pods
    + outdated      Show outdated project dependencies
    + plugins       Show available CocoaPods plugins
    + repo          Manage spec-repositories
    + search        Search for pods
    + setup         Setup the CocoaPods environment
    + spec          Manage pod specs
    + trunk         Interact with the CocoaPods API (e.g. publishing new specs)
    + try           Try a Pod!
    + update        Update outdated project dependencies and create new
                    Podfile.lock

Options:

    --silent        Show nothing
    --version       Show the version of the tool
    --verbose       Show more debugging information
    --no-ansi       Show output without ANSI codes
    --help          Show help banner of specified command

Xcode集成pod指令(二)

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

相关阅读更多精彩内容

  • 项目组件化、平台化是技术公司的共同目标,越来越多的技术公司推崇使用pod管理第三方库以及私有组件,一方面使项目架构...
    swu_luo阅读 22,721评论 0 39
  • CocoaPods 是什么? CocoaPods 是一个负责管理 iOS 项目中第三方开源库的工具。CocoaPo...
    朝洋阅读 25,888评论 3 50
  • 前言 前几天发布我的开源库<最简单方便的iOS轮播开源库:JYCarousel>到CocoaPods的时候。对Co...
    Dely阅读 17,840评论 12 82
  • 一. CocoaPods的介绍 什么是CocoaPods?CocoaPods是一个负责管理iOS项目中第三方开源库...
    辉712阅读 9,416评论 0 7
  • 2016年4月7号,星期四,天气晴 在纠结了两个月之后,在看了许多学长学姐考研情况之后,在和同学老师讨论了无数...
    奔跑十万里阅读 1,720评论 2 1

友情链接更多精彩内容