通過fastlane打包時(shí)是需要輸出六位的驗(yàn)證碼和APP的專用密碼的告唆,通過在環(huán)境變量中新增兩個(gè)變量可以自動(dòng)獲取輸入不用手動(dòng)輸入植袍。
一酗钞、 設(shè)置App專用密碼變量
1. 首先獲取APP的專用密碼
2. 打開環(huán)境變量文件.bash_profile
,它是隱藏文件啸臀∪郑或者通過vim ~/.bash_profile
命令打開
3. 設(shè)置剛才生成的APP專用密碼
export FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=APP專用密碼用橫線分割的英文字母
二赐写、設(shè)置6位驗(yàn)證碼變量
終端輸入命令獲取變量值,將值放到環(huán)境變量中膜赃。
$ fastlane spaceauth -u 開發(fā)者賬號(hào)
設(shè)置如下環(huán)境變量
export FASTLANE_SESSION='---\n- !ruby/object:HTTP::Cookie\n name: myacinfo\n value: DAWTKNV2ae1df26f7bfd1a3045d0bde3a4bc13927383c9379ca0f317dae727d5554fc8ae84fedd25014b207b71880209a07f89f8ab0c6aa84de4d36619b94a96ea7a1eeade9a61fe24eee710578be013e4acfca844bc471976e9d2b90f72a649e445d2c84c74a48dd070d6e19bbad65c444573d1ef6e52ca15b8ced43145c3858eba29104a916e8958524f58f3222a6532147abe3f7ed78408d41ceb2c47228d5ad74f3724cbb8b88225473914ee778888dd9b1a6a2e9e00eda33a9599d6111eccc55c06cb889eb31bdaa41ff4200a7861abc631c71a44985b1e8ec407334b0ac8907431373628e794540870c2945e63173ad70abcfdde524294f84ea8e71f4eed1f83d31643865393239346536363231313661636231306437633462373636616135366434616665333065MVRYV2\n domain: [apple.com](http://apple.com)\n for_domain: true\n path: "/"\n secure: true\n httponly: true\n expires: \n max_age: \n created_at: 2019-03-12 15:11:05.007570000 +08:00\n accessed_at: 2019-03-12 15:39:55.704789000 +08:00\n- !ruby/object:HTTP::Cookie\n name: dqsid\n value: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJBbUVfelc0d2hwRlY3eElFS2Vla0J3In0.CCeSNC4PcwTsnoU3cq-Hb5AxwJDv1GGz9qEXOREbA1k\n domain: [olympus.itunes.apple.com](http://olympus.itunes.apple.com)\n for_domain: false\n path: "/"\n secure: true\n httponly: true\n expires: \n max_age: 1800\n created_at: &1 2019-03-12 15:39:56.916465000 +08:00\n accessed_at: *1\n'
啟動(dòng)環(huán)境變量
source ~/.profile