Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
1 change: 1 addition & 0 deletions .github/workflows/test-cross-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
with:
repository: getsentry/sentry-react-native
path: sentry-react-native
ref: itay/fix_sentreyscreenframes

- name: Enable Corepack
working-directory: sentry-react-native
Expand Down
2 changes: 1 addition & 1 deletion Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import AuthenticationServices
import Foundation
import SafariServices
import Sentry
@_spi(Private) import Sentry
import SentrySampleShared
import UIKit

Expand Down
32 changes: 24 additions & 8 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,6 @@
7B72D23A28D074BC0014798A /* TestExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B72D23928D074BC0014798A /* TestExtensions.swift */; };
7B77BE3527EC8445003C9020 /* SentryDiscardReasonMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B77BE3427EC8445003C9020 /* SentryDiscardReasonMapper.h */; };
7B77BE3727EC8460003C9020 /* SentryDiscardReasonMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B77BE3627EC8460003C9020 /* SentryDiscardReasonMapper.m */; };
7B7A599526B692540060A676 /* SentryScreenFrames.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B7A599426B692540060A676 /* SentryScreenFrames.h */; settings = {ATTRIBUTES = (Private, ); }; };
7B7A599726B692F00060A676 /* SentryScreenFrames.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B7A599626B692F00060A676 /* SentryScreenFrames.m */; };
7B7D872C2486480B00D2ECFF /* SentryStacktraceBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B7D872B2486480B00D2ECFF /* SentryStacktraceBuilder.h */; };
7B7D872E2486482600D2ECFF /* SentryStacktraceBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B7D872D2486482600D2ECFF /* SentryStacktraceBuilder.m */; };
7B7D8730248648AD00D2ECFF /* SentryStacktraceBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7D872F248648AD00D2ECFF /* SentryStacktraceBuilderTests.swift */; };
Expand Down Expand Up @@ -1004,6 +1002,10 @@
F41362152E1C568400B84443 /* SentryScopePersistentStore+Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = F41362142E1C568400B84443 /* SentryScopePersistentStore+Context.swift */; };
F443DB272E09BE8C009A9045 /* LoadValidatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F443DB262E09BE8C009A9045 /* LoadValidatorTests.swift */; };
F44858132E03579D0013E63B /* SentryCrashDynamicLinker+Test.h in Headers */ = {isa = PBXBuildFile; fileRef = F44858122E0357940013E63B /* SentryCrashDynamicLinker+Test.h */; };
F44D2B592E6B779E00FF31FA /* SentryScreenFrames.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44D2B582E6B779E00FF31FA /* SentryScreenFrames.swift */; };
F44D2B5C2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = F44D2B5A2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.h */; };
F44D2B5D2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = F44D2B5B2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.m */; };
F44D2B602E6B829F00FF31FA /* SentryScreenFramesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44D2B5F2E6B829F00FF31FA /* SentryScreenFramesTests.swift */; };
F451FAA62E0B304E0050ACF2 /* LoadValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F451FAA52E0B304E0050ACF2 /* LoadValidator.swift */; };
F452437E2DE60B71003E8F50 /* SentryUseNSExceptionCallstackWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = F452437D2DE60B71003E8F50 /* SentryUseNSExceptionCallstackWrapper.m */; };
F45243882DE65968003E8F50 /* ExceptionCatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = F45243872DE65968003E8F50 /* ExceptionCatcher.m */; };
Expand Down Expand Up @@ -1694,8 +1696,6 @@
7B77BE3427EC8445003C9020 /* SentryDiscardReasonMapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryDiscardReasonMapper.h; path = include/SentryDiscardReasonMapper.h; sourceTree = "<group>"; };
7B77BE3627EC8460003C9020 /* SentryDiscardReasonMapper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryDiscardReasonMapper.m; sourceTree = "<group>"; };
7B7A30C924B48523005A4C6E /* SentryHub+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentryHub+Test.h"; sourceTree = "<group>"; };
7B7A599426B692540060A676 /* SentryScreenFrames.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryScreenFrames.h; path = include/HybridPublic/SentryScreenFrames.h; sourceTree = "<group>"; };
7B7A599626B692F00060A676 /* SentryScreenFrames.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryScreenFrames.m; sourceTree = "<group>"; };
7B7D872B2486480B00D2ECFF /* SentryStacktraceBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryStacktraceBuilder.h; path = include/SentryStacktraceBuilder.h; sourceTree = "<group>"; };
7B7D872D2486482600D2ECFF /* SentryStacktraceBuilder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryStacktraceBuilder.m; sourceTree = "<group>"; };
7B7D872F248648AD00D2ECFF /* SentryStacktraceBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryStacktraceBuilderTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2350,6 +2350,10 @@
F41362142E1C568400B84443 /* SentryScopePersistentStore+Context.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryScopePersistentStore+Context.swift"; sourceTree = "<group>"; };
F443DB262E09BE8C009A9045 /* LoadValidatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadValidatorTests.swift; sourceTree = "<group>"; };
F44858122E0357940013E63B /* SentryCrashDynamicLinker+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentryCrashDynamicLinker+Test.h"; sourceTree = "<group>"; };
F44D2B582E6B779E00FF31FA /* SentryScreenFrames.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryScreenFrames.swift; sourceTree = "<group>"; };
F44D2B5A2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryProfilingScreenFramesHelper.h; sourceTree = "<group>"; };
F44D2B5B2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryProfilingScreenFramesHelper.m; sourceTree = "<group>"; };
F44D2B5F2E6B829F00FF31FA /* SentryScreenFramesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryScreenFramesTests.swift; sourceTree = "<group>"; };
F451FAA52E0B304E0050ACF2 /* LoadValidator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadValidator.swift; sourceTree = "<group>"; };
F452437D2DE60B71003E8F50 /* SentryUseNSExceptionCallstackWrapper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryUseNSExceptionCallstackWrapper.m; sourceTree = "<group>"; };
F45243862DE65968003E8F50 /* ExceptionCatcher.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExceptionCatcher.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2631,6 +2635,7 @@
62872B602BA1B84400A4FA7D /* Swift */ = {
isa = PBXGroup;
children = (
F44D2B612E6B82A800FF31FA /* Profiling */,
F443DB242E09BE61009A9045 /* Core */,
62872B612BA1B84C00A4FA7D /* Extensions */,
);
Expand Down Expand Up @@ -3699,8 +3704,6 @@
7B30B67D26527894006B2752 /* SentryDisplayLinkWrapper.m */,
7B6C5EDF264E8E050010D138 /* SentryFramesTracker.h */,
7B6C5EDD264E8DF00010D138 /* SentryFramesTracker.m */,
7B7A599426B692540060A676 /* SentryScreenFrames.h */,
7B7A599626B692F00060A676 /* SentryScreenFrames.m */,
62862B1B2B1DDBC8009B16E3 /* SentryDelayedFrame.h */,
62862B1D2B1DDC35009B16E3 /* SentryDelayedFrame.m */,
62C316802B1F2E93000D7031 /* SentryDelayedFramesTracker.h */,
Expand Down Expand Up @@ -3936,6 +3939,8 @@
8459FCC12BD73EEF0038E9C9 /* SentryProfilerSerialization+Test.h */,
84AF45A429A7FFA500FBB177 /* SentryProfiledTracerConcurrency.h */,
84AF45A529A7FFA500FBB177 /* SentryProfiledTracerConcurrency.mm */,
F44D2B5A2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.h */,
F44D2B5B2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.m */,
840B7EF22BBF83DF008B8120 /* SentryProfiler+Private.h */,
84A898522E163072009A551E /* SentryProfileConfiguration.h */,
84A898532E163072009A551E /* SentryProfileConfiguration.m */,
Expand Down Expand Up @@ -4743,6 +4748,14 @@
path = Tools;
sourceTree = "<group>";
};
F44D2B612E6B82A800FF31FA /* Profiling */ = {
isa = PBXGroup;
children = (
F44D2B5F2E6B829F00FF31FA /* SentryScreenFramesTests.swift */,
);
path = Profiling;
sourceTree = "<group>";
};
F474CB872E2EC5040001DF41 /* Recovered References */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4805,6 +4818,7 @@
FA67DCD22DDBD4EA00896B02 /* FramesTracking */ = {
isa = PBXGroup;
children = (
F44D2B582E6B779E00FF31FA /* SentryScreenFrames.swift */,
FA67DCD12DDBD4EA00896B02 /* SentryFramesDelayResult.swift */,
);
path = FramesTracking;
Expand Down Expand Up @@ -5066,6 +5080,7 @@
6383953623ABA42C000C1594 /* SentryHttpTransport.h in Headers */,
84A8891C28DBD28900C51DFD /* SentryDevice.h in Headers */,
8E564AEF267AF24400FE117D /* SentryNetworkTracker.h in Headers */,
F44D2B5C2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.h in Headers */,
63FE715120DA4C1100CDBAE8 /* SentryCrashDebug.h in Headers */,
63FE70F520DA4C1000CDBAE8 /* SentryCrashMonitor_System.h in Headers */,
FAB359982E05D7E90083D5E3 /* SentryEventSwiftHelper.h in Headers */,
Expand Down Expand Up @@ -5170,7 +5185,6 @@
7BA61CAB247BA98100C130A8 /* SentryDebugImageProvider.h in Headers */,
7BC63F0828081242009D9E37 /* SentrySwizzleWrapper.h in Headers */,
638DC9A01EBC6B6400A66E41 /* SentryRequestOperation.h in Headers */,
7B7A599526B692540060A676 /* SentryScreenFrames.h in Headers */,
6344DDB01EC308E400D9160D /* SentryCrashInstallationReporter.h in Headers */,
7B5CAF7527F5A67C00ED0DB6 /* SentryNSURLRequestBuilder.h in Headers */,
63FE70ED20DA4C1000CDBAE8 /* SentryCrashMonitor_NSException.h in Headers */,
Expand Down Expand Up @@ -5587,7 +5601,6 @@
D84D2CDF2C2BF9370011AF8A /* SentryReplayType.swift in Sources */,
63FE717B20DA4C1100CDBAE8 /* SentryCrashReport.c in Sources */,
D8F67B222BEAB6CC00C9197B /* SentryRRWebEvent.swift in Sources */,
7B7A599726B692F00060A676 /* SentryScreenFrames.m in Sources */,
84A903712D39F66F00690CE4 /* SentryUserFeedbackFormViewModel.swift in Sources */,
7B3398652459C15200BD9C96 /* SentryEnvelopeRateLimit.m in Sources */,
D81988C92BEC19200020E36C /* SentryRRWebBreadcrumbEvent.swift in Sources */,
Expand Down Expand Up @@ -5729,6 +5742,7 @@
627C77892D50B6840055E966 /* SentryBreadcrumbCodable.swift in Sources */,
63FE70D720DA4C1000CDBAE8 /* SentryCrashMonitor_MachException.c in Sources */,
7B96572226830D2400C66E25 /* SentryScopeSyncC.c in Sources */,
F44D2B5D2E6B7E8700FF31FA /* SentryProfilingScreenFramesHelper.m in Sources */,
0A9BF4E228A114940068D266 /* SentryViewHierarchyIntegration.m in Sources */,
7BBD188B244841FB00427C76 /* SentryHttpDateParser.m in Sources */,
D8AFC03D2BDA79BF00118BE1 /* SentryReplayVideoMaker.swift in Sources */,
Expand Down Expand Up @@ -5822,6 +5836,7 @@
FABE8E172E307A7F0040809A /* Dependencies.swift in Sources */,
7BE1E33424F7E3CB009D3AD0 /* SentryMigrateSessionInit.m in Sources */,
D4ECA4012E3CBEDE00C757EA /* SentryDummyPublicEmptyClass.m in Sources */,
F44D2B592E6B779E00FF31FA /* SentryScreenFrames.swift in Sources */,
D4ECA4022E3CBEDE00C757EA /* SentryDummyPrivateEmptyClass.m in Sources */,
D80299502BA83A88000F0081 /* SentryPixelBuffer.swift in Sources */,
15E0A8F22411A45A00F044E3 /* SentrySessionInternal.m in Sources */,
Expand Down Expand Up @@ -6253,6 +6268,7 @@
D884A20527C80F6300074664 /* SentryCoreDataTrackerTest.swift in Sources */,
8E70B10125CB8695002B3155 /* SentrySpanIdTests.swift in Sources */,
62E2119A2DAE99FC007D7262 /* SentryAsyncSafeLog.m in Sources */,
F44D2B602E6B829F00FF31FA /* SentryScreenFramesTests.swift in Sources */,
84EB21962BF01CEA00EDDA28 /* SentryCrashInstallationTests.swift in Sources */,
7BFE7A0A27A1B6B000D2B66E /* SentryWatchdogTerminationTrackingIntegrationTests.swift in Sources */,
FA6614FC2E4B8E1A00657755 /* TestSentryUIApplication.swift in Sources */,
Expand Down
6 changes: 3 additions & 3 deletions SentryTestUtils/TestFramesTracker.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Sentry
@_spi(Private) @testable import Sentry

#if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst)
public class TestFramesTracker: SentryFramesTracker {
public var expectedFrames: SentryScreenFrames?
@_spi(Private) public var expectedFrames: SentryScreenFrames?

public override func currentFrames() -> SentryScreenFrames {
@_spi(Private) public override func currentFrames() -> SentryScreenFrames {
expectedFrames ?? super.currentFrames()
}
}
Expand Down
1 change: 0 additions & 1 deletion Sources/Resources/Sentry.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ framework module Sentry {
header "SentryFormatter.h"
header "SentryFramesTracker.h"
header "SentryOptionsInternal.h"
header "SentryScreenFrames.h"
header "SentrySwizzle.h"
header "SentryUser+Private.h"

Expand Down
5 changes: 3 additions & 2 deletions Sources/Sentry/Profiling/SentryContinuousProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
# import "SentryProfiler+Private.h"
# import "SentryProfilerSerialization.h"
# import "SentryProfilerState.h"
# import "SentryProfilingScreenFramesHelper.h"
# import "SentryProfilingSwiftHelpers.h"
# import "SentrySDK+Private.h"
# import "SentrySample.h"
# include <mutex>

# if SENTRY_HAS_UIKIT
# import "SentryFramesTracker.h"
# import "SentryScreenFrames.h"
# import <UIKit/UIKit.h>
# endif // SENTRY_HAS_UIKIT

Expand Down Expand Up @@ -65,7 +65,8 @@

# if SENTRY_HAS_UIKIT
const auto framesTracker = SentryDependencyContainer.sharedInstance.framesTracker;
SentryScreenFrames *screenFrameData = [framesTracker.currentFrames copy];
SentryScreenFrames *screenFrameData =
[SentryProfilingScreenFramesHelper copyScreenFrames:framesTracker.currentFrames];
[framesTracker resetProfilingTimestamps];
# endif // SENTRY_HAS_UIKIT

Expand All @@ -75,9 +76,9 @@
// Move the serialization work to a background queue to avoid potentially
// blocking the main thread. The serialization can take several milliseconds.
sentry_dispatchAsync(SentryDependencyContainer.sharedInstance.dispatchQueueWrapper, ^{
const auto serializedMetrics = serializeContinuousProfileMetrics(metricProfilerState);

Check warning on line 79 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Lint

implicit conversion from nullable pointer 'NSDictionary * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 79 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Run SwiftUI Crash Test

implicit conversion from nullable pointer 'NSDictionary * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 79 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Check API Stability (default)

implicit conversion from nullable pointer 'NSDictionary * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 79 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Check API Stability (v9)

implicit conversion from nullable pointer 'NSDictionary * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 79 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Unit iOS 26 Sentry

implicit conversion from nullable pointer 'NSDictionary * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]
const auto envelope
= sentry_continuousProfileChunkEnvelope(profilerID, profilerState, serializedMetrics

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Lint

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Lint

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Lint

implicit conversion from nullable pointer 'SentryId * _Nullable __strong const' to non-nullable pointer type 'SentryId * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Run SwiftUI Crash Test

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Run SwiftUI Crash Test

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Run SwiftUI Crash Test

implicit conversion from nullable pointer 'SentryId * _Nullable __strong const' to non-nullable pointer type 'SentryId * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Check API Stability (default)

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Check API Stability (default)

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Check API Stability (default)

implicit conversion from nullable pointer 'SentryId * _Nullable __strong const' to non-nullable pointer type 'SentryId * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Check API Stability (v9)

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Check API Stability (v9)

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Check API Stability (v9)

implicit conversion from nullable pointer 'SentryId * _Nullable __strong const' to non-nullable pointer type 'SentryId * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Unit iOS 26 Sentry

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable __strong const' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Unit iOS 26 Sentry

implicit conversion from nullable pointer 'NSDictionary<NSString *,id> * _Nullable' to non-nullable pointer type 'NSDictionary * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 81 in Sources/Sentry/Profiling/SentryContinuousProfiler.mm

View workflow job for this annotation

GitHub Actions / Unit iOS 26 Sentry

implicit conversion from nullable pointer 'SentryId * _Nullable __strong const' to non-nullable pointer type 'SentryId * _Nonnull' [-Wnullable-to-nonnull-conversion]
# if SENTRY_HAS_UIKIT
,
screenFrameData
Expand Down
6 changes: 3 additions & 3 deletions Sources/Sentry/Profiling/SentryProfiledTracerConcurrency.mm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# if SENTRY_HAS_UIKIT
# import "SentryAppStartMeasurement.h"
# import "SentryFramesTracker.h"
# import "SentryScreenFrames.h"
# import "SentryProfilingScreenFramesHelper.h"
# endif // SENTRY_HAS_UIKIT

/**
Expand Down Expand Up @@ -236,8 +236,8 @@
_unsafe_cleanUpTraceProfiler(profiler, tracerKey);

# if SENTRY_HAS_UIKIT
profiler.screenFrameData =
[SentryDependencyContainer.sharedInstance.framesTracker.currentFrames copy];
profiler.screenFrameData = [SentryProfilingScreenFramesHelper
copyScreenFrames:SentryDependencyContainer.sharedInstance.framesTracker.currentFrames];
SENTRY_LOG_DEBUG(
@"Grabbing copy of frames tracker screen frames data to attach to profiler: %@.",
profiler.screenFrameData);
Expand Down
19 changes: 19 additions & 0 deletions Sources/Sentry/Profiling/SentryProfilingScreenFramesHelper.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#import "SentryDefines.h"
#import <Foundation/Foundation.h>

#if SENTRY_HAS_UIKIT

NS_ASSUME_NONNULL_BEGIN

@class SentryScreenFrames;

// Helper to use SentryScreenFrames without importing Swift on ObjC++ files.
// Right now we don't have Clang modules enabled, so we cannot use `@import Sentry;`
// and then no Swift class is visible to Objective C++.
@interface SentryProfilingScreenFramesHelper : NSObject
+ (SentryScreenFrames *)copyScreenFrames:(SentryScreenFrames *)screenFrames;
@end

NS_ASSUME_NONNULL_END

#endif // SENTRY_HAS_UIKIT
15 changes: 15 additions & 0 deletions Sources/Sentry/Profiling/SentryProfilingScreenFramesHelper.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#import "SentryProfilingScreenFramesHelper.h"
#import "SentrySwift.h"

#if SENTRY_HAS_UIKIT

@implementation SentryProfilingScreenFramesHelper

+ (SentryScreenFrames *)copyScreenFrames:(SentryScreenFrames *)screenFrames
{
return [screenFrames copy];
}

@end

#endif // SENTRY_HAS_UIKIT
1 change: 0 additions & 1 deletion Sources/Sentry/SentryFramesTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# import "SentrySwift.h"
# import "SentryTime.h"
# import "SentryTracer.h"
# import <SentryScreenFrames.h>
# include <stdatomic.h>

# if SENTRY_TARGET_PROFILING_SUPPORTED
Expand Down
1 change: 0 additions & 1 deletion Sources/Sentry/SentryProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# import "SentryProfilingSwiftHelpers.h"
# import "SentrySDK+Private.h"
# import "SentrySamplingProfiler.hpp"
# import "SentryScreenFrames.h"
# import "SentryTime.h"
# import "SentryTracer+Private.h"

Expand Down
96 changes: 0 additions & 96 deletions Sources/Sentry/SentryScreenFrames.m

This file was deleted.

1 change: 0 additions & 1 deletion Sources/Sentry/SentrySpan.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#if SENTRY_HAS_UIKIT
# import <SentryFramesTracker.h>
# import <SentryScreenFrames.h>
#endif // SENTRY_HAS_UIKIT

#if SENTRY_TARGET_PROFILING_SUPPORTED
Expand Down Expand Up @@ -188,7 +187,7 @@
return [SentryNoOpSpan shared];
}

return [self.tracer startChildWithParentId:self.spanId

Check warning on line 190 in Sources/Sentry/SentrySpan.m

View workflow job for this annotation

GitHub Actions / Sample watchOS-Swift WatchKit App Debug

implicit conversion from nullable pointer 'id<SentrySpan> _Nullable' to non-nullable pointer type 'id<SentrySpan> _Nonnull' [-Wnullable-to-nonnull-conversion]
operation:operation
description:description];
}
Expand Down
1 change: 0 additions & 1 deletion Sources/Sentry/SentryTracer.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
# import "SentryBuildAppStartSpans.h"
# import "SentryFramesTracker.h"
# import "SentryUIViewControllerPerformanceTracker.h"
# import <SentryScreenFrames.h>
#endif // SENTRY_HAS_UIKIT

NS_ASSUME_NONNULL_BEGIN
Expand Down Expand Up @@ -175,7 +174,7 @@
#endif // SENTRY_HAS_UIKIT

#if SENTRY_TARGET_PROFILING_SUPPORTED
_profilerReferenceID = sentry_startProfilerForTrace(configuration, hub, transactionContext);

Check warning on line 177 in Sources/Sentry/SentryTracer.m

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

implicit conversion from nullable pointer 'SentryHub * _Nullable' to non-nullable pointer type 'SentryHub * _Nonnull' [-Wnullable-to-nonnull-conversion]
_isProfiling = _profilerReferenceID != nil;
#endif // SENTRY_TARGET_PROFILING_SUPPORTED

Expand Down Expand Up @@ -585,7 +584,7 @@

#if SENTRY_TARGET_PROFILING_SUPPORTED
sentry_stopProfilerDueToFinishedTransaction(
_hub, _dispatchQueue, transaction, _isProfiling, self.startTimestamp, _startSystemTime

Check warning on line 587 in Sources/Sentry/SentryTracer.m

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

implicit conversion from nullable pointer 'NSDate * _Nullable' to non-nullable pointer type 'NSDate * _Nonnull' [-Wnullable-to-nonnull-conversion]
# if SENTRY_HAS_UIKIT
,
appStartMeasurement
Expand Down Expand Up @@ -644,7 +643,7 @@
// Prewarming can execute code up to viewDidLoad of a UIViewController, and keep the app in the
// background. This can lead to auto-generated transactions lasting for minutes or even hours.
// Therefore, we drop transactions lasting longer than SENTRY_AUTO_TRANSACTION_MAX_DURATION.
NSTimeInterval transactionDuration = [self.timestamp timeIntervalSinceDate:self.startTimestamp];

Check warning on line 646 in Sources/Sentry/SentryTracer.m

View workflow job for this annotation

GitHub Actions / Sample watchOS-Swift WatchKit App Debug

implicit conversion from nullable pointer 'NSDate * _Nullable' to non-nullable pointer type 'NSDate * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 646 in Sources/Sentry/SentryTracer.m

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

implicit conversion from nullable pointer 'NSDate * _Nullable' to non-nullable pointer type 'NSDate * _Nonnull' [-Wnullable-to-nonnull-conversion]
if ([self isAutoGeneratedTransaction]
&& transactionDuration >= SENTRY_AUTO_TRANSACTION_MAX_DURATION) {
SENTRY_LOG_INFO(@"Auto generated transaction exceeded the max duration of %f seconds. Not "
Expand Down Expand Up @@ -703,7 +702,7 @@

@synchronized(_children) {
for (id<SentrySpan> childSpan in _children) {
if ([oldest compare:childSpan.timestamp] == NSOrderedAscending) {

Check warning on line 705 in Sources/Sentry/SentryTracer.m

View workflow job for this annotation

GitHub Actions / Sample watchOS-Swift WatchKit App Debug

implicit conversion from nullable pointer 'NSDate * _Nullable' to non-nullable pointer type 'NSDate * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 705 in Sources/Sentry/SentryTracer.m

View workflow job for this annotation

GitHub Actions / Analyze (cpp)

implicit conversion from nullable pointer 'NSDate * _Nullable' to non-nullable pointer type 'NSDate * _Nonnull' [-Wnullable-to-nonnull-conversion]
oldest = childSpan.timestamp;
}
}
Expand Down
Loading
Loading