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
786786 return sentryStaticBasePath;
787787}
788788
789- #if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
789+ #if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
790790void
791791removeSentryStaticBasePath (void )
792792{
793793 _non_thread_safe_removeFileAtPath (sentryStaticBasePath ());
794794}
795- #endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
795+ #endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
796796
797797#pragma mark - Profiling
798798
Original file line number Diff line number Diff line change @@ -141,20 +141,22 @@ @implementation SentryProfiler {
141141
142142+ (void )load
143143{
144- # if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
144+ # if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
145145 // we want to allow starting a launch profile from here for UI tests, but not unit tests
146146 if (NSProcessInfo .processInfo .environment [@" --io.sentry.ui-test.test-name" ] == nil ) {
147147 return ;
148148 }
149149
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
154155 if ([NSProcessInfo .processInfo.arguments containsObject: @" --io.sentry.wipe-data" ]) {
155156 removeSentryStaticBasePath ();
156157 }
157- # endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
158+ # endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
159+
158160 sentry_startLaunchProfile ();
159161}
160162
Original file line number Diff line number Diff line change @@ -174,9 +174,9 @@ SENTRY_EXTERN void removeAppLaunchProfilingConfigFile(void);
174174
175175SENTRY_EXTERN NSString *_Nullable sentryStaticBasePath (void );
176176
177- # if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
177+ # if defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
178178SENTRY_EXTERN void removeSentryStaticBasePath (void );
179- # endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI)
179+ # endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
180180
181181#endif // SENTRY_TARGET_PROFILING_SUPPORTED
182182
You can’t perform that action at this time.
0 commit comments