Skip to content

Instantly share code, notes, and snippets.

@yatemmma
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yatemmma/48ae98d0184935a67d7e to your computer and use it in GitHub Desktop.
Save yatemmma/48ae98d0184935a67d7e to your computer and use it in GitHub Desktop.
HerokuでDeployGateやってみた
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>HerokuでDeployGateやってみた</title>
<link rel="stylesheet" href="//cdn.jsdelivr.net/reveal.js/2.6.2/css/reveal.min.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/reveal.js/2.6.2/css/theme/default.css" id="theme" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/reveal.js/2.6.2/lib/css/zenburn.css" />
<style>
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
text-transform: none !important;
}
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-markdown data-separator="^\n\n\n" data-vertical="^\n\n" data-notes="^Note:">
<script type="text/template">
## HerokuでDeployGateやってみた
## 自己紹介
![yatemmma](https://avatars3.githubusercontent.com/u/998583?v=3&s=230)
* 八島 正憲(@yatemmma)
* 株式会社LASSICでiOSアプリとか泣きながら作っています
* 【前回】先日Ruby Gold受験しましたが72点で惜敗。。。
* 【今回】先日Ruby Gold受験しましたが74点で惜敗。。。
## 心が折れました
## 今日の話
iOSアプリの受け入れテスト(ユーザテスト)のためにベータ版を配布する
## リリース前のベータ版iOSアプリを配布するまで
* (1) 端末のUDID調べる
* (2) iOS Dev CenterでDevice登録する
* (3) provisioning profile作る
* (4) ipaファイルビルドする
* (5) 端末にインストール
iOSの開発ライセンスは100台までのデバイス登録ができる
登録されたデバイスでしか実機検証ができない
## 問題
テスター(お客様)は情報リテラシーが低い!(ことが多い!)
## よくあるやりかた
## (1) UDID調べる
* iTunesにつないで調べる
* 一度クリックしないとでてこないクソ仕様
* XcodeのOrganizerから調べる
* Xcodeなにそれおいしいの
* 専用のアプリ入れる
* 仕様が変わってほぼ全滅
## (5) 端末にインストール
* iTunesにつないでインストール
* 開発者の僕でも使いにくいクソUI(僕は情報リテラシーが低い!)
## 結果
* インストールできませんでしたー!
* バージョンは?機種は?UDIDあってますか?
お客様先でいたたまれない空気に。。。
## 神サービスの登場
DeployGate
https://deploygate.com/
* 配布余裕
* ログ収集
* テスターコメント
* いたれりつくせり
* iOSもAndroidもいける
* (そこそこお高い)
自分で作れない?どういう仕組み?
=> 調べてみた
(あれTestFlightは?)
* Appleに買収されていまひとつなサービスに
* 全部英語で障壁高い
* iOS8以降のみ対象
* DeployGateに持って行かれた感
## できたこと
* (1) UDID調べる
* => web経由でUDIDを取得
* (5) 端末にインストール
* => web経由のOTA(Over The Air)配布
* (2) iOS Dev CenterでDevice登録する
* (3) provisioning profile作る
* (4) ipaファイルビルドする
* => 自動化!(まだやってない)
## (1) UDID調べる
iPhone 構成ユーティリティ
https://developer.apple.com/jp/documentation/FA_iPhone_Configuration_Utility.pdf
iPhone端末の設定を一括で行うための仕組み。
端末でプロファイルをインストールすると、情報をサーバに送ったり設定を変更したりできる。
Safariのみ対応
## 取得できる情報例
```
"UDID"=>"048c85b70e24a1f9722fa91149b63fc1b5a6c21f"
"IMEI"=>"35 206206 786214 8" # 携帯電話に付与される識別番号
"VERSION"=>"12F70"
"PRODUCT"=>"iPhone7,1"
"MEID"=>"35206206786214" # CDMA系の移動機識別子
"SERIAL"=>"F2LNCUQ0G5QR"
```
## プロファイル
プロファイルはplist形式で記載する
https://github.com/yatemmma/try-this/blob/master/views/udid_mobileconfig.erb
## (5) 端末にインストール
ネット経由でダウンロード・インストールするいわゆるAdd-HocアプリのOTA(Over The Air)配布
SSL/サーバ証明書必須
```
itms-services://?action=download-manifest&url=https://try-this.herokuapp.com/manifest.plist
```
## マニフェスト
マニフェストはplist形式で記載する
https://github.com/yatemmma/try-this/blob/master/views/manifest_plist.erb
## (2)(3) Device登録・provisioning profile
Cupertino(クパチーノ)
https://github.com/nomad/Cupertino
```
$ ios devices:add "iPad 1"=abc123
$ ios profiles:devices:add MyApp_Development_Profile "Johnny Appleseed iPad"=0123456789012345678901234567890123abcdef "Johnny Appleseed iPhone"=abcdef0123456789012345678901234567890123
```
(できるはず)
## (4) ipaファイルビルドする
```
$ /usr/bin/xcodebuild -target Hoge -configuration Debug build CONFIGURATION_BUILD_DIR=./app
$ /usr/bin/xcrun -sdk iphoneos PackageApplication -v /path/to/app -o /path/to/ipa
```
## 組み合わせてChatOpsするとこうなる(はず)
* ユーザがUDID取得用のURLにアクセス
* チャットに通知
* チャットで承認
* CupertinoでDevice自動登録
* ipaファイル自動ビルド
* 公開ページに自動アップロード
* ユーザがダウンロード
## 気をつけたいこと
* セキュリティ
* アクセスから一定時間のみ有効
* ダウンロードされたら削除
* 一時URLを生成
* 認証
## まとめ
ユーザのリテラシーに合わせて柔軟に構築ができるのでは
=> めんどくさいのでDeployGateを使おう
## 試してみたいこと
* そもそも通しで動かしてみる
* Androidの配布
https://try-this.herokuapp.com/
ご清聴ありがとうございました!
</script>
</div>
</div>
<script src="//cdn.jsdelivr.net/reveal.js/2.6.2/lib/js/head.min.js"></script>
<script src="//cdn.jsdelivr.net/reveal.js/2.6.2/js/reveal.min.js"></script>
<script>
Reveal.initialize({
controls: false,
theme: 'moon',
transition: 'default',
dependencies: [
{ src: '//cdn.jsdelivr.net/reveal.js/2.6.2/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: '//cdn.jsdelivr.net/reveal.js/2.6.2/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '//cdn.jsdelivr.net/reveal.js/2.6.2/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '//cdn.jsdelivr.net/reveal.js/2.6.2/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '//cdn.jsdelivr.net/reveal.js/2.6.2/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: '//cdn.jsdelivr.net/reveal.js/2.6.2/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment