Skip to content

Instantly share code, notes, and snippets.

@twyatt
Last active August 3, 2023 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twyatt/ab2a115d74f005b353dac1145806ef20 to your computer and use it in GitHub Desktop.
Save twyatt/ab2a115d74f005b353dac1145806ef20 to your computer and use it in GitHub Desktop.
Datadog 1.22.0 xcodebuild failure
  1. Create Library directory
mkdir Library && cd Library/
  1. Initialize Swift package
swift package init
  1. Overwrite Package.swift with version in this Gist

  2. Run build.sh

xcodebuild build \
-quiet \
-scheme MyPackage \
-destination generic/platform=iOS
xcodebuild archive \
-quiet \
-workspace . \
-scheme MyPackage \
-destination generic/platform=iOS \
-archivePath Release-iphoneos \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild \
-quiet \
-create-xcframework \
-framework Release-iphoneos.xcarchive/Products/usr/local/lib/Library.framework/ \
-output MyPackage.xcframework
2023-08-03 09:47:24.500 xcodebuild[59657:644019] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
/Users/twyatt/Library/Developer/Xcode/DerivedData/datadog-swift-gvcnbmkvlkthksauqaylohprdehq/SourcePackages/checkouts/dd-sdk-ios/Sources/Datadog/RUM/RUMVitals/VitalInfoSampler.swift:8:20: warning: scoped imports are not yet supported in module interfaces
import class UIKit.UIScreen
^
/Users/twyatt/Library/Developer/Xcode/DerivedData/datadog-swift-gvcnbmkvlkthksauqaylohprdehq/SourcePackages/checkouts/dd-sdk-ios/Sources/Datadog/Datadog.swift:10:14: warning: public class 'Datadog.Datadog' shadows module 'Datadog', which may cause failures when importing 'Datadog' or its clients in some configurations; please rename either the class 'Datadog.Datadog' or the module 'Datadog', or see https://github.com/apple/swift/issues/56573 for workarounds
public class Datadog {
^
/Users/twyatt/Library/Developer/Xcode/DerivedData/datadog-swift-gvcnbmkvlkthksauqaylohprdehq/SourcePackages/checkouts/dd-sdk-ios/Sources/Datadog/RUM/RUMVitals/VitalInfoSampler.swift:8:20: warning: scoped imports are not yet supported in module interfaces
import class UIKit.UIScreen
^
/Users/twyatt/Library/Developer/Xcode/DerivedData/datadog-swift-gvcnbmkvlkthksauqaylohprdehq/SourcePackages/checkouts/dd-sdk-ios/Sources/Datadog/Datadog.swift:10:14: warning: public class 'Datadog.Datadog' shadows module 'Datadog', which may cause failures when importing 'Datadog' or its clients in some configurations; please rename either the class 'Datadog.Datadog' or the module 'Datadog', or see https://github.com/apple/swift/issues/56573 for workarounds
public class Datadog {
^
/Users/twyatt/Library/Developer/Xcode/DerivedData/datadog-swift-gvcnbmkvlkthksauqaylohprdehq/Build/Intermediates.noindex/ArchiveIntermediates/MyPackage/IntermediateBuildFilesPath/Datadog.build/Release-iphoneos/Datadog.build/Objects-normal/arm64/Datadog.swiftinterface:7:8: error: no such module 'DatadogPrivate'
import DatadogPrivate
^
/Users/twyatt/Library/Developer/Xcode/DerivedData/datadog-swift-gvcnbmkvlkthksauqaylohprdehq/Build/Intermediates.noindex/ArchiveIntermediates/MyPackage/IntermediateBuildFilesPath/Datadog.build/Release-iphoneos/Datadog.build/Objects-normal/arm64/Datadog.swiftinterface:1:1: error: failed to verify module interface of 'Datadog' due to the errors above; the textual interface may be broken by project issues or a compiler bug
// swift-interface-format-version: 1.0
^
/Users/twyatt/Library/Developer/Xcode/DerivedData/datadog-swift-gvcnbmkvlkthksauqaylohprdehq/Build/Intermediates.noindex/ArchiveIntermediates/MyPackage/IntermediateBuildFilesPath/Datadog.build/Release-iphoneos/Datadog.build/Objects-normal/arm64/Datadog.private.swiftinterface:7:8: error: no such module 'DatadogPrivate'
import DatadogPrivate
^
/Users/twyatt/Library/Developer/Xcode/DerivedData/datadog-swift-gvcnbmkvlkthksauqaylohprdehq/Build/Intermediates.noindex/ArchiveIntermediates/MyPackage/IntermediateBuildFilesPath/Datadog.build/Release-iphoneos/Datadog.build/Objects-normal/arm64/Datadog.private.swiftinterface:1:1: error: failed to verify module interface of 'Datadog' due to the errors above; the textual interface may be broken by project issues or a compiler bug
// swift-interface-format-version: 1.0
^
note: Building targets in dependency order
** ARCHIVE FAILED **
// swift-tools-version:5.8
import PackageDescription
let package = Package(
name: "MyPackage",
platforms: [
.iOS(.v11)
],
products: [
.library(name: "Library", type: .dynamic, targets: ["Library"])
],
dependencies: [
.package(url: "https://github.com/Datadog/dd-sdk-ios", from: "1.22.0")
],
targets: [
.target(name: "Library", dependencies: [
.product(name: "DatadogObjc", package: "dd-sdk-ios")
])
]
)
@twyatt
Copy link
Author

twyatt commented Aug 3, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment