-
Notifications
You must be signed in to change notification settings - Fork 192
Browser platform not working #86
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
Comments
Browser platform is not supported, it appears. iOS, Android, Windows are the only supported platforms. |
What version would you expect this plugin to return in a browser? |
I'd expect the version number that would appear on any other platform. My version number is a string from config.xml, correct? |
I'd have expected it could have come from ionic.config.json or package.json personally too. But now I know.. (re. the ionic cordova run browser) |
Would it be difficult to add the browser platform to this plugin? As far as I can see config.xml is deployed together with the application, so it could read the version from that file |
The browser platform is not currently supported, this is aimed at iOS, Android, and Windows apps. |
Is it difficult to support browser? |
I can't see any asset that's included in the browser build by default that includes the version number, so I don't think it's possible without some custom build steps or assets? |
You are right. Until now I have solved it by adding a variable to my solution, so in my main.js I can find this.version = "0.4.0"; and then I have to use that instead of the plugin. But you are right, it will require either a custom change in the build process, or probably a better solution that the Ionic team adds the version during build to the browser-platform, somewhere you can pick it up. But also Ionic claims that the browser platform is just experimental and not intended for production, so it seems I will have to continue to update the version in both my solution and in the config.xml. and thanks for taking the time to take another look into this best regards |
Hmm, I should have looked at the Pull Requests before the issues… There's an outstanding PR that offers browser support, though I've not tested that yet. Might be worth looking at, see if it solves your issue? I've run out of time for today, but I'll be back soon to tidy up this plugin. |
As far as I can see he is reading config.xml (In AppVersionProxy), but that is not part of the browser distribution, but I will see if I can get it tested on the broser platform (when uploaded to firebase) |
@Drarok , can you at least try and catch an error so that it does not break when using is in a cordova browser mode? |
I installed the plugin correctly and got the desired result on Android but not in the browser version.
When I run the following code:
This trows the error:
Am I doing something wrong or isn't really working with the browser platform?
The text was updated successfully, but these errors were encountered: