Uber iOS app URL scheme?

I am writing a small “brochure” - an iOS application for iOS, and I want to allow users to use the link to open the Uber application with a pre-filled discount code. I usually do this with a special URL scheme, but I cannot find the documentation that Uber supports for this workflow.

While studying, I noticed that uber:// opens the Uber application, but I was unable to guess how to pass the offer code in the URL.

I assume this is not supported, and it is fine, but that would be nice. Does anyone know the features here?

+5
source share
1 answer

Noted above, but just to close the question.

From Uber support: "You can use uber: // to call an open Uber application, but, unfortunately, we don’t have one convenient or public to connect in the promo code field."

What I did here is put the code in a cardboard and open the application or go to the application store ...

 [[UIPasteboard generalPasteboard] setString:@"THE_PROMO_CODE"]; //be sure this is clearly labeled in the UI to prevent inadventent data loss NSURL* uberURL = [NSURL URLWithString:@"uber://"]; NSURL* appStoreURL = [NSURL URLWithString:@"itms-apps://itunes.apple.com/us/app/uber/id368677368?mt=8"]; if ([[UIApplication sharedApplication] canOpenURL:uberURL]) { [[UIApplication sharedApplication] openURL:uberURL]; } else { [[UIApplication sharedApplication] openURL:appStoreURL]; } 
+7
source

Source: https://habr.com/ru/post/975866/


All Articles