FirebaseStorage Framework Reference Stay organized with collections Save and categorize content based on your preferences.
Classes
The following classes are available globally.
StorageReferencerepresents a reference to a Google Cloud Storage object. Developers canupload and download objects, as well as get/set object metadata, and delete an object at thepath. See theCloud docs for more details.Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRStorageReference)openclassStorageReference:NSObjectFirebase Storage is a service that supports uploading and downloading binary objects,such as images, videos, and other files to Google Cloud Storage. Instances of
Storageare not thread-safe, but can be accessed from any thread.If you call
Storage.storage(), the instance will initialize with the defaultFirebaseApp,FirebaseApp.app(), and the storage location will come from the providedGoogleService-Info.plist.If you provide a custom instance of
FirebaseApp,the storage location will be specified via theFirebaseOptions.storageBucketproperty.Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRStorage)openclassStorage:NSObjectStorageDownloadTaskimplements resumable downloads from an object in Firebase Storage.Downloads can be returned on completion with a completion handler, and can be monitored by attaching observers, or controlled by calling
pause(),resume(), orcancel().Downloads can currently be returned as
Datain memory, or as aURLto a file on disk.Downloads are performed on a background queue, and callbacks are raised on the developer specified
callbackQueuein Storage, or the main queue if left unspecified.Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRStorageDownloadTask)openclassStorageDownloadTask:StorageObservableTask,StorageTaskManagementContains the prefixes and items returned by a
StorageReference.list()call.Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRStorageListResult)openclassStorageListResult:NSObjectClass which represents the metadata on an object in Firebase Storage.
This metadata is returned on successful operations, and can be used to retrieve download URLs, content types, and a Storage reference to the object in question. Full documentation can be found in theGCS documentation
Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRStorageMetadata)openclassStorageMetadata:NSObjectAn extended
StorageTaskproviding observable semantics that can be used for responding to changes in task state.Observers produce a
StorageHandle, which is used to keep track of and remove specific observers at a later date.Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRStorageObservableTask)openclassStorageObservableTask:StorageTaskA superclass to all Storage tasks, including
StorageUploadTaskandStorageDownloadTask, to provide state transitions, event raising, and common storage for metadata and errors.Callbacks are always fired on the developer-specified callback queue. If no queue is specified, it defaults to the main queue. This class is thread-safe.
Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRStorageTask)openclassStorageTask:NSObjectStorageTaskSnapshotrepresents an immutable view of a task.A snapshot contains a task, storage reference, metadata (if it exists),progress, and an error (if one occurred).Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRStorageTaskSnapshot)openclassStorageTaskSnapshot:NSObjectStorageUploadTaskimplements resumable uploads to a file in Firebase Storage.Uploads can be returned on completion with a completion callback, and can be monitored by attaching observers, or controlled by calling
pause(),resume(), orcancel().Uploads can be initialized from
Datain memory, or a URL to a file on disk.Uploads are performed on a background queue, and callbacks are raised on the developer specified
callbackQueuein Storage, or the main queue if unspecified.Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRStorageUploadTask)openclassStorageUploadTask:StorageObservableTask,StorageTaskManagement
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-30 UTC.