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
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
Register your app on App Store Connect
Review Xcode project settings, see the Xcode project settings
Create a build archive
In Xcode, configure the app version and build:
In Xcode, open Runner.xcworkspace in your app’s ios folder.
Select Product > Scheme > Runner.
Select Product > Destination > Generic iOS Device.
Select Product > Archive. (This process will take a little longer)
After finishing the process - Click the "Distribute App" button on right panel
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 )
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.
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
// For android
// For iOS
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.
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.