Quellcode durchsuchen

1.修改iOS RAUtils,增加Device ID。

Pen Li vor 7 Jahren
Ursprung
Commit
0f4429bb9b
2 geänderte Dateien mit 8 neuen und 0 gelöschten Zeilen
  1. 2 0
      RedAnt ERP Mobile/common/RAUtils.h
  2. 6 0
      RedAnt ERP Mobile/common/RAUtils.m

+ 2 - 0
RedAnt ERP Mobile/common/RAUtils.h

@@ -77,4 +77,6 @@
 
 + (nullable NSString *)md5:(nullable NSString *)str;
 
++ (NSString *)deviceID;
+
 @end

+ 6 - 0
RedAnt ERP Mobile/common/RAUtils.m

@@ -610,6 +610,12 @@
     
 }
 
++ (NSString *)deviceID {
+    UIDevice * dev = [UIDevice currentDevice];
+    NSUUID* uuid =dev.identifierForVendor;
+    return uuid.UUIDString;
+}
+
 //+(NSArray*) string2arr:(NSString*) string separator:(NSString*)separator
 //{
 //    NSArray  *stringArray = [string componentsSeparatedByString:separator];