Skip to content

Commit 796b619

Browse files
committed
Fix
1 parent 70801b0 commit 796b619

File tree

111 files changed

+748
-1415
lines changed

Some content is hidden

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

111 files changed

+748
-1415
lines changed

Samples/iOS-Swift/iOS-Swift/Profiling/ProfilingViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Sentry
1+
@_spi(Private) import Sentry
22
import SentrySampleShared
33
import UIKit
44

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

Lines changed: 1 addition & 1 deletion
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 SentryOptionsInternal;
5+
@class SentryOptions;
66

77
NS_ASSUME_NONNULL_BEGIN
88

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

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

Sentry.xcodeproj/project.pbxproj

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,14 +1038,10 @@
10381038
FA27EBDC2EB639D400F2ECF7 /* SentryId.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27EBDB2EB639D100F2ECF7 /* SentryId.h */; settings = {ATTRIBUTES = (Public, ); }; };
10391039
FA27EBDE2EB639D900F2ECF7 /* SentryId.m in Sources */ = {isa = PBXBuildFile; fileRef = FA27EBDD2EB639D700F2ECF7 /* SentryId.m */; };
10401040
FA27EBF52EB82FAD00F2ECF7 /* FileIOTrackerTestHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA27EBEF2EB82FA800F2ECF7 /* FileIOTrackerTestHelpers.swift */; };
1041-
FA27ECA12EBA325A00F2ECF7 /* SentryTraceContext+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27EC9B2EBA325400F2ECF7 /* SentryTraceContext+Private.h */; };
10421041
FA27EC0E2EB922F200F2ECF7 /* SentryOptionsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27EC0D2EB922F200F2ECF7 /* SentryOptionsInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
1043-
FA27EC102EB922F900F2ECF7 /* SentryOptionsInternal+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27EC0F2EB922F900F2ECF7 /* SentryOptionsInternal+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
1044-
FA27EC122EB9231D00F2ECF7 /* SentryOptionsConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27EC112EB9231D00F2ECF7 /* SentryOptionsConverter.h */; };
1045-
FA27EC142EB9232600F2ECF7 /* SentryOptionsConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = FA27EC132EB9232600F2ECF7 /* SentryOptionsConverter.m */; };
10461042
FA27EC162EB9236000F2ECF7 /* Options.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA27EC152EB9236000F2ECF7 /* Options.swift */; };
10471043
FA27EC182EB9236400F2ECF7 /* Options+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA27EC172EB9236400F2ECF7 /* Options+Internal.swift */; };
1048-
FA27EC222EB9466D00F2ECF7 /* OptionsUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA27EC1C2EB9466900F2ECF7 /* OptionsUtils.swift */; };
1044+
FA27ECA12EBA325A00F2ECF7 /* SentryTraceContext+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27EC9B2EBA325400F2ECF7 /* SentryTraceContext+Private.h */; };
10491045
FA34C1A32E692A5000BC52AA /* SentryEnvelopeItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA34C1A22E692A5000BC52AA /* SentryEnvelopeItem.swift */; };
10501046
FA3734842E0F086C0091EF24 /* SentryDependencyContainerSwiftHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = FA3734832E0F07A20091EF24 /* SentryDependencyContainerSwiftHelper.h */; };
10511047
FA3734862E0F09320091EF24 /* SentryDependencyContainerSwiftHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = FA3734852E0F092F0091EF24 /* SentryDependencyContainerSwiftHelper.m */; };
@@ -2424,14 +2420,10 @@
24242420
FA27EBDB2EB639D100F2ECF7 /* SentryId.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryId.h; path = Public/SentryId.h; sourceTree = "<group>"; };
24252421
FA27EBDD2EB639D700F2ECF7 /* SentryId.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryId.m; sourceTree = "<group>"; };
24262422
FA27EBEF2EB82FA800F2ECF7 /* FileIOTrackerTestHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileIOTrackerTestHelpers.swift; sourceTree = "<group>"; };
2427-
FA27EC9B2EBA325400F2ECF7 /* SentryTraceContext+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryTraceContext+Private.h"; path = "include/SentryTraceContext+Private.h"; sourceTree = "<group>"; };
24282423
FA27EC0D2EB922F200F2ECF7 /* SentryOptionsInternal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryOptionsInternal.h; path = include/SentryOptionsInternal.h; sourceTree = "<group>"; };
2429-
FA27EC0F2EB922F900F2ECF7 /* SentryOptionsInternal+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryOptionsInternal+Private.h"; path = "include/SentryOptionsInternal+Private.h"; sourceTree = "<group>"; };
2430-
FA27EC112EB9231D00F2ECF7 /* SentryOptionsConverter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryOptionsConverter.h; path = include/SentryOptionsConverter.h; sourceTree = "<group>"; };
2431-
FA27EC132EB9232600F2ECF7 /* SentryOptionsConverter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryOptionsConverter.m; sourceTree = "<group>"; };
24322424
FA27EC152EB9236000F2ECF7 /* Options.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Options.swift; sourceTree = "<group>"; };
24332425
FA27EC172EB9236400F2ECF7 /* Options+Internal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Options+Internal.swift"; sourceTree = "<group>"; };
2434-
FA27EC1C2EB9466900F2ECF7 /* OptionsUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OptionsUtils.swift; sourceTree = "<group>"; };
2426+
FA27EC9B2EBA325400F2ECF7 /* SentryTraceContext+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryTraceContext+Private.h"; path = "include/SentryTraceContext+Private.h"; sourceTree = "<group>"; };
24352427
FA34C1A22E692A5000BC52AA /* SentryEnvelopeItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryEnvelopeItem.swift; sourceTree = "<group>"; };
24362428
FA3734832E0F07A20091EF24 /* SentryDependencyContainerSwiftHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryDependencyContainerSwiftHelper.h; path = include/SentryDependencyContainerSwiftHelper.h; sourceTree = "<group>"; };
24372429
FA3734852E0F092F0091EF24 /* SentryDependencyContainerSwiftHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryDependencyContainerSwiftHelper.m; sourceTree = "<group>"; };
@@ -3131,10 +3123,7 @@
31313123
7B610D5E2512390E00B0B5D9 /* SentrySDK+Private.h */,
31323124
FA6555132E30181B009917BC /* SentrySDKInternal.h */,
31333125
FA6555152E30182B009917BC /* SentrySDKInternal.m */,
3134-
FA27EC132EB9232600F2ECF7 /* SentryOptionsConverter.m */,
3135-
FA27EC112EB9231D00F2ECF7 /* SentryOptionsConverter.h */,
31363126
FA27EC0D2EB922F200F2ECF7 /* SentryOptionsInternal.h */,
3137-
FA27EC0F2EB922F900F2ECF7 /* SentryOptionsInternal+Private.h */,
31383127
FACEED122E3179A10007B4AC /* SentryOptionsInternal.m */,
31393128
7D9B079F23D1E89800C5FC8E /* SentryMeta.h */,
31403129
7D082B8023C628780029866B /* SentryMeta.m */,
@@ -3915,7 +3904,6 @@
39153904
7BF536D224BEF240004FA6A2 /* TestUtils */ = {
39163905
isa = PBXGroup;
39173906
children = (
3918-
FA27EC1C2EB9466900F2ECF7 /* OptionsUtils.swift */,
39193907
62885DA629E946B100554F38 /* TestConncurrentModifications.swift */,
39203908
7BF536D324BEF255004FA6A2 /* SentryAssertions.swift */,
39213909
7B6D98EC24C703F8005502FA /* Async.swift */,
@@ -5144,7 +5132,6 @@
51445132
0A2D8DA8289BC905008720F6 /* SentryViewHierarchyProviderHelper.h in Headers */,
51455133
8EAE980C261E9F530073B6B3 /* SentryDefaultUIViewControllerPerformanceTracker.h in Headers */,
51465134
63FE717D20DA4C1100CDBAE8 /* SentryCrashCachedData.h in Headers */,
5147-
FA27EC122EB9231D00F2ECF7 /* SentryOptionsConverter.h in Headers */,
51485135
03BCC38A27E1BF49003232C7 /* SentryTime.h in Headers */,
51495136
925824C22CB5897700C9B20B /* SentrySessionReplayIntegration-Hybrid.h in Headers */,
51505137
63FE70CD20DA4C1000CDBAE8 /* SentryCrashDoctor.h in Headers */,
@@ -5312,7 +5299,6 @@
53125299
6344DDB41EC309E000D9160D /* SentryCrashReportSink.h in Headers */,
53135300
D8C66A362A77B1F70015696A /* SentryPropagationContext.h in Headers */,
53145301
D867063F27C3BC2400048851 /* SentryCoreDataTracker.h in Headers */,
5315-
FA27EC102EB922F900F2ECF7 /* SentryOptionsInternal+Private.h in Headers */,
53165302
7B6C5EDA264E8D860010D138 /* SentryFramesTrackingIntegration.h in Headers */,
53175303
7B0DC72F288698F70039995F /* NSMutableDictionary+Sentry.h in Headers */,
53185304
63FE713920DA4C1100CDBAE8 /* SentryCrashMach.h in Headers */,
@@ -5971,7 +5957,6 @@
59715957
FA67DD012DDBD4EA00896B02 /* SentryMXCallStackTree.swift in Sources */,
59725958
FAAB29F12E3D252300ACD577 /* SentrySession.swift in Sources */,
59735959
FA6252042EB52DD900BFC967 /* SentryHub.swift in Sources */,
5974-
FA27EC142EB9232600F2ECF7 /* SentryOptionsConverter.m in Sources */,
59755960
FA67DD022DDBD4EA00896B02 /* SentryViewScreenshotProvider.swift in Sources */,
59765961
FA67DD032DDBD4EA00896B02 /* SentryTransactionNameSource.swift in Sources */,
59775962
FA67DD042DDBD4EA00896B02 /* SwiftDescriptor.swift in Sources */,
@@ -6470,7 +6455,6 @@
64706455
FA8AFCFA2E844AB6007A0E18 /* SentryThreadsafeApplicationTests.swift in Sources */,
64716456
D884A20527C80F6300074664 /* SentryCoreDataTrackerTest.swift in Sources */,
64726457
8E70B10125CB8695002B3155 /* SentrySpanIdTests.swift in Sources */,
6473-
FA27EC222EB9466D00F2ECF7 /* OptionsUtils.swift in Sources */,
64746458
62E2119A2DAE99FC007D7262 /* SentryAsyncSafeLog.m in Sources */,
64756459
F44D2B602E6B829F00FF31FA /* SentryScreenFramesTests.swift in Sources */,
64766460
84EB21962BF01CEA00EDDA28 /* SentryCrashInstallationTests.swift in Sources */,

SentryTestUtils/Headers/SentryLaunchProfiling+Tests.h

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

8-
@class SentryOptionsInternal;
98
@class SentrySamplerDecision;
109

1110
NS_ASSUME_NONNULL_BEGIN
@@ -15,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
1514
* expressible in Swift. This wraps it and only returns the `BOOL shouldProfile` value in the
1615
* struct.
1716
*/
18-
BOOL sentry_willProfileNextLaunch(SentryOptionsInternal *options);
17+
BOOL sentry_willProfileNextLaunch(SentryOptions *options);
1918

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

SentryTestUtils/Sources/TestClient.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import Foundation
33
@_spi(Private) @testable import Sentry
44

55
public class TestClient: SentryClientInternal {
6-
public override init?(options: SentryOptionsInternal) {
6+
public override init?(options: NSObject) {
77
super.init(
88
options: options,
9-
transportAdapter: TestTransportAdapter(transports: [TestTransport()], options: options),
9+
transportAdapter: TestTransportAdapter(transports: [TestTransport()], options: options as! Options),
1010
fileManager: try! TestFileManager(
1111
options: options.toOptions(),
1212
dateProvider: TestCurrentDateProvider(),
@@ -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: SentryOptionsInternal, transportAdapter: SentryTransportAdapter, fileManager: SentryFileManager, threadInspector: SentryDefaultThreadInspector, debugImageProvider: SentryDebugImageProvider, random: SentryRandomProtocol, locale: Locale, timezone: TimeZone) {
25+
@_spi(Private) public override init(options: NSObject, transportAdapter: SentryTransportAdapter, fileManager: SentryFileManager, threadInspector: SentryDefaultThreadInspector, debugImageProvider: SentryDebugImageProvider, random: SentryRandomProtocol, locale: Locale, timezone: TimeZone) {
2626
super.init(
2727
options: options,
2828
transportAdapter: transportAdapter,

Sources/Sentry/SentryAutoSessionTrackingIntegration.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#import "SentryAutoSessionTrackingIntegration.h"
22
#import "SentryLogC.h"
3-
#import "SentryOptionsConverter.h"
43
#import "SentrySDKInternal.h"
54
#import "SentrySwift.h"
65

Sources/Sentry/SentryBaseIntegration.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#import "SentryBaseIntegration.h"
22
#import "SentryLogC.h"
3-
#import "SentryOptionsConverter.h"
43
#import "SentrySwift.h"
54

65
NS_ASSUME_NONNULL_BEGIN

Sources/Sentry/SentryClient.m

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#import "SentryMsgPackSerializer.h"
2121
#import "SentryNSDictionarySanitize.h"
2222
#import "SentryNSError.h"
23-
#import "SentryOptionsConverter.h"
24-
#import "SentryOptionsInternal+Private.h"
2523
#import "SentryPropagationContext.h"
2624
#import "SentrySDK+Private.h"
2725
#import "SentryScope+Private.h"
@@ -60,9 +58,9 @@ @interface SentryClientInternal ()
6058

6159
@implementation SentryClientInternal
6260

63-
- (_Nullable instancetype)initWithOptions:(SentryOptionsInternal *)internalOptions
61+
- (_Nullable instancetype)initWithOptions:(SentryOptionsObjC *)internalOptions
6462
{
65-
SentryOptions *options = [SentryOptionsConverter fromInternal:internalOptions];
63+
SentryOptions *options = [internalOptions toOptions];
6664
NSError *error;
6765
SentryFileManager *fileManager = [[SentryFileManager alloc]
6866
initWithOptions:options
@@ -96,7 +94,7 @@ - (_Nullable instancetype)initWithOptions:(SentryOptionsInternal *)internalOptio
9694
timezone:[NSCalendar autoupdatingCurrentCalendar].timeZone];
9795
}
9896

99-
- (instancetype)initWithOptions:(SentryOptionsInternal *)options
97+
- (instancetype)initWithOptions:(SentryOptionsObjC *)options
10098
transportAdapter:(SentryTransportAdapter *)transportAdapter
10199
fileManager:(SentryFileManager *)fileManager
102100
threadInspector:(SentryDefaultThreadInspector *)threadInspector
@@ -119,7 +117,8 @@ - (instancetype)initWithOptions:(SentryOptionsInternal *)options
119117

120118
// The SDK stores the installationID in a file. The first call requires file IO. To avoid
121119
// executing this on the main thread, we cache the installationID async here.
122-
[SentryInstallation cacheIDAsyncWithCacheDirectoryPath:options.cacheDirectoryPath];
120+
[SentryInstallation
121+
cacheIDAsyncWithCacheDirectoryPath:[options toOptions].cacheDirectoryPath];
123122

124123
[fileManager deleteOldEnvelopeItems];
125124
}
@@ -128,10 +127,7 @@ - (instancetype)initWithOptions:(SentryOptionsInternal *)options
128127

129128
- (SentryOptions *)options
130129
{
131-
if (self.optionsInternal) {
132-
return [SentryOptionsConverter fromInternal:self.optionsInternal];
133-
}
134-
return NULL;
130+
return [self.optionsInternal toOptions];
135131
}
136132

137133
- (SentryId *)captureMessage:(NSString *)message

Sources/Sentry/SentryCoreDataTrackingIntegration.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#import "SentryDefaultThreadInspector.h"
55
#import "SentryLogC.h"
66
#import "SentryNSDataSwizzling.h"
7-
#import "SentryOptionsConverter.h"
87
#import "SentrySwift.h"
98

109
@interface SentryCoreDataTrackingIntegration ()
@@ -23,7 +22,7 @@ - (BOOL)installWithOptions:(SentryOptions *)options
2322

2423
self.tracker = [[SentryCoreDataTracker alloc]
2524
initWithThreadInspector:[[SentryDefaultThreadInspector alloc]
26-
initWithOptions:[SentryOptionsConverter toInternal:options]]
25+
initWithOptions:[options toInternal]]
2726
processInfoWrapper:[SentryDependencyContainer.sharedInstance processInfoWrapper]];
2827
[SentryCoreDataSwizzling.sharedInstance startWithTracker:self.tracker];
2928

0 commit comments

Comments
 (0)