using System; using Foundation; using TINK.iOS.Device; using TINK.Model.Device; using Xamarin.Forms; [assembly: Dependency(typeof(AppInfo))] namespace TINK.iOS.Device { /// Holds information about the TINK- app. public class AppInfo : IAppInfo { /// Holds the the version of the app. private static Version m_oVersion = null; /// Constructs a app info object. public AppInfo() { } /// Constructs a app info object for initialization. /// Version to initializ object with. internal AppInfo(string p_strVersionText) { if (m_oVersion != null) { // Set version only once. return; } if (!Version.TryParse(p_strVersionText, out Version l_oVersion)) { m_oVersion = new Version(0, 8); } m_oVersion = l_oVersion; } /// Get the version of the app. public Version Version => m_oVersion ?? new Version(0, 9); /// Gets the URL to the app store. /// TINK Url was @"http://itunes.apple.com/de/app/tink-konstanz/id1181519270?mt=8" /// The store URL. public string StoreUrl => $"https://itunes.apple.com/de/app/apple-store/{NSBundle.MainBundle.BundleIdentifier}?mt=8"; } }