summaryrefslogtreecommitdiff
path: root/external/plyer/platforms/ios/uniqueid.py
diff options
context:
space:
mode:
Diffstat (limited to 'external/plyer/platforms/ios/uniqueid.py')
-rw-r--r--external/plyer/platforms/ios/uniqueid.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/external/plyer/platforms/ios/uniqueid.py b/external/plyer/platforms/ios/uniqueid.py
new file mode 100644
index 0000000..1587f4b
--- /dev/null
+++ b/external/plyer/platforms/ios/uniqueid.py
@@ -0,0 +1,17 @@
+from pyobjus import autoclass
+from pyobjus.dylib_manager import load_framework
+from plyer.facades import UniqueID
+
+load_framework('/System/Library/Frameworks/UIKit.framework')
+UIDevice = autoclass('UIDevice')
+
+
+class iOSUniqueID(UniqueID):
+
+ def _get_uid(self):
+ uuid = UIDevice.currentDevice().identifierForVendor.UUIDString()
+ return uuid.UTF8String()
+
+
+def instance():
+ return iOSUniqueID()