diff --git a/Sources/Configuration/SDK.xcconfig b/Sources/Configuration/SDK.xcconfig index 8b4b99721d1..f40c8a55dcf 100644 --- a/Sources/Configuration/SDK.xcconfig +++ b/Sources/Configuration/SDK.xcconfig @@ -119,8 +119,6 @@ ENABLE_NS_ASSERTIONS = $(ENABLE_NS_ASSERTIONS_$(CONFIGURATION)) ENABLE_STRICT_OBJC_MSGSEND = YES -GCC_TREAT_WARNINGS_AS_ERRORS = YES - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES CLANG_WARN_COMMA = YES CLANG_WARN_DOCUMENTATION_COMMENTS = YES @@ -163,7 +161,8 @@ SWIFT_OPTIMIZATION_LEVEL_Test = -Onone SWIFT_OPTIMIZATION_LEVEL_TestCI = -Onone SWIFT_OPTIMIZATION_LEVEL = $(SWIFT_OPTIMIZATION_LEVEL_$(CONFIGURATION)) -SWIFT_TREAT_WARNINGS_AS_ERRORS = YES +GCC_TREAT_WARNINGS_AS_ERRORS = NO +SWIFT_TREAT_WARNINGS_AS_ERRORS = NO MTL_ENABLE_DEBUG_INFO_Debug = YES MTL_ENABLE_DEBUG_INFO_DebugWithoutUIKit = YES diff --git a/Sources/Sentry/Public/SentryOptions.h b/Sources/Sentry/Public/SentryOptions.h index d904f4bf471..23654ef53b7 100644 --- a/Sources/Sentry/Public/SentryOptions.h +++ b/Sources/Sentry/Public/SentryOptions.h @@ -524,8 +524,13 @@ NS_SWIFT_NAME(Options) * launch; if you desire sampling profiled launches, you must compute your own sample rate to decide * whether to set this property to @c YES or @c NO . * @note Profiling is automatically disabled if a thread sanitizer is attached. + * @deprecated See @c SentryProfilingOptions.startOnAppStart and + * @c SentryProfilingOptions.lifecycle . */ -@property (nonatomic, assign) BOOL enableAppLaunchProfiling; +@property (nonatomic, assign) BOOL enableAppLaunchProfiling DEPRECATED_MSG_ATTRIBUTE( + "This property will be removed in a future version of the SDK. See " + "SentryProfilingOptions.startOnAppStart and " + "SentryProfilingOptions.lifecycle."); /** * @note Profiling is not supported on watchOS or tvOS. @@ -549,8 +554,11 @@ NS_SWIFT_NAME(Options) * @note The default is @c nil (which implies continuous profiling mode). * @warning The new continuous profiling mode is experimental and may still contain bugs. * @note Profiling is automatically disabled if a thread sanitizer is attached. + * @deprecated See @c SentryProfilingOptions.sessionSampleRate . */ -@property (nullable, nonatomic, strong) NSNumber *profilesSampleRate; +@property (nullable, nonatomic, strong) NSNumber *profilesSampleRate DEPRECATED_MSG_ATTRIBUTE( + "This property will be removed in a future version of the SDK. See " + "SentryProfilingOptions.sessionSampleRate."); /** * @note Profiling is not supported on watchOS or tvOS. @@ -561,8 +569,12 @@ NS_SWIFT_NAME(Options) * with @c SentrySamplingContext.forNextAppLaunch set to @c YES, and the result will be persisted to * disk for use on the next app launch. * @note Profiling is automatically disabled if a thread sanitizer is attached. + * @deprecated See @c SentryProfilingOptions.sessionSampleRate . */ -@property (nullable, nonatomic) SentryTracesSamplerCallback profilesSampler NS_SWIFT_SENDABLE; +@property (nullable, nonatomic) + SentryTracesSamplerCallback profilesSampler NS_SWIFT_SENDABLE DEPRECATED_MSG_ATTRIBUTE( + "This property will be removed in a future version of the SDK. See " + "SentryProfilingOptions.sessionSampleRate."); /** * If profiling should be enabled or not. @@ -573,8 +585,10 @@ NS_SWIFT_NAME(Options) * @returns @c YES if either @c profilesSampleRate > @c 0 and \<= @c 1 , or @c profilesSampler is * set, otherwise @c NO. * @note Profiling is automatically disabled if a thread sanitizer is attached. + * @deprecated This property will be removed in a future release. */ -@property (nonatomic, assign, readonly) BOOL isProfilingEnabled; +@property (nonatomic, assign, readonly) BOOL isProfilingEnabled DEPRECATED_MSG_ATTRIBUTE( + "This property will be removed in a future version of the SDK."); /** * @brief Whether to enable the sampling profiler. diff --git a/Sources/Sentry/Public/SentrySDK.h b/Sources/Sentry/Public/SentrySDK.h index b93a8243349..1916c320457 100644 --- a/Sources/Sentry/Public/SentrySDK.h +++ b/Sources/Sentry/Public/SentrySDK.h @@ -363,14 +363,16 @@ SENTRY_NO_INIT * @warning Continuous profiling mode is experimental and may still contain bugs. * @seealso https://docs.sentry.io/platforms/apple/guides/ios/profiling/#continuous-profiling */ -+ (void)startProfiler; ++ (void)startProfiler DEPRECATED_MSG_ATTRIBUTE( + "This property will be removed in a future version of the SDK. See startProfileSession."); /** * Stop a continuous profiling session if there is one ongoing. * @warning Continuous profiling mode is experimental and may still contain bugs. * @seealso https://docs.sentry.io/platforms/apple/guides/ios/profiling/#continuous-profiling */ -+ (void)stopProfiler; ++ (void)stopProfiler DEPRECATED_MSG_ATTRIBUTE( + "This property will be removed in a future version of the SDK. See stopProfileSession."); #endif // SENTRY_TARGET_PROFILING_SUPPORTED @end diff --git a/Tests/Configuration/SentryTests.xcconfig b/Tests/Configuration/SentryTests.xcconfig index 436c687a4b2..f8e8bbd211f 100644 --- a/Tests/Configuration/SentryTests.xcconfig +++ b/Tests/Configuration/SentryTests.xcconfig @@ -13,3 +13,6 @@ CLANG_ENABLE_OBJC_ARC = YES CLANG_ENABLE_MODULES = YES OTHER_CFLAGS = -Wall -Wextra APPLICATION_EXTENSION_API_ONLY = NO + +GCC_TREAT_WARNINGS_AS_ERRORS = NO +SWIFT_TREAT_WARNINGS_AS_ERRORS = NO