iOS:fix compile error

This commit is contained in:
pengfeizhou 2021-02-01 18:13:13 +08:00 committed by osborn
parent fe4e90ec53
commit d0f4fdd98b

View File

@ -18,12 +18,11 @@
// //
#import "DoricStoragePlugin.h" #import "DoricStoragePlugin.h"
#import "DoricExtensions.h"
#if __has_include(<PINCache/PINCache.h>) #if __has_include(<PINCache/PINCache.h>)
#import <PINCache/PINCache.h> #import <PINCache/PINCache.h>
#import <DoricCore/Doric.h>
#import <DoricCore/DoricCore-umbrella.h>
#define DoricCache PINCache #define DoricCache PINCache
@ -119,6 +118,39 @@ - (void)removeAllObjectsWithBlock:(void (^)())block {
}]; }];
} }
@end @end
#else
@interface DoricCache : NSObject
- (instancetype)initWithName:(NSString *)prefix rootPath:(NSString *)path;
- (void)setObject:(NSString *)value forKey:(NSString *)key withBlock:(void (^)())block;
- (void)objectForKey:(NSString *)key withBlock:(void (^)(NSString *, id <NSCoding>))block;
- (void)removeObjectForKey:(NSString *)key withBlock:(void (^)(NSString *))block;
- (void)removeAllObjectsWithBlock:(void (^)())pFunction;
@end
@implementation DoricCache
- (instancetype)initWithName:(NSString *)prefix rootPath:(NSString *)path {
return [self init];
}
- (void)setObject:(NSString *)value forKey:(NSString *)key withBlock:(void (^)())block {
}
- (void)objectForKey:(NSString *)key withBlock:(void (^)(NSString *, id <NSCoding>))block {
}
- (void)removeObjectForKey:(NSString *)key withBlock:(void (^)(NSString *))block {
}
- (void)removeAllObjectsWithBlock:(void (^)())block {
}
@end
#endif #endif