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

Add fallback to m.uber for Ride Request Deeplinks #217

Merged
merged 3 commits into from
Feb 6, 2018

Conversation

edjiang
Copy link
Contributor

@edjiang edjiang commented Dec 11, 2017

This change allows deeplinks to specify a fallback if the original deeplink doesn't open properly.

We add a fallbackURLs: [URL] property to the Deeplinking protocol. The BaseDeeplink implements it and automatically adds the Uber-enterprise and Uber-nightly schemes if the original scheme is uber, to make beta testing easier.

The DeeplinkManager is modified so that it uses the fallbacks if opening a deeplink is not successful.

The RequestDeeplink and DeeplinkRequestingBehavior take an additional DeeplinkFallbackType enum in the initializer which defaults to .mobileWeb. Otherwise, it can fall back to .appStore or .none.

@edjiang edjiang requested a review from bobz December 11, 2017 22:46
private let fallbackType: DeeplinkFallbackType

@objc public convenience init(rideParameters: RideParameters = RideParametersBuilder().build()) {
self.init(rideParameters: rideParameters, fallbackType: DeeplinkFallbackType.mobileWeb)
Copy link
Member

Choose a reason for hiding this comment

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

The default should probably be app store, then mobile Web.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel like we should encourage more muber usage, but it's up to the team!

@edjiang edjiang merged commit 1e78320 into develop Feb 6, 2018
@edjiang edjiang deleted the deeplink-fallback branch February 6, 2018 02:37
edjiang added a commit that referenced this pull request Feb 6, 2018
* Add fallback to muber for Ride Request Deeplinks

* Remove erroneous print statement

* Make App Store Deeplink default
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.

2 participants