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

Custom IOS plugin (Embedded binaries)

6 Answers 190 Views
Apple iOS
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ibzon
Top achievements
Rank 1
Ibzon asked on 26 Dec 2016, 09:23 AM

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.

6 Answers, 1 is accepted

Sort by
0
Accepted
Anton Dobrev
Telerik team
answered on 27 Dec 2016, 12:27 PM
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.
 
0
Evan
Top achievements
Rank 1
answered on 11 May 2017, 04:29 PM
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.
0
Anton Dobrev
Telerik team
answered on 15 May 2017, 12:27 PM
@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.

 
0
Evan
Top achievements
Rank 1
answered on 15 May 2017, 01:08 PM
That's great news! I will have to try that out, thanks for the reply and explanation!
0
Evan
Top achievements
Rank 1
answered on 15 May 2017, 05:08 PM

Would it work like this?

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

0
Anton Dobrev
Telerik team
answered on 17 May 2017, 09:04 AM
@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.

 
Tags
Apple iOS
Asked by
Ibzon
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
Evan
Top achievements
Rank 1
Share this question
or