How to enable Swift support for existing project in flutter

后端 未结 6 700
既然无缘
既然无缘 2020-12-15 17:13

I want to know if there is a way to enable swift support for flutter project. I only enabled Kotlin support while creating the project. I need to enable Swift too. Is there

6条回答
  •  我在风中等你
    2020-12-15 18:00

    Little known secret -- you can run flutter create . in your Flutter app directory and it will repair the project, recreating any files that are missing. So if you already have a project created with Objective-C and Java, you can run:

    flutter create -i swift -a kotlin .
    

    to convert the host app to Kotlin and Swift.

    (Ignore Kotlin you you want, but my experience is that just leave it there)

提交回复
热议问题