diff --git a/mParticle-Apple-SDK/Kits/MPKitActivity.m b/mParticle-Apple-SDK/Kits/MPKitActivity.m index a7b82efd..1693865c 100644 --- a/mParticle-Apple-SDK/Kits/MPKitActivity.m +++ b/mParticle-Apple-SDK/Kits/MPKitActivity.m @@ -58,12 +58,6 @@ - (instancetype)init { return self; } -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self - name:mParticleKitDidBecomeActiveNotification - object:nil]; -} - #pragma mark Private accessors - (NSMutableArray *)activityMappings { if (!_activityMappings) { diff --git a/mParticle-Apple-SDK/Kits/MPKitContainer.mm b/mParticle-Apple-SDK/Kits/MPKitContainer.mm index 810ab48a..6aeca6b9 100644 --- a/mParticle-Apple-SDK/Kits/MPKitContainer.mm +++ b/mParticle-Apple-SDK/Kits/MPKitContainer.mm @@ -125,12 +125,6 @@ - (instancetype)init { return self; } -- (void)dealloc { - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; - [notificationCenter removeObserver:self name:UIApplicationDidFinishLaunchingNotification object:nil]; -} - #pragma mark Notification handlers - (void)handleApplicationDidBecomeActive:(NSNotification *)notification { dispatch_async(dispatch_get_main_queue(), ^{ diff --git a/mParticle-Apple-SDK/MPBackendController.mm b/mParticle-Apple-SDK/MPBackendController.mm index e81f885c..b9e395f5 100644 --- a/mParticle-Apple-SDK/MPBackendController.mm +++ b/mParticle-Apple-SDK/MPBackendController.mm @@ -167,19 +167,6 @@ - (instancetype)initWithDelegate:(id)delegate { } - (void)dealloc { - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil]; - [notificationCenter removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil]; - [notificationCenter removeObserver:self name:UIApplicationDidFinishLaunchingNotification object:nil]; - [notificationCenter removeObserver:self name:kMPNetworkPerformanceMeasurementNotification object:nil]; - [notificationCenter removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; - [notificationCenter removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; - [notificationCenter removeObserver:self name:UIApplicationWillResignActiveNotification object:nil]; - -#if TARGET_OS_IOS == 1 - [notificationCenter removeObserver:self name:kMPRemoteNotificationDeviceTokenNotification object:nil]; -#endif - [self endUploadTimer]; } diff --git a/mParticle-Apple-SDK/Utils/MPStateMachine.mm b/mParticle-Apple-SDK/Utils/MPStateMachine.mm index 2bd476e8..55ad7f62 100644 --- a/mParticle-Apple-SDK/Utils/MPStateMachine.mm +++ b/mParticle-Apple-SDK/Utils/MPStateMachine.mm @@ -139,12 +139,6 @@ - (instancetype)init { } - (void)dealloc { - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil]; - [notificationCenter removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil]; - [notificationCenter removeObserver:self name:UIApplicationWillTerminateNotification object:nil]; - [notificationCenter removeObserver:self name:MParticleReachabilityChangedNotification object:nil]; - if (_reachability != nil) { [_reachability stopNotifier]; } diff --git a/mParticle-Apple-SDK/mParticle.m b/mParticle-Apple-SDK/mParticle.m index fc057d29..648f4c08 100644 --- a/mParticle-Apple-SDK/mParticle.m +++ b/mParticle-Apple-SDK/mParticle.m @@ -320,12 +320,6 @@ - (instancetype)init { return self; } -- (void)dealloc { - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; - [notificationCenter removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; -} - #pragma mark Private accessors - (NSMutableDictionary *)configSettings { if (_configSettings) {