@@ -58,9 +58,8 @@ @interface SentryClientInternal ()
5858
5959@implementation SentryClientInternal
6060
61- - (_Nullable instancetype )initWithOptions : (SentryOptionsObjC *)internalOptions
61+ - (_Nullable instancetype )initWithOptions : (SentryOptions *)options
6262{
63- SentryOptions *options = [internalOptions toOptions ];
6463 NSError *error;
6564 SentryFileManager *fileManager = [[SentryFileManager alloc ]
6665 initWithOptions: options
@@ -82,9 +81,9 @@ - (_Nullable instancetype)initWithOptions:(SentryOptionsObjC *)internalOptions
8281 [[SentryTransportAdapter alloc ] initWithTransports: transports options: options];
8382
8483 SentryDefaultThreadInspector *threadInspector =
85- [[SentryDefaultThreadInspector alloc ] initWithOptions: internalOptions ];
84+ [[SentryDefaultThreadInspector alloc ] initWithOptions: options ];
8685
87- return [self initWithOptions: internalOptions
86+ return [self initWithOptions: options
8887 transportAdapter: transportAdapter
8988 fileManager: fileManager
9089 threadInspector: threadInspector
@@ -94,7 +93,7 @@ - (_Nullable instancetype)initWithOptions:(SentryOptionsObjC *)internalOptions
9493 timezone: [NSCalendar autoupdatingCurrentCalendar ].timeZone];
9594}
9695
97- - (instancetype )initWithOptions : (SentryOptionsObjC *)options
96+ - (instancetype )initWithOptions : (SentryOptions *)options
9897 transportAdapter : (SentryTransportAdapter *)transportAdapter
9998 fileManager : (SentryFileManager *)fileManager
10099 threadInspector : (SentryDefaultThreadInspector *)threadInspector
@@ -105,7 +104,7 @@ - (instancetype)initWithOptions:(SentryOptionsObjC *)options
105104{
106105 if (self = [super init ]) {
107106 _isEnabled = YES ;
108- self.optionsInternal = options;
107+ self.options = options;
109108 self.transportAdapter = transportAdapter;
110109 self.fileManager = fileManager;
111110 self.threadInspector = threadInspector;
@@ -117,17 +116,21 @@ - (instancetype)initWithOptions:(SentryOptionsObjC *)options
117116
118117 // The SDK stores the installationID in a file. The first call requires file IO. To avoid
119118 // executing this on the main thread, we cache the installationID async here.
120- [SentryInstallation
121- cacheIDAsyncWithCacheDirectoryPath: [options toOptions ].cacheDirectoryPath];
119+ [SentryInstallation cacheIDAsyncWithCacheDirectoryPath: options.cacheDirectoryPath];
122120
123121 [fileManager deleteOldEnvelopeItems ];
124122 }
125123 return self;
126124}
127125
128- - (SentryOptions *)options
126+ - (void ) setOptionsInternal : ( SentryOptions *)optionsInternal
129127{
130- return [self .optionsInternal toOptions ];
128+ self.options = optionsInternal;
129+ }
130+
131+ - (NSObject *)getOptions
132+ {
133+ return self.options ;
131134}
132135
133136- (SentryId *)captureMessage : (NSString *)message
@@ -384,7 +387,7 @@ - (nullable SentryTraceContext *)getTraceStateWithEvent:(SentryEvent *)event
384387
385388 SentryTracer *tracer = [SentryTracer getTracer: span];
386389 if (tracer != nil ) {
387- return [[SentryTraceContext alloc ] initWithTracer: tracer scope: scope options: self .options ];
390+ return [[SentryTraceContext alloc ] initWithTracer: tracer scope: scope options: _options ];
388391 }
389392
390393 if (event.error || event.exceptions .count > 0 ) {
0 commit comments