mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
use new crashlytic sdk
This commit is contained in:
parent
d680e7a2e4
commit
9acc53daf0
4 changed files with 16 additions and 23 deletions
|
|
@ -31,7 +31,7 @@
|
|||
#include "LinphoneManager.h"
|
||||
#include "linphone/linphonecore.h"
|
||||
|
||||
#ifdef USE_CRASHLYTHICSS
|
||||
#ifdef USE_CRASHLYTHICS
|
||||
#include "FIRApp.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -252,7 +252,7 @@
|
|||
#pragma deploymate pop
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
#ifdef USE_CRASHLYTHICSS
|
||||
#ifdef USE_CRASHLYTHICS
|
||||
[FIRApp configure];
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
#import <asl.h>
|
||||
#import <os/log.h>
|
||||
|
||||
#ifdef USE_CRASHLYTHICSS
|
||||
#import <Crashlytics/Crashlytics.h>
|
||||
#ifdef USE_CRASHLYTHICS
|
||||
@import FirebaseCrashlytics;
|
||||
#endif
|
||||
|
||||
@implementation Log
|
||||
|
|
@ -106,20 +106,17 @@ void linphone_iphone_log_handler(const char *domain, OrtpLogLevel lev, const cha
|
|||
for (int i = 0; i < myWords.count; i++) {
|
||||
NSString *tab = i > 0 ? @"\t" : @"";
|
||||
if (((NSString *)myWords[i]).length > 0) {
|
||||
#ifdef USE_CRASHLYTHICSS
|
||||
CLSNSLog(@"[%@] %@%@", lvl, tab, (NSString *)myWords[i]);
|
||||
#else
|
||||
NSLog(@"[%@] %@%@", lvl, tab, (NSString *)myWords[i]);
|
||||
#ifdef USE_CRASHLYTHICS
|
||||
[[FIRCrashlytics crashlytics] logWithFormat:@"[%@] %@%@", lvl, tab, (NSString *)myWords[i]];
|
||||
#endif
|
||||
|
||||
NSLog(@"[%@] %@%@", lvl, tab, (NSString *)myWords[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
#ifdef USE_CRASHLYTHICSS
|
||||
CLSNSLog(@"[%@] %@", lvl, [formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"]);
|
||||
#else
|
||||
NSLog(@"[%@] %@", lvl, [formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"]);
|
||||
#ifdef USE_CRASHLYTHICS
|
||||
[[FIRCrashlytics crashlytics] logWithFormat:@"[%@] %@", lvl, [formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"]];
|
||||
#endif
|
||||
NSLog(@"[%@] %@", lvl, [formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
12
Podfile
12
Podfile
|
|
@ -25,14 +25,8 @@ end
|
|||
|
||||
def crashlythics
|
||||
if not ENV['USE_CRASHLYTHICS'].nil?
|
||||
# Add the Firebase pod for Google Analytics
|
||||
pod 'Firebase/Analytics'
|
||||
pod 'Crashlytics', '~> 3.4.1'
|
||||
|
||||
# Add the pods for any other Firebase products you want to use in your app
|
||||
# For example, to use Firebase Authentication and Cloud Firestore
|
||||
pod 'Firebase/Auth'
|
||||
pod 'Firebase/Firestore'
|
||||
pod 'Firebase/Crashlytics'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -96,9 +90,9 @@ post_install do |installer|
|
|||
else
|
||||
# activate crashlythics
|
||||
if config.name == "Debug" then
|
||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) DEBUG=1 USE_CRASHLYTHICSS=1'
|
||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) DEBUG=1 USE_CRASHLYTHICS=1'
|
||||
else
|
||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) USE_CRASHLYTHICSS=1'
|
||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) USE_CRASHLYTHICS=1'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -4005,6 +4005,8 @@
|
|||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/linphone.xcarchive/dSYMs/linphone.app.dSYM/Contents/Resources/DWARF/linphone",
|
||||
"$(SRCROOT)/linphone-Info.plist",
|
||||
);
|
||||
outputFileListPaths = (
|
||||
);
|
||||
|
|
@ -4012,7 +4014,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if USE_CRASHLYTHICS; then\n ${PODS_ROOT}/Fabric/run\nfi\n";
|
||||
shellScript = "val=`expr \"$GCC_PREPROCESSOR_DEFINITIONS\" : \".*USE_CRASHLYTHICS=\\([0-9]*\\)\"`\nif [ $val = 1 ]; then\n ${PODS_ROOT}/FirebaseCrashlytics/run\nfi\n\n\n";
|
||||
};
|
||||
63DCC71D1A07B08E00916627 /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue