Entitlement Check for Store Apps
Apps being sold in the Meta Horizon Store that wish to pass
VRC.Quest.Security.1, or wish to implement anti-piracy measures, can perform a platform-level check to verify the user purchased or obtained your app legitimately. This check is called the entitlement check. You should make the entitlement check within 10 seconds of the user launching your app.
The entitlement check does not require the user to be connected to the Internet. Also, you must handle a failed entitlement check in your app code. A failed entitlement check won’t result in any action on its own. For example, if the check fails, you could show the user an error message and quit the app, or go into a limited demo mode.
Perform the Entitlement Check
To check the entitlement with Unreal Engine (UE):
Next in Unreal Editor, open the Game Instance Blueprint created from step 1 and add the Entitlement Get Is Viewer Entitled node right after starting the message pump.
You can perform additional user verification if you want to verify the identity of the user to your back-end server.
User Verification provides a cryptographic nonce you can pass to verify that the user’s identity. This method does not replace the entitlement check. For more information on how to verify the user, see
User Verification.
Enable Developer Mode
This only needs to be done once per device.
Note: To set up an Link PC-VR device for development, see the
PC SDK documentation.
You may need to restart your headset after doing these steps. Once done, there will be a new option in your headset library called “Unknown Sources”.
Test Entitlement Check
In Config/DefaultEngine.ini, replace the App ID with a random string of numbers.
Attempt entitlement check in editor, or build as APK and test in headset.
The entitlement check should fail.
How can I do in-editor tests of app features that require the user to pass entitlement checks?
You can use
Meta XR Simulator to test and debug apps. To setup a test user in the Unity project, go to Oculus Platform Settings and set “Use Standalone Platform” to true and provide the credentials of a test user with entitlements to the app. After that, running the game in Meta XR Simulator, the entitlement checks and other platform calls should work fine.
What are the possible reasons that cause some users to fail the entitlement check?
- Only test users from the tested app’s organization pass entitlement checks: Test users associated with a different organization than the app’s organization may not have the necessary entitlements to access the app, leading to failed checks.
- Pushing a New Version of the App: When a new version of an app is pushed, it may affect the entitlements. It is crucial to ensure that all users are in the correct channels and that the new version has a higher version number, to cause users to re-trigger the update process correctly for entitlement verification.
- Need to Push APK to a Channel to Create Initial Package Name -> App ID Mapping: For a new app, the initial mapping between the package name and the app ID is established when the APK is first pushed to a channel. If this step is not completed, the entitlement checks will fail because the system lacks the necessary mapping to verify the entitlements. For guidance on locating the package name, please refer to the subsequent question.
- App ID/Package Name Mismatch: Once an app ID has been associated with a package name through the above steps, if there is a mismatch between the reported app ID and package name of the app making an entitlement check, and the system-recorded package name for that app ID, the system cannot correctly identify and authenticate the entitlements associated with the app. Please make sure the app ID used to check entitlement matches the package name in the app manifest. For guidance on locating the package name, please refer to the subsequent question.
- Need for Assigning Users/Test Users to the correct Channels: To access specific apps, users or test users need to be assigned to the correct channels. This ensures that they are entitled to use the app and can access its features and content.
How to find Package Name of an App in the Meta Quest Developer Dashboard?
Select your application.
In the left-side navigation, select Distribution > Builds.
On the Builds page, in the Build column, click the hyperlink of the build version you want to view.
On the Builds > Version ## page, under Details tab, you can find the Package Name.