Skip to content

Investigate multiple FirebaseUI/Provider subspecs #26

@asciimike

Description

@asciimike

Investigate splitting FirebaseUI into more subspecs for specific auth providers. This requires several things:

  1. Create the subspecs to only pull in certain source files and resources
  2. Forward declare classes in header files where necessary
  3. Perform runtime checks in shared auth implementations to guard against weakly linked libs

The start of a subspec is here:

s.subspec 'Auth' do |auth|
    auth.dependency "FirebaseUI/Facebook"
    auth.dependency "FirebaseUI/Google"
    auth.dependency "FirebaseUI/Twitter"
    auth.dependency "FirebaseUI/Password"
  end

s.subspec 'AuthHelper' do |helper|
  helper.source_files = "FirebaseUI/Auth/**/{FirebaseAppDelegate,FirebaseLoginViewController,FirebaseAuthConstants,FirebaseAuthDelegate,FirebaseAuthProvider,FirebaseLoginButton}.{h,m}"
  helper.resources = "FirebaseUI/Auth/Resources/*"
end

s.subspec 'Facebook' do |facebook|
  facebook.source_files = "FirebaseUI/Auth/**/FirebaseFacebookAuthProvider.{h,m}"
  facebook.dependency "FirebaseUI/AuthHelper"
  facebook.dependency "FBSDKCoreKit"
  facebook.dependency "FBSDKLoginKit"
end

s.subspec 'Google' do |google|
  google.source_files = "FirebaseUI/Auth/**/FirebaseGoogleAuthProvider.{h,m}"
  google.dependency "FirebaseUI/AuthHelper"
  google.dependency "Google/SignIn"
end

s.subspec 'Twitter' do |twitter|
  twitter.source_files = "FirebaseUI/Auth/**/{FirebaseTwitterAuthProvider,TwitterAuthDelegate}.{h,m}"
  twitter.dependency "FirebaseUI/AuthHelper"
  twitter.ios.framework = "Accounts"
end

s.subspec 'Password' do |password|
  password.source_files = "FirebaseUI/Auth/**/FirebasePasswordAuthProvider.{h,m}"
  password.dependency "FirebaseUI/AuthHelper"
end

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions