This commit is contained in:
2025-11-03 13:25:41 +08:00
parent ffea9d2022
commit c7021e382e
12 changed files with 384 additions and 27 deletions

View File

@@ -13,6 +13,7 @@
#import "LoginViewController.h"
#import "KBLoginSheetViewController.h"
#import "AppleSignInManager.h"
#import <objc/message.h>
// bundle id target
// PRODUCT_BUNDLE_IDENTIFIER
@@ -34,9 +35,23 @@ static NSString * const kKBKeyboardExtensionBundleId = @"com.keyBoardst.CustomKe
/// GroupID
// buglyConfig.applicationGroupIdentifier = @"";
[Bugly startWithAppId:BuglyId config:buglyConfig];
///
///
dispatch_async(dispatch_get_main_queue(), ^{
[self kb_presentPermissionIfNeeded];
UIViewController *top = [self kb_topMostViewController];
if (top) {
Class mgrCls = NSClassFromString(@"KBKeyboardPermissionManager");
if (mgrCls && [mgrCls respondsToSelector:@selector(shared)]) {
id mgr = [mgrCls performSelector:@selector(shared)];
if ([mgr respondsToSelector:@selector(presentPermissionIfNeededFrom:)]) {
// API
void (*func)(id, SEL, UIViewController *) = (void (*)(id, SEL, UIViewController *))objc_msgSend;
func(mgr, @selector(presentPermissionIfNeededFrom:), top);
}
} else {
//
[self kb_presentPermissionIfNeeded];
}
}
});
return YES;
}

View File

@@ -0,0 +1,15 @@
//
// UIViewController+Extension.h
// keyBoard
//
// Created by Mac on 2025/11/3.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIViewController (Extension)
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// UIViewController+Extension.m
// keyBoard
//
// Created by Mac on 2025/11/3.
//
#import "UIViewController+Extension.h"
@implementation UIViewController (Extension)
@end

View File

@@ -35,8 +35,8 @@
// KBGuideVC *vc = [[KBGuideVC alloc] init];
// [self.navigationController pushViewController:vc animated:true];
// [KBHUD showInfo:@"加载中..."];
[KBHUD show];
[KBHUD showAllowTapToDismiss:true];
// [KBHUD show];
// [KBHUD showAllowTapToDismiss:true];
}
/*