ref: End standalone app start at didFinishLaunching#7941
Conversation
Standalone app start transactions now end when UIApplication.didFinishLaunchingNotification is posted instead of waiting for the first frame render. This is a more universally understood endpoint and avoids edge cases with background launches. The "Initial Frame Render" child span is no longer emitted for standalone transactions since it does not apply. Non-standalone (attach-to-transaction) behavior is unchanged. Refs: #6886
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7941 +/- ##
=============================================
- Coverage 86.138% 85.588% -0.550%
=============================================
Files 489 489
Lines 29954 29963 +9
Branches 12986 12973 -13
=============================================
- Hits 25802 25645 -157
- Misses 4101 4268 +167
+ Partials 51 50 -1
... and 10 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
📲 Install BuildsiOS
|
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6c524d8 | 1217.83 ms | 1254.02 ms | 36.20 ms |
| 5a9c804 | 1220.29 ms | 1255.17 ms | 34.88 ms |
| 75eb224 | 1215.57 ms | 1244.74 ms | 29.17 ms |
| 49cc12d | 1227.33 ms | 1263.21 ms | 35.89 ms |
| e337271 | 1234.71 ms | 1270.10 ms | 35.40 ms |
| f331b01 | 1231.40 ms | 1256.22 ms | 24.82 ms |
| 3f6f54f | 1219.13 ms | 1249.20 ms | 30.07 ms |
| 85ee155 | 1227.40 ms | 1251.52 ms | 24.12 ms |
| bd2b6d3 | 1213.78 ms | 1253.83 ms | 40.06 ms |
| 787537a | 1218.35 ms | 1251.72 ms | 33.38 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6c524d8 | 24.14 KiB | 1.15 MiB | 1.12 MiB |
| 5a9c804 | 24.14 KiB | 1.15 MiB | 1.13 MiB |
| 75eb224 | 24.14 KiB | 1.16 MiB | 1.13 MiB |
| 49cc12d | 24.14 KiB | 1.16 MiB | 1.13 MiB |
| e337271 | 24.14 KiB | 1.16 MiB | 1.13 MiB |
| f331b01 | 24.14 KiB | 1.15 MiB | 1.13 MiB |
| 3f6f54f | 24.14 KiB | 1.16 MiB | 1.13 MiB |
| 85ee155 | 24.14 KiB | 1.16 MiB | 1.13 MiB |
| bd2b6d3 | 24.14 KiB | 1.17 MiB | 1.14 MiB |
| 787537a | 24.14 KiB | 1.15 MiB | 1.12 MiB |
When the SDK is initialized after didFinishLaunchingNotification has already been posted, standalone app starts produce no measurement. There is no reliable way to detect this at runtime since UIApplication.applicationState may already be .active in SwiftUI apps during App.init().
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5a3d015. Configure here.

Summary
UIApplication.didFinishLaunchingNotificationis posted instead of waiting for the first frame renderDecided to do this change on standalone app starts since it is still experimental and thus we can make "breaking changes"
Fixes #6883
Test plan
AppStartReportingStrategyTests,SentryAppStartTrackerTests, andSentryBuildAppStartSpansTestsupdated and passingenable-standalone-app-start-tracing, verify app start transaction ends at didFinishLaunching and has no "Initial Frame Render" span#skip-changelog