krzyzanowskim / Natalie

Natalie - Storyboard Code Generator (for Swift)
http://blog.krzyzanowskim.com/2015/04/15/natalie-storyboard-code-generator/
MIT License
1.17k stars 74 forks source link

Have Natalie be smart about targets in xcodeproj #64

Open hartbit opened 9 years ago

hartbit commented 9 years ago

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.

krzyzanowskim commented 9 years ago

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

phimage commented 7 years ago

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