Get Started on iOS

Firebase Storage lets you upload and share user generated content, such as images and video, which allows you to build rich media content into your apps. Firebase Storage stores this data in a Google Cloud Storage bucket, a petabyte scale object storage solution with high availability and global redundancy. Firebase Storage lets you securely upload these files directly from mobile devices and web browsers, handling spotty networks with ease.

Prerequisites

  1. Install the Firebase SDK.
  2. Add your app to your Firebase project in the Firebase console.

Add Firebase Storage to your app

Ensure the following dependency is in your project's Podfile:

pod 'Firebase/Storage'

Run pod install and open the created .xcworkspace file.

Set up Firebase Storage

You must initialize Firebase before any Firebase app reference is created or used. If you have already done this for another Firebase feature, you can skip this step.

  1. Import the Firebase module:

    Objective-C

    @import Firebase;
    

    Swift

    import Firebase
    
  2. Configure a FIRApp shared instance, typically in your application's application:didFinishLaunchingWithOptions: method:

    Objective-C

    // Use Firebase library to configure APIs
    [FIRApp configure];
    

    Swift

    // Use Firebase library to configure APIs
    FIRApp.configure()
    
  3. Get a reference to the storage service, using the default Firebase App:

    Objective-C

    FIRStorage *storage = [FIRStorage storage];
    

    Swift

    let storage = FIRStorage.storage()
    

You're ready to start using Firebase Storage! First, let's learn how to create a Firebase Storage reference.

Send feedback about...

Need help? Visit our support page.