- Create
Librarydirectory
mkdir Library && cd Library/
- Initialize Swift package
swift package init
-
Overwrite
Package.swiftwith version in this Gist -
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") | |
| ]) | |
| ] | |
| ) |
Related issue: DataDog/dd-sdk-ios#1402 (comment)