Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app versions #840

Closed
dahlb opened this issue Oct 1, 2018 · 5 comments
Closed

app versions #840

dahlb opened this issue Oct 1, 2018 · 5 comments

Comments

@dahlb
Copy link

dahlb commented Oct 1, 2018

I have been unable to find any capacitor method of setting the app version for android/ios it appears to always set the generated files to version 0.0.1/1, ignoring the package.json version defined.

Is there plans to have the generator set the app version or have I missed something in the way it currently works?

@jcesarmobile
Copy link
Member

jcesarmobile commented Oct 2, 2018

Capacitor doesn't edit your project, so you have to handle the version numbers in the native way for each platform.

So for iOS you set it in the target details by setting Version and Build fields
captura de pantalla 2018-10-02 a las 13 02 24

For Android you set the versionCode and versionName in the App build.gradle
captura de pantalla 2018-10-02 a las 13 06 55

@MikeyBeLike
Copy link

For anyone finding this as well, you can also update your ios Info.plist file too if you want to do it programmatically or something..

Changing the version number as outlined above, changed my info.plist file too:

image

@dlodeprojuicer
Copy link

This would be come in handy if xcode can pickup the build and version from capacitor.config.json

{
  "appId": "za.co.stech.brand",
  "appName": "Abashwe",
  "bundledWebRuntime": false,
  "npmClient": "npm",
  "webDir": "dist",
  "build": "6",
  "version": "2"
}

@marekgoczol
Copy link

If you're still having this issue, check if you have your version set in build.gradle file for Android (default in android/app/build.gradle).

@REPTILEHAUS
Copy link

+1 for being able to set this in capacitor.config.json

@ionic-team ionic-team locked as resolved and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants