cardboard-vr-display icon indicating copy to clipboard operation
cardboard-vr-display copied to clipboard

Wakelock Issue on IOS 13

Open danrossi opened this issue 4 years ago • 9 comments

I believe there is a wakelock issue for IOS 13 and it requires this NoSleep forked project which has the fixes.

https://github.com/Domratchev/NoSleep.js

danrossi avatar Jul 01 '20 15:07 danrossi

I believe the change to this branch doesn't work. Wakelock broken in IOS 13.

danrossi avatar Jul 06 '20 05:07 danrossi

Wakelock on iOS has always been a challenging pile of hacks. I don't have access to an iOS 13 device at the moment, hopefully there's some possible solution

jsantell avatar Jul 06 '20 22:07 jsantell

Please hold I have a client testing the updated branch, they claim the live demo version is working not sure which build that is. Ive been between 3 different forks and the fork changes might be an issue. The version built into vr cardboard display is def broken. IOS 13 has broken many things indeed. I may close

danrossi avatar Jul 07 '20 03:07 danrossi

master branch is working with IOS 13. The forks I tried and manually merged cause issues. Updated the github dependency in the cardboard display project.

danrossi avatar Jul 07 '20 14:07 danrossi

What version of nosleep.js did you pin/update to that worked for you?

jsantell avatar Jul 07 '20 16:07 jsantell

The github master branch. I've got it in my fork which I had to also fix IOS 13 detection properly.

https://github.com/danrossi/cardboard-vr-display

danrossi avatar Jul 07 '20 16:07 danrossi

@danrossi thanks for the update; looks like iOS 13 was fixed for the 0.11.0 release, we can try pinning cardboard-vr-display to that upstream (should be currently the same as pinning to the master branch)

jsantell avatar Jul 07 '20 20:07 jsantell

The branch on its own does work. They are claiming its still going to sleep within vr display. Have to debug further.

danrossi avatar Jul 08 '20 03:07 danrossi

I think I found the problem. If I make a pull request it might be complicated as it may be out of sync. There is still IOS 13 detection issues. See this ?

export const isIOS = (function() {
  var isIOS = ((/iP(hone|ad)/i).test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));
  return function() {
    return isIOS;
  };
})();

isMobile I don't think detects IOS 13

if (USE_WAKELOCK && Util.isMobile()) {
    this.wakelock_ = new NoSleep();
  }

danrossi avatar Jul 08 '20 04:07 danrossi