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:
parent
c515dc5748
commit
93fc5a53a6
|
@ -877,8 +877,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang);
|
std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang);
|
||||||
|
const char* attribute = (sourcecode == "file.storyboard") ?
|
||||||
fileRef->AddAttribute("explicitFileType",
|
"lastKnownFileType" :
|
||||||
|
"explicitFileType";
|
||||||
|
fileRef->AddAttribute(attribute,
|
||||||
this->CreateString(sourcecode.c_str()));
|
this->CreateString(sourcecode.c_str()));
|
||||||
|
|
||||||
// Store the file path relative to the top of the source tree.
|
// Store the file path relative to the top of the source tree.
|
||||||
|
|
Loading…
Reference in New Issue