-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Weird getMotionAuthorizationStatus() behaviour on iPad #372
Comments
This has been fixed in v5.0.1 |
@dpa99c for my knowledge, can you confirm you just disabled availability of motion permission on the iPad mini 4 model device prior to WARNING : message below is not right as I was testing on an iPad Mini 1 instead of an iPad mini 4 (see #372 (comment)) As I can see changes in behaviour between
(note that I'm not against this change, but I'm trying to understand the implications of this change here :-) ) |
I'm testing v5.0.1 on an iPad Air 2 running iOS 12.4 using the example project (by inserting plugin calls directly into the Webview via Safari Web Inspector) and the results I see are this:
These are the results I would expect. Can you try the same set of commands on your iPad Mini 4 and see if you get the same results? |
Hi @dpa99c, You can see the outcome of those in my table previously. Anyway, it was not on your sample app, so just in case I tried with your sample app but had exactly the same results as those described in the table above (not permission popup when calling |
The results on your iPad Mini 4 indicate that the CoreMotion APIs are responding differently than to my iPad Air 2. Therefore, if you want to investigate this further, you'll need to debug on the device in Xcode yourself. I suggest setting breakpoints in Diagnostic_Motion.m at line 92, and line 96 when calling And also at line 51 to check if the If you have an iPad running a newer version of iOS, you can repeat the tests to see if the results are different. |
OK, now I see what's going on: CoreMotion is not available on your iPad Mini 4 (there must be no motion co-processor onboard) so I can fix this by adding a check for However, I'd recommend anyway that you call |
… available" when calling getMotionAuthorizationStatus(). Further resolves #372.
The above commit should ensure that |
Yes, that's what I am (and was) doing. But I can recall that the change you made on I'm not 💯 about that, let me check this again with a previous version of the plugin to be sure of myself :-) |
Looking at the iPad Mini 4 specs it does seem it has a motion coprocessor. |
Interestingly, looking at the motion coprocessors, you iPad Mini 4 has the A8 whereas my iPad Air (ME913B/A) has the A7 so yours has a new coprocessor, so I wonder why it says activity tracking is unavailable since it's my understanding that it is supported on the A7 and upwards? |
@dpa99c Apologies, I was just checking and ... I'm testing with an iPad Mini 1 since this morning, not the iPad Mini 4 (they are very close in terms of design) I'm going to unroll this thread and test everything again with the iPad Mini 4 this time, will keep you posted I'm really sorry to waste your time :( |
aha! iPad Mini 1 does not have a motion coprocessor so that explains why
You really haven't wasted my time as you did find an actual bug which is fixed by the commit above! |
OK, ran the tests and it looks good with a proper iPad Mini 4 : I now have the |
I'm submitting a ... (check one with "x"):
Bug report
Current behavior:
On iPad Mini 4, when I call
getMotionAuthorizationStatus()
, I always get anot_requested
outcome, even when I callrequestMotionAuthorization()
prior to it (no matter what I respond to the motion authorization request popup).eg :
outputs :
Expected behavior:
I understand that iPad motion is half available (we can request it, but since we don't have Pedometer events on iPads, it cannot be determined)
However, I would have expected that a second call (after
requestMotionAuthorization()
call) togetMotionAuthorizationStatus()
would returnnot_determined
instead ofnot_requested
WDYT about my assumption ?
Current behaviour is annoying because I need to always rely on
requestMotionAuthorization()
to have a "true" status, sincegetMotionAuthorizationStatus()
doesn't give me the true status on iPad.Steps to reproduce:
Execute following code :
My assumption would be to have this output :
Environment information
9.0.0 ([email protected])
Runtime issue
Related code:
Kind regards,
The text was updated successfully, but these errors were encountered: