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 9 silently fails if location services turned off #5

Open
tstefanich opened this issue Jun 26, 2016 · 5 comments
Open

ios 9 silently fails if location services turned off #5

tstefanich opened this issue Jun 26, 2016 · 5 comments

Comments

@tstefanich
Copy link
Collaborator

When testing on ios 9 and if the users Settings -> Privacy -> Location services -> Safari are set to "Never" the webpage will not prompt for permission. There should maybe be a more explicit alert that notifies vs a console log. Will look into testing to see if we can do something more direct for ios / mobile.

@bmoren
Copy link
Owner

bmoren commented Jun 26, 2016

Perhaps we can add an attribute to turn on a visual warning / error message that can be toggled on or off with a attribute to geoCheck().

geoCheck(true) //display custom browser based comparability messages

@bmoren
Copy link
Owner

bmoren commented Jun 26, 2016

Or we could make a more universal geoError() which could be hooked into everything that has a visual message. I might make the argument for letting the user handle the visual side of things in case they want something more custom than what we would provide. Thoughts?

@mediaupstream
Copy link
Collaborator

+1 for letting the user decide how to display errors. I would probably remove all console.log() calls and either return the error to an error callback function or throw a proper error like p5.js core does, example: https://github.com/processing/p5.js/blob/master/src/color/p5.Color.js#L594

@tstefanich
Copy link
Collaborator Author

I mean I figured it out pretty easily.... but I feel like someone with less
web experience, especially with mobile, or a semi beginner programmer could
use a more explicit message...

It just seems like overkill to set up remote console logging, which is not
that hard but I haven't needed to do this myself very often in work that I
have done, to get a console message from the device that is "Check and make
sure location services are turned at in Settings->Safari->Location Services
ect ect"

So I guess its a question for a novice web developer what should we do to
make this more clear if anything? A few thoughts below

  1. is to make a note in the readme about location services needing to be on
    if you are testing on the specific device because even though safari is
    getting asked to allow for your location it doesn't show up at all if
    Location Services are turned off.
  2. Would to make a section or note about remote debugging for mobile
    devices and link to a tutorial maybe like this one
    https://blog.idrsolutions.com/2015/02/remote-debugging-ios-safari-on-os-x-windows-and-linux/
  3. would maybe be adding some parameter to allow to alert errors for mobile
    devices or something to avoid having to do the remote debugging. This is
    maybe alittle bit more complicated because it would be nice to conceptually
    fit with how p5 does error handling but also this library is a little
    different then other libraries because its most likely mobile device
    focused where as the others are more general purpose.

Thoughts??

On Sun, Jun 26, 2016 at 2:41 PM, Ben Moren [email protected] wrote:

Or we could make a more universal geoError() which could be hooked into
everything that has a visual message. I might make the argument for letting
the user handle the visual side of things in case they want something more
custom than what we would provide. Thoughts?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAxe5yOw--bT0q50BwBetilxFWz61Xbhks5qPvHxgaJpZM4I-nzs
.

Tyler Stefanich
http://www.tylerstefanich.com

@bmoren
Copy link
Owner

bmoren commented Jul 11, 2016

I agree that remote logging is a huge pain. Anything we can do to get around that would be ideal. To your thoughts, yes, lets do all 3. I think this is the simplest way around for novice developers. We can make a catchall error function which throws a visible alert which can be toggled on/off which is enabled by default. If on, visible alert is shown in addition to a p5 style error thrown, if off, the error as derek pointed out above is thrown only.

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