美文网首页
Cocoapods 安装及使用

Cocoapods 安装及使用

作者: _凌浩雨 | 来源:发表于2019-05-20 18:31 被阅读0次
    1). Cocoapods
    2). 安装
    # 安装
    sudo gem install cocoapods
    # 检查版本
    pod --version
    # 将Github上的开源库https://github.com/CocoaPods/Specs.git托管的Podspec索引文件都下载到本地/Users/xxx/.cocoapods
    pod setup 
    

    注:终端设置代理方式

    export http_proxy=http://127.0.0.1:1080;
    export https_proxy=http://127.0.0.1:1080;
    
    3). 设置镜像
    # 查看源列表
    gem sources -l
    # 移除不需要的源
    gem sources -remove https://rubygems.org/ 
    # 添加ruby-china源
    gem sources -a https://gems.ruby-china.com/ 
    
    4). 在 iOS 项目目录下创建Podfile文件
    platform:ios,’8.0’ // 平台
    target "IOSApplication" do // 项目
    pod 'SDWebImage'       // 第三方库
    
    end
    
    5). 安装
    pod install
    

    相关文章

      网友评论

          本文标题:Cocoapods 安装及使用

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