Listens to app state change events (didEnterBackground and didBecomeActive, in particular) and allows other components be notified about them using a simpler API.
- AppStateChangeBlock didBackgroundBlock
The block is called when the app has entered background.
- AppStateChangeBlock didForegroundBlock
The block is called when the app has entered foreground.
- id<BlockRunner> blockRunner
BlockRunnerinstance specifying where to run the blocks. The default value is the main dispatch queue runner. Cannot be
nil, as it will reset to the default value.
- - (void) startListening
Starts listening for app state change events. This method is idempotent.
You MUST call
-stopListeningfor this object to be removed.
- - (void) stopListening
Stops listening for app state change events. This method is idempotent.
This method MUST be called to
deallocthis object if you called
Type of a block that is called on an app state change event.