Sagar Khurana
02/06/2025, 2:05 PMbuild.gradle.kts
iOS build fails with an error
pod("FirebaseCrashlytics") {
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("FirebaseCore") {
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("FirebasePerformance") {
extraOpts += listOf("-compiler-option", "-fmodules")
}
Logs from the failing build in Xcode
GoogleUtilities.build/Objects-normal/x86_64/Binary/Cheat\ Codes\ Pro.debug.dylib
Undefined symbols for architecture x86_64:
"_main", referenced from:
___debug_main_executable_dylib_entry_point in command-line-aliases-file
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
> Task :composeApp:checkSandboxAndWriteProtection
> Task :composeApp:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :composeApp:generateDefFirebaseCore UP-TO-DATE
> Task :composeApp:xcodeVersion UP-TO-DATE
> Task :composeApp:podGenIos UP-TO-DATE
> Task :composeApp:podInstallSyntheticIos UP-TO-DATE
> Task :composeApp:podSetupBuildFirebaseCoreIosSimulator UP-TO-DATE
> Task :composeApp:podBuildFirebaseCoreIosSimulator FAILED
error: Executing of 'xcodebuild -project Pods.xcodeproj -scheme FirebaseCore -destination generic/platform=iOS Simulator -configuration Debug' failed with code 65 and message:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':composeApp:podBuildFirebaseCoreIosSimulator'.
> Executing of 'xcodebuild -project Pods.xcodeproj -scheme FirebaseCore -destination generic/platform=iOS Simulator -configuration Debug' failed with code 65 and message:
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project Pods.xcodeproj -scheme FirebaseCore -destination "generic/platform=iOS Simulator" -configuration Debug
User defaults from command line:
IDEPackageSupportToolchainOverrideForManifestLoading = com.apple.dt.toolchain.XcodeDefault
IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault
François
02/06/2025, 2:36 PMSagar Khurana
02/06/2025, 2:37 PMFrançois
02/06/2025, 2:37 PMSagar Khurana
02/06/2025, 2:37 PMSagar Khurana
02/06/2025, 2:38 PMFirebase are ObjC librarythen, then completely confused why is this issue happening
Sagar Khurana
02/06/2025, 2:38 PMFrançois
02/06/2025, 2:42 PMSagar Khurana
02/06/2025, 2:45 PMcocoapods {
// Required fields
version = "1.0"
summary = "Some description for a Kotlin/Native module"
homepage = "Link to a Kotlin/Native module homepage"
// Match target in Podfile
ios.deploymentTarget = "15.4"
// Specify path to Podfile
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "ComposeApp"
isStatic = true
}
pod("Mixpanel") {
// version = libs.versions.pods.firebase.performance.get()
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("FirebaseCore") {
// version = libs.versions.pods.firebase.performance.get()
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("FirebaseAnalytics") {
// version = libs.versions.pods.firebase.performance.get()
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("FirebasePerformance") {
// version = libs.versions.pods.firebase.performance.get()
extraOpts += listOf("-compiler-option", "-fmodules")
}
pod("FirebaseCrashlytics") {
// version = libs.versions.pods.firebase.performance.get()
extraOpts += listOf("-compiler-option", "-fmodules")
}
xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] = NativeBuildType.RELEASE
}
Sagar Khurana
02/06/2025, 2:57 PMExecuting of 'xcodebuild -project Pods.xcodeproj -scheme FirebaseAnalytics -destination generic/platform=iOS Simulator -configuration Debug' failed with code 65 and message:
François
02/06/2025, 3:04 PMHaley Cunningham
02/09/2025, 7:46 PMSagar Khurana
02/11/2025, 6:04 AMPodfile
instead of in the CocoaPods in the build.gradle.kts