2
This commit is contained in:
@@ -24,6 +24,15 @@ typedef NS_ENUM(NSUInteger, KBSkinBridgeErrorCode) {
|
||||
|
||||
typedef void (^KBSkinInstallConsumeCompletion)(BOOL success, NSError * _Nullable error);
|
||||
|
||||
/// 已安装的皮肤记录,用于“我的皮肤”列表展示。
|
||||
@interface KBSkinDownloadRecord : NSObject
|
||||
@property (nonatomic, copy) NSString *skinId;
|
||||
@property (nonatomic, copy) NSString *name;
|
||||
@property (nonatomic, copy, nullable) NSString *previewImage;
|
||||
@property (nonatomic, copy, nullable) NSString *zipURL;
|
||||
@property (nonatomic, assign) NSTimeInterval installedAt;
|
||||
@end
|
||||
|
||||
@interface KBSkinInstallBridge : NSObject
|
||||
|
||||
/// 默认图标短文件名映射(从 KBSkinIconMap.strings 读取)。
|
||||
@@ -56,6 +65,19 @@ typedef void (^KBSkinInstallConsumeCompletion)(BOOL success, NSError * _Nullable
|
||||
+ (void)consumePendingRequestFromBundle:(NSBundle *)bundle
|
||||
completion:(nullable KBSkinInstallConsumeCompletion)completion;
|
||||
|
||||
/// 枚举当前 App Group 中所有已解压的皮肤信息。
|
||||
+ (NSArray<KBSkinDownloadRecord *> *)installedSkinRecords;
|
||||
|
||||
/// 删除指定皮肤的本地资源目录(用于“我的皮肤 - 删除”)。
|
||||
+ (BOOL)removeInstalledSkinWithId:(NSString *)skinId
|
||||
error:(NSError * _Nullable __autoreleasing *)error;
|
||||
|
||||
/// 记录皮肤元数据(下载完成后调用,方便“我的皮肤”读取)。
|
||||
+ (void)recordInstalledSkinWithId:(NSString *)skinId
|
||||
name:(NSString *)name
|
||||
preview:(nullable NSString *)preview
|
||||
zipURL:(nullable NSString *)zipURL;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user