Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[local_auth] support localizedFallbackTitle in IOSAuthMessages #3806

Merged
merged 27 commits into from
Feb 16, 2022

Conversation

furaiev
Copy link
Contributor

@furaiev furaiev commented Apr 12, 2021

Description

Add support localizedFallbackTitle in IOSAuthMessages.

Related Issues

Fixes flutter/flutter#34638

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@google-cla
Copy link

google-cla bot commented Apr 12, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@furaiev
Copy link
Contributor Author

furaiev commented Apr 12, 2021

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Apr 12, 2021
@furaiev
Copy link
Contributor Author

furaiev commented Apr 12, 2021

@stuartmorgan could you please review?

@cyanglaz
Copy link
Contributor

This is pretty similar but does have some improvement of #2616.
CC @stuartmorgan since he already started reviewing this other one.

@stuartmorgan-g stuartmorgan-g self-requested a review April 20, 2021 20:09
Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

Apologies, for the long delay in getting back to this review. Specific comments inline below, but this will also need a test, per the contribution guide. In this case, since it involves native UI, I think the easiest approach would be to add a native unit test that uses a mock LAContext and ensures that the property is set (or not set) correctly based on a constructor method call object. See https://github.com/flutter/plugins/blob/master/packages/local_auth/example/ios/RunnerTests/FLTLocalAuthPluginTests.m

@furaiev
Copy link
Contributor Author

furaiev commented Sep 18, 2021

@stuartmorgan thank you for your review.
I've updated the PR according to your comments but faced an issue with tests.
localizedFallbackTitle isn't passed via the constructor, it is just a LAContext property and I didn't found a way to check if it was assigned or not.
Could you please advise other ways to test it?

@stuartmorgan-g
Copy link
Contributor

stuartmorgan-g commented Sep 18, 2021

localizedFallbackTitle isn't passed via the constructor, it is just a LAContext property

Sorry, "constructor" was a typo in my comment. That should have said a constructed method call object.

and I didn't found a way to check if it was assigned or not.

See OCMVerify.

@furaiev
Copy link
Contributor Author

furaiev commented Sep 18, 2021

Thank you @stuartmorgan ,
I've tried OCMVerify and it is triggered on get but not on set.

OCMVerify([mockAuthContext localizedFallbackTitle]) returns OCMockObject(LAContext): Method localizedFallbackTitle was not invoked.

@stuartmorgan-g
Copy link
Contributor

I've tried OCMVerify and it is triggered on get but not on set.

That's because you are providing the method name of the getter. The setter for a property called localizedFallbackTitle is setLocalizedFallbackTitle:

@furaiev
Copy link
Contributor Author

furaiev commented Sep 19, 2021

thank you @stuartmorgan !
PR is updated

@stuartmorgan-g
Copy link
Contributor

Please make sure that you've resolved all of the comment threads before requesting review next time; most of my comments were ignored in the last round.

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

Please make sure that you've resolved all of the comment threads before requesting review next time; most of my comments were ignored in the last round.

I don't understand why you marked all of comments as resolved while ignoring most of them, even though I specifically re-surfaced them individually and then also called out here that they needed to be addressed.

This review cannot make progress if you are repeatedly, deliberately ignoring my feedback. There is a large backlog of reviews we're trying to work though; I moved forward with this because I expected it to be straightforward to review, but if that's not going to be the case this will need to move to the backlog.

Apologies, I just realized that the issue is that the issues I called out originally existed in two places in the code, and that the one my comment on was addressed but the other wasn't. So on re-review of the current state, it looked like the code I'd commented on previously was still exactly the same, when that's not the case.

@stuartmorgan-g
Copy link
Contributor

@gaaclarke Ping for review.

@stuartmorgan-g
Copy link
Contributor

@furaiev If you can resolve the conflicts quickly we can land this ASAP, otherwise it'll need to wait until after #4699 and #4701 land and be reconciled against those changes.

