r/iOSProgramming • u/trikboomie • 27d ago
Question Apple foundation models
If you're using Apple's Foundation Models framework in a released app, how are you debugging issues that only happen on users' devices?
Are Instruments and your existing crash reporting enough, or have you added custom logging?
11
Upvotes
View all comments
5
u/Significant_Door_433 27d ago •
Instruments only helps on devices you can plug in, so for the field you need your own logging. The things worth capturing:
Two cases look random in crash reports but aren't. rateLimited only happens when the app is in the background. assetsUnavailable can fire mid-session if the user turns Apple Intelligence off or the device deletes the model to free space.
For the content itself, session.transcript has the full history (instructions, prompts, tool calls, responses). I wouldn't upload that by default since prompts are user data. Keep the last transcript on device and attach it only to a user-sent bug report, and keep prompt text private in os Logger (the default for interpolated strings, just never mark it .public).