mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add comments to environment detection
This commit is contained in:
@@ -292,15 +292,21 @@ BITEnvironment bit_currentAppEnvironment(void) {
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
return BITEnvironmentOther;
|
||||
#else
|
||||
|
||||
// MobilePovision profiles are a clear indicator for Ad-Hoc distribution
|
||||
if (bit_hasEmbeddedMobileProvision()) {
|
||||
return BITEnvironmentOther;
|
||||
}
|
||||
|
||||
// TestFlight is only supported from iOS 8 onwards, so at this point we have to be in the AppStore
|
||||
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {
|
||||
return BITEnvironmentAppStore;
|
||||
}
|
||||
|
||||
if (bit_isAppStoreReceiptSandbox()) {
|
||||
return BITEnvironmentTestFlight;
|
||||
}
|
||||
|
||||
return BITEnvironmentAppStore;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user