Add observatory Bonjour service to built iOS Info.plist bundle (#65138)
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import 'utils.dart';
|
||||
|
||||
typedef SimulatorFunction = Future<void> Function(String deviceId);
|
||||
@@ -102,6 +104,40 @@ Future<bool> containsBitcode(String pathToBinary) async {
|
||||
return !emptyBitcodeMarkerFound;
|
||||
}
|
||||
|
||||
Future<bool> dartObservatoryBonjourServiceFound(String appBundlePath) async =>
|
||||
(await eval(
|
||||
'plutil',
|
||||
<String>[
|
||||
'-extract',
|
||||
'NSBonjourServices',
|
||||
'xml1',
|
||||
'-o',
|
||||
'-',
|
||||
path.join(
|
||||
appBundlePath,
|
||||
'Info.plist',
|
||||
),
|
||||
],
|
||||
canFail: true,
|
||||
)).contains('_dartobservatory._tcp');
|
||||
|
||||
Future<bool> localNetworkUsageFound(String appBundlePath) async =>
|
||||
await exec(
|
||||
'plutil',
|
||||
<String>[
|
||||
'-extract',
|
||||
'NSLocalNetworkUsageDescription',
|
||||
'xml1',
|
||||
'-o',
|
||||
'-',
|
||||
path.join(
|
||||
appBundlePath,
|
||||
'Info.plist',
|
||||
),
|
||||
],
|
||||
canFail: true,
|
||||
) == 0;
|
||||
|
||||
/// Creates and boots a new simulator, passes the new simulator's identifier to
|
||||
/// `testFunction`.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user