Xcode: Fix storyboard view

Since commit 56831461 (Xcode: Use explicitFileType to mark source types,
2013-04-16) the Xcode generator prefers to use explicitFileType to tell
Xcode about each source file type.  This works better than
lastKnownFileType for some file types, but not for "file.storyboard".

If storyboard file has attribute 'explicitFileType' it is displayed
incorrectly (as raw xml).  Switch it back to 'lastKnownFileType'.
This commit is contained in:
Ruslan Baratov 2014-01-07 22:52:42 +04:00 committed by Brad King
parent c515dc5748
commit 93fc5a53a6
1 changed files with 4 additions and 2 deletions

View File

@ -877,8 +877,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
}
std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang);
fileRef->AddAttribute("explicitFileType",
const char* attribute = (sourcecode == "file.storyboard") ?
"lastKnownFileType" :
"explicitFileType";
fileRef->AddAttribute(attribute,
this->CreateString(sourcecode.c_str()));
// Store the file path relative to the top of the source tree.