处理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

@@ -22,6 +22,7 @@
#import "IAPVerifyTransactionObj.h"
#import "FGIAPManager.h"
#import "KBSexSelVC.h"
#import "KBKeyboardPermissionManager.h"
// bundle id target
// PRODUCT_BUNDLE_IDENTIFIER
@@ -37,6 +38,15 @@
/// 2
[KBLocalizationManager shared].supportedLanguageCodes = @[ @"en", @"zh-Hans"];
// /访 Keychain
static NSString *const kKBFullAccessRecordInitializedKey = @"KBFullAccessRecordInitialized";
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
if (![ud boolForKey:kKBFullAccessRecordInitializedKey]) {
[[KBKeyboardPermissionManager shared] resetFullAccessRecord];
[ud setBool:YES forKey:kKBFullAccessRecordInitializedKey];
[ud synchronize];
}
// Skip TabBar
BOOL hasShownSexVC = [[NSUserDefaults standardUserDefaults] boolForKey:KBSexSelectShownKey];
if (hasShownSexVC) {
@@ -110,13 +120,31 @@
NSString *host = url.host.lowercaseString ?: @"";
if ([host hasSuffix:@"app.tknb.net"]) {
NSString *path = url.path.lowercaseString ?: @"";
if ([path hasPrefix:@"/ul/settings"]) { [self kb_openAppSettings]; return YES; }
if ([path hasPrefix:@"/ul/settings"]) {
[self kb_openAppSettings];
return YES;
}
if ([path hasPrefix:@"/ul/login"]) {
// query entry=recharge
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
NSString *entry = nil;
for (NSURLQueryItem *item in components.queryItems ?: @[]) {
if ([item.name isEqualToString:@"entry"]) {
entry = item.value;
break;
}
}
// UL App 退 Scheme
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(),
(__bridge CFStringRef)KBDarwinULHandled,
NULL, NULL, true);
[self kb_presentLoginSheetIfNeeded];
if ([entry isEqualToString:@"recharge"]) {
// App
[KBHUD showInfo:@"去充值"];
} else {
//
[self kb_presentLoginSheetIfNeeded];
}
return YES;
}
}