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

Multiple commands produce PrivacyInfo.xcprivacy #35

Closed
tmakic opened this issue Apr 25, 2024 · 4 comments · Fixed by #36
Closed

Multiple commands produce PrivacyInfo.xcprivacy #35

tmakic opened this issue Apr 25, 2024 · 4 comments · Fixed by #36

Comments

@tmakic
Copy link

tmakic commented Apr 25, 2024

I am currently working on a project and have encountered an issue
when trying to build with PrivacyInfo.xcprivacy added.

The error message I am receiving is as follows:

Multiple commands produce '/Users/tomoyo.makino/Library/Developer/Xcode/DerivedData/MyProject-xxx/ArchiveIntermediates/MyProject(Production)/InstallationBuildProductsLocation/Applications/MyProject.app/MyProject'

While I haven't been able to definitively identify the cause,
I believe it may be related to a similar issue reported here:

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” }

I would greatly appreciate it if you could consider making changes to the podspec.

Other references

CocoaPods/CocoaPods#10325 (comment)

https://developer.apple.com/forums/thread/733537

version

0.3.9

System Information

System:
  macOS 14.4.1 / Apple M1

Managers:
  CocoaPods:
    version: 1.15.2

IDEs:
  Xcode:
    version: 15.2

Steps to Reproduce

trying to build with XCode:
Product > Archive

@dmitriiivashko
Copy link

Fixed by #36

@neuneed
Copy link

neuneed commented May 17, 2024

Fixed by #36

@hmhv Can we merge and release this code change?

@hmhv hmhv closed this as completed in #36 May 17, 2024
@hmhv hmhv reopened this May 17, 2024
@hmhv
Copy link
Owner

hmhv commented May 17, 2024

@tmakic @dmitriiivashko @neuneed

Currently I don't use cocoapods, only SPM.
so i just merged #36, but after merge, i can't update pod info with error.
It worked with me before #36.

pod trunk push

[!] Found podspec `YoutubePlayer-in-WKWebView.podspec`
Updating spec repo `trunk`
Validating podspec
 -> YoutubePlayer-in-WKWebView (0.3.10)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | [iOS] xcodebuild:  note: Building targets in dependency order
    - NOTE  | [iOS] xcodebuild:  note: Target dependency graph (4 targets)
    - NOTE  | [iOS] xcodebuild:  error: Multiple commands produce '/Users/u1/Library/Developer/Xcode/DerivedData/App-hgmdbflozkqedggzshyecrzkybai/Build/Products/Release-iphonesimulator/YoutubePlayer-in-WKWebView/YoutubePlayer_in_WKWebView.framework/WKYTPlayerView.bundle'
    - NOTE  | [iOS] xcodebuild:  note: Target 'YoutubePlayer-in-WKWebView' (project 'Pods') has copy command from '/Users/u1/Library/Developer/Xcode/DerivedData/App-hgmdbflozkqedggzshyecrzkybai/Build/Products/Release-iphonesimulator/YoutubePlayer-in-WKWebView/WKYTPlayerView.bundle' to '/Users/u1/Library/Developer/Xcode/DerivedData/App-hgmdbflozkqedggzshyecrzkybai/Build/Products/Release-iphonesimulator/YoutubePlayer-in-WKWebView/YoutubePlayer_in_WKWebView.framework/WKYTPlayerView.bundle'
    - NOTE  | [iOS] xcodebuild:  note: Target 'YoutubePlayer-in-WKWebView' (project 'Pods') has copy command from 'YoutubePlayer-in-WKWebView/WKYTPlayerView/WKYTPlayerView.bundle' to '/Users/u1/Library/Developer/Xcode/DerivedData/App-hgmdbflozkqedggzshyecrzkybai/Build/Products/Release-iphonesimulator/YoutubePlayer-in-WKWebView/YoutubePlayer_in_WKWebView.framework/WKYTPlayerView.bundle'
    - NOTE  | [iOS] xcodebuild:  warning: duplicate output file '/Users/u1/Library/Developer/Xcode/DerivedData/App-hgmdbflozkqedggzshyecrzkybai/Build/Products/Release-iphonesimulator/YoutubePlayer-in-WKWebView/YoutubePlayer_in_WKWebView.framework/WKYTPlayerView.bundle' on task: CpResource /Users/u1/Library/Developer/Xcode/DerivedData/App-hgmdbflozkqedggzshyecrzkybai/Build/Products/Release-iphonesimulator/YoutubePlayer-in-WKWebView/YoutubePlayer_in_WKWebView.framework/WKYTPlayerView.bundle YoutubePlayer-in-WKWebView/WKYTPlayerView/WKYTPlayerView.bundle (in target 'YoutubePlayer-in-WKWebView' from project 'Pods')

[!] The spec did not pass validation, due to 1 error.
pod --version
1.15.2

so i fixed some more fb7c91b

can you check it work well? (0.3.11)

@hmhv hmhv closed this as completed May 30, 2024
@neuneed
Copy link

neuneed commented Jun 13, 2024

@hmhv Sorry for the delay, I test with #36 and it works fine. also test with your recent release: fb7c91b which is 0.3.11 also works well.

My pod version is

bundle exec pod --version
1.13.0

You can try with the old version. From I know Cocoapods 1.15 introduced a bug which break the build. So that maybe you should set you version between '>= 1.13', '< 1.15'.

Thanks for the help!

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

Successfully merging a pull request may close this issue.

4 participants