Skip to content

Options for customizing auto-generated ios/android folder #37689

Closed

Description

@IchordeDionysos

Use case

I have frequently run into #32883 where I have to constantly edit my .ios/.android folder to update the minimal ios version or add the google-services.json/GoogleService-Info.plist back in again or to convert the project to AndroidX again.

Doing these repetitive and simple changes over and over again is time-consuming and makes me again as productive as writing native iOS/Android code.

Proposal

So for the minimally targeted OS version, an option in the pubspec.yaml would be great, like:

flutter:
    min-os-version:
        androidMinSdkVersion: 16
        iosMinimumDeploymentTarget: 9.0

For adding files like google-services.json/GoogleService-Info.plist it would be great if there was some way of running post-creation scripts which are capable of copying these files to the .ios/.android folder.
(Something like in the Firebase CLI https://firebase.google.com/docs/cli#hooks)

flutter:
    post-creation-script:
        android: 
        - ./post-creation-android.sh
        ios: 
        - ./post-creation-ios.sh

And the most important:
There should be an option:

flutter:
    use-android-x: true

Activity

  1. blasten commented on Aug 6, 2019

    @blasten

    This is related to #32989 cc @xster

  2. blasten commented on Aug 6, 2019

    @blasten

    I'm inclined to think that instead of exposing these properties through pubspec.yaml, we might just want to make flutter make-host-app-editable the default, and allow folks to custom these parameters in their corresponding ios/android directories.

  3. added
    a: existing-appsIntegration with existing apps via the add-to-app flow
    on Aug 6, 2019
  4. IchordeDionysos commented on Aug 7, 2019

    @IchordeDionysos
    ContributorAuthor

    Oh @blasten, I wasn't aware of the command flutter make-host-app-editable.
    So would that mean I could modify all of these things without them being changed over and over again when I run this command and make the desired changes in the generated android/ios directories?

  5. blasten commented on Aug 8, 2019

    @blasten

    Yup, that is correct.

  6. blasten commented on Aug 8, 2019

    @blasten

    Duplicate of #32989

  7. github-actions commented on Aug 28, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions