Skip to content

Commit 5362f21

Browse files
committed
ref: SentryOptions in Swift
1 parent 324157f commit 5362f21

File tree

179 files changed

+26758
-26784
lines changed

Some content is hidden

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

179 files changed

+26758
-26784
lines changed

Samples/iOS-Swift/iOS-Swift/Tools/SentryExposure.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#import <Sentry/SentryScope.h>
33
#import <UIKit/UIKit.h>
44

5-
@class SentryOptions;
5+
@class SentryOptionsInternal;
66

77
NS_ASSUME_NONNULL_BEGIN
88

@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
1515

1616
@interface SentryClientInternal : NSObject
1717

18-
@property (nonatomic) SentryOptions *options;
18+
@property (nonatomic) SentryOptionsInternal *options;
1919

2020
@end
2121

Samples/iOS-Swift/iOS-Swift/Tools/iOS-Swift-Bridging-Header.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#import "SentryExposure.h"
44
#import <Sentry/PrivateSentrySDKOnly.h>
55
#import <Sentry/SentryDsn+Private.h>
6-
#import <Sentry/SentryOptions+Private.h>
6+
#import <Sentry/SentryOptionsInternal+Private.h>

Sentry.xcodeproj/project.pbxproj

Lines changed: 28 additions & 16 deletions
Large diffs are not rendered by default.

SentryTestUtils/Headers/SentryLaunchProfiling+Tests.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# import "SentryDefines.h"
66
# import "SentryProfiler+Private.h"
77

8-
@class SentryOptions;
8+
@class SentryOptionsInternal;
99
@class SentrySamplerDecision;
1010

1111
NS_ASSUME_NONNULL_BEGIN
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
1515
* expressible in Swift. This wraps it and only returns the `BOOL shouldProfile` value in the
1616
* struct.
1717
*/
18-
BOOL sentry_willProfileNextLaunch(SentryOptions *options);
18+
BOOL sentry_willProfileNextLaunch(SentryOptionsInternal *options);
1919

