Baseflow / flutter_cached_network_image

Download, cache and show images in a flutter app
https://baseflow.com
2.4k stars 631 forks source link

Add privacy manifest file for iOS #934

Closed mvn-hangtran-dn closed 2 months ago

mvn-hangtran-dn commented 2 months ago

🚀 Feature Requests

Describe the feature

Platforms affected (mark all that apply)

mvanbeusekom commented 2 months ago

In this case I don't think this is necessary as the cached_network_image package doesn't access any iOS SDKs directly.

mvn-hangtran-dn commented 2 months ago

@mvanbeusekom I see cached_network_image is using sqflite and FMDB. These SDKs are included in the apple requirement. Kindly check it again. Refer link: https://developer.apple.com/support/third-party-SDK-requirements/

Christyansoft commented 1 month ago

there is any relation with the message ?

Hello,

We noticed one or more issues with a recent submission for App Store review for the following app:

Favu Version 1.2.3 Build 223 Although submission for App Store review was successful, you may want to correct the following issues in your next submission for App Store review. Once you've corrected the issues, upload a new binary to App Store Connect.

ITMS-91053: Missing API declaration - Your app’s code in the “Runner” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryUserDefaults. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.

Apple Developer Relations

mvn-hangtran-dn commented 1 month ago

@Christyansoft Yes, you received an apple warning email for privacy manifest files. You can create a PrivacyInfo.xcprivacy in your app and cover all reasons of used SDKs if you don't want to wait for SDKs to update. In your case, you have to declare reasons for usingUser Defaults

Screenshot 2024-04-09 at 2 10 00 PM
Heech commented 1 month ago

@mvanbeusekom cc @mvn-hangtran-dn Hi, as pointed out above I still think this issue/task is needed. If not to add the privacy manifest directly I think we still need to update the dependencies. Currently flutter_cached_network_image is using sqflite for image caching on mobile. https://github.com/Baseflow/flutter_cached_network_image/issues/498

Or to be specific its depending on flutter_cache_manager which is using sqflite. So think we would first need flutter_cache_manager to upgrade its dependency to use sqflite ^2.3.1 (has the required privacy manifest added). Then update flutter_cached_network_image to use the new version of flutter_cache_manager right?

Here is a relevant issue in flutter_cache_manager https://github.com/Baseflow/flutter_cache_manager/issues/451

As a temporary solution, it should be possible to fix this issue by using a dependency override for sqflite until it is updated. https://dart.dev/tools/pub/dependencies#dependency-overrides

mvanbeusekom commented 1 month ago

Hello @Heech, @mvn-hangtran-dn,

Notice that the flutter_cache_manager uses the ^2.0.0+4 constraint to depend on the sqflite package. This means that the flutter_cache_manager will depend on the latest version between 2.0.0+4 and below 3.0.0 range.

Running flutter pub upgrade in your project should update all dependencies and start using the latest version of sqflite (currently that would be 2.3.3). No need to use a dependency override. Check the version that is being used in the pubspec.lock file in the root of the application.

As mentioned earlier the cached_network_image (nor the flutter_cache_manager) package do not use any native iOS code (all pure Dart) and thus don't require a PrivacyInfo.xcprivacy file.

mvn-hangtran-dn commented 1 month ago

@mvanbeusekom Thanks, I tried to update cached_network_image to ^3.3.1 and found that sqflite is using 2.3.2(include privacy manifest file) cc @Heech