Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Key Declaration and Angular/Webpack Issue #136

Closed
ShawnPavel opened this issue Mar 17, 2017 · 2 comments
Closed

iOS Key Declaration and Angular/Webpack Issue #136

ShawnPavel opened this issue Mar 17, 2017 · 2 comments

Comments

@ShawnPavel
Copy link

I recently implemented webpack in my NNG application that uses the google maps sdk. Previously I had no issues building/releasing my app for both Android and iOS.

After implementing webpack, my app immediately crashed in iOS. After investigating, I discovered that having the GMSServices.provideAPIKey call in the main.ts (as the documentation states) caused the app to crash when the map loads. After moving it to the app.module.ts it all works well.

I was able to easily reproduce this by creating a new NNG application, adding the plugins for map and webpack, settings the ios api key in main.ts, and executing npm run start-ios-bundle.

Essentially, the only requirement is to change the documentation to says app.module.ts instead of main.ts to prevent users from potentially placing it in the wrong location.

@dalvarado909
Copy link

Exact same issue and this fixed it! Running latest Nativescript, Angular 4, and webpack, according to the Nativescript docs. My app starts fine to a home screen, when I navigate to my map, I get a Segmentation fault 11. Moving the code you mention to app.module.ts fixes it and my app runs 100% fine again. Thanks!

@dapriett
Copy link
Owner

Thanks for reporting - docs and demo are updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants