https://kotlinlang.org logo
Title
d

Dmitry Motyl

07/06/2022, 3:38 PM
I have several frameworks in my iOS project to split a code base. Shared code is added by cocoapods to each of them As result I get a crash with a lot of this messages:
Class SharedXXX is implemented in both YYY and ZZZ. One of the two will be used. Which one is undefined.
Has anybody solved this problem ?
l

Landry Norris

07/07/2022, 2:59 PM
I see these in one of my apps regarding some library. They aren’t fatal, just warning that it isn’t defined which location will be used. If both are kept in sync, it doesn’t matter.
The crash will be something else.
d

Dmitry Motyl

07/07/2022, 3:00 PM
yes, I agree that it is not fatal But the crash is caused by this situation I think.
l

Landry Norris

07/07/2022, 3:01 PM
YYY and ZZZ should be paths. Do they look right? Does it give a clue why the framework exists twice?
If the new framework gets placed in ZZZ when you compile, but iOS loads YYY, it’s possible some backwards-incompatibility causes the crash.
d

Dmitry Motyl

07/07/2022, 3:02 PM
I think it is because I added it for two frameworks
l

Landry Norris

07/07/2022, 3:03 PM
You’ll want to make sure it only gets embedded once.
It could be possible that the second framework compiles against the one in ZZZ, but runtime loads YYY.
d

Dmitry Motyl

07/07/2022, 3:03 PM
But I think it should be embedded once As i use cocoapods
l

Landry Norris

07/07/2022, 3:04 PM
Not sure then. Cocoapods are basically magic.