mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Possible fix for first boot error
This commit is contained in:
parent
23e5b3c983
commit
f81b7e1337
2 changed files with 8 additions and 10 deletions
|
|
@ -170,7 +170,7 @@
|
|||
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
|
||||
|
||||
UIApplication* app= [UIApplication sharedApplication];
|
||||
|
||||
if( [app respondsToSelector:@selector(registerUserNotificationSettings:)] ){
|
||||
|
|
@ -225,15 +225,8 @@
|
|||
[[LinphoneManager instance] startLibLinphone];
|
||||
}
|
||||
if([LinphoneManager isLcReady]) {
|
||||
|
||||
|
||||
// Only execute one time at application start
|
||||
if(!started) {
|
||||
started = TRUE;
|
||||
[self.window makeKeyAndVisible];
|
||||
[RootViewManager setupWithPortrait:(PhoneMainView*)self.window.rootViewController];
|
||||
[[PhoneMainView instance] startUp];
|
||||
}
|
||||
[self.window makeKeyAndVisible];
|
||||
[[PhoneMainView instance] startUp];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,11 @@ static RootViewManager* rootViewManagerInstance = nil;
|
|||
}
|
||||
|
||||
+ (RootViewManager *)instance {
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
PhoneMainView* portrait = (PhoneMainView*)[(LinphoneAppDelegate*)([UIApplication sharedApplication].delegate) window].rootViewController;
|
||||
rootViewManagerInstance =[[RootViewManager alloc]initWithPortrait:portrait];
|
||||
});
|
||||
if( !rootViewManagerInstance ){
|
||||
@throw [NSException exceptionWithName:@"RootViewManager" reason:@"nil instance" userInfo:nil];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue