Thomas
03/22/2019, 5:04 PMcompilations.getByName("main") {
val firebase by cinterops.creating {
defFile("$projectDir/src/iOSMain/cinterop/firebase.def")
val pods = "$projectDir/../ios/Pods"
includeDirs(
"$pods/FirebaseCore/Firebase/Core/Public"
)
compilerOpts("-F$pods/Firebase -F$pods/FirebaseCore")
linkerOpts("-F$pods/Firebase -F$pods/FirebaseCore")
}
}
And this is the firebase.def
file:
language = Objective-C
headers = FirebaseCore.h
When trying to edit the Kotlin code I have no issues importing the Firebase framework. But when compiling for iOS (packForXCode) I get this error:
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FIRApp", referenced from:
objc-class-ref in combined.o
ld: symbol(s) not found for architecture x86_64
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Does anyone know why this is happening? Is there something wrong in my configuration?kpgalligan
03/22/2019, 5:15 PMkpgalligan
03/22/2019, 5:18 PMThomas
03/22/2019, 5:26 PMThomas
03/22/2019, 6:25 PMkpgalligan
03/22/2019, 6:33 PMivan.savytskyi
03/23/2019, 3:52 AMivan.savytskyi
03/23/2019, 3:52 AMivan.savytskyi
03/23/2019, 3:53 AMThomas
03/23/2019, 9:06 AMkpgalligan
03/23/2019, 1:46 PMkpgalligan
03/23/2019, 1:49 PMJoao Zao
03/26/2019, 1:41 AMAny reason you’re not using the multiplatform firebase lib?@kpgalligan Are you referring to this 👇 ? https://github.com/RubyLichtenstein/Kotlin-Multiplatform-Firebase
kpgalligan
03/26/2019, 1:42 AMJoao Zao
03/26/2019, 1:44 AMkpgalligan
03/26/2019, 1:45 AMJoao Zao
03/26/2019, 1:47 AMld: framework not found FirebaseFirestore
probably missing some includeDirs, don’t know.kpgalligan
03/26/2019, 1:49 AMkpgalligan
03/26/2019, 1:49 AMJoao Zao
03/26/2019, 1:50 AMJoao Zao
03/26/2019, 1:51 AMJoao Zao
03/26/2019, 2:52 AMlinkerOpts
through -F
option is solving the issue ld: framework not found FirebaseFirestore
Something like:
linkerOpts = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a -F ${fullpath-to-frameworks-dir} -framework FirebaseFirestore -framework ...