I've initially created a Flutter project with the native languages of Kotlin and Swift in Android Studio. Is there a way to change the native iOS language to Objective-C. This configuration only seems to occur on the creation of a Flutter project.
I've initially created a Flutter project with the native languages of Kotlin and Swift in Android Studio. Is there a way to change the native iOS language to Objective-C. This configuration only seems to occur on the creation of a Flutter project.
For iOS the difference is mostly in ios/Runner.xcodeproj/project.pbxproj
and some different source code files are generated in ios/Runner
(the differences are too many to list them here)
For Android the differences are in android/build.gradle, android/app/build.gradle, and different source code files are generated in android/app/src/main
To switch languages you can delete the ios and/or android directory and run
flutter create -i swift -a kotlin .
If you made manual changes in files in these directories you need to re-apply them.
If you commit a project to Git and then switch language (as explained above), then it's easy to see what the differences are exactly.
Don't delete the ios and android directories. doing so makes you loose all the changes and updates in your file. just this flutter create -i swift -a kotlin .
Don't forget the dot at the end , this specifies that you want to make the changes in the current directory not create a new one.
after you run this follow the instruction and your app will have Swift support for iOS and Kotlin for android.
To make sure that you have Swift support take a look at your runner folder and see if it contains
AppDelegate.siwft