[release-72-crash-fix] Added memory & terminate logging.

This commit is contained in:
Ilya Grechuhin 2017-04-10 16:04:57 +03:00 committed by Vladimir Byko-Ianko
parent a74d903d6a
commit b42d5b00f0

View file

@ -461,9 +461,30 @@ using namespace osm_auth_ios;
});
}
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
{
#ifdef OMIM_PRODUCTION
auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain
code:1
userInfo:@{
@"Description" : @"applicationDidReceiveMemoryWarning"
}];
[[Crashlytics sharedInstance] recordError:err];
#endif
}
- (void)applicationWillTerminate:(UIApplication *)application
{
[self.mapViewController onTerminate];
#ifdef OMIM_PRODUCTION
auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain
code:2
userInfo:@{
@"Description" : @"applicationWillTerminate"
}];
[[Crashlytics sharedInstance] recordError:err];
#endif
}
- (void)applicationDidEnterBackground:(UIApplication *)application