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

Closure to deliver back permission authorization status #33

Closed
jevonmao opened this issue Feb 20, 2021 · 0 comments · Fixed by #65
Closed

Closure to deliver back permission authorization status #33

jevonmao opened this issue Feb 20, 2021 · 0 comments · Fixed by #65
Labels
enhancement Feature request that enhances features and will be worked on good first issue Good for newcomers
Milestone

Comments

@jevonmao
Copy link
Owner

jevonmao commented Feb 20, 2021

Is your feature request related to a problem? Please describe.
It will be really helpful if there can be a closure to deliver back the results of the permission request. I might want to program certain actions to take place after the permission request, and I want to know what permissions are denied, and what permissions are allowed, along with any error in the process.

Describe the solution you'd like
Ideal closure would be integrated with the onDisappear, pass back a structure of JMResult which encapsulates each individual permission's authorization status, and error if any error were to occur.

Describe alternatives you've considered
N/A

Additional context
Ideal implementation:

        .JMAlert(showModal: $showModal,
                 for: [.camera, .locationAlways],
                 autoDismiss: true,
                 onAppear: {},
                 onDisappear: {(result: [JMResult], error: Error) in
                    guard error == nil else {print(error)}
                    if cameraAuth = result[0].authorizationStatus
                 })
    }
@jevonmao jevonmao added enhancement Feature request that enhances features and will be worked on good first issue Good for newcomers labels Feb 20, 2021
@jevonmao jevonmao added this to the 1.3.0 release milestone Feb 20, 2021
@jevonmao jevonmao added the open label Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request that enhances features and will be worked on good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant