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