StorageLocation
Cross-platform location to save a PDF document.
Each variant maps to a sensible directory on every platform — see the KDoc on each member for the exact path on Android / iOS. Use the variant that matches the user's expectation rather than the platform's filesystem layout: Downloads always lands in a place users can find from a file manager, even when the platform's "Downloads" doesn't exist in the traditional sense.
On Android, writing to public locations (Downloads, Documents) uses MediaStore on API 29+ (no permission required) and falls back to raw filesystem on older releases (which requires the app to declare WRITE_EXTERNAL_STORAGE and obtain runtime permission).
On iOS, only the app's sandbox is reachable. Downloads therefore maps to the Documents directory; if the app advertises UIFileSharingEnabled
LSSupportsOpeningDocumentsInPlacein itsInfo.plistthe user can pick the file up from the Files app.
Inheritors
Types
App-specific external storage. On Android this is visible from the File Manager under Android/data/<pkg>/files/ and survives app uninstallation only on Android 11 and below. iOS does not have this concept; files land in the standard Documents directory there.
App-private persistent storage. Files persist for the lifetime of the app installation but are not visible to the user. Best for documents the app needs to keep but the user shouldn't manage.
App-private cache directory. Files here may be removed by the OS when the device runs low on space. Best for previews, throwaway temporary documents, or anything the user does not need to persist.
Caller-supplied absolute path. Two shapes are accepted:
Public Documents folder. Same Android / iOS mapping as Downloads, targeting MediaStore.Files with the Documents/ relative path on Android.
Public Downloads folder.
Temporary directory. On iOS this is NSTemporaryDirectory() and is cleared by the system across launches; on Android it shares Cache semantics.