Coder Social home page Coder Social logo

Comments (12)

dapriett avatar dapriett commented on May 17, 2024

Hi @kvnphllps - I just ran your code and it worked fine for me using the ios emulator. Maybe try removing your node_modules and platforms directory, reinstall, and run. I know for me sometimes Nativescript gets in a funky state, and only wiping those clean fixes it.

rm -rf node_modules platforms
tns install
tns run ios --emulator

from nativescript-google-maps-sdk.

EnguGH avatar EnguGH commented on May 17, 2024

Hi ! Thanks for this :)
Same problem here, and reinstalling didn't fix for me.

from nativescript-google-maps-sdk.

kvnphllps avatar kvnphllps commented on May 17, 2024

Same here... perhaps it is a tns configuration error? A missing iOS platform library? @dapriett what version of tns are you running your package with? Thanks again!

from nativescript-google-maps-sdk.

kvnphllps avatar kvnphllps commented on May 17, 2024

Another thought: with GMSServices being apart of the google SDK should I be running some pod install commands on the podfile to import the google map SDK?

from nativescript-google-maps-sdk.

kvnphllps avatar kvnphllps commented on May 17, 2024

Found my error: I didn't have CocoaPods installed... @EnguGH take a look at step 2 here. After installing CocoaPods and then following the original suggestion by @dapriett the map app opened up for me.

from nativescript-google-maps-sdk.

EnguGH avatar EnguGH commented on May 17, 2024

Did the job on my side too !
Many thanks :)

from nativescript-google-maps-sdk.

Daxito avatar Daxito commented on May 17, 2024

Seems like this error is back
Can't find variable: GMSServices

Jacks-MacBook-Air-2:PantonApp juanoviedo$ pod --version
0.39.0
XCode version is 7.2.1

{N} version is 1.6.1

I also followed @dapriett instructions to add and remove node_modules and I still have the problem, any ideas?

Thank you!

from nativescript-google-maps-sdk.

xerotolerant avatar xerotolerant commented on May 17, 2024

I'm having the same problem as well. I followed the steps above as well.
In addition I tried making a reference to the plugin and trying to access GMSServices from in there.

`
var mapsService = import("nativescript-google-maps-sdk);

if (application.ios){
mapsService.GMSService.provideAPIKey("apikey");
}
`
failed: error evaluating statement.

Anyone know how to solve this?

from nativescript-google-maps-sdk.

MrSinaRJ avatar MrSinaRJ commented on May 17, 2024

I got this error now, followed every step as mentioned here and mentioned links.
Still having the problem, something is going on! It's like no one that solved this issue wants to help!

I did run these commands in order:
pod setup, rm -rf node_modules platforms, tns install, tns build ios, tns run ios --emulator

Still getting the Error:
file:///app/app.js:12:16: JS ERROR TypeError: undefined is not an object (evaluating 'GMSServices.provideAPIKey')
app.ts is so simple:

import "./bundle-config";
import * as app from 'application';
var GMSServices: any;

if(app.ios){
    GMSServices.provideAPIKey("AIzaSyA4UF");
}

app.start({ moduleName: 'home/home' });

from nativescript-google-maps-sdk.

xerotolerant avatar xerotolerant commented on May 17, 2024

Hey, In your case it is pretty clear that you haven't imported the GMSServices, you just declared it as any but it isn't imported. Try importing it like
var mapsService = import("nativescript-google-maps-sdk);

also you should get a new key since everyone was emailed your full key before you edited it.

from nativescript-google-maps-sdk.

MrSinaRJ avatar MrSinaRJ commented on May 17, 2024

@xerotolerant thanks for your help, I have disabled the key a few seconds after that. but thanks for mentioning this issue.

I will try to fix it with your help, I hope I get it to work

from nativescript-google-maps-sdk.

ShaimaaKhamees avatar ShaimaaKhamees commented on May 17, 2024

i have the same problem when i trying to run in emulator and after install cocoapods ...the error was gone
my problem now when i upload my app in testflight my app crashes in this line
GMSService.provideAPIKey("apikey");
what can i do??

from nativescript-google-maps-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.