                                    name: UIApplicationDidBecomeActiveNotification,
                                    object: nil)
   }
-  
 }

    NSNotificationCenter.defaultCenter().removeObserver(self)
  }

  @objc private func applicationWillResignActiveNotification(notification: NSNotification) {
    willEnterBackgroundHandler?()
  }

/// UIApplicationDidBecomeActiveNotification
public final class ApplicationStateNotificationsManager: NSObject {

  // MARK: - Public state
  public var willEnterBackgroundHandler: (Void -> Void)?
  public var didEnterForegroundHandler: (Void -> Void)?

  // MARK: - Public methods
  public override init() {
    super.init()
    subscribeAppStateNotifications()
