Skip to content

Commit

Permalink
Merge d882e8a into 6230686
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin authored Oct 21, 2024
2 parents 6230686 + d882e8a commit 36816c8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Build visionOS project with static Sentry SDK (#4462)

## 8.39.0-beta.1

### Removal of Experimental API
Expand Down
1 change: 1 addition & 0 deletions Sources/Configuration/SDK.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ GCC_PREPROCESSOR_DEFINITIONS_TestCI = DEBUG=1 TEST=1 TESTCI=1
GCC_PREPROCESSOR_DEFINITIONS_Release = RELEASE=1
GCC_PREPROCESSOR_DEFINITIONS_ReleaseWithoutUIKit = RELEASE=1 SENTRY_NO_UIKIT=1
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_$(CONFIGURATION))
SWIFT_OBJC_INTEROP_MODE[sdk=xr*]=objcxx
6 changes: 3 additions & 3 deletions Sources/Sentry/SentryLevelHelper.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#import "SentryLevelHelper.h"
#import "SentryBreadcrumb+Private.h"

NSUInteger
sentry_breadcrumbLevel(SentryBreadcrumb *breadcrumb)
{
@implementation SentryLevelBridge : NSObject
+ (NSUInteger) breadcrumbLevel:(SentryBreadcrumb *)breadcrumb {
return breadcrumb.level;
}
@end
2 changes: 2 additions & 0 deletions Sources/Sentry/SentrySDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import "SentryHub+Private.h"
#import "SentryInternalDefines.h"
#import "SentryLog.h"
#import "SentryLogC.h"
#import "SentryMeta.h"
#import "SentryOptions+Private.h"
#import "SentryProfilingConditionals.h"
Expand Down Expand Up @@ -202,6 +203,7 @@ + (void)startWithOptions:(SentryOptions *)options
{
startOption = options;
[SentryLog configure:options.debug diagnosticLevel:options.diagnosticLevel];
sentry_initializeAsyncLogFile();

// We accept the tradeoff that the SDK might not be fully initialized directly after
// initializing it on a background thread because scheduling the init synchronously on the main
Expand Down
4 changes: 3 additions & 1 deletion Sources/Sentry/include/SentryLevelHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ NS_ASSUME_NONNULL_BEGIN
/**
* This is a workaround to access SentryLevel value from swift
*/
NSUInteger sentry_breadcrumbLevel(SentryBreadcrumb *breadcrumb);
@interface SentryLevelBridge : NSObject
+ (NSUInteger) breadcrumbLevel:(SentryBreadcrumb *)breadcrumb;
@end

NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletion Sources/Swift/Helper/Log/SentryLevel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ class SentryLevelHelper: NSObject {
}

static func breadcrumbLevel(_ breadcrumb: Breadcrumb) -> SentryLevel? {
SentryLevel(rawValue: sentry_breadcrumbLevel(breadcrumb))
SentryLevel(rawValue: SentryLevelBridge.breadcrumbLevel(breadcrumb))
}
}
1 change: 0 additions & 1 deletion Sources/Swift/Tools/SentryLog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class SentryLog: NSObject {
self.isDebug = isDebug
self.diagnosticLevel = diagnosticLevel
}
sentry_initializeAsyncLogFile()
}

@objc
Expand Down

0 comments on commit 36816c8

Please sign in to comment.