renameIOSNames function
Renames the iOS app names in the Info.plist file.
This function updates the CFBundleName and CFBundleDisplayName in the
ios/Runner/Info.plist file to match the provided config.name and config.shortName.
config - The configuration containing the new app names.
Implementation
void renameIOSNames(RenameConfig config) {
replaceInFile(
'ios/Runner/Info.plist',
RegExp(r'<key>CFBundleName</key>\s*<string>.*?</string>'),
'<key>CFBundleName</key>\n\t<string>${config.name}</string>',
);
replaceInFile(
'ios/Runner/Info.plist',
RegExp(r'<key>CFBundleDisplayName</key>\s*<string>.*?</string>'),
'<key>CFBundleDisplayName</key>\n\t<string>${config.shortName}</string>',
);
Logger.success('iOS app names updated');
}