react-native-mmkv icon indicating copy to clipboard operation
react-native-mmkv copied to clipboard

Apple Privacy Manifest

Open tristanheilman opened this issue 10 months ago • 6 comments

Starting May 1st, Apple is requiring declarations for API usage as part of their privacy update for App Store submissions. I believe this package will need to include the NSPrivacyAccessedAPICategoryUserDefaults API declaration.

I ran a scan on my project and found this

Found potentially required reason API usage 'UserDefaults' in './WridzRefactorV2/ios/Pods/Headers/Public/MMKV/MMKV.h'
Line numbers: 369 371 
Found potentially required reason API usage 'NSUserDefaults' in './WridzRefactorV2/ios/Pods/Headers/Public/MMKV/MMKV.h'
Found potentially required reason API usage 'UserDefaults' in './WridzRefactorV2/ios/Pods/MMKV/iOS/MMKV/MMKV/MMKV.h'
Line numbers: 369 371 
Found potentially required reason API usage 'NSUserDefaults' in './WridzRefactorV2/ios/Pods/MMKV/iOS/MMKV/MMKV/MMKV.h'
Found potentially required reason API usage 'UserDefaults' in './WridzRefactorV2/ios/Pods/MMKV/iOS/MMKV/MMKV/MMKV.h'
Line numbers: 369 371 
Found potentially required reason API usage 'NSUserDefaults' in './WridzRefactorV2/ios/Pods/MMKV/iOS/MMKV/MMKV/MMKV.h'

Here is a link to a discussion on the react-native-community repo https://github.com/react-native-community/discussions-and-proposals/discussions/766

Link to Apple Documentation outlining this privacy update https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api

tristanheilman avatar Apr 11 '24 16:04 tristanheilman

MMKV Core is already working on this; https://github.com/Tencent/MMKV/commit/06797a74505043ede9b239afe244cab0d3623aa5

We don't need a privacy manifest, we will just no longer rely on those sensitive APIs.

mrousavy avatar Apr 11 '24 16:04 mrousavy

will there be a new release soon, for this patch?

mshivam019 avatar Apr 18 '24 11:04 mshivam019

MMKV didn't create a new release yet.

mrousavy avatar Apr 18 '24 13:04 mrousavy

Looks like the new release was shared 5 days ago. https://github.com/Tencent/MMKV/releases/tag/v1.3.5 Running pod install picked up the new SDK versions so looks like this can be closed.

tristanheilman avatar Apr 29 '24 14:04 tristanheilman

@tristanheilman where do you run pod install? How can the MMKV module inside can update?

matteodanelli avatar Apr 30 '24 14:04 matteodanelli

@tristanheilman where do you run pod install? How can the MMKV module inside can update?

I have react-native-mmkv ^2.12.2 installed. Just cd into your iOS directory and run pod install --repo-update. The update to the MMKV SDK was a patch update, reinstalling pods should pull in the updated version. After running pod install, check the Podfile.lock folder for MMKV ~> 1.3.5

If you have 1.3.5 installed then you are good to go.

tristanheilman avatar Apr 30 '24 14:04 tristanheilman

Fixed in V3 :)

mrousavy avatar Jun 12 '24 15:06 mrousavy