크로스 플랫폼/React-Native <JSX>

[React-Native] Xcode DVTCoreDeviceEnabledState 빌드 오류 해결

TaeGyeong Lee 2023. 4. 29. 22:30

발생 에러

아래와 같은 에러를 남기며 IOS 앱을 빌드할 수 없었습니다. 

warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ITerviewClientMobile' from project 'ITerviewClientMobile')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ITerviewClientMobile' from project 'ITerviewClientMobile')

2023-04-29 21:44:14.707 xcodebuild[10832:54573] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:550BB99C-01A0-4CCD-928A-F64604A0774F, OS:16.4, name:iPhone 14 Pro }
{ platform:iOS Simulator, id:550BB99C-01A0-4CCD-928A-F64604A0774F, OS:16.4, name:iPhone 14 Pro }
** BUILD FAILED **

 

해결 방법

최근 iOS가 14.2로 버전업 됨에 따라 XCode 업데이트에 변경된 사항이 제 구버전 RN과 충돌한 문제였습니다. RN 팀에서 이런 변경 사항을 이미 해결했을 것으로 생각되어(관련 패치노트) RN 최신 버전으로 업그레이드 하였습니다. 

npx react-native upgrade
npm i
cd ios
pod install
npx react-native run-ios

 

다시 빌드가 잘 되는 것을 확인할 수 있었습니다.

 

해결 방법 추가(23-08-22)

이 에러는 pod install 명령 전 npx react-native ios 명령 수행 시에도 발생할 수 있습니다. pod install 을 다시 한번 해주세요.

cd ios
pod instsall
cd ..
npx react-native run-ios