# iOS distribution packaging on UE 5.8.0 (modern Xcode) fails to copy the staged cooked data into the .app during the xcodebuild archive step

**URL:** <https://forums.unrealengine.com/t/ios-distribution-packaging-on-ue-5-8-0-modern-xcode-fails-to-copy-the-staged-cooked-data-into-the-app-during-the-xcodebuild-archive-step/2732331>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** xcode-ios, ios-ipa, build, unreal-engine\
**Created:** [June 29, 2026, 3:47pm UTC](https://forums.unrealengine.com/t/ios-distribution-packaging-on-ue-5-8-0-modern-xcode-fails-to-copy-the-staged-cooked-data-into-the-app-during-the-xcodebuild-archive-step/2732331 "2026-06-29T15:47:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ted.steen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ted.steen](https://forums.unrealengine.com/u/Ted.steen)\
**Post date:** [June 29, 2026, 3:47pm UTC](https://forums.unrealengine.com/t/ios-distribution-packaging-on-ue-5-8-0-modern-xcode-fails-to-copy-the-staged-cooked-data-into-the-app-during-the-xcodebuild-archive-step/2732331/1 "2026-06-29T15:47:28Z")

</div>

### Summary

This was confirmed by the community to be a bug in Unreal Engine 5.8

> [@Install/archive issue in 5.8 for iOS](https://forums.unrealengine.com/t/install-archive-issue-in-5-8-for-ios/2731885):
>
> I have an install/archive problem on macOS. It seems like there is a bug in UE 5.8 when doing BuildCookRun with `-archive`. UE’s engine-generated run-script “Copy Executable and Staged Data into .app” copies into $CONFIGURATION\_BUILD\_DIR/My.app. During a normal build that’s the real bundle, so it works. But an archive is an install action (ACTION=install, DEPLOYMENT\_LOCATION=YES), where Xcode assembles the real bundle in $TARGET\_BUILD\_DIR (…/InstallationBuildProductsLocation/Applications/My.app…

A summary would look something like this:  
iOS distribution packaging on UE 5.8.0 (modern Xcode) fails to copy the staged cooked data into the .app during the xcodebuild archive step. The engine-generated “Copy Executable and Staged Data into .app” build phase errors with cp: .app: Not a directory, producing a malformed/empty .xcarchive — yet AutomationTool still exits 0, so the failure is silent and the exported IPA ships without its cooked content.

### What Type of Bug are you experiencing?

Other

### Steps to Reproduce

Build a 5.8 project with -distribution on macOS (apple silicon is what I used) for iOS.

### Expected Result

The build phase copies Saved/StagedBuilds/IOS/cookeddata/ into .app/cookeddata/, the .xcarchive is well-formed, and xcodebuild -exportArchive produces an IPA containing the cooked content.

### Observed Result

- The phase fails with cp: /.app: Not a directory while copying uecommandline.txt / cookeddata into ${CONFIGURATION\_BUILD\_DIR}/${CONTENTS\_FOLDER\_PATH}.
- The archived .app ends up with no cooked data; the .xcarchive is malformed/incomplete.
- AutomationTool still exits 0, so CI sees a “successful” build. The exported IPA installs but is missing its staged content.

### Affects Versions

5.8

### Platform(s)

iOS  
Mac
