Skip to content

Conversation

@dreampiggy
Copy link
Contributor

New Pull Request Checklist

  • I have read and understood the CONTRIBUTING guide

  • I have read the Documentation

  • I have searched for a similar pull request in the project and found none

  • I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

  • I have added the required tests to prove the fix/feature I am adding

  • I have updated the documentation (if necessary)

  • I have run the tests and they pass

  • I have run the lint and it passes (pod lib lint)

This merge request fixes / refers to the following issues: ...

Pull Request Description

Using the resource bundle syntax

See: CocoaPods/CocoaPods#10325

Should work when using CocoaPods with use_frameworks! :linkage => what_ever

Using the resource bundle syntax
Added xcprivacy for CocoaPods
@dreampiggy dreampiggy force-pushed the feat/cocoapods_xcprivacy branch from 4700a71 to 1186e50 Compare December 8, 2023 09:32
@dreampiggy dreampiggy merged commit fbe7922 into SDWebImage:master Dec 8, 2023
@dreampiggy dreampiggy deleted the feat/cocoapods_xcprivacy branch December 8, 2023 12:07
@dreampiggy dreampiggy added this to the 5.18.7 milestone Dec 8, 2023
aboedo pushed a commit to RevenueCat/purchases-ios that referenced this pull request Mar 26, 2024
### Motivation
The library already includes Privacy.xcprivacy in SPM, but when used
with CocoaPods (mandatory in Flutter), these files are not exported as
the podspec does not include that file as a resource bundle.

### Description
Listing the PrivacyInfo.xcprivacy file inside the resource_bundles
specification in the podspec allows to distribute the file correctly.
Ref.
CocoaPods/CocoaPods#10325 (comment)

This GitHub issue contains the entire discussion on how to add these
xcprivacy files and is referenced in multiple places; many libraries
already follow this approach:


https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseCrashlytics.podspec
SDWebImage/SDWebImage#3649
flutter/packages#5846
Baseflow/flutter-permission-handler#1291
Baseflow/flutter-geolocator#1462
aboedo added a commit to RevenueCat/purchases-ios that referenced this pull request Mar 27, 2024
#3775)

### Motivation
The library already includes Privacy.xcprivacy in SPM, but when used
with CocoaPods (mandatory in Flutter), these files are not exported as
the podspec does not include that file as a resource bundle.

### Description
Listing the PrivacyInfo.xcprivacy file inside the resource_bundles
specification in the podspec allows to distribute the file correctly.
Ref.

CocoaPods/CocoaPods#10325 (comment)

This GitHub issue contains the entire discussion on how to add these
xcprivacy files and is referenced in multiple places; many libraries
already follow this approach:



https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseCrashlytics.podspec
SDWebImage/SDWebImage#3649
flutter/packages#5846
Baseflow/flutter-permission-handler#1291
Baseflow/flutter-geolocator#1462

Co-authored-by: Sergio Durban Belmonte <sergio@durban.cat>
@rafaelnobrekz
Copy link

rafaelnobrekz commented May 7, 2024

@dreampiggy SDWebImage 5.19.1 from CP does not seem to include the privacy info file in the project, neither ship it in the bundled framework 🤔

- SDWebImage/Core (5.19.1)
Screenshot 2024-05-07 at 12 09 12 Screenshot 2024-05-07 at 12 09 53

@rafaelnobrekz
Copy link

I just realized what's wrong here. The app was only indirectly fetching SDWebImage/Core, not the full podspec. Thus the resources folder was missing.

@dreampiggy
Copy link
Contributor Author

I just realized what's wrong here. The app was only indirectly fetching SDWebImage/Core, not the full podspec. Thus the resources folder was missing.

Seems CocoaPods bug... It ignore the root spec resource bundle...

@dreampiggy
Copy link
Contributor Author

I can move this into SDWebImage/Core ?

@dreampiggy
Copy link
Contributor Author

Acutally, if you use pod "SDWebImage", it actually integrates only "SDWebImage/Core" and the resource bundle contains privacy file

@rafaelnobrekz
Copy link

This is the diff from the previous setup (indirectly adding SDWebImage) and the one where CP does add the Privacy resource. Not sure if it's a CP bug or expected behavior, as the lib require only the Core subspec

Screenshot 2024-05-07 at 12 28 17

hellocake pushed a commit to hellocake/SDWebImage that referenced this pull request Dec 31, 2024
* Added xcprivacy manifest to CocoaPods

Using the resource bundle syntax

* Update the README

Added xcprivacy for CocoaPods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants