Skip to content

Commit 5034de5

Browse files
committed
Reapply "Bump to cocoa sdk v8.46.0 (#4103)" (#4202)
This reverts commit e3ad69a.
1 parent de422d3 commit 5034de5

File tree

11 files changed

+614
-161
lines changed

11 files changed

+614
-161
lines changed

CHANGELOG.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,6 @@
138138

139139
- .NET MAUI integration with CommunityToolkit.Mvvm Async Relay Commands can now be auto spanned with the new package Sentry.Maui.CommunityToolkit.Mvvm ([#4125](https://github.com/getsentry/sentry-dotnet/pull/4125))
140140

141-
### Fixes
142-
143-
- Revert "Bump Cocoa SDK from v8.39.0 to v8.46.0 (#4103)" ([#4202](https://github.com/getsentry/sentry-dotnet/pull/4202))
144-
- IMPORTANT: Fixes multiple issues running versions 5.6.x and 5.7.x of the Sentry SDK for .NET on iOS (initialising the SDK and sending data to Sentry)
145-
146141
### Dependencies
147142

148143
- Bump Native SDK from v0.8.4 to v0.8.5 ([#4189](https://github.com/getsentry/sentry-dotnet/pull/4189))

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
-->
4949
<PropertyGroup Condition="'$(TargetFramework)' != ''">
5050
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
51-
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'ios'">12.2</SupportedOSPlatformVersion>
51+
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'ios'">13.0</SupportedOSPlatformVersion>
5252
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
5353
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'android'">21.0</SupportedOSPlatformVersion>
5454
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
-->
1111
<PropertyGroup>
1212
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
13-
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'ios'">12.2</SupportedOSPlatformVersion>
13+
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'ios'">13.0</SupportedOSPlatformVersion>
1414
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
1515
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'android'">21.0</SupportedOSPlatformVersion>
1616
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>

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.39.0
1+
version = 8.46.0
22
repo = https://github.com/getsentry/sentry-cocoa

samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
3333
<ApplicationVersion>1</ApplicationVersion>
3434

35-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">12.2</SupportedOSPlatformVersion>
35+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">13.0</SupportedOSPlatformVersion>
3636
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
3737
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
3838
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>

scripts/generate-cocoa-bindings.ps1

Lines changed: 7 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Reference: https://github.com/xamarin/xamarin-macios/blob/main/docs/website/binding_types_reference_guide.md
2+
13
Set-StrictMode -Version Latest
24
$ErrorActionPreference = 'Stop'
35

@@ -173,41 +175,6 @@ $Text = $Text -replace '\bpublic\b', 'internal'
173175
# Remove static CFunctions class
174176
$Text = $Text -replace '(?ms)\nstatic class CFunctions.*?}\n', ''
175177

176-
# This enum resides in the Sentry-Swift.h
177-
# Appending it here so we don't need to import and create bindings for the entire header
178-
$SentryLevel = @'
179-
180-
[Native]
181-
internal enum SentryLevel : ulong
182-
{
183-
None = 0,
184-
Debug = 1,
185-
Info = 2,
186-
Warning = 3,
187-
Error = 4,
188-
Fatal = 5
189-
}
190-
'@
191-
192-
# This enum resides in the Sentry-Swift.h
193-
# Appending it here so we don't need to import and create bindings for the entire header
194-
$SentryTransactionNameSource = @'
195-
196-
[Native]
197-
internal enum SentryTransactionNameSource : long
198-
{
199-
Custom = 0,
200-
Url = 1,
201-
Route = 2,
202-
View = 3,
203-
Component = 4,
204-
Task = 5
205-
}
206-
'@
207-
208-
$Text += "`n$SentryLevel"
209-
$Text += "`n$SentryTransactionNameSource"
210-
211178
# Add header and output file
212179
$Text = "$Header`n`n$Text"
213180
$Text | Out-File "$BindingsPath/$File"
@@ -238,6 +205,9 @@ $Text = $Text -replace '\bISentrySerializable\b', 'SentrySerializable'
238205
# Remove INSCopying due to https://github.com/xamarin/xamarin-macios/issues/17130
239206
$Text = $Text -replace ': INSCopying,', ':' -replace '\s?[:,] INSCopying', ''
240207

208+
# Remove iOS attributes like [iOS (13, 0)]
209+
$Text = $Text -replace '\[iOS \(13, 0\)\]\n?', ''
210+
241211
# Fix delegate argument names
242212
$Text = $Text -replace '(NSError) arg\d', '$1 error'
243213
$Text = $Text -replace '(NSHttpUrlResponse) arg\d', '$1 response'
@@ -279,7 +249,7 @@ $Text = $Text -replace '\[Static\]\s*\[Internal\]\s*partial\s+interface\s+Consta
279249

280250
# Update MethodToProperty translations
281251
$Text = $Text -replace '(Export \("get\w+"\)\]\n)\s*\[Verify \(MethodToProperty\)\]\n(.+ \{ get; \})', '$1$2'
282-
$Text = $Text -replace '\[Verify \(MethodToProperty\)\]\n\s*(.+ (?:Hash|Value|DefaultIntegrations) \{ get; \})', '$1'
252+
$Text = $Text -replace '\[Verify \(MethodToProperty\)\]\n\s*(.+ (?:Hash|Value|DefaultIntegrations|AppStartMeasurementWithSpans|BaggageHttpHeader) \{ get; \})', '$1'
283253
$Text = $Text -replace '\[Verify \(MethodToProperty\)\]\n\s*(.+) \{ get; \}', '$1();'
284254

285255
# Allow weakly typed NSArray
@@ -292,7 +262,7 @@ $Text = $Text -replace '(DEPRECATED_MSG_ATTRIBUTE\()\n\s*', '$1'
292262
# Remove default IsEqual implementation (already implemented by NSObject)
293263
$Text = $Text -replace '(?ms)\n?^ *// [^\n]*isEqual:.*?$.*?;\n', ''
294264

295-
# Replace obsolete platform avaialbility attributes
265+
# Replace obsolete platform availability attributes
296266
$Text = $Text -replace '([\[,] )MacCatalyst \(', '$1Introduced (PlatformName.MacCatalyst, '
297267
$Text = $Text -replace '([\[,] )Mac \(', '$1Introduced (PlatformName.MacOSX, '
298268
$Text = $Text -replace '([\[,] )iOS \(', '$1Introduced (PlatformName.iOS, '
@@ -305,7 +275,6 @@ $Text = $Text -replace '(?m)(^\s*\/\/[^\r\n]*$\s*\[Export \("serialize"\)\]$\s*)
305275

306276
$Text = $Text -replace '.*SentryEnvelope .*?[\s\S]*?\n\n', ''
307277
$Text = $Text -replace '.*typedef.*SentryOnAppStartMeasurementAvailable.*?[\s\S]*?\n\n', ''
308-
$Text = $Text -replace '\n.*SentryReplayBreadcrumbConverter.*?[\s\S]*?\);\n', ''
309278

310279
$propertiesToRemove = @(
311280
'SentryAppStartMeasurement',
@@ -321,41 +290,6 @@ foreach ($property in $propertiesToRemove)
321290
$Text = $Text -replace "\n.*property.*$property.*?[\s\S]*?\}\n", ''
322291
}
323292

324-
# This interface resides in the Sentry-Swift.h
325-
# Appending it here so we don't need to import and create bindings for the entire header
326-
$SentryId = @'
327-
328-
// @interface SentryId : NSObject
329-
[BaseType (typeof(NSObject), Name = "_TtC6Sentry8SentryId")]
330-
[Internal]
331-
interface SentryId
332-
{
333-
// @property (nonatomic, strong, class) SentryId * _Nonnull empty;
334-
[Static]
335-
[Export ("empty", ArgumentSemantic.Strong)]
336-
SentryId Empty { get; set; }
337-
338-
// @property (readonly, copy, nonatomic) NSString * _Nonnull sentryIdString;
339-
[Export ("sentryIdString")]
340-
string SentryIdString { get; }
341-
342-
// -(instancetype _Nonnull)initWithUuid:(NSUUID * _Nonnull)uuid __attribute__((objc_designated_initializer));
343-
[Export ("initWithUuid:")]
344-
[DesignatedInitializer]
345-
NativeHandle Constructor (NSUuid uuid);
346-
347-
// -(instancetype _Nonnull)initWithUUIDString:(NSString * _Nonnull)uuidString __attribute__((objc_designated_initializer));
348-
[Export ("initWithUUIDString:")]
349-
[DesignatedInitializer]
350-
NativeHandle Constructor (string uuidString);
351-
352-
// @property (readonly, nonatomic) NSUInteger hash;
353-
[Export ("hash")]
354-
nuint Hash { get; }
355-
}
356-
'@
357-
358-
$Text += "`n$SentryId"
359293

360294
# Add header and output file
361295
$Text = "$Header`n`n$Text"

0 commit comments

Comments
 (0)