Skip to content

Conversation

@jamescrosswell
Copy link
Collaborator

@jamescrosswell jamescrosswell commented Apr 10, 2025

Bumps the Cocoa SDK to version 8.46, which is the oldest version which would be stable for implementing Session Replay (needed to implement #2136).

I also tidied up the scripts/generate-cocoa-bindings.ps1 script a bit. It was starting to get quite large, mostly because we were using it to add lots of API contracts from the Sentry-Swift.h file (rather than tweak contracts generated by objective sharpie). There didn't seem much point in using PowerShell to write static C# code so I moved that stuff out to the following files (where we at least get syntax checking and analysers from the IDE):

  • src/Sentry.Bindings.Cocoa/SwiftApiDefinitions.cs
  • src/Sentry.Bindings.Cocoa/SwiftStructsAndEnums.cs

This hopefully makes the cocoa bindings script a bit easier to read and maintain.

@jamescrosswell jamescrosswell marked this pull request as ready for review April 13, 2025 23:31
Copy link
Contributor

@aritchie aritchie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deeper we go with this, the more it seems we should consider a slim binding in the near future

@jamescrosswell
Copy link
Collaborator Author

The deeper we go with this, the more it seems we should consider a slim binding in the near future

Possibly yes. If we had slim bindings, I wouldn't have had to add all these methods to satisfy the "missing class" errors for classes referred to by the new objective sharpie code.

On the other hand, once we have slim bindings, we don't have any easy mechanism to keep these up to date if/when the CocoaSDK API's change... or I guess we would - that would be our unit tests. So we're really need to make sure we had good coverage in our device/integration tests for all the bindings code in that case.

@jamescrosswell jamescrosswell merged commit 690a169 into main Apr 15, 2025
27 checks passed
@jamescrosswell jamescrosswell deleted the Bump-to-Cocoa-SDK-v8.44.0 branch April 15, 2025 22:07
jamescrosswell added a commit that referenced this pull request May 19, 2025
jamescrosswell added a commit that referenced this pull request May 20, 2025
jpnurmi added a commit that referenced this pull request Aug 6, 2025
jpnurmi added a commit that referenced this pull request Aug 12, 2025
jamescrosswell added a commit that referenced this pull request Aug 13, 2025
jamescrosswell added a commit that referenced this pull request Aug 18, 2025
* Revert "Revert "Bump to cocoa sdk v8.46.0 (#4103)" (#4202)"

This reverts commit e3ad69a.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants