Stay organized with collections
Save and categorize content based on your preferences.
FIRStorage
@interfaceFIRStorage:NSObject
Firebase Storage is a service that supports uploading and downloading binary objects,
such as images, videos, and other files to Google Cloud Storage. Instances of Storage
are not thread-safe, but can be accessed from any thread.
If you call Storage.storage(), the instance will initialize with the default FirebaseApp,
FirebaseApp.app(), and the storage location will come from the provided
GoogleService-Info.plist.
If you provide a custom instance of FirebaseApp,
the storage location will be specified via the FirebaseOptions.storageBucket property.
A method used to create Storage instances initialized with a custom storage bucket URL.
Any StorageReferences generated from this instance of Storage will reference files
and directories within the specified bucket.
\param url The gs:// URL to your Firebase Storage bucket.
returns:
A Storage instance, configured with the custom storage bucket.
Creates an instance of Storage, configured with a custom FirebaseApp. StorageReferences
generated from a resulting instance will reference files in the Firebase project
associated with custom FirebaseApp.
\param app The custom FirebaseApp used for initialization.
returns:
A Storage instance, configured with the custom FirebaseApp.
Creates an instance of Storage, configured with a custom FirebaseApp and a custom storage
bucket URL.
\param app The custom FirebaseApp used for initialization.
\param url The gs:// url to your Firebase Storage bucket.
returns:
the Storage instance, configured with the custom FirebaseApp and storage bucket URL.
Specify the maximum upload chunk size. Values less than 256K (262144) will be rounded up to 256K. Values
above 256K will be rounded down to the nearest 256K multiple. The default is no maximum.
Creates a StorageReference given a gs://, http://, or https:// URL pointing to a
Firebase Storage location. For example, you can pass in an https:// download URL retrieved from
StorageReference.downloadURL(completion:) or the gs:// URL from
StorageReference.description.
\param url A gs // or https:// URL to initialize the reference with.
throws:
Throws a fatal error if url is not associated with the FirebaseApp used to initialize
this Storage instance.
returns:
An instance of StorageReference at the given child path.
Creates a StorageReference initialized at a location specified by the path parameter.
\param path A relative path from the root of the storage bucket,
for instance @“path/to/object”.
returns:
An instance of StorageReference pointing to the given path.
Configures the Storage SDK to use an emulated backend instead of the default remote backend.
This method should be called before invoking any other methods on a new instance of Storage.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-08-23 UTC."],[],[],null,["# FirebaseStorage Framework Reference\n\nFIRStorage\n==========\n\n\n @interface FIRStorage : NSObject\n\nFirebase Storage is a service that supports uploading and downloading binary objects,\nsuch as images, videos, and other files to Google Cloud Storage. Instances of `Storage`\nare not thread-safe, but can be accessed from any thread.\nIf you call `Storage.storage()`, the instance will initialize with the default `FirebaseApp`,\n`FirebaseApp.app()`, and the storage location will come from the provided\n`GoogleService-Info.plist`.\nIf you provide a custom instance of `FirebaseApp`,\nthe storage location will be specified via the `FirebaseOptions.storageBucket` property.\n- `\n ``\n ``\n `\n\n ### [+storage](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(cm)storage)\n\n `\n ` \n The default `Storage` instance.\n\n returns:\n An instance of `Storage`, configured with the default `FirebaseApp`. \n\n #### Declaration\n\n Objective-C \n\n + (FIRStorage *_Nonnull)storage;\n\n- `\n ``\n ``\n `\n\n ### [+storageWithURL:](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(cm)storageWithURL:)\n\n `\n ` \n A method used to create `Storage` instances initialized with a custom storage bucket URL.\n Any `StorageReferences` generated from this instance of `Storage` will reference files\n and directories within the specified bucket.\n \\\\param url The `gs://` URL to your Firebase Storage bucket.\n\n returns:\n A `Storage` instance, configured with the custom storage bucket. \n\n #### Declaration\n\n Objective-C \n\n + (FIRStorage *_Nonnull)storageWithURL:(NSString *_Nonnull)url;\n\n- `\n ``\n ``\n `\n\n ### [+storageForApp:](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(cm)storageForApp:)\n\n `\n ` \n Creates an instance of `Storage`, configured with a custom `FirebaseApp`. `StorageReference`s\n generated from a resulting instance will reference files in the Firebase project\n associated with custom `FirebaseApp`.\n \\\\param app The custom `FirebaseApp` used for initialization.\n\n returns:\n A `Storage` instance, configured with the custom `FirebaseApp`. \n\n #### Declaration\n\n Objective-C \n\n + (FIRStorage *_Nonnull)storageForApp:(FIRApp *_Nonnull)app;\n\n- `\n ``\n ``\n `\n\n ### [+storageForApp:URL:](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(cm)storageForApp:URL:)\n\n `\n ` \n Creates an instance of `Storage`, configured with a custom `FirebaseApp` and a custom storage\n bucket URL.\n \\\\param app The custom `FirebaseApp` used for initialization.\n\n \\\\param url The `gs://` url to your Firebase Storage bucket.\n\n returns:\n the `Storage` instance, configured with the custom `FirebaseApp` and storage bucket URL. \n\n #### Declaration\n\n Objective-C \n\n + (FIRStorage *_Nonnull)storageForApp:(FIRApp *_Nonnull)app\n URL:(NSString *_Nonnull)url;\n\n- `\n ``\n ``\n `\n\n ### [app](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(py)app)\n\n `\n ` \n The `FirebaseApp` associated with this Storage instance. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, strong, readonly) FIRApp *_Nonnull app;\n\n- `\n ``\n ``\n `\n\n ### [maxUploadRetryTime](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(py)maxUploadRetryTime)\n\n `\n ` \n The maximum time in seconds to retry an upload if a failure occurs.\n Defaults to 10 minutes (600 seconds). \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic) NSTimeInterval maxUploadRetryTime;\n\n- `\n ``\n ``\n `\n\n ### [maxDownloadRetryTime](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(py)maxDownloadRetryTime)\n\n `\n ` \n The maximum time in seconds to retry a download if a failure occurs.\n Defaults to 10 minutes (600 seconds). \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic) NSTimeInterval maxDownloadRetryTime;\n\n- `\n ``\n ``\n `\n\n ### [maxOperationRetryTime](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(py)maxOperationRetryTime)\n\n `\n ` \n The maximum time in seconds to retry operations other than upload and download if a failure occurs.\n Defaults to 2 minutes (120 seconds). \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic) NSTimeInterval maxOperationRetryTime;\n\n- `\n ``\n ``\n `\n\n ### [uploadChunkSizeBytes](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(py)uploadChunkSizeBytes)\n\n `\n ` \n Specify the maximum upload chunk size. Values less than 256K (262144) will be rounded up to 256K. Values\n above 256K will be rounded down to the nearest 256K multiple. The default is no maximum. \n\n #### Declaration\n\n Swift \n\n @objc\n public var uploadChunkSizeBytes: Int64\n\n- `\n ``\n ``\n `\n\n ### [callbackQueue](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(py)callbackQueue)\n\n `\n ` \n A `DispatchQueue` that all developer callbacks are fired on. Defaults to the main queue. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, strong) dispatch_queue_t _Nonnull callbackQueue;\n\n- `\n ``\n ``\n `\n\n ### [-reference](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(im)reference)\n\n `\n ` \n Creates a `StorageReference` initialized at the root Firebase Storage location.\n\n returns:\n An instance of `StorageReference` referencing the root of the storage bucket. \n\n #### Declaration\n\n Objective-C \n\n - (../Classes/FIRStorageReference.html *_Nonnull)reference;\n\n- `\n ``\n ``\n `\n\n ### [-referenceForURL:](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(im)referenceForURL:)\n\n `\n ` \n Creates a StorageReference given a `gs://`, `http://`, or `https://` URL pointing to a\n Firebase Storage location. For example, you can pass in an `https://` download URL retrieved from\n `StorageReference.downloadURL(completion:)` or the `gs://` URL from\n `StorageReference.description`.\n \\\\param url A gs // or https:// URL to initialize the reference with.\n\n throws:\n Throws a fatal error if `url` is not associated with the `FirebaseApp` used to initialize\n this Storage instance.\n\n returns:\n An instance of StorageReference at the given child path. \n\n #### Declaration\n\n Objective-C \n\n - (../Classes/FIRStorageReference.html *_Nonnull)referenceForURL:(NSString *_Nonnull)url;\n\n- `\n ``\n ``\n `\n\n ### [-referenceWithPath:](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(im)referenceWithPath:)\n\n `\n ` \n Creates a `StorageReference` initialized at a location specified by the `path` parameter.\n \\\\param path A relative path from the root of the storage bucket,\n for instance @\"path/to/object\".\n\n returns:\n An instance of `StorageReference` pointing to the given path. \n\n #### Declaration\n\n Objective-C \n\n - (../Classes/FIRStorageReference.html *_Nonnull)referenceWithPath:(NSString *_Nonnull)path;\n\n- `\n ``\n ``\n `\n\n ### [-useEmulatorWithHost:port:](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(im)useEmulatorWithHost:port:)\n\n `\n ` \n Configures the Storage SDK to use an emulated backend instead of the default remote backend.\n This method should be called before invoking any other methods on a new instance of `Storage`. \n\n #### Declaration\n\n Objective-C \n\n - (void)useEmulatorWithHost:(NSString *_Nonnull)host port:(NSInteger)port;\n\n- `\n ``\n ``\n `\n\n ### [-copy](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(im)copy)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (id _Nonnull)copy SWIFT_WARN_UNUSED_RESULT;\n\n- `\n ``\n ``\n `\n\n ### [-isEqual:](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(im)isEqual:)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;\n\n- `\n ``\n ``\n `\n\n ### [hash](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(py)hash)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) NSUInteger hash\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(im)init)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init SWIFT_UNAVAILABLE;\n\n- `\n ``\n ``\n `\n\n ### [+new](#/c:@M@FirebaseStorage@objc(cs)FIRStorage(cm)new)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG(\"-init is unavailable\");"]]