Sam O'Donovan
01/31/2025, 5:39 AMld: warning: Could not find or use auto-linked framework 'GRPCClient': framework 'GRPCClient' not found
ld: warning: Could not find or use auto-linked framework 'Protobuf': framework 'Protobuf' not found
ld: warning: Could not parse or use implicit file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore.tbd': cannot link directly with 'SwiftUICore' because product being built is not an allowed client of it
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GRPCCall2", referenced from:
in ComposeApp[2](ComposeApp.framework.o)
"_OBJC_CLASS_$_GRPCMutableCallOptions", referenced from:
in ComposeApp[2](ComposeApp.framework.o)
"_OBJC_CLASS_$_GRPCRequestOptions", referenced from:
in ComposeApp[2](ComposeApp.framework.o)
ld: symbol(s) not found for architecture arm64
I can see in the External Libraries section that the GRPCClient and Protobuf klibs are being pulled in (though they are in separate klib files).
Here is the gradle m2 folder for iosarm64
ls ~/.m2/repository/com/example/grpc-iosarm64/0.0.0-34-g08af418-SNAPSHOT
grpc-iosarm64-0.0.0-34-g08af418-SNAPSHOT-cinterop-GRPCClient.klib
grpc-iosarm64-0.0.0-34-g08af418-SNAPSHOT-cinterop-Protobuf.klib
grpc-iosarm64-0.0.0-34-g08af418-SNAPSHOT-kotlin_resources.kotlin_resources.zip
grpc-iosarm64-0.0.0-34-g08af418-SNAPSHOT-metadata.jar
grpc-iosarm64-0.0.0-34-g08af418-SNAPSHOT-sources.jar
grpc-iosarm64-0.0.0-34-g08af418-SNAPSHOT.klib
grpc-iosarm64-0.0.0-34-g08af418-SNAPSHOT.module
grpc-iosarm64-0.0.0-34-g08af418-SNAPSHOT.pom
maven-metadata-local.xml
I was under the impression that we would be able to package up a library in such a way that we would not need to explicictly include the cocoapods dependencies seeing as the cinterop klibs are all being generated.
Is there a way to statically link the cocoapods dependencies into a multiplatform library?François
01/31/2025, 7:14 AMframework {
// Required properties
// Framework name configuration. Use this property instead of deprecated 'frameworkName'
baseName = "MyFramework"
// Optional properties
// Specify the framework linking type. It's dynamic by default.
isStatic = false
// Dependency export
// Uncomment and specify another project module if you have one:
// export(project(":<your other KMP module>"))
transitiveExport = false // This is default.
}
François
01/31/2025, 7:21 AMSam O'Donovan
02/05/2025, 4:16 AMFrançois
02/05/2025, 9:48 AMFrançois
02/05/2025, 2:06 PM