LIFX / LIFXKit

The LIFX SDK for Objective-C.
MIT License
122 stars 76 forks source link

CocoaAsyncSocket pod same class name #21

Open jantimar opened 9 years ago

jantimar commented 9 years ago

Hi when I use in my pods too CocoaAsyncSocket Then I have problem with class with same name.

I was try refactoring but don't help me.

This is content of my Pod file: source 'https://github.com/CocoaPods/Specs.git' pod "XBChatModule" pod 'LIFXKit'

This is my error: .... Products/Debug-iphonesimulator/libPods-CocoaAsyncSocket.a(GCDAsyncUdpSocket.o) /Users/jantimar/Library/Developer/Xcode/DerivedData/TEST_LIFX-cpzysiaiyvlqahetcsmbxdwnbrhv/Build/Products/Debug-iphonesimulator/libPods-LIFXKit.a(GCDAsyncUdpSocket.o) duplicate symbol _OBJCCLASS$_GCDAsyncUdpSocket in: /Users/jantimar/Library/Developer/Xcode/DerivedData/TEST_LIFX-cpzysiaiyvlqahetcsmbxdwnbrhv/Build/Products/Debug-iphonesimulator/libPods-CocoaAsyncSocket.a(GCDAsyncUdpSocket.o) /Users/jantimar/Library/Developer/Xcode/DerivedData/TEST_LIFX-cpzysiaiyvlqahetcsmbxdwnbrhv/Build/Products/Debug-iphonesimulator/libPods-LIFXKit.a(GCDAsyncUdpSocket.o) duplicate symbol _OBJCMETACLASS$_GCDAsyncUdpSocket in: /Users/jantimar/Library/Developer/Xcode/DerivedData/TEST_LIFX-cpzysiaiyvlqahetcsmbxdwnbrhv/Build/Products/Debug-iphonesimulator/libPods-CocoaAsyncSocket.a(GCDAsyncUdpSocket.o) /Users/jantimar/Library/Developer/Xcode/DerivedData/TEST_LIFX-cpzysiaiyvlqahetcsmbxdwnbrhv/Build/Products/Debug-iphonesimulator/libPods-LIFXKit.a(GCDAsyncUdpSocket.o) ld: 131 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

lightbow commented 9 years ago

It looks like LIFXKit forked CocoaAsyncSocket for just one little change, but otherwise contains all the latest stuff from CocoaAsyncSocket (last release was August 2014, and latest LIFXKit came two months later). Still, it would be nice if LIFXKit didn't embed its own copy of CocoaAsyncSocket and used a CocoaPods dependency instead. I hit a similar issue with some LimitlessLED code (not a CocoaPod) using GCDAsyncUdpSocket, but fortunately, it had an easy workaround (remove my own copy of GCDAsyncUdpSocket.* and point my header search path at ${PODS_ROOT}/Headers/Private/LIFXKit/ to find theirs) that probably wouldn't apply to you. Sorry that's not much help to your situation, but hopefully @nsforge can get his patch into the master CocoaAsyncSocket.

lightbow commented 9 years ago

Still hoping this would be possible. It's a shame to use CocoaPods, and then embed code that also supports CocoaPods, defeating the purpose.

shaysemireg commented 9 years ago

I've confirmed this issue as well.

LIFXKit and Cocoa Async Socket result in a duplicate symbols issue when installed together.

IT's not possible to use the LIFXKit version of Cocoa Async Socket because the headers are not public in the podspec.