우당탕탕 회사 개발일지

[xcode] xcode 16ver upgrade

환테크 2025. 4. 29. 11:42
반응형



📌 우당탕탕 회사 개발일지

 

 

 

xcode 16ver upgrade

 

 

 

문제점

 

회사에서 전임자가 쓰던 react native 파일을 직접 testfilght나 배포를 맡아서 해줬었는데, 그 일을 이제 내가 진행하게 되어

처음으로 archive를 진행해 보았다. 그런데 마지막 testfilght에 등록하려고 하니 xcode가 16버전으로 업그레이드를 해야한다고

했다. 나는 버전 업그레이드만 하면 되는 줄알았는데 수많은 여정을 함께 했다....

 

 

1.16ver upgrade

 

먼저 

16버전을 다운받았다.

 

https://developer.apple.com/download/applications/

 

로그인 - Apple

 

idmsa.apple.com

 

 

나는 이곳에서 로그인을 한 다음에 16.3 버전을 받았다.

그런데 다운을 받고 나니 사용이 안된다는 것이다...! 알고봤더니 ios를 업데이트 해야 사용할수있었다. 

ios업그레이드 후 응용프로그램에 있던 원래 xcode는 난 지웠다. 16.3 으로 바꾸고

다시 프로젝트를 실행해봤는데 안된다..

 

 

 

2. 16.3 error 해결

 

Planning build
   Run script build phase '[CP-User] [Hermes] Replace Hermes for the right configuration, if needed' will be run during every build because it does not specify any outputs. To address this issue, 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 'hermes-engine' from project 'Pods')
› Executing react-native Pods/hermes-engine » [CP-User] [Hermes] Replace Hermes for the right configuration, if needed
› Preparing Pods/ExpoFileSystem-ExpoFileSystem_privacy » ResourceBundle-ExpoFileSystem_privacy-ExpoFileSystem-Info.plist
› Preparing Pods/boost-boost_privacy » ResourceBundle-boost_privacy-boost-Info.plist
› Preparing Pods/EXNotifications-ExpoNotifications_privacy » ResourceBundle-ExpoNotifications_privacy-EXNotifications-Info.plist
› Preparing Pods/EXApplication-ExpoApplication_privacy » ResourceBundle-ExpoApplication_privacy-EXApplication-Info.plist
› Preparing expo-constants Pods/EXConstants-EXConstants » ResourceBundle-EXConstants-EXConstants-Info.plist
› Preparing Pods/glog-glog_privacy » ResourceBundle-glog_privacy-glog-Info.plist
› Preparing Pods/lottie-ios-LottiePrivacyInfo » ResourceBundle-LottiePrivacyInfo-lottie-ios-Info.plist
› Compiling react-native Pods/React-rendererdebug » DebugStringConvertible.cpp

❌  (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/string_view:300:42)

 298 |   static_assert(is_standard_layout<value_type>::value, "Character type of basic_string_view must be standard-layout");
 299 |   static_assert(is_trivial<value_type>::value, "Character type of basic_string_view must be trivial");
> 300 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
     |                                          ^ implicit instantiation of undefined template 'std::char_traits<unsigned char>'
 301 |                 "traits_type::char_type must be the same type as CharT");
 302 | 
 303 |   // [string.view.cons], construct/copy

› Compiling react-native Pods/RCT-Folly » json_pointer.cpp

❌  (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/string_view:300:42)

 298 |   static_assert(is_standard_layout<value_type>::value, "Character type of basic_string_view must be standard-layout");
 299 |   static_assert(is_trivial<value_type>::value, "Character type of basic_string_view must be trivial");
> 300 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
     |                                          ^ implicit instantiation of undefined template 'std::char_traits<unsigned char>'
 301 |                 "traits_type::char_type must be the same type as CharT");
 302 | 
 303 |   // [string.view.cons], construct/copy

› Compiling react-native Pods/React-perflogger » FuseboxTracer.cpp

 

 

이런 에러가 뜨는것이다. 뭐지 하고 지피티한테물어보니 이부분의 해결책만 늘어놓았다. 아무리봐도 다 처음 보는 명령어들을 치려니 겁이 나서 구글링을 해봤더니

 

https://github.com/expo/expo/issues/35807

 

Xcode 16.3 and SDK 52 / React Native 0.76 · Issue #35807 · expo/expo

Update April 3, 2025 from @brentvatne This issue is resolved. See: #35807 (comment) Summary After updating Xcode, running a React Native with expo app results in a build error. First, there’s a war...

