iosflutterxcodereact-native

Xcode organizer copy failed while uploading to the Apple Store


Error Picture When there is an issue with the copy field while uploading to the Apple Store from the archives.

This is IDEDistributionPipeline.log

2025-04-23 10:03:29 +0000  Processing step: IDEDistributionCreateIPAStep
2025-04-23 10:03:29 +0000  Running /usr/bin/rsync '-8aPhhE' '/var/folders/d5/1wrz2zln72lb27zfnlm8_6j40000gn/T/XcodeDistPipeline.~~~t1yIRy/Symbols' '--link-dest' '/var/folders/d5/1wrz2zln72lb27zfnlm8_6j40000gn/T/XcodeDistPipeline.~~~t1yIRy' '/var/folders/d5/1wrz2zln72lb27zfnlm8_6j40000gn/T/XcodeDistPipeline.~~~t1yIRy/Root'
2025-04-23 10:03:29 +0000  rsync(82351): error: exec on 'rsync': No such file or directory
2025-04-23 10:03:29 +0000  rsync(82350): error: unexpected end of file
2025-04-23 10:03:29 +0000  /usr/bin/rsync exited with 14
2025-04-23 10:03:29 +0000  Step "<IDEDistributionCreateIPAStep: 0x60000bacca00>" failed with error "Error Domain=IDEFoundationErrorDomain Code=1 "Copy failed" UserInfo={NSLocalizedDescription=Copy failed}"

xcode Version 16.3 (16E140)
   MacBook Pro 15.4.1 (24E263)

Purushottams-MacBook-Pro-2:~ purushottamsingh$ which rsync
/usr/bin/rsync
Purushottams-MacBook-Pro-2:~ purushottamsingh$ rsync --version
rsync  version 3.4.1  protocol version 32

I have tried changing my path, but the same problem is occurring.


Solution

  • First Solution

    I had the same problem yesterday with Xcode 16.3 running on macOS 15.4.1 However, the issue was not related to disk space.Here are my logs (IDEDistributionPipeline.log):

    2025-04-24 12:03:29 +0000  rsync(82351): error: exec on 'rsync': No such file or directory
    2025-04-24 12:03:29 +0000  rsync(82350): error: unexpected end of file
    2025-04-24 12:03:29 +0000  /usr/bin/rsync exited with 14
    2025-04-24 12:03:29 +0000  Step "<IDEDistributionCreateIPAStep: 0x60000bacca00>" failed with error "Error Domain=IDEFoundationErrorDomain Code=1 "Copy failed" UserInfo={NSLocalizedDescription=Copy failed}"
    

    The solution is simple: just unlink the rsync installed with Homebrew, so the Xcode can use the one that comes with the system, I run this command in Terminal:

    brew unlink rsync

    Unlinking /opt/homebrew/Cellar/rsync/3.4.1... 5 symlinks removed.

    To make sure the system rsync is now the one that Xcode will use:

    which rsync

    /usr/bin/rsync

    rsync --version

    openrsync: protocol version 29 rsync version 2.6.9 compatible

    Restarting Xcode may be required after unlinking brew's rsync.

    If the problem still exists, follow the second solution.

    Second Solution

    Create .ipa by using command line and upload using Transporter, this is process.

    Step 1: Archive the project

    Run this command from your project root directory:

    xcodebuild -scheme "YourSchemeName"
    -workspace "YourWorkspace.xcworkspace"
    -configuration Release
    -archivePath "./build/YourApp.xcarchive"
    clean archive

    Replace "YourSchemeName" and "YourWorkspace.xcworkspace" accordingly.

    Step 2: Export the .ipa file

    Make sure you have an ExportOptions.plist file. You can create it manually or export it from Xcode once. Example content for App Store:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
       <key>method</key>
       <string>app-store</string>
       <key>uploadBitcode</key>
       <true/>
       <key>compileBitcode</key>
       <true/>
       <key>teamID</key>
       <string>YOUR_TEAM_ID</string>
       <key>signingStyle</key>
       <string>automatic</string>
    </dict>
    </plist>
    

    Now run: xcodebuild -exportArchive
    -archivePath "./build/YourApp.xcarchive"
    -exportOptionsPlist "ExportOptions.plist"
    -exportPath "./build"

    This will generate your .ipa file at ./build/YourApp.ipa

    Step3: Upload .ipa using Transporter

    Install Transporter from the Mac App Store if you haven't already. Then, from the terminal:

    xcrun altool --upload-app
    --type ios
    --file "./build/YourApp.ipa"
    --username "your_apple_id@example.com"
    --password "app-specific-password"

    Generate an App-Specific Password from your Apple ID account page.

    Notes If the upload is successful, then remove Xcode from your system and set up your Xcode again.

    The second solution solved my problem.