SwiftPackageManager.md 1.8 KB

Swift Package Manager for Firebase Beta

Introduction

Starting with the 6.31.0 release, Firebase supports installation via Swift Package Manager in Beta status.

Limitations

  • Requires at least Xcode 12 beta 4.
  • SwiftUI Previews require Xcode 12 beta 5.
  • Analytics requires clients to add -ObjC linker option.
  • Analytics is only supported for iOS and cannot be used in apps that support other platforms.
  • Messaging, Performance, Firebase ML, and App Distribution are not initially available.
  • watchOS support is not initially available.

Installation

If you've previously used CocoaPods, remove them from the project with pod deintegrate.

Install Firebase via Swift Package Manager:

Select the Firebase GitHub repository - https://github.com/firebase/firebase-ios-sdk.git:

Select the beta branch.

Note: Starting with the 6.31.0 release, the versions are specified in a format like 6.31-spm-beta. We won't support standard repository versioning until later in the beta or with general availability of the SPM distribution.

Choose the Firebase product and any additional products that you want installed in your app.

If you've installed FirebaseAnalytics, Add the -ObjC option to Other Linker Flags in the Build Settings tab.

Questions and Issues

Please provide any feedback via a GitHub Issue.

See current open Swift Package Manager issues here.