Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: WatchOS build for Xcode 15 #3204

Merged
merged 8 commits into from
Aug 16, 2023
Merged

fix: WatchOS build for Xcode 15 #3204

merged 8 commits into from
Aug 16, 2023

Conversation

brustolin
Copy link
Contributor

📜 Description

Fixed WatchOS build for Xcode 15

💡 Motivation and Context

close #3203

💚 How did you test it?

Samples

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Comment on lines -21 to -22
#elif TARGET_OS_WATCH
# import <WatchKit/WatchKit.h>
Copy link
Contributor Author

@brustolin brustolin Aug 4, 2023

Choose a reason for hiding this comment

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

This don't make sense.
Apple own header have errors inside, maybe this will be solved until Xcode 15 release, but we don't even use this, so there is no harm in removing it and save a few bits.

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #3204 (8559c58) into main (d3630c3) will increase coverage by 0.058%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3204       +/-   ##
=============================================
+ Coverage   89.139%   89.198%   +0.058%     
=============================================
  Files          502       502               
  Lines        54041     54028       -13     
  Branches     19384     19383        -1     
=============================================
+ Hits         48172     48192       +20     
+ Misses        5013      4875      -138     
- Partials       856       961      +105     
Files Changed Coverage Δ
Sources/Sentry/SentryDevice.mm 56.164% <ø> (ø)
Tests/SentryTests/Helper/SentryDeviceTests.mm 82.352% <ø> (ø)

... and 32 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 d3630c3...8559c58. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1252.20 ms 1255.73 ms 3.53 ms
Size 22.84 KiB 402.63 KiB 379.78 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
60dd0f5 1247.35 ms 1267.59 ms 20.24 ms
15b8c61 1223.16 ms 1244.83 ms 21.67 ms
8f397a7 1224.66 ms 1236.48 ms 11.82 ms
0001a09 1223.90 ms 1249.56 ms 25.66 ms
257c2a9 1239.52 ms 1251.08 ms 11.56 ms
3f366ee 1244.49 ms 1257.28 ms 12.79 ms
3e7aa41 1214.02 ms 1238.84 ms 24.82 ms
47b41ed 1252.31 ms 1253.96 ms 1.64 ms
25bcc50 1209.53 ms 1224.86 ms 15.33 ms
c00eafe 1198.26 ms 1227.62 ms 29.36 ms

App size

Revision Plain With Sentry Diff
60dd0f5 20.76 KiB 393.37 KiB 372.60 KiB
15b8c61 20.76 KiB 419.67 KiB 398.91 KiB
8f397a7 20.76 KiB 420.55 KiB 399.79 KiB
0001a09 20.76 KiB 433.19 KiB 412.43 KiB
257c2a9 20.76 KiB 401.36 KiB 380.60 KiB
3f366ee 20.76 KiB 427.84 KiB 407.08 KiB
3e7aa41 20.76 KiB 432.31 KiB 411.55 KiB
47b41ed 20.76 KiB 436.66 KiB 415.90 KiB
25bcc50 20.76 KiB 427.22 KiB 406.46 KiB
c00eafe 20.76 KiB 432.87 KiB 412.11 KiB

Previous results on branch: fix/watch-build-xcode15

Startup times

Revision Plain With Sentry Diff
9c0bd78 1225.18 ms 1250.14 ms 24.96 ms
0f5f6a1 1242.98 ms 1261.41 ms 18.43 ms
c1198d0 1233.77 ms 1242.37 ms 8.60 ms
7fb6c19 1226.76 ms 1246.65 ms 19.90 ms

App size

Revision Plain With Sentry Diff
9c0bd78 22.84 KiB 403.19 KiB 380.35 KiB
0f5f6a1 22.84 KiB 403.19 KiB 380.35 KiB
c1198d0 22.84 KiB 403.19 KiB 380.35 KiB
7fb6c19 22.84 KiB 403.19 KiB 380.35 KiB

@armcknight
Copy link
Member

I pushed a commit that fixed a couple build errors when I tried running this locally. Not sure how the watchOS samples ever worked before this.

One was:

/sentry-cocoa/Samples/watchOS-Swift/watchOS-Swift WatchKit Extension/ContentView.swift:6:6 'StateObject' is only available in application extensions for watchOS 7.0 or newer

The other was an error complaining that the embedded binary wasn't signed with the same cert as the parent app.

@brustolin
Copy link
Contributor Author

Strange, i had no problem running the sample here.
Thanks @armcknight for the help.
Since I'm the owner of this PR we need you to approve it.

@brustolin brustolin merged commit 3ea21f5 into main Aug 16, 2023
41 of 42 checks passed
@brustolin brustolin deleted the fix/watch-build-xcode15 branch August 16, 2023 07:42
@github-actions
Copy link

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- WatchOS build for Xcode 15 ([#3204](https://github.com/getsentry/sentry-cocoa/pull/3204))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 9acfee4

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.

Compilation errors when using Xcode 15 Beta (wachOS, device build)
3 participants