Comments (12)
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.
Hi ! Thanks for this :)
Same problem here, and reinstalling didn't fix for me.
from nativescript-google-maps-sdk.
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.
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.
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.
Did the job on my side too !
Many thanks :)
from nativescript-google-maps-sdk.
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.
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.
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.
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.
@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.
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)
- infoWindow open without a click event HOT 2
- Blank Map with Angular in Suspend/Resume Event HOT 1
- Angular Map not drawing Polylines HOT 6
- shape.loadPoints is not a function?
- Geo political features
- Nativescript 6.0 error maps arr HOT 16
- Conflicts with @triniwiz/nativescript-image-cache-it HOT 1
- Performance Angular? HOT 1
- NS8 infoWindowTemplate is not working HOT 1
- Gesture Handling Cooperative HOT 2
- Gradle 7 requires that compile be changed to implementation
- iOS + M1 - not works HOT 3
- Failed to build plugin nativescript-google-maps-sdk HOT 1
- How to set a pattern in a shape HOT 2
- Version of Google Map API HOT 2
- How to set a tag in shapes or markers HOT 1
- Adding GroundOverlays HOT 1
- Could not find method compile() for arguments [com.google.android.gms:play-services-maps:+] HOT 3
- Uncaught ReferenceError: NativeClass is not defined HOT 3
- Class constructor ActionItem cannot be invoked without 'new' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-google-maps-sdk.