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

PrivacyInfo.xcprivacy #1120

Open
xygkevin opened this issue Dec 14, 2023 · 6 comments
Open

PrivacyInfo.xcprivacy #1120

xygkevin opened this issue Dec 14, 2023 · 6 comments

Comments

@xygkevin
Copy link

文件引用应该通过下面这种方式:
core.resource_bundles = {'SVProgressHUD' => ['SVProgressHUD/PrivacyInfo.xcprivacy']}

@honkmaster
Copy link
Member

Please use English. Can you give any references why your solution is „right“?

@xygkevin
Copy link
Author

when I add a PrivacyInfo.xcprivacy file to my project, I get an error
`
Multiple commands produce '/User/Xcode/DerivedData/Demo-dqdyrfxccschdiakhuirdvqwblex/Build/Products/Debug-iphoneos/Demo.app/PrivacyInfo.xcprivacy'

That command depends on command in Target 'Demo' (project 'Demo'): script phase “[CP] Copy Pods Resources”
`

It seems that the library's PrivacyInfo.xcprivacy file is copied to the root directory of the project, and then the conflict happened.

I referenced SDWebImage and verified that it works

Of course, there may be other ways to solve the error;

@A-Dirt
Copy link

A-Dirt commented Mar 4, 2024

Please use English. Can you give any references why your solution is „right“?
If use core. resources, during project build, PrivacyInfo. xcprivacy will be copied to the root directory of IPA payload contents. If there is already a PrivacyInfo. xcprivacy in the root directory of IPA payload content, the project build will report an error;
If you use core. resource_bundles={'SVProgressHUD '=>['SVProgressHUD/PrivacyInfo. xcprivacy']}, after pod install, PrivacyInfo. xcprivacy will be copied to SVProgressHUD. bundle @honkmaster

@jiasongs
Copy link

jiasongs commented Mar 19, 2024

Please use English. Can you give any references why your solution is „right“?

core.resources = ['SVProgressHUD/PrivacyInfo.xcprivacy'], After unpacking the App:

图片

Found that PrivacyInfo.xcprivacy is in the project root directory.

core.resource_bundles = { 'SVProgressHUD_Privacy' => ['SVProgressHUD/PrivacyInfo.xcprivacy'] }, After unpacking the App:

图片

Found that SVProgressHUD_Privacy.bundle is in the project root directory.

To sum up, if there is also PrivacyInfo.xcprivacy in the main project or other SDKs also have core.resources = ['AnySDK/PrivacyInfo.xcprivacy'], then PrivacyInfo.xcprivacy will be duplicated

@wolfcon
Copy link

wolfcon commented Mar 19, 2024

This issue only exists when using Static Framework in CocoaPods.

@LittleWangYe
Copy link

In fact, if you don't set it like this: core.resource_bundles = {'SVProgressHUD' => ['SVProgressHUD/PrivacyInfo.xcprivacy']}. Then the privacy report file generated by Xcode will not contain SVProgressHUD's PrivacyInfo. To generate a privacy report, please refer to the following link: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests?language=objc.

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

No branches or pull requests

6 participants