mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-05 12:42:50 +00:00
Make sure a log message appears in the console if the SDK is not setup on the main thread
This commit is contained in:
@@ -503,12 +503,13 @@
|
||||
#endif /* HOCKEYSDK_FEATURE_UPDATES */
|
||||
|
||||
- (BOOL)isSetUpOnMainThread {
|
||||
NSString *errorString = @"ERROR: This SDK has to be setup on the main thread!";
|
||||
NSString *errorString = @"ERROR: HockeySDK has to be setup on the main thread!";
|
||||
|
||||
if (!NSThread.isMainThread) {
|
||||
if (self.isAppStoreEnvironment) {
|
||||
BITHockeyLog(@"%@", errorString);
|
||||
} else {
|
||||
NSLog(@"%@", errorString);
|
||||
NSAssert(NSThread.isMainThread, errorString);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user