Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirebaseEmailAuthUI added via SPM, init methods not exposed (missing umbrella header / module map?) #1224

Open
JustinLeeRepo opened this issue Dec 20, 2024 · 1 comment

Comments

@JustinLeeRepo
Copy link

JustinLeeRepo commented Dec 20, 2024

Added FirebaseUI-iOS library via SPM
version 14.2.6
Xcode 15.2
FirebaseEmailAuthUI added to target's Frameworks, Libraries, and Embedded Content

When trying to init a new FUIEmailAuth provider, the init methods that are declared in the header file are not accessible or exposed.
When copying and pasting the init method from a previous project that successfully integrated FirebaseUI-iOS via CocoaPods, the compiler will mark the initialization as a call that takes no arguments.

Strangely enough when trying to autocomplete the init method with params, the compiler will list the init method as unavailable because
FirebaseEmailAuthUI is not imported, when it clearly is imported

Already:
Cleaned build folder
Reset package dependency cache

Image
@shosokawa
Copy link

Added FirebaseUI-iOS library via SPM
version 15.0.0
Xcode 16.2

We have same issue.
At build time, the following error occurs:
Argument passed to call that takes no arguments

I checked that Generated Interface for FUIEmailAuth.h (Swift 5 Interface) via Assistant - Generated Interface on XCode. It has the definition for the init properly and looks no problem. However, it seems like it is not being recognized during the build.

/** @class FUIEmailAuth
    @brief AuthUI components for Email Sign In.
 */
open class FUIEmailAuth {

    /** @property buttonAlignment
        @brief The alignment of the icon and text of the button.
     */
    open var buttonAlignment: Int32

    open class func bundle() -> Any!

    /** @fn initAuthAuthUI:signInMethod:forceSameDevice:allowNewEmailAccounts:actionCodeSetting:
        @brief Initializer with several configurations.
        @param authUI The auth UI object that this auth UI provider associate with.
        @param signInMethod The email sign in method, which can be password or email link.
        @param forceSameDevice Indicate whether for the email sign in link to be open on the same device.
        @param allowNewEmailAccounts Indicate whether allow sign up if the user doesn't exist.
        @param actionCodeSettings The action code settings for email actions.
     */
    public init!(authAuthUI authUI: FUIAuth!, signInMethod: Any!, forceSameDevice: Any!, allowNewEmailAccounts: Any!, actionCodeSetting actionCodeSettings: FIRActionCodeSettings!)

    /** @fn initAuthAuthUI:signInMethod:forceSameDevice:allowNewEmailAccounts:requireDisplayName:actionCodeSetting:
        @brief Initializer with several configurations.
        @param authUI The auth UI object that this auth UI provider associate with.
        @param signInMethod The email sign in method, which can be password or email link.
        @param forceSameDevice Indicate whether for the email sign in link to be open on the same device.
        @param allowNewEmailAccounts Indicate whether allow sign up if the user doesn't exist.
        @param requireDisplayName Indicate whether require display name when sign up.
        @param actionCodeSettings The action code settings for email actions.
     */
    public init!(authAuthUI authUI: FUIAuth!, signInMethod: Any!, forceSameDevice: Any!, allowNewEmailAccounts: Any!, requireDisplayName: Any!, actionCodeSetting actionCodeSettings: FIRActionCodeSettings!)

    /** @property forceSameDevice.
        @brief Whether to force same device flow. If not, opening the link on a different device will
               display an error message. Note that this should be true when used with anonymous user
               upgrade flows. The default is false.
     */
    open var forceSameDevice: Int32 { get }

    /** @property actionCodeSettings.
        @brief Defines the FIRActionCodeSettings configuration to use when sending the link. This gives
               the developer the ability to specify how the link can be handled, custom dynamic link,
               additional state in the deep link, etc.
     */
    open var actionCodeSettings: FIRActionCodeSettings! { get }

    /** @property allowNewEmailAccounts
        @brief Whether to allow new user sign, defaults to YES.
     */
    open var allowNewEmailAccounts: Int32 { get }

    /** @property requireDisplayName
        @brief Whether signup requires display name, defaults to YES.
     */
    open var requireDisplayName: Int32 { get }

    /** @fn signInWithPresentingViewController:
        @brief Signs in with email auth provider.
            @see FUIAuthDelegate.authUI:didSignInWithAuthDataResult:URL:error: for method callback.
        @param presentingViewController The view controller used to present the UI.
     */
    @available(*, deprecated, message: "This is deprecated API and will be removed in a future release.Please use signInWithPresentingViewController:email:")
    open func signIn(withPresentingViewController presentingViewController: Any!)

    /** @fn signInWithPresentingViewController:email:
        @brief Signs in with email auth provider.
            @see FUIAuthDelegate.authUI:didSignInWithAuthDataResult:URL:error: for method callback.
        @param presentingViewController The view controller used to present the UI.
        @param email The default email address.
     */
    open func signIn(withPresentingViewController presentingViewController: Any!, email: Any!)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants