Closed mrousavy closed 4 months ago
First thing first, thanks for your contribution.
Ah, my bad - I missed that they are not built either. I'll get back to you later today, will do some testing - this PR should've been draft in the first place as I didn't test yet.
Also exposes these methods to Apple Platforms:
Previously, those methods were hidden under a
#ifdef APPLE
/#else
branch, so that on Apple you could only use theNSObject<NSCoding>
classes.In my C++ environment (where I already had strings), it was a redundant extra step to convert from
std::string
<>NSString
, and fromMMBuffer
<>NSData
, so this PR removes that intermediate conversion step.Unfortunately I couldn't do the same thing for
allKeys
, as only the return type changes (NSArray*
vsstd::vector<std::string>
), so it cannot be overloaded.We could introduce an additional method that is available whether MMKV_APPLE is true or not, but that's up to you if you want to do that @lingol.