-
Notifications
You must be signed in to change notification settings - Fork 484
Description
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:
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.
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...