ios - How to resolve symbol name conflict in a Cocoa touch framework -
i developed cocoa touch framework , having problems third party static framework classes embedded inside of it.
the problem symbol collisions when consumer projects use framework , import third party static framework framework uses.
i want remove these classes framework since conflicting host project classes (they use same third party framework) , somehow tell framework rely on main project third party framework (i instruct devs import framework), or alternatively add prefix these classes when hosting projects embed framework , use same third party framework own framework won't symbol collisions
any or direction welcomed!
cocoapods can resolve problem duplicate symbols.
below provided detailed explanations how make happen:
definitions
let's make definitions simpler explanations:
myframework - framework developing.
myapplication - application uses myframework.
otherframework - third-party framework used in myframework , myapplication.
problem
understand problem xcode fails build "duplicated symbols" error in otherframework.
solution
here conditions need satisfy fix problem:
1) myframework has refer otherframework cocoapods:
// myframework podfile use_frameworks! pod "otherframework" 2) myapplication has refer otherframework cocoapods:
// myapplication podfile use_frameworks! pod "otherframework" 3) myapplication can use mechanism refer myframework (by cocoapods or drag&drop framework project).
4) otherframework has built cocoapods.
if it's not built cocoapods yet, can make yourself.
goal need create otherframework.podspec , optionally submit cocoapods private repository. doesn't matter if have source files or otherframework.framework bundle. more details building cocoapod here.
Comments
Post a Comment