Skip to content

Conversation

@davidjohnoliver
Copy link
Contributor

This change permits calling AcquireAuthorizationAsync() with an app RootViewController that is a UINavigationController with an empty navigation stack.

The top-level view controller will now be returned, rather than trying to recursively call FindCurrentViewController() on a null VisibleViewController (which causes a NullReferenceException).

How to reproduce the bug

Build the solution at https://github.com/davidjohnoliver/active-directory-Uno and run the iOS head.

This change permits calling AcquireAuthorizationAsync() with an app RootViewController that is a UINavigationController with an empty navigation stack.

The top-level view controller will now be returned, rather than trying to recursively call FindCurrentViewController() on a null VisibleViewController (which causes a NullReferenceException).
@bgavrilMS bgavrilMS requested a review from jennyf19 September 9, 2019 22:39
@bgavrilMS
Copy link
Member

LGTM

@bgavrilMS
Copy link
Member

Contribution is much appreciated @davidjohnoliver ; Please let us know if building / running tests in MSAL was difficult.

@henrik-me
Copy link
Contributor

@MarkZuber @trwalke : seems like the build is failing.
@bgavrilMS : can you pls. help validate the change manually?

@henrik-me
Copy link
Contributor

change looks fine to me

Copy link
Contributor

@henrik-me henrik-me left a comment

Choose a reason for hiding this comment

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

🕐

@davidjohnoliver
Copy link
Contributor Author

Thanks @bgavrilMS , I intended to reply to your question re: tests but forgot.

I did see that there were a few UI tests for iOS, but they seem to only cover the main authentication flow. I didn't know if creating a new UI test was warranted in this case. Let me know if it's something you think should be added.

@bgavrilMS
Copy link
Member

@davidjohnoliver - the UI tests are pretty complicated and we don't expect contributors to write any of those. We don't (currently) run unit tests on mobile platforms, but most of our code is common and is unit tested. Your fix is in the part that can't be unit tested.

I plan to manually validate and merge your change soon. Should go in the next release, which is tentatively end of week.

@bgavrilMS bgavrilMS merged commit 713a36e into AzureAD:master Sep 18, 2019
@michael-hawker michael-hawker mentioned this pull request Sep 19, 2019
@jmprieur jmprieur added this to the 4.3.2 milestone Sep 19, 2019
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.

4 participants