How to Change App Version
Updating the app version in Flutter is an essential step before releasing your app. Follow these simple steps to modify the version for both Android and iOS.
🛠 Updating App Version in Flutter
📌 Step 1: Modify pubspec.yaml
-
Open the file named
pubspec.yaml
. -
Locate the
version
field and update it in the following format:version: A.B.C+X
- A.B.C → Represents the version name (e.g.,
1.0.0
). - X → Represents the version code (e.g.,
1
,2
,3
, etc.).
- A.B.C → Represents the version name (e.g.,
- After making the changes, run the following command to apply them:
flutter pub get
🍏 Updating App Version for iOS
📌 Step 1: Update Version in Xcode
-
Open your iOS project in Xcode.
-
Select "Runner" from the targets.
-
Navigate to "General".
-
Locate the Version and Build fields:
- Version (e.g.,
1.0.0
). - Build (e.g.,
1
,2
,3
, etc.).
- Version (e.g.,
📌 Step 2: Update FLUTTER_BUILD_NAME
and FLUTTER_BUILD_NUMBER
-
In Xcode, select "Runner" from the targets.
-
Go to "Build Settings".
-
Locate and modify the following fields:
- FLUTTER_BUILD_NAME → Represents the version name (e.g.,
1.0.0
). - FLUTTER_BUILD_NUMBER → Represents the version code (e.g.,
1
,2
,3
, etc.).
- FLUTTER_BUILD_NAME → Represents the version name (e.g.,
✅ You're all set! Now, your app version is updated for both Android and iOS. 🚀