ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
129 stars 86 forks source link

fix detect ipad #1111

Open osben opened 3 years ago

osben commented 3 years ago

after pull https://github.com/ionic-team/ionic-v3/pull/1110

Short description of what this resolves:

Changes proposed in this pull request:

-

-

Fixes: #

andmar8 commented 3 years ago

I found 1110 and 1111 need a slight adjustment to make android v6 work

I managed to tsc the ionic-v3 codebase with typescript@3.6.2, after using the new platform-registry and platform-utils you will get errors in android 6 claiming that lines in vendor.js don't know what "=>" and ")" is. For some reason it's not transpiling the fat arrows into functions in the js. I just changed the typescript function calls to normal js functions, that works fine with android 6....

platform-registry.ts lines 194, 199, 204 from "plt.zone.run(() => {" to "plt.zone.run(function(){" platform-util.ts line 34 from "const isMobile = (win: Window) => matchMedia(win, '(any-pointer:coarse)');" to "const isMobile = function(win: Window){return matchMedia(win, '(any-pointer:coarse)');};"

This could well be I'm using the wrong tsc version to compile, but 3.7.x and 3.8.3 didn't work for me... in fact 3.6.2 needed some tweak to get it to build