diff --git a/iOS/MMKV/MMKV/MMKV.h b/iOS/MMKV/MMKV/MMKV.h index 68f86bd0..2830a734 100644 --- a/iOS/MMKV/MMKV/MMKV.h +++ b/iOS/MMKV/MMKV/MMKV.h @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN + (nullable instancetype)mmkvWithID:(NSString *)mmapID cryptKey:(nullable NSData *)cryptKey NS_SWIFT_NAME(init(mmapID:cryptKey:)); - (BOOL)reKey:(nullable NSData *)newKey NS_SWIFT_NAME(reset(cryptKey:)); -- (NSData *)cryptKey; +- (nullable NSData *)cryptKey; // object: NSString/NSData/NSDate - (BOOL)setObject:(id)object forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:)); @@ -89,7 +89,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)removeValueForKey:(NSString *)key NS_SWIFT_NAME(removeValue(forKey:)); -- (void)removeValuesForKeys:(NSArray *)arrKeys NS_SWIFT_NAME(removeValues(forKeys:)); +- (void)removeValuesForKeys:(NSArray *)arrKeys NS_SWIFT_NAME(removeValues(forKeys:)); - (void)clearMemoryCache; diff --git a/iOS/MMKV/MMKV/MMKV.mm b/iOS/MMKV/MMKV/MMKV.mm index 16bf8f5b..769fd11c 100644 --- a/iOS/MMKV/MMKV/MMKV.mm +++ b/iOS/MMKV/MMKV/MMKV.mm @@ -754,7 +754,7 @@ - (void)prepareCRCFile { #pragma mark - encryption & decryption -- (NSData *)cryptKey { +- (nullable NSData *)cryptKey { if (m_cryptor) { NSMutableData *data = [NSMutableData dataWithLength:AES_KEY_LEN]; m_cryptor->getKey(data.mutableBytes);