Hello everyone. I am trying to integrate google si...
# multiplatform
e
Hello everyone. I am trying to integrate google signin using compose multiplatform. But after i added the pod installation i keep getting build failure on iOS. This is the error:
Copy code
Ld /Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/MeetlyAI.app/MeetlyAI.debug.dylib normal (in target 'iosApp' from project 'iosApp')
    cd /Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/iosApp
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios15.3-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -O0 -L/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/EagerLinkingTBDs/Debug-iphonesimulator -L/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/usr/lib/swift -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/EagerLinkingTBDs/Debug-iphonesimulator -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/AppAuth -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/AppCheckCore -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/GTMAppAuth -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/GTMSessionFetcher -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/GoogleSignIn -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/GoogleUtilities -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/PromisesObjC -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/iosApp/Pods/../../composeApp/build/cocoapods/framework -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/iosApp/../shared/build/xcode-frameworks/Debug/iphonesimulator18.0 -F/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/iosApp/../composeApp/build/xcode-frameworks/Debug/iphonesimulator18.0 -filelist /Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Objects-normal/arm64/MeetlyAI.LinkFileList -install_name @rpath/MeetlyAI.debug.dylib -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Objects-normal/arm64/MeetlyAI_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Objects-normal/arm64/MeetlyAI.swiftmodule -ObjC -lc++ -framework AppAuth -framework AppCheckCore -framework ComposeApp -framework CoreGraphics -framework CoreText -framework FBLPromises -framework Foundation -framework GTMAppAuth -framework GTMSessionFetcher -framework GoogleSignIn -framework GoogleUtilities -framework LocalAuthentication -framework SafariServices -framework Security -framework UIKit -weak_framework AuthenticationServices -weak_framework DeviceCheck -Xlinker -alias -Xlinker _main -Xlinker ___debug_main_executable_dylib_entry_point -framework Pods_iosApp -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Objects-normal/arm64/MeetlyAI_dependency_info.dat -o /Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/MeetlyAI.app/MeetlyAI.debug.dylib
ld: warning: search path '/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/AppAuth' not found
ld: warning: search path '/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/AppCheckCore' not found
ld: warning: search path '/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/GTMAppAuth' not found
ld: warning: search path '/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/GTMSessionFetcher' not found
ld: warning: search path '/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/GoogleSignIn' not found
ld: warning: search path '/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/GoogleUtilities' not found
ld: warning: search path '/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/PromisesObjC' not found
ld: warning: search path '/Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/iosApp/../shared/build/xcode-frameworks/Debug/iphonesimulator18.0' not found
ld: framework 'AppAuth' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
	Ld /Users/emmanuelozibo/Desktop/Work/saas/MeetlyAI/build/ios/Debug-iphonesimulator/MeetlyAI.app/MeetlyAI.debug.dylib normal (in target 'iosApp' from project 'iosApp')
	Building project iosApp with scheme iosApp and configuration Debug
(2 failures)
warning: Run script build phase 'Compile Kotlin Framework' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'iosApp' from project 'iosApp')
I have tried everything pls i need your help 🙏
đź§µ 3
f
## Instant promo Have you tried ? https://frankois944.github.io/spm4Kmp/ ## Are you building in static or dynamic the shared app?
e
Static is set to true:
Copy code
kotlin {
    androidTarget {
        compilerOptions {
            jvmTarget.set(JvmTarget.JVM_11)
        }
    }

    listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach { iosTarget ->
        iosTarget.binaries.framework {
            baseName = "ComposeApp"
            isStatic = true
        }
    }

    cocoapods {
        summary = "CocoaPods test library"
        homepage = "<https://github.com/JetBrains/kotlin>"
        version = "1.0"
        ios.deploymentTarget = "15.4"

        podfile = project.file("../iosApp/Podfile")

        framework {
            baseName = "ComposeApp"
            isStatic = true
        }

        pod("GoogleSignIn")
    }
    
    sourceSets {
        
        androidMain.dependencies {
            implementation(compose.preview)
            implementation(libs.androidx.activity.compose)
        }
        commonMain.dependencies {
            implementation(compose.runtime)
            implementation(compose.foundation)
            implementation(compose.material)
            implementation(compose.ui)
            implementation(compose.components.resources)
            implementation(compose.components.uiToolingPreview)
            implementation(libs.androidx.lifecycle.viewmodel)
            implementation(libs.androidx.lifecycle.runtime.compose)
            implementation(libs.jetpack.navigation)
            implementation(libs.kotlinx.serialization)
            implementation(libs.lifecycle.viewmodel.compose)
            implementation(libs.multiplatform.settings)
            implementation(project.dependencies.platform(libs.koin.bom))
            implementation(libs.koin.core)
            implementation(libs.koin.compose)
            implementation(libs.koin.compose.viewmodel)
            implementation(libs.koin.compose.navigation)
        }
    }
}
This is part of my gradle file
f
Oh, I see, you can’t mix both iOS integration
iosTarget.binaries.framework
and
cocoapods
How about the build step on the xcode side?
e
Ohh okay. Which one should i remove?
Do you mean the
Podfile
?
f
Remove the first one and follow the guide about using cocoapods with KMP.
Or use my plugin to avoid using cocoapods.
e
Okay, Thanks Francois. Let me try it 🙌