phonegap-pluginsurbanairship.com

Duplicate Symbols in Phonegap Urbanairship Plugin for iOS


I am in the middle of integrating UA into my Phonegap/iOS application using the UA Phonegap plugin https://github.com/urbanairship/phonegap-ua-push.

Unfortunately, I can not get it to work. Even the sample project fails to build. The problem is a duplicate symbol during linking. Please note: i did not include any additional headers, libs, etc. I am just trying to build the iOS sample project.

The clashing symbol seems to be rooted in the ASI* (ASIHttpRequest, ASIAuthenticationDialog, etc) library, which has been integrated into UA. Surprisingly, the clashing happens between both UA libs (libUAirship-1.3.2.a and libUAirshipPush-1.3.2.a).

Linker output: ld: duplicate symbol _OBJC_METACLASS_$_UA_ASIAutorotatingViewController in /Users/b/Downloads/urbanairship-phonegap-ua-push-9b7a89b/ios-sample/Airship/libUAirshipPush-1.3.2.a(UA_ASIAuthenticationDialog.o) and /Users/b/Downloads/urbanairship-phonegap-ua-push-9b7a89b/ios-sample/Airship/libUAirship-1.3.2.a(UA_ASIAuthenticationDialog.o) for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can this happen?


Solution

  • This issue appeared for me when I add the flag "-ObjC" in my target settings at "Other Linker Flags".

    Check it, i need the flag for an another library but if it's not your case...