Is there anything in the SKIE template that would ...
# touchlab-tools
k
Is there anything in the SKIE template that would interfere with adding other XCFrameworks to the iOS testapp? As far as I can tell I'm building my other XCFramework correctly, but getting errors like it can't find / process it
k
By "other XCFrameworks", are these other Kotlin XCFrameworks or just other XCFrameworks? What's the error? Where are you seeing it?
k
Not a Kotlin XCFramework - this is created from Rust UniFFI headers and a Rust library. Here's the errors I'm seeing in XCode build log:
Copy code
Undefined symbol: _SCDynamicStoreCopyProxies
Undefined symbol: _SCDynamicStoreCreateRunLoopSource
Undefined symbol: _SCDynamicStoreCreateWithOptions
Undefined symbol: _SCDynamicStoreSetNotificationKeys
Undefined symbol: _SCNetworkInterfaceCopyAll
Undefined symbol: _SCNetworkInterfaceGetBSDName
Undefined symbol: _SCNetworkInterfaceGetInterfaceType
Undefined symbol: _SCNetworkInterfaceGetLocalizedDisplayName
Undefined symbol: _SCNetworkReachabilityCreateWithAddress
Undefined symbol: _SCNetworkReachabilityCreateWithAddressPair
Undefined symbol: _SCNetworkReachabilityCreateWithName
Undefined symbol: _SCNetworkReachabilityGetFlags
Undefined symbol: _SCNetworkReachabilityScheduleWithRunLoop
Undefined symbol: _SCNetworkReachabilityUnscheduleFromRunLoop
Undefined symbol: _SCNetworkServiceCopyAll
Undefined symbol: _SCNetworkServiceGetEnabled
Undefined symbol: _SCNetworkServiceGetInterface
Undefined symbol: _SCNetworkServiceGetServiceID
Undefined symbol: _SCNetworkSetCopyCurrent
Undefined symbol: _SCNetworkSetGetServiceOrder
Undefined symbol: _SCPreferencesCreate
Undefined symbol: _kSCDynamicStoreUseSessionKeys
Undefined symbol: _kSCNetworkInterfaceType6to4
Undefined symbol: _kSCNetworkInterfaceTypeBluetooth
Undefined symbol: _kSCNetworkInterfaceTypeBond
Undefined symbol: _kSCNetworkInterfaceTypeBridge
Undefined symbol: _kSCNetworkInterfaceTypeEthernet
Undefined symbol: _kSCNetworkInterfaceTypeFireWire
Undefined symbol: _kSCNetworkInterfaceTypeIEEE80211
Undefined symbol: _kSCNetworkInterfaceTypeIPSec
Undefined symbol: _kSCNetworkInterfaceTypeIPv4
Undefined symbol: _kSCNetworkInterfaceTypeIrDA
Undefined symbol: _kSCNetworkInterfaceTypeL2TP
Undefined symbol: _kSCNetworkInterfaceTypeModem
Undefined symbol: _kSCNetworkInterfaceTypePPP
Undefined symbol: _kSCNetworkInterfaceTypePPTP
Undefined symbol: _kSCNetworkInterfaceTypeSerial
Undefined symbol: _kSCNetworkInterfaceTypeVLAN
Undefined symbol: _kSCNetworkInterfaceTypeWWAN
Linker command failed with exit code 1 (use -v to see invocation)
I'm going to try to make a repro in an ios project without kmmbridge template stuff and see if I can learn from that
The reason I'm asking is because I see there are some custom settings for XCFramework search path in the XCode Build Settings for my target that point to the
allshared
framework
k
They're all just saying it can't find the binary for those symbols, which are presumably from rust. Presumably the rust code is compiled and available somewhere. How is that distrubuted?
k
Basically following this https://forgen.tech/en/blog/post/building-an-ios-app-with-rust-using-uniffi but its strange that they used uniffi bindgen on the
.dylib
file instead of the
.udl
which specifies what to expose... the official uniffi docs say to use
.udl
with bindgen. Figuring it out
k
Essentially, the error says it can't find the binary. I skimmed that post. If you're following that directly, then you used the "drag and drop" approach. If so, for some reason, the build sees the headers but not the binary. Generally that means something is wrong with either the linker settings not referencing the framework, or the framework search path not pointing to wherever the framework is. However, if it found the headers, then I'm not sure. I generally avoid the "drag and drop" approach for external frameworks when possible. A screenshot of your Xcode navigator (the project tree on the left), and your build settings for the iOS target, might help.
k
I got this working and… I don’t know what I was doing wrong. I am going to document the working process though.
k
Welcome to KMP. I made you this.
♥️ 1
K 1
cool cowboy 1