feat:引入人脸识别sdk
This commit is contained in:
1 parent
ce16eaf82e
commit
158d012eff
331 files changed
+13539
No files matched your search
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// Code.h
|
||||
// deviceiOS
|
||||
//
|
||||
// Created by Lingxuan on 2022/7/26.
|
||||
// Copyright © 2022 security.net. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef Code_h
|
||||
#define Code_h
|
||||
|
||||
#define SC_CODE_BASE 10000
|
||||
|
||||
/**
|
||||
* 成功,无错误发生
|
||||
*/
|
||||
#define SC_SUCCESS (SC_CODE_BASE)
|
||||
|
||||
/**
|
||||
* SDK未调用初始化
|
||||
*/
|
||||
#define SC_NOT_INIT (SC_CODE_BASE + 1)
|
||||
|
||||
/**
|
||||
* SDK需要的Android基础权限未完全授权
|
||||
*/
|
||||
#define SC_NOT_PERMISSION (SC_CODE_BASE + 2)
|
||||
|
||||
/**
|
||||
* 未知错误
|
||||
*/
|
||||
#define SC_UNKNOWN_ERROR (SC_CODE_BASE + 3)
|
||||
|
||||
/**
|
||||
* 网络错误
|
||||
*/
|
||||
#define SC_NETWORK_ERROR (SC_CODE_BASE + 4)
|
||||
|
||||
/**
|
||||
* 网络错误,返回内容为空串
|
||||
*/
|
||||
#define SC_NETWORK_ERROR_EMPTY (SC_CODE_BASE + 5)
|
||||
|
||||
/**
|
||||
* 网络返回的格式非法
|
||||
*/
|
||||
#define SC_NETWORK_ERROR_INVALID (SC_CODE_BASE + 6)
|
||||
|
||||
/**
|
||||
* 服务端配置解析失败
|
||||
*/
|
||||
#define SC_PARSE_SRV_CFG_ERROR (SC_CODE_BASE + 7)
|
||||
|
||||
/**
|
||||
* 内部初始化未完成
|
||||
*/
|
||||
#define SC_BUSY (SC_CODE_BASE + 8)
|
||||
|
||||
/**
|
||||
* 用户传进来的appkey是空的
|
||||
*/
|
||||
#define SC_APPKEY_EMPTY (SC_CODE_BASE + 9)
|
||||
|
||||
/**
|
||||
* 参数错误
|
||||
*/
|
||||
#define SC_PARAMS_ERROR (SC_CODE_BASE + 10)
|
||||
|
||||
#endif /* Code_h */
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// OutConst.h
|
||||
// deviceiOS
|
||||
//
|
||||
// Created by Xishui Xu on 2025/2/13.
|
||||
// Copyright © 2025 security.net. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef OutConst_h
|
||||
#define OutConst_h
|
||||
|
||||
enum DataType {
|
||||
COLLECT_ALL = 0,
|
||||
|
||||
COLLECT_NO_UNIQUE_DEVICE_DATA = 0x1,
|
||||
COLLECT_NO_EXTRA_DEVICE_DATA = 0x8,
|
||||
|
||||
COLLECT_NO_ALL = (COLLECT_NO_UNIQUE_DEVICE_DATA |
|
||||
COLLECT_NO_EXTRA_DEVICE_DATA)
|
||||
};
|
||||
|
||||
enum DataSwitch {
|
||||
INIT_COLLECT_DATA,
|
||||
TOKEN_COLLECT_DATA
|
||||
};
|
||||
|
||||
enum LS {
|
||||
THREAD_STACK_START = 0x76213030,
|
||||
THREAD_STACK_END = 0x96521302
|
||||
};
|
||||
|
||||
#endif /* OutConst_h */
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// SecuritySession.h
|
||||
// deviceiOS
|
||||
//
|
||||
// Created by Lingxuan on 2023/6/27.
|
||||
// Copyright © 2023 security.net. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef FaceGuardSession_h
|
||||
#define FaceGuardSession_h
|
||||
|
||||
/**
|
||||
* 设备指纹deviceToken
|
||||
*/
|
||||
|
||||
@interface FaceGuardSession : NSObject
|
||||
|
||||
/**
|
||||
* 获取Session操作的结果
|
||||
*/
|
||||
@property(atomic) int code;
|
||||
|
||||
/**
|
||||
* 包含Session结果的字符串
|
||||
*/
|
||||
@property(copy, atomic) NSString *session;
|
||||
|
||||
@end
|
||||
|
||||
@interface FaceGuardToken : NSObject
|
||||
|
||||
/**
|
||||
* 获取Session操作的结果
|
||||
*/
|
||||
@property(atomic) int code;
|
||||
|
||||
/**
|
||||
* 包含token结果的字符串
|
||||
*/
|
||||
@property(copy, atomic) NSString *token;
|
||||
|
||||
@end
|
||||
|
||||
@interface FaceGuardSessionId : NSObject
|
||||
|
||||
/**
|
||||
* 获取SessionID操作的结果
|
||||
*/
|
||||
@property(atomic) int code;
|
||||
|
||||
/**
|
||||
* 包含Session结果的字符串
|
||||
*/
|
||||
@property(copy, atomic) NSString *sessionId;
|
||||
|
||||
@end
|
||||
#endif /* FaceGuardSession_h */
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// faceguard.h
|
||||
// faceguard
|
||||
//
|
||||
// Created by Lingxuan on 2023/6/27.
|
||||
// Copyright © 2023 security.net. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <faceguard/FaceGuardSession.h>
|
||||
#import <faceguard/FaceGuardCode.h>
|
||||
#import <faceguard/FaceGuardOutConst.h>
|
||||
|
||||
//! Project version number for faceguard.
|
||||
FOUNDATION_EXPORT double faceguardVersionNumber;
|
||||
|
||||
//! Project version string for faceguard.
|
||||
FOUNDATION_EXPORT const unsigned char faceguardVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <faceguard/PublicHeader.h>
|
||||
|
||||
|
||||
@interface FaceGuardDevice
|
||||
|
||||
/**
|
||||
* 设备指纹单例
|
||||
*/
|
||||
+ (FaceGuardDevice *)sharedInstance;
|
||||
|
||||
/**
|
||||
* 设备指纹初始化函数
|
||||
*/
|
||||
- (void)initFG:(NSString *)userAppKey :(void (^)(int))initListener;
|
||||
|
||||
/**
|
||||
* 底层数据传输走IPv6
|
||||
*/
|
||||
- (void)initFGIPV6:(NSString *)userAppKey :(void (^)(int))initListener;
|
||||
|
||||
/**
|
||||
* 带参数的初始化
|
||||
*/
|
||||
- (void)initFG:(NSString *)userAppKey withOptions:(NSMutableDictionary *)options callback:(void (^)(int))initListener;
|
||||
|
||||
/**
|
||||
* 获取DeviceToken
|
||||
*/
|
||||
- (FaceGuardSession *)getSession;
|
||||
- (FaceGuardSession *)getSession:(NSString *)bizId;
|
||||
- (FaceGuardSessionId *)getSessionId;
|
||||
- (FaceGuardToken *)getDeviceToken;
|
||||
- (FaceGuardToken *)getDeviceToken:(NSString *)bizId;
|
||||
|
||||
/**
|
||||
* 用户自定义上报数据
|
||||
*/
|
||||
- (void)reportUserData:(int)type :(NSString *)msg;
|
||||
|
||||
/**
|
||||
* 在某些特殊时机上报,具体上报时机请联系 对接人员咨询
|
||||
*/
|
||||
- (void)reportMoment;
|
||||
|
||||
/**
|
||||
* 获取 SDK 版本号
|
||||
*/
|
||||
- (NSString *)getVersion;
|
||||
|
||||
/**
|
||||
* 安全切面
|
||||
*/
|
||||
- (void)lp:(int)key :(NSString *)certifyId;
|
||||
|
||||
@end
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
framework module faceguard {
|
||||
umbrella header "faceguard.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypeDeviceID</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>Protect Device Security</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>DDA9.1</string>
|
||||
<string>3B52.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>35F9.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>85F4.1</string>
|
||||
<string>E174.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>CA92.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Reference in new issue
Block a user