Skip to content

Xcode Build Error: Multiple Commands Produce PrivacyInfo.xcprivacy and Assets.car with React native integration with Existing Apps ios #53008

Description

@vijay-subramani

Description

Hi team,

I’m encountering a build failure in Xcode due to duplicate resource commands after integrating React Native into a native iOS app (brownfield setup). The same setup is working fine without the react native setup.

Steps to reproduce

  1. Clone the repo
  2. Run npm install from the project root
  3. Navigate to the ios folder and run:
    bundle exec pod install
  4. Open .xcworkspace and build or run

💥 You’ll see the duplicate resource error triggered during build.

React Native Version

0.80.1

Affected Platforms

Runtime - iOS

Output of npx @react-native-community/cli info

npm warn cli npm v11.4.2 does not support Node.js v21.7.1. This version of npm supports the following node versions: `^20.17.0 || >=22.9.0`. You can find the latest version at https://nodejs.org/.
info Fetching system and libraries information...
System:
  OS: macOS 15.5
  CPU: (10) arm64 Apple M1 Pro
  Memory: 149.66 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.7.1
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 11.4.2
    path: /usr/local/bin/npm
  Watchman:
    version: 2025.06.30.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/vijaysubramani/.rvm/gems/ruby-3.1.0/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12700392
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 21.0.7
    path: /usr/bin/javac
  Ruby:
    version: 3.1.0
    path: /Users/vijaysubramani/.rvm/rubies/ruby-3.1.0/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

Multiple commands produce:  
'/Users/vijaysubramani/Library/Developer/Xcode/DerivedData/ReproducerApp-*/Build/Products/Debug-iphoneos/ReproducerApp.app/PrivacyInfo.xcprivacy'

Target 'ReproducerApp' has copy command from:  
/ios/ReproducerApp/PrivacyInfo.xcprivacy  
That command depends on:  
[CP] Copy Pods Resources

Multiple commands produce:  
'/Users/vijaysubramani/Library/Developer/Xcode/DerivedData/ReproducerApp-*/Build/Products/Debug-iphoneos/ReproducerApp.app/Assets.car'

Target 'ReproducerApp': LinkAssetCatalog from:  
/ios/ReproducerApp/Images.xcassets  
That command also depends on:  
[CP] Copy Pods Resources

MANDATORY Reproducer

https://github.com/vijay-subramani/invalidByteIssueReproducer

Screenshots and Videos

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions