DeviceMotionEvent.requestPermission() prompt text

Viewed 389

My Cordova app uses the DeviceMotionEvent.requestPermission() function to request the user's permission to access the iOS device's orientation. But the prompt that iOS generates is:

"" Would Like to Access Motion and Orientation

Any idea why the name is an empty string ("")? I assume this is supposed to be the app's name, but why is it empty?

3 Answers

Webkit is trying to attach the hostname here and not finding it. I believe this is due to you using a redirect. Try accessing the page directly.

You need to add your hostname in config.xml

<preference name="scheme" value="MyApp" />
<preference name="hostname" value="MyApp" />

You need to make sure the in your Info.plist file, the following fields are not empty:

  • CFBundleDisplayName
  • CFBundleName
Related