@@ -33,7 +33,6 @@ @interface SentryAppStartTracker () <SentryFramesTrackerListener>
3333@property (nonatomic , assign ) BOOL wasInBackground;
3434@property (nonatomic , strong ) NSDate *didFinishLaunchingTimestamp;
3535@property (nonatomic , assign ) BOOL enablePreWarmedAppStartTracing;
36- @property (nonatomic , assign ) BOOL enablePerformanceV2;
3736
3837@end
3938
@@ -55,16 +54,12 @@ - (instancetype)initWithDispatchQueueWrapper:(SentryDispatchQueueWrapper *)dispa
5554 appStateManager : (id <SentryAppStateManager>)appStateManager
5655 framesTracker : (SentryFramesTracker *)framesTracker
5756 enablePreWarmedAppStartTracing : (BOOL )enablePreWarmedAppStartTracing
58- enablePerformanceV2 : (BOOL )enablePerformanceV2
5957{
6058 if (self = [super init ]) {
6159 self.dispatchQueue = dispatchQueueWrapper;
6260 self.appStateManager = appStateManager;
63- _enablePerformanceV2 = enablePerformanceV2;
64- if (_enablePerformanceV2) {
65- self.framesTracker = framesTracker;
66- [framesTracker addListener: self ];
67- }
61+ self.framesTracker = framesTracker;
62+ [framesTracker addListener: self ];
6863
6964 self.previousAppState = [self .appStateManager loadPreviousAppState ];
7065 self.wasInBackground = NO ;
@@ -104,11 +99,6 @@ - (void)start
10499 name: UIApplicationDidFinishLaunchingNotification
105100 object: nil ];
106101
107- [NSNotificationCenter .defaultCenter addObserver: self
108- selector: @selector (didBecomeVisible )
109- name: UIWindowDidBecomeVisibleNotification
110- object: nil ];
111-
112102 [NSNotificationCenter .defaultCenter addObserver: self
113103 selector: @selector (didEnterBackground )
114104 name: UIApplicationDidEnterBackgroundNotification
@@ -229,19 +219,6 @@ - (void)buildAppStartMeasurement:(NSDate *)appStartEnd
229219# endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
230220}
231221
232- /* *
233- * This is when the window becomes visible, which is not when the first frame of the app is drawn.
234- * When this is posted, the app screen is usually white. The correct time when the first frame is
235- * drawn is called in framesTrackerHasNewFrame only when `enablePerformanceV2` is enabled.
236- */
237- - (void )didBecomeVisible
238- {
239- if (!_enablePerformanceV2) {
240- [self
241- buildAppStartMeasurement: [SentryDependencyContainer.sharedInstance.dateProvider date ]];
242- }
243- }
244-
245222/* *
246223 * This is when the first frame is drawn.
247224 */
@@ -303,10 +280,6 @@ - (void)stop
303280 name: UIApplicationDidFinishLaunchingNotification
304281 object: nil ];
305282
306- [NSNotificationCenter .defaultCenter removeObserver: self
307- name: UIWindowDidBecomeVisibleNotification
308- object: nil ];
309-
310283 [NSNotificationCenter .defaultCenter removeObserver: self
311284 name: UIApplicationDidEnterBackgroundNotification
312285 object: nil ];
0 commit comments