Aviator
Aviator copied to clipboard
Shortcut not working for swift files
I have files in my project called Form.swift and FormTests.swift. Pressing the keyboard shortcut Cmd + Shift + T does nothing. Doing this in an Objective C project works fine.
Just tested it, "cmd + shift + T" do the TestSwift.swift -> TestSwiftTests.swift, but do not came back to TestSwift.swift
Edit : still using xcode 6.4
Ok, found why :
On "back to code cmd+shift+t", the sourceFile is used, while swift file is in headerFile :
[[self XcodeNavigatorClassSeam] jumpToFileURL:[NSURL fileURLWithPath:referenceCollection.sourceFile.absolutePath]];
Quick fix :
if( referenceCollection.sourceFile.absolutePath ) {
[[self XcodeNavigatorClassSeam] jumpToFileURL:[NSURL fileURLWithPath:referenceCollection.sourceFile.absolutePath]];
} else {
[[self XcodeNavigatorClassSeam] jumpToFileURL:[NSURL fileURLWithPath:referenceCollection.headerFile.absolutePath]];
}