Skip to content

Improve iOS bindings #3601

Closed
Closed

Description

@bitsandfoxes

We're generating bindings for our Cocoa SDK via https://github.com/getsentry/sentry-dotnet/blob/main/scripts/generate-cocoa-bindings.ps1 which has turned laborious and brittle.

Issues

Activity

  1. jamescrosswell commented on Nov 11, 2024

    @jamescrosswell
    Collaborator

    @bitsandfoxes did you have any alternative solutions in mind? It seems like we have to use objective sharpie... and like some post generation cleanup is necessary (since it doesn't always get it right). What were you thinking we might be able to improve?

  2. bitsandfoxes commented on Nov 11, 2024

    @bitsandfoxes
    ContributorAuthor

    Most ideas floating around were coming from @brustolin.
    One of those was to create the bindings manually for all the API that the SDK actually uses. Ideally, this would be maintained by the Cocoa team.
    The way I see it we get to either invest into automation that seems to keep breaking and needs to be maintained or we invest into creating a stable bridge that needs to be maintained to keep up to date with the evolving Cocoa SDK.

  3. brustolin commented on Nov 12, 2024

    @brustolin
    Contributor

    or we invest into creating a stable bridge that needs to be maintained to keep up to date with the evolving Cocoa SDK.

    Keep in mind that we dont release public API very often.

  4. jamescrosswell commented on Feb 13, 2025

    @jamescrosswell
    Collaborator

    @aritchie suggested we could use Slim Bindings for this. Maybe we do this in the future if there's a major bump to the Cocoa SDK which is difficult to handle via Objective Sharpie

  5. removed theissue type on Aug 6, 2025
  6. jpnurmi commented on Nov 5, 2025

    @jpnurmi
    Collaborator

    I recently came up with a Roslyn-based solution to this problem. It can handle Swift types and should be easier to extend:

    Re-entrancy should no longer be needed now that the SetupCocoaSDK target runs exactly once:

    Feel free to re-open the issue if there's anything missing or unsatisfactory. :)

  7. added
    .NETPull requests that update .net code
    on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions