[tools]build IPA validation bundle identifier using the default "com.example" prefix (#116430)
* [tools]build IPA validation bundle identifier using default com.example * rephrase the warning
This commit is contained in:
@@ -350,6 +350,10 @@ class BuildIOSArchiveCommand extends _BuildIOSSubCommand {
|
||||
if (xcodeProjectSettingsMap.values.any((String? element) => element == null)) {
|
||||
messageBuffer.writeln('\nYou must set up the missing settings.');
|
||||
}
|
||||
|
||||
if (xcodeProjectSettingsMap['Bundle Identifier']?.startsWith('com.example') ?? false) {
|
||||
messageBuffer.writeln('\nWarning: Your application still contains the default "com.example" bundle identifier.');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -740,13 +740,6 @@ bool _handleIssues(XCResult? xcResult, Logger logger, XcodeBuildExecution? xcode
|
||||
logger.printError("Also try selecting 'Product > Build' to fix the problem.");
|
||||
}
|
||||
|
||||
if (!issueDetected && _needUpdateSigningIdentifier(xcodeBuildExecution)) {
|
||||
issueDetected = true;
|
||||
logger.printError('');
|
||||
logger.printError('It appears that your application still contains the default signing identifier.');
|
||||
logger.printError("Try replacing 'com.example' with your signing id in Xcode:");
|
||||
logger.printError(' open ios/Runner.xcworkspace');
|
||||
}
|
||||
return issueDetected;
|
||||
}
|
||||
|
||||
@@ -760,13 +753,6 @@ bool _missingDevelopmentTeam(XcodeBuildExecution? xcodeBuildExecution) {
|
||||
xcodeBuildExecution.buildSettings.containsKey);
|
||||
}
|
||||
|
||||
// Return `true` if the signing identifier needs to be updated.
|
||||
bool _needUpdateSigningIdentifier(XcodeBuildExecution? xcodeBuildExecution) {
|
||||
return xcodeBuildExecution != null
|
||||
&& xcodeBuildExecution.environmentType == EnvironmentType.physical
|
||||
&& (xcodeBuildExecution.buildSettings['PRODUCT_BUNDLE_IDENTIFIER']?.contains('com.example') ?? false);
|
||||
}
|
||||
|
||||
// Detects and handles errors from stdout.
|
||||
//
|
||||
// As detecting issues in stdout is not usually accurate, this should be used as a fallback when other issue detecting methods failed.
|
||||
|
||||
Reference in New Issue
Block a user