Skip to content

Commit 916c95e

Browse files
committed
Sync with generated SentrySdk & SentryLogger
From #4488
1 parent f8fefb7 commit 916c95e

File tree

1 file changed

+128
-72
lines changed

1 file changed

+128
-72
lines changed

src/Sentry.Bindings.Cocoa/SwiftApiDefinitions.cs

Lines changed: 128 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,61 @@ interface SentryId
6666
nuint Hash { get; }
6767
}
6868

69+
// @interface SentryLogger : NSObject
70+
[BaseType (typeof(NSObject), Name = "_TtC6Sentry12SentryLogger")]
71+
[DisableDefaultCtor]
72+
[Internal]
73+
interface SentryLogger
74+
{
75+
// -(void)trace:(NSString * _Nonnull)body;
76+
[Export ("trace:")]
77+
void Trace (string body);
78+
79+
// -(void)trace:(NSString * _Nonnull)body attributes:(NSDictionary<NSString *,id> * _Nonnull)attributes;
80+
[Export ("trace:attributes:")]
81+
void Trace (string body, NSDictionary<NSString, NSObject> attributes);
82+
83+
// -(void)debug:(NSString * _Nonnull)body;
84+
[Export ("debug:")]
85+
void Debug (string body);
86+
87+
// -(void)debug:(NSString * _Nonnull)body attributes:(NSDictionary<NSString *,id> * _Nonnull)attributes;
88+
[Export ("debug:attributes:")]
89+
void Debug (string body, NSDictionary<NSString, NSObject> attributes);
90+
91+
// -(void)info:(NSString * _Nonnull)body;
92+
[Export ("info:")]
93+
void Info (string body);
94+
95+
// -(void)info:(NSString * _Nonnull)body attributes:(NSDictionary<NSString *,id> * _Nonnull)attributes;
96+
[Export ("info:attributes:")]
97+
void Info (string body, NSDictionary<NSString, NSObject> attributes);
98+
99+
// -(void)warn:(NSString * _Nonnull)body;
100+
[Export ("warn:")]
101+
void Warn (string body);
102+
103+
// -(void)warn:(NSString * _Nonnull)body attributes:(NSDictionary<NSString *,id> * _Nonnull)attributes;
104+
[Export ("warn:attributes:")]
105+
void Warn (string body, NSDictionary<NSString, NSObject> attributes);
106+
107+
// -(void)error:(NSString * _Nonnull)body;
108+
[Export ("error:")]
109+
void Error (string body);
110+
111+
// -(void)error:(NSString * _Nonnull)body attributes:(NSDictionary<NSString *,id> * _Nonnull)attributes;
112+
[Export ("error:attributes:")]
113+
void Error (string body, NSDictionary<NSString, NSObject> attributes);
114+
115+
// -(void)fatal:(NSString * _Nonnull)body;
116+
[Export ("fatal:")]
117+
void Fatal (string body);
118+
119+
// -(void)fatal:(NSString * _Nonnull)body attributes:(NSDictionary<NSString *,id> * _Nonnull)attributes;
120+
[Export ("fatal:attributes:")]
121+
void Fatal (string body, NSDictionary<NSString, NSObject> attributes);
122+
}
123+
69124
// @interface SentryProfileOptions : NSObject
70125
[BaseType(typeof(NSObject), Name = "_TtC6Sentry20SentryProfileOptions")]
71126
[DisableDefaultCtor]
@@ -254,219 +309,220 @@ interface SentryRRWebEvent : SentrySerializable
254309
[Internal]
255310
interface SentrySDK
256311
{
257-
// @property (nonatomic, class, readonly, strong) id <SentrySpan> _Nullable span;
312+
// @property (readonly, nonatomic, strong, class) id<SentrySpan> _Nullable span;
258313
[Static]
259-
[NullAllowed, Export("span")]
314+
[NullAllowed, Export ("span", ArgumentSemantic.Strong)]
260315
SentrySpan Span { get; }
261316

262-
// @property (nonatomic, class, readonly) BOOL isEnabled;
317+
// @property (readonly, nonatomic, class) BOOL isEnabled;
263318
[Static]
264-
[Export("isEnabled")]
319+
[Export ("isEnabled")]
265320
bool IsEnabled { get; }
266321

267-
// @property (nonatomic, class, readonly, strong) SentryReplayApi * _Nonnull replay;
322+
// @property (readonly, nonatomic, strong, class) SentryReplayApi * _Nonnull replay;
268323
[Static]
269-
[Export("replay")]
324+
[Export ("replay", ArgumentSemantic.Strong)]
270325
SentryReplayApi Replay { get; }
271326

272-
// @property (nonatomic, class, readonly, strong) SentryLogger * _Nonnull logger;
327+
// @property (readonly, nonatomic, strong, class) SentryLogger * _Nonnull logger;
328+
[Static]
329+
[Export ("logger", ArgumentSemantic.Strong)]
330+
SentryLogger Logger { get; }
273331

274-
// + (void)startWithOptions:(SentryOptions * _Nonnull)options;
332+
// +(void)startWithOptions:(SentryOptions * _Nonnull)options;
275333
[Static]
276-
[Export("startWithOptions:")]
277-
void StartWithOptions(SentryOptions options);
334+
[Export ("startWithOptions:")]
335+
void StartWithOptions (SentryOptions options);
278336

279-
// + (void)startWithConfigureOptions:(void (^ _Nonnull)(SentryOptions * _Nonnull))configureOptions;
337+
// +(void)startWithConfigureOptions:(void (^ _Nonnull)(SentryOptions * _Nonnull))configureOptions;
280338
[Static]
281-
[Export("startWithConfigureOptions:")]
282-
void StartWithConfigureOptions(Action<SentryOptions> configureOptions);
339+
[Export ("startWithConfigureOptions:")]
340+
void StartWithConfigureOptions (Action<SentryOptions> configureOptions);
283341

284-
// + (SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event;
342+
// +(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event;
285343
[Static]
286-
[Export("captureEvent:")]
287-
SentryId CaptureEvent(SentryEvent @event);
344+
[Export ("captureEvent:")]
345+
SentryId CaptureEvent (SentryEvent @event);
288346

289-
// + (SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScope:(SentryScope * _Nonnull)scope;
347+
// +(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScope:(SentryScope * _Nonnull)scope;
290348
[Static]
291-
[Export("captureEvent:withScope:")]
292-
SentryId CaptureEvent(SentryEvent @event, SentryScope scope);
349+
[Export ("captureEvent:withScope:")]
350+
SentryId CaptureEvent (SentryEvent @event, SentryScope scope);
293351

294-
// + (SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block;
352+
// +(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block;
295353
[Static]
296-
[Export("captureEvent:withScopeBlock:")]
297-
SentryId CaptureEvent(SentryEvent @event, Action<SentryScope> block);
354+
[Export ("captureEvent:withScopeBlock:")]
355+
SentryId CaptureEvent (SentryEvent @event, Action<SentryScope> block);
298356

299-
// + (id <SentrySpan> _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation;
357+
// +(id<SentrySpan> _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation;
300358
[Static]
301-
[Export("startTransactionWithName:operation:")]
302-
SentrySpan StartTransactionWithName(string name, string operation);
359+
[Export ("startTransactionWithName:operation:")]
360+
SentrySpan StartTransactionWithName (string name, string operation);
303361

304-
// + (id <SentrySpan> _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation bindToScope:(BOOL)bindToScope;
362+
// +(id<SentrySpan> _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation bindToScope:(BOOL)bindToScope;
305363
[Static]
306-
[Export("startTransactionWithName:operation:bindToScope:")]
307-
SentrySpan StartTransactionWithName(string name, string operation, bool bindToScope);
364+
[Export ("startTransactionWithName:operation:bindToScope:")]
365+
SentrySpan StartTransactionWithName (string name, string operation, bool bindToScope);
308366

309-
// + (id <SentrySpan> _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext;
367+
// +(id<SentrySpan> _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext;
310368
[Static]
311-
[Export("startTransactionWithContext:")]
312-
SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext);
369+
[Export ("startTransactionWithContext:")]
370+
SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext);
313371

314-
// + (id <SentrySpan> _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope;
372+
// +(id<SentrySpan> _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope;
315373
[Static]
316-
[Export("startTransactionWithContext:bindToScope:")]
317-
SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, bool bindToScope);
374+
[Export ("startTransactionWithContext:bindToScope:")]
375+
SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext, bool bindToScope);
318376

319-
// + (id <SentrySpan> _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope customSamplingContext:(NSDictionary<NSString *, id> * _Nonnull)customSamplingContext;
377+
// +(id<SentrySpan> _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope customSamplingContext:(NSDictionary<NSString *,id> * _Nonnull)customSamplingContext;
320378
[Static]
321-
[Export("startTransactionWithContext:bindToScope:customSamplingContext:")]
322-
SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, bool bindToScope, NSDictionary<NSString, NSObject> customSamplingContext);
379+
[Export ("startTransactionWithContext:bindToScope:customSamplingContext:")]
380+
SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext, bool bindToScope, NSDictionary<NSString, NSObject> customSamplingContext);
323381

324-
// + (id <SentrySpan> _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary<NSString *, id> * _Nonnull)customSamplingContext;
382+
// +(id<SentrySpan> _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary<NSString *,id> * _Nonnull)customSamplingContext;
325383
[Static]
326384
[Export ("startTransactionWithContext:customSamplingContext:")]
327385
SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext, NSDictionary<NSString, NSObject> customSamplingContext);
328386