2020
/**
2121
* Contains the logic to start a launch profile. Exposed separately from @c

SentryTestUtils/Sources/TestClient.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import _SentryPrivate
22
import Foundation
3-
@_spi(Private) import Sentry
3+
@_spi(Private) @testable import Sentry
44

55
public class TestClient: SentryClientInternal {
6-
public override init?(options: Options) {
6+
public override init?(options: SentryOptionsInternal) {
77
super.init(
88
options: options,
99
transportAdapter: TestTransportAdapter(transports: [TestTransport()], options: options),
1010
fileManager: try! TestFileManager(
11-
options: options,
11+
options: options.toOptions(),
1212
dateProvider: TestCurrentDateProvider(),
1313
dispatchQueueWrapper: TestSentryDispatchQueueWrapper()
1414
),
@@ -22,7 +22,7 @@ public class TestClient: SentryClientInternal {
2222

2323
// Without this override we get a fatal error: use of unimplemented initializer
2424
// see https://stackoverflow.com/questions/28187261/ios-swift-fatal-error-use-of-unimplemented-initializer-init
25-
@_spi(Private) public override init(options: Options, transportAdapter: SentryTransportAdapter, fileManager: SentryFileManager, threadInspector: SentryDefaultThreadInspector, debugImageProvider: SentryDebugImageProvider, random: SentryRandomProtocol, locale: Locale, timezone: TimeZone) {
25+
@_spi(Private) public override init(options: SentryOptionsInternal, transportAdapter: SentryTransportAdapter, fileManager: SentryFileManager, threadInspector: SentryDefaultThreadInspector, debugImageProvider: SentryDebugImageProvider, random: SentryRandomProtocol, locale: Locale, timezone: TimeZone) {
2626
super.init(
2727
options: options,
2828
transportAdapter: transportAdapter,

Sources/Resources/Sentry.modulemap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ framework module Sentry {
1111
header "SentryAppStartMeasurement.h"
1212
header "SentryBreadcrumb+Private.h"
1313
header "SentryFormatter.h"
14-
header "SentryOptionsInternal.h"
1514
header "SentrySwizzle.h"
1615
header "SentryUser+Private.h"
1716

Sources/Sentry/PrivateSentrySDKOnly.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#import "SentryInstallation.h"
77
#import "SentryInternalDefines.h"
88
#import "SentryMeta.h"
9-
#import "SentryOptions+Private.h"
9+
#import "SentryOptionsInternal+Private.h"
1010
#import "SentryProfileCollector.h"
1111
#import "SentryPropagationContext.h"
1212
#import "SentrySDK+Private.h"
@@ -117,13 +117,13 @@ + (NSString *)installationID
117117
return [SentryInstallation idWithCacheDirectoryPath:self.options.cacheDirectoryPath];
118118
}
119119

120-
+ (SentryOptions *)options
120+
+ (SentryOptionsInternal *)options
121121
{
122-
SentryOptions *options = [[SentrySDKInternal currentHub] client].options;
122+
SentryOptionsInternal *options = [[SentrySDKInternal currentHub] client].options;
123123
if (options != nil) {
124124
return options;
125125
}
126-
return [[SentryOptions alloc] init];
126+
return [[SentryOptionsInternal alloc] init];
127127
}
128128

129129
+ (SentryOnAppStartMeasurementAvailable)onAppStartMeasurementAvailable

Sources/Sentry/Profiling/SentryLaunchProfiling.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# import "SentryInternalDefines.h"
88
# import "SentryLaunchProfiling.h"
99
# import "SentryLogC.h"
10-
# import "SentryOptions+Private.h"
10+
# import "SentryOptionsInternal+Private.h"
1111
# import "SentryProfileConfiguration.h"
1212
# import "SentryProfiler+Private.h"
1313
# import "SentrySamplerDecision.h"
@@ -148,7 +148,7 @@
148148
}
149149

150150
SentryLaunchProfileDecision
151-
sentry_launchShouldHaveContinuousProfiling(SentryOptions *options)
151+
sentry_launchShouldHaveContinuousProfiling(SentryOptionsInternal *options)
152152
{
153153
if (!options.profiling.profileAppStarts) {
154154
SENTRY_LOG_DEBUG(@"Continuous profiling v2 enabled but disabled app start profiling, "
@@ -203,7 +203,7 @@
203203
}
204204

205205
SentryLaunchProfileDecision
206-
sentry_shouldProfileNextLaunch(SentryOptions *options)
206+
sentry_shouldProfileNextLaunch(SentryOptionsInternal *options)
207207
{
208208
if ([options isContinuousProfilingEnabled]) {
209209
return sentry_launchShouldHaveContinuousProfiling(options);
@@ -228,7 +228,7 @@
228228

229229
# if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
230230
BOOL
231-
sentry_willProfileNextLaunch(SentryOptions *options)
231+
sentry_willProfileNextLaunch(SentryOptionsInternal *options)
232232
{
233233
return sentry_shouldProfileNextLaunch(options).shouldProfile;
234234
}
@@ -307,7 +307,7 @@
307307
BOOL sentry_isTracingAppLaunch;
308308

309309
void
310-
sentry_configureLaunchProfilingForNextLaunch(SentryOptions *options)
310+
sentry_configureLaunchProfilingForNextLaunch(SentryOptionsInternal *options)
311311
{
312312
[SentryDependencyContainer.sharedInstance.dispatchQueueWrapper dispatchAsyncWithBlock:^{
313313
SentryLaunchProfileDecision config = sentry_shouldProfileNextLaunch(options);

Sources/Sentry/Profiling/SentryProfiledTracerConcurrency.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
# import "SentryContinuousProfiler.h"
66
# import "SentryInternalDefines.h"
77
# import "SentryLogC.h"
8-
# import "SentryOptions+Private.h"
8+
# import "SentryOptionsInternal+Private.h"
99
# import "SentryProfiler+Private.h"
1010
# include <mutex>
1111

1212
# import "SentryEvent+Private.h"
1313
# import "SentryHub+Private.h"
1414
# import "SentryInternalDefines.h"
1515
# import "SentryLaunchProfiling.h"
16-
# import "SentryOptions+Private.h"
16+
# import "SentryOptionsInternal+Private.h"
1717
# import "SentryProfileConfiguration.h"
1818
# import "SentryProfiledTracerConcurrency.h"
1919
# import "SentryProfiler+Private.h"

Sources/Sentry/Profiling/SentryProfilerSerialization.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# import "SentryLogC.h"
1414
# import "SentryMeta.h"
1515
# import "SentryMetricProfiler.h"
16+
# import "SentryOptionsInternal.h"
1617
# import "SentryProfileTimeseries.h"
1718
# import "SentryProfiledTracerConcurrency.h"
1819
# import "SentryProfiler+Private.h"

0 commit comments

Comments
 (0)