-
-
Notifications
You must be signed in to change notification settings - Fork 320
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 new file to Xcode project #120
Comments
I think it should be |
Hey @artemnovichkov, I see your use case but I've got a few concerns regarding exposing such API:
I think if we start supporting such cases we'll most likely end up with a complex API that does a lot of things. I'm thinking if rather than going with such API we can introduce a certain level of abstraction that simplifies things a bit. I think knowing what each of those objects is, and what the properties mean is something the developer needs to know in advance, and xcproj could help with that by improving the documentation of the project and adding some examples. I'm just sharing my humble opinion, what do you think? Also, what do you think @yonaskolb, @keith and @esttorhe about this? |
I agree with @pepibumur and with @toshi0383 on this one. That being said the idea of |
I agree with you, guys. As I understand, for this case I should write a wrapper in my project to incapsulate this logic, because it's not a deal of xcproj, right? |
I also agree that simply adding extension to the project and the pbxobjects might be detrimental, as things will get complicated fast. But yes, there should definitely be a higher level API that handles this stuff. It can be in a seperate repo, but what about just a seperate module within this one. Some sort of "ProjectBuilder" (name?) |
How about XCProjFiles? |
Agree, this project needs more high level API. |
Hey @demensdeum I'm very sorry to hear that. We are open to new ideas and proposals. Don't hesitate to open an issue with your concerns and maybe a proposal of how you would like the API of |
Hi guys. I have been working on the same task over last few days and it seems to me like it's one of the basic functionalities that such project should provide, but right now it requires a lot of manual steps.
If not implemented as a convenience API in this project or any other (honestly I think doing it in another project is an overkill), there might be smaller helper methods which automate these tasks allowing necessary flexibility (like adding file reference as absolute paths or relative to group). I've submitted a PR for that (#213). Otherwise it will be beneficial for users to have this code at least as an example, along with already existing examples in README, maybe extracted to a separate doc file dedicated to such recipes. |
Hi @ilyapuchka. I personally think there's no problem in adding these convenience methods to the xcproj API. As you pointed out, having a second project for it would be a bit overkill. My concerns when it comes to adding such API is that:
Let's move the discussion to the PR. I like what you suggested about having a separate document where we can document all these recipes. |
@pepibumur please look at appsquickly/XcodeEditor, I like their API, but their project is for ObjC. |
Thanks for sharing it @demensdeum, I had no idea about that tool. Which of these convenience methods would you be interested in? If you bring them up we can discuss whether or not they'd be within the scope of the project. You are also welcome to contribute as @ilyapuchka did. We're not against having a convenient API but it needs a thoughtful discussion to prevent the project from assuming too many responsibilities. |
Context π΅οΈββοΈ
I have a clear task: create a new image and add it to Xcode project to root group
What π±
I did it with this code:
But it looks weird. What reference I should use? What does mean
sourceTree
andlastKnownFileType
? It's too complicate, I want to use something simple like:Proposal π
What do you think? Should xcproj have APIs for it?
The text was updated successfully, but these errors were encountered: