Use Sentry in a compiled ObjC framework – possible?

Hi,
We are developing an SDK for our customers that we ship in the form of a compiled “.framework” file. Now, we would like to integrate Sentry for error reporting. The integration itself works, and we see crashes in the console from our SDK, as well es from the including app (which is ok for the customers).

For testing, I’ve created an app with a button, and the button handler calls an SDK function called “crash”, which in turn calls “raiseCrashError”, which then performs [NSException raise:@"Test Error" format:@"Crash function was called"];

The problem is that the stack trace does not include the functions in the SDK, I can only see the functions from the app. It looks like the crash happened in the button handler:

Thread 0 Crashed:
0 CoreFoundation 0x3769a9344 __exceptionPreprocess
1 libobjc.A.dylib 0x3406c6cbc objc_exception_throw
2 CoreFoundation 0x376899518 +[NSException raise:format:]
3 Test App 0x204b23f4c ViewController.buttonTap
4 Test App 0x204b23fb4 ViewController.buttonTap
5 UIKitCore 0x34a02faa8 -[UIApplication sendAction:to:from:forEvent:]

I would except:

Thread 0 Crashed:
0 CoreFoundation 0x3769a9344 __exceptionPreprocess
1 libobjc.A.dylib 0x3406c6cbc objc_exception_throw
2 CoreFoundation 0x376899518 +[NSException raise:format:]
3 MYSDK 0x106100634 -[MYManager raiseCrashError]
4 MYSDK 0x10610066c -[MYManager crash]
5 Test App 0x204b23f4c ViewController.buttonTap
6 Test App 0x204b23fb4 ViewController.buttonTap
7 UIKitCore 0x34a02faa8 -[UIApplication sendAction:to:from:forEvent:]

Can anybody point me to the right direction, how I can achieve what I want?

Best,
Johannes

All frames should be included. Where did you copy the stacktrace from? The Sentry UI?
Could you please make sure to select Full to include frames regardless if they are in_app or not?

Yes, I got them from the Sentry UI. For the second example, with the expected result, i included the SDK as code files, not as binary.

I just found out that even the Xcode debugger won’t show those frames in the stack trace, so it is not Sentry-related, it seems. Is it normal that a binary library somehow hides the frames?

Seems like the compiler optimized away some of my one-line test-functions, so that they did not appear in my stack trace. It works with more complex functions.