Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCArchive generation fails #2132

Open
victormendes5 opened this issue Dec 4, 2024 · 1 comment
Open

XCArchive generation fails #2132

victormendes5 opened this issue Dec 4, 2024 · 1 comment
Labels
question Further information is requested

Comments

@victormendes5
Copy link

victormendes5 commented Dec 4, 2024

Datadog SDK version: 2.20.0
Dependency Manager: SPM
Xcode version: 15.2 (15C500b)
Deployment Target: iOS 15

Description

I encountered an error while archiving and distributing my SDK.

Context

I have an SDK distributed via SPM. After integrating it with Datadog, the script to generate the xcarchive fails when executed.

xcodebuild archive \
-scheme MyFeature \
-destination "generic/platform=iOS" \
-archivePath "build/MyFeature-iphoneos.xcarchive" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES

xcodebuild archive \
-scheme MyFeature \
-destination "generic/platform=iOS Simulator" \
-archivePath "build/MyFeature-iphonesimulator.xcarchive" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES

xcodebuild -create-xcframework \
-framework "build/MyFeature-iphoneos.xcarchive/Products/Library/Frameworks/MyFeature.framework" \
-framework "build/MyFeature-iphonesimulator.xcarchive/Products/Library/Frameworks/MyFeature.framework" \
-output "build/MyFeature.xcframework"

If I set BUILD_LIBRARY_FOR_DISTRIBUTION to NO, the script runs successfully, but I need the xcarchive for distribution.

Error

** ARCHIVE FAILED **

The following build commands failed:
	SwiftVerifyEmittedModuleInterface normal arm64 Verifying\ emitted\ module\ interface\ DatadogCore.swiftinterface /Users/MyMachine/Library/Developer/Xcode/DerivedData/App-epxixvymmcxxolddrqihwyguzsmi/Build/Intermediates.noindex/ArchiveIntermediates/MyFeature/IntermediateBuildFilesPath/Datadog.build/Release-iphoneos/MyFeature.build/Objects-normal/arm64/DatadogCore.swiftinterface (in target 'DatadogCore' from project 'Datadog')
(1 failure)

Questions

  • Any idea how can I solve this issue?
@victormendes5 victormendes5 added the question Further information is requested label Dec 4, 2024
@ncreated
Copy link
Member

ncreated commented Dec 5, 2024

Hey @victormendes5 👋,

Could you clarify the actual reason why the SwiftVerifyEmittedModuleInterface is failing? The information you provided outlines the command that failed, but we need more insight into the specific issue with the emitted DatadogCore.swiftinterface.

If your package includes a binary target, it might be impacted by this SPM limitation:

Also, you might want to check this related issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants