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
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by bake0937
See All by bake0937
デフォルト運用のCodeRabbit、1年で何が変わったか / How CodeRabbit Changed Our Code Review in 1 Year
bake0937
1
120
GASを使って非エンジニアが AWS Step Functions を 操作できる仕組みの紹介 / Introducing how non-engineers can operate AWS Step Functions using GAS
bake0937
1
510
CircleCI の有料プランを導入するためにやったこと/What I did to introduce CircleCI's paid plan
bake0937
0
1.8k
Probot で学ぶ TypeScript / Learn with Probot TypeScript
bake0937
0
210
Amazon ECR を利用していたと思ったら、Docker Hub を利用し続けていた / If I thought I was using Amazon ECR, I continued to use Docker Hub
bake0937
0
1k
Jest + Puppeteer によるE2Eテストで確認作業を短縮してみた / End-to-end testing by Jest + Puppeteer shortened the confirmation work
bake0937
0
740
所属企業の Advent Calendar を初めて作った時に学んだこと / What I learned when I first created my company's Advent Calendar
bake0937
1
880
Notion 📚 へ移行して 3ヶ月経った振り返り / Looking back at Notion after 3 months
bake0937
0
6k
Bot開発でRubyを学ぶ / Learn Ruby with Bot Development
bake0937
0
500
Other Decks in Technology
See All in Technology
Databricks 月刊サービスアップデート 2026年05月号
tyosi1212
0
210
個人最適 から 全体最適 へ AI情報共有会・AIギルド・AI-DLC で進める カンリーの組織展開
rfdnxbro
0
1.9k
2026.06.13_AI時代に事業会社が「SIer出身エンジニア」を求める理由 / Why Businesses Seek Engineers with a System Integrator Background in the AI Era
jumtech
0
820
noUncheckedIndexedAccess、3時間、1万円。 / noUncheckedIndexedAccess, 3 Hours, 10,000 JPY.
kaonavi
1
330
ABEMA の Datadog × OTel 基盤、 中から見るか? 外から見るか?
tetsuya28
0
110
ITエンジニアを取り巻く環境とキャリアパス / A career path for Japanese IT engineers
takatama
4
1.8k
Dario Amodi『Policy on the AI Exponential』を理解する
nagatsu
0
200
非定型業務をAI slackbotで自動化する ~ 社内要望を自動壁打ちするbotを作った ~/automating-ad-hoc-work-with-ai-slackbot
shibayu36
0
150
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.8k
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
150
Agentic Web
dynamis
1
180
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
110
Featured
See All Featured
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Color Theory Basics | Prateek | Gurzu
gurzu
0
360
Code Review Best Practice
trishagee
74
20k
Building the Perfect Custom Keyboard
takai
2
780
It's Worth the Effort
3n
188
29k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
290
Skip the Path - Find Your Career Trail
mkilby
1
140
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
240
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
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
ご清聴ありがとうございました