I'm gettin a '*dyld[20011]: Library not loaded'* e...
# kotlin-native
s
I'm gettin a '*dyld[20011]: Library not loaded'* error when running my ios app - the framework isn't being found on the rpath. i think the only things i changed since my last successful run as that i added a new framework and added a swift package. I ended up explicitly adding the framework to the 'Frameworks, Libraries, and Embedded Content' section, which works, but is this actually what i want to do? in the kmm-basic-sample the 'shared' framework isn't added in this section, and thing seemed to be working before without adding my framework like this, so i feel like something got messed up. any insight is welcome.
d
When you initialized your project, did you choose CocoaPods or XCFramework for iOS library handling. I suspect the kmm-basic-sample is using CocoaPods, which handles configuring the libraries, such that they don’t need to be added to the “Frameworks…” in Xcode. If it’s an XCFramework (or regular framework), you just need to add it to “Frameworks…“, which is normal.
s
I was actually just building off of the sample app, which was set up to use xcode frameworks. Adding the framework definitely works but I was confused because there was nothing added before and that was working too
d
Huh. Are you talking about the iOS app that is part of the sample, or are you creating a KMM library?
s
Yeah I'm building off of everything. I've added my own kmm modules to the shared lib and adjusting the iOS app
d
I’m out of ideas. 🤷🏻
s
yeah idk. adding the framework is working for me so i guess it's fine 😛
112 Views