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
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Unreleased

### Fixed

- WatchOS build for Xcode 15 (#3204)

## 8.9.4

Expand Down
5 changes: 2 additions & 3 deletions Sources/Sentry/SentryDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#import <sys/sysctl.h>
#if SENTRY_HAS_UIKIT
# import <UIKit/UIKit.h>
#elif TARGET_OS_WATCH
# import <WatchKit/WatchKit.h>
Comment on lines -21 to -22
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.

#endif

namespace {
Expand Down Expand Up @@ -180,7 +178,8 @@
sentry_getOSVersion(void)
{
#if TARGET_OS_WATCH
return WKInterfaceDevice.currentDevice.systemVersion;
//This function is only used for profiling, and profiling don't run for watchOS
return @"";
#elif SENTRY_HAS_UIKIT
return UIDevice.currentDevice.systemVersion;
#else
Expand Down
Loading