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

Suggestion: Read version number from app package #3

Open
tjvantoll opened this issue Jan 30, 2015 · 0 comments
Open

Suggestion: Read version number from app package #3

tjvantoll opened this issue Jan 30, 2015 · 0 comments

Comments

@tjvantoll
Copy link

The script that is provided for Analytics use in Cordova apps requires you to hardcode a version number.

// Add this code to a new file, analytics.js
// REMEMBER TO INSERT THE CORRECT PRODUCT KEY BELOW !!
(function(g) {

  var productId = "YOUR-PRODUCT-KEY-HERE";
  var version = "1.0"; // Your app version here

I forgot to change the version on subsequent releases, as I think most people will, and no one wants to maintain this. Can the plugin be smart enough to instead read the version number from the app package itself? There's a Cordova plugin that does this, so I would think it's possible.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant