Route diagnostic hooks through platform services

This commit is contained in:
2026-06-03 05:12:00 +02:00
parent e152616d7f
commit 6652127545
8 changed files with 69 additions and 21 deletions

View File

@@ -101,6 +101,26 @@ public:
#endif
}
void log_stacktrace() override
{
#if defined(__OSX__)
NSString* callstack = [[NSThread callStackSymbols] componentsJoinedByString:@"\n"];
LOG("callstack:\n%s", [callstack cStringUsingEncoding:NSUTF8StringEncoding]);
#endif
}
void trigger_crash_test() override
{
#ifdef __IOS__
[App::I->ios_view crash];
#elif __OSX__
[App::I->osx_view hockeyapp_crash];
#elif defined(__ANDROID__)
int *x = nullptr; *x = 42;
LOG("%d", *x);
#endif
}
[[nodiscard]] std::string clipboard_text() override
{
#if __IOS__