VS-MDA:在插件中定制iOS框架 [英] VS-MDA: Custom iOS-Framework in Plugin

查看:157
本文介绍了VS-MDA:在插件中定制iOS框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们要为我们的混合应用程序创建MobFox插件。它已经在CLI-Cordova应用程序中运行良好,但它在我们的混合应用程序中不工作,因为看起来框架的目录结构(标题和版本目录之间的符号链接)被Windows破坏,其中框架里面的插件在mda项目中。如果我开始构建,头文件夹不被识别为一个符号链接,但作为Mac上的普通可执行文本文件。

we want to create a MobFox-Plugin for our hybrid apps. It is already running well in CLI-Cordova Apps, but it does not work in our hybrid apps, because it seems that the directory structure of the framework (the symbolic links between headers and version directory) is destroyed by Windows, where the framework is inside the plugin in the mda project. If I start a build, the header directory of is not recognized as a symbolic link, but as an ordinary executable textfile on the Mac.

这是我如何包括框架在插件xml中:

This is how I include the framework in the plugin xml:

<framework src="libs/ios/MobFox.framework" custom="true"/>

我也试图将MobFox.framework复制到SDK框架文件夹,并像标准系统库工作良好:

I also tried to copy the MobFox.framework to the SDK Frameworks Folder and reference it like the standard system libraries (which work well):

<framework src="MobFox.framework" />

但这也失败,虽然框架现在包含在Xcode中。但编译器现在说,它找不到MobFox.h类,这是如何包括:

But this also fails, though the Framework is now included correctly in Xcode. But the compiler now says that it cannot find the MobFox.h-class, this is how it's included:

#import <MobFox/MobFox.h>

所以我真的认为问题是Windows无法处理.framework文件中的符号链接。任何人都有这个问题的解决方案或解决方案?或者一个想法为什么我的解决方法将文件放在标准框架文件夹不工作?

So I really think that the problem is that Windows cannot handle the symbolic links inside the .framework File. Does anybody has a workaround or solution for this problem? Or an idea why my Workaround with placing the file in the Standard-Frameworks Folder does not work?

任何帮助将非常感激。

感谢

推荐答案

同样的问题 - 看来当插件发布到cordova注册表丢失了.framework包中的符号链接,告诉XCode所有的东西。

Same problem here - it appears that when the plugin is published to the cordova registry it loses the symbolic links inside the .Framework package that tell XCode where everything is.

它们是在git上维护的,所以它是在plugman导出/错误。

They are maintained on git, so it is something in the plugman export/publish that is going wrong.

例如

cordova plugin add https://github.com/uxcam/cordova-uxcam

将适用于我写的插件,但不会

will work for the plugin I am writing, but not

cordova plugin add com.uxcam.cordova.plugin

这是发布的版本。

如果你深入到你添加的项目的plugins文件夹和com.uxcam.cordova.plugin文件中的显示包内容然后进入'src / ios'UXCam.framework',看看它是如何混乱的框架文件夹中的符号链接,应该指向Headers文件夹和链接库二进制。

If you delve down into the 'plugins' folder of the project you added it too and 'show package contents' on the com.uxcam.cordova.plugin file you can then get into 'src/ios'UXCam.framework' and see how it has messed up the symbolic links in the framework folder that should point at the Headers folder and a link the the library binary as well.

参考:Cordova错误报告: https://issues.apache.org/jira/browse/CB-6092

Reference: Cordova bug report here: https://issues.apache.org/jira/browse/CB-6092

更新:我已经工作通过手动将框架中的文件放入他们需要的地方的问题。所以现在上面的github项目我参考上面你可以看到框架库是直接在UXCam.framework文件夹,并有一个显式的Headers文件夹,其中有UXCam.h文件。

Update: I've worked around the problem by manually putting files in the framework into the places they need to be. So now on the github project I reference above you can see that the framework library is directly in the UXCam.framework folder, and there is an explicit Headers folder that has the UXCam.h file in it. This works for a published plugin now.

这不是一个理想的解决方案,每次更新框架,我都要重新修复布局,但现在工作,直到我可以找到适当的地方报告问题。

Not an ideal solution and every time I update the framework I'll have to fix the layout again, but works for now until I can find the proper place to report the problem.

这篇关于VS-MDA:在插件中定制iOS框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