Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- Sentry.xcodeproj/**
- Gemfile.lock
- 'Package.swift'
- 'scripts/build-xcframework'

# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Fixes

- Don't run onCrashedLastSession for nil Events (#3785)
- Redistributable static libraries should never be built with module debugging enabled (#3800)

## 8.22.4

Expand Down
13 changes: 9 additions & 4 deletions scripts/build-xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ generate_xcframework() {
local scheme="$1"
local sufix="${2:-}"
local MACH_O_TYPE="${3-mh_dylib}"

local createxcframework="xcodebuild -create-xcframework "
local GCC_GENERATE_DEBUGGING_SYMBOLS="YES"

if [ "$MACH_O_TYPE" = "staticlib" ]; then
#For static framework we disabled symbols because they are not distributed in the framework causing warnings.
GCC_GENERATE_DEBUGGING_SYMBOLS="NO"
fi

rm -rf Carthage/DerivedData

for sdk in "${sdks[@]}"; do
if [[ -n "$(grep "${sdk}" <<< "$ALL_SDKS")" ]]; then
xcodebuild archive -project Sentry.xcodeproj/ -scheme "$scheme" -configuration Release -sdk "$sdk" -archivePath ./Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive CODE_SIGNING_REQUIRED=NO SKIP_INSTALL=NO CODE_SIGN_IDENTITY= CARTHAGE=YES MACH_O_TYPE=$MACH_O_TYPE ENABLE_CODE_COVERAGE=NO
xcodebuild archive -project Sentry.xcodeproj/ -scheme "$scheme" -configuration Release -sdk "$sdk" -archivePath ./Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive CODE_SIGNING_REQUIRED=NO SKIP_INSTALL=NO CODE_SIGN_IDENTITY= CARTHAGE=YES MACH_O_TYPE=$MACH_O_TYPE ENABLE_CODE_COVERAGE=NO GCC_GENERATE_DEBUGGING_SYMBOLS="$GCC_GENERATE_DEBUGGING_SYMBOLS"

createxcframework+="-framework Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/Products/Library/Frameworks/${scheme}.framework "

Expand All @@ -45,8 +50,8 @@ generate_xcframework() {
done

#Create framework for mac catalyst
xcodebuild -project Sentry.xcodeproj/ -scheme "$scheme" -configuration Release -sdk macosx -destination 'platform=macOS,variant=Mac Catalyst' -derivedDataPath ./Carthage/DerivedData CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES MACH_O_TYPE=$MACH_O_TYPE SUPPORTS_MACCATALYST=YES ENABLE_CODE_COVERAGE=NO

xcodebuild -project Sentry.xcodeproj/ -scheme "$scheme" -configuration Release -sdk iphoneos -destination 'platform=macOS,variant=Mac Catalyst' -derivedDataPath ./Carthage/DerivedData CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES MACH_O_TYPE=$MACH_O_TYPE SUPPORTS_MACCATALYST=YES ENABLE_CODE_COVERAGE=NO GCC_GENERATE_DEBUGGING_SYMBOLS="$GCC_GENERATE_DEBUGGING_SYMBOLS"
if [ "$MACH_O_TYPE" = "staticlib" ]; then
local infoPlist="Carthage/DerivedData/Build/Products/Release-maccatalyst/${scheme}.framework/Resources/Info.plist"
plutil -replace "MinimumOSVersion" -string "9999" "$infoPlist"
Expand Down