-
Notifications
You must be signed in to change notification settings - Fork 292
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
Removed Venmo fallbacktoWeb
#1434
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to change the base branch to v7
. I think we can also clean up the logic in BTVenmoAppSwitchRedirectURL
to only use universal links.
Like Jax mentioned, since this change removes something from the SDKs public interface, it will break a merchant app who might be integrating with this property. So this PR should target |
I totally forgot to change the target branch. Just fixed! |
TODO: Fix failing tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like when we changed the base branch, that branch wasn't up to date with the latest from main. We will need to merge the latest from main
into v7
then merge the latest from v7
into your branch to remove that portion of the diff from this PR.
Updated. How often do we merge changes from main branch to feature branches? |
…v7-venmo-universal-link
…o v7-venmo-universal-link # Conflicts: # CHANGELOG.md
I normally try to update long lived feature branches once a week. If a large feature is merged in we may want to update it sooner, but that's generally what I've done previously. |
…e/braintree_ios into v7-venmo-universal-link
@@ -100,7 +99,7 @@ import BraintreeCore | |||
} | |||
|
|||
do { | |||
_ = try self.verifyAppSwitch(with: configuration, fallbackToWeb: request.fallbackToWeb) | |||
_ = try self.verifyAppSwitch(with: configuration) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does verifyAppSwitch need to bother with returning any value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed it would still need to return true
since verifyAppSwitch
checks if Venmo is enabled and if Venmo app is installed. Let me know if you think it's ok to remove the Bool return otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If verifyAppSwitch
is only being used here I think it should be safe. I think the function will just throw an error if not enabled, and the returned value isn't being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update BTVenmoAppSwitchRedirectURL
to only have references to the universal link method?
Good call, I've removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we able to verify things are working as expected with these changes? If you have the Venmo app installed it should switch to the app and back and if the app is removed we should fallback to the default browser.
…v7-venmo-universal-link # Conflicts: # CHANGELOG.md # Demo/Application/Features/VenmoViewController.swift # Sources/BraintreeVenmo/BTVenmoClient.swift # Sources/BraintreeVenmo/BTVenmoRequest.swift # V7_MIGRATION.md
Yep :) It looks great Screen.Recording.2024-10-24.at.5.47.35.PM.mov |
…v7-venmo-universal-link
…intree_ios into v7-venmo-universal-link"" This reverts commit 2d0d7e0.
…v7-venmo-universal-link
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving ahead of time. Just this final comment on my end: #1434 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
} catch { | ||
self.notifyFailure(with: error, completion: completion) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will want to add back this return, my guess is that this is why these tests are failing:
BTVenmoClient_Tests.testTokenize_whenVenmoRequest_setsVaultAnalyticsTag()
BTVenmoClient_Tests.testTokenizeVenmoAccount_whenVenmoConfigurationDisabled_callsBackWithError()
BTVenmoClient_Tests.testTokenizeVenmoAccount_whenVenmoConfigurationDisabled_callsBackWithError()
BTVenmoClient_Tests.testTokenizeVenmoAccount_whenVenmoConfigurationDisabled_callsBackWithError()
BTVenmoClient_Tests.testTokenizeVenmoAccount_whenVenmoConfigurationMissing_callsBackWithError()
BTVenmoClient_Tests.testTokenizeVenmoAccount_whenVenmoConfigurationMissing_callsBackWithError()
BTVenmoClient_Tests.testTokenizeVenmoAccount_whenVenmoConfigurationMissing_callsBackWithError()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added it back and tested locally. Seems like removing return
was the cause of the failed tests
demoApp = XCUIApplication(bundleIdentifier: "com.braintreepayments.Demo") | ||
demoApp.launchArguments.append("-EnvironmentSandbox") | ||
demoApp.launchArguments.append("-ClientToken") | ||
demoApp.launchArguments.append("-Integration:VenmoViewController") | ||
demoApp.launch() | ||
} | ||
|
||
func testTokenizeVenmo_whenSignInSuccessfulWithPaymentContext_returnsNonce() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a TODO + JIRA ticket for investigating what we want to do about UI tests now that our MockVenmo app will no longer work. (Also likely removing the MockVenmo app entirely, unless we can rig it to mimic Venmo's universal link)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…v7-venmo-universal-link # Conflicts: # CHANGELOG.md
…e/braintree_ios into v7-venmo-universal-link
Removed Venmo
fallbacktoWeb
opt-in to default to universal linkSummary of changes
fallbacktoWeb
and replaced with universal linkChecklist
Authors