Skip to content

error: no such module 'GoogleSignIn #51

@mianaliasjad

Description

@mianaliasjad

i am facing this problem while syncing the project. I am new to compose multiplatform. am i doing something wrong?

> Task :composeApp:swiftklibGoogleSignInWrapperIosX64 FAILED Building for production... [0/4] Write sources [1/4] Write swift-version--58304C5D6DBC2206.txt [3/5] Compiling GoogleSignInWrapper GoogleSignInWrapper.swift /xyz/iosApp/iosApp/native/GoogleSignInWrapper.swift:10:8: error: no such module 'GoogleSignIn' 8 | 9 | import Foundation 10 | import GoogleSignIn | - error: no such module 'GoogleSignIn'`

`import Foundation
import GoogleSignIn
@objc public class GoogleSignInWrapper: NSObject {

@objc public func signIn(viewController: UIViewController, completion: @escaping (NSDictionary?) -> Void) {
    GIDSignIn.sharedInstance.signIn(withPresenting: viewController) { result, error in
        if let error = error {
            // In case of error, return an error message
            completion(["error": error.localizedDescription])
        } else if let result = result {
            // Prepare a dictionary to send relevant data to Kotlin
            
            let user = result.user
           
            
            let result = [
                "idToken": user.idToken?.tokenString ?? "",
                "accessToken": user.accessToken.tokenString
            ]
            completion(result as NSDictionary)
        } else {
            completion(nil)
        }
    }
}

}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions