Giter Club home page Giter Club logo

firebase-ios-sdk-xcframeworks's Introduction

Firebase xcframework integration with SPM

A small mirror for https://github.com/firebase/firebase-ios-sdk, to add support for using their binary dependencies (xcframeworks) with swift package manager.

This repo contains a Package.swift file, which uses a binaryTarget for all Firebase libraries (xcframework files are hosted in github releases).

Official SPM Support

Firebase currently supports SPM integration, see the official SDK integration instructions. This repo is an alternative for integrating with their pre-built xcframeworks for faster build times. See in depth discussion for official SPM support for xcframeworks here.

Installation

  • Add the package:

    // swift-tools-version:5.3
    // The swift-tools-version declares the minimum version of Swift required to build this package.
    
    import PackageDescription
    
    let package = Package(
        name: "MyLibrary",
        platforms: [.iOS(.v11)],
        products: [
            .library(name: "MyLibrary", targets: ["MyLibraryTarget"])
        ],
        dependencies: [
            .package(
                name: "Firebase",
                url: "https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks.git",
                .exact("8.10.0")
            ),
        ],
        targets: [
            .target(
                name: "MyLibraryTarget",
                dependencies: [
                    .product(name: "Google-Mobile-Ads-SDK", package: "Firebase"),
                    .product(name: "FirebaseAnalytics", package: "Firebase")
                ]
            )
        ]
    )
    
  • Add -ObjC to Build Settings -> Other Linker Flags

  • Some Firebase frameworks require resource bundles. Drag and drop the ones you need into your target's Copy Bundle Resources Phase:

firebase-ios-sdk-xcframeworks's People

Contributors

akaffenberger avatar daniapopov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

firebase-ios-sdk-xcframeworks's Issues

macCatalyst Support (GoogleSignIn)

Hello!

We are using GoogleSignIn with macCatalyst and noticed that this package does not build when using macCatalyst and GoogleSignIn. We're adding the module as a dependency in our own Swift pacakage. I was able to get it to build with a small change in a fork of this repo. Curious if you could add support for macCatalyst. That requires bumping minimum swift-tools-version to 5.5, and adding macCatalyst platform to the depencencies and platform targets. Example of the change we made specific to GoogleSignIn:
Screenshot 2024-04-24 at 11 24 29โ€ฏAM

Thanks!

Undefined symbol: _OBJC_CLASS_$_FIRCrashlytics ...

I've added this package as a dependency to another swift package I have created MyPackage, and from Xcode's Project/ProjectDependency settings, I've added https://github.com/me/mypackage as a dependency.

Now, when attempting to compile my project, I receive the following errors:

Build target MyPackage
Package MyPackage | Configuration Staging | Destination My iPhone | SDK iOS 15.5
Link MyPackage_PackageProduct (arm64)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRCrashlytics", referenced from:
      objc-class-ref in NanitCore.o
  "_OBJC_CLASS_$_FIRRemoteConfigSettings", referenced from:
      objc-class-ref in NanitCore.o
  "_OBJC_CLASS_$_FIRRemoteConfig", referenced from:
      objc-class-ref in NanitCore.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

image

I'm not sure what I'm missing, but it seems that when attempting to compile MyPackage which has firebase-ios-sdk-xcframeworks as a dependency, it fails ... Any ideas?

Package collision for SwiftProtobuf

Attempted to add a dependency on another library that uses SwiftProtobuf and get the following collision error:

multiple targets named 'SwiftProtobuf' in: 'firebase-ios-sdk-xcframeworks', 'swift-protobuf'

Any thoughts on how these could be reconciled? The dependency in question is Algolia InstantSearch https://github.com/algolia/instantsearch-ios, which relies on the https://github.com/apple/swift-protobuf package.

I imagine other important dependencies may pop up with a similar issue.

Combine community extensions missing

The packages FirebaseAuthCombine-Community & FirebaseFirestoreCombine-Community that are part of the official Firebase SDK are not included into the Package.swift of this repository.

https://github.com/firebase/firebase-ios-sdk/blob/master/Package.swift

Line 65:

    ...
    .library(
      name: "FirebaseAuthCombine-Community",
      targets: ["FirebaseAuthCombineSwift"]
    ),
    .library(
      name: "FirebaseFirestoreCombine-Community",
      targets: ["FirebaseFirestoreCombineSwift"]
    ),
    ...

I am wondering if there is a specific limitation that prevent us from including those into the FirebaseFirestore and FirebaseAuth targets ?

InAppMessaging bundle is missing

