1. 먼저 npm run ios를 했다
Failed to install the app on the device because we couldn't execute the "ios-deploy" command. Please install it by running "brew install ios-deploy" and try again.
👉 ios를 실행시키는 ios-deploy가 설치되어 있지 않다고 함
brew install ios-deploy
2. 새로운 에러
Failed to build iOS project. 'xcodebuild' exited with error code '65'. To debug build logs further, consider building your app with Xcode.app, by opening '***.xcodeproj'
👉 65 에러가 나는 주요한 원인은 pod file과 현재 패키지가 사용하고 있는 pod file이랑 매치가 되지 않는 것이라고 한다
pod install
3. 또 뉴 에러
Error output from CocoaPods:
Searching for inspections failed: undefined method `map' for nil:NilClass
👉 맥북 M1에서 코코아팟이 실행이 잘안되어서 나타나는 에러
pod deintegrate // 팟 제거
sudo arch -x86_64 gem install ffi // RubyGems으로 x86_64 아키텍처로 ffi gem 설치
arch -x86_64 pod instal // 다시 팟 설치
이렇게 하면 다들 된다고 하는데 난 안됨
이것저것 하다가 안되서
[코코아팟] pod install 혹은 pod update 도중 오류가 발생할 때 대처법 - yagom's blog 깨알 Tips
yagom's blog [코코아팟] pod install 혹은 pod update 도중 오류가 발생할 때 대처법 깨알 Tips
blog.yagom.net
pod repo update
rm -rf ~/.cocoapods/repos/trunk/ //해당 디렉토리 강제삭제
를 했는데 새로운 에러 화면이 떴다.
(이후 pod setup하고 pod install을 해줘야한다는데 내가 pod setup을 안하고 pod install을 한 것같다..)
Ignoring ffi-1.16.3 because its extensions are not built. Try: gem pristine ffi --version 1.16.3 Auto-linking React Native modules for target ` *** `: BVLinearGradient, RNNaverLogin, RNScreens, react-native-config, react-native-safe-area-context, and react-native-webview Framework build type is static library [Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json [Codegen] generating an empty RCTThirdPartyFabricComponentsProvider Analyzing dependencies Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec` [Codegen] Found FBReactNativeSpec Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec` [Codegen] Found rncore Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec` Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec` Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec` [Hermes] Using release tarball from URL: https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.73.6/react-native-artifacts-0.73.6-hermes-ios-debug.tar.gz :85:in `require': dlopen(/opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/ffi-1.16.3/lib/ffi_c.bundle, 0x0009): Library not loaded: /opt/homebrew/opt/ruby/lib/libruby.3.3.dylib (LoadError) Referenced from: /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/ffi-1.16.3/lib/ffi_c.bundle Reason: tried:
👉 gpt가 말하길 ffi gem이 사용하는 ffi_c.bundle 파일이 특정 Ruby 라이브러리를 찾지 못해서 발생하는 문제라고 한다.
4. 루비, 코코아팟, ffi gem 재설치
// 루비 재설치
brew reinstall ruby
sudo gem uninstall cocoapods
sudo gem install cocoapods
sudo gem install ffi -v 1.16.3
// 환경변수 설정
nano ~/.zshrc // 환경변수 열고 아래 세줄 입력 후 저장
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"
source ~/.zshrc // 이 명령어까지 해줘야 실제로 저장된다
// 캐시삭제 후 설치
pod cache clean --all
pod setup
pod install
처음엔 루비를 재설치한것이 포인트인 줄 알았는데 pod setup을 해주지 않은게 문제였던 것 같다.
지금은 저 환경변수를 삭제해도 정상작동 된다.
이렇게 해서 pod install 이 정상작동되었다!
5. 하지만 Xcode에서 빌드가 되지 않았다.
Xcode 14.3 build error "unable to initiate PIF transfer session (operation in progress?)"
Ran into this build error in Xcode 14.3 that prevents me from building my app. Build service could not create build operation: unknown error while handling message: MsgHandlingError(message: "
stackoverflow.com
rm -rf ~/Library/Developer/Xcode/DerivedData/* && rm -rf ~/Library/Caches/org.swift.swiftpm
1. Xcode의 DerivedData 디렉토리 내의 모든 파일과 디렉토리를 삭제하는 것으로 빌드 관련 데이터와 캐시가 삭제된다.
2. Swift Package Manager의 캐시를 삭제한다.
캐시를 삭제했더니 빌드 성공!!!
6. 마지막 에러 : 다음날 빌드는 되는데 에뮬레이터가 안되는 일이 발생함
Domain : NSPOSIXErrorDomain
Code : 60
Xcode simulator 가 안열릴때 (NSPOSIXErrorDomain 60)
안녕하세요. 오늘도 버그가 등장하셔서 박제할까 합니다. (이정도면 버그 전문) 발생 상황 - 프로젝트를 시뮬레이터로 실행하려는데 아래와 같은 버그 발생 - NSPOSIXErrorDomain 에 code = 60으로 나
world-of-larooly.tistory.com
이것도 캐시문제였다. 맥의 시스템에서 Xcode 캐시를 삭제해주니 정상 빌드 되었다.
.
이전에도 그렇고 이번에도 안드로이드는 큰 에러가 없었는데
ios는 항상 pod install에서 에러가 나서 하루 이상을 쏟았던 것 같다.
이번에 이렇게 쭉 정리를 해놨으니 다음엔 크게 헤매지 않길 바라며...
'React-Native' 카테고리의 다른 글
| 이미지 항목 스크롤 시 버벅거림 수정(ScrollView FlatList 중첩, react-native-fast-image) (0) | 2025.10.10 |
|---|---|
| [에러해결] 푸시 알람으로 페이지 진입 후 댓글 작성 시 반영안됨 (queryClient.invalidateQueries 사용) (2) | 2025.08.25 |
| npm run ios 에러 해결기 2 (7) | 2025.08.13 |
| 리액트 네이티브 모듈 sdk 붙이기 (안드로이드 스튜디오) - adiscope (7) | 2025.05.18 |
| [React-Native] 네이버 간편로그인(react-native-naver-login 라이브러리 사용) (0) | 2024.06.06 |