mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-04 10:30:42 +00:00
Add properties allowing to disable crash reporting or beta updates
This commit is contained in:
parent
4cb93d66ac
commit
90759c7788
@ -152,22 +152,48 @@
|
|||||||
@see configureWithIdentifier:delegate:
|
@see configureWithIdentifier:delegate:
|
||||||
@see configureWithBetaIdentifier:liveIdentifier:delegate:
|
@see configureWithBetaIdentifier:liveIdentifier:delegate:
|
||||||
@see startManager
|
@see startManager
|
||||||
|
@see disableCrashManager
|
||||||
@return The BITCrashManager instance initialized by BITHockeyManager
|
@return The BITCrashManager instance initialized by BITHockeyManager
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, retain, readonly) BITCrashManager *crashManager;
|
@property (nonatomic, retain, readonly) BITCrashManager *crashManager;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Flag the determines wether the Crash Manager should be disabled
|
||||||
|
|
||||||
|
If this flag is enabled, then crash reporting is disabled and no crashes will
|
||||||
|
be detected and send
|
||||||
|
|
||||||
|
*Default*: _NO_
|
||||||
|
@see crashManager
|
||||||
|
*/
|
||||||
|
@property (nonatomic, getter = isCrashManagerDisabled) BOOL disableCrashManager;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reference to the initialized BITUpdateManager module
|
Reference to the initialized BITUpdateManager module
|
||||||
|
|
||||||
@see configureWithIdentifier:delegate:
|
@see configureWithIdentifier:delegate:
|
||||||
@see configureWithBetaIdentifier:liveIdentifier:delegate:
|
@see configureWithBetaIdentifier:liveIdentifier:delegate:
|
||||||
@see startManager
|
@see startManager
|
||||||
|
@see disableUpdateManager
|
||||||
@return The BITCrashManager instance initialized by BITUpdateManager
|
@return The BITCrashManager instance initialized by BITUpdateManager
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, retain, readonly) BITUpdateManager *updateManager;
|
@property (nonatomic, retain, readonly) BITUpdateManager *updateManager;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Flag the determines wether the Update Manager should be disabled
|
||||||
|
|
||||||
|
If this flag is enabled, then checking for updates and submitting beta usage
|
||||||
|
analytics will be turned off!
|
||||||
|
|
||||||
|
*Default*: _NO_
|
||||||
|
@see updateManager
|
||||||
|
*/
|
||||||
|
@property (nonatomic, getter = isUpdateManagerDisabled) BOOL disableUpdateManager;
|
||||||
|
|
||||||
|
|
||||||
///-----------------------------------------------------------------------------
|
///-----------------------------------------------------------------------------
|
||||||
/// @name Environment
|
/// @name Environment
|
||||||
///-----------------------------------------------------------------------------
|
///-----------------------------------------------------------------------------
|
||||||
|
@ -66,6 +66,9 @@
|
|||||||
|
|
||||||
- (id) init {
|
- (id) init {
|
||||||
if ((self = [super init])) {
|
if ((self = [super init])) {
|
||||||
|
_disableCrashManager = NO;
|
||||||
|
_disableUpdateManager = NO;
|
||||||
|
|
||||||
_appStoreEnvironment = NO;
|
_appStoreEnvironment = NO;
|
||||||
_startManagerIsInvoked = NO;
|
_startManagerIsInvoked = NO;
|
||||||
|
|
||||||
@ -166,11 +169,15 @@
|
|||||||
_startManagerIsInvoked = NO;
|
_startManagerIsInvoked = NO;
|
||||||
|
|
||||||
if (_validAppIdentifier) {
|
if (_validAppIdentifier) {
|
||||||
|
if (![self isCrashManagerDisabled]) {
|
||||||
BITHockeyLog(@"Setup CrashManager");
|
BITHockeyLog(@"Setup CrashManager");
|
||||||
_crashManager = [[BITCrashManager alloc] initWithAppIdentifier:_appIdentifier];
|
_crashManager = [[BITCrashManager alloc] initWithAppIdentifier:_appIdentifier];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (![self isUpdateManagerDisabled]) {
|
||||||
BITHockeyLog(@"Setup UpdateManager");
|
BITHockeyLog(@"Setup UpdateManager");
|
||||||
_updateManager = [[BITUpdateManager alloc] initWithAppIdentifier:_appIdentifier isAppStoreEnvironemt:_appStoreEnvironment];
|
_updateManager = [[BITUpdateManager alloc] initWithAppIdentifier:_appIdentifier isAppStoreEnvironemt:_appStoreEnvironment];
|
||||||
|
}
|
||||||
|
|
||||||
// Only if JMC is part of the project
|
// Only if JMC is part of the project
|
||||||
if ([[self class] isJMCPresent]) {
|
if ([[self class] isJMCPresent]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user