TrtcKey更换

This commit is contained in:
liyuhua
2023-08-08 14:40:31 +08:00
parent 1048cd66c9
commit 0a98eb1873
4 changed files with 22 additions and 4 deletions

View File

@@ -3,7 +3,6 @@
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
target 'YuMi' do target 'YuMi' do
use_frameworks! use_frameworks!
pod 'Adjust', '~> 4.31.0' pod 'Adjust', '~> 4.31.0'
# 滑动标签栏 # 滑动标签栏
pod 'JXCategoryView' pod 'JXCategoryView'

View File

@@ -63,7 +63,21 @@
/// ///
[[XPRoomFaceTool shareFaceTool] downFaceData]; [[XPRoomFaceTool shareFaceTool] downFaceData];
} }
NSString *trtcAppId = [NSString stringWithFormat:@"%@",initData[@"trtcAppId"]];
NSString *curTtcKey = [[NSUserDefaults standardUserDefaults]valueForKey:@"kTrtcAppId"];
if(curTtcKey == nil){
if(trtcAppId != nil){
[[NSUserDefaults standardUserDefaults]setValue:trtcAppId forKey:@"kTrtcAppId"];
[[NSUserDefaults standardUserDefaults]synchronize];
}
}else{
if(![trtcAppId isEqualToString:curTtcKey]){
if(trtcAppId != nil){
[[NSUserDefaults standardUserDefaults]setValue:trtcAppId forKey:@"kTrtcAppId"];
[[NSUserDefaults standardUserDefaults]synchronize];
}
}
}
// //
NSString *serverVer = initData[@"appStoreAuditNoticeVersion"]; NSString *serverVer = initData[@"appStoreAuditNoticeVersion"];
NSString *shortVer = [YYUtility appVersion]; NSString *shortVer = [YYUtility appVersion];

View File

@@ -35,7 +35,7 @@
[self.numView mas_makeConstraints:^(MASConstraintMaker *make) { [self.numView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.equalTo(self).inset(kGetScaleWidth(5)); make.leading.trailing.equalTo(self).inset(kGetScaleWidth(5));
make.bottom.equalTo(self.titleView.mas_top).mas_offset(-kGetScaleWidth(2)); make.bottom.equalTo(self.titleView.mas_top).mas_offset(-kGetScaleWidth(2));
make.top.mas_equalTo(kGetScaleWidth(0)); make.top.mas_lessThanOrEqualTo(kGetScaleWidth(28));
}]; }];
} }
- (void)setNum:(NSString *)num{ - (void)setNum:(NSString *)num{

View File

@@ -40,7 +40,12 @@
[self.engine enableAudioVolumeEvaluation:900]; [self.engine enableAudioVolumeEvaluation:900];
TRTCParams *params = [[TRTCParams alloc] init]; TRTCParams *params = [[TRTCParams alloc] init];
UInt32 appId; UInt32 appId;
sscanf([KeyWithType(KeyType_TRTC) UTF8String], "%u", &appId); NSString *curTtcKey = [[NSUserDefaults standardUserDefaults]valueForKey:@"kTrtcAppId"];
if(curTtcKey != nil && curTtcKey.length > 0){
sscanf([curTtcKey UTF8String], "%u", &appId);
}else{
sscanf([KeyWithType(KeyType_TRTC) UTF8String], "%u", &appId);
}
params.sdkAppId = appId; params.sdkAppId = appId;
UInt32 roomId; UInt32 roomId;
sscanf([channelId UTF8String], "%u", &roomId); sscanf([channelId UTF8String], "%u", &roomId);