Error during Build & Deploy when using third-party plugin

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

    Posted 17 May 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
    6 posts

    Posted 20 May 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.

     
Back to Top