LoginSignup
0
0

More than 3 years have passed since last update.

【Flutter】Firebase環境構築(iOS/Android)

Last updated at Posted at 2020-11-13

参考文献

iOS編

1. Firebaseプロジェクト作成

Image from Gyazo

2. iOSアプリの追加

Image from Gyazo

  • iOSバンドルID

Image from Gyazo

3. GoogleService-Info.plist

Image from Gyazo

  • Xcodeプロジェクトに追加

Image from Gyazo

4.FlutterFire プラグインを追加する

  • firebase_core導入
dependencies:
  firebase_core: ^0.5.2

Image from Gyazo

  • cloud_firestore導入
dependencies:
  cloud_firestore: ^0.14.3

Image from Gyazo

Android編

1.Androidアプリの追加

Image from Gyazo

  • Androidパッケージ名
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="sample">

2.google-services.jsonの追加

Image from Gyazo

android/app
├── build.gradle
├── google-services.json  //追加
└── src

3.Firebase SDK の追加

android/build.gradle
dependencies {
    classpath 'com.google.gms:google-services:4.3.4'  //追加
  }
android/app/build.gradle
apply plugin: 'com.google.gms.google-services'  //追加
android/app/build.gradle
android {
    defaultConfig {
        ...
        minSdkVersion 15
        targetSdkVersion 28
        multiDexEnabled true
    }
    ...
}

dependencies {
  implementation 'com.android.support:multidex:1.0.3'
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0