Use XML format in PlistParser (#94863)

* Switch to use xml in PlistParser

* Review feedbacks: Change dynamic to Object, remove getValueFromFile
This commit is contained in:
Lau Ching Jun
2021-12-13 18:22:29 -08:00
committed by GitHub
parent 5691671194
commit 8186fb7435
9 changed files with 158 additions and 66 deletions

View File

@@ -180,7 +180,7 @@ class IosProject extends XcodeBasedProject {
// Try parsing the default, first.
if (defaultInfoPlist.existsSync()) {
try {
fromPlist = globals.plistParser.getValueFromFile(
fromPlist = globals.plistParser.getStringValueFromFile(
defaultHostInfoPlist.path,
PlistParser.kCFBundleIdentifierKey,
);
@@ -332,7 +332,7 @@ class IosProject extends XcodeBasedProject {
// The Info.plist file of a target contains the key WKCompanionAppBundleIdentifier,
// if it is a watchOS companion app.
if (infoFile.existsSync()) {
final String? fromPlist = globals.plistParser.getValueFromFile(infoFile.path, 'WKCompanionAppBundleIdentifier');
final String? fromPlist = globals.plistParser.getStringValueFromFile(infoFile.path, 'WKCompanionAppBundleIdentifier');
if (bundleIdentifier == fromPlist) {
return true;
}