「Ios/swift/外部ライブラリ/Firebase」の版間の差分

提供: 初心者エンジニアの簡易メモ
ナビゲーションに移動 検索に移動
編集の要約なし
7行目: 7行目:
  end
  end
  $ pod install
  $ pod install
==設定リストファイル取得==
#https://firebase.google.com
#アプリを追加/iosを選択
#GoogleService-Info.plistのダウンロード
#以下コードを追加
-AppDelegate.swift
import UIKit
import Firebase // 追加
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?
    var navigationController: UINavigationController!
    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        FIRApp.configure() // 追加
        return true
    }

2016年7月28日 (木) 14:05時点における版

インストール

$ vi Podfile
platform :ios, '9.0'
target 'Helloworld' do
 use_frameworks!
 pod 'Firebase'
end
$ pod install

設定リストファイル取得

  1. https://firebase.google.com
  2. アプリを追加/iosを選択
  3. GoogleService-Info.plistのダウンロード
  4. 以下コードを追加

-AppDelegate.swift

import UIKit
import Firebase // 追加
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
   var window: UIWindow?
   var navigationController: UINavigationController!
   func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
       FIRApp.configure() // 追加
       return true
   }