8.15.0 - [Firebase/InAppMessaging][I-IAM400009] Display ran into error for message 3978956120715808093: Error Domain=com.firebase.inappmessaging.display Code=1 "(null)" UserInfo={message=resource bundle is missing}

Screenshot 2022-04-26 at 12 30 27

I can't get the in app messages to work.

How are .bundles working with SPM and Firebase?

Firebase seems to be using, for getting the resources for InAppMessaging

+ (NSArray *)relevantBundles {
  return @[ [NSBundle mainBundle], [NSBundle bundleForClass:[self class]] ];
}

Correct me if I'm wrong: SPM puts all the resources into the main app bundle, but mainBundle called from .xcframework won't be the app bundle, it'll be the framework bundle, hence it can't find the needed resources. That's as far as I've gone with my investigation.

I'm trying to understand how to fix this issue as we really enjoy using this mirror. Could it have regressed? Or maybe I configured something incorrectly.

visionOS Support

Hi,
Any chance to support visionOS (and its simulator / preview) via this project?
Some context on the state of the source firebase repo's progress/plans for it can be found in this issue. It's taking ... a while. (Both the process and ... building Firestore from source ha)

The changelog for today's version also mentions visionOS changes that seem like they should eventually bring at least the SPM binary distribution for Firestore back, but currently that is still hitting a warning during the actual build.

Thanks again for providing this mirror, it's so helpful to be able to speed up iterations via it.

Invalid archive returned with version 10.27.0

I'm having following issue with latest version 10.27.0. I tried example workspace with same result.

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseABTesting.xcframework.zip' which is required by binary target '_FirebaseABTesting'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FBLPromises.xcframework.zip' which is required by binary target '_FBLPromises'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseAnalytics.xcframework.zip' which is required by binary target '_FirebaseAnalytics'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseAppCheck.xcframework.zip' which is required by binary target '_FirebaseAppCheck'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_AppAuth.xcframework.zip' which is required by binary target '_AppAuth'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_AppCheckCore.xcframework.zip' which is required by binary target '_AppCheckCore'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseAppCheckInterop.xcframework.zip' which is required by binary target '_FirebaseAppCheckInterop'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseAnalyticsOnDeviceConversion.xcframework.zip' which is required by binary target '_FirebaseAnalyticsOnDeviceConversion'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseAppDistribution.xcframework.zip' which is required by binary target '_FirebaseAppDistribution'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseAuth.xcframework.zip' which is required by binary target '_FirebaseAuth'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseAuthInterop.xcframework.zip' which is required by binary target '_FirebaseAuthInterop'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseCore.xcframework.zip' which is required by binary target '_FirebaseCore'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseCoreExtension.xcframework.zip' which is required by binary target '_FirebaseCoreExtension'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseCoreInternal.xcframework.zip' which is required by binary target '_FirebaseCoreInternal'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseCrashlytics.xcframework.zip' which is required by binary target '_FirebaseCrashlytics'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseDatabase.xcframework.zip' which is required by binary target '_FirebaseDatabase'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseDynamicLinks.xcframework.zip' which is required by binary target '_FirebaseDynamicLinks'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseFirestore.xcframework.zip' which is required by binary target '_FirebaseFirestore'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseFirestoreInternal.xcframework.zip' which is required by binary target '_FirebaseFirestoreInternal'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseFunctions.xcframework.zip' which is required by binary target '_FirebaseFunctions'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseInAppMessaging.xcframework.zip' which is required by binary target '_FirebaseInAppMessaging'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseInstallations.xcframework.zip' which is required by binary target '_FirebaseInstallations'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseMLModelDownloader.xcframework.zip' which is required by binary target '_FirebaseMLModelDownloader'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseMessaging.xcframework.zip' which is required by binary target '_FirebaseMessaging'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseMessagingInterop.xcframework.zip' which is required by binary target '_FirebaseMessagingInterop'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebasePerformance.xcframework.zip' which is required by binary target '_FirebasePerformance'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseRemoteConfig.xcframework.zip' which is required by binary target '_FirebaseRemoteConfig'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseRemoteConfigInterop.xcframework.zip' which is required by binary target '_FirebaseRemoteConfigInterop'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseSessions.xcframework.zip' which is required by binary target '_FirebaseSessions'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseSharedSwift.xcframework.zip' which is required by binary target '_FirebaseSharedSwift'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_FirebaseStorage.xcframework.zip' which is required by binary target '_FirebaseStorage'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_GTMAppAuth.xcframework.zip' which is required by binary target '_GTMAppAuth'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_GTMSessionFetcher.xcframework.zip' which is required by binary target '_GTMSessionFetcher'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_GoogleAppMeasurement.xcframework.zip' which is required by binary target '_GoogleAppMeasurement'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_GoogleAppMeasurementIdentitySupport.xcframework.zip' which is required by binary target '_GoogleAppMeasurementIdentitySupport'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_GoogleAppMeasurementOnDeviceConversion.xcframework.zip' which is required by binary target '_GoogleAppMeasurementOnDeviceConversion'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_GoogleDataTransport.xcframework.zip' which is required by binary target '_GoogleDataTransport'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_GoogleMobileAds.xcframework.zip' which is required by binary target '_GoogleMobileAds'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_GoogleSignIn.xcframework.zip' which is required by binary target '_GoogleSignIn'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_GoogleUtilities.xcframework.zip' which is required by binary target '_GoogleUtilities'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_Promises.xcframework.zip' which is required by binary target '_Promises'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_RecaptchaInterop.xcframework.zip' which is required by binary target '_RecaptchaInterop'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_UserMessagingPlatform.xcframework.zip' which is required by binary target '_UserMessagingPlatform'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_absl.xcframework.zip' which is required by binary target '_absl'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_grpc.xcframework.zip' which is required by binary target '_grpc'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_grpcpp.xcframework.zip' which is required by binary target '_grpcpp'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_leveldb.xcframework.zip' which is required by binary target '_leveldb'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_nanopb.xcframework.zip' which is required by binary target '_nanopb'

