diff --git a/.gitignore b/.gitignore index 3e9b9e407..5286f4739 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ xcuserdata/ Classes/LinphoneIOSVersion.h Pods/ Podfile.lock +GoogleService-Info.plist build test-reports WORK diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 3abfa89b2..0f0ff665e 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -239,7 +239,12 @@ #pragma deploymate pop - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [FIRApp configure]; + NSString *pathForFile=[[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"GoogleService-Info.plist"]; + if ([[NSFileManager defaultManager] fileExistsAtPath:pathForFile]){ + // If GoogleService-Info.plist doesn't exist, not call this function avoiding a crash. + [FIRApp configure]; + } + UIApplication *app = [UIApplication sharedApplication]; UIApplicationState state = app.applicationState;