Multiple commands produce PrivacyInfo.xcprivacy
Asked Answered
R

3

12

I am trying to build my app for iOS (using react-native), and I keep getting the error Multiple commands produce PrivacyInfo.xcprivacy.

I know where the error comes from, it's related to the fact that the Toast Pod has an PrivacyInfo.xcprivacy file:

Toast Pod

But I also have one for my app, because otherwise Apple won't accept my app starting 1st of May 2024.

They are colliding, because the files are named the same, but Apple's guidelines are strict in that sense, the file must be named this way, so I cannot rename mine.

My temporary solution has been to delete the Toast privacy file (not just removing the reference, deleting it), but I feel there has to be an actual solution for this (like a way to merge both files).

Has anyone encountered a similar problem?

Thanks

Rectify answered 30/3 at 10:55 Comment(4)
My temporary solution has been to delete the Toast privacy file (not just removing the reference, deleting it) is it working ?Fermata
could you please share a screenshot of your app's archive's generated privacy report? (product->archive->right click->generate privacy report->select where to save): better if you can share a screenshot of all combinations possible (with/without Toast, yours... etc). also the Toast privacy file - can you share a link to it please? and show its privacy manifest location in the file tree. thanksHyps
The same issue? Have you solved it yet?Candicecandid
same problem, did u get any solution?Ferdinande
G
8

Finally, I found the solution.

  1. Open

/Pods/Target Support Files/Pods-TargetName/Pods-TargetName-resources.sh

search for PrivacyInfo.xcprivacy, and you can see which library incorrectly copied the PrivacyInfo.xcprivacy file to the main bundle.

  1. Then there are two ways:

(1) Check if the library has a newer version. If it does, update it and try again. The issue may have been resolved in the new version.

(2) If there is no newer version or the new version does not resolve the issue, download the source code directly. Modify the podspec file of this library and change

"resources": "LibName/PrivacyInfo.xcprivacy"

to

"resource_bundles": {"LibName": "LibName/PrivacyInfo.xcprivacy"}

(3) In your project's Podfile, change

pod "LibName"

to your local path, like

pod "LibName", :path =>'Your Local Path'

(4)run pod update and try again

Giesser answered 18/4 at 3:31 Comment(2)
Thank you! In my case, there were some outdated libraries that were incorrectly copying the Privacy.xcprivacy. Updating them resolved this :)Quits
Sentry was the culprit for meSubtangent
B
1

In my case a google-cast-sdk pod was generating that file.

But the file was also copied in the project target copy bundle resources phase in Build phases.

I removed it from project target -> build phases -> copy bundle resources phase and the app built successfully.

enter image description here

Brief answered 3/9 at 15:57 Comment(0)
R
-2

You need to add PrivacyInfo.xcprivacy in project target.

Recluse answered 17/4 at 14:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.