@@ -72,23 +72,20 @@ - (void)start
7272 // ending the cached session.
7373 [self endCachedSession ];
7474
75- [self .notificationCenter
76- addObserver: self
77- selector: @selector (didBecomeActive )
78- name: SentryNSNotificationCenterWrapper.didBecomeActiveNotificationName];
75+ [self .notificationCenter addObserver: self
76+ selector: @selector (didBecomeActive )
77+ name: SentryDidBecomeActiveNotification];
7978
8079 [self .notificationCenter addObserver: self
8180 selector: @selector (didBecomeActive )
8281 name: SentryHybridSdkDidBecomeActiveNotificationName];
83- [self .notificationCenter
84- addObserver: self
85- selector: @selector (willResignActive )
86- name: SentryNSNotificationCenterWrapper.willResignActiveNotificationName];
82+ [self .notificationCenter addObserver: self
83+ selector: @selector (willResignActive )
84+ name: SentryWillResignActiveNotification];
8785
88- [self .notificationCenter
89- addObserver: self
90- selector: @selector (willTerminate )
91- name: SentryNSNotificationCenterWrapper.willTerminateNotificationName];
86+ [self .notificationCenter addObserver: self
87+ selector: @selector (willTerminate )
88+ name: SentryWillTerminateNotification];
9289
9390 // Edge case: When starting the SDK after the app did become active, we need to call
9491 // didBecomeActive manually to start the session. This is the case when
@@ -117,17 +114,11 @@ - (void)removeObservers
117114#if SENTRY_HAS_UIKIT || SENTRY_TARGET_MACOS_HAS_UI
118115 // Remove the observers with the most specific detail possible, see
119116 // https://developer.apple.com/documentation/foundation/nsnotificationcenter/1413994-removeobserver
120- [self .notificationCenter
121- removeObserver: self
122- name: SentryNSNotificationCenterWrapper.didBecomeActiveNotificationName];
117+ [self .notificationCenter removeObserver: self name: SentryDidBecomeActiveNotification];
123118 [self .notificationCenter removeObserver: self
124119 name: SentryHybridSdkDidBecomeActiveNotificationName];
125- [self .notificationCenter
126- removeObserver: self
127- name: SentryNSNotificationCenterWrapper.willResignActiveNotificationName];
128- [self .notificationCenter
129- removeObserver: self
130- name: SentryNSNotificationCenterWrapper.willTerminateNotificationName];
120+ [self .notificationCenter removeObserver: self name: SentryWillResignActiveNotification];
121+ [self .notificationCenter removeObserver: self name: SentryWillTerminateNotification];
131122#endif
132123}
133124
0 commit comments