forked from organicmaps/organicmaps
Base Crashlytics integration.
Signed-off-by: Viktar Havaka viktor.govako@gmail.com
This commit is contained in:
parent
4f89cd229d
commit
59457a1a16
4 changed files with 53 additions and 38 deletions
3
iphone/Maps/.gitignore
vendored
3
iphone/Maps/.gitignore
vendored
|
@ -1 +1,4 @@
|
|||
Pods
|
||||
app.omaps.debug
|
||||
app.omaps.release
|
||||
app.omaps.production
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
|
||||
#import <UserNotifications/UserNotifications.h>
|
||||
|
||||
#import <Firebase/Firebase.h>
|
||||
|
||||
#import <CoreApi/Framework.h>
|
||||
#import <CoreApi/MWMFrameworkHelper.h>
|
||||
|
||||
|
@ -74,10 +76,18 @@ void InitCrashTrackers() {
|
|||
#ifdef OMIM_PRODUCTION
|
||||
if ([MWMSettings crashReportingDisabled])
|
||||
return;
|
||||
|
||||
NSString *googleConfig = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:googleConfig]) {
|
||||
[FIRApp configure];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConfigCrashTrackers() {
|
||||
#ifdef OMIM_PRODUCTION
|
||||
[[FIRCrashlytics crashlytics] setUserID:[Alohalytics installationId]];
|
||||
#endif
|
||||
}
|
||||
|
||||
void OverrideUserAgent() {
|
||||
|
@ -281,11 +291,24 @@ using namespace osm_auth_ios;
|
|||
}
|
||||
|
||||
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
|
||||
#ifdef OMIM_PRODUCTION
|
||||
auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain
|
||||
code:1
|
||||
userInfo:@{@"Description": @"applicationDidReceiveMemoryWarning"}];
|
||||
[[FIRCrashlytics crashlytics] recordError:err];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
[self.mapViewController onTerminate];
|
||||
|
||||
#ifdef OMIM_PRODUCTION
|
||||
auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain
|
||||
code:2
|
||||
userInfo:@{@"Description": @"applicationWillTerminate"}];
|
||||
[[FIRCrashlytics crashlytics] recordError:err];
|
||||
#endif
|
||||
|
||||
// Global cleanup
|
||||
DeleteFramework();
|
||||
}
|
||||
|
@ -656,6 +679,11 @@ using namespace osm_auth_ios;
|
|||
}
|
||||
|
||||
- (void)onConversionDataRequestFailure:(NSError *)error {
|
||||
#ifdef OMIM_PRODUCTION
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[[FIRCrashlytics crashlytics] recordError:error];
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma mark - CPApplicationDelegate implementation
|
||||
|
|
|
@ -2287,7 +2287,7 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA = {
|
||||
29B97314FDCFA39411CA2CEA /* Maps */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
47AEF83F2231249E00D20538 /* categories_brands.txt */,
|
||||
|
@ -4937,6 +4937,7 @@
|
|||
6741AA311BF340DE002C974C /* Frameworks */,
|
||||
4740184523F5BDE900A93C81 /* Embed Frameworks */,
|
||||
B4C96EE056F4E85FC735BCD2 /* [CP] Embed Pods Frameworks */,
|
||||
6B92E5CF25C090C200304F2D /* Firebase Crashlytics */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -5012,7 +5013,7 @@
|
|||
"en-GB",
|
||||
el,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA;
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* Maps */;
|
||||
productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
|
@ -5254,6 +5255,25 @@
|
|||
shellPath = /bin/sh;
|
||||
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n../../tools/unix/check_cert.sh\n";
|
||||
};
|
||||
6B92E5CF25C090C200304F2D /* Firebase Crashlytics */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)",
|
||||
);
|
||||
name = "Firebase Crashlytics";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "#!/bin/bash\necho \"[Firebase Crashlytics] start\"\n\nLOWERED_CONFIG=`echo $CONFIGURATION | tr [A-Z] [a-z]`\nPLIST_PATH=\"${PROJECT_DIR}/${BUNDLE_IDENTIFIER}/GoogleService-Info.plist\"\nDSYM_PATH=${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}\n\necho \"[Firebase Crashlytics] dsyms: ${DSYM_PATH}\"\necho \"[Firebase Crashlytics] plist: ${PLIST_PATH}\"\n\nif [[ \"$LOWERED_CONFIG\" == *release* ]]; then\n if [ ! -f \"${PLIST_PATH}\" ]; then\n echo \"[Firebase Crashlytics] Google plist not found!\"\n exit 1\n fi\n bash \"${PODS_ROOT}/FirebaseCrashlytics/run -gsp ${PLIST_PATH} -p ios ${DSYM_PATH}\"\n echo \"[Firebase Crashlytics] done\"\nfi\n";
|
||||
};
|
||||
B4C96EE056F4E85FC735BCD2 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CLIENT_ID</key>
|
||||
<string>939321867014-b9p6kkrf7i15uo4o6vfd9hh7lnoikg4f.apps.googleusercontent.com</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>com.googleusercontent.apps.939321867014-b9p6kkrf7i15uo4o6vfd9hh7lnoikg4f</string>
|
||||
<key>ANDROID_CLIENT_ID</key>
|
||||
<string>939321867014-a6hdk1ugg7n6o8k3uvl7lvf2sdak2ki6.apps.googleusercontent.com</string>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyDgAzSdJjRQtcmyw76UJgNSBq3rK7_MzcQ</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>939321867014</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>app.omaps.debug</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>omapsapp</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>omapsapp.appspot.com</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:939321867014:ios:5a529d8137d8760b587c87</string>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Add table
Reference in a new issue