Table of Contents

Class AppSourceValidator

Namespace
CodeStage.AntiCheat.Genuine
Assembly
Build.dll

Cross-platform tool to figure out which store the app was installed from, on Android and iOS. This is the single entry point for installation source checks; the detailed per-platform sources are available through TryGetAndroidSource(out AppInstallationSource) and TryGetAppleSource(out AppleAppInstallationSource).

public static class AppSourceValidator
Inheritance
object
AppSourceValidator

Remarks

Handy when you ship a single binary and need to branch on the store the app was installed from (for example, to pick which In-App Purchase SDK to activate). On iOS the resolution runs asynchronously at launch because it relies on async StoreKit and MarketplaceKit APIs, so a very early call may report Unknown; use IsResolved to check readiness, or query a bit later in the app lifecycle.

Properties

IsResolved

True when the installation source is ready to read. Always true on platforms other than iOS; on iOS it reflects the asynchronous launch-time resolution.

public static bool IsResolved { get; }

Property Value

bool

Methods

GetAppSource()

Gets a normalized, cross-platform snapshot of the app installation source.

public static AppSourceInfo GetAppSource()

Returns

AppSourceInfo

An AppSourceInfo for the current platform; never null.

IsInstalledFromEpicGamesStore()

Checks if app was installed from the Epic Games Store, on either Android or iOS.

public static bool IsInstalledFromEpicGamesStore()

Returns

bool

True if app was installed from the Epic Games Store, false otherwise or if it couldn't be determined.

IsInstalledFromOfficialStore()

Checks if app was installed from the platform's first-party store (Google Play / App Store).

public static bool IsInstalledFromOfficialStore()

Returns

bool

True if installed from the official store, false otherwise or if it couldn't be determined.

TryGetAndroidSource(out AppInstallationSource)

Gets the detailed Android-specific installation source (the installer package name and detected store).

public static bool TryGetAndroidSource(out AppInstallationSource source)

Parameters

source AppInstallationSource

The Android installation source when running on an Android device; otherwise null.

Returns

bool

True when running on an Android device and the source was obtained; false otherwise.

TryGetAppleSource(out AppleAppInstallationSource)

Gets the detailed Apple-specific installation source (iOS / iPadOS), including the signing Environment and the alternative marketplace bundle id.

public static bool TryGetAppleSource(out AppleAppInstallationSource source)

Parameters

source AppleAppInstallationSource

The Apple installation source when running on an iOS device; otherwise null.

Returns

bool

True when running on an iOS device and the source was obtained; false otherwise. A true result only means the call ran on iOS, not that the asynchronous resolution finished — check IsResolved (or Unknown) when you need a fully resolved value.