Storage
class Storage : NSObject
FirebaseStorage is a service that supports uploading and downloading binary objects, such as images, videos, and other files to Google Cloud Storage.
If you call [FIRStorage storage], the instance will initialize with the default FIRApp, [FIRApp defaultApp], and the storage location will come from the provided GoogleService-Info.plist.
If you call [FIRStorage storageForApp:] and provide a custom instance of FIRApp, the storage location will be specified via the FIROptions#storageBucket property.
-
Creates an instance of FIRStorage, configured with the default FIRApp.
Declaration
Swift
class func storage() -> Self
Return Value
the FIRStorage instance, initialized with the default FIRApp.
-
Creates an instance of FIRStorage, configured with the custom FIRApp @a app.
Declaration
Swift
class func storage(app: FIRApp) -> Self
Parameters
app
The custom FIRApp used for initialization.
Return Value
the FIRStorage instance, initialized with the custom FIRApp.
-
Creates an instance of FIRStorage, configured with a custom storage bucket @a url.
Declaration
Swift
class func storage(url: String) -> Self
Parameters
url
The gs:// url to your Firebase Storage Bucket.
Return Value
the FIRStorage instance, initialized with the custom FIRApp.
-
Creates an instance of FIRStorage, configured with a custom FIRApp @a app and a custom storage bucket @a url.
Declaration
Swift
class func storage(app: FIRApp, url: String) -> Self
Parameters
app
The custom FIRApp used for initialization.
url
The gs:// url to your Firebase Storage Bucket.
Return Value
the FIRStorage instance, initialized with the custom FIRApp.
-
Undocumented
-
The Firebase App associated with this Firebase Storage instance.
Declaration
Swift
var app: FIRApp { get }
-
Maximum time in seconds to retry an upload if a failure occurs. Defaults to 10 minutes (600 seconds).
Declaration
Swift
var maxUploadRetryTime: TimeInterval { get set }
-
Maximum time in seconds to retry a download if a failure occurs. Defaults to 10 minutes (600 seconds).
Declaration
Swift
var maxDownloadRetryTime: TimeInterval { get set }
-
Maximum time in seconds to retry operations other than upload and download if a failure occurs. Defaults to 2 minutes (120 seconds).
Declaration
Swift
var maxOperationRetryTime: TimeInterval { get set }
-
Queue that all developer callbacks are fired on. Defaults to the main queue.
Declaration
Swift
var callbackQueue: DispatchQueue { get set }
-
Creates a FIRStorageReference initialized at the root Firebase Storage location.
Declaration
Swift
func reference() -> FIRStorageReference
Return Value
An instance of FIRStorageReference initialized at the root.
-
Creates a FIRStorageReference given a gs:// or https:// URL pointing to a Firebase Storage location. For example, you can pass in an https:// download URL retrieved from [FIRStorageReference downloadURLWithCompletion] or the gs:// URI from [FIRStorageReference description].
Declaration
Swift
func reference(forURL string: String) -> FIRStorageReference
Parameters
string
A gs:// or https:// URL to initialize the reference with.
Return Value
An instance of FIRStorageReference at the given child path. @throws Throws an exception if passed in URL is not associated with the FIRApp used to initialize this FIRStorage.
-
Creates a FIRStorageReference initialized at a child Firebase Storage location.
Declaration
Swift
func reference(withPath string: String) -> FIRStorageReference
Parameters
string
A relative path from the root to initialize the reference with, for instance @
path/to/object
.Return Value
An instance of FIRStorageReference at the given child path.