Multiple commands produce PrivacyInfo.xcprivacy
Mihai-github opened this issue · 3 comments
What happened?
Required by Apple to add my PrivacyInfo.xcprivacy into my project for NSPrivacyAccessedAPICategoryDiskSpace and NSPrivacyAccessedAPICategorySystemBootTime and once I've added it my build crashes with the below error:
❌ error: Multiple commands produce '/Users/builder/Library/Developer/Xcode/DerivedData/APP-astjpotccmrftsebuxjhqlzufvhq/Build/Intermediates.noindex/ArchiveIntermediates/APP/InstallationBuildProductsLocation/Applications/APP.app/PrivacyInfo.xcprivacy'
I've come across a Medium (https://jochen-holzer.medium.com/required-reason-api-troubleshooting-your-ios-privacy-manifest-file-privacyinfo-xcprivacy-c81084dc9d51) article stating:
Error: ’Multiple commands produce PrivacyInfo.xcprivacy' (when using a third party library via cocoapods)
Solution: The problem seems to appear when using 3rd party cocoapods which include a PrivacyInfo.xcprivacy file.
The problem must be solved by the developer of the 3rd party lib by changing the podspec:
Change:
sp.resource = “Sources/Resources/PrivacyInfo.xcprivacy”
to
sp.resource_bundles = { “Podname” => “Sources/Resources/PrivacyInfo.xcprivacy” }
To be honest I'm not sure if this is the package that is causing my issue but looking at the build logs this is the only one I can see having a log like this:
▸ Copying /Users/builder/Library/Developer/Xcode/DerivedData/APP-astjpotccmrftsebuxjhqlzufvhq/Build/Intermediates.noindex/ArchiveIntermediates/APP/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/RNCAsyncStorage_resources.bundle/PrivacyInfo.xcprivacy
Version
^1.23.1
What platforms are you seeing this issue on?
- Android
- iOS
- macOS
- Windows
- web
System Information
System:
OS: macOS 13.5.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 990.35 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.18.0
path: ~/.nvm/versions/node/v18.18.0/bin/node
Yarn:
version: 1.22.17
path: /usr/local/bin/yarn
npm:
version: 10.5.0
path: ~/Work/cv30.sk.app/node_modules/.bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.12.0
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: Giraffe 2022.3.1 Giraffe 2022.3.1
Xcode:
version: 14.3/14E222b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 14.0.2
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to Reproduce
Trying to build the .ipa file for testing.
checking for install build only check box in copy bundle resources under build phases can help
We already bundle Privacy Manifest as a bundle, so I think this might be a different package?
This issue has been marked as stale due to inactivity. Please respond or otherwise resolve the issue within 7 days or it will be closed.