feat: Support for iOS & macOS using Cocoa SDK integration#266
feat: Support for iOS & macOS using Cocoa SDK integration#266
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.
Looks good! Thanks for splitting off the timestamp changes. 🙏
|
Oh no, switching to Cocoa didn't help with that 🙁
|
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