ios - Using the UIDocumentPickerViewController, is it possible to show a default service (Dropbox, Google Drive, etc) on first open like in Slack? -


normally, behavior uidocumentpicker present, user must use "locations" menu on top right switch between services. possible display either "dropbox" or "google drive" first default? if we're "deeplinking" uidocumentpicker service.

it seems slack app able , mymail app wasn't able find api it. ideas?

slack app

instead of using uidocumentpickerviewcontroller, try using uidocumentmenuviewcontroller. here relevant documentation.

uidocumentmenuviewcontroller *documentprovidermenu = [[uidocumentmenuviewcontroller alloc] initwithdocumenttypes:[self utis]                                                      inmode:uidocumentpickermodeimport];  documentprovidermenu.delegate = self; [self presentviewcontroller:documentprovidermenu animated:yes completion:nil]; 

by default, display apps include document provider extension (such dropbox, google drive, icloud, etc.). if user has dropbox or google drive installed on device, these options show automatically.

you can add custom options menu calling addoptionwithtitle:image:order:handler: method.


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -