Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test whether app came from store? #20

Open
charlesroddie opened this issue Nov 7, 2019 · 1 comment
Open

Test whether app came from store? #20

charlesroddie opened this issue Nov 7, 2019 · 1 comment

Comments

@charlesroddie
Copy link

How can we know if the app came from the store?

We would like to include logic to test for the latest version if the app came from the store, but if the app is running on a debug build, or is distributed for testing via app center/testflight, we don't want to do the store version check.

@TheSayvior
Copy link

@charlesroddie in visual studio look up conditional compilation symbols, you find it in the project properties under Build, there I use during debug "ENV_TEST" and on production build "ENV_PROD", then you can in your code make sections that will only be compiled based on which build you are using, that way you can ommit the store check with debug builds.

#if ENV_TEST
// Test code.
#elif ENV_PROD
// Production code.
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants