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

Bugfix FXIOS-9906 - Send ok response to can_link_account channel message #21877

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

jonalmeida
Copy link
Contributor

📜 Tickets

Jira ticket
Github issue

💡 Description

Responds to FxA's can_link_account WebChannel message with an { "ok": true } as a placeholder until #21873 is fixed.

Tested this against a local FxA server by removing this line in the sign-in flow, and using this patch in iOS to make the WKWebView inspectable from Safari Desktop:

diff --git a/firefox-ios/RustFxA/FxAWebViewController.swift b/firefox-ios/RustFxA/FxAWebViewController.swift
index 08697e292..b2513dbe0 100755
--- a/firefox-ios/RustFxA/FxAWebViewController.swift
+++ b/firefox-ios/RustFxA/FxAWebViewController.swift
@@ -59,6 +59,9 @@ class FxAWebViewController: UIViewController {
         webView.accessibilityLabel = .FxAWebContentAccessibilityLabel
         webView.scrollView.bounces = false  // Don't allow overscrolling.
         webView.customUserAgent = FxAWebViewModel.mobileUserAgent
+        if #available(iOS 16.4, *) {
+            webView.isInspectable = true
+        }
 
         self.logger = logger
 

No unit tests added for now. Would like some examples that I could follow, thanks!

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

@jonalmeida
Copy link
Contributor Author

cc: @LZoog as an FxA reviewer.

Copy link

@LZoog LZoog left a comment

Choose a reason for hiding this comment

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

Thanks, Jonathan. Just noting that I didn't test this locally but the web channel message name matches FxA and this looks like exactly what we want for now so I'll r+ this from the FxA side. 🎉

@mattreaganmozilla
Copy link
Collaborator

No unit tests added for now. Would like some examples that I could follow, thanks!

I'm checking to see if we have any existing unit tests that could be useful references, you could also try asking in the ios dev channel (someone there might know).

@jonalmeida
Copy link
Contributor Author

@mattreaganmozilla what can I do next to get this landed (based on cyndi's comment in the other PR)?

@OrlaM
Copy link
Contributor

OrlaM commented Sep 24, 2024

The build fails with a swiftlint violation. Once fixed we should be able to get it merged.

@jonalmeida
Copy link
Contributor Author

The build fails with a swiftlint violation. Once fixed we should be able to get it merged.

Thanks for catching, done!

@cyndichin
Copy link
Contributor

@jonalmeida can you rebase this with latest main? Seeing some issues in our CI / CD that should be resolve by getting the latest changes. Let me know and can re-run bitrise again. Thanks!

@jonalmeida
Copy link
Contributor Author

Done!

@mobiletest-ci-bot
Copy link

Messages
📖 Project coverage: 32.44%
📖 Edited 1 files
📖 Created 0 files

Client.app: Coverage: 30.11

File Coverage
FxAWebViewModel.swift 15.32% ⚠️

Generated by 🚫 Danger Swift against 40ce954

@FilippoZazzeroni FilippoZazzeroni merged commit 7c4d0c1 into mozilla-mobile:main Sep 30, 2024
10 checks passed
@jonalmeida jonalmeida deleted the issue-21723 branch October 2, 2024 03:35
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.

7 participants