Error message for unregistered phone (#12911)
This commit is contained in:
@@ -354,9 +354,11 @@ Future<XcodeBuildResult> buildXcodeProject({
|
||||
Future<Null> diagnoseXcodeBuildFailure(XcodeBuildResult result, BuildableIOSApp app) async {
|
||||
if (result.xcodeBuildExecution != null &&
|
||||
result.xcodeBuildExecution.buildForPhysicalDevice &&
|
||||
result.stdout?.contains('BCEROR') == true &&
|
||||
// May need updating if Xcode changes its outputs.
|
||||
result.stdout?.contains('Xcode couldn\'t find a provisioning profile matching') == true) {
|
||||
((result.stdout?.contains('BCEROR') == true &&
|
||||
// May need updating if Xcode changes its outputs.
|
||||
result.stdout?.contains('Xcode couldn\'t find a provisioning profile matching') == true)
|
||||
// Error message from ios-deploy for missing provisioning profile.
|
||||
|| result.stdout?.contains('0xe8008015') == true)) {
|
||||
printError(noProvisioningProfileInstruction, emphasis: true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -311,6 +311,33 @@ Xcode's output:
|
||||
|
||||
Could not build the precompiled application for the device.
|
||||
|
||||
Error launching application on iPhone.''',
|
||||
xcodeBuildExecution: new XcodeBuildExecution(
|
||||
<String>['xcrun', 'xcodebuild', 'blah'],
|
||||
'/blah/blah',
|
||||
buildForPhysicalDevice: true
|
||||
),
|
||||
);
|
||||
|
||||
await diagnoseXcodeBuildFailure(buildResult, app);
|
||||
expect(
|
||||
testLogger.errorText,
|
||||
contains('No Provisioning Profile was found for your project\'s Bundle Identifier or your device.'),
|
||||
);
|
||||
});
|
||||
|
||||
testUsingContext('No ios-deploy provisioning profile shows message', () async {
|
||||
final XcodeBuildResult buildResult = new XcodeBuildResult(
|
||||
success: false,
|
||||
stdout: '''
|
||||
Launching lib/main.dart on iPhone in debug mode...
|
||||
Signing iOS app for device deployment using developer identity: "iPhone Developer: test@flutter.io (1122334455)"
|
||||
Running Xcode build... 1.3s
|
||||
Installing on iPhone...
|
||||
|
||||
ios-deploy[75050:1892997] [ !! ] Error 0xe8008015: A valid provisioning profile for this executable was not found. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
|
||||
Could not install build/ios/iphoneos/Runner.app on 7233072bb988fb4c64429a4d9a092295f9423892.
|
||||
|
||||
Error launching application on iPhone.''',
|
||||
xcodeBuildExecution: new XcodeBuildExecution(
|
||||
<String>['xcrun', 'xcodebuild', 'blah'],
|
||||
|
||||
Reference in New Issue
Block a user