Friends, I implemented basic Google Maps functionality from Ionic 2 documentation as is (https://ionicframework.com/docs/v2/native/google-maps/). When I execute
ionic run android
It shows map and I see in my google developer console API hits. BUT if I run
ionic build android --prod
It does not shows map and there is no API hits.
cordova-plugin-whitelist is installed
Device the same for run and build - Nexus 5
What can block API hits only for build?
You are not only changing from run
to build
but also adding --prod
.
Did you try run android --prod
to see if it works then?
This is works normal. Maps shows normally
ionic build android
I suppose Google Maps ssl is ok) So why maps does not work with --prod?
So I found solution. I signed apk and built with --release flag
ionic build android --release
Works normally.
By the way
ionic build android --prod
Does not run at all, application stacks with splash screen. Anyone can explain that?