---
# System prepended metadata

title: iOS Release guide
tags: [CICD]

---

iOS 發布指南
請用 Nelson Liu 的帳號登入

更新 GIT REPO
git reset --hard
git clean -f -d
將名為 assets & settings 的 stash 套用在 REPO 上(請勿pop以避免commit 憑證)
![](https://hackmd.io/_uploads/BkWIIpQq3.png)

開啟專案 **VChat.xcworkspace**
![](https://hackmd.io/_uploads/SkBTFuAqn.png)

包含了 App 圖標及啟動畫面圖片、憑證資訊等

修改版號
Info.plist
Bundle Version String(short) CFBundleShortVersionString: x.y.z
Bundle Version CFBundleVersion: 12
unique, numbers only
![](https://hackmd.io/_uploads/SJAUUTmcn.png)


修改 App 圖標
XCode
Project Navigator -> VChat
TARGETS -> VChat; General Tab
App Icons and Launch Screens -> App Icon 輸入 AppIcon/AppIconDEV/AppIconUAT(主要為AppIconDEV
![](https://hackmd.io/_uploads/rkyj86Q93.png)

測試打包
標題列 -> Product -> Build
![](https://hackmd.io/_uploads/rygxPT75h.png)

失敗可另跑 Clean Build Folder

打包並上傳 AppStore Testflight
標題列 -> Product -> Archive
![](https://hackmd.io/_uploads/rJu-wTQq3.png)

打包結束後會跳出 Organizer 視窗 -> Distribute App
![](https://hackmd.io/_uploads/Hk7fDpXq2.png)

AppStore Testflight
AppStore -> Upload -> "Next" 到結束
![](https://hackmd.io/_uploads/HyJmvam52.png)

Diawi
Development -> Export -> "Next" 到結束
![](https://hackmd.io/_uploads/ryQNPT75h.png)

最後會選擇要匯出檔案至資料夾，再將資料夾內的 *.ipa 上傳到 Diawi.com 即可
![](https://hackmd.io/_uploads/rJGPw6Qcn.png)
![](https://hackmd.io/_uploads/H1FvPTXq2.png)
![](https://hackmd.io/_uploads/ByluPpX9n.png)
![](https://hackmd.io/_uploads/B1UFwaQcn.png)
![](https://hackmd.io/_uploads/rJpYvaQch.png)

標註版號至 GIT REPO
僅將修改版號的部分加入 commit 上傳，切勿將圖標或憑證的部分上傳

剩下的 unstaged files 可以用 stash 暫存起來

Written with StackEdit.