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

[Open Dev] Provide Default View Controller #1212

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Conversation

jaxdesmarais
Copy link
Contributor

Summary of changes

Right now if the FeatureViewController cannot be found, a message is displayed "Demo not available", by providing a default as PayPalWebCheckoutViewController we can load a View Controller instead of returning nil without a super clear message to the user. This is mainly helpful for first time installs, when nothing is stored in UserDefaults yet or when switching between feature branches where the demo exists on a branch but not on main.

Checklist

  • [ ] Added a changelog entry

Authors

@jaxdesmarais jaxdesmarais requested a review from a team as a code owner March 8, 2024 22:18
@@ -188,7 +188,7 @@ class ContainmentViewController: UIViewController {

private func instantiateViewController(with authorization: String) -> BaseViewController? {
guard let integrationName = UserDefaults.standard.string(forKey: "BraintreeDemoSettingsIntegration") else {
return nil
return PayPalWebCheckoutViewController(authorization: authorization)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

PayPal Web made the most sense as the default to me, but if someone feels strongly that we should default to one of the other features, happy to do so!

@jaxdesmarais jaxdesmarais merged commit 5fd46e4 into main Mar 13, 2024
7 checks passed
@jaxdesmarais jaxdesmarais deleted the default-demo-app branch March 13, 2024 19:12
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.

3 participants