Posted in Upload in webview
Hi Rafael - this could be any of a million different things, but the most obvious one is permissions. Does the iOS app ask the user for permission to access the camera roll? If it doesn't, then that's at least part of the problem. The app needs to get the User's permission before it can pull up the saved photos from the phone and/or access the device camera.
Based on the suggestion from Tabish above, I started playing around with a couple of different ideas. And the solution that seems to be working is to add a second 'addDomListener' statement into my js file. I am using the jQuery-turbolinks gem, so the file looks like -
.....google maps code here
google.maps.event.addDomListener(window, 'load', initMap);
google.maps.event.addDomListener(window, 'page:load', initMap);
And I'm actually fairly sure the 2 statements can be combined into one, just don't have the desire to spend anymore time on this currently!!!
Hi Tabish - Thanks for the suggestion! Unfortunately that did not take care of the problem. I'm trying a few other things now and will post an update if I can get this figured out.
With the number of sites using googlemaps, it doesn't seem like this should be all that difficult!
( If I turn off turbo links, everything works fine. But turning off turbo links causes some unwelcome behavior when running as a 'native-ish' app in iOS/safari.)
So, my questions are -
How should my jQuery code for initializing the gmaps and setting the parameters be included? I'm currently using the jQuery.turbolinks gem and including my jQuery code for gmaps in a standard closure per the jQuery.turbolinks docs. (I think I added the jQuery.turbolinks gem to fix this problem in the first place - so I'm happy to remove it if it's not necessary)
And again, everything works if I turn the turbo links off, so it is seems like it has to be something with either the load order or the timing of the event listener.
any suggestions appreciated!...chris