Skip to content

Commit ec7a882

Browse files
committed
must clean up file for any malformed input; add tests for all non-happy-path exits
1 parent 9d37612 commit ec7a882

File tree

6 files changed

+312
-7
lines changed

6 files changed

+312
-7
lines changed

Sentry.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@
743743
84E13B842CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E13B832CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift */; };
744744
84EB21942BF01C6C00EDDA28 /* TestNSNotificationCenterWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B18DE4328D9F8F6004845C6 /* TestNSNotificationCenterWrapper.swift */; };
745745
84EB21962BF01CEA00EDDA28 /* SentryCrashInstallationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84EB21952BF01CEA00EDDA28 /* SentryCrashInstallationTests.swift */; };
746+
84F2A1CE2E06001300A94524 /* SentryApplaunchProfilingMalformedConfigFileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F2A1CD2E06001300A94524 /* SentryApplaunchProfilingMalformedConfigFileTests.swift */; };
746747
84F994E62A6894B500EC0190 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F994E52A6894B500EC0190 /* CoreData.framework */; };
747748
84F994E82A6894BD00EC0190 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F994E72A6894BD00EC0190 /* SystemConfiguration.framework */; platformFilters = (ios, maccatalyst, macos, tvos, ); };
748749
861265F92404EC1500C4AFDE /* NSArray+SentrySanitize.h in Headers */ = {isa = PBXBuildFile; fileRef = 861265F72404EC1500C4AFDE /* NSArray+SentrySanitize.h */; };
@@ -1961,6 +1962,7 @@
19611962
84EACEBC2C33CA7A009B8753 /* SentryWithoutUIKit.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = SentryWithoutUIKit.modulemap; path = Sources/Resources/SentryWithoutUIKit.modulemap; sourceTree = SOURCE_ROOT; };
19621963
84EACEDF2C3DCAE2009B8753 /* DeploymentTargets.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DeploymentTargets.xcconfig; sourceTree = "<group>"; };
19631964
84EB21952BF01CEA00EDDA28 /* SentryCrashInstallationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCrashInstallationTests.swift; sourceTree = "<group>"; };
1965+
84F2A1CD2E06001300A94524 /* SentryApplaunchProfilingMalformedConfigFileTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryApplaunchProfilingMalformedConfigFileTests.swift; sourceTree = "<group>"; };
19641966
84F994E52A6894B500EC0190 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreData.framework; sourceTree = DEVELOPER_DIR; };
19651967
84F994E72A6894BD00EC0190 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; };
19661968
861265F72404EC1500C4AFDE /* NSArray+SentrySanitize.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "NSArray+SentrySanitize.h"; path = "include/NSArray+SentrySanitize.h"; sourceTree = "<group>"; };
@@ -3804,6 +3806,7 @@
38043806
035E73CD27D5790A005EEB11 /* SentryThreadMetadataCacheTests.mm */,
38053807
03F9D37B2819A65C00602916 /* SentryProfilerTests.mm */,
38063808
84A305472BC72A0A00D84283 /* SentryAppLaunchProfilingTests.swift */,
3809+
84F2A1CD2E06001300A94524 /* SentryApplaunchProfilingMalformedConfigFileTests.swift */,
38073810
845CEB162D8A979700B6B325 /* SentryAppStartProfilingConfigurationTests.swift */,
38083811
845CEAEE2D83F79500B6B325 /* SentryProfilingPublicAPITests.swift */,
38093812
8419C0C328C1889D001C8259 /* SentryTraceProfilerTests.swift */,
@@ -5921,6 +5924,7 @@
59215924
845CEAEF2D83F79500B6B325 /* SentryProfilingPublicAPITests.swift in Sources */,
59225925
8431EFE829B27BAD00D8DC56 /* SentrySystemWrapperTests.swift in Sources */,
59235926
84A305492BC7328400D84283 /* SentryAppLaunchProfilingTests.swift in Sources */,
5927+
84F2A1CE2E06001300A94524 /* SentryApplaunchProfilingMalformedConfigFileTests.swift in Sources */,
59245928
845CEB172D8A979700B6B325 /* SentryAppStartProfilingConfigurationTests.swift in Sources */,
59255929
8431EFE529B27BAD00D8DC56 /* SentryNSProcessInfoWrapperTests.swift in Sources */,
59265930
8431EFDE29B27B5300D8DC56 /* SentryTraceProfilerTests.swift in Sources */,

