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

Incorrect name of the target product returned from productNameWithExtension() #820

Closed
mikeger opened this issue May 5, 2024 · 6 comments · Fixed by #823
Closed

Incorrect name of the target product returned from productNameWithExtension() #820

mikeger opened this issue May 5, 2024 · 6 comments · Fixed by #823

Comments

@mikeger
Copy link
Contributor

mikeger commented May 5, 2024

Context 🕵️‍♀️

As an author of XcodeSelectiveTesting I've been trying to integrate it for fun with Wire-iOS project.

This project has several libraries, amongst those you can find WireCanvas project. This project has a target called WireCanvas that emits a framework.

What 🌱

When parsing WireCanvas project, XcodeProj is returning Canvas.framework from productNameWithExtension(). Correct name of the product is WireCanvas.framework

Proposal 🎉

I tried to fix the issue but was not sure what was causing this behavior. There must be some misconfiguration in the WireCanvas project, but from Xcode side I only see WireCanvas.framework in other project linked frameworks phase and as a product name

@kwridan
Copy link
Collaborator

kwridan commented May 7, 2024

Thanks for raising this @mikeger

Taking a look at the Wire-iOS project it seems the product name is set via build settings in the xcconfig files.

https://github.com/wireapp/wire-ios/blob/62fb71d1d648689b3cfbab4af8db730ddb3e2bf2/wire-ios-canvas/Resources/Configurations/WireCanvas.xcconfig#L22

XcodeProj only parses the xcodeproj / pbxpoj files and allows reading and setting the values there (e.g. https://github.com/wireapp/wire-ios/blob/62fb71d1d648689b3cfbab4af8db730ddb3e2bf2/wire-ios-canvas/WireCanvas.xcodeproj/project.pbxproj#L268).

Resolving build settings is a slightly more involved process and can can differ by configuration which is slightly outside the scope of the XcodeProj library :/

xcrun xcodebuild -showBuildSettings \
  -scheme SchemeName
  -workspace WorkspaceName.xcworkspace \
  -config Debug | grep PRODUCT_NAME

@mikeger
Copy link
Contributor Author

mikeger commented May 8, 2024

@kwridan thanks so much for the reply. This sounds reasonable, adding support for xcconfig resolution might be too big of a feature for a GitHub issue :)

Would it make sense to enhance the documentation for productNameWithExtension() (any other?) method so people using it would have reasonable expectations? I can propose a small change for this if you think this is appropriate.

@kwridan
Copy link
Collaborator

kwridan commented May 8, 2024

Sure that sounds like a reasonable change, this contribution would be welcome! thanks @mikeger

@mikeger
Copy link
Contributor Author

mikeger commented May 28, 2024

@kwridan I created the PR, thanks for your support.

Copy link

Hola 👋,

We want to inform you that the issue has been marked as stale. This means that there hasn't been any activity or updates on it for quite some time, and it's possible that it may no longer be relevant or actionable.
If you still believe that this issue is valid and requires attention, please provide an update or any additional information that can help us address it. Otherwise, we may consider closing it in the near future.
Thank you for your understanding.

@github-actions github-actions bot added the stale label Jun 28, 2024
Copy link

github-actions bot commented Jul 4, 2024

Hola 👋,

We want to inform you that we have decided to close this stale issue as there hasn't been any activity or response regarding it after marking it as stale.

We understand that circumstances may have changed or priorities may have shifted, and that's completely understandable. If you still believe that this issue needs to be addressed, please feel free to reopen it and provide any necessary updates or additional information.

We appreciate your understanding and look forward to your continued contributions to the project.

Thank you.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
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.

2 participants