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
Accelerometer data in iOS 12.2 - 13 #4037
Comments
|
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already. |
|
It is possible that a sketch can request permission to receive device orientation events. Here is an issue that is tracking the release of this feature. The support is going to be spotty and unpredictable for a while it seems. It might be best to add a note stating that "Safari is not fully supported" in the docs for the relevant functions. |
|
The accelerometer is working for me on iPhone SE iOS 13.1, and oddly enough I can't find the toggle that turns access to it on and off. |
|
Ok, I was actually using Firefox on iOS as I thought the access is implemented across the webkit views but upon trying on Safari, it doesn't work anymore. |
|
My team and I are having the same issues; we had a functional working game before iOS 13, and we have followed steps to request DeviceMotion permissions. The approach works using Safari, but not when navigating using WKWebViews. We really need more clarity on this. @cdumez related to the same issue where I tagged you some minutes ago. |
|
Is there any guidance from Apple regarding requesting permissions on WKWebViews? Firefox on iOS is basically wrapping a WKWebViews as far as I know so it should be possible to implement it in code directly. |
|
@limzykenneth not a real guidance, but there are documentas and sites here and there. We have followed this: It works for Safari, but not when using WKWebView. So this is basically the quickl approach to solve the problem on the default experience, which is navigating with Safari. For the WebView, I think it has to do more with creating a specific controller to catch this and then push the dialog to accept/deny the permissions. But then this means WkWebView should have something to push the same dialog as Safri, but so far nothing out there that I have been able to test othar than the above, which is basically the same as nothing :( |
I just noticed I had another reply in this thread: |
|
I was just looking into this. If this is Apple's stance going forward, we will need to consider adding a function that requests permission for motion and orientation. It needs to be triggered on user gesture. Something like |
|
Well I have opened a bug listing in bugs.webkit.org : https://bugs.webkit.org/show_bug.cgi?id=203287 Basically what has been discussed so far is that a WkWebView should be OK to get direct access to sensors, but so far I haven't been able to achieve this on iOS 13 because of some reason. The WebKit team has replied with the use of a iOS native app called "WebView" that based on that implementation, there is proof WkWebView does provide direct access to sensors. In my case the strugle is to identify if it's because it's a native implementation, or if it's an error due to the plugins we are using to get this feature working from a Flutter project that ends in an IPA. If you would like to jump in the disucssion at webkit.org just follow the link =) @lmccart |
|
@elmariocarlos For your particular case I think you will have to sort it out between flutter, webkit and your own code and there's not much we can do here as the behaviour described by Chris Dumez in the webkit issue is consistent with the behaviour I've observed so far, with Firefox on iOS switching to a behaviour inline with Safari, and WkWebView not requiring user interaction nor permission. For an example that work across all views (Safari and WkWebView), have a look at this one from three.js @lmccart The whole API is technically still in a draft state by the W3C so it may still change but it seems the major browsers are going to move this behind user interaction and |
|
Hi @limzykenneth yes that is precisely what I mentioned. The scenario is still relevant, because if all this would be really as straightforward as mentioned it should work regardelss. There must be some other things that are affecting how the standard must be implemented. Example, it would be good to have source code for a base iOS app opening a wkwebview and then making the calls to open the URL and working. Just opening another app (with understanding how that native implementation is using the wkwebview kit), isn't a real proper test. |
|
You may be hitting the following bug: The workaround is the set a WKUIDelegate on the WKWebView in the meantime. |
|
Hi @cdumez sorry to take so much time to get back on this. Our project had a sudden diversion to get another core feature fixed. @Alucherdi is currently codign some tests to run on our Mac as soon as it's back from shop :(. I'll let you know when they are complete. |
it's work for me, thanks |
|
since there was a workaround that worked, i am closing this issue, feel free to reopen if needed. |
Nature of issue?
Most appropriate sub-area of p5.js?
Which platform were you using when you encountered this?
Details about the bug:
https://www.macrumors.com/2019/02/04/ios-12-2-safari-motion-orientation-access-toggle/
The text was updated successfully, but these errors were encountered: