Skip to content

Commit 8298362

Browse files
github-actions[bot]web-flowbitsandfoxesjamescrosswell
authored
chore(deps): update Cocoa SDK to v8.30.0 (#3450)
* chore: update modules/sentry-cocoa to 8.30.0 --------- Co-authored-by: GitHub <[email protected]> Co-authored-by: bitsandfoxes <[email protected]> Co-authored-by: James Crosswell <[email protected]>
1 parent 5b35d8e commit 8298362

File tree

6 files changed

+143
-127
lines changed

6 files changed

+143
-127
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
- Bump Native SDK from v0.7.4 to v0.7.6 ([#3399](https://github.com/getsentry/sentry-dotnet/pull/3399), [#3418](https://github.com/getsentry/sentry-dotnet/pull/3418))
4747
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#076)
4848
- [diff](https://github.com/getsentry/sentry-native/compare/0.7.4...0.7.6)
49-
- Bump Cocoa SDK from v8.26.0 to v8.29.1 ([#3408](https://github.com/getsentry/sentry-dotnet/pull/3408), [#3412](https://github.com/getsentry/sentry-dotnet/pull/3412), [#3430](https://github.com/getsentry/sentry-dotnet/pull/3430))
50-
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8291)
51-
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.26.0...8.29.1)
49+
- Bump Cocoa SDK from v8.26.0 to v8.30.0 ([#3408](https://github.com/getsentry/sentry-dotnet/pull/3408), [#3412](https://github.com/getsentry/sentry-dotnet/pull/3412), [#3430](https://github.com/getsentry/sentry-dotnet/pull/3430), [#3450](https://github.com/getsentry/sentry-dotnet/pull/3450))
50+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8300)
51+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.26.0...8.30.0)
5252
- Bump Java SDK from v7.9.0 to v7.10.0 ([#3413](https://github.com/getsentry/sentry-dotnet/pull/3413))
5353
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7100)
5454
- [diff](https://github.com/getsentry/sentry-java/compare/7.9.0...7.10.0)

modules/sentry-cocoa

Submodule sentry-cocoa updated 105 files

scripts/generate-cocoa-bindings.ps1

Lines changed: 71 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ Write-Output 'Generating bindings with Objective Sharpie.'
4646
sharpie bind -sdk $iPhoneSdkVersion `
4747
-scope "$CocoaSdkPath/Carthage/Headers" `
4848
"$CocoaSdkPath/Carthage/Headers/Sentry.h" `
49-
"$CocoaSdkPath/Carthage/Headers/Sentry-Swift.h" `
5049
"$CocoaSdkPath/Carthage/Headers/PrivateSentrySDKOnly.h" `
5150
-o $BindingsPath `
5251
-c -Wno-objc-property-no-attribute
@@ -90,6 +89,41 @@ $Text = $Text -replace '\bpublic\b', 'internal'
9089
# Remove static CFunctions class
9190
$Text = $Text -replace '(?ms)\nstatic class CFunctions.*?}\n', ''
9291

92+
# This enum resides in the Sentry-Swift.h
93+
# Appending it here so we don't need to import and create bindings for the entire header
94+
$SentryLevel = @'
95+
96+
[Native]
97+
internal enum SentryLevel : ulong
98+
{
99+
None = 0,
100+
Debug = 1,
101+
Info = 2,
102+
Warning = 3,
103+
Error = 4,
104+
Fatal = 5
105+
}
106+
'@
107+
108+
# This enum resides in the Sentry-Swift.h
109+
# Appending it here so we don't need to import and create bindings for the entire header
110+
$SentryTransactionNameSource = @'
111+
112+
[Native]
113+
internal enum SentryTransactionNameSource : long
114+
{
115+
Custom = 0,
116+
Url = 1,
117+
Route = 2,
118+
View = 3,
119+
Component = 4,
120+
Task = 5
121+
}
122+
'@
123+
124+
$Text += "`r`n$SentryLevel"
125+
$Text += "`r`n$SentryTransactionNameSource"
126+
93127
# Add header and output file
94128
$Text = "$Header`n`n$Text"
95129
$Text | Out-File "$BindingsPath/$File"
@@ -189,55 +223,6 @@ $Text = $Text -replace '.*SentryEnvelope .*?[\s\S]*?\n\n', ''
189223
$Text = $Text -replace '.*typedef.*SentryOnAppStartMeasurementAvailable.*?[\s\S]*?\n\n', ''
190224
$Text = $Text -replace '\n.*SentryReplayBreadcrumbConverter.*?[\s\S]*?\);\n', ''
191225

192-
$protocolsToRemove = @(
193-
'SentryMXManagerDelegate',
194-
'SentryMetricsAPIDelegate',
195-
'SentryReplayVideoMaker',
196-
'SentryViewScreenshotProvider',
197-
'SentryRedactOptions',
198-
'SentryReplayBreadcrumbConverter'
199-
)
200-
201-
foreach ($protocol in $protocolsToRemove) {
202-
$Text = $Text -replace ".*protocol $protocol.*?[\s\S]*?[^ ]\}\n\n", ''
203-
}
204-
205-
$interfacesToRemove = @(
206-
'HTTPHeaderSanitizer',
207-
'LocalMetricsAggregator',
208-
'NSURLSessionTask',
209-
'SentryBaggageSerialization',
210-
'SentryCurrentDateProvider',
211-
'SentryEnabledFeaturesBuilder',
212-
'SentryExperimentalOptions',
213-
'SentryMXCallStack',
214-
'SentryMXCallStackTree',
215-
'SentryMXFrame',
216-
'SentryMXManager',
217-
'SentryMetricsAPI',
218-
'SentryMetricsClient',
219-
'SentryOnDemandReplay',
220-
'SentryReplayOptions',
221-
'SentryRRWebEvent',
222-
'SentryRRWebCustomEvent',
223-
'SentryRRWebBreadcrumbEvent',
224-
'SentryRRWebMetaEvent',
225-
'SentryRRWebSpanEvent',
226-
'SentryRRWebVideoEvent',
227-
'SentryReplayBreadcrumbConverter',
228-
'SentryReplayRecording',
229-
'SentryTouchTracker',
230-
'SentryVideoInfo',
231-
'SentryViewPhotographer',
232-
'SwiftDescriptor',
233-
'UrlSanitized',
234-
'URLSessionTaskHelper'
235-
)
236-
237-
foreach ($interface in $interfacesToRemove) {
238-
$Text = $Text -replace ".*interface.*$interface.*?[\s\S]*?[^ ]\}\n\n", ''
239-
}
240-
241226
$propertiesToRemove = @(
242227
'SentryAppStartMeasurement',
243228
'SentryOnAppStartMeasurementAvailable',
@@ -251,6 +236,42 @@ foreach ($property in $propertiesToRemove) {
251236
$Text = $Text -replace "\n.*property.*$property.*?[\s\S]*?\}\n", ''
252237
}
253238

239+
# This interface resides in the Sentry-Swift.h
240+
# Appending it here so we don't need to import and create bindings for the entire header
241+
$SentryId = @'
242+
243+
// @interface SentryId : NSObject
244+
[BaseType (typeof(NSObject), Name = "_TtC6Sentry8SentryId")]
245+
[Internal]
246+
interface SentryId
247+
{
248+
// @property (nonatomic, strong, class) SentryId * _Nonnull empty;
249+
[Static]
250+
[Export ("empty", ArgumentSemantic.Strong)]
251+
SentryId Empty { get; set; }
252+
253+
// @property (readonly, copy, nonatomic) NSString * _Nonnull sentryIdString;
254+
[Export ("sentryIdString")]
255+
string SentryIdString { get; }
256+
257+
// -(instancetype _Nonnull)initWithUuid:(NSUUID * _Nonnull)uuid __attribute__((objc_designated_initializer));
258+
[Export ("initWithUuid:")]
259+
[DesignatedInitializer]
260+
NativeHandle Constructor (NSUuid uuid);
261+
262+
// -(instancetype _Nonnull)initWithUUIDString:(NSString * _Nonnull)uuidString __attribute__((objc_designated_initializer));
263+
[Export ("initWithUUIDString:")]
264+
[DesignatedInitializer]
265+
NativeHandle Constructor (string uuidString);
266+
267+
// @property (readonly, nonatomic) NSUInteger hash;
268+
[Export ("hash")]
269+
nuint Hash { get; }
270+
}
271+
'@
272+
273+
$Text += "`r`n$SentryId"
274+
254275
# Add header and output file
255276
$Text = "$Header`n`n$Text"
256277
$Text | Out-File "$BindingsPath/$File"

src/Sentry.Bindings.Cocoa/ApiDefinitions.cs

Lines changed: 67 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
using System;
88
using Foundation;
9-
using MetricKit;
109
using ObjCRuntime;
11-
using UIKit;
1210

1311
namespace Sentry.CocoaSdk;
1412

@@ -30,6 +28,10 @@ namespace Sentry.CocoaSdk;
3028
[return: NullAllowed]
3129
delegate SentryEvent SentryBeforeSendEventCallback (SentryEvent @event);
3230

31+
// typedef id<SentrySpan> _Nullable (^SentryBeforeSendSpanCallback)(id<SentrySpan> _Nonnull);
32+
[Internal]
33+
delegate SentrySpan SentryBeforeSendSpanCallback (SentrySpan span);
34+
3335
// typedef BOOL (^SentryBeforeCaptureScreenshotCallback)(SentryEvent * _Nonnull);
3436
[Internal]
3537
delegate bool SentryBeforeCaptureScreenshotCallback (SentryEvent @event);
@@ -1257,6 +1259,10 @@ interface SentryOptions
12571259
[NullAllowed, Export ("beforeSend", ArgumentSemantic.Copy)]
12581260
SentryBeforeSendEventCallback BeforeSend { get; set; }
12591261

1262+
// @property (copy, nonatomic) SentryBeforeSendSpanCallback _Nullable beforeSendSpan;
1263+
[NullAllowed, Export ("beforeSendSpan", ArgumentSemantic.Copy)]
1264+
SentryBeforeSendSpanCallback BeforeSendSpan { get; set; }
1265+
12601266
// @property (copy, nonatomic) SentryBeforeBreadcrumbCallback _Nullable beforeBreadcrumb;
12611267
[NullAllowed, Export ("beforeBreadcrumb", ArgumentSemantic.Copy)]
12621268
SentryBeforeBreadcrumbCallback BeforeBreadcrumb { get; set; }
@@ -1702,6 +1708,16 @@ interface SentrySDK
17021708
[Export ("reportFullyDisplayed")]
17031709
void ReportFullyDisplayed ();
17041710

1711+
// +(void)pauseAppHangTracking;
1712+
[Static]
1713+
[Export ("pauseAppHangTracking")]
1714+
void PauseAppHangTracking ();
1715+
1716+
// +(void)resumeAppHangTracking;
1717+
[Static]
1718+
[Export ("resumeAppHangTracking")]
1719+
void ResumeAppHangTracking ();
1720+
17051721
// +(void)flush:(NSTimeInterval)timeout __attribute__((swift_name("flush(timeout:)")));
17061722
[Static]
17071723
[Export ("flush:")]
@@ -2022,8 +2038,8 @@ interface SentryUser : SentrySerializable
20222038
[NullAllowed, Export ("ipAddress")]
20232039
string IpAddress { get; set; }
20242040

2025-
// @property (copy, atomic) NSString * _Nullable segment;
2026-
[NullAllowed, Export ("segment")]
2041+
// @property (copy, atomic) DEPRECATED_MSG_ATTRIBUTE("This field is deprecated and will be removed in the next major update.") NSString * segment __attribute__((deprecated("This field is deprecated and will be removed in the next major update.")));
2042+
[Export ("segment")]
20272043
string Segment { get; set; }
20282044

20292045
// @property (copy, atomic) NSString * _Nullable name;
@@ -2078,52 +2094,6 @@ interface SentryUserFeedback : SentrySerializable
20782094
string Comments { get; set; }
20792095
}
20802096

2081-
// @interface SentryId : NSObject
2082-
[BaseType (typeof(NSObject), Name = "_TtC6Sentry8SentryId")]
2083-
[Internal]
2084-
interface SentryId
2085-
{
2086-
// @property (nonatomic, strong, class) SentryId * _Nonnull empty;
2087-
[Static]
2088-
[Export ("empty", ArgumentSemantic.Strong)]
2089-
SentryId Empty { get; set; }
2090-
2091-
// @property (readonly, copy, nonatomic) NSString * _Nonnull sentryIdString;
2092-
[Export ("sentryIdString")]
2093-
string SentryIdString { get; }
2094-
2095-
// -(instancetype _Nonnull)initWithUuid:(NSUUID * _Nonnull)uuid __attribute__((objc_designated_initializer));
2096-
[Export ("initWithUuid:")]
2097-
[DesignatedInitializer]
2098-
NativeHandle Constructor (NSUuid uuid);
2099-
2100-
// -(instancetype _Nonnull)initWithUUIDString:(NSString * _Nonnull)uuidString __attribute__((objc_designated_initializer));
2101-
[Export ("initWithUUIDString:")]
2102-
[DesignatedInitializer]
2103-
NativeHandle Constructor (string uuidString);
2104-
2105-
// @property (readonly, nonatomic) NSUInteger hash;
2106-
[Export ("hash")]
2107-
nuint Hash { get; }
2108-
}
2109-
2110-
// @protocol SentryIntegrationProtocol <NSObject>
2111-
[Protocol (Name = "_TtP6Sentry25SentryIntegrationProtocol_")]
2112-
[BaseType (typeof(NSObject), Name = "_TtP6Sentry25SentryIntegrationProtocol_")]
2113-
[Internal]
2114-
interface SentryIntegrationProtocol
2115-
{
2116-
// @required -(BOOL)installWithOptions:(SentryOptions * _Nonnull)options __attribute__((warn_unused_result("")));
2117-
[Abstract]
2118-
[Export ("installWithOptions:")]
2119-
bool InstallWithOptions (SentryOptions options);
2120-
2121-
// @required -(void)uninstall;
2122-
[Abstract]
2123-
[Export ("uninstall")]
2124-
void Uninstall ();
2125-
}
2126-
21272097
// @interface SentryScreenFrames : NSObject <NSCopying>
21282098
[BaseType (typeof(NSObject))]
21292099
[DisableDefaultCtor]
@@ -2259,20 +2229,10 @@ interface PrivateSentrySDKOnly
22592229
[Export ("captureViewHierarchy")]
22602230
NSData CaptureViewHierarchy();
22612231

2262-
// +(NSDictionary<NSString *,id> * _Nullable)appStartMeasurementWithSpans;
2263-
[Static]
2264-
[NullAllowed, Export ("appStartMeasurementWithSpans")]
2265-
NSDictionary<NSString, NSObject> AppStartMeasurementWithSpans();
2266-
2267-
// +(SentryUser * _Nonnull)userWithDictionary:(NSDictionary * _Nonnull)dictionary;
2268-
[Static]
2269-
[Export ("userWithDictionary:")]
2270-
SentryUser UserWithDictionary (NSDictionary dictionary);
2271-
2272-
// +(SentryBreadcrumb * _Nonnull)breadcrumbWithDictionary:(NSDictionary * _Nonnull)dictionary;
2232+
// +(void)setCurrentScreen:(NSString * _Nonnull)screenName;
22732233
[Static]
2274-
[Export ("breadcrumbWithDictionary:")]
2275-
SentryBreadcrumb BreadcrumbWithDictionary (NSDictionary dictionary);
2234+
[Export ("setCurrentScreen:")]
2235+
void SetCurrentScreen (string screenName);
22762236

22772237
// +(void)captureReplay;
22782238
[Static]
@@ -2293,4 +2253,48 @@ interface PrivateSentrySDKOnly
22932253
[Static]
22942254
[Export ("addReplayRedactClasses:")]
22952255
void AddReplayRedactClasses (Class[] classes);
2256+
2257+
// +(NSDictionary<NSString *,id> * _Nullable)appStartMeasurementWithSpans;
2258+
[Static]
2259+
[NullAllowed, Export ("appStartMeasurementWithSpans")]
2260+
NSDictionary<NSString, NSObject> AppStartMeasurementWithSpans();
2261+
2262+
// +(SentryUser * _Nonnull)userWithDictionary:(NSDictionary * _Nonnull)dictionary;
2263+
[Static]
2264+
[Export ("userWithDictionary:")]
2265+
SentryUser UserWithDictionary (NSDictionary dictionary);
2266+
2267+
// +(SentryBreadcrumb * _Nonnull)breadcrumbWithDictionary:(NSDictionary * _Nonnull)dictionary;
2268+
[Static]
2269+
[Export ("breadcrumbWithDictionary:")]
2270+
SentryBreadcrumb BreadcrumbWithDictionary (NSDictionary dictionary);
2271+
}
2272+
2273+
// @interface SentryId : NSObject
2274+
[BaseType (typeof(NSObject), Name = "_TtC6Sentry8SentryId")]
2275+
[Internal]
2276+
interface SentryId
2277+
{
2278+
// @property (nonatomic, strong, class) SentryId * _Nonnull empty;
2279+
[Static]
2280+
[Export ("empty", ArgumentSemantic.Strong)]
2281+
SentryId Empty { get; set; }
2282+
2283+
// @property (readonly, copy, nonatomic) NSString * _Nonnull sentryIdString;
2284+
[Export ("sentryIdString")]
2285+
string SentryIdString { get; }
2286+
2287+
// -(instancetype _Nonnull)initWithUuid:(NSUUID * _Nonnull)uuid __attribute__((objc_designated_initializer));
2288+
[Export ("initWithUuid:")]
2289+
[DesignatedInitializer]
2290+
NativeHandle Constructor (NSUuid uuid);
2291+
2292+
// -(instancetype _Nonnull)initWithUUIDString:(NSString * _Nonnull)uuidString __attribute__((objc_designated_initializer));
2293+
[Export ("initWithUUIDString:")]
2294+
[DesignatedInitializer]
2295+
NativeHandle Constructor (string uuidString);
2296+
2297+
// @property (readonly, nonatomic) NSUInteger hash;
2298+
[Export ("hash")]
2299+
nuint Hash { get; }
22962300
}

src/Sentry.Bindings.Cocoa/StructsAndEnums.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,6 @@ internal enum SentryLevel : ulong
7777
Fatal = 5
7878
}
7979

80-
[Native]
81-
internal enum SentryRRWebEventType : long
82-
{
83-
None = 0,
84-
Touch = 3,
85-
Meta = 4,
86-
Custom = 5
87-
}
88-
8980
[Native]
9081
internal enum SentryTransactionNameSource : long
9182
{

src/Sentry/Platforms/Cocoa/Extensions/UserExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static CocoaSdk.SentryUser ToCocoaUser(this SentryUser user)
2626
IpAddress = user.IpAddress,
2727
Username = user.Username,
2828
#pragma warning disable CS0618 // Type or member is obsolete
29-
Segment = user.Segment,
29+
Segment = user.Segment ?? "",
3030
#pragma warning restore CS0618 // Type or member is obsolete
3131
Data = user.Other.ToNullableNSDictionary()
3232
};

0 commit comments

Comments
 (0)