From 2a35181434ccc4f2ebc5be00bbbcf0837daf660d Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Wed, 6 Aug 2025 15:24:43 -0300 Subject: [PATCH 01/17] Set default C language to compiler default --- Sentry.xcodeproj/project.pbxproj | 8 -------- Sources/Configuration/SDK.xcconfig | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 84f96c504c7..948778ab77e 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -6708,7 +6708,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7120,7 +7119,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7432,7 +7430,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7480,7 +7477,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7526,7 +7522,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7572,7 +7567,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8218,7 +8212,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8506,7 +8499,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/Sources/Configuration/SDK.xcconfig b/Sources/Configuration/SDK.xcconfig index e15c969356a..300092df86b 100644 --- a/Sources/Configuration/SDK.xcconfig +++ b/Sources/Configuration/SDK.xcconfig @@ -112,7 +112,7 @@ VALIDATE_PRODUCT_TestCI = NO VALIDATE_PRODUCT = $(VALIDATE_PRODUCT_$(CONFIGURATION)) CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer -GCC_C_LANGUAGE_STANDARD = gnu99 +GCC_C_LANGUAGE_STANDARD = compiler-default CLANG_MODULES_AUTOLINK_Debug = YES CLANG_MODULES_AUTOLINK_DebugV9 = YES From 9eb217b1c93828630e864a7771df255ef3b76424 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Wed, 6 Aug 2025 15:36:04 -0300 Subject: [PATCH 02/17] Bump GCC C version to GNU11 --- Sources/Configuration/SDK.xcconfig | 2 +- Sources/Configuration/Sentry.xcconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Configuration/SDK.xcconfig b/Sources/Configuration/SDK.xcconfig index 300092df86b..a2c6907db9b 100644 --- a/Sources/Configuration/SDK.xcconfig +++ b/Sources/Configuration/SDK.xcconfig @@ -112,7 +112,7 @@ VALIDATE_PRODUCT_TestCI = NO VALIDATE_PRODUCT = $(VALIDATE_PRODUCT_$(CONFIGURATION)) CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer -GCC_C_LANGUAGE_STANDARD = compiler-default +GCC_C_LANGUAGE_STANDARD = gnu11 CLANG_MODULES_AUTOLINK_Debug = YES CLANG_MODULES_AUTOLINK_DebugV9 = YES diff --git a/Sources/Configuration/Sentry.xcconfig b/Sources/Configuration/Sentry.xcconfig index 1d91bccc0f3..5a1db946bc2 100644 --- a/Sources/Configuration/Sentry.xcconfig +++ b/Sources/Configuration/Sentry.xcconfig @@ -39,7 +39,7 @@ DEVELOPMENT_TEAM = CODE_SIGN_IDENTITY = PROVISIONING_PROFILE_SPECIFIER = -GCC_C_LANGUAGE_STANDARD = compiler-default +GCC_C_LANGUAGE_STANDARD = gnu11 ENABLE_STRICT_OBJC_MSGSEND = NO From 9f350ccb06bc6871d9c97206827f78094e97284b Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Wed, 6 Aug 2025 15:55:55 -0300 Subject: [PATCH 03/17] Use GNU17 --- Sentry.xcodeproj/project.pbxproj | 24 ------------------------ Sources/Configuration/SDK.xcconfig | 3 ++- Sources/Configuration/Sentry.xcconfig | 2 +- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 948778ab77e..62d420ee3b0 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -6781,7 +6781,6 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; - GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; MTL_FAST_MATH = YES; @@ -6931,7 +6930,6 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; - GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; MTL_FAST_MATH = YES; @@ -6962,7 +6960,6 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; - GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -6992,7 +6989,6 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; - GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -7022,7 +7018,6 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; - GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -7189,7 +7184,6 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; - GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -7830,7 +7824,6 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7843,7 +7836,6 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; @@ -7885,7 +7877,6 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7898,7 +7889,6 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; @@ -7940,7 +7930,6 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7953,7 +7942,6 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -7993,7 +7981,6 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8006,7 +7993,6 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -8046,7 +8032,6 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8059,7 +8044,6 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -8099,7 +8083,6 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8112,7 +8095,6 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -8285,7 +8267,6 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; - GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; MTL_FAST_MATH = YES; @@ -8325,7 +8306,6 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8338,7 +8318,6 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; @@ -8569,7 +8548,6 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; - GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -8607,7 +8585,6 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8620,7 +8597,6 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; diff --git a/Sources/Configuration/SDK.xcconfig b/Sources/Configuration/SDK.xcconfig index a2c6907db9b..eff67b35895 100644 --- a/Sources/Configuration/SDK.xcconfig +++ b/Sources/Configuration/SDK.xcconfig @@ -112,7 +112,8 @@ VALIDATE_PRODUCT_TestCI = NO VALIDATE_PRODUCT = $(VALIDATE_PRODUCT_$(CONFIGURATION)) CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer -GCC_C_LANGUAGE_STANDARD = gnu11 +GCC_C_LANGUAGE_STANDARD = gnu17 +MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = gnu11 gnu14++ gnu17 gnu++20 CLANG_MODULES_AUTOLINK_Debug = YES CLANG_MODULES_AUTOLINK_DebugV9 = YES diff --git a/Sources/Configuration/Sentry.xcconfig b/Sources/Configuration/Sentry.xcconfig index 5a1db946bc2..315ad5bc3a5 100644 --- a/Sources/Configuration/Sentry.xcconfig +++ b/Sources/Configuration/Sentry.xcconfig @@ -39,7 +39,7 @@ DEVELOPMENT_TEAM = CODE_SIGN_IDENTITY = PROVISIONING_PROFILE_SPECIFIER = -GCC_C_LANGUAGE_STANDARD = gnu11 +GCC_C_LANGUAGE_STANDARD = gnu17 ENABLE_STRICT_OBJC_MSGSEND = NO From ec65866e3501f2dbcee58dc4bdc3a6b2677c25cd Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Wed, 6 Aug 2025 16:24:31 -0300 Subject: [PATCH 04/17] Remove GCC_C_LANGUAGE_STANDARD --- Sources/Configuration/SDK.xcconfig | 2 -- Sources/Configuration/Sentry.xcconfig | 2 -- 2 files changed, 4 deletions(-) diff --git a/Sources/Configuration/SDK.xcconfig b/Sources/Configuration/SDK.xcconfig index eff67b35895..968ea9314e3 100644 --- a/Sources/Configuration/SDK.xcconfig +++ b/Sources/Configuration/SDK.xcconfig @@ -112,8 +112,6 @@ VALIDATE_PRODUCT_TestCI = NO VALIDATE_PRODUCT = $(VALIDATE_PRODUCT_$(CONFIGURATION)) CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer -GCC_C_LANGUAGE_STANDARD = gnu17 -MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = gnu11 gnu14++ gnu17 gnu++20 CLANG_MODULES_AUTOLINK_Debug = YES CLANG_MODULES_AUTOLINK_DebugV9 = YES diff --git a/Sources/Configuration/Sentry.xcconfig b/Sources/Configuration/Sentry.xcconfig index 315ad5bc3a5..d3a197c5e55 100644 --- a/Sources/Configuration/Sentry.xcconfig +++ b/Sources/Configuration/Sentry.xcconfig @@ -39,8 +39,6 @@ DEVELOPMENT_TEAM = CODE_SIGN_IDENTITY = PROVISIONING_PROFILE_SPECIFIER = -GCC_C_LANGUAGE_STANDARD = gnu17 - ENABLE_STRICT_OBJC_MSGSEND = NO CLANG_WARN_BOOL_CONVERSION = YES From 662306af37535030e5fbefeb140721475e6aca1f Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Wed, 6 Aug 2025 17:42:17 -0300 Subject: [PATCH 05/17] Restore xcconfig changes --- Sentry.xcodeproj/project.pbxproj | 32 +++++++++++++++++++++++++++ Sources/Configuration/SDK.xcconfig | 1 + Sources/Configuration/Sentry.xcconfig | 2 ++ 3 files changed, 35 insertions(+) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 62d420ee3b0..84f96c504c7 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -6708,6 +6708,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -6781,6 +6782,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; MTL_FAST_MATH = YES; @@ -6930,6 +6932,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; MTL_FAST_MATH = YES; @@ -6960,6 +6963,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -6989,6 +6993,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -7018,6 +7023,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -7114,6 +7120,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7184,6 +7191,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -7424,6 +7432,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7471,6 +7480,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7516,6 +7526,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7561,6 +7572,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7824,6 +7836,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7836,6 +7849,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; @@ -7877,6 +7891,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7889,6 +7904,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; @@ -7930,6 +7946,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7942,6 +7959,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -7981,6 +7999,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -7993,6 +8012,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -8032,6 +8052,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8044,6 +8065,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -8083,6 +8105,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8095,6 +8118,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -8194,6 +8218,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8267,6 +8292,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; MTL_FAST_MATH = YES; @@ -8306,6 +8332,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8318,6 +8345,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; @@ -8478,6 +8506,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8548,6 +8577,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; MACH_O_TYPE = staticlib; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtils; @@ -8585,6 +8615,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 Sentry. All rights reserved."; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8597,6 +8628,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryTestUtilsDynamic; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; diff --git a/Sources/Configuration/SDK.xcconfig b/Sources/Configuration/SDK.xcconfig index 968ea9314e3..e15c969356a 100644 --- a/Sources/Configuration/SDK.xcconfig +++ b/Sources/Configuration/SDK.xcconfig @@ -112,6 +112,7 @@ VALIDATE_PRODUCT_TestCI = NO VALIDATE_PRODUCT = $(VALIDATE_PRODUCT_$(CONFIGURATION)) CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer +GCC_C_LANGUAGE_STANDARD = gnu99 CLANG_MODULES_AUTOLINK_Debug = YES CLANG_MODULES_AUTOLINK_DebugV9 = YES diff --git a/Sources/Configuration/Sentry.xcconfig b/Sources/Configuration/Sentry.xcconfig index d3a197c5e55..1d91bccc0f3 100644 --- a/Sources/Configuration/Sentry.xcconfig +++ b/Sources/Configuration/Sentry.xcconfig @@ -39,6 +39,8 @@ DEVELOPMENT_TEAM = CODE_SIGN_IDENTITY = PROVISIONING_PROFILE_SPECIFIER = +GCC_C_LANGUAGE_STANDARD = compiler-default + ENABLE_STRICT_OBJC_MSGSEND = NO CLANG_WARN_BOOL_CONVERSION = YES From ebd10d07ae1461e29523d58c31a1cfe6a76dd9d8 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Wed, 6 Aug 2025 17:42:40 -0300 Subject: [PATCH 06/17] Add Package.swift for swift 5.9 with interoperabilityMode --- Package@swift-5.9.swift | 101 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Package@swift-5.9.swift diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift new file mode 100644 index 00000000000..44cb5573169 --- /dev/null +++ b/Package@swift-5.9.swift @@ -0,0 +1,101 @@ +// swift-tools-version:5.9 +#if canImport(Darwin) +import Darwin.C +#elseif canImport(Glibc) +import Glibc +#elseif canImport(MSVCRT) +import MSVCRT +#endif + +import PackageDescription + +var products: [Product] = [ + .library(name: "Sentry", targets: ["Sentry"]), + .library(name: "Sentry-Dynamic", targets: ["Sentry-Dynamic"]), + .library(name: "SentrySwiftUI", targets: ["Sentry", "SentrySwiftUI"]) +] + +var targets: [Target] = [ + .binaryTarget( + name: "Sentry", + url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.54.0/Sentry.xcframework.zip", + checksum: "f0f4b5582f7fef029ddedd22b6b9894a6d2d31ea9c7b52a2133b1ec7c4cff206" //Sentry-Static + ), + .binaryTarget( + name: "Sentry-Dynamic", + url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.54.0/Sentry-Dynamic.xcframework.zip", + checksum: "2cd3ee298133ed3a6d3b98f3b040e5c67b752887e67647ae671f450ecfd3facf" //Sentry-Dynamic + ), + .target ( + name: "SentrySwiftUI", + dependencies: ["Sentry", "SentryInternal"], + path: "Sources/SentrySwiftUI", + exclude: ["SentryInternal/", "module.modulemap"], + swiftSettings: [ + .interoperabilityMode(.Cxx) + ], + linkerSettings: [ + .linkedFramework("Sentry") + ]), + .target( + name: "SentryInternal", + path: "Sources/SentrySwiftUI", + sources: [ + "SentryInternal/" + ], + publicHeadersPath: "SentryInternal/") +] + +let env = getenv("EXPERIMENTAL_SPM_BUILDS") +if let env = env, String(cString: env, encoding: .utf8) == "1" { + products.append(.library(name: "SentrySPM", type: .dynamic, targets: ["SentryObjc"])) + targets.append(contentsOf: [ + // At least one source file is required, therefore we use a dummy class to satisfy the SPM build system + .target( + name: "SentryHeaders", + path: "Sources/Sentry", + sources: ["SentryDummyPublicEmptyClass.m"], + publicHeadersPath: "Public" + ), + .target( + name: "_SentryPrivate", + dependencies: ["SentryHeaders"], + path: "Sources/Sentry", + sources: ["SentryDummyPrivateEmptyClass.m"], + publicHeadersPath: "include", + cSettings: [.headerSearchPath("include/HybridPublic")]), + .target( + name: "SentrySwift", + dependencies: ["_SentryPrivate", "SentryHeaders"], + path: "Sources/Swift", + swiftSettings: [ + .unsafeFlags(["-enable-library-evolution"]), + // Some API breaking changes are necessary for the framework to compile with SPM, we’ll ship + // those in V9. + .define("SDK_V9") + ]), + .target( + name: "SentryObjc", + dependencies: ["SentrySwift"], + path: "Sources", + exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "Resources", "Configuration"], + cSettings: [ + .headerSearchPath("Sentry/include/HybridPublic"), + .headerSearchPath("Sentry"), + .headerSearchPath("SentryCrash/Recording"), + .headerSearchPath("SentryCrash/Recording/Monitors"), + .headerSearchPath("SentryCrash/Recording/Tools"), + .headerSearchPath("SentryCrash/Installations"), + .headerSearchPath("SentryCrash/Reporting/Filters"), + .headerSearchPath("SentryCrash/Reporting/Filters/Tools"), + .define("SDK_V9")]) + ]) +} + +let package = Package( + name: "Sentry", + platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4)], + products: products, + targets: targets, + cxxLanguageStandard: .cxx14 +) From 980cbd34adbf782cfa210ba1759097eae8023362 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Wed, 6 Aug 2025 17:44:39 -0300 Subject: [PATCH 07/17] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 504f5d41a84..769086a9712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ - Fix memory leak in SessionReplayIntegration (#5770) - Fix reporting of energy used while profiling (#5768) - Fixed a build error in `SentryFeedback.swift` when building with cocoapods on Xcode 14.2 (#5917) +- Fix linking with SentrySwiftUI on Xcode 26 for visionOS (#5823) ### Internal From c7b2d8a88db72ffdbd44db03267142897ba80a89 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Thu, 7 Aug 2025 09:59:35 -0300 Subject: [PATCH 08/17] Set interoperabilityMode only for visionOS --- Package@swift-5.9.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index 44cb5573169..77a281ee920 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -32,7 +32,7 @@ var targets: [Target] = [ path: "Sources/SentrySwiftUI", exclude: ["SentryInternal/", "module.modulemap"], swiftSettings: [ - .interoperabilityMode(.Cxx) + .interoperabilityMode(.Cxx, .when(platforms: [.visionOS])) ], linkerSettings: [ .linkedFramework("Sentry") @@ -94,7 +94,7 @@ if let env = env, String(cString: env, encoding: .utf8) == "1" { let package = Package( name: "Sentry", - platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4)], + platforms: [.iOS(.v12), .macOS(.v10_13), .tvOS(.v12), .watchOS(.v4), .visionOS(.v1)], products: products, targets: targets, cxxLanguageStandard: .cxx14 From bc4b06de02105de9df84113d815bf0b0b5f681fd Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Thu, 7 Aug 2025 10:04:21 -0300 Subject: [PATCH 09/17] Update trigger paths to include any package.swift --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36b8939c729..02ca3b854cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ on: - Sentry.xcworkspace/** - Sentry.xcodeproj/** - Gemfile.lock - - "Package.swift" + - "Package*.swift" - "Makefile" # Make commands used for CI build setup - "Brewfile*" # Dependency installation affects build environment diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e627e37540..251e6316448 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ on: - "scripts/ci-diagnostics.sh" - Sentry.xcworkspace/** - Sentry.xcodeproj/** - - "Package.swift" + - "Package*.swift" - ".github/workflows/build-xcframework.yml" - "scripts/build-xcframework-slice.sh" - "scripts/assemble-xcframework.sh" From b86218c9126cae5dcad68b1d073e64c9b2f5eae2 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Thu, 7 Aug 2025 10:33:13 -0300 Subject: [PATCH 10/17] Fix building for v9 --- Package@swift-5.9.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index 77a281ee920..b74fc747cc6 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -79,6 +79,7 @@ if let env = env, String(cString: env, encoding: .utf8) == "1" { dependencies: ["SentrySwift"], path: "Sources", exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "Resources", "Configuration"], + publicHeadersPath: "Sentry/Public", cSettings: [ .headerSearchPath("Sentry/include/HybridPublic"), .headerSearchPath("Sentry"), @@ -94,7 +95,7 @@ if let env = env, String(cString: env, encoding: .utf8) == "1" { let package = Package( name: "Sentry", - platforms: [.iOS(.v12), .macOS(.v10_13), .tvOS(.v12), .watchOS(.v4), .visionOS(.v1)], + platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4), .visionOS(.v1)], products: products, targets: targets, cxxLanguageStandard: .cxx14 From be1aa6b13c76737f4cf1da030a3384e397d44ecd Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Thu, 7 Aug 2025 13:05:36 -0300 Subject: [PATCH 11/17] Remove encoding --- Package@swift-5.9.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index b74fc747cc6..027b1aae4fb 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -47,7 +47,7 @@ var targets: [Target] = [ ] let env = getenv("EXPERIMENTAL_SPM_BUILDS") -if let env = env, String(cString: env, encoding: .utf8) == "1" { +if let env = env, String(cString: env) == "1" { products.append(.library(name: "SentrySPM", type: .dynamic, targets: ["SentryObjc"])) targets.append(contentsOf: [ // At least one source file is required, therefore we use a dummy class to satisfy the SPM build system @@ -79,7 +79,7 @@ if let env = env, String(cString: env, encoding: .utf8) == "1" { dependencies: ["SentrySwift"], path: "Sources", exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "Resources", "Configuration"], - publicHeadersPath: "Sentry/Public", + publicHeadersPath: "", cSettings: [ .headerSearchPath("Sentry/include/HybridPublic"), .headerSearchPath("Sentry"), From 0b116f30e4b6a908521f632bacb7f80e18df5496 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Thu, 7 Aug 2025 13:13:07 -0300 Subject: [PATCH 12/17] Update tests to check building with both package files --- .github/workflows/release.yml | 54 ++++++++++++++++------- .github/workflows/test-cross-platform.yml | 2 +- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 251e6316448..c15e4e2bfb7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -148,7 +148,7 @@ jobs: # the github.sha is be the pre merge commit id for PRs. # See https://github.community/t/github-sha-isnt-the-value-expected/17903/17906. validate-spm: - name: Validate SPM Static + name: Validate SPM Static ${{matrix.package-file.name}} runs-on: macos-14 needs: assemble-xcframework-variant steps: @@ -159,19 +159,27 @@ jobs: merge-multiple: true - name: Change path of the framework run: | - sed -i '' 's/url.*//g' Package.swift - sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' Package.swift - sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' Package.swift - sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' Package.swift + rm -rf ${{matrix.package-file.delete-package-file}} + sed -i '' 's/url.*//g' ${{matrix.package-file.name}} + sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' ${{matrix.package-file.name}} + sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' ${{matrix.package-file.name}} + sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' ${{matrix.package-file.name}} shell: bash - run: swift build working-directory: Samples/macOS-SPM-CommandLine - name: Run CI Diagnostics if: failure() run: ./scripts/ci-diagnostics.sh + strategy: + matrix: + package-file: + - name: Package.swift + delete-package-file: Package@swift-5.9.swift + - name: Package@swift-5.9.swift + delete-package-file: Package.swift validate-spm-dynamic: - name: Validate SPM Dynamic + name: Validate SPM Dynamic ${{matrix.package-file.name}} runs-on: macos-14 needs: assemble-xcframework-variant steps: @@ -182,19 +190,27 @@ jobs: merge-multiple: true - name: Change path of the framework run: | - sed -i '' 's/url.*//g' Package.swift - sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' Package.swift - sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' Package.swift - sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' Package.swift + rm -rf ${{matrix.package-file.delete-package-file}} + sed -i '' 's/url.*//g' ${{matrix.package-file.name}} + sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' ${{matrix.package-file.name}} + sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' ${{matrix.package-file.name}} + sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' ${{matrix.package-file.name}} shell: bash - run: swift build working-directory: Samples/SPM-Dynamic - name: Run CI Diagnostics if: failure() run: ./scripts/ci-diagnostics.sh + strategy: + matrix: + package-file: + - name: Package.swift + delete-package-file: Package@swift-5.9.swift + - name: Package@swift-5.9.swift + delete-package-file: Package.swift swift-build: - name: Build Swift Static + name: Build Swift Static ${{matrix.package-file.name}} runs-on: macos-14 needs: assemble-xcframework-variant steps: @@ -205,15 +221,23 @@ jobs: merge-multiple: true - name: Change path of the framework run: | - sed -i '' 's/url.*//g' Package.swift - sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' Package.swift - sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' Package.swift - sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' Package.swift + rm -rf ${{matrix.package-file.delete-package-file}} + sed -i '' 's/url.*//g' ${{matrix.package-file.name}} + sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' ${{matrix.package-file.name}} + sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' ${{matrix.package-file.name}} + sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' ${{matrix.package-file.name}} shell: bash - run: swift build - name: Run CI Diagnostics if: failure() run: ./scripts/ci-diagnostics.sh + strategy: + matrix: + package-file: + - name: Package.swift + delete-package-file: Package@swift-5.9.swift + - name: Package@swift-5.9.swift + delete-package-file: Package.swift duplication-tests: name: Test Sentry Duplication V4 # Up the version with every change to keep track of flaky tests diff --git a/.github/workflows/test-cross-platform.yml b/.github/workflows/test-cross-platform.yml index 2f7c4f72b04..2179751b02c 100644 --- a/.github/workflows/test-cross-platform.yml +++ b/.github/workflows/test-cross-platform.yml @@ -10,7 +10,7 @@ on: - "Sources/**" - "Sentry.podspec" - "SentrySwiftUI.podspec" - - "Package.swift" + - "Package*.swift" - "Makefile" # Make commands used for cross-platform setup - "Brewfile*" # Dependency installation affects cross-platform testing - "scripts/ci-diagnostics.sh" From 3b27258fcca928283f85011865eb26a7b94c933b Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Thu, 7 Aug 2025 13:22:27 -0300 Subject: [PATCH 13/17] Only delete newer package files --- .github/workflows/release.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c15e4e2bfb7..ea39fd1b1a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,9 +157,11 @@ jobs: with: pattern: xcframework-${{github.sha}}-* merge-multiple: true + - name: Remove newer package files + if: ${{ matrix.package-file.name == 'Package.swift' }} + run: rm -rf Package@swift* - name: Change path of the framework run: | - rm -rf ${{matrix.package-file.delete-package-file}} sed -i '' 's/url.*//g' ${{matrix.package-file.name}} sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' ${{matrix.package-file.name}} sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' ${{matrix.package-file.name}} @@ -174,9 +176,7 @@ jobs: matrix: package-file: - name: Package.swift - delete-package-file: Package@swift-5.9.swift - name: Package@swift-5.9.swift - delete-package-file: Package.swift validate-spm-dynamic: name: Validate SPM Dynamic ${{matrix.package-file.name}} @@ -188,9 +188,11 @@ jobs: with: pattern: xcframework-${{github.sha}}-* merge-multiple: true + - name: Remove newer package files + if: ${{ matrix.package-file.name == 'Package.swift' }} + run: rm -rf Package@swift* - name: Change path of the framework run: | - rm -rf ${{matrix.package-file.delete-package-file}} sed -i '' 's/url.*//g' ${{matrix.package-file.name}} sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' ${{matrix.package-file.name}} sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' ${{matrix.package-file.name}} @@ -205,9 +207,7 @@ jobs: matrix: package-file: - name: Package.swift - delete-package-file: Package@swift-5.9.swift - name: Package@swift-5.9.swift - delete-package-file: Package.swift swift-build: name: Build Swift Static ${{matrix.package-file.name}} @@ -219,9 +219,11 @@ jobs: with: pattern: xcframework-${{github.sha}}-* merge-multiple: true + - name: Remove newer package files + if: ${{ matrix.package-file.name == 'Package.swift' }} + run: rm -rf Package@swift* - name: Change path of the framework run: | - rm -rf ${{matrix.package-file.delete-package-file}} sed -i '' 's/url.*//g' ${{matrix.package-file.name}} sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' ${{matrix.package-file.name}} sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic-WithARM64e/path: "Sentry-Dynamic-WithARM64e.xcframework.zip"/g' ${{matrix.package-file.name}} @@ -235,9 +237,7 @@ jobs: matrix: package-file: - name: Package.swift - delete-package-file: Package@swift-5.9.swift - name: Package@swift-5.9.swift - delete-package-file: Package.swift duplication-tests: name: Test Sentry Duplication V4 # Up the version with every change to keep track of flaky tests From 1a71aece4f1a436c117323ec1f2c3b6bf5e3709b Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Fri, 8 Aug 2025 09:37:12 -0300 Subject: [PATCH 14/17] Add explanation comment to Package@swift-5.9.swift --- Package@swift-5.9.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index 027b1aae4fb..c1c4dae5155 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -1,4 +1,7 @@ // swift-tools-version:5.9 +// This Package.swift for Swift 5.9 (and newer) fixes an issue on Xcode 26 when linking `SentrySwiftUI`. +// Don't remove this comment. + #if canImport(Darwin) import Darwin.C #elseif canImport(Glibc) From d5417061ea99b52d02a5f079251172797b8697b6 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Thu, 14 Aug 2025 14:49:02 -0300 Subject: [PATCH 15/17] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 769086a9712..42677daa374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ### Fixes - Add padding to tap area of widget button (#5949) +- Fix linking with SentrySwiftUI on Xcode 26 for visionOS (#5823) ## 8.55.0 @@ -49,7 +50,6 @@ - Fix memory leak in SessionReplayIntegration (#5770) - Fix reporting of energy used while profiling (#5768) - Fixed a build error in `SentryFeedback.swift` when building with cocoapods on Xcode 14.2 (#5917) -- Fix linking with SentrySwiftUI on Xcode 26 for visionOS (#5823) ### Internal From 3400e44a69f8db5608e9277a7c2df7d07e0a242e Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Thu, 14 Aug 2025 14:49:44 -0300 Subject: [PATCH 16/17] Update file filters to include Package@swift-5.9.swift --- .github/file-filters.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/file-filters.yml b/.github/file-filters.yml index 2c02e67b89a..f1862e54fe3 100644 --- a/.github/file-filters.yml +++ b/.github/file-filters.yml @@ -52,7 +52,7 @@ run_api_stability_for_prs: &run_api_stability_for_prs # API-related code # Project files - "Sentry.xcworkspace/**" - "Sentry.xcodeproj/**" - - "Package.swift" + - "Package*.swift" # Scripts - "scripts/build-xcframework-local.sh" From 2c9251c3c1b18d84a2dcca7b991da8c7b9343075 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Thu, 14 Aug 2025 15:03:49 -0300 Subject: [PATCH 17/17] Fix changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42677daa374..89ebfdd1d7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,13 +9,13 @@ ### Fixes - Don't capture replays for events dropped in `beforeSend` (#5916) +- Fix linking with SentrySwiftUI on Xcode 26 for visionOS (#5823) ## 8.54.1-alpha.1 ### Fixes - Add padding to tap area of widget button (#5949) -- Fix linking with SentrySwiftUI on Xcode 26 for visionOS (#5823) ## 8.55.0