I encountered a very strange thing. I used the cocoapods-packager to generate two frameworks, each of which depends on an identical third-party library. When I run two frameworks into my project, there is absolutely no problem. However, when I use cocoapods to integrate these two frameworks, xcode always prompts "duplicate symbol _OBJC_CLASS_$_
- PodsDummy_Pods_packager
".It means Pods-packager-dummy.o is repeated.
How can I solve this problem?
I implemented the references of these two frameworks with 'subspec'. In the podspec file, I originally wrote 's.dependency' on top of 's.subspec', so when using cocoapods, an error occurs.
So, I wrote 's.dependency' in every 's.subspec' and the problem was solved.
Correct writing is like this: