mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 22:58:13 +00:00
set bg mode by default
This commit is contained in:
parent
67c885dab9
commit
581dccc7a8
1 changed files with 7 additions and 0 deletions
|
|
@ -146,6 +146,13 @@
|
|||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge];
|
||||
|
||||
//work around until we can access lpconfig without linphonecore
|
||||
NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"YES", @"start_at_boot_preference",
|
||||
@"YES", @"backgroundmode_preference",
|
||||
nil];
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
|
||||
|
||||
if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
|
||||
&& [UIApplication sharedApplication].applicationState == UIApplicationStateBackground
|
||||
&& (![[NSUserDefaults standardUserDefaults] boolForKey:@"start_at_boot_preference"] ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue