处理ios18从其他app用自己键盘 拉起主app的bug

其他问题
This commit is contained in:
2025-11-24 19:58:19 +08:00
parent 8e93f8f86f
commit 15e37841bb
20 changed files with 264 additions and 88 deletions

View File

@@ -16,7 +16,7 @@
#import "KBFullAccessManager.h"
#import "KBSkinManager.h"
#import "KBSkinInstallBridge.h"
#import "KBExtensionAppLauncher.h"
#import "KBHostAppLauncher.h"
// 使 static kb_consumePendingShopSkin
@interface KeyboardViewController (KBSkinShopBridge)
@@ -213,21 +213,26 @@ static void KBSkinInstallNotificationCallback(CFNotificationCenterRef center,
[self showFunctionPanel:NO];
return;
}
// // 1. UL Scheme
// // - /login entry=recharge
// // https://app.tknb.net/ul/login?src=keyboard&entry=recharge
// // - 宿 UL 退 kbkeyboardAppExtension://recharge?src=keyboard
// NSString *ulStr = [NSString stringWithFormat:@"%@?src=keyboard&entry=recharge", KB_UL_RECHARGE];
// NSURL *ul = [NSURL URLWithString:ulStr];
//
NSString *schemeStr = [NSString stringWithFormat:@"%@://recharge?src=keyboard", KB_APP_SCHEME];
NSURL *scheme = [NSURL URLWithString:schemeStr];
//
// if (!ul && !scheme) { return; }
//
// UIApplication App
BOOL ok = [KBHostAppLauncher openHostAppURL:scheme fromResponder:self.view];
// 1. schemekbkeyboardAppExtension://recharge?src=keyboard
NSString *urlStr = [NSString stringWithFormat:@"%@://recharge?src=keyboard", KB_APP_SCHEME];
NSURL *scheme = [NSURL URLWithString:urlStr];
if (!scheme) return;
// 2. extensionContext +
[KBExtensionAppLauncher openScheme:scheme
usingInputController:self
source:self.view
completion:^(BOOL success) {
if (!success) {
[KBHUD showInfo:KBLocalized(@"请切换到主App完成充值")];
}
}];
if (!ok) {
//
// XXX App /
}
}
- (void)keyBoardMainViewDidTapSettings:(KBKeyBoardMainView *)keyBoardMainView {