Compare commits

...

4 Commits

Author SHA1 Message Date
liyuhua
6116d259c2 企业包20.20.2 2023-10-31 11:30:24 +08:00
liyuhua
ae8d0804e1 公屏卡顿问题 2023-10-26 16:50:26 +08:00
liyuhua
cab4294e86 公屏卡顿问题 2023-10-26 16:31:32 +08:00
liyuhua
80eddb8c3d 公屏卡顿问题 2023-10-26 16:20:23 +08:00
9 changed files with 181 additions and 102 deletions

View File

@@ -82,6 +82,10 @@ post_install do |installer|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end

View File

@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@@ -345,6 +345,7 @@
23E9EB252A84E98300B792F2 /* pi_new_mine_info_online.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB232A84E98300B792F2 /* pi_new_mine_info_online.svga */; };
23E9EB312A85E5D100B792F2 /* pi_app_logo_new_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB302A85E5D100B792F2 /* pi_app_logo_new_bg.png */; };
23E9EB332A85E97C00B792F2 /* pi_login_new_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB322A85E97B00B792F2 /* pi_login_new_logo.png */; };
23F364322AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 23F364312AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m */; };
23FF255B2AB956D50064E904 /* pi_home_new_pk.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23FF255A2AB956D50064E904 /* pi_home_new_pk.svga */; };
23FF25622ABAE6310064E904 /* pi_room_game_fine_love.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23FF25612ABAE6310064E904 /* pi_room_game_fine_love.svga */; };
23FF25652ABC3B3C0064E904 /* XPHomeGameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF25642ABC3B3B0064E904 /* XPHomeGameView.m */; };
@@ -2103,6 +2104,8 @@
23E9EB232A84E98300B792F2 /* pi_new_mine_info_online.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_new_mine_info_online.svga; sourceTree = "<group>"; };
23E9EB302A85E5D100B792F2 /* pi_app_logo_new_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pi_app_logo_new_bg.png; sourceTree = "<group>"; };
23E9EB322A85E97B00B792F2 /* pi_login_new_logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pi_login_new_logo.png; sourceTree = "<group>"; };
23F364302AF0A7E000286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "YYTextAsyncLayer+XPTextAsyncLayer.h"; sourceTree = "<group>"; };
23F364312AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "YYTextAsyncLayer+XPTextAsyncLayer.m"; sourceTree = "<group>"; };
23FF255A2AB956D50064E904 /* pi_home_new_pk.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_home_new_pk.svga; sourceTree = "<group>"; };
23FF25612ABAE6310064E904 /* pi_room_game_fine_love.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_room_game_fine_love.svga; sourceTree = "<group>"; };
23FF25632ABC3B3B0064E904 /* XPHomeGameView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeGameView.h; sourceTree = "<group>"; };
@@ -6834,6 +6837,8 @@
2323E0362ABDAE8F00CCAD2F /* FBSDKSettings+PISDKSettings.m */,
E81C27AC26EF39AB0031E639 /* AppDelegate+ThirdConfig.h */,
E81C27AD26EF39AB0031E639 /* AppDelegate+ThirdConfig.m */,
23F364302AF0A7E000286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.h */,
23F364312AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m */,
);
path = AppDelegate;
sourceTree = "<group>";
@@ -11179,6 +11184,7 @@
9B044DA0282D32F700DE4859 /* MicroInviteExtModel.m in Sources */,
E8D7D74B282BA1EC0007D7BD /* XPMonentsTableViewCell.m in Sources */,
E8D34D5A28082357009C4835 /* UserGiftWallInfoModel.m in Sources */,
23F364322AF0A7E100286D79 /* YYTextAsyncLayer+XPTextAsyncLayer.m in Sources */,
E82107842987E35300DE7040 /* MessageMonentsAutoModel.m in Sources */,
189DD52E26DE255300AB55B1 /* AppDelegate.m in Sources */,
E83DB4842746661800D8CBD1 /* XPRoomGiftBroadcastView.m in Sources */,
@@ -11813,7 +11819,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 20.10.0;
MARKETING_VERSION = 20.10.2;
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -11848,7 +11854,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 20.10.0;
MARKETING_VERSION = 20.10.2;
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@@ -0,0 +1,16 @@
//
// YYTextAsyncLayer+XPTextAsyncLayer.h
// xplan-ios
//
// Created by duoban on 2023/10/28.
//
#import <YYText/YYTextAsyncLayer.h>
NS_ASSUME_NONNULL_BEGIN
@interface YYTextAsyncLayer (XPTextAsyncLayer)
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,26 @@
//
// YYTextAsyncLayer+XPTextAsyncLayer.m
// xplan-ios
//
// Created by duoban on 2023/10/28.
//
#import "YYTextAsyncLayer+XPTextAsyncLayer.h"
@implementation YYTextAsyncLayer (XPTextAsyncLayer)
///iOS17bug退
+(void)load {
Method xp_displayMethod = class_getInstanceMethod(self, @selector(display));
Method xp_swizzingMethod = class_getInstanceMethod(self, @selector(xp_swizzing_display));
method_exchangeImplementations(xp_displayMethod, xp_swizzingMethod);
}
-(void)xp_swizzing_display{
//
if (self.bounds.size.width <= 0 || self.bounds.size.height <= 0) {
self.contents = nil;
return;
} else {
[self xp_swizzing_display];
}
}
@end

View File

@@ -49,7 +49,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
#define PI_App_Version @"2.1.0"
#define PI_App_Version @"2.1.2"
#ifdef DEBUG
#define API_HOST_URL [NSString stringWithFormat:@"%@%@",@"http://beta.api",@".pekolive.com"]

View File

@@ -1202,18 +1202,19 @@
CGFloat scale = image.size.width / image.size.height;
imageView.bounds = CGRectMake(0, 0, 18 * scale, 18);
} else {
NSURL *imgUrl = [NSURL URLWithString:imageName];
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
if (myImage) {
CGFloat scale = myImage.size.width / myImage.size.height;
if (scale == 0) {
// NSURL *imgUrl = [NSURL URLWithString:imageName];
//
// UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
// if (myImage) {
// CGFloat scale = myImage.size.width / myImage.size.height;
// if (scale == 0) {
// imageView.bounds = CGRectMake(0, 0, 60, 18);
// }else {
// imageView.bounds = CGRectMake(0, 0, 18* scale, 18);
// }
// } else {
imageView.bounds = CGRectMake(0, 0, 60, 18);
}else {
imageView.bounds = CGRectMake(0, 0, 18* scale, 18);
}
} else {
imageView.bounds = CGRectMake(0, 0, 60, 18);
}
// }
}
imageView.contentMode = UIViewContentModeScaleAspectFit;
//

View File

