TIL: RN | react native firebase ios 연동 (2) -221114

Lumpen·2022년 11월 16일
0

TIL

목록 보기
188/242

iOS

iOS 인증서 생성

firebase 프로젝트 생성

앱 등록 시 iOS 번들 ID 입력 란에
XCode - 프로젝트 명 - General - Bundle Identifier
에 적혀있는 com. 를 똑같이 입력해야 한다
수정하지 않았다면 org.~~~ 로 되어있을텐데
xcode 에서 변경하는 편이 좋을듯

구성 파일 다운로드 / 등록

GoogleService-Info.Plist
를 다운로드 후
XCode 에서 .xcodeproj 파일로 프로젝트를 연다
프로젝트 명으로 작성되어있는 폴더에 삽입

Copy items if needed 와 Create groups 를 체크 후 Finish

iOS SDK 세팅

XCode - .xcodeproj 파일 내에서
프로젝트 명으로 작성된 폴더 내부의 AppDelegate.m 혹은 mm
파일을 연다

AppDelegate.m

파일 최 상단에
#import <Firebase.h> 코드 추가

didFinishLaunchingWithOptions 함수 내부 최 상단에
[FIRApp configure]; 코드 추가

Podfile

pod file 내부 첫번째 target '프로젝트명' do 내부에

config = use_native_modules!
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true

추가

use_frameworks! :linkage => linkage.to_sym
코드를 찾아서

use_frameworks! :linkage => :static

변경

Notes: React-Native-Firebase uses use_frameworks, 
which has compatibility issues with Flipper, Hermes & Fabric.

Flipper: use_frameworks is not compatible with Flipper.
You need to disable Flipper by commenting out the 
:flipper_configuration line in your Podfile.

Hermes: a fix was put in place in react-native release 
0.69.1 that allows Hermes to work with use_frameworks!. 
To use use_frameworks with Hermes, make sure you have 
set static linkage with use_frameworks! :linkage => :static.

New Architecture: Fabric is not compatible with 
use_frameworks!. Community support to help fix 
use_frameworks support for New Architecture is welcome!

GoogleService-Info.plist
깃에 올리면 내용이 사라진다,,

profile
떠돌이 생활을 하는. 실업자는 아니지만, 부랑 생활을 하는

0개의 댓글