Platforms to show: All Mac Windows Linux Cross-Platform

Back to UIDocumentPickerMBS class.

UIDocumentPickerMBS.Constructor(Mode as Integer, contentTypesOrURLs() as String, asCopy as Boolean = true)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS iOS Plugin 22.3 ❌ No ❌ No ❌ No ✅ Yes iOS only
Initializes and a document picker/exporter.
Example
var types() As String
types.append “public.image”
types.append "public.text"
types.append "public.rtf"
types.append "com.adobe.pdf"
types.append "com.microsoft.excel.xls" // Old Excel Format
types.append "org.openxmlformats.spreadsheetml.sheet" // New Excel Format
types.append "com.microsoft.word.doc" // Old Word Format
types.append "org.openxmlformats.wordprocessingml.document" // New Word Format
types.append "com.apple.iwork.pages.sffpages"
types.append "com.apple.iwork.numbers.sffnumbers"
types.append "com.apple.iwork.keynote.sffkey"

var picker as New UIDocumentPicker(UIDocumentPicker.ModeImport, types, True)
picker.Screen = Self
picker.shouldShowFileExtensions = True
picker.Present

// you need to keep picker in a property!

For Mode = ModeImport or ModeOpen, please pass array of content types. That may be mime types (e.g. "image/jpeg"), file extensions with dot prefix (e.g. ".jpg") or UTIs (e.g. "public.archive"). For iOS 13 and older, please pass only UTIs.

For Mode = ModeExportToService or ModeMoveToService takes in contentTypesOrURLs an array of file URLs to export.

AsCopy defines whether you like to get a copy on import (copied to temp folder) and copies your file for export. This way you can use temporary folders and later delete them when you are done.

UIDocumentPickerMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS iOS Plugin 22.3 ❌ No ❌ No ❌ No ✅ Yes iOS only
The destructor.

UIDocumentPickerMBS.Dismiss

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS iOS Plugin 22.3 ❌ No ❌ No ❌ No ✅ Yes iOS only
Dismisses the controller.

UIDocumentPickerMBS.Present

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Navigation MBS iOS Plugin 22.3 ❌ No ❌ No ❌ No ✅ Yes iOS only
Presents the controller.

The items on this page are in the following plugins: MBS iOS Plugin.


The biggest plugin in space...