Device Motion permission on iOS

Not favoritedFavorited Favorited 0 favourites
  • 2 posts
From the Asset Store
A futuristic device, can be used as radarscreen, optionscreen, infodisplay, research device, ...
  • Hi Construct Team,

    I’m using Device Motion in a Construct 3 game on iOS. The permission dialog appears again every time the app is relaunched, even after the user already allowed it.

    Is there any way to make this dialog appear only once?

    Thank you.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This was the solution a couple of years ago for the microphone permission prompt appearing every time. It could still be relevant.

    In the exported XCode project, you need to add a function to this source file: "CordovaLib\Classes\Private\Plugins\CDVWebViewEngine\CDVWebViewUIDelegate.m"

    Function to add:

    - (void)webView:(WKWebView )webView requestMediaCapturePermissionForOrigin:(WKSecurityOrigin)origin initiatedByFrame:(WKFrameInfo *)frame type:(WKMediaCaptureType)type decisionHandler:(void (^)(WKPermissionDecision))decisionHandler API_AVAILABLE(ios(15.0)) API_AVAILABLE(ios(15.0)){ decisionHandler(WKPermissionDecisionGrant); }

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)