Natalie icon indicating copy to clipboard operation
Natalie copied to clipboard

Have Natalie be smart about targets in xcodeproj

Open hartbit opened this issue 9 years ago • 2 comments

One feature request I'd like is for Natalie to allow an xcodeproj file as argument, parse it to find out which storyboards are included in which targets and generate a Storyboards.swift for each target. Like that, if the project has storyboards in an app target and in an extension target, Natalie will generate a separate file to include in each target that only makes the targets storyboards visible. It will also solve name collisions when targets have storyboards with the same name.

As a side note, I'm currently implementing this by wrapping Natalie around a ruby script which parses an xcodeproj file with the Xcodeproj gem (which came out of the Cocoapods project) and feeds Storyboard files to natalie. Unfortunately, there doesn't seem to be equally good Xcodeproj parsing libs in Swift.

hartbit avatar Aug 05 '15 11:08 hartbit

Carthage is doing something like this. It's not impossible to do, as xcode project syntax is not that magic.

krzyzanowskim avatar Aug 05 '15 11:08 krzyzanowskim

Documentation about xcode project format

http://www.monobjc.net/xcode-project-file-format.html : here a list of elements http://danwright.info/blog/2010/10/xcode-pbxproject-files/ https://github.com/apple/swift-package-manager/tree/master/Sources/Xcodeproj

swift library

https://github.com/phimage/XcodeProjKit/ (mine) https://github.com/xcodeswift/xcproj https://github.com/yonaskolb/XcodeGen

phimage avatar Oct 17 '17 11:10 phimage