This commit is contained in:
2025-10-27 21:55:05 +08:00
parent d4ebfb9909
commit a6c077a42d
414 changed files with 55606 additions and 21 deletions

View File

@@ -8,7 +8,8 @@
#import "AppDelegate.h"
#import "ViewController.h"
#import "KBPermissionViewController.h"
#import <AFNetworking/AFNetworking.h>
#import <Bugly/Bugly.h>
static NSString * const kKBKeyboardExtensionBundleId = @"com.keyBoard.CustomKeyboard";
static BOOL KBIsKeyboardEnabled(void) {
for (UITextInputMode *mode in [UITextInputMode activeInputModes]) {
@@ -37,24 +38,15 @@ static BOOL KBIsKeyboardEnabled(void) {
[self.window makeKeyAndVisible];
ViewController *vc = [[ViewController alloc] init];
self.window.rootViewController = vc;
// [[NSNotificationCenter defaultCenter] addObserver:self
// selector:@selector(applicationDidBecomeActiveNotification:)
// name:UIApplicationDidBecomeActiveNotification
// object:nil];
///
[self getNetJudge];
[Bugly startWithAppId:BuglyId];
///
dispatch_async(dispatch_get_main_queue(), ^{
[self kb_presentPermissionIfNeeded];
});
return YES;
}
//
//#pragma mark - Active notifications
//
//- (void)applicationDidBecomeActiveNotification:(NSNotification *)note
//{
// [self kb_presentPermissionIfNeeded];
//}
#pragma mark - Permission presentation
@@ -87,4 +79,20 @@ static BOOL KBIsKeyboardEnabled(void) {
}
}
-(void)getNetJudge {
AFNetworkReachabilityManager *netManager = [AFNetworkReachabilityManager sharedManager];
[netManager startMonitoring];
[netManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status){
if (status == AFNetworkReachabilityStatusReachableViaWiFi){
// [PublicObj saveNetReachability:@"wifi"];
}else if (status == AFNetworkReachabilityStatusReachableViaWWAN){
// [PublicObj saveNetReachability:@"wwan"];
}else{
// [PublicObj saveNetReachability:@"unknown"];
}
}];
}
@end

View File

@@ -0,0 +1,21 @@
//
// KeyBoardPrefixHeader.pch
// keyBoard
//
// Created by Mac on 2025/10/27.
//
#ifndef KeyBoardPrefixHeader_pch
#define KeyBoardPrefixHeader_pch
//Bugly
#define BuglyId @"5736ce7a19"
/// 三方
#import <Masonry/Masonry.h>
#endif /* KeyBoardPrefixHeader_pch */

View File

@@ -6,7 +6,6 @@
//
#import "ViewController.h"
@interface ViewController ()
@property (nonatomic, strong) UITextView *textView;
@end