Skip to content

Commit

Permalink
Fix reference to privacy manifest in podspec
Browse files Browse the repository at this point in the history
When static framework linking is used with Cocoapods, files referenced using `resource` are just directly copied into the main app bundle, potentially clobbering each other or main app resources in the process. i.e., the PrivacyInfo.xcprivacy from ZIPFoundation can overwrite the one for the app itself.

The correct way to include PrivacyInfo.xcprivacy is by using `resource_bundles` to create a nested bundle to contain the file.

(If dynamic linking is used, this bundle will be nested inside the framework bundle for the pod; if static linking is used, the bundle is nested directly in the main app bundle. In either case, clobbering is avoided.)
  • Loading branch information
Westacular committed Mar 14, 2024
1 parent 6a2b78c commit 7b8b9c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ZIPFoundation.podspec
Expand Up @@ -16,5 +16,5 @@ Pod::Spec.new do |s|
s.visionos.deployment_target = '1.0'

s.source_files = 'Sources/ZIPFoundation/*.swift'
s.resource = 'Sources/ZIPFoundation/Resources/PrivacyInfo.xcprivacy'
s.resource_bundles = {'ZIPFoundation_Privacy' => ['Sources/ZIPFoundation/Resources/PrivacyInfo.xcprivacy']}
end

0 comments on commit 7b8b9c9

Please sign in to comment.