增加iOS useNativeLiveComponent配置

master
wanghualei 2023-04-22 11:23:47 +08:00
parent 6bf91b716a
commit a03efa8ae2
3 changed files with 22 additions and 26 deletions

View File

@ -73,6 +73,7 @@
NSError* error = nil; NSError* error = nil;
FATUIConfig *uiconfig = [[FATUIConfig alloc]init]; FATUIConfig *uiconfig = [[FATUIConfig alloc]init];
if (_uiConfig) { if (_uiConfig) {
//
if (_uiConfig[@"navigationTitleTextAttributes"]) { if (_uiConfig[@"navigationTitleTextAttributes"]) {
uiconfig.navigationTitleTextAttributes = _uiConfig[@"navigationTitleTextAttributes"]; uiconfig.navigationTitleTextAttributes = _uiConfig[@"navigationTitleTextAttributes"];
} }
@ -90,28 +91,20 @@
if (_uiConfig[@"navigationBarBackBtnDarkColor"]) { if (_uiConfig[@"navigationBarBackBtnDarkColor"]) {
uiconfig.navigationBarBackBtnDarkColor = [MOPTools colorWithRGBHex:[_uiConfig[@"navigationBarBackBtnDarkColor"] intValue]]; uiconfig.navigationBarBackBtnDarkColor = [MOPTools colorWithRGBHex:[_uiConfig[@"navigationBarBackBtnDarkColor"] intValue]];
} }
//
uiconfig.moreMenuStyle = [_uiConfig[@"moreMenuStyle"] integerValue]; uiconfig.moreMenuStyle = [_uiConfig[@"moreMenuStyle"] integerValue];
uiconfig.hideBackToHomePriority = [_uiConfig[@"isHideBackHomePriority"] integerValue]; uiconfig.hideBackToHomePriority = [_uiConfig[@"isHideBackHomePriority"] integerValue];
uiconfig.hideFeedbackMenu = [_uiConfig[@"isHideFeedbackAndComplaints"] boolValue];
uiconfig.hideBackToHome = [_uiConfig[@"isHideBackHome"] boolValue]; uiconfig.hideBackToHome = [_uiConfig[@"isHideBackHome"] boolValue];
uiconfig.hideForwardMenu = [_uiConfig[@"isHideForwardMenu"] boolValue];
uiconfig.hideShareAppletMenu = [_uiConfig[@"isHideShareAppletMenu"] boolValue]; uiconfig.hideShareAppletMenu = [_uiConfig[@"isHideShareAppletMenu"] boolValue];
uiconfig.hideRefreshMenu = [_uiConfig[@"isHideRefreshMenu"] boolValue];
uiconfig.hideTransitionCloseButton = [_uiConfig[@"hideTransitionCloseButton"] boolValue];
uiconfig.disableSlideCloseAppletGesture = [_uiConfig[@"disableSlideCloseAppletGesture"] boolValue];
if (_uiConfig[@"webViewProgressBarColor"]) {
uiconfig.progressBarColor = [MOPTools colorWithRGBHex:[_uiConfig[@"webViewProgressBarColor"] intValue]];
}
uiconfig.hideFeedbackMenu = [_uiConfig[@"isHideFeedbackAndComplaints"] boolValue];
uiconfig.hideForwardMenu = [_uiConfig[@"isHideForwardMenu"] boolValue]; uiconfig.hideForwardMenu = [_uiConfig[@"isHideForwardMenu"] boolValue];
uiconfig.autoAdaptDarkMode = [_uiConfig[@"autoAdaptDarkMode"] boolValue];
uiconfig.hideSettingMenu = [_uiConfig[@"isHideSettingMenu"] boolValue]; uiconfig.hideSettingMenu = [_uiConfig[@"isHideSettingMenu"] boolValue];
uiconfig.hideFeedbackMenu = [_uiConfig[@"isHideFeedbackAndComplaints"] boolValue];
uiconfig.hideRefreshMenu = [_uiConfig[@"isHideRefreshMenu"] boolValue];
uiconfig.hideFavoriteMenu = [_uiConfig[@"isHideFavoriteMenu"] boolValue]; uiconfig.hideFavoriteMenu = [_uiConfig[@"isHideFavoriteMenu"] boolValue];
uiconfig.hideAddToDesktopMenu = [_uiConfig[@"isHideAddToDesktopMenu"] boolValue]; uiconfig.hideAddToDesktopMenu = [_uiConfig[@"isHideAddToDesktopMenu"] boolValue];
uiconfig.appletText = _uiConfig[@"appletText"]; //
uiconfig.disableSlideCloseAppletGesture = [_uiConfig[@"disableSlideCloseAppletGesture"] boolValue];
if (_uiConfig[@"capsuleConfig"]) { if (_uiConfig[@"capsuleConfig"]) {
NSDictionary *capsuleConfigDic = _uiConfig[@"capsuleConfig"]; NSDictionary *capsuleConfigDic = _uiConfig[@"capsuleConfig"];
FATCapsuleConfig *capsuleConfig = [[FATCapsuleConfig alloc]init]; FATCapsuleConfig *capsuleConfig = [[FATCapsuleConfig alloc]init];
@ -133,8 +126,8 @@
capsuleConfig.capsuleDividerLightColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleDividerLightColor"] intValue]]; capsuleConfig.capsuleDividerLightColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleDividerLightColor"] intValue]];
capsuleConfig.capsuleDividerDarkColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleDividerDarkColor"] intValue]]; capsuleConfig.capsuleDividerDarkColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleDividerDarkColor"] intValue]];
uiconfig.capsuleConfig = capsuleConfig; uiconfig.capsuleConfig = capsuleConfig;
} }
uiconfig.hideTransitionCloseButton = [_uiConfig[@"hideTransitionCloseButton"] boolValue];
if (_uiConfig[@"navHomeConfig"]) { if (_uiConfig[@"navHomeConfig"]) {
NSDictionary *navHomeConfigDic = _uiConfig[@"navHomeConfig"]; NSDictionary *navHomeConfigDic = _uiConfig[@"navHomeConfig"];
@ -243,15 +236,19 @@
uiconfig.authViewConfig = authViewConfig; uiconfig.authViewConfig = authViewConfig;
} }
uiconfig.appendingCustomUserAgent = _uiConfig[@"customWebViewUserAgent"];
uiconfig.hideWebViewProgressBar = [_uiConfig[@"hideWebViewProgressBar"] boolValue];
uiconfig.autoAdaptDarkMode = [_uiConfig[@"autoAdaptDarkMode"] boolValue];
uiconfig.transtionStyle = [_uiConfig[@"transtionStyle"] integerValue]; uiconfig.transtionStyle = [_uiConfig[@"transtionStyle"] integerValue];
uiconfig.disableSlideCloseAppletGesture = [_uiConfig[@"disableSlideCloseAppletGesture"] boolValue];
if (_uiConfig[@"webViewProgressBarColor"]) {
uiconfig.progressBarColor = [MOPTools colorWithRGBHex:[_uiConfig[@"webViewProgressBarColor"] intValue]];
}
uiconfig.hideWebViewProgressBar = [_uiConfig[@"hideWebViewProgressBar"] boolValue];
uiconfig.appletText = _uiConfig[@"appletText"];
uiconfig.appendingCustomUserAgent = _uiConfig[@"customWebViewUserAgent"];
uiconfig.autoAdaptDarkMode = [_uiConfig[@"autoAdaptDarkMode"] boolValue];
uiConfig.useNativeLiveComponent = [_uiConfig[@"useNativeLiveComponent"] boolValue];
} }
// uiconfig.moreMenuStyle = FATMoreViewStyleNormal;
[[FATClient sharedClient] initWithConfig:config uiConfig:uiconfig error:&error]; [[FATClient sharedClient] initWithConfig:config uiConfig:uiconfig error:&error];
if (error) { if (error) {
failure(@"初始化失败"); failure(@"初始化失败");
@ -267,8 +264,6 @@
[[FATClient sharedClient].logManager initLogWithLogDir:logDir logLevel:logLevel consoleLog:YES]; [[FATClient sharedClient].logManager initLogWithLogDir:logDir logLevel:logLevel consoleLog:YES];
} }
[[FATClient sharedClient] setEnableLog:YES]; [[FATClient sharedClient] setEnableLog:YES];
success(@{}); success(@{});

View File

@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk.
s.dependency 'Flutter' s.dependency 'Flutter'
s.ios.deployment_target = '9.0' s.ios.deployment_target = '9.0'
s.dependency 'FinApplet' , '2.40.3' s.dependency 'FinApplet' , '2.40.4-dev20230422v01'
s.dependency 'FinAppletExt' , '2.40.3' s.dependency 'FinAppletExt' , '2.40.4-dev20230422v01'
end end

View File

@ -328,7 +328,8 @@ class UIConfig {
// true // true
bool autoAdaptDarkMode = false; bool autoAdaptDarkMode = false;
// 使live // 使livefalse(iOS)
// trueLiveSDK
bool useNativeLiveComponent = false; bool useNativeLiveComponent = false;
// userAgent // userAgent