在安卓進(jìn)行插件調(diào)試很順利,但是在iOS端,有時(shí)可以扎附,有時(shí)一直等待杜秸,十分影響開發(fā)效率。網(wǎng)上找了很多方法抑党,最終也還是沒有解決包警,今天在調(diào)試插件啟動(dòng)日志時(shí),發(fā)現(xiàn)了如下提示:
[VERBOSE-2:FlutterDartVMServicePublisher.mm(124)]
On iOS 14+, local network broadcast in apps need to be declared in the app's Info.plist.
Debug and profile Flutter apps and modules host VM services on the local network to support debugging features such as hot reload and DevTools.
To make your Flutter app or module attachable and debuggable, add a '_dartVmService._tcp' value to the 'NSBonjourServices' key in your Info.plist for the Debug/Profile configurations.
For more information, see https://flutter.dev/docs/development/add-to-app/ios/project-setup#local-network-privacy-permissions
很好底靠,之前官網(wǎng)上并沒有提到需要加 _dartVmService 這個(gè)值害晦,只是提到加_bonjour._tcp,于是果斷在NSBonjourServices 再添加_dartVmService暑中,問題完美解決壹瘟。