-
-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Support for iOS & macOS using Cocoa SDK integration #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f1fc79c to
5065616
Compare
|
Could we have some basic unit tests for |
|
@jpnurmi The tests we maintain are in GDScript, which don't have direct access to such methods; however, we test them indirectly via: sentry-godot/project/test/suites/test_event.gd Lines 28 to 45 in efbdb39
We could expand such tests to include various formats in RFC3339 and also test some edge cases. Extracting these functions into separate PR make less sense as they only used with cocoa sdk, and we wouldn't be able to test them unless we introduce another testing layer, just for internal C++ stuff. |
|
@jpnurmi Almost forgot, I’ve been working on a dedicated UPDATE: |
|
Timestamp functionality is taken care of by #286. So, this PR doesn’t deal with it anymore. |
jpnurmi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for splitting off the timestamp changes. 🙏
jpnurmi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Oh no, switching to Cocoa didn't help with that 🙁
https://github.com/getsentry/sentry-godot/actions/runs/16770287480/job/47484472250?pr=266 |
Aww shame, cant even pin it to a commit as it's so flaky. |
They are not, but I'd like to address it in a separate PR as it needs more than renaming – we also need to generate an xcframework from 2 libs in a post-process job. |

This PR brings Sentry Cocoa SDK integration as a backend on macOS and iOS platforms. This switches macOS builds to utilize Sentry Cocoa as well.
Build system manages Sentry Cocoa package, reading
modules/sentry-cocoa.packagefile, downloading the corresponding package with dynamic framework from GitHub Releases, extracting and processing it. It also updates it if the version changes in the .package file. Dependency update should be trivial to add.The build system takes the respective slices from the Sentry Cocoa XCFramework and puts them in the
project/. For macOS, it also flattens the framework, so we don’t have any problems with symlinks on Windows and with Godot Engine. Framework is linked dynamically.This PR also includes a simple system for custom options. GodotCPP tends to complain about those – so there is a workaround for that too. A new option is added to generate iOS framework from iOS build artifacts:
generate_ios_framework=yes|noLocal build instructions
Build macOS libs:
Build iOS libs:
All unit tests passed on macOS. Due to limitations of the unit test framework, can't run tests on iOS. However, there are separate mobile tests which I ran via demo project – all succeeded.
Known issues and limitations
OS.get_memory_info()is called on iOS – so I disabled it on iOS: Fix memory information in device context on iOS #299