329-
// + (SentryId * _Nonnull)captureError:(NSError * _Nonnull)error;
387+
// +(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error;
330388
[Static]
331389
[Export ("captureError:")]
332390
SentryId CaptureError (NSError error);
333391

334-
// + (SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScope:(SentryScope * _Nonnull)scope;
392+
// +(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScope:(SentryScope * _Nonnull)scope;
335393
[Static]
336394
[Export ("captureError:withScope:")]
337395
SentryId CaptureError (NSError error, SentryScope scope);
338396

339-
// + (SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block;
397+
// +(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block;
340398
[Static]
341399
[Export ("captureError:withScopeBlock:")]
342400
SentryId CaptureError (NSError error, Action<SentryScope> block);
343401

344-
// + (SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception;
402+
// +(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception;
345403
[Static]
346404
[Export ("captureException:")]
347405
SentryId CaptureException (NSException exception);
348406

349-
// + (SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScope:(SentryScope * _Nonnull)scope;
407+
// +(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScope:(SentryScope * _Nonnull)scope;
350408
[Static]
351409
[Export ("captureException:withScope:")]
352410
SentryId CaptureException (NSException exception, SentryScope scope);
353411

354-
// + (SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block;
412+
// +(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block;
355413
[Static]
356414
[Export ("captureException:withScopeBlock:")]
357415
SentryId CaptureException (NSException exception, Action<SentryScope> block);
358416

359-
// + (SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message;
417+
// +(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message;
360418
[Static]
361419
[Export ("captureMessage:")]
362420
SentryId CaptureMessage (string message);
363421

364-
// + (SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScope:(SentryScope * _Nonnull)scope;
422+
// +(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScope:(SentryScope * _Nonnull)scope;
365423
[Static]
366424
[Export ("captureMessage:withScope:")]
367425
SentryId CaptureMessage (string message, SentryScope scope);
368426

369-
// + (SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block;
427+
// +(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block;
370428
[Static]
371429
[Export ("captureMessage:withScopeBlock:")]
372430
SentryId CaptureMessage (string message, Action<SentryScope> block);
373431

374-
// + (void) captureUserFeedback:(SentryUserFeedback* _Nonnull) userFeedback SWIFT_DEPRECATED_MSG("Use SentrySDK.back or use or configure our new managed UX with SentryOptions.configureUserFeedback.");
432+
// +(void)captureUserFeedback:(SentryUserFeedback * _Nonnull)userFeedback __attribute__((deprecated("Use SentrySDK.back or use or configure our new managed UX with SentryOptions.configureUserFeedback.")));
375433
[Static]
376434
[Export ("captureUserFeedback:")]
377435
void CaptureUserFeedback (SentryUserFeedback userFeedback);
378436

379-
// + (void)captureFeedback:(SentryFeedback * _Nonnull)feedback;
437+
// +(void)captureFeedback:(SentryFeedback * _Nonnull)feedback;
380438
[Static]
381439
[Export ("captureFeedback:")]
382440
void CaptureFeedback (SentryFeedback feedback);
383441

