[RN] react-native Xcode Flipper error

2024. 5. 16. 12:42·React Native
반응형

Xcode Flipper build error
Xcode Flipper error

반응형

리액트네이티브를 사용하면서 잘되던 빌드가 되지 않을때마다 식은땀이 난다..🥹
그래도 이번에는 무엇이 문제인지 명확하게 보이는 Flipper..! 덕분에 해결방법을 조금 더 쉽게 찾을 수 있었다.
 
 
iOS폴더에서 Podfile을 열고,
 #:flipper_configuration => Flipper_config, 
줄을 비활성화를 해주면 된다고 하지만 이 방법은
Flipper를 사용하는 나에겐 일시적인 해결방법일 뿐이였다.
 
 
RN에 입문한지 반년도 안되어 모르는게 너무나 많은 내가 할 수 있는건 검색뿐..!
또 멋도 부리고 싶어서 console창에서 명령어로 해결해보고 싶었다🤪
그렇게 열심히 검색을 해서 찾아냈다.

 if ! grep -q "#include <functional>" ./ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h; 
then
	chmod 755 ./ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h && sed -i '' 's|#include <string>|#include <functional>\n#include <string>|'  ./ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h
fi

 
 
명령어를 하나씩 해석해보자.

if ! grep -q "#include <functional>" ./ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h;  then
  • `grep -q` 명령어는 파일에서 특정 문자열을 검색하는 대신에, `-q` 검색 결과를 출력하지 않고, 검색이 성공했는지 여부만 반환
  • `/ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h`파일에서 #include <functional> 문자열을 검색
  • `!`는 not을 의미 하므로, #include <functional> 문자열을 찾을 수 없을 때 조건이 참이 된다.
chmod 755 ./ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h &&
  • `chomd 755`는 파일의 권한을 변경하는 명령어로 해당 파일에 실행 권한을 부여
  • `&&`는 앞선 명령어라 성공적릉로 실행된 경우에만 다음 명령어를 실행
sed -i '' 's|#include <string>|#include <functional>\n#include <string>|' ./ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h
  • `sed`는 파일 내에서 텍스트를 검색하고 변경하는데 사용되는 유틸리티
  • `-i` 옵션은 파일을 직접 수정한다는 것을 의미하고, ''는 백업 파일을 만들지 않기 위해 사용
  • `'s|#include <string>|#include <functional>\n#include <string>|'`는 해당 파일에서 `#include <string>` 문자열을 찾아서 `#include <functional>` 과 `\n#include <string>`으로 변경합니다.
fi
  • if문 종료

 
 
결론 적으로 Flipper에 해당하는 파일을 업그레이드 해주는 거 같다..! 해결해도 어려운 RN의 세계..
 
 
 
참고1
https://github.com/facebook/react-native/issues/43335

 

[Fixed & Shipped in latest releases] Upgrading Xcode to 15.3 results in build error - `Called object type 'facebook::flipper::So

ImportantThe latest official update from the React Native Team is available here Description Called object type 'facebook::flipper::SocketCertificateProvider' (aka 'int') is not a function or funct...

github.com

 
참고2
https://stackoverflow.com/questions/78121217/build-error-on-xcode-15-3-called-object-type-facebookflippersocketcertifi

 

Build Error on Xcode 15.3: "Called object type 'facebook::flipper::SocketCertificateProvider' is not a function or function poin

I recently updated my Xcode to version 15.3 and encountered an issue while trying to build my React Native app on the simulator. The error message I'm receiving is: "Called object type 'facebo...

stackoverflow.com

 
 

반응형

'React Native' 카테고리의 다른 글

[RN] react-native 키보드 가림현상 - iOS  (0) 2024.05.29
[RN] react-native useRef 사용방법  (0) 2024.05.27
[RN] react-native Linking 전화걸기, 문자, 메일보내기  (0) 2024.05.27
[RN] react-native ScrollView  (0) 2024.05.27
[RN] react-native, No bundle URL present. error (iOS)  (0) 2024.05.21
'React Native' 카테고리의 다른 글
  • [RN] react-native useRef 사용방법
  • [RN] react-native Linking 전화걸기, 문자, 메일보내기
  • [RN] react-native ScrollView
  • [RN] react-native, No bundle URL present. error (iOS)
nicee
nicee
답을 찾아가는 과정이 즐거운 프론트엔드 개발자의 기록모음🧐
    반응형
  • nicee
    나의 개발일지
    nicee
  • 글쓰기 관리
  • 전체
    오늘
    어제
    • 분류 전체보기
      • Project01 [Chat App]
      • React Native
      • Git
      • Program Setting
      • nicee-day
      • Study
        • C++
  • 블로그 메뉴

    • 링크

      • 🌳 git키우기
      • 📚 일상기록
    • 공지사항

    • 인기 글

    • 태그

      k직장인
      채팅앱
      에러해결
      next.js
      불금
      직장인짤
      k직장인일상
      APP
      Android
      공부
      typescript
      firebase
      오블완
      리액트
      커피수혈
      티스토리챌린지
      백준코딩테스트
      빌드에러
      앱개발
      c++
      rn
      React
      리액트네이티브
      error
      Xcode
      타입스크립트
      nextjs
      IOS
      React-native
      app build
    • 최근 댓글

    • 최근 글

    • hELLO· Designed By정상우.v4.10.0
    nicee
    [RN] react-native Xcode Flipper error
    상단으로

    티스토리툴바