I want to know if it works correctly on iOS App Store apps. Does it return ApplicationInstallMode.Store? I know the docs say yes but I want be sure.
I’m going to answer my own question because I’ve just found out it doesn’t work correctly on iOS. Or perhaps I misunderstood it?
I have some code to present a popup for submitting crash reports but didn’t want it exposed to players in App Store builds. We’ve just seen the popup in an App Store build which means that it does not work how I thought it would, or it’s bugged?
The docs do say that it means “Application installed via online store”, and my app was installed in that way (from App Store).
if(Application.installMode!=ApplicationInstallMode.Store)
{
// Show popup
}
Bug reported #913886 (23 May 17)
A bit more information.
I’ve started tracking Application.installMode and Application.installerName in my analytics. It turns out that the only value for Application.installMode that I’m is seeing is ApplicationInstallMode.Unknown yet for Application.installerName I’m seeing “Apple Store”.
Even more information.
Application.installMode works as expected on Android. I’m seeing values of ApplicationInstallMode.Store and ApplicationInstallMode.DeveloperBuild via analytics.
- Did you end up using Application.installMode on iOS and Android?
- Did you try it with a newer Unity Version?
- Do you know if we can distinguish between installations through Apple Testflight Build and from regular App Store?
- And the same question for Google Play Alpha / Beta tracks vs. regular installation in the production release track.
My current test results on iOS are:
- For Developer Build it returned ApplicationInstallMode.DeveloperBuild.
- For Adhoc Build, it returned ApplicationInstallMode.Adhoc.
- I haven’t tested it in Testflight or App Store yet.
My current test results on Android are:
- For Unity’s ADB installation and APK installation over file system, it returned ApplicationInstallMode.DeveloperBuild.
- I haven’t tested it over Google Play yet.
Not looked at it in ages. Didn’t trust it as didn’t seem reliable. Perhaps it’s better now.
semms not
When I create an apk and install it myself on my device, it says installMode = Store. Basically it always says Store.
I’m on 2019.4.18.
Yeah, we noticed this. Seems ok on iOS now though.
Have just found out that on iOS for TestFlight it returns Store - which is annoying!
Also, we’ve seen some Android devices not returning Store for apps downloaded from the Google store.