diff --git a/CustomKeyboard/PrefixHeader.pch b/CustomKeyboard/PrefixHeader.pch index 4623ba0..9011dfa 100644 --- a/CustomKeyboard/PrefixHeader.pch +++ b/CustomKeyboard/PrefixHeader.pch @@ -17,6 +17,7 @@ // 公共配置 #import "KBConfig.h" +#import "KBAPI.h" // 接口路径宏(统一管理) #import "Masonry.h" #import "KBHUD.h" // 复用 App 内的 HUD 封装 #import "KBLocalizationManager.h" // 复用多语言封装(可在扩展内使用) diff --git a/Shared/KBAPI.h b/Shared/KBAPI.h new file mode 100644 index 0000000..cb2f5cd --- /dev/null +++ b/Shared/KBAPI.h @@ -0,0 +1,21 @@ +// +// KBAPI.h +// 统一管理所有接口路径的宏,避免在代码中散落硬编码字符串。 +// 注意:这里的路径为相对 KB_BASE_URL 的“相对路径”,可带或不带开头的斜杠。 +// + +#ifndef KBAPI_h +#define KBAPI_h + +// 用户与认证 +#ifndef KB_API_USER_APPLE_LOGIN +#define API_APPLE_LOGIN @"/user/appleLogin" // Apple 登录 +#endif + +// 应用配置 +#ifndef KB_API_APP_CONFIG +#define KB_API_APP_CONFIG @"app/config" // 获取 App 配置 +#endif + +#endif /* KBAPI_h */ + diff --git a/keyBoard.xcodeproj/project.pbxproj b/keyBoard.xcodeproj/project.pbxproj index 91a3b9e..28c8983 100644 --- a/keyBoard.xcodeproj/project.pbxproj +++ b/keyBoard.xcodeproj/project.pbxproj @@ -176,6 +176,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 04122F592EC5D40000EF7AB3 /* KBAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBAPI.h; sourceTree = ""; }; 0459D1B22EBA284C00F2D189 /* KBSkinCenterVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBSkinCenterVC.h; sourceTree = ""; }; 0459D1B32EBA284C00F2D189 /* KBSkinCenterVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBSkinCenterVC.m; sourceTree = ""; }; 0459D1B52EBA287900F2D189 /* KBSkinManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBSkinManager.h; sourceTree = ""; }; @@ -1146,6 +1147,7 @@ children = ( 04A9FE1F2EB893F10020DB6D /* Localization */, 04FC98012EB36AAB007BD342 /* KBConfig.h */, + 04122F592EC5D40000EF7AB3 /* KBAPI.h */, A1B2C4002EB4A0A100000001 /* KBAuthManager.h */, A1B2C4002EB4A0A100000002 /* KBAuthManager.m */, A1B2C4232EB4B7A100000001 /* KBKeyboardPermissionManager.h */, diff --git a/keyBoard/AppDelegate.m b/keyBoard/AppDelegate.m index 6d6ca87..ec70203 100644 --- a/keyBoard/AppDelegate.m +++ b/keyBoard/AppDelegate.m @@ -176,7 +176,7 @@ static NSString * const kKBKeyboardExtensionBundleId = @"com.loveKey.nyx.CustomK NSDictionary *params = @{ @"code": tokenString ?: @"", }; - [[KBNetworkManager shared] POST:@"/user/appleLogin" jsonBody:params headers:nil completion:^(id _Nullable jsonOrData, NSURLResponse * _Nullable response, NSError * _Nullable error) { + [[KBNetworkManager shared] POST:API_APPLE_LOGIN jsonBody:params headers:nil completion:^(id _Nullable jsonOrData, NSURLResponse * _Nullable response, NSError * _Nullable error) { NSLog(@"====="); }]; diff --git a/keyBoard/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x 1.png b/keyBoard/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x 1.png new file mode 100644 index 0000000..80cb8a4 Binary files /dev/null and b/keyBoard/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x 1.png differ diff --git a/keyBoard/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x 2.png b/keyBoard/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x 2.png new file mode 100644 index 0000000..80cb8a4 Binary files /dev/null and b/keyBoard/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x 2.png differ diff --git a/keyBoard/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png b/keyBoard/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png new file mode 100644 index 0000000..80cb8a4 Binary files /dev/null and b/keyBoard/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png differ diff --git a/keyBoard/Assets.xcassets/AppIcon.appiconset/Contents.json b/keyBoard/Assets.xcassets/AppIcon.appiconset/Contents.json index 2305880..794d92a 100644 --- a/keyBoard/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/keyBoard/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "AppIcon60x60@2x.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" @@ -12,6 +13,7 @@ "value" : "dark" } ], + "filename" : "AppIcon60x60@2x 1.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" @@ -23,6 +25,7 @@ "value" : "tinted" } ], + "filename" : "AppIcon60x60@2x 2.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/keyBoard/Class/Home/VC/FunctionTest/KBTestVC.m b/keyBoard/Class/Home/VC/FunctionTest/KBTestVC.m index dc9b451..8cfc30a 100644 --- a/keyBoard/Class/Home/VC/FunctionTest/KBTestVC.m +++ b/keyBoard/Class/Home/VC/FunctionTest/KBTestVC.m @@ -42,7 +42,7 @@ dispatch_async(dispatch_get_main_queue(), ^{ [self.textView becomeFirstResponder]; }); - [[KBNetworkManager shared] GET:@"app/config" parameters:nil headers:nil completion:^(id _Nullable jsonOrData, NSURLResponse * _Nullable response, NSError * _Nullable error) { + [[KBNetworkManager shared] GET:KB_API_APP_CONFIG parameters:nil headers:nil completion:^(id _Nullable jsonOrData, NSURLResponse * _Nullable response, NSError * _Nullable error) { NSLog(@"===="); }]; } diff --git a/keyBoard/KeyBoardPrefixHeader.pch b/keyBoard/KeyBoardPrefixHeader.pch index 7f61f72..ff659bc 100644 --- a/keyBoard/KeyBoardPrefixHeader.pch +++ b/keyBoard/KeyBoardPrefixHeader.pch @@ -17,6 +17,7 @@ #import // 公共配置 #import "KBConfig.h" +#import "KBAPI.h" // 接口路径宏(统一管理) /// 系统 #import