Skip to content

BuildInfo

levching edited this page Apr 15, 2020 · 3 revisions

You can obtain build version and number using the ISN_NSBundle class. It's much better to relay on this values vs unity Application.version - since it pretty much holds what you have set inside the Player Build Settings. And maybe not the same as real build version & number.

See the code snippet below:

SA.iOS.Foundation
...

ISN_NSBuildInfo buildInfo = ISN_NSBundle.BuildInfo;
Debug.Log("AppVersion: " + buildInfo.AppVersion);
Debug.Log("BuildNumber: " + buildInfo.BuildNumber);

App Environment

In case you need to know if your app was downloaded by a real user from App Store, or this version is used by a tester who got your app via Test Flight or in any other way you sent your app to him. You may check the App Environment.

This may be useful, for example, when you add to your testers some "extra gold" so it will be much easier for them to test your app. The code snippet below shows how to check the app environment:

if (ISN_NSBundle.IsRunningInAppStoreEnvironment) {
    Debug.Log("This app was downloaded from an AppStore");
}

About

Foundation

AV Foundation

App Tracking Transparency

Game Kit

Store Kit

UI Kit

Social

Replay Kit

Contacts

AVKit

Photos

App Delegate

User Notifications

MediaPlayer

Core Location

AdSupport

EventKit

CloudKit

Authentication Services

XCode

Knowledge Base

Clone this wiki locally