One of my clients has a deal with an OEM. Their app X will be preinstalled on a number of laptops. This app will receive updates from the Windows 10 store. This app X will also available for download in the Windows 10 store to other users. Only users using the preinstalled version should receive a free 3-month trial.
Unfortunately, the OEM is not providing any device IDs, and the users are not getting any unlock codes for their trial. I came up with the following initial "solution":
- Use version 1.0.1.0 for the preinstalled app.
- Upload 1.0.0.0 to the store.
When the app starts and the version is 1.0.1.0, it is identified as a preinstalled version, at which point I can make a server call to send a device ID to the client's server to recognize this device even after app deletions.
I can update the store app without losing any knowledge of preinstalled apps since I can update to any version below 1.0.1.0. This means the preinstalled version will not be overwritten by auto update with the store version (since the installed version number is greater than the store version). However, if a serious bug is detected in the preinstalled version, I cannot update that app or a certain class of users will not receive their free trial. Namely, the users that have not started the app on the device yet before Windows 10 updates the app with the new version (1.0.1.1 for example).
This all sounds unnecessarily complicated, and I hope it is. Can anyone think of an easier way to distinguish between the preinstalled and downloaded version that's foolproof?
Thanks!
As you are already thinking about offering 2 different versions, this one might be a better solution, where you can deploy two times the version
1.0.0.0
.Instead of using the versions to differ between the state, use build symbols. Create two differnt builds, one for your OEM client, and one for store deployment.
For the OEM, where you want to allow the trial, use the following - as an example:
Doing it this way will allow you to maintain the same code base for all clients, but differing between case OEM and case store deployment, without much logic needed.
EDIT #1:
To address the problem of OEM clients updating to non-OEM clients, you can still go with this approach (as long as the app runs at least once as #OEM build):