mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-03-10 10:19:04 +00:00
Switch to using new environment detection helper function
This commit is contained in:
@@ -50,8 +50,6 @@ BOOL bit_isPreiOS7Environment(void);
|
||||
BOOL bit_isPreiOS8Environment(void);
|
||||
BOOL bit_isAppStoreReceiptSandbox(void);
|
||||
BOOL bit_hasEmbeddedMobileProvision(void);
|
||||
BOOL bit_isRunningInTestFlightEnvironment(void);
|
||||
BOOL bit_isRunningInAppStoreEnvironment(void);
|
||||
BITEnvironment bit_currentAppEnvironment(void);
|
||||
BOOL bit_isRunningInAppExtension(void);
|
||||
|
||||
|
||||
@@ -288,28 +288,6 @@ BOOL bit_hasEmbeddedMobileProvision(void) {
|
||||
return hasEmbeddedMobileProvision;
|
||||
}
|
||||
|
||||
BOOL bit_isRunningInTestFlightEnvironment(void) {
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
return NO;
|
||||
#else
|
||||
if (bit_isAppStoreReceiptSandbox() && !bit_hasEmbeddedMobileProvision()) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL bit_isRunningInAppStoreEnvironment(void) {
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
return NO;
|
||||
#else
|
||||
if (bit_isAppStoreReceiptSandbox() || bit_hasEmbeddedMobileProvision()) {
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
#endif
|
||||
}
|
||||
|
||||
BITEnvironment bit_currentAppEnvironment(void) {
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
return BITEnvironmentOther;
|
||||
|
||||
@@ -155,8 +155,6 @@ bitstadium_info_t bitstadium_library_info __attribute__((section("__TEXT,__bit_h
|
||||
#if HOCKEYSDK_FEATURE_STORE_UPDATES
|
||||
_enableStoreUpdateManager = NO;
|
||||
#endif
|
||||
_appEnvironment = BITEnvironmentOther;
|
||||
_appStoreEnvironment = NO;
|
||||
_startManagerIsInvoked = NO;
|
||||
_startUpdateManagerIsInvoked = NO;
|
||||
|
||||
@@ -164,18 +162,13 @@ bitstadium_info_t bitstadium_library_info __attribute__((section("__TEXT,__bit_h
|
||||
_installString = bit_appAnonID(NO);
|
||||
_disableInstallTracking = NO;
|
||||
|
||||
#if !TARGET_IPHONE_SIMULATOR
|
||||
_appStoreEnvironment = NO;
|
||||
// check if we are really in an app store environment
|
||||
if (bit_isRunningInAppStoreEnvironment()) {
|
||||
_appEnvironment = BITEnvironmentAppStore;
|
||||
_appEnvironment = bit_currentAppEnvironment();
|
||||
if (_appEnvironment == BITEnvironmentAppStore) {
|
||||
_appStoreEnvironment = YES;
|
||||
} else if (bit_isRunningInTestFlightEnvironment()) {
|
||||
_appEnvironment = BITEnvironmentTestFlight;
|
||||
} else {
|
||||
_appEnvironment = BITEnvironmentOther;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
[self performSelector:@selector(validateStartManagerIsInvoked) withObject:nil afterDelay:0.0f];
|
||||
}
|
||||
return self;
|
||||
|
||||
Reference in New Issue
Block a user