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 Compiler Flag? #15

Open
robochase6000 opened this issue Feb 18, 2015 · 1 comment
Open

Add Compiler Flag? #15

robochase6000 opened this issue Feb 18, 2015 · 1 comment

Comments

@robochase6000
Copy link

I noticed this function in PBXBuildFile.cs
public bool AddCompilerFlag( string flag )

and I've spent the better part of a day trying to figure out how to use XCodeEditor-for-Unity to add a compile flag to a list of files, but I'm not sure about the best way to do it.

What is the preferred way to do it? Sorry if this isn't the best channel to ask this question.

@robochase6000
Copy link
Author

Well, I was able to figure this out.

If anyone stumbles upon this, my solution was to have PBXBuildFile hang onto the PBXFileReference that's passed into the constructor. Then, when you're applying the XcMod, you look through the list of buildFiles and compare its PBXFileReference's file name to whatever file name you want to add the compiler flag to, and call AddCompilerFlag on it.

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