处理上架的问题
1:处理了openurl 拉起问题 2:去掉了http 3 隐私等等
This commit is contained in:
@@ -212,6 +212,23 @@ static NSTimeInterval const kKBSubscriptionPrefillTTL = 10 * 60.0;
|
||||
[self kb_openAppSettings];
|
||||
return YES;
|
||||
}
|
||||
if ([path hasPrefix:@"/ul/recharge"]) {
|
||||
// 通知扩展:UL 已被主 App 接收
|
||||
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(),
|
||||
(__bridge CFStringRef)KBDarwinULHandled,
|
||||
NULL, NULL, true);
|
||||
// 复用 Scheme 处理逻辑,避免重复实现参数解析与跳转
|
||||
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
|
||||
NSURLComponents *schemeComponents = [[NSURLComponents alloc] init];
|
||||
schemeComponents.scheme = @"kbkeyboardAppExtension";
|
||||
schemeComponents.host = @"recharge";
|
||||
schemeComponents.queryItems = components.queryItems;
|
||||
NSURL *schemeURL = schemeComponents.URL;
|
||||
if (schemeURL) {
|
||||
[self application:application openURL:schemeURL options:@{}];
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
if ([path hasPrefix:@"/ul/login"]) {
|
||||
// 区分普通登录与“充值”场景:通过 query 中的 entry=recharge 来判断
|
||||
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
|
||||
@@ -227,9 +244,15 @@ static NSTimeInterval const kKBSubscriptionPrefillTTL = 10 * 60.0;
|
||||
(__bridge CFStringRef)KBDarwinULHandled,
|
||||
NULL, NULL, true);
|
||||
if ([entry isEqualToString:@"recharge"]) {
|
||||
// 充值入口:拉起主 App 后进入充值相关页面(目前先做占位提示)
|
||||
// [KBHUD showInfo:@"去充值"];
|
||||
|
||||
// 充值入口:复用 Scheme 处理逻辑(kbkeyboardAppExtension://recharge?...)
|
||||
NSURLComponents *schemeComponents = [[NSURLComponents alloc] init];
|
||||
schemeComponents.scheme = @"kbkeyboardAppExtension";
|
||||
schemeComponents.host = @"recharge";
|
||||
schemeComponents.queryItems = components.queryItems;
|
||||
NSURL *schemeURL = schemeComponents.URL;
|
||||
if (schemeURL) {
|
||||
[self application:application openURL:schemeURL options:@{}];
|
||||
}
|
||||
} else {
|
||||
// 默认逻辑:登录
|
||||
[self kb_presentLoginSheetIfNeeded];
|
||||
|
||||
Reference in New Issue
Block a user