invalid archive returned from 'https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks/releases/download/10.27.0/_openssl_grpc.xcframework.zip' which is required by binary target '_openssl_grpc'

No such module 'xxx' errors.

Hi, @akaffenberger
Thank you for creating a great library!

I'm new to Swift Package. I'm stuck on the following problems. Would you mind telling me how to fix them?

Description

I've got No such module 'xxx' errors.

image

I think the cause is my project can't get source files from firebase-sdk-ios because there is still a dummy file in each product in the following screenshot. I know package.sh will get those files, but I don't understand how I should run that script. (Copy the script into my project and run it?)

image

What I did

  • Add the package

image

Here is my package.swfit.

// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "FirebaseSDK",
    platforms: [.iOS(.v11)],
    products: [
        .library(name: "FirebaseSDK", targets: ["FirebaseSDK"])
    ],
    dependencies: [
        .package(
            name: "Firebase",
            url: "https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks.git",
            .exact("9.5.0")
        ),
    ],
    targets: [
        .target(
            name: "FirebaseSDK",
            dependencies: [  // products that I want to use
                .product(name: "FirebaseAnalytics", package: "Firebase"),
                .product(name: "FirebaseAuth", package: "Firebase"),
                .product(name: "FirebaseFirestore", package: "Firebase"),
                .product(name: "FirebaseCrashlytics", package: "Firebase"),
                .product(name: "GoogleSignIn", package: "Firebase")
            ]
        )
    ]
)
  • Add -ObjC to Build Settings -> Other Linker Flags

image

  • Copy the script into a Run Script Phase:

image

SwiftUI Previews are not working

Hello, thanks for creating this package, it really helps with build times. Just one problem, I can't get the Swiftui Previews to work. The official firebase package works without problems. Do you know if it is something specific with this mirror?

bazel + spm

it's possible to use spm + bazel with some scripts by @cgrindel

I want to do it with firebase - there's a long discussion here - and Google haven't been able to come to the party....
I'm thinking with your xcframework approach - it maybe possible.
I don't expect you to invest too much time -
firebase/firebase-ios-sdk#6115

here's a top level write up with spm + bazel
https://chuckgrindel.com/swift-packages-in-bazel

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "cgrindel_rules_spm",
    sha256 = "03718eb865a100ba4449ebcbca6d97bf6ea78fa17346ce6d55532312e8bf9aa8",
    strip_prefix = "rules_spm-0.11.0",
    urls = [
        "http://github.com/cgrindel/rules_spm/archive/v0.11.0.tar.gz",
    ],
)

load(
    "@cgrindel_rules_spm//spm:deps.bzl",
    "spm_rules_dependencies",
)

spm_rules_dependencies()

load(
    "@build_bazel_rules_swift//swift:repositories.bzl",
    "swift_rules_dependencies",
)

swift_rules_dependencies()

load(
    "@build_bazel_rules_swift//swift:extras.bzl",
    "swift_rules_extra_dependencies",
)

swift_rules_extra_dependencies()


