[Privacy Manifest] Adjust resource layout for SPM and CocoaPods #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The path we provide here is relative to the sources within the target. This would be
./Sources/FBLPromises/
. So we need to jump one directory back and intoResources
. Otherwise, there will be a warning that the resource is specified but not found.But, although the above resolves, SPM doesn't actually bundle the resource in the target's build directory when the resource paths are relative like this 😖 .
What does work is copying the
Resources
directory into both theFBLPromises
andPromises
. I tried symlinkingSources/FBLPromises/Resources
andSources/Promises/Resources
toSources/Resources
so we could avoid duplicating the manifest contents since the contents is the same for both modules. Unfortunately, SPM won't pick up the symlink even thoughreadlink
output looks right.So, the only path that leads to a working outcome is to remove the
Sources/Resources/
and add aResources/
to bothSources/Promises/
andSources/FBLPromises/
. This is a good learning for cases where targets share the same manifest contents–– it appears that they cannot point to a shared location.cc: @thomasvl
I updated the podspec to reflect these changes.
Verification
All of the below cases generate an empty Privacy Report which is expected. The important part was making sure the xcprivacy file ends up in a name spaced part of the app bundle.