Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[iOS] in TestFlight IsInstalledFromStore() returns false #9

Open
gsgou opened this issue Sep 9, 2020 · 4 comments
Open

[iOS] in TestFlight IsInstalledFromStore() returns false #9

gsgou opened this issue Sep 9, 2020 · 4 comments

Comments

@gsgou
Copy link

gsgou commented Sep 9, 2020

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.

@mina5500
Copy link

mina5500 commented Sep 29, 2020

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

@nmilcoff
Copy link
Owner

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

@mina5500
Copy link

mina5500 commented Sep 29, 2020

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

@thomasgalliker
Copy link

thomasgalliker commented Jul 21, 2022

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants