BreachDetector icon indicating copy to clipboard operation
BreachDetector copied to clipboard

[iOS] in TestFlight IsInstalledFromStore() returns false

Open gsgou opened this issue 5 years ago • 4 comments

In TestFlight IsInstalledFromStore() returns false. In Android closed track where i could test returns true (or null) as expected.

To be more precise i use following code snippet:

bool isRootOrJailbreak = CrossBreachDetector.Current.IsRooted() == true;
bool notFromStore = CrossBreachDetector.Current.InstalledFromStore() == false;
bool isVirtualDevice = CrossBreachDetector.Current.IsRunningOnVirtualDevice() == true;
if (isRootOrJailbreak || notFromStore || isVirtualDevice)
{
}

both two iOS testers i have confirm the phones are not jailbroken.

gsgou avatar Sep 09 '20 10:09 gsgou

isrooted returns always true from any android emulator if Google Play Store is unchecked in Emulator Properties .. is that normal ? image

mina5500 avatar Sep 29 '20 09:09 mina5500

Hi @mina5500, that is correct. All emulators are rooted 🙂

nmilcoff avatar Sep 29 '20 12:09 nmilcoff

once i check on Google Play Store in Emulator Properties in previous image ... it shows isrooted() false

Hi @mina5500, that is correct. All emulators are rooted 🙂

@nmilcoff

mina5500 avatar Sep 29 '20 12:09 mina5500

What is a 'good practice' regarding TestFlight? We use BreachDetector's IsInstalledFromStore also in apps which are distributed for testing via Apple's official test app "TestFlight". Would you flag such TestFlight-builds in order to not annoy any test users by showing them security warnings?

Interesting article on Stackoverflow: https://stackoverflow.com/questions/26081543/how-to-tell-at-runtime-whether-an-ios-app-is-running-through-a-testflight-beta-i

Update: I added following method to my code in order to exclude TestFlight builds from tracking as 'insecure devices':

public bool IsTestFlightBuild()
{
    var appStoreReceiptUrl = NSBundle.MainBundle.AppStoreReceiptUrl;
    return appStoreReceiptUrl?.LastPathComponent.Contains("sandboxReceipt") == true;
}

thomasgalliker avatar Jul 21 '22 12:07 thomasgalliker