Add comments to environment detection

This commit is contained in:
Lukas Spieß 2015-11-10 15:52:33 +01:00
parent 9d0491d51c
commit 5d81bc60d5

View File

@ -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
}