Skip to content

Conversation

noahsmartin
Copy link
Contributor

@noahsmartin noahsmartin commented Aug 5, 2025

This adds an app extension to the cocoa pods test app. It fails to build without the other changes in this PR. Mainly, it sets the APPLICATION_EXTENSION_API_ONLY config to NO in the podfile. Without this cocoapods would automatically add it and set it to YES when the framework was linked with app extensions. We can set it to NO and instead add app extension availability flags in the public API, to document to our users that some of our API cannot be called from an app extension.

The main reason we need APPLICATION_EXTENSION_API_ONLY=NO is because the feedback button can be configured to show automatically on SDK start, and that requires UIApplication.shared. Since that codepath goes through SentrySDK.start() we cannot annotate it with NS_EXTENSION_UNAVAILABLE. We could make another API like SentrySDK.configureUserFeedbackButton() which is extension unavailable, but the fix in this PR should also work and keep the same public API.

#skip-changelog

Copy link

codecov bot commented Aug 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.661%. Comparing base (609b0f3) to head (5327d5b).
⚠️ Report is 61 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5813       +/-   ##
=============================================
+ Coverage   86.642%   86.661%   +0.018%     
=============================================
  Files          423       423               
  Lines        36339     36405       +66     
  Branches     17104     17229      +125     
=============================================
+ Hits         31485     31549       +64     
+ Misses        4809      4808        -1     
- Partials        45        48        +3     

see 59 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 609b0f3...5327d5b. Read the comment docs.

Copy link
Contributor

github-actions bot commented Aug 5, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1224.75 ms 1247.04 ms 22.29 ms
Size 23.75 KiB 913.63 KiB 889.88 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
079bcc8 1217.88 ms 1234.88 ms 17.00 ms
7b08a87 1220.14 ms 1246.10 ms 25.96 ms
134fbdf 1219.71 ms 1240.35 ms 20.64 ms
d7461dc 1233.69 ms 1255.29 ms 21.60 ms
b5a7583 1238.22 ms 1263.94 ms 25.71 ms
6cb4338 1238.47 ms 1256.96 ms 18.49 ms
db9572a 1200.27 ms 1234.80 ms 34.53 ms
795dd39 1216.88 ms 1245.47 ms 28.59 ms
42a95d5 1206.00 ms 1224.26 ms 18.26 ms
bce9765 1229.42 ms 1243.49 ms 14.07 ms

App size

Revision Plain With Sentry Diff
079bcc8 23.74 KiB 874.07 KiB 850.33 KiB
7b08a87 23.74 KiB 913.70 KiB 889.95 KiB
134fbdf 23.75 KiB 875.25 KiB 851.50 KiB
d7461dc 23.75 KiB 874.45 KiB 850.70 KiB
b5a7583 23.75 KiB 913.44 KiB 889.68 KiB
6cb4338 23.75 KiB 913.63 KiB 889.88 KiB
db9572a 23.75 KiB 858.69 KiB 834.93 KiB
795dd39 23.75 KiB 908.16 KiB 884.41 KiB
42a95d5 23.75 KiB 906.08 KiB 882.33 KiB
bce9765 23.74 KiB 874.06 KiB 850.32 KiB

Previous results on branch: addKeyboardExtensionTest

Startup times

Revision Plain With Sentry Diff
1d93700 1242.83 ms 1265.20 ms 22.37 ms
d1a7255 1224.04 ms 1238.72 ms 14.68 ms

App size

Revision Plain With Sentry Diff
1d93700 23.74 KiB 913.70 KiB 889.95 KiB
d1a7255 23.74 KiB 913.14 KiB 889.40 KiB

@noahsmartin noahsmartin force-pushed the addKeyboardExtensionTest branch 3 times, most recently from 66c4ca6 to 657a836 Compare August 5, 2025 21:52
@noahsmartin noahsmartin marked this pull request as ready for review August 5, 2025 22:37
@philipphofmann
Copy link
Member

I leave this PR to @itaybre or @philprime, because you're more involved in the app extension topic and you should be able to give a more meaningful review.

Copy link
Contributor

@itaybre itaybre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After talking with Noah, this seems to be the best approach.
Lets remove the headers and merge

@noahsmartin noahsmartin force-pushed the addKeyboardExtensionTest branch from 657a836 to 5327d5b Compare August 8, 2025 17:21
@noahsmartin noahsmartin merged commit 2de3f92 into main Aug 11, 2025
134 of 135 checks passed
@noahsmartin noahsmartin deleted the addKeyboardExtensionTest branch August 11, 2025 15:13
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.

3 participants