Ref.
Cloud Firestore 청구 이해 | Firebase
curl -sL https://firebase.tools | bash
firebase login
firebase projects:list
curl -sL https://firebase.tools | upgrade=true bash
firebase init
firebase init
명령어를 실행해도 새 디렉터리가 생성되지 않습니다. 새 앱을 시작하는 경우 먼저 디렉터리를 만든 후 이 디렉터리 내에서 firebase init
명령어를 실행해야 합니다.초기화 작업 후 아래 두개에 해당하는 파일 생성됨.
firebase init 할때 꼭 스페이스바로 선택해서 엔터치기 !!
실행과정 중 하나
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
/*-----------------------------------
FireBase 에뮬레이터 사용시 주석 제거
----------------------------------*/
//스토리지
Storage.storage().useEmulator(withHost:"127.0.0.1", port:9199)
//인증관련
Auth.auth().useEmulator(withHost:"127.0.0.1", port:9099)
//파이어스토어
let settings = Firestore.firestore().settings
settings.host = "127.0.0.1:8080"
settings.isSSLEnabled = false
Firestore.firestore().settings = settings
return true
}
func application(_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
return GIDSignIn.sharedInstance.handle(url)
}
}
brew install --cask adoptopenjdk 혹은 brew install microisoftOpenJdk => ??
firebase emulators:start
curl localhost:4400/emulators
firebase emulators:export seed
firebase emulators:import seed
firebase emulators:start --import data --export-on-exit
match /경로/{anything=**}
FireStore 설정에 들어가서 적용.