uber / rides-ios-sdk

Uber Rides iOS SDK (beta)
https://developer.uber.com/docs
MIT License
374 stars 124 forks source link

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

Closed edjiang closed 6 years ago

edjiang commented 6 years ago

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.