ironlicensing-dotnet/Platforms/MacCatalyst/MachineIdentifier.cs

31 lines
694 B
C#

using UIKit;
namespace IronLicensing.Client;
public partial class MachineIdentifier
{
private partial List<string> GetMachineComponents()
{
var components = new List<string>();
try
{
// macOS/Catalyst vendor identifier
var vendorId = UIDevice.CurrentDevice.IdentifierForVendor?.ToString();
if (!string.IsNullOrEmpty(vendorId))
{
components.Add(vendorId);
}
components.Add(UIDevice.CurrentDevice.Model);
components.Add(UIDevice.CurrentDevice.SystemName);
}
catch
{
// Fallback
}
return components;
}
}