增加防抓包hook,登录mqtt,退出登录时不传token

This commit is contained in:
启星
2025-08-12 13:56:09 +08:00
parent cdbbbd59fc
commit 8065693d4c
18 changed files with 294 additions and 78 deletions

View File

@@ -12,6 +12,7 @@
95C29EA62E19166700F2524D /* QXLiveScreen.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 95C29E9D2E19166700F2524D /* QXLiveScreen.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 95C29EA62E19166700F2524D /* QXLiveScreen.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 95C29E9D2E19166700F2524D /* QXLiveScreen.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
95C29EAB2E19173300F2524D /* AgoraReplayKitExtension.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95C292A42E18ED0C00F2524D /* AgoraReplayKitExtension.xcframework */; }; 95C29EAB2E19173300F2524D /* AgoraReplayKitExtension.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95C292A42E18ED0C00F2524D /* AgoraReplayKitExtension.xcframework */; };
95C29EAD2E191D6800F2524D /* ReplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95C2925B2E18BBF800F2524D /* ReplayKit.framework */; }; 95C29EAD2E191D6800F2524D /* ReplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95C2925B2E18BBF800F2524D /* ReplayKit.framework */; };
95C304262E4A05E3004B2D82 /* QXLiveScreen.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 95C29E9D2E19166700F2524D /* QXLiveScreen.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
95C3EFEF2E49F44A004B2D82 /* ReplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95C2925B2E18BBF800F2524D /* ReplayKit.framework */; }; 95C3EFEF2E49F44A004B2D82 /* ReplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95C2925B2E18BBF800F2524D /* ReplayKit.framework */; };
95C3EFF02E49F44A004B2D82 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F205062DEF0AD20031E710 /* libz.tbd */; }; 95C3EFF02E49F44A004B2D82 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F205062DEF0AD20031E710 /* libz.tbd */; };
95C3EFF12E49F44A004B2D82 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F205042DEF0AC20031E710 /* CoreTelephony.framework */; }; 95C3EFF12E49F44A004B2D82 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F205042DEF0AC20031E710 /* CoreTelephony.framework */; };
@@ -57,6 +58,13 @@
remoteGlobalIDString = 95C29E9C2E19166700F2524D; remoteGlobalIDString = 95C29E9C2E19166700F2524D;
remoteInfo = QXLiveScreen; remoteInfo = QXLiveScreen;
}; };
95C304242E4A05D7004B2D82 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9593D70F2DB9C95C0082CA57 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 95C29E9C2E19166700F2524D;
remoteInfo = QXLiveScreen;
};
/* End PBXContainerItemProxy section */ /* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
@@ -77,6 +85,7 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 13; dstSubfolderSpec = 13;
files = ( files = (
95C304262E4A05E3004B2D82 /* QXLiveScreen.appex in Embed Foundation Extensions */,
); );
name = "Embed Foundation Extensions"; name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@@ -404,6 +413,7 @@
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
95C304252E4A05D7004B2D82 /* PBXTargetDependency */,
); );
fileSystemSynchronizedGroups = ( fileSystemSynchronizedGroups = (
9593D7192DB9C95C0082CA57 /* QXLive */, 9593D7192DB9C95C0082CA57 /* QXLive */,
@@ -671,6 +681,11 @@
target = 95C29E9C2E19166700F2524D /* QXLiveScreen */; target = 95C29E9C2E19166700F2524D /* QXLiveScreen */;
targetProxy = 95C29EA42E19166700F2524D /* PBXContainerItemProxy */; targetProxy = 95C29EA42E19166700F2524D /* PBXContainerItemProxy */;
}; };
95C304252E4A05D7004B2D82 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 95C29E9C2E19166700F2524D /* QXLiveScreen */;
targetProxy = 95C304242E4A05D7004B2D82 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */ /* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
@@ -683,7 +698,7 @@
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements; CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 8798G5VMH9; DEVELOPMENT_TEAM = 8798G5VMH9;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@@ -703,7 +718,7 @@
); );
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = QXLive/Info.plist; INFOPLIST_FILE = QXLive/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "羽声"; INFOPLIST_KEY_CFBundleDisplayName = "羽声语音";
INFOPLIST_KEY_NSCameraUsageDescription = "访问您的相机,允许可以开启直播和录制视频"; INFOPLIST_KEY_NSCameraUsageDescription = "访问您的相机,允许可以开启直播和录制视频";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "访问您的位置,系统将获取您附近的用户进行推荐展示"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "访问您的位置,系统将获取您附近的用户进行推荐展示";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "访问您的麦克风,允许可以录制声音以便在聊天室进行语音聊天"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "访问您的麦克风,允许可以录制声音以便在聊天室进行语音聊天";
@@ -718,7 +733,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.2; MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -743,7 +758,7 @@
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements; CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 8798G5VMH9; DEVELOPMENT_TEAM = 8798G5VMH9;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@@ -763,7 +778,7 @@
); );
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = QXLive/Info.plist; INFOPLIST_FILE = QXLive/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "羽声"; INFOPLIST_KEY_CFBundleDisplayName = "羽声语音";
INFOPLIST_KEY_NSCameraUsageDescription = "访问您的相机,允许可以开启直播和录制视频"; INFOPLIST_KEY_NSCameraUsageDescription = "访问您的相机,允许可以开启直播和录制视频";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "访问您的位置,系统将获取您附近的用户进行推荐展示"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "访问您的位置,系统将获取您附近的用户进行推荐展示";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "访问您的麦克风,允许可以录制声音以便在聊天室进行语音聊天"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "访问您的麦克风,允许可以录制声音以便在聊天室进行语音聊天";
@@ -778,7 +793,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.2; MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -1076,7 +1091,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.2; MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO; SUPPORTS_MACCATALYST = NO;
@@ -1136,7 +1151,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.2; MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO; SUPPORTS_MACCATALYST = NO;

View File

@@ -43,8 +43,8 @@
buildForAnalyzing = "YES"> buildForAnalyzing = "YES">
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "951CF9662E40D0190066D094" BlueprintIdentifier = "95C3EFE92E49F44A004B2D82"
BuildableName = "QXLiveDev" BuildableName = "QXLiveDev.app"
BlueprintName = "QXLiveDev" BlueprintName = "QXLiveDev"
ReferencedContainer = "container:QXLive.xcodeproj"> ReferencedContainer = "container:QXLive.xcodeproj">
</BuildableReference> </BuildableReference>
@@ -74,8 +74,8 @@
runnableDebuggingMode = "0"> runnableDebuggingMode = "0">
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "951CF9662E40D0190066D094" BlueprintIdentifier = "95C3EFE92E49F44A004B2D82"
BuildableName = "QXLiveDev" BuildableName = "QXLiveDev.app"
BlueprintName = "QXLiveDev" BlueprintName = "QXLiveDev"
ReferencedContainer = "container:QXLive.xcodeproj"> ReferencedContainer = "container:QXLive.xcodeproj">
</BuildableReference> </BuildableReference>
@@ -93,8 +93,8 @@
runnableDebuggingMode = "0"> runnableDebuggingMode = "0">
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "951CF9662E40D0190066D094" BlueprintIdentifier = "95C3EFE92E49F44A004B2D82"
BuildableName = "QXLiveDev" BuildableName = "QXLiveDev.app"
BlueprintName = "QXLiveDev" BlueprintName = "QXLiveDev"
ReferencedContainer = "container:QXLive.xcodeproj"> ReferencedContainer = "container:QXLive.xcodeproj">
</BuildableReference> </BuildableReference>

View File

@@ -16,38 +16,6 @@
stopOnStyle = "0"> stopOnStyle = "0">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "16EE67D5-C0D2-48F9-A1BB-4B491B03122C"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "QXLive/Login(&#x767b;&#x5f55;)/Controlller/QXLoginViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "360"
endingLineNumber = "360"
landmarkName = "-jumpAli"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "C73F04F2-20BD-4D62-8B18-01BA7EE12A2D"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "QXLive/Login(&#x767b;&#x5f55;)/Controlller/QXLoginViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "359"
endingLineNumber = "359"
landmarkName = "-jumpAli"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy <BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent <BreakpointContent
@@ -243,16 +211,64 @@
<BreakpointProxy <BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent <BreakpointContent
uuid = "DACB8B97-5630-4374-941A-C783964BCA68" uuid = "110736A2-4444-4893-BAF4-09076130DE0E"
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "QXLive/Network/QXRequest.m" filePath = "QXLive/Other/AppDelegate+Login.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "262" startingLineNumber = "35"
endingLineNumber = "262" endingLineNumber = "35"
landmarkName = "-requestWithUrl:parameters:type:cachePolicy:success:cache:failure:" landmarkName = "-ATAuthSDK"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "2A7AB14C-7765-4265-8902-3218C4F8FD59"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "QXLive/Login(&#x767b;&#x5f55;)/Controlller/QXLoginViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "208"
endingLineNumber = "208"
landmarkName = "-startLoginWithModel:complete:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "E438D9B8-DAEB-45EB-91FF-D46B7C146652"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "QXLive/Login(&#x767b;&#x5f55;)/Controlller/QXLoginViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "477"
endingLineNumber = "477"
landmarkName = "-loginAndGetAccountListWithType:user_login:sms_code:password:code:login_token:auth_code:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "1AB1AD66-D71E-4958-982D-E5FA1A959946"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "QXLive/Login(&#x767b;&#x5f55;)/Services/QXLoginNetwork.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "69"
endingLineNumber = "69"
landmarkName = "+loginAccountWithUser_login:successBlock:failBlock:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>

View File

@@ -0,0 +1,17 @@
//
// NSURLSession+BJX.h
// BJXGame
//
// Created by apple on 2022/11/7.
// Copyright © 2022 鑫创. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSURLSession (QX)
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,37 @@
//
// NSURLSession+BJX.m
// BJXGame
//
// Created by apple on 2022/11/7.
// Copyright © 2022 . All rights reserved.
//
#import "NSURLSession+QX.h"
#import <objc/runtime.h>
@implementation NSURLSession (QX)
+ (void)load{
Method method1 = class_getClassMethod([NSURLSession class],@selector(sessionWithConfiguration:));
Method method2 = class_getClassMethod([NSURLSession class],@selector(px_sessionWithConfiguration:));
method_exchangeImplementations(method1, method2);
Method method3 =class_getClassMethod([NSURLSession class],@selector(sessionWithConfiguration:delegate:delegateQueue:));
Method method4 =class_getClassMethod([NSURLSession class],@selector(px_sessionWithConfiguration:delegate:delegateQueue:));
method_exchangeImplementations(method3, method4);
}
+ (NSURLSession*)px_sessionWithConfiguration:(NSURLSessionConfiguration*)configuration delegate:(nullable id)delegate delegateQueue:(nullable NSOperationQueue*)queue{
if(configuration) configuration.connectionProxyDictionary=@{};
return [self px_sessionWithConfiguration:configuration delegate:delegate delegateQueue:queue];
}
+ (NSURLSession*)px_sessionWithConfiguration:(NSURLSessionConfiguration*)configuration{
if(configuration) configuration.connectionProxyDictionary=@{};
return [self px_sessionWithConfiguration:configuration];
}
@end

View File

@@ -19,6 +19,7 @@
#import "QXRoomMessageManager.h" #import "QXRoomMessageManager.h"
#import "QXTimer.h" #import "QXTimer.h"
#import <TIMPush/TIMPushManager.h> #import <TIMPush/TIMPushManager.h>
#import "QXManagerMqtt.h"
@interface QXGlobal() @interface QXGlobal()
@property (nonatomic,assign)BOOL isLogin; @property (nonatomic,assign)BOOL isLogin;
@@ -52,7 +53,9 @@
[self removeLocalData]; [self removeLocalData];
[self removeMemory]; [self removeMemory];
AppDelegate *appdelegate = (AppDelegate*)[UIApplication sharedApplication].delegate; AppDelegate *appdelegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
///
[TIMPushManager removePushListener:appdelegate]; [TIMPushManager removePushListener:appdelegate];
///
[[V2TIMManager sharedInstance] removeConversationListener:appdelegate]; [[V2TIMManager sharedInstance] removeConversationListener:appdelegate];
[TIMPushManager unRegisterPush:^{ [TIMPushManager unRegisterPush:^{
//success //success
@@ -68,6 +71,8 @@
na.modalPresentationStyle = UIModalPresentationFullScreen; na.modalPresentationStyle = UIModalPresentationFullScreen;
[self.getKeyWindow.rootViewController presentViewController:na animated:YES completion:nil]; [self.getKeyWindow.rootViewController presentViewController:na animated:YES completion:nil];
self.isShowLoginVC = YES; self.isShowLoginVC = YES;
/// mqtt
[[QXManagerMqtt sharedInstance] disconnect];
} }
-(void)saveLoginData:(NSString *)userInfoJson{ -(void)saveLoginData:(NSString *)userInfoJson{
@@ -114,7 +119,7 @@
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
} }
-(void)removeMemory{ -(void)removeMemory{
self.loginModel = nil; QXGlobal.shareGlobal.loginModel = nil;
} }
-(void)showView:(UIView *)view popType:(PopViewType)popType tapDismiss:(BOOL)tapDismiss finishBlock:(showFinishBlock)finishBlock{ -(void)showView:(UIView *)view popType:(PopViewType)popType tapDismiss:(BOOL)tapDismiss finishBlock:(showFinishBlock)finishBlock{
self.alertViewController = [[QXAlertViewController alloc] init]; self.alertViewController = [[QXAlertViewController alloc] init];

View File

@@ -0,0 +1,17 @@
//
// WKWebView+QX.h
// YBLive
//
// Created by 启星 on 2025/4/16.
// Copyright © 2025 cat. All rights reserved.
//
#import <WebKit/WebKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface WKWebView (QX)
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,50 @@
//
// WKWebView+QX.m
// YBLive
//
// Created by on 2025/4/16.
// Copyright © 2025 cat. All rights reserved.
//
#import "WKWebView+QX.h"
@implementation WKWebView (QX)
+ (void)load{
Method method1 = class_getInstanceMethod([self class],@selector(loadRequest:));
Method method2 = class_getInstanceMethod([self class],@selector(qx_loadRequest:));
method_exchangeImplementations(method1, method2);
}
-(void)qx_loadRequest:(NSURLRequest*)request{
if ([self isProxyEnabled]) {
[self qx_loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https:www.baidu.com"]]];
}else{
[self qx_loadRequest:request];
}
}
-(BOOL)isProxyEnabled{
NSArray *criticalDomains = @[
H5ServerUrl,
ServerUrl,
];
NSDictionary *proxySettings = (__bridge NSDictionary *)CFNetworkCopySystemProxySettings();
for (NSString *domain in criticalDomains) {
NSArray *proxies = (__bridge NSArray *)CFNetworkCopyProxiesForURL(
(__bridge CFURLRef)[NSURL URLWithString:domain],
(__bridge CFDictionaryRef)proxySettings
);
// ...
for (NSDictionary *proxy in proxies) {
NSString *proxyType = proxy[(NSString *)kCFProxyTypeKey];
if (![proxyType isEqualToString:(NSString *)kCFProxyTypeNone]) {
return YES; // VPN
}
}
}
return NO;
}
@end

View File

@@ -201,8 +201,8 @@
QXLOG(@"断开连接 error = %@",[error description]); QXLOG(@"断开连接 error = %@",[error description]);
}]; }];
[self.mySessionManager setDelegate:nil]; [self.mySessionManager setDelegate:nil];
self.mySessionManager = nil;
[self.subedDict removeAllObjects]; [self.subedDict removeAllObjects];
_mySessionManager = nil;
} }
- (void)reConnect { - (void)reConnect {
if (self.mySessionManager && self.mySessionManager.port) { if (self.mySessionManager && self.mySessionManager.port) {

View File

@@ -9,6 +9,7 @@
#import "QXHomeRoomCell.h" #import "QXHomeRoomCell.h"
#import <SDCycleScrollView.h> #import <SDCycleScrollView.h>
#import "QXBanner.h" #import "QXBanner.h"
#import "QXTimer.h"
#import "QXHomePageNetwork.h" #import "QXHomePageNetwork.h"
@@ -24,6 +25,7 @@
@property (nonatomic,assign)NSInteger currentIndex; @property (nonatomic,assign)NSInteger currentIndex;
@property (nonatomic,strong)NSMutableArray *dataArray; @property (nonatomic,strong)NSMutableArray *dataArray;
@property (nonatomic,strong)NSMutableArray *topArray; @property (nonatomic,strong)NSMutableArray *topArray;
@property (nonatomic,strong)QXTimer *timer;
@end @end
@implementation QXAppstoreHomeView @implementation QXAppstoreHomeView
@@ -71,9 +73,9 @@
[self getTopRoomList]; [self getTopRoomList];
[self getAllRoomList]; [self getAllRoomList];
} }
-(void)startAnimate{ //-(void)startAnimate{
[self performSelector:@selector(startOptimizedInfiniteFlip) afterDelay:3]; // [self performSelector:@selector(startOptimizedInfiniteFlip) afterDelay:3];
} //}
//-(void)setDataArray:(NSArray *)dataArray{ //-(void)setDataArray:(NSArray *)dataArray{
// _dataArray = dataArray; // _dataArray = dataArray;
@@ -104,7 +106,7 @@
weakSelf.roomModel = list.firstObject; weakSelf.roomModel = list.firstObject;
weakSelf.rommView.roomModel = weakSelf.roomModel; weakSelf.rommView.roomModel = weakSelf.roomModel;
[weakSelf.topArray addObjectsFromArray:list]; [weakSelf.topArray addObjectsFromArray:list];
[weakSelf startAnimate]; [weakSelf startTimer];
} }
[self.scrollView.mj_header endRefreshing]; [self.scrollView.mj_header endRefreshing];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
@@ -126,6 +128,20 @@
[self.scrollView.mj_header endRefreshing]; [self.scrollView.mj_header endRefreshing];
}]; }];
} }
-(void)startTimer{
MJWeakSelf
[self stopTimer];
_timer = [QXTimer scheduledTimerWithTimeInterval:5 repeats:YES queue:dispatch_get_main_queue() block:^{
QXLOG(@"动画3s执行");
[weakSelf startOptimizedInfiniteFlip];
}];
// CABasicAnimation *scaleAnim = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
// scaleAnim.duration = 1.5/2;
// scaleAnim.autoreverses = YES;
// scaleAnim.fromValue = @1.0;
// scaleAnim.toValue = @1.1;
// [self.rommView.layer addAnimation:scaleAnim forKey:@"scaleAnimation"];
}
- (void)startOptimizedInfiniteFlip { - (void)startOptimizedInfiniteFlip {
self.currentIndex++; self.currentIndex++;
if (self.currentIndex > self.topArray.count-1) { if (self.currentIndex > self.topArray.count-1) {
@@ -149,18 +165,19 @@
// self.isFront = !self.isFront; // self.isFront = !self.isFront;
// //
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self startOptimizedInfiniteFlip]; // [self startOptimizedInfiniteFlip];
}); // });
}]; }];
// //
CABasicAnimation *scaleAnim = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
scaleAnim.duration = flipDuration/2; }
scaleAnim.autoreverses = YES; -(void)stopTimer{
scaleAnim.fromValue = @1.0; if (_timer) {
scaleAnim.toValue = @1.1; [_timer invalidate];
[self.rommView.layer addAnimation:scaleAnim forKey:@"scaleAnimation"]; _timer = nil;
}
} }
#pragma mark - UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout #pragma mark - UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{ -(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{

View File

@@ -261,6 +261,8 @@ static NSInteger HTTP_ERROR_CODE = 0;
[manager.requestSerializer setValue:appVersion forHTTPHeaderField:@"App-Version"]; [manager.requestSerializer setValue:appVersion forHTTPHeaderField:@"App-Version"];
if ([QXGlobal shareGlobal].isLogin) { if ([QXGlobal shareGlobal].isLogin) {
[manager.requestSerializer setValue:[QXGlobal shareGlobal].loginModel.token forHTTPHeaderField:@"token"]; [manager.requestSerializer setValue:[QXGlobal shareGlobal].loginModel.token forHTTPHeaderField:@"token"];
}else{
[manager.requestSerializer setValue:@"" forHTTPHeaderField:@"token"];
} }
switch (type) { switch (type) {
case GET: { case GET: {

View File

@@ -14,7 +14,8 @@
#import "QXLoginNetwork.h" #import "QXLoginNetwork.h"
#import "QXMineNetwork.h" #import "QXMineNetwork.h"
#import "QXMessageServices.h" #import "QXMessageServices.h"
#import "QXManagerMqtt.h"
#import "OpenUDID.h"
@implementation AppDelegate (Login) @implementation AppDelegate (Login)
-(void)configThirdPartLogin{ -(void)configThirdPartLogin{
@@ -67,6 +68,8 @@
[[QXLocationManager shareManager] startLoction]; [[QXLocationManager shareManager] startLoction];
[QXLocationManager shareManager].delegate = self; [QXLocationManager shareManager].delegate = self;
[self getUserInfo]; [self getUserInfo];
NSString *clientId = [OpenUDID value];
[[QXManagerMqtt sharedInstance] bindWithUserName:@"public" password:@"" cliendId:clientId isSSL:NO];
} }
-(void)onKickedOffline{ -(void)onKickedOffline{

View File

@@ -14,8 +14,6 @@
#import <AlipaySDK/AlipaySDK.h> #import <AlipaySDK/AlipaySDK.h>
#import <TIMPush/TIMPushManager.h> #import <TIMPush/TIMPushManager.h>
#import <SDWebImageWebPCoder/SDWebImageWebPCoder.h> #import <SDWebImageWebPCoder/SDWebImageWebPCoder.h>
#import "QXManagerMqtt.h"
#import "OpenUDID.h"
#if DEBUG #if DEBUG
#import <LLDebugTool.h> #import <LLDebugTool.h>
#endif #endif
@@ -44,8 +42,6 @@
SDImageWebPCoder *webPCoder = [SDImageWebPCoder sharedCoder]; SDImageWebPCoder *webPCoder = [SDImageWebPCoder sharedCoder];
[[SDImageCodersManager sharedManager] addCoder:webPCoder]; [[SDImageCodersManager sharedManager] addCoder:webPCoder];
[self configThirdPartLogin]; [self configThirdPartLogin];
NSString *clientId = [OpenUDID value];
[[QXManagerMqtt sharedInstance] bindWithUserName:@"public" password:@"" cliendId:clientId isSSL:NO];
#if DEBUG #if DEBUG
[[LLDebugTool sharedTool] startWorking]; [[LLDebugTool sharedTool] startWorking];
#endif #endif

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "启动页.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 KiB

View File

@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
@@ -11,15 +14,32 @@
<objects> <objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> <viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="启动页" translatesAutoresizingMaskIntoConstraints="NO" id="ydi-6i-HE8">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="ydi-6i-HE8" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="1rA-wz-hiM"/>
<constraint firstAttribute="bottom" secondItem="ydi-6i-HE8" secondAttribute="bottom" id="AzB-c2-eXR"/>
<constraint firstItem="ydi-6i-HE8" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="FjI-0Z-nXt"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="ydi-6i-HE8" secondAttribute="trailing" id="zbF-rX-0c0"/>
</constraints>
</view> </view>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="53" y="375"/> <point key="canvasLocation" x="52.671755725190835" y="374.64788732394368"/>
</scene> </scene>
</scenes> </scenes>
<resources>
<image name="启动页" width="375" height="812"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document> </document>

View File

@@ -13,7 +13,7 @@
<string>Editor</string> <string>Editor</string>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>qxlive</string> <string>qxlivetest</string>
</array> </array>
</dict> </dict>
<dict> <dict>