flutterFlutter

iOS14 flutter attach无法连接

2021-05-08  本文已影响0人  blueC

问题:Waiting for a connection from Flutter on iPhone12 ... 卡住了连接不上

解决方案: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>

如果已经添加过,查看 '通用-隐私-本地网络'权限开关是否开启

注意:添加此项可能会导致审核被拒,请区分debug和release的info.plist File

参考链接:https://flutter.dev/docs/development/add-to-app/ios/project-setup#local-network-privacy-permissions

上一篇下一篇

猜你喜欢

热点阅读