Pregunta

I am in a sticky situation where for the last couple of days I havent been able to progress with sharekit implementation because I am getting a duplicate symbol error with RestKit. I am running with iOS 5.1 and the latest version of xcode. I have both libraries installed as to the guidelines given. I dont understand how to remove references of this from ShareKit or RestKit without causing problems in one or the other. I really need some help on this one... Thanks.

duplicate symbol _OBJC_IVAR_$_GCOAuth.OAuthParameters in:
    /Users/josephboston/Library/Developer/Xcode/DerivedData/Prowd_Wallet-ezxvmeygcnwgtzehshsnnprpsjww/Build/Products/Debug-iphoneos/libShareKit.a(GCOAuth.o)
    /Users/josephboston/Library/Developer/Xcode/DerivedData/Prowd_Wallet-ezxvmeygcnwgtzehshsnnprpsjww/Build/Products/Debug-iphoneos/libRestKit.a(GCOAuth.o)

my project

¿Fue útil?

Solución

You are getting this error because both frameworks are using a common third party framework. So Xcode is complaining about duplicate symbols. This blog, "Avoiding duplicate symbol issues when using common utilities within a static library" is explaining a way to fix this.

Here is the solution mentioned there,

I’m working on two projects right now that have static library products, to be given to other developers to use in their projects: Audiobus and The Amazing Audio Engine. In both cases, I’m making quite heavy use of my circular buffer code, TPCircularBuffer, which would result in duplicate symbol errors if the static library were linked with another project that used it.

Use the preprocessor to rename the symbols automatically during the build phase.

This is done by adding a series of -DOldSymbol=NewSymbol flags to the ‘Other C Flags’ build setting – like -DTPCircularBuffer=ABCircularBuffer, for instance.

enter image description here

Otros consejos

GCOAuth is used in ShareKit by Evernote sdk only. So if you can live without Evernote sharer, quick workaround might be to remove evernote and evernote sdk from ShareKit, using granular install

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top