Computer Science
탄탄한 기반 실력을 위한
전공과 이론 지식 모음
Today I Learned!
배웠으면 기록을 해야지
TIL 사진
Flutter 사진
Flutter로 모바일까지
거꾸로캠퍼스 코딩랩 Flutter 앱개발 강사
스파르타코딩클럽 즉문즉답 튜터
카카오테크캠퍼스 3기 학습코치
프로필 사진
박성민
임베디드 세계에
발을 들인 박치기 공룡
임베디드 사진
EMBEDDED SYSTEM
임베디드 SW와 HW, 이론부터 실전까지
ALGORITHM
알고리즘 해결 전략 기록
🎓
중앙대학교 소프트웨어학부
텔레칩스 차량용 임베디드 스쿨 3기
애플 개발자 아카데미 1기
깃허브 사진
GitHub
프로젝트 모아보기
Instagram
인스타그램 사진

Develop/React Native

[ReactNative] iOS 아카이빙 실패 / React-Core_privacy 중복 문제

sm_amoled 2025. 8. 16. 10:34
300x250

최근에 ReactNative의 iOS 빌드(아카이브) 과정에서 자꾸 못보던 문제가 발생했다. 그런데 약간 암담했던 것은, 문제점을 제대로 파악해주지 못했다는 것.

[15:24:07]: ▸ ** ARCHIVE FAILED **
[15:24:07]: ▸ The following build commands failed:
[15:24:07]: ▸   Archiving workspace onthemood with scheme onthemood
[15:24:07]: ▸ (1 failure)
[15:24:07]: Exit status: 65

[15:24:07]: Looks like fastlane ran into a build/archive error with your project
[15:24:07]: **It's hard to tell what's causing the error**, so we wrote some guides on how
[15:24:07]: to troubleshoot build and signing issues: <https://docs.fastlane.tools/codesigning/getting-started/>
[15:24:07]: Before submitting an issue on GitHub, please follow the guide above and make
[15:24:07]: sure your project is set up correctly.
[15:24:07]: fastlane uses `xcodebuild` commands to generate your binary, you can see the
[15:24:07]: the full commands printed out in yellow in the above log.
[15:24:07]: Make sure to inspect the output above, as usually you'll find more error information there

“It's hard to tell what's causing the error”??? 장난 똥때리나.

그나마 로그들을 좀 살펴보니깐 요런 메시지가 많이 나왔다.

▸     duplicate output file '' on task: 
RegisterExecutionPolicyException /Users/sungmin/Documents/GitHub/
pml/tt/onthemood-epwpsdbcriyvaxeimgsbqxfeuwkx/Build/Intermediates
.noindex/ArchiveIntermediates/onthemood/IntermediateBuildFilesPat
h/UninstalledProducts/iphoneos/React-Core_privacy.bundle 
(in target 'React-Core-React-Core_privacy' from project 'Pods')

뭔가 중복된 파일이 있어서 문제가 계속 발생한다는 내용인 듯 했다.

찾아보니, 뭔가 Well-known 이슈인 듯 했다. 발생 원인은 아래 두 파일에도 동일한 파일명을 가진 파일을 생성하는데, 파일명간에 충돌이 발생해서 아카이빙에 실패하는 것으로 보였다.

  • React-Core-React-Core\_privacy
  • RCT-Folly-RCT-Folly\_privacy

여기 깃허브의 이슈 페이지에서는 이걸 해결하려면 ios/Podfile 에 아래 커멘드를 추가하라고 나와있었다. 당장 해봤다.

if target.name == "React-Core-React-Core_privacy"
  target.remove_from_project
end
if target.name == "RCT-Folly-RCT-Folly_privacy"
  target.remove_from_project
end

근데, 둘 다 지우고 실행하니깐 이번에는 필요한 파일이 없다고 아카이빙이 실패하더라. 빌드 한 번에 10분씩 걸리는데, 왜 안되지 싶어서 빌드 여러 번 돌려보느라 단계별로 거의 30분씩 날아갔다 ^,^

그래서 두 target remove 명령어 중에서 React-Folly 쪽은 주석처리를 해줬다.

target 'onthemood' do
  config = use_native_modules!

  use_react_native!(
    ...
  )

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      ...
    )

    installer.pods_project.targets.each do |target|
      if target.name == 'RNPermissions'
        target.build_configurations.each do |config|
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'PERMISSION_LOCATION_WHEN_IN_USE=1'
        end
      end

# >>>>> 여기에 추가해줬음!
      if target.name == "React-Core-React-Core_privacy"
        target.remove_from_project
      end
      # if target.name == "RCT-Folly-RCT-Folly_privacy"
      #   target.remove_from_project
      # end
    end
  end
end

이제 아카이빙이 잘 된다. 해결!

갑자기 발생한거라 본질적인 원인이 무엇인지는 좀 더 찾아봐야 할 것 같다. Dependency를 추가한 것도 거의 없었던 것 같은데,,,

ㅤㅤ


추가로 시도했던 것들은

  • 프로젝트 캐시 초기화 ( → ClaudeCode는 로그 읽고도 이것만 주구장창 해대서 결국 직접 해결함 )
  • Xcode에서 클린빌드하기
  • Xcode의 Pods/target 에서 …React-Core_privacy, …RCT-Folly_privacy 이거 두 개를 delete 해버리고 빌드하기 ( → 지워도 다시 파일 생성하니깐 무의미했던 것 같음 )
320x100