mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Add comments to environment detection
This commit is contained in:
@@ -292,15 +292,21 @@ BITEnvironment bit_currentAppEnvironment(void) {
|
|||||||
#if TARGET_IPHONE_SIMULATOR
|
#if TARGET_IPHONE_SIMULATOR
|
||||||
return BITEnvironmentOther;
|
return BITEnvironmentOther;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
// MobilePovision profiles are a clear indicator for Ad-Hoc distribution
|
||||||
if (bit_hasEmbeddedMobileProvision()) {
|
if (bit_hasEmbeddedMobileProvision()) {
|
||||||
return BITEnvironmentOther;
|
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) {
|
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {
|
||||||
return BITEnvironmentAppStore;
|
return BITEnvironmentAppStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bit_isAppStoreReceiptSandbox()) {
|
if (bit_isAppStoreReceiptSandbox()) {
|
||||||
return BITEnvironmentTestFlight;
|
return BITEnvironmentTestFlight;
|
||||||
}
|
}
|
||||||
|
|
||||||
return BITEnvironmentAppStore;
|
return BITEnvironmentAppStore;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user