diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 0f0ff665e..b0b14d8bc 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -239,11 +239,13 @@ #pragma deploymate pop - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { +#ifdef USE_FIREBASE 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]; } +#endif UIApplication *app = [UIApplication sharedApplication]; UIApplicationState state = app.applicationState; diff --git a/Classes/Utils/Log.m b/Classes/Utils/Log.m index f11329fc1..3484bfd08 100644 --- a/Classes/Utils/Log.m +++ b/Classes/Utils/Log.m @@ -26,7 +26,11 @@ #define FILE_SIZE 17 #define DOMAIN_SIZE 3 +#ifdef USE_FIREBASE #define USE_CRASHLYTICS TRUE +#else +#define USE_CRASHLYTICS FALSE +#endif + (NSString *)cacheDirectory { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 9b8c29ed6..797c8893c 100644 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -5638,6 +5638,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", "DEBUG=1", + "USE_FIREBASE=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;