Commit 94959a34 authored by jslavitz's avatar jslavitz Committed by Ian Hickson

Fixed code sign error message width (#19026)

* Fixed codesign error message width

* Fixed mac_test

* Removed snackbar code
parent 418b1535
...@@ -17,63 +17,67 @@ import '../globals.dart'; ...@@ -17,63 +17,67 @@ import '../globals.dart';
/// ///
/// The user likely never did any iOS development. /// The user likely never did any iOS development.
const String noCertificatesInstruction = ''' const String noCertificatesInstruction = '''
═══════════════════════════════════════════════════════════════════════════════════ ════════════════════════════════════════════════════════════════════════════════
No valid code signing certificates were found No valid code signing certificates were found
You can connect to your Apple Developer account by signing in with your Apple ID in Xcode You can connect to your Apple Developer account by signing in with your Apple ID
and create an iOS Development Certificate as well as a Provisioning Profile for your project by: in Xcode and create an iOS Development Certificate as well as a Provisioning
Profile for your project by:
$fixWithDevelopmentTeamInstruction $fixWithDevelopmentTeamInstruction
5- Trust your newly created Development Certificate on your iOS device 5- Trust your newly created Development Certificate on your iOS device
via Settings > General > Device Management > [your new certificate] > Trust via Settings > General > Device Management > [your new certificate] > Trust
For more information, please visit: For more information, please visit:
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html https://developer.apple.com/library/content/documentation/IDEs/Conceptual/
AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
Or run on an iOS simulator without code signing Or run on an iOS simulator without code signing
═══════════════════════════════════════════════════════════════════════════════════'''; ════════════════════════════════════════════════════════════════════════════════''';
/// User message when there are no provisioning profile for the current app bundle identifier. /// User message when there are no provisioning profile for the current app bundle identifier.
/// ///
/// The user did iOS development but never on this project and/or device. /// The user did iOS development but never on this project and/or device.
const String noProvisioningProfileInstruction = ''' const String noProvisioningProfileInstruction = '''
═══════════════════════════════════════════════════════════════════════════════════ ════════════════════════════════════════════════════════════════════════════════
No Provisioning Profile was found for your project's Bundle Identifier or your device. No Provisioning Profile was found for your project's Bundle Identifier or your
You can create a new Provisioning Profile for your project in Xcode for your device. You can create a new Provisioning Profile for your project in Xcode for
team by: your team by:
$fixWithDevelopmentTeamInstruction $fixWithDevelopmentTeamInstruction
It's also possible that a previously installed app with the same Bundle Identifier was It's also possible that a previously installed app with the same Bundle
signed with a different certificate. Identifier was signed with a different certificate.
For more information, please visit: For more information, please visit:
https://flutter.io/setup/#deploy-to-ios-devices https://flutter.io/setup/#deploy-to-ios-devices
Or run on an iOS simulator without code signing Or run on an iOS simulator without code signing
═══════════════════════════════════════════════════════════════════════════════════'''; ════════════════════════════════════════════════════════════════════════════════''';
/// Fallback error message for signing issues. /// Fallback error message for signing issues.
/// ///
/// Couldn't auto sign the app but can likely solved by retracing the signing flow in Xcode. /// Couldn't auto sign the app but can likely solved by retracing the signing flow in Xcode.
const String noDevelopmentTeamInstruction = ''' const String noDevelopmentTeamInstruction = '''
═══════════════════════════════════════════════════════════════════════════════════ ════════════════════════════════════════════════════════════════════════════════
Building a deployable iOS app requires a selected Development Team with a Provisioning Profile Building a deployable iOS app requires a selected Development Team with a
Please ensure that a Development Team is selected by: Provisioning Profile. Please ensure that a Development Team is selected by:
$fixWithDevelopmentTeamInstruction $fixWithDevelopmentTeamInstruction
For more information, please visit: For more information, please visit:
https://flutter.io/setup/#deploy-to-ios-devices https://flutter.io/setup/#deploy-to-ios-devices
Or run on an iOS simulator without code signing Or run on an iOS simulator without code signing
═══════════════════════════════════════════════════════════════════════════════════'''; ════════════════════════════════════════════════════════════════════════════════''';
const String fixWithDevelopmentTeamInstruction = ''' const String fixWithDevelopmentTeamInstruction = '''
1- Open the Flutter project's Xcode target with 1- Open the Flutter project's Xcode target with
open ios/Runner.xcworkspace open ios/Runner.xcworkspace
2- Select the 'Runner' project in the navigator then the 'Runner' target 2- Select the 'Runner' project in the navigator then the 'Runner' target
in the project settings in the project settings
3- In the 'General' tab, make sure a 'Development Team' is selected. You may need to 3- In the 'General' tab, make sure a 'Development Team' is selected.
You may need to:
- Log in with your Apple ID in Xcode first - Log in with your Apple ID in Xcode first
- Ensure you have a valid unique Bundle ID - Ensure you have a valid unique Bundle ID
- Register your device with your Apple Developer Account - Register your device with your Apple Developer Account
- Let Xcode automatically provision a profile for your app - Let Xcode automatically provision a profile for your app
4- Build or run your project again'''; 4- Build or run your project again''';
final RegExp _securityFindIdentityDeveloperIdentityExtractionPattern = final RegExp _securityFindIdentityDeveloperIdentityExtractionPattern =
new RegExp(r'^\s*\d+\).+"(.+Developer.+)"$'); new RegExp(r'^\s*\d+\).+"(.+Developer.+)"$');
final RegExp _securityFindIdentityCertificateCnExtractionPattern = new RegExp(r'.*\(([a-zA-Z0-9]+)\)'); final RegExp _securityFindIdentityCertificateCnExtractionPattern = new RegExp(r'.*\(([a-zA-Z0-9]+)\)');
......
...@@ -270,7 +270,7 @@ Error launching application on iPhone.''', ...@@ -270,7 +270,7 @@ Error launching application on iPhone.''',
await diagnoseXcodeBuildFailure(buildResult); await diagnoseXcodeBuildFailure(buildResult);
expect( expect(
testLogger.errorText, testLogger.errorText,
contains('No Provisioning Profile was found for your project\'s Bundle Identifier or your device.'), contains('No Provisioning Profile was found for your project\'s Bundle Identifier or your \ndevice.'),
); );
}); });
...@@ -351,7 +351,7 @@ Could not build the precompiled application for the device.''', ...@@ -351,7 +351,7 @@ Could not build the precompiled application for the device.''',
await diagnoseXcodeBuildFailure(buildResult); await diagnoseXcodeBuildFailure(buildResult);
expect( expect(
testLogger.errorText, testLogger.errorText,
contains('Building a deployable iOS app requires a selected Development Team with a Provisioning Profile'), contains('Building a deployable iOS app requires a selected Development Team with a \nProvisioning Profile.'),
); );
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment