Xcode generator: always create 'Copy Bundle Resources' phase
If creating an asset catalog from Xcode, Xcode will add it to the "Copy Bundle Reources" phase, if it exists. Since we don't always generate that phase, Xcode will silently fail with the result that the asset catalog will not take effect (no icon, launch images etc). This patch will ensure that we always create the phase (like native Xcode project does), which will fix the problem. Change-Id: Ief949d63543977f1021db992e0c41714d898e68b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
parent
dbd400b937
commit
4d8dd7f673
@ -1183,17 +1183,17 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
bundle_resources_files += keyFor(icon + ".BUILDABLE");
|
||||
}
|
||||
|
||||
if (!bundle_resources_files.isEmpty()) {
|
||||
QString grp("Copy Bundle Resources"), key = keyFor(grp);
|
||||
project->values("QMAKE_PBX_BUILDPHASES").append(key);
|
||||
t << "\t\t" << key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("files", bundle_resources_files, SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n"
|
||||
<< "\t\t};\n";
|
||||
}
|
||||
// Always add "Copy Bundle Resources" phase, even when we have no bundle
|
||||
// resources, since Xcode depends on it being there for e.g asset catalogs.
|
||||
QString grp("Copy Bundle Resources"), key = keyFor(grp);
|
||||
project->values("QMAKE_PBX_BUILDPHASES").append(key);
|
||||
t << "\t\t" << key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("files", bundle_resources_files, SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n"
|
||||
<< "\t\t};\n";
|
||||
}
|
||||
|
||||
//REFERENCE
|
||||
|
Loading…
x
Reference in New Issue
Block a user