浏览代码

add new func HC

marinofaggiana 6 年之前
父节点
当前提交
e39d180c8f
共有 2 个文件被更改,包括 15 次插入0 次删除
  1. 3 0
      iOSClient/Utility/CCUtility.h
  2. 12 0
      iOSClient/Utility/CCUtility.m

+ 3 - 0
iOSClient/Utility/CCUtility.h

@@ -156,6 +156,9 @@
 + (void)setPassword:(NSString *)account password:(NSString *)password;
 + (void)setPassword:(NSString *)account password:(NSString *)password;
 + (NSString *)getPassword:(NSString *)account;
 + (NSString *)getPassword:(NSString *)account;
 
 
++ (void)setHCBusinessType:(NSString *)account professions:(NSString *)professions;
++ (NSString *)getHCBusinessType:(NSString *)account;
+
 // ===== Varius =====
 // ===== Varius =====
 
 
 + (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL;
 + (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL;

+ 12 - 0
iOSClient/Utility/CCUtility.m

@@ -591,6 +591,18 @@
     return [UICKeyChainStore stringForKey:key service:k_serviceShareKeyChain];
     return [UICKeyChainStore stringForKey:key service:k_serviceShareKeyChain];
 }
 }
 
 
++ (void)setHCBusinessType:(NSString *)account professions:(NSString *)professions
+{
+    NSString *key = [@"businessType" stringByAppendingString:account];
+    [UICKeyChainStore setString:professions forKey:key service:k_serviceShareKeyChain];
+}
+
++ (NSString *)getHCBusinessType:(NSString *)account
+{
+    NSString *key = [@"businessType" stringByAppendingString:account];
+    return [UICKeyChainStore stringForKey:key service:k_serviceShareKeyChain];
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Various =====
 #pragma mark ===== Various =====
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------