github.com

 

 

16.3 버전 에러란다..;;;

결국은 16.2로 다운그레이드 해야한다.

 

16.3을 삭제하고 16.2 를 다시 다운받는데 엄청난 시간이 걸렸으니 다음부터는 최종빌드파일은 받지 않으려고 한다..

 

 

4. project_name/ios/main.jsbundle: No such file or directory 해결

 

 

React Native에서는 프로덕션 빌드(Release 모드) 할 때 main.jsbundle이라는 JS 번들 파일을 필요로 하는데, 나는 한번도 release를 해본적이 없기에 이 번들 파일이 없어서 만들어줬다.

 

 

npx react-native bundle \
  --entry-file index.js \
  --platform ios \
  --dev false \
  --bundle-output ios/main.jsbundle \
  --assets-dest ios

 

 

 

5. ~~ Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.2-22C146- 07b28473f605e47e75261259d3ef3b5a.sdkstatcache' not found

1 error generated. 해결

 

 

위의 문제를 해결하고 다시 빌드했더니 또 이문제가 생겼다.

Xcode DerivedData 캐시 문제라길래 DerivedData 삭제하고 다시 빌드하면 자동으로 생긴단다.

 

rm -rf ~/Library/Developer/Xcode/DerivedData

 

 

6. 아래 에러 해결

 

Error: EMFILE: too many open files, watch

Emitted 'error' event on NodeWatcher isntance at:
     at NodeWatcher: checkedEmitError (.../react-native-project/node_modules/sane/src/node_watcher.js:143:12)
     at FSWatcher.emit (events.js:210:5)
     at FSEvent.FSWatcher:_handle onchange (internal/fs/watchers.js:129:12) {
   errno: -24,
   syscall: 'watch',
   code : 'EMFILE',
   filename: null
)
Process terminated. Press <enter> to close the window

 

 

마지막 빌드의 순간 이 에러가 났다...🫠🫠🫠🫠🫠🫠🫠🫠🫠🫠🫠🫠🫠ㅍ

정말 돌아버릴뻔했다

이 에러는 아래 링크를 통해 해결했다.

 

https://stackoverflow.com/questions/58675179/error-emfile-too-many-open-files-react-native-cli

 

Error: EMFILE: too many open files - React Native CLI

I try to run a react-native-cli project using react-native start, and the metro bundler fails, saying the following: events.js 187 throw er; //Unhandled 'error' event Error: EMFILE: too many open

stackoverflow.com

 

 

순서별로 정리된 답변이 있는데 패키지 삭제하고 와치맨 셧다운만 해줘도 해결이 됐다.

 

 

 

 

7. The archive did not include a dSYM for the hermes.framework with the UUIDs [35FECC83-9599-34C1-813E-F020B2D0D382]. Ensure that the archive's dSYM folder includes a DWARF file for hermes.framework with the expected UUIDs. 경고

 

 

정말 다 끝난줄 알았는데,,,, 마지막에 이 경고가 떴다.

테스트 플라이트에도 올라갔고, 앱센터에도 올라갔는데 이 경고가 뜨길래 또 뭐가 문제인지 알아봤다.

 

 

https://cozycatart.tistory.com/entry/%EC%9C%A0%EB%8B%88%ED%8B%B0-iOS-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-xcode%EC%97%90%EC%84%9C-%EC%95%B1%EC%8A%A4%ED%86%A0%EC%96%B4%EB%A1%9C-distribute-app%ED%9B%84-%EB%9C%A8%EB%8A%94-%EA%B2%BD%EA%B3%A0-Upload-Symbols-Failed

 

유니티 iOS빌드 xcode에서 앱스토어로 distribute후 뜨는 경고 "Upload Symbols Failed"

유니티 iOS 프로젝트를 xcode에서 archive후, appstore connect로 distribute app후 뜨는 경고 Upload Symbols Failed에 대해 알아보았습니다. xcode의 15.x버전에서 잘되던 빌드가 갑자기 실패하는 이슈로 16.x로 최신

cozycatart.tistory.com

 

16이상 버전은 지원하지 않은 어쩌구저쩌구라 무시해도된단다...

드디어 성공!!!

테스트 플라이트에는 올라갔고, 배포하고 싶으면 심사받으면 된다. xcode는 정말 무궁무진한 벽들이 앞에 있다는걸 또 한번 깨달았다...

 

 

 

반응형