384-
// @property (nonatomic, class, readonly, strong) SentryFeedbackAPI * _Nonnull feedback SWIFT_AVAILABILITY(ios,introduced=13.0);
442+
// @property (readonly, nonatomic, strong, class) SentryFeedbackAPI * _Nonnull feedback __attribute__((availability(ios, introduced=13.0)));
385443
[Static]
386-
[Export ("feedback")]
444+
[Export ("feedback", ArgumentSemantic.Strong)]
387445
SentryFeedbackAPI Feedback { get; }
388446

389-
// + (void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb;
447+
// +(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb;
390448
[Static]
391449
[Export ("addBreadcrumb:")]
392450
void AddBreadcrumb (SentryBreadcrumb crumb);
393451

394-
// + (void)configureScope:(void (^ _Nonnull)(SentryScope * _Nonnull))callback;
452+
// +(void)configureScope:(void (^ _Nonnull)(SentryScope * _Nonnull))callback;
395453
[Static]
396454
[Export ("configureScope:")]
397455
void ConfigureScope (Action<SentryScope> callback);
398456

399-
// @property (nonatomic, class, readonly) BOOL crashedLastRun;
457+
// @property (readonly, nonatomic, class) BOOL crashedLastRun;
400458
[Static]
401459
[Export ("crashedLastRun")]
402460
bool CrashedLastRun { get; }
403461

404-
// property (nonatomic, class, readonly) BOOL detectedStartUpCrash;
462+
// @property (readonly, nonatomic, class) BOOL detectedStartUpCrash;
405463
[Static]
406464
[Export ("detectedStartUpCrash")]
407465
bool DetectedStartUpCrash { get; }
408466

409-
// + (void)setUser:(SentryUser * _Nullable)user;
467+
// +(void)setUser:(SentryUser * _Nullable)user;
410468
[Static]
411469
[Export ("setUser:")]
412470
void SetUser ([NullAllowed] SentryUser user);
413471

414-
// + (void)startSession;
472+
// +(void)startSession;
415473
[Static]
416474
[Export ("startSession")]
417475
void StartSession ();
418476

419-
// + (void)endSession;
477+
// +(void)endSession;
420478
[Static]
421479
[Export ("endSession")]
422480
void EndSession ();
423481

424-
// + (void)crash;
482+
// +(void)crash;
425483
[Static]
426484
[Export ("crash")]
427485
void Crash ();
428486

429-
// + (void)reportFullyDisplayed;
487+
// +(void)reportFullyDisplayed;
430488
[Static]
431489
[Export ("reportFullyDisplayed")]
432490
void ReportFullyDisplayed ();
433491

434-
// + (void)pauseAppHangTracking;
492+
// +(void)pauseAppHangTracking;
435493
[Static]
436494
[Export ("pauseAppHangTracking")]
437495
void PauseAppHangTracking ();
438496

439-
// + (void)resumeAppHangTracking;
497+
// +(void)resumeAppHangTracking;
440498
[Static]
441499
[Export ("resumeAppHangTracking")]
442500
void ResumeAppHangTracking ();
443501

444-
// + (void)flush:(NSTimeInterval)timeout;
502+
// +(void)flush:(NSTimeInterval)timeout;
445503
[Static]
446504
[Export ("flush:")]
447505
void Flush (double timeout);
448506

449-
// + (void)close;
507+
// +(void)close;
450508
[Static]
451509
[Export ("close")]
452510
void Close ();
453511

454-
// + (void)startProfiler;
512+
// +(void)startProfiler;
455513
[Static]
456514
[Export ("startProfiler")]
457515
void StartProfiler ();
458516

459-
// + (void)stopProfiler;
517+
// +(void)stopProfiler;
460518
[Static]
461519
[Export ("stopProfiler")]
462520
void StopProfiler ();
463521

464-
// + (void)clearLogger;
465-
466-
// - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
467-
[Export("init")]
468-
[DesignatedInitializer]
469-
IntPtr Constructor();
522+
// +(void)clearLogger;
523+
[Static]
524+
[Export ("clearLogger")]
525+
void ClearLogger ();
470526
}
471527

472528
// @interface SentryUserFeedback : NSObject <SentrySerializable>

0 commit comments

Comments
 (0)