feat: 税务APP的可信插件

This commit is contained in:
zoujing
2023-04-13 17:23:15 +08:00
parent e1795f2de2
commit 9d7058bbe4
104 changed files with 3346 additions and 0 deletions

View File

@@ -0,0 +1,148 @@
//
// CAAppInfoUtil.h
// Aspects
//
// Created by yixiang on 2018/4/15.
//
#import <Foundation/Foundation.h>
#import <CredibleAuthSDK/bymsSDK.h>
//@import YYModel;
#import "YYModel.h"
//#import <YYModel/YYModel.h>
//@protocol YYModel;
NS_ASSUME_NONNULL_BEGIN
typedef void(^locationBlock)(NSString *_Nonnull, NSString *_Nonnull, NSString *_Nonnull); //使用myBlock1定义参数类型为NSString的block
@interface Objc_CertLoginParam : NSObject<YYModel>
/// 真实姓名
@property (nonatomic, strong) NSString *pin;
/// 身份证件类型(详见附件的身份证件类型代码字典。 示例201-居民身份证)
@property (nonatomic, strong) NSString *mobile;
/// 人企关联关系类型代码,可为空,为空则按从高处理
@property (nonatomic, strong) NSString *relatedType;
/// 身份凭据,通过token获取接口生成。
@property (nonatomic, strong) NSString *appToken;
/// 统一社会信用代码(注:纳税人识别号)
@property (nonatomic, strong) NSString *creditCode;
/// 介质类型 0:介质(税务UKey) 1:非介质(App)
@property (nonatomic, strong) NSString *post_type;
/// 人员类型 0:税务人 1:纳税人
@property (nonatomic, strong) NSString *user_type;
/// 登录类型 0:企业业务 1:代理业务
@property (nonatomic, strong) NSString *login_type;
@end
@interface CAAppInfoUtil : NSObject
//定义属性
@property (nonatomic, copy) locationBlock locationCallback;
+ (instancetype)shared;
+ (NSString *)appName;
/**
DeviceInfo获取当前设备的 用户自定义的别名,例如:库克的 iPhone 9
@return 当前设备的 用户自定义的别名,例如:库克的 iPhone 9
*/
+ (NSString *)iphoneName;
/**
DeviceInfo获取当前设备的 系统名称例如iOS 13.1
@return 当前设备的 系统名称例如iOS 13.1
*/
+ (NSString *)iphoneSystemVersion;
+ (NSString *)bundleIdentifier;
+ (NSString *)bundleVersion;
+ (NSString *)bundleShortVersionString;
+ (NSString *)iphoneType;
+ (BOOL)isIPhoneXSeries;
+ (BOOL)isIpad;
+ (NSString *)locationAuthority;
+ (NSString *)pushAuthority;
+ (NSString *)cameraAuthority;
+ (NSString *)audioAuthority;
+ (NSString *)photoAuthority;
+ (NSString *)addressAuthority;
+ (NSString *)calendarAuthority;
+ (NSString *)remindAuthority;
+ (NSString *)bluetoothAuthority;
/// 设备是否模拟器
+ (BOOL)isSimulator;
//获取设备当前网络IP地址
+ (NSString *)getIPAddress:(BOOL)preferIPv4;
+ (BOOL)isLocationAuthed;
+ (void)getCurrentLocation:(locationBlock)callback;
/*!
*
* @abstract 获取运营商信息
*/
+ (NSString *)getCarrierInfo;
/*
* 获取设备物理地址
*/
+ (nullable NSString *)getMacAddress;
/*
* 获取IMSI
* IMSIInternational Mobile Subscriber Identification Number 国际移动用户识别码
IMSI分为两部分
一部分叫MCC(Mobile Country Code
移动国家码)MCC的资源由国际电联(ITU)统一分配唯一识别移动用户所属的国家MCC共3位中国地区的MCC为460
另一部分叫MNC(Mobile Network Code 移动网络号码)用于识别移动客户所属的移动网络运营商。MNC由二到三个十进制数组成例如中国移动MNC为00、02、07中国联通的MNC为01、06、09中国电信的MNC为03、05、11
由1、2两点可知对于中国地区来说IMSI一般为46000(中国移动)、46001(中国联通)、46003(中国电信)等
*/
+ (NSString *)getIMSI;
/*
* MCC(Mobile Country Code 移动国家码)
*/
+ (NSString *)getMCC;
/*
* MNC(Mobile Network Code 移动网络号码)
*/
+ (NSString *)getMNC;
+ (NSString *)getCPUType;
+ (NSString *)DeviceIDFV;
+ (BOOL)supportTouchID;
+ (BOOL)supportFaceID;
typedef void(^ BiometricsAuthBlock)(BOOL success, NSString *errorMsg);
+ (void)biometricsAuth:(BiometricsAuthBlock)completion;
+ (void)objc_certLogin:(Objc_CertLoginParam *)param finish:(XTQMDataResponseSuccessBlock)finish fail:(ResponseFailBlock)fail;
@end
NS_ASSUME_NONNULL_END