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

.bundle explicitFileType corrected #563

Merged
merged 2 commits into from
Aug 18, 2020

Conversation

adamkhazi
Copy link
Contributor

Resolves #562

Short description 📝

Adding a bundle in Xcode 12 Beta 2 and Xcode 11.5 will add a .bundle reference under the Products folder. This reference in the .pbxproj will have explicitFileType = wrapper.cfbundle. Tuist will use Xcode.swift and set the value of explicitFileType to the wrong value.

Solution 📦

Correct the value for "bundle" in Xcode.swift to use wrapper.cfbundle which mimics the behaviour of Xcode 12 Beta 2 and Xcode 11.5.

Copy link
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @adamkhazi. Thanks for adding this to the project. Since this is a breaking change, I'm thinking we could extend the fileType to support passing the Xcode version being used:

filetype(extension: String, xcodeVerison: Version) -> String?

That way, consumers of the library could get the right extension for the version of Xcode they are using xcodeproj with. If don't do this we'll have to mark this change as breaking, and release a major version of the library.

@adamkhazi
Copy link
Contributor Author

Hey @pepibumur could I get some clarification as to why this is a breaking change? I am happy to make the changes you suggested.

@pepicrft
Copy link
Contributor

Hey @pepibumur could I get some clarification as to why this is a breaking change? I am happy to make the changes you suggested.

Sure, if I'm not wrong, the explicitFileType for bundles has changed in Xcode 12. If we merge this change, and someone uses the latest version of the library to lets say, generate projects, the generated projects might not be compatible with Xcode 11 because bundles will have the explicitFileType that Xcode 12 expects.

Correct me if I'm wrong, I might be missing some details.

@adamkhazi
Copy link
Contributor Author

Thanks for the reply @pepibumur

The .bundle references in the .pbxproj from Xcode 11.1, 11.5, 12 Beta 2, 12 Beta 3 in my tests have had explicitFileType = wrapper.cfbundle when I added a bundle manually through the Xcode UI.

I also tested adding a bundle in Xcode 12 Beta 3 and opening it in Xcode 11.5 and saw no problems.

@adamkhazi adamkhazi requested a review from pepicrft July 30, 2020 11:53
Copy link
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case it seems all good. Let's merge the PR :)

@pepicrft pepicrft merged commit f54ce91 into tuist:master Aug 18, 2020
@adamkhazi adamkhazi deleted the bundle-explicittype branch August 19, 2020 08:14
@pepicrft
Copy link
Contributor

@all-contributors add @adamkhazi for maintenance

@allcontributors
Copy link
Contributor

@pepibumur

I've put up a pull request to add @adamkhazi! 🎉

elliottwilliams added a commit to elliottwilliams/XcodeGen that referenced this pull request Nov 23, 2020
They changed because of a bugfix in XcodeProj: tuist/XcodeProj#563
yonaskolb pushed a commit to yonaskolb/XcodeGen that referenced this pull request Nov 24, 2020
* Bump XcodeProj and Spectre

* Add LinuxMain.swift

* Linux test fixups

* Add CI job for ubuntu-latest

* Use URLs in glob logic to avoid Linux/Mac foundation inconsistencies

* fatalError when --enable-test-discovery is not used

* Update fixtures

They changed because of a bugfix in XcodeProj: tuist/XcodeProj#563

* Update CHANGELOG.md
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 this pull request may close these issues.

.bundle explicitFileType Wrong in .pbxproj
2 participants