因各种原因,删除掉了ios目录,重建命令:
flutter create -i swift .
info.plist文件一般都要补上以下内容:
<key>io.flutter.embedded_views_preview</key>
<string>YES</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>