Skip to content

Commit 61f90d6

Browse files
authored
fix: macos targetting with native error handling (#3080)
1 parent 8bc2e51 commit 61f90d6

39 files changed

+1819
-3
lines changed

.generated.NoMobile.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Console.Nati
165165
EndProject
166166
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Console.Metrics", "samples\Sentry.Samples.Console.Metrics\Sentry.Samples.Console.Metrics.csproj", "{BD2D08FC-8675-4157-A73C-D75F6A3856D3}"
167167
EndProject
168+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.MacOS", "samples\Sentry.Samples.MacOS\Sentry.Samples.MacOS.csproj", "{5B100CC0-1A78-407E-A5A5-94BC06D67461}"
169+
EndProject
168170
Global
169171
GlobalSection(SolutionConfigurationPlatforms) = preSolution
170172
Debug|Any CPU = Debug|Any CPU
@@ -471,6 +473,10 @@ Global
471473
{BD2D08FC-8675-4157-A73C-D75F6A3856D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
472474
{BD2D08FC-8675-4157-A73C-D75F6A3856D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
473475
{BD2D08FC-8675-4157-A73C-D75F6A3856D3}.Release|Any CPU.Build.0 = Release|Any CPU
476+
{5B100CC0-1A78-407E-A5A5-94BC06D67461}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
477+
{5B100CC0-1A78-407E-A5A5-94BC06D67461}.Debug|Any CPU.Build.0 = Debug|Any CPU
478+
{5B100CC0-1A78-407E-A5A5-94BC06D67461}.Release|Any CPU.ActiveCfg = Release|Any CPU
479+
{5B100CC0-1A78-407E-A5A5-94BC06D67461}.Release|Any CPU.Build.0 = Release|Any CPU
474480
EndGlobalSection
475481
GlobalSection(SolutionProperties) = preSolution
476482
HideSolutionNode = FALSE
@@ -552,5 +558,6 @@ Global
552558
{8032310D-3C06-442C-A318-F365BCC4C804} = {A3CCA27E-4DF8-479D-833C-CAA0950715AA}
553559
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2} = {21B42F60-5802-404E-90F0-AEBCC56760C0}
554560
{BD2D08FC-8675-4157-A73C-D75F6A3856D3} = {21B42F60-5802-404E-90F0-AEBCC56760C0}
561+
{5B100CC0-1A78-407E-A5A5-94BC06D67461} = {21B42F60-5802-404E-90F0-AEBCC56760C0}
555562
EndGlobalSection
556563
EndGlobal

.github/actions/environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ runs:
4040
run: >
4141
dotnet workload install \
4242
maui-android \
43-
${{ runner.os == 'macOS' && 'maui-ios maui-maccatalyst maui-windows' || '' }} \
43+
${{ runner.os == 'macOS' && 'maui-ios maui-maccatalyst maui-windows macos' || '' }} \
4444
${{ runner.os == 'Windows' && 'maui-windows' || '' }} \
4545
--temp-dir "${{ runner.temp }}" \
4646
--skip-sign-check

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ If you have conflicts, you can opt-out by adding the following to your `csproj`:
2828
- The SDK no longer adds the `WinUIUnhandledExceptionIntegration` on non Windows platforms ([#3055](https://github.com/getsentry/sentry-dotnet/pull/3055))
2929
- The scope transaction is now correctly set for Otel transactions ([#3072](https://github.com/getsentry/sentry-dotnet/pull/3072))
3030
- Native integration logging on macOS ([#3079](https://github.com/getsentry/sentry-dotnet/pull/3079))
31+
- Native linking of cURL library when targeting platform-specific TFMs (e.g. `net8.0-macos`) ([#3080](https://github.com/getsentry/sentry-dotnet/pull/3080))
3132

3233
### Dependencies
3334

Sentry-CI-Build-macOS.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"samples\\Sentry.Samples.Ios\\Sentry.Samples.Ios.csproj",
2727
"samples\\Sentry.Samples.Log4Net\\Sentry.Samples.Log4Net.csproj",
2828
"samples\\Sentry.Samples.MacCatalyst\\Sentry.Samples.MacCatalyst.csproj",
29+
"samples\\Sentry.Samples.MacOS\\Sentry.Samples.MacOS.csproj",
2930
"samples\\Sentry.Samples.Maui\\Sentry.Samples.Maui.csproj",
3031
"samples\\Sentry.Samples.ME.Logging\\Sentry.Samples.ME.Logging.csproj",
3132
"samples\\Sentry.Samples.NLog\\Sentry.Samples.NLog.csproj",

Sentry.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Console.Nati
165165
EndProject
166166
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Console.Metrics", "samples\Sentry.Samples.Console.Metrics\Sentry.Samples.Console.Metrics.csproj", "{BD2D08FC-8675-4157-A73C-D75F6A3856D3}"
167167
EndProject
168+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.MacOS", "samples\Sentry.Samples.MacOS\Sentry.Samples.MacOS.csproj", "{5B100CC0-1A78-407E-A5A5-94BC06D67461}"
169+
EndProject
168170
Global
169171
GlobalSection(SolutionConfigurationPlatforms) = preSolution
170172
Debug|Any CPU = Debug|Any CPU
@@ -471,6 +473,10 @@ Global
471473
{BD2D08FC-8675-4157-A73C-D75F6A3856D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
472474
{BD2D08FC-8675-4157-A73C-D75F6A3856D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
473475
{BD2D08FC-8675-4157-A73C-D75F6A3856D3}.Release|Any CPU.Build.0 = Release|Any CPU
476+
{5B100CC0-1A78-407E-A5A5-94BC06D67461}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
477+
{5B100CC0-1A78-407E-A5A5-94BC06D67461}.Debug|Any CPU.Build.0 = Debug|Any CPU
478+
{5B100CC0-1A78-407E-A5A5-94BC06D67461}.Release|Any CPU.ActiveCfg = Release|Any CPU
479+
{5B100CC0-1A78-407E-A5A5-94BC06D67461}.Release|Any CPU.Build.0 = Release|Any CPU
474480
EndGlobalSection
475481
GlobalSection(SolutionProperties) = preSolution
476482
HideSolutionNode = FALSE
@@ -552,5 +558,6 @@ Global
552558
{8032310D-3C06-442C-A318-F365BCC4C804} = {A3CCA27E-4DF8-479D-833C-CAA0950715AA}
553559
{FC8AEABA-1A40-4891-9EBA-4B6A1F7244B2} = {21B42F60-5802-404E-90F0-AEBCC56760C0}
554560
{BD2D08FC-8675-4157-A73C-D75F6A3856D3} = {21B42F60-5802-404E-90F0-AEBCC56760C0}
561+
{5B100CC0-1A78-407E-A5A5-94BC06D67461} = {21B42F60-5802-404E-90F0-AEBCC56760C0}
555562
EndGlobalSection
556563
EndGlobal

SentryNoMobile.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"samples\\Sentry.Samples.GraphQL.Server\\Sentry.Samples.GraphQL.Server.csproj",
2424
"samples\\Sentry.Samples.Log4Net\\Sentry.Samples.Log4Net.csproj",
2525
"samples\\Sentry.Samples.MacCatalyst\\Sentry.Samples.MacCatalyst.csproj",
26+
"samples\\Sentry.Samples.MacOS\\Sentry.Samples.MacOS.csproj",
2627
"samples\\Sentry.Samples.ME.Logging\\Sentry.Samples.ME.Logging.csproj",
2728
"samples\\Sentry.Samples.NLog\\Sentry.Samples.NLog.csproj",
2829
"samples\\Sentry.Samples.OpenTelemetry.AspNetCore\\Sentry.Samples.OpenTelemetry.AspNetCore.csproj",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace Sentry.Samples.MacOS;
2+
3+
[Register("AppDelegate")]
4+
public class AppDelegate : NSApplicationDelegate
5+
{
6+
public override void DidFinishLaunching(NSNotification notification)
7+
{
8+
// Init the Sentry SDK
9+
SentrySdk.Init(o =>
10+
{
11+
o.Debug = true;
12+
o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
13+
o.TracesSampleRate = 1.0;
14+
});
15+
}
16+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"images": [
3+
{
4+
"idiom" : "mac",
5+
"scale" : "1x",
6+
"size" : "16x16",
7+
"filename": "Icon16.png"
8+
},
9+
{
10+
"idiom" : "mac",
11+
"scale" : "2x",
12+
"size" : "16x16",
13+
"filename": "Icon32.png"
14+
},
15+
{
16+
"idiom" : "mac",
17+
"scale" : "1x",
18+
"size" : "32x32",
19+
"filename": "Icon32.png"
20+
},
21+
{
22+
"idiom" : "mac",
23+
"scale" : "2x",
24+
"size" : "32x32",
25+
"filename": "Icon64.png"
26+
},
27+
{
28+
"idiom" : "mac",
29+
"scale" : "1x",
30+
"size" : "128x128",
31+
"filename": "Icon128.png"
32+
},
33+
{
34+
"idiom" : "mac",
35+
"scale" : "2x",
36+
"size" : "128x128",
37+
"filename": "Icon256.png"
38+
},
39+
{
40+
"idiom" : "mac",
41+
"scale" : "1x",
42+
"size" : "256x256",
43+
"filename": "Icon256.png"
44+
},
45+
{
46+
"idiom" : "mac",
47+
"scale" : "2x",
48+
"size" : "256x256",
49+
"filename": "Icon512.png"
50+
},
51+
{
52+
"idiom" : "mac",
53+
"scale" : "1x",
54+
"size" : "512x512",
55+
"filename": "Icon512.png"
56+
},
57+
{
58+
"idiom" : "mac",
59+
"scale" : "2x",
60+
"size" : "512x512",
61+
"filename": "Icon1024.png"
62+
}
63+
],
64+
"info": {
65+
"version": 1,
66+
"author": "xcode"
67+
},
68+
}
Loading
Loading

0 commit comments

Comments
 (0)