How to get .apk and .ipa file from flutter?

后端 未结 11 1059
自闭症患者
自闭症患者 2020-12-12 18:51

I am new to flutter programming and I\'ve created a demo app, its running fine on both android and iOS devices. I want to see .apk and .ipa file in flutter. Can anyone help

相关标签:
11条回答
  • 2020-12-12 19:29

    Building .apk

    Although app bundles are preferred over APKs, there are stores that don’t yet support app bundles. In this case, build a release APK for each target ABI (Application Binary Interface).

    From the command line:

    • Run flutter build apk --split-per-abi

      (The flutter build command defaults to --release.)

    Building .ipa

    To create a .ipa file, Build and release an iOS app

    1. Register your app on App Store Connect

      • Register a Bundle ID, see the Register a Bundle ID
      • Create an application record on App Store Connect, see the Create an application record on App Store
    2. Review Xcode project settings, see the Xcode project settings

    3. Create a build archive

      In Xcode, configure the app version and build:

      1. In Xcode, open Runner.xcworkspace in your app’s ios folder.

      2. Select Product > Scheme > Runner.

      3. Select Product > Destination > Generic iOS Device.

      4. Select Product > Archive. (This process will take a little longer)

      5. After finishing the process - Click the "Distribute App" button on right panel

      6. Then follow the below steps

        • Step 1

        • Step 2

        • Step 3

        • Step 4

        • Step 5

        • Step 6 (Finally select the place you want to save the .ipa file )

    0 讨论(0)
  • 2020-12-12 19:29

    I also had this question and had a really tough time finding the right solution. First of all in the terminal of your code editor type:

    flutter build apk --realese
    

    and after that go to this location:

    yourAppFolder/build/app/outputs/apk/release/app-release.apk
    

    I do not do development for iOS so I don't know much about that.

    0 讨论(0)
  • 2020-12-12 19:29

    Android(After adding release build type run below command which will generate release apk with below version)

    flutter build apk --build-name=1.0.1 --build-number=1
    

    iOS

    flutter build ios --release
    

    For a detail explanation read the below article.

    https://medium.com/@ralphbergmann/versioning-with-flutter-299869e68af4

    0 讨论(0)
  • 2020-12-12 19:30
    1. cd $(PROJECT FOLDER PATH)

    // For android

    1. sudo $(FLUTTER SDK PATH TILL bin)/flutter build apk --release

    // For iOS

    1. sudo $(FLUTTER SDK PATH TILL bin)/flutter build ios --release
    0 讨论(0)
  • 2020-12-12 19:31

    For apk, you can use flutter build apk --release to get the release version of your apk on either windows/macOS.

    For ipa, you have to use flutter build ios --release to get the release version of your apk on macOS.

    Note: You can get a ipa on macOS only.

    0 讨论(0)
  • 2020-12-12 19:32

    For iOS:

    Step 1: open terminal and type cd "your flutter sdk path"

    Step 2: cd export PATH=/Users/yourname/Downloads/flutter/bin:$PATH

    Step 3: cd your project path

    Step 4: flutter build ios --release

    run step 1 to 4 in terminal.

    After that open android studio and go to iOS folder path and open project.pbxproj file with ios module and in xcode you need to choose generic ios device and select archive, it will generate ipa build for you.

    0 讨论(0)
提交回复
热议问题