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
OK Google, Deploy the iOS app
Search
asmz
March 26, 2019
Technology
1
860
OK Google, Deploy the iOS app
OK Google, iOSアプリをデプロイして
Talked at GCPUG Sendai #1
asmz
March 26, 2019
Tweet
Share
More Decks by asmz
See All by asmz
React Native+Expoで始めるWebフロント開発
asmz
0
240
UIデザインを考える全ての人たちに捧げる Apple Human Interface Guidelinesのススメ
asmz
1
2.2k
Overview of Swift and iOS App development
asmz
0
1.2k
How to get mobile app logs using Firebase Crashlytics
asmz
0
840
Cooperate with Adobe XD, Zeplin and Xcode
asmz
1
3.1k
phpconsen LT
asmz
0
720
SWWDC 39
asmz
1
230
Create voice assistant app by Dialogflow
asmz
0
830
SWWDC 34
asmz
0
710
Other Decks in Technology
See All in Technology
バクラクのモノレポにおける AI Coding のための環境整備と {Roo,Claude} Code活用事例 / AI Coding in Bakuraku's Monorepo: Environment Setup & Case Studies with {Roo, Claude} Code
upamune
8
4.4k
上長や社内ステークホルダーに対する解像度を上げて、より良い補完関係を築く方法 / How-to-increase-resolution-and-build-better-complementary-relationships-with-your-bosses-and-internal-stakeholders
madoxten
6
1.6k
Whats_new_in_Podman_and_CRI-O_2025-06
orimanabu
3
150
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
48
33k
New Cache Hierarchy for Container Images and OCI Artifacts in Kubernetes Clusters using Containerd / KubeCon + CloudNativeCon Japan
pfn
PRO
0
110
AI Engineering Summit Pre Event LT #10
okaru
2
500
型システムを知りたい人のための型検査器作成入門
mame
13
3.1k
Long journey of Continuous Delivery at Mercari
hisaharu
0
140
プロジェクトマネージャーに最後まで残るたった一つの仕事は交渉
ichimichi
1
190
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
Web Intelligence and Visual Media Analytics
weblyzard
PRO
1
6.1k
Securing your Lambda 101
chillzprezi
0
150
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
34k
Visualization
eitanlees
146
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
42
2.4k
Being A Developer After 40
akosma
90
590k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Designing for Performance
lara
609
69k
Balancing Empowerment & Direction
lara
1
110
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Documentation Writing (for coders)
carmenintech
71
4.8k
Transcript
OK Google, iOSアプリをデプロイして 2019/03/26 GCPUG Sendai #1 Akira Shimizu /
asmz 1
2 誰なのか? • Akira Shimizu / asmz (@_asmz) • https://asmz.beer/
• 株式会社ビデオマーケット 仙台オフィス • iOSエンジニア • GCP周辺技術が割と好き ◦ Firebase、Actions on Google etc...
3 今回やってみたこと
4 今回やってみたこと 開発中のアプリベータ 版、最新版が欲しいんだ けど... う〜ん、 起きたくない...zzZ
5 今回やってみたこと OK Google, iOSアプリをデプロイし て〜 ワカリマシタ
6 今回やってみたこと Zzz... デプロイガ オワリマシタヨ きたきた〜 わ〜い
7 本日の材料
iOSアプリCI/CD 本日の材料 Actions on Google 物理デバイス 8 Google Home Raspberry
Pi Cloud IoT Core Cloud Datastore Cloud Functions Bitrise Google Assistant Dialogflow
9 下ごしらえ
10 下ごしらえ • まずはiOSアプリCI環境を構築します Push Hook delivery (development) upload -
Code signing - Provisioning - Build (production) download 省 略
11 下ごしらえ • デプロイに必要なもの ◦ 対象ブランチ ◦ BitriseのWorkflow • Workflowとは
◦ ビルドに必要な一連の作業フ ローを定義したもの ◦ 開発用、本番用などビルドの 種類分用意する
12 下ごしらえ • 対象ブランチとWorkflowが決まれば、Webhook URLでCIタスクをKickすることが可能!
13 システム構築
14 User Devices Mobile App CI/CD Google Home Actions on
Google Raspberry Pi Cloud IoT Core Cloud Datastore Cloud Functions Cloud Functions Bitrise Google Assistant Dialogflow 全体構成
15 【往路】 Google Home→ デプロイ開始
16 Google Home→ デプロイ開始 16 User Devices Mobile App CI/CD
Google Home Actions on Google Cloud Datastore Cloud Functions Bitrise Google Assistant Dialogflow POINT!
• Dialogflowとは ◦ 自然言語解析エンジン ◦ 人間の普通の会話形式の言葉を聞き取り、解析 ◦ Googleアシスタント用アプリの開発プラットフォーム「Actions on Google」に統合
17 音声アシスタント接続、言語解析 Google Home Google Assistant Server Dialogflow
音声アシスタント接続、言語解析 • Entity定義 ◦ 発話内容をパラメータ値にマッピング 18 発話内容 パラメータ値
音声アシスタント接続、言語解析 • Intent定義 ◦ 音声アシスタントのメインフローを定義 19 音声アシスタントが POSTに必要なパラメー タ値を聞き出す
音声アシスタント接続、言語解析 • Fulfillment定義 ◦ 必要なパラメータ取得後に行う処理を定義 20 今回はCloud Functionsへ Webhookするよう設定
21 解析したパラメータをBitriseへPOST 21 User Devices Mobile App CI/CD Google Home
Actions on Google Cloud Datastore Cloud Functions Bitrise Google Assistant Dialogflow ① パラメータ: branch, workflow ② Webhook URLへ POST ③ Bitriseレスポンスの「ビ ルド番号」保存
22 【復路】 デプロイ終了 → Google Home
23 デプロイ終了 → Google Home User Devices Mobile App CI/CD
Google Home Raspberry Pi Cloud IoT Core Cloud Datastore Cloud Functions Bitrise POINT!
Cloud IoT Coreとは 24 • GCPから各種IoTデバイスと接続・管理・データ取り込 みなどを行えるフルマネージドサービス ◦ クラウド⇔デバイス双方向通信が可能 Cloud
IoT Core 各種IoTデバイス・センサー HTTPS / MQTT
Cloud IoT Coreとは 25 • レジストリ作成 利用するプロトコル 端末からの上りイベント を流すPub/Subトピック
Cloud IoT Coreとは 26 • 端末定義 デバイス側でキーペアを 作成し、公開鍵をコン ソールに設定
Cloud IoT Coreとは 27 • デバイス側MQTTクライアント設定(ex. Node.js)
Cloud IoT Coreとは 28 • デバイス側MQTTクライアント設定(ex. Node.js) • これでクラウド⇔デ バイス双方向通信
が可能に!
29 デプロイ終了通知をIoT Coreへ伝達 User Devices Mobile App CI/CD Google Home
Raspberry Pi Cloud IoT Core Cloud Datastore Cloud Functions Bitrise ① パラメータ: ビルド番号 ② ビルド番号存在 チェック ③ メッセージ(ビルド番 号)送信
30 Raspberry Piで通知受信、発話 User Devices Mobile App CI/CD Google Home
Raspberry Pi Cloud IoT Core Cloud Datastore Cloud Functions Bitrise
Raspberry Piで通知受信し発話 31 • 「google-home-notifier」で同一ネットワーク内のGoogle Homeへ発話指示 ◦ https://github.com/noelportugal/google-home-notifier
32 完成!
成果物 33 ビルド番号 373 番の デプロイがおわりましたよ 約10分後
34 感想・まとめ
35 やってみての感想 • 定型的な作業向き ◦ ベータ版アプリの再配布 ◦ 環境違いのベータ版の配布 など • リスク低な作業向き
◦ リリースビルドなど間違えたくないデプロイは音声より文字 での確認の方がしやすい
36 やってみての学び • アイデア次第でいろんなことに応用できそう • Cloud IoT Coreを使った、クラウドから物理デバイス との双方向通信は、結構応用が効きそう ◦
重度障害発生時に音で知らせる、パトランプ回す ◦ Webからの家電操作(ラズパイ+赤外線リモコン) 便利な使い方あれば、 ぜひGCPUG Sendaiで発表を!
37 Enjoy Engineering! 2019/03/26 GCPUG Sendai #1 Akira Shimizu /
asmz
38 [PR] 個人開発アプリのご紹介 • ITイベント・勉強会検索アプリ「EVENTech」 ◦ connpass検索機能使えなくて不便ですよね... ◦ あります、検索機能。 ◦
https://eventech.asmz.beer/