error TS2307: Cannot find module 'platform'.
Maybe is very simple but i cant make this work, i put this code in the app.module.ts
import * as platform from "platform"; declare var GMSServices: any;
but always give me the error
[19-07-10 16:40:58.282] (CLI) ERROR in src/app/app.module.ts(12,27): error TS2307: Cannot find module 'platform'.
so what i need to install? or where? i already tried many times, regards
Hi Cloud, I'm facing the same issue. Did you solve it? I think that it's due to an outdated behavior to detect which platform the app is running on.
you can replace it with:
import * as platform from "tns-core-modules/platform";
if (platform.isIOS) { // <--- Here you set the API KEY only when running on ios GMSServices.provideAPIKey(globals.GOOGLE_API_KEY); }
Hi Cloud, I'm facing the same issue. Did you solve it? I think that it's due to an outdated behavior to detect which platform the app is running on.
you can replace it with:
import * as platform from "tns-core-modules/platform";
if (platform.isIOS) { // <--- Here you set the API KEY only when running on ios GMSServices.provideAPIKey(globals.GOOGLE_API_KEY); }