(I don't expect it would be difficult to resolve either way, so no rush.)

@furaiev
Copy link
Contributor Author

furaiev commented Feb 15, 2022

@stuartmorgan conflicts are resolved. Thanks!

@stuartmorgan-g
Copy link
Contributor

Could you re-run the autoformatter? We're enforcing * alignment in ObjC now.

@furaiev
Copy link
Contributor Author

furaiev commented Feb 15, 2022

@stuartmorgan done

@stuartmorgan-g
Copy link
Contributor

Thanks!

@stuartmorgan-g stuartmorgan-g added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Feb 15, 2022
@fluttergithubbot
Copy link

This pull request is not suitable for automatic merging in its current state.

  • This pull request has changes requested by @stuartmorgan. Please resolve those before re-applying the label.

@fluttergithubbot fluttergithubbot removed the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Feb 15, 2022
@furaiev
Copy link
Contributor Author

furaiev commented Feb 16, 2022

@stuartmorgan it seems like the bot found some unresolved requests but I see only resolved conversations

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

I'm not sure why the bot is unhappy. Let's see if approving again helps...

@stuartmorgan-g stuartmorgan-g added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Feb 16, 2022
@fluttergithubbot
Copy link

This pull request is not suitable for automatic merging in its current state.

  • This pull request has changes requested by @stuartmorgan. Please resolve those before re-applying the label.

@fluttergithubbot fluttergithubbot removed the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Feb 16, 2022
@stuartmorgan-g
Copy link
Contributor

No clue 🤷🏻

Landing manually.

@stuartmorgan-g stuartmorgan-g merged commit 9318efc into flutter:main Feb 16, 2022
debokarmakar pushed a commit to nurture-farm/plugins that referenced this pull request Feb 17, 2022
* google/master: (340 commits)
  [camera]remove "selfRef" for SavePhotoDelegate and ensure thread safety (flutter#4780)
  Roll Flutter from 919d205 to adafd66 (5 revisions) (flutter#4876)
  [google_sign_in] Update platform interface analysis options (flutter#4872)
  Roll Flutter from b623279 to 919d205 (2 revisions) (flutter#4871)
  Roll Flutter from 14a2b13 to b623279 (5 revisions) (flutter#4870)
  [image_picker] Update platform interface analysis options (flutter#4837)
  [ci] Re-enable stable webview Android tests (flutter#4867)
  Roll Flutter from 286c975 to 14a2b13 (1 revision) (flutter#4865)
  [local_auth] support localizedFallbackTitle in IOSAuthMessages (flutter#3806)
  [image_picker] Update app-facing and web analysis options (flutter#4838)
  Roll Flutter from 8386344 to 286c975 (4 revisions) (flutter#4864)
  Roll Flutter from e9f83cf to 8386344 (6 revisions) (flutter#4862)
  [camera] Switch web package to new analysis options (flutter#4834)
  [flutter_plugin_tool] Fix iOS/macOS naming (flutter#4861)
  [webview_flutter] Fix debuggingEnabled on Android (flutter#4859)
  Roll Flutter from ca2a751 to e9f83cf (10 revisions) (flutter#4857)
  fix license (flutter#4858)
  [video_player] add allowBackgroundPlayback option platform interface changes (flutter#4807)
  [video_player] Updated Pigeon version (flutter#4726)
  Roll Flutter from 381cb28 to ca2a751 (5 revisions) (flutter#4850)
  ...

# Conflicts:
#	packages/camera/camera/CHANGELOG.md
#	packages/camera/camera/android/build.gradle
#	packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java
#	packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/MethodCallHandlerImpl.java
#	packages/camera/camera/ios/Classes/CameraPlugin.m
#	packages/camera/camera/ios/camera.podspec
#	packages/camera/camera/lib/camera.dart
#	packages/camera/camera/lib/src/camera_controller.dart
#	packages/camera/camera/pubspec.yaml
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 17, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[local_auth] Is there a support for fallback when a user provides incorrect Touch/Face ID ?
5 participants