Skip to content

Commit 79cee27

Browse files
authored
Use thref: Rename SENTRY_NO_UIKIT to SENTRY_NO_UI_FRAMEWORK (#7367)
* ref: Rename `SENTRY_NO_UIKIT` to `SENTRY_NO_UI_FRAMEWORK` * Add missing xcconfig changes
1 parent d4dd2bd commit 79cee27

109 files changed

Lines changed: 256 additions & 255 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SentryTestUtils/Sources/TestHub.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class TestHub: SentryHubInternal {
6464
capturedReplayRecordingVideo.record((replayEvent as! SentryReplayEvent, replayRecording as! SentryReplayRecording, videoURL))
6565
onReplayCapture?()
6666
}
67-
#if canImport(UIKit) && !SENTRY_NO_UIKIT
67+
#if canImport(UIKit) && !SENTRY_NO_UI_FRAMEWORK
6868
#if os(iOS) || os(tvOS)
6969
public var mockReplayId: String?
7070
public override func getSessionReplayId() -> String? {

SentryTestUtils/Sources/TestOptions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public extension Options {
1616
enableAutoBreadcrumbTracking = false
1717
enableCoreDataTracing = false
1818
enableFileIOTracing = false
19-
#if (os(iOS) || os(tvOS) || os(visionOS)) && !SENTRY_NO_UIKIT
19+
#if (os(iOS) || os(tvOS) || os(visionOS)) && !SENTRY_NO_UI_FRAMEWORK
2020
enableUserInteractionTracing = false
2121
attachViewHierarchy = false
2222
enableUIViewControllerTracing = false

SentryTestUtils/Sources/TestSentryViewRenderer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if canImport(UIKit) && !SENTRY_NO_UIKIT
1+
#if canImport(UIKit) && !SENTRY_NO_UI_FRAMEWORK
22
#if os(iOS) || os(tvOS)
33

44
@_spi(Private) @testable import Sentry
@@ -27,4 +27,4 @@ import UIKit
2727
}
2828

2929
#endif // os(iOS) || os(tvOS)
30-
#endif // canImport(UIKit) && !SENTRY_NO_UIKIT
30+
#endif // canImport(UIKit) && !SENTRY_NO_UI_FRAMEWORK

Sources/Configuration/SDK.xcconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ CLANG_CXX_LIBRARY = libc++
4646
HEADER_SEARCH_PATHS = $(SRCROOT)/Sources/Sentry/include/**
4747

4848
SWIFT_ACTIVE_COMPILATION_CONDITIONS_Debug = DEBUG
49-
SWIFT_ACTIVE_COMPILATION_CONDITIONS_DebugWithoutUIKit = DEBUG SENTRY_NO_UIKIT
49+
SWIFT_ACTIVE_COMPILATION_CONDITIONS_DebugWithoutUIKit = DEBUG SENTRY_NO_UI_FRAMEWORK
5050
SWIFT_ACTIVE_COMPILATION_CONDITIONS_Test = SENTRY_TEST
5151
SWIFT_ACTIVE_COMPILATION_CONDITIONS_TestCI = SENTRY_TEST_CI
5252
SWIFT_ACTIVE_COMPILATION_CONDITIONS_Release =
53-
SWIFT_ACTIVE_COMPILATION_CONDITIONS_ReleaseWithoutUIKit = SENTRY_NO_UIKIT
53+
SWIFT_ACTIVE_COMPILATION_CONDITIONS_ReleaseWithoutUIKit = SENTRY_NO_UI_FRAMEWORK
5454
SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(SWIFT_ACTIVE_COMPILATION_CONDITIONS_$(CONFIGURATION))
5555

5656
GCC_PREPROCESSOR_DEFINITIONS_Debug = DEBUG=1
57-
GCC_PREPROCESSOR_DEFINITIONS_DebugWithoutUIKit = DEBUG=1 SENTRY_NO_UIKIT=1
57+
GCC_PREPROCESSOR_DEFINITIONS_DebugWithoutUIKit = DEBUG=1 SENTRY_NO_UI_FRAMEWORK=1
5858
GCC_PREPROCESSOR_DEFINITIONS_Test = DEBUG=1 SENTRY_TEST=1
5959
GCC_PREPROCESSOR_DEFINITIONS_TestCI = DEBUG=1 SENTRY_TEST=1 SENTRY_TEST_CI=1
6060
GCC_PREPROCESSOR_DEFINITIONS_Release = RELEASE=1
61-
GCC_PREPROCESSOR_DEFINITIONS_ReleaseWithoutUIKit = RELEASE=1 SENTRY_NO_UIKIT=1
61+
GCC_PREPROCESSOR_DEFINITIONS_ReleaseWithoutUIKit = RELEASE=1 SENTRY_NO_UI_FRAMEWORK=1
6262
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_$(CONFIGURATION))
6363

6464
CODE_SIGN_IDENTITY = iPhone Developer

Sources/Sentry/Public/SentryCrashExceptionApplication.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// Required for capturing uncaught exceptions in macOS. For more info see
88
// https://docs.sentry.io/platforms/apple/guides/macos/usage/#capturing-uncaught-exceptions-in-macos
9-
#if TARGET_OS_OSX && !SENTRY_NO_UIKIT
9+
#if TARGET_OS_OSX && !SENTRY_NO_UI_FRAMEWORK
1010
# import <AppKit/NSApplication.h>
1111
@interface SentryCrashExceptionApplication : NSApplication
1212
@end

Sources/Sentry/Public/SentryDefines.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
#endif
3030

3131
// SENTRY_HAS_UIKIT means we're on a platform that can link UIKit and we're building a configuration
32-
// that will allow it to be autolinked. SENTRY_NO_UIKIT is set in GCC_PREPROCESSOR_DEFINITIONS
33-
// for configurations that we will not allow to link UIKit by setting CLANG_MODULES_AUTOLINK to NO.
34-
#if SENTRY_UIKIT_AVAILABLE && !SENTRY_NO_UIKIT
32+
// that will allow it to be autolinked. SENTRY_NO_UI_FRAMEWORK is set in
33+
// GCC_PREPROCESSOR_DEFINITIONS for configurations that we will not allow to link UIKit by setting
34+
// CLANG_MODULES_AUTOLINK to NO.
35+
#if SENTRY_UIKIT_AVAILABLE && !SENTRY_NO_UI_FRAMEWORK
3536
# define SENTRY_HAS_UIKIT 1
3637
#else
3738
# define SENTRY_HAS_UIKIT 0
@@ -43,7 +44,7 @@
4344
# define SENTRY_TARGET_MACOS 0
4445
#endif
4546

46-
#if (TARGET_OS_OSX || TARGET_OS_MACCATALYST) && !SENTRY_NO_UIKIT
47+
#if (TARGET_OS_OSX || TARGET_OS_MACCATALYST) && !SENTRY_NO_UI_FRAMEWORK
4748
# define SENTRY_TARGET_MACOS_HAS_UI 1
4849
#else
4950
# define SENTRY_TARGET_MACOS_HAS_UI 0

Sources/Sentry/SentryCrashExceptionApplication.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import <Foundation/Foundation.h>
22

3-
#if TARGET_OS_OSX && !SENTRY_NO_UIKIT
3+
#if TARGET_OS_OSX && !SENTRY_NO_UI_FRAMEWORK
44

55
# import "SentryCrashExceptionApplication.h"
66
# import "SentryCrashExceptionApplicationHelper.h"

Sources/Sentry/SentryCrashExceptionApplicationHelper.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import <Foundation/Foundation.h>
22

3-
#if TARGET_OS_OSX && !SENTRY_NO_UIKIT
3+
#if TARGET_OS_OSX && !SENTRY_NO_UI_FRAMEWORK
44

55
# import "SentryCrash.h"
66
# import "SentryCrashExceptionApplication.h"

Sources/Sentry/SentryOptionsInternal.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ + (BOOL)validateOptions:(NSDictionary<NSString *, id> *)options
7979
[self setBool:options[@"enableCrashHandler"]
8080
block:^(BOOL value) { sentryOptions.enableCrashHandler = value; }];
8181

82-
#if TARGET_OS_OSX && !SENTRY_NO_UIKIT
82+
#if TARGET_OS_OSX && !SENTRY_NO_UI_FRAMEWORK
8383
[self setBool:options[@"enableUncaughtNSExceptionReporting"]
8484
block:^(BOOL value) { sentryOptions.enableUncaughtNSExceptionReporting = value; }];
8585
#endif // TARGET_OS_OSX

Sources/Sentry/SentrySDKInternal.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ + (void)startWithOptions:(SentryOptions *)options
192192
SENTRY_LOG_DEBUG(@"Configured options: %@", options.debugDescription);
193193
#endif // defined(DEBUG) || defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
194194

195-
#if TARGET_OS_OSX && !SENTRY_NO_UIKIT
195+
#if TARGET_OS_OSX && !SENTRY_NO_UI_FRAMEWORK
196196
// Reference to SentryCrashExceptionApplication to prevent compiler from stripping it
197197
// Only do this if we are not building without UIKit, because otherwise the class should not be
198198
// available

0 commit comments

Comments
 (0)