From 7cb89e0cbd28986c4ed3c10b41318d1989bf2abf Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Wed, 9 Oct 2024 16:43:05 +0200 Subject: [PATCH 1/5] Update build-xcframework.sh (#4420) --- scripts/build-xcframework.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/build-xcframework.sh b/scripts/build-xcframework.sh index b108d743ba..f97db64a06 100755 --- a/scripts/build-xcframework.sh +++ b/scripts/build-xcframework.sh @@ -6,6 +6,8 @@ args="${1:-}" if [ "$args" = "iOSOnly" ]; then sdks=( iphoneos iphonesimulator ) +elif [ "$args" = "gameOnly" ]; then + sdks=( iphoneos iphonesimulator macosx ) else sdks=( iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator xros xrsimulator ) fi @@ -124,8 +126,9 @@ generate_xcframework "Sentry" "-Dynamic" if [ "$args" != "iOSOnly" ]; then generate_xcframework "Sentry" "" staticlib - - generate_xcframework "SentrySwiftUI" - - generate_xcframework "Sentry" "-WithoutUIKitOrAppKit" mh_dylib WithoutUIKit + + if [ "$args" != "gameOnly" ]; then + generate_xcframework "SentrySwiftUI" + generate_xcframework "Sentry" "-WithoutUIKitOrAppKit" mh_dylib WithoutUIKit + fi fi From eae2b596111cf7fd8bfc17f1edaae76a48f72aca Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Thu, 10 Oct 2024 10:09:56 +0200 Subject: [PATCH 2/5] test: Crash on deallocated object (#4418) Add a method to cause a sigsev crash by calling a method on a deallocated object. --- .../iOS-ObjectiveC.xcodeproj/project.pbxproj | 6 ++++++ .../iOS-ObjectiveC/Base.lproj/Main.storyboard | 15 +++++++++++---- .../iOS-ObjectiveC/iOS-ObjectiveC/NoARCCrash.h | 6 ++++++ .../iOS-ObjectiveC/iOS-ObjectiveC/NoARCCrash.m | 10 ++++++++++ .../iOS-ObjectiveC/ViewController.m | 6 ++++++ Sentry.xcodeproj/project.pbxproj | 11 ----------- 6 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 Samples/iOS-ObjectiveC/iOS-ObjectiveC/NoARCCrash.h create mode 100644 Samples/iOS-ObjectiveC/iOS-ObjectiveC/NoARCCrash.m diff --git a/Samples/iOS-ObjectiveC/iOS-ObjectiveC.xcodeproj/project.pbxproj b/Samples/iOS-ObjectiveC/iOS-ObjectiveC.xcodeproj/project.pbxproj index 45484f9182..d3051035aa 100644 --- a/Samples/iOS-ObjectiveC/iOS-ObjectiveC.xcodeproj/project.pbxproj +++ b/Samples/iOS-ObjectiveC/iOS-ObjectiveC.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 6250B97C2CB69C96009512D6 /* NoARCCrash.m in Sources */ = {isa = PBXBuildFile; fileRef = 6250B97B2CB69C96009512D6 /* NoARCCrash.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 630853492440C46E00DDE4CE /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6308533B2440C45500DDE4CE /* Sentry.framework */; }; 6308534A2440C46E00DDE4CE /* Sentry.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6308533B2440C45500DDE4CE /* Sentry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 637AFDCB243B036B0034958B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 637AFDCA243B036B0034958B /* AppDelegate.m */; }; @@ -95,6 +96,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 6250B9752CB69C86009512D6 /* NoARCCrash.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NoARCCrash.h; sourceTree = ""; }; + 6250B97B2CB69C96009512D6 /* NoARCCrash.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NoARCCrash.m; sourceTree = ""; }; 630853352440C45500DDE4CE /* Sentry.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Sentry.xcodeproj; path = ../../Sentry.xcodeproj; sourceTree = ""; }; 634C7EC724406A4900AFDE9F /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 637AFDC6243B036B0034958B /* iOS-ObjectiveC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS-ObjectiveC.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -186,6 +189,8 @@ 637AFDD0243B036B0034958B /* ViewController.m */, 7B8A5C9C2715B5CF008ACD3B /* InitializerViewController.h */, 7B8A5C9D2715B5DE008ACD3B /* InitializerViewController.m */, + 6250B9752CB69C86009512D6 /* NoARCCrash.h */, + 6250B97B2CB69C96009512D6 /* NoARCCrash.m */, 637AFDD2243B036B0034958B /* Main.storyboard */, 637AFDD5243B036D0034958B /* Assets.xcassets */, 7B3427F925876DDB00056519 /* Tongariro.jpg */, @@ -415,6 +420,7 @@ 637AFDCB243B036B0034958B /* AppDelegate.m in Sources */, 84BA72AB2C9369A40045B828 /* GitInjections.swift in Sources */, 637AFDDC243B036D0034958B /* main.m in Sources */, + 6250B97C2CB69C96009512D6 /* NoARCCrash.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/Base.lproj/Main.storyboard b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/Base.lproj/Main.storyboard index 2c900cc5bf..cc7f38e8d3 100644 --- a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/Base.lproj/Main.storyboard +++ b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -24,7 +24,7 @@ - + - +