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

feat(ios): Add new iOS15 media capture permission delegate #5196

Merged

Conversation

samydoesit
Copy link
Contributor

@samydoesit samydoesit commented Nov 2, 2021

Delegates media capture permissions to the app and remembers the user's decision for iOS15.

https://developer.apple.com/documentation/webkit/wkuidelegate/3763087-webview#discussion

Thanks and credits to @7freaks-otte who found the solution. :)
https://forum.ionicframework.com/t/prevent-for-reprompting-webrtc-webview-permissions-ios15/215240/2?u=samydoesit

You can test these changes using my getusermedia demo case when build on Xcode13 -> https://github.com/samydoesit/capacitor-getusermedia-test

@samydoesit
Copy link
Contributor Author

Looks like that the CI should use latest Xcode13 on macos-11. actions/runner-images#4060

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello.
Thanks for the PR!

Since we still need to support Xcode 12 and the method is not available there, the function needs to be wrapped inside a #if compiler(>=5.5) as proposed since that's the swift version shipped on Xcode 13, so that code won't run on Xcode 12 but the build won't fail as it does now.

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
It looks good, we will merge once we start working on next minor release, might take a few weeks, but will be included.

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

Successfully merging this pull request may close these issues.

None yet

3 participants