after making a .apk or .ipa file can you limit the install # on device

Hello Unity,

Basically my question is in the topic. can you limit the number of times someone can run the installation file or limit how many devices it can upload the app to, like a license. I have a feeling this is outside the scope of Unity, but i was hoping someone can point me in the right direction. This app is not going on the market obviously.unity

Thank you

Cheers

When the game is first run, you can create a licence key file based on some hash of the unique ID for that device (using SystemInfo.deviceUniqueIdentifier). You can also register that device with an online server.
Then, on each startup, check the licence key is present and matches the device ID. If the game is copied to another device, or if the keyfile is manipulated/deleted, the startup check will fail.