Пример #1
0
    private void CheckUpdate()
    {
        long version         = RemoteSettings.GetLong("update_version", 0);
        long current_version = 0;

        var last_version_update = current_version;

        long.TryParse(Contains.LastVersionUpdate, out last_version_update);

        var is_force_update = RemoteSettings.GetBool("update_skip");

        if (long.TryParse(Version.bundleVersion, out current_version))
        {
            if (version > current_version && version > last_version_update)
            {
                if (MessageManager.InstanceAwake() != null)
                {
                    var message = string.Empty;

                    #if UNITY_ANDROID
                    message = ApplicationLanguage.Text_description_update_android;
                    #elif UNITY_IOS
                    message = ApplicationLanguage.Text_description_update_ios;
                    #endif

                    MessageManager.Instance.ShowForceMessage(message, is_force_update, () =>
                    {
                        MessageManager.Instance.DisableForceHud();
                        ApplicationManager.Instance.OpenUrlStore();
                    }, () => { Contains.LastVersionUpdate = version.ToString(); });
                }
            }
        }
    }
Пример #2
0
 public long GetLong(string key, long defaultValue = default)
 {
     return(RemoteSettings.GetLong(key, defaultValue));
 }