Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
8.51.1
  • Loading branch information
jpnurmi committed Aug 29, 2025
commit 89a6f11a0416f31a8d77d8b5fd03d14d4a231fff
2 changes: 1 addition & 1 deletion modules/sentry-cocoa.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = 8.49.2
version = 8.51.1
repo = https://github.com/getsentry/sentry-cocoa
5 changes: 4 additions & 1 deletion scripts/generate-cocoa-bindings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ Write-Output "iPhoneSdkVersion: $iPhoneSdkVersion"

## Imports in the various header files are provided in the "new" style of:
# `#import <Sentry/SomeHeader.h>`
# ...or:
# `#import SENTRY_HEADER(SentryHeader)`
# ...instead of:
# `#import "SomeHeader.h"`
# This causes sharpie to fail resolve those headers
Expand All @@ -106,6 +108,7 @@ foreach ($file in $filesToPatch)
{
$content = Get-Content -Path $file -Raw
$content = $content -replace '<Sentry/([^>]+)>', '"$1"'
$content = $content -replace '#import SENTRY_HEADER\(([^)]+)\)', '#import "$1.h"'
Set-Content -Path $file -Value $content
}
else
Expand Down Expand Up @@ -206,7 +209,7 @@ $Text = $Text -replace '\bISentrySerializable\b', 'SentrySerializable'
$Text = $Text -replace ': INSCopying,', ':' -replace '\s?[:,] INSCopying', ''

# Remove iOS attributes like [iOS (13, 0)]
$Text = $Text -replace '\[iOS \(13, 0\)\]\n?', ''
$Text = $Text -replace '\[iOS \(13,\s?0\)\]\n?', ''

# Fix delegate argument names
$Text = $Text -replace '(NSError) arg\d', '$1 error'
Expand Down
44 changes: 44 additions & 0 deletions src/Sentry.Bindings.Cocoa/ApiDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ interface SentryEnvelopeItemHeader : SentrySerializable
[Export ("initWithType:length:filenname:contentType:")]
NativeHandle Constructor (string type, nuint length, string filename, string contentType);

// -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type length:(NSUInteger)length contentType:(NSString * _Nonnull)contentType itemCount:(NSNumber * _Nonnull)itemCount;
[Export ("initWithType:length:contentType:itemCount:")]
NativeHandle Constructor (string type, nuint length, string contentType, NSNumber itemCount);

// @property (readonly, copy, nonatomic) NSString * _Nonnull type;
[Export ("type")]
string Type { get; }
Expand All @@ -428,6 +432,10 @@ interface SentryEnvelopeItemHeader : SentrySerializable
[NullAllowed, Export ("contentType")]
string ContentType { get; }

// @property (readonly, copy, nonatomic) NSNumber * _Nullable itemCount;
[NullAllowed, Export ("itemCount", ArgumentSemantic.Copy)]
NSNumber ItemCount { get; }

// @property (copy, nonatomic) NSString * _Nullable platform;
[NullAllowed, Export ("platform")]
string Platform { get; set; }
Expand Down Expand Up @@ -605,6 +613,20 @@ interface SentryException : SentrySerializable
NativeHandle Constructor (string value, string type);
}

// @interface SentryFeedbackAPI : NSObject
[BaseType (typeof(NSObject))]
[Internal]
interface SentryFeedbackAPI
{
// -(void)showWidget __attribute__((availability(ios, introduced=13.0)));
[Export ("showWidget")]
void ShowWidget ();

// -(void)hideWidget __attribute__((availability(ios, introduced=13.0)));
[Export ("hideWidget")]
void HideWidget ();
}

// @interface SentryFrame : NSObject <SentrySerializable>
[BaseType (typeof(NSObject))]
[Internal]
Expand Down Expand Up @@ -1028,6 +1050,23 @@ interface SentryHub
void Close ();
}

// @protocol SentryIntegrationProtocol <NSObject>
[Protocol]
[BaseType (typeof(NSObject))]
[Internal]
interface SentryIntegrationProtocol
{
// @required -(BOOL)installWithOptions:(SentryOptions * _Nonnull)options __attribute__((swift_name("install(with:)")));
[Abstract]
[Export ("installWithOptions:")]
bool InstallWithOptions (SentryOptions options);

// @required -(void)uninstall;
[Abstract]
[Export ("uninstall")]
void Uninstall ();
}

// @interface SentryMeasurementUnit : NSObject <NSCopying>
[BaseType (typeof(NSObject))]
[DisableDefaultCtor]
Expand Down Expand Up @@ -1829,6 +1868,11 @@ interface SentrySDK
[Export ("captureFeedback:")]
void CaptureFeedback (SentryFeedback feedback);

// @property (readonly, nonatomic, class) API_AVAILABLE(ios(13.0)) SentryFeedbackAPI * feedback __attribute__((availability(ios, introduced=13.0)));
[Static]
[Export ("feedback")]
SentryFeedbackAPI Feedback { get; }

// +(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb __attribute__((swift_name("addBreadcrumb(_:)")));
[Static]
[Export ("addBreadcrumb:")]
Expand Down