EverliveSDK - Plugin

6 posts, 1 answers
  1. Daniel
    Daniel avatar
    8 posts
    Member since:
    Feb 2014

    Posted 25 Feb 2014 Link to this post

    Hi,

    I've been working on the iOS version of a PhoneGap Plugin which is supposed to be included in our Appbuilder solution and accesses the Telerik Backend within the native part of the application. To get to know the whole framework implemented several approaches which worked great so far and which are:

    - Native (objective-c) using the Rest API
    - Native (objective-c) using a self-made EverliveSDK.framework based on the Rest API
    - Native (objective-c) using the EverliveSDK.framework provided by Telerik
    - PhoneGap Application (xCode) using the EverliveSDK.framework by Telerik

    The main reason I implemented those approaches, were of learning nature but they are also quite helpful when debugging the core functionality.
    The core of the application is a static library which uses the mentioned approaches to insert data into the Backend. Wrapping it in into a plugin structure it's fully operational after adding it to my PhoneGap solution, using the PhoneGap CLI. Importing it to the Appbuilder on the other side, result in linker (Ld) Errors as the static library and the EverliveSDK can't be located.

    <framework src=".../EverliveSDK.framework" weak="true" />
    Link: ld: framework not found EverliveSDK

    adding my static library using the <source-file ... /> tag results in:
    ld: symbol(s) not found for architecture armv7s
    ld: symbol(s) not found for architecture armv7

    Guess I'm missing some compiler flags when building my static.library but as it works with PhoneGap it'll get harder to detect the error.

    Is the <framework .../> tag supported and is it an approach that's architecturally acceptable? Cause I still can get back to the Rest API solution as part of my library.
    And concerning the static lib error I'm working on that but any hint would be a great help.

    Regards Daniel


     



  2. Daniel
    Daniel avatar
    8 posts
    Member since:
    Feb 2014

    Posted 26 Feb 2014 in reply to Daniel Link to this post

    After some research and testing I managed to reproduce the errors

    ld: symbol(s) not found for architecture armv7s
    ld: symbol(s) not found for architecture armv7

    within my PhoneGap application. This helped me to understand the problem and I adjusted my plugin.xml to install the missing elements at the right position. So now that part is solved and I'm going to test it within Appbuilder. 

    Next part will be the import of the EverliveSDK and as soon I solved that I post my results if requested.

    Regards Daniel
  3. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 26 Feb 2014 Link to this post

    Hi Daniel,

    Please, refer to the following as general recommendations. If your problem persists, we would appreciate if you send us a sample project for building the plugin that is reproducing the problem when the plugin is added to AppBuilder.

    AppBuilder has some requirements and restrictions for custom plugins which we assume you have already consulted. In brief, they have to be Plugman compatible. Hopefully, the whole section of the documentation will be enough comprehensive to help you avoid common problems with custom plugins in AppBuilder.

    1. According to the Plugman specs sheet the <framework> tag is supported.
    Could you please verify that when building the plugin the EverliveSDK.framework was added properly into the Link Binary with libraries section in the build phases of your XCode project? There is a bug report for Plugman that describes such behaviour.

    Also, it would be reasonable to verify:

    The path to the framework in XCode is correct.
    - From your project targets select Build settings > Framework search paths.
    - Make sure that the path matches the actual path to the target framework.
    - Clean the project and rebuild it.

    The -objC flag in Other Linker Flags section.

    The reference to the EverliveSDK.framework. When dragging the EverliveSDK.framework to the Frameworks group of your project:
    - (If the EverliveSDK.framework folder was added manually in the project folder) - unselect "Copy items into destination group's folder". Make sure that your target is selected in "Add to targets".
    - (If the EverliveSDK.framework folder was not added manually in the project folder) - select "Copy items into destination group's folder".

    2. There might be several major reasons for such exception. Please, consult these community threads for addressing the most common cases here and here.

    Please, keep us informed with the progress on this issue.

    Regards,
    Anton Dobrev
    Telerik
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
  4. Daniel
    Daniel avatar
    8 posts
    Member since:
    Feb 2014

    Posted 26 Feb 2014 in reply to Anton Dobrev Link to this post

    Hi Anton,

    thank you for your answer. As I mentioned before the problem with the static library is solved and the links you provided were exactly the once I found this morning and they helped a lot. Unfortunately adding a framework still throws linker error when used in the Appbuilder.

    My plugin.xml seems to be correct, as I now can create a new Phonegap application ( using phonegap create ...) and after adding my plugin with plugman everything is correct and I can directly call the functions of my static library which access the included EverliveSDK.framework.

    Adding the same plugin to my Appbuilder project fails on the other side. To verify it's not an issue within my Plugin I downloaded http://plugins.cordova.io/#/org.chromium.frameworks.googleopensource , an example I found via a link within the Telerik documentation and added it successfully to my PhoneGap application, Appbuilder fails again:

    ------------------------------------------------------------------------------------------------------------------------------

    [2014-02-26 16:32:23.213] Log (Info,None): Project "PluginTest.proj" (default targets):
    Link: ld: framework not found GoogleOpenSource
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Link: ld: framework not found GoogleOpenSource
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Done building project "PluginTest.proj" -- FAILED.

    ------------------------------------------------------------------------------------------------------------------------------

    The only task of this plugin is adding the GoogleOpenSource.Framework and the plugin.xml uses the same <framework ....> tag as I used to add my solution. Now I'm a little bit in the dark, as I tried every approach to solve this task.

    Thanks again, I'll keep on trying ;)

    Daniel










  5. Daniel
    Daniel avatar
    8 posts
    Member since:
    Feb 2014

    Posted 27 Feb 2014 in reply to Daniel Link to this post

    Ok might have found the reason:

    https://issues.apache.org/jira/browse/CB-5238

    The capability of adding iOS frameworks with the custom="true" attribute was included with cordova version 3.3.0 and as I'm using the latest build it works fine on my platform.
    As far as I can tell Appbuilder's latest cordova version is 3.2.0 and therefore it might not support my request.

    If you can verify that I'm more than reliefed and I can stick to my local version for development and debugging till Appbuilder supports this feature. Last solution would be using my Rest API approach.

    Regards Daniel 
  6. Answer
    Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 27 Feb 2014 Link to this post

    Hello Daniel,

    The issue that you have discovered is exactly the reason why AppBuilder fails to compile the application. Good news is that the next version of AppBuilder will include support for custom iOS framework as part of the Cordova Plugman updates we are doing in our cloud tool chain. The release is expected in the first half of March so stay tuned.

    Regards,
    Stefan Dobrev
    Telerik
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
Back to Top