ion-google-place icon indicating copy to clipboard operation
ion-google-place copied to clipboard

Works on emulator and browser but on on an actual iPhone or Android phone

Open vardas-bill opened this issue 8 years ago • 3 comments

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>

vardas-bill avatar Oct 29 '15 12:10 vardas-bill

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!

fsbatista avatar Nov 02 '15 16:11 fsbatista

http://stackoverflow.com/questions/30731785/how-do-i-load-an-http-url-with-app-transport-security-enabled-in-ios-9/30732693#30732693

quedicesebas avatar Nov 05 '15 21:11 quedicesebas

just use https to load the google places api can also resolve this?

ulion avatar Feb 10 '16 08:02 ulion