Skip to content

Commit 03721c1

Browse files
chore(deps): update Cocoa SDK to v8.56.0 (#4528)
1 parent 7061fb9 commit 03721c1

File tree

8 files changed

+161
-13
lines changed

8 files changed

+161
-13
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
- Do not overwrite user IP if it is set manually in ASP.NET sdk ([#4513](https://github.com/getsentry/sentry-dotnet/pull/4513))
99
- Fix `SentryOptions.Native.SuppressSignalAborts` and `SuppressExcBadAccess` on iOS ([#4521](https://github.com/getsentry/sentry-dotnet/pull/4521))
1010

11+
### Dependencies
12+
13+
- Bump Cocoa SDK from v8.55.1 to v8.56.0 ([#4528](https://github.com/getsentry/sentry-dotnet/pull/4528))
14+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8560)
15+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.55.1...8.56.0)
16+
1117
## 5.15.0
1218

1319
### Features

modules/sentry-cocoa.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = 8.55.1
1+
version = 8.56.0
22
repo = https://github.com/getsentry/sentry-cocoa

scripts/generate-cocoa-bindings.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,6 @@ $Text = $Text -replace '([\[,] )iOS \(', '$1Introduced (PlatformName.iOS, '
278278
# Make interface partial if we need to access private APIs. Other parts will be defined in PrivateApiDefinitions.cs
279279
$Text = $Text -replace '(?m)^interface SentryScope', 'partial $&'
280280

281-
# Prefix SentryBreadcrumb.Serialize and SentryScope.Serialize with new (since these hide the base method)
282-
$Text = $Text -replace '(?m)(^\s*\/\/[^\r\n]*$\s*\[Export \("serialize"\)\]$\s*)(NSDictionary)', '${1}new $2'
283-
284281
$Text = $Text -replace '.*SentryEnvelope .*?[\s\S]*?\n\n', ''
285282
$Text = $Text -replace '.*typedef.*SentryOnAppStartMeasurementAvailable.*?[\s\S]*?\n\n', ''
286283

src/Sentry.Bindings.Cocoa/ApiDefinitions.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ interface SentryBreadcrumb : SentrySerializable
225225

226226
// -(NSDictionary<NSString *,id> * _Nonnull)serialize;
227227
[Export ("serialize")]
228-
new NSDictionary<NSString, NSObject> Serialize();
228+
NSDictionary<NSString, NSObject> Serialize();
229229

230230
// -(BOOL)isEqualToBreadcrumb:(SentryBreadcrumb * _Nonnull)breadcrumb;
231231
[Export ("isEqualToBreadcrumb:")]
@@ -930,6 +930,11 @@ interface SentrySpan : SentrySerializable
930930
[Abstract]
931931
[NullAllowed, Export ("baggageHttpHeader")]
932932
string BaggageHttpHeader { get; }
933+
934+
// @required -(NSDictionary<NSString *,id> * _Nonnull)serialize;
935+
[Abstract]
936+
[Export ("serialize")]
937+
NSDictionary<NSString, NSObject> Serialize();
933938
}
934939

935940
// @interface SentryHub : NSObject
@@ -1494,6 +1499,10 @@ interface SentryOptions
14941499
[Export ("attachScreenshot")]
14951500
bool AttachScreenshot { get; set; }
14961501

1502+
// @property (nonatomic, strong) SentryViewScreenshotOptions * _Nonnull screenshot;
1503+
[Export ("screenshot", ArgumentSemantic.Strong)]
1504+
SentryViewScreenshotOptions Screenshot { get; set; }
1505+
14971506
// @property (assign, nonatomic) BOOL attachViewHierarchy;
14981507
[Export ("attachViewHierarchy")]
14991508
bool AttachViewHierarchy { get; set; }
@@ -1864,7 +1873,7 @@ partial interface SentryScope : SentrySerializable
18641873

18651874
// -(NSDictionary<NSString *,id> * _Nonnull)serialize;
18661875
[Export ("serialize")]
1867-
new NSDictionary<NSString, NSObject> Serialize();
1876+
NSDictionary<NSString, NSObject> Serialize();
18681877

18691878
// -(void)setContextValue:(NSDictionary<NSString *,id> * _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setContext(value:key:)")));
18701879
[Export ("setContextValue:forKey:")]

src/Sentry.Bindings.Cocoa/PrivateApiDefinitions.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ partial interface SentryScope
1717
// The following types are type-forwarded in various public headers, but have no headers of their own.
1818
// Generate stub classes so the APIs that use them can still operate.
1919

20-
[Internal]
21-
[DisableDefaultCtor]
22-
[BaseType (typeof(NSObject))]
23-
interface SentrySession
24-
{
25-
}
26-
2720
[Internal]
2821
[DisableDefaultCtor]
2922
[BaseType (typeof(NSObject))]

src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<SentryCocoaProperties>$([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)../../modules/sentry-cocoa.properties"))</SentryCocoaProperties>
1313
<SentryCocoaVersion>$([System.Text.RegularExpressions.Regex]::Match($(SentryCocoaProperties), 'version\s*=\s*([^\s]+)').Groups[1].Value)</SentryCocoaVersion>
1414
<SentryCocoaFramework>$(SentryCocoaCache)Sentry-$(SentryCocoaVersion).xcframework</SentryCocoaFramework>
15+
<!-- SentrySpan.g.cs: error CS0108: 'ISentrySpan.Serialize()' hides inherited member 'ISentrySerializable.Serialize()'. Use the new keyword if hiding was intended -->
16+
<NoWarn>$(NoWarn);CS0108</NoWarn>
1517
</PropertyGroup>
1618

1719
<!-- Build empty assemblies when not on macOS, to pass the solution build. -->

src/Sentry.Bindings.Cocoa/SwiftApiDefinitions.cs

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,103 @@ interface SentrySDK
556556
void ClearLogger ();
557557
}
558558

559+
// @interface SentrySession : NSObject <NSCopying>
560+
[BaseType (typeof(NSObject), Name = "_TtC6Sentry13SentrySession")]
561+
[DisableDefaultCtor]
562+
[Internal]
563+
interface SentrySession
564+
{
565+
// -(instancetype _Nonnull)initWithReleaseName:(NSString * _Nonnull)releaseName distinctId:(NSString * _Nonnull)distinctId __attribute__((objc_designated_initializer));
566+
[Export ("initWithReleaseName:distinctId:")]
567+
[DesignatedInitializer]
568+
NativeHandle Constructor (string releaseName, string distinctId);
569+
570+
// -(instancetype _Nullable)initWithJSONObject:(NSDictionary<NSString *,id> * _Nonnull)jsonObject __attribute__((objc_designated_initializer));
571+
[Export ("initWithJSONObject:")]
572+
[DesignatedInitializer]
573+
NativeHandle Constructor (NSDictionary<NSString, NSObject> jsonObject);
574+
575+
// -(void)endSessionExitedWithTimestamp:(NSDate * _Nonnull)timestamp;
576+
[Export ("endSessionExitedWithTimestamp:")]
577+
void EndSessionExitedWithTimestamp (NSDate timestamp);
578+
579+
// -(void)endSessionCrashedWithTimestamp:(NSDate * _Nonnull)timestamp;
580+
[Export ("endSessionCrashedWithTimestamp:")]
581+
void EndSessionCrashedWithTimestamp (NSDate timestamp);
582+
583+
// -(void)endSessionAbnormalWithTimestamp:(NSDate * _Nonnull)timestamp;
584+
[Export ("endSessionAbnormalWithTimestamp:")]
585+
void EndSessionAbnormalWithTimestamp (NSDate timestamp);
586+
587+
// -(void)incrementErrors;
588+
[Export ("incrementErrors")]
589+
void IncrementErrors ();
590+
591+
// @property (readonly, copy, nonatomic) NSUUID * _Nonnull sessionId;
592+
[Export ("sessionId", ArgumentSemantic.Copy)]
593+
NSUuid SessionId { get; }
594+
595+
// @property (readonly, copy, nonatomic) NSDate * _Nonnull started;
596+
[Export ("started", ArgumentSemantic.Copy)]
597+
NSDate Started { get; }
598+
599+
// @property (readonly, nonatomic) enum SentrySessionStatus status;
600+
[Export ("status")]
601+
SentrySessionStatus Status { get; }
602+
603+
// @property (nonatomic) NSUInteger errors;
604+
[Export ("errors")]
605+
nuint Errors { get; set; }
606+
607+
// @property (readonly, nonatomic) NSUInteger sequence;
608+
[Export ("sequence")]
609+
nuint Sequence { get; }
610+
611+
// @property (readonly, copy, nonatomic) NSString * _Nonnull distinctId;
612+
[Export ("distinctId")]
613+
string DistinctId { get; }
614+
615+
// @property (readonly, nonatomic, strong) NSNumber * _Nullable flagInit;
616+
[NullAllowed, Export ("flagInit", ArgumentSemantic.Strong)]
617+
NSNumber FlagInit { get; }
618+
619+
// @property (readonly, copy, nonatomic) NSDate * _Nullable timestamp;
620+
[NullAllowed, Export ("timestamp", ArgumentSemantic.Copy)]
621+
NSDate Timestamp { get; }
622+
623+
// @property (readonly, nonatomic, strong) NSNumber * _Nullable duration;
624+
[NullAllowed, Export ("duration", ArgumentSemantic.Strong)]
625+
NSNumber Duration { get; }
626+
627+
// @property (readonly, copy, nonatomic) NSString * _Nullable releaseName;
628+
[NullAllowed, Export ("releaseName")]
629+
string ReleaseName { get; }
630+
631+
// @property (copy, nonatomic) NSString * _Nullable environment;
632+
[NullAllowed, Export ("environment")]
633+
string Environment { get; set; }
634+
635+
// @property (nonatomic, strong) SentryUser * _Nullable user;
636+
[NullAllowed, Export ("user", ArgumentSemantic.Strong)]
637+
SentryUser User { get; set; }
638+
639+
// @property (copy, nonatomic) NSString * _Nullable abnormalMechanism;
640+
[NullAllowed, Export ("abnormalMechanism")]
641+
string AbnormalMechanism { get; set; }
642+
643+
// -(NSDictionary<NSString *,id> * _Nonnull)serialize __attribute__((warn_unused_result("")));
644+
[Export ("serialize")]
645+
NSDictionary<NSString, NSObject> Serialize();
646+
647+
// -(void)setFlagInit;
648+
[Export ("setFlagInit")]
649+
void SetFlagInit ();
650+
651+
// -(id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone __attribute__((warn_unused_result("")));
652+
// [Export ("copyWithZone:")]
653+
// unsafe NSObject CopyWithZone ([NullAllowed] _NSZone* zone);
654+
}
655+
559656
// @interface SentryUserFeedback : NSObject <SentrySerializable>
560657
[BaseType(typeof(NSObject))]
561658
[DisableDefaultCtor]
@@ -750,6 +847,41 @@ interface SentryUserFeedbackWidgetConfiguration
750847
// IntPtr Constructor();
751848
// }
752849

850+
// @interface SentryViewScreenshotOptions : NSObject <SentryRedactOptions>
851+
[BaseType (typeof(NSObject), Name = "_TtC6Sentry27SentryViewScreenshotOptions")]
852+
[Internal]
853+
interface SentryViewScreenshotOptions //: ISentryRedactOptions
854+
{
855+
// @property (nonatomic) BOOL enableViewRendererV2;
856+
[Export ("enableViewRendererV2")]
857+
bool EnableViewRendererV2 { get; set; }
858+
859+
// @property (nonatomic) BOOL enableFastViewRendering;
860+
[Export ("enableFastViewRendering")]
861+
bool EnableFastViewRendering { get; set; }
862+
863+
// @property (nonatomic) BOOL maskAllImages;
864+
[Export ("maskAllImages")]
865+
bool MaskAllImages { get; set; }
866+
867+
// @property (nonatomic) BOOL maskAllText;
868+
[Export ("maskAllText")]
869+
bool MaskAllText { get; set; }
870+
871+
// @property (copy, nonatomic) NSArray<Class> * _Nonnull maskedViewClasses;
872+
[Export ("maskedViewClasses", ArgumentSemantic.Copy)]
873+
Class[] MaskedViewClasses { get; set; }
874+
875+
// @property (copy, nonatomic) NSArray<Class> * _Nonnull unmaskedViewClasses;
876+
[Export ("unmaskedViewClasses", ArgumentSemantic.Copy)]
877+
Class[] UnmaskedViewClasses { get; set; }
878+
879+
// -(instancetype _Nonnull)initWithEnableViewRendererV2:(BOOL)enableViewRendererV2 enableFastViewRendering:(BOOL)enableFastViewRendering maskAllText:(BOOL)maskAllText maskAllImages:(BOOL)maskAllImages maskedViewClasses:(NSArray<Class> * _Nonnull)maskedViewClasses unmaskedViewClasses:(NSArray<Class> * _Nonnull)unmaskedViewClasses __attribute__((objc_designated_initializer));
880+
[Export ("initWithEnableViewRendererV2:enableFastViewRendering:maskAllText:maskAllImages:maskedViewClasses:unmaskedViewClasses:")]
881+
[DesignatedInitializer]
882+
NativeHandle Constructor (bool enableViewRendererV2, bool enableFastViewRendering, bool maskAllText, bool maskAllImages, Class[] maskedViewClasses, Class[] unmaskedViewClasses);
883+
}
884+
753885
// @protocol SentryViewScreenshotProvider <NSObject>
754886
[Protocol (Name = "_TtP6Sentry28SentryViewScreenshotProvider_")]
755887
[Model]

src/Sentry.Bindings.Cocoa/SwiftStructsAndEnums.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ internal enum SentryRRWebEventType : long
6969
Custom = 5
7070
}
7171

72+
[Native]
73+
internal enum SentrySessionStatus : ulong
74+
{
75+
Ok = 0,
76+
Exited = 1,
77+
Crashed = 2,
78+
Abnormal = 3
79+
}
80+
7281
[Native]
7382
internal enum SentryTransactionNameSource : long
7483
{

0 commit comments

Comments
 (0)