i checked latest dropbox , excel ios. in dropbox edit button. on click opens excel's extension can edit file.
after save, changes reflected in dropbox file too.
i want add such button. i'd add such button images open them in available "photo editing" apps.
how check if file (image, xls, doc or other) can opened edit?
code far:
uidocumentpickerviewcontroller *documentpicker = [[uidocumentpickerviewcontroller alloc] initwithurl:url inmode:uidocumentpickermodeexporttoservice]; documentpicker.delegate = self; documentpicker.modalpresentationstyle = uimodalpresentationformsheet; [self presentviewcontroller:documentpicker animated:yes completion:nil]; also tried changing mode uidocumentpickermodemovetoservice...

as per apple docs move local document. user selects external destination. document picker moves document; however, can still access document external document, letting user edit document in place.
but tried 4 modes. did not show excel option.
uidocumentpickermodeimport, uidocumentpickermodeopen, uidocumentpickermodeexporttoservice, uidocumentpickermodemovetoservice
the way communicate other ios apps "locally" using called urlschemes.
this documentation use urlscheme msoffice apps. https://msdn.microsoft.com/en-us/library/office/dn911482.aspx
answering specific question:
how check if file (image, xls, doc or other) can opened edit?
you can use uiapplication method called canopenurl check if current device responds specific urlscheme , if does, can call app edit file. same can applied other apps want open. need see if app have urlscheme support.
remembering in ios 9 need add urls want call during app life in info.plist. otherwise, canopenurl method returno no.
this code illustrates approach. however, search navigation apps. tapping shared friend location in whatsapp.

Comments
Post a Comment