6
Watch
113
Star
5
Fork
1
Issue

Example app that illustrates how to get open-in-place to work well with iOS document providers.

palmin
palmin
pushedAt 1 month ago

palmin/open-in-place

Swift Platform: iOS Twitter

Open in Place

Example app that illustrates how to get open-in-place to work well with iOS document providers.

It shows how to:

  • invoke the document picker in open mode for files and directories
  • receive open-in-place file references through Drag and Drop
  • use and persist the security scoped URLs the document picker or Drag and Drop gives you
  • work with a directory in a coordinated manner to stay in sync
  • edit a text file in a coordinated manner such that your changes are written safely and such that outside changes appear in the editor automatically
  • use the WorkingCopyUrlService file-provider SDK to fetch information about entries

Using the document picker to open directories will probably only work for iCloud Drive, external drives on iOS 13 and a few third party apps. I am the author of Working Copy and Secure ShellFish that fully supports opening directories in-place. Opening files in-place should be supported by all file providers.

The excellent Textastic has been doing this for a while and so does Codea, iA Writer and Pythonista. My hope is that providing sample code will encourage others to follow suit.

A good place to start is at the top of ListController and EditController.

If you have any questions the easiest way to catch me is on Twitter as @palmin.

ucloud ads