Commit 8f00a1d6 authored by Steven杜宇's avatar Steven杜宇

Merge branch 'autoLogin' into youhua-dev

# Conflicts:
#	galaxy/galaxy.xcodeproj/project.pbxproj
parents 73a5d29c b2b002ee
......@@ -248,6 +248,7 @@
049663BA2BF6105C003C8295 /* YHRefreshHeaderAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049663B92BF6105C003C8295 /* YHRefreshHeaderAnimator.swift */; };
049663C02BF729F6003C8295 /* galaxy_refresher.gif in Resources */ = {isa = PBXBuildFile; fileRef = 049663BF2BF729F5003C8295 /* galaxy_refresher.gif */; };
0499E3042C05B91A0037E646 /* YHAppleLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0499E3032C05B91A0037E646 /* YHAppleLoginViewController.swift */; };
0499E3002C056EE30037E646 /* YHAutoLoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0499E2FF2C056EE30037E646 /* YHAutoLoginView.swift */; };
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */; };
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; };
049AC4C62BC3E55300F857F4 /* YHServiceSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4C52BC3E55300F857F4 /* YHServiceSectionView.swift */; };
......@@ -273,6 +274,10 @@
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; };
04C8F4832B7216D800ADF59B /* YHUserInfoHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */; };
04CC2EF02BC3DDB2000305DD /* YHServiceBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */; };
04D1446D2C04359500EE3758 /* ATAuthSDK_D.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04D1446B2C04355B00EE3758 /* ATAuthSDK_D.framework */; settings = {ATTRIBUTES = (Required, ); }; };
04D1446E2C04359500EE3758 /* ATAuthSDK_D.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04D1446B2C04355B00EE3758 /* ATAuthSDK_D.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
04D144712C04363C00EE3758 /* ATAuthSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 04D144702C04363C00EE3758 /* ATAuthSDK.bundle */; };
04D144762C0452E200EE3758 /* YHLoginMethodManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D144752C0452E200EE3758 /* YHLoginMethodManager.swift */; };
04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D5C5652B8ED92600190021 /* YHBaseModel.swift */; };
04E41DE82BD240570077EAE3 /* YHOrderDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E41DE72BD240570077EAE3 /* YHOrderDetailViewController.swift */; };
04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */; };
......@@ -464,6 +469,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
04D1446E2C04359500EE3758 /* ATAuthSDK_D.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -715,6 +721,7 @@
049663B92BF6105C003C8295 /* YHRefreshHeaderAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHRefreshHeaderAnimator.swift; sourceTree = "<group>"; };
049663BF2BF729F5003C8295 /* galaxy_refresher.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = galaxy_refresher.gif; sourceTree = "<group>"; };
0499E3032C05B91A0037E646 /* YHAppleLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppleLoginViewController.swift; sourceTree = "<group>"; };
0499E2FF2C056EE30037E646 /* YHAutoLoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAutoLoginView.swift; sourceTree = "<group>"; };
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsViewController.swift; sourceTree = "<group>"; };
049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsAdvantageCell.swift; sourceTree = "<group>"; };
049AC4C52BC3E55300F857F4 /* YHServiceSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceSectionView.swift; sourceTree = "<group>"; };
......@@ -740,6 +747,9 @@
04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; };
04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserInfoHeaderView.swift; sourceTree = "<group>"; };
04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceBannerView.swift; sourceTree = "<group>"; };
04D1446B2C04355B00EE3758 /* ATAuthSDK_D.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ATAuthSDK_D.framework; sourceTree = "<group>"; };
04D144702C04363C00EE3758 /* ATAuthSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = ATAuthSDK.bundle; path = "galaxy/Classes/Modules/AutoLogin(一键登录)/framework/ATAuthSDK_D.framework/ATAuthSDK.bundle"; sourceTree = "<group>"; };
04D144752C0452E200EE3758 /* YHLoginMethodManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginMethodManager.swift; sourceTree = "<group>"; };
04D5C5652B8ED92600190021 /* YHBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseModel.swift; sourceTree = "<group>"; };
04E41DE72BD240570077EAE3 /* YHOrderDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOrderDetailViewController.swift; sourceTree = "<group>"; };
04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWebViewViewController.swift; sourceTree = "<group>"; };
......@@ -924,6 +934,7 @@
04EA376F2BEA071600DBAF64 /* libc++.tbd in Frameworks */,
0468D42E2B5654A500CFB916 /* CoreTelephony.framework in Frameworks */,
04EA376D2BEA06EF00DBAF64 /* WebKit.framework in Frameworks */,
04D1446D2C04359500EE3758 /* ATAuthSDK_D.framework in Frameworks */,
0468D4312B5654C100CFB916 /* libresolv.tbd in Frameworks */,
0468D4302B5654B500CFB916 /* SystemConfiguration.framework in Frameworks */,
);
......@@ -1734,6 +1745,7 @@
path = C;
sourceTree = "<group>";
};
04A671562B9F18C800C1FB91 /* MyCertificates(我的证书) */ = {
isa = PBXGroup;
children = (
......@@ -1819,6 +1831,40 @@
);
path = Localized;
sourceTree = "<group>";
};
04D144692C0431F900EE3758 /* AutoLogin(一键登录) */ = {
isa = PBXGroup;
children = (
0499E2FE2C056ECA0037E646 /* V */,
04D144722C043A3F00EE3758 /* M */,
04D1446A2C04353200EE3758 /* framework */,
);
path = "AutoLogin(一键登录)";
sourceTree = "<group>";
};
04D1446A2C04353200EE3758 /* framework */ = {
isa = PBXGroup;
children = (
04D1446B2C04355B00EE3758 /* ATAuthSDK_D.framework */,
);
path = framework;
sourceTree = "<group>";
};
04D144722C043A3F00EE3758 /* M */ = {
isa = PBXGroup;
children = (
04D144752C0452E200EE3758 /* YHLoginMethodManager.swift */,
);
path = M;
sourceTree = "<group>";
};
0499E2FE2C056ECA0037E646 /* V */ = {
isa = PBXGroup;
children = (
0499E2FF2C056EE30037E646 /* YHAutoLoginView.swift */,
);
path = V;
sourceTree = "<group>";
};
04D5C5642B8ED91200190021 /* M */ = {
isa = PBXGroup;
......@@ -1928,6 +1974,7 @@
A5573EC52B317BFF00D98EC0 = {
isa = PBXGroup;
children = (
04D144702C04363C00EE3758 /* ATAuthSDK.bundle */,
A5573ED02B317BFF00D98EC0 /* galaxy */,
A5573EE72B317C0100D98EC0 /* galaxyTests */,
A5573EF12B317C0100D98EC0 /* galaxyUITests */,
......@@ -2345,6 +2392,7 @@
isa = PBXGroup;
children = (
0499E3012C05B73D0037E646 /* AppleLogin(苹果登录) */,
04D144692C0431F900EE3758 /* AutoLogin(一键登录) */,
0445E6AC2BE9CF53003C52F9 /* VersionUpload(版本更新) */,
A567E5662BD7643D00D5D5A0 /* Home(首页) */,
04174D652BCD5B74000BA46D /* Message(消息) */,
......@@ -2544,6 +2592,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
04D144712C04363C00EE3758 /* ATAuthSDK.bundle in Resources */,
049663C02BF729F6003C8295 /* galaxy_refresher.gif in Resources */,
045EEED42B9F171A0022A143 /* scoreOptionData.plist in Resources */,
045EEED62B9F171A0022A143 /* YHQuestionList.plist in Resources */,
......@@ -2745,6 +2794,7 @@
045EEF072B9F171A0022A143 /* YHBasicInfoFillViewModel.swift in Sources */,
045EEF212B9F171A0022A143 /* YHMainInformationTableViewCell.swift in Sources */,
A5ACE9462B4564F7002C94D2 /* YHHUDSquareBaseView.swift in Sources */,
04D144762C0452E200EE3758 /* YHLoginMethodManager.swift in Sources */,
A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */,
048B2A4A2BC7D9DC00A93BF0 /* YHMyLikeViewController.swift in Sources */,
A567E5AE2BD7643D00D5D5A0 /* YHHomeKingKongBlockItem.swift in Sources */,
......@@ -2782,6 +2832,7 @@
045EEEC52B9F171A0022A143 /* YHOtherPickerView.swift in Sources */,
045EEE842B9F171A0022A143 /* YHPreviewBasiceInformationViewController.swift in Sources */,
A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */,
0499E3002C056EE30037E646 /* YHAutoLoginView.swift in Sources */,
0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */,
048B2A4D2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift in Sources */,
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */,
......@@ -3140,6 +3191,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/galaxy/Res/Frameworks",
"$(PROJECT_DIR)/galaxy/Classes/Modules/AutoLogin(一键登录)/framework",
);
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = galaxy/Res/Info.plist;
......@@ -3343,6 +3395,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/galaxy/Res/Frameworks",
"$(PROJECT_DIR)/galaxy/Classes/Modules/AutoLogin(一键登录)/framework",
);
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = galaxy/Res/Info.plist;
......@@ -3388,6 +3441,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/galaxy/Res/Frameworks",
"$(PROJECT_DIR)/galaxy/Classes/Modules/AutoLogin(一键登录)/framework",
);
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = galaxy/Res/Info.plist;
......
......@@ -45,6 +45,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
WXApi.startLog(by: .detail) { string in
print("\(string)")
}
// 一键登录
YHLoginMethodManager.shared.configAutoLogin()
YHOSSManager.share.getOSSID()
//1.设置主窗口
setupRootVC()
......
//
// YHLoginMethodManager.swift
// galaxy
//
// Created by edy on 2024/5/27.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AVFoundation
class YHLoginMethodManager {
static let shared = YHLoginMethodManager()
}
extension YHLoginMethodManager {
func getSDKVersion() -> String {
return TXCommonHandler.sharedInstance().getVersion()
}
func configAutoLogin() {
TXCommonHandler.sharedInstance().setAuthSDKInfo(YhConstant.Alipay.kAliLoginSecretKey) {
dict in
printLog(dict)
}
}
func checkIsSupportAutoLogin(_ support:((Bool)->())?) {
// 检测当前环境是否支持一键登录
TXCommonHandler.sharedInstance().checkEnvAvailable(with: .loginToken) {
dict in
if let resultCode = dict?["resultCode"] as? String, resultCode == PNSCodeSuccess {
support?(true)
} else {
support?(false)
}
}
}
func enterAutoLoginPage() {
// 3. 开始一键登录流程
// 3.1 调用加速授权页弹起接口,提前获取必要参数,为后面弹起授权页加速
TXCommonHandler.sharedInstance().accelerateLoginPage(withTimeout: 10.0) {
dic in
guard let code = dic["resultCode"] as? String else {
YHHUD.flash(message: "取号,加速授权页弹起失败")
return
}
if code != PNSCodeSuccess {
YHHUD.flash(message: "取号,加速授权页弹起失败")
return
}
//3.2 调用获取登录Token接口,可以立马弹起授权页,model的创建需要放在主线程
let model = self.createLoginUIModel()
TXCommonHandler.sharedInstance().getLoginToken(withTimeout: 10.0, controller: UIViewController.current!, model: model) {
dict in
guard let code = dict["resultCode"] as? String else {
printLog(dict)
return
}
if code == PNSCodeLoginControllerPresentSuccess {
printLog("弹起授权页成功")
} else if code == PNSCodeLoginControllerClickCancel {
printLog("点击了授权页的返回")
} else if code == PNSCodeLoginControllerClickChangeBtn {
printLog("点击切换其他登录方式按钮")
} else if code == PNSCodeLoginControllerClickLoginBtn {
if let isChecked = dict["isChecked"] as? Bool, isChecked == true {
printLog("点击了登录按钮,check box选中,SDK内部接着会去获取登录Token")
} else {
printLog("点击了登录按钮,check box未选中,SDK内部不会去获取登录Token")
}
} else if code == PNSCodeLoginControllerClickCheckBoxBtn {
printLog("点击了check box")
} else if code == PNSCodeLoginControllerClickProtocol {
printLog("点击了协议富文本")
} else if code == PNSCodeSuccess {
// 点击登录按钮获取登录Token成功回调
let token = dict["token"] as? String
// 下面用Token去服务器换手机号,此处仅做参考
/*
[PNSVerifyTopRequest requestLoginWithToken:token complete:^(BOOL isSuccess, NSString * _Nonnull msg, NSDictionary * _Nonnull data) {
NSString *popCode = [data objectForKey:@"code"];
NSDictionary *module = [data objectForKey:@"module"];
NSString *mobile = module[@"mobile"];
if ([popCode isEqualToString:@"OK"] && mobile.length > 0) {
[ProgressHUD showSuccess:@"一键登录成功"];
} else {
[ProgressHUD showSuccess:@"一键登录失败"];
}
dispatch_async(dispatch_get_main_queue(), ^{
[[TXCommonHandler sharedInstance] cancelLoginVCAnimated:YES complete:nil];
});
[weakSelf showResult:data];
}];
*/
} else {
printLog("获取登录Token失败")
}
}
}
}
func createLoginUIModel() -> TXCustomModel {
let model = TXCustomModel()
model.navIsHidden = true
model.sloganIsHidden = true
model.logoIsHidden = true
model.changeBtnIsHidden = true
// 协议勾选框UI自定义
let uncheckedImg = UIImage(named: "login_privacy_disagree")!
let checkedImg = UIImage(named: "login_privacy_agree_white")!
model.checkBoxImages = [uncheckedImg, checkedImg]
model.checkBoxWH = 18.0
model.checkBoxImageEdgeInsets = UIEdgeInsets(top: 3, left: 3, bottom: 3, right: 3)
model.privacyFont = .PFSC_R(ofSize: 12)
model.privacyOperatorPreText = "《"
model.privacyOperatorSufText = "》"
model.privacyOne = ["《隐私协议》", YHBaseUrlManager.shared.curPrivacyAgreementUrl()]
model.privacyTwo = ["《用户条款》", YHBaseUrlManager.shared.curUserItemsUrl()]
let privacyUnclickColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0.7)
let privacyClickColor = UIColor.white
model.privacyColors = [privacyUnclickColor, privacyClickColor]
model.privacyFrameBlock = {
screenSize, superViewSize, frame in
return CGRectMake(24, KScreenHeight-40-40, superViewSize.width-48, 40)
}
model.loginBtnFrameBlock = {
screenSize, superViewSize, frame in
return CGRectMake(24, KScreenHeight-40-40-30-48, superViewSize.width-48, 48)
}
// 手机号码UI自定义
model.numberColor = .white
model.numberFont = UIFont(name: "DINAlternate-Bold", size: 30)!
model.numberFrameBlock = {
screenSize, superViewSize, frame in
return CGRectMake(frame.minX, KScreenHeight-40-40-30-20-48-35, frame.width, 35)
}
// 登录按钮自定义UI
model.loginBtnText = NSAttributedString(string: "本机号码一键登录", attributes: [NSAttributedString.Key.foregroundColor : UIColor.init(hex: 0x121A26), NSAttributedString.Key.font: UIFont.PFSC_M(ofSize: 16)])
let enableLoginBgImg = TXCommonUtils.image(with: .white, size: CGSize(width: KScreenWidth-20*2, height: 48), isRoundedCorner: true, radius: kCornerRadius3)!
let disableLoginBgImg = TXCommonUtils.image(with: UIColor.white.withAlphaComponent(0.4), size: CGSize(width: KScreenWidth-20*2, height: 48), isRoundedCorner: true, radius: kCornerRadius3)!
let imgArr:[UIImage] = [enableLoginBgImg, disableLoginBgImg, enableLoginBgImg]
model.loginBtnBgImgs = imgArr
// 创建视频底图View
let videoBgView = YHAutoLoginView(frame: UIScreen.main.bounds)
videoBgView.closeBlock = {
TXCommonHandler.sharedInstance().cancelLoginVC(animated: true)
}
videoBgView.changeLoginBlock = {
// let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
let vc = YHPhoneLoginWithVideoBkgViewController()
// vc.modalPresentationStyle = .custom
UIViewController.current?.navigationController?.pushViewController(vc, animated:true)
}
model.customViewBlock = {
superCustomView in
superCustomView.insertSubview(videoBgView, at: 0)
}
model.customViewLayoutBlock = {
screenSize, contentViewFrame, navFrame, titleBarFrame, logoFrame, sloganFrame, numberFrame, loginFrame, changeBtnFrame, privacyFrame in
videoBgView.frame = UIScreen.main.bounds
}
return model
}
}
//
// YHAutoLoginView.swift
// galaxy
//
// Created by edy on 2024/5/28.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AVFoundation
class YHAutoLoginView: UIView {
var closeBlock:(()->())?
var changeLoginBlock:(()->())?
lazy var player: AVPlayer = {
let videoURL = Bundle.main.url(forResource: "loginBkg", withExtension: "mov")!
let player = AVPlayer(url: videoURL)
player.actionAtItemEnd = .none
return player
}()
lazy var playerLayer: AVPlayerLayer = {
let playerLayer = AVPlayerLayer(player: player)
playerLayer.frame = UIScreen.main.bounds
playerLayer.videoGravity = .resizeAspectFill
return playerLayer
}()
lazy var videoBgView: UIView = {
let videoBgView = UIView(frame: UIScreen.main.bounds)
videoBgView.layer.insertSublayer(playerLayer, at: 0)
player.play()
player.seek(to: .zero)
return videoBgView
}()
lazy var closeButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "login_close"), for: .normal)
button.addTarget(self, action:#selector(close), for: .touchUpInside)
return button
}()
lazy var changeLoginButton: UIButton = {
let button = UIButton(type: .custom)
button.setTitle("其他登录方式", for: .normal)
button.setTitleColor(.white, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action:#selector(didChangeLoginButtonClicked), for: .touchUpInside)
return button
}()
lazy var logoImgView: UIImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "login_icon")
return imageView
}()
lazy var loginTitleLabel: UILabel = {
let label = UILabel()
label.text = "欢迎来到银河港生活"
label.font = UIFont.PFSC_B(ofSize: 30)
label.textColor = UIColor.white
return label
}()
lazy var loginSubTitleLabel: UILabel = {
let label = UILabel()
label.text = "手机号首次登录自动注册"
label.font = UIFont.PFSC_R(ofSize: 15)
label.textColor = UIColor(hex: 0xffffff, alpha: 0.8)
return label
}()
@objc func close() {
self.closeBlock?()
}
@objc func didChangeLoginButtonClicked() {
self.changeLoginBlock?()
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
deinit {
NotificationCenter.default.removeObserver(self)
}
func setupUI() {
NotificationCenter.default.addObserver(self, selector: #selector(playerItemDidPlayToEndTimeNotification), name: AVPlayerItem.didPlayToEndTimeNotification, object: nil)
self.addSubview(videoBgView)
self.addSubview(logoImgView)
self.addSubview(loginTitleLabel)
self.addSubview(loginSubTitleLabel)
self.addSubview(closeButton)
self.addSubview(changeLoginButton)
closeButton.snp.makeConstraints { make in
make.left.equalTo(13)
make.top.equalTo(51)
make.width.height.equalTo(30)
}
changeLoginButton.snp.makeConstraints { make in
make.right.equalTo(-16)
make.height.equalTo(44)
make.width.equalTo(86)
make.centerY.equalTo(closeButton)
}
logoImgView.snp.makeConstraints { make in
make.left.equalTo(24)
make.top.equalTo(closeButton.snp.bottom).offset(32)
make.width.equalTo(82)
make.height.equalTo(30)
}
loginTitleLabel.snp.makeConstraints { make in
make.left.equalTo(logoImgView.snp.left)
make.right.equalTo(-24)
make.top.equalTo(logoImgView.snp.bottom).offset(12)
make.height.equalTo(42)
}
loginSubTitleLabel.snp.makeConstraints { make in
make.left.equalTo(logoImgView.snp.left)
make.right.equalTo(-24)
make.top.equalTo(loginTitleLabel.snp.bottom).offset(4)
make.height.equalTo(20)
}
}
@objc func playerItemDidPlayToEndTimeNotification() {
player.seek(to: .zero)
}
}
//
// ATAuthSDK.h
// ATAuthSDK
//
// Created by yangli on 2020/11/11.
// Copyright © 2020. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for ATAuthSDK.
FOUNDATION_EXPORT double ATAuthSDKVersionNumber;
//! Project version string for ATAuthSDK.
FOUNDATION_EXPORT const unsigned char ATAuthSDKVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ATAuthSDK/PublicHeader.h>
#import "TXCommonHandler.h"
#import "TXCommonUtils.h"
#import "PNSReturnCode.h"
#import "TXCustomModel.h"
#import "PNSReporter.h"
//
// PNSReporter.h
// ATAuthSDK
//
// Created by 刘超的MacBook on 2020/5/21.
// Copyright © 2020. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, PNSLoggerLevel) {
PNSLoggerLevelVerbose = 1,
PNSLoggerLevelDebug,
PNSLoggerLevelInfo,
PNSLoggerLevelWarn,
PNSLoggerLevelError
};
@interface PNSReporter : NSObject
/**
* 控制台日志输出开关,若开启会以PNS_LOGGER为开始标记对日志进行输出,Release模式记得关闭!
* @param enable 开关参数,默认为NO
*/
- (void)setConsolePrintLoggerEnable:(BOOL)enable;
/**
* 设置埋点上传开关,但不会对通过 setupUploader: 接口实现的自定义上传方法起作用
* @param enable 开关设置BOOL值,默认为YES
*/
- (void)setUploadEnable:(BOOL)enable DEPRECATED_MSG_ATTRIBUTE("日志不再上传");;
@end
NS_ASSUME_NONNULL_END
//
// PNSReturnCode.h
// ATAuthSDK
//
// Created by 刘超的MacBook on 2019/9/4.
// Copyright © 2019. All rights reserved.
//
#ifndef PNSReturnCode_h
#define PNSReturnCode_h
#import <Foundation/Foundation.h>
#pragma mark - 该返回码为阿里云号码认证SDK⾃身的返回码,请注意600011及600012错误内均含有运营商返回码,具体错误在碰到之后查阅 https://help.aliyun.com/document_detail/85351.html?spm=a2c4g.11186623.6.561.32a7360cxvWk6H
/// 接口成功
static NSString * const PNSCodeSuccess = @"600000";
/// 获取运营商配置信息失败
static NSString * const PNSCodeGetOperatorInfoFailed = @"600004";
/// 未检测到sim卡
static NSString * const PNSCodeNoSIMCard = @"600007";
/// 蜂窝网络未开启或不稳定
static NSString * const PNSCodeNoCellularNetwork = @"600008";
/// 无法判运营商
static NSString * const PNSCodeUnknownOperator = @"600009";
/// 未知异常
static NSString * const PNSCodeUnknownError = @"600010";
/// 获取token失败
static NSString * const PNSCodeGetTokenFailed = @"600011";
/// 预取号失败
static NSString * const PNSCodeGetMaskPhoneFailed = @"600012";
/// 运营商维护升级,该功能不可用
static NSString * const PNSCodeInterfaceDemoted = @"600013";
/// 运营商维护升级,该功能已达最大调用次数
static NSString * const PNSCodeInterfaceLimited = @"600014";
/// 接口超时
static NSString * const PNSCodeInterfaceTimeout = @"600015";
/// AppID、Appkey解析失败
static NSString * const PNSCodeDecodeAppInfoFailed = @"600017";
/// 该号码已被运营商管控,目前只有联通号码有该功能
static NSString * const PNSCodePhoneBlack = @"600018";
/// 运营商已切换
static NSString * const PNSCodeCarrierChanged = @"600021";
/// 终端环境检测失败(终端不支持认证 / 终端检测参数错误)
static NSString * const PNSCodeEnvCheckFail = @"600025";
/*************** 号码认证授权页相关返回码 START ***************/
/// 唤起授权页成功
static NSString * const PNSCodeLoginControllerPresentSuccess = @"600001";
/// 唤起授权页失败
static NSString * const PNSCodeLoginControllerPresentFailed = @"600002";
/// 授权页已加载时不允许调用加速或预取号接口
static NSString * const PNSCodeCallPreLoginInAuthPage = @"600026";
/// 点击返回,⽤户取消一键登录
static NSString * const PNSCodeLoginControllerClickCancel = @"700000";
/// 点击切换按钮,⽤户取消免密登录
static NSString * const PNSCodeLoginControllerClickChangeBtn = @"700001";
/// 点击登录按钮事件
static NSString * const PNSCodeLoginControllerClickLoginBtn = @"700002";
/// 点击CheckBox事件
static NSString * const PNSCodeLoginControllerClickCheckBoxBtn = @"700003";
/// 点击协议富文本文字
static NSString * const PNSCodeLoginControllerClickProtocol = @"700004";
/// 中断页面消失的时候,也就是suspendDisMissVC设置为YES的时候,点击左上角返回按钮时透出的状态码
static NSString * const PNSCodeLoginControllerSuspendDisMissVC = @"700010";
/*************** 号码认证授权页相关返回码 FINISH ***************/
/*************** 二次授权页返回code码 START ***************/
/// 点击一键登录拉起授权页二次弹窗
static NSString * const PNSCodeLoginClickPrivacyAlertView = @"700006";
/// 隐私协议二次弹窗关闭
static NSString * const PNSCodeLoginPrivacyAlertViewClose = @"700007";
/// 隐私协议二次弹窗点击确认并继续
static NSString * const PNSCodeLoginPrivacyAlertViewClickContinue = @"700008";
/// 点击隐私协议二次弹窗上的协议富文本文字
static NSString * const PNSCodeLoginPrivacyAlertViewPrivacyContentClick = @"700009";
/*************** 二次授权页返回code码 FINISH ***************/
#endif /* PNSReturnCode_h */
//
// TXCommonHandler.h
// ATAuthSDK
//
// Created by yangli on 15/03/2018.
#import <Foundation/Foundation.h>
#import "TXCustomModel.h"
#import "PNSReporter.h"
typedef NS_ENUM(NSInteger, PNSAuthType) {
PNSAuthTypeVerifyToken = 1, //本机号码校验
PNSAuthTypeLoginToken = 2 //一键登录
};
@interface TXCommonHandler : NSObject
/**
* 获取该类的单例实例对象
* @return 单例实例对象
*/
+ (instancetype _Nonnull )sharedInstance;
/**
* 获取当前SDK版本号
* @return 字符串,sdk版本号
*/
- (NSString *_Nonnull)getVersion;
/**
* SDK鉴权,app生命周期内调用一次
* @param info app对应的秘钥
* @param complete 结果异步回调到主线程,成功时resultDic=@{resultCode:600000, msg:...},其他情况时"resultCode"值请参考PNSReturnCode
* @note 重复调用时以最新info信息为准
*/
- (void)setAuthSDKInfo:(NSString * _Nonnull)info complete:(void(^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
/**
* 检查当前环境是否支持一键登录或号码认证,resultDic 返回 PNSCodeSuccess 说明当前环境支持
* @param authType 服务类型 PNSAuthTypeVerifyToken 本机号码校验流程,PNSAuthTypeLoginToken 一键登录流程
* @param complete 结果异步回调到主线程,成功时resultDic=@{resultCode:600000, msg:...},其他情况时"resultCode"值请参考PNSReturnCode,只有成功回调才能保障后续接口调用
*/
- (void)checkEnvAvailableWithAuthType:(PNSAuthType)authType complete:(void (^_Nullable)(NSDictionary * _Nullable resultDic))complete;
/**
* 加速获取本机号码校验token,防止调用 getVerifyTokenWithTimeout:complete: 获取token时间过长
* @param timeout 接口超时时间,单位s,默认为3.0s
* @param complete 结果异步回调到主线程,成功时resultDic=@{resultCode:600000, token:..., msg:...},其他情况时"resultCode"值请参考PNSReturnCode
*/
- (void)accelerateVerifyWithTimeout:(NSTimeInterval)timeout complete:(void (^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
/**
* 获取本机号码校验Token
* @param timeout 接口超时时间,单位s,默认为3.0s
* @param complete 结果异步回调到主线程,成功时resultDic=@{resultCode:600000, token:..., msg:...},其他情况时"resultCode"值请参考PNSReturnCode
*/
- (void)getVerifyTokenWithTimeout:(NSTimeInterval)timeout complete:(void (^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
/**
* 加速一键登录授权页弹起,防止调用 getLoginTokenWithTimeout:controller:model:complete: 等待弹起授权页时间过长
* @param timeout 接口超时时间,单位s,默认为3.0s
* @param complete 结果异步回调到主线程,成功时resultDic=@{resultCode:600000, msg:...},其他情况时"resultCode"值请参考PNSReturnCode
*/
- (void)accelerateLoginPageWithTimeout:(NSTimeInterval)timeout complete:(void (^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
/**
* 获取一键登录Token,调用该接口首先会弹起授权页,点击授权页的登录按钮获取Token
* @warning 注意的是,如果前面没有调用 accelerateLoginPageWithTimeout:complete: 接口,该接口内部会自动先帮我们调用,成功后才会弹起授权页,所以有一个明显的等待过程
* @param timeout 接口超时时间,单位s,默认为3.0s
* @param controller 唤起自定义授权页的容器,内部会对其进行验证,检查是否符合条件
* @param model 自定义授权页面选项,可为nil,采用默认的授权页面,具体请参考TXCustomModel.h文件
* @param complete 结果异步回调到主线程,"resultDic"里面的"resultCode"值请参考PNSReturnCode,如下:
*
* 授权页控件点击事件:700000(点击授权页返回按钮)、700001(点击切换其他登录方式)、
* 700002(点击登录按钮事件,根据返回字典里面的 "isChecked"字段来区分check box是否被选中,只有被选中的时候内部才会去获取Token)、700003(点击check box事件)、700004(点击协议富文本文字)
接口回调其他事件:600001(授权页唤起成功)、600002(授权页唤起失败)、600000(成功获取Token)、600011(获取Token失败)、
* 600015(获取Token超时)、600013(运营商维护升级,该功能不可用)、600014(运营商维护升级,该功能已达最大调用次数).....
*/
- (void)getLoginTokenWithTimeout:(NSTimeInterval)timeout controller:(UIViewController *_Nonnull)controller model:(TXCustomModel *_Nullable)model complete:(void (^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
/**
* 此接口仅用于开发期间用于一键登录页面不同机型尺寸适配调试(可支持模拟器),非正式页面,手机掩码为0,不能正常登录,请开发者注意下
* @param controller 唤起自定义授权页的容器,内部会对其进行验证,检查是否符合条件
* @param model 自定义授权页面选项,可为nil,采用默认的授权页面,具体请参考TXCustomModel.h文件
* @param complete 结果异步回调到主线程,"resultDic"里面的"resultCode"值请参考PNSReturnCode
*/
- (void)debugLoginUIWithController:(UIViewController *_Nonnull)controller model:(TXCustomModel *_Nullable)model complete:(void (^_Nullable)(NSDictionary * _Nonnull resultDic))complete;
/**
* 授权页弹起后,修改checkbox按钮选中状态,当checkout按钮隐藏时,设置不生效
*/
- (void)setCheckboxIsChecked:(BOOL)isChecked;
/**
* 查询授权页checkbox是否勾选,YES:勾选,NO:未勾选
*/
- (BOOL)queryCheckBoxIsChecked;
/**
* 授权页协议内容动画执行,注意:必须设置privacyAnimation属性,才会执行动画
*/
- (void)privacyAnimationStart;
/**
* 授权页checkbox动画执行,注意:必须设置checkboxAnimation属性,才会执行动画
*/
- (void)checkboxAnimationStart;
/**
* 手动隐藏一键登录获取登录Token之后的等待动画,默认为自动隐藏,当设置 TXCustomModel 实例 autoHideLoginLoading = NO 时, 可调用该方法手动隐藏
*/
- (void)hideLoginLoading;
/**
* 注销授权页,建议用此方法,对于移动卡授权页的消失会清空一些数据
* @param flag 是否添加动画
* @param complete 成功返回
*/
- (void)cancelLoginVCAnimated:(BOOL)flag complete:(void (^_Nullable)(void))complete;
/**
* 获取日志埋点相关控制对象
*/
- (PNSReporter * _Nonnull)getReporter;
/**
* 关闭二次授权弹窗页
*/
- (void)closePrivactAlertView;
/**
* 检查及准备调用环境,resultDic返回PNSCodeSuccess才能调用下面的功能接口
* @param complete 结果异步回调到主线程,成功时resultDic=@{resultCode:600000, msg:...},其他情况时"resultCode"值请参考PNSReturnCode,只有成功回调才能保障后续接口调用
*/
- (void)checkEnvAvailableWithComplete:(void (^_Nullable)(NSDictionary * _Nullable resultDic))complete DEPRECATED_MSG_ATTRIBUTE("Please use checkEnvAvailableWithAuthType:complete: instead");
@end
//
// TXCommonUtils.h
// authsdk
//
// Created by yangli on 12/03/2018.
#import <Foundation/Foundation.h>
@interface TXCommonUtils : NSObject
/**
判断当前设备蜂窝数据网络是否开启,即3G/4G
@return 结果
*/
+ (BOOL)checkDeviceCellularDataEnable;
/**
判断当前上网卡运营商是否是中国联通
@return 结果
*/
+ (BOOL)isChinaUnicom;
/**
判断当前上网卡运营商是否是中国移动
@return 结果
*/
+ (BOOL)isChinaMobile;
/**
判断当前上网卡运营商是否是中国电信
@return 结果
*/
+ (BOOL)isChinaTelecom;
/**
获取当前上网卡运营商名称,比如中国移动、中国电信、中国联通
@return 结果
*/
+ (NSString *)getCurrentCarrierName;
/**
获取当前上网卡网络类型,比如WiFi,4G
@return 结果
*/
+ (NSString *)getNetworktype;
/**
判断当前设备是否有SIM卡
@return 结果
*/
+ (BOOL)simSupportedIsOK;
/**
判断wwan是否开着(通过p0网卡判断,无wifi或有wifi情况下都能检测到)
@return 结果
*/
+ (BOOL)isWWANOpen;
/**
判断wwan是否开着(仅无wifi情况下)
@return 结果
*/
+ (BOOL)reachableViaWWAN;
/**
获取设备当前网络私网IP地址
@return 结果
*/
+ (NSString *)getMobilePrivateIPAddress:(BOOL)preferIPv4;
/**
获取当前设备的唯一标识ID
*/
+ (NSString *)getUniqueID;
/**
通过颜色设置生成图片,支持弧度设置,比如一键登录按钮背景图片
*/
+ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size isRoundedCorner:(BOOL )isRounded radius:(CGFloat)radius;
@end
//
// TXCustomModel.h
// ATAuthSDK
//
// Created by yangli on 2019/4/4.
// Copyright © 2019. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, PNSPresentationDirection){
PNSPresentationDirectionBottom = 0,
PNSPresentationDirectionRight,
PNSPresentationDirectionTop,
PNSPresentationDirectionLeft,
};
/**
* 构建控件的frame,view布局时会调用该block得到控件的frame
* @param screenSize 屏幕的size,可以通过该size来判断是横屏还是竖屏
* @param superViewSize 该控件的super view的size,可以通过该size,辅助该控件重新布局
* @param frame 控件默认的位置
* @return 控件新设置的位置
*/
typedef CGRect(^PNSBuildFrameBlock)(CGSize screenSize, CGSize superViewSize, CGRect frame);
@interface TXCustomModel : NSObject
/**
* 说明,可设置的Y轴距离,waring: 以下所有关于Y轴的设置<=0都将不生效,请注意
* 全屏模式:默认是以375x667pt为基准,其他屏幕尺寸可以根据(ratio = 屏幕高度/667)比率来适配,比如 Y*ratio
*/
#pragma mark- 全屏、弹窗模式设置
/**
* 授权页面中,渲染并显示所有控件的view,称content view,不实现该block默认为全屏模式
* 实现弹窗的方案 x >= 0 || y >= 0 width <= 屏幕宽度 || height <= 屏幕高度
*/
@property (nonatomic, copy) PNSBuildFrameBlock contentViewFrameBlock;
#pragma mark- 竖屏、横屏模式设置
/** 屏幕是否支持旋转方向,默认UIInterfaceOrientationMaskPortrait,注意:在刘海屏,UIInterfaceOrientationMaskPortraitUpsideDown属性慎用! */
@property (nonatomic, assign) UIInterfaceOrientationMask supportedInterfaceOrientations;
#pragma mark- 仅弹窗模式属性
/** 底部蒙层背景颜色,默认黑色 */
@property (nonatomic, strong) UIColor *alertBlurViewColor;
/** 底部蒙层背景透明度,默认0.5 */
@property (nonatomic, assign) CGFloat alertBlurViewAlpha;
/** contentView背景颜色,默认白色 */
@property (nonatomic, strong) UIColor *alertContentViewColor;
/** contentView背景透明度,默认1.0 ,即不透明*/
@property (nonatomic, assign) CGFloat alertContentViewAlpha;
/** contentView的四个圆角值,顺序为左上,左下,右下,右上,需要填充4个值,不足4个值则无效,如果值<=0则为直角 */
@property (nonatomic, copy) NSArray<NSNumber *> *alertCornerRadiusArray;
/** 标题栏背景颜色 */
@property (nonatomic, strong) UIColor *alertTitleBarColor;
/** 标题栏是否隐藏,默认NO */
@property (nonatomic, assign) BOOL alertBarIsHidden;
/** 标题栏标题,内容、字体、大小、颜色 */
@property (nonatomic, copy) NSAttributedString *alertTitle;
/** 标题栏右侧关闭按钮图片设置*/
@property (nonatomic, strong) UIImage *alertCloseImage;
/** 标题栏右侧关闭按钮是否显示,默认NO*/
@property (nonatomic, assign) BOOL alertCloseItemIsHidden;
/** 构建标题栏的frame,view布局或布局发生变化时调用,不实现则按默认处理,实现时仅有height生效 */
@property (nonatomic, copy) PNSBuildFrameBlock alertTitleBarFrameBlock;
/** 构建标题栏标题的frame,view布局或布局发生变化时调用,不实现则按默认处理 */
@property (nonatomic, copy) PNSBuildFrameBlock alertTitleFrameBlock;
/** 构建标题栏右侧关闭按钮的frame,view布局或布局发生变化时调用,不实现则按默认处理 */
@property (nonatomic, copy) PNSBuildFrameBlock alertCloseItemFrameBlock;
/** 弹窗位置是否根据键盘弹起关闭动态调整,仅在键盘弹起后遮挡弹窗的情况生效,调整后弹窗将居于键盘上方,默认NO*/
@property (nonatomic, assign) BOOL alertFrameChangeWithKeyboard;
#pragma mark- 导航栏(只对全屏模式有效)
/**授权页显示中,导航栏是否隐藏,默认NO*/
@property (nonatomic, assign) BOOL navIsHidden;
/**授权页push到其他页面后,导航栏是否隐藏,默认NO*/
@property (nonatomic, assign) BOOL navIsHiddenAfterLoginVCDisappear;
/**是否需要中断返回,如果设置为YES,则点击左上角返回按钮的时候默认页面不消失,同时透出状态码700010,需要自己调用TXCommonHandler cancelLoginVCAnimated方法隐藏页面,默认为NO*/
@property (nonatomic, assign) BOOL suspendDisMissVC;
/** 导航栏主题色 */
@property (nonatomic, strong) UIColor *navColor;
/** 导航栏标题,内容、字体、大小、颜色 */
@property (nonatomic, copy) NSAttributedString *navTitle;
/** 导航栏返回图片 */
@property (nonatomic, strong) UIImage *navBackImage;
/** 是否隐藏授权页导航栏返回按钮,默认不隐藏 */
@property (nonatomic, assign) BOOL hideNavBackItem;
/** 导航栏右侧自定义控件,可以在创建该VIEW的时候添加手势操作,或者创建按钮或其他赋值给VIEW */
@property (nonatomic, strong) UIView *navMoreView;
/** 构建导航栏返回按钮的frame,view布局或布局发生变化时调用,不实现则按默认处理 */
@property (nonatomic, copy) PNSBuildFrameBlock navBackButtonFrameBlock;
/** 构建导航栏标题的frame,view布局或布局发生变化时调用,不实现则按默认处理 */
@property (nonatomic, copy) PNSBuildFrameBlock navTitleFrameBlock;
/** 构建导航栏右侧more view的frame,view布局或布局发生变化时调用,不实现则按默认处理,边界 CGRectGetMinX(frame) >= (superViewSizeViewSize / 0.3) && CGRectGetWidth(frame) <= (superViewSize.width / 3.0) */
@property (nonatomic, copy) PNSBuildFrameBlock navMoreViewFrameBlock;
#pragma mark- 全屏、弹窗模式共同属性
#pragma mark- 授权页动画相关
/** 授权页弹出方向,默认PNSPresentationDirectionBottom,该属性只对自带动画起效,不影响自定义动画 */
@property (nonatomic, assign) PNSPresentationDirection presentDirection;
/** 授权页显示和消失动画时间,默认为0.25s,<= 0 时关闭动画,该属性只对自带动画起效,不影响自定义动画 **/
@property (nonatomic, assign) CGFloat animationDuration;
/** 授权页显示动画(弹窗 & 全屏),不设置或设置为nil默认使用自带动画,SDK内部会主动更改动画的一些属性(包括:removedOnCompletion = NO、fillMode = kCAFillModeForwards 及 delegate) **/
@property (nonatomic, strong, nullable) CAAnimation *entryAnimation;
/** 授权页消失动画(弹窗 & 全屏),不设置或设置为nil默认使用自带动画,SDK内部会主动更改动画的一些属性(包括:removedOnCompletion = NO、fillMode = kCAFillModeForwards 及 delegate) **/
@property (nonatomic, strong, nullable) CAAnimation *exitAnimation;
/** 授权页显示时的背景动画(仅弹窗),不设置或设置为nil默认使用自带动画,SDK内部会主动更改动画的一些属性(包括:removedOnCompletion = NO、fillMode = kCAFillModeForwards 及 delegate) **/
@property (nonatomic, strong, nullable) CAAnimation *bgEntryAnimation;
/** 授权页消失时的背景动画(仅弹窗),不设置或设置为nil默认使用自带动画,SDK内部会主动更改动画的一些属性(包括:removedOnCompletion = NO、fillMode = kCAFillModeForwards 及 delegate) **/
@property (nonatomic, strong, nullable) CAAnimation *bgExitAnimation;
#pragma mark- 状态栏
/** 状态栏是否隐藏,默认NO */
@property (nonatomic, assign) BOOL prefersStatusBarHidden;
/** 状态栏主题风格,默认UIStatusBarStyleDefault */
@property (nonatomic, assign) UIStatusBarStyle preferredStatusBarStyle;
#pragma mark- 背景
/** 授权页背景色 */
@property (nonatomic, strong) UIColor *backgroundColor;
/** 授权页背景图片 */
@property (nonatomic, strong) UIImage *backgroundImage;
/** 授权页背景图片view的 content mode,默认为 UIViewContentModeScaleAspectFill */
@property (nonatomic, assign) UIViewContentMode backgroundImageContentMode;
/** 点击授权页背景是否关闭授权页,只有在弹窗模式下生效,默认NO*/
@property (nonatomic, assign) BOOL tapAuthPageMaskClosePage;
#pragma mark- logo图片
/** logo图片设置 */
@property (nonatomic, strong) UIImage *logoImage;
/** logo是否隐藏,默认NO */
@property (nonatomic, assign) BOOL logoIsHidden;
/** 构建logo的frame,view布局或布局发生变化时调用,不实现则按默认处理 */
@property (nonatomic, copy) PNSBuildFrameBlock logoFrameBlock;
/** logo的宽设置 */
@property (nonatomic, assign) CGFloat logoWidth DEPRECATED_MSG_ATTRIBUTE("Please use logoFrameBlock instead");
/** logo的高设置 */
@property (nonatomic, assign) CGFloat logoHeight DEPRECATED_MSG_ATTRIBUTE("Please use logoFrameBlock instead");
/** logo相对导航栏底部或标题栏底部的Y轴距离 */
@property (nonatomic, assign) CGFloat logoTopOffetY DEPRECATED_MSG_ATTRIBUTE("Please use logoFrameBlock instead");
#pragma mark- slogan
/** slogan文案,内容、字体、大小、颜色 */
@property (nonatomic, copy) NSAttributedString *sloganText;
/** slogan是否隐藏,默认NO */
@property (nonatomic, assign) BOOL sloganIsHidden;
/** 构建slogan的frame,view布局或布局发生变化时调用,不实现则按默认处理 */
@property (nonatomic, copy) PNSBuildFrameBlock sloganFrameBlock;
/** slogan相对导航栏底部或标题栏底部的Y轴距离 */
@property (nonatomic, assign) CGFloat sloganTopOffetY DEPRECATED_MSG_ATTRIBUTE("Please use sloganFrameBlock instead");
#pragma mark- 号码
/** 号码颜色设置 */
@property (nonatomic, strong) UIColor *numberColor;
/** 号码字体设置,大小小于16则不生效 */
@property (nonatomic, strong) UIFont *numberFont;
/**
* 构建号码的frame,view布局或布局发生变化时调用,只有x、y生效,不实现则按默认处理,
* 注:设置不能超出父视图 content view
*/
@property (nonatomic, copy) PNSBuildFrameBlock numberFrameBlock;
/**
* 号码相对导航栏底部或标题栏底部的Y轴距离,不设置则按默认处理
* 注:设置超出父视图 content view 时不生效
*/
@property (nonatomic, assign) CGFloat numberTopOffetY DEPRECATED_MSG_ATTRIBUTE("Please use numberFrameBlock instead");
/**
* 号码相对屏幕中线的X轴偏移距离,不设置则按默认处理,默认为0水平居中
* 注:设置不能超出父视图 content view
*/
@property (nonatomic, assign) CGFloat numberOffetX DEPRECATED_MSG_ATTRIBUTE("Please use numberFrameBlock instead");
#pragma mark- 登录
/** 登陆按钮文案,内容、字体、大小、颜色*/
@property (nonatomic, strong) NSAttributedString *loginBtnText;
/** 登录按钮背景图片组,默认高度50.0pt,@[激活状态的图片,失效状态的图片,高亮状态的图片] */
@property (nonatomic, strong) NSArray<UIImage *> *loginBtnBgImgs;
/**
* 是否自动隐藏点击登录按钮之后授权页上转圈的 loading, 默认为YES,在获取登录Token成功后自动隐藏
* 如果设置为 NO,需要自己手动调用 [[TXCommonHandler sharedInstance] hideLoginLoading] 隐藏
*/
@property (nonatomic, assign) BOOL autoHideLoginLoading;
/**
* 构建登录按钮的frame,view布局或布局发生变化时调用,不实现则按默认处理
* 注:不能超出父视图 content view,height不能小于20,width不能小于父视图宽度的一半
*/
@property (nonatomic, copy) PNSBuildFrameBlock loginBtnFrameBlock;
/**
* 登录按钮相对导航栏底部或标题栏底部的Y轴距离,不设置则按默认处理
* 注:设置超出父视图 content view 时不生效
*/
@property (nonatomic, assign) CGFloat loginBtnTopOffetY DEPRECATED_MSG_ATTRIBUTE("Please use loginBtnFrameBlock instead");
/** 登录按钮高度,小于20.0pt不生效,不设置则按默认处理 */
@property (nonatomic, assign) CGFloat loginBtnHeight DEPRECATED_MSG_ATTRIBUTE("Please use loginBtnFrameBlock instead");
/** 登录按钮相对content view的左右边距,按钮宽度必须大于等于屏幕的一半,不设置则按默认处理 */
@property (nonatomic, assign) CGFloat loginBtnLRPadding DEPRECATED_MSG_ATTRIBUTE("Please use loginBtnFrameBlock instead");
#pragma mark- 协议
/** checkBox图片组,[uncheckedImg,checkedImg]*/
@property (nonatomic, copy) NSArray<UIImage *> *checkBoxImages;
/** checkBox图片距离控件边框的填充,默认为 UIEdgeInsetsZero,确保控件大小减去内填充大小为资源图片大小情况下,图片才不会变形 **/
@property (nonatomic, assign) UIEdgeInsets checkBoxImageEdgeInsets;
/** checkBox是否勾选,默认NO */
@property (nonatomic, assign) BOOL checkBoxIsChecked;
/** checkBox是否隐藏,默认NO */
@property (nonatomic, assign) BOOL checkBoxIsHidden;
/** checkBox大小,高宽一样,必须大于0 */
@property (nonatomic, assign) CGFloat checkBoxWH;
/** checkBox是否和协议内容垂直居中,默认NO,即顶部对齐 */
@property (nonatomic, assign) BOOL checkBoxVerticalCenter;
/** 协议1,[协议名称,协议Url],注:三个协议名称不能相同 */
@property (nonatomic, copy) NSArray<NSString *> *privacyOne;
/** 协议2,[协议名称,协议Url],注:三个协议名称不能相同 */
@property (nonatomic, copy) NSArray<NSString *> *privacyTwo;
/** 协议3,[协议名称,协议Url],注:三个协议名称不能相同 */
@property (nonatomic, copy) NSArray<NSString *> *privacyThree;
/** 协议名称之间连接字符串数组,默认 ["和","、","、"] ,即第一个为"和",其他为"、",按顺序读取,为空则取默认 */
@property (nonatomic, copy) NSArray<NSString *> *privacyConectTexts;
/** 协议内容颜色数组,[非点击文案颜色,点击文案颜色] */
@property (nonatomic, copy) NSArray<UIColor *> *privacyColors;
/** 运营商协议内容颜色 ,优先级最高,如果privacyOperatorColors不设置,则取privacyColors中的点击文案颜色,privacyColors不设置,则是默认色*/
@property (nonatomic, strong) UIColor *privacyOperatorColor;
/** 协议1内容颜色,优先级最高,如果privacyOneColors不设置,则取privacyColors中的点击文案颜色,privacyColors不设置,则是默认色*/
@property (nonatomic, strong) UIColor *privacyOneColor;
/** 协议2内容颜色,优先级最高,如果privacyTwoColors不设置,则取privacyColors中的点击文案颜色,privacyColors不设置,则是默认色*/
@property (nonatomic, strong) UIColor *privacyTwoColor;
/** 协议3内容颜色,优先级最高,如果privacyThreeColors不设置,则取privacyColors中的点击文案颜色,privacyColors不设置,则是默认色*/
@property (nonatomic, strong) UIColor *privacyThreeColor;
/** 协议文案支持居中、居左、居右设置,默认居左 */
@property (nonatomic, assign) NSTextAlignment privacyAlignment;
/** 协议整体文案,前缀部分文案 */
@property (nonatomic, copy) NSString *privacyPreText;
/** 协议整体文案,后缀部分文案 */
@property (nonatomic, copy) NSString *privacySufText;
/** 运营商协议名称前缀文案,仅支持 <([《(【『 */
@property (nonatomic, copy) NSString *privacyOperatorPreText;
/** 运营商协议名称后缀文案,仅支持 >)]》)】』*/
@property (nonatomic, copy) NSString *privacyOperatorSufText;
/** 运营商协议指定显示顺序,默认0,即第1个协议显示,最大值可为3,即第4个协议显示*/
@property (nonatomic, assign) NSInteger privacyOperatorIndex;
/** 协议整体文案字体,小于12.0不生效 */
@property (nonatomic, strong) UIFont *privacyFont;
/** 协议整体文案行间距,默认0 */
@property (nonatomic, assign) CGFloat privacyLineSpaceDp;
/** 运营商协议文案字体,仅对运营商协议本体文案和前后缀生效,小于12.0不生效 */
@property (nonatomic, strong) UIFont *privacyOperatorFont;
/** 运营商协议文案下划线,仅对运营商协议本体文案和前后缀生效,YES:展示下划线;NO:不展示下划线,默认不展示 */
@property (nonatomic, assign) BOOL privacyOperatorUnderline;
/** checkBox是否扩大按钮可交互范围至"协议前缀部分文案(默认:我已阅读并同意)"区域,默认NO */
@property (nonatomic, assign) BOOL expandAuthPageCheckedScope;
/**
* 构建协议整体(包括checkBox)的frame,view布局或布局发生变化时调用,不实现则按默认处理
* 如果设置的width小于checkBox的宽则不生效,最小x、y为0,最大width、height为父试图宽高
* 最终会根据设置进来的width对协议文本进行自适应,得到的size是协议控件的最终大小
*/
@property (nonatomic, copy) PNSBuildFrameBlock privacyFrameBlock;
/**
* 未同意协议时点击登录按钮,协议整体文案的动画效果,不设置或设置为nil默认没有动画,SDK内部会主动更改动画的一些属性(包括:removedOnCompletion = NO、fillMode = kCAFillModeRemoved 及 delegate)
*/
@property (nonatomic, strong, nullable) CAAnimation *privacyAnimation;
/**
* 未同意协议时点击登录按钮,checkbox的动画效果,不设置或设置为nil默认没有动画,SDK内部会主动更改动画的一些属性(包括:removedOnCompletion = NO、fillMode = kCAFillModeRemoved 及 delegate)
*/
@property (nonatomic, strong, nullable) CAAnimation *checkboxAnimation;
/** 协议整体相对屏幕底部的Y轴距离,与其他有区别!!不能小于0 */
@property (nonatomic, assign) CGFloat privacyBottomOffetY DEPRECATED_MSG_ATTRIBUTE("Please use privacyFrameBlock instead");
/** 协议整体(包括checkBox)相对content view的左右边距,当协议整体宽度小于(content view宽度-2*左右边距)且居中模式,则左右边距设置无效,不能小于0 */
@property (nonatomic, assign) CGFloat privacyLRPadding DEPRECATED_MSG_ATTRIBUTE("Please use privacyFrameBlock instead");
#pragma mark- 切换到其他方式
/** changeBtn标题,内容、字体、大小、颜色 */
@property (nonatomic, copy) NSAttributedString *changeBtnTitle;
/** changeBtn是否隐藏,默认NO*/
@property (nonatomic, assign) BOOL changeBtnIsHidden;
/** 构建changeBtn的frame,view布局或布局发生变化时调用,不实现则按默认处理 */
@property (nonatomic, copy) PNSBuildFrameBlock changeBtnFrameBlock;
/** changeBtn相对导航栏底部或标题栏底部的Y轴距离 */
@property (nonatomic, assign) CGFloat changeBtnTopOffetY DEPRECATED_MSG_ATTRIBUTE("Please use changeBtnFrameBlock instead");
#pragma mark- 协议详情页
/** 协议详情页容器是否自定义,默认NO,若为YES,则根据 PNSCodeLoginControllerClickProtocol 返回码获取协议点击详情信息 */
@property (nonatomic, assign) BOOL privacyVCIsCustomized;
/** 导航栏背景颜色设置 */
@property (nonatomic, strong) UIColor *privacyNavColor;
/** 导航栏标题字体、大小 */
@property (nonatomic, strong) UIFont *privacyNavTitleFont;
/** 导航栏标题颜色 */
@property (nonatomic, strong) UIColor *privacyNavTitleColor;
/** 导航栏返回图片 */
@property (nonatomic, strong) UIImage *privacyNavBackImage;
#pragma mark- 其他自定义控件添加及布局
/**
* 自定义控件添加,注意:自定义视图的创建初始化和添加到父视图,都需要在主线程!!
* @param superCustomView 父视图
*/
@property (nonatomic, copy) void(^customViewBlock)(UIView *superCustomView);
/**
* 每次授权页布局完成时会调用该block,可以在该block实现里面可设置自定义添加控件的frame
* @param screenSize 屏幕的size
* @param contentViewFrame content view的frame,
* @param navFrame 导航栏的frame,仅全屏时有效
* @param titleBarFrame 标题栏的frame,仅弹窗时有效
* @param logoFrame logo图片的frame
* @param sloganFrame slogan的frame
* @param numberFrame 号码栏的frame
* @param loginFrame 登录按钮的frame
* @param changeBtnFrame 切换到其他方式按钮的frame
* @param privacyFrame 协议整体(包括checkBox)的frame
*/
@property (nonatomic, copy) void(^customViewLayoutBlock)(CGSize screenSize, CGRect contentViewFrame, CGRect navFrame, CGRect titleBarFrame, CGRect logoFrame, CGRect sloganFrame, CGRect numberFrame, CGRect loginFrame, CGRect changeBtnFrame, CGRect privacyFrame);
#pragma mark - 二次隐私协议弹窗设置
/** 二次隐私协议弹窗是否需要显示, 默认NO */
@property (nonatomic, assign) BOOL privacyAlertIsNeedShow;
/** 二次隐私协议弹窗点击按钮是否需要执行登陆,默认YES */
@property (nonatomic, assign) BOOL privacyAlertIsNeedAutoLogin;
/** 二次隐私协议弹窗显示自定义动画,默认从下往上位移动画 */
@property (nonatomic, strong, nullable) CAAnimation *privacyAlertEntryAnimation;
/** 二次隐私协议弹窗隐藏自定义动画,默认从上往下位移动画 */
@property (nonatomic, strong, nullable) CAAnimation *privacyAlertExitAnimation;
/** 二次隐私协议弹窗的四个圆角值,顺序为左上,左下,右下,右上,需要填充4个值,不足4个值则无效,如果值<=0则为直角 ,默认0*/
@property (nonatomic, copy) NSArray<NSNumber *> *privacyAlertCornerRadiusArray;
/** 二次隐私协议弹窗背景颜色,默认为白色 */
@property (nonatomic, strong) UIColor *privacyAlertBackgroundColor;
/** 二次隐私协议弹窗透明度,默认不透明1.0 ,设置范围0.3~1.0之间 */
@property (nonatomic, assign) CGFloat privacyAlertAlpha;
/** 二次隐私协议弹窗标题文字内容,默认"请阅读并同意以下条款" */
@property (nonatomic, copy) NSString *privacyAlertTitleContent;
/** 二次隐私协议弹窗标题文字字体,最小12,默认12 */
@property (nonatomic, strong) UIFont *privacyAlertTitleFont;
/** 二次隐私协议弹窗标题文字颜色,默认黑色 */
@property (nonatomic, strong) UIColor *privacyAlertTitleColor;
/** 二次隐私协议弹窗标题背景颜色,默认白色*/
@property (nonatomic, strong) UIColor *privacyAlertTitleBackgroundColor;
/** 二次隐私协议弹窗标题位置,默认居中*/
@property (nonatomic, assign) NSTextAlignment privacyAlertTitleAlignment;
/** 二次隐私协议弹窗协议内容文字字体,最小12,默认12 */
@property (nonatomic, strong) UIFont *privacyAlertContentFont;
/** 二次隐私协议弹窗协议内容行间距,默认0 */
@property (nonatomic, assign) CGFloat privacyAlertLineSpaceDp;
/** 二次隐私协议弹窗协议内容背景颜色,默认白色 */
@property (nonatomic, strong) UIColor *privacyAlertContentBackgroundColor;
/** 二次隐私协议弹窗协议内容颜色数组,[非点击文案颜色,点击文案颜色],默认[0x999999,0x1890FF] */
@property (nonatomic, copy) NSArray<UIColor *> *privacyAlertContentColors;
/** 二次隐私协议弹窗运营商协议内容文字字体,仅对运营商协议部分的文本生效,最小12,默认12 */
@property (nonatomic, strong) UIFont *privacyAlertContentOperatorFont;
/** 二次隐私协议弹窗运营商协议内容文字下划线,仅对运营商协议部分的文本生效,YES:展示下划线,NO:不展示下划线,默认不展示 */
@property (nonatomic, assign) BOOL privacyAlertContentUnderline;
/** 二次隐私协议弹窗协议运营商协议内容颜色,优先级最高,如果privacyAlertOperatorColors不设置,则取privacyAlertContentColors中的点击文案颜色,privacyAlertContentColors不设置,则是默认色*/
@property (nonatomic, strong) UIColor *privacyAlertOperatorColor;
/** 二次隐私协议弹窗协议协议1内容颜色 ,优先级最高,如果privacyAlertOneColors不设置,则取privacyAlertContentColors中的点击文案颜色,privacyAlertContentColors不设置,则是默认色*/
@property (nonatomic, strong) UIColor *privacyAlertOneColor;
/** 二次隐私协议弹窗协议协议2内容颜色 ,优先级最高,如果privacyAlertTwoColors不设置,则取privacyAlertContentColors中的点击文案颜色,privacyAlertContentColors不设置,则是默认色*/
@property (nonatomic, strong) UIColor *privacyAlertTwoColor;
/** 二次隐私协议弹窗协议协议3内容颜色 ,优先级最高,如果privacyAlertThreeColors不设置,则取privacyAlertContentColors中的点击文案颜色,privacyAlertContentColors不设置,则是默认色*/
@property (nonatomic, strong) UIColor *privacyAlertThreeColor;
/** 二次隐私协议弹窗协议文案支持居中、居左、居右设置,默认居左 */
@property (nonatomic, assign) NSTextAlignment privacyAlertContentAlignment;
/** 二次隐私协议弹窗协议整体文案,前缀部分文案 ,如果不赋值,默认使用privacyPreText*/
@property (nonatomic, copy) NSString *privacyAlertPreText;
/** 二次隐私协议弹窗协议整体文案,后缀部分文案 如果不赋值,默认使用privacySufText*/
@property (nonatomic, copy) NSString *privacyAlertSufText;
/** 二次隐私协议弹窗按钮文字内容 默认“同意”*/
@property (nonatomic, copy) NSString *privacyAlertBtnContent;
/** 二次隐私协议弹窗按钮按钮背景图片 ,默认高度50.0pt,@[激活状态的图片,高亮状态的图片] */
@property (nonatomic, copy) NSArray<UIImage *> *privacyAlertBtnBackgroundImages;
/** 二次隐私协议弹窗按钮文字颜色,默认黑色, @[激活状态的颜色,高亮状态的颜色] */
@property (nonatomic, copy) NSArray<UIColor *> *privacyAlertButtonTextColors;
/** 二次隐私协议弹窗按钮文字字体,最小10,默认18*/
@property (nonatomic, strong) UIFont *privacyAlertButtonFont;
/** 二次隐私协议弹窗关闭按钮是否显示,默认显示 */
@property (nonatomic, assign) BOOL privacyAlertCloseButtonIsNeedShow;
/** 二次隐私协议弹窗右侧关闭按钮图片设置,默认内置的X图片*/
@property (nonatomic, strong) UIImage *privacyAlertCloseButtonImage;
/** 二次隐私协议弹窗背景蒙层是否显示 ,默认YES*/
@property (nonatomic, assign) BOOL privacyAlertMaskIsNeedShow;
/** 二次隐私协议弹窗点击背景蒙层是否关闭弹窗 ,默认YES*/
@property (nonatomic, assign) BOOL tapPrivacyAlertMaskCloseAlert;
/** 二次隐私协议弹窗蒙版背景颜色,默认黑色 */
@property (nonatomic, strong) UIColor *privacyAlertMaskColor;
/** 二次隐私协议弹窗蒙版透明度 设置范围0.3~1.0之间 ,默认0.5*/
@property (nonatomic, assign) CGFloat privacyAlertMaskAlpha;
/** 二次隐私协议弹窗蒙版显示动画,默认渐显动画 */
@property (nonatomic, strong) CAAnimation *privacyAlertMaskEntryAnimation;
/** 二次隐私协议弹窗蒙版消失动画,默认渐隐动画 */
@property (nonatomic, strong) CAAnimation *privacyAlertMaskExitAnimation;
/** 二次隐私协议弹窗尺寸设置,不能超出父视图 content view,height不能小于50,width不能小于0,默认屏幕居中,宽为屏幕的宽度减掉80,高为200 */
@property (nonatomic, copy) PNSBuildFrameBlock privacyAlertFrameBlock;
/** 二次隐私协议弹窗标题尺寸,默认x=0,y=0,width=弹窗宽度,最小宽度为100,height=根据文本计算的高度,最小高度为15,不能超出父视图 */
@property (nonatomic, copy) PNSBuildFrameBlock privacyAlertTitleFrameBlock;
/** 二次隐私协议弹窗内容尺寸,默认为从标题顶部位置开始,最终会根据设置进来的width对协议文本进行自适应,得到的size是协议控件的最终大小。不能超出父视图 */
@property (nonatomic, copy) PNSBuildFrameBlock privacyAlertPrivacyContentFrameBlock;
/** 二次隐私协议弹窗确认按钮尺寸,默认为父视图的宽度一半,居中显示。高度默认50, */
@property (nonatomic, copy) PNSBuildFrameBlock privacyAlertButtonFrameBlock;
/** 二次隐私协议弹窗右侧关闭按钮尺寸,默认宽高44,居弹窗右侧15,居弹窗顶部0*/
@property (nonatomic, copy) PNSBuildFrameBlock privacyAlertCloseFrameBlock;
/**
* 二次授权页弹窗自定义控件添加,注意:自定义视图的创建初始化和添加到父视图,都需要在主线程!!
* @param superPrivacyAlertCustomView 父视图
*/
@property (nonatomic, copy) void(^privacyAlertCustomViewBlock)(UIView *superPrivacyAlertCustomView);
/**
* 二次授权页弹窗布局完成时会调用该block,可以在该block实现里面可设置自定义添加控件的frame
* @param privacyAlertFrame 二次授权页弹窗frame
* @param privacyAlertTitleFrame 二次授权页弹窗标题frame
* @param privacyAlertPrivacyContentFrame 二次授权页弹窗协议内容frame
* @param privacyAlertButtonFrame 二次授权页弹窗确认按钮frame
* @param privacyAlertCloseFrame 二次授权页弹窗右上角关闭按钮frame
*/
@property (nonatomic, copy) void(^privacyAlertCustomViewLayoutBlock)(CGRect privacyAlertFrame, CGRect privacyAlertTitleFrame, CGRect privacyAlertPrivacyContentFrame, CGRect privacyAlertButtonFrame, CGRect privacyAlertCloseFrame);
@end
NS_ASSUME_NONNULL_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>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherDataTypes</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
......@@ -181,7 +181,7 @@ extension YhConstant {
// MARK: - 支付宝
struct Alipay {
// MARK: - 阿里云 手机号一键登录 秘钥信息
static let kAliOnePressPhoneLoginKey = "MuKKbWPm4DRHmZpgASqjI3L1HtiOlxyKWmocGnJhbiibdfaKlwYUj8ISgOexPHLAUAhdo6NNIGOi8oCAeqA1PO9b4ea3YwHXKnIa2u7BCTkd5L4IswsGgljfBeGIyRhoFCnCibix7RwQEqhrkdZ2KMsE/NtPrXfi+EU3oAnO9tXIztzvpAe75Pna2mUKMvO1qt4SSmPe4VnEOX5LCdbn7sGAvOLN8/l/fcCdEU7FA+AGLTY+547jlwan3wyJYJn0Sc8qnEW9LBxRwTDpEZPqyg=="
static let kAliLoginSecretKey = "MuKKbWPm4DRHmZpgASqjI3L1HtiOlxyKWmocGnJhbiibdfaKlwYUj8ISgOexPHLAUAhdo6NNIGOi8oCAeqA1PO9b4ea3YwHXKnIa2u7BCTkd5L4IswsGgljfBeGIyRhoFCnCibix7RwQEqhrkdZ2KMsE/NtPrXfi+EU3oAnO9tXIztzvpAe75Pna2mUKMvO1qt4SSmPe4VnEOX5LCdbn7sGAvOLN8/l/fcCdEU7FA+AGLTY+547jlwan3wyJYJn0Sc8qnEW9LBxRwTDpEZPqyg=="
}
// MARK: - 通知相关 名称
......
......@@ -9,7 +9,7 @@
#define galaxy_Bridge_Header_h
#import <Bugly/Bugly.h>
//#import <ATAuthSDK_D/ATAuthSDK.h>
#import <ATAuthSDK_D/ATAuthSDK.h>
//#import <AliyunOSSiOS/OSSService.h>
#import "WXApi.h"
#import "JPUSHService.h"
......@@ -18,4 +18,5 @@
#import <UserNotifications/UserNotifications.h>
#endif
#endif /* galaxy_Bridge_Header_h */
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