Skip to content

Conversation

@armcknight
Copy link
Member

@armcknight armcknight commented May 13, 2025

In an attempt to fix #5113, use the correct API to display a floating UIWindow in the SwiftUI app.

Requires consumers to start the sentry api from a configured scene delegate, as demonstrated in the sample swiftui apps in #5222. This would need to be added to the docs for auto injection, and may warrant a separate API to display the feedback widget (this was originally planned, but i removed it as i'd only implemented auto injection. seems we just identified a need for it) if we want to give consumers the option of starting the SDK as early as possible (in a swiftui app's init method) and be able to display the feedback widget as well.

Update: The API to manually display a widget was done in #5236. This PR will fix that functionality in SwiftUI apps. A subsequent PR may attempt to fix the auto-injection situation for SwiftUI apps.

Current status: a build issue detailed in the linked issue this is resolved as of #5524

@armcknight armcknight mentioned this pull request May 27, 2025
1 task
@armcknight armcknight force-pushed the armcknight/fix/5113-user-feedback-widget-in-swiftui branch from d0b5902 to 560cf15 Compare July 1, 2025 20:05
@armcknight armcknight changed the base branch from main to removeAppExtensionFlag July 1, 2025 20:05
@armcknight
Copy link
Member Author

@armcknight armcknight marked this pull request as ready for review July 1, 2025 20:12
@codecov
Copy link

codecov bot commented Jul 1, 2025

Codecov Report

Attention: Patch coverage is 0% with 35 lines in your changes missing coverage. Please review.

Project coverage is 86.228%. Comparing base (ac5e886) to head (1f177f5).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ations/UserFeedback/SentryUserFeedbackWidget.swift 0.000% 23 Missing ⚠️
...Feedback/SentryUserFeedbackIntegrationDriver.swift 0.000% 12 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5223       +/-   ##
=============================================
+ Coverage   86.194%   86.228%   +0.034%     
=============================================
  Files          407       407               
  Lines        35043     35065       +22     
  Branches     15025     15204      +179     
=============================================
+ Hits         30205     30236       +31     
+ Misses        4795      4788        -7     
+ Partials        43        41        -2     
Files with missing lines Coverage Δ
...Feedback/SentryUserFeedbackIntegrationDriver.swift 0.000% <0.000%> (ø)
...ations/UserFeedback/SentryUserFeedbackWidget.swift 0.000% <0.000%> (ø)

... and 16 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac5e886...1f177f5. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@noahsmartin noahsmartin force-pushed the removeAppExtensionFlag branch from 30f13a2 to ebc84de Compare July 1, 2025 20:19
Base automatically changed from removeAppExtensionFlag to main July 1, 2025 20:48
@armcknight armcknight force-pushed the armcknight/fix/5113-user-feedback-widget-in-swiftui branch from 560cf15 to 14e5aa6 Compare July 1, 2025 21:34
@armcknight armcknight changed the base branch from main to armcknight/test/code-coverage July 1, 2025 21:34
@armcknight
Copy link
Member Author

rebased on top of #5544 to get code coverage working

Base automatically changed from armcknight/test/code-coverage to main July 1, 2025 22:08
@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1230.64 ms 1251.42 ms 20.78 ms
Size 23.74 KiB 874.07 KiB 850.32 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
b13e93a 1236.24 ms 1247.33 ms 11.08 ms
8047b99 1226.37 ms 1246.63 ms 20.26 ms
db9572a 1223.13 ms 1241.60 ms 18.47 ms
ac4739e 1236.55 ms 1258.89 ms 22.34 ms
9be5373 1215.92 ms 1239.44 ms 23.52 ms
e18d392 1228.69 ms 1244.43 ms 15.73 ms
2481950 1221.04 ms 1248.98 ms 27.94 ms
db9572a 1200.27 ms 1234.80 ms 34.53 ms
d38165b 1211.41 ms 1242.49 ms 31.08 ms
018037b 1209.31 ms 1228.33 ms 19.03 ms

App size

Revision Plain With Sentry Diff
b13e93a 23.75 KiB 855.37 KiB 831.62 KiB
8047b99 23.75 KiB 855.37 KiB 831.62 KiB
db9572a 23.75 KiB 858.64 KiB 834.89 KiB
ac4739e 23.75 KiB 872.67 KiB 848.92 KiB
9be5373 23.75 KiB 866.50 KiB 842.75 KiB
e18d392 23.75 KiB 866.68 KiB 842.93 KiB
2481950 23.74 KiB 872.74 KiB 849.00 KiB
db9572a 23.75 KiB 858.69 KiB 834.93 KiB
d38165b 23.75 KiB 855.37 KiB 831.62 KiB
018037b 23.75 KiB 867.16 KiB 843.41 KiB

Previous results on branch: armcknight/fix/5113-user-feedback-widget-in-swiftui

Startup times

Revision Plain With Sentry Diff
e5f0d42 1215.29 ms 1242.73 ms 27.44 ms

App size

Revision Plain With Sentry Diff
e5f0d42 23.74 KiB 874.08 KiB 850.33 KiB

@armcknight armcknight merged commit d170e0d into main Jul 2, 2025
102 of 103 checks passed
@armcknight armcknight deleted the armcknight/fix/5113-user-feedback-widget-in-swiftui branch July 2, 2025 00:47
armcknight added a commit that referenced this pull request Jul 2, 2025
armcknight added a commit that referenced this pull request Jul 2, 2025
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feedback: SwiftUI support for widget

3 participants