Created
March 24, 2014 04:41
-
-
Save tolmasky/9734274 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Runtime.InteropServices; | |
namespace PlaygroundTheory | |
{ | |
public static class App | |
{ | |
#if UNITY_IPHONE && !UNITY_EDITOR | |
[DllImport ("__Internal")] | |
private static extern string PTAppGetMainBundleIdentifier(); | |
public static Func<string> GetIdentifier = _.Once(() => PTAppGetMainBundleIdentifier()); | |
[DllImport ("__Internal")] | |
private static extern string PTAppGetMainBundleVersion(); | |
public static Func<string> GetVersion = _.Once(() => PTAppGetMainBundleVersion()); | |
[DllImport ("__Internal")] | |
private static extern string PTAppGetMainBundleShortVersionString(); | |
public static Func<string> GetShortVersionString = _.Once(() => PTAppGetMainBundleShortVersionString()); | |
#elif UNITY_ANDROID && !UNITY_EDITOR | |
public static Func<string> GetIdentifier = _.Once(() => "com.playgroundtheory.bonsaislice"); | |
public static Func<string> GetVersion = _.Once(() => "1.0"); | |
public static Func<string> GetShortVersionString = _.Once(() => "1.0"); | |
#else | |
public static Func<string> GetIdentifier = _.Once(() => "com.playgroundtheory.bonsaislice"); | |
public static Func<string> GetVersion = _.Once(() => "1.0"); | |
public static Func<string> GetShortVersionString = _.Once(() => "1.0"); | |
#endif | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment