Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

XcodeCapp and duplicated source files #1866

Closed
raresp opened this Issue · 5 comments

3 participants

@raresp

Screen Shot 2013-03-19 at 1 13 04 PM
XcodeCapp duplicates source files when using Xcode to edit them.
I personally use Xcode to edit .j files and this causes situation like in the screenshot attached.

A solution might be to add the line

remove_file(project, shadowGroup, sourceGroup, shadowHeaderFilePath, shadowImplementationFilePath, sourceFilePath, projectBaseURL)

in pbxProjModifier.py line 54 or to ideally check the existence of that file before adding it.

@ahankinson

I think it's a bug with Xcode, not XCC. Could you confirm that you just have one file in your source directory? I just replicated this behaviour, and while it shows up as multiple files in Xcode, there's still only one source file.

@cappbot
Collaborator

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

@ahankinson

-#new
+#needs-info
+Tools
+bug

@cappbot
Collaborator

Milestone: Someday. Labels: #needs-info, bug, tools. What's next? Additional information should be added as a comment to this isuse.

@raresp

Yes, I have only one source file and as it's being modified it appears repeatedly in the xcode project Sources group.
The addition of the line suggested above fixes everything.

@primalmotion primalmotion closed this issue from a commit
@ahankinson ahankinson Fixed: XCodeCapp adding duplicate files to Xcode project
Previously, XCC would indiscriminately add files to the Xcode project via the pbxprojModifier.py script. This resulted in duplicate references to a file.

This fix adds a check to see if the file is already included in the project's sourceGroup folder, and will return None if it is.

Fixes #1866
5c3adfd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.