![](http://img2.imgtn.bdimg.com/it/u=92470513,758104990&fm=214&gp=0.jpg)
本文接上篇文章主要說下怎樣使用 fastlane 上傳到fir和蒲公英,下面先介紹下 plugin 命令嘹黔。
plugin命令介紹:
列出所有可用插件
fastlane search_plugins
搜索指定名稱的插件:
fastlane search_plugins [query]
添加插件:
fastlane add_plugin [name]
安裝插件:
fastlane install_plugins
一. 上傳到fir
1.1 安裝fir:
fastlane add_plugin fir
安裝完成會生成3個文件
. Gemfile
. Gemfile.lock
. fastlane/Pluginfile
如果你的項目使用了cocoapods, 需要在Gemfile中添加一行:
gem 'cocoapods'
1.2 在Fastfile中新建一個lane:
desc "Deploy a test version to the fir.im" lane :Firim do createIpa firim(firim_api_token: "your firim token") end
createIpa 請參考上篇文章
your firim token 這里要替換成你自己的 firim_api_token 骨杂,如果你還沒有 fir賬號請前往 fir.im 平臺注冊賬號并生產(chǎn)API token涂身。
1.3 上傳fir:
. 打開終端,cd到項目目錄下
. 執(zhí)行命令: fastlane Firim
二. 上傳到蒲公英
2.1 安裝蒲公英:
fastlane add_plugin pgyer
稍等幾秒鐘搓蚪,如果出現(xiàn)類似下面的信息蛤售,就說明安裝成功了:
2.2 在Fastfile中新建一個lane:
lane :pgyer do createIpa pgyer(api_key: "7f15xxxxxxxxxxxxxxxxxx141", user_key: "4a5bcxxxxxxxxxxxxxxx3a9e",update_description: "版本更新描述") end
以上的 api_key 和 user_key,請開發(fā)者在自己 蒲公英 賬號下的 應用管理 - App概述 - API 中可以找到妒潭,并替換到以上相應的位置悴能。
update_description:為版本更新描述。
2.3 上傳到蒲公英:
. 打開終端雳灾,cd到項目目錄下
. 執(zhí)行命令: fastlane pgyer
以上很多知識都來自互聯(lián)網(wǎng)漠酿,還有自己的一些總結。
侵立刪佑女, 有不對的地方望指正记靡。