https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
s

Sterling Albury

08/22/2022, 5:17 PM
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

David Nedrow

08/23/2022, 4:33 PM
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

Sterling Albury

08/23/2022, 4:37 PM
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

David Nedrow

08/23/2022, 4:38 PM
Huh. Are you talking about the iOS app that is part of the sample, or are you creating a KMM library?
s

Sterling Albury

08/23/2022, 4:41 PM
Yeah I'm building off of everything. I've added my own kmm modules to the shared lib and adjusting the iOS app
d

David Nedrow

08/23/2022, 4:43 PM
I’m out of ideas. 🤷🏻
s

Sterling Albury

08/23/2022, 5:29 PM
yeah idk. adding the framework is working for me so i guess it's fine 😛
75 Views