load("@cgrindel_rules_spm//spm:defs.bzl", "spm_pkg", "spm_repositories")

spm_repositories(
    name = "swift_pkgs",
    dependencies = [
        spm_pkg(
            "https://github.com/firebase/firebase-ios-sdk.git",
            from_version = "8.10.0",
            products = ["Firebase"],
        ),
    ],
)

unfortunately -


spm_repositories(
    name = "swift_pkgs",
    dependencies = [
        spm_pkg(
            "https://github.com/akaffenberger/firebase-ios-sdk-xcframeworks.git",
            from_version = "8.10.0",
            products = ["Firebase"],
        ),
    ],
)

couldn't get it to work with your spm either.

"@swift_pkgs//Firebase:Firebase",

Remove watchOS Support or Implement Custom Build Script in Package.swift

Issue description:

Upon reviewing the Package.swift for the repository, it indicates that the package supports watchOS.
However, it's worth noting that the firebase-ios-sdk currently does not offer xcframeworks built specifically for watchOS. As a result, this might trigger build errors when trying to compile projects targeting watchOS with this package.

To address this, I'd recommend either:

  • Removing the watchOS support from the Package.swift to reflect the true capabilities of the package or
  • Incorporating a custom build script to handle watchOS compilation.

Related issues:

Thank you for looking into this.

Cannot build app with `firebase-ios-sdk` v10.24.0

Hi, thank you for working for this project! ๐Ÿ‘‹
I submit an issue because I have a problem with the new version (10.24.0)

Description

  • I can't build our app with akaffenberger/firebase-ios-sdk-xcframeworks 10.24.0
    • Errors said that the signatures can't be verified
  • If I add firebase/firebase-ios-sdk directly as a SPM package, I can build our app ๐Ÿ™†
Screenshot 2024-04-17 at 14 43 16

Reproduce

Environment

โฏ swift --version
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
โฏ xcodebuild -version
Xcode 15.3
Build version 15E204a

Missing FirebaseFirestoreSwift product

When pulling in the official Firebase package directly, there is a product called FirebaseFirestoreSwift available that adds support for the @DocumentID property wrapper, and Codable based write methods like .setData(from: Codable).

Would it be possible to include that product in this package?

Google Sign In button doesn't render correctly

Hi - hoping someone might have some ideas on how to address this issue.

I had previously wrapped the UIKit Google Sign In button in my SwiftUI app. When I was using the standard (not pre-compiled) Firebase packages, this rendered well. Now that I've switched to these pre-compiled packages, the button does not render any images or text:
Broken Google Sign In Button

I tried to switch to the now-existing SwiftUI implementation in the Google library, but import GoogleSignInSwift doesn't seem to exist in these pre-compiled packages, I can't find it in the list of frameworks/libraries to add. I would separately import the GoogleSignIn-iOS package, but it offers a library/framework/etc. of the same name GoogleSignIn as what's provided in this repo, so Xcode won't let me use both Swift packages at the same time.

Whose issue is this: the pre-compiled Firebase package (for not providing the GoogleSignInSwift module and/or breaking the UIKit button implementation somewhere between the last version I was using and 9.1.0), this Swift package wrapping them (for interfering with exposing the Swift module and/or the rendering of the UIKit button), or mine (for... misconfiguring something I guess)? How can I start to tease that out? And is there a way to work around this where I can import the separate GoogleSignIn-iOS package?

In case it matters, here's the UIKit wrapper that's broken:

import SwiftUI
import GoogleSignIn

struct GoogleSignInButton: View {
    @Environment(\.colorScheme) var colorScheme

    var body: some View {
        Group {
            if colorScheme == .light { // (2)
                GoogleSignInButtonInternal(colorScheme: .light)
            }
             else {
                GoogleSignInButtonInternal(colorScheme: .dark)
            }
        }
    }
}

fileprivate struct GoogleSignInButtonInternal: UIViewRepresentable {
    var colorScheme: ColorScheme

    func makeUIView(context: Context) -> GIDSignInButton {
        let button = GIDSignInButton()
        switch colorScheme {
            case .dark:
                button.colorScheme = .dark
                return button
            case .light:
                button.colorScheme = .light
                return button
            @unknown default:
                fatalError()
        }
    }

    func updateUIView(_ uiView: UIViewType, context: Context) {
    }
}

Any ideas would be greatly appreciated!

FirebaseFirestore unsafe build flags

Since updating to version 9.0.0 I am unable to build the project. I get the following error:

The package product 'FirebaseFirestore' cannot be used as a dependency of this target because it uses unsafe build flags.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.