<aside> 💡 파이어베이스를 사용해서 email기반의 회원 가입, 로그인 기능 구현

</aside>

How to use firebase

https://firebase.google.com/docs/ios/setup

  1. firebase console - 프로젝트 추가 - resister ios app

  2. Download GoogleService-Info.plist

  3. add firebase sdk using cocoapod in podfile

  4. pod install

  5. open xcworkspace file

  6. AppDelegate add code

    //AppDelegate.swift
    
    import UIKit
    import Firebase //import 추가!
    
    @UIApplicationMain
    class AppDelegate: UIResponder, UIApplicationDelegate {
    
      var window: UIWindow?
    
      func application(_ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions:
          [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        FirebaseApp.configure() //이부분 추가 !!
        return true
      }
    }
    

gitignore?

https://stackoverflow.com/questions/44937175/firebase-should-i-add-googleservice-info-plist-to-gitignore

warning⚠️

[!] Automatically assigning platform `iOS` with version `13.0` on target
 `Flash Chat iOS13` because no platform was specified. 
Please specify a platform for this target in your Podfile.
 See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

podfile에서 타겟의 버전을 특정짓지 않았을 경우 자동적으로 선택해주는 메세지
podfile 2번째 줄에서 최소사양을 설정해주면 나오지 않는다.

------------------------------------------------------

[!] The platform of the target `Flash Chat iOS13` (iOS 9.0) may not be compatible with `Firebase/Auth (8.3.0)` which has a minimum requirement of iOS 10.0 - macOS 10.12 - tvOS 10.0 - watchOS 6.0.
[!] The platform of the target `Flash Chat iOS13` (iOS 9.0) may not be compatible with `Firebase/Firestore (8.3.0)` which has a minimum requirement of iOS 10.0 - macOS 10.12 - tvOS 10.0.
[!] The platform of the target `Flash Chat iOS13` (iOS 9.0) may not be compatible with `FirebaseAuth (8.3.0)` which has a minimum requirement of iOS 10.0 - macOS 10.12 - tvOS 10.0 - watchOS 6.0.
[!] The platform of the target `Flash Chat iOS13` (iOS 9.0) may not be compatible with `FirebaseFirestore (8.3.0)` which has a minimum requirement of iOS 10.0 - macOS 10.12 - tvOS 10.0.

설정해준 타겟의 버전과 현재 사용중인 프레임워크와의 버전이 맞지않아서 발생하는 에러
최소사양을 9.0에서 10.0이상으로 올려주면 된다.

What can i do use Firebase?

Registering New Users

https://firebase.google.com/docs/auth/ios/start