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
170
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
「今盗んで、後で解く」に備える ― AWSのポスト量子暗号入門
yama3133
1
160
Goodbye ShellScript, Hello File-based App
shunsock
0
870
AIエージェントの自己改善をどう設計するか / How to Design Self-Improvement for AI Agents
22mi
26
17k
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
280
Antigravity SDK for the Java Developer
glaforge
0
180
Railsのように考える: See through the Master
snoozer05
PRO
5
1.3k
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
1
3.2k
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
4
2.1k
開発投資の期待値を上げるプロダクトロードマップづくり ~プロダクトエンジニアが越境して事業を伸ばす~
kekekenta
1
240
ScotSecure West 2026 - Glasgow
raybugg
0
160
.NET WebAssemblyで実現するクライアントサイドAI推論:NuGetからViteまで、2つのエコシステムを繋ぐビルド戦略
yamachu
1
660
おい、エージェントを使って終わらせろ
nwiizo
3
870
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
310
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
510
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
670
From π to Pie charts
rasagy
1
380
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
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
ご清聴ありがとうございました