Skip to content

Commit

Permalink
Update SentryDependencyContainer.m (#2895)
Browse files Browse the repository at this point in the history
SentryDependencyContainer processInfoWrapper property was wrapped by #if SENTRY_HAS_METRIC_KIT and did not work for tvOS.
  • Loading branch information
brustolin authored Apr 13, 2023
1 parent bd05478 commit 46f5eb8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Sources/Sentry/SentryDependencyContainer.m
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,18 @@ - (SentryANRTracker *)getANRTracker:(NSTimeInterval)timeout
return _anrTracker;
}

- (SentryNSProcessInfoWrapper *)processInfoWrapper
{
if (_processInfoWrapper == nil) {
@synchronized(sentryDependencyContainerLock) {
if (_processInfoWrapper == nil) {
_processInfoWrapper = [[SentryNSProcessInfoWrapper alloc] init];
}
}
}
return _processInfoWrapper;
}

#if SENTRY_HAS_METRIC_KIT
- (SentryMXManager *)metricKitManager
{
Expand All @@ -230,18 +242,6 @@ - (SentryMXManager *)metricKitManager
return _metricKitManager;
}

- (SentryNSProcessInfoWrapper *)processInfoWrapper
{
if (_processInfoWrapper == nil) {
@synchronized(sentryDependencyContainerLock) {
if (_processInfoWrapper == nil) {
_processInfoWrapper = [[SentryNSProcessInfoWrapper alloc] init];
}
}
}
return _processInfoWrapper;
}

#endif

@end

0 comments on commit 46f5eb8

Please sign in to comment.