Skip to content

Commit 2f9c7b1

Browse files
authored
[devicelab] Fix Mac ios_universal_link_test CI build and scheme configuration (flutter#192321)
The `ios_universal_link_test` devicelab task introduced in flutter#191443 failed in post-submit CI during `flutter build ios --simulator` with "No Xcode build settings have been found." On headless CI bots that lack developer provisioning profiles, physical device code signing specifiers in `project.pbxproj` prevented Xcode from querying build settings. In addition, running a full simulator build prior to `runXcodeTests` triggered redundant code signing evaluations on bots without codesigning support. This fixes the failure by removing the `PROVISIONING_PROFILE_SPECIFIER` properties from `project.pbxproj` and building with `--config-only` during the task's preliminary Flutter build step, matching the pattern in `native_platform_view_ui_tests_ios`. It also sets `deviceOperatingSystem = DeviceOperatingSystem.ios` for proper Devicelab device handling, updates `Runner.xcscheme` to reference `RunnerUITests` under Debug configuration, wires up the missing target dependency in `project.pbxproj`, and simplifies `setUpWithError` in `RunnerUITests.swift`. Fixes flutter#192320 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [ ] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
1 parent 74b0fcd commit 2f9c7b1

4 files changed

Lines changed: 35 additions & 24 deletions

File tree

‎dev/devicelab/bin/tasks/ios_universal_link_test.dart‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@
44

55
import 'dart:async';
66

7+
import 'package:flutter_devicelab/framework/devices.dart';
78
import 'package:flutter_devicelab/framework/framework.dart';
89
import 'package:flutter_devicelab/framework/ios.dart';
910
import 'package:flutter_devicelab/framework/task_result.dart';
1011
import 'package:flutter_devicelab/framework/utils.dart';
1112
import 'package:path/path.dart' as path;
1213

1314
Future<void> main() async {
15+
deviceOperatingSystem = DeviceOperatingSystem.ios;
1416
await task(() async {
1517
TaskResult? result;
18+
String? simulatorDeviceId;
1619

17-
await testWithNewIOSSimulator('UniversalLinkTestSim', (String deviceId) async {
18-
try {
20+
try {
21+
await testWithNewIOSSimulator('UniversalLinkTestSim', (String deviceId) async {
22+
simulatorDeviceId = deviceId;
1923
Future<bool> buildAndTestApp(String projectName) async {
2024
section('Building and testing $projectName');
2125
final String projectDir = path.join(
@@ -26,20 +30,17 @@ Future<void> main() async {
2630
);
2731

2832
await inDirectory(projectDir, () async {
29-
await flutter('build', options: <String>['ios', '--simulator']);
33+
await flutter('build', options: <String>['ios', '-v', '--simulator', '--config-only']);
3034
});
3135

3236
final String iosDir = path.join(projectDir, 'ios');
33-
final String buildDir = path.join(projectDir, 'build', 'ios');
3437

3538
return runXcodeTests(
3639
platformDirectory: iosDir,
3740
destination: 'id=$deviceId',
3841
testName: projectName,
3942
configuration: 'Debug',
40-
scheme: 'RunnerUITests',
4143
skipCodesign: true,
42-
extraOptions: <String>['SYMROOT=$buildDir'],
4344
);
4445
}
4546

@@ -49,10 +50,10 @@ Future<void> main() async {
4950
} else {
5051
result = TaskResult.failure('ios_universal_link test failed');
5152
}
52-
} finally {
53-
await removeIOSSimulator(deviceId);
54-
}
55-
});
53+
});
54+
} finally {
55+
await removeIOSSimulator(simulatorDeviceId);
56+
}
5657

5758
return result ?? TaskResult.failure('Test failed to set a result');
5859
});

‎dev/integration_tests/ios_universal_link/ios/Runner.xcodeproj/project.pbxproj‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
/* End PBXBuildFile section */
2121

2222
/* Begin PBXContainerItemProxy section */
23+
214A66A30B4D23EBB1BF888E /* PBXContainerItemProxy */ = {
24+
isa = PBXContainerItemProxy;
25+
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
26+
proxyType = 1;
27+
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
28+
remoteInfo = Runner;
29+
};
2330
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
2431
isa = PBXContainerItemProxy;
2532
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
@@ -179,6 +186,7 @@
179186
buildRules = (
180187
);
181188
dependencies = (
189+
214A66A40B4D23EBB1BF888E /* PBXTargetDependency */,
182190
);
183191
name = RunnerUITests;
184192
productName = RunnerUITests;
@@ -232,6 +240,10 @@
232240
LastUpgradeCheck = 1510;
233241
ORGANIZATIONNAME = "";
234242
TargetAttributes = {
243+
214A669F0B4D23EBB1BF888E = {
244+
CreatedOnToolsVersion = 15.1;
245+
TestTargetID = 97C146ED1CF9000F007C117D;
246+
};
235247
331C8080294A63A400263BE5 = {
236248
CreatedOnToolsVersion = 14.0;
237249
TestTargetID = 97C146ED1CF9000F007C117D;
@@ -354,6 +366,11 @@
354366
/* End PBXSourcesBuildPhase section */
355367

356368
/* Begin PBXTargetDependency section */
369+
214A66A40B4D23EBB1BF888E /* PBXTargetDependency */ = {
370+
isa = PBXTargetDependency;
371+
target = 97C146ED1CF9000F007C117D /* Runner */;
372+
targetProxy = 214A66A30B4D23EBB1BF888E /* PBXContainerItemProxy */;
373+
};
357374
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
358375
isa = PBXTargetDependency;
359376
target = 97C146ED1CF9000F007C117D /* Runner */;
@@ -468,8 +485,6 @@
468485
);
469486
PRODUCT_BUNDLE_IDENTIFIER = com.google.experimental0.dev;
470487
PRODUCT_NAME = "$(TARGET_NAME)";
471-
PROVISIONING_PROFILE_SPECIFIER = "";
472-
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Experimental App 0 Dev";
473488
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
474489
SWIFT_VERSION = 5.0;
475490
VERSIONING_SYSTEM = "apple-generic";
@@ -670,8 +685,6 @@
670685
);
671686
PRODUCT_BUNDLE_IDENTIFIER = com.google.experimental0.dev;
672687
PRODUCT_NAME = "$(TARGET_NAME)";
673-
PROVISIONING_PROFILE_SPECIFIER = "";
674-
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Experimental App 0 Dev";
675688
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
676689
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
677690
SWIFT_VERSION = 5.0;
@@ -700,8 +713,6 @@
700713
);
701714
PRODUCT_BUNDLE_IDENTIFIER = com.google.experimental0.dev;
702715
PRODUCT_NAME = "$(TARGET_NAME)";
703-
PROVISIONING_PROFILE_SPECIFIER = "";
704-
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Experimental App 0 Dev";
705716
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
706717
SWIFT_VERSION = 5.0;
707718
VERSIONING_SYSTEM = "apple-generic";

‎dev/integration_tests/ios_universal_link/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,23 @@
3939
</MacroExpansion>
4040
<Testables>
4141
<TestableReference
42-
skipped = "NO"
43-
parallelizable = "YES">
42+
skipped = "NO">
4443
<BuildableReference
4544
BuildableIdentifier = "primary"
46-
BlueprintIdentifier = "331C8080294A63A400263BE5"
47-
BuildableName = "RunnerTests.xctest"
48-
BlueprintName = "RunnerTests"
45+
BlueprintIdentifier = "214A669F0B4D23EBB1BF888E"
46+
BuildableName = "RunnerUITests.xctest"
47+
BlueprintName = "RunnerUITests"
4948
ReferencedContainer = "container:Runner.xcodeproj">
5049
</BuildableReference>
5150
</TestableReference>
5251
</Testables>
5352
</TestAction>
5453
<LaunchAction
55-
buildConfiguration = "Profile"
54+
buildConfiguration = "Debug"
5655
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5756
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
5857
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
59-
launchStyle = "1"
58+
launchStyle = "0"
6059
useCustomWorkingDirectory = "NO"
6160
ignoresPersistentStateOnLaunch = "NO"
6261
debugDocumentVersioning = "YES"

‎dev/integration_tests/ios_universal_link/ios/RunnerUITests/RunnerUITests.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import XCTest
66

77
class RunnerUITests: XCTestCase {
88

9-
override func setUpWithError() throws {
9+
override func setUp() {
1010
continueAfterFailure = false
1111
}
1212

0 commit comments

Comments
 (0)