add GoogleService-Info.plist into gitignore

This commit is contained in:
Danmei Chen 2019-01-11 18:10:34 +01:00
parent cb38cc3b93
commit 3bc738431f
2 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View file

@ -7,6 +7,7 @@ xcuserdata/
Classes/LinphoneIOSVersion.h
Pods/
Podfile.lock
GoogleService-Info.plist
build
test-reports
WORK

View file

@ -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;