Install Source - Detector (Pro)
A shared copy of your game is often installed from a place you do not ship to. On Android that is an app file installed by hand. On iOS it is a re-signed app or an unknown marketplace. On desktop it is a copy that did not come from Steam, Epic, GOG, or the Microsoft Store.
This detector checks where the running game was installed from, on all three. You pick the stores you trust. Anything else is reported.
This detector needs the Pro version.
Unity 6 and newer only.
Walkthrough: Protecting an Android build, Protecting an iOS build, and Protecting a desktop build.
Do you need to add it?
Most of the time, no. The predefined Anti-Cheat-Monitor prefab already includes the Install Source Detector prefab. That prefab holds the detector and its three monitors.
If you use your own monitor prefab, drag the Install Source Detector prefab onto the monitor in your prefab so it becomes a child.

The detector prefabs in Assets/GUPS/AntiCheat/Resources/Prefabs/Detectors.
The component is PackageSourceDetector (namespace GUPS.AntiCheat.Detector.InstallSource). It uses one monitor per platform:
- AndroidPackageSourceMonitor: which store installed the Android app.
- IOSPackageSourceMonitor: which channel installed the iOS app.
- DesktopPackageSourceMonitor: which store installed the Windows, macOS, or Linux build.
Note
The monitors must be on the same GameObject as the detector. The prefab already sets this up. A platform without its monitor is not checked.
Settings
On the detector
- Is Active (
isActive, bool, default on): Turns the detector on or off. - Threat Rating (
threatRating, uint, default 350): How much one find adds to the threat score of the Anti-Cheat Monitor. It is lower than for a changed app, because a wrong store points to a shared copy, not to active cheating. - On Cheating Detection Event (
OnCheatingDetectionEvent): Your own reactions. Assign a method here.
In the project settings
Open Edit > Project Settings > GuardingPearSoftware > AntiCheat. Each platform has its own tab and its own list:
- Android tab, Android - App Store - Settings
- iOS tab, iOS - App Store - Settings
- Desktop tab, Desktop - App Store - Settings
Every list has the same fields:
- Allow all installation sources: On means every store is allowed and nothing is reported. Off means only the stores you pick are allowed.
- Allow following sources: The stores you trust. An install from any other store is reported.
- Allow custom sources (Android and iOS): A store that is not in the list. Enter its package name on Android, such as
com.android.vendingfor Google Play. Enter the bundle identifier of the marketplace app on iOS, such asio.altstore.AltStore.
Important
On desktop, Allow all installation sources is on by default, so nothing is reported until you turn it off and pick your stores. On Android and iOS, check the list before you ship. In the shipped settings it is off, and only a few stores are picked.
Notes for each platform:
- Android: The stores are listed on the Android monitor page.
- iOS: A normal release allows App Store and TestFlight. Older iOS versions cannot tell every channel apart. The iOS monitor page explains that.
- Desktop: You can pick Steam, Epic Games, GOG, Microsoft Store, and Unknown.
Unknownmeans no single store matched. That is a direct download, itch.io, or a launcher this check does not know. Allow Unknown when you also ship outside the four stores. The Microsoft Store is found on Windows only.
What it reports
When the store is not allowed, the detector sends a PackageSourceDetectionStatus:
public struct PackageSourceDetectionStatus : IPackageSourceDetectionStatus
{
// How likely this find is a false alarm, from 0 to 1.
public float PossibilityOfFalsePositive { get; }
// How much this find adds to the threat score.
public uint ThreatRating { get; }
// Android, IOS, or Desktop.
public EInstallSourcePlatform Platform { get; }
// True when the Android or iOS monitor could not read the store.
public bool MonitorFailedToRetrieveData { get; }
// The name of the store, for example GooglePlayStore, AppStore, or Steam.
public string SourceName { get; }
// The raw name the device gave, for example a package name or a bundle identifier.
public string SourceIdentifier { get; }
}
The false-alarm chance depends on what happened. You cannot change these values:
| Case | Chance of a false alarm |
|---|---|
| Android or iOS, the store is not allowed | 0.01 |
| Android or iOS, the store could not be read | 0.75 |
| Desktop, a known store is not allowed | 0.05 |
Desktop, Unknown is not allowed |
0.25 |
Good to know
- The store is checked once, when the game starts.
- On Android and iOS, a store that could not be read is also reported, with a high false-alarm chance. On desktop, a failed read is not reported.
- The desktop check is weaker than on Android or iOS. It looks at the install on the player's computer, and a copied folder often ends up as
Unknown. PossibleCheatingDetectedstays true after the first find.- A find adds its Threat Rating to the threat score. A higher false-alarm chance makes it add less. The predefined monitor prefab has no punisher, so a find only raises the score until you react yourself or add a punisher.
Platforms and requirements
- Android: Android 4.4 (API level 19) or newer. The plugin
com.gups.anticheatships with the package. - iOS: iOS 13.0 or newer. The plugin
com.gups.anticheatships with the package. - Desktop: Windows, macOS, and Linux standalone builds. No extra plugin is needed.
Note
Each platform skips the Unity Editor and development builds. Turn on Verify development builds on the tab of that platform to check there too. The desktop check still does nothing inside the Editor, because the project folder is not a store install.
React to a find
In the Inspector. Add a method to On Cheating Detection Event. It runs when the store is not allowed.
In code. Ask the detector:
var detector = AntiCheatMonitor.Instance.GetDetector<PackageSourceDetector>();
if (detector != null && detector.PossibleCheatingDetected)
{
// The game was installed from a store you do not allow.
}
Or listen, so your code runs at the moment of the find:
using System;
using GUPS.AntiCheat;
using GUPS.AntiCheat.Core.Detector;
using GUPS.AntiCheat.Detector.InstallSource;
using UnityEngine;
public class InstallSourceLogger : MonoBehaviour, IObserver<IDetectorStatus>
{
private void Start()
{
var detector = AntiCheatMonitor.Instance.GetDetector<PackageSourceDetector>();
detector.Subscribe(this);
}
public void OnNext(IDetectorStatus status)
{
if (status is PackageSourceDetectionStatus source)
{
Debug.LogWarning($"Store not allowed on {source.Platform}: {source.SourceName} ({source.SourceIdentifier})");
}
}
public void OnError(Exception error) { }
public void OnCompleted() { }
}
Back to the Detector overview.