flutter / flutter/flutter

[ios][tools] Do not add duplicate bonjour services to Info.plist

Open
#173,057 2 comments 0 reactions 0 assignees View on GitHub
P2 platform-ios team-ios tool triaged-ios
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

I was just reading the code, and there is a logic error here:

https://github.com/flutter/flutter/blob/5b78ecca51f0f37ce2ac2deec77cb8473b8a9e58/packages/flutter_tools/bin/xcode_backend.dart#L419-L435

If the bonjour services is already setup properly, we shouldn't add duplicate `_dartVmService._tcp` entry to it.

### Expected results

No duplicate entries in bonjour services

### Actual results

I wrote a simple test and got duplicate values:

```
'\tNSBonjourServices\n'
'\t\n'
'\t\t_dartVmService._tcp\n'
'\t\t_dartVmService._tcp\n'
'\t\t_bogus._tcp\n'
'\t\n'
```

### Code sample

NA

### Screenshots or Video

NA

### Logs

NA

### Flutter Doctor output

NA

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.