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 855e8759fd
commit 2d23c1f177
1 changed files with 4 additions and 1 deletions

View File

@ -876,7 +876,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
else
{
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()));
}