sharee.bike-App/Meinkonrad/TINK.iOS/Device/AppInfo.cs
Anja Müller-Meißner 0468955d49 Version 3.0.338
2022-09-08 09:55:14 +02:00

47 lines
No EOL
1.3 KiB
C#

using System;
using Foundation;
using TINK.iOS.Device;
using TINK.Model.Device;
using Xamarin.Forms;
[assembly: Dependency(typeof(AppInfo))]
namespace TINK.iOS.Device
{
/// <summary> Holds information about the TINK- app. </summary>
public class AppInfo : IAppInfo
{
/// <summary> Holds the the version of the app.</summary>
private static Version m_oVersion = null;
/// <summary> Constructs a app info object. </summary>
public AppInfo()
{
}
/// <summary> Constructs a app info object for initialization. </summary>
/// <param name="p_strVersionText"> Version to initializ object with.</param>
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;
}
/// <summary> Get the version of the app. </summary>
public Version Version => m_oVersion ?? new Version(0, 9);
/// <summary> Gets the URL to the app store. </summary>
/// <remarks> TINK Url was @"http://itunes.apple.com/de/app/tink-konstanz/id1181519270?mt=8"</remarks>
/// <value>The store URL.</value>
public string StoreUrl => $"https://itunes.apple.com/de/app/apple-store/{NSBundle.MainBundle.BundleIdentifier}?mt=8";
}
}