Commit f65f329d authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

delete login

parent aaddb54c
Pipeline #411 failed with stages
...@@ -11,8 +11,7 @@ target 'ShorthandMaster' do ...@@ -11,8 +11,7 @@ target 'ShorthandMaster' do
pod 'SnapKit' # 布局 pod 'SnapKit' # 布局
pod 'SwiftyStoreKit' pod 'SwiftyStoreKit'
pod 'MBProgressHUD' pod 'MBProgressHUD'
pod 'CL_ShanYanSDK' #创蓝 一键登录
pod 'PDFGenerator', '~> 3.1' pod 'PDFGenerator', '~> 3.1'
pod 'Masonry' pod 'Masonry'
......
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.
# CL_ShanYanSDK
[![CI Status](https://img.shields.io/travis/wanglijun311@gmail.com/CL_ShanYanSDK.svg?style=flat)](https://travis-ci.org/wanglijun311@gmail.com/CL_ShanYanSDK)
[![Version](https://img.shields.io/cocoapods/v/CL_ShanYanSDK.svg?style=flat)](https://cocoapods.org/pods/CL_ShanYanSDK)
[![License](https://img.shields.io/cocoapods/l/CL_ShanYanSDK.svg?style=flat)](https://cocoapods.org/pods/CL_ShanYanSDK)
[![Platform](https://img.shields.io/cocoapods/p/CL_ShanYanSDK.svg?style=flat)](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.3.0'
```
## 接入文档以官网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.
//
// 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
@property (nonatomic,assign)NSInteger code;//SDK外层code
@property (nonatomic,nullable,copy)NSString * message;//SDK外层msg
@property (nonatomic,nullable,copy)NSDictionary * data;//SDK外层data
@property (nonatomic,nullable,strong)NSError * error;//Error
//内层
@property (nonatomic,assign)NSInteger innerCode;//SDK内层code
@property (nonatomic,nullable,copy)NSString * innerDesc;//SDK内层msg
#ifdef DEBUG
@property (nonatomic,assign)NSTimeInterval debug_createTime;
#endif
///**
// 是否已经拉起授权页
// default is NO
// */
//@property (nonatomic,assign)BOOL authPagePresented;
@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
//
// 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 privacyName 协议名称
* @param index 协议位置--0:运营商协议--1:用户协议一--2:用户协议二
* @param telecom 当前运营商类型
*/
-(void)clShanYanSDKManagerWebPrivacyClicked:(NSString *_Nonnull)privacyName privacyIndex:(NSInteger)index currentTelecom:(NSString *_Nullable)telecom DEPRECATED_MSG_ATTRIBUTE("Method deprecated. Use `clShanYanActionListner:code:message:`");
/**
* 授权页面已经显示的回调
* ViewDidAppear
* @param telecom 当前运营商类型
*/
-(void)clShanYanSDKManagerAuthPageAfterViewDidLoad:(UIView *_Nonnull)authPageView currentTelecom:(NSString *_Nullable)telecom ;
/**
* 授权页面将要显示的回调 ViewDidLoad即将全部执行完毕的最后时机
* ViewDidLoad did complete
* @param telecom 当前运营商类型
*/
-(void)clShanYanSDKManagerAuthPageCompleteViewDidLoad:(UIViewController *_Nonnull)authPageVC currentTelecom:(NSString *_Nullable)telecom object:(NSObject*_Nullable)object userInfo:(NSDictionary*_Nullable)userInfo;
/**
* 授权页面将要显示的回调
* ViewWillAppear
* @param telecom 当前运营商类型
*/
-(void)clShanYanSDKManagerAuthPageCompleteViewWillAppear:(UIViewController *_Nonnull)authPageVC currentTelecom:(NSString *_Nullable)telecom object:(NSObject*_Nullable)object userInfo:(NSDictionary*_Nullable)userInfo;
/**
* 授权页vc alloc init
* init,注:此时authPageVC.navigationController为nil
* @param telecom 当前运营商类型
*/
-(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 telecom 当前运营商类型
*/
-(void)clShanYanSDKManagerAuthPageWillPresent:(UIViewController *_Nonnull)authPageVC currentTelecom:(NSString *_Nullable)telecom object:(NSObject*_Nullable)object userInfo:(NSDictionary*_Nullable)userInfo;
/**
* 统一事件监听方法
* type:事件类型(1,2,3)
* 1:隐私协议点击
* - 同-clShanYanSDKManagerWebPrivacyClicked:privacyIndex:currentTelecom
* code:0,1,2,3(协议页序号),message:协议名_当前运营商类型
* 2:协议勾选框点击
* code:0,1(0为未选中,1为选中)
* 3:"一键登录"按钮点击
* code:0,1(0为协议勾选框未选中,1为选中)
*/
-(void)clShanYanActionListener:(NSInteger)type code:(NSInteger)code message:(NSString *_Nullable)message;
@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
*/
+ (void)setPreGetPhonenumberTimeOut:(NSTimeInterval)preGetPhoneTimeOut;
/**
* 预取号
* 此调用将有助于提高闪验拉起授权页的速度和成功率
* 建议在一键登录前提前调用此方法,比如调一键登录的vc的viewdidload中
* 不建议在拉起授权页后调用
* ⚠️‼️以 if (completeResult.error == nil) 为判断成功的依据,而非返回码
* ⚠️‼️此方法回调队列为dispatch_get_global_queue(0, 0),回调中如需UI操作,请自行切到主线程
*/
+(void)preGetPhonenumber:(nullable CLComplete)complete;
/**
* 一键登录拉起内置授权页&获取Token
@param clUIConfigure 闪验授权页参数配置
@param complete 回调block
* 回调中如需UI操作,建议自行切到主线程
*/
+(void)quickAuthLoginWithConfigure:(CLUIConfigure *)clUIConfigure
complete:(nonnull CLComplete)complete;
/**
一键登录拉起内置授权页&获取Token( 区分拉起授权页之前和之后的回调)
@param clUIConfigure 闪验授权页参数配置
@param openLoginAuthListener 拉起授权页监听:拉起授权页面成功或失败的回调,拉起成功或失败均触发。当拉起失败时,oneKeyLoginListener不会触发。此回调的内部触发时机是viewDidAppear
@param oneKeyLoginListener 一键登录监听:拉起授权页成功后的后续操作回调,包括点击SDK内置的(非外部自定义)取消登录按钮,以及点击本机号码一键登录的回调。点击授权页自定义按钮不触发此回调
* 回调中如需UI操作,建议自行切到主线程
*/
+(void)quickAuthLoginWithConfigure:(CLUIConfigure *)clUIConfigure
openLoginAuthListener:(CLComplete)openLoginAuthListener
oneKeyLoginListener:(CLComplete)oneKeyLoginListener;
/**
关闭授权页
注:若授权页未拉起或已经提前关闭,此方法调用无效果,complete不触发。内部实现为调用系统方法dismissViewcontroller:Complete
@param flag dismissViewcontroller`Animated, default is YES.
@param completion dismissViewcontroller`completion
*/
+(void)finishAuthControllerCompletion:(void(^_Nullable)(void))completion;
+(void)finishAuthControllerAnimated:(BOOL)flag Completion:(void(^_Nullable)(void))completion;
//设置checkBox勾选状态
+(void)setCheckBoxValue:(BOOL)isSelect;
+(void)hideLoading;
///**************一键登录获取Token***************/
///// 注:此方法回调队列为dispatch_get_global_queue(0, 0),如需UI操作请自行切入主线程
//+(void)loginAuth:(CLComplete)complete;
/**************本机认证(本机号码校验)***************/
+ (void)mobileCheckWithLocalPhoneNumberComplete:(CLComplete)complete;
/**************SDK功能方法***************/
/**
模式控制台日志输出控制(默认关闭)
@param enable 开关参数
*/
+ (void)printConsoleEnable:(BOOL)enable;
/// 获取当前流量卡运营商,结果仅供参考
// CTCC:电信、CMCC:移动、CUCC:联通、UNKNOW:未知
+ (NSString *)getOperatorType;
+ (void)clearScripCache;
/**
禁止日志上报(默认开启)
****此接口需要在初始化之前调用,否则配置不生效****
@param forbidden YES:禁止上报 NO:允许上报
*/
+ (void)forbiddenFullLogReport:(BOOL)forbidden;
+(void)sdkInit:(NSString *)appId complete:(nullable CLComplete)complete;
+ (BOOL)checkAuthEnable;
/**
* 当前SDK版本号
*/
+ (NSString *)clShanYanSDKVersion;
@end
NS_ASSUME_NONNULL_END
//
// 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>
//
//typedef NS_ENUM(NSInteger, CLShanYanModalTransitionStyle) {
// CLShanYanModalTransitionStyleCoverVertical = 0,
// CLShanYanModalTransitionStyleFlipHorizontal __TVOS_PROHIBITED,
// CLShanYanModalTransitionStyleCrossDissolve,
// CLShanYanModalTransitionStylePartialCurl NS_ENUM_AVAILABLE_IOS(3_2) __TVOS_PROHIBITED,
//};
//
//typedef NS_ENUM(NSInteger, CLShanYanModalPresentationStyle) {
// CLShanYanModalPresentationFullScreen = 0,
// CLShanYanModalPresentationPageSheet NS_ENUM_AVAILABLE_IOS(3_2) __TVOS_PROHIBITED,
// CLShanYanModalPresentationFormSheet NS_ENUM_AVAILABLE_IOS(3_2) __TVOS_PROHIBITED,
// CLShanYanModalPresentationCurrentContext NS_ENUM_AVAILABLE_IOS(3_2),
// CLShanYanModalPresentationCustom NS_ENUM_AVAILABLE_IOS(7_0),
// CLShanYanModalPresentationOverFullScreen NS_ENUM_AVAILABLE_IOS(8_0),
// CLShanYanModalPresentationOverCurrentContext NS_ENUM_AVAILABLE_IOS(8_0),
// CLShanYanModalPresentationPopover NS_ENUM_AVAILABLE_IOS(8_0) __TVOS_PROHIBITED,
// CLShanYanModalPresentationBlurOverFullScreen __TVOS_AVAILABLE(11_0) __IOS_PROHIBITED __WATCHOS_PROHIBITED,
// CLShanYanModalPresentationNone NS_ENUM_AVAILABLE_IOS(7_0) = -1,
//};
NS_ASSUME_NONNULL_BEGIN
@class CLOrientationLayOut;
/*
注: 授权页一键登录按钮、运营商品牌标签、运营商条款必须显示,不得隐藏,否则取号能力可能被运营商关闭
**/
//授权页UI配置
@interface CLUIConfigure : NSObject
//要拉起授权页的vc [必填项] (注:SDK不持有接入方VC)
@property (nonatomic,weak)UIViewController * viewController;
/**
*外部手动管理关闭界面
*BOOL,default is NO
*eg.@(YES)
*/
@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;
/*translucent 此属性已失效*/
//@property (nonatomic,strong)NSNumber * cl_navigation_translucent;
/**导航栏分割线 是否隐藏
* set backgroundImage=UIImage.new && shadowImage=UIImage.new
* BOOL, default is YES
* eg.@(YES)
*/
@property (nonatomic,strong)NSNumber * clNavigationBottomLineHidden;
/**导航栏 文字颜色*/
@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;
/**导航栏 导航栏底部分割线(图片)*/
@property (nonatomic,strong)UIImage * clNavigationShadowImage;
/*状态栏样式
*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;
/*
隐私协议文本拼接: DesTextFirst+运营商条款+DesTextSecond+隐私条款一+DesTextThird+隐私条款二+DesTextFourth+隐私条款三+DesTextLast
**/
/**描述文本 首部 default:"同意"*/
@property (nonatomic,copy)NSString *clAppPrivacyNormalDesTextFirst;
/**描述文本二 default:"和"*/
@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;
/**用户隐私协议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文字字体*/
@property (nonatomic,strong) UIFont * clSloganTextFont;
/**slogan文字颜色*/
@property (nonatomic,strong) UIColor * clSloganTextColor;
/**slogan文字对齐方式 NSTextAlignment eg.@(NSTextAlignmentCenter)*/
@property (nonatomic,strong) NSNumber * clSlogaTextAlignment;
/*闪验SLOGAN
注: 供应商品牌标签("闪验提供认技术支持")
**/
/**slogan文字字体*/
@property (nonatomic,strong) UIFont * clShanYanSloganTextFont;
/**slogan文字颜色*/
@property (nonatomic,strong) UIColor * clShanYanSloganTextColor;
/**slogan文字对齐方式 NSTextAlignment eg.@(NSTextAlignmentCenter)*/
@property (nonatomic,strong) NSNumber * clShanYanSloganTextAlignment;
/**slogan默认不隐藏 eg.@(NO)*/
@property (nonatomic,strong) NSNumber * clShanYanSloganHidden;
/*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顶部与隐私协议控件竖向中心对齐 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
//
// 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>
framework module CL_ShanYanSDK {
umbrella header "CL_ShanYanSDK.h"
export *
module * { export * }
}
//
// 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
//
// 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
//
// 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
//
// EAccountSDK.h
// EAccountSDKNetwork
//
// Created by thy on 2018/6/23.
// Copyright © 2018年 21CN. All rights reserved.
//
/**
定制版SDK v3.8.3 20200702 Xcode11.3打包
*/
#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;
@end
//
// ZOAuthManager 能力接入管理者-提供加解密方法
// 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 ZOAuthManager : NSObject
/**
* 是否使用测试环境
*
* @param isDebug true/false
*/
+ (void) setDebug:(BOOL) isDebug ;
/**
* 是否使用SHA256
*
* @param schemeB true/false (默认是NO)
*/
+ (void) useSchemeBInSecurityModule:(BOOL)schemeB;
//设置UA
+ (void)setUAString:(NSString *)UAString;
//删除保存在本地的UA
+ (void)removeUAString;
//获取SDK版本信息
+ (NSString *)getVersionInfo;
@end
//
// ZTOAuthManager 电信能力接入管理者
// 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>
#import "ZOAuthManager.h"
@interface ZTOAuthManager : ZOAuthManager
/**
* 获取电信能力接入单例对象
*/
+ (instancetype)getInstance;
/**
* 初始化-电信
*/
- (void) init:(NSString*) apiKey pubKey:(NSString*)pubKey;
/**
* 取号-电信
*/
- (void) login:(double)timeout resultListener:(void (^)(NSDictionary *data))listener;
/**
* 清除缓存 ***注意***:SDK取号默认会使用缓存机制,请及时清理缓存;
*/
+ (BOOL)clearCTLoginCache;
/**
不推荐使用
中断取号登录流程(按需使用)
取消取号请求
*/
- (void)tryToInterruptTheCTLoginFlow;
/**
* 认证-电信 ***注意***:在不手动关闭缓存的时,请及时调用清除缓存方法;
*/
- (void) oauth:(double)timeout resultListener:(void (^)(NSDictionary *data))listener;
/** 电信认证:是否关闭缓存策略(默认开启)
请注意及时调用clearOauthCache方法清除缓存;
手动关闭后,不必调用clearOauthCache;
@param yesOrNo 是否关闭电信认证缓存策略
*/
- (void) closeCTOauthCachingStrategy:(BOOL)yesOrNo;
/**
电信认证:
清除电信认证缓存策略中产生的缓存数据;
在手动关闭缓存策略时,不必调用;
*/
+ (BOOL) clearCTOauthCache;
/**
* (测试接口)获取登录/认证结果
*/
- (void) gmbc:(NSString*)accessCode mobile:(NSString *)mobile listener:(void (^)(NSDictionary *data))listener;
//释放SDK内部单例对象 不推荐使用
-(void)ZOAURelease;
@end
//
// 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>
#import "ZOAuthManager.h"
@interface ZUOAuthManager : ZOAuthManager
/**
* 获取联通能力接入单例对象
*/
+ (instancetype)getInstance;
/**
* 初始化-联通
*/
- (void) init:(NSString*) apiKey pubKey:(NSString*)pubKey;
/**
* 取号-联通
*/
- (void) login:(double)timeout resultListener:(void (^)(NSDictionary *data))listener;
/**
* 清除缓存 ***注意***:SDK取号默认会使用缓存机制,请及时清理缓存;
*/
+ (BOOL)clearCULoginCache;
/**
不推荐使用
中断取号登录流程(按需使用)
取消取号请求
*/
- (void)tryToInterruptTheCULoginFlow;
/**
* 认证-联通
注意***:在不手动关闭缓存的时,请及时调用清除缓存方法
*/
- (void) oauth:(double)timeout resultListener:(void (^)(NSDictionary *data))listener;
/** 联通认证:是否关闭缓存策略(默认开启)
请注意及时调用clearOauthCache方法清除缓存;
手动关闭后,不必调用clearOauthCache;
@param yesOrNo 是否关闭联通认证缓存策略
*/
- (void) closeCUOauthCachingStrategy:(BOOL)yesOrNo;
/**
联通认证:
清除联通认证缓存策略中产生的缓存数据;
在手动关闭缓存策略时,不必调用;
*/
+ (BOOL) clearCUOauthCache;
/**
* 获取登录/认证结果
* 测试接口
*/
- (void) gmbc:(NSString*)accessCode mobile:(NSString *)mobile listener:(void (^)(NSDictionary *data))listener;
/**
* 测试接口
*/
- (void) gmbc:(NSString*)accessCode listener:(void (^)(NSDictionary *data))listener;
//释放SDK内部单例对象 不推荐使用
-(void)ZOAURelease;
@end
<?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>files</key>
<dict>
<key>Headers/ZOAuthManager.h</key>
<data>
Ienx6rvM1g1+f1s7ZICmHjFTWK0=
</data>
<key>Headers/ZTOAuthManager.h</key>
<data>
Yg0RW8IZws/IkK5JfNHdJdauFUI=
</data>
<key>Headers/ZUOAuthManager.h</key>
<data>
3hNIJzGdPh0t6PJs++XFiwpk2r8=
</data>
<key>Info.plist</key>
<data>
O5k78mz41m5mzSbFHSh0LWgrmSc=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/ZOAuthManager.h</key>
<dict>
<key>hash</key>
<data>
Ienx6rvM1g1+f1s7ZICmHjFTWK0=
</data>
<key>hash2</key>
<data>
q7QhcCkG76qNNTTXIdCJVpT3OaL/Zf4INFSddKsq2jA=
</data>
</dict>
<key>Headers/ZTOAuthManager.h</key>
<dict>
<key>hash</key>
<data>
Yg0RW8IZws/IkK5JfNHdJdauFUI=
</data>
<key>hash2</key>
<data>
gYAD75XQd+0Hpf0wLqki0J7t4JstOCS8Kp7HwSQV5/U=
</data>
</dict>
<key>Headers/ZUOAuthManager.h</key>
<dict>
<key>hash</key>
<data>
3hNIJzGdPh0t6PJs++XFiwpk2r8=
</data>
<key>hash2</key>
<data>
GUGahV21wr96RQP1KsRY07Em5BftMx8h5+FWowFFuX8=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
//
// TYRZSDK.h
// TYRZSDK
//
#import "UASDKLogin.h"
#import "UASDKErrorCode.h"
#import "UACustomModel.h"
//
// UACustomModel.h
// Test
//
// Created by issuser on 2018/5/18.
// Copyright © 2018年 林涛. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, UAPresentationDirection){
UAPresentationDirectionBottom = 0, //底部 present默认效果
UAPresentationDirectionRight, //右边 导航栏效果
UAPresentationDirectionTop, //上面
UAPresentationDirectionLeft, //左边
};
@interface UACustomModel : NSObject
/**
版本注意事项:
授权页面的各个控件的Y轴默认值都是以375*667屏幕为基准 系数 : 当前屏幕高度/667
1、当设置Y轴并有效时 偏移量OffsetY属于相对导航栏的绝对Y值
2、(负数且超出当前屏幕无效)为保证各个屏幕适配,请自行设置好Y轴在屏幕上的比例(推荐:当前屏幕高度/667)
*/
#pragma mark -----------------------------授权页面----------------------------------
#pragma mark VC必传属性
/**1、当前VC,注意:要用一键登录这个值必传*/
@property (nonatomic,weak) UIViewController *currentVC;
#pragma mark 自定义控件
/**2、授权界面自定义控件View的Block*/
@property (nonatomic,copy) void(^authViewBlock)(UIView *customView ,CGRect logoFrame, CGRect numberFrame, CGRect sloganFrame ,CGRect loginBtnFrame, CGRect checkBoxFrame , CGRect privacyFrame);
/**3、 授权页面推出的动画效果:参考UAPresentationDirection枚举*/
@property (nonatomic, assign) UAPresentationDirection presentType;
/**4、授权界面背景图片*/
@property (nonatomic,strong) UIImage *authPageBackgroundImage;
#pragma mark 导航栏
/**5、导航栏颜色*/
@property (nonatomic,strong) UIColor *navColor;
/**6、状态栏着色样式(隐藏导航栏无效)*/
@property (nonatomic,assign) UIBarStyle barStyle;
/**7、状态栏着色样式(隐藏导航栏时设置)*/
@property (nonatomic, assign) UIStatusBarStyle statusBarStyle;
/**8、导航栏标题*/
@property (nonatomic,strong) NSAttributedString *navText;
/**9、导航返回图标(尺寸根据图片大小)*/
@property (nonatomic,strong) UIImage *navReturnImg;
/**10、导航栏自定义(适配全屏图片)*/
@property (nonatomic,assign) BOOL navCustom;
/**11、导航栏右侧自定义控件(导航栏传 UIBarButtonItem对象 自定义传非UIBarButtonItem )*/
@property (nonatomic,strong) id navControl;
#pragma mark LOGO图片设置
/**12、LOGO图片*/
@property (nonatomic,strong) UIImage *logoImg;
/**13、LOGO图片宽度*/
@property (nonatomic,assign) CGFloat logoWidth;
/**14、LOGO图片高度*/
@property (nonatomic,assign) CGFloat logoHeight;
/**15、LOGO图片偏移量*/
@property (nonatomic,strong) NSNumber * logoOffsetY;
/**16、LOGO图片隐藏*/
@property (nonatomic,assign) BOOL logoHidden;
#pragma mark 登录按钮
/**17、登录按钮文本*/
@property (nonatomic,strong) NSAttributedString *logBtnText;
/**18、登录按钮Y偏移量*/
@property (nonatomic,strong) NSNumber * logBtnOffsetY;
/**19、登录按钮的左右边距 注意:按钮呈现的宽必须大于屏幕的一半*/
@property (nonatomic, strong) NSNumber *logBtnOriginX;
/**20、登录按钮高h 注意:必须大于40*/
@property (nonatomic, assign) CGFloat logBtnHeight;
/**21、登录按钮背景图片添加到数组(顺序如下)
@[激活状态的图片,失效状态的图片,高亮状态的图片]
*/
@property (nonatomic,strong) NSArray *logBtnImgs;
#pragma mark 号码框设置
/**22、手机号码(内容设置无效)*/
@property (nonatomic,strong) NSAttributedString *numberText;
/**23、号码栏X偏移量*/
@property (nonatomic,strong) NSNumber * numberOffsetX;
/**24、号码栏Y偏移量*/
@property (nonatomic,strong) NSNumber * numberOffsetY;
#pragma mark 切换账号
/**25、隐藏切换账号按钮*/
@property (nonatomic,assign) BOOL swithAccHidden;
/**26、切换账号*/
@property (nonatomic,strong) NSAttributedString *switchAccText;
/**27、设置切换账号相对于标题栏下边缘y偏移*/
@property (nonatomic,strong) NSNumber *switchOffsetY;
#pragma mark 隐私条款
/**28、复选框未选中时图片*/
@property (nonatomic,strong) UIImage *uncheckedImg;
/**29、复选框选中时图片*/
@property (nonatomic,strong) UIImage *checkedImg;
/**30、复选框大小(只能正方形)必须大于12*/
@property (nonatomic,assign) NSNumber *checkboxWH;
/**31、隐私条款(包括check框)的左右边距*/
@property (nonatomic, strong) NSNumber *appPrivacyOriginX;
/**32、隐私的内容模板:
1、全句可自定义但必须保留"&&默认&&"字段表明SDK默认协议,否则设置不生效
2、协议1和协议2的名称要与数组 str1 和 str2 ... 里的名称 一样
3、必设置项(参考SDK的demo)
appPrivacieDemo设置内容:登录并同意&&默认&&和&&百度协议&&、&&京东协议2&&登录并支持一键登录
展示: 登录并同意中国移动条款协议和百度协议1、京东协议2登录并支持一键登录
*/
@property (nonatomic, copy) NSAttributedString *appPrivacyDemo;
/**33、隐私条款文字内容的方向:默认是居左
*/
@property (nonatomic,assign) NSTextAlignment appPrivacyAlignment;
/**34、隐私条款:数组(务必按顺序)要设置NSLinkAttributeName属性可以跳转协议
对象举例:
NSAttributedString *str1 = [[NSAttributedString alloc]initWithString:@"百度协议" attributes:@{NSLinkAttributeName:@"https://www.baidu.com"}];
@[str1,,str2,str3,...]
*/
@property (nonatomic,strong) NSArray <NSAttributedString *> *appPrivacy;
/**35、隐私条款名称颜色(协议)统一设置
*/
@property (nonatomic,strong) UIColor *privacyColor;
/**36、隐私条款Y偏移量(注:此属性为与屏幕底部的距离)*/
@property (nonatomic,strong) NSNumber * privacyOffsetY;
/**37、隐私条款check框默认状态 默认:NO */
@property (nonatomic,assign) BOOL privacyState;
/**38、隐私条款默认协议是否开启书名号
*/
@property (nonatomic, assign) BOOL privacySymbol;
#pragma mark 底部标识Title
/**39、slogan偏移量Y*/
@property (nonatomic,strong) NSNumber * sloganOffsetY;
/**40、slogan文字S*/
@property (nonatomic,strong) NSAttributedString *sloganText;
#pragma mark -----------------------------------短信页面-----------------------------------
/**41、SDK短信验证码开关
(默认为NO,不使用SDK提供的短验直接回调 ,YES:使用SDK提供的短验)
为NO时,授权界面的切换账号按钮直接返回字典:200060 和 导航栏 “NavigationController”*/
@property (nonatomic,assign) BOOL SMSAuthOn;
/**42、短验页面导航栏标题*/
@property (nonatomic,strong) NSAttributedString *SMSNavText;
/**43、登录按钮文本内容*/
@property (nonatomic,strong) NSAttributedString *SMSLogBtnText;
/**44、短验登录按钮图片请按顺序添加到数组(顺序如下)
@[激活状态的图片,失效状态的图片,高亮状态的图片]
*/
@property (nonatomic,strong) NSArray *SMSLogBtnImgs;
/**45、获取验证码按钮图片请按顺序添加到数组(顺序如下)
@[激活状态的图片,失效状态的图片]
*/
@property (nonatomic,strong) NSArray *SMSGetCodeBtnImgs;
/**46、短验界面背景*/
@property (nonatomic,strong) UIImage *SMSBackgroundImage;
#pragma mark -----------------------------------协议页面-----------------------------------
/**47、web协议界面导航返回图标(尺寸根据图片大小)*/
@property (nonatomic,strong) UIImage *webNavReturnImg;
#pragma mark ----------------------弹窗:(温馨提示:由于受屏幕影响,小屏幕(5S,5E,5)需要改动字体和另自适应和布局)--------------------
#pragma mark --------------------------窗口模式1(居中弹窗) 弹框模式需要配合自定义坐标属性使用可自适应-----------------------------------
//务必在设置控件位置时,自行查看各个机型模拟器是否正常
/**温馨提示:
窗口1模式下,自动隐藏系统导航栏,并生成一个UILabel 其frame为(0,0,窗口宽*scaleW,44*scaleW)
返回按钮的frame查看51属性备注,添加在UILabel的center.y位置
*/
/**48、窗口模式开关*/
@property (nonatomic,assign) BOOL authWindow;
/**49、窗口模式推出动画
UIModalTransitionStyleCoverVertical, 下推
UIModalTransitionStyleFlipHorizontal,翻转
UIModalTransitionStyleCrossDissolve, 淡出
*/
@property (nonatomic,assign) UIModalTransitionStyle modalTransitionStyle;
/**50、自定义窗口弧度 默认是10*/
@property (nonatomic,assign) CGFloat cornerRadius;
/**51、自定义窗口宽-缩放系数(屏幕宽乘以系数) 默认是0.8*/
@property (nonatomic,assign) CGFloat scaleW;
/**52、自定义窗口高-缩放系数(屏幕高乘以系数) 默认是0.5*/
@property (nonatomic,assign) CGFloat scaleH;
/**53、返回按钮x偏移(负数左边偏移,正数右边偏移) 只有隐藏导航栏时有效 默认frame为 (20,居中,20 * 系数scaleW,20 * scaleW) */
@property (nonatomic,assign) CGRect navReturnImgFrame;
#pragma mark -----------窗口模式2(边缘弹窗) UIPresentationController(可配合UAPresentationDirection动画使用)-----------
/**54、此属性支持半弹框方式与authWindow不同(此方式为UIPresentationController)设置后自动隐藏切换按钮*/
@property (nonatomic,assign) CGSize controllerSize;
/**55、授权界面支持的方向,横屏;竖屏*/
@property (nonatomic, assign) UIInterfaceOrientation faceOrientation;
@end
//
// UASDKErrorCode.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 *UASDKErrorCode;
//成功
static UASDKErrorCode const UASDKErrorCodeSuccess = @"103000";
//用户取消登录
static UASDKErrorCode const UASDKErrorCodeUserCancelAuth = @"200020";
//数据解析异常
static UASDKErrorCode const UASDKErrorCodeProcessException = @"200021";
//无网络
static UASDKErrorCode const UASDKErrorCodeNoNetwork = @"200022";
//请求超时
static UASDKErrorCode const UASDKErrorCodeRequestTimeout = @"200023";
//未知错误
static UASDKErrorCode const UASDKErrorCodeUnknownError = @"200025";
//蜂窝未开启或不稳定
static UASDKErrorCode const UASDKErrorCodeNonCellularNetwork = @"200027";
//网络请求出错(HTTP Code 非200)
static UASDKErrorCode const UASDKErrorCodeRequestError = @"200028";
//非移动网关重定向失败
static UASDKErrorCode const UASDKErrorCodeWAPRedirectFailed = @"200038";
//无SIM卡
static UASDKErrorCode const UASDKErrorCodePhoneWithoutSIM = @"200048";
//Socket创建或发送接收数据失败
static UASDKErrorCode const UASDKErrorCodeSocketError = @"200050";
//用户点击了“账号切换”按钮(自定义短信页面customSMS为YES才会返回)
static UASDKErrorCode const UASDKErrorCodeCustomSMSVC = @"200060";
//显示登录"授权页面"被拦截(hooked)
static UASDKErrorCode const UASDKErrorCodeAutoVCisHooked = @"200061";
////预取号不支持联通
//static UASDKErrorCode const UASDKErrorCodeNOSupportUnicom = @"200062";
////预取号不支持电信
//static UASDKErrorCode const UASDKErrorCodeNOSupportTelecom = @"200063";
//服务端返回数据异常
static UASDKErrorCode const UASDKErrorCodeExceptionData = @"200064";
//CA根证书校验失败
static UASDKErrorCode const UASDKErrorCodeCAAuthFailed = @"200072";
//本机号码校验仅支持移动手机号
static UASDKErrorCode const UASDKErrorCodeGetMoblieOnlyCMCC = @"200080";
//服务器繁忙
static UASDKErrorCode const UASDKErrorCodeServerBusy = @"200082";
//ppLocation为空
static UASDKErrorCode const UASDKErrorCodeLocationError = @"200086";
//监听授权界面成功弹起
static UASDKErrorCode const UASDKSuccessGetAuthVCCode = @"200087";
//SDK正在处理
static UASDKErrorCode const UASDKErrorCodeHandling = @"200089";
/**
获取错误码描述
@param code 错误码
@return 返回对应描述
*/
FOUNDATION_EXPORT NSString *UASDKErrorDescription(UASDKErrorCode code);
#endif /* UASDKErrorCode_h */
//
// UASDKLogin.h
// TYRZSDK
//
// Created by 谢鸿标 on 2018/10/11.
// Copyright © 2018 com.CMCC.iOS. All rights reserved.
//
#import <UIKit/UIKit.h>
#define UASDKVERSION @"quick_login_iOS_5.3.12"
@class UACustomModel;
NS_ASSUME_NONNULL_BEGIN
@interface UASDKLogin : NSObject
/**
SDK登录单例管理
*/
@property (nonatomic,class,readonly) UASDKLogin *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:(UACustomModel *)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
framework module TYRZSDK {
umbrella header "TYRZSDK.h"
export *
module * { export * }
}
//
// UniAuthHelper.h
// account_verify_sdk_core
//
// Created by zhuof on 2018/3/8.
// Copyright © 2018年 xiaowo. All rights reserved.
// 4.1.3IR01B0320 优化token获取流程。 减少交互。 使用者自行缓存accessCode(具备有效期)。
// 4.3.0IR01B0615 socket通讯优化(GCD方案)
// 4.4.0IR01B0715 1. 预取号流程修改 2.增加读取idfa的功能 3.降低打点频率。
#import <Foundation/Foundation.h>
typedef void (^UniResultListener)(NSDictionary *data);
@interface UniAuthHelper : NSObject
+(UniAuthHelper *) getInstance;
/*
sdk初始化,每个app只能执行一次初始化调用。
注意:某些使用者尝试在同一个app中使用多个appid初始化sdk,这可能导致未知隐患发生。
*/
-(void) initWithAppId:(NSString*) appId appSecret:(NSString*) appSecret;
/*
预取号接口。
timeout:超时时间,单位秒。
listener:回调接口
成功调用有以下前提:
1. 需要保证手机终端有联通sim卡,并且保证联通数据网络是开启状态。如果没有联通数据网络,将返回“获取鉴权信息失败”
2. 手机本地时间正确
3. 如果手机数据网络开启,但是预取号失败,可以尝试手动飞行模式开关一下,尝试让数据网络恢复正常。
预取号获得的accessCode具有效期,请在有效期内使用accesscode换取用户信息。
*/
-(void) getAccessCode:(double)timeout listener:(UniResultListener) listener;
-(void) mobileAuth:(double)timeout listener:(UniResultListener) listener;
-(void) printConsoleEnable:(BOOL)enable;
-(NSString*) getSdkVersion;
@end
//
// 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"
framework module account_login_sdk_noui_core {
umbrella header "account_login_sdk_noui_core.h"
export *
module * { export * }
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6CEA38EC2E63D96E7179449F1279A773"
BuildableName = "CL_ShanYanSDK"
BlueprintName = "CL_ShanYanSDK"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
...@@ -11,61 +11,54 @@ ...@@ -11,61 +11,54 @@
<key>orderHint</key> <key>orderHint</key>
<integer>0</integer> <integer>0</integer>
</dict> </dict>
<key>CL_ShanYanSDK.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>MBProgressHUD.xcscheme</key> <key>MBProgressHUD.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key> <key>orderHint</key>
<integer>3</integer> <integer>2</integer>
</dict> </dict>
<key>Masonry.xcscheme</key> <key>Masonry.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key> <key>orderHint</key>
<integer>2</integer> <integer>1</integer>
</dict> </dict>
<key>PDFGenerator.xcscheme</key> <key>PDFGenerator.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key> <key>orderHint</key>
<integer>4</integer> <integer>3</integer>
</dict> </dict>
<key>Pods-ShorthandMaster.xcscheme</key> <key>Pods-ShorthandMaster.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key> <key>orderHint</key>
<integer>5</integer> <integer>4</integer>
</dict> </dict>
<key>SnapKit.xcscheme</key> <key>SnapKit.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key> <key>orderHint</key>
<integer>6</integer> <integer>5</integer>
</dict> </dict>
<key>SwiftyJSON.xcscheme</key> <key>SwiftyJSON.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key> <key>orderHint</key>
<integer>7</integer> <integer>6</integer>
</dict> </dict>
<key>SwiftyStoreKit.xcscheme</key> <key>SwiftyStoreKit.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key> <key>orderHint</key>
<integer>8</integer> <integer>7</integer>
</dict> </dict>
</dict> </dict>
<key>SuppressBuildableAutocreation</key> <key>SuppressBuildableAutocreation</key>
......
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CL_ShanYanSDK
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/CL_ShanYanSDK/framework" $(inherited) $(PODS_ROOT)/CL_ShanYanSDK
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -ObjC -undefined dynamic_lookup -l"c++.1"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/CL_ShanYanSDK
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CL_ShanYanSDK
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/CL_ShanYanSDK/framework" $(inherited) $(PODS_ROOT)/CL_ShanYanSDK
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -ObjC -undefined dynamic_lookup -l"c++.1"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/CL_ShanYanSDK
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
...@@ -24,29 +24,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ...@@ -24,29 +24,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
## CL_ShanYanSDK
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.
## MBProgressHUD ## MBProgressHUD
Copyright © 2009-2020 Matej Bukovinski Copyright © 2009-2020 Matej Bukovinski
......
...@@ -41,35 +41,6 @@ THE SOFTWARE. ...@@ -41,35 +41,6 @@ THE SOFTWARE.
<key>Type</key> <key>Type</key>
<string>PSGroupSpecifier</string> <string>PSGroupSpecifier</string>
</dict> </dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2018 wanglijun311@gmail.com &lt;CAODA19920605w&gt;
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.
</string>
<key>License</key>
<string>LGPL</string>
<key>Title</key>
<string>CL_ShanYanSDK</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict> <dict>
<key>FooterText</key> <key>FooterText</key>
<string>Copyright © 2009-2020 Matej Bukovinski <string>Copyright © 2009-2020 Matej Bukovinski
......
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit" "${PODS_ROOT}/CL_ShanYanSDK/framework" FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator/PDFGenerator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit/SwiftyStoreKit.framework/Headers" HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator/PDFGenerator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit/SwiftyStoreKit.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++.1" -framework "Alamofire" -framework "CL_ShanYanSDK" -framework "CoreGraphics" -framework "EAccountApiSDK" -framework "Foundation" -framework "MBProgressHUD" -framework "Masonry" -framework "OAuth" -framework "PDFGenerator" -framework "QuartzCore" -framework "SnapKit" -framework "SwiftyJSON" -framework "SwiftyStoreKit" -framework "TYRZSDK" -framework "UIKit" -framework "WebKit" -framework "account_login_sdk_noui_core" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CoreGraphics" -framework "Foundation" -framework "MBProgressHUD" -framework "Masonry" -framework "PDFGenerator" -framework "QuartzCore" -framework "SnapKit" -framework "SwiftyJSON" -framework "SwiftyStoreKit" -framework "UIKit" -framework "WebKit"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR} PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
......
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit" "${PODS_ROOT}/CL_ShanYanSDK/framework" FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator/PDFGenerator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit/SwiftyStoreKit.framework/Headers" HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator/PDFGenerator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit/SwiftyStoreKit.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++.1" -framework "Alamofire" -framework "CL_ShanYanSDK" -framework "CoreGraphics" -framework "EAccountApiSDK" -framework "Foundation" -framework "MBProgressHUD" -framework "Masonry" -framework "OAuth" -framework "PDFGenerator" -framework "QuartzCore" -framework "SnapKit" -framework "SwiftyJSON" -framework "SwiftyStoreKit" -framework "TYRZSDK" -framework "UIKit" -framework "WebKit" -framework "account_login_sdk_noui_core" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CoreGraphics" -framework "Foundation" -framework "MBProgressHUD" -framework "Masonry" -framework "PDFGenerator" -framework "QuartzCore" -framework "SnapKit" -framework "SwiftyJSON" -framework "SwiftyStoreKit" -framework "UIKit" -framework "WebKit"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR} PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
......
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
A95CDFE324E0EE1A0066DAE6 /* SHBaseTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFE224E0EE1A0066DAE6 /* SHBaseTabBarController.swift */; }; A95CDFE324E0EE1A0066DAE6 /* SHBaseTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFE224E0EE1A0066DAE6 /* SHBaseTabBarController.swift */; };
A95CDFE524E0EE4B0066DAE6 /* SHBaseNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFE424E0EE4B0066DAE6 /* SHBaseNavigationController.swift */; }; A95CDFE524E0EE4B0066DAE6 /* SHBaseNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFE424E0EE4B0066DAE6 /* SHBaseNavigationController.swift */; };
A95CDFE724E0EE7A0066DAE6 /* SHGuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFE624E0EE7A0066DAE6 /* SHGuideViewController.swift */; }; A95CDFE724E0EE7A0066DAE6 /* SHGuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFE624E0EE7A0066DAE6 /* SHGuideViewController.swift */; };
A95CDFEA24E0F12C0066DAE6 /* Login.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A95CDFE924E0F12C0066DAE6 /* Login.storyboard */; };
A95CE00724E0F42F0066DAE6 /* CRAccountManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFEE24E0F42E0066DAE6 /* CRAccountManager.swift */; }; A95CE00724E0F42F0066DAE6 /* CRAccountManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFEE24E0F42E0066DAE6 /* CRAccountManager.swift */; };
A95CE00824E0F42F0066DAE6 /* CRPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFEF24E0F42F0066DAE6 /* CRPurchaseManager.swift */; }; A95CE00824E0F42F0066DAE6 /* CRPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFEF24E0F42F0066DAE6 /* CRPurchaseManager.swift */; };
A95CE00924E0F42F0066DAE6 /* CRContactTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFF024E0F42F0066DAE6 /* CRContactTools.swift */; }; A95CE00924E0F42F0066DAE6 /* CRContactTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFF024E0F42F0066DAE6 /* CRContactTools.swift */; };
...@@ -75,9 +74,6 @@ ...@@ -75,9 +74,6 @@
A95CE00F24E0F42F0066DAE6 /* AESCipher.m in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFFA24E0F42F0066DAE6 /* AESCipher.m */; }; A95CE00F24E0F42F0066DAE6 /* AESCipher.m in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFFA24E0F42F0066DAE6 /* AESCipher.m */; };
A95CE01124E0F42F0066DAE6 /* MBProgressHUD+MJ.m in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFFF24E0F42F0066DAE6 /* MBProgressHUD+MJ.m */; }; A95CE01124E0F42F0066DAE6 /* MBProgressHUD+MJ.m in Sources */ = {isa = PBXBuildFile; fileRef = A95CDFFF24E0F42F0066DAE6 /* MBProgressHUD+MJ.m */; };
A95CE01524E0F42F0066DAE6 /* MBProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A95CE00624E0F42F0066DAE6 /* MBProgressHUD.bundle */; }; A95CE01524E0F42F0066DAE6 /* MBProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A95CE00624E0F42F0066DAE6 /* MBProgressHUD.bundle */; };
A95CE02424E1272F0066DAE6 /* SHSmsLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CE02324E1272F0066DAE6 /* SHSmsLoginViewController.swift */; };
A95CE02924E13D480066DAE6 /* ZJOauthLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A95CE02624E13D470066DAE6 /* ZJOauthLoginManager.m */; };
A95CE02A24E13D480066DAE6 /* ZJOauthLoginConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = A95CE02724E13D470066DAE6 /* ZJOauthLoginConfig.m */; };
A95CE02F24E151340066DAE6 /* UIButton+Category.m in Sources */ = {isa = PBXBuildFile; fileRef = A95CE02D24E151340066DAE6 /* UIButton+Category.m */; }; A95CE02F24E151340066DAE6 /* UIButton+Category.m in Sources */ = {isa = PBXBuildFile; fileRef = A95CE02D24E151340066DAE6 /* UIButton+Category.m */; };
A95CE03224E1521F0066DAE6 /* SHRecordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CE03124E1521F0066DAE6 /* SHRecordViewController.swift */; }; A95CE03224E1521F0066DAE6 /* SHRecordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95CE03124E1521F0066DAE6 /* SHRecordViewController.swift */; };
A95CE03424E157CF0066DAE6 /* Record.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A95CE03324E157CF0066DAE6 /* Record.storyboard */; }; A95CE03424E157CF0066DAE6 /* Record.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A95CE03324E157CF0066DAE6 /* Record.storyboard */; };
...@@ -168,7 +164,6 @@ ...@@ -168,7 +164,6 @@
A95CDFE224E0EE1A0066DAE6 /* SHBaseTabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SHBaseTabBarController.swift; sourceTree = "<group>"; }; A95CDFE224E0EE1A0066DAE6 /* SHBaseTabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SHBaseTabBarController.swift; sourceTree = "<group>"; };
A95CDFE424E0EE4B0066DAE6 /* SHBaseNavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SHBaseNavigationController.swift; sourceTree = "<group>"; }; A95CDFE424E0EE4B0066DAE6 /* SHBaseNavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SHBaseNavigationController.swift; sourceTree = "<group>"; };
A95CDFE624E0EE7A0066DAE6 /* SHGuideViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SHGuideViewController.swift; sourceTree = "<group>"; }; A95CDFE624E0EE7A0066DAE6 /* SHGuideViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SHGuideViewController.swift; sourceTree = "<group>"; };
A95CDFE924E0F12C0066DAE6 /* Login.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Login.storyboard; sourceTree = "<group>"; };
A95CDFEE24E0F42E0066DAE6 /* CRAccountManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CRAccountManager.swift; sourceTree = "<group>"; }; A95CDFEE24E0F42E0066DAE6 /* CRAccountManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CRAccountManager.swift; sourceTree = "<group>"; };
A95CDFEF24E0F42F0066DAE6 /* CRPurchaseManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CRPurchaseManager.swift; sourceTree = "<group>"; }; A95CDFEF24E0F42F0066DAE6 /* CRPurchaseManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CRPurchaseManager.swift; sourceTree = "<group>"; };
A95CDFF024E0F42F0066DAE6 /* CRContactTools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CRContactTools.swift; sourceTree = "<group>"; }; A95CDFF024E0F42F0066DAE6 /* CRContactTools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CRContactTools.swift; sourceTree = "<group>"; };
...@@ -183,11 +178,6 @@ ...@@ -183,11 +178,6 @@
A95CDFFF24E0F42F0066DAE6 /* MBProgressHUD+MJ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MBProgressHUD+MJ.m"; sourceTree = "<group>"; }; A95CDFFF24E0F42F0066DAE6 /* MBProgressHUD+MJ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MBProgressHUD+MJ.m"; sourceTree = "<group>"; };
A95CE00624E0F42F0066DAE6 /* MBProgressHUD.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = MBProgressHUD.bundle; sourceTree = "<group>"; }; A95CE00624E0F42F0066DAE6 /* MBProgressHUD.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = MBProgressHUD.bundle; sourceTree = "<group>"; };
A95CE01A24E0FA460066DAE6 /* ShorthandMaster-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ShorthandMaster-Bridging-Header.h"; sourceTree = "<group>"; }; A95CE01A24E0FA460066DAE6 /* ShorthandMaster-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ShorthandMaster-Bridging-Header.h"; sourceTree = "<group>"; };
A95CE02324E1272F0066DAE6 /* SHSmsLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHSmsLoginViewController.swift; sourceTree = "<group>"; };
A95CE02524E13D470066DAE6 /* ZJOauthLoginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJOauthLoginManager.h; sourceTree = "<group>"; };
A95CE02624E13D470066DAE6 /* ZJOauthLoginManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJOauthLoginManager.m; sourceTree = "<group>"; };
A95CE02724E13D470066DAE6 /* ZJOauthLoginConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJOauthLoginConfig.m; sourceTree = "<group>"; };
A95CE02824E13D480066DAE6 /* ZJOauthLoginConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJOauthLoginConfig.h; sourceTree = "<group>"; };
A95CE02B24E140420066DAE6 /* PrefixHeader.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; }; A95CE02B24E140420066DAE6 /* PrefixHeader.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
A95CE02D24E151340066DAE6 /* UIButton+Category.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+Category.m"; sourceTree = "<group>"; }; A95CE02D24E151340066DAE6 /* UIButton+Category.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+Category.m"; sourceTree = "<group>"; };
A95CE02E24E151340066DAE6 /* UIButton+Category.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+Category.h"; sourceTree = "<group>"; }; A95CE02E24E151340066DAE6 /* UIButton+Category.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+Category.h"; sourceTree = "<group>"; };
...@@ -311,7 +301,6 @@ ...@@ -311,7 +301,6 @@
A950F5B224F4E5A4007AB63E /* Other */, A950F5B224F4E5A4007AB63E /* Other */,
A950F5AD24F4E003007AB63E /* Mine */, A950F5AD24F4E003007AB63E /* Mine */,
A95CE03024E151730066DAE6 /* Record */, A95CE03024E151730066DAE6 /* Record */,
A95CDFE824E0EEE80066DAE6 /* Login */,
A95CDFAB24E0EBF10066DAE6 /* Base */, A95CDFAB24E0EBF10066DAE6 /* Base */,
A95CDFB724E0EBF10066DAE6 /* Contstants */, A95CDFB724E0EBF10066DAE6 /* Contstants */,
A95CDF9824E0EBF10066DAE6 /* Extensions */, A95CDF9824E0EBF10066DAE6 /* Extensions */,
...@@ -406,19 +395,6 @@ ...@@ -406,19 +395,6 @@
path = Contstants; path = Contstants;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
A95CDFE824E0EEE80066DAE6 /* Login */ = {
isa = PBXGroup;
children = (
A95CDFE924E0F12C0066DAE6 /* Login.storyboard */,
A95CE02324E1272F0066DAE6 /* SHSmsLoginViewController.swift */,
A95CE02824E13D480066DAE6 /* ZJOauthLoginConfig.h */,
A95CE02724E13D470066DAE6 /* ZJOauthLoginConfig.m */,
A95CE02524E13D470066DAE6 /* ZJOauthLoginManager.h */,
A95CE02624E13D470066DAE6 /* ZJOauthLoginManager.m */,
);
path = Login;
sourceTree = "<group>";
};
A95CDFEC24E0F42E0066DAE6 /* Share */ = { A95CDFEC24E0F42E0066DAE6 /* Share */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -528,7 +504,6 @@ ...@@ -528,7 +504,6 @@
A95CDF6124E0E8B50066DAE6 /* Frameworks */, A95CDF6124E0E8B50066DAE6 /* Frameworks */,
A95CDF6224E0E8B50066DAE6 /* Resources */, A95CDF6224E0E8B50066DAE6 /* Resources */,
8763496C7577830989DF8B2E /* [CP] Embed Pods Frameworks */, 8763496C7577830989DF8B2E /* [CP] Embed Pods Frameworks */,
0F5CA51FD5F8AC1FD34B642B /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
...@@ -629,7 +604,6 @@ ...@@ -629,7 +604,6 @@
A95CDF7124E0E8B80066DAE6 /* Assets.xcassets in Resources */, A95CDF7124E0E8B80066DAE6 /* Assets.xcassets in Resources */,
A95CDFD624E0EBF10066DAE6 /* CRLaunchGuideCell_1.xib in Resources */, A95CDFD624E0EBF10066DAE6 /* CRLaunchGuideCell_1.xib in Resources */,
A95CE03424E157CF0066DAE6 /* Record.storyboard in Resources */, A95CE03424E157CF0066DAE6 /* Record.storyboard in Resources */,
A95CDFEA24E0F12C0066DAE6 /* Login.storyboard in Resources */,
A94D935424F7503E00A886C0 /* SHRecordExportAlertView.xib in Resources */, A94D935424F7503E00A886C0 /* SHRecordExportAlertView.xib in Resources */,
A95CDF6F24E0E8B50066DAE6 /* Main.storyboard in Resources */, A95CDF6F24E0E8B50066DAE6 /* Main.storyboard in Resources */,
A950F5B124F4E080007AB63E /* Mine.storyboard in Resources */, A950F5B124F4E080007AB63E /* Mine.storyboard in Resources */,
...@@ -653,23 +627,6 @@ ...@@ -653,23 +627,6 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
0F5CA51FD5F8AC1FD34B642B /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ShorthandMaster/Pods-ShorthandMaster-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ShorthandMaster/Pods-ShorthandMaster-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ShorthandMaster/Pods-ShorthandMaster-resources.sh\"\n";
showEnvVarsInLog = 0;
};
35E493E4C187C72BB0C7C5B7 /* [CP] Check Pods Manifest.lock */ = { 35E493E4C187C72BB0C7C5B7 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
...@@ -718,14 +675,12 @@ ...@@ -718,14 +675,12 @@
files = ( files = (
A950F5A824F36F55007AB63E /* SHRecordListViewController.swift in Sources */, A950F5A824F36F55007AB63E /* SHRecordListViewController.swift in Sources */,
A95CDFDA24E0EBF10066DAE6 /* CRSnippetCode.swift in Sources */, A95CDFDA24E0EBF10066DAE6 /* CRSnippetCode.swift in Sources */,
A95CE02424E1272F0066DAE6 /* SHSmsLoginViewController.swift in Sources */,
A95CE01124E0F42F0066DAE6 /* MBProgressHUD+MJ.m in Sources */, A95CE01124E0F42F0066DAE6 /* MBProgressHUD+MJ.m in Sources */,
A95CE00924E0F42F0066DAE6 /* CRContactTools.swift in Sources */, A95CE00924E0F42F0066DAE6 /* CRContactTools.swift in Sources */,
A950F5BE24F4E66B007AB63E /* ActivityTestView.swift in Sources */, A950F5BE24F4E66B007AB63E /* ActivityTestView.swift in Sources */,
A950F5C424F4E796007AB63E /* TitleTableView.swift in Sources */, A950F5C424F4E796007AB63E /* TitleTableView.swift in Sources */,
A94D935224F7502700A886C0 /* SHRecordExportAlertView.swift in Sources */, A94D935224F7502700A886C0 /* SHRecordExportAlertView.swift in Sources */,
A95CE03824E17BAF0066DAE6 /* SHTimer.swift in Sources */, A95CE03824E17BAF0066DAE6 /* SHTimer.swift in Sources */,
A95CE02924E13D480066DAE6 /* ZJOauthLoginManager.m in Sources */,
A95CDFBF24E0EBF10066DAE6 /* UIWindow+Extension.swift in Sources */, A95CDFBF24E0EBF10066DAE6 /* UIWindow+Extension.swift in Sources */,
A95CE00B24E0F42F0066DAE6 /* CRAPIManager.swift in Sources */, A95CE00B24E0F42F0066DAE6 /* CRAPIManager.swift in Sources */,
A95CDFE524E0EE4B0066DAE6 /* SHBaseNavigationController.swift in Sources */, A95CDFE524E0EE4B0066DAE6 /* SHBaseNavigationController.swift in Sources */,
...@@ -764,7 +719,6 @@ ...@@ -764,7 +719,6 @@
A950F5AC24F39EC1007AB63E /* SHRecordShowViewController.swift in Sources */, A950F5AC24F39EC1007AB63E /* SHRecordShowViewController.swift in Sources */,
A950F5BC24F4E66B007AB63E /* PopBaseView.swift in Sources */, A950F5BC24F4E66B007AB63E /* PopBaseView.swift in Sources */,
A95CDFC824E0EBF10066DAE6 /* UITabBar+Extension.swift in Sources */, A95CDFC824E0EBF10066DAE6 /* UITabBar+Extension.swift in Sources */,
A95CE02A24E13D480066DAE6 /* ZJOauthLoginConfig.m in Sources */,
A95CDFC124E0EBF10066DAE6 /* UIButton+Extension.swift in Sources */, A95CDFC124E0EBF10066DAE6 /* UIButton+Extension.swift in Sources */,
A95CDFDC24E0EBF10066DAE6 /* CRConstants.swift in Sources */, A95CDFDC24E0EBF10066DAE6 /* CRConstants.swift in Sources */,
A95CE00F24E0F42F0066DAE6 /* AESCipher.m in Sources */, A95CE00F24E0F42F0066DAE6 /* AESCipher.m in Sources */,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<key>ShorthandMaster.xcscheme_^#shared#^_</key> <key>ShorthandMaster.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>9</integer> <integer>8</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Sms Login View Controller-->
<scene sceneID="RCW-i0-Kk0">
<objects>
<viewController storyboardIdentifier="SHSmsLoginViewController" id="0vK-NP-6uC" customClass="SHSmsLoginViewController" customModule="ShorthandMaster" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="rWp-4m-lWT">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_icon" translatesAutoresizingMaskIntoConstraints="NO" id="K4q-YX-EDe">
<rect key="frame" x="164" y="136" width="86" height="86"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D5B-KS-CuZ">
<rect key="frame" x="31" y="359" width="352" height="44"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入您要设置的手机号码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="1G6-DN-Ehm">
<rect key="frame" x="0.0" y="0.0" width="352" height="42"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gCb-N6-bdk">
<rect key="frame" x="0.0" y="42" width="352" height="2"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="YX4-LD-3NV"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="massColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="gCb-N6-bdk" firstAttribute="leading" secondItem="D5B-KS-CuZ" secondAttribute="leading" id="RD4-CE-Byb"/>
<constraint firstItem="1G6-DN-Ehm" firstAttribute="top" secondItem="D5B-KS-CuZ" secondAttribute="top" id="T6w-wE-r6T"/>
<constraint firstItem="gCb-N6-bdk" firstAttribute="top" secondItem="1G6-DN-Ehm" secondAttribute="bottom" id="WKx-H1-CxF"/>
<constraint firstAttribute="height" constant="44" id="cPt-Rf-hRh"/>
<constraint firstAttribute="trailing" secondItem="1G6-DN-Ehm" secondAttribute="trailing" id="edI-Kn-AHH"/>
<constraint firstAttribute="trailing" secondItem="gCb-N6-bdk" secondAttribute="trailing" id="gUM-QG-tY3"/>
<constraint firstItem="1G6-DN-Ehm" firstAttribute="leading" secondItem="D5B-KS-CuZ" secondAttribute="leading" id="icN-gF-Gev"/>
<constraint firstAttribute="bottom" secondItem="gCb-N6-bdk" secondAttribute="bottom" id="oxy-Ei-7Du"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pbc-4P-jnN">
<rect key="frame" x="31" y="448.5" width="352" height="44"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="k41-9o-PWa">
<rect key="frame" x="0.0" y="0.0" width="255" height="42"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gNd-Ps-brj">
<rect key="frame" x="0.0" y="42" width="352" height="2"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="ZMM-mI-R0x"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="massColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DpE-zg-95f">
<rect key="frame" x="256" y="0.0" width="96" height="42"/>
<constraints>
<constraint firstAttribute="width" constant="96" id="21q-XA-OJe"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="获取验证码"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="massTitleColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="smsCodeBtnClick:" destination="0vK-NP-6uC" eventType="touchUpInside" id="UE4-ye-qkz"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xap-PS-45I">
<rect key="frame" x="255" y="10.5" width="1" height="21"/>
<color key="backgroundColor" red="0.84705882352941175" green="0.84705882352941175" blue="0.84705882352941175" alpha="0.84705882352941175" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="WCB-fU-0li"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="gNd-Ps-brj" secondAttribute="trailing" id="2nq-bZ-6yv"/>
<constraint firstItem="DpE-zg-95f" firstAttribute="leading" secondItem="xap-PS-45I" secondAttribute="trailing" id="IOC-UX-hJD"/>
<constraint firstItem="k41-9o-PWa" firstAttribute="top" secondItem="pbc-4P-jnN" secondAttribute="top" id="SBw-7S-zYb"/>
<constraint firstItem="gNd-Ps-brj" firstAttribute="top" secondItem="DpE-zg-95f" secondAttribute="bottom" id="STj-Rn-QfT"/>
<constraint firstItem="k41-9o-PWa" firstAttribute="leading" secondItem="pbc-4P-jnN" secondAttribute="leading" id="bd8-Py-dtF"/>
<constraint firstItem="xap-PS-45I" firstAttribute="leading" secondItem="k41-9o-PWa" secondAttribute="trailing" id="cq0-Xk-FlP"/>
<constraint firstItem="DpE-zg-95f" firstAttribute="centerY" secondItem="xap-PS-45I" secondAttribute="centerY" id="fIp-RH-ip9"/>
<constraint firstItem="gNd-Ps-brj" firstAttribute="leading" secondItem="pbc-4P-jnN" secondAttribute="leading" id="gOO-x0-SBq"/>
<constraint firstItem="DpE-zg-95f" firstAttribute="height" secondItem="xap-PS-45I" secondAttribute="height" multiplier="2:1" id="gjY-u6-c5e"/>
<constraint firstItem="gNd-Ps-brj" firstAttribute="top" secondItem="k41-9o-PWa" secondAttribute="bottom" id="tYD-uO-fil"/>
<constraint firstItem="DpE-zg-95f" firstAttribute="top" secondItem="pbc-4P-jnN" secondAttribute="top" id="tj1-Pm-RVJ"/>
<constraint firstAttribute="trailing" secondItem="DpE-zg-95f" secondAttribute="trailing" id="uvX-bi-jf8"/>
<constraint firstAttribute="bottom" secondItem="gNd-Ps-brj" secondAttribute="bottom" id="wri-ep-T6q"/>
<constraint firstAttribute="height" constant="44" id="xyi-IO-Gnp"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*双卡用户请输入设置默认的呼叫卡" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="co8-pU-SLJ">
<rect key="frame" x="31" y="506.5" width="174" height="13.5"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.73333333333333328" green="0.73333333333333328" blue="0.73333333333333328" alpha="0.84705882352941175" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gq4-Vf-84a">
<rect key="frame" x="74.5" y="605" width="265" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="NH1-6Z-2oo"/>
</constraints>
<state key="normal" title="提交">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="massColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="confirmBtnClick:" destination="0vK-NP-6uC" eventType="touchUpInside" id="H49-OX-Vnf"/>
</connections>
</button>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="wY8-dP-V6N">
<rect key="frame" x="74.5" y="667" width="265" height="50"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="4HQ-h6-57x"/>
</constraints>
<color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="D5B-KS-CuZ" firstAttribute="width" secondItem="rWp-4m-lWT" secondAttribute="width" multiplier="319:375" id="065-BO-6wU"/>
<constraint firstItem="pbc-4P-jnN" firstAttribute="height" secondItem="D5B-KS-CuZ" secondAttribute="height" id="0tQ-5e-fDn"/>
<constraint firstItem="co8-pU-SLJ" firstAttribute="top" secondItem="pbc-4P-jnN" secondAttribute="bottom" constant="14" id="1An-GH-pjx"/>
<constraint firstItem="pbc-4P-jnN" firstAttribute="width" secondItem="D5B-KS-CuZ" secondAttribute="width" id="5iW-N0-b8o"/>
<constraint firstItem="pbc-4P-jnN" firstAttribute="centerY" secondItem="rWp-4m-lWT" secondAttribute="centerY" multiplier="1.05" id="8nB-Yc-ZTo"/>
<constraint firstItem="gq4-Vf-84a" firstAttribute="width" secondItem="rWp-4m-lWT" secondAttribute="width" multiplier="240:375" id="N2I-di-STy"/>
<constraint firstItem="K4q-YX-EDe" firstAttribute="centerY" secondItem="rWp-4m-lWT" secondAttribute="centerY" multiplier="0.4" id="NZe-b4-Q6Y"/>
<constraint firstItem="D5B-KS-CuZ" firstAttribute="centerX" secondItem="rWp-4m-lWT" secondAttribute="centerX" id="OwP-Ko-Azc"/>
<constraint firstItem="K4q-YX-EDe" firstAttribute="centerX" secondItem="rWp-4m-lWT" secondAttribute="centerX" id="PTk-5F-0uS"/>
<constraint firstItem="gq4-Vf-84a" firstAttribute="centerX" secondItem="rWp-4m-lWT" secondAttribute="centerX" id="Pt4-8U-mfw"/>
<constraint firstItem="wY8-dP-V6N" firstAttribute="leading" secondItem="gq4-Vf-84a" secondAttribute="leading" id="QDt-a9-zfm"/>
<constraint firstItem="wY8-dP-V6N" firstAttribute="top" secondItem="gq4-Vf-84a" secondAttribute="bottom" constant="18" id="UIs-RX-B6N"/>
<constraint firstItem="co8-pU-SLJ" firstAttribute="leading" secondItem="pbc-4P-jnN" secondAttribute="leading" id="ZES-4c-17X"/>
<constraint firstItem="D5B-KS-CuZ" firstAttribute="centerY" secondItem="rWp-4m-lWT" secondAttribute="centerY" multiplier="0.85" id="ZVH-EE-lmR"/>
<constraint firstItem="pbc-4P-jnN" firstAttribute="centerX" secondItem="D5B-KS-CuZ" secondAttribute="centerX" id="jdb-Y4-uiM"/>
<constraint firstItem="wY8-dP-V6N" firstAttribute="trailing" secondItem="gq4-Vf-84a" secondAttribute="trailing" id="kdS-Rq-pJs"/>
<constraint firstItem="gq4-Vf-84a" firstAttribute="centerY" secondItem="rWp-4m-lWT" secondAttribute="centerY" multiplier="1.4" id="vIA-kh-BBq"/>
</constraints>
<viewLayoutGuide key="safeArea" id="UBM-Pd-Y89"/>
</view>
<connections>
<outlet property="confirmBtn" destination="gq4-Vf-84a" id="Jbm-ej-3aj"/>
<outlet property="phoneTF" destination="1G6-DN-Ehm" id="ktT-Oo-KNi"/>
<outlet property="protocolTV" destination="wY8-dP-V6N" id="lpd-Yi-T25"/>
<outlet property="smsCodeBtn" destination="DpE-zg-95f" id="GaT-q4-x8a"/>
<outlet property="smsCodeTF" destination="k41-9o-PWa" id="mhg-0h-Tvh"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="rUx-by-egg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="108.69565217391305" y="159.375"/>
</scene>
</scenes>
<resources>
<image name="login_icon" width="86" height="86"/>
</resources>
</document>
//
// SHSmsLoginViewController.swift
// ShorthandMaster
//
// Created by 明津李 on 2020/8/10.
// Copyright © 2020 明津李. All rights reserved.
//
import UIKit
class SHSmsLoginViewController: SHBaseViewController {
@IBOutlet var phoneTF: UITextField!
@IBOutlet var smsCodeTF: UITextField!
@IBOutlet var smsCodeBtn: UIButton!
@IBOutlet var confirmBtn: UIButton!
@IBOutlet var protocolTV: UITextView!
var currentTF: UITextField?
var agree: Bool = false
@objc var smsLoginSuccess: (CRUserInfoModel)->() = {_ in }
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
override func setupUI(){
super.setupUI()
view.layoutIfNeeded()
view.layoutSubviews()
confirmBtn.layer.cornerRadius = confirmBtn.frame.size.height/2
protocolTV.attributedText = textViewClick(false)
protocolTV.delegate = self
protocolTV.isEditable = false
protocolTV.isScrollEnabled = false
protocolTV.textAlignment = .center
}
func textViewClick(_ select:Bool) -> NSMutableAttributedString{
let str = " 已阅读并同意用户协议和隐私政策"
let attStr = NSMutableAttributedString.init(string: str)
let style = NSMutableParagraphStyle()
style.lineSpacing = kAutoWidth*6
let userRange = str.range(of: "用户协议")
attStr.addAttributes([.foregroundColor:kMassColor, .link:"user://"], range: NSRange(userRange!, in: str))
let privacyRange = str.range(of: "隐私政策")
attStr.addAttributes([.foregroundColor:kMassColor, .link:"privacy://"], range: NSRange(privacyRange!, in: str))
let image = UIImage.init(named: select==true ? "login_procotol_agree_selected": "login_procotol_agree_select")
let imageSize = CGSize.init(width: 12, height: 12)
UIGraphicsBeginImageContextWithOptions(imageSize, false, 0)
image?.draw(in: CGRect.init(x: 0, y: 0, width: imageSize.width, height: imageSize.height))
let newImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
let imageAttachmenmt = NSTextAttachment()
imageAttachmenmt.bounds = CGRect.init(x: 0, y: -2, width: imageSize.width, height: imageSize.height)
imageAttachmenmt.image = newImage
let imageAttStr = NSMutableAttributedString.init(attributedString: NSAttributedString.init(attachment: imageAttachmenmt))
attStr.insert(imageAttStr, at: 0)
attStr.addAttributes([.link:"agree://"], range: NSRange.init(location: 0, length: imageAttStr.length))
attStr.addAttributes([.paragraphStyle:style, .font:UIFont.systemFont(ofSize: 12)], range: NSRange.init(location: 0, length: attStr.length))
return attStr
}
@objc @IBAction func smsCodeBtnClick(_ sender: UIButton){
if phoneTF.text?.count != 11 {
return
}
currentTF?.resignFirstResponder()
count(sender)
}
@objc @IBAction func confirmBtnClick(_ sender: UIButton){
if phoneTF.text?.count != 11 {
return
}
if smsCodeTF.text?.count == 0 {
return
}
currentTF?.resignFirstResponder()
}
func count(_ sender: UIButton){
var count = 60
sender.isEnabled = false
let timer = DispatchSource.makeTimerSource(flags: [], queue: DispatchQueue.global())
timer.schedule(deadline: DispatchTime.now(), repeating: .seconds(1), leeway: .milliseconds(10))
timer.setEventHandler(handler: {
count -= 1
DispatchQueue.main.sync {
if count == 0{
sender.isEnabled = true
sender.setTitle("获取验证码", for: .normal)
sender.setTitleColor(kMassColor, for: .normal)
timer.cancel()
}else{
sender.setTitle("已发送"+"\(count)"+"s", for: .normal)
sender.setTitleColor(UIColor.init(r: 178, g: 178, b: 178), for: .normal)
}
}
})
timer.resume()
}
}
extension SHSmsLoginViewController: UITextFieldDelegate{
func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
currentTF = textField
return true
}
}
extension SHSmsLoginViewController: UITextViewDelegate{
func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
if URL.scheme == "agree" {
agree = !agree
textView.attributedText = textViewClick(agree);
textView.textAlignment = .center;
return false
} else if URL.scheme == ""{
let web = SHWebViewController()
web.url = ""
self.navigationController?.pushViewController(web, animated: true)
return false
} else if URL.scheme == ""{
let web = SHWebViewController()
web.url = ""
self.navigationController?.pushViewController(web, animated: true)
return false
}
return true
}
}
//
// ZJOauthLoginConfig.h
// Dolphins
//
// Created by 明津李 on 2020/6/17.
// Copyright © 2020 Company. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJOauthLoginConfig : NSObject
@property (nonatomic, copy) void(^loginResult)(id);
- (instancetype)initWithCurrentVC:(UIViewController *)currentVC;
//- (void)loginVerify;
- (void)loginVerify:(void(^)(id))result;
- (void)loginVerify:(void(^)(id))result alert:(BOOL)alert;
@end
NS_ASSUME_NONNULL_END
//
// ZJOauthLoginConfig.m
// Dolphins
//
// Created by 明津李 on 2020/6/17.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJOauthLoginConfig.h"
#import "ZJOauthLoginManager.h"
//#import "AlertControllerTool.h"
//#import "ZJUserInfoManager.h"
//#import "Data.h"
//#import "BaseTabBarViewController.h"
@interface ZJOauthLoginConfig()
@property (nonatomic, strong) UIViewController * currentVC;
//@property (nonatomic, strong) Data * data;
@end
@implementation ZJOauthLoginConfig
- (instancetype)initWithCurrentVC:(UIViewController *)currentVC{
if (self = [super init]) {
// _data = [[Data alloc] init];
_currentVC = currentVC;
[[ZJOauthLoginManager shared] setCurrentVC:currentVC];
}
return self;
}
- (void)loginVerify:(void(^)(id))result{
[self loginVerify:result alert:YES];
}
- (void)loginVerify:(void(^)(id))result alert:(BOOL)alert{
_loginResult = result;
if ([[[CRAccountManager shared] userInfo] isTourist]) {
// if (alert) {
// [AlertControllerTool alertControllerWithTitle:@"提示" message:@"您还没有登录,请先登录" cancelTitle:@"再等等" cancelBlock:^{
//
// } confirm:@"去登录" confirmBlock:^(id s) {
//
// [self goOauthLogin];
//
// } finishBlock:nil];
// }else{
[self goOauthLogin];
// }
} else {
if (self.loginResult) {
self.loginResult([[CRAccountManager shared] userInfo]);
}
}
}
- (void)goOauthLogin{
[[ZJOauthLoginManager shared] callOauthLoginWithSuccess:^(id _Nonnull success) {
[self loginForQuick:success];
} failure:^(id _Nonnull error) {
if ([error isEqual: @100]) {
[self.currentVC.presentedViewController dismissViewControllerAnimated:YES completion:^{
[self codeLoginVC];
}];
}else{
[self codeLoginVC];
}
}];
}
- (void)logCollection {
// NSLog(@"log app_quick_login");
// NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"app_quick_login", @"value": @""}.mutableCopy;
//
// [[TQNetworkTools shared] postWithLogCollection:logCollection parameters: dict success:^(__autoreleasing id *response) {
//// NSLog(@"log app_add_care_friend");
// } failure:^(NSError * _Nonnull error) {
//
// }];
}
- (void)loginForQuick:(NSString *)token{
[self logCollection];
// [[TQNetworkTools shared] postWithAction:loginWithQuick parameters:@{@"token":token, @"appId":[ZJOauthLoginManager shared].AppId} success:^(id _Nonnull response) {
//
// if([[response objectForKey:@"status"] integerValue] == 200){
// [MobClick event:@"login_suc"];
// NSString * token = [[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"token"];
//
// if (token) {
// [self.data WirteDic:token Key:@"token"];
//
// [[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) {
//
// if (self.loginResult) {
// self.loginResult(model);
// }
// BaseTabBarViewController * tabbar = [BaseTabBarViewController new];
// tabbar.selectedIndex = tabbar.viewControllers.count-1;
// self.currentVC.view.window.rootViewController = tabbar;
//
// } failure:^(id _Nonnull error) {
//
// if (self.loginResult) {
// self.loginResult(@"userinfo更新失败");
// }
//
// }];
// }
//
// }else{
// [MobClick event:@"login_fail"];
// [MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.currentVC.view];
// if (self.loginResult) {
// self.loginResult(@"创蓝token认证失败");
// }
// }
//
// } failure:^(NSError * _Nonnull error) {
// [MobClick event:@"login_fail"];
// NSLog(@"失败");
// if (self.loginResult) {
// self.loginResult(@"loginWithQuick返回错误");
// }
// }];
}
- (void)codeLoginVC{
SHSmsLoginViewController * login = [[SHSmsLoginViewController alloc] init];
[self.currentVC.navigationController pushViewController:login animated:YES];
login.smsLoginSuccess = ^(CRUserInfoModel * model){
if (self.loginResult) {
self.loginResult(model);
}
SHBaseTabBarController * tabbar = [SHBaseTabBarController new];
// tabbar.selectedIndex = tabbar.viewControllers.count-1;
self.currentVC.view.window.rootViewController = tabbar;
};
}
@end
//
// ZJOauthLoginManager.h
// Dolphins
//
// Created by 明津李 on 2020/6/11.
// Copyright © 2020 Company. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef void(^successBlock)(id);
typedef void(^failureBlock)(id);
@interface ZJOauthLoginManager : NSObject
+ (instancetype)initWithShanYanAppID:(NSString *)AppID;
+ (instancetype)shared;
- (void)setCurrentVC:(UIViewController *)currentVC;
- (NSString *)AppId;
- (void)callOauthLoginWithSuccess:(successBlock)success failure:(failureBlock)failure;
@end
NS_ASSUME_NONNULL_END
//
// ZJOauthLoginManager.m
// Dolphins
//
// Created by 明津李 on 2020/6/11.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJOauthLoginManager.h"
#import <CL_ShanYanSDK/CL_ShanYanSDK.h>
#import "UIButton+Category.h"
//#import "Data.h"
//#import "ZJUserInfoManager.h"
@interface ZJOauthLoginManager()
@property (nonatomic, strong) UIViewController * currentVC;
@property (nonatomic, copy) failureBlock failureCallBack;
//@property (nonatomic, strong) Data * data;
@property (nonatomic, copy) NSString * tauthAppId;
@end
static ZJOauthLoginManager * manager;
@implementation ZJOauthLoginManager
+ (instancetype)shared{
static dispatch_once_t o;
dispatch_once(&o, ^{
manager = [[ZJOauthLoginManager alloc] init];
});
return manager;
}
+ (instancetype)alloc{
if (manager) {
// 如果单例对象存在则抛出异常
NSException *exception = [NSException exceptionWithName:[NSString stringWithFormat:@"重复创建%@单例对象 异常", [self class]] reason:@"请使用单例" userInfo:nil];
[exception raise];
}
return [super alloc]; // 如果单例对象不存在 正常创建
}
- (id)copyWithZone:(struct _NSZone *)zone{
return manager;
}
+ (id)allocWithZone:(struct _NSZone *)zone{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
manager = [super allocWithZone:zone];
});
return manager;
}
+ (instancetype)initWithShanYanAppID:(NSString *)AppID{
return [[self shared] initWithAppID:AppID];
}
- (instancetype)initWithAppID:(NSString *)AppID{
if (self = [super init]) {
_tauthAppId = AppID;
[CLShanYanSDKManager initWithAppId:AppID complete:nil];
[self prepare];
}
return self;
}
- (instancetype)init{
if (self = [super init]) {
// self.data = [[Data alloc] init];
}
return self;
}
- (void)setCurrentVC:(UIViewController *)currentVC{
_currentVC = currentVC;
}
- (NSString *)AppId{
return _tauthAppId;
}
- (void)prepare{
[CLShanYanSDKManager preGetPhonenumber:^(CLCompleteResult * _Nonnull completeResult) {
}];
}
- (CLUIConfigure *)prepareConfig{
// __weak typeof(self) weakself = self;
CLUIConfigure * baseUIConfigure = [CLUIConfigure new];
baseUIConfigure.viewController = _currentVC;
baseUIConfigure.clNavigationBackgroundClear = @(YES);
baseUIConfigure.clPrefersStatusBarHidden = @(YES);
baseUIConfigure.clNavigationBackBtnImage = [UIImage imageNamed:@"login_nav_back"];
baseUIConfigure.clNavBackBtnImageInsets = [NSValue valueWithUIEdgeInsets: UIEdgeInsetsMake(0, KScaleWidth(5), 44, 44)];
baseUIConfigure.clAuthWindowModalPresentationStyle = @(UIModalPresentationOverFullScreen);
//Logo
baseUIConfigure.clLogoImage = [UIImage imageNamed:@"login_icon"];
//Phone
baseUIConfigure.clPhoneNumberFont = [UIFont systemFontOfSize:KFont(26)];
baseUIConfigure.clPhoneNumberTextAlignment = @(NSTextAlignmentCenter);
//登录Btn
baseUIConfigure.clLoginBtnText = @"";
baseUIConfigure.clLoginBtnNormalBgImage = [UIImage imageNamed:@"login_login_btn"];
baseUIConfigure.clLoginBtnHightLightBgImage = [UIImage imageNamed:@"login_login_btn"];
//CheckBox
baseUIConfigure.clCheckBoxValue = @(NO);
baseUIConfigure.clAppPrivacyLineSpacing = @(KScaleWidth(6));
baseUIConfigure.clCheckBoxSize = [NSValue valueWithCGSize: CGSizeMake(KScaleWidth(24), KScaleWidth(14))];
baseUIConfigure.clCheckBoxVerticalAlignmentToAppPrivacyTop = @(YES);
baseUIConfigure.clCheckBoxUncheckedImage = [UIImage imageNamed:@"login_clause_select"];
baseUIConfigure.clCheckBoxCheckedImage = [UIImage imageNamed:@"login_clause_selected"];
//Privacy
baseUIConfigure.clAppPrivacyNormalDesTextFirst = @"登录即同意";
baseUIConfigure.clAppPrivacyNormalDesTextLast = @"并使用本机号码登录";
//SLOGAN
baseUIConfigure.clShanYanSloganHidden = @(YES);
//Layout
CLOrientationLayOut * clOrientationLayOutPortrait = [CLOrientationLayOut new];
//icon Layout
clOrientationLayOutPortrait.clLayoutLogoWidth = @(KScaleWidth(98));
clOrientationLayOutPortrait.clLayoutLogoHeight = @(KScaleWidth(115));
clOrientationLayOutPortrait.clLayoutLogoCenterX = @(0);
clOrientationLayOutPortrait.clLayoutLogoTop = @(StatusBarHeight+KScaleWidth(94));
//phone Layout
clOrientationLayOutPortrait.clLayoutPhoneCenterX = @(0);
clOrientationLayOutPortrait.clLayoutPhoneTop = @(StatusBarHeight+KScaleWidth(94+63+115));
clOrientationLayOutPortrait.clLayoutPhoneHeight = @(KScaleWidth(20));
//loginBtn Layout
clOrientationLayOutPortrait.clLayoutLoginBtnCenterX = @(0);
clOrientationLayOutPortrait.clLayoutLoginBtnTop = @(StatusBarHeight+KScaleWidth(94+63+115+20+73));
clOrientationLayOutPortrait.clLayoutLoginBtnHeight = @(KScaleWidth(65));
clOrientationLayOutPortrait.clLayoutLoginBtnWidth = @(KScaleWidth(306));
//Privacy Layout
clOrientationLayOutPortrait.clLayoutAppPrivacyBottom = @(KScaleWidth(-48));
clOrientationLayOutPortrait.clLayoutAppPrivacyLeft = @(KScaleWidth(40));
clOrientationLayOutPortrait.clLayoutAppPrivacyRight = @(KScaleWidth(-30));
clOrientationLayOutPortrait.clLayoutAppPrivacyCenterX = @(0);
//Slogan Layout
clOrientationLayOutPortrait.clLayoutSloganBottom = @(100);
clOrientationLayOutPortrait.clLayoutSloganCenterX = @(0);
//CustomView
baseUIConfigure.customAreaView = ^(UIView * customAreaView) {
UILabel * hintLab = [[UILabel alloc] init];
hintLab.text = @"账号安全 放心登录";
hintLab.font = [UIFont systemFontOfSize:KFont(13)];
hintLab.textColor = kColorWithRGB(153, 153, 153);
hintLab.textAlignment = NSTextAlignmentCenter;
[customAreaView addSubview:hintLab];
[hintLab mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(customAreaView).mas_offset(StatusBarHeight+KScaleWidth(94+63+115+32));
make.centerX.equalTo(customAreaView);
make.height.offset(KScaleWidth(13));
make.width.offset(KScaleWidth(200));
}];
//
UIButton * thirdLoginBtn = [[UIButton alloc] initWithframe:CGRectMake(0, 0, KScaleWidth(120), KScaleWidth(24)) setImage:@"login_thirdLogin_arrow" title:@"更换登录方式" titleFont:[UIFont systemFontOfSize:KFont(14)] titleColor:kColorWithRGB(102, 102, 102) backgroundColor:[UIColor clearColor] imageLeft:NO interval:KScaleWidth(6) target:self action:@selector(goSmsCodeLogin)];
thirdLoginBtn.contentMode = UIViewContentModeCenter;
[customAreaView addSubview:thirdLoginBtn];
[thirdLoginBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(customAreaView).mas_offset(StatusBarHeight+KScaleWidth(94+63+115+20+73+65+36));
make.centerX.equalTo(customAreaView);
make.width.offset(KScaleWidth(120));
make.height.offset(KScaleWidth(24));
}];
};
//政策内容
NSDictionary * dic = [[CRAccountManager shared] h5_urlDic];
baseUIConfigure.clAppPrivacyFirst = @[@"用户协议", [NSURL URLWithString:[dic objectForKey:@"user"]?:@""]];
baseUIConfigure.clAppPrivacySecond = @[@"隐私政策",[NSURL URLWithString:[dic objectForKey:@"privacy"]?:@""]];
// NSString *filePath = [[NSBundle mainBundle] pathForResource:@"ShanYanIndex" ofType:@"html"];
// baseUIConfigure.clAppPrivacySecond = @[@"本地协议地址", [NSURL fileURLWithPath:filePath]];
baseUIConfigure.clOrientationLayOutPortrait = clOrientationLayOutPortrait;
return baseUIConfigure;
}
- (void)goSmsCodeLogin{
if (_failureCallBack) {
_failureCallBack(@100);
}
}
- (void)callOauthLoginWithSuccess:(successBlock)success failure:(failureBlock)failure{
_failureCallBack = failure;
//闪验一键登录接口(将拉起授权页)
[CLShanYanSDKManager quickAuthLoginWithConfigure:[self prepareConfig] openLoginAuthListener:^(CLCompleteResult * _Nonnull completeResult) {
// hide loading...
if (completeResult.error) {
//拉起授权页失败
NSLog(@"openLoginAuthListener:%@",completeResult.error.userInfo);
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
if (failure) {
failure(@200); //失败 本地登录
}
});
});
}else{
//拉起授权页成功
}
} oneKeyLoginListener:^(CLCompleteResult * _Nonnull completeResult) {
// __strong typeof(self) strongSelf = weakself;
if (completeResult.error) {
//一键登录失败
NSLog(@"oneKeyLoginListener:%@",completeResult.error.description);
//提示:错误无需提示给用户,可以在用户无感知的状态下直接切换登录方式
if (completeResult.code == 1011){
//用户取消登录(点返回)
//处理建议:如无特殊需求可不做处理,仅作为交互状态回调,此时已经回到当前用户自己的页面
//点击sdk自带的返回,无论是否设置手动销毁,授权页面都会强制关闭
} else{
//处理建议:其他错误代码表示闪验通道无法继续,可以统一走开发者自己的其他登录方式,也可以对不同的错误单独处理
//关闭授权页,如果授权页还未拉起,此调用不会关闭当前用户vc,即不执行任何代码
[CLShanYanSDKManager finishAuthControllerCompletion:nil];
}
}else{
//一键登录获取Token成功
//SDK成功获取到Token
/** token置换手机号
code
*/
if (success) {
success([completeResult.data objectForKey:@"token"]);
}
}
}];
//关闭页面
[CLShanYanSDKManager finishAuthControllerCompletion:^{
}];
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment