提交
19
Pods/CL_ShanYanSDK/LICENSE
generated
Executable file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2018 wanglijun311@gmail.com <CAODA19920605w>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
304
Pods/CL_ShanYanSDK/README.md
generated
Executable file
@@ -0,0 +1,304 @@
|
||||
# CL_ShanYanSDK
|
||||
|
||||
[](https://travis-ci.org/wanglijun311@gmail.com/CL_ShanYanSDK)
|
||||
[](https://cocoapods.org/pods/CL_ShanYanSDK)
|
||||
[](https://cocoapods.org/pods/CL_ShanYanSDK)
|
||||
[](https://cocoapods.org/pods/CL_ShanYanSDK)
|
||||
|
||||
## Example
|
||||
|
||||
To run the example project, clone the repo, and run `pod install` from the Example directory first.
|
||||
http://flash.253.com
|
||||
|
||||
## Requirements
|
||||
|
||||
## Installation
|
||||
|
||||
CL_ShanYanSDK is available through [CocoaPods](https://cocoapods.org). To install
|
||||
it, simply add the following line to your Podfile:
|
||||
|
||||
```ruby
|
||||
pod 'CL_ShanYanSDK' , '~> 2.3.5.8'
|
||||
```
|
||||
|
||||
## 接入文档以官网http://flash.253.com 为准
|
||||
|
||||
## 1.初始化
|
||||
|
||||
方法原型
|
||||
|
||||
```objectivec
|
||||
/**初始化*/
|
||||
+(void)initWithAppId:(NSString *)appId complete:(nullable CLComplete)complete;
|
||||
```
|
||||
|
||||
从2.3.0开始,前端不再需要appKey
|
||||
|
||||
**接口作用**<br />**<br />初始化SDK :传入用户的appID,获取本机运营商,读取缓存,获取运营商配置,初始化SDK
|
||||
|
||||
**使用场景**<br />**
|
||||
|
||||
- 建议在app启动时调用
|
||||
- 必须在一键登录前至少调用一次
|
||||
- 只需调用一次,多次调用不会多次初始化,与一次调用效果一致
|
||||
|
||||
**请求示例代码**<br />**<br />**ObjC**:
|
||||
|
||||
1. 导入闪验SDK头文件 `#import <CL_ShanYanSDK/CL_ShanYanSDK.h>`
|
||||
1. 在AppDelegate中的 `didFinishLaunchingWithOptions`方法中添加初始化代码
|
||||
```objectivec
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
...
|
||||
//初始化
|
||||
[CLShanYanSDKManager initWithAppId:cl_SDK_APPID complete:nil];
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
**Swift**:
|
||||
|
||||
1. 创建混编桥接头文件并导入闪验SDK头文件 `#import <CL_ShanYanSDK/CL_ShanYanSDK.h>`
|
||||
1. 在AppDelegate中的 `didFinishLaunchingWithOptions`方法中添加初始化代码
|
||||
|
||||
```swift
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
// 建议先检测APP登录状态,未登录再使用闪验
|
||||
...
|
||||
//初始化
|
||||
CLShanYanSDKManager.initWithAppId("your appID")
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
<a name="zWeon"></a>
|
||||
## 2.预取号
|
||||
|
||||
方法原型
|
||||
|
||||
```objectivec
|
||||
/**
|
||||
* 预取号(获取临时凭证)
|
||||
* 建议在判断当前用户属于未登录状态时使用,已登录状态用户请不要调用该方法
|
||||
*/
|
||||
+(void)preGetPhonenumber:(nullable CLComplete)complete;
|
||||
```
|
||||
|
||||
**接口作用**
|
||||
|
||||
**电信、联通、移动预取号** :初始化成功后,如果当前为电信/联通/移动,将调用预取号,可以提前获知当前用户的手机网络环境是否符合一键登录的使用条件,成功后将得到用于一键登录使用的临时凭证,默认的凭证有效期60s(电信)/30min(联通)/60min(移动)。
|
||||
|
||||
**使用场景**
|
||||
|
||||
- 建议在执行一键登录的方法前,提前一段时间调用此方法,比如调一键登录的vc的viewdidload中,或者rootVC的viewdidload中,或者app启动后,此调用将有助于提高闪验拉起授权页的速度和成功率
|
||||
- 不建议调用后立即调用拉起授权页方法(此方法是异步)
|
||||
- 此方法需要1~2s的时间取得临时凭证,因此也不建议和拉起授权页方法一起串行调用
|
||||
- 不建议频繁的多次调用和在拉起授权页后调用
|
||||
- **建议在判断当前用户属于未登录状态时使用,已登录状态用户请不要调用该方法**
|
||||
|
||||
**请求示例代码**<br />**<br />**ObjC**:
|
||||
|
||||
```objectivec
|
||||
#import <CL_ShanYanSDK/CL_ShanYanSDK.h>
|
||||
//开发者调拉起授权页的vc
|
||||
@implementation CustomLoginViewController
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
if (YourAppLoginStatus == NO) {
|
||||
//预取号
|
||||
[CLShanYanSDKManager preGetPhonenumber:nil];
|
||||
...
|
||||
}
|
||||
}
|
||||
...
|
||||
//拉起授权页
|
||||
- (void)shanYanAuthPageLogin{
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
<a name="wCSyi"></a>
|
||||
## 3.拉起授权页
|
||||
|
||||
**在预取号成功后调用**,预取号失败不建议调用。调用拉起授权页方法后将会调起运营商授权页面。该方法会拉起登录界面,**已登录状态请勿调用 。**<br />**
|
||||
```objectivec
|
||||
//闪验一键登录接口
|
||||
+(void)quickAuthLoginWithConfigure:(CLUIConfigure *)clUIConfigure
|
||||
timeOut:(NSTimeInterval)timeOut
|
||||
shanyanAuthPageListener:(CLComplete)shanyanAuthPageListener
|
||||
complete:(CLComplete)complete;
|
||||
```
|
||||
|
||||
使用场景
|
||||
|
||||
- 用户进行一键登录操作时,调用一键登录方法,如果初始化成功,SDK将会拉起授权页面,用户授权后,SDK将返回取号 token给到应用客户端。
|
||||
- 可以在多处调用
|
||||
- 需在调用预初始化方法之后调用
|
||||
|
||||
一键登录逻辑说明
|
||||
|
||||
- 存在调用预初始化时获取的临时凭证,调用一键登录方法将立即拉起授权页面
|
||||
- shanyanAuthPageListener 拉起授权页监听回调
|
||||
- 不存在临时凭证或临时凭证过期时(临时凭证有效期电信10min、联通60min、移动60min),调用一键登录方法,将有一个很短的时延,待取号成功后拉起授权页面
|
||||
- 取号失败时,返回失败
|
||||
|
||||
请求示例代码
|
||||
|
||||
**ObjC**:
|
||||
|
||||
1. 导入闪验SDK头文件 `#import <CL_ShanYanSDK/CL_ShanYanSDK.h>`
|
||||
1. 在需要使用一键登录的地方调用闪验一键登录接口
|
||||
```objectivec
|
||||
// 用户需要使用闪验一键登录时的方法
|
||||
- (void)quickLoginBtnClick:(UIButton *)sender {
|
||||
|
||||
__weak typeof(self) weakself = self;
|
||||
|
||||
CGFloat screenScale = [UIScreen mainScreen].bounds.size.width/375.0;
|
||||
|
||||
CLUIConfigure * baseUIConfigure = [CLUIConfigure new];
|
||||
baseUIConfigure.viewController = self;
|
||||
baseUIConfigure.clLogoImage = [UIImage imageNamed:@"your_app_logo_image"];
|
||||
//开发者自己的loading(注意后面loading的隐藏时机)
|
||||
[SVProgressHUD setContainerView:self.view];
|
||||
[SVProgressHUD show];
|
||||
|
||||
//闪验一键登录接口(将拉起授权页)
|
||||
[CLShanYanSDKManager quickAuthLoginWithConfigure:baseUIConfigure timeOut:4 shanyanAuthPageListener:^(CLCompleteResult * _Nonnull completeResult) {
|
||||
NSLog(@"拉起授权页");
|
||||
} complete:^(CLCompleteResult * _Nonnull completeResult) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (completeResult.error) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (completeResult.code == 1011){
|
||||
//用户取消登录(点返回)
|
||||
//处理建议:如无特殊需求可不做处理,仅作为状态回调,此时已经回到当前用户自己的页面
|
||||
[SVProgressHUD showInfoWithStatus: @"用户取消免密登录"];
|
||||
}else{
|
||||
//处理建议:其他错误代码表示闪验通道无法继续,可以统一走开发者自己的其他登录方式,也可以对不同的错误单独处理
|
||||
if (completeResult.code == 1009){
|
||||
// 无SIM卡
|
||||
[SVProgressHUD showInfoWithStatus:@"未能识别SIM卡"];
|
||||
}else if (completeResult.code == 1008){
|
||||
[SVProgressHUD showInfoWithStatus:@"请打开蜂窝移动网络"];
|
||||
}else {
|
||||
// 跳转验证码页面
|
||||
[SVProgressHUD showInfoWithStatus: @"网络状况不稳定,切换至验证码登录"];
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
//SDK成功获取到Token
|
||||
/** token置换手机号
|
||||
code
|
||||
*/
|
||||
}
|
||||
}];
|
||||
}
|
||||
```
|
||||
|
||||
**Swift**:
|
||||
```swift
|
||||
// 用户需要使用闪验一键登录时的方法
|
||||
@IBAction func quickLogin(_ sender: UIButton) {
|
||||
|
||||
//定制界面
|
||||
let baseUIConfigure = CLUIConfigure()
|
||||
//requried
|
||||
baseUIConfigure.viewController = self
|
||||
baseUIConfigure.clLogoImage = UIImage.named("your_app_logo_image");
|
||||
|
||||
//开发者自己的loading
|
||||
SVProgressHUD.setContainerView(self.view)
|
||||
SVProgressHUD.show()
|
||||
|
||||
CLShanYanSDKManager.quickAuthLogin(with: clUIConfigure, timeOut: 4, shanyanAuthListener: { (completeResult) in
|
||||
print("拉起授权页")
|
||||
}) { (completeResult) in
|
||||
SVProgressHUD.dismiss()
|
||||
if completeResult.error != nil {
|
||||
//提示:错误无需提示给用户,可以在用户无感知的状态下直接切换登录方式
|
||||
//提示:错误无需提示给用户,可以在用户无感知的状态下直接切换登录方式
|
||||
//提示:错误无需提示给用户,可以在用户无感知的状态下直接切换登录方式
|
||||
|
||||
DispatchQueue.main.async(execute: {
|
||||
if completeResult.code == 1011 {
|
||||
// 用户取消登录
|
||||
//处理建议:如无特殊需求可不做处理,仅作为状态回调,此时已经回到当前用户自己的页面
|
||||
SVProgressHUD.showInfo(withStatus: "用户取消免密登录")
|
||||
}else{
|
||||
//处理建议:其他错误代码表示闪验通道无法继续,可以统一走开发者自己的其他登录方式,也可以对不同的错误单独处理
|
||||
if completeResult.code == 1009{
|
||||
// 无SIM卡
|
||||
SVProgressHUD.showInfo(withStatus: "此手机无SIM卡")
|
||||
}else if completeResult.code == 1008{
|
||||
SVProgressHUD.showInfo(withStatus: "请打开蜂窝移动网络")
|
||||
}else {
|
||||
// 跳转验证码页面
|
||||
SVProgressHUD.showInfo(withStatus: "网络状况不稳定,切换至验证码登录")
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
//SDK成功获取到Token
|
||||
|
||||
/** token置换手机号
|
||||
code
|
||||
*/
|
||||
|
||||
NSLog("quickAuthLogin Success:%@",completeResult.data ?? "")
|
||||
|
||||
//urlStr:用户后台对接闪验后台后配置的API,以下为Demo提供的调试API及调用示例,在调试阶段可暂时调用此API,也可用此API验证后台API是否正确配置
|
||||
var urlStr : String?
|
||||
let APIString = "https://api.253.com/"
|
||||
|
||||
if let telecom = completeResult.data?["telecom"] as! String?{
|
||||
switch telecom {
|
||||
case "CMCC":
|
||||
urlStr = APIString.appendingFormat("open/flashsdk/mobile-query-m")
|
||||
break
|
||||
case "CUCC":
|
||||
urlStr = APIString.appendingFormat("open/flashsdk/mobile-query-u")
|
||||
break
|
||||
case "CTCC":
|
||||
urlStr = APIString.appendingFormat("open/flashsdk/mobile-query-t")
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if let urlStr = urlStr{
|
||||
let dataDict = completeResult.data as! Parameters
|
||||
|
||||
Alamofire.request(urlStr, method:.post, parameters:dataDict, encoding:URLEncoding.default, headers:[:]).responseJSON(completionHandler: { (response) in
|
||||
if response.result.isSuccess {
|
||||
if let json = response.result.value{
|
||||
let jsonDict = JSON(json)
|
||||
if jsonDict["code"].intValue == 200000{
|
||||
let mobileName = jsonDict["data"]["mobileName"].stringValue
|
||||
let mobileCode = StringDecryptUseDES.decryptUseDESString(mobileName, key: "tDo3Ml2K")//appKey
|
||||
DispatchQueue.main.async(execute: {
|
||||
SVProgressHUD.showSuccess(withStatus: ("免密登录成功,手机号:\(mobileCode)"))
|
||||
})
|
||||
print(("免密登录成功,手机号:\(mobileCode)"))
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
DispatchQueue.main.async(execute: {
|
||||
SVProgressHUD.showInfo(withStatus: ("免密登录失败:\(response.description)"))
|
||||
print(("免密登录失败:\(response.description)"))
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
## Author
|
||||
|
||||
app@253.com
|
||||
|
||||
## License
|
||||
|
||||
CL_ShanYanSDK is available under the MIT license. See the LICENSE file for more info.
|
||||
BIN
Pods/CL_ShanYanSDK/framework/CL_ShanYanSDK.framework/CL_ShanYanSDK
generated
Executable file
49
Pods/CL_ShanYanSDK/framework/CL_ShanYanSDK.framework/Headers/CLCompleteResult.h
generated
Executable file
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// CLCompleteResult.h
|
||||
// CL_ShanYanSDK
|
||||
//
|
||||
// Created by wanglijun on 2018/10/29.
|
||||
// Copyright © 2018 wanglijun. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class CLCompleteResult;
|
||||
typedef void(^CLComplete)(CLCompleteResult * completeResult);
|
||||
|
||||
/// 回调内容
|
||||
@interface CLCompleteResult : NSObject
|
||||
/// SDK外层code
|
||||
@property (nonatomic,assign)NSInteger code;
|
||||
/// SDK外层msg
|
||||
@property (nonatomic,nullable,copy)NSString * message;
|
||||
/// SDK外层data
|
||||
@property (nonatomic,nullable,copy)NSDictionary * data;
|
||||
/// Error
|
||||
@property (nonatomic,nullable,strong)NSError * error;
|
||||
/// SDK内层code
|
||||
@property (nonatomic,assign)NSInteger innerCode;
|
||||
/// SDK内层msg
|
||||
@property (nonatomic,nullable,copy)NSString * innerDesc;
|
||||
|
||||
#ifdef DEBUG
|
||||
@property (nonatomic,assign)NSTimeInterval debug_createTime;
|
||||
#endif
|
||||
|
||||
|
||||
/// 累计上报 (为1则累计上报)
|
||||
@property (nonatomic,assign)NSInteger clShanYanReportTag;
|
||||
|
||||
+(instancetype)cl_CompleteWithCode:(NSInteger)code
|
||||
message:(NSString *)message
|
||||
data:(nullable NSDictionary *)data
|
||||
error:(nullable NSError *)error;
|
||||
-(void)fillPropertyInfo;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
92
Pods/CL_ShanYanSDK/framework/CL_ShanYanSDK.framework/Headers/CLFaceIDTool.h
generated
Executable file
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// CLFaceIDTool.h
|
||||
// CL_ShanYanSDK
|
||||
//
|
||||
// Created by KevinChien on 2020/7/24.
|
||||
// Copyright © 2020 wanglijun. All rights reserved.
|
||||
//
|
||||
|
||||
#import <LocalAuthentication/LocalAuthentication.h>
|
||||
#import "CLCompleteResult.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 设备的生物验证方式状态
|
||||
typedef NS_ENUM(NSInteger, CLFaceIDDeviceSupportState) {
|
||||
/// 设备不支持生物验证
|
||||
CLFaceIDDeviceSupportStateNotAvailable =0,
|
||||
|
||||
/// 设备支持生物验证 但尚未未设置
|
||||
CLFaceIDDeviceSupportStateNotEnrolled,
|
||||
|
||||
/// 识别错误次数过多 被锁定(需要重新输入手机密码解锁后才可以使用)
|
||||
CLFaceIDDeviceSupportStateLockout,
|
||||
|
||||
/// 设备支持TouchID验证
|
||||
CLFaceIDDeviceSupportStateTouchID,
|
||||
|
||||
/// 设备支持FaceID验证
|
||||
CLFaceIDDeviceSupportStateFaceID,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, CLFaceIDErrorCode) {
|
||||
|
||||
/// 系统不支持
|
||||
CLFaceIDErrorCodeNotAvailable,
|
||||
|
||||
/// 设备支持生物验证 但尚未未设置
|
||||
CLFaceIDErrorCodeNotEnrolled,
|
||||
|
||||
/// 识别错误次数过多 被锁定(需要重新输入手机密码解锁后才可以使用)
|
||||
CLFaceIDErrorCodeLockout,
|
||||
|
||||
/// 验证账号为空
|
||||
CLFaceIDErrorCodeFailedNULLAccount,
|
||||
|
||||
/// 验证失败
|
||||
CLFaceIDErrorCodeFailed,
|
||||
|
||||
/// 用户取消
|
||||
CLFaceIDErrorCodeUserCancel,
|
||||
|
||||
/// 被系统中断 如别的应用进前台,当前应用进如后台
|
||||
CLFaceIDErrorCodeSystemCancel,
|
||||
|
||||
/// 系统TouchID/FaceID 发生变更 ,绑定失效
|
||||
CLFaceIDErrorCodeDataChange,
|
||||
};
|
||||
|
||||
/// 需要执行的业务类型
|
||||
typedef NS_ENUM(NSInteger ,CLFaceIDAuthType) {
|
||||
|
||||
/// 绑定
|
||||
CLFaceIDAuthTypeBound = 0,
|
||||
|
||||
/// 验证
|
||||
CLFaceIDAuthTypeAuth,
|
||||
};
|
||||
|
||||
@interface CLFaceIDTool : NSObject
|
||||
|
||||
+ (CLFaceIDTool *)shareInstance;
|
||||
|
||||
/// 生物识别类型检测,判断设备支持哪种认证方式
|
||||
-(CLFaceIDDeviceSupportState )clBiometricsTypeCheck;
|
||||
|
||||
/// 判断该账户是否绑定过 生物识别
|
||||
/// @param accountInfo 账号信息(每个账户唯一)
|
||||
-(BOOL)isHadBoundAccountInfo:(NSString *)accountInfo;
|
||||
|
||||
/// 生物识别 绑定/验证
|
||||
/// @param faceIDAuthType 业务类型
|
||||
/// @param accountInfo 账号信息
|
||||
/// @param desc 业务描述
|
||||
/// @param complete 回调信息
|
||||
-(void)clStartAuthWithCLFaceIDAuthType:(CLFaceIDAuthType )faceIDAuthType
|
||||
accountInfo:(NSString *)accountInfo
|
||||
description:(NSString *)desc
|
||||
complete:(void (^) (BOOL success ,NSError *error))complete;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
199
Pods/CL_ShanYanSDK/framework/CL_ShanYanSDK.framework/Headers/CLShanYanSDKManager.h
generated
Executable file
@@ -0,0 +1,199 @@
|
||||
//
|
||||
// CLShanYanSDKManager.h
|
||||
// CL_ShanYanSDK
|
||||
//
|
||||
// Created by wanglijun on 2018/10/29.
|
||||
// Copyright © 2018 wanglijun. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "CLCompleteResult.h"
|
||||
#import "CLUIConfigure.h"
|
||||
|
||||
@protocol CLShanYanSDKManagerDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
/// 授权页面已经显示的回调
|
||||
/// @param authPageView 授权页view
|
||||
/// @param telecom 当前运营商类型
|
||||
- (void)clShanYanSDKManagerAuthPageAfterViewDidLoad:(UIView *_Nonnull)authPageView
|
||||
currentTelecom:(NSString *_Nullable)telecom ;
|
||||
|
||||
/// 授权页面将要显示的回调 ViewDidLoad即将全部执行完毕的最后时机
|
||||
/// @param authPageVC 授权页
|
||||
/// @param telecom 当前运营商类型
|
||||
/// @param object 授权页相关内容信息
|
||||
/// @param userInfo 授权页相关UI控件字典,用法见demo
|
||||
- (void)clShanYanSDKManagerAuthPageCompleteViewDidLoad:(UIViewController *_Nonnull)authPageVC
|
||||
currentTelecom:(NSString *_Nullable)telecom
|
||||
object:(NSObject *_Nullable)object
|
||||
userInfo:(NSDictionary *_Nullable)userInfo;
|
||||
|
||||
/// 授权页面将要显示的回调(ViewWillAppear)
|
||||
/// @param authPageVC 授权页
|
||||
/// @param telecom 当前运营商类型
|
||||
/// @param object 授权页相关内容信息
|
||||
/// @param userInfo 授权页相关UI控件字典,用法见demo
|
||||
- (void)clShanYanSDKManagerAuthPageCompleteViewWillAppear:(UIViewController *_Nonnull)authPageVC
|
||||
currentTelecom:(NSString *_Nullable)telecom
|
||||
object:(NSObject *_Nullable)object
|
||||
userInfo:(NSDictionary *_Nullable)userInfo;
|
||||
|
||||
/// 授权页vc alloc init 注:此时authPageVC.navigationController为nil
|
||||
/// @param authPageVC 授权页
|
||||
/// @param telecom 当前运营商类型
|
||||
/// @param object 授权页相关内容信息
|
||||
/// @param userInfo 授权页相关UI控件字典,用法见demo
|
||||
- (void)clShanYanSDKManagerAuthPageCompleteInit:(UIViewController *_Nonnull)authPageVC
|
||||
currentTelecom:(NSString *_Nullable)telecom
|
||||
object:(NSObject*_Nullable)object
|
||||
userInfo:(NSDictionary*_Nullable)userInfo;
|
||||
|
||||
/// 授权页vc 将要被present; 将要调用[uiconfigure.viewcontroller present:authPageVC animation:completion:]
|
||||
/// @param authPageVC 授权页
|
||||
/// @param telecom 当前运营商类型
|
||||
/// @param object 授权页相关内容信息
|
||||
/// @param userInfo 授权页相关UI控件字典,用法见demo
|
||||
- (void)clShanYanSDKManagerAuthPageWillPresent:(UIViewController *_Nonnull)authPageVC
|
||||
currentTelecom:(NSString *_Nullable)telecom
|
||||
object:(NSObject *_Nullable)object
|
||||
userInfo:(NSDictionary *_Nullable)userInfo;
|
||||
|
||||
/// 统一事件监听方法
|
||||
/// @param type 事件类型(1:隐私协议点击, 2:协议勾选框点击,3:"一键登录"按钮点击)
|
||||
/// @param code 事件对应序号 type=1时:code:0,1,2,3(协议页序号),message:协议名|当前运营商类型
|
||||
/// type=2时:code:0,1(0为未选中,1为选中)
|
||||
/// type=3时:code:0,1(0为协议勾选框未选中,1为选中)
|
||||
/// @param message 说明:type=1时:message:协议名_当前运营商类型
|
||||
- (void)clShanYanActionListener:(NSInteger)type
|
||||
code:(NSInteger)code
|
||||
message:(NSString *_Nullable)message;
|
||||
|
||||
|
||||
|
||||
/// 协议点击回调 (clAppPrivacyCustomWeb设置为YES时有效)
|
||||
/// 处理跳转自定义webview逻辑。如:[authPageVC.navigationController pushViewController:xxVC animated:YES];
|
||||
/// @param privacyName 协议名称
|
||||
/// @param URLString 协议链接
|
||||
/// @param authPageVC 导航控制器
|
||||
- (void)clShanYanPrivacyListener:(NSString *_Nonnull)privacyName
|
||||
privacyURL:(NSString *_Nonnull)URLString
|
||||
authPage:(UIViewController *_Nonnull)authPageVC;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface CLShanYanSDKManager : NSObject
|
||||
|
||||
/// 设置点击协议代理
|
||||
/// @param delegate 代理
|
||||
+ (void)setCLShanYanSDKManagerDelegate:(id<CLShanYanSDKManagerDelegate>)delegate;
|
||||
|
||||
/// 初始化
|
||||
/// @param appId 闪验后台申请的appId
|
||||
/// @param complete 预初始化回调block(⚠️在子线程中回调)
|
||||
+ (void)initWithAppId:(NSString *)appId
|
||||
complete:(nullable CLComplete)complete;
|
||||
|
||||
///**
|
||||
// 设置初始化超时 单位:s
|
||||
// 大于0有效
|
||||
// 建议4s左右,默认4s
|
||||
// */
|
||||
//+ (void)setInitTimeOut:(NSTimeInterval)initTimeOut;
|
||||
|
||||
/// 设置预取号超时 单位:s(大于0有效;建议4s左右,默认4s)
|
||||
/// @param preGetPhoneTimeOut 预取号超时时间
|
||||
+ (void)setPreGetPhonenumberTimeOut:(NSTimeInterval)preGetPhoneTimeOut;
|
||||
|
||||
/// 当无蜂窝网络(拔出SIM卡/切换SIM卡,网络切换期间/或者直接关闭流量开关)是否使用之前的取号缓存
|
||||
/// @param isUseCache YES/NO 默认YES 设置为NO 获取SIM实时的预取号,无蜂窝网络、或者蜂窝网络不稳定则无法取号成功
|
||||
+ (void)setPreGetPhonenumberUseCacheIfNoCellularNetwork:(BOOL)isUseCache;
|
||||
|
||||
/// 预取号
|
||||
/// 此调用将有助于提高闪验拉起授权页的速度和成功率
|
||||
/// 建议在一键登录前调用此方法,比如调一键登录的vc的viewdidload中
|
||||
/// 不建议在拉起授权页后调用
|
||||
/// 以 if (completeResult.error == nil) 为判断成功的依据,而非返回码
|
||||
/// @param complete 回调block(⚠️在子线程中回调)
|
||||
+ (void)preGetPhonenumber:(nullable CLComplete)complete;
|
||||
|
||||
/// 一键登录拉起内置授权页&获取Token
|
||||
/// @param clUIConfigure 闪验授权页参数配置
|
||||
/// @param complete 回调block(⚠️在子线程中回调)
|
||||
+ (void)quickAuthLoginWithConfigure:(CLUIConfigure *)clUIConfigure
|
||||
complete:(nonnull CLComplete)complete;
|
||||
|
||||
/// 一键登录拉起内置授权页&获取Token( 区分拉起授权页之前和之后的回调)
|
||||
/// @param clUIConfigure 闪验授权页参数配置
|
||||
/// @param openLoginAuthListener 拉起授权页监听:拉起授权页面成功或失败的回调,拉起成功或失败均触发。当拉起失败时,oneKeyLoginListener不会触发。此回调的内部触发时机是presentViewController:的完成block(⚠️在子线程中回调)
|
||||
/// @param oneKeyLoginListener 一键登录监听:拉起授权页成功后的后续操作回调,包括点击SDK内置的(非外部自定义)取消登录按钮,以及点击本机号码一键登录的回调。点击授权页自定义按钮不触发此回调(⚠️在子线程中回调)
|
||||
+ (void)quickAuthLoginWithConfigure:(CLUIConfigure *)clUIConfigure
|
||||
openLoginAuthListener:(CLComplete)openLoginAuthListener
|
||||
oneKeyLoginListener:(CLComplete)oneKeyLoginListener;
|
||||
|
||||
/// 关闭授权页
|
||||
/// 注:内部实现为调用系统方法dismissViewcontroller:complete; 若授权页未拉起或已关闭,此方法调用无效果
|
||||
/// @param flag dismissViewcontroller`Animated, default is YES.
|
||||
/// @param completion dismissViewcontroller`completion(⚠️在子线程中回调。)
|
||||
+ (void)finishAuthControllerAnimated:(BOOL)flag
|
||||
Completion:(void(^_Nullable)(void))completion;
|
||||
|
||||
/// 关闭授权页
|
||||
/// @param completion 关闭回调(⚠️在子线程中回调)
|
||||
+ (void)finishAuthControllerCompletion:(void(^_Nullable)(void))completion;
|
||||
|
||||
/// 返回授权页内置导航控制器(生命周期与授权页一致)
|
||||
+ (UINavigationController *)authNavigationController;
|
||||
|
||||
/// 设置checkBox勾选状态
|
||||
/// @param isSelect 勾选状态:YES:为勾选
|
||||
+ (void)setCheckBoxValue:(BOOL)isSelect;
|
||||
|
||||
/// 手动触发一键登录按钮点击(授权页存在时调用)
|
||||
+ (void)loginBtnClick;
|
||||
|
||||
/// 隐藏一键登录loading
|
||||
+ (void)hideLoading;
|
||||
|
||||
/// 本机号认证获取token
|
||||
/// @param complete 本机号认证回调(⚠️在子线程中回调)
|
||||
+ (void)mobileCheckWithLocalPhoneNumberComplete:(CLComplete)complete;
|
||||
|
||||
/// 模式控制台日志输出控制(默认关闭)
|
||||
/// @param enable 开关参数
|
||||
+ (void)printConsoleEnable:(BOOL)enable;
|
||||
|
||||
/// 获取当前流量卡运营商,结果仅供参考(CTCC:电信、CMCC:移动、CUCC:联通、UNKNOW:未知)
|
||||
+ (NSString *)getOperatorType;
|
||||
|
||||
/// 清除预取号缓存
|
||||
+ (void)clearScripCache;
|
||||
|
||||
/// 禁止日志上报获取IP(默认允许)
|
||||
/// @param forbidden YES:禁止 NO:允许
|
||||
+ (void)forbiddenNonessentialIp:(BOOL)forbidden;
|
||||
|
||||
/// 禁止日志上报(默认开启) 此接口需要在初始化之前调用,否则配置不生效
|
||||
/// @param forbidden YES:禁止上报 NO:允许上报
|
||||
+ (void)forbiddenFullLogReport:(BOOL)forbidden;
|
||||
|
||||
/// 当前环境是否满足预取号
|
||||
+ (BOOL)checkAuthEnable;
|
||||
|
||||
/// 当前SIM卡数量
|
||||
+ (NSInteger)currentSimCounts;
|
||||
|
||||
/// 获取当前SDK版本号
|
||||
+ (NSString *)clShanYanSDKVersion;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
498
Pods/CL_ShanYanSDK/framework/CL_ShanYanSDK.framework/Headers/CLUIConfigure.h
generated
Executable file
@@ -0,0 +1,498 @@
|
||||
//
|
||||
// CLCTCCUIConfigure.h
|
||||
// CL_ShanYanSDK
|
||||
//
|
||||
// Created by wanglijun on 2018/10/30.
|
||||
// Copyright © 2018 wanglijun. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class CLOrientationLayOut;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**⚠️⚠️ 注: 授权页一键登录按钮、运营商条款必须显示,不得隐藏,否则取号能力可能被运营商关闭 */
|
||||
|
||||
/// 授权页UI配置
|
||||
@interface CLUIConfigure : NSObject
|
||||
|
||||
/// 要拉起授权页的vc [必填项] (注:SDK不持有接入方VC)
|
||||
@property(nonatomic,weak) UIViewController *viewController;
|
||||
/// 外部手动管理关闭界面 BOOL,default is NO
|
||||
@property(nonatomic,strong) NSNumber *manualDismiss;
|
||||
/// 授权页背景图片
|
||||
@property(nonatomic,strong) UIImage *clBackgroundImg;
|
||||
/// 授权页-背景色
|
||||
@property(nonatomic,strong) UIColor *clBackgroundColor;
|
||||
|
||||
|
||||
/**************************** 导航栏相关 ***************************/
|
||||
|
||||
/// 导航栏 是否隐藏 BOOL default is NO, 设置优先级高于clNavigationBackgroundClear eg.@(NO)
|
||||
@property(nonatomic,strong) NSNumber *clNavigationBarHidden;
|
||||
/// 导航栏 背景透明 BOOL eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber *clNavigationBackgroundClear;
|
||||
/// 导航栏标题
|
||||
@property(nonatomic,strong) NSAttributedString *clNavigationAttributesTitleText;
|
||||
/// 导航栏右侧自定义按钮
|
||||
@property(nonatomic,strong) UIBarButtonItem *clNavigationRightControl;
|
||||
/// 导航栏左侧自定义按钮
|
||||
@property(nonatomic,strong) UIBarButtonItem *clNavigationLeftControl;
|
||||
/// 导航栏左侧返回按钮图片
|
||||
@property(nonatomic,strong) UIImage *clNavigationBackBtnImage;
|
||||
/// 导航栏自带返回按钮隐藏,默认显示 BOOL eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber *clNavigationBackBtnHidden;
|
||||
/// 返回按钮图片缩进 btn.imageInsets = UIEdgeInsetsMake(0, 0, 20, 20)
|
||||
@property(nonatomic,strong) NSValue *clNavBackBtnImageInsets;
|
||||
/**自带返回(关闭)按钮位置 默认NO 居左,设置为YES居右显示*/
|
||||
@property(nonatomic,strong) NSNumber *clNavBackBtnAlimentRight;
|
||||
|
||||
/// 导航栏分割线 是否隐藏
|
||||
/// set backgroundImage=UIImage.new && shadowImage=UIImage.new
|
||||
/// BOOL, default is YES
|
||||
/// eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber *clNavigationBottomLineHidden;
|
||||
/// 导航栏 导航栏底部分割线(图片)
|
||||
@property(nonatomic,strong) UIImage *clNavigationShadowImage;
|
||||
/// 导航栏 文字颜色
|
||||
@property(nonatomic,strong) UIColor *clNavigationTintColor;
|
||||
/// 导航栏 背景色 default is white
|
||||
@property(nonatomic,strong) UIColor *clNavigationBarTintColor;
|
||||
/// 导航栏 背景图片
|
||||
@property(nonatomic,strong) UIImage *clNavigationBackgroundImage;
|
||||
/// 导航栏 配合背景图片设置,用来控制在不同状态下导航栏的显示(横竖屏是否显示) UIBarMetrics eg.@(UIBarMetricsCompact)
|
||||
@property(nonatomic,strong) NSNumber *clNavigationBarMetrics;
|
||||
///// translucent 此属性已失效
|
||||
//@property(nonatomic,strong) NSNumber *cl_navigation_translucent;
|
||||
|
||||
|
||||
/**************************** 状态栏相关 ***************************/
|
||||
|
||||
/*状态栏样式
|
||||
*Info.plist: View controller-based status bar appearance = YES
|
||||
*
|
||||
*UIStatusBarStyleDefault:状态栏显示 黑
|
||||
*UIStatusBarStyleLightContent:状态栏显示 白
|
||||
*UIStatusBarStyleDarkContent:状态栏显示 黑 API_AVAILABLE(ios(13.0)) = 3
|
||||
**eg. @(UIStatusBarStyleLightContent)
|
||||
*/
|
||||
@property(nonatomic,strong) NSNumber *clPreferredStatusBarStyle;
|
||||
/// 状态栏隐藏 eg.@(NO)
|
||||
@property(nonatomic,strong) NSNumber *clPrefersStatusBarHidden;
|
||||
|
||||
/**
|
||||
*NavigationBar.barStyle:默认UIBarStyleBlack
|
||||
*Info.plist: View controller-based status bar appearance = YES
|
||||
|
||||
*UIBarStyleDefault:状态栏显示 黑
|
||||
*UIBarStyleBlack:状态栏显示 白
|
||||
*
|
||||
*eg. @(UIBarStyleBlack)
|
||||
*/
|
||||
@property(nonatomic,strong) NSNumber *clNavigationBarStyle;
|
||||
|
||||
|
||||
/**************************** LOGO相关 ***************************/
|
||||
|
||||
/// LOGO图片
|
||||
@property(nonatomic,strong) UIImage *clLogoImage;
|
||||
/// LOGO圆角 CGFloat eg.@(2.0)
|
||||
@property(nonatomic,strong) NSNumber *clLogoCornerRadius;
|
||||
/// LOGO显隐 BOOL eg.@(NO)
|
||||
@property(nonatomic,strong) NSNumber *clLogoHiden;
|
||||
|
||||
|
||||
/**************************** 手机号相关 ***************************/
|
||||
|
||||
/// 手机号颜色
|
||||
@property(nonatomic,strong) UIColor *clPhoneNumberColor;
|
||||
/// 手机号字体
|
||||
@property(nonatomic,strong) UIFont *clPhoneNumberFont;
|
||||
/// 手机号对齐方式 NSTextAlignment eg.@(NSTextAlignmentCenter)
|
||||
@property(nonatomic,strong) NSNumber *clPhoneNumberTextAlignment;
|
||||
|
||||
|
||||
/**************************** 一键登录按钮相关 ***************************/
|
||||
|
||||
/// 按钮文字
|
||||
@property(nonatomic,copy) NSString *clLoginBtnText;
|
||||
/// 按钮文字颜色
|
||||
@property(nonatomic,strong) UIColor*clLoginBtnTextColor;
|
||||
/// 按钮背景颜色
|
||||
@property(nonatomic,strong) UIColor*clLoginBtnBgColor;
|
||||
/// 按钮文字字体
|
||||
@property(nonatomic,strong) UIFont *clLoginBtnTextFont;
|
||||
/// 按钮背景图片
|
||||
@property(nonatomic,strong) UIImage*clLoginBtnNormalBgImage;
|
||||
/// 按钮背景高亮图片
|
||||
@property(nonatomic,strong) UIImage*clLoginBtnHightLightBgImage;
|
||||
/// 按钮背景不可用图片
|
||||
@property(nonatomic,strong) UIImage*clLoginBtnDisabledBgImage;
|
||||
/// 按钮边框颜色
|
||||
@property(nonatomic,strong) UIColor*clLoginBtnBorderColor;
|
||||
/// 按钮圆角 CGFloat eg.@(5)
|
||||
@property(nonatomic,strong) NSNumber *clLoginBtnCornerRadius;
|
||||
/// 按钮边框 CGFloat eg.@(2.0)
|
||||
@property(nonatomic,strong) NSNumber *clLoginBtnBorderWidth;
|
||||
|
||||
|
||||
/**************************** 隐私条款相关 ***************************/
|
||||
|
||||
/*隐私条款Privacy
|
||||
注: 运营商隐私条款 不得隐藏
|
||||
用户条款不限制
|
||||
**/
|
||||
/// 隐私条款 下划线设置,默认隐藏,设置clPrivacyShowUnderline = @(YES)显示下划线
|
||||
@property(nonatomic,strong) NSNumber *clPrivacyShowUnderline;
|
||||
/// 隐私条款名称颜色:@[基础文字颜色UIColor*,条款颜色UIColor*] eg.@[[UIColor lightGrayColor],[UIColor greenColor]]
|
||||
@property(nonatomic,strong) NSArray<UIColor*> *clAppPrivacyColor;
|
||||
/// 隐私条款文字字体
|
||||
@property(nonatomic,strong) UIFont*clAppPrivacyTextFont;
|
||||
/// 隐私条款文字对齐方式 NSTextAlignment eg.@(NSTextAlignmentCenter)
|
||||
@property(nonatomic,strong) NSNumber *clAppPrivacyTextAlignment;
|
||||
/// 运营商隐私条款书名号 默认NO 不显示 BOOL eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber *clAppPrivacyPunctuationMarks;
|
||||
/// 多行时行距 CGFloat eg.@(2.0)
|
||||
@property(nonatomic,strong) NSNumber*clAppPrivacyLineSpacing;
|
||||
/// 是否需要sizeToFit,设置后与宽高约束的冲突请自行考虑 BOOL eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber*clAppPrivacyNeedSizeToFit;
|
||||
/// UITextView.textContainerInset 文字与TextView控件内边距 UIEdgeInset eg.[NSValue valueWithUIEdgeInsets:UIEdgeInsetsMake(2, 2, 2, 2)]
|
||||
@property(nonatomic,strong) NSValue*clAppPrivacyTextContainerInset;
|
||||
|
||||
/// 隐私条款--APP名称简写 默认取CFBundledisplayname 设置描述文本四后此属性无效
|
||||
@property(nonatomic,copy) NSString *clAppPrivacyAbbreviatedName;
|
||||
/*
|
||||
*隐私条款Y一:需同时设置Name和UrlString eg.@[@"条款一名称",条款一URL]
|
||||
*@[NSSting,NSURL];
|
||||
*/
|
||||
@property(nonatomic,strong) NSArray *clAppPrivacyFirst;
|
||||
/*
|
||||
*隐私条款二:需同时设置Name和UrlString eg.@[@"条款一名称",条款一URL]
|
||||
*@[NSSting,NSURL];
|
||||
*/
|
||||
@property(nonatomic,strong) NSArray *clAppPrivacySecond;
|
||||
/*
|
||||
*隐私条款三:需同时设置Name和UrlString eg.@[@"条款一名称",条款一URL]
|
||||
*@[NSSting,NSURL];
|
||||
*/
|
||||
@property(nonatomic,strong) NSArray *clAppPrivacyThird;
|
||||
|
||||
/**
|
||||
*用户自己隐私协议大于3条时,
|
||||
*可使用:@[@{@"decollator": @"、", // 隐私协议拼接内容
|
||||
* @"lastDecollator": @"YES", // 拼接内容是否放隐私条款后
|
||||
* @"privacyName": @"《自定义隐私协议》", // 隐私条款名称
|
||||
* @"privacyURL": @"https://"} // 隐私条款URL
|
||||
* ];
|
||||
*ps:数组中字典的key不可更改
|
||||
*/
|
||||
@property(nonatomic,strong) NSArray *clAppMorePrivacyArray;
|
||||
|
||||
/*
|
||||
隐私协议文本拼接: DesTextFirst+运营商条款+DesTextSecond+隐私条款一+DesTextThird+隐私条款二+DesTextFourth+隐私条款三+DesTextLast
|
||||
**/
|
||||
/// 描述文本 首部 default:"同意"
|
||||
@property(nonatomic,copy) NSString *clAppPrivacyNormalDesTextFirst;
|
||||
/// 描述文本二 default:"和"m
|
||||
@property(nonatomic,copy) NSString *clAppPrivacyNormalDesTextSecond;
|
||||
/// 描述文本三 default:"、"
|
||||
@property(nonatomic,copy) NSString *clAppPrivacyNormalDesTextThird;
|
||||
/// 描述文本四 default:"、"
|
||||
@property(nonatomic,copy) NSString *clAppPrivacyNormalDesTextFourth;
|
||||
/// 描述文本 尾部 default: "并授权AppName使用认证服务"
|
||||
@property(nonatomic,copy) NSString *clAppPrivacyNormalDesTextLast;
|
||||
/// 运营商协议后置 默认@(NO)
|
||||
@property(nonatomic,strong) NSNumber *clOperatorPrivacyAtLast;
|
||||
|
||||
/// 协议跳转自定义webview,值为@(YES)时,SDK内部webview跳转失效,在下面代理中跳转自定义webview。默认跳转SDK内部webview
|
||||
/// - (void)clShanYanPrivacyListener:(NSString *_Nonnull)privacyName privacyURL:(NSString *_Nonnull)URLString authPage:(UIViewController *_Nonnull)authPageVC
|
||||
@property (nonatomic,strong)NSNumber *clAppPrivacyCustomWeb;
|
||||
|
||||
/// 用户隐私协议WEB页面导航栏标题 默认显示用户条款名称
|
||||
@property(nonatomic,strong) NSAttributedString *clAppPrivacyWebAttributesTitle;
|
||||
/// 运营商隐私协议WEB页面导航栏标题 默认显示运营商条款名称
|
||||
@property(nonatomic,strong) NSAttributedString *clAppPrivacyWebNormalAttributesTitle;
|
||||
/// 自定义协议标题-按自定义协议对应顺序
|
||||
@property(nonatomic,strong) NSArray<NSString*> *clAppPrivacyWebTitleList;
|
||||
/// 隐私协议标题文本属性(用户协议&&运营商协议)
|
||||
@property(nonatomic,strong) NSDictionary *clAppPrivacyWebAttributes;
|
||||
/// 隐私协议WEB页面导航返回按钮图片
|
||||
@property(nonatomic,strong) UIImage *clAppPrivacyWebBackBtnImage;
|
||||
/// 协议页状态栏样式 默认:UIStatusBarStyleDefault
|
||||
@property(nonatomic,strong) NSNumber *clAppPrivacyWebPreferredStatusBarStyle;
|
||||
/// UINavigationTintColor
|
||||
@property(nonatomic,strong) UIColor*clAppPrivacyWebNavigationTintColor;
|
||||
/// UINavigationBarTintColor
|
||||
@property(nonatomic,strong) UIColor*clAppPrivacyWebNavigationBarTintColor;
|
||||
/// UINavigationBackgroundImage
|
||||
@property(nonatomic,strong) UIImage*clAppPrivacyWebNavigationBackgroundImage;
|
||||
/// UINavigationBarMetrics
|
||||
@property(nonatomic,strong) NSNumber *clAppPrivacyWebNavigationBarMetrics;
|
||||
/// UINavigationShadowImage
|
||||
@property(nonatomic,strong) UIImage*clAppPrivacyWebNavigationShadowImage;
|
||||
/// UINavigationBarStyle
|
||||
@property(nonatomic,strong) NSNumber *clAppPrivacyWebNavigationBarStyle;
|
||||
|
||||
|
||||
/**************************** SLOGAN相关 ***************************/
|
||||
|
||||
/*SLOGAN
|
||||
注: 运营商品牌标签("中国**提供认证服务"),不得隐藏
|
||||
**/
|
||||
/// slogan文字字体
|
||||
@property(nonatomic,strong) UIFont *clSloganTextFont;
|
||||
/// slogan文字颜色
|
||||
@property(nonatomic,strong) UIColor*clSloganTextColor;
|
||||
/// slogan文字对齐方式 NSTextAlignment eg.@(NSTextAlignmentCenter)
|
||||
@property(nonatomic,strong) NSNumber *clSlogaTextAlignment;
|
||||
/// slogan默认不隐藏 eg.@(NO)
|
||||
@property(nonatomic,strong) NSNumber *clSloganTextHidden;
|
||||
|
||||
/*闪验SLOGAN
|
||||
注: 供应商品牌标签("闪验提供认技术支持")
|
||||
**/
|
||||
/// slogan文字字体
|
||||
@property(nonatomic,strong) UIFont *clShanYanSloganTextFont;
|
||||
/// slogan文字颜色
|
||||
@property(nonatomic,strong) UIColor*clShanYanSloganTextColor;
|
||||
/// slogan文字对齐方式 NSTextAlignment eg.@(NSTextAlignmentCenter)
|
||||
@property(nonatomic,strong) NSNumber *clShanYanSloganTextAlignment;
|
||||
/// slogan默认隐藏 eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber*clShanYanSloganHidden;
|
||||
|
||||
|
||||
/**************************** CheckBox相关 ***************************/
|
||||
|
||||
/*CheckBox
|
||||
*协议勾选框,默认选中且在协议前显示
|
||||
*可在sdk_oauth.bundle中替换checkBox_unSelected、checkBox_selected图片
|
||||
*也可以通过属性设置选中和未选择图片
|
||||
**/
|
||||
/// 协议勾选框(默认显示,放置在协议之前)BOOL eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber *clCheckBoxHidden;
|
||||
/// 协议勾选框默认值(默认选中)BOOL eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber *clCheckBoxValue;
|
||||
/// 协议勾选框 尺寸 NSValue->CGSize eg.[NSValue valueWithCGSize:CGSizeMake(25, 25)]
|
||||
@property(nonatomic,strong) NSValue *clCheckBoxSize;
|
||||
/// 协议勾选框 UIButton.image图片缩进 UIEdgeInset eg.[NSValue valueWithUIEdgeInsets:UIEdgeInsetsMake(2, 2, 2, 2)]
|
||||
@property(nonatomic,strong) NSValue *clCheckBoxImageEdgeInsets;
|
||||
/// 协议勾选框 设置CheckBox顶部与隐私协议控件顶部对齐 YES或大于0生效 eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber *clCheckBoxVerticalAlignmentToAppPrivacyTop;
|
||||
/// 协议勾选框 设置CheckBox对齐后的偏移量,相对于对齐后的中心距离在当前垂直方向上的偏移
|
||||
@property(nonatomic,strong) NSNumber *clCheckBoxVerticalAlignmentOffset;
|
||||
|
||||
/// 协议勾选框 设置CheckBox顶部与隐私协议控件竖向中心对齐 YES或大于0生效 eg.@(YES)
|
||||
@property(nonatomic,strong) NSNumber *clCheckBoxVerticalAlignmentToAppPrivacyCenterY;
|
||||
/// 协议勾选框 非选中状态图片
|
||||
@property(nonatomic,strong) UIImage*clCheckBoxUncheckedImage;
|
||||
/// 协议勾选框 选中状态图片
|
||||
@property(nonatomic,strong) UIImage*clCheckBoxCheckedImage;
|
||||
|
||||
/**授权页自定义 "请勾选协议"提示框
|
||||
- containerView为loading的全屏蒙版view
|
||||
- 请自行在containerView添加自定义提示
|
||||
*/
|
||||
@property(nonatomic,copy)void(^checkBoxTipView)(UIView *containerView);
|
||||
/// checkBox 未勾选时 提示文本,默认:"请勾选协议"
|
||||
@property(nonatomic,copy) NSString *clCheckBoxTipMsg;
|
||||
/// 使用sdk内部“一键登录”按钮点击时的吐丝提示("请勾选协议") - NO:默认使用sdk内部吐丝 YES:禁止使用
|
||||
@property(nonatomic,strong) NSNumber *clCheckBoxTipDisable;
|
||||
|
||||
|
||||
/**************************** Loading相关 ***************************/
|
||||
|
||||
/// Loading 大小 CGSize eg.[NSValue valueWithCGSize:CGSizeMake(50, 50)]
|
||||
@property(nonatomic,strong) NSValue *clLoadingSize;
|
||||
/// Loading 圆角 float eg.@(5)
|
||||
@property(nonatomic,strong) NSNumber *clLoadingCornerRadius;
|
||||
/// Loading 背景色 UIColor eg.[UIColor colorWithRed:0.8 green:0.5 blue:0.8 alpha:0.8];
|
||||
@property(nonatomic,strong) UIColor *clLoadingBackgroundColor;
|
||||
/// UIActivityIndicatorViewStyle eg.@(UIActivityIndicatorViewStyleWhiteLarge)
|
||||
@property(nonatomic,strong) NSNumber *clLoadingIndicatorStyle;
|
||||
/// Loading Indicator渲染色 UIColor eg.[UIColor greenColor];
|
||||
@property(nonatomic,strong) UIColor *clLoadingTintColor;
|
||||
/// 授权页自定义Loading
|
||||
/// - containerView为loading的全屏蒙版view
|
||||
/// - 请自行在containerView添加自定义loading
|
||||
/// - 设置block后,上述loading属性将无效
|
||||
@property(nonatomic,copy)void(^loadingView)(UIView *containerView);
|
||||
|
||||
/**添加自定义控件*/
|
||||
/// 可设置背景色及添加控件
|
||||
@property(nonatomic,copy)void(^customAreaView)(UIView *customAreaView);
|
||||
/// 设置隐私协议弹窗
|
||||
@property(nonatomic,copy)void(^customPrivacyAlertView)(UIViewController *authPageVC);
|
||||
|
||||
/**横竖屏*/
|
||||
/// 是否支持自动旋转 BOOL
|
||||
@property(nonatomic,strong) NSNumber *shouldAutorotate;
|
||||
|
||||
/// 支持方向 UIInterfaceOrientationMask
|
||||
/// - 如果设置只支持竖屏,只需设置clOrientationLayOutPortrait竖屏布局对象
|
||||
/// - 如果设置只支持横屏,只需设置clOrientationLayOutLandscape横屏布局对象
|
||||
/// - 横竖屏均支持,需同时设置clOrientationLayOutPortrait和clOrientationLayOutLandscape
|
||||
@property(nonatomic,strong) NSNumber *supportedInterfaceOrientations;
|
||||
/// 默认方向 UIInterfaceOrientation
|
||||
@property(nonatomic,strong) NSNumber *preferredInterfaceOrientationForPresentation;
|
||||
|
||||
/**以窗口方式显示授权页
|
||||
*/
|
||||
/// 以窗口方式显示 BOOL, default is NO
|
||||
@property(nonatomic,strong) NSNumber *clAuthTypeUseWindow;
|
||||
/// 窗口圆角 float
|
||||
@property(nonatomic,strong) NSNumber *clAuthWindowCornerRadius;
|
||||
|
||||
/// clAuthWindowModalTransitionStyle系统自带的弹出方式 仅支持以下三种
|
||||
/// - UIModalTransitionStyleCoverVertical 底部弹出
|
||||
/// - UIModalTransitionStyleCrossDissolve 淡入
|
||||
/// - UIModalTransitionStyleFlipHorizontal 翻转显示
|
||||
@property(nonatomic,strong) NSNumber *clAuthWindowModalTransitionStyle;
|
||||
|
||||
/**UIModalPresentationStyle
|
||||
*若使用窗口模式,请设置为UIModalPresentationOverFullScreen 或不设置
|
||||
*iOS13强制全屏,请设置为UIModalPresentationFullScreen
|
||||
*UIModalPresentationAutomatic API_AVAILABLE(ios(13.0)) = -2
|
||||
*默认UIModalPresentationFullScreen
|
||||
*eg. @(UIModalPresentationOverFullScreen)
|
||||
*/
|
||||
/// 授权页 ModalPresentationStyle
|
||||
@property(nonatomic,strong) NSNumber *clAuthWindowModalPresentationStyle;
|
||||
/// 协议页 ModalPresentationStyle (授权页使用窗口模式时,协议页强制使用模态弹出)
|
||||
@property(nonatomic,strong) NSNumber *clAppPrivacyWebModalPresentationStyle;
|
||||
|
||||
/**UIUserInterfaceStyle
|
||||
*UIUserInterfaceStyleUnspecified - 不指定样式,跟随系统设置进行展示
|
||||
*UIUserInterfaceStyleLight - 明亮
|
||||
*UIUserInterfaceStyleDark, - 暗黑 仅对iOS13+系统有效
|
||||
*/
|
||||
/// 授权页 UIUserInterfaceStyle,默认:UIUserInterfaceStyleLight,eg. @(UIUserInterfaceStyleLight)
|
||||
@property(nonatomic,strong) NSNumber *clAuthWindowOverrideUserInterfaceStyle;
|
||||
/// 授权页面present弹出时animate动画设置,默认带动画,eg. @(YES)
|
||||
@property(nonatomic,strong) NSNumber *clAuthWindowPresentingAnimate;
|
||||
/// sdk自带返回键:授权页面dismiss时animate动画设置,默认带动画,eg. @(YES)
|
||||
@property(nonatomic,strong) NSNumber *clAuthWindowDismissAnimate;
|
||||
/// 弹窗的MaskLayer,用于自定义窗口形状
|
||||
@property(nonatomic,strong) CALayer *clAuthWindowMaskLayer;
|
||||
|
||||
/// 竖屏布局配置对象 -->创建一个布局对象,设置好控件约束属性值,再设置到此属性中
|
||||
/**竖屏:UIInterfaceOrientationPortrait|UIInterfaceOrientationPortraitUpsideDown
|
||||
*eg. CLUIConfigure *baseUIConfigure = [CLUIConfigure new];
|
||||
* CLOrientationLayOut *clOrientationLayOutPortrait = [CLOrientationLayOut new];
|
||||
* clOrientationLayOutPortrait.clLayoutPhoneCenterY = @(0);
|
||||
* clOrientationLayOutPortrait.clLayoutPhoneLeft = @(50*screenScale);
|
||||
* ...
|
||||
* baseUIConfigure.clOrientationLayOutPortrait = clOrientationLayOutPortrait;
|
||||
*/
|
||||
@property(nonatomic,strong) CLOrientationLayOut *clOrientationLayOutPortrait;
|
||||
|
||||
/// 横屏布局配置对象 -->创建一个布局对象,设置好控件约束属性值,再设置到此属性中
|
||||
/**横屏:UIInterfaceOrientationLandscapeLeft|UIInterfaceOrientationLandscapeRight
|
||||
*eg. CLUIConfigure *baseUIConfigure = [CLUIConfigure new];
|
||||
* CLOrientationLayOut *clOrientationLayOutLandscape = [CLOrientationLayOut new];
|
||||
* clOrientationLayOutLandscape.clLayoutPhoneCenterY = @(0);
|
||||
* clOrientationLayOutLandscape.clLayoutPhoneLeft = @(50*screenScale);
|
||||
* ...
|
||||
* baseUIConfigure.clOrientationLayOutLandscape = clOrientationLayOutLandscape;
|
||||
*/
|
||||
@property(nonatomic,strong) CLOrientationLayOut *clOrientationLayOutLandscape;
|
||||
|
||||
/// 默认界面配置
|
||||
+ (CLUIConfigure *)clDefaultUIConfigure;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
/**横竖屏布局配置对象
|
||||
配置页面布局相关属性
|
||||
*/
|
||||
@interface CLOrientationLayOut : NSObject
|
||||
/**LOGO图片*/
|
||||
/// 约束均相对vc.view
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLogoLeft;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLogoTop;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLogoRight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLogoBottom;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLogoWidth;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLogoHeight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLogoCenterX;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLogoCenterY;
|
||||
|
||||
/**手机号显示控件*/
|
||||
/// layout 约束均相对vc.view
|
||||
@property(nonatomic,strong) NSNumber *clLayoutPhoneLeft;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutPhoneTop;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutPhoneRight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutPhoneBottom;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutPhoneWidth;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutPhoneHeight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutPhoneCenterX;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutPhoneCenterY;
|
||||
|
||||
/** 一键登录按钮 控件
|
||||
注: 一键登录授权按钮 不得隐藏
|
||||
*/
|
||||
/// layout 约束均相对vc.view
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLoginBtnLeft;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLoginBtnTop;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLoginBtnRight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLoginBtnBottom;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLoginBtnWidth;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLoginBtnHeight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLoginBtnCenterX;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutLoginBtnCenterY;
|
||||
|
||||
/** 隐私条款Privacy
|
||||
注: 运营商隐私条款 不得隐藏, 用户条款不限制
|
||||
*/
|
||||
/// layout 约束均相对vc.view
|
||||
@property(nonatomic,strong) NSNumber *clLayoutAppPrivacyLeft;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutAppPrivacyTop;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutAppPrivacyRight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutAppPrivacyBottom;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutAppPrivacyWidth;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutAppPrivacyHeight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutAppPrivacyCenterX;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutAppPrivacyCenterY;
|
||||
|
||||
/** Slogan 运营商品牌标签:"认证服务由中国移动/联通/电信提供" label
|
||||
注: 运营商品牌标签,不得隐藏
|
||||
*/
|
||||
/// layout 约束均相对vc.view
|
||||
@property(nonatomic,strong) NSNumber *clLayoutSloganLeft;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutSloganTop;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutSloganRight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutSloganBottom;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutSloganWidth;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutSloganHeight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutSloganCenterX;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutSloganCenterY;
|
||||
|
||||
/** 闪验Slogan 供应商品牌标签:"闪验提供技术支持" label */
|
||||
/// layout 约束均相对vc.view
|
||||
@property(nonatomic,strong) NSNumber *clLayoutShanYanSloganLeft;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutShanYanSloganTop;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutShanYanSloganRight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutShanYanSloganBottom;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutShanYanSloganWidth;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutShanYanSloganHeight;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutShanYanSloganCenterX;
|
||||
@property(nonatomic,strong) NSNumber *clLayoutShanYanSloganCenterY;
|
||||
|
||||
/** 窗口模式 */
|
||||
/// 窗口中心:CGPoint X Y
|
||||
@property(nonatomic,strong) NSValue *clAuthWindowOrientationCenter;
|
||||
/// 窗口左上角:frame.origin:CGPoint X Y
|
||||
@property(nonatomic,strong) NSValue *clAuthWindowOrientationOrigin;
|
||||
/// 窗口大小:宽 float
|
||||
@property(nonatomic,strong) NSNumber *clAuthWindowOrientationWidth;
|
||||
/// 窗口大小:高 float
|
||||
@property(nonatomic,strong) NSNumber *clAuthWindowOrientationHeight;
|
||||
|
||||
/// 默认布局配置 - 用于快速展示默认界面。定制UI时,请重新创建CLOrientationLayOut对象再设置属性,以避免和默认约束冲突
|
||||
+ (CLOrientationLayOut *)clDefaultOrientationLayOut;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
20
Pods/CL_ShanYanSDK/framework/CL_ShanYanSDK.framework/Headers/CL_ShanYanSDK.h
generated
Executable file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// CL_ShanYanSDK.h
|
||||
// CL_ShanYanSDK
|
||||
//
|
||||
// Created by wanglijun on 2018/10/29.
|
||||
// Copyright © 2018 wanglijun. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for CL_ShanYanSDK.
|
||||
FOUNDATION_EXPORT double CL_ShanYanSDKVersionNumber;
|
||||
|
||||
//! Project version string for CL_ShanYanSDK.
|
||||
FOUNDATION_EXPORT const unsigned char CL_ShanYanSDKVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <CL_ShanYanSDK/PublicHeader.h>
|
||||
#import <CL_ShanYanSDK/CLShanYanSDKManager.h>
|
||||
#import <CL_ShanYanSDK/CLCompleteResult.h>
|
||||
#import <CL_ShanYanSDK/CLFaceIDTool.h>
|
||||
BIN
Pods/CL_ShanYanSDK/framework/CL_ShanYanSDK.framework/Info.plist
generated
Executable file
6
Pods/CL_ShanYanSDK/framework/CL_ShanYanSDK.framework/Modules/module.modulemap
generated
Executable file
@@ -0,0 +1,6 @@
|
||||
framework module CL_ShanYanSDK {
|
||||
umbrella header "CL_ShanYanSDK.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
BIN
Pods/CL_ShanYanSDK/framework/EAccountApiSDK.framework/EAccountApiSDK
generated
Executable file
23
Pods/CL_ShanYanSDK/framework/EAccountApiSDK.framework/Headers/EAccountCTEConfig.h
generated
Executable file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// EAccountCTEConfig.h
|
||||
// EAccountApiSDK
|
||||
//
|
||||
// Created by lvzhzh on 2019/12/4.
|
||||
// Copyright © 2019 21CN. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface EAccountCTEConfig : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *timestampDomain;
|
||||
@property (nonatomic, copy) NSString *preLoginDomain;
|
||||
@property (nonatomic, copy) NSString *uploadLogDomain;
|
||||
|
||||
- (instancetype)initWithDefaultConfig;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
172
Pods/CL_ShanYanSDK/framework/EAccountApiSDK.framework/Headers/EAccountGCDAsyncSocket.h
generated
Executable file
@@ -0,0 +1,172 @@
|
||||
|
||||
// https://github.com/robbiehanson/CocoaAsyncSocket
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Security/Security.h>
|
||||
#import <Security/SecureTransport.h>
|
||||
#import <dispatch/dispatch.h>
|
||||
#import <Availability.h>
|
||||
|
||||
#include <sys/socket.h> // AF_INET, AF_INET6
|
||||
|
||||
#define EAccountAsyncSocketSSLPeerName (NSString *)kCFStreamSSLPeerName
|
||||
|
||||
@class EAGCDAsyncReadPacket;
|
||||
@class EAGCDAsyncWritePacket;
|
||||
@class EAGCDAsyncSocketPreBuffer;
|
||||
@protocol GCDAsyncSocketDelegate;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
extern NSString *const EAGCDAsyncSocketException;
|
||||
extern NSString *const EAGCDAsyncSocketErrorDomain;
|
||||
|
||||
extern NSString *const EAGCDAsyncSocketQueueName;
|
||||
extern NSString *const EAGCDAsyncSocketThreadName;
|
||||
|
||||
extern NSString *const EAGCDAsyncSocketManuallyEvaluateTrust;
|
||||
extern NSString *const EAGCDAsyncSocketUseCFStreamForTLS;
|
||||
|
||||
#define GCDAsyncSocketSSLPeerName (NSString *)kCFStreamSSLPeerName
|
||||
|
||||
extern NSString *const EAGCDAsyncSocketSSLPeerID;
|
||||
extern NSString *const EAGCDAsyncSocketSSLProtocolVersionMin;
|
||||
extern NSString *const EAGCDAsyncSocketSSLProtocolVersionMax;
|
||||
extern NSString *const EAGCDAsyncSocketSSLSessionOptionFalseStart;
|
||||
extern NSString *const EAGCDAsyncSocketSSLSessionOptionSendOneByteRecord;
|
||||
extern NSString *const EAGCDAsyncSocketSSLCipherSuites;
|
||||
|
||||
#define GCDAsyncSocketLoggingContext 65535
|
||||
|
||||
typedef NS_ENUM(NSInteger, GCDAsyncSocketError) {
|
||||
GCDAsyncSocketNoError = 0, // Never used
|
||||
GCDAsyncSocketBadConfigError, // Invalid configuration
|
||||
GCDAsyncSocketBadParamError, // Invalid parameter was passed
|
||||
GCDAsyncSocketConnectTimeoutError, // A connect operation timed out
|
||||
GCDAsyncSocketReadTimeoutError, // A read operation timed out
|
||||
GCDAsyncSocketWriteTimeoutError, // A write operation timed out
|
||||
GCDAsyncSocketReadMaxedOutError, // Reached set maxLength without completing
|
||||
GCDAsyncSocketClosedError, // The remote peer closed the connection
|
||||
GCDAsyncSocketOtherError, // Description provided in userInfo
|
||||
};
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@interface EAccountGCDAsyncSocket : NSObject
|
||||
|
||||
- (instancetype)initWithDelegate:(nullable id<GCDAsyncSocketDelegate>)aDelegate delegateQueue:(nullable dispatch_queue_t)dq;
|
||||
- (instancetype)initWithDelegate:(nullable id<GCDAsyncSocketDelegate>)aDelegate delegateQueue:(nullable dispatch_queue_t)dq socketQueue:(nullable dispatch_queue_t)sq;
|
||||
|
||||
#pragma mark Configuration
|
||||
|
||||
@property (atomic, weak, readwrite, nullable) id<GCDAsyncSocketDelegate> delegate;
|
||||
@property (atomic, strong, readwrite, nullable) dispatch_queue_t delegateQueue;
|
||||
|
||||
- (void)setDelegate:(nullable id<GCDAsyncSocketDelegate>)delegate delegateQueue:(nullable dispatch_queue_t)delegateQueue;
|
||||
|
||||
|
||||
@property (atomic, assign, readwrite, getter=isIPv4Enabled) BOOL IPv4Enabled;
|
||||
@property (atomic, assign, readwrite, getter=isIPv6Enabled) BOOL IPv6Enabled;
|
||||
|
||||
@property (atomic, assign, readwrite, getter=isIPv4PreferredOverIPv6) BOOL IPv4PreferredOverIPv6;
|
||||
|
||||
#pragma mark Connecting
|
||||
|
||||
- (BOOL)connectToHost:(NSString *)host
|
||||
onPort:(uint16_t)port
|
||||
withTimeout:(NSTimeInterval)timeout
|
||||
error:(NSError **)errPtr;
|
||||
|
||||
- (BOOL)connectToHost:(NSString *)host
|
||||
onPort:(uint16_t)port
|
||||
viaInterface:(nullable NSString *)interface
|
||||
withTimeout:(NSTimeInterval)timeout
|
||||
error:(NSError **)errPtr;
|
||||
|
||||
- (void)readDataToLength:(NSUInteger)length withTimeout:(NSTimeInterval)timeout tag:(long)tag;
|
||||
|
||||
#pragma mark Disconnecting
|
||||
|
||||
- (void)disconnect;
|
||||
|
||||
#pragma mark Diagnostics
|
||||
|
||||
@property (atomic, readonly) BOOL isDisconnected;
|
||||
@property (atomic, readonly) BOOL isConnected;
|
||||
|
||||
@property (atomic, readonly, nullable) NSString *connectedHost;
|
||||
@property (atomic, readonly) uint16_t connectedPort;
|
||||
|
||||
|
||||
@property (atomic, readonly) BOOL isIPv4;
|
||||
@property (atomic, readonly) BOOL isIPv6;
|
||||
|
||||
@property (atomic, readonly) BOOL isSecure;
|
||||
|
||||
#pragma mark Reading
|
||||
- (void)readDataToData:(NSData *)data withTimeout:(NSTimeInterval)timeout tag:(long)tag;
|
||||
|
||||
- (void)readDataToData:(NSData *)data
|
||||
withTimeout:(NSTimeInterval)timeout
|
||||
buffer:(nullable NSMutableData *)buffer
|
||||
bufferOffset:(NSUInteger)offset
|
||||
maxLength:(NSUInteger)length
|
||||
tag:(long)tag;
|
||||
|
||||
#pragma mark Writing
|
||||
|
||||
- (void)writeData:(NSData *)data withTimeout:(NSTimeInterval)timeout tag:(long)tag;
|
||||
|
||||
#pragma mark Security
|
||||
|
||||
- (void)startTLS:(nullable NSDictionary <NSString*,NSObject*>*)tlsSettings;
|
||||
|
||||
#pragma mark Advanced
|
||||
- (int)socketFD;
|
||||
- (int)socket4FD;
|
||||
- (int)socket6FD;
|
||||
- (nullable CFReadStreamRef)readStream;
|
||||
- (nullable CFWriteStreamRef)writeStream;
|
||||
|
||||
- (nullable SSLContextRef)sslContext;
|
||||
|
||||
#pragma mark Utilities
|
||||
|
||||
+ (nullable NSMutableArray *)lookupHost:(NSString *)host port:(uint16_t)port error:(NSError **)errPtr;
|
||||
+ (uint16_t)portFromAddress:(NSData *)address;
|
||||
|
||||
+ (BOOL)isIPv4Address:(NSData *)address;
|
||||
+ (BOOL)isIPv6Address:(NSData *)address;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@protocol GCDAsyncSocketDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
- (void)socket:(EAccountGCDAsyncSocket *)sock didAcceptNewSocket:(EAccountGCDAsyncSocket *)newSocket;
|
||||
- (void)socket:(EAccountGCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port;
|
||||
- (void)socket:(EAccountGCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag;
|
||||
- (void)socket:(EAccountGCDAsyncSocket *)sock didReadPartialDataOfLength:(NSUInteger)partialLength tag:(long)tag;
|
||||
- (void)socket:(EAccountGCDAsyncSocket *)sock didWriteDataWithTag:(long)tag;
|
||||
- (void)socket:(EAccountGCDAsyncSocket *)sock didWritePartialDataOfLength:(NSUInteger)partialLength tag:(long)tag;
|
||||
|
||||
- (NSTimeInterval)socket:(EAccountGCDAsyncSocket *)sock shouldTimeoutReadWithTag:(long)tag
|
||||
elapsed:(NSTimeInterval)elapsed
|
||||
bytesDone:(NSUInteger)length;
|
||||
|
||||
- (NSTimeInterval)socket:(EAccountGCDAsyncSocket *)sock shouldTimeoutWriteWithTag:(long)tag
|
||||
elapsed:(NSTimeInterval)elapsed
|
||||
bytesDone:(NSUInteger)length;
|
||||
- (void)socketDidCloseReadStream:(EAccountGCDAsyncSocket *)sock;
|
||||
|
||||
- (void)socketDidDisconnect:(EAccountGCDAsyncSocket *)sock withError:(nullable NSError *)err;
|
||||
|
||||
- (void)socketDidSecure:(EAccountGCDAsyncSocket *)sock;
|
||||
|
||||
- (void)socket:(EAccountGCDAsyncSocket *)sock didReceiveTrust:(SecTrustRef)trust
|
||||
completionHandler:(void (^)(BOOL shouldTrustPeer))completionHandler;
|
||||
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
32
Pods/CL_ShanYanSDK/framework/EAccountApiSDK.framework/Headers/EAccountJSEventHandler.h
generated
Executable file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// EAccountJSEventHandler.h
|
||||
// EAccountApiSDK
|
||||
//
|
||||
// Created by Reticence Lee on 2020/6/9.
|
||||
// Copyright © 2020 21CN. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <webkit/webkit.h>
|
||||
|
||||
static NSString * const EAccountJSEventName = @"EAccountJsBridge";
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol EAccountJSEventDelegate <NSObject>
|
||||
|
||||
@required
|
||||
- (void)EAccountJSCallBackWithScript:(NSString *)jScript;
|
||||
|
||||
@end
|
||||
|
||||
@interface EAccountJSEventHandler : NSObject<WKScriptMessageHandler>
|
||||
|
||||
@property (nonatomic, strong) WKWebView *wkWebView;
|
||||
@property (nonatomic, weak) id <EAccountJSEventDelegate> delegate;
|
||||
|
||||
- (void)EAccountHandleJsEvents:(WKScriptMessage *)message credt:(id)credt;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
39
Pods/CL_ShanYanSDK/framework/EAccountApiSDK.framework/Headers/EAccountPreLoginConfigModel.h
generated
Executable file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// EAccountPreLoginConfigModel.h
|
||||
// EAccountApiSDK
|
||||
//
|
||||
// Created by Reticence Lee on 2019/12/12.
|
||||
// Copyright © 2019 21CN. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface EAccountPreLoginConfigModel : NSObject
|
||||
|
||||
/**
|
||||
资源获取超时时间 默认6.0s
|
||||
*/
|
||||
@property (nonatomic, assign) NSTimeInterval timeoutIntervalForResource;
|
||||
|
||||
/**
|
||||
连接超时时间 默认6.0s
|
||||
*/
|
||||
@property (nonatomic, assign) NSTimeInterval connectTimeoutInterval;
|
||||
|
||||
/**
|
||||
总超时时间 默认8.0s ,应设置比其他超时时间长
|
||||
*/
|
||||
@property (nonatomic, assign) NSTimeInterval totalTimeoutInterval;
|
||||
|
||||
#pragma -mark 初始化方法
|
||||
|
||||
/**
|
||||
初始化方法 请调用该方法进行初始化
|
||||
*/
|
||||
- (instancetype)initWithDefaultConfig;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
87
Pods/CL_ShanYanSDK/framework/EAccountApiSDK.framework/Headers/EAccountSDK.h
generated
Executable file
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// EAccountSDK.h
|
||||
// EAccountSDKNetwork
|
||||
//
|
||||
// Created by thy on 2018/6/23.
|
||||
// Copyright © 2018年 21CN. All rights reserved.
|
||||
//
|
||||
|
||||
/**
|
||||
定制版SDK v4.0.0 20220629
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "EAccountPreLoginConfigModel.h"
|
||||
#import "EAccountCTEConfig.h"
|
||||
|
||||
/**
|
||||
声明一个block
|
||||
@param resultDic 网络返回的data的解析结果
|
||||
*/
|
||||
typedef void (^successHandler) (NSDictionary * _Nonnull resultDic);
|
||||
|
||||
/**
|
||||
声明一个block
|
||||
@param error 网络返回的错误或者其它错误
|
||||
*/
|
||||
typedef void (^failureHandler) (NSError * _Nonnull error);
|
||||
|
||||
@interface EAccountSDK : NSObject
|
||||
|
||||
/**
|
||||
初始化SDK
|
||||
@param appKey 接入方在账号平台领取的appId
|
||||
@param appSecrect 接入方在账号平台领取的appSecrect
|
||||
*/
|
||||
+ (void)initWithSelfKey:(NSString * _Nonnull)appKey
|
||||
appSecret:(NSString * _Nonnull)appSecrect;
|
||||
|
||||
/**
|
||||
*@description 预登录接口
|
||||
@param model 接口超时时间配置
|
||||
*/
|
||||
|
||||
+ (void)requestPRELogin:(EAccountPreLoginConfigModel * _Nonnull)model
|
||||
completion:(nonnull successHandler)completion
|
||||
failure:(nonnull failureHandler)fail;
|
||||
|
||||
/**
|
||||
控制台日志输出控制(默认关闭)
|
||||
@param enable 开关参数
|
||||
*/
|
||||
+ (void)printConsoleEnable:(BOOL)enable;
|
||||
|
||||
/**
|
||||
@description 获取当前流量卡运营商信息
|
||||
@return NSString "CT" 中国电信 / "CM" 中国移动 / "CU" 中国联联通 / "UN" 未知
|
||||
*/
|
||||
+ (NSString *)getOperatorType;
|
||||
|
||||
/**
|
||||
@description 是否开启蜂窝数据
|
||||
*/
|
||||
+ (BOOL)isCellularDataEnable;
|
||||
|
||||
/**
|
||||
@description 预登录接口 已废弃
|
||||
@param apiTimeoutInterval 接口超时时间,传0或者小于0的数,则默认为3s
|
||||
*/
|
||||
+ (void)requestPreLogin:(NSTimeInterval)apiTimeoutInterval
|
||||
completion:(nonnull successHandler)completion
|
||||
failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Please use `requestPRELogin:completion:failure:` instead");
|
||||
|
||||
/**
|
||||
@description 预登录接口 已废弃
|
||||
@param apiTimeoutInterval 接口超时时间,传0或者小于0的数,则默认为3s
|
||||
*/
|
||||
+ (void)getMobileCodeWithTimeout:(NSTimeInterval)apiTimeoutInterval
|
||||
completion:(nonnull successHandler)completion
|
||||
failure:(nonnull failureHandler)fail DEPRECATED_MSG_ATTRIBUTE("Please use `requestPreLogin:completion:failure:` instead");
|
||||
|
||||
+ (void)setDomainName:(EAccountCTEConfig * _Nonnull)config;
|
||||
|
||||
#pragma -mark ----------------other method-----------------------
|
||||
|
||||
+ (void)startReportLog:(NSMutableDictionary * _Nonnull)logDic;
|
||||
|
||||
@end
|
||||
BIN
Pods/CL_ShanYanSDK/framework/EAccountApiSDK.framework/Info.plist
generated
Executable file
67
Pods/CL_ShanYanSDK/framework/OAuth.framework/Headers/ZUOAuthManager.h
generated
Executable file
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// ZUOAuthManager 联通能力接入管理者
|
||||
// OAuthSDKApp
|
||||
//
|
||||
// Created by zhangQY on 2019/5/13.
|
||||
// Copyright © 2019 com.zzx.sdk.ios.test. All rights reserved.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ZUOAuthManager : NSObject
|
||||
|
||||
|
||||
/**
|
||||
* 获取联通能力接入单例对象
|
||||
*/
|
||||
+ (instancetype)getInstance;
|
||||
|
||||
|
||||
/**
|
||||
* 初始化方法
|
||||
*/
|
||||
- (void) init:(NSString*) apiKey pubKey:(NSString*)pubKey;
|
||||
|
||||
|
||||
/**
|
||||
* 预取号接口
|
||||
*/
|
||||
- (void)login:(double)timeout resultListener:(void (^)(NSDictionary *data))listener;
|
||||
|
||||
|
||||
/**
|
||||
* 清除缓存 ***注意***:SDK取号默认会使用缓存机制,请及时清理缓存;
|
||||
*/
|
||||
+ (BOOL)clearCULoginCache;
|
||||
|
||||
|
||||
/**
|
||||
* 认证-联通
|
||||
注意***:在不手动关闭缓存的时,请及时调用清除缓存方法
|
||||
*/
|
||||
- (void) oauth:(double)timeout resultListener:(void (^)(NSDictionary *data))listener;
|
||||
|
||||
|
||||
/** 联通认证:是否关闭缓存策略(默认开启)
|
||||
请注意及时调用clearOauthCache方法清除缓存;
|
||||
手动关闭后,不必调用clearOauthCache;
|
||||
@param yesOrNo 是否关闭联通认证缓存策略
|
||||
*/
|
||||
+ (void) closeCUOauthCachingStrategy:(BOOL)yesOrNo;
|
||||
|
||||
|
||||
/**
|
||||
联通认证:
|
||||
清除联通认证缓存策略中产生的缓存数据;
|
||||
在手动关闭缓存策略时,不必调用;
|
||||
*/
|
||||
+ (BOOL) clearCUOauthCache;
|
||||
|
||||
|
||||
#pragma mark - 其他方法
|
||||
+ (void) setDebug:(BOOL) ISD ;
|
||||
+ (void) useSchemeBInSecurityModule:(BOOL)schemeB;
|
||||
+ (void)setUAString:(NSString *)UAString;
|
||||
+ (void)removeUAString;
|
||||
+ (NSString *)getVersionInfo;
|
||||
@end
|
||||
BIN
Pods/CL_ShanYanSDK/framework/OAuth.framework/Info.plist
generated
Executable file
BIN
Pods/CL_ShanYanSDK/framework/OAuth.framework/OAuth
generated
Executable file
9
Pods/CL_ShanYanSDK/framework/TYRZUISDK.framework/Headers/TYRZUISDK.h
generated
Executable file
@@ -0,0 +1,9 @@
|
||||
//
|
||||
// TYRZUISDK.h
|
||||
// TYRZSDK
|
||||
//
|
||||
|
||||
#import "UAFSDKLogin.h"
|
||||
#import "UAFSDKErrorCode.h"
|
||||
#import "UAFEnums.h"
|
||||
#import "UAFCustomModel.h"
|
||||
163
Pods/CL_ShanYanSDK/framework/TYRZUISDK.framework/Headers/UAFCustomModel.h
generated
Executable file
@@ -0,0 +1,163 @@
|
||||
//
|
||||
// UAFCustomModel.h
|
||||
// Test
|
||||
//
|
||||
// Created by issuser on 2018/5/18.
|
||||
// Copyright © 2018年 林涛. All rights reserved.
|
||||
//
|
||||
|
||||
#import "UAFEnums.h"
|
||||
|
||||
@interface UAFCustomModel : NSObject
|
||||
|
||||
/**
|
||||
版本注意事项:
|
||||
授权页面的各个控件的Y轴默认值都是以375*667屏幕为基准 系数 : 当前屏幕高度/667
|
||||
1、当设置Y轴并有效时 偏移量OffsetY属于相对导航栏的绝对Y值
|
||||
2、(负数且超出当前屏幕无效)为保证各个屏幕适配,请自行设置好Y轴在屏幕上的比例(推荐:当前屏幕高度/667)
|
||||
*/
|
||||
|
||||
#pragma mark -----------------------------授权页面----------------------------------
|
||||
|
||||
#pragma mark VC必传属性
|
||||
/**当前VC,注意:要用一键登录这个值必传*/
|
||||
@property (nonatomic,weak) UIViewController *currentVC;
|
||||
|
||||
#pragma mark 自定义控件
|
||||
/**授权界面自定义控件View的Block*/
|
||||
@property (nonatomic,copy) void(^authViewBlock)(UIView *customView, CGRect numberFrame,CGRect loginBtnFrame, CGRect checkBoxFrame , CGRect privacyFrame);
|
||||
/**授权页面是否需要弹出动画*/
|
||||
@property (nonatomic, assign) BOOL presentAnimated;
|
||||
/**授权页面弹出的动画效果:参考UAPresentationDirection枚举*/
|
||||
@property (nonatomic, assign) UAPresentationDirection presentType;
|
||||
/**授权界面背景图片*/
|
||||
@property (nonatomic,strong) UIImage *authPageBackgroundImage;
|
||||
/**自定义Loading View(回调默认关闭,如需自己控制关闭,则用keywindow并在一键登录回调中关闭)*/
|
||||
@property (nonatomic,copy) void(^authLoadingViewBlock)(UIView *loadingView);
|
||||
#pragma mark 登录按钮
|
||||
/**登录按钮文本*/
|
||||
@property (nonatomic,strong) NSAttributedString *logBtnText;
|
||||
/**登录按钮Y偏移量*/
|
||||
@property (nonatomic,strong) NSNumber * logBtnOffsetY;
|
||||
/**登录按钮的左右边距 注意:按钮呈现的宽度在竖屏时必须大于屏幕的一半,横屏时必须大于屏幕的三分之一
|
||||
示例:@[@50,@70] 只能两个元素
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray <NSNumber *> *logBtnOriginLR;
|
||||
/**登录按钮高h 注意:必须大于40*/
|
||||
@property (nonatomic, assign) CGFloat logBtnHeight;
|
||||
/**1登录按钮背景图片添加到数组(顺序如下)
|
||||
@[激活状态的图片,失效状态的图片,高亮状态的图片]
|
||||
*/
|
||||
@property (nonatomic,strong) NSArray *logBtnImgs;
|
||||
/**登录按钮高距离底部的高度*/
|
||||
@property (nonatomic, strong) NSNumber *logBtnOffsetY_B;
|
||||
|
||||
#pragma mark 号码框设置
|
||||
/**手机号码富文本属性 */
|
||||
@property (nonatomic,strong) NSDictionary<NSAttributedStringKey,id> *numberTextAttributes;
|
||||
/**号码栏X偏移量*/
|
||||
@property (nonatomic,strong) NSNumber * numberOffsetX;
|
||||
/**号码栏Y偏移量 numberOffsetY优先级高于numberOffsetY_B*/
|
||||
@property (nonatomic,strong) NSNumber * numberOffsetY;
|
||||
/**号码栏Y偏移量(基于底部)*/
|
||||
@property (nonatomic,strong) NSNumber * numberOffsetY_B;
|
||||
|
||||
#pragma mark 隐私条款
|
||||
/**复选框未选中时图片*/
|
||||
@property (nonatomic,strong) UIImage *uncheckedImg;
|
||||
/**复选框选中时图片*/
|
||||
@property (nonatomic,strong) UIImage *checkedImg;
|
||||
/**复选框大小(只能正方形)必须大于12*/
|
||||
@property (nonatomic,strong) NSNumber *checkboxWH;
|
||||
/**隐私条款(包括check框)的左右边距*/
|
||||
@property (nonatomic, strong) NSArray <NSNumber *> *appPrivacyOriginLR;
|
||||
/**隐私的内容模板:
|
||||
1、全句可自定义但必须保留"&&默认&&"字段表明SDK默认协议,否则设置不生效
|
||||
2、协议1和协议2的名称要与数组 str1 和 str2 ... 里的名称 一样
|
||||
3、必设置项(参考SDK的demo)
|
||||
appPrivacieDemo设置内容:登录并同意&&默认&&和&&百度协议&&、&&京东协议2&&登录并支持一键登录
|
||||
展示: 登录并同意中国移动条款协议和百度协议1、京东协议2登录并支持一键登录
|
||||
*/
|
||||
@property (nonatomic, copy) NSAttributedString *appPrivacyDemo;
|
||||
/**隐私条款默认协议是否开启书名号
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL privacySymbol;
|
||||
/**隐私条款:数组(务必按顺序)要设置NSLinkAttributeName属性可以跳转协议
|
||||
对象举例:
|
||||
NSAttributedString *str1 = [[NSAttributedString alloc]initWithString:@"百度协议" attributes:@{NSLinkAttributeName:@"https://www.baidu.com"}];
|
||||
@[str1,,str2,str3,...]
|
||||
*/
|
||||
@property (nonatomic,strong) NSArray <NSAttributedString *> *appPrivacy;
|
||||
/**隐私条款名称颜色(协议)统一设置
|
||||
*/
|
||||
@property (nonatomic,strong) UIColor *privacyColor;
|
||||
/**隐私条款Y偏移量*/
|
||||
@property (nonatomic,strong) NSNumber * privacyOffsetY;
|
||||
/**隐私条款check框默认状态 默认:NO */
|
||||
@property (nonatomic,assign) BOOL privacyState;
|
||||
/**隐私条款Y偏移量(注:此属性为与屏幕底部的距离)*/
|
||||
@property (nonatomic,strong) NSNumber *privacyOffsetY_B;
|
||||
/**隐私条款增加抖动效果 默认:NO */
|
||||
@property (nonatomic,assign) BOOL privacyUncheckAnimation;
|
||||
|
||||
#pragma mark -----------------------------------协议页面-----------------------------------
|
||||
/**web协议界面导航返回图标(尺寸根据图片大小)*/
|
||||
@property (nonatomic,strong) UIImage *webNavReturnImg;
|
||||
|
||||
/**web协议界面导航标题字体属性设置
|
||||
默认值:@{NSForegroundColorAttributeName: [UIColor whiteColor], NSFontAttributeName: [UIFont systemFontOfSize:16]}
|
||||
*/
|
||||
@property (nonatomic,strong) NSDictionary<NSAttributedStringKey, id> *webNavTitleAttrs;
|
||||
|
||||
/**web协议界面导航标题栏颜色*/
|
||||
@property (nonatomic,strong) UIColor *webNavColor;
|
||||
|
||||
#pragma mark ----------------------弹窗:(温馨提示:由于受屏幕影响,小屏幕(5S,5E,5)需要改动字体和另自适应和布局)--------------------
|
||||
#pragma mark --------------------------窗口模式1(居中弹窗) 弹框模式需要配合自定义坐标属性使用可自适应-----------------------------------
|
||||
|
||||
//务必在设置控件位置时,自行查看各个机型模拟器是否正常
|
||||
/**温馨提示:
|
||||
窗口1模式下,自动隐藏系统导航栏,并生成一个UILabel 其frame为(0,0,窗口宽*scaleW,44*scaleW)
|
||||
返回按钮的frame查看51属性备注,添加在UILabel的center.y位置
|
||||
*/
|
||||
/**窗口模式开关*/
|
||||
@property (nonatomic,assign) BOOL authWindow;
|
||||
|
||||
/**窗口模式推出动画
|
||||
UIModalTransitionStyleCoverVertical, 下推
|
||||
UIModalTransitionStyleFlipHorizontal,翻转
|
||||
UIModalTransitionStyleCrossDissolve, 淡出
|
||||
*/
|
||||
@property (nonatomic,assign) UIModalTransitionStyle modalTransitionStyle;
|
||||
|
||||
/**自定义窗口弧度 默认是10*/
|
||||
@property (nonatomic,assign) CGFloat cornerRadius;
|
||||
|
||||
/**自定义窗口宽-缩放系数(屏幕宽乘以系数) 默认是0.8*/
|
||||
@property (nonatomic,assign) CGFloat scaleW;
|
||||
|
||||
/**自定义窗口高-缩放系数(屏幕高乘以系数) 默认是0.5*/
|
||||
@property (nonatomic,assign) CGFloat scaleH;
|
||||
|
||||
#pragma mark -----------窗口模式2(边缘弹窗) UIPresentationController(可配合UAPresentationDirection动画使用)-----------
|
||||
/**此属性支持半弹框方式与authWindow不同(此方式为UIPresentationController)设置后自动隐藏切换按钮,该属性需要UIModalPresentationCustom(边缘弹窗模式下SDK默认设置)下生效*/
|
||||
@property (nonatomic,assign) CGSize controllerSize;
|
||||
/**状态栏着色样式(隐藏导航栏时设置)*/
|
||||
@property (nonatomic,assign) UIStatusBarStyle statusBarStyle;
|
||||
/**横竖屏默认属性*/
|
||||
@property (nonatomic,assign) UIInterfaceOrientation faceOrientation;
|
||||
/**模态展示样式设置属性*/
|
||||
@property (nonatomic,assign) UIModalPresentationStyle modalPresentationStyle;
|
||||
|
||||
#pragma mark - Toast文案
|
||||
/**未勾选隐私条款提示的自定义提示文案,提示功能默认关闭,该属性被合法赋值(非空,且最大长度为100的字符串)后打开提示功能。*/
|
||||
@property (nonatomic, strong) NSString *checkTipText;
|
||||
|
||||
#pragma mark - 多语言配置
|
||||
/**多语言配置:
|
||||
UALanguageSimplifiedChinese , //简体中文
|
||||
UALanguageTraditionalChinese, //繁体中文
|
||||
UALanguageEnglish, //英文
|
||||
*/
|
||||
@property (nonatomic, assign) UALanguageType appLanguageType;
|
||||
@end
|
||||
27
Pods/CL_ShanYanSDK/framework/TYRZUISDK.framework/Headers/UAFEnums.h
generated
Executable file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// UAFEnums.h
|
||||
// TYRZUI
|
||||
//
|
||||
// Created by 谢鸿标 on 2020/3/16.
|
||||
// Copyright © 2020 谢鸿标. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef UAFEnums_h
|
||||
#define UAFEnums_h
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
typedef NS_ENUM(NSUInteger, UAPresentationDirection) {
|
||||
UAPresentationDirectionBottom = 0, //底部 present默认效果
|
||||
UAPresentationDirectionRight, //右边 导航栏效果
|
||||
UAPresentationDirectionTop, //上面
|
||||
UAPresentationDirectionLeft, //左边
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, UALanguageType) {
|
||||
UALanguageSimplifiedChinese = 0, //简体中文
|
||||
UALanguageTraditionalChinese, //繁体中文
|
||||
UALanguageEnglish, //英文
|
||||
};
|
||||
|
||||
#endif /* UAFEnums_h */
|
||||
67
Pods/CL_ShanYanSDK/framework/TYRZUISDK.framework/Headers/UAFSDKErrorCode.h
generated
Executable file
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// UAFSDKErrorCode.h
|
||||
// TYRZSDK
|
||||
//
|
||||
// Created by 谢鸿标 on 2018/10/24.
|
||||
// Copyright © 2018 com.CMCC.iOS. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef UASDKErrorCode_h
|
||||
#define UASDKErrorCode_h
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NSString *UAFSDKErrorCode;
|
||||
|
||||
//成功
|
||||
static UAFSDKErrorCode const UASDKErrorCodeSuccess = @"103000";
|
||||
//数据解析异常
|
||||
static UAFSDKErrorCode const UASDKErrorCodeProcessException = @"200021";
|
||||
//无网络
|
||||
static UAFSDKErrorCode const UASDKErrorCodeNoNetwork = @"200022";
|
||||
//请求超时
|
||||
static UAFSDKErrorCode const UASDKErrorCodeRequestTimeout = @"200023";
|
||||
//未知错误
|
||||
static UAFSDKErrorCode const UASDKErrorCodeUnknownError = @"200025";
|
||||
//蜂窝未开启或不稳定
|
||||
static UAFSDKErrorCode const UASDKErrorCodeNonCellularNetwork = @"200027";
|
||||
//网络请求出错(HTTP Code 非200)
|
||||
static UAFSDKErrorCode const UASDKErrorCodeRequestError = @"200028";
|
||||
//非移动网关重定向失败
|
||||
static UAFSDKErrorCode const UASDKErrorCodeWAPRedirectFailed = @"200038";
|
||||
//无SIM卡
|
||||
static UAFSDKErrorCode const UASDKErrorCodePhoneWithoutSIM = @"200048";
|
||||
//Socket创建或发送接收数据失败
|
||||
static UAFSDKErrorCode const UASDKErrorCodeSocketError = @"200050";
|
||||
//用户点击了“账号切换”按钮(自定义短信页面customSMS为YES才会返回)
|
||||
static UAFSDKErrorCode const UASDKErrorCodeCustomSMSVC = @"200060";
|
||||
//显示登录"授权页面"被拦截(hooked)
|
||||
static UAFSDKErrorCode const UASDKErrorCodeAutoVCisHooked = @"200061";
|
||||
////预取号不支持联通
|
||||
//static UAFSDKErrorCode const UASDKErrorCodeNOSupportUnicom = @"200062";
|
||||
////预取号不支持电信
|
||||
//static UAFSDKErrorCode const UASDKErrorCodeNOSupportTelecom = @"200063";
|
||||
//服务端返回数据异常
|
||||
static UAFSDKErrorCode const UASDKErrorCodeExceptionData = @"200064";
|
||||
//CA根证书校验失败
|
||||
static UAFSDKErrorCode const UASDKErrorCodeCAAuthFailed = @"200072";
|
||||
//本机号码校验仅支持移动手机号
|
||||
static UAFSDKErrorCode const UASDKErrorCodeGetMoblieOnlyCMCC = @"200080";
|
||||
//服务器繁忙
|
||||
static UAFSDKErrorCode const UASDKErrorCodeServerBusy = @"200082";
|
||||
//ppLocation为空
|
||||
static UAFSDKErrorCode const UASDKErrorCodeLocationError = @"200086";
|
||||
//监听授权界面成功弹起
|
||||
static UAFSDKErrorCode const UASDKSuccessGetAuthVCCode = @"200087";
|
||||
//当前网络不支持取号
|
||||
static UAFSDKErrorCode const UASDKErrorCodeUnsupportedNetwork = @"200096";
|
||||
|
||||
/**
|
||||
获取错误码描述
|
||||
|
||||
@param code 错误码
|
||||
@return 返回对应描述
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *UASDKErrorDescription(UAFSDKErrorCode code);
|
||||
|
||||
#endif /* UASDKErrorCode_h */
|
||||
93
Pods/CL_ShanYanSDK/framework/TYRZUISDK.framework/Headers/UAFSDKLogin.h
generated
Executable file
@@ -0,0 +1,93 @@
|
||||
//
|
||||
// UAFSDKLogin.h
|
||||
// TYRZSDK
|
||||
//
|
||||
// Created by 谢鸿标 on 2018/10/11.
|
||||
// Copyright © 2018 com.CMCC.iOS. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#define UAFSDKVERSION @"quick_login_iOS_5.9.2"
|
||||
|
||||
@class UAFCustomModel;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface UAFSDKLogin : NSObject
|
||||
|
||||
/**
|
||||
SDK登录单例管理
|
||||
*/
|
||||
@property (nonatomic,class,readonly) UAFSDKLogin *shareLogin;
|
||||
|
||||
/**
|
||||
网络类型及运营商(双卡下,获取上网卡的运营商)
|
||||
"carrier" 运营商: 0.未知 / 1.中国移动 / 2.中国联通 / 3.中国电信
|
||||
"networkType" 网络类型: 0.无网络/ 1.数据流量 / 2.wifi / 3.数据+wifi
|
||||
@return @{NSString : NSNumber}
|
||||
*/
|
||||
@property (nonatomic,readonly) NSDictionary<NSString *, NSNumber *> *networkInfo;
|
||||
|
||||
/**
|
||||
初始化SDK参数
|
||||
|
||||
@param appId 申请能力平台成功后,分配的appId
|
||||
@param appKey 申请能力平台成功后,分配的appKey
|
||||
*/
|
||||
- (void)registerAppId:(NSString *)appId AppKey:(NSString *)appKey;
|
||||
|
||||
/**
|
||||
设置超时
|
||||
|
||||
@param timeout 超时
|
||||
*/
|
||||
- (void)setTimeoutInterval:(NSTimeInterval)timeout;
|
||||
|
||||
/**
|
||||
取号
|
||||
|
||||
@param completion 回调
|
||||
*/
|
||||
- (void)getPhoneNumberCompletion:(void(^)(NSDictionary *_Nonnull result))completion;
|
||||
|
||||
/**
|
||||
一键登录,获取到的token,可传给移动认证服务端获取完整手机号
|
||||
|
||||
@param model 需要配置的Model属性(控制器必传)
|
||||
@param completion 回调
|
||||
*/
|
||||
- (void)getAuthorizationWithModel:(UAFCustomModel *)model complete:(void (^)(id sender))completion;
|
||||
|
||||
/**
|
||||
获取本机号码校验token
|
||||
|
||||
@param completion 回调
|
||||
*/
|
||||
- (void)mobileAuthCompletion:(void(^)(NSDictionary *_Nonnull result))completion;
|
||||
|
||||
/**
|
||||
删除取号缓存数据 + 重置网络开关(自定义按钮事件里dimiss授权界面需调用)
|
||||
|
||||
@return YES:有缓存已执行删除操作,NO:无缓存不执行删除操作
|
||||
*/
|
||||
- (BOOL)delectScrip;
|
||||
|
||||
/**
|
||||
控制台日志输出控制(默认关闭)
|
||||
|
||||
@param enable 开关参数
|
||||
*/
|
||||
- (void)printConsoleEnable:(BOOL)enable;
|
||||
|
||||
|
||||
/**
|
||||
关闭授权界面
|
||||
@param flag 动画开关
|
||||
@param completion 回调参数
|
||||
|
||||
*/
|
||||
- (void)ua_dismissViewControllerAnimated: (BOOL)flag completion: (void (^ __nullable)(void))completion;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
BIN
Pods/CL_ShanYanSDK/framework/TYRZUISDK.framework/Info.plist
generated
Executable file
6
Pods/CL_ShanYanSDK/framework/TYRZUISDK.framework/Modules/module.modulemap
generated
Executable file
@@ -0,0 +1,6 @@
|
||||
framework module TYRZUISDK {
|
||||
umbrella header "TYRZUISDK.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
BIN
Pods/CL_ShanYanSDK/framework/TYRZUISDK.framework/TYRZUISDK
generated
Executable file
76
Pods/CL_ShanYanSDK/framework/account_login_sdk_noui_core.framework/Headers/UniAuthHelper.h
generated
Executable file
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// UniAuthHelper.h
|
||||
// account_verify_sdk_core
|
||||
//
|
||||
// Created by zhuof on 2018/3/8.
|
||||
// Copyright © 2018年 xiaowo. All rights reserved.
|
||||
// 4.1.3IR01B0320 1. 优化token获取流程。 减少交互。 使用者自行缓存accessCode(具备有效期)。
|
||||
// 4.3.0IR01B0615 1. socket通讯优化(GCD方案)
|
||||
// 4.4.0IR01B0715 1. 预取号流程修改 2.增加读取idfa的功能 3.降低打点频率。
|
||||
// 4.5.0IR01B1020 1. 关闭日志 2.错误码细化
|
||||
// 4.6.0IR01B0105 1. http1.1规范 header部分头域兼容大小写,兼容http链接中缺少80端口问题。
|
||||
// 2. socket请求时,host头域追加端口号
|
||||
// 3. 仅数据网络开通和wifi双开时,都启动预取号计时器。
|
||||
// 4. 按照阿里建议, 超时时间可以设置x.x秒样式
|
||||
// 4.7.0IR01B0331 1. 减少体积
|
||||
// 2. 解决苹果appstore审核时,可能会对getaddrinfo域名解析接口触发本地设备连接授权弹窗进行驳回处理。
|
||||
// 5.0.0IR01B0420 全https 5g取号支持
|
||||
// 5.1.0IR01B0701 ipv6网络支持
|
||||
// 开启缓存模式支持
|
||||
// 解决偶发的1002验签错误bug
|
||||
// 未确保兼容性,建议讲wostore.cn 10010.com域名及其子域名加入到http通信白名单中。
|
||||
// 解决不符合url规范的特殊url地址的socket网络访问bug
|
||||
// 5.1.0IR01B0712 删除缓存相关代码
|
||||
// 5.1.1IR01B0825 预取号请求的队列修改为并发队列。预取号请求日志添加开关控制。
|
||||
// 5.1.2IR01B0110 解决高并发预取号请求可能导致偶发的崩溃问题。(但不建议高并发调用预取号接口)
|
||||
// 超时时间不在设置为全局变量,避免多线程相互影响
|
||||
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef void (^UniResultListener)(NSDictionary * _Nonnull data);
|
||||
|
||||
@interface UniAuthHelper : NSObject
|
||||
|
||||
+(UniAuthHelper *_Nonnull) getInstance;
|
||||
|
||||
/**
|
||||
sdk初始化,每个app只能执行一次初始化调用。
|
||||
注意:某些使用者尝试在同一个app中使用多个appid初始化sdk,这可能导致未知隐患发生。
|
||||
*/
|
||||
-(void) initWithAppId:(NSString* _Nonnull) appId appSecret:(NSString* _Nonnull) appSecret;
|
||||
|
||||
/**
|
||||
预取号接口。
|
||||
timeout:超时时间,单位秒(网络环境复杂,建议设置5-8秒以上,过低的超时时间可能导致取号成功率下降)。
|
||||
listener:回调接口 resultCode 为 0时,表示预取号成功。 其他值都是错误码。
|
||||
|
||||
成功调用有以下前提:
|
||||
1. 需要保证手机终端有联通sim卡,并且保证联通数据网络是开启状态。
|
||||
2. 手机本地时间正确(北京时间)
|
||||
3. 如果手机数据网络开启,但是预取号失败,可以尝试手动飞行模式开关一下,尝试让数据网络恢复正常。
|
||||
4. 物联网卡无法取号
|
||||
5. 海外,港澳地区无法取号
|
||||
6. 确保APN接入点设置正确,目前只支持3gnet接入点。
|
||||
|
||||
预取号获得的accessCode具有效期,请在有效期内使用accesscode换取用户信息。
|
||||
*/
|
||||
-(void) getAccessCode:(double)timeout listener:(UniResultListener _Nonnull) listener;
|
||||
|
||||
/**
|
||||
获取号码认证用的accessCode,与getAccessCode接口的区别是:回调中不会带有脱敏手机号码。
|
||||
*/
|
||||
-(void) mobileAuth:(double)timeout listener:(UniResultListener _Nonnull) listener;
|
||||
|
||||
/**
|
||||
预取号日志开关。
|
||||
*/
|
||||
-(void) printConsoleEnable:(BOOL)enable;
|
||||
|
||||
|
||||
/**
|
||||
获取sdk的版本号
|
||||
*/
|
||||
-(NSString*_Nonnull) getSdkVersion;
|
||||
|
||||
@end
|
||||
21
Pods/CL_ShanYanSDK/framework/account_login_sdk_noui_core.framework/Headers/account_login_sdk_noui_core.h
generated
Executable file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// account_login_sdk_noui_core.h
|
||||
// account_login_sdk_noui_core
|
||||
//
|
||||
// Created by zhuof on 2018/9/25.
|
||||
// Copyright © 2018年 xiaowo. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for account_login_sdk_noui_core.
|
||||
FOUNDATION_EXPORT double account_login_sdk_noui_coreVersionNumber;
|
||||
|
||||
//! Project version string for account_login_sdk_noui_core.
|
||||
FOUNDATION_EXPORT const unsigned char account_login_sdk_noui_coreVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <account_login_sdk_noui_core/PublicHeader.h>
|
||||
|
||||
//#import <account_login_sdk_noui_core/UniAuthHelper.h>
|
||||
#import "UniAuthHelper.h"
|
||||
|
||||
BIN
Pods/CL_ShanYanSDK/framework/account_login_sdk_noui_core.framework/Info.plist
generated
Executable file
6
Pods/CL_ShanYanSDK/framework/account_login_sdk_noui_core.framework/Modules/module.modulemap
generated
Executable file
@@ -0,0 +1,6 @@
|
||||
framework module account_login_sdk_noui_core {
|
||||
umbrella header "account_login_sdk_noui_core.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
BIN
Pods/CL_ShanYanSDK/framework/account_login_sdk_noui_core.framework/account_login_sdk_noui_core
generated
Executable file
BIN
Pods/CL_ShanYanSDK/framework/sdk_oauth.bundle/back@2x.png
generated
Executable file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
Pods/CL_ShanYanSDK/framework/sdk_oauth.bundle/checkBox_selected@2x.png
generated
Executable file
|
After Width: | Height: | Size: 431 B |
BIN
Pods/CL_ShanYanSDK/framework/sdk_oauth.bundle/checkBox_unSelected@2x.png
generated
Executable file
|
After Width: | Height: | Size: 530 B |
BIN
Pods/CL_ShanYanSDK/framework/sdk_oauth.bundle/checked@2x.png
generated
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
Pods/CL_ShanYanSDK/framework/sdk_oauth.bundle/ctc.png
generated
Executable file
|
After Width: | Height: | Size: 15 KiB |
BIN
Pods/CL_ShanYanSDK/framework/sdk_oauth.bundle/cucc.png
generated
Executable file
|
After Width: | Height: | Size: 27 KiB |
BIN
Pods/CL_ShanYanSDK/framework/sdk_oauth.bundle/default@2x.png
generated
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Pods/CL_ShanYanSDK/framework/sdk_oauth.bundle/imageClear.png
generated
Executable file
|
After Width: | Height: | Size: 514 B |
BIN
Pods/CL_ShanYanSDK/framework/sdk_oauth.bundle/privacyWebBackBtnImage@2x.png
generated
Executable file
|
After Width: | Height: | Size: 2.1 KiB |