Create a Flutter project with Swift

后端 未结 4 1762
深忆病人
深忆病人 2021-02-08 19:40

Flutter allows to support of Swift programming language.

\""Include

4条回答
  •  长情又很酷
    2021-02-08 20:11

    I think a better way is to create Flutter project by command line:

    // Update 2020

    Nowadays the terminal command

    flutter create --org com.yourdomain your_app_name
    

    is enough. Swift, Kotlin, and Androidx dependencies are the default options

    // end update

    In the terminal in a desired directory run command

    flutter create -i swift -a kotlin your_project_name
    

    This util will create a project that you can run on iOS and on Android as well!

    After you can develop it in IDE that suits for you

    Full command for production can look like

    flutter create --org com.yourcompany -i swift -a kotlin --description 'Your App Description' your_app_name
    // 
    

    Params

    --org com.yourcompany
    

    will form applicationId for Android:

    com.yourcompany.yourappname
    

    and iOS PRODUCT_BUNDLE_IDENTIFIER:

    com.yourcompany.yourAppName
    

    parameter

    --description 'Your App Description' 
    

    sets package description in our pubspec.yaml

提交回复
热议问题