Skip to content

Some public symbols not exposed when using FirebaseUI via SPM #1268

@Udumft

Description

@Udumft

Public interfaces for some entities are different when using Cocoapods and SPM. For example this sample works fine with Pods, and has error with SPM:
Image

Judging by several other issues, FUIAuth is not the only one suffering from this issue. I assume that it would affect any public symbol, which uses a forward declaration of a type, which is defined in another module + has different Swift and Obj-C naming.

FUIAuth uses a forward declaration of FIRAuth, while FIRAuth is defined in Swift and has different names for Swift and Obj-C.
So my speculation is that there is a difference when swift interface for FUIAuth is generated: Pods do it during the host app build, while for SPM it is generated beforehand. And since FUIAuth' has a forward declaration for FIRAuth class, instead of an actual class, SPM doesn't know that it's name changes, and continues to expect FIRAuth swift class, which does not exist -> method is not exposed publicly.

I've prepared a minimal example project to demonstrate the issue. Note that it's the same code sample, same versions of Firebase but only target "Example_POD" uses cocoapods dependencies (and works fine), while "Example_SPM" uses SPM.

Problem.zip

I couldn't find the workaround for it yet and it forces me to use Cocoapods in my project, which I'm trying to get rid of...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions