Generate file if missing?
Hi, wondering if it would be hard or if you've considered adding functionality so that if no associated test file or spec was found, it'd create it for you? Like if I try to switch to the test file for
FooBar.swift but it doesn't exist, it'll create the empty FooBarTests.swift test file.
Thanks, it is a pretty great idea! To introduce the feature, there are some issues...
- which directory to create
FoobarTests.swift- with selection dialog?
- how to import the file to Xcode
- there is no standard api for!
- second best way should be using https://github.com/CocoaPods/Xcodeproj
Both they are technical challenge for me. I will look into it in a month!
how to import the file to Xcode
xcode-project-manager/xcodeproj has a nice and simple API for that purpose.
https://github.com/xcode-project-manager/xcodeproj/blob/0c6ac2c4c5ada36639cf2f3748c904ee757377d0/Sources/xcodeproj/PBXGroup.swift#L139
Maybe I will add that feature to https://github.com/toshi0383/hackscode . Let's see..