sentry-kotlin-multiplatform icon indicating copy to clipboard operation
sentry-kotlin-multiplatform copied to clipboard

"Failed to find Sentry Cocoa framework" when building on Xcode Cloud

Open JAWS-tm opened this issue 3 months ago • 1 comments

Framework

Compose Multiplatform

Platform

Apple

Installed

Swift Package Manager

Version

0.19.0

Steps to Reproduce

When building my iOS target on Xcode Cloud, the build fails even though it works locally.

sentry-cocoa is added via Swift Package Manager in Xcode, and local builds correctly detect and link the Sentry.xcframework :

Found Sentry Cocoa framework path using ManualSearchStrategy at /Users/jules/Library/Developer/Xcode/DerivedData/iosApp-aimapgjcemvpsqhgibcyupauiloz/SourcePackages/artifacts/sentry-cocoa/Sentry-Dynamic/Sentry-Dynamic.xcframework/ios-arm64

However, when Xcode Cloud runs the build, it cannot locate the Sentry Cocoa framework.

Expected Result

The project should build successfully on Xcode Cloud, just like it does locally.

Actual Result

The build fails with the following output:

Set up Sentry Cocoa linking for targets: [iosArm64]
Failed to find Sentry Cocoa framework. Steps to resolve:

FAILURE: Build failed with an exception.

* What went wrong:
Failed to configure iosArm64: Failed to find Sentry Cocoa framework. Steps to resolve:

1. Install Sentry Cocoa via SPM in Xcode
2. Verify framework exists in Xcode's DerivedData folder:
   - If static: Sentry.xcframework
   - If dynamic: Sentry-Dynamic.xcframework
  
If problem persists consider setting explicit path in build.gradle.kts:
sentryKmp { 
    linker {
        frameworkPath.set("path/to/Sentry.xcframework") 
    }
}

JAWS-tm avatar Nov 19 '25 10:11 JAWS-tm

KMP-76

linear[bot] avatar Nov 19 '25 10:11 linear[bot]

hey @JAWS-tm do you set the correct path to the framework in xcode cloud? I'm seeing you're setting the framework path manually, could you perhaps share how you do that?

romtsn avatar Nov 25 '25 14:11 romtsn