This is a migrated thread and some comments may be shown as answers.

Error during Build & Deploy when using third-party plugin

3 Answers 122 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dimitar
Top achievements
Rank 1
Dimitar asked on 17 May 2016, 02:28 PM

Hi,

 

I am creating new blank KendoUI project and I add plugin  cordova-HTTP, which contains AFNetworking folder inside the ios folder.

When I click Build & Deploy in Visual studio, I receive the following errors:

 

Error: [xcode-build] Link /tmp/builds/NU0JVqtdMRwlFm2ezg/app/DerivedData/Cordova400/Build/Intermediates/Cordova400.build/Debug-iphoneos/Cordova400.build/Objects-normal/armv7/Cordova400:
Error: [xcode-build] Link /tmp/builds/NU0JVqtdMRwlFm2ezg/app/DerivedData/Cordova400/Build/Intermediates/Cordova400.build/Debug-iphoneos/Cordova400.build/Objects-normal/arm64/Cordova400: duplicate symbolAFNetworkingTaskDidCompleteResponseSerializerKey in:
/tmp/builds/NU0JVqtdMRwlFm2ezg/app/DerivedData/Cordova400/Build/Intermediates/Cordova400.build/Debug-iphoneos/Cordova400.build/Objects-normal/arm64/AFURLSessionManager.o
Cordova400/Plugins/com.telerik.afnetworking/AFNetworking.framework/AFNetworking(AFURLSessionManager.o)
duplicate symbol _AFNetworkingTaskDidCompleteAssetPathKey in:
/tmp/builds/NU0JVqtdMRwlFm2ezg/app/DerivedData/Cordova400/Build/Intermediates/Cordova400.build/Debug-iphoneos/Cordova400.build/Objects-normal/arm64/AFURLSessionManager.o
Cordova400/Plugins/com.telerik.afnetworking/AFNetworking.framework/AFNetworking(AFURLSessionManager.o)
duplicate symbol _AFNetworkingTaskDidCompleteResponseDataKey in:
/tmp/builds/NU0JVqtdMRwlFm2ezg/app/DerivedData/Cordova400/Build/Intermediates/Cordova400.build/Debug-iphoneos/Cordova400.build/Objects-normal/arm64/AFURLSessionManager.o
Cordova400/Plugins/com.telerik.afnetworking/AFNetworking.framework/AFNetworking(AFURLSessionManager.o)
duplicate symbol _AFNetworkingTaskDidCompleteErrorKey in:
/tmp/builds/NU0JVqtdMRwlFm2ezg/app/DerivedData/Cordova400/Build/Intermediates/Cordova400.build/Debug-iphoneos/Cordova400.build/Objects-normal/arm64/AFURLSessionManager.o
Cordova400/Plugins/com.telerik.afnetworking/AFNetworking.framework/AFNetworking(AFURLSessionManager.o)

 

.... and many more of the same type

 

It seems that there are two "versions" of the AFNetworking library which are conflicting with each other - the one is in the source code of the plugin and the other comes from Cordova400/Plugins/com.telerik.afnetworking/....

 

 

Does anybody had this issue or knows how I can resolve it ?

 

3 Answers, 1 is accepted

Sort by
0
Tsvetan
Telerik team
answered on 20 May 2016, 02:20 PM
Hello Dimitar,

The cordova-HTTP plugin is using AFNetworking. Also the AppBuilder LiveSync plugin (which is enabled by default in Debug build) is using it too. Currently you can build your project in Release configuration and the problem will disappear.

The build issue appears because of the AFNetworking dependency is referenced in the cordova-HTTP plugin - this way the other plugins in the project cannot reference AFNetworking anymore. The correct way to reference AFNetworking is to add a dependency to the cordova-afnetworking plugin which is already done in the AppBuilder LiveSync plugin.

Since this is only workaround but not a solution to your problem, we are working on the compatibility with the cordova-HTTP. The Telerik Platform team will contact the authors of the cordova-HTTP and we'll suggest them to remove the static AFNetworking files and use the cordova-afnetworking plugin as dependency. This will solve the problem and any other plugins you add to your project which are depending on AFNetworking like AppBuilder LiveSync plugin will not cause conflicts.

Regards,
Tsvetan
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
z1ad
Top achievements
Rank 1
answered on 02 Jun 2017, 08:54 AM

Hello, has there been any news regarding this issue? I am also having the same build problem. Unfortunately the workaround doesnt help me as I require livesync for testing.

wymsee cordova-http plugin is referencing afnetworking 3.1.0
telerik cordova-afnetworking plugin is still using 2.5.3? which is now 2 years old

I dont think it would be possible for the developer of cordova-http to use the cordova-afnetworking dependency as there has been a number of breaking changes since afnetworking 3.0, see: https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-3.0-Migration-Guide

Surely it is worth updating the livesync afnetworking dependency to use the latest version 3.1.0 and to solve both problems in the correct way?

0
Garo
Telerik team
answered on 07 Jun 2017, 08:35 AM
Hello Ziad,

We investigated the possibility to update the AFNetworking dependency of the LiveSync plugin, unfortunately, due to the numerous breaking changes that you mentioned, this is not an option. The development effort is just too great to justify such modification. Additionally, this would not resolve the issue that you are experiencing, because the cordova-HTTP plugin still uses static AFNetworking files and the duplicate files error will remain.

Regards,
Garo
Progress Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Apache Cordova
Asked by
Dimitar
Top achievements
Rank 1
Answers by
Tsvetan
Telerik team
z1ad
Top achievements
Rank 1
Garo
Telerik team
Share this question
or