Custom IOS plugin (Embedded binaries)

7 posts, 1 answers
  1. Ibzon
    Ibzon avatar
    1 posts
    Member since:
    Dec 2016

    Posted 26 Dec 2016 Link to this post

    I'm creating a cordova plugin for a telerik app in which i'm using a custom framework.

    I want to add the framework as embedded binaires.

    I'm able to do this using hooks (link : https://stackoverflow.com/questions/36650522/custom-cordova-plugin-add-framework-to-embedded-binaries) in plugin.xml and it works fine when i execute the plugin in a cordova app on XCode.

    When i install the same plugin in telerik app on visual studio i get the error "image not found".

    What is the correct way to add embedded binaries ?

    Thanks.

  2. Answer
    Anton Dobrev
    Admin
    Anton Dobrev avatar
    604 posts

    Posted 27 Dec 2016 Link to this post

    Hello,

    Telerik Platform does not respect hooks in custom plugins as explained in this documentation article. This said, the error is probably produced by the referenced library not being found.

    When adding a custom plugin in AppBuilder ensure it meets the requirements for using plugins as explained here.

    Depending on the framework (dynamic or static) you are referencing you may need to consider a different approach.

    Since you referenced the SOF thread - there seems to be a bug in Cordova which causes incorrect setup of custom plugins which reference dynamic frameworks. For example, all Cocoa Touch dynamic frameworks should be added as embedded binaries, that's why I it is advised to use the embed="true" attribute. However there is an issue on the official bug tracking system of Apache Cordova about similar cases.

    Eventually you may consider adding a static framework instead (you will not need the embed attribute anymore for this purpose).

    I hope this helps.

    Also, I am moving this to the AppBuilder forum section because it does not relate to the Telerik Backend Services iOS SDK.

    Regards,
    Anton Dobrev
    Telerik by Progress
     
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
     
  3. Evan
    Evan avatar
    6 posts
    Member since:
    Jun 2014

    Posted 11 May in reply to Anton Dobrev Link to this post

    That document doesn't actually explain why custom hooks aren't supported by AppBuilder, it just says they aren't. Can we know why exactly we can't implement custom hooks? I really need this feature at the moment.
  4. Anton Dobrev
    Admin
    Anton Dobrev avatar
    604 posts

    Posted 15 May Link to this post

    @Evan

    In one of our latest releases we added support for before-install and after-install hooks. This said, you can use them in a custom plugin that adheres to the prerequisites for custom plugins in AppBuilder. 

    Indeed, at the moment this is a limitation imposed by the build architecture which I also think should be adjusted and this will be communicated with the team as well.

    Let me know if you have questions. 

    Regards,
    Anton Dobrev
    Telerik by Progress
     

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

     
  5. Evan
    Evan avatar
    6 posts
    Member since:
    Jun 2014

    Posted 15 May in reply to Anton Dobrev Link to this post

    That's great news! I will have to try that out, thanks for the reply and explanation!
  6. Evan
    Evan avatar
    6 posts
    Member since:
    Jun 2014

    Posted 15 May in reply to Anton Dobrev Link to this post

    Would it work like this?

    <hook type="after_plugin_install" src="hooks/some-script.js" />

  7. Anton Dobrev
    Admin
    Anton Dobrev avatar
    604 posts

    Posted 17 May Link to this post

    @Evan

    Great to hear that you are making progress with this.

    This sounds correct, you can also see an example of a Telerik Verified plugin with hooks here

    Let me know if you have questions.

    Regards,
    Anton Dobrev
    Telerik by Progress
     

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

     
Back to Top