mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-28 23:09:42 +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:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user