Flutter 앱에 Firebase 추가

오픈소스·2024년 5월 6일
0

firebase

https://firebase.google.com/docs/cli?hl=ko

$ curl -sL https://firebase.tools | bash
Password:
-- Checking for existing firebase-tools on PATH...
-- Checking your machine type...
-- Downloading binary from https://firebase.tools/bin/macos/latest
######################################################################## 100.0%#=#=-#  #                                                                     
-- Setting permissions on binary...
-- Checking your PATH variable...
-- firebase-tools@13.8.0 is now installed
-- All Done!
$ firebase login

flutterfire

https://firebase.google.com/docs/flutter/setup?hl=ko

$ dart pub global activate flutterfire_cli
+ ansi_styles 0.3.2+1s... (1.0s)
+ args 2.5.0
+ async 2.11.0
+ boolean_selector 2.1.1
+ characters 1.3.0
+ ci 0.1.0
+ cli_util 0.4.1
+ clock 1.1.1
+ collection 1.18.0
+ dart_console 1.2.0 (4.1.0 available)
+ deep_pick 1.0.0
+ ffi 2.1.0 (2.1.2 available)
+ file 6.1.4 (7.0.0 available)
+ flutterfire_cli 1.0.0
+ http 0.13.6 (1.2.1 available)
+ http_parser 4.0.2
+ interact 2.2.0
+ intl 0.18.1 (0.19.0 available)
+ json_annotation 4.9.0
+ matcher 0.12.16+1
+ meta 1.14.0
+ path 1.9.0
+ petitparser 6.0.2
+ platform 3.1.4
+ process 4.2.4 (5.0.2 available)
+ pub_semver 2.1.4
+ pub_updater 0.2.4 (0.4.0 available)
+ pubspec 2.3.0
+ quiver 3.2.1
+ source_span 1.10.0
+ stack_trace 1.11.1
+ stream_channel 2.1.2
+ string_scanner 1.2.0
+ term_glyph 1.2.1
+ test_api 0.7.1
+ tint 2.0.1
+ typed_data 1.3.2
+ uri 1.0.0
+ win32 5.2.0 (5.5.0 available)
+ xml 6.5.0
+ yaml 3.1.2
Building package executables... (2.3s)
Built flutterfire_cli:flutterfire.
Installed executable flutterfire.
Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path.
You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.):

  export PATH="$PATH":"$HOME/.pub-cache/bin"

Activated flutterfire_cli 1.0.0.

firebase_options.dart

$ flutterfire configure             
? You have an existing `firebase.json` file and possibly already configured your project for Firebase. Would you prefer to reuse the values in your existing `firebase.json` fil
? You have an existing `firebase.json` file and possibly already configured your project for Firebase. Would you prefer to reuse the values in your existing `firebase.json` fil
✔ You have an existing `firebase.json` file and possibly already configured your project for Firebase. Would you prefer to reuse the values in your existing `firebase.json` file to configure your project? · no 
i Found 2 Firebase projects. Selecting project flutter-card-sms-app.                                                                                                            
✔ Which platforms should your configuration support (use arrow keys & space to select)? · android, ios, macos, web                                                              
i Firebase android app com.youngkiu.card_alarm registered.                                                                                                                      
i Firebase ios app com.youngkiu.cardalarm is not registered on Firebase project flutter-card-sms-app.                                                                           
i Registered a new Firebase ios app on Firebase project flutter-card-sms-app.                                                                                                   
i Firebase macos app com.youngkiu.cardAlarm is not registered on Firebase project flutter-card-sms-app.                                                                         
i Registered a new Firebase macos app on Firebase project flutter-card-sms-app.                                                                                                 
i Firebase web app card_alarm (web) is not registered on Firebase project flutter-card-sms-app.                                                                                 
i Registered a new Firebase web app on Firebase project flutter-card-sms-app.                                                                                                   

Firebase configuration file lib/firebase_options.dart generated successfully with the following Firebase apps:

Platform  Firebase App Id
web       1:12345678901:web:a123456789012345678901
android   1:12345678901:android:b123456789012345678901
ios       1:12345678901:ios:c123456789012345678901
macos     1:12345678901:ios:d123456789012345678901

Learn more about using this file and next steps from the documentation:
 > https://firebase.google.com/docs/flutter/setup

DefaultFirebaseOptions

$ ls -l lib/firebase_options.dart 
-rw-r--r--  1 youngkiu  staff  3191 May  6 15:49 lib/firebase_options.dart

참고)

0개의 댓글