오티스의개발일기

[REACT NATIVE] mac m1 pro 기준 google signin ios Podfile 설정 방법 2022-12-30 [react-native 버전 0.6 이상기준] 본문

에러 모음/react-native

[REACT NATIVE] mac m1 pro 기준 google signin ios Podfile 설정 방법 2022-12-30 [react-native 버전 0.6 이상기준]

안되면 될때까지.. 2022. 12. 30. 09:56
728x90

 

 

이번에 드디어 맥북을 구매하였다

맥북을 구매하고 소프트웨어 업데이트후

여러가지 모듈 세팅이 끝난후 작업을 시작하려했지만

ios google signin 설정이 안되있어서 실패하였다.

 

나는 네이티브 개발자가 아니기때문에 이부분을 정말 모른다 그냥 무지하다 볼수있다.

그래서 유튜브를 보고 따라하다 계속 빌드에 실패해서 도큐멘트를 보고 따라하였다.

 

일단 처음봤던 유튜브는

https://www.youtube.com/watch?v=TdyiHng-1Ks&t=450s

 

이것을 참고하였으니 확인해보길 바란다

 

대략적으로 이곳에서 거의 모든것을 설명하기에 

설명이 안된부분에 대해 나는 글을 쓰려고한다.

 

일단 Podfile 부분이다.

저 영상을 찍을 당시와 지금은 너무 달라서 도큐멘트를 꼭 참고해야한다는걸

이번에 깊게 깨달았다.

 

일단 도큐멘트에서는 리엑트 0.6.9 이상대와 이하와 설정 방법이 다르다고 명시가되어있다

 

나는 현재 0.70.6 버전을 쓰고있기때문에 

살짝 설정방법이 다르다.

 

뭐 결과적으로 말해서

저기 영상에 있는것들을 그대로 따라하되

 

 

/ios/Podfile 들을 수정을 할때는

 

아래를 보고 따라하면 문제없이 실행이 될것이다.

주석에 추가한것이라고 표기해놨으니 확인바란다.

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

use_frameworks! :linkage => :static #<--- 추가한것
$RNFirebaseAsStaticFramework = true #<--- 추가한것

platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false

target 'reactnativeigclone' do
  config = use_native_modules!
  
  pod 'GoogleUtilities', :modular_headers => true   #<--- 추가한것
  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    # Upcoming versions of React Native may rely on get_default_flags(), but
    # we make it explicit here to aid in the React Native upgrade process.
    :hermes_enabled => true,
    :fabric_enabled => flags[:fabric_enabled],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    #:flipper_configuration => FlipperConfiguration.enabled,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'reactnativeigcloneTests' do
    inherit! :complete
    # Pods for testing
  end

  post_install do |installer|
    react_native_post_install(
      installer,
      # Set `mac_catalyst_enabled` to `true` in order to apply patches
      # necessary for Mac Catalyst builds
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

 

 

혹시나 버전이 다르거나 그러하다면 오류를 볼수도 있으니 

 

현재기준 리엑트 네이티브 0.70.6 버전을 사용하고있으니

참고바란다.

 

 

 

 

 

 

그리고 추가 오류에대한 참고글은 아래에있으니 확인바란다

 

https://velog.io/@qkr135qkr/firebase%EB%A5%BC-iOS%EC%97%90-%EC%A0%81%EC%9A%A9%ED%95%98%EB%A9%B4%EC%84%9C-%EB%A7%9E%EB%8B%A6%EB%93%A4%EC%9D%B8-%EB%AC%B8%EC%A0%9C%EB%93%A4

 

firebase를 iOS에 적용하면서 맞닦들인 문제들

pod 'GoogleUtilities', :modular_headers => true적은 뒤 pod install 다시 하시면 됩니다.Module 'FirebaseCore' not foundFirebaseError: Firebase: No Firebase App 'DE

velog.io

 

728x90
Comments