Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
190
GASを使って非エンジニアが AWS Step Functions を 操作できる仕組みの紹介 / Introducing how non-engineers can operate AWS Step Functions using GAS
bake0937
1
530
CircleCI の有料プランを導入するためにやったこと/What I did to introduce CircleCI's paid plan
bake0937
0
1.9k
Probot で学ぶ TypeScript / Learn with Probot TypeScript
bake0937
0
230
Amazon ECR を利用していたと思ったら、Docker Hub を利用し続けていた / If I thought I was using Amazon ECR, I continued to use Docker Hub
bake0937
0
1.1k
Jest + Puppeteer によるE2Eテストで確認作業を短縮してみた / End-to-end testing by Jest + Puppeteer shortened the confirmation work
bake0937
0
770
所属企業の Advent Calendar を初めて作った時に学んだこと / What I learned when I first created my company's Advent Calendar
bake0937
1
900
Notion 📚 へ移行して 3ヶ月経った振り返り / Looking back at Notion after 3 months
bake0937
0
6k
Bot開発でRubyを学ぶ / Learn Ruby with Bot Development
bake0937
0
520
Other Decks in Technology
See All in Technology
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
130
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
870
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
120
go-sqletch
moznion
0
140
Loop Engineering これくらいでいい
mikanichinose
0
230
パッチ更新でterraform initが落ちた日
grimoh
1
120
今こそ知りたいAmplifyGen2
mkdev10
2
160
全人類(ほぼ)AWS Organizations の上でAWSを利用している、その世界を知る話
htan
1
140
子育てエンジニアの可処分時間が減っても成長を諦めない戦い方
sudoakiy
6
4.5k
生成AIと進める探索的データ分析(2026.10.03 第122回Tokyo.R勉強会)
tatamiya
2
1.5k
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
0
540
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
140
Featured
See All Featured
Being A Developer After 40
akosma
92
590k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
260
Practical Orchestrator
shlominoach
192
12k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Agile that works and the tools we love
rasmusluckow
331
22k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Exploring anti-patterns in Rails
aemeredith
4
530
Building AI with AI
inesmontani
PRO
1
1.3k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Skip the Path - Find Your Career Trail
mkilby
1
250
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
ご清聴ありがとうございました