File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -786,13 +786,13 @@ - (BOOL)isDirectory:(NSString *)path
786
786
return sentryStaticBasePath;
787
787
}
788
788
789
- #if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
789
+ #if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
790
790
void
791
791
removeSentryStaticBasePath (void )
792
792
{
793
793
_non_thread_safe_removeFileAtPath (sentryStaticBasePath ());
794
794
}
795
- #endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
795
+ #endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
796
796
797
797
#pragma mark - Profiling
798
798
Original file line number Diff line number Diff line change @@ -141,20 +141,22 @@ @implementation SentryProfiler {
141
141
142
142
+ (void )load
143
143
{
144
- # if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
144
+ # if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
145
145
// we want to allow starting a launch profile from here for UI tests, but not unit tests
146
146
if (NSProcessInfo .processInfo .environment [@" --io.sentry.ui-test.test-name" ] == nil ) {
147
147
return ;
148
148
}
149
149
150
- // the ui tests want to wipe the data before each test case runs, to remove any launch config
151
- // files that might be present before launching the app initially, however we need to make sure
152
- // to remove stale versions of the file before it gets used to potentially start a launch
153
- // profile that shouldn't have started, so we check here for this
150
+ // the samples apps may want to wipe the data like before UI test case runs, or manually during
151
+ // development, to remove any launch config files that might be present before launching the app
152
+ // initially, however we need to make sure to remove stale versions of the file before it gets
153
+ // used to potentially start a launch profile that shouldn't have started, so we check here for
154
+ // this
154
155
if ([NSProcessInfo .processInfo.arguments containsObject: @" --io.sentry.wipe-data" ]) {
155
156
removeSentryStaticBasePath ();
156
157
}
157
- # endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
158
+ # endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
159
+
158
160
sentry_startLaunchProfile ();
159
161
}
160
162
Original file line number Diff line number Diff line change @@ -174,9 +174,9 @@ SENTRY_EXTERN void removeAppLaunchProfilingConfigFile(void);
174
174
175
175
SENTRY_EXTERN NSString *_Nullable sentryStaticBasePath (void );
176
176
177
- # if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
177
+ # if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
178
178
SENTRY_EXTERN void removeSentryStaticBasePath (void );
179
- # endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
179
+ # endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
180
180
181
181
#endif // SENTRY_TARGET_PROFILING_SUPPORTED
182
182
You can’t perform that action at this time.
0 commit comments