Where is the native language setting for Swift or Objective-C in an existing Flutter project in Android Studio?

2,421

Solution 1

  • 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.

Solution 2

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
Share:
2,421
Peter Birdsall
Author by

Peter Birdsall

Peter Birdsall [email protected] Reliable, creative, adaptive and loyal, possessing technical, managerial and leadership expertise with experience in technology and business systems. Accomplishments include the creation of an Award winning Decision Support implementation and relocation of our Data Center to a managed co-location. Fulfilled business needs by transitioning to various roles and positions, including management and administration of all back office systems across various hardware platforms. Android Full Stack SDK Developer Development Soft Skills: • SDLC, BI • Database Design • AgileWrap • Design system model • Integration • Self / Outsourcing Android Applications - Google Play (exception *): • Otto Carpool • eRideShare Carpool • DP Image Calculator • AceYourExam • WiFi AirWaves • NDA – MyKickStarter • BCM Entry • BCM Website • BCM Regulations * Mobile API Experience: • Google In-App Billing • Google Admob • Material Design • Facebook SDK • RxJava • Retrofit • Google Volley / GSON • Google Analytics • Deep Linking • Cloud Storage • Espresso • Falcon+ • Accessibility Service • Video Streaming • Permissions 6.0 • Map V2 / NFC • EventBus • Dagger2 Professional Experience: Developer – Mobile Ride Sharing, New York, New York 12/14 to 1/17 Published Android proprietary application – Worked with CEO to create 2 Android applications, one for college students and one for the general public. App includes maps with custom markers and window info, geocoding, forward and reverse, custom sms, Material Design implemented in a Model View Controller framework. Sole full stack Android Developer, acclimate the CEO to Android paradigm vs iPhone. Minimal Viable Product (MVP) published on Google Play, ‘Otto Carpooling’, 60+ screens. MVP: https://play.google.com/store/apps/details?id=com.erideshare.erideshare Developer – Highline Residential, Real Estate Brokerage, New York, New York 3/14 to 8/14 Published Android proprietary application - Performed major role in on-site JAD design sessions with CTO, Project Manager and Designer, providing key Android platform guidance in areas of form factor, device support, UI / UX design, backend, database design, best practices for new proprietary Real Estate application. Sole full stack Android Developer, implemented Google In-App Billing, AdMob, Google Analytics, Widgets, Custom Views, Fonts, Content Provider, Volley, 2D / 3D Animation, RESTful, SDLC. MVP: https://play.google.com/store/apps/details?id=com.hlresidential.aceyourexam Webmaster / Android Developer / IT Support IT Consultant – Bergen Chess Mates, Ridgewood, New Jersey 1/09 to present Android applications: BCMWinTD, BCMWebsite, BCM Regulation Assistant and BCM Notation

Updated on December 06, 2022

Comments

  • Peter Birdsall
    Peter Birdsall 16 days

    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.