Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
FlutterアプリのiOSビルドとアーカイブを CircleCI で自動化してみた / Tr...
Search
bake0937
September 08, 2021
Technology
0
1.2k
FlutterアプリのiOSビルドとアーカイブを CircleCI で自動化してみた / Tried automating the iOS build and archive of the Flutter app with CircleCI
ラクスR&D Meetup - Flutter での登壇資料です。
https://rakus.connpass.com/event/220540/
bake0937
September 08, 2021
Tweet
Share
More Decks by bake0937
See All by bake0937
GASを使って非エンジニアが AWS Step Functions を 操作できる仕組みの紹介 / Introducing how non-engineers can operate AWS Step Functions using GAS
bake0937
1
410
CircleCI の有料プランを導入するためにやったこと/What I did to introduce CircleCI's paid plan
bake0937
0
1.6k
Probot で学ぶ TypeScript / Learn with Probot TypeScript
bake0937
0
180
Amazon ECR を利用していたと思ったら、Docker Hub を利用し続けていた / If I thought I was using Amazon ECR, I continued to use Docker Hub
bake0937
0
960
Jest + Puppeteer によるE2Eテストで確認作業を短縮してみた / End-to-end testing by Jest + Puppeteer shortened the confirmation work
bake0937
0
670
所属企業の Advent Calendar を初めて作った時に学んだこと / What I learned when I first created my company's Advent Calendar
bake0937
1
820
Notion 📚 へ移行して 3ヶ月経った振り返り / Looking back at Notion after 3 months
bake0937
0
5.9k
Bot開発でRubyを学ぶ / Learn Ruby with Bot Development
bake0937
0
450
小さく始めるOSS活動
bake0937
0
120
Other Decks in Technology
See All in Technology
サービスロボット最前線:ugoが挑むPhysical AI活用
kmatsuiugo
0
180
アカデミーキャンプ 2025 SuuuuuuMMeR「燃えろ!!ロボコン」 / Academy Camp 2025 SuuuuuuMMeR "Burn the Spirit, Robocon!!" DAY 1
ks91
PRO
0
150
歴代のWeb Speed Hackathonの出題から考えるデグレしないパフォーマンス改善
shuta13
6
570
AI時代の大規模データ活用とセキュリティ戦略
ken5scal
1
280
LLM時代の検索とコンテキストエンジニアリング
shibuiwilliam
2
1k
[OCI Technical Deep Dive] OCIで生成AIを活用するためのソリューション解説(2025年8月5日開催)
oracle4engineer
PRO
0
130
R-SCoRe: Revisiting Scene Coordinate Regression for Robust Large-Scale Visual Localization
takmin
0
350
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.5k
kintone開発チームの紹介
cybozuinsideout
PRO
0
73k
GCASアップデート(202506-202508)
techniczna
0
230
生成AI活用のROI、どう測る? DMM.com 開発責任者から学ぶ「AI効果検証のノウハウ」 / ROI of AI
i35_267
4
140
形式手法特論:位相空間としての並行プログラミング #kernelvm / Kernel VM Study Tokyo 18th
ytaka23
3
1.6k
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
Agile that works and the tools we love
rasmusluckow
329
21k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Documentation Writing (for coders)
carmenintech
73
5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Practical Orchestrator
shlominoach
190
11k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
KATA
mclloyd
32
14k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Transcript
FlutterアプリのiOSビルドとアーカイブを CircleCI で自動化してみた 岡部恭平 / CO-OP Sapporo 2021.9.8 / ラクスR&D
Meetup - Flutter
自己紹介 生活協同組合コープさっぽろ デジタル推進本部 システム部 AWS・エンジニアリングチーム エンジニア 岡部恭平 @okabeeeat Webアプリケーションエンジニア
コープさっぽろDX 引用: https://dx.sapporo.coop/
最近やっていること • 社内ツール開発 ◦ Saasと社内システムの連携 ▪ Node.js + TypeScript ▪
AWSによるサーバレスな構成 • Developer eXperience の推進 ◦ CI/CDの構築、開発フローの整備、bot開発など
目次 • 背景 • 目的 • 方法 • 構成 •
まとめ
背景 ・・・ 引用: https://dx.sapporo.coop/n/n23376af197fa
背景 ・・・ 引用: https://dx.sapporo.coop/n/n23376af197fa
Flutter のプロジェクトが 始まったっぽい
そんな中 ビルドが辛いので自動化し たい! Aさんはビルドできるの に私はできません エンジニア なるほどね 私
目的 CI/CD環境を構築し、ビルドの自動化と属 人化の解消を実現する
作業スタート時 まぁアレだろ! Ruby on Rails や Vue CLI アプリのCI/CD 環境と似た感じなものを作れば良いんでしょ!
主な経験言語 Ruby, JavaScript, PHP
数時間後... 証明書って何? Apple Developer? Bitrise? Codemagic? CircleCIじゃダメなの? iOSビルドとアーカイブって何 が違うの? そもそも
Dart 触ったこと無 かったわ
内容を整理する • iOSアプリのビルド及び配布をするためには以下の工程が必要 ◦ Apple Developer アカウントの作成 ◦ ビルド ◦
証明書の作成・設定 ◦ アーカイブ ◦ 配布 • Flutterアプリ開発でよく使われてそうなCI/CDサービス ◦ Bitrise ◦ Codemagic ◦ GitHub Actions ◦ Cirrus CI(Dockerイメージでよく見かける) • CircleCI でもCI/CD環境を構築する方法はある(最近有料化したばっかりでして...)
そこからさらに調査...
方法 良さそうな方法が2つに絞られた ①CircleCI + fastlane ②CircleCI + Apple Store Connect
API + Codemagic CLI tools
①CircleCI + fastlane • 公式で紹介されている方法 • Apple Developerのアカウントが必要 • 証明書無しでiOSビルド
→ fastlane で証明書の生成・取得・設定 し、アーカイブを実行 • 証明書を管理するためのリポジトリが必要 ◦ え?証明書のためだけにリポジトリが必要なの!? fastlane とは? • iOS/Android のビルドやリリース作業を自動するツール
公式: https://flutter.dev/docs/deployment/ios#create-a-build-archive-with-codemagic-cli-tools ②CircleCI + Apple Store Connect API + Codemagic
CLI tools • 公式に書いてある方法を CircleCI で実行する方法 • Codemagic CLI tools + Apple Store Connect API で 証明書の取 得・設定をする ◦ Codemagic CLI tools 自体は無料で使える • 「flutter build ipa」でアーカイブまで一気に実行 • 証明書を管理するためのリポジトリが不要になりそう
どっちにしたの? ①CircleCI + fastlane ②CircleCI + Apple Store Connect API
+ Codemagic CLI tools
本当は②にしたかった... • ローカル環境(macOS)では成功 • CircleCI のコンテナデバッグで検証 ◦ macOS(xcode: 12.5.1)で失敗 •
惜しいところまでいったが時間切れに ◦ あと少し時間があったら..(言い訳) 検証用に仮で置いている (現在は削除済み)
気を取り直して①で進める
構成① 証明書管理リポジトリ
構成② iOSビルド構成
サンプルコード等 後日ブログ等にまとめます
結果 無事自動化できた🎉
結果 • ビルドが自動化された ◦ 本来の開発に集中できる • 属人化が解消された ◦ 誰かによる手動のビルド作業が無くなった ◦
開発者は Flutter のコードを push するだけで良い ◦ Apple Developer への登録も不要
今後やること • iOSアプリの配信の自動化 • Androidアプリのビルド・配信の自動化
まとめ • iOSアプリのビルドとアーカイブを CircleCI で自動化した • CI/CD環境の実現方法は CircleCI + fastlane
を採用した • FlutterというよりiOSアプリを配信するまでの作業をキャッチ アップできた
参考 • Continuous delivery with Flutter ◦ https://flutter.dev/docs/deployment/cd#integrating-fastlane-with-existing-workflows • Build
and release an iOS app ◦ https://flutter.dev/docs/deployment/ios#create-a-build-archive-with-codemagic-cli-tools • `flutter build ipa` でiOS向けのビルドとアーカイブを同時に実行 ◦ https://medium.com/flutter-jp/ipa-e176de0276c6 • CircleCI 2.1 と fastlane で Flutter の iOS と Android をビルドして DeployGate で配布する ◦ https://qiita.com/masashi-sutou/items/08c4d4eb5b9cb2dcd47a • fastlane match を使用して iOS の証明書管理を行う ◦ https://qiita.com/kotarella1110/items/840af2cf80aaea1fb035 • fastlaneでCode Signing StyleをAutomaticからManualに変更する ◦ https://tech.studyplus.co.jp/entry/2018/05/28/115637
ご清聴ありがとうございました