11

How does the Uber driver app receive ride requests even when the app is in the background?

It cannot be push notifications because:

a) a background push notification won't be delivered to the app if the app was terminated by the user

b) background push notifications are just too unreliable in terms of time of delivery to the app to be usable for an app where immediate receipt of the drive requests is of paramount importance (if the device is sleeping a background push may not be delivered to the app for several hours)

c) if notifications are disabled for the Uber app then it can still receive the ride requests. Hence ride requests cannot be being implemented using either background nor foreground push notifications.

Voip push notifications will wake a terminated app and don't have the same delays that can occur with regular push notifications so they are ideal to use for a ride request, yet as far as I know Uber apps do not provide any voip functionality to the user, therefore if the Uber Driver app is using the voip background mode then the app should never have been accepted for the app store as it is misusing the voip background mode.

So how does the Uber Driver app implement reliable and timely receipt of ride requests?

Gruntcakes
  • 37,738
  • 44
  • 184
  • 378
  • Are you an uber driver? Or I guess what I'm really asking is: how do you know the app still receives notifications if it's closed? – dudeman Apr 17 '16 at 02:28
  • I'm not, but somebody I know who is tech savvy is and they terminated the app and it received a request. Also if you look at this question (http://stackoverflow.com/questions/36669772/show-an-alert-when-ios-app-is-in-the-background?noredirect=1#comment60933935_36669772), notifications are turned off yet the app is displaying some sort of alert while in the background which is not possible for regular background apps. That alert is not a push notification because the navigation bar does not change like that for push notifications. – Gruntcakes Apr 17 '16 at 02:36
  • @ChromiumDioxide The blue bar shown in that link indicates that the Uber app is setup for background navigation. – rmaddy Apr 17 '16 at 02:48
  • @rmaddy what do you mean by that? I can't see any search results googling for terms like ios and background navigation. – Gruntcakes Apr 17 '16 at 02:58
  • 1
    Look at the image at the top of the question you linked. See the blue bar? That is shown for any app that is currently providing driving directions (routing). See the [Providing Directions](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/ProvidingDirections/ProvidingDirections.html) section of the [Location and Maps Programming Guide](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/) – rmaddy Apr 17 '16 at 03:06
  • @rmaddy. Thanks for the link, but how can the Uber app be receiving driver requests from a server if its in the background and the user has disabled notifications for the app? I didn't see anything in the documentation regarding receiving remote routing requests. – Gruntcakes Apr 17 '16 at 03:16
  • I have no idea since I have no experience writing routing apps or using push notifications. I just wanted to point out the fact that the Uber app is a routing app. This means it will keep running in the background. It will likely be automatically restarted even if the user kills it. All of this may allow it to get notifications better than "regular" apps. But I don't know for sure. Just info you can research. – rmaddy Apr 17 '16 at 03:19
  • I'll do some experiments, see if the addition of routing results in background pushes being always delivered immediately. – Gruntcakes Apr 17 '16 at 03:20
  • Hmm, @rmaddy do you know of apps that *do* restart themselves even if the user kills it? I've never heard of this... – nhgrif Apr 17 '16 at 16:09
  • @nhgrif It seems I was mistaken. I thought a routing app got restarted but I just tried it and if I explicitly kill the routing app after putting it in the background, it is not restarted. My bad. – rmaddy Apr 17 '16 at 16:14
  • Gotcha. Google Maps is the only routing app I use and explicitly killing it doesn't restart. I wasn't sure if they were just being nice and opting out of the auto-restart. – nhgrif Apr 17 '16 at 16:18
  • I added routing to an existing app then sent it some pushes after terminating it but its not restarted under any circumstances. But a terminated voip app does get restarted. Hence if Uber can receive a ride request after being terminated they must be using voip, and therefore should not have been permitted to be in the app store. – Gruntcakes Apr 17 '16 at 16:25
  • Its not yet possible to determine if routing apps always get background pushes immediately, I did some experiments but the routing app and non routing app showed the same behaviour - which was that all pushes were delievered immediatly. However this was using the sandbox server, which paradoxically is better than the production server. I'm going to repeat the experiments with the production server. – Gruntcakes Apr 17 '16 at 16:29
  • If you have the Uber app, unzip it and look at the Info.plist and see what background modes it uses. – rmaddy Apr 17 '16 at 18:33
  • @rmaddy, I've been following this thread and had already tried to look at Ubers Info.plist. But after unzipping it I couldn't find that file, I found other plists (but they don't have required background modes in them), but not the Info.plist. Where is it supposed to be located in an unzipped app bundle? – Gruntcakes Apr 18 '16 at 20:35
  • @Woofbeans for any ipa file, it will be at the top level along with the binary and all the resources. – rmaddy Apr 18 '16 at 20:36
  • @Woofbeans I just downloaded the app and looked at the Info.plist. The only background mode it has is for remove notifications. – rmaddy Apr 18 '16 at 20:42
  • @rmaddy. Got it but XCode won't open it as it says its not in the correct format, and its no good reading it using a text or hex editor as the contents aren't even remotely human readable. I tried initially just using the Mac's show contents for the .ipa, and then also renamed it to .zip so it could be unzipped, but can't read the Info.plist contents with either approach. – Gruntcakes Apr 18 '16 at 20:47
  • @Woofbeans Strange. I ran iTunes. Went to the app store and download the Uber app. I then went into ~/Music/iTunes/iTunes Media/Mobil Applications and unzipped "Uber 2.130.0.ipa". I then went into Payload/UberClient.app and pulled Info.plist into a plain old text editor. – rmaddy Apr 18 '16 at 20:52
  • @rmaddy. I used iMazing to transfer the app from the phone to Mac, not sure how that could effect the ability to read the plist though. – Gruntcakes Apr 18 '16 at 21:12
  • Did you ever figure this out? – arao6 Sep 12 '20 at 16:49
  • Did you figure this out? – King Sep 12 '22 at 05:00

0 Answers0