You feel like you used it properly with
9/28/2016
@mfks17
ISAO Meetup #5
#ISAOcorp
🆔mfks17
♑️Motohiko Fukase
🇯🇵Kanagawa, Japan
🔗http://mfks17.org
🏢ISAO Corporation
#ISAOcorp
自己紹介
Contribution🌟
https://github.com/mfks17/bitbar-plugin-github-trending
#ISAOcorp
Question❓❔
#ISAOcorp
Firebase
バリバリ使ってます🔥
#ISAOcorp
AST対応✅
#ISAOcorp
Xcode8, Swift3, iOS10
📱
#ISAOcorp
🙋🙆🙅
アジェンダ
• Firebaseの概要
• Firebaseの組み込み方法
• TIPS
#ISAOcorp
話さない事
• Androidの事😱
• Hacking
• 導入してどうだったか
#ISAOcorp
アジェンダ
• Firebaseの概要
• Firebaseの組み込み方法
• TIPS
#ISAOcorp
その前に
• Firebaseはなにが良いのか
• メリット
• 似たサービス
#ISAOcorp
• Firebaseはなにが良いのか
?
https://firebase.google.com/
#ISAOcorp
メリット
• 沢山の機能を単一の画面で管理できる
• バックエンドのサーバ構築運用を丸投げできる
• モバイル側の実装に集中できる
• Push、Crash reporting、Analytics、etc..,
アプリ開発に必要な機能が1通りそろっている
#ISAOcorp
頑張って欲しいところ
• アカウントの権限が柔軟に指定できない
• Googleさん色々に委ねる
• Chatツールなどの連携
似たサービス
• ニフティクラウド mobile backend
• Repro
#ISAOcorp
ニフティクラウド mobile backend
Repro
アジェンダ
• Firebaseの概要
• Firebaseの組み込み方法
• TIPS
#ISAOcorp
Firebaseの概要
・Firebaseは、Googleが約2年前に買収
したBackend as a Service(BaaS)、モ
バイルプラットフォームです🚀
・今回のGoogle/IOで2.0になり機能が
強化されました🎉
#ISAOcorp
Firebaseの概要
• Firebaseの機能
• 完全無料
• プランにより有料
#ISAOcorp
完全無料
・Firebase Analytics
・Firebase App Indexing
・Firebase Authentication
・Firebase Dynamic Links
・Firebase Invites
・Firebase Notifications
・Firebase Crash Reporting
・Firebase Remote Config
#ISAOcorp
プランによって変動
・Firebase Realtime Database
・Firebase Storage
・Firebase Hosting
・Test Lab
・Firebase Cloud Messaging(FCM)
#ISAOcorp
3つのプラン
・十分に利用できる無料プラン
・月額が予測可能な初期スタートアップ向けの
固定レートプラン
・大規模アプリ対応の従量プラン
#ISAOcorp
https://firebase.google.com/pricing/
Firebaseの料金体系 #ISAOcorp
https://firebase.google.com/pricing/
Firebaseの料金体系 #ISAOcorp
Firebaseの料金体系 #ISAOcorp
https://firebase.google.com/pricing/
アジェンダ
• Firebaseの概要
• Firebaseの組み込み方法
• TIPS
#ISAOcorp
Firebaseの組み込み方法
• Firebase Notificationsの例
#ISAOcorp
https://goo.gl/UHs1GM
Firebaseの組み込み方法
• 手順
• App IDの発行
• Xcodeでプロジェクトを作成
• Firebaseのconsoleでアプリを登録する
• Xcodeでプロジェクトの設定をする
• Firebase consoleでの設定
• Push通知を送る
#ISAOcorp
Firebaseの組み込み方法
• App IDの作成
• iOS Developer CenterのCertificates, Identifiers &
ProfilesでApp IDを発行
#ISAOcorp
Firebaseの組み込み方法
• Firebaseのconsoleでアプリを登録する
https://console.firebase.google.com/
#ISAOcorp
Firebaseの組み込み方法
#ISAOcorp
Firebaseの組み込み方法
bundle ID (App Store ID)を入力
#ISAOcorp
Firebaseの組み込み方法
plistファイルをDL
#ISAOcorp
Firebaseの組み込み方法
各機能毎にplistのDLを要求されるので、その都度最新の
ファイルをプロジェクトに組み込む必要がある
#ISAOcorp
Firebaseの組み込み方法
• ライブラリのDL
• Cocoa pods
• pod install
#ISAOcorp
Firebaseの組み込み方法
D&Dする
#ISAOcorp
Firebaseの組み込み方法
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[NSObject: AnyObject]?) -> Bool {
FIRApp.configure()
let types: UIUserNotificationType =
[UIUserNotificationType.Badge,
UIUserNotificationType.Alert,
UIUserNotificationType.Sound]
let settings: UIUserNotificationSettings =
UIUserNotificationSettings( forTypes: types, categories: nil )
application.registerUserNotificationSettings( settings )
application.registerForRemoteNotifications()
return true
}
#ISAOcorp
Firebaseの組み込み方法
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[NSObject: AnyObject]?) -> Bool {
FIRApp.configure()
let types: UIUserNotificationType =
[UIUserNotificationType.Badge,
UIUserNotificationType.Alert,
UIUserNotificationType.Sound]
let settings: UIUserNotificationSettings =
UIUserNotificationSettings( forTypes: types, categories: nil )
application.registerUserNotificationSettings( settings )
application.registerForRemoteNotifications()
return true
}
#ISAOcorp
Firebaseの組み込み方法
#ISAOcorp
func registerForPushNotifications(application: UIApplication) {
let settings: UIUserNotificationSettings =
UIUserNotificationSettings(forTypes: [.Alert,
.Badge,
.Sound],
categories: nil)
application.registerUserNotificationSettings(settings)
application.registerForRemoteNotifications()
}
func tokenRefreshNotificaiton(notification: NSNotification) {
let refreshedToken = FIRInstanceID.instanceID().token()!
}
ttps://gist.github.com/mfks17/54839374f088f28b9b7fc803ad467cf
Firebaseの組み込み方法
• コンソール画面でアプリのプロジェクトのセッティ
ングを行う
• 証明書をDev,Prodそれぞれの環境毎にアップロー
ドする
#ISAOcorp
Firebaseの組み込み方法
#ISAOcorp
Firebaseの組み込み方法
• こんな感じでシンプルなPush通知を送る事ができ
ます。
#ISAOcorp
Firebaseの組み込み方法
• まとめ
• App IDの発行
• Xcodeでプロジェクトを作成
• Firebaseのconsoleでアプリを登録する
• Xcodeでプロジェクトの設定をする
• Firebase consoleでの設定
• Push通知を送る
#ISAOcorp
アジェンダ
• Firebaseの概要
• Firebaseの組み込み方法
• TIPS
#ISAOcorp#ISAOcorp
iOS 10、Xcode 8、Swift 3
• Dynamic Links、Invites、App Indexing
• アプリの再ビルドのみでOK
• Firebase Analytics
• 新しいライブラリでビルドすればOK
• Firebase Cloud Messaging
• 近々対応予定
• サンプルコードのSwift3化は近々対応予定
https://googledevjp.blogspot.jp/2016/09/ios-10-xcode-8-and-swift-3.html
#ISAOcorp
iOS 10、Xcode 8、Swift 3
• Dynamic Links、Invites、App Indexing
• アプリの再ビルドのみでOK
• Firebase Analytics
• 新しいライブラリでビルドすればOK
• Firebase Cloud Messaging
• 近々対応予定👍
• サンプルコードのSwift3化は近々対応予定👍
https://googledevjp.blogspot.jp/2016/09/ios-10-xcode-8-and-swift-3.html
#ISAOcorp
iOS 10、Xcode 8、Swift 3
• Dynamic Links、Invites、App Indexing
• アプリの再ビルドのみでOK
• Firebase Analytics
• 新しいライブラリでビルドすればOK
• Firebase Cloud Messaging
• 近々対応予定👍
• サンプルコードのSwift3化は近々対応予定👍
https://googledevjp.blogspot.jp/2016/09/ios-10-xcode-8-and-swift-3.html
#ISAOcorp
対応必要
アップデートドキュメント参照
サンプルコード
• https://github.com/firebase
• なかの人がメンテしている
• 手元で確認はしていないが、Swift3に対応してい
る旨のコミットコメントあり
#ISAOcorp
参照
• Firebaseに関する投稿 - Qiita
• Firebase (@Firebase) | Twitter
• スマホアプリ開発を加速する,Firebaseを使ってみ
よう
• Firebase Google Group
#ISAOcorp
まとめ
• まだまだ、再スタートをして約半年🚼
• Googleさんの今後にご期待ください😎
• Googleさんのレールに乗る事になるが、
アプリのコンテキストを考慮して、導入出来る
所は導入していきたい🔥
#ISAOcorp
ご静聴ありがとうございました😄
#ISAOcorp
We are hiring!🙌🙌🙌
https://www.isao.co.jp/recruit/
#ISAOcorp
QA🤔
#ISAOcorp

使った気になれるFirebase

Editor's Notes

  • #5 富士山に登るとご利益があるとされているが、60年に1度の庚申年に富士山に登るとそのご利益 が著しく高いとされている。「1回の登山で33回分のご利益がある」と言われることもあるそうだ。12年に一度訪れる「申年」を「小縁年」と呼び、他の干支に比べるとめでたい年とされている。ちなみに次回の次回の庚申御縁年の年は2040年。
  • #11 業務でバシバシ、Firebaseを使っているかたは新しい発見はないかもしれません。
  • #54 これからも、Firebaseの情報があれば、Qiitaなどに投稿してきたいと思いますのでよろしくお願いします。