// // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // #import "MainAppContext.h" NS_ASSUME_NONNULL_BEGIN @implementation MainAppContext - (BOOL)isMainApp { return YES; } - (BOOL)isMainAppAndActive { return [UIApplication sharedApplication].applicationState == UIApplicationStateActive; } - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler: (BackgroundTaskExpirationHandler)expirationHandler { return [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:expirationHandler]; } @end NS_ASSUME_NONNULL_END