Create A Flutter Project With Swift
Solution 1:
I think a better way is to create Flutter project by command line:
// Update 2021
In the terminal in a desired directory run command
flutter create--org com.yourdomain your_app_name
Swift, Kotlin, and Androidx dependencies are the default options
After you can develop it in IDE that suits for you
Full command for production can look like
flutter create--org com.yourcompany --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
Solution 2:
Flutter uses Dart language.
Android - Java/Kotlin , iOS - Objc/Swift could be used to write plugins and platform dependent code. More details https://flutter.io/developing-packages/
When Flutter creates new project, it generates 2 native projects (iOS and Android), that would be able to run compiled Flutter project. Languages are selected via menu you posted. Check ios
and android
folders in created project.
Solution 3:
Creating project in:
iOS: Swift, Android: Kotlin
flutter create -i swift -a kotlin package_name
iOS: Swift, Android: Java
flutter create -i swift -a java package_name
iOS: Objective-C, Android: Kotlin
flutter create -i objc -a kotlin package_name
iOS: Objective-C, Android: Java
flutter create -i objc -a java package_name
Note:
Using above commands, you'll see the company name created is example
, so to add your company name, simply add --org com.company
right after flutter create
like:
flutter create --org com.company -i swift -a kotlin package_name
Solution 4:
the best option will be to open your ios folder in xcode and add and edit your code there
Post a Comment for "Create A Flutter Project With Swift"