Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Adds customViewWrapper optional to Magic SDK to Permit External Actions #41

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Ariflo
Copy link
Contributor

@Ariflo Ariflo commented Mar 19, 2024

Adds a customViewWrapper optional parameter to the Magic SDK to allow developers to pass in their own UIViewController and permit them to setup custom actions like dismiss Magic's Webview with external methods like externalDismissLoginView as requested in PR #39

@Ariflo Ariflo self-assigned this Mar 19, 2024
@Ariflo Ariflo mentioned this pull request Mar 19, 2024
// MARK: - External Dismiss WebView
public func externalDismissLoginView() {
do {
try self.provider.overlay.detachWebViewFromCustomView()
Copy link
Member

Choose a reason for hiding this comment

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

Would this call recycle webview?

Copy link
Contributor Author

@Ariflo Ariflo Mar 19, 2024

Choose a reason for hiding this comment

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

Yes, that's the point, the developer wants to remove the WebView from the view hierarchy. See his comments here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered potentially naming this method something like authOnlyExternalDismissLoginView 🤔 Perhaps add some more comments to inform web3 devs that they should not use this method.

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

Successfully merging this pull request may close these issues.

2 participants