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

Inconsistent PersonaInlineNavigationState and duplicate delegate calls in PersonInlineViewController #8

Closed
protocorn93 opened this issue Dec 17, 2024 · 4 comments

Comments

@protocorn93
Copy link

Hello again 😅

I’m currently integrating PersonInlineViewController into my app flow because I need inline functionality.

Following my previous report, the access control of the PersonaInlineNavigationState properties was updated, allowing me to adjust the navigation bar button items in my UINavigationController. However, I’ve encountered an issue where the PersonaInlineNavigationState returned by the delegate method behaves inconsistently.

In the attached video, when navigating back from the Upload Photo ID screen to the Country Selection screen, the PersonaInlineNavigationState returned by the delegate method is irregular. I expect backButtonEnabled to be true, but it is often returned as false. Occasionally, it does return true as expected, but only sporadically.

Additionally, even though I only call the back method once, the delegate method is sometimes called twice unexpectedly.

I have attached a video demonstrating the issue.

Should the inline flow be avoided for now?

Thank you for looking into this!

@jacoblange-dev
Copy link
Collaborator

jacoblange-dev commented Dec 19, 2024

hey sorry for slow response.

I'll write a quick sample implementation in our public demo app.

the delegate method is sometimes called twice unexpectedly.

this sounds like it might be a leaked handler? I can test though.

Should the inline flow be avoided for now?

to be honest, you are the first to attempt to integrate with it 😅 I can help you work out the issues with it and it should be fine to use.

@jacoblange-dev
Copy link
Collaborator

ok I'm going to push some fixes out soon. the main issue is a race between https://developer.apple.com/documentation/uikit/uinavigationcontroller/setviewcontrollers(_:animated:) and https://developer.apple.com/documentation/uikit/uinavigationcontroller/topviewcontroller. it turns out topViewController depends on when the animation completes (even though viewControllers has already been changed). additionally there's some padding issues when using inline mode that I'm going to correct.

Additionally, even though I only call the back method once, the delegate method is sometimes called twice unexpectedly.

this is actually expected after testing, reason being is we first navigate to a loading view controller then we navigate to the previous step. because our flow is dynamic, the server determines the where the flow goes when the user decides to go back, so we need a loading screen while we make a network request. when navigating forward, we usually keep the loading state on the same screen (this doesn't work as well for back buttons).

@protocorn93
Copy link
Author

I understand. I believe that if the inline feature can be used, we can create a more seamless identity verification flow within our app. Currently, I don't have control over the screen when the process is completed, canceled, or encounters an error, which feels a bit unnatural. I hope the inline feature stabilizes soon.

Thanks

@jacoblange-dev
Copy link
Collaborator

hello, sorry I wasn't able to follow up sooner. We published a fix for the duplicate state issue today in v2.25.2. Additionally, I've implemented an example project that showcases how to use inline mode persona-id/persona-ios-sdk@main...jacob/inline-example

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

No branches or pull requests

2 participants