in lib/prepare.js [681:741]
function updateBackgroundColor (cordovaProject, locations) {
const platformProjDir = path.relative(cordovaProject.root, locations.xcodeCordovaProj);
const pref = cordovaProject.projectConfig.getPreference('BackgroundColor', 'ios') || '';
const splashPref = cordovaProject.projectConfig.getPreference('SplashScreenBackgroundColor', 'ios') || pref;
const statusBarPref = cordovaProject.projectConfig.getPreference('StatusBarBackgroundColor', 'ios') || pref;
const backgroundColorDir = getBackgroundColorDir(cordovaProject.root, platformProjDir);
if (backgroundColorDir) {
const contentsJSON = {
colors: [{
idiom: 'universal',
color: colorPreferenceToComponents(pref)
}],
info: {
author: 'Xcode',
version: 1
}
};
events.emit('verbose', 'Updating Background Color color set Contents.json');
fs.writeFileSync(path.join(cordovaProject.root, backgroundColorDir, 'Contents.json'),
JSON.stringify(contentsJSON, null, 2));
}
const splashBackgroundColorDir = getSplashScreenBackgroundColorDir(cordovaProject.root, platformProjDir);
if (splashBackgroundColorDir) {
const contentsJSON = {
colors: [{
idiom: 'universal',
color: colorPreferenceToComponents(splashPref)
}],
info: {
author: 'Xcode',
version: 1
}
};
events.emit('verbose', 'Updating Splash Screen Background Color color set Contents.json');
fs.writeFileSync(path.join(cordovaProject.root, splashBackgroundColorDir, 'Contents.json'),
JSON.stringify(contentsJSON, null, 2));
}
const statusBarBackgroundColorDir = getStatusBarBackgroundColorDir(cordovaProject.root, platformProjDir);
if (statusBarBackgroundColorDir) {
const contentsJSON = {
colors: [{
idiom: 'universal',
color: colorPreferenceToComponents(statusBarPref)
}],
info: {
author: 'Xcode',
version: 1
}
};
events.emit('verbose', 'Updating Status Bar Background Color color set Contents.json');
fs.writeFileSync(path.join(cordovaProject.root, statusBarBackgroundColorDir, 'Contents.json'),
JSON.stringify(contentsJSON, null, 2));
}
}