Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXTERNAL] Cocoapods support for privacy manifest (#3772) via @sdurban #3775

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

aboedo
Copy link
Member

@aboedo aboedo commented 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

### 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 aboedo added the feat A new feature label Mar 26, 2024
@aboedo aboedo requested a review from a team March 26, 2024 21:34
@aboedo aboedo self-assigned this Mar 26, 2024
@aboedo
Copy link
Member Author

aboedo commented Mar 26, 2024

For context for reviewers, this is coming from #3772, and I tested the changes locally and verified that the privacy manifest gets picked up correctly after adding

@@ -31,5 +31,5 @@ Pod::Spec.new do |s|
s.source_files = 'Sources/**/*.swift'
s.exclude_files = 'Sources/LocalReceiptParsing/ReceiptParser-only-files/**'


s.resource_bundles = {'RevenueCat' => ['Sources/PrivacyInfo.xcprivacy']}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I was wondering if we also need this for RevenueCatUI but I think it shouldn't be needed, since RevenueCat is also a dependency for RevenueCatUI right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's my understanding. Having it only in RevenueCat would also match our SPM setup.
In any case even if we did need to add it we could do it as a separate PR, it doesn't really take value away from merging this one

@aboedo
Copy link
Member Author

aboedo commented Mar 27, 2024

given that the SPM test that failed is unrelated to this PR, I'm gonna go ahead and merge this one Update: can't force-merge, so I'll re-run the tests hoping that it's a fluke.

@aboedo aboedo merged commit cc65126 into main Mar 27, 2024
24 checks passed
@aboedo aboedo deleted the privacy_manifest_cocoapods_compatibility branch March 27, 2024 14:12
vegaro pushed a commit that referenced this pull request Apr 1, 2024
**This is an automatic release.**

### New Features
* [EXTERNAL] Cocoapods support for privacy manifest (#3772) via @sdurban
(#3775) via Andy Boedo (@aboedo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants