Getting strange issue with: dyld[77079]: Library n...
# compose-ios
j
Getting strange issue with: dyld[77079]: Library not loaded: @rpath/FirebaseAuth.framework/FirebaseAuth When I shifted from cocoapods into Swift Package Manager. Having this in my shared module.
Copy code
listOf(
    iosX64(),
    iosArm64(),
    iosSimulatorArm64()
).forEach {
    it.binaries.framework {
        isStatic = true
        baseName = "shared"
    }
}
Also I have added the FirebaseAuth in Swift Package Manager as far as I understood it in XCode. Anyone experience same?
b
Did you ever find a solution to this?
j
Yes and no. Found a hacky way around it.
b
what was it? 🙃
j
Re-add the thing in Xcode in build phase
So that cocoapods plugin is linking headers, and the actual link kind a is dealt with in XCode project setup. Shouldnt work like that, but I havent found any way around it, tested kind of evertyhing 😄
b
damn 😕
j
In my particular case its like Kotlin cocoapods used from Devlive Firebase Kotlin SDK library is dragin transtivive deps in their library. However thats only able to give me the link headers I think (Tried using transivieExports and a lot of api + link flags to do it differnetly). And then using SPM to provide the actual dependency link in XCode build phase, which is re-linking again I think. I am no iOS expert in their weird package managers Apples has however, so I can have missed things.
So its working yes, but very horrible.
b
gotcha
im trying to transitively include Giphy, Gifu, and Sentry (all used internally in our library) and getting the same error that you received
adding each to Embed frameworks does seem to work
just makes for a terrible DX for iOS devs using our library 🤔
j
I tried follow every single combo here https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/428 and tested every single flag in cocoapods kotlin plugin in their documentation. I can semi get it work partly, but I think if using export setup as should then getting some problematic ObjC headers not compliant or something like that. Main issue in that path I think was transitive cocoapods dependencies like FirebaseFirestoreInternal and that kind of oddness. I just give up to be honest. It sucks, but would love if the team behind GitLiveApp could answer anything or anyone being good in cocoapods or iOS in general and tell everyone how it SHOULD be done 😛
âž• 1
@brandonmcansh Curious, do you know if same thing happens if using like Cocoapods Firebase in native IOS as well? Or is this issue isolated to KMP/Kotlin cocoapods vs SPM?
I never seen anyone solved transitive SPM / Cocoapods ever in Xcode in any place, but maybe just be bad GOogling 😛
b
im wondering if I could bundle the dependency frameworks (copying them in a gradle task) in my spm
placing them alongside the library xcframework
j
Probably yes, but I think it will duplicating deps if using multiple libs depend on same deps transitive. WIll increase the size a lot I think. Not sure, I just wish there were more experts in this topic here. Feels like everyone struggle with the same issue in Kotlin Lang Slack 😧