From c0b7b1f93bdbf11d15a23204a16cd015e01d8d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maik=20A=C3=9Fhoff?= Date: Thu, 12 Oct 2023 11:56:00 +0200 Subject: [PATCH] Add script for generating the SPM binaries analogous to the other build script --- ConsentViewController.xcodeproj | 1 + buildSPMFramework.sh | 36 +++++++++++++++++++++++++++++++++ buildXCFramework.sh | 4 ++++ 3 files changed, 41 insertions(+) create mode 120000 ConsentViewController.xcodeproj create mode 100755 buildSPMFramework.sh diff --git a/ConsentViewController.xcodeproj b/ConsentViewController.xcodeproj new file mode 120000 index 000000000..8c9ca0f5a --- /dev/null +++ b/ConsentViewController.xcodeproj @@ -0,0 +1 @@ +./Example/ConsentViewController.xcodeproj \ No newline at end of file diff --git a/buildSPMFramework.sh b/buildSPMFramework.sh new file mode 100755 index 000000000..cf9506aea --- /dev/null +++ b/buildSPMFramework.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Creates the binaries which are distributed via SPM. + +xcodebuild archive \ + -project ConsentViewController.xcodeproj \ + -scheme SPMConsentViewController-iOS \ + -destination 'generic/platform=iOS' \ + -archivePath './build/SPM/ConsentViewController-iOS' && +xcodebuild archive \ + -project ConsentViewController.xcodeproj \ + -scheme SPMConsentViewController-iOS \ + -destination 'generic/platform=iOS Simulator' \ + -archivePath './build/SPM/ConsentViewController-iOS-simulator' && +xcodebuild archive \ + -project ConsentViewController.xcodeproj \ + -scheme SPMConsentViewController-tvOS \ + -destination 'generic/platform=tvOS' \ + -archivePath './build/SPM/ConsentViewController-tvOS' && +xcodebuild archive \ + -project ConsentViewController.xcodeproj \ + -scheme SPMConsentViewController-tvOS \ + -destination 'generic/platform=tvOS Simulator' \ + -archivePath './build/SPM/ConsentViewController-tvOS-simulator' + +rm -r ./XCFramework/SPM/ConsentViewController.xcframework +rm -r ./XCFramework/SPM/ConsentViewController.xcframework.zip + +xcodebuild -create-xcframework \ + -framework './build/SPM/ConsentViewController-iOS.xcarchive/Products/Library/Frameworks/ConsentViewController.framework' \ + -framework './build/SPM/ConsentViewController-iOS-simulator.xcarchive/Products/Library/Frameworks/ConsentViewController.framework' \ + -framework './build/SPM/ConsentViewController-tvOS.xcarchive/Products/Library/Frameworks/ConsentViewController.framework' \ + -framework './build/SPM/ConsentViewController-tvOS-simulator.xcarchive/Products/Library/Frameworks/ConsentViewController.framework' \ + -output './XCFramework/SPM/ConsentViewController.xcframework' + +zip -r ./XCFramework/SPM/ConsentViewController.xcframework.zip ./XCFramework/SPM/ConsentViewController.xcframework diff --git a/buildXCFramework.sh b/buildXCFramework.sh index 719b2ae22..63392558e 100755 --- a/buildXCFramework.sh +++ b/buildXCFramework.sh @@ -1,24 +1,28 @@ #!/bin/bash xcodebuild archive \ + -project _Pods.xcodeproj \ -scheme ConsentViewController-iOS \ -destination 'generic/platform=iOS' \ -archivePath './build/ConsentViewController-iOS.framework-iOS.xcarchive' \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild archive \ + -project _Pods.xcodeproj \ -scheme ConsentViewController-iOS \ -destination 'generic/platform=iOS Simulator' \ -archivePath './build/ConsentViewController-iOS.framework-iphonesimulator.xcarchive' \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES && xcodebuild archive \ + -project _Pods.xcodeproj \ -scheme ConsentViewController-tvOS \ -destination 'generic/platform=tvOS Simulator' \ -archivePath './build/ConsentViewController-tvOS.framework-tvossimulator.xcarchive' \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES && xcodebuild archive \ + -project _Pods.xcodeproj \ -scheme ConsentViewController-tvOS \ -destination 'generic/platform=tvOS' \ -archivePath './build/ConsentViewController-tvOS.framework-tvOS.xcarchive' \