Skip to content
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

Streamline permission requesting / handling on mobile #1272

Open
hakoptak opened this issue Jul 28, 2020 · 0 comments
Open

Streamline permission requesting / handling on mobile #1272

hakoptak opened this issue Jul 28, 2020 · 0 comments

Comments

@hakoptak
Copy link

Describe the project you are working on:
A microphone-driven mobile game.

Describe the problem or limitation you are having in your project:
Because my game needs access to the microphone, Apple demands asking for permission. This feature already implemented in the Android OS api, but not iOS.

Source:
https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios?language=objc

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
To make this work the following methods must be implemented:

  • bool request_permission(string)
  • bool request_permissions()
  • string[] get_granted_permissions()

However, it would be cleaner if the mobile OS api could be refactored into:

  • bool request_permission(string)
  • bool is_permission_granted(string)

This makes handling permissions more specific. Also, the existing request_permissions() is opaque.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Like in the Android os api, we could start with implementing the RECORD_AUDIO permission in iphone_os.h and iphone_os.mm.

Source: https://developer.apple.com/documentation/avfoundation/avaudiosession/1616601-requestrecordpermission?language=objc

If this enhancement will not be used often, can it be worked around with a few lines of script?:
This is a core feature.

Is there a reason why this should be core and not an add-on in the asset library?:
This is a system feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants