Commit 5059e232 by ludi

修复一些bug

parent 01715e67
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
// //
import UIKit import UIKit
import AppTrackingTransparency
import AdSupport
@objcMembers public class FUSAuthCenter: NSObject { @objcMembers public class FUSAuthCenter: NSObject {
...@@ -120,3 +122,82 @@ import UIKit ...@@ -120,3 +122,82 @@ import UIKit
} }
} }
/// 广告追踪
extension FUSAuthCenter{
/// 追踪状态
@objc public enum FUSAuthCenterTrackingAuthorizationStatus: Int {
/// 用户允许
case userEnable
/// 用户拒绝
case userDenied
/// 还没决定
case notDetermined
/// 其他
case other
}
@objc public static func checkTrackingAuthorizationStatus() -> FUSAuthCenterTrackingAuthorizationStatus {
if #available(iOS 14, *) {
let status = ATTrackingManager.trackingAuthorizationStatus
switch status {
case .authorized:
// 用户已授权追踪
print("用户已授权广告追踪")
// let idfa = ASIdentifierManager.shared().advertisingIdentifier
// print("IDFA: \(idfa)")
return .userEnable
case .denied:
// 用户拒绝追踪
print("用户拒绝广告追踪")
return .userDenied
case .notDetermined:
// 尚未请求权限
print("尚未请求追踪权限")
// requestTrackingPermission()
return .notDetermined
case .restricted:
// 设备限制(如家长控制)
print("广告追踪受限")
return .other
@unknown default:
print("未知状态")
return .other
}
} else {
// iOS 14 以下版本
if ASIdentifierManager.shared().isAdvertisingTrackingEnabled {
print("iOS 14以下: 广告追踪可用")
let idfa = ASIdentifierManager.shared().advertisingIdentifier
print("IDFA: \(idfa)")
return .userEnable
} else {
print("iOS 14以下: 广告追踪被限制")
return .userDenied
}
}
}
@objc public static func requestTrackingPermission(_ complete: ((_ status: FUSAuthCenterTrackingAuthorizationStatus) -> Void)?) {
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization { status in
DispatchQueue.main.async {
switch status {
case .authorized:
print("用户授权了追踪权限")
// 可以访问 IDFA
let idfa = ASIdentifierManager.shared().advertisingIdentifier
print("IDFA: \(idfa)")
complete?(.userEnable)
case .denied, .restricted, .notDetermined:
print("用户未授权追踪")
complete?(.userDenied)
@unknown default:
print("未知状态")
complete?(.other)
}
}
}
}
}
}
...@@ -45,6 +45,8 @@ typedef NS_ENUM(NSUInteger,FUSJumpType) { ...@@ -45,6 +45,8 @@ typedef NS_ENUM(NSUInteger,FUSJumpType) {
FUSJUserInfoCompleteGuide = 43, FUSJUserInfoCompleteGuide = 43,
// /// 用户调起自己的直播预告列表 // /// 用户调起自己的直播预告列表
// FUSJLMLiveStartPreviewListView = 44, // FUSJLMLiveStartPreviewListView = 44,
/// 跳转到动态页面
FUSJumpToDynamicDetail = 47
}; };
// 定义枚举跳转类型 // 定义枚举跳转类型
......
...@@ -1163,6 +1163,11 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG ...@@ -1163,6 +1163,11 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG
[FUSRouter.userRouter fus_pushToCompleteUserInfoWithController:nil type:0]; [FUSRouter.userRouter fus_pushToCompleteUserInfoWithController:nil type:0];
} }
break; break;
case FUSJumpToDynamicDetail:{
// 进入动态
[[FUSRouter userRouter] fus_handlerUserModulePushEvent:4 infor:dataDict];
}
break;
default: default:
break; break;
} }
......
...@@ -233,6 +233,7 @@ import RxSwift ...@@ -233,6 +233,7 @@ import RxSwift
@objc public func fus_dealLoginOutSuccess(){ @objc public func fus_dealLoginOutSuccess(){
self.isLogin.accept(false) self.isLogin.accept(false)
self.settingConfigModel.accept(nil) self.settingConfigModel.accept(nil)
self.bindAgentCodeSuccessData = nil
} }
/// 请求背包头部 /// 请求背包头部
func fus_requestBackpackTypeList(from: ReadCacheFromType){ func fus_requestBackpackTypeList(from: ReadCacheFromType){
......
...@@ -485,7 +485,7 @@ ...@@ -485,7 +485,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements; CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 20250402113548; CURRENT_PROJECT_VERSION = 20250402113551;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC; DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO; ENABLE_ON_DEMAND_RESOURCES = NO;
...@@ -753,7 +753,7 @@ ...@@ -753,7 +753,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements; CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 20250402113548; CURRENT_PROJECT_VERSION = 20250402113551;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC; DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO; ENABLE_ON_DEMAND_RESOURCES = NO;
......
...@@ -3075,7 +3075,9 @@ static FUSLiveGiftView *giftView = nil; ...@@ -3075,7 +3075,9 @@ static FUSLiveGiftView *giftView = nil;
// closeHandler(); // closeHandler();
// }; // };
halfWebView.dismissFromSuperViewHandler = ^{ halfWebView.dismissFromSuperViewHandler = ^{
if (closeHandler) {
closeHandler(); closeHandler();
}
}; };
} }
......
...@@ -481,9 +481,18 @@ ...@@ -481,9 +481,18 @@
*/ */
- (IBAction)onClickFacebookLogin:(UIButton *)sender { - (IBAction)onClickFacebookLogin:(UIButton *)sender {
// Fire base 统计 // Fire base 统计
MJWeakSelf
if ([FUSAuthCenter checkTrackingAuthorizationStatus] == FUSAuthCenterTrackingAuthorizationStatusNotDetermined) {
[FUSAuthCenter requestTrackingPermission:^(enum FUSAuthCenterTrackingAuthorizationStatus status) {
[weakSelf socialLoginWithPlatform:FUSSocializedPlatformFacebook];
[weakSelf fus_hideLoginFailView];
}];
}else {
[self socialLoginWithPlatform:FUSSocializedPlatformFacebook]; [self socialLoginWithPlatform:FUSSocializedPlatformFacebook];
[self fus_hideLoginFailView]; [self fus_hideLoginFailView];
}
} }
/** /**
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
self.isShowNavBar = NO; self.isShowNavBar = NO;
FUSButton *backButton = [[FUSButton alloc]initWithFrame:CGRectMake(0, UIView.fus_StatusBarHeight, 50, UIView.fus_NavgationBarHeight)]; FUSButton *backButton = [[FUSButton alloc]initWithFrame:CGRectMake(0, UIView.fus_StatusBarHeight, 50, UIView.fus_NavgationBarHeight)];
UIImage *backImage = UIImage.fus_backWhiteImage; UIImage *backImage = UIImage.fus_backImage;
[backButton setImage:backImage forState:UIControlStateNormal]; [backButton setImage:backImage forState:UIControlStateNormal];
[backButton addTarget:self action:@selector(clickBackBtnAction) forControlEvents:UIControlEventTouchUpInside]; [backButton addTarget:self action:@selector(clickBackBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.titleView addSubview:backButton]; [self.titleView addSubview:backButton];
......
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 sign in to comment