这个跟模拟器还是真机感觉关系不大,感觉是配置不对,导致run起来的iOS项目不对,run起来的工程是在flutter文件夹内的iOS工程,而不是外部的。用真机跑,提示证书没配置,配置完flutter文件夹内的iOS工程,就跑起来了,仍然提示error host!
控制台打印的内容:
Checking for advertised Dart observatories...
[XDEBUG]---surface changed--reset-
Checking for available port on com.zqtd.cajian._dartobservatory._tcp.local
Checking for authentication code for com.zqtd.cajian._dartobservatory._tcp.local
flutter: FlutterBoost#onShownContainerChanged old:null now:default
但是Xcode上面不会有这个问题,能够正确的初始化我的根视图:
flutter: Observatory listening on http://127.0.0.1:51136/rQv0AkdDdgM=/
2019-11-19 16:33:11.365380+0800 Runner[10633:3661278] [XDEBUG]---surface changed--reset-
2019-11-19 16:33:14.279620+0800 Runner[10633:3661422] flutter: FlutterBoost#onMetohdCall willShowPageContainer
2019-11-19 16:33:14.295561+0800 Runner[10633:3661422] flutter: FlutterBoost#ContainerObserver#2 didPush
2019-11-19 16:33:14.406389+0800 Runner[10633:3661422] flutter: FlutterBoost#onMetohdCall didShowPageContainer
2019-11-19 16:33:14.421937+0800 Runner[10633:3661422] flutter: FlutterBoost#onShownContainerChanged old:null now:0
2019-11-19 16:33:14.436194+0800 Runner[10633:3661422] flutter: FlutterBoost#BoostContainerLifeCycleObserver container:login lifeCycle:ContainerLifeCycle.Appear
2019-11-19 16:33:14.440062+0800 Runner[10633:3661422] flutter: FlutterBoost#native containner did show,
manager dump:
onstage#:
{uniqueId=0,name=login}
offstage#:
{uniqueId=default,name=default}
2019-11-19 16:33:15.105978+0800 Runner[10633:3661422] flutter: FlutterBoost#ManagerNavigatorObserver didPush
2019-11-19 16:33:15.308657+0800 Runner[10633:3661422] flutter: FlutterBoost#build widget:LoginWidget for page:login(0)
2019-11-19 16:33:16.893914+0800 Runner[10633:3661422] flutter: FlutterBoost#onShownContainerChanged old:null now:0
flutter:1.9.1+hotfix.5
iOS 12.4.2 - Xcode 11.2
有解决思路吗??
当我断开vscode debug,再次进入应用,又能渲染出我的根视图了!!!