# Xcode iOS build failures cocoapods "Copy XCFrameworks"

**URL:** <https://discuss.circleci.com/t/xcode-ios-build-failures-cocoapods-copy-xcframeworks/52235>\
**Category:** Mobile\
**Tags:** cocoapods, fastlane, xcode, xcodebuild\
**Created:** [October 31, 2024, 8:00am UTC](https://discuss.circleci.com/t/xcode-ios-build-failures-cocoapods-copy-xcframeworks/52235 "2024-10-31T08:00:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![idomizrachi-bringg](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/idomizrachi-bringg/32/33323_2.png) [@idomizrachi-bringg](https://discuss.circleci.com/u/idomizrachi-bringg)\
**Post date:** [October 31, 2024, 8:00am UTC](https://discuss.circleci.com/t/xcode-ios-build-failures-cocoapods-copy-xcframeworks/52235/1 "2024-10-31T08:00:49Z")

</div>

Since around 8 days agos all of our jobs fail with the following error:  
▸ Running script ‘[CP] Copy XCFrameworks’

❌ error: Sandbox: rsync.samba(12267) deny(1) file-write-create /Users/distiller/project/App1/build/DerivedData/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/GoogleAnalytics/GoogleAnalytics.framework/Headers (in target ‘GoogleAnalytics’ from project ‘Pods’)

I tried to rerun jobs that passed 10 days ago and they also fail with the same error.

Did anyone else have the same error and managed to resolve this issue?

Build iOS app for simulators - unit tests.  
Xcode 15.2 (also tried Xcode 15.4)  
cocoa pods 1.14.3  
fastlane (latest)

---

<div class="post-metadata">

**Author:** ![idomizrachi-bringg](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/idomizrachi-bringg/32/33323_2.png) [@idomizrachi-bringg](https://discuss.circleci.com/u/idomizrachi-bringg)\
**Post date:** [October 31, 2024, 8:05am UTC](https://discuss.circleci.com/t/xcode-ios-build-failures-cocoapods-copy-xcframeworks/52235/2 "2024-10-31T08:05:37Z")

</div>

If I manually run this build phase using SSH connection to the circle ci build machine it pass:

```auto
pre set the required environment variables - PODS_ROOT, ARCHS, PLATFORM_NAME, PODS_XCFRAMEWORDS_BUILD_DIR

VM-8b0b7afd3b:GoogleAnalytics distiller$ ./GoogleAnalytics-xcframeworks.sh
Selected xcframework slice ios-arm64_i386_x86_64-simulator
rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "/Users/distiller/project/App1/Pods//GoogleAnalytics/Frameworks/GoogleAnalytics.xcframework/ios-arm64_i386_x86_64-simulator/*" "/Users/distiller/project/App1/build/DerivedData/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/GoogleAnalytics"
building file list ... done
GoogleAnalytics.framework/GoogleAnalytics
GoogleAnalytics.framework/Info.plist
GoogleAnalytics.framework/Headers/
GoogleAnalytics.framework/Headers/GAI.h
GoogleAnalytics.framework/Headers/GAIDictionaryBuilder.h
GoogleAnalytics.framework/Headers/GAIEcommerceFields.h
GoogleAnalytics.framework/Headers/GAIEcommerceProduct.h
GoogleAnalytics.framework/Headers/GAIEcommerceProductAction.h
GoogleAnalytics.framework/Headers/GAIEcommercePromotion.h
GoogleAnalytics.framework/Headers/GAIFields.h
GoogleAnalytics.framework/Headers/GAILogger.h
GoogleAnalytics.framework/Headers/GAITrackedViewController.h
GoogleAnalytics.framework/Headers/GAITracker.h
GoogleAnalytics.framework/Headers/GoogleAnalytics-umbrella.h
GoogleAnalytics.framework/Modules/
GoogleAnalytics.framework/Modules/module.modulemap

sent 1910691 bytes received 340 bytes 3822062.00 bytes/sec
total size is 1909358 speedup is 1.00

```

---

<div class="post-metadata">

**Author:** ![idomizrachi-bringg](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/idomizrachi-bringg/32/33323_2.png) [@idomizrachi-bringg](https://discuss.circleci.com/u/idomizrachi-bringg)\
**Post date:** [October 31, 2024, 11:11am UTC](https://discuss.circleci.com/t/xcode-ios-build-failures-cocoapods-copy-xcframeworks/52235/3 "2024-10-31T11:11:09Z")

</div>

The issue was found to be in the latest version of Fastlane.  
I downgraded Fastlane to a known to work version (2.222.0) and the issue resolved.

> <https://github.com/fastlane/fastlane/actions/runs/11551929394>

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [November 7, 2024, 11:11am UTC](https://discuss.circleci.com/t/xcode-ios-build-failures-cocoapods-copy-xcframeworks/52235/4 "2024-11-07T11:11:16Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
