mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-03 19:30:09 +00:00
Add warnings to the console for the last commit
Notify the developer about the issues by logging a warning to the console when the SDK is initialized more than once or startManager is invoked multiple times
This commit is contained in:
parent
d7e17d2f1c
commit
b2a40717c0
@ -212,7 +212,10 @@ bitstadium_info_t bitstadium_library_info __attribute__((section("__TEXT,__bit_h
|
||||
|
||||
- (void)startManager {
|
||||
if (!_validAppIdentifier) return;
|
||||
if (_startManagerIsInvoked) return;
|
||||
if (_startManagerIsInvoked) {
|
||||
NSLog(@"[HockeySDK] Warning: startManager should only be invoked once! This call is ignored.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (![self isSetUpOnMainThread]) return;
|
||||
|
||||
@ -588,7 +591,10 @@ bitstadium_info_t bitstadium_library_info __attribute__((section("__TEXT,__bit_h
|
||||
}
|
||||
|
||||
- (void)initializeModules {
|
||||
if (_managersInitialized) return;
|
||||
if (_managersInitialized) {
|
||||
NSLog(@"[HockeySDK] Warning: The SDK should only be initialized once! This call is ignored.");
|
||||
return;
|
||||
}
|
||||
|
||||
_validAppIdentifier = [self checkValidityOfAppIdentifier:_appIdentifier];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user