Skip to content

Commit

Permalink
Merge pull request #46 from Damonvvong/fix/swift_api_support
Browse files Browse the repository at this point in the history
fix: Refactor Swift Interface
  • Loading branch information
lingol authored Sep 28, 2018
2 parents 6ebb257 + f59315a commit b01341b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions iOS/MMKV/MMKV/MMKV.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:));
Expand Down Expand Up @@ -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<NSString *> *)arrKeys NS_SWIFT_NAME(removeValues(forKeys:));

- (void)clearMemoryCache;

Expand Down
2 changes: 1 addition & 1 deletion iOS/MMKV/MMKV/MMKV.mm
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,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);
Expand Down

0 comments on commit b01341b

Please sign in to comment.