@@ -74,6 +74,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
///
@property (nonatomic,assign) BOOL isLarge;
@property(nonatomic,strong) PIRoomPhotoAlbumItemModel *lookUpModel;
@property(nonatomic,assign) BOOL isLoadHistoryMessage;
@end
@@ -86,6 +87,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
self = [super init];
if (self) {
self.isLoadHistoryMessage = YES;
self.hostDelegate = delegate;
[self initSubViews];
[self initSubViewConstraints];
@@ -286,6 +288,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
#pragma mark -
///
- (void)addRoomMessage:(NIMMessage *)message {
if(self.isLoadHistoryMessage == YES)return;
[self.incomingMessages addObject:message];
if (!self.isMiniEnter) {///
if (self.hostDelegate.getRoomInfo.isCloseScreen) {
@@ -711,6 +714,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
option.order = NIMMessageSearchOrderDesc;
option.messageTypes = @[@(NIMMessageTypeText)];
[[NIMSDK sharedSDK].chatroomManager fetchMessageHistory:roomId option:option result:^(NSError * _Nullable error, NSArray<NIMMessage *> * _Nullable messages) {
dispatch_async(dispatch_get_main_queue(), ^{///UI,线UI
if (self.datasource.count > kRoomMessageMaxLength) {
NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)];
NSArray *needRemoveMsgArray = [self.datasource objectsAtIndexes:set];
@@ -733,6 +737,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
}
}
}
self.isLoadHistoryMessage = NO;
[self.messageTableView reloadData];
//
[self scrollToBottom:YES];
@@ -745,9 +750,12 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
[self roomInfoNoGiftAnimationMessage:message];
}
[self createUserEnterRoomAddRoomtopicMessage];
});
}];
return;
}
dispatch_async(dispatch_get_main_queue(), ^{
if (self.datasource.count > kRoomMessageMaxLength) {
NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)];
NSArray *needRemoveMsgArray = [self.datasource objectsAtIndexes:set];
@@ -770,10 +778,10 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
}
}
}
self.isLoadHistoryMessage = NO;
[self.messageTableView reloadData];
//
[self scrollToBottom:YES];
}
BOOL hideEnter = [self handleHideEnter:message];
if (!hideEnter) {
///
@@ -783,6 +791,22 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
[self roomInfoNoGiftAnimationMessage:message];
}
[self createUserEnterRoomAddRoomtopicMessage];
});
}else{
dispatch_async(dispatch_get_main_queue(), ^{
self.isLoadHistoryMessage = NO;
BOOL hideEnter = [self handleHideEnter:message];
if (!hideEnter) {
///
[self addRoomMessage:message];
}
if (!roomInfo.hasAnimationEffect) {
[self roomInfoNoGiftAnimationMessage:message];
}
[self createUserEnterRoomAddRoomtopicMessage];
});
}
}];
}

View File

@@ -454,7 +454,9 @@
//
NSString * sessionId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session completion:^(NSError * _Nullable error) {
}];
}
} roomUid:roomUid micUid:uid position:position uid:uid];
}

View File

@@ -412,32 +412,32 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}
#pragma mark -
- (void)networkReachability{
@kWeakify(self);
[[AFNetworkReachabilityManager sharedManager] startMonitoring];
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
@kStrongify(self);
switch (status) {
case AFNetworkReachabilityStatusUnknown:
self.isFirstReachability = YES;
break;
case AFNetworkReachabilityStatusNotReachable:
self.isFirstReachability = YES;
break;
case AFNetworkReachabilityStatusReachableViaWWAN:
case AFNetworkReachabilityStatusReachableViaWiFi:
{
if (self.isFirstReachability) {
[[NSNotificationCenter defaultCenter] postNotificationName:kNetworkReachabilityKey object:nil userInfo:nil];
[self.presenter autoLogin];
[[ClientConfig shareConfig] clientInit];
}
self.isFirstReachability = YES;
}
break;
default:
break;
}
}];
// @kWeakify(self);
// [[AFNetworkReachabilityManager sharedManager] startMonitoring];
// [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
// @kStrongify(self);
// switch (status) {
// case AFNetworkReachabilityStatusUnknown:
// self.isFirstReachability = YES;
// break;
// case AFNetworkReachabilityStatusNotReachable:
// self.isFirstReachability = YES;
// break;
// case AFNetworkReachabilityStatusReachableViaWWAN:
// case AFNetworkReachabilityStatusReachableViaWiFi:
// {
// if (self.isFirstReachability) {
// [[NSNotificationCenter defaultCenter] postNotificationName:kNetworkReachabilityKey object:nil userInfo:nil];
// [self.presenter autoLogin];
// [[ClientConfig shareConfig] clientInit];
// }
// self.isFirstReachability = YES;
// }
// break;
// default:
// break;
// }
// }];
}
#pragma mark - BaseMvpProtocol