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