Fix watchOS build when companion app is configured with xcode variable (#84519)
This commit is contained in:
@@ -697,6 +697,24 @@ apply plugin: 'kotlin-android'
|
||||
XcodeProjectInterpreter: () => mockXcodeProjectInterpreter,
|
||||
FlutterProjectFactory: () => flutterProjectFactory,
|
||||
});
|
||||
|
||||
testUsingContext('has watch companion with build settings', () async {
|
||||
final FlutterProject project = await someProject();
|
||||
project.ios.xcodeProject.createSync();
|
||||
mockXcodeProjectInterpreter.buildSettings = <String, String>{
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'io.flutter.someProject',
|
||||
};
|
||||
project.ios.hostAppRoot.childDirectory('WatchTarget').childFile('Info.plist').createSync(recursive: true);
|
||||
testPlistParser.setProperty('WKCompanionAppBundleIdentifier', r'$(PRODUCT_BUNDLE_IDENTIFIER)');
|
||||
|
||||
expect(await project.ios.containsWatchCompanion(<String>['WatchTarget'], null), isTrue);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fs,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
PlistParser: () => testPlistParser,
|
||||
XcodeProjectInterpreter: () => mockXcodeProjectInterpreter,
|
||||
FlutterProjectFactory: () => flutterProjectFactory,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user