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

Add support for PBXBuildStyle #688

Closed
Bigpet opened this issue Jun 10, 2022 · 2 comments
Closed

Add support for PBXBuildStyle #688

Bigpet opened this issue Jun 10, 2022 · 2 comments

Comments

@Bigpet
Copy link

Bigpet commented Jun 10, 2022

Context 🕵️‍♀️

I was trying to use Xcodegen to reference a target inside a xcode project generated by cmake.

/* Begin PBXBuildStyle section */
		C3A1C34E5D9A41E99812FB9C /* Release */ = {
			isa = PBXBuildStyle;
			buildSettings = {
				COPY_PHASE_STRIP = NO;
			};
			name = Release;
		};
/* End PBXBuildStyle section */

Later on used in

/* Begin PBXProject section */
		5F89BF4899BD4F768A3616BC /* Project object */ = {
			isa = PBXProject;
			attributes = {
				BuildIndependentTargetsInParallel = YES;
				LastUpgradeCheck = 1340;
			};
			buildConfigurationList = A855B1006B43451EBA296B88 /* Build configuration list for PBXProject "myproj" */;
			buildSettings = {
			};
			buildStyles = (
				C3A1C34E5D9A41E99812FB9C /* Release */,
			);

What 🌱

It could not add a target from the cmake generated xcodeproj as a dependency and just returned the error "The element PBXBuildStyle is not supported."

Proposal 🎉

This element seems like it's the base of XCConfigurationList which is supported, so this element might be able to be handled similarly.

@Bigpet
Copy link
Author

Bigpet commented Jun 10, 2022

this seems related: CocoaPods/CocoaPods#6325

And they appear to mostly blame cmake as the culprit.

In case anyone lands here via google, I used this script from here before the initial generation to make it work. If CMake overwrites it again, it still works until you try to use xcodegen again: https://gist.github.com/Bigpet/9c8f950aa5dd3ad99923d4d98cf87209

@Bigpet
Copy link
Author

Bigpet commented Jun 14, 2022

I got my issue solved by editing the *.xcodeproj file. While I can't find any Reference to the element being "deprecated" or "outdated" officially. Apparently it's just accepted that if the XCode UI of newer versions doesn't generate an element, it's de-facto "outdated".

@Bigpet Bigpet closed this as completed Jun 14, 2022
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

No branches or pull requests

1 participant