feat: Capacitor v3 configuration file: Add version and android-versionCode fields
See original GitHub issueFeature Request
Description
While Capacitor tries to avoid changes to users’ native projects, I’ve seen this requested by the community several times and it’s a feature Cordova has. A lot of configuration details (like setting permission details or choosing an App’s name) are set once, so manual project changes aren’t a big deal. However, each time you ship an update to a native iOS/Android app in the app stores, the Version Number must be incremented. So, having “cap sync” update the version number (found in Cap config) in each native project would be a nice workflow improvement.
Current workflow (app is on version 1.0 for example):
- Finish new feature
- Submit to app stores (manually or via Appflow’s Deploy to app stores feature)
- It fails, due to version number not incremented
- Manually open Xcode and Android Studio, increment version number to v1.1.
- repackage binary, resubmit to app stores
Platform(s)
ios, android
Preferred Solution
Supported fields could look something like:
// capacitor.config.json
{
version: "1.2.5",
android-versionCode: "3"
}
New workflow:
- Feature complete
- Increment version number in capacitor.config.json.
- npx cap sync to update native android/ios projects with new version number and code
- profit (deploy to app stores)
Alternatives
Update android/ios projects manually.
Additional Context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Updating to 3.0 | Capacitor Documentation
Guide for updating Capacitor from v2 to v3 in your app. ... Below is an example capacitor.config.ts file that is used in the...
Read more >Capacitor versions - Quasar Framework
The officially supported versions of Capacitor are v1, v2 and v3. Upgrading Capacitor. If you previously used a lower version of Capacitor and...
Read more >Version number added to download name - VoltBuilder
The version information comes from the first line of your config.xml file: <widget version="1.0.3" android-versionCode="1" id="com.nsbasic.
Read more >Untitled
Brsm blog, Lagu2 terbaru, Mitralign crunchbase, Slam dunk tagalog version, ... Brz works filter, Scott munro thunder bay, Nam min seol, Append file...
Read more >Auth0 Ionic & Capacitor (Angular) SDK Quickstarts: Login
This tutorial demonstrates how to add user login with Auth0 to an Ionic Angular & Capacitor application.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi guys, I recommend also Capacitor Project API and Configuration Tool from ionic-team.
I do this there:
and my
Android
app version is central in mypackage.json
and so is my global app version. In that way is easier to track version changes globally.That is what I wanted to offer as PR maybe in
capacitor.json
instead ofpackage.json
(although I findpackage.json
more central).