From 7a142fb0a93bd5657d733bc4a08df164a5efa57a Mon Sep 17 00:00:00 2001 From: Aleksei Sapitskii Date: Tue, 15 Oct 2024 14:35:02 +0300 Subject: [PATCH] Support for maccatalyst in Turf --- Turf.xcodeproj/project.pbxproj | 8 ++++++-- scripts/xcframework.sh | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Turf.xcodeproj/project.pbxproj b/Turf.xcodeproj/project.pbxproj index 6e0caee..c873ce9 100644 --- a/Turf.xcodeproj/project.pbxproj +++ b/Turf.xcodeproj/project.pbxproj @@ -612,8 +612,10 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.turf; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator maccatalyst macosx watchos watchsimulator xros xrsimulator"; + SUPPORTS_MACCATALYST = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = 2; }; name = Debug; }; @@ -633,7 +635,9 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.turf; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator maccatalyst macosx watchos watchsimulator xros xrsimulator"; + SUPPORTS_MACCATALYST = YES; + TARGETED_DEVICE_FAMILY = 2; }; name = Release; }; diff --git a/scripts/xcframework.sh b/scripts/xcframework.sh index cd991b9..bde2343 100755 --- a/scripts/xcframework.sh +++ b/scripts/xcframework.sh @@ -5,7 +5,7 @@ set -eou pipefail TEMPORARY_DIRECTORY=$(mktemp -d) echo "Temporary directory: $TEMPORARY_DIRECTORY" -platforms=("iOS" "iOS Simulator" "macOS" "tvOS" "tvOS Simulator" "watchOS" "watchOS Simulator" "visionOS" "visionOS Simulator") +platforms=("iOS" "iOS Simulator" "macOS" "macOS,variant=Mac Catalyst" "tvOS" "tvOS Simulator" "watchOS" "watchOS Simulator" "visionOS" "visionOS Simulator") # build Turf for each platform @@ -17,7 +17,8 @@ do -archivePath "$TEMPORARY_DIRECTORY/archives/Turf-$platform.xcarchive" \ -destination "generic/platform=$platform" \ SKIP_INSTALL=NO \ - BUILD_LIBRARY_FOR_DISTRIBUTION=YES + BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ + SUPPORTS_MACCATALYST=YES commands+=("-archive" "$TEMPORARY_DIRECTORY/archives/Turf-$platform.xcarchive") commands+=("-framework" "Turf.framework")