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

Use xcodebuild archive to build sentry-cocoa #2960

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions scripts/build-sentry-cocoa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,37 @@ ios_simulator_sdk=$(echo "$sdks" | awk '/iOS Simulator SDKs/{getline; print $NF}

# Build for iOS and iOS simulator.
echo "::group::Building sentry-cocoa for iOS and iOS simulator"
xcodebuild -project Sentry.xcodeproj \
xcodebuild archive -project Sentry.xcodeproj \
-scheme Sentry \
-configuration Release \
-sdk "$ios_sdk" \
-derivedDataPath ./Carthage/output-ios
xcodebuild -project Sentry.xcodeproj \
-archivePath ./Carthage/output-ios.xcarchive \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive -project Sentry.xcodeproj \
-scheme Sentry \
-configuration Release \
-sdk "$ios_simulator_sdk" \
-derivedDataPath ./Carthage/output-ios
-archivePath ./Carthage/output-iossimulator.xcarchive \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework \
-framework ./Carthage/output-ios/Build/Products/Release-iphoneos/Sentry.framework \
-framework ./Carthage/output-ios/Build/Products/Release-iphonesimulator/Sentry.framework \
-framework ./Carthage/output-ios.xcarchive/Products/Library/Frameworks/Sentry.framework \
-framework ./Carthage/output-iossimulator.xcarchive/Products/Library/Frameworks/Sentry.framework \
-output ./Carthage/Build-ios/Sentry.xcframework
echo "::endgroup::"

# Separately, build for Mac Catalyst
echo "::group::Building sentry-cocoa for Mac Catalyst"
xcodebuild -project Sentry.xcodeproj \
xcodebuild archive -project Sentry.xcodeproj \
-scheme Sentry \
-configuration Release \
-destination 'platform=macOS,variant=Mac Catalyst' \
-derivedDataPath ./Carthage/output-maccatalyst
-archivePath ./Carthage/output-maccatalyst.xcarchive \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework \
-framework ./Carthage/output-maccatalyst/Build/Products/Release-maccatalyst/Sentry.framework \
-framework ./Carthage/output-maccatalyst.xcarchive/Products/Library/Frameworks/Sentry.framework \
-output ./Carthage/Build-maccatalyst/Sentry.xcframework
echo "::endgroup::"

Expand Down
Loading