SentryTestUtils/ClearTestState.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class TestCleanup: NSObject {
4040
SentryDependencyContainer.sharedInstance().uiViewControllerPerformanceTracker.alwaysWaitForFullDisplay = false
4141
SentryDependencyContainer.sharedInstance().swizzleWrapper.removeAllCallbacks()
4242
SentryDependencyContainer.sharedInstance().fileManager.clearDiskState()
43-
43+
4444
#endif // os(iOS) || os(tvOS) || targetEnvironment(macCatalyst)
4545

4646
SentryDependencyContainer.reset()

Sources/Sentry/Profiling/SentryLaunchProfiling.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@
230230
# endif // defined(DEBUG)
231231

232232
NSDictionary<NSString *, NSNumber *> *launchConfig = sentry_appLaunchProfileConfiguration();
233+
234+
if (launchConfig == nil) {
235+
SENTRY_LOG_DEBUG(@"No launch profile config exists, will not profile launch.");
236+
_sentry_cleanUpConfigFile();
237+
return;
238+
}
239+
233240
if ([launchConfig[kSentryLaunchProfileConfigKeyContinuousProfiling] boolValue]) {
234241
SENTRY_LOG_DEBUG(@"Starting continuous launch profile v1.");
235242
[SentryContinuousProfiler start];
@@ -243,7 +250,7 @@
243250
NSNumber *lifecycleValue
244251
= launchConfig[kSentryLaunchProfileConfigKeyContinuousProfilingV2Lifecycle];
245252
if (lifecycleValue == nil) {
246-
SENTRY_TEST_FATAL(
253+
SENTRY_LOG_ERROR(
247254
@"Missing expected launch profile config parameter for lifecycle. Will "
248255
@"not proceed with launch profile.");
249256
_sentry_cleanUpConfigFile();
@@ -256,7 +263,7 @@
256263
NSNumber *sampleRand = launchConfig[kSentryLaunchProfileConfigKeyProfilesSampleRand];
257264

258265
if (sampleRate == nil || sampleRand == nil) {
259-
SENTRY_TEST_FATAL(
266+
SENTRY_LOG_ERROR(
260267
@"Tried to start a continuous profile v2 with no configured sample "
261268
@"rate/rand. Will not run profiler.");
262269
_sentry_cleanUpConfigFile();

Sources/Sentry/SentryFileManager.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,13 @@ - (BOOL)isDirectory:(NSString *)path
832832
NSError *error;
833833
NSDictionary<NSString *, NSNumber *> *config =
834834
[NSDictionary<NSString *, NSNumber *> dictionaryWithContentsOfURL:url error:&error];
835-
SENTRY_CASSERT(
836-
error == nil, @"Encountered error trying to retrieve app launch profile config: %@", error);
835+
836+
if (error != nil) {
837+
SENTRY_LOG_ERROR(
838+
@"Encountered error trying to retrieve app launch profile config: %@", error);
839+
return nil;
840+
}
841+
837842
return config;
838843
}
839844

Tests/SentryProfilerTests/SentryAppLaunchProfilingTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import XCTest
44
#if os(iOS) || os(macOS) || targetEnvironment(macCatalyst)
55
final class SentryAppLaunchProfilingTests: XCTestCase {
66
private var fixture: SentryProfileTestFixture!
7-
7+
88
override func setUp() {
99
super.setUp()
1010
fixture = SentryProfileTestFixture()
1111
}
12-
12+
1313
override func tearDown() {
1414
super.tearDown()
1515
clearTestState()
Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
import SentryTestUtils
2+
import XCTest
3+
4+
#if os(iOS) || os(macOS) || targetEnvironment(macCatalyst)
5+
class SentryAppLaunchProfilingMalformedConfigFileTests: XCTestCase {
6+
override func setUp() {
7+
super.setUp()
8+
removeAppLaunchProfilingConfigFile()
9+
}
10+
11+
override func tearDown() {
12+
super.tearDown()
13+
clearTestState()
14+
}
15+
16+
func testMalformedConfigFile_CorruptedPlist_DoesNotStartProfilingAndRemovesFile() throws {
17+
// Create a corrupted plist file that can't be parsed
18+
let configURL = launchProfileConfigFileURL()
19+
let corruptedData = Data("this is not a valid plist file {[}".utf8)
20+
try corruptedData.write(to: configURL)
21+
22+
// Verify file exists before the call
23+
XCTAssertTrue(appLaunchProfileConfigFileExists())
24+
25+
// Verify that sentry_appLaunchProfileConfiguration returns nil for corrupted file
26+
XCTAssertNil(sentry_appLaunchProfileConfiguration())
27+
28+
// Call _sentry_nondeduplicated_startLaunchProfile
29+
_sentry_nondeduplicated_startLaunchProfile()
30+
31+
// Verify that profiling didn't start
32+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
33+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
34+
XCTAssertNil(sentry_launchTracer)
35+
36+
// Verify that the config file was removed
37+
XCTAssertFalse(appLaunchProfileConfigFileExists())
38+
}
39+
40+
func testMalformedConfigFile_ContinuousV2MissingLifecycle_DoesNotStartProfilingAndRemovesFile() throws {
41+
// Create a config file with continuous profiling v2 enabled but missing lifecycle
42+
let configDict: [String: Any] = [
43+
kSentryLaunchProfileConfigKeyContinuousProfilingV2: true,
44+
kSentryLaunchProfileConfigKeyProfilesSampleRate: 1.0,
45+
kSentryLaunchProfileConfigKeyProfilesSampleRand: 0.5
46+
// Missing: kSentryLaunchProfileConfigKeyContinuousProfilingV2Lifecycle
47+
]
48+
49+
let configURL = launchProfileConfigFileURL()
50+
try (configDict as NSDictionary).write(to: configURL)
51+
52+
// Verify file exists and is readable
53+
XCTAssertTrue(appLaunchProfileConfigFileExists())
54+
XCTAssertNotNil(sentry_appLaunchProfileConfiguration())
55+
56+
// Call _sentry_nondeduplicated_startLaunchProfile
57+
_sentry_nondeduplicated_startLaunchProfile()
58+
59+
// Verify that profiling didn't start
60+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
61+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
62+
XCTAssertNil(sentry_launchTracer)
63+
64+
// Verify that the config file was removed
65+
XCTAssertFalse(appLaunchProfileConfigFileExists())
66+
}
67+
68+
func testMalformedConfigFile_ContinuousV2ManualMissingSampleRate_DoesNotStartProfilingAndRemovesFile() throws {
69+
// Create a config file with continuous profiling v2 manual lifecycle but missing sample rate
70+
let configDict: [String: Any] = [
71+
kSentryLaunchProfileConfigKeyContinuousProfilingV2: true,
72+
kSentryLaunchProfileConfigKeyContinuousProfilingV2Lifecycle: SentryProfileLifecycle.manual.rawValue,
73+
kSentryLaunchProfileConfigKeyProfilesSampleRand: 0.5
74+
// Missing: kSentryLaunchProfileConfigKeyProfilesSampleRate
75+
]
76+
77+
let configURL = launchProfileConfigFileURL()
78+
try (configDict as NSDictionary).write(to: configURL)
79+
80+
// Verify file exists and is readable
81+
XCTAssertTrue(appLaunchProfileConfigFileExists())
82+
XCTAssertNotNil(sentry_appLaunchProfileConfiguration())
83+
84+
// Call _sentry_nondeduplicated_startLaunchProfile
85+
_sentry_nondeduplicated_startLaunchProfile()
86+
87+
// Verify that profiling didn't start
88+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
89+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
90+
XCTAssertNil(sentry_launchTracer)
91+
92+
// Verify that the config file was removed
93+
XCTAssertFalse(appLaunchProfileConfigFileExists())
94+
}
95+
96+
func testMalformedConfigFile_ContinuousV2ManualMissingSampleRand_DoesNotStartProfilingAndRemovesFile() throws {
97+
// Create a config file with continuous profiling v2 manual lifecycle but missing sample rand
98+
let configDict: [String: Any] = [
99+
kSentryLaunchProfileConfigKeyContinuousProfilingV2: true,
100+
kSentryLaunchProfileConfigKeyContinuousProfilingV2Lifecycle: SentryProfileLifecycle.manual.rawValue,
101+
kSentryLaunchProfileConfigKeyProfilesSampleRate: 1.0
102+
// Missing: kSentryLaunchProfileConfigKeyProfilesSampleRand
103+
]
104+
105+
let configURL = launchProfileConfigFileURL()
106+
try (configDict as NSDictionary).write(to: configURL)
107+
108+
// Verify file exists and is readable
109+
XCTAssertTrue(appLaunchProfileConfigFileExists())
110+
XCTAssertNotNil(sentry_appLaunchProfileConfiguration())
111+
112+
// Call _sentry_nondeduplicated_startLaunchProfile
113+
_sentry_nondeduplicated_startLaunchProfile()
114+
115+
// Verify that profiling didn't start
116+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
117+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
118+
XCTAssertNil(sentry_launchTracer)
119+
120+
// Verify that the config file was removed
121+
XCTAssertFalse(appLaunchProfileConfigFileExists())
122+
}
123+
124+
func testMalformedConfigFile_TraceProfilingMissingProfilesRate_DoesNotStartProfilingAndRemovesFile() throws {
125+
// Create a config file for trace profiling but missing profiles sample rate
126+
let configDict: [String: Any] = [
127+
kSentryLaunchProfileConfigKeyProfilesSampleRand: 0.5,
128+
kSentryLaunchProfileConfigKeyTracesSampleRate: 1.0,
129+
kSentryLaunchProfileConfigKeyTracesSampleRand: 0.5
130+
// Missing: kSentryLaunchProfileConfigKeyProfilesSampleRate
131+
]
132+
133+
let configURL = launchProfileConfigFileURL()
134+
try (configDict as NSDictionary).write(to: configURL)
135+
136+
// Verify file exists and is readable
137+
XCTAssertTrue(appLaunchProfileConfigFileExists())
138+
XCTAssertNotNil(sentry_appLaunchProfileConfiguration())
139+
140+
// Call _sentry_nondeduplicated_startLaunchProfile
141+
_sentry_nondeduplicated_startLaunchProfile()
142+
143+
// Verify that profiling didn't start
144+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
145+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
146+
XCTAssertNil(sentry_launchTracer)
147+
148+
// Verify that the config file was removed
149+
XCTAssertFalse(appLaunchProfileConfigFileExists())
150+
}
151+
152+
func testMalformedConfigFile_TraceProfilingMissingProfilesRand_DoesNotStartProfilingAndRemovesFile() throws {
153+
// Create a config file for trace profiling but missing profiles sample rand
154+
let configDict: [String: Any] = [
155+
kSentryLaunchProfileConfigKeyProfilesSampleRate: 1.0,
156+
kSentryLaunchProfileConfigKeyTracesSampleRate: 1.0,
157+
kSentryLaunchProfileConfigKeyTracesSampleRand: 0.5
158+
// Missing: kSentryLaunchProfileConfigKeyProfilesSampleRand
159+
]
160+
161+
let configURL = launchProfileConfigFileURL()
162+
try (configDict as NSDictionary).write(to: configURL)
163+
164+
// Verify file exists and is readable
165+
XCTAssertTrue(appLaunchProfileConfigFileExists())
166+
XCTAssertNotNil(sentry_appLaunchProfileConfiguration())
167+
168+
// Call _sentry_nondeduplicated_startLaunchProfile
169+
_sentry_nondeduplicated_startLaunchProfile()
170+
171+
// Verify that profiling didn't start
172+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
173+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
174+
XCTAssertNil(sentry_launchTracer)
175+
176+
// Verify that the config file was removed
177+
XCTAssertFalse(appLaunchProfileConfigFileExists())
178+
}
179+
180+
func testMalformedConfigFile_TraceProfilingMissingTracesRate_DoesNotStartProfilingAndRemovesFile() throws {
181+
// Create a config file for trace profiling but missing traces sample rate
182+
let configDict: [String: Any] = [
183+
kSentryLaunchProfileConfigKeyProfilesSampleRate: 1.0,
184+
kSentryLaunchProfileConfigKeyProfilesSampleRand: 0.5,
185+
kSentryLaunchProfileConfigKeyTracesSampleRand: 0.5
186+
// Missing: kSentryLaunchProfileConfigKeyTracesSampleRate
187+
]
188+
189+
let configURL = launchProfileConfigFileURL()
190+
try (configDict as NSDictionary).write(to: configURL)
191+
192+
// Verify file exists and is readable
193+
XCTAssertTrue(appLaunchProfileConfigFileExists())
194+
XCTAssertNotNil(sentry_appLaunchProfileConfiguration())
195+
196+
// Call _sentry_nondeduplicated_startLaunchProfile
197+
_sentry_nondeduplicated_startLaunchProfile()
198+
199+
// Verify that profiling didn't start
200+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
201+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
202+
XCTAssertNil(sentry_launchTracer)
203+
204+
// Verify that the config file was removed
205+
XCTAssertFalse(appLaunchProfileConfigFileExists())
206+
}
207+
208+
func testMalformedConfigFile_TraceProfilingMissingTracesRand_DoesNotStartProfilingAndRemovesFile() throws {
209+
// Create a config file for trace profiling but missing traces sample rand
210+
let configDict: [String: Any] = [
211+
kSentryLaunchProfileConfigKeyProfilesSampleRate: 1.0,
212+
kSentryLaunchProfileConfigKeyProfilesSampleRand: 0.5,
213+
kSentryLaunchProfileConfigKeyTracesSampleRate: 1.0
214+
// Missing: kSentryLaunchProfileConfigKeyTracesSampleRand
215+
]
216+
217+
let configURL = launchProfileConfigFileURL()
218+
try (configDict as NSDictionary).write(to: configURL)
219+
220+
// Verify file exists and is readable
221+
XCTAssertTrue(appLaunchProfileConfigFileExists())
222+
XCTAssertNotNil(sentry_appLaunchProfileConfiguration())
223+
224+
// Call _sentry_nondeduplicated_startLaunchProfile
225+
_sentry_nondeduplicated_startLaunchProfile()
226+
227+
// Verify that profiling didn't start
228+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
229+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
230+
XCTAssertNil(sentry_launchTracer)
231+
232+
// Verify that the config file was removed
233+
XCTAssertFalse(appLaunchProfileConfigFileExists())
234+
}
235+
236+
func testMalformedConfigFile_EmptyConfigFile_DoesNotStartProfilingButKeepsFile() throws {
237+
// Create an empty but valid plist file
238+
let configDict: [String: Any] = [:]
239+
240+
let configURL = launchProfileConfigFileURL()
241+
try (configDict as NSDictionary).write(to: configURL)
242+
243+
// Verify file exists and is readable
244+
XCTAssertTrue(appLaunchProfileConfigFileExists())
245+
XCTAssertNotNil(sentry_appLaunchProfileConfiguration())
246+
247+
// Call _sentry_nondeduplicated_startLaunchProfile
248+
_sentry_nondeduplicated_startLaunchProfile()
249+
250+
// Verify that profiling didn't start
251+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
252+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
253+
XCTAssertNil(sentry_launchTracer)
254+
255+
// Verify that the config file was removed (because profilesRate is nil)
256+
XCTAssertFalse(appLaunchProfileConfigFileExists())
257+
}
258+
259+
func testMalformedConfigFile_ContinuousV2TraceLifecycleMissingTracesRate_DoesNotStartProfilingAndRemovesFile() throws {
260+
// Create a config file with continuous profiling v2 trace lifecycle but missing traces sample rate
261+
let configDict: [String: Any] = [
262+
kSentryLaunchProfileConfigKeyContinuousProfilingV2: true,
263+
kSentryLaunchProfileConfigKeyContinuousProfilingV2Lifecycle: SentryProfileLifecycle.trace.rawValue,
264+
kSentryLaunchProfileConfigKeyProfilesSampleRate: 1.0,
265+
kSentryLaunchProfileConfigKeyProfilesSampleRand: 0.5,
266+
kSentryLaunchProfileConfigKeyTracesSampleRand: 0.5
267+
// Missing: kSentryLaunchProfileConfigKeyTracesSampleRate
268+
]
269+
270+
let configURL = launchProfileConfigFileURL()
271+
try (configDict as NSDictionary).write(to: configURL)
272+
273+
// Verify file exists and is readable
274+
XCTAssertTrue(appLaunchProfileConfigFileExists())
275+
XCTAssertNotNil(sentry_appLaunchProfileConfiguration())
276+
277+
// Call _sentry_nondeduplicated_startLaunchProfile
278+
_sentry_nondeduplicated_startLaunchProfile()
279+
280+
// Verify that profiling didn't start
281+
XCTAssertFalse(SentryTraceProfiler.isCurrentlyProfiling())
282+
XCTAssertFalse(SentryContinuousProfiler.isCurrentlyProfiling())
283+
XCTAssertNil(sentry_launchTracer)
284+
285+
// Verify that the config file was removed
286+
XCTAssertFalse(appLaunchProfileConfigFileExists())
287+
}
288+
}
289+
#endif // os(iOS) || os(macOS) || targetEnvironment(macCatalyst)

0 commit comments

Comments
 (0)