解决方案:info.plist添加NSLocalNetworkUsageDescription与NSBonjourServices
<key>NSLocalNetworkUsageDescription</key>
<string>$(PRODUCT_NAME) App needs Local Network permission to find local devices.</string>
<key>NSBonjourServices</key>
<string>_dartobservatory._tcp</string>
如果已经添加过,查看 '通用-隐私-本地网络'权限开关是否开启
注意:添加此项可能会导致审核被拒
flutter attach
时机
flutter attach
只有在iOS和flutter混编时,打开flutter页面才会同步文件
先跑iOS主工程,然后 flutter attach 选择 设备 然后 立即 push到flutter页面 就会连上了