tomlokhorst / XcodeEdit

Swift library for reading and writing Xcode project files in OpenStep format
MIT License
206 stars 38 forks source link

Crash If SourceTree contains Path with "SRCROOT" #25

Closed dfleming closed 7 years ago

dfleming commented 7 years ago

Our project file uses SRCROOT in some paths and when the SourceTree is built up, the SourceTreeFolder is unable to recognize the SRCROOT variable and returns nil instead of .sourceRoot. enum type.

The PBXReference object has a lazy var that performs a force unwrap which with a SourceTree thats nil, crashes.

dfleming commented 7 years ago

On closer inspection, this is likely an issue with our project file, closing

tomlokhorst commented 7 years ago

Just to note: The next version of XcodeEdit (currently in the release/2.0 branch), shouldn't crash anymore, even on broken project files. It has a lot more optionals and no force unwraps.

dfleming commented 7 years ago

Thanks for the update @tomlokhorst, great to hear!