I can't use splash screen/status bar/geolocation in the ionic+meteor tutorial

Hi All

I’ve been stuck on this problem for about 2 weeks now.

In the tutorial, app.component.ts, it uses screen/status bar:

if (platform.is(‘cordova’)) {
StatusBar.styleDefault();
SplashScreen.hide();
}

And the imports for them in the tutorial:

import { StatusBar, Splashscreen } from ‘ionic-native’;

Because the old ionic-native doesn’t work anymore, I have to use:

import { StatusBar } from ‘@ionic-native/status-bar’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;

And ever since then, i can’t get these two functions working, same with geolocation, it either gives me lots of
error like “unexpected token import” or “unCaught type error: cannot read property meteorinstall…”

Or it tells me a function is undefined for geolocation, no matter what i try it just won’t work.

I’ve uploaded my code to github:

Can someone please have a look at it? I really have no idea what’s going on with those errors.

Thanks in advance for any answers!

1 Like

I’ve searched this question online for 2 weeks too, can’t seem to find a solution at all. Is this a common problem?

Hi

I think it’s possible that for now Meteor doesn’t support the new @ionic-native/splash-screen?

I’ve come across the same issue and created an way to replicate it


Checkout the update-ionic-native branch.

Does anyone know what’s going on?

Hi OP here

I think one possible solution is to use older version of everything in that tutorial, including angular, ionic etc, but i’ve not tried that myself since there are too many packages too check. Pretty sure it’s a problem related to versions of packages though, it looks to me the developers of meteor are having a hard time catching up with the latest versions of angular/ionic/whatever.

Using older versions is not an option. I want to take advantage of the latest features.
Weird no one else has the same problem! Could we be doing something wrong?

1 Like

Hey

I have no idea…been asking around this question for quite a while now, and every time i get to the point where i ask people “Can you help me fix this splash screen/status bar problem”, it seems that there’s NO ONE THAT ACTUALLY KNOWS HOW TO FIX IT :frowning:

It’s either way to hard that people who know how to do this just want to keep it to themselves and not tell anyone so they can have an advantage, or they simply don’t know. I’m not sure which one is the case.

I think this problem can be fixed if anyone was able to use any es2015 npm package in Meteor!
I think ionic-native changed their tsconfig.json module to es2015, and never provided other module format, and because of that, an import command exists in the emitted js file.
I am waiting for some clue.
Thanks in advance.

1 Like

Hey OP here. I think this is getting odd now, it’s apparently not an uncommon issue, however I don’t see anyone having a solution.