Opening an Xcode project from the terminal is easy:
open Foo.xcodeproj/
But that just opens the project and resumes its previous state using UserInterfaceState.xcuserstate - so it just opens to the last active file you were editing.
Is there a way to open an Xcode project and specify which file it should open to?
What I've tried:
- Editing
.xcuserstate- nightmare, don't do it. - Running
open Foo/Foo.xcodeproj/thenopen Foo/Sources/main.swiftwhich works some of the time, but not always. (If you just generated the project and do this, it'll open the project, then in a separate window it'll open the file.)
Any other ideas?