ion-google-place
ion-google-place copied to clipboard
Works on emulator and browser but on on an actual iPhone or Android phone
ion-google-place works fine when testing with ionic serve but when I load onto a physical iPhone or Android phone the Google places list does not appear.
My code looks like this:
<ion-item ng-show="show_profile" >
<span class="profile-label">CITY/TOWN:</span>
<ion-google-place placeholder={{city_town_text}} class="city-town" ng-model="location.text"/>
<div ng-show="show_city_err" class="account-error-message">{{city_err}}</div>
</ion-item>
As far as I can tell it appears to be falling over in the ion-google-place.js file when calling google.maps.Geocoder();
In my index.html file I have:
<script src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script>
<script src="lib/ion-google-place/ion-google-place.js"></script>
Hey Bill, I think this is related to the App Transport Security policy. I had the same problem and once I implemented this patch on my app's plist (https://gist.github.com/mlynch/284699d676fe9ed0abfa) everything worked again!
http://stackoverflow.com/questions/30731785/how-do-i-load-an-http-url-with-app-transport-security-enabled-in-ios-9/30732693#30732693
just use https to load the google places api can also resolve this?