Error during Build & Deploy when using third-party plugin

4 posts, 0 answers
  1. Dimitar
    Dimitar avatar
    1 posts
    Member since:
    Feb 2016

    Posted 17 May 2016 Link to this post

    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 ?

     

  2. Tsvetan
    Admin
    Tsvetan avatar
    8 posts

    Posted 20 May 2016 Link to this post

    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.

     
  3. z1ad
    z1ad avatar
    1 posts
    Member since:
    Apr 2014

    Posted 02 Jun in reply to Tsvetan Link to this post

    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?

  4. Garo
    Admin
    Garo avatar
    131 posts

    Posted 07 Jun Link to this post

    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.

     
Back to Top