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

How to run a framework for an external plugin? (PSPDFKit)

2 Answers 109 Views
Show your code
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tobias
Top achievements
Rank 1
Tobias asked on 04 Feb 2015, 10:05 AM
Hi,

I try to implement an external plugin PSPDFKit to AppBuilder. I read the specification for plugman. In the attached image you find the structure under No. 2. On the left you will see the plugin.xml and the implementation of the framework (No. 1). No. 3 shows the error given during the "build and deploy" of the app.

It seems, that the framework is not running, because it can't find the pathes, given in the framework.

Can anybody help me how to run the framework correctly? 

2 Answers, 1 is accepted

Sort by
0
Tobias
Top achievements
Rank 1
answered on 04 Feb 2015, 10:07 AM
Here you find the original code for the plugin:

https://github.com/PSPDFKit/PSPDFKit-Cordova
0
Kaloyan
Telerik team
answered on 09 Feb 2015, 09:56 AM
Hello Tobias,

As replied in your support ticket:
"The issue you are experiencing is related to a symbolic links used in the plugin's file tree. At this stage, AppBuilder does not support symbolic links because of its hybrid development nature. In order to apply correctly the needed files, you will need to convert each symbolic link to a folder and refer the related files from there. However, we did this for you and you will find a correct implementation of the PSPDFKit plugin attached to my reply. 

Unfortunately, we found that the PSPDFKit.framework is not built against all of the mandatory for AppBuilder iOS architectures. These are armv7, armv7s and arm64. The PSPDFKit.framework is missing the armv7s architecture and this leads to the following error upon cloud build:
Copy Code
    Link: Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_JSContext", referenced from:
      objc-class-ref in PSPDFKit(PSPDFJavaScriptActionEvent.o)
      objc-class-ref in PSPDFKit(PSPDFJSContextJavascriptRuntimeProvider.o)
      objc-class-ref in PSPDFKit(PSPDFFormElement+JSExport.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
 
    Link: ld: file is universal (4 slices) but does not contain a(n) armv7s slice: Cordova370/Plugins/com.pspdfkit.cordovaplugin/PSPDFKit.framework/PSPDFKit file 'Cordova370/Plugins/com.pspdfkit.cordovaplugin/PSPDFKit.framework/PSPDFKit' for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

From this point, there is nothing we can currently do. We even searched for a more suitable version of the above mentioned framework, but to no avail. I would suggest you to contact the PSPDFKit.framework creators and see if they can come up with a version of their framework that is built against all of the needed iOS architectures (armv7, armv7s and arm64). If you get such sources, the only thing you will need to do in order to get the plugin working inside AppBuilder, is to replace the old ones in the attached plugin.

As an addition, we will definitely reconsider the architecture requirements for the AppBuilder iOS cloud builds. Most likely, there will be an option for our users to choose the architectures their apps should be built against. Still, at this stage I cannot give an estimation about the implementation of such functionality.
"

I hope this helps.

Regards,
Kaloyan
Telerik
 

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

 
Tags
Show your code
Asked by
Tobias
Top achievements
Rank 1
Answers by
Tobias
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or