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

Platform API changes should be reported as breaking change #209

Closed
maxtacco opened this issue Aug 30, 2018 · 3 comments
Closed

Platform API changes should be reported as breaking change #209

maxtacco opened this issue Aug 30, 2018 · 3 comments

Comments

@maxtacco
Copy link

Due to recent Platform API changes I received a bunch of compilation errors. Please, report these changes as Breaking changes so it is easier to spot them. Also, no documentation is provided for the recent changes. Could you please provide mappings between old and new platform names? Thank you.

@brandyscarney
Copy link
Member

Thanks for the issue! Could you please provide some code of how you are using platforms?

@maxtacco
Copy link
Author

Hi @brandyscarney,
I need to detect if code runs inside a browser (either on desktop or mobile web). Before it was something like this:

isBrowser(): boolean {
    // return document.URL.startsWith('https://') || document.URL.startsWith('http://');
    return this.platform.is('core') || this.platform.is('mobileweb');
  }

Also, I have a third-party component that uses windows platform name.

@GuilhermeBCC
Copy link

maxtacco nothing has changed. Call platform.platforms() to see which platforms are active.
What was happening is that the platforms were not correct. At this time when running a pwa the platforms that appear to me are: tablet, desktop.

@brandyscarney brandyscarney transferred this issue from ionic-team/ionic-framework Nov 30, 2018
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

4 participants