mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-20 03:56:29 +02:00
Initial version.
This commit is contained in:
parent
e4fb48f6ab
commit
10dbeb5a90
737 changed files with 61885 additions and 0 deletions
29
TINK/TINK.iOS/Device/Device.cs
Normal file
29
TINK/TINK.iOS/Device/Device.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using TINK.Model.Device;
|
||||
|
||||
[assembly: Xamarin.Forms.Dependency(typeof(TINK.iOS.Device.Device))]
|
||||
namespace TINK.iOS.Device
|
||||
{
|
||||
public class Device : IDevice
|
||||
{
|
||||
[DllImport("/System/Library/Frameworks/IOKit.framework/IOKit")]
|
||||
private static extern uint IOServiceGetMatchingService(uint masterPort, IntPtr matching);
|
||||
|
||||
[DllImport("/System/Library/Frameworks/IOKit.framework/IOKit")]
|
||||
private static extern IntPtr IOServiceMatching(string s);
|
||||
|
||||
[DllImport("/System/Library/Frameworks/IOKit.framework/IOKit")]
|
||||
private static extern IntPtr IORegistryEntryCreateCFProperty(uint entry, IntPtr key, IntPtr allocator, uint options);
|
||||
|
||||
[DllImport("/System/Library/Frameworks/IOKit.framework/IOKit")]
|
||||
private static extern int IOObjectRelease(uint o);
|
||||
|
||||
/// <summary> Gets unitque device identifier. </summary>
|
||||
/// <returns>Gets the identifies specifying device.</returns>
|
||||
public string GetIdentifier()
|
||||
{
|
||||
return UIKit.UIDevice.CurrentDevice?.IdentifierForVendor?.AsString() ?? string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue