美文网首页持续集成
使用fastlane创建profile、添加设备、创建推送证书

使用fastlane创建profile、添加设备、创建推送证书

作者: 冰琳92 | 来源:发表于2017-05-17 16:41 被阅读490次
    1. 安装
    sudo gem install fastlane --verbose
    

    Seems like launching fastlane takes a while - please run

    $ [sudo] gem cleanup //卸载过期的gem 可以让fastlane运行更快
    

    推荐使用Gemfile来管理依赖

     $ bundle init
     $ echo 'gem "fastlane"' >> Gemfile
     $ bundle install
    
    1. 初始化
    fastlane init
    
    lane :beta do
        gym(scheme: "name",
        configuration: "Debug",//默认为Release
        workspace: "name.xcworkspace")
    end
    
    1. 创建app profile
    • release
    fastlane sigh
    
    • adhoc
    fastlane sigh --adhoc
    
    • development
    fastlane sigh --development
    
    • 对某个app操作
    fastlane sigh -a com.krausefx.app -u username
    
    1. 添加设备
    fastlane run register_device 
    // input name
    // input device uiid
    
    1. 添加设备后更新profile
    fastlane sigh --development --force
    
    1. 创建推送证书
    fastlane pem --development
    
    1. 打包ipa
    a
    
    1. 添加上传至蒲公英
        sh "curl -F 'file=@pathto/app.ipa' -F 'uKey=userkey in pgyer ' -F '_api_key=apikey in pgyer' http://www.pgyer.com/apiv1/app/upload -F 'updateDescription=test update'"
    
    
    lane :beta do
       increment_build_number #让project的build版本自增
    `//需要设置CURRENT_PROJECT_VERSION为info.plist里的build号`
        gym(scheme: "yours scheme",
        configuration: "Debug",//默认为Release
        workspace: "yours.xcworkspace")
    end
    

    increment_build_number实际上是调用的apple的agvtool next-version -all
    可以参考文档p.p1 https://developer.apple.com/library/ios/qa/qa1827/_index.html

    相关文章

      网友评论

        本文标题:使用fastlane创建profile、添加设备、